@adyen/bento-vue2 1.6.1 → 1.7.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 (291) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/packages/core/src/components/button/button.types.d.ts +3 -1
  3. package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +43 -0
  4. package/dist/@types/packages/vue2/src/components/action-bar/index.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +4 -4
  6. package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -1
  7. package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +290 -281
  8. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +9 -0
  9. package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +3 -3
  10. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -1
  11. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +5 -5
  12. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
  13. package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +4 -3
  14. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +53 -70
  15. package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +1 -1
  16. package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +20 -2
  17. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +18 -0
  18. package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +20 -2
  19. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +1 -1
  20. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +1 -1
  21. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +45 -27
  22. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +1 -1
  23. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +21 -3
  24. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +24 -6
  25. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +21 -3
  26. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +21 -3
  27. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +21 -3
  28. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.types.d.ts +2 -0
  29. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +22 -4
  30. package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +5 -2
  31. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +234 -12
  32. package/dist/@types/packages/vue2/src/components/filter-bar/components/boolean-filter/boolean-filter.vue.d.ts +12 -5
  33. package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +1 -1
  34. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +2 -1
  35. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +1 -0
  36. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +12 -2
  37. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +10 -0
  38. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue.d.ts +3 -3
  39. package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +1 -1
  40. package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +3 -3
  41. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +1 -1
  42. package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +21 -0
  43. package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +18 -0
  44. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +19 -0
  45. package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
  46. package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/fixed-scroller.vue.d.ts +22 -1
  47. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +94 -8
  48. package/dist/@types/packages/vue2/src/components/internal/teleport/index.d.ts +1 -0
  49. package/dist/@types/packages/vue2/src/components/internal/teleport/teleport.vue.d.ts +50 -0
  50. package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +1 -1
  51. package/dist/@types/packages/vue2/src/components/menu/menu.keys.d.ts +1 -0
  52. package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +15 -11
  53. package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +9 -0
  54. package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +9 -0
  55. package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +1 -0
  56. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +4 -4
  57. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +5 -5
  58. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +10 -5
  59. package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +21 -0
  60. package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +21 -5
  61. package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +3 -3
  62. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +1 -2
  63. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
  64. package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.keys.d.ts +1 -0
  65. package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +3 -0
  66. package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +1 -0
  67. package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +9 -0
  68. package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +1 -0
  69. package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +2 -0
  70. package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +5 -5
  71. package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +6 -3
  72. package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +9 -2
  73. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +13 -13
  74. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/index.d.ts +1 -0
  75. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue.d.ts +12 -0
  76. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/index.d.ts +1 -0
  77. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue.d.ts +226 -0
  78. package/dist/@types/packages/vue2/src/components/tutorial/index.d.ts +2 -0
  79. package/dist/@types/packages/vue2/src/components/tutorial/tutorial.types.d.ts +13 -0
  80. package/dist/@types/packages/vue2/src/components/tutorial/tutorial.vue.d.ts +16 -0
  81. package/dist/@types/packages/vue2/src/composables/index.d.ts +5 -2
  82. package/dist/@types/packages/vue2/src/composables/use-click-outside/use-click-outside.d.ts +3 -0
  83. package/dist/@types/packages/vue2/src/composables/use-form-validate/index.d.ts +2 -0
  84. package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.d.ts +12 -0
  85. package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.types.d.ts +5 -0
  86. package/dist/@types/packages/vue2/src/composables/use-virtual-list/index.d.ts +2 -0
  87. package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.d.ts +15 -0
  88. package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.types.d.ts +20 -0
  89. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  90. package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +2 -2
  91. package/dist/@types/packages/vue2/src/types/listbox.d.ts +12 -0
  92. package/dist/accordion.js +41 -32
  93. package/dist/accordion.js.map +1 -1
  94. package/dist/action-bar.js +191 -0
  95. package/dist/action-bar.js.map +1 -0
  96. package/dist/alert.js +3 -3
  97. package/dist/assets/base-modal.css +1 -1
  98. package/dist/assets/button-actions-with-menu.css +1 -0
  99. package/dist/assets/button.css +1 -1
  100. package/dist/assets/calendar.css +1 -1
  101. package/dist/assets/checkbox.css +1 -1
  102. package/dist/assets/checkmark.css +1 -0
  103. package/dist/assets/chevron-left.css +1 -0
  104. package/dist/assets/dropdown-default-textbox.css +1 -1
  105. package/dist/assets/dropdown.css +1 -1
  106. package/dist/assets/fixed-scroller.css +1 -0
  107. package/dist/assets/index.css +1 -1
  108. package/dist/assets/index10.css +1 -1
  109. package/dist/assets/index11.css +1 -1
  110. package/dist/assets/index12.css +1 -1
  111. package/dist/assets/index13.css +1 -1
  112. package/dist/assets/index14.css +1 -1
  113. package/dist/assets/index15.css +1 -1
  114. package/dist/assets/index16.css +1 -1
  115. package/dist/assets/index17.css +1 -1
  116. package/dist/assets/index18.css +1 -1
  117. package/dist/assets/index19.css +1 -1
  118. package/dist/assets/index2.css +1 -1
  119. package/dist/assets/index20.css +1 -1
  120. package/dist/assets/index21.css +1 -1
  121. package/dist/assets/index22.css +1 -1
  122. package/dist/assets/index23.css +1 -1
  123. package/dist/assets/index24.css +1 -1
  124. package/dist/assets/index25.css +1 -1
  125. package/dist/assets/index26.css +1 -1
  126. package/dist/assets/index27.css +1 -1
  127. package/dist/assets/index28.css +1 -1
  128. package/dist/assets/index29.css +1 -1
  129. package/dist/assets/index3.css +1 -1
  130. package/dist/assets/index30.css +1 -1
  131. package/dist/assets/index31.css +1 -1
  132. package/dist/assets/index32.css +1 -1
  133. package/dist/assets/index33.css +1 -1
  134. package/dist/assets/index34.css +1 -1
  135. package/dist/assets/index35.css +1 -1
  136. package/dist/assets/index36.css +1 -1
  137. package/dist/assets/index37.css +1 -1
  138. package/dist/assets/index39.css +1 -1
  139. package/dist/assets/index4.css +1 -1
  140. package/dist/assets/index40.css +1 -1
  141. package/dist/assets/index41.css +1 -1
  142. package/dist/assets/index42.css +1 -1
  143. package/dist/assets/index43.css +1 -1
  144. package/dist/assets/index44.css +1 -1
  145. package/dist/assets/index45.css +1 -0
  146. package/dist/assets/index5.css +1 -1
  147. package/dist/assets/index6.css +1 -1
  148. package/dist/assets/index7.css +1 -1
  149. package/dist/assets/index8.css +1 -1
  150. package/dist/assets/index9.css +1 -1
  151. package/dist/assets/listbox.css +1 -1
  152. package/dist/assets/refresh.css +1 -0
  153. package/dist/avatar-image.js +1 -1
  154. package/dist/badge.js +1 -1
  155. package/dist/button.js +21 -14
  156. package/dist/button.js.map +1 -1
  157. package/dist/card.js +54 -54
  158. package/dist/card.js.map +1 -1
  159. package/dist/checkbox.js +6 -6
  160. package/dist/chunks/{base-button.d1ba66cd.js → base-button.7886a7e6.js} +2 -2
  161. package/dist/chunks/{base-button.d1ba66cd.js.map → base-button.7886a7e6.js.map} +1 -1
  162. package/dist/chunks/{base-modal.ec74044e.js → base-modal.88e7b9d4.js} +4 -4
  163. package/dist/chunks/{base-modal.ec74044e.js.map → base-modal.88e7b9d4.js.map} +1 -1
  164. package/dist/chunks/button-actions-with-menu.a5413243.js +105 -0
  165. package/dist/chunks/button-actions-with-menu.a5413243.js.map +1 -0
  166. package/dist/chunks/button.e09d5980.js +125 -0
  167. package/dist/chunks/button.e09d5980.js.map +1 -0
  168. package/dist/chunks/{calendar.b74f8a0f.js → calendar.24d0ac04.js} +294 -272
  169. package/dist/chunks/calendar.24d0ac04.js.map +1 -0
  170. package/dist/chunks/{checkbox.96ee3f71.js → checkbox.5343e28e.js} +7 -7
  171. package/dist/chunks/{checkbox.96ee3f71.js.map → checkbox.5343e28e.js.map} +1 -1
  172. package/dist/chunks/checkmark.78f3ed9c.js +26 -0
  173. package/dist/chunks/checkmark.78f3ed9c.js.map +1 -0
  174. package/dist/chunks/{chevron-right.3b826337.js → chevron-left.c10778d3.js} +8 -8
  175. package/dist/chunks/chevron-left.c10778d3.js.map +1 -0
  176. package/dist/chunks/{controls-group.e9537e45.js → controls-group.2a21bd83.js} +2 -2
  177. package/dist/chunks/{controls-group.e9537e45.js.map → controls-group.2a21bd83.js.map} +1 -1
  178. package/dist/chunks/{copy.2ff56819.js → copy.346eadb1.js} +4 -4
  179. package/dist/chunks/{copy.2ff56819.js.map → copy.346eadb1.js.map} +1 -1
  180. package/dist/chunks/{dropdown-default-textbox.3df0bf23.js → dropdown-default-textbox.25134789.js} +4 -4
  181. package/dist/chunks/dropdown-default-textbox.25134789.js.map +1 -0
  182. package/dist/chunks/{dropdown.3f198167.js → dropdown.f1253a54.js} +111 -81
  183. package/dist/chunks/dropdown.f1253a54.js.map +1 -0
  184. package/dist/chunks/{error-message.f5454f19.js → error-message.8302a46c.js} +2 -2
  185. package/dist/chunks/{error-message.f5454f19.js.map → error-message.8302a46c.js.map} +1 -1
  186. package/dist/chunks/fixed-scroller.8994e30a.js +108 -0
  187. package/dist/chunks/fixed-scroller.8994e30a.js.map +1 -0
  188. package/dist/chunks/{footer-actions.00d20947.js → footer-actions.c9b2cb74.js} +3 -3
  189. package/dist/chunks/{footer-actions.00d20947.js.map → footer-actions.c9b2cb74.js.map} +1 -1
  190. package/dist/chunks/{index.c39c64c9.js → index.2625175a.js} +2 -2
  191. package/dist/chunks/{index.c39c64c9.js.map → index.2625175a.js.map} +1 -1
  192. package/dist/chunks/index.37283390.js +475 -0
  193. package/dist/chunks/index.37283390.js.map +1 -0
  194. package/dist/chunks/index.8ac70774.js +1328 -0
  195. package/dist/chunks/index.8ac70774.js.map +1 -0
  196. package/dist/chunks/{index.2fce7703.js → index.965ac1af.js} +2 -2
  197. package/dist/chunks/{index.2fce7703.js.map → index.965ac1af.js.map} +1 -1
  198. package/dist/chunks/{index.eb52e785.js → index.a201f750.js} +6 -5
  199. package/dist/chunks/{index.eb52e785.js.map → index.a201f750.js.map} +1 -1
  200. package/dist/chunks/{index.a709a6b0.js → index.b83f8b7e.js} +2 -2
  201. package/dist/chunks/{index.a709a6b0.js.map → index.b83f8b7e.js.map} +1 -1
  202. package/dist/chunks/{index.298f5eed.js → index.d6b5f5e1.js} +6 -6
  203. package/dist/chunks/{index.298f5eed.js.map → index.d6b5f5e1.js.map} +1 -1
  204. package/dist/chunks/{index.31949c1a.js → index.e566354f.js} +91 -74
  205. package/dist/chunks/index.e566354f.js.map +1 -0
  206. package/dist/chunks/{listbox-option-tag.1362a2d7.js → listbox-option-tag.6a09e8e2.js} +8 -7
  207. package/dist/chunks/{listbox-option-tag.1362a2d7.js.map → listbox-option-tag.6a09e8e2.js.map} +1 -1
  208. package/dist/chunks/{listbox.e7bf46e4.js → listbox.73c38f38.js} +479 -385
  209. package/dist/chunks/listbox.73c38f38.js.map +1 -0
  210. package/dist/chunks/{loading-button.0ad06c99.js → loading-button.c65682d6.js} +2 -2
  211. package/dist/chunks/{loading-button.0ad06c99.js.map → loading-button.c65682d6.js.map} +1 -1
  212. package/dist/chunks/refresh.eb485c6f.js +26 -0
  213. package/dist/chunks/refresh.eb485c6f.js.map +1 -0
  214. package/dist/chunks/summary-grid.keys.1d1028c2.js +5 -0
  215. package/dist/chunks/summary-grid.keys.1d1028c2.js.map +1 -0
  216. package/dist/chunks/{tooltip.68e81e9c.js → tooltip.104e5fac.js} +39 -36
  217. package/dist/chunks/{tooltip.68e81e9c.js.map → tooltip.104e5fac.js.map} +1 -1
  218. package/dist/code-snippet.js +7 -7
  219. package/dist/code-snippet.js.map +1 -1
  220. package/dist/country.js +537 -528
  221. package/dist/country.js.map +1 -1
  222. package/dist/currency.js +1 -1
  223. package/dist/data-grid.js +10 -10
  224. package/dist/data-grid.js.map +1 -1
  225. package/dist/date-picker.js +99 -89
  226. package/dist/date-picker.js.map +1 -1
  227. package/dist/date-range-picker.js +2 -2
  228. package/dist/date.js +1 -1
  229. package/dist/divider.js +1 -1
  230. package/dist/dropdown.js +4 -4
  231. package/dist/empty-state.js +8 -7
  232. package/dist/empty-state.js.map +1 -1
  233. package/dist/filter-bar.js +500 -486
  234. package/dist/filter-bar.js.map +1 -1
  235. package/dist/focus-trap.js +1 -1
  236. package/dist/form-layout.js +2 -2
  237. package/dist/header.js +104 -183
  238. package/dist/header.js.map +1 -1
  239. package/dist/image.js +3 -3
  240. package/dist/index.js +171 -169
  241. package/dist/index.js.map +1 -1
  242. package/dist/info-icon.js +3 -3
  243. package/dist/input-field.js +7 -7
  244. package/dist/internal.js +20 -106
  245. package/dist/internal.js.map +1 -1
  246. package/dist/link.js +2 -2
  247. package/dist/loading-indicator.js +1 -1
  248. package/dist/menu.js +3 -466
  249. package/dist/menu.js.map +1 -1
  250. package/dist/modal.js +3 -3
  251. package/dist/pagination.js +40 -26
  252. package/dist/pagination.js.map +1 -1
  253. package/dist/payment-method.js +33 -26
  254. package/dist/payment-method.js.map +1 -1
  255. package/dist/popover.js +4 -4
  256. package/dist/popper-container.js +6 -1270
  257. package/dist/popper-container.js.map +1 -1
  258. package/dist/radio-group.js +97 -81
  259. package/dist/radio-group.js.map +1 -1
  260. package/dist/search-bar.js +2 -2
  261. package/dist/segmented-control.js +100 -70
  262. package/dist/segmented-control.js.map +1 -1
  263. package/dist/sidepanel.js +53 -51
  264. package/dist/sidepanel.js.map +1 -1
  265. package/dist/status.js +2 -2
  266. package/dist/stepper.js +3 -3
  267. package/dist/structured-list.js +1 -1
  268. package/dist/summary-grid.js +109 -119
  269. package/dist/summary-grid.js.map +1 -1
  270. package/dist/tabs.js +81 -71
  271. package/dist/tabs.js.map +1 -1
  272. package/dist/tag.js +3 -3
  273. package/dist/textarea.js +4 -4
  274. package/dist/timeline.js +170 -162
  275. package/dist/timeline.js.map +1 -1
  276. package/dist/toast.js +3 -3
  277. package/dist/toggle.js +6 -6
  278. package/dist/tutorial.js +307 -0
  279. package/dist/tutorial.js.map +1 -0
  280. package/dist/typography.js +1 -1
  281. package/dist/web-types.json +828 -122
  282. package/package.json +7 -4
  283. package/dist/assets/chevron-right.css +0 -1
  284. package/dist/chunks/button.eb60d460.js +0 -117
  285. package/dist/chunks/button.eb60d460.js.map +0 -1
  286. package/dist/chunks/calendar.b74f8a0f.js.map +0 -1
  287. package/dist/chunks/chevron-right.3b826337.js.map +0 -1
  288. package/dist/chunks/dropdown-default-textbox.3df0bf23.js.map +0 -1
  289. package/dist/chunks/dropdown.3f198167.js.map +0 -1
  290. package/dist/chunks/index.31949c1a.js.map +0 -1
  291. package/dist/chunks/listbox.e7bf46e4.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"dropdown.3f198167.js","sources":["../../src/components/dropdown/dropdown.types.ts","../../src/components/dropdown/components/dropdown-options-container/composables/useDropdownOptionsListbox.ts","../../src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-down-small.vue","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-up-small.vue","../../src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue","../../src/components/search-bar/useSearchBarDataFilter.ts","../../src/components/dropdown/composables/useDisplayValue.ts","../../src/components/dropdown/composables/useKeyboardNavigation.ts","../../src/components/dropdown/dropdown.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types';\n\nexport type { BentoListboxSearchOptions as BentoDropdownSearchOptions } from '@/types';\n","import { computed, ref, Ref, watch } from 'vue';\nimport { BentoListboxEvent, BentoListboxSelectedValue } from '@/types';\nimport { BentoDropdownEvent } from '../../../dropdown.types';\nimport { useI18n } from '@/utils/ts/i18n';\nimport messages from '../messages.json';\n\ntype MessageSchema = (typeof messages)['en-US'];\n\n/**\n * A composable that handles all dropdown options option selecting logic & listeners.\n * If single select dropdown then emits straight up to dropdown.\n * If multi select dropdown then stores selections in internal state and only emits when Apply button is pressed.\n *\n * @param selectedValue - the selectedValue property passed into the dropdown options container component.\n * @param multiple - the multiple property passed into the dropdown options container component.\n * @param emit - the emit function for the dropdown options container component.\n */\nexport const useDropdownOptionsListbox = (\n selectedValue: Ref<BentoListboxSelectedValue>,\n multiple: Ref<boolean>,\n emit: (event: BentoListboxEvent | BentoDropdownEvent, selectedValue?: BentoListboxSelectedValue) => void\n) => {\n const internalSelectedValue = ref(selectedValue.value);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n watch(selectedValue, () => {\n internalSelectedValue.value = selectedValue.value;\n });\n\n // Multi-select dropdown cancel and apply button logic\n const isApplyButtonDisabled = computed(\n () => JSON.stringify(internalSelectedValue.value) === JSON.stringify(selectedValue.value)\n );\n\n const onApplyClick = () => {\n emit(BentoListboxEvent.SELECT, internalSelectedValue.value);\n emit(BentoDropdownEvent.CLOSE_DROPDOWN);\n };\n\n const onCancelClick = () => {\n internalSelectedValue.value = selectedValue.value;\n emit(BentoDropdownEvent.CLOSE_DROPDOWN);\n };\n const actions = computed(() => [\n {\n title: t('apply') as string,\n event: onApplyClick,\n disabled: isApplyButtonDisabled.value,\n },\n {\n title: t('cancel') as string,\n event: onCancelClick,\n },\n ]);\n\n // Click and keyboard navigation event listners\n const onOptionSelected = (newSelectedValue: BentoListboxSelectedValue) => {\n internalSelectedValue.value = newSelectedValue;\n if (!multiple.value) {\n emit(BentoDropdownEvent.SELECT, newSelectedValue);\n }\n };\n\n const onTabKey = (newSelectedValue: BentoListboxSelectedValue) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.TAB);\n };\n\n const onEnterKey = (newSelectedValue: BentoListboxSelectedValue) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.ENTER);\n };\n\n const onSpaceKey = (newSelectedValue: BentoListboxSelectedValue) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.SPACE);\n };\n\n const onEscapeKey = () => {\n onCancelClick();\n emit(BentoListboxEvent.ESCAPE);\n };\n\n const emitShowMoreEvent = () => {\n emit(BentoDropdownEvent.SHOW_MORE);\n };\n\n const listeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected,\n [BentoListboxEvent.SHOW_MORE]: emitShowMoreEvent,\n [BentoListboxEvent.TAB]: onTabKey,\n [BentoListboxEvent.SPACE]: onSpaceKey,\n [BentoListboxEvent.ENTER]: onEnterKey,\n };\n\n return {\n // Values\n actions,\n internalSelectedValue,\n\n // Methods\n listeners,\n onEscapeKey,\n };\n};\n","<template>\n <component\n :is=\"popperContainerOrPopoverComponent\"\n class=\"b-dropdown-options-container\"\n :class=\"conditionalClasses\"\n v-bind=\"popperContainerOrPopoverProps\"\n >\n <div @keydown.esc=\"onEscapeKey\">\n <bento-listbox\n :id=\"id\"\n ref=\"dropdownOptionsListboxRef\"\n :aria-label=\"ariaLabel\"\n class=\"b-dropdown-options-container__listbox\"\n :class=\"conditionalListboxClasses\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"items\"\n :selected-value=\"internalSelectedValue\"\n :multiple=\"multiple\"\n :no-results-message=\"noResultsMessage\"\n :searching=\"searching\"\n :loading=\"loading\"\n :lazy-load-type=\"lazyLoadType\"\n :has-more-items=\"hasMoreItems\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox>\n </div>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRefs } from 'vue';\n import { BentoListbox } from '@/internal';\n import {\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n } from '@/types';\n import { PopperContainer } from '@/components/popper-container';\n import { BentoDropdownEvent, BentoDropdownLazyLoadType, BentoDropdownSize } from '../../dropdown.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoPopover } from '@/components/popover';\n import { useDropdownOptionsListbox } from './composables/useDropdownOptionsListbox';\n import { generateUid } from '@/utils/ts/unique-id';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Dropdown options container.\n * It lists all the available options.\n *\n * @example\n * <bento-dropdown-options-container\n * v-if=\"inputContainerRef\" <!-- Ref to the input to match the width -->\n * :id=\"dropdownOptionsContainerId\"\n * :target-element=\"inputContainerRef\"\n * :aria-label=\"ariaLabel\"\n * :open=\"isDropdownOpen\"\n * :disabled=\"disabled\"\n * :multiple=\"multiple\"\n * :selected=\"value\"\n * :isOptionDisabled=\"option => option.value === 2\"\n * :items=\"[{\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * }]\"\n * @select=\"onOptionSelected\"\n * />\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-dropdown-options-container',\n components: {\n BentoListbox,\n PopperContainer,\n BentoPopover,\n },\n props: {\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Disables dropdown functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.\n */\n id: { type: String, required: true },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoDropdownIsOptionDisabled}\n * @param {BentoDropdownOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: undefined,\n },\n\n /**\n * Dropdown input size\n */\n inputSize: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: BentoDropdownSize.DEFAULT,\n validator: (value: BentoDropdownSize) => Object.values(BentoDropdownSize).includes(value),\n },\n\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoDropdownOptionItem }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * Indicates if new options are loading.\n */\n loading: { type: Boolean, default: false },\n\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType: {\n type: String as PropType<BentoDropdownLazyLoadType | `${BentoDropdownLazyLoadType}`>,\n default: BentoDropdownLazyLoadType.AUTOMATIC,\n validator: (value: BentoDropdownLazyLoadType) =>\n Object.values(BentoDropdownLazyLoadType).includes(value),\n },\n\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the container can be displayed.\n */\n open: { type: Boolean, required: true },\n\n /**\n * The `input` value.\n * Providing an empty string or empty array will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected for single select\n */\n selectedValue: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: null,\n },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: BentoListbox.props.searching,\n\n /**\n * Reference to the DOM element or Vue component for positioning\n * the Dropdown container.\n */\n targetElement: { type: PopperContainer.props.targetElement.type, required: true },\n },\n emits: [\n BentoDropdownEvent.CLOSE_DROPDOWN,\n BentoDropdownEvent.SHOW_MORE,\n BentoListboxEvent.SELECT,\n BentoListboxEvent.ENTER,\n BentoListboxEvent.ESCAPE,\n BentoListboxEvent.SPACE,\n BentoListboxEvent.TAB,\n ],\n setup(props, { emit, slots }) {\n const { selectedValue, multiple } = toRefs(props);\n const dropdownOptionsListboxRef = ref(null);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isDropdownOpen = computed(() => props.open && !props.disabled);\n const noResultsMessage = computed(() => t('noOptionsMatchThisSearch') as string);\n const containerMinAndMaxWidth = {\n 'min-width': `${(props?.targetElement as HTMLElement)?.clientWidth}px`,\n 'max-width': 'min(500px, 95%)',\n };\n\n const conditionalClasses = computed(() => ({\n 'b-dropdown-options-container--single': !props?.multiple,\n }));\n\n const conditionalListboxClasses = computed(() => ({\n 'b-dropdown-options-container__listbox--small': props.inputSize === BentoDropdownSize.SMALL,\n 'b-dropdown-options-container__listbox--single': !props?.multiple,\n }));\n\n const { actions, internalSelectedValue, listeners, onEscapeKey } = useDropdownOptionsListbox(\n selectedValue,\n multiple,\n emit\n );\n\n // Use different components depending on if the dropdown is a single or multi-select\n const popperContainerOrPopoverComponent = computed(() =>\n props?.multiple ? BentoPopover : PopperContainer\n );\n\n const popperContainerOrPopoverProps = computed(() =>\n props?.multiple\n ? ({\n actionsLayout: 'space-between',\n actions: actions.value,\n divider: true,\n fallbackPosition: ['top-start'],\n id: generateUid(`dropdown-options-${props.id}`),\n open: props.open,\n position: 'bottom-start',\n style: {\n width: 'auto',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof BentoPopover>['$props'])\n : ({\n fallbackPosition: ['top-start'],\n offset: [0, 8],\n position: 'bottom-start',\n style: {\n display: isDropdownOpen.value ? 'block' : 'none',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof PopperContainer>['$props'])\n );\n\n return {\n // Values\n isDropdownOpen,\n conditionalClasses,\n conditionalListboxClasses,\n noResultsMessage,\n slots,\n actions,\n internalSelectedValue,\n\n // Component wrapper\n popperContainerOrPopoverComponent,\n popperContainerOrPopoverProps,\n\n // Refs\n dropdownOptionsListboxRef,\n\n // Events\n onEscapeKey,\n listeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-options-container.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M4.4697 5.96967C4.76259 5.67678 5.23747 5.67678 5.53036 5.96967L8.00003 8.43934L10.4697 5.96967C10.7626 5.67678 11.2375 5.67678 11.5304 5.96967C11.8233 6.26256 11.8233 6.73744 11.5304 7.03033L8.53036 10.0303C8.23747 10.3232 7.76259 10.3232 7.4697 10.0303L4.4697 7.03033C4.17681 6.73744 4.17681 6.26256 4.4697 5.96967Z\" clip-rule=\"evenodd\"/></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 scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M11.5303 10.0303C11.2374 10.3232 10.7626 10.3232 10.4697 10.0303L8 7.56066L5.53033 10.0303C5.23744 10.3232 4.76256 10.3232 4.46967 10.0303C4.17678 9.73744 4.17678 9.26256 4.46967 8.96967L7.46967 5.96967C7.61032 5.82902 7.80109 5.75 8 5.75C8.19891 5.75 8.38968 5.82902 8.53033 5.96967L11.5303 8.96967C11.8232 9.26256 11.8232 9.73744 11.5303 10.0303Z\" clip-rule=\"evenodd\"/></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 scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n","<template>\n <div class=\"b-dropdown-small-textbox\" :class=\"conditionalClasses\">\n <dropdown-base-textbox\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-small-textbox__textbox\"\n v-on=\"listeners\"\n >\n <template #icon>\n <div class=\"b-dropdown-small-textbox__chevron\">\n <chevron-up-small-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-small-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types';\n import { Booleanish } from '@/types';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import ChevronDownSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-down-small';\n import ChevronUpSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-up-small';\n\n /**\n * For internal use only, textbox component in its small variant used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-small-textbox',\n components: { ChevronDownSmallIcon, ChevronUpSmallIcon, DropdownBaseTextbox },\n inheritAttrs: false,\n props: {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n },\n emits: [DropdownBaseTextboxEvent.OPEN, DropdownBaseTextboxEvent.CLOSE],\n setup(props, { emit }) {\n const conditionalClasses = computed(() => ({\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const openDropdown = () => {\n emit(DropdownBaseTextboxEvent.OPEN);\n };\n\n const closeDropdown = () => {\n emit(DropdownBaseTextboxEvent.CLOSE);\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n };\n\n return {\n // Values\n conditionalClasses,\n isDropdownOpen,\n\n // Events\n listeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-small-textbox.scss\" />\n","import { computed, ref, Ref, watch } from 'vue';\nimport { BentoSearchBarItem } from './search-bar.types';\n\n/**\n * Filters an array {@see BentoSearchBarData} containing elements of type {@see BentoSearchBarItem}\n * by the {@param searchTerm}.\n *\n * @param {Ref<String>} searchTerm - Text that satisfies the search criteria.\n * @param {Ref<BentoSearchBarData>} data - Array to be filtered by {@param searchTerm}\n * @returns {Ref<BentoSearchBarData>} New instance of the array filtered by the {@param searchTerm} text\n */\nexport function useSearchBarFilter<T extends BentoSearchBarItem>(\n searchTerm: Ref<string>,\n data: Ref<T[]>,\n searchEvent?: (searchValue: string) => void\n) {\n const searchTermRef = ref(searchTerm);\n const dataRef = ref(data);\n\n const findHits = (searchTermLowerCased: string, options: Array<BentoSearchBarItem> = []) =>\n options.flatMap(option => {\n if (option.label.toLocaleLowerCase().includes(searchTermLowerCased)) {\n return [option, ...findHits(searchTermLowerCased, option.items)];\n }\n\n if (option.items) {\n return [...findHits(searchTermLowerCased, option.items)];\n }\n\n return [];\n });\n\n // If search event exists trigger it on the search term changing\n watch(searchTermRef, () => {\n if (searchEvent !== undefined) {\n searchEvent(searchTermRef.value);\n }\n });\n\n const filterInputData = computed(() => {\n if (!searchTermRef.value) {\n return dataRef.value;\n }\n // If search event exists, emit the new search value into the event and do not manipulate data.\n if (searchEvent !== undefined) {\n return dataRef.value;\n }\n\n const searchTermLowerCased = searchTermRef.value.toLocaleLowerCase();\n const filtered = findHits(searchTermLowerCased, dataRef.value);\n return filtered;\n });\n\n return filterInputData;\n}\n","import { computed } from 'vue';\nimport { UseDisplayValue } from './useDisplayValue.types';\n\nconst singleSelect = ({ items, placeholder, selectedValue }) => {\n const selectedItem = items.value.find(({ value }) => value === selectedValue.value);\n return selectedItem?.label || placeholder.value || null;\n};\n\nconst multiSelect = ({ selectedValues, items, placeholder }) => {\n // No selected values\n if (!selectedValues.value || (selectedValues.value as Array<string | number>)?.length === 0) {\n return placeholder.value || null;\n }\n\n return (selectedValues.value as Array<string | number>)\n .map(selectedValue => {\n const { label } = items.value.find(({ value }) => value === selectedValue);\n return label;\n })\n .join(', ');\n};\n\nconst categoryMultiSelect = ({ selectedValues, items, placeholder }) => {\n // No selected values\n if (!selectedValues.value || !(selectedValues.value as Array<string | number>)?.length) {\n return placeholder.value || null;\n }\n\n return items.value\n .reduce((acc, option) => {\n // Category items\n if (option.items) {\n const selectedCategoryOptions = option.items.filter(categoryOption =>\n (selectedValues.value as Array<string | number>).includes(categoryOption.value)\n );\n\n // If the category is fully selected add the category name\n const isCategoryFullySelected = selectedCategoryOptions.length === option.items.length;\n if (isCategoryFullySelected) {\n acc.push(option.label);\n } else {\n // If category is partially selected add each selected option and category\n selectedCategoryOptions.forEach(({ label }) => acc.push(label));\n }\n }\n\n // Non-category option\n if ((selectedValues.value as Array<string | number>).includes(option.value)) {\n acc.push(option.label);\n }\n\n return acc;\n }, [])\n .join(', ');\n};\n\nexport const useDisplayValue: UseDisplayValue = ({ items, placeholder, value, multiple }) => {\n const isCategoryMultilevel = computed(() => items.value.find(option => option.items?.length));\n\n const displayValue = computed(() => {\n // Single select\n if (!multiple.value) {\n return singleSelect({ items, placeholder, selectedValue: value });\n }\n\n // Category multi select\n if (isCategoryMultilevel.value) {\n return categoryMultiSelect({ selectedValues: value, placeholder, items });\n }\n\n // Multi select\n return multiSelect({ selectedValues: value, items, placeholder });\n });\n\n return displayValue;\n};\n","import { BentoKeyboardNavigationKeyDownEvent } from '@/types';\nimport { BentoListboxEvent } from '@/types/listbox';\nimport { computed, nextTick, Ref } from 'vue';\n\nconst focusOnTextbox = (elementToFocusOn: Ref) => {\n elementToFocusOn.value.$children?.[0].$refs.textbox.focus();\n};\n\nexport const useTextboxKeyboardNavigation = (\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering,\n items,\n isMultiple,\n },\n toggleDropdown,\n openDropdown,\n closeDropdown\n) => {\n const onArrowDown = ({ detail: event }) => {\n event.preventDefault();\n if (!isDropdownOpen.value) {\n openDropdown();\n nextTick(() => {\n if (isMultiple) {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n selectedValueIndex.value\n ].$el.focus();\n }\n });\n }\n };\n const onArrowUp = ({ detail: event }) => {\n event.preventDefault();\n if (!isDropdownOpen.value) {\n openDropdown();\n nextTick(() => {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n });\n }\n };\n\n const onEndKey = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n nextTick(() => {\n if (isMultiple) {\n const firstLayer =\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children;\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n firstLayer.length - 1\n ].$children[items.length - 1].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n items.length - 1\n ].$el.focus();\n }\n });\n }\n };\n\n const onEscapeKey = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n focusOnTextbox(inputContainerRef);\n }\n };\n\n const onHomeKey = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n nextTick(() => {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n });\n };\n\n const onSpaceKey = ({ detail: event }) => {\n event.preventDefault();\n toggleDropdown();\n if (isDropdownOpen.value) {\n nextTick(() => {\n if (isMultiple) {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n selectedValueIndex.value\n ].$el.focus();\n }\n });\n }\n };\n\n const onEnterKey = () => {\n toggleDropdown();\n if (isDropdownOpen.value) {\n nextTick(() => {\n if (isMultiple) {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n selectedValueIndex.value\n ].$el.focus();\n }\n });\n }\n };\n\n const textboxKeyboardNavigationListeners = computed(() => ({\n ...(!isDynamicFltering.value ? { [BentoKeyboardNavigationKeyDownEvent.SPACE]: onSpaceKey } : {}),\n [BentoKeyboardNavigationKeyDownEvent.ENTER]: onEnterKey,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: onArrowDown,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: onArrowUp,\n [BentoKeyboardNavigationKeyDownEvent.END]: onEndKey,\n [BentoKeyboardNavigationKeyDownEvent.ESCAPE]: onEscapeKey,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: onHomeKey,\n }));\n\n return textboxKeyboardNavigationListeners;\n};\n\nexport const useListboxKeyboardNavigation = ({ inputContainerRef, isDropdownOpen }, closeDropdown) => {\n const closeDropdownAndFocusOnTextbox = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n }\n nextTick(() => {\n focusOnTextbox(inputContainerRef);\n });\n };\n\n const listboxKeyboardNavigationListeners = {\n [BentoListboxEvent.ENTER]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.ESCAPE]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.TAB]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.SPACE]: closeDropdownAndFocusOnTextbox,\n };\n\n return listboxKeyboardNavigationListeners;\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 v-bento-click-outside-directive=\"closeOpenedDropdown\" class=\"b-dropdown\">\n <div v-if=\"label\" :id=\"labelId\" class=\"b-dropdown__label\">\n <bento-typography el=\"span\" stronger>{{ label }}</bento-typography>\n <bento-typography v-if=\"optional\" class=\"b-dropdown__label-requirement\" el=\"span\">\n ({{ $t('optional') }})\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-dropdown__label-requirement\" el=\"span\">\n ({{ $t('required') }})\n </bento-typography>\n </div>\n <div\n ref=\"inputContainerRefWrapper\"\n v-bento-keyboard-navigation-directive\n v-on=\"textboxKeyboardNavigationListeners\"\n >\n <component\n :is=\"size\"\n ref=\"inputContainerRef\"\n :value=\"searchTerm\"\n :additional-items-selected=\"additionalItemsSelected\"\n :ariaControls=\"dropdownOptionsContainerId\"\n :ariaExpanded=\"isDropdownOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-label=\"computedAriaLabel\"\n :aria-readonly=\"isReadOnly\"\n :readonly=\"isReadOnly\"\n :disabled=\"disabled\"\n :display-value=\"displayValue\"\n :dynamic-filtering=\"dynamicFiltering\"\n :is-invalid=\"!!errorMessage || error\"\n :multiple=\"multiple\"\n :open=\"isDropdownOpen\"\n :selected-value-item=\"idDefaultSize ? selectedValueItem : undefined\"\n :show-slot-content-in-multiple=\"showSlotContentInMultiple\"\n @input=\"searchTerm = $event\"\n @open=\"toggleDropdown\"\n @close=\"toggleDropdown\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </component>\n </div>\n <bento-dropdown-options-container\n v-if=\"inputContainerRef\"\n :id=\"dropdownOptionsContainerId\"\n ref=\"optionsContainerRef\"\n :aria-label=\"computedAriaLabel\"\n :debounce-time=\"search?.debounceTime\"\n :disabled=\"disabled\"\n :input-size=\"size\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"filteredItems\"\n :multiple=\"multiple\"\n :open=\"isDropdownOpen\"\n :selected-value=\"value\"\n :searching=\"isSearching\"\n :target-element=\"inputContainerRefWrapper\"\n :loading=\"loading\"\n :has-more-items=\"hasMoreItems\"\n :lazy-load-type=\"lazyLoadType\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-dropdown-options-container>\n <error-message\n v-if=\"!!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-dropdown__error-message\"\n />\n <bento-typography\n v-if=\"description\"\n :id=\"descriptionId\"\n class=\"b-dropdown__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n {{ description }}\n </bento-typography>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef, toRefs } from 'vue';\n import {\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxMultiSelectValue,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n } from '@/types';\n import { BentoDropdownOptionsContainer } from './components/dropdown-options-container';\n import { BentoClickOutsideDirective } from '@/directives/click-outside';\n import { BentoKeyboardNavigationDirective } from '@/directives';\n import { DropdownInputDefault, DropdownInputSmall } from './components';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n import { BentoTypography } from '@/components/typography';\n import { BentoListbox, ErrorMessage } from '@/internal';\n import { generateUid } from '@/utils/ts/unique-id';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useI18n } from '@/utils/ts/i18n';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import {\n BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n BentoDropdownSearchOptions,\n BentoDropdownSize,\n } from './dropdown.types';\n import { useDisplayValue } from './composables/useDisplayValue';\n import messages from './messages.json';\n import { useListboxKeyboardNavigation, useTextboxKeyboardNavigation } from './composables/useKeyboardNavigation';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * A Dropdown shows a selected option's.\n * Use a dropdown when you want users to select options\n * from a list of pre-defined options.\n *\n * @example\n * import { BentoDropdown } from '@adyen/bento-vue2';\n * import type { BentoDropdownOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(2) // Default value\n * const options: BentoDropdownOptions = [\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'b-dropdown',\n components: {\n BentoDropdownOptionsContainer,\n BentoTypography,\n DropdownInputDefault,\n DropdownInputSmall,\n ErrorMessage,\n },\n directives: { BentoClickOutsideDirective, BentoKeyboardNavigationDirective },\n props: {\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Text that appears in the form control when it has no value set\n */\n placeholder: {\n type: String,\n default: null,\n },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Highlights the dropdown in an erroneous state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown in an erroneous state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Text that is displayed as a label above the element.\n */\n label: { type: String, default: null },\n\n /**\n * Descriptive supporting text visbile underneath the dropdown.\n */\n description: { type: String, default: null },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Function that dertermines which options are disabled from interaction.\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: undefined,\n },\n\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoListboxOptionItem }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n default: () => [],\n },\n\n /**\n * Indicates if new options are loading.\n */\n loading: { type: Boolean, default: false },\n\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType: {\n type: String as PropType<BentoDropdownLazyLoadType | `${BentoDropdownLazyLoadType}`>,\n default: BentoListbox.props.lazyLoadType.default,\n validator: (value: BentoDropdownLazyLoadType) =>\n Object.values(BentoDropdownLazyLoadType).includes(value),\n },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\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 * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown input size\n * * @see BentoDropdownSize\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: BentoDropdownSize.DEFAULT,\n validator: (value: BentoDropdownSize) => Object.values(BentoDropdownSize).includes(value),\n },\n\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n */\n value: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: null,\n },\n\n /**\n * Dropdown search options and events.\n * @see BentoDropdownSearchOptions\n */\n search: {\n type: Object as PropType<BentoDropdownSearchOptions>,\n default: undefined,\n },\n },\n emits: ['input', BentoDropdownEvent.SHOW_MORE],\n setup(props, { attrs, emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const inputContainerRef = ref(null);\n const inputContainerRefWrapper = ref(null);\n const optionsContainerRef = ref(null);\n const isDropdownOpen = ref(false);\n const dropdownOptionsContainerId = generateUid('bento-dropdown-options-container');\n const labelId = generateUid('dropdown-label');\n const descriptionId = generateUid('dropdown-description');\n const errorId = generateUid('dropdown-error');\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: t('ariaLabelFallback'),\n });\n\n // Description styles\n const descriptionConditionalClasses = computed(() => ({\n 'b-dropdown__description--error': !!props.errorMessage,\n }));\n\n // Filtering\n const searchTerm = ref('');\n const items = toRef(props, 'items');\n const filteredItems = useSearchBarFilter(searchTerm, items, props?.search?.searchEvent);\n const isSearching = computed(() => props.dynamicFiltering && !!searchTerm.value);\n\n const displayValue = useDisplayValue({\n items,\n multiple: toRef(props, 'multiple'),\n placeholder: toRef(props, 'placeholder'),\n value: toRef(props, 'value'),\n });\n\n const idDefaultSize = computed(() => props.size === BentoDropdownSize.DEFAULT);\n\n const selectedValueItem = computed(() =>\n props?.multiple\n ? props.items.filter(\n ({ value }) => props?.value && (props?.value as BentoListboxMultiSelectValue).includes(value)\n )\n : props.items.find(({ value }) => value === props?.value)\n );\n\n const selectedValueIndex = computed(() => {\n const index = props.items.findIndex(({ value }) => props.value === value);\n return index > 0 ? index : 0;\n });\n\n const additionalItemsSelected = computed(() => {\n if (props.multiple) {\n return (props?.value as BentoListboxMultiSelectValue)?.length;\n }\n\n return null;\n });\n\n // ARIA\n const ariaDescribedBy = computed(\n () => `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''}`.trim() || null\n );\n\n const openDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = true;\n };\n\n const closeDropdown = () => {\n isDropdownOpen.value = false;\n };\n\n const toggleDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = !isDropdownOpen.value;\n\n // Clear search\n if (isSearching.value) {\n searchTerm.value = '';\n }\n };\n\n const closeOpenedDropdown = () => {\n if (isSearching.value) {\n searchTerm.value = '';\n }\n\n if (isDropdownOpen.value) {\n isDropdownOpen.value = false;\n }\n };\n\n const onOptionSelected = (selectedValue: BentoListboxSelectedValue) => {\n // Clear and close the dropdown on single selection\n if (!props.multiple) {\n searchTerm.value = '';\n isDropdownOpen.value = false;\n }\n\n emit('input', selectedValue);\n };\n\n const emitShowMoreEvent = () => {\n emit(BentoDropdownEvent.SHOW_MORE);\n };\n\n const textboxKeyboardNavigationListeners = useTextboxKeyboardNavigation(\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering: toRef(props, 'dynamicFiltering'),\n items: props.items,\n isMultiple: props.multiple,\n },\n toggleDropdown,\n openDropdown,\n closeDropdown\n );\n\n const listboxKeyboardNavigationListeners = useListboxKeyboardNavigation(\n {\n inputContainerRef,\n isDropdownOpen,\n },\n closeDropdown\n );\n\n const listboxListeners = {\n [BentoListboxEvent.CLOSE_DROPDOWN]: closeDropdown,\n [BentoListboxEvent.SELECT]: onOptionSelected,\n [BentoListboxEvent.SHOW_MORE]: emitShowMoreEvent,\n ...listboxKeyboardNavigationListeners,\n };\n\n if (props.error) {\n deprecate(\n 'BentoDropdown \"error\" property',\n `Use the BentoDropdown \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n return {\n // Values\n computedAriaLabel,\n additionalItemsSelected,\n idDefaultSize,\n isDropdownOpen,\n displayValue,\n dropdownOptionsContainerId,\n filteredItems,\n isSearching,\n isReadOnly,\n searchTerm,\n labelId,\n descriptionId,\n errorId,\n ariaDescribedBy,\n selectedValueItem,\n // Conciliation of Vue2 $scopedSlots and Vue3 $scopes.\n // The setup method and the \"useSlots\" composible define\n // { slots } as a proxy of $scopedSlots and $scopes in their\n // respective Vue version. Source: https://github.com/vuejs/composition-api/issues/84#issuecomment-524885445\n slots,\n descriptionConditionalClasses,\n\n // Refs\n inputContainerRef,\n inputContainerRefWrapper,\n optionsContainerRef,\n\n // Events\n closeOpenedDropdown,\n toggleDropdown,\n onOptionSelected,\n emitShowMoreEvent,\n textboxKeyboardNavigationListeners,\n listboxListeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","useDropdownOptionsListbox","selectedValue","multiple","emit","internalSelectedValue","ref","t","useI18n","watch","isApplyButtonDisabled","computed","onApplyClick","BentoListboxEvent","onCancelClick","actions","onOptionSelected","newSelectedValue","onTabKey","onEnterKey","onSpaceKey","onEscapeKey","emitShowMoreEvent","listeners","_sfc_main$4","defineComponent","messages$1","BentoListbox","PopperContainer","BentoPopover","value","BentoListboxLazyLoadType","props","slots","toRefs","dropdownOptionsListboxRef","isDropdownOpen","noResultsMessage","containerMinAndMaxWidth","_a","conditionalClasses","conditionalListboxClasses","popperContainerOrPopoverComponent","popperContainerOrPopoverProps","generateUid","uuid$1","_sfc_main$3","uuid","_sfc_main$2","_sfc_main$1","ChevronDownSmallIcon","ChevronUpSmallIcon","DropdownBaseTextbox","DropdownBaseTextboxEvent","DropdownBaseTextboxState","openDropdown","closeDropdown","useSearchBarFilter","searchTerm","data","searchEvent","searchTermRef","dataRef","findHits","searchTermLowerCased","options","option","singleSelect","items","placeholder","selectedItem","multiSelect","selectedValues","label","categoryMultiSelect","acc","selectedCategoryOptions","categoryOption","useDisplayValue","isCategoryMultilevel","focusOnTextbox","elementToFocusOn","useTextboxKeyboardNavigation","inputContainerRef","optionsContainerRef","selectedValueIndex","isDynamicFltering","isMultiple","toggleDropdown","onArrowDown","event","nextTick","_b","onArrowUp","onEndKey","firstLayer","onHomeKey","BentoKeyboardNavigationKeyDownEvent","useListboxKeyboardNavigation","closeDropdownAndFocusOnTextbox","_sfc_main","messages","BentoDropdownOptionsContainer","BentoTypography","DropdownInputDefault","DropdownInputSmall","ErrorMessage","BentoClickOutsideDirective","BentoKeyboardNavigationDirective","attrs","inputContainerRefWrapper","dropdownOptionsContainerId","labelId","descriptionId","errorId","isReadOnly","useFormLayoutFieldLoading","toRef","ariaLabelAttribute","ariaLabel","computedAriaLabel","useAriaLabel","descriptionConditionalClasses","filteredItems","isSearching","displayValue","idDefaultSize","selectedValueItem","index","additionalItemsSelected","ariaDescribedBy","closeOpenedDropdown","textboxKeyboardNavigationListeners","listboxKeyboardNavigationListeners","listboxListeners","deprecate"],"mappings":";;;;;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;GCcLE,KAAA,CAAAC,GAAAC,GAAAC,MAAA;AAKH,QAAAC,IAAAC,EAAAJ,EAAA,KAAA,GACA,EAAA,GAAAK,EAAA,IAAAC,EAAA;AAEA,EAAAC,EAAAP,GAAA,MAAA;AACI,IAAAG,EAAA,QAAAH,EAAA;AAAA,EAA4C,CAAA;AAIhD,QAAAQ,IAAAC;A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AA3C,EAAA,MAAA,GAAAG;AAAA,MACA,CAAAH,EAAA,SAAA,GAAAS;AAAA,MACA,GAAA+G;AAAA,IACA;AAGA,WAAArG,EAAA,SACAuG;AAAA,MAAA;AAAA,MACA;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIA;AAAA;AAAA,MAAA,mBAAAf;AAAA,MAEA,yBAAAS;AAAA,MACA,eAAAH;AAAA,MACA,gBAAA1F;AAAA,MACA,cAAAyF;AAAA,MACA,4BAAAd;AAAA,MACA,eAAAY;AAAA,MACA,aAAAC;AAAA,MACA,YAAAT;AAAA,MACA,YAAAzD;AAAA,MACA,SAAAsD;AAAA,MACA,eAAAC;AAAA,MACA,SAAAC;AAAA,MACA,iBAAAgB;AAAA,MACA,mBAAAH;AAAA;AAAA;AAAA;AAAA;AAAA,MACA,OAAA9F;AAAA,MAKA,+BAAAyF;AAAA;AAAA,MACA,mBAAAvC;AAAA,MAGA,0BAAA2B;AAAA,MACA,qBAAA1B;AAAA;AAAA,MACA,qBAAA+C;AAAA,MAGA,gBAAA3C;AAAA,MACA,kBAAAxE;AAAA,MACA,mBAAAM;AAAA,MACA,oCAAA8G;AAAA,MACA,kBAAAE;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[3,4]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.31949c1a.js","sources":["../../../../node_modules/date-fns/esm/isEqual/index.js","../../../../node_modules/date-fns/esm/setHours/index.js","../../../../node_modules/date-fns/esm/setMinutes/index.js","../../../../node_modules/date-fns/esm/setSeconds/index.js","../../src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types.ts","../../src/utils/ts/time-input.ts","../../src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue","../../src/components/date-range-picker/date-range-picker.types.ts","../../src/components/date-range-picker/composables/use-date-range-picker-calendar-text.ts","../../src/components/date-range-picker/date-range-picker.vue"],"sourcesContent":["import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\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 compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Boolean} the dates are equal\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * var result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0),\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\n\nexport default function isEqual(dirtyLeftDate, dirtyRightDate) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyLeftDate);\n var dateRight = toDate(dirtyRightDate);\n return dateLeft.getTime() === dateRight.getTime();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setHours\n * @category Hour Helpers\n * @summary Set the hours to the given date.\n *\n * @description\n * Set the hours 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} hours - the hours of the new date\n * @returns {Date} the new date with the hours set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 4 hours to 1 September 2014 11:30:00:\n * var result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n * //=> Mon Sep 01 2014 04:30:00\n */\n\nexport default function setHours(dirtyDate, dirtyHours) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var hours = toInteger(dirtyHours);\n date.setHours(hours);\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 setMinutes\n * @category Minute Helpers\n * @summary Set the minutes to the given date.\n *\n * @description\n * Set the minutes 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} minutes - the minutes of the new date\n * @returns {Date} the new date with the minutes set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 45 minutes to 1 September 2014 11:30:40:\n * const result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:45:40\n */\n\nexport default function setMinutes(dirtyDate, dirtyMinutes) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var minutes = toInteger(dirtyMinutes);\n date.setMinutes(minutes);\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 setSeconds\n * @category Second Helpers\n * @summary Set the seconds to the given date.\n *\n * @description\n * Set the seconds 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} seconds - the seconds of the new date\n * @returns {Date} the new date with the seconds set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 45 seconds to 1 September 2014 11:30:40:\n * const result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:30:45\n */\n\nexport default function setSeconds(dirtyDate, dirtySeconds) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var seconds = toInteger(dirtySeconds);\n date.setSeconds(seconds);\n return date;\n}","export interface DateRangePickerCalendarFormData {\n startDate: string;\n endDate: string;\n startTime?: string;\n endTime?: string;\n}\n\nexport enum DateRangePickerCalendarEvent {\n CUSTOM_RANGE = 'custom-range',\n INPUT = 'input',\n ERROR = 'error',\n FORM_DATE = 'form-date',\n}\n\nexport type DateRangePickerCalendarRangeSelectorItems = Array<{\n label: string;\n value: string;\n data: { startDate: Date; endDate: Date };\n}>;\n","const validDigitRegex = /[\\d]/;\n\nconst hourRegex = /^\\d{2}$/;\nconst minuteRegex = /^\\d{2}:\\d{2}$/;\n\nexport const validateTimeInput = (event: KeyboardEvent) => {\n const { selectionStart } = event.target as HTMLInputElement;\n\n const isValidKey = validDigitRegex.test(event.key) || event.key === 'Backspace';\n const isValidColon = [1, 2, 4, 5].includes(selectionStart) && event.key === ':';\n\n if (!isValidKey && !isValidColon) {\n event.preventDefault();\n }\n};\n\nexport const formatTimeInputValue = (value: string) => {\n if (!value) {\n return value;\n }\n\n let formattedValue = value;\n\n // Format if the first value is bigger than 2, because it can't be bigger than 24 hours\n if (formattedValue.length === 1 && parseInt(value, 10) > 2) {\n return `0${formattedValue}:`;\n }\n\n const [secondToLastDigit, lastDigit] = formattedValue.slice(-2);\n if ([2, 5].includes(formattedValue.length) && lastDigit === ':') {\n formattedValue = `${formattedValue.slice(0, formattedValue.length - 2)}0${secondToLastDigit}`;\n }\n\n // Add `:` after hour/minute\n if (hourRegex.test(formattedValue) || minuteRegex.test(formattedValue)) {\n formattedValue += ':';\n }\n return formattedValue;\n};\n","<template>\n <div class=\"b-date-range-picker-calendar\">\n <!-- Form -->\n <div class=\"b-date-range-picker-calendar__form-container\">\n <div class=\"b-date-range-picker-calendar__form\">\n <bento-dropdown\n v-if=\"quickSelectRanges\"\n :aria-label=\"t('customRange')\"\n :items=\"quickSelectRangeDefaultItems\"\n :value=\"selectedRangeSelectorValue\"\n @input=\"onRangeSelectorInput\"\n />\n\n <template v-if=\"hasSlot('title')\">\n <slot name=\"title\" />\n </template>\n <div>\n <bento-typography stronger el=\"span\" class=\"b-date-range-picker-calendar__label\">\n From\n </bento-typography>\n <div :class=\"formInputWrapperConditionalClasses\">\n <bento-input-field\n :aria-label=\"$t('dateFrom')\"\n :value=\"dateTextInput.startDate\"\n :error=\"startDateError\"\n class=\"b-date-range-picker-calendar__form-input\"\n @input=\"onStartDateInput\"\n @keydown=\"onDateInputKeyDown\"\n >\n <template #description>YYYY-MM-DD</template>\n </bento-input-field>\n\n <bento-input-field\n v-if=\"allowTimeInput\"\n :aria-label=\"t('timeFrom')\"\n :value=\"dateTextInput.startTime\"\n :error=\"startTimeError\"\n class=\"b-date-range-picker-calendar__form-input\"\n @input=\"onStartTimeInput\"\n @keydown=\"onTimeInputKeyDown\"\n >\n <template #description>HH:MM:SS</template>\n </bento-input-field>\n </div>\n </div>\n\n <div>\n <bento-typography stronger el=\"span\" class=\"b-date-range-picker-calendar__label\">\n To\n </bento-typography>\n <div :class=\"formInputWrapperConditionalClasses\">\n <bento-input-field\n class=\"b-date-range-picker-calendar__form-input\"\n :aria-label=\"$t('dateTo')\"\n :value=\"dateTextInput.endDate\"\n :error=\"endDateError\"\n @input=\"onEndDateInput\"\n @keydown=\"onDateInputKeyDown\"\n >\n <template #description>YYYY-MM-DD</template>\n </bento-input-field>\n\n <bento-input-field\n v-if=\"allowTimeInput\"\n :aria-label=\"t('timeTo')\"\n :value=\"dateTextInput.endTime\"\n :error=\"endTimeError\"\n class=\"b-date-range-picker-calendar__form-input\"\n @input=\"onEndTimeInput\"\n @keydown=\"onTimeInputKeyDown\"\n >\n <template #description>HH:MM:SS</template>\n </bento-input-field>\n </div>\n </div>\n </div>\n\n <div v-if=\"hasSlot('actions')\">\n <slot name=\"actions\" />\n </div>\n </div>\n\n <!-- Calendar -->\n <div class=\"b-date-range-picker-calendar__calendars-container\">\n <calendar\n :value=\"value\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :max-range=\"maxRange\"\n :number-of-months=\"numberOfMonths\"\n is-range\n @input=\"onDateInput\"\n @start-date-selected=\"onStartDateSelected\"\n @end-date-selected=\"onEndDateSelected\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, reactive, ref } from 'vue';\n import { Calendar, CalendarRangeDateValue } from '@/internal';\n import { BentoTypography } from '@/components/typography';\n import { BentoInputField } from '@/components/input-field';\n import { BentoDropdown } from '@/components/dropdown';\n import { de, enUS, fr } from 'date-fns/locale';\n import { useI18n } from '@/utils/ts/i18n';\n import { debounce } from '@/utils/ts/debounce';\n import { useHasSlot } from '@/composables';\n import { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\n import {\n DateRangePickerCalendarEvent,\n DateRangePickerCalendarFormData,\n DateRangePickerCalendarRangeSelectorItems,\n } from './date-range-picker-calendar.types';\n import { DateFormat } from '@/types';\n import { formatTimeInputValue, validateTimeInput } from '@/utils/ts/time-input';\n import setHours from 'date-fns/setHours';\n import setMinutes from 'date-fns/setMinutes';\n import setSeconds from 'date-fns/setSeconds';\n import format from 'date-fns/format';\n import endOfDay from 'date-fns/endOfDay';\n import isEqual from 'date-fns/isEqual';\n import messages from './messages.json';\n\n const FORM_INPUT_DEBOUNCE_TIME = 300;\n const RANGE_SELECTOR_CUSTOM_RANGE_KEY = 'customRange';\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Calendar for range dates. Contains the logic to handle the range forms.\n *\n * @example\n * import DatePickerCalendarRange from './date-range-picker-calendar.vue';\n *\n * export default {\n * components: { DatePickerCalendarRange },\n * template: `\n * <date-range-picker-calendar\n * :value=\"{startDate: new Date(), endDate: new Date() }\"\n * :first-day-of-week=\"BentoDatePickerFirstDayOfWeek.MONDAY\"\n * :is-date-disabled=\"(date: Date) => boolean\"\n * :number-of-months=\"2\"\n * @input=\"({ startDate, endDate }) => void\"\n * />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'date-range-picker-calendar',\n components: {\n BentoDropdown,\n BentoInputField,\n BentoTypography,\n Calendar,\n },\n props: {\n /**\n * Allows user to enter time values in the form\n */\n allowTimeInput: { type: Boolean, default: false },\n\n /**\n * Ranges form persistance data\n */\n dateFormData: {\n type: Object as PropType<DateRangePickerCalendarFormData>,\n default: () => ({ startDate: undefined, endDate: undefined, startTime: undefined, endTime: undefined }),\n },\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 * Set a maximum number of dates to be selectable by the range.\n */\n maxRange: Calendar.props.maxRange,\n\n /**\n * Number of months rendered on pane\n */\n numberOfMonths: Calendar.props.numberOfMonths,\n\n /**\n * Enables the custom range selector.\n * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:\n * `label` - label of custom range item.\n * `value` - a unique key of the custom range item.\n * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.\n */\n quickSelectRanges: {\n type: Array as PropType<DateRangePickerCalendarRangeSelectorItems>,\n default: undefined,\n },\n\n /**\n * Selected date\n */\n value: { type: Object as PropType<CalendarRangeDateValue>, default: undefined },\n },\n emits: [\n DateRangePickerCalendarEvent.CUSTOM_RANGE,\n DateRangePickerCalendarEvent.INPUT,\n DateRangePickerCalendarEvent.ERROR,\n DateRangePickerCalendarEvent.FORM_DATE,\n ],\n setup(props, { emit, slots }) {\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const locales = { de, enUS, fr };\n const internalRangeDate = reactive({\n startDate: (props.value as CalendarRangeDateValue)?.startDate,\n endDate: (props.value as CalendarRangeDateValue)?.endDate,\n });\n const selectedRangeSelectorValue = ref(\n props?.quickSelectRanges?.find(\n ({ data }) =>\n isEqual(data.startDate, internalRangeDate.startDate) &&\n isEqual(data.endDate, internalRangeDate.endDate)\n )?.value ?? RANGE_SELECTOR_CUSTOM_RANGE_KEY\n );\n const formInputWrapperConditionalClasses = computed(() => ({\n 'b-date-range-picker-calendar__form-input-wrapper': props.allowTimeInput,\n }));\n const quickSelectRangeDefaultItems = computed(() => {\n if (props.quickSelectRanges) {\n return [\n { label: t('customRange'), value: RANGE_SELECTOR_CUSTOM_RANGE_KEY },\n ...props.quickSelectRanges,\n ];\n }\n return [];\n });\n\n /**\n * When selecting a custom range, set the range selecter if it is enabled.\n */\n const resetCustomRangeToDefault = () => {\n if (props?.quickSelectRanges) {\n selectedRangeSelectorValue.value = RANGE_SELECTOR_CUSTOM_RANGE_KEY;\n }\n };\n\n /**\n * Format date to a string value in format yyyy-MM-dd\n * @param {Date} dateToFormat Date to be formatted\n */\n const formatDate = (dateToFormat?: Date) => {\n if (!dateToFormat) {\n return '';\n }\n return format(dateToFormat, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n };\n\n const formatTime = (dateToFormat?: Date) => {\n if (!dateToFormat) {\n return '';\n }\n\n return format(dateToFormat, DateFormat.HOUR_MINUTE_SECONDS, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n };\n\n // Form error flags\n const startDateError = ref(false);\n const endDateError = ref(false);\n const startTimeError = ref(false);\n const endTimeError = ref(false);\n\n // Form input text used in range variant\n const dateTextInput = reactive({\n startDate: props.dateFormData.startDate,\n endDate: props.dateFormData.endDate,\n startTime: props.dateFormData.startTime,\n endTime: props.dateFormData.endTime,\n });\n\n const onDateInput = (selectedDate: Date) => {\n emit(DateRangePickerCalendarEvent.INPUT, selectedDate);\n };\n\n // Validate time\n const isValidTime = (timeText: string) => {\n // HH:MM:SS regex\n const timeRegex = /^(?:[01]\\d|2[01234]):(?:[012345]\\d):(?:[012345]\\d)$/;\n return timeRegex.test(timeText);\n };\n\n const setTimeInDate = (date: Date, time: string) => {\n if (!time || !isValidTime(time)) {\n return date;\n }\n\n let dateWithTime = new Date(date);\n\n const [hours, minutes, seconds] = time.split(':');\n dateWithTime = setHours(dateWithTime, parseInt(hours, 10));\n dateWithTime = setMinutes(dateWithTime, parseInt(minutes, 10));\n dateWithTime = setSeconds(dateWithTime, parseInt(seconds, 10));\n return dateWithTime;\n };\n\n const isValidDate = (dateText: string) => {\n // Is date selectable\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 // YYYY-MM-DD regex\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;\n // Date matches text regex\n return dateRegex.test(dateText) && isDateEnabled(new Date(dateText));\n };\n\n /**\n * When mounted, set the input error states to true if the values are not valid\n */\n onMounted(() => {\n if (props.dateFormData.startDate && !isValidDate(props.dateFormData.startDate)) {\n startDateError.value = true;\n } else {\n startDateError.value = false;\n startTimeError.value = false;\n }\n\n if (props.dateFormData.endDate && !isValidDate(props.dateFormData.endDate)) {\n endDateError.value = true;\n } else {\n endDateError.value = false;\n endTimeError.value = false;\n }\n });\n\n const onStartDateSelected = (newStartDate: Date) => {\n resetCustomRangeToDefault();\n dateTextInput.startDate = formatDate(newStartDate);\n if (!dateTextInput.startTime) {\n // Set the time to the beginning of the day\n dateTextInput.startTime = formatTime(newStartDate);\n } else if (startTimeError.value) {\n // Set the form time if it was previously set\n dateTextInput.startTime = props.dateFormData?.startTime;\n }\n\n // Reset errors\n startDateError.value = false;\n startTimeError.value = false;\n };\n\n const onEndDateSelected = (newEndDate: Date) => {\n dateTextInput.endDate = formatDate(newEndDate);\n if (!dateTextInput.endTime) {\n // Set the time to the end of the day\n dateTextInput.endTime = formatTime(endOfDay(newEndDate));\n } else if (endTimeError.value) {\n // Set the form time if it was previously set\n dateTextInput.endTime = props.dateFormData?.endTime;\n }\n\n // Reset errors\n endDateError.value = false;\n endTimeError.value = false;\n };\n\n const getDate = (keyName: keyof CalendarRangeDateValue) => {\n const dateProp = (props.value as CalendarRangeDateValue)[keyName];\n if (dateProp) {\n return dateProp;\n }\n\n if (props.dateFormData[keyName] && isValidDate(props.dateFormData[keyName])) {\n return new Date(props.dateFormData[keyName]);\n }\n\n return undefined;\n };\n\n const validateStartDate = debounce((startDateText: string) => {\n // Checks for YYYY-MM-DD format\n if (isValidDate(startDateText)) {\n startDateError.value = false;\n // Format date string to Date object\n internalRangeDate.startDate = setTimeInDate(new Date(startDateText), dateTextInput.startTime);\n\n const endDate = getDate('endDate');\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate: new Date(startDateText),\n endDate,\n });\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n startDate: new Date(startDateText),\n endDate,\n });\n } else {\n // Indicate form error\n startDateError.value = true;\n // Emit Date picker calendar error\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n }\n }, FORM_INPUT_DEBOUNCE_TIME);\n\n const onStartDateInput = (startDateText: string) => {\n resetCustomRangeToDefault();\n // Set the date as string when input through the form\n dateTextInput.startDate = formatDateInputValue(startDateText);\n validateStartDate(dateTextInput.startDate);\n };\n\n const validateEndDate = debounce((endDateText: string) => {\n // Checks for YYYY-MM-DD format\n if (isValidDate(endDateText)) {\n endDateError.value = false;\n internalRangeDate.endDate = setTimeInDate(new Date(endDateText), dateTextInput.endTime);\n\n const startDate = getDate('startDate');\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate,\n endDate: new Date(internalRangeDate.endDate),\n startTime: props.dateFormData.endTime,\n endTime: endDateText,\n });\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n startDate,\n endDate: new Date(internalRangeDate.endDate),\n });\n } else {\n // Indicate form error\n endDateError.value = true;\n // Emit Date picker calendar error\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n }\n }, FORM_INPUT_DEBOUNCE_TIME);\n\n const onEndDateInput = (endDateText: string) => {\n resetCustomRangeToDefault();\n // Set the date as string when input through the form\n dateTextInput.endDate = formatDateInputValue(endDateText);\n validateEndDate(dateTextInput.endDate);\n };\n\n const onDateInputKeyDown = (event: KeyboardEvent) => {\n validateDateInput(event);\n };\n\n const validateStartTime = debounce((startTimeText: string) => {\n if (isValidTime(startTimeText)) {\n startTimeError.value = false;\n internalRangeDate.startDate = setTimeInDate(internalRangeDate.startDate, startTimeText);\n\n const endDate = getDate('endDate');\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate: new Date(internalRangeDate.startDate),\n endDate,\n startTime: startTimeText,\n endTime: props.dateFormData.endTime,\n });\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n startDate: new Date(internalRangeDate.startDate),\n endDate,\n });\n } else {\n // Indicate form error\n startTimeError.value = true;\n // Emit Date picker calendar error\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n }\n });\n\n const validateEndTime = debounce((endTimeText: string) => {\n if (isValidTime(endTimeText)) {\n endTimeError.value = false;\n internalRangeDate.endDate = setTimeInDate(internalRangeDate.endDate, endTimeText);\n\n const startDate = getDate('startDate');\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate,\n endDate: new Date(internalRangeDate.endDate),\n startTime: props.dateFormData.startTime,\n endTime: endTimeText,\n });\n emit(DateRangePickerCalendarEvent.INPUT, {\n startDate,\n endDate: new Date(internalRangeDate.endDate),\n });\n } else {\n // Indicate form error\n endTimeError.value = true;\n // Emit Date picker calendar error\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n }\n });\n\n const onStartTimeInput = (startTimeText: string) => {\n resetCustomRangeToDefault();\n dateTextInput.startTime = formatTimeInputValue(startTimeText);\n validateStartTime(dateTextInput.startTime);\n };\n\n const onEndTimeInput = (endDateText: string) => {\n resetCustomRangeToDefault();\n dateTextInput.endTime = formatTimeInputValue(endDateText);\n validateEndTime(dateTextInput.endTime);\n };\n\n const onTimeInputKeyDown = (event: KeyboardEvent) => {\n validateTimeInput(event);\n };\n\n const onRangeSelectorInput = (newCustomRangeValue: string) => {\n selectedRangeSelectorValue.value = newCustomRangeValue;\n const foundResult = props.quickSelectRanges?.find(({ value }) => value === newCustomRangeValue)?.data;\n if (foundResult) {\n dateTextInput.startDate = formatDate(foundResult.startDate);\n dateTextInput.endDate = formatDate(foundResult.endDate);\n if (!dateTextInput.startTime) {\n dateTextInput.startTime = formatTime(endOfDay(foundResult.startDate));\n }\n if (!dateTextInput.endTime) {\n dateTextInput.endTime = formatTime(endOfDay(foundResult.endDate));\n }\n emit(DateRangePickerCalendarEvent.CUSTOM_RANGE, foundResult);\n }\n };\n\n return {\n // Values\n dateTextInput,\n endDateError,\n endTimeError,\n selectedRangeSelectorValue,\n startDateError,\n startTimeError,\n quickSelectRangeDefaultItems,\n formInputWrapperConditionalClasses,\n\n // Methods\n hasSlot: useHasSlot(slots),\n t,\n\n // Events\n onRangeSelectorInput,\n onDateInput,\n onDateInputKeyDown,\n onEndDateInput,\n onEndDateSelected,\n onEndTimeInput,\n onStartDateSelected,\n onStartDateInput,\n onStartTimeInput,\n onTimeInputKeyDown,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-range-picker-calendar.scss\" />\n","export { CalendarFirstDayOfWeek as BentoDateRangePickerFirstDayOfWeek } from '@/internal';\nexport type {\n CalendarIsDateDisabled as BentoDateRangePickerIsDateDisabled,\n CalendarRangeDateValue as BentoDateRangePickerValue,\n} from '@/internal';\n\nexport enum BentoDateRangePickerEvent {\n INPUT = 'input',\n}\n","import { computed, reactive } from 'vue';\nimport { de, enUS, fr } from 'date-fns/locale';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { UseDateDisplayText } from './use-date-range-picker-calendar-text.types';\nimport { DateFormat } from '@/types';\nimport { CalendarRangeDateValue } from '@/internal';\nimport { DateRangePickerCalendarFormData } from '../components/date-range-picker-calendar/date-range-picker-calendar.types';\nimport format from 'date-fns/format';\n\nexport const useDateRangePickerCalendarText: UseDateDisplayText<CalendarRangeDateValue> = ({\n datePickerValue,\n isDateIncorrect,\n}) => {\n const { locale, t } = useI18n();\n const locales = { de, enUS, fr };\n\n const formatDate = (date: Date, dateFormat: DateFormat) =>\n format(date, dateFormat, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n\n const formatTime = (date: Date) =>\n format(date, DateFormat.HOUR_MINUTE_SECONDS, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n\n // Handle the form input text\n const textInputDisplayValue = reactive<DateRangePickerCalendarFormData>({\n startDate: datePickerValue.value?.startDate\n ? formatDate(datePickerValue.value.startDate, DateFormat.NUMERIC_DATE_YEAR_FIRST)\n : undefined,\n endDate: datePickerValue.value?.endDate\n ? formatDate(datePickerValue.value.endDate, DateFormat.NUMERIC_DATE_YEAR_FIRST)\n : undefined,\n\n // Set time if the startDate/endDate are set\n startTime: datePickerValue.value?.startDate ? formatTime(datePickerValue.value?.startDate) : undefined,\n endTime: datePickerValue.value?.endDate ? formatTime(datePickerValue.value.endDate) : undefined,\n });\n\n const dateDisplayValue = computed(() => {\n // Display incorrect date when there's an error with the input\n if (isDateIncorrect.value) {\n return `${textInputDisplayValue.startDate || ''} - ${textInputDisplayValue.endDate || ''}`;\n }\n\n // Display \"Select a date\" when there's no date selected or input\n if (!datePickerValue.value || (!datePickerValue.value.startDate && !datePickerValue.value.endDate)) {\n return t('selectDateRange') as string;\n }\n\n const { startDate, endDate } = textInputDisplayValue;\n return `${formatDate(new Date(startDate), DateFormat.FULL_DATE_MONTH_FIRST)} - ${formatDate(\n new Date(endDate),\n DateFormat.FULL_DATE_MONTH_FIRST\n )}`;\n });\n\n const formatTextInputDisplayValue = () => '';\n\n return {\n // Values\n dateDisplayValue,\n textInputDisplayValue,\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 v-bento-click-outside-directive=\"closeDateRangePicker\" class=\"b-date-range-picker\">\n <!-- Label -->\n <div v-if=\"label\" :id=\"labelId\" class=\"b-date-range-picker__label\">\n <bento-typography el=\"span\" stronger>{{ label }}</bento-typography>\n <bento-typography v-if=\"optional\" class=\"b-date-range-picker__label-requirement\" el=\"span\">\n ({{ $t('optional') }})\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-date-range-picker__label-requirement\" el=\"span\">\n ({{ $t('required') }})\n </bento-typography>\n </div>\n\n <!-- Input -->\n <div @keydown.enter=\"onEnterPressedOverInput\">\n <dropdown-input-default\n ref=\"inputContainerRef\"\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDateRangePickerOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n :is-invalid=\"!!errorMessage || isDateIncorrect\"\n :open=\"isDateRangePickerOpen\"\n :display-value=\"dateDisplayValue\"\n :readonly=\"isReadOnly\"\n @open=\"openDateRangePicker\"\n @clear=\"clearDateRangePickerValue\"\n @close=\"closeDateRangePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"isDateIncorrect\"\n :id=\"dateErrorId\"\n :error-message=\"$t('provideDateInAFormat').toString()\"\n class=\"b-date-range-picker__error-message\"\n />\n <error-message\n v-if=\"!!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-range-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n :id=\"descriptionId\"\n class=\"b-date-range-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-range-picker__container\"\n :open=\"isDateRangePickerOpen\"\n :target-element=\"inputContainerRef\"\n :disable-focus-trap=\"true\"\n :aria-label=\"popoverAriaLabel\"\n position=\"bottom-start\"\n without-space\n fit-content\n >\n <date-range-picker-calendar\n :allow-time-input=\"allowTimeInput\"\n :quick-select-ranges=\"quickSelectRanges\"\n :value=\"value\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :max-range=\"maxRange\"\n :number-of-months=\"numberOfMonths\"\n :date-form-data=\"textInputDisplayValue\"\n @custom-range=\"onRangeSelectorInput\"\n @input=\"onDateRangePickerInput\"\n @error=\"onDateRangePickerError\"\n @form-date=\"onDateRangePickerFormDateInputUpdate\"\n />\n </bento-popover>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef, watch } from 'vue';\n import { BentoClickOutsideDirective } from '@/directives';\n import { BentoDateRangePickerEvent, BentoDateRangePickerValue } from './date-range-picker.types';\n import { DateRangePickerCalendar } from './components/date-range-picker-calendar';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n import { BentoPopover } from '@/components/popover';\n import { ErrorMessage } from '@/internal';\n import { generateUid } from '@/utils/ts/unique-id';\n import { de, enUS, fr } from 'date-fns/locale';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoTypography } from '../typography';\n import { useDateRangePickerCalendarText } from './composables/use-date-range-picker-calendar-text';\n import {\n DateRangePickerCalendarFormData,\n DateRangePickerCalendarRangeSelectorItems,\n } from './components/date-range-picker-calendar/date-range-picker-calendar.types';\n import { DateFormat } from '@/types';\n import format from 'date-fns/format';\n\n import messages from './messages.json';\n import { useFormLayoutFieldLoading } from '@/composables';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Date range picker selector.\n *\n * @example\n * import { BentoDateRangePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDateRangePicker },\n * template: `\n * <bento-date-range-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-range-picker',\n components: {\n BentoTypography,\n BentoPopover,\n DateRangePickerCalendar,\n DropdownInputDefault,\n ErrorMessage,\n },\n directives: { BentoClickOutsideDirective },\n props: {\n /**\n * Allows user to enter time values in the form\n */\n allowTimeInput: { type: Boolean, default: false },\n\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 user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: DateRangePickerCalendar.props.firstDayOfWeek,\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: DateRangePickerCalendar.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 range 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 * Enables the range selector.\n * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:\n * `label` - label of custom range item.\n * `value` - a unique key of the custom range item.\n * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.\n */\n quickSelectRanges: {\n type: Array as PropType<DateRangePickerCalendarRangeSelectorItems>,\n default: undefined,\n },\n\n /**\n * Set a maximum number of dates to be selectable by the range.\n */\n maxRange: DateRangePickerCalendar.props.maxRange,\n\n /**\n * Number of months rendered on pane\n */\n numberOfMonths: DateRangePickerCalendar.props.numberOfMonths,\n\n /**\n * Selected date\n */\n value: DateRangePickerCalendar.props.value,\n },\n emits: [BentoDateRangePickerEvent.INPUT],\n setup(props, { emit }) {\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const locales = { de, enUS, fr };\n const datePickerContainerId = generateUid('bento-date-range-picker-container');\n const labelId = generateUid('bento-date-range-picker-label');\n const descriptionId = generateUid('bento-date-range-picker-description');\n const errorId = generateUid('bento-date-range-picker-error');\n const dateErrorId = generateUid('bento-date-range-picker-date-error');\n const popoverAriaLabel = computed(\n () => props.label || t('dateRangePicker', { name: datePickerContainerId })\n );\n\n const isDateIncorrect = ref(false);\n const inputContainerRef = ref(null);\n const isDateRangePickerOpen = ref(false);\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n watch(\n () => props.disabled,\n () => {\n // Close date picker popover if it's opened when it's disabled\n if (props.disabled && isDateRangePickerOpen.value) {\n isDateRangePickerOpen.value = false;\n }\n }\n );\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-range-picker__description--error': !!props.errorMessage || isDateIncorrect.value,\n }));\n\n const { dateDisplayValue, textInputDisplayValue, formatTextInputDisplayValue } =\n useDateRangePickerCalendarText({\n datePickerValue: toRef(props, 'value'),\n isDateIncorrect,\n });\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n isDateIncorrect.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const closeDateRangePicker = () => {\n isDateRangePickerOpen.value = false;\n };\n\n const openDateRangePicker = () => {\n isDateRangePickerOpen.value = true;\n formatTextInputDisplayValue();\n };\n\n const onDateRangePickerInput = (selectedRange: BentoDateRangePickerValue) => {\n // Reset the errors when the date is correct\n isDateIncorrect.value = false;\n\n const formatDate = (date: Date) =>\n format(date, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n\n textInputDisplayValue.startDate = formatDate(selectedRange.startDate);\n textInputDisplayValue.endDate = formatDate(selectedRange.endDate);\n emit(BentoDateRangePickerEvent.INPUT, selectedRange);\n };\n\n const clearDateRangePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n }\n emit(BentoDateRangePickerEvent.INPUT, null);\n };\n\n const onEnterPressedOverInput = () => {\n // Close the date picker if the date is correct\n if (!isDateIncorrect.value) {\n isDateRangePickerOpen.value = false;\n }\n };\n\n const onDateRangePickerFormDateInputUpdate = (dateFormDate: DateRangePickerCalendarFormData) => {\n isDateIncorrect.value = false;\n\n if (dateFormDate.startTime) {\n textInputDisplayValue.startTime = dateFormDate.startTime;\n }\n\n if (dateFormDate.endTime) {\n textInputDisplayValue.endTime = dateFormDate.endTime;\n }\n };\n\n const onDateRangePickerError = dateTextInput => {\n isDateIncorrect.value = true;\n textInputDisplayValue.startDate = dateTextInput.startDate;\n textInputDisplayValue.endDate = dateTextInput.endDate;\n\n // Remove current date range selection\n emit(BentoDateRangePickerEvent.INPUT, { startDate: null, endDate: null });\n };\n\n const onRangeSelectorInput = (quickSelectRanges?: { startDate: Date; endDate: Date }) => {\n if (quickSelectRanges) {\n const formatDate = (date: Date) =>\n format(date, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n textInputDisplayValue.startDate = formatDate(quickSelectRanges.startDate);\n textInputDisplayValue.endDate = formatDate(quickSelectRanges.endDate);\n emit(BentoDateRangePickerEvent.INPUT, quickSelectRanges);\n }\n };\n\n return {\n // Refs\n inputContainerRef,\n\n // Values,\n dateDisplayValue,\n datePickerContainerId,\n descriptionConditionalClasses,\n isDateIncorrect,\n isDateRangePickerOpen,\n isReadOnly,\n labelId,\n descriptionId,\n dateErrorId,\n errorId,\n popoverAriaLabel,\n ariaDescribedBy,\n textInputDisplayValue,\n\n // Events\n closeDateRangePicker,\n clearDateRangePickerValue,\n openDateRangePicker,\n onRangeSelectorInput,\n onEnterPressedOverInput,\n onDateRangePickerInput,\n onDateRangePickerError,\n onDateRangePickerFormDateInputUpdate,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-range-picker.scss\" />\n"],"names":["isEqual","dirtyLeftDate","dirtyRightDate","requiredArgs","dateLeft","toDate","dateRight","setHours","dirtyDate","dirtyHours","date","hours","toInteger","setMinutes","dirtyMinutes","minutes","setSeconds","dirtySeconds","seconds","DateRangePickerCalendarEvent","DateRangePickerCalendarEvent2","validDigitRegex","hourRegex","minuteRegex","validateTimeInput","event","selectionStart","isValidKey","isValidColon","formatTimeInputValue","value","formattedValue","secondToLastDigit","lastDigit","FORM_INPUT_DEBOUNCE_TIME","RANGE_SELECTOR_CUSTOM_RANGE_KEY","_sfc_main$1","defineComponent","messages$1","BentoDropdown","BentoInputField","BentoTypography","Calendar","props","emit","slots","locale","t","useI18n","locales","de","enUS","fr","internalRangeDate","reactive","_a","_b","selectedRangeSelectorValue","ref","_d","_c","data","formInputWrapperConditionalClasses","computed","quickSelectRangeDefaultItems","resetCustomRangeToDefault","formatDate","dateToFormat","format","DateFormat","formatTime","startDateError","endDateError","startTimeError","endTimeError","dateTextInput","onDateInput","selectedDate","isValidTime","timeText","setTimeInDate","time","dateWithTime","isValidDate","dateText","isDateEnabled","onMounted","onStartDateSelected","newStartDate","onEndDateSelected","newEndDate","endOfDay","getDate","keyName","dateProp","validateStartDate","debounce","startDateText","endDate","onStartDateInput","formatDateInputValue","validateEndDate","endDateText","startDate","onEndDateInput","onDateInputKeyDown","validateDateInput","validateStartTime","startTimeText","validateEndTime","endTimeText","onStartTimeInput","onEndTimeInput","onTimeInputKeyDown","onRangeSelectorInput","newCustomRangeValue","foundResult","useHasSlot","BentoDateRangePickerEvent","BentoDateRangePickerEvent2","useDateRangePickerCalendarText","datePickerValue","isDateIncorrect","dateFormat","textInputDisplayValue","_e","_sfc_main","messages","BentoPopover","DateRangePickerCalendar","DropdownInputDefault","ErrorMessage","BentoClickOutsideDirective","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","inputContainerRef","isDateRangePickerOpen","isReadOnly","useFormLayoutFieldLoading","toRef","watch","descriptionConditionalClasses","dateDisplayValue","formatTextInputDisplayValue","ariaDescribedBy","quickSelectRanges","selectedRange","dateFormDate"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4Be,SAAAA,GAAAC,GAAAC,GAAA;AACf,EAAAC,E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sCA3DA,CAAAkC,MAAA;AACA,QAAA9B,EAAA,QAAA,IAEA8B,EAAA,cACA5B,EAAA,YAAA4B,EAAA,YAGAA,EAAA,YACA5B,EAAA,UAAA4B,EAAA;AAAA,MACA;AAAA,IAmDA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"listbox.e7bf46e4.js","sources":["../../src/composables/use-checkbox-select-all/use-checkbox-select-all.ts","../../src/types/listbox.ts","../../src/components/internal/listbox/components/listbox-option/listbox-option.vue","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/checkmark.vue","../../src/components/internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue","../../src/components/internal/listbox/composables/useListboxKeyboardNavigation.ts","../../src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.types.ts","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.types.ts","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue","../../src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue","../../src/components/internal/listbox/listbox.vue"],"sourcesContent":["import { computed } from 'vue';\nimport type { ComputedRef } from 'vue';\nimport type { BentoListboxMultiSelectValue, Fn } from '@/types';\nimport { BentoListboxOptions } from '@/types';\n\n/**\n * Callback function that alllows to select all the items when called\n * @callback selectAllCallback\n */\n\n/**\n * Callback function that alllows to select all the items when called\n * @callback unselectAllCallback\n */\n\n/**\n * @typedef {Object} UseCheckboxSelectAll\n * @property {Ref<boolean>} isAllSelected - Indicates if all values are selected. Pass this to the :value property.\n * @property {Ref<boolean>} isIndeterminate - Indicates if it is in an indeterminated state (not all values are selected nor unselected). Pass this to the :indeterminate property.\n * @property {(selectedValue: boolean) => void} toggleSelectAll - Handles the select all flow, selects or unselects all and nullifies the indeterminated state. Pass this to the @input method.\n */\n\n/**\n * Composable to handle a 3 way checkbox state that allows to manage\n * a \"select all\", \"unselect all\" and an intermediate state where\n * not all are selected.\n *\n * @example\n * const checkboxVModelRef = ref<number[]>([]);\n *\n * const { isAllSelected, isIndeterminate, toggleSelectAll, updateIndeterminate } = useCheckboxSelectAll(\n * checkboxVModelRef,\n * () => { checkboxVModelRef.value = [...] // select all logic },\n * () => { checkboxVModelRef.value = [] // unselect all logic },\n * );\n * toggleSelectAll(true|false); // Hook this to the @input method\n * updateIndeterminate(totalOfAvailableItems);\n *\n *\n * @param {ComputedRef<BentoListboxMultiSelectValue>} selectedItemsList - Reference to the list of selected values\n * @param {ComputedRef<BentoListboxOptions>} items - Reference to the list of all available items in the dropdown\n * @param {selectAllCallback} selectAll - Callback function that alllows to select all the items when called\n * @param {unselectAllCallback} unselectAll - Callback function that alllows to select all the items when called\n * @returns {UseCheckboxSelectAll} Values to be set to the bento-checkbox value and indeterminate props, as well as functions to update them accordingly\n *\n */\nexport const useCheckboxSelectAll = (\n selectedItemsList: ComputedRef<BentoListboxMultiSelectValue>,\n items: ComputedRef<BentoListboxOptions>,\n selectAll: Fn,\n unselectAll: Fn\n) => {\n const isAllSelected = computed(\n () => !!selectedItemsList.value?.length && selectedItemsList.value?.length === items.value.length\n );\n const isIndeterminate = computed(() => {\n // eslint-disable-next-line eqeqeq\n if (selectedItemsList.value == undefined || selectedItemsList.value.length === 0) {\n return false;\n }\n\n return selectedItemsList.value?.length !== items.value.length;\n });\n\n const toggleSelectAll = (selectedValue: boolean) => {\n if (selectedValue) {\n selectAll();\n } else {\n unselectAll();\n }\n };\n\n return {\n isAllSelected,\n isIndeterminate,\n\n toggleSelectAll,\n };\n};\n","import { BentoSearchBarItem } from '@/components/search-bar';\n\nexport type BentoListboxValue = string | number;\n\nexport type BentoListboxMultiSelectValue = BentoListboxValue[];\n\nexport interface BentoListboxOptionItem extends BentoSearchBarItem {\n data?: unknown;\n description?: string;\n value: BentoListboxValue;\n items?: Array<BentoListboxOptionItem>; // Reference itself for multi-level options\n}\n\nexport type BentoListboxSelectedValue = BentoListboxValue | BentoListboxMultiSelectValue;\n\nexport type BentoListboxOptions = Array<BentoListboxOptionItem>;\n\nexport type BentoListboxIsOptionDisabled = undefined | ((optionValue: BentoListboxOptionItem) => boolean);\n\nexport enum BentoListboxEvent {\n SELECT = 'select',\n SHOW_MORE = 'show-more',\n ESCAPE = 'escape-pressed',\n CLICK = 'click',\n ENTER = 'enter-pressed',\n SPACE = 'space-pressed',\n TAB = 'tab-pressed',\n CLOSE_DROPDOWN = 'close-dropdown',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoListboxLazyLoadType {\n AUTOMATIC = 'automatic',\n BUTTON = 'button',\n NONE = 'none',\n}\n\nexport interface BentoListboxSearchOptions {\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime?: number;\n\n /**\n * The event that triggers upon user filtering the listbox items.\n */\n searchEvent: (searchValue: string) => void;\n}\n","<template>\n <label\n class=\"b-listbox-option\"\n role=\"option\"\n :class=\"conditionalClasses\"\n v-bind=\"$attrs\"\n @click=\"onClick\"\n @keydown.enter=\"onOptionSelected(BentoListboxEvent.ENTER, $event)\"\n @keydown.space=\"onOptionSelected(BentoListboxEvent.SPACE, $event)\"\n @keydown.tab=\"onOptionSelected(BentoListboxEvent.TAB, $event)\"\n >\n <slot></slot>\n </label>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoKeyboardNavigationKeyDownEvent, BentoListboxEvent } from '@/types';\n\n /**\n * listbox option wrapper.\n * Contains only styles and allows the Multi-Select and Single-Select DRY the styles.\n *\n * Options and Attributes are inherited (`inheritAttrs: true`)\n *\n * @example\n * <bento-listbox-option\n * ...props\n * ...attrs\n * />\n */\n export default defineComponent({\n name: 'bento-listbox-option',\n props: {\n /**\n * Setting this property to true will disable the option.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Indicates if the value is selected. Only one element can be selected at a time.\n */\n selected: { type: Boolean, default: false },\n },\n emits: [BentoListboxEvent.CLICK, BentoListboxEvent.ENTER, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit }) {\n const conditionalClasses = computed(() => ({\n 'b-listbox-option--disabled': props.disabled,\n 'b-listbox-option--selected': props.selected,\n }));\n\n const onClick = (e: Event) => {\n emit(BentoListboxEvent.CLICK, e);\n };\n\n const onOptionSelected = (eventName, e: Event) => {\n emit(eventName, e);\n };\n\n return {\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n\n // Values\n conditionalClasses,\n\n // Events\n onClick,\n onOptionSelected,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-option.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M14.5303 4.53033C14.8232 4.23744 14.8232 3.76256 14.5303 3.46967C14.2374 3.17678 13.7626 3.17678 13.4697 3.46967L6 10.9393L2.53033 7.46967C2.23744 7.17678 1.76256 7.17678 1.46967 7.46967C1.17678 7.76256 1.17678 8.23744 1.46967 8.53033L5.46967 12.5303C5.50628 12.5669 5.54574 12.599 5.58732 12.6264C5.87844 12.8186 6.27405 12.7866 6.53033 12.5303L14.5303 4.53033Z\" clip-rule=\"evenodd\"/></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 scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n","<template>\n <bento-listbox-option\n class=\"b-listbox-single-select-option\"\n :disabled=\"disabled\"\n :selected=\"selected\"\n :aria-selected=\"ariaSelected\"\n :aria-disabled=\"ariaDisabled\"\n :tabindex=\"tabIndex\"\n @click=\"onOptionSelected(BentoListboxEvent.SELECT)\"\n @[BentoListboxEvent.ENTER]=\"onOptionSelected(BentoListboxEvent.ENTER)\"\n @[BentoListboxEvent.SPACE]=\"onOptionSelected(BentoListboxEvent.SPACE)\"\n @[BentoListboxEvent.TAB]=\"onOptionSelected(BentoListboxEvent.TAB)\"\n >\n <slot v-bind=\"option\">\n <span class=\"b-listbox-single-select-option__text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"option.description\"\n class=\"b-listbox-single-select-option__description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n <span class=\"b-listbox-single-select-option__check-icon\">\n <checkmark-icon v-show=\"selected\" svg-title=\"selected\" />\n </span>\n </bento-listbox-option>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoListboxOption } from '../listbox-option';\n import { BentoListboxEvent, BentoListboxOptionItem } from '@/types';\n import CheckmarkIcon from '@adyen/ui-assets-icons-16/vue/checkmark';\n\n /**\n * Listbox option element.\n *\n * @example\n * <bento-listbox-single-select-option\n * v-for=\"option in options\"\n * :key=\"option.value\"\n * :option=\"option\"\n * :selected=\"option.selected\"\n * @select=\"onOptionSelected\"\n * />\n */\n export default defineComponent({\n name: 'bento-listbox-single-select-option',\n components: {\n BentoListboxOption,\n BentoTypography,\n CheckmarkIcon,\n },\n props: {\n /**\n * Setting this property to true will disable the option.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * The option item that contains all the option item's data.\n * @type {BentoListboxOptionItem}\n */\n option: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n\n /**\n * Indicates if the value is selected. Only one element can be selected at a time.\n */\n selected: { type: Boolean, default: false },\n },\n emits: [BentoListboxEvent.ENTER, BentoListboxEvent.SELECT, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit }) {\n const onOptionSelected = eventName => {\n if (props.disabled) {\n return;\n }\n\n /**\n * Trigerred when an option is clicked or selected via keyboard navigation.\n * Indicates which option was selected.\n *\n * @event {string} - The corresponding event\n * @property {number} selectedValue - Selected option's value\n */\n emit(eventName, props.option.value);\n };\n\n const ariaDisabled = computed(() => (props.disabled ? true : null));\n const ariaSelected = computed(() => (props.selected ? true : null));\n const tabIndex = computed(() => (props.disabled ? -1 : 0));\n\n return {\n // Values\n ariaDisabled,\n ariaSelected,\n tabIndex,\n\n // Enums\n BentoListboxEvent,\n\n // Events\n onOptionSelected,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-single-select-option.scss\" />\n","import { computed, onMounted, ref } from 'vue';\n\nconst enum ListboxKeyboardNavigationMutationDirection {\n INCREASE = 'increase',\n DECREASE = 'decrease',\n}\n\nexport const useListboxKeyboardNavigation = ({ items, isOptionDisabled }, focusItem) => {\n const numberOfItems = computed(() => items.value.length - 1);\n const focusedIndex = ref(0);\n\n onMounted(() => {\n if (isOptionDisabled) {\n focusedIndex.value = items.value.findIndex(el => !isOptionDisabled(el));\n }\n });\n\n const isItemDisabled = (itemIndex: number) =>\n !isOptionDisabled || (!!isOptionDisabled && isOptionDisabled(items.value[itemIndex]));\n\n const isItemEnabled = (itemIndex: number) =>\n !isOptionDisabled || (!!isOptionDisabled && !isOptionDisabled(items.value[itemIndex]));\n\n const mutateFocusedIndex = (direction: ListboxKeyboardNavigationMutationDirection) => {\n switch (direction) {\n case ListboxKeyboardNavigationMutationDirection.INCREASE:\n focusedIndex.value += 1;\n break;\n case ListboxKeyboardNavigationMutationDirection.DECREASE:\n focusedIndex.value -= 1;\n break;\n default:\n break;\n }\n };\n\n const calculateFocusedIndex = ({ edgeCaseItem, isItemBeforeEdgeCaseItem }, callback, direction) => {\n const isEdgeCaseItem = focusedIndex.value === edgeCaseItem;\n if (isEdgeCaseItem) {\n return;\n }\n if (isItemBeforeEdgeCaseItem) {\n if (isItemEnabled(edgeCaseItem)) {\n mutateFocusedIndex(direction);\n }\n } else {\n mutateFocusedIndex(direction);\n if (isItemDisabled(focusedIndex.value)) {\n callback();\n }\n }\n focusItem(focusedIndex.value);\n };\n\n const moveToNextElement = () => {\n const isIndexSecondToLastItemInArray = focusedIndex.value === numberOfItems.value - 2;\n calculateFocusedIndex(\n {\n isItemBeforeEdgeCaseItem: isIndexSecondToLastItemInArray,\n edgeCaseItem: numberOfItems.value,\n },\n moveToNextElement,\n ListboxKeyboardNavigationMutationDirection.INCREASE\n );\n };\n\n const moveToPreviousElement = () => {\n const IsIndexSecondItemInArray = focusedIndex.value === 1;\n calculateFocusedIndex(\n {\n edgeCaseItem: 0,\n isItemBeforeEdgeCaseItem: IsIndexSecondItemInArray,\n },\n moveToPreviousElement,\n ListboxKeyboardNavigationMutationDirection.DECREASE\n );\n };\n\n const moveToFirstElement = () => {\n focusedIndex.value = 0;\n if (isItemDisabled(focusedIndex.value)) {\n moveToNextElement();\n } else {\n focusItem(focusedIndex.value);\n }\n };\n\n const moveToLastElement = () => {\n focusedIndex.value = numberOfItems.value;\n if (isItemDisabled(focusedIndex.value)) {\n moveToPreviousElement();\n } else {\n focusItem(focusedIndex.value);\n }\n };\n\n return {\n moveToFirstElement,\n moveToLastElement,\n moveToNextElement,\n moveToPreviousElement,\n };\n};\n","<template>\n <div v-bento-keyboard-navigation-directive v-on=\"listboxListeners\">\n <bento-listbox-single-select-option\n v-for=\"option in items\"\n :key=\"option.value\"\n ref=\"listboxItemRef\"\n role=\"option\"\n :option=\"option\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :selected=\"option.value === selectedValue\"\n v-on=\"listboxOptionListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select-option>\n </div>\n</template>\n<script lang=\"ts\">\n import { defineComponent, PropType, ref, toRef } from 'vue';\n import { BentoListboxSingleSelectOption } from '../listbox-single-select-option';\n import { useListboxKeyboardNavigation } from '../../composables/useListboxKeyboardNavigation';\n import {\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n } from '@/types';\n import { BentoKeyboardNavigationDirective } from '@/directives';\n\n /**\n * Listbox single-select options list\n *\n * @example\n * import { BentoListboxMultiSelect } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoListboxMultiSelect },\n * template: `\n * <bento-listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-listbox-single-select',\n components: {\n BentoListboxSingleSelectOption,\n },\n directives: { BentoKeyboardNavigationDirective },\n inheritAttrs: false,\n props: {\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: () => false,\n },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\n * @property {string} value.label - Text to be displayed in the option\n * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected\n */\n selectedValue: {\n type: [String, Number] as PropType<BentoListboxSelectedValue>,\n default: undefined,\n },\n },\n emits: [BentoListboxEvent.SELECT, BentoListboxEvent.ENTER, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit, slots }) {\n const listboxItemRef = ref([]);\n\n const onOptionSelected = eventName => (selectedValue: BentoListboxSelectedValue) => {\n emit(eventName, selectedValue);\n };\n\n const focusItem = (nextFocusedItemIndex: number) => listboxItemRef.value[nextFocusedItemIndex].$el.focus();\n\n // Keyboard navigation\n const { moveToNextElement, moveToPreviousElement, moveToFirstElement, moveToLastElement } =\n useListboxKeyboardNavigation(\n {\n items: toRef(props, 'items'),\n isOptionDisabled: props.isOptionDisabled,\n },\n focusItem\n );\n\n const listboxListeners = {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: moveToPreviousElement,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: moveToNextElement,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: moveToFirstElement,\n [BentoKeyboardNavigationKeyDownEvent.END]: moveToLastElement,\n };\n\n const listboxOptionListeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected(BentoListboxEvent.SELECT),\n [BentoListboxEvent.SPACE]: onOptionSelected(BentoListboxEvent.SPACE),\n [BentoListboxEvent.TAB]: onOptionSelected(BentoListboxEvent.TAB),\n [BentoListboxEvent.ENTER]: onOptionSelected(BentoListboxEvent.ENTER),\n };\n\n return {\n // Enums\n BentoListboxEvent,\n\n // Values\n listboxItemRef,\n slots,\n\n // Methods\n onOptionSelected,\n\n // Keyboard navigation\n listboxListeners,\n listboxOptionListeners,\n };\n },\n });\n</script>\n","export enum ListboxMultiSelectCategoryClass {\n DISABLED = 'disabled',\n}\n\nexport enum ListboxMultiSelectCategoryEvent {\n SELECT_CATEGORY = 'select-category',\n UNSELECT_CATEGORY = 'unselect-category',\n}\n","<template>\n <div>\n <bento-listbox-option class=\"b-listbox-multi-select-category__option\" :class=\"conditionalClass\">\n <bento-checkbox\n :model-value=\"isAllSelected\"\n :indeterminate=\"isIndeterminate\"\n :disabled=\"hasAllPropsDisabled\"\n :aria-label=\"category.label\"\n :value=\"category.value\"\n @update:model-value=\"toggleSelectAll\"\n />\n <span class=\"b-listbox-multi-select-category__label\">\n <bento-typography el=\"span\" class=\"b-listbox-multi-select-category__label-text\">\n {{ category.label }}\n </bento-typography>\n <div\n class=\"b-listbox-multi-select-category__label-chevron\"\n data-testid=\"toggle-listbox\"\n @click.capture=\"toggleOpen\"\n >\n <chevron-up-icon v-if=\"isOpen\" :svg-title=\"chevronTitle\" />\n <chevron-down-icon v-else :svg-title=\"chevronTitle\" />\n </div>\n </span>\n </bento-listbox-option>\n\n <div v-show=\"isOpen\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoCheckbox } from '@/components/checkbox';\n import { BentoTypography } from '@/components/typography';\n import { BentoListboxOption } from '../../../../../listbox-option';\n import {\n BentoListboxIsOptionDisabled,\n BentoListboxMultiSelectValue,\n BentoListboxOptionItem,\n BentoListboxValue,\n } from '@/types';\n import { useCheckboxSelectAll } from '@/composables';\n import {\n ListboxMultiSelectCategoryClass,\n ListboxMultiSelectCategoryEvent,\n } from './listbox-multi-select-category.types';\n import { useI18n } from '@/utils/ts/i18n';\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 import messages from './messages.json';\n\n /**\n * Listbox multi-select category list.\n * Allows the rendering of nested lists\n *\n * @example\n * import { ListboxMultiSelectCategory } from '@/internal/listbox';\n *\n * export default {\n * components: { BentoListboxMultiSelectCategory },\n * template: `\n * <listbox-multi-select-category\n * :category=\"option\"\n * :is-option-disabled=\"true\"\n * :selected-items-list=\"['option-1']\"\n * @select-category=\"$emit('select-category', option)\"\n * @unselect-category=\"$emit('unselect-category', option)\"\n * >\n * <listbox-multi-select-options\n * category-items\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :is-multi-level=\"true\"\n * :selected-items-list=\"['option-']\"\n * :searching=\"false\"\n * @toggle-checkbox-selection=\"value => toggleCheckboxSelection(value)\"\n * />\n * </listbox-multi-select-category>\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-listbox-multi-select-category',\n components: {\n BentoCheckbox,\n BentoTypography,\n BentoListboxOption,\n ChevronDownIcon,\n ChevronUpIcon,\n },\n props: {\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\n * @property {string} value.label - Text to be displayed in the option\n * @property {string,number} value.value - Value of the option\n * @property {BentoListboxOptionItem} value.items - Category items list\n */\n category: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: [Function] as PropType<BentoListboxIsOptionDisabled>,\n default: () => false,\n },\n\n /**\n * The `input` value.\n * Providing an empty array will select no options.\n */\n selectedItemsList: {\n type: Array as PropType<BentoListboxValue[]>,\n default: () => [],\n },\n },\n emits: [ListboxMultiSelectCategoryEvent.SELECT_CATEGORY, ListboxMultiSelectCategoryEvent.UNSELECT_CATEGORY],\n setup(props, { emit }) {\n const isOpen = ref(false);\n const { t } = useI18n();\n\n // This method should be used to determine if an option is disabled as it works for both vue 2 & 3.\n const vue2Vue3FixedisOptionDisabled = option =>\n props.isOptionDisabled ? props.isOptionDisabled(option) : false;\n\n const hasAllPropsDisabled = computed(() =>\n props.category.items.every(option => vue2Vue3FixedisOptionDisabled(option))\n );\n\n const conditionalClass = computed(() => ({\n [`b-listbox-multi-select-category--${ListboxMultiSelectCategoryClass.DISABLED}`]:\n hasAllPropsDisabled.value,\n }));\n\n const toggleOpen = (event: Event) => {\n event.preventDefault();\n isOpen.value = !isOpen.value;\n };\n\n const optionStates = (option: BentoListboxOptionItem) => {\n const isDisabled = vue2Vue3FixedisOptionDisabled(option);\n const isPreSelected =\n (props.selectedItemsList as BentoListboxMultiSelectValue)?.includes(option.value) || false;\n return { isDisabled, isPreSelected };\n };\n\n const enabledItems = computed(() =>\n props.category.items.filter(option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n })\n );\n\n const visibleSelectedList = computed(\n () =>\n enabledItems.value?.filter(({ value }) =>\n props.selectedItemsList?.includes(value)\n ) as unknown as BentoListboxMultiSelectValue\n );\n\n const chevronTitle = computed(() => {\n const messageName = isOpen.value ? 'categoryOpened' : 'categoryClosed';\n return t(messageName, { category: props.category.label }) as string;\n });\n\n const selectAll = () => {\n emit(ListboxMultiSelectCategoryEvent.SELECT_CATEGORY);\n };\n const unselectAll = () => {\n emit(ListboxMultiSelectCategoryEvent.UNSELECT_CATEGORY);\n };\n\n const { isAllSelected, isIndeterminate, toggleSelectAll } = useCheckboxSelectAll(\n visibleSelectedList,\n enabledItems,\n selectAll,\n unselectAll\n );\n\n return {\n // Values\n chevronTitle,\n conditionalClass,\n hasAllPropsDisabled,\n isOpen,\n isAllSelected,\n isIndeterminate,\n\n // Methods\n toggleOpen,\n toggleSelectAll,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select-category.scss\" />\n","export enum ListboxMultiSelectOptionsEvent {\n SELECT_CATEGORY = 'select-category',\n TOGGLE_CHECKBOX_SELECTION = 'toggle-checkbox-selection',\n UNSELECT_CATEGORY = 'unselect-category',\n}\n","<template>\n <div>\n <div v-for=\"option in items\" :key=\"`selected-${option.value}`\">\n <template v-if=\"searching && isMultiLevel\">\n <bento-listbox-option\n class=\"b-listbox-multi-select-options\"\n :class=\"conditionalClasses\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n >\n <bento-checkbox\n :model-value=\"isOptionSelected(option)\"\n :aria-label=\"option.label\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :value=\"option.value\"\n @update:model-value=\"value => selectSearch(value, option)\"\n />\n <slot v-bind=\"option\">\n <span class=\"b-listbox-multi-select__option-text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"shouldShowDescription(option)\"\n class=\"b-listbox-multi-select__option-description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n </bento-listbox-option>\n </template>\n\n <template v-else>\n <!-- Category -->\n <template v-if=\"option.items\">\n <listbox-multi-select-category\n :category=\"option\"\n :is-option-disabled=\"isOptionDisabled\"\n :selected-items-list=\"selectedItemsList\"\n @select-category=\"$emit(ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, option)\"\n @unselect-category=\"$emit(ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, option)\"\n >\n <listbox-multi-select-options\n category-items\n :items=\"option.items\"\n :is-option-disabled=\"isOptionDisabled\"\n :is-multi-level=\"isMultiLevel\"\n :selected-items-list=\"selectedItemsList\"\n :searching=\"searching\"\n @toggle-checkbox-selection=\"value => toggleCheckboxSelection(value)\"\n />\n </listbox-multi-select-category>\n </template>\n\n <!-- Option -->\n <bento-listbox-option\n v-else\n class=\"b-listbox-multi-select-options\"\n :class=\"conditionalClasses\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n >\n <bento-checkbox\n :model-value=\"selectedItemsList\"\n :aria-label=\"option.label\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :value=\"option.value\"\n @update:model-value=\"toggleCheckboxSelection(option.value)\"\n />\n <slot v-bind=\"option\">\n <span class=\"b-listbox-multi-select__option-text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"shouldShowDescription(option)\"\n class=\"b-listbox-multi-select__option-description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n </bento-listbox-option>\n </template>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoCheckbox } from '@/components/checkbox';\n import { BentoListboxOption } from '../../../listbox-option';\n import { BentoTypography } from '@/components/typography';\n import { ListboxMultiSelectCategory } from './components/listbox-multi-select-category';\n import {\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxOptionItem,\n BentoListboxOptions,\n BentoListboxValue,\n } from '@/types';\n import { ListboxMultiSelectOptionsEvent } from './listbox-multi-select-options.types';\n\n /**\n * Listbox multi-select options list\n *\n * @example\n * import { ListboxMultiSelectOptions } from './components/listbox-multi-select-options';\n *\n * export default {\n * components: { ListboxMultiSelect },\n * template: `\n * <listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'listbox-multi-select-options',\n components: {\n BentoCheckbox,\n BentoListboxOption,\n BentoTypography,\n ListboxMultiSelectCategory,\n },\n props: {\n /**\n * Indicates if the items listed are inside a category\n * so they can be padded to right by one level in recursion.\n * Items of categories are automatically defined as \"categoryItems\"\n */\n categoryItems: { type: Boolean, default: false },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: () => false,\n },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\n * @property {string} value.label - Text to be displayed in the option\n * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * Indicates if the elements options are inside a multi-level category\n */\n isMultiLevel: { type: Boolean, default: false },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: { type: Boolean, default: false },\n\n /**\n * List of selected items.\n * Providing an empty array will select no options.\n */\n selectedItemsList: {\n type: Array as PropType<BentoListboxValue[]>,\n default: () => [],\n },\n },\n emits: [\n ListboxMultiSelectOptionsEvent.TOGGLE_CHECKBOX_SELECTION,\n ListboxMultiSelectOptionsEvent.SELECT_CATEGORY,\n ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY,\n ],\n setup(props, { emit }) {\n const toggleCheckboxSelection = (value: BentoListboxValue) => {\n emit(ListboxMultiSelectOptionsEvent.TOGGLE_CHECKBOX_SELECTION, value);\n };\n\n const isCategory = (option: BentoListboxOptionItem) => !!option.items;\n const shouldShowDescription = (option: BentoListboxOptionItem) => {\n const isSearchingMultiLevel = props.isMultiLevel && props.searching;\n\n return option.description && (!props.isMultiLevel || isSearchingMultiLevel);\n };\n\n const isOptionSelected = option => {\n if (option.items) {\n return !!option.items.find(item => props.selectedItemsList.includes(item.value));\n }\n return props.selectedItemsList.includes(option.value);\n };\n\n // eslint-disable-next-line consistent-return\n const selectSearch = (selectedValue, option) => {\n if (isCategory(option)) {\n return selectedValue\n ? emit(ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, option)\n : emit(ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, option);\n }\n\n toggleCheckboxSelection(option.value);\n };\n\n const conditionalClasses = computed(() => ({\n 'b-listbox-multi-select-options__category-option': props.categoryItems,\n }));\n\n return {\n // Values\n conditionalClasses,\n\n // Methods\n isCategory,\n isOptionSelected,\n shouldShowDescription,\n toggleCheckboxSelection,\n selectSearch,\n\n // Enums\n BentoListboxEvent,\n ListboxMultiSelectOptionsEvent,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select-options.scss\" />\n","<template>\n <div v-bento-keyboard-navigation-directive class=\"b-listbox-multi-select\" v-on=\"listboxListeners\">\n <!-- Select all -->\n <bento-listbox-option ref=\"selectAllListboxItemsRef\" class=\"b-listbox-multi-select__option\">\n <bento-checkbox\n :aria-label=\"selectAllCheckboxText\"\n :model-value=\"isAllSelected\"\n :indeterminate=\"isIndeterminate\"\n @update:model-value=\"toggleSelectAll\"\n />\n <bento-typography el=\"span\">\n {{ selectAllCheckboxText }}\n </bento-typography>\n </bento-listbox-option>\n\n <!-- Selected options -->\n <div v-if=\"isAnOptionSelected\">\n <hr class=\"b-listbox-multi-select__divider\" />\n\n <listbox-multi-select-options\n ref=\"selectedListboxItemsRef\"\n :items=\"selectedOptions\"\n :is-option-disabled=\"isOptionDisabled\"\n :is-multi-level=\"isMultiLevelSelect\"\n :searching=\"searching\"\n :selected-items-list=\"selectedItemsList\"\n @select-category=\"selectAllCategory\"\n @unselect-category=\"unselectAllCategory\"\n @toggle-checkbox-selection=\"toggleCheckboxSelection(BentoListboxEvent.SELECT, $event)\"\n @[BentoListboxEvent.SPACE]=\"toggleCheckboxSelection(BentoListboxEvent.SPACE, $event)\"\n @[BentoListboxEvent.TAB]=\"toggleCheckboxSelection(BentoListboxEvent.TAB, $event)\"\n @[BentoListboxEvent.ENTER]=\"toggleCheckboxSelection(BentoListboxEvent.ENTER, $event)\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </listbox-multi-select-options>\n </div>\n\n <!-- Available options -->\n <div v-show=\"!isAllItemsIncludingDisabled\">\n <hr class=\"b-listbox-multi-select__divider\" />\n\n <listbox-multi-select-options\n ref=\"listboxItemsRef\"\n :items=\"items\"\n :is-option-disabled=\"isOptionDisabled\"\n :is-multi-level=\"isMultiLevelSelect\"\n :searching=\"searching\"\n :selected-items-list=\"selectedItemsList\"\n @toggle-checkbox-selection=\"toggleCheckboxSelection(BentoListboxEvent.SELECT, $event)\"\n @select-category=\"selectAllCategory\"\n @unselect-category=\"unselectAllCategory\"\n @[BentoListboxEvent.SPACE]=\"toggleCheckboxSelection(BentoListboxEvent.SPACE, $event)\"\n @[BentoListboxEvent.TAB]=\"toggleCheckboxSelection(BentoListboxEvent.TAB, $event)\"\n @[BentoListboxEvent.ENTER]=\"toggleCheckboxSelection(BentoListboxEvent.ENTER, $event)\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </listbox-multi-select-options>\n </div>\n </div>\n</template>\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, watch } from 'vue';\n import { BentoCheckbox } from '@/components/checkbox';\n import { BentoListboxOption } from '../listbox-option';\n import { BentoTypography } from '@/components/typography';\n import { useCheckboxSelectAll } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import {\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxMultiSelectValue,\n BentoListboxOptionItem,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n BentoListboxValue,\n } from '@/types';\n import { BentoKeyboardNavigationDirective } from '@/directives';\n import { ListboxMultiSelectOptions } from './components/listbox-multi-select-options';\n\n import messages from './messages.json';\n import { useListboxKeyboardNavigation } from '../../composables/useListboxKeyboardNavigation';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Listbox multi-select options list\n *\n * @example\n * import { BentoListboxMultiSelect } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoListboxMultiSelect },\n * template: `\n * <bento-listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-listbox-multi-select',\n components: {\n BentoCheckbox,\n BentoListboxOption,\n BentoTypography,\n ListboxMultiSelectOptions,\n },\n directives: { BentoKeyboardNavigationDirective },\n props: {\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: () => false,\n },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\n * @property {string} value.label - Text to be displayed in the option\n * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: { type: Boolean, default: false },\n\n /**\n * The `input` value.\n * Providing an empty array will select no options.\n */\n selectedValues: {\n type: Array as PropType<BentoListboxSelectedValue>,\n default: () => [] as BentoListboxSelectedValue,\n },\n },\n emits: [BentoListboxEvent.SELECT],\n setup(props, { emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const selectAllListboxItemsRef = ref(null);\n const selectedListboxItemsRef = ref(null);\n const listboxItemsRef = ref(null);\n\n const selectedItemsList = ref();\n watch(\n () => props.selectedValues,\n () => {\n selectedItemsList.value = ([...((props.selectedValues as Array<unknown>) ?? [])] ||\n []) as BentoListboxMultiSelectValue;\n },\n {\n immediate: true,\n }\n );\n\n const isMultiLevelSelect = computed(() => !!props.items.find(({ items }) => !!items));\n\n const flattenedItemsList = computed(() => {\n if (isMultiLevelSelect.value) {\n return props.items.reduce((acc, val) => {\n if (val.items) {\n acc.push(...val.items.flat());\n } else {\n acc.push(val);\n }\n return acc;\n }, []);\n }\n\n return props.items;\n });\n\n const optionStates = (option: BentoListboxOptionItem) => {\n const isDisabled = props.isOptionDisabled(option);\n const isPreSelected =\n (selectedItemsList.value as BentoListboxMultiSelectValue)?.includes(option.value) || false;\n return { isDisabled, isPreSelected };\n };\n\n // Items that are not disabled and pre-selected disabled items\n const enabledItems = computed(() =>\n props.searching && isMultiLevelSelect\n ? props.items\n : flattenedItemsList.value.filter(option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n })\n );\n\n const visibleSelectedList = computed(\n () =>\n enabledItems.value?.filter(option => {\n if (option.items && isMultiLevelSelect.value && props.searching) {\n const amountOfSelectedCategoryOptions = option.items.filter(categoryOption =>\n ((props.selectedValues as Array<BentoListboxSelectedValue>) ?? []).includes(\n categoryOption.value\n )\n ).length;\n return amountOfSelectedCategoryOptions === option.items.length;\n }\n\n return selectedItemsList.value?.includes(option.value); // Check for category\n }) as BentoListboxMultiSelectValue\n );\n\n const calculateTotalItems = () => {\n if (isMultiLevelSelect.value && !props.searching) {\n return enabledItems.value.length;\n }\n\n return props.items.length;\n };\n\n const selectAllCheckboxText = computed(() => {\n const total = calculateTotalItems();\n const amountSelectedValues = visibleSelectedList.value?.length || 0;\n\n if (amountSelectedValues === 0) {\n return t('selectAll', { total });\n }\n\n return amountSelectedValues === total\n ? t('allSelected', { total })\n : t('numberOfTotalSelected', { number: amountSelectedValues, total });\n });\n\n const selectAll = (selectableItems: BentoListboxOptions) => {\n const filterOutDisabledAndNotPreselectedOptions = option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n };\n\n // Adding or removing this list of values\n const addOrRemoveList = selectableItems\n .filter(filterOutDisabledAndNotPreselectedOptions)\n .filter(item => !selectedItemsList.value.includes(item.value)) // MAKE SURE NOT TO ADD DUPLICATES\n .map(({ value }) => value);\n\n selectedItemsList.value = [...selectedItemsList.value, ...addOrRemoveList];\n emit(BentoListboxEvent.SELECT, selectedItemsList.value);\n };\n\n const unselectAll = (selectableItems: BentoListboxOptions) => {\n const findEnabledUnselectedItems = option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return !(isDisabled && isPreSelected);\n };\n\n const unselectedItemsList = selectableItems\n .filter(findEnabledUnselectedItems)\n .map(({ value }) => value);\n selectedItemsList.value = selectedItemsList.value.filter(item => !unselectedItemsList?.includes(item));\n emit(BentoListboxEvent.SELECT, selectedItemsList.value);\n };\n\n const selectAllItems = () => {\n selectAll(flattenedItemsList.value);\n };\n\n const unselectAllItems = () => {\n unselectAll(flattenedItemsList.value);\n };\n\n const { isAllSelected, isIndeterminate, toggleSelectAll } = useCheckboxSelectAll(\n visibleSelectedList,\n enabledItems,\n selectAllItems,\n unselectAllItems\n );\n\n const selectAllCategory = (category: BentoListboxOptionItem) => {\n selectAll(category.items);\n };\n\n const unselectAllCategory = (category: BentoListboxOptionItem) => {\n unselectAll(category.items);\n };\n\n const toggleCheckboxSelection = (eventName, value: BentoListboxValue) => {\n let exists = false;\n selectedItemsList.value = selectedItemsList.value.filter(option => {\n if (value === option) {\n exists = true;\n return false;\n }\n\n return true;\n });\n\n if (!exists) {\n selectedItemsList.value.push(value);\n }\n emit(eventName, selectedItemsList.value);\n };\n\n const selectedOptions = computed(() => {\n const isOptionSelected = option =>\n (selectedItemsList.value as unknown as Array<string | number>).includes(option.value);\n const categoryOptionsSelected = categoryOptions =>\n !!categoryOptions.find(option => isOptionSelected(option));\n\n const options = props.items.filter(option => {\n // Check selected categories category\n if (option.items && categoryOptionsSelected(option.items)) {\n return true;\n }\n\n return isOptionSelected(option);\n });\n return options;\n });\n\n const isAnOptionSelected = computed(() => selectedOptions.value?.length > 0);\n\n const isAllItemsIncludingDisabled = computed(\n () => visibleSelectedList.value?.length === flattenedItemsList.value?.length\n );\n\n const computedSelectAllListboxItemsRefs = computed(() =>\n selectAllListboxItemsRef.value ? [selectAllListboxItemsRef.value] : []\n );\n\n // Keyboard navigation\n const computedselectedListboxItemsRefs = computed(() =>\n selectedListboxItemsRef.value?.$children?.length ? selectedListboxItemsRef.value.$children : []\n );\n\n const computedlistboxItems = computed(() =>\n listboxItemsRef.value?.$children?.length ? listboxItemsRef.value.$children : []\n );\n\n const computedselectAllItemRefs = computed(() => ({ label: selectAllCheckboxText, value: isAllSelected }));\n\n const computedItems = computed(() => [\n computedselectAllItemRefs,\n ...selectedOptions.value,\n ...flattenedItemsList.value,\n ]);\n\n const focusItem = (nextFocusedItemIndex: number) => {\n const multiSelectListboxItems = [\n ...computedSelectAllListboxItemsRefs.value,\n ...computedselectedListboxItemsRefs.value,\n ...computedlistboxItems.value,\n ];\n multiSelectListboxItems[nextFocusedItemIndex].$el.focus();\n };\n\n const { moveToNextElement, moveToPreviousElement, moveToFirstElement, moveToLastElement } =\n useListboxKeyboardNavigation(\n {\n items: ref(computedItems),\n isOptionDisabled: props.isOptionDisabled,\n },\n focusItem\n );\n\n const listboxListeners = {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: moveToPreviousElement,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: moveToNextElement,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: moveToFirstElement,\n [BentoKeyboardNavigationKeyDownEvent.END]: moveToLastElement,\n };\n\n return {\n // Refs\n selectAllListboxItemsRef,\n selectedListboxItemsRef,\n listboxItemsRef,\n\n // Values\n isAllSelected,\n isAllItemsIncludingDisabled,\n isAnOptionSelected,\n isIndeterminate,\n isMultiLevelSelect,\n flattenedItemsList,\n selectedItemsList,\n selectAllCheckboxText,\n selectedOptions,\n slots,\n\n // Enums\n BentoListboxEvent,\n\n // Methods\n selectAllCategory,\n toggleCheckboxSelection,\n toggleSelectAll,\n unselectAllCategory,\n\n // Events\n listboxListeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select.scss\" />\n","<template>\n <div\n :id=\"id\"\n ref=\"listboxRef\"\n v-bento-keyboard-navigation-directive\n class=\"b-listbox\"\n role=\"listbox\"\n tabindex=\"-1\"\n :aria-busy=\"ariaBusy\"\n :aria-atomic=\"ariaAtomic\"\n :aria-label=\"ariaLabel\"\n :aria-live=\"ariaLive\"\n @scroll=\"() => (hasAutomaticLazyLoader ? emitShowMoreOnScrollEnd() : undefined)\"\n >\n <!-- Empty search message -->\n <div v-if=\"isSearchResultEmpty\" class=\"b-listbox__empty-search-message\">\n <bento-typography el=\"span\">{{ noResultsMessage }}</bento-typography>\n </div>\n\n <template v-else>\n <!-- Multi select -->\n <template v-if=\"multiple\">\n <bento-listbox-multi-select\n ref=\"listboxItemRef\"\n :items=\"items\"\n :selected-values=\"selectedValue\"\n :searching=\"searching\"\n :is-option-disabled=\"isOptionDisabled\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-multi-select>\n </template>\n\n <!-- Single select -->\n <template v-else>\n <bento-listbox-single-select\n ref=\"listboxItemRef\"\n :items=\"items\"\n :selected-value=\"selectedValue\"\n :is-option-disabled=\"isOptionDisabled\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select>\n </template>\n <div v-if=\"shouldDisplayShowMoreButton\" class=\"b-listbox__lazy-load\">\n <bento-loading-button :state=\"loadingButtonState\" variant=\"secondary\" @click.capture=\"emitShowMore\">\n {{ showMoreButtonText }}\n </bento-loading-button>\n </div>\n <div v-else-if=\"loading\" class=\"b-listbox__lazy-load\">\n <bento-loading-indicator />\n </div>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import {\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxLazyLoadType,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n } from '@/types';\n import { BentoKeyboardNavigationDirective } from '@/directives';\n import { BentoListboxSingleSelect } from './components/listbox-single-select';\n import { BentoListboxMultiSelect } from './components/listbox-multi-select';\n import { BentoTypography } from '@/components/typography';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import { BentoLoadingButton, BentoLoadingButtonState } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import { debounce } from '@/utils/ts/debounce';\n import type { HTMLAttributes } from 'vue/types/jsx';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Listbox container.\n * It lists all the available options.\n *\n * @example\n * <bento-listbox\n * v-slot=\"{label, value}\"\n * :id=\"listboxOptionsContainerId\"\n * :aria-label=\"ariaLabel\"\n * :disabled=\"disabled\"\n * :multiple=\"multiple\"\n * :selected=\"value\"\n * :isOptionDisabled=\"option => option.value === 2\"\n * :items=\"[{\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * }]\"\n * @select=\"onOptionSelected\"\n * >\n * </bento-listbox>\n */\n export default defineComponent({\n name: 'bento-listbox',\n components: {\n BentoListboxSingleSelect,\n BentoListboxMultiSelect,\n BentoTypography,\n BentoLoadingIndicator,\n BentoLoadingButton,\n },\n directives: { BentoKeyboardNavigationDirective },\n i18n: { messages },\n props: {\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.\n */\n id: { type: String, required: true },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Listbox option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: () => undefined,\n },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * Indicates if new options are loading.\n */\n loading: { type: Boolean, default: false },\n\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType: {\n type: String as PropType<BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`>,\n default: BentoListboxLazyLoadType.NONE,\n validator: (value: BentoListboxLazyLoadType) => Object.values(BentoListboxLazyLoadType).includes(value),\n },\n\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Messaged displayed when no items are listed in the listbox\n */\n noResultsMessage: { type: String, required: true },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: BentoListboxMultiSelect.props.searching,\n\n /**\n * The `input` value.\n * Providing an empty string or empty array will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected for single select\n */\n selectedValue: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: undefined,\n },\n },\n emits: [\n BentoListboxEvent.SELECT,\n BentoListboxEvent.SPACE,\n BentoListboxEvent.SHOW_MORE,\n BentoListboxEvent.ENTER,\n BentoListboxEvent.ESCAPE,\n BentoListboxEvent.TAB,\n ],\n setup(props, { emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const listboxRef = ref(null);\n const listboxItemRef = ref([]);\n const isLazyLoadListbox = computed(() => props.lazyLoadType !== BentoListboxLazyLoadType.AUTOMATIC);\n const hasAutomaticLazyLoader = computed(() => props.lazyLoadType === BentoListboxLazyLoadType.AUTOMATIC);\n\n // Aria a11y\n const ariaAtomic = computed<HTMLAttributes['aria-atomic']>(() =>\n isLazyLoadListbox.value ? 'true' : undefined\n );\n const ariaBusy = computed<HTMLAttributes['aria-busy']>(() =>\n isLazyLoadListbox.value && props.loading ? 'true' : 'false'\n );\n const ariaLive = computed<HTMLAttributes['aria-live']>(() =>\n isLazyLoadListbox.value ? 'polite' : undefined\n );\n\n const onOptionSelected = eventName => (selectedValue: BentoListboxSelectedValue) => {\n emit(eventName, selectedValue);\n };\n\n const emitShowMore = () => {\n emit(BentoListboxEvent.SHOW_MORE);\n };\n\n const emitShowMoreOnScrollEnd = debounce(() => {\n const container = listboxRef.value;\n const isAtBottom = container.scrollTop + container.clientHeight >= container.scrollHeight;\n\n if (props.hasMoreItems && isAtBottom && !props.loading) {\n emitShowMore();\n }\n });\n\n const isSearchResultEmpty = computed(() => props.searching && props.items?.length === 0);\n\n const shouldDisplayShowMoreButton = computed(\n () => props.lazyLoadType === BentoListboxLazyLoadType.BUTTON && props.hasMoreItems\n );\n\n const loadingButtonState = computed(() =>\n props.loading ? BentoLoadingButtonState.LOADING : BentoLoadingButtonState.START\n );\n\n const showMoreButtonText = computed(() => (props.loading ? t('loading') : t('showMore')));\n\n const listboxListeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected(BentoListboxEvent.SELECT),\n [BentoListboxEvent.SPACE]: onOptionSelected(BentoListboxEvent.SPACE),\n [BentoListboxEvent.TAB]: onOptionSelected(BentoListboxEvent.TAB),\n [BentoListboxEvent.ENTER]: onOptionSelected(BentoListboxEvent.ENTER),\n };\n\n return {\n // Refs\n listboxRef,\n listboxItemRef,\n\n // a11y\n ariaAtomic,\n ariaBusy,\n ariaLive,\n\n // Values\n hasAutomaticLazyLoader,\n isSearchResultEmpty,\n loadingButtonState,\n slots,\n shouldDisplayShowMoreButton,\n showMoreButtonText,\n\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n\n // Methods\n onOptionSelected,\n emitShowMoreOnScrollEnd,\n emitShowMore,\n listboxListeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox.scss\" />\n"],"names":["useCheckboxSelectAll","selectedItemsList","items","selectAll","unselectAll","isAllSelected","computed","_a","_b","isIndeterminate","selectedValue","BentoListboxEvent","BentoListboxEvent2","BentoListboxLazyLoadType","BentoListboxLazyLoadType2","_sfc_main$7","defineComponent","props","emit","conditionalClasses","BentoKeyboardNavigationKeyDownEvent","e","eventName","uuid","_sfc_main$6","_sfc_main$5","BentoListboxOption","BentoTypography","CheckmarkIcon","onOptionSelected","ariaDisabled","ariaSelected","tabIndex","useListboxKeyboardNavigation","isOptionDisabled","focusItem","numberOfItems","focusedIndex","ref","onMounted","el","isItemDisabled","itemIndex","isItemEnabled","mutateFocusedIndex","direction","calculateFocusedIndex","edgeCaseItem","isItemBeforeEdgeCaseItem","callback","moveToNextElement","isIndexSecondToLastItemInArray","moveToPreviousElement","IsIndexSecondItemInArray","_sfc_main$4","BentoListboxSingleSelectOption","BentoKeyboardNavigationDirective","slots","listboxItemRef","nextFocusedItemIndex","moveToFirstElement","moveToLastElement","toRef","listboxListeners","listboxOptionListeners","ListboxMultiSelectCategoryClass","ListboxMultiSelectCategoryClass2","ListboxMultiSelectCategoryEvent","ListboxMultiSelectCategoryEvent2","_sfc_main$3","messages$2","BentoCheckbox","ChevronDownIcon","ChevronUpIcon","isOpen","t","useI18n","vue2Vue3FixedisOptionDisabled","option","hasAllPropsDisabled","conditionalClass","toggleOpen","event","optionStates","isDisabled","isPreSelected","enabledItems","visibleSelectedList","value","chevronTitle","messageName","toggleSelectAll","ListboxMultiSelectOptionsEvent","ListboxMultiSelectOptionsEvent2","_sfc_main$2","ListboxMultiSelectCategory","toggleCheckboxSelection","isCategory","shouldShowDescription","isSearchingMultiLevel","isOptionSelected","item","selectSearch","_sfc_main$1","messages$1","ListboxMultiSelectOptions","selectAllListboxItemsRef","selectedListboxItemsRef","listboxItemsRef","watch","isMultiLevelSelect","flattenedItemsList","acc","val","categoryOption","calculateTotalItems","selectAllCheckboxText","total","amountSelectedValues","selectableItems","filterOutDisabledAndNotPreselectedOptions","addOrRemoveList","findEnabledUnselectedItems","unselectedItemsList","selectAllItems","unselectAllItems","selectAllCategory","category","unselectAllCategory","exists","selectedOptions","categoryOptionsSelected","categoryOptions","isAnOptionSelected","isAllItemsIncludingDisabled","computedSelectAllListboxItemsRefs","computedselectedListboxItemsRefs","computedlistboxItems","computedselectAllItemRefs","computedItems","_sfc_main","BentoListboxSingleSelect","BentoListboxMultiSelect","BentoLoadingIndicator","BentoLoadingButton","messages","listboxRef","isLazyLoadListbox","hasAutomaticLazyLoader","ariaAtomic","ariaBusy","ariaLive","emitShowMore","emitShowMoreOnScrollEnd","debounce","container","isAtBottom","isSearchResultEmpty","shouldDisplayShowMoreButton","loadingButtonState","BentoLoadingButtonState","showMoreButtonText"],"mappings":";;;;;;;;;;;AA8CO,MAAAA,IAAA,CAAAC,GAAAC,GAAAC,GAAAC,MAAA;AAMH,QAAAC,IAAAC;AAAA,IAAsB,MAAA;;AAAA,cAAA,GAAAC,IAAAN,EAAA,UAAA,QAAAM,EAAA,aAAAC,IAAAP,EAAA,UAAA,gBAAAO,EAAA,YAAAN,EAAA,MAAA;AAAA;AAAA,EACyE,GAE/FO,IAAAH,EAAA,MAAA;;AAEI,WAAAL,EAAA,SAAA,QAAAA,EAAA,MAAA,WAAA,IACI,OAGJM,IAAAN,EAAA,UAAA,gBAAAM,EAAA,YAAAL,EAAA,MAAA;AAAA,EAAuD,CAAA;AAW3D,SAAA;AAAA,IAAO,eAAAG;AAAA,IACH,iBAAAI;AAAA,IACA,iBAVJ,CAAAC,MAAA;AACI,MAAAA,IACIP,EAAA,IAEAC,EAAA;AAAA,IACJ;AAAA,EAOA;AAER;AC3DY,IAAAO,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,YAAA,aACAA,EAAA,SAAA,kBACAA,EAAA,QAAA,SACAA,EAAA,QAAA,iBACAA,EAAA,QAAA,iBACAA,EAAA,MAAA,eACAA,EAAA,iBAAA,kBARQA,IAAAD,KAAA,CAAA,CAAA,GAcAE,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,OAAA,QAHQA,IAAAD,KAAA,CAAA,CAAA;ACFZ,MAAAE,KAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAIA,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;A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