@adyen/bento-vue3 1.24.0 → 1.26.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 (280) hide show
  1. package/dist/@types/packages/vue2/src/components/alert/alert.types.d.ts +3 -0
  2. package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +46 -54
  3. package/dist/@types/packages/vue2/src/components/card/card.vue.d.ts +86 -179
  4. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -1
  5. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +2 -2
  6. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.keys.d.ts +1 -0
  7. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.types.d.ts +8 -1
  8. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.vue.d.ts +7 -4
  9. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell-actions/data-grid-cell-actions.types.d.ts +10 -2
  10. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell-actions/data-grid-cell-actions.vue.d.ts +6 -2
  11. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.types.d.ts +3 -0
  12. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +8 -6
  13. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-calculate-column-width/use-calculate-column-width.d.ts +26 -11
  14. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-calculate-column-width/use-calculate-column-width.types.d.ts +1 -0
  15. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-column-hovering/use-column-hovering.d.ts +18 -6
  16. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-column-reorderer/use-column-reorderer.d.ts +36 -12
  17. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-config-settings/use-config-settings.d.ts +18 -6
  18. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-resizer.d.ts +18 -6
  19. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +19 -53
  20. package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +2 -2
  21. package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +2 -2
  22. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +1 -1
  23. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +1 -1
  24. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/composables/use-dropdown-options-listbox.d.ts +13 -7
  25. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +14 -14
  26. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +1 -1
  27. package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.d.ts +2 -2
  28. package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.types.d.ts +3 -24
  29. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +4 -4
  30. package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +1 -1
  31. package/dist/@types/packages/vue2/src/components/filter-bar/components/range-filter/index.d.ts +1 -0
  32. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/components/index.d.ts +2 -0
  33. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/components/select-filter-button/select-filter-button.vue.d.ts +148 -0
  34. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/components/select-filter-dropdown/select-filter-dropdown.vue.d.ts +150 -0
  35. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/select-filter.vue.d.ts +28 -27
  36. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +11 -7
  37. package/dist/@types/packages/vue2/src/components/internal/checkbox-input/checkbox-input.vue.d.ts +1 -1
  38. package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
  39. package/dist/@types/packages/vue2/src/components/internal/dialog-page/dialog-page.types.d.ts +1 -0
  40. package/dist/@types/packages/vue2/src/components/internal/field-label/field-label.vue.d.ts +1 -1
  41. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/listbox-multi-select-chips.vue.d.ts +3 -3
  42. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue.d.ts +1 -2
  43. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +45 -9
  44. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue.d.ts +10 -9
  45. package/dist/@types/packages/vue2/src/components/internal/listbox/composables/use-cached-selected-values/use-cached-selected-values.d.ts +2 -2
  46. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +15 -15
  47. package/dist/@types/packages/vue2/src/components/internal/radio-input/radio-input.vue.d.ts +1 -1
  48. package/dist/@types/packages/vue2/src/components/menu/components/menu-item-list/menu-item-list.vue.d.ts +3 -2
  49. package/dist/@types/packages/vue2/src/components/menu/components/menu-list-container/menu-list-container.vue.d.ts +8 -1
  50. package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +3 -1
  51. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +2 -2
  52. package/dist/@types/packages/vue2/src/components/selection-card/components/selection-card-group/selection-card-group.vue.d.ts +3 -3
  53. package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +2 -2
  54. package/dist/@types/packages/vue2/src/components/toggle/toggle.vue.d.ts +1 -1
  55. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue.d.ts +20 -0
  56. package/dist/@types/packages/vue2/src/components/tutorial/tutorial.types.d.ts +1 -0
  57. package/dist/@types/packages/vue2/src/components/tutorial/tutorial.vue.d.ts +22 -2
  58. package/dist/@types/packages/vue2/src/components/typography/index.d.ts +1 -1
  59. package/dist/@types/packages/vue2/src/components/typography/typography.vue.d.ts +1 -1
  60. package/dist/@types/packages/vue2/src/composables/use-click-outside/index.d.ts +1 -0
  61. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  62. package/dist/accordion.js +3 -3
  63. package/dist/action-bar.js +7 -7
  64. package/dist/alert.js +126 -166
  65. package/dist/alert.js.map +1 -1
  66. package/dist/assets/base-modal.css +1 -1
  67. package/dist/assets/dialog-page.css +1 -1
  68. package/dist/assets/dropdown.css +1 -1
  69. package/dist/assets/index.css +1 -1
  70. package/dist/assets/index10.css +1 -1
  71. package/dist/assets/index11.css +1 -1
  72. package/dist/assets/index12.css +1 -1
  73. package/dist/assets/index13.css +1 -1
  74. package/dist/assets/index14.css +1 -1
  75. package/dist/assets/index15.css +1 -1
  76. package/dist/assets/index16.css +1 -1
  77. package/dist/assets/index17.css +1 -1
  78. package/dist/assets/index18.css +1 -1
  79. package/dist/assets/index19.css +1 -1
  80. package/dist/assets/index2.css +1 -1
  81. package/dist/assets/index20.css +1 -1
  82. package/dist/assets/index21.css +1 -1
  83. package/dist/assets/index22.css +1 -1
  84. package/dist/assets/index23.css +1 -1
  85. package/dist/assets/index24.css +1 -1
  86. package/dist/assets/index25.css +1 -1
  87. package/dist/assets/index26.css +1 -1
  88. package/dist/assets/index27.css +1 -1
  89. package/dist/assets/index28.css +1 -1
  90. package/dist/assets/index29.css +1 -1
  91. package/dist/assets/index3.css +1 -1
  92. package/dist/assets/index30.css +1 -1
  93. package/dist/assets/index31.css +1 -1
  94. package/dist/assets/index32.css +1 -1
  95. package/dist/assets/index33.css +1 -1
  96. package/dist/assets/index34.css +1 -1
  97. package/dist/assets/index35.css +1 -1
  98. package/dist/assets/index36.css +1 -1
  99. package/dist/assets/index37.css +1 -1
  100. package/dist/assets/index38.css +1 -1
  101. package/dist/assets/index39.css +1 -1
  102. package/dist/assets/index4.css +1 -1
  103. package/dist/assets/index40.css +1 -1
  104. package/dist/assets/index41.css +1 -1
  105. package/dist/assets/index42.css +1 -1
  106. package/dist/assets/index43.css +1 -1
  107. package/dist/assets/index44.css +1 -1
  108. package/dist/assets/index45.css +1 -1
  109. package/dist/assets/index46.css +1 -1
  110. package/dist/assets/index47.css +1 -1
  111. package/dist/assets/index48.css +1 -1
  112. package/dist/assets/index5.css +1 -1
  113. package/dist/assets/index6.css +1 -1
  114. package/dist/assets/index7.css +1 -1
  115. package/dist/assets/index8.css +1 -1
  116. package/dist/assets/index9.css +1 -1
  117. package/dist/assets/{listbox.css → use-cached-selected-values.css} +1 -1
  118. package/dist/avatar-image.js +1 -1
  119. package/dist/badge.js +1 -1
  120. package/dist/button.js +5 -5
  121. package/dist/card.js +168 -267
  122. package/dist/card.js.map +1 -1
  123. package/dist/checkbox.js +6 -6
  124. package/dist/chunks/{base-button.ab9c947e.js → base-button.e84acf30.js} +2 -2
  125. package/dist/chunks/{base-button.ab9c947e.js.map → base-button.e84acf30.js.map} +1 -1
  126. package/dist/chunks/{base-modal.28b5ff83.js → base-modal.29e062d0.js} +7 -7
  127. package/dist/chunks/{base-modal.28b5ff83.js.map → base-modal.29e062d0.js.map} +1 -1
  128. package/dist/chunks/{button-actions-with-menu.305991e5.js → button-actions-with-menu.7fce47a2.js} +4 -4
  129. package/dist/chunks/{button-actions-with-menu.305991e5.js.map → button-actions-with-menu.7fce47a2.js.map} +1 -1
  130. package/dist/chunks/{button-actions.ea025810.js → button-actions.642b37de.js} +3 -3
  131. package/dist/chunks/{button-actions.ea025810.js.map → button-actions.642b37de.js.map} +1 -1
  132. package/dist/chunks/{button.ce5d1f5e.js → button.60dad578.js} +3 -3
  133. package/dist/chunks/{button.ce5d1f5e.js.map → button.60dad578.js.map} +1 -1
  134. package/dist/chunks/{calendar.24a492f1.js → calendar.f38cdab9.js} +5 -5
  135. package/dist/chunks/{calendar.24a492f1.js.map → calendar.f38cdab9.js.map} +1 -1
  136. package/dist/chunks/{checkbox-input.99336948.js → checkbox-input.ab758a81.js} +2 -2
  137. package/dist/chunks/{checkbox-input.99336948.js.map → checkbox-input.ab758a81.js.map} +1 -1
  138. package/dist/chunks/{checkbox.d0f897e0.js → checkbox.f55ee3a5.js} +4 -4
  139. package/dist/chunks/{checkbox.d0f897e0.js.map → checkbox.f55ee3a5.js.map} +1 -1
  140. package/dist/chunks/{checkmark-circle-fill.c45a999d.js → checkmark-circle-fill.f3a69c6a.js} +2 -2
  141. package/dist/chunks/{checkmark-circle-fill.c45a999d.js.map → checkmark-circle-fill.f3a69c6a.js.map} +1 -1
  142. package/dist/chunks/{checkmark-small.c79220d9.js → checkmark-small.d7e31e5e.js} +2 -2
  143. package/dist/chunks/{checkmark-small.c79220d9.js.map → checkmark-small.d7e31e5e.js.map} +1 -1
  144. package/dist/chunks/{checkmark.eb3c7a06.js → checkmark.87919b24.js} +2 -2
  145. package/dist/chunks/{checkmark.eb3c7a06.js.map → checkmark.87919b24.js.map} +1 -1
  146. package/dist/chunks/{chevron-left.4ee92950.js → chevron-left.963d35e9.js} +2 -2
  147. package/dist/chunks/{chevron-left.4ee92950.js.map → chevron-left.963d35e9.js.map} +1 -1
  148. package/dist/chunks/{chevron-up.638a9f34.js → chevron-up.05ca20db.js} +2 -2
  149. package/dist/chunks/{chevron-up.638a9f34.js.map → chevron-up.05ca20db.js.map} +1 -1
  150. package/dist/chunks/{controls-group.2b31233c.js → controls-group.9e0f17b2.js} +3 -3
  151. package/dist/chunks/{controls-group.2b31233c.js.map → controls-group.9e0f17b2.js.map} +1 -1
  152. package/dist/chunks/{copy.9003ed59.js → copy.852d4cb8.js} +4 -4
  153. package/dist/chunks/{copy.9003ed59.js.map → copy.852d4cb8.js.map} +1 -1
  154. package/dist/chunks/{cross-circle-fill.1abec1a2.js → cross-circle-fill.81925c7f.js} +2 -2
  155. package/dist/chunks/{cross-circle-fill.1abec1a2.js.map → cross-circle-fill.81925c7f.js.map} +1 -1
  156. package/dist/chunks/{cross-small.b85406fe.js → cross-small.9bc6a02f.js} +2 -2
  157. package/dist/chunks/{cross-small.b85406fe.js.map → cross-small.9bc6a02f.js.map} +1 -1
  158. package/dist/chunks/{cross.26509efc.js → cross.a60533f6.js} +2 -2
  159. package/dist/chunks/{cross.26509efc.js.map → cross.a60533f6.js.map} +1 -1
  160. package/dist/chunks/dialog-page.ea67bb14.js +173 -0
  161. package/dist/chunks/dialog-page.ea67bb14.js.map +1 -0
  162. package/dist/chunks/{dropdown-default-textbox.311443a8.js → dropdown-default-textbox.ad5063c2.js} +4 -4
  163. package/dist/chunks/{dropdown-default-textbox.311443a8.js.map → dropdown-default-textbox.ad5063c2.js.map} +1 -1
  164. package/dist/chunks/{dropdown.170b43c4.js → dropdown.d8587f36.js} +295 -317
  165. package/dist/chunks/dropdown.d8587f36.js.map +1 -0
  166. package/dist/chunks/{error-message.4678cbdc.js → error-message.3fb5573a.js} +3 -3
  167. package/dist/chunks/{error-message.4678cbdc.js.map → error-message.3fb5573a.js.map} +1 -1
  168. package/dist/chunks/{fixed-scroller.f09618f2.js → fixed-scroller.59aefd1b.js} +3 -3
  169. package/dist/chunks/{fixed-scroller.f09618f2.js.map → fixed-scroller.59aefd1b.js.map} +1 -1
  170. package/dist/chunks/{footer-actions.2efe610e.js → footer-actions.89e68269.js} +4 -4
  171. package/dist/chunks/{footer-actions.2efe610e.js.map → footer-actions.89e68269.js.map} +1 -1
  172. package/dist/chunks/{index.1b1646bf.js → index.030c1dd7.js} +212 -191
  173. package/dist/chunks/index.030c1dd7.js.map +1 -0
  174. package/dist/chunks/{index.70c91b3b.js → index.07122048.js} +2 -2
  175. package/dist/chunks/{index.70c91b3b.js.map → index.07122048.js.map} +1 -1
  176. package/dist/chunks/{index.c41d1bbb.js → index.146f967e.js} +2 -2
  177. package/dist/chunks/{index.c41d1bbb.js.map → index.146f967e.js.map} +1 -1
  178. package/dist/chunks/{index.920cc1ee.js → index.5bdebf9d.js} +7 -7
  179. package/dist/chunks/{index.920cc1ee.js.map → index.5bdebf9d.js.map} +1 -1
  180. package/dist/chunks/{index.b772214b.js → index.6e0e9d21.js} +3 -3
  181. package/dist/chunks/{index.b772214b.js.map → index.6e0e9d21.js.map} +1 -1
  182. package/dist/chunks/{index.44f2aca7.js → index.8be283d5.js} +2 -2
  183. package/dist/chunks/{index.44f2aca7.js.map → index.8be283d5.js.map} +1 -1
  184. package/dist/chunks/{index.0d513625.js → index.96cd0d4c.js} +9 -9
  185. package/dist/chunks/{index.0d513625.js.map → index.96cd0d4c.js.map} +1 -1
  186. package/dist/chunks/{index.b3cb905c.js → index.9bf04b01.js} +3 -3
  187. package/dist/chunks/{index.b3cb905c.js.map → index.9bf04b01.js.map} +1 -1
  188. package/dist/chunks/{index.51fe0fc2.js → index.a3d60e4f.js} +17 -17
  189. package/dist/chunks/index.a3d60e4f.js.map +1 -0
  190. package/dist/chunks/{index.c5b58864.js → index.ba3396d3.js} +3 -3
  191. package/dist/chunks/{index.c5b58864.js.map → index.ba3396d3.js.map} +1 -1
  192. package/dist/chunks/{index.6987f880.js → index.c8ffede1.js} +7 -7
  193. package/dist/chunks/{index.6987f880.js.map → index.c8ffede1.js.map} +1 -1
  194. package/dist/chunks/{info.550f9511.js → info.205b4496.js} +2 -2
  195. package/dist/chunks/{info.550f9511.js.map → info.205b4496.js.map} +1 -1
  196. package/dist/chunks/{listbox-option-tag.bf77e0c4.js → listbox-option-tag.b6182b2e.js} +3 -3
  197. package/dist/chunks/{listbox-option-tag.bf77e0c4.js.map → listbox-option-tag.b6182b2e.js.map} +1 -1
  198. package/dist/chunks/{loading-button.cdc193c6.js → loading-button.0391ad8b.js} +4 -4
  199. package/dist/chunks/{loading-button.cdc193c6.js.map → loading-button.0391ad8b.js.map} +1 -1
  200. package/dist/chunks/{payment-method.ea1788f7.js → payment-method.31a68b9b.js} +2 -2
  201. package/dist/chunks/{payment-method.ea1788f7.js.map → payment-method.31a68b9b.js.map} +1 -1
  202. package/dist/chunks/{refresh.bd60f6a8.js → refresh.53691839.js} +2 -2
  203. package/dist/chunks/{refresh.bd60f6a8.js.map → refresh.53691839.js.map} +1 -1
  204. package/dist/chunks/{search.ade93bda.js → search.4e4ee4dd.js} +2 -2
  205. package/dist/chunks/{search.ade93bda.js.map → search.4e4ee4dd.js.map} +1 -1
  206. package/dist/chunks/{tooltip.10210728.js → tooltip.1084d92b.js} +3 -3
  207. package/dist/chunks/{tooltip.10210728.js.map → tooltip.1084d92b.js.map} +1 -1
  208. package/dist/chunks/{use-bento-toast-controller.3275a505.js → use-bento-toast-controller.98d8613c.js} +2 -2
  209. package/dist/chunks/{use-bento-toast-controller.3275a505.js.map → use-bento-toast-controller.98d8613c.js.map} +1 -1
  210. package/dist/chunks/use-cached-selected-values.852aeafe.js +1537 -0
  211. package/dist/chunks/use-cached-selected-values.852aeafe.js.map +1 -0
  212. package/dist/code-snippet.js +7 -7
  213. package/dist/code-snippet.js.map +1 -1
  214. package/dist/country.js +2 -2
  215. package/dist/currency.js +1 -1
  216. package/dist/data-grid-template.js +1 -1
  217. package/dist/data-grid.js +1317 -1256
  218. package/dist/data-grid.js.map +1 -1
  219. package/dist/date-picker.js +8 -8
  220. package/dist/date-range-picker.js +2 -2
  221. package/dist/date.js +1 -1
  222. package/dist/divider.js +1 -1
  223. package/dist/dropdown.js +7 -7
  224. package/dist/empty-state.js +3 -3
  225. package/dist/filter-bar.js +1260 -1108
  226. package/dist/filter-bar.js.map +1 -1
  227. package/dist/focus-trap.js +1 -1
  228. package/dist/form-layout.js +53 -51
  229. package/dist/form-layout.js.map +1 -1
  230. package/dist/header.js +5 -5
  231. package/dist/index.js +141 -133
  232. package/dist/index.js.map +1 -1
  233. package/dist/info-icon.js +4 -4
  234. package/dist/input-field.js +50 -48
  235. package/dist/input-field.js.map +1 -1
  236. package/dist/internal.js +31 -78
  237. package/dist/internal.js.map +1 -1
  238. package/dist/link.js +1 -1
  239. package/dist/loading-indicator.js +1 -1
  240. package/dist/menu.js +1 -1
  241. package/dist/modal-fullscreen.js +7 -7
  242. package/dist/modal.js +6 -6
  243. package/dist/pagination.js +4 -4
  244. package/dist/payment-method.js +1 -1
  245. package/dist/popover.js +1 -1
  246. package/dist/popper-container.js +1 -1
  247. package/dist/radio-group.js +112 -112
  248. package/dist/radio-group.js.map +1 -1
  249. package/dist/search-bar.js +4 -4
  250. package/dist/secondary-nav.js +2 -2
  251. package/dist/segmented-control.js +4 -4
  252. package/dist/selection-card.js +5 -5
  253. package/dist/sidepanel.js +64 -62
  254. package/dist/sidepanel.js.map +1 -1
  255. package/dist/status.js +2 -2
  256. package/dist/stepper.js +4 -4
  257. package/dist/structured-list.js +1 -1
  258. package/dist/summary-grid.js +3 -3
  259. package/dist/tabs.js +22 -20
  260. package/dist/tabs.js.map +1 -1
  261. package/dist/tag.js +3 -3
  262. package/dist/textarea.js +4 -4
  263. package/dist/timeline.js +7 -7
  264. package/dist/toast.js +5 -5
  265. package/dist/toggle.js +3 -3
  266. package/dist/tutorial.js +145 -124
  267. package/dist/tutorial.js.map +1 -1
  268. package/dist/typography.js +1 -1
  269. package/dist/web-types.json +1 -1
  270. package/package.json +7 -3
  271. package/dist/@types/packages/vue2/src/composables/useDynamicImport.d.ts +0 -8
  272. package/dist/chunks/dialog-page.2c07d294.js +0 -172
  273. package/dist/chunks/dialog-page.2c07d294.js.map +0 -1
  274. package/dist/chunks/dropdown.170b43c4.js.map +0 -1
  275. package/dist/chunks/index.1b1646bf.js.map +0 -1
  276. package/dist/chunks/index.51fe0fc2.js.map +0 -1
  277. package/dist/chunks/listbox.b6a1aea2.js +0 -1466
  278. package/dist/chunks/listbox.b6a1aea2.js.map +0 -1
  279. /package/dist/@types/packages/{vue2 → core}/src/components/typography/typography.types.d.ts +0 -0
  280. /package/dist/assets/{cross.css → checkmark-circle-fill.css} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "@adyen/bento-vue3",
4
- "version": "1.24.0",
4
+ "version": "1.26.0",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/bento-vue3",
3
- "version": "1.24.0",
3
+ "version": "1.26.0",
4
4
  "description": "Adyen Bento Vue 3 components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -52,7 +52,7 @@
52
52
  "url": "git@github.com:Adyen/bento.git"
53
53
  },
54
54
  "dependencies": {
55
- "@adyen/bento-design-tokens": "1.24.0",
55
+ "@adyen/bento-design-tokens": "1.26.0",
56
56
  "@adyen/ui-assets-icons-16": "4.1.0",
57
57
  "@adyen/ui-assets-payment-method-icons": "6.1.0",
58
58
  "@codemirror/commands": "6.3.3",
@@ -77,9 +77,13 @@
77
77
  },
78
78
  "overrides": {
79
79
  "@codemirror/state": "6.4.0",
80
- "react": "16.14.0"
80
+ "react": "16.14.0",
81
+ "@adyen/lume-vue3": {
82
+ "vue": "^3.0"
83
+ }
81
84
  },
82
85
  "devDependencies": {
86
+ "@adyen/lume-vue3": "1.11.1",
83
87
  "@storybook/addon-a11y": "7.6.17",
84
88
  "@storybook/addon-essentials": "7.6.17",
85
89
  "@storybook/addon-storysource": "7.6.17",
@@ -1,8 +0,0 @@
1
- import { MaybeRef } from "../types";
2
- /**
3
- * Dynamic import fn, check if this is even possible?????
4
- * @param packageName
5
- * @param suffixSvgSrc
6
- * @param fallBackSrc
7
- */
8
- export declare const useDynamicIconImport: (packageName: string, suffixSvgSrc: MaybeRef<string>, fallBackSrc: string) => import("../../../vue3/node_modules/vue").Ref<string>;
@@ -1,172 +0,0 @@
1
- import { openBlock as n, createElementBlock as u, mergeProps as M, toDisplayString as Z, createCommentVNode as c, createElementVNode as q, defineComponent as Q, useSlots as W, ref as g, computed as r, inject as N, watch as h, nextTick as P, onUnmounted as X, createBlock as ee, Transition as te, unref as e, withCtx as A, normalizeClass as B, normalizeStyle as ae, createVNode as C, renderSlot as y } from "vue";
2
- import { a as oe } from "./button.ce5d1f5e.js";
3
- import { _ as O } from "./_plugin-vue_export-helper.dad06003.js";
4
- import { u as se } from "./use-has-slot.4d98bf29.js";
5
- import { u as le } from "./i18n.f7e6533e.js";
6
- import { i as ne } from "./index.51fe0fc2.js";
7
- import "../assets/dialog-page.css";
8
- let $ = 0;
9
- const ie = {
10
- beforeCreate() {
11
- this.uuid = $.toString(), $ += 1;
12
- }
13
- }, re = { key: 0 }, ue = /* @__PURE__ */ q("path", {
14
- fill: "#00112C",
15
- d: "M3.80655 7.25434L8.06077 3.00011L7.00011 1.93945L0.939453 8.00011L7.00011 14.0608L8.06077 13.0001L3.81499 8.75433L14.7508 8.74316L14.7492 7.24316L3.80655 7.25434Z"
16
- }, null, -1);
17
- function ce(t, S, i, b, v, w) {
18
- return n(), u("svg", M({ role: "img" }, t.$attrs, {
19
- class: "ui-assets-icons-16",
20
- xmlns: "http://www.w3.org/2000/svg",
21
- width: "16",
22
- height: "16",
23
- fill: "none"
24
- }), [
25
- t.$attrs["svg-title"] ? (n(), u("title", re, Z(t.$attrs["svg-title"]), 1)) : c("", !0),
26
- ue
27
- ], 16);
28
- }
29
- const de = /* @__PURE__ */ O(ie, [["render", ce]]);
30
- var E = /* @__PURE__ */ ((t) => (t.TRANSITION_LEVEL_DEEPER = "b-dialog-page__animation--level-deeper", t.TRANSITION_LEVEL_UPPER = "b-dialog-page__animation--level-upper", t))(E || {});
31
- const ve = Symbol("dialog registerPage injection key"), ge = Symbol("dialog page config data injection key"), R = {
32
- "en-US": {
33
- goToPreviousPage: "Go to previous page"
34
- }
35
- }, _e = {
36
- key: 0,
37
- class: "b-dialog-page"
38
- }, pe = {
39
- i18n: { messages: R }
40
- }, fe = /* @__PURE__ */ Q({
41
- ...pe,
42
- __name: "dialog-page",
43
- props: {
44
- /**
45
- * Identifier of the page, used with activePage prop to handle navigation
46
- */
47
- pageId: {
48
- type: String,
49
- default: void 0
50
- },
51
- /**
52
- * Show header and actions border
53
- */
54
- alwaysShowBorder: {
55
- type: Boolean,
56
- default: !1
57
- },
58
- /**
59
- * Pass custom styling to the back button to position it correctly with the header slot
60
- */
61
- backButtonStyling: { type: Object, default: null },
62
- /**
63
- * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior
64
- * Used when the back button should not take the user to the natural previous page
65
- * Set to `null` to hide back button in the page
66
- */
67
- previousPage: {
68
- type: String,
69
- default: void 0
70
- }
71
- },
72
- emits: ["animationend"],
73
- setup(t, { emit: S }) {
74
- const i = t, b = W(), v = se(b), { t: w } = le({ messages: R }), o = g(null), _ = g(!1), I = g(!0), L = g(!1), p = r(() => l.value ? l.value === i.pageId : !0), G = r(() => ({
75
- "b-dialog-page__header--with-border": i.alwaysShowBorder || _.value && !I.value
76
- })), V = r(() => ({
77
- "b-dialog-page__footer--with-border": i.alwaysShowBorder || _.value && !L.value
78
- })), D = () => {
79
- o.value && (I.value = o.value.scrollTop === 0, L.value = o.value.scrollHeight - o.value.clientHeight === o.value.scrollTop);
80
- }, T = async (a) => {
81
- a && (await P(), _.value = o.value && o.value.scrollHeight > o.value.clientHeight);
82
- }, { activePage: l, animation: f, isOpen: m, pages: x, previousPages: s, updatePage: H } = N(
83
- ge
84
- );
85
- h(() => m.value, T, { immediate: !0 }), h(() => p.value, T, { immediate: !0 });
86
- const j = r(() => i.previousPage ? !0 : i.previousPage === null ? !1 : z.value && p.value), U = () => {
87
- f.value = E.TRANSITION_LEVEL_DEEPER, S("animationend");
88
- }, z = r(() => s.value.length > 1), k = r(() => s.value[s.value.length - 1]), J = r(() => x.value.some((a) => a === l.value)), K = async (a) => {
89
- if (a) {
90
- const d = s.value.indexOf(a);
91
- d !== -1 ? s.value = s.value.slice(0, d + 1) : s.value = [a];
92
- } else
93
- s.value.pop();
94
- f.value = E.TRANSITION_LEVEL_UPPER, await P(), H(k.value);
95
- };
96
- h(
97
- () => l.value,
98
- async () => {
99
- if (await P(), !!m.value) {
100
- if (l.value && !J.value && ne) {
101
- console.error(
102
- `The activePage passed "${l.value}" does not match the id of any of the pages`
103
- );
104
- return;
105
- }
106
- l.value !== k.value && s.value.push(l.value);
107
- }
108
- },
109
- { immediate: !0 }
110
- );
111
- const Y = N(ve), { unregisterPage: F } = Y(i.pageId);
112
- return X(() => F()), (a, d) => (n(), ee(te, {
113
- name: e(f),
114
- mode: "out-in",
115
- onAfterLeave: U
116
- }, {
117
- default: A(() => [
118
- e(m) && e(p) ? (n(), u("div", _e, [
119
- e(v)("header") ? (n(), u("div", {
120
- key: 0,
121
- class: B(["b-dialog-page__header", e(G)])
122
- }, [
123
- e(j) ? (n(), u("div", {
124
- key: 0,
125
- class: "b-dialog-page__back-button",
126
- style: ae(t.backButtonStyling),
127
- "data-testid": "back-button"
128
- }, [
129
- C(e(oe), {
130
- variant: "tertiary",
131
- onClick: d[0] || (d[0] = (me) => K(t.previousPage))
132
- }, {
133
- default: A(() => [
134
- C(e(de), {
135
- "svg-title": e(w)("goToPreviousPage")
136
- }, null, 8, ["svg-title"])
137
- ]),
138
- _: 1
139
- })
140
- ], 4)) : c("", !0),
141
- y(a.$slots, "header", {}, void 0, !0)
142
- ], 2)) : c("", !0),
143
- e(v)("content") ? (n(), u("div", {
144
- key: 1,
145
- ref_key: "contentElement",
146
- ref: o,
147
- class: "b-dialog-page__content",
148
- onScroll: D
149
- }, [
150
- y(a.$slots, "content", {}, void 0, !0)
151
- ], 544)) : c("", !0),
152
- e(v)("footer") ? (n(), u("div", {
153
- key: 2,
154
- class: B(["b-dialog-page__footer", e(V)])
155
- }, [
156
- y(a.$slots, "footer", {}, void 0, !0)
157
- ], 2)) : c("", !0)
158
- ])) : c("", !0)
159
- ]),
160
- _: 3
161
- }, 8, ["name"]));
162
- }
163
- });
164
- const we = /* @__PURE__ */ O(fe, [["__scopeId", "data-v-af5820fe"]]);
165
- export {
166
- de as A,
167
- E as B,
168
- we as D,
169
- ve as a,
170
- ge as b
171
- };
172
- //# sourceMappingURL=dialog-page.2c07d294.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dialog-page.2c07d294.js","sources":["../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/arrow-left.vue","../../../vue2/src/components/internal/dialog-page/dialog-page.types.ts","../../../vue2/src/components/internal/dialog-page/dialog-page.keys.ts","../../../vue2/src/components/internal/dialog-page/dialog-page.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M3.80655 7.25434L8.06077 3.00011L7.00011 1.93945L0.939453 8.00011L7.00011 14.0608L8.06077 13.0001L3.81499 8.75433L14.7508 8.74316L14.7492 7.24316L3.80655 7.25434Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","import { Ref } from 'vue';\n\nexport enum BentoDialogPageAnimation {\n TRANSITION_LEVEL_DEEPER = 'b-dialog-page__animation--level-deeper',\n TRANSITION_LEVEL_UPPER = 'b-dialog-page__animation--level-upper',\n}\n\nexport interface BentoDialogPageConfigData {\n activePage: Ref<string>;\n animation: Ref<string>;\n isOpen: Ref<boolean>;\n pages: Ref<string[]>;\n previousPages: Ref<string[]>;\n updatePage: (page: string) => void;\n}\n\nexport type BentoDialogPageRegisterPage = (pageId: string) => { unregisterPage: () => void };\n","export const DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY = Symbol('dialog registerPage injection key');\nexport const DIALOG_PAGE_CONFIG_INJECTION_KEY = Symbol('dialog page config data injection key');\n","<template>\n <Transition :name=\"animation\" mode=\"out-in\" @after-leave=\"updateAnimation\">\n <div v-if=\"isOpen && showPage\" class=\"b-dialog-page\">\n <div v-if=\"hasSlot('header')\" class=\"b-dialog-page__header\" :class=\"headerConditionalClasses\">\n <div\n v-if=\"showBackButton\"\n class=\"b-dialog-page__back-button\"\n :style=\"backButtonStyling\"\n data-testid=\"back-button\"\n >\n <bento-button variant=\"tertiary\" @click=\"goToPreviousPage(previousPage)\">\n <arrow-left-icon :svg-title=\"t('goToPreviousPage')\" />\n </bento-button>\n </div>\n <slot name=\"header\"></slot>\n </div>\n <div v-if=\"hasSlot('content')\" ref=\"contentElement\" class=\"b-dialog-page__content\" @scroll=\"onScroll\">\n <slot name=\"content\" />\n </div>\n <div v-if=\"hasSlot('footer')\" class=\"b-dialog-page__footer\" :class=\"footerConditionalClasses\">\n <slot name=\"footer\" />\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onUnmounted, PropType, ref, useSlots, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import ArrowLeftIcon from '@adyen/ui-assets-icons-16/vue/arrow-left';\n\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n import { useI18n } from '@/utils/ts/i18n';\n import { isDevelopmentEnviroment } from '@/utils/ts/dev-environment';\n\n import {\n BentoDialogPageAnimation,\n BentoDialogPageConfigData,\n BentoDialogPageRegisterPage,\n } from './dialog-page.types';\n import type { CSSProperties } from 'vue/types/jsx';\n\n import { DIALOG_PAGE_CONFIG_INJECTION_KEY, DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY } from './dialog-page.keys';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * Identifier of the page, used with activePage prop to handle navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Show header and actions border\n */\n alwaysShowBorder: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Pass custom styling to the back button to position it correctly with the header slot\n */\n backButtonStyling: { type: Object as PropType<CSSProperties>, default: null },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Fires when the animation ends\n */\n (e: 'animationend'): void;\n }>();\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // Refs\n const contentElement = ref<HTMLDivElement>(null);\n const hasScroll = ref(false);\n const isScrollAtTop = ref(true);\n const isScrollAtBottom = ref(false);\n\n // Logic to choose which page is active/shown\n const showPage = computed(() => (activePage.value ? activePage.value === props.pageId : true));\n\n // Scrolling styling logic\n const headerConditionalClasses = computed(() => ({\n 'b-dialog-page__header--with-border': props.alwaysShowBorder || (hasScroll.value && !isScrollAtTop.value),\n }));\n\n const footerConditionalClasses = computed(() => ({\n 'b-dialog-page__footer--with-border': props.alwaysShowBorder || (hasScroll.value && !isScrollAtBottom.value),\n }));\n\n const onScroll = () => {\n if (!contentElement.value) {\n return;\n }\n\n isScrollAtTop.value = contentElement.value.scrollTop === 0;\n isScrollAtBottom.value =\n contentElement.value.scrollHeight - contentElement.value.clientHeight === contentElement.value.scrollTop;\n };\n\n const calculateScroll = async watchedValue => {\n if (!watchedValue) {\n return;\n }\n // Wait for content to be rendered to be able to calculate the height\n await nextTick();\n hasScroll.value = contentElement.value && contentElement.value.scrollHeight > contentElement.value.clientHeight;\n };\n\n const { activePage, animation, isOpen, pages, previousPages, updatePage } = inject<BentoDialogPageConfigData>(\n DIALOG_PAGE_CONFIG_INJECTION_KEY\n );\n\n watch(() => isOpen.value, calculateScroll, { immediate: true });\n watch(() => showPage.value, calculateScroll, { immediate: true });\n\n // Logic to determine whether the back button should be shown on the page\n const showBackButton = computed(() => {\n if (props.previousPage) {\n return true;\n }\n if (props.previousPage === null) {\n return false;\n }\n return hasPreviousPages.value && showPage.value;\n });\n\n // Animation\n const updateAnimation = () => {\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER;\n emit('animationend');\n };\n\n // Previous page logic\n const hasPreviousPages = computed(() => previousPages.value.length > 1);\n const lastPage = computed(() => previousPages.value[previousPages.value.length - 1]);\n const isActivePageValid = computed(() => pages.value.some(page => page === activePage.value));\n\n const goToPreviousPage = async (page: string) => {\n if (page) {\n const index = previousPages.value.indexOf(page);\n if (index !== -1) {\n previousPages.value = previousPages.value.slice(0, index + 1);\n } else {\n previousPages.value = [page];\n }\n } else {\n previousPages.value.pop();\n }\n\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_UPPER;\n await nextTick();\n updatePage(lastPage.value);\n };\n\n // Add new page to the previousPage array to keep track of user navigation\n watch(\n () => activePage.value,\n async () => {\n await nextTick();\n if (!isOpen.value) {\n return;\n }\n\n if (!!activePage.value && !isActivePageValid.value) {\n if (isDevelopmentEnviroment) {\n // eslint-disable-next-line no-console\n console.error(\n `The activePage passed \"${activePage.value}\" does not match the id of any of the pages`\n );\n return;\n }\n }\n\n if (activePage.value !== lastPage.value) {\n previousPages.value.push(activePage.value);\n }\n },\n { immediate: true }\n );\n\n // Register page to parent component and inject data from parent component\n const registerPage = inject<BentoDialogPageRegisterPage>(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY);\n const { unregisterPage } = registerPage(props.pageId);\n\n // Unregister page on unmounting the page\n onUnmounted(() => unregisterPage());\n</script>\n\n<script lang=\"ts\">\n /**\n * DialogPage is an internal component used to render different pages of dialog components (Modal, ModalFullscreen and Sidepanel)\n *\n * @example\n * import { DialogPage } from '@/internal';\n *\n * export default {\n * components: { DialogPage },\n * template: `\n * <dialog-page pageId='step1' always-show-border>\n * <template #header>Header</template>\n * <template #content>Content</template>\n * <template #footer>Footer</template>\n * </dialog-page>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./dialog-page.scss\" />\n"],"names":["uuid","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$1","toDisplayString","BentoDialogPageAnimation","BentoDialogPageAnimation2","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","DIALOG_PAGE_CONFIG_INJECTION_KEY","__default__","messages","slots","useSlots","hasSlot","useHasSlot","t","useI18n","contentElement","ref","hasScroll","isScrollAtTop","isScrollAtBottom","showPage","computed","activePage","props","headerConditionalClasses","footerConditionalClasses","onScroll","calculateScroll","watchedValue","nextTick","animation","isOpen","pages","previousPages","updatePage","inject","watch","showBackButton","hasPreviousPages","updateAnimation","emit","lastPage","isActivePageValid","page","goToPreviousPage","index","isDevelopmentEnviroment","registerPage","unregisterPage","onUnmounted"],"mappings":";;;;;;;AAKI,IAAAA,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARkM,MAAA;AAAA,EAAe,GAAA;;;AAAzN,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAA2B,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;6BAAYH,EAAA,GAAAC,EAAA,SAAAG,IAAAC,EAAAF,EAAA,OAAA,WAAA,CAAA,GAAA,CAAA;;;;;ACAzH,IAAAG,IAAA,kBAAAC,OACRA,EAAA,0BAAA,0CACAA,EAAA,yBAAA,yCAFQA,IAAAD,KAAA,CAAA,CAAA;ACFC,MAAAE,KAAA,OAAA,mCAAA,GACAC,KAAA,OAAA,uCAAA;;;;;;;GCmOTC,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA7IAC,IAAAC,EAAA,GACAC,IAAAC,GAAAH,CAAA,GACA,EAAA,GAAAI,EAAA,IAAAC,GAAA,EAAA,UAAAN,EAAA,CAAA,GAGAO,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,EAAA,GACAE,IAAAF,EAAA,EAAA,GACAG,IAAAH,EAAA,EAAA,GAGAI,IAAAC,EAAA,MAAAC,EAAA,QA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AAAD,MAAA;AACI,UAAAA,GAAA;AACI,cAAAE,IAAAZ,EAAA,MAAA,QAAAU,CAAA;AACA,QAAAE,MAAA,KACIZ,EAAA,QAAAA,EAAA,MAAA,MAAA,GAAAY,IAAA,CAAA,IAEAZ,EAAA,QAAA,CAAAU,CAAA;AAAA;AAGJ,QAAAV,EAAA,MAAA,IAAA;AAGJ,MAAAH,EAAA,QAAA3B,EAAA,wBACA,MAAA0B,EAAA,GACAK,EAAAO,EAAA,KAAA;AAAA,IAAyB;AAI7B,IAAAL;AAAA,MAAA,MAAAd,EAAA;AAAA,MACqB,YAAA;AAGb,YADA,MAAAO,EAAA,GACA,EAAAE,EAAA,OAIA;AAAA,cAAAT,EAAA,SAAA,CAAAoB,EAAA,SACII,IAAA;AAEI,oBAAA;AAAA,cAAQ,0BAAAxB,EAAA;AAAA,YACiC;AAEzC;AAAA;AAIR,UAAAA,EAAA,UAAAmB,EAAA,SACIR,EAAA,MAAA,KAAAX,EAAA,KAAA;AAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAAyB,IAAAZ,EAAA9B,EAAA,GACA,EAAA,gBAAA2C,EAAA,IAAAD,EAAAxB,EAAA,MAAA;AAGA,WAAA0B,EAAA,MAAAD,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dropdown.170b43c4.js","sources":["../../../vue2/src/components/dropdown/dropdown.types.ts","../../../vue2/src/components/dropdown/components/dropdown-options-container/composables/use-dropdown-options-listbox.ts","../../../vue2/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","../../../vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue","../../../vue2/src/components/dropdown/composables/use-display-value.ts","../../../vue2/src/components/dropdown/composables/use-keyboard-navigation.ts","../../../vue2/src/components/search-bar/useSearchBarDataFilter.ts","../../../vue2/src/components/input-field/input-field.keys.ts","../../../vue2/src/components/dropdown/dropdown.vue"],"sourcesContent":["/**\n * @deprecated Do not use. Only 'default' size should be used.\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';\nexport type { BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps } from '@/types';\nexport type { BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions } 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 isOpen The isOpen 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 isOpen: 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\n const onOutsideDropdownClick = () => {\n if (isOpen.value && multiple.value) {\n internalSelectedValue.value = selectedValue.value;\n }\n };\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 onOutsideDropdownClick,\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 :empty-state=\"emptyState\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"items\"\n :selected-value=\"internalSelectedValue\"\n :multiple=\"multiple\"\n :static-categories=\"staticCategories\"\n :no-results-message=\"noResultsMessage\"\n :searching=\"searching\"\n :loading=\"loading\"\n :lazy-load-type=\"lazyLoadType\"\n :has-more-items=\"hasMoreItems\"\n :virtual-scroll=\"virtualScroll\"\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 setup lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRefs, useSlots } 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 {\n BentoDropdownEmptyStateProps,\n BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n BentoDropdownSize,\n BentoDropdownVirtulisationOptions,\n } from '../../dropdown.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoPopover } from '@/components/popover';\n import { useDropdownOptionsListbox } from './composables/use-dropdown-options-listbox';\n import { generateUid } from '@/utils/ts/unique-id';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n\n const emit = defineEmits<{\n /**\n * Emitted when the dropdown is closing.\n */\n (e: BentoDropdownEvent.CLOSE_DROPDOWN);\n\n /**\n * Emitted when the `ENTER` key is pressed\n */\n (e: BentoListboxEvent.ENTER, newSelectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when the `ESCAPE` key is pressed\n */\n (e: BentoListboxEvent.ESCAPE);\n\n /**\n * Emitted when an item is selected\n */\n (e: BentoListboxEvent.SELECT, newSelectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: BentoDropdownEvent.SHOW_MORE);\n\n /**\n * Emitted when the `SPACE` key is pressed\n */\n (e: BentoListboxEvent.SPACE, newSelectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when the `TAB` key is pressed\n */\n (e: BentoListboxEvent.TAB, newSelectedValue: BentoListboxSelectedValue);\n }>();\n\n const props = defineProps({\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoDropdownEmptyStateProps>,\n default: undefined,\n },\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 * 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 * 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 * 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 * 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) => Object.values(BentoDropdownLazyLoadType).includes(value),\n },\n\n /**\n * Indicates if new options are loading.\n */\n loading: { type: Boolean, default: false },\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 * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\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 /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll: {\n type: [Boolean, Object] as PropType<BentoDropdownVirtulisationOptions>,\n default: false,\n },\n });\n\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\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, onOutsideDropdownClick } =\n useDropdownOptionsListbox(selectedValue, multiple, isDropdownOpen, emit);\n\n // Use different components depending on if the dropdown is a single or multi-select\n const popperContainerOrPopoverComponent = computed(() => (props?.multiple ? BentoPopover : PopperContainer));\n\n const popperContainerOrPopoverProps = computed(() => {\n const containerMinAndMaxWidth = {\n 'min-width': `${(props?.targetElement as HTMLElement)?.clientWidth}px`,\n 'max-width': 'min(500px, 95%)',\n };\n\n return 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 defineExpose({\n onOutsideDropdownClick,\n });\n</script>\n\n<script lang=\"ts\">\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 });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-options-container.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <div class=\"b-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 setup 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 const emit = defineEmits<{\n /**\n * Emitted on click, space, enter and esc user events. It will close the dropdown.\n */\n (e: 'open');\n\n /**\n * Emitted on click, space and enter user events. It will open the dropdown.\n */\n (e: 'close');\n }>();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, 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: { type: String, required: true },\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: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\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: { type: Boolean, default: false },\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\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('open');\n };\n\n const closeDropdown = () => {\n emit('close');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n };\n</script>\n\n<script lang=\"ts\">\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 inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-small-textbox.scss\" />\n","import { computed } from 'vue';\nimport {\n CategoryMultiSelectOptions,\n MultiSelectOptions,\n SingleSelectOptions,\n UseDisplayValue,\n} from './use-display-value.types';\nimport { BentoListboxMultiSelectValue, BentoListboxOptionItem } from '@/types';\n\n/**\n * Generates the `displayValue` for the Single select based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * @param options Single select options\n * @returns The text to be displayed by the dropdown\n */\nconst singleSelect = ({ items, placeholder, selectedValue, staticCategories }: SingleSelectOptions) => {\n // If no value selected, return placeholder or nothing\n // 0 is a possible value\n // eslint-disable-next-line eqeqeq -- The following are not valid value: undefined, null and empty string\n if (selectedValue.value == null || selectedValue.value === '') {\n return placeholder.value || null;\n }\n\n // Find selected values in the list of items\n let selectedItem: BentoListboxOptionItem;\n if (staticCategories) {\n const category = items.value.find(cat => cat.items.some(item => item.value === selectedValue.value));\n selectedItem = category?.items.find(item => item.value === selectedValue.value);\n } else {\n selectedItem = items.value.find(({ value }) => value === selectedValue.value);\n }\n\n // Return selected value's label or the selected value's value when it is not found\n return selectedItem ? selectedItem.label : selectedValue.value.toString();\n};\n\n/**\n * Generates the `displayValue` for the Multi Select based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * @param options Category select options\n * @returns The text to be displayed by the dropdown\n */\nconst multiSelect = ({ selectedValues, items, placeholder }: MultiSelectOptions) => {\n // No selected values\n if (!selectedValues.value || (selectedValues.value as BentoListboxMultiSelectValue)?.length === 0) {\n return placeholder.value || null;\n }\n\n return (selectedValues.value as BentoListboxMultiSelectValue)\n .map(selectedValue => {\n const selectedItem = items.value.find(({ value }) => value === selectedValue);\n return selectedItem ? selectedItem.label : selectedValue;\n })\n .join(', ');\n};\n\n/**\n * Generates the `displayValue` for the Category Multi Select based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * @param options Multi select options\n * @returns The text to be displayed by the dropdown\n */\nconst categoryMultiSelect = ({ selectedValues, items, placeholder }: CategoryMultiSelectOptions) => {\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\n/**\n * Generates the `displayValue` for the Dropdown based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * When there is a selected value but the value is not present in the list, the\n * value is then returned as there is no way to know what the text/label is.\n *\n * @param options Options needed to calculate the display value based on the type of Dropdown (single, multi, category)\n * @returns The text to be displayed by the dropdown\n */\nexport const useDisplayValue: UseDisplayValue = ({ items, placeholder, value, multiple, staticCategories }) => {\n const isCategoryMultilevel = computed(() => items.value.find(option => option.items?.length));\n\n const displayValue = computed(() => {\n if (!multiple.value) {\n const result = singleSelect({\n items,\n placeholder,\n selectedValue: value,\n staticCategories: staticCategories.value,\n });\n return result;\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';\nimport {\n UseListboxKeyboardNavigationOptions,\n UseTextboxKeyboardNavigationOptions,\n} from './use-keyboard-navigation.types';\n\n/**\n * Returns the focus to the textbox of the dropdown if it exists\n * when the dropdown is being closed.\n * @param elementToFocusOn Reference to the input container\n */\nconst focusOnTextbox = (elementToFocusOn: Ref) => {\n elementToFocusOn.value.$children?.[0].$refs.textbox.focus();\n};\n\n/**\n * Controls the keyboard navigation inside the Dropdown's textbox for Single and Multi select.\n * Adds support for the keys:\n *\n * - Arrow up\n * - Arrow Down\n * - End key\n * - Home key\n * - Escape key\n * - Space key\n * - Enter Key\n *\n * @param options Options from the Dropdown to handle the navigation\n * @param toggleDropdown Function to open/close the Dropdown\n * @param openDropdown Function to open the Dropdown\n * @param closeDropdown Function to close the Dropdown\n * @returns List of event listeners available to the Dropdown's textbox\n */\nexport const useTextboxKeyboardNavigation = (\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering,\n items,\n isMultiple,\n }: UseTextboxKeyboardNavigationOptions,\n toggleDropdown: () => void,\n openDropdown: () => void,\n closeDropdown: () => void\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\n/**\n * Controls the keyboard navigation inside the Dropdown's listbox container for Single and Multi select.\n * Adds support for the keys:\n *\n * - Escape key\n * - Enter Key\n * - Tab\n * - Space key\n *\n * @param options Options from the Dropdown to handle the navigation inside the listbox\n * @param closeDropdown Function to close the Dropdown\n * @returns List of event listeners available to the Dropdown's listbox container\n */\nexport const useListboxKeyboardNavigation = (\n { inputContainerRef, isDropdownOpen }: UseListboxKeyboardNavigationOptions,\n closeDropdown: () => void\n) => {\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","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","export const INPUT_FIELD_COMPONENT_INJECTION_KEY = Symbol('input field component injection key');\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=\"clickOutsideDropdown\" class=\"b-dropdown\" :class=\"conditionalClasses\">\n <field-label\n v-if=\"label\"\n :id=\"labelId\"\n :condensed=\"condensed\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\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 :condensed=\"condensed\"\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=\"!isInputComponent ? 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 :empty-state=\"emptyState\"\n :debounce-time=\"search?.debounceTime\"\n :disabled=\"disabled\"\n :input-size=\"size\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"filteredItems\"\n :multiple=\"multiple\"\n :static-categories=\"staticCategories\"\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 :virtual-scroll=\"virtualScroll\"\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 || hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-dropdown__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n <slot name=\"description\">\n {{ description }}\n </slot>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, inject, PropType, Ref, ref, toRef, toRefs, useAttrs, useSlots } from 'vue';\n\n // Components\n import { BentoDropdownOptionsContainer } from './components/dropdown-options-container';\n import { BentoTypography } from '@/components/typography';\n import { DropdownInputDefault, DropdownInputSmall } from './components';\n import { BentoListbox, ErrorMessage, FieldLabel, useMultiLevelItems } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n\n // Composables\n import { useDisplayValue, useListboxKeyboardNavigation, useTextboxKeyboardNavigation } from './composables';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n\n // Directives\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n // Types\n import {\n BentoDropdownEmptyStateProps,\n BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n BentoDropdownSearchOptions,\n BentoDropdownSize,\n BentoDropdownVirtulisationOptions,\n } from './dropdown.types';\n import {\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxMultiSelectValue,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n } from '@/types';\n\n import messages from './messages.json';\n import { useHasSlot } from '@/composables';\n import { INPUT_FIELD_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\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 * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoDropdownEmptyStateProps>,\n default: undefined,\n },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\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 * 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 * Text that is displayed as a label above the element.\n */\n label: { type: String, default: null },\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) => 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 * Text that appears in the form control when it has no value set\n */\n placeholder: { type: String, default: null },\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 * Dropdown search options and events.\n * @see BentoDropdownSearchOptions\n */\n search: {\n type: Object as PropType<BentoDropdownSearchOptions>,\n default: undefined,\n },\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 * @deprecated Do not use. Only 'default' size should be used.\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n validator: (value: BentoDropdownSize) => Object.values(BentoDropdownSize).includes(value),\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\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 * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll: {\n type: [Boolean, Object] as PropType<BentoDropdownVirtulisationOptions>,\n default: false,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const inputContainerRef = ref(null);\n const inputContainerRefWrapper = ref(null);\n const optionsContainerRef: Ref<InstanceType<typeof BentoDropdownOptionsContainer>> = 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 // Inject input field component key to change the dropdown size\n const isInputComponent =\n props.size === BentoDropdownSize.SMALL || inject(INPUT_FIELD_COMPONENT_INJECTION_KEY, false);\n const size = computed(() => (isInputComponent ? BentoDropdownSize.SMALL : BentoDropdownSize.DEFAULT));\n\n const conditionalClasses = computed(() => ({\n 'b-dropdown--condensed': props.condensed,\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 staticCategories: toRef(props, 'staticCategories'),\n multiple: toRef(props, 'multiple'),\n placeholder: toRef(props, 'placeholder'),\n value: toRef(props, 'value'),\n });\n\n const selectedValueItem = computed(() => {\n if (props?.multiple) {\n return props.items.filter(\n ({ value }) => props?.value && (props?.value as BentoListboxMultiSelectValue).includes(value)\n );\n }\n if (!props.multiple && props.staticCategories) {\n // Find the category that holds the selected value\n const category = props.items.find(categoryItem =>\n categoryItem.items.some(item => item.value === props.value)\n );\n // Find the specific item within the category\n const selectedCategoryItem = category ? category.items.find(item => item.value === props.value) : null;\n\n return selectedCategoryItem;\n }\n\n return 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 { isMultiLevelSelect, flattenedItemsList } = useMultiLevelItems(items);\n\n const additionalItemsSelected = computed(() => {\n if (props.multiple) {\n const selectedItems = (props?.value as BentoListboxMultiSelectValue)?.length;\n const total = isMultiLevelSelect.value ? flattenedItemsList.value.length : items.value.length;\n return total === selectedItems ? t('all') : selectedItems;\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 clickOutsideDropdown = () => {\n if (isSearching.value) {\n searchTerm.value = '';\n }\n\n if (isDropdownOpen.value) {\n isDropdownOpen.value = false;\n // Reset the internal dropdown options state\n optionsContainerRef.value.onOutsideDropdownClick();\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 if (props.size) {\n deprecate('BentoDropdown \"size\" property', `Do not use. Only 'default' size should be used.`, '2.0.0');\n }\n</script>\n\n<script lang=\"ts\">\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 DropdownInputDefault,\n DropdownInputSmall,\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","useDropdownOptionsListbox","selectedValue","multiple","isOpen","emit","internalSelectedValue","ref","t","useI18n","messages$1","watch","isApplyButtonDisabled","computed","onApplyClick","BentoListboxEvent","onCancelClick","onOutsideDropdownClick","actions","onOptionSelected","newSelectedValue","onTabKey","onEnterKey","onSpaceKey","onEscapeKey","emitShowMoreEvent","listeners","__default__$2","defineComponent","slots","useSlots","toRefs","props","dropdownOptionsListboxRef","isDropdownOpen","noResultsMessage","conditionalClasses","conditionalListboxClasses","popperContainerOrPopoverComponent","BentoPopover","PopperContainer","popperContainerOrPopoverProps","containerMinAndMaxWidth","_a","generateUid","expose","uuid$1","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$2","toDisplayString","uuid","_hoisted_1$1","__default__$1","DropdownBaseTextboxState","openDropdown","closeDropdown","DropdownBaseTextboxEvent","singleSelect","items","placeholder","staticCategories","selectedItem","category","cat","item","value","multiSelect","selectedValues","categoryMultiSelect","acc","option","selectedCategoryOptions","categoryOption","label","useDisplayValue","isCategoryMultilevel","focusOnTextbox","elementToFocusOn","useTextboxKeyboardNavigation","inputContainerRef","optionsContainerRef","selectedValueIndex","isDynamicFltering","isMultiple","toggleDropdown","onArrowDown","event","nextTick","_b","onArrowUp","onEndKey","firstLayer","onHomeKey","BentoKeyboardNavigationKeyDownEvent","useListboxKeyboardNavigation","closeDropdownAndFocusOnTextbox","useSearchBarFilter","searchTerm","data","searchEvent","searchTermRef","dataRef","findHits","searchTermLowerCased","options","INPUT_FIELD_COMPONENT_INJECTION_KEY","__default__","messages","DropdownInputDefault","DropdownInputSmall","attrs","useAttrs","hasSlot","useHasSlot","inputContainerRefWrapper","dropdownOptionsContainerId","labelId","descriptionId","errorId","isReadOnly","useFormLayoutFieldLoading","toRef","ariaLabelAttribute","ariaLabel","computedAriaLabel","useAriaLabel","isInputComponent","inject","size","descriptionConditionalClasses","filteredItems","isSearching","displayValue","selectedValueItem","categoryItem","index","isMultiLevelSelect","flattenedItemsList","useMultiLevelItems","additionalItemsSelected","selectedItems","ariaDescribedBy","clickOutsideDropdown","textboxKeyboardNavigationListeners","listboxKeyboardNavigationListeners","listboxListeners","deprecate"],"mappings":";;;;;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;GCeLE,KAAA,CAAAC,GAAAC,GAAAC,GAAAC,MAAA;AAMH,QAAAC,IAAAC,EAAAL,EAAA,KAAA,GACA,EAAA,GAAAM,EAAA,IAAAC,GAAA,EAAA,UAAAC,GAAA,CAAA;AAEA,EAAAC,GAAAT,GAAA,MAAA;AACI,IAAAI,EAAA,QAAAJ,EAAA;AAAA,EAA4C,CAAA;AAIhD,QAAAU,IAAAC;AAAA,IAA8B,MAAA,KAAA,UAAAP,EAAA,KAAA,MAAA,KAAA,UAAAJ,EAAA,KAAA;AAAA,EAC8D,GAG5FY,IAAA,MAAA;AACI,IAAAT,EAAAU,EAAA,QAAAT,EAAA,KAAA,GACAD,EAAAU,EAAA,cAAA;AAAA,EAAsC,GAG1CC,IAAA,MAAA;AACI,IAAAV,EAAA,QAAAJ,EAAA,OACAG,EAAAU,EAAA,cAAA;AAAA,EAAsC,GAG1CE,IAAA,MAAA;AACI,IAAAb,EAAA,SAAAD,EAAA,UACIG,EAAA,QAAAJ,EAAA;AAAA,EACJ,GAGJgB,IAAAL,EAAA,MAAA;AAAA,IAA+B;AAAA,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AAA,SAAA;AAAA,IAAiC,GAGrCmI,KAAAjE;AAAA,MAA2C;AAAA,QACvC,mBAAAC;AAAA,QACI,qBAAAC;AAAA,QACA,oBAAAC;AAAA,QACA,gBAAAlD;AAAA,QACA,mBAAA0F,EAAA5F,GAAA,kBAAA;AAAA,QACkD,OAAAA,EAAA;AAAA,QACrC,YAAAA,EAAA;AAAA,MACK;AAAA,MACtBuD;AAAA,MACA9B;AAAA,MACAC;AAAA,IACA,GAGJyF,KAAAlD;AAAA,MAA2C;AAAA,QACvC,mBAAAf;AAAA,QACI,gBAAAhD;AAAA,MACA;AAAA,MACJwB;AAAA,IACA,GAGJ0F,KAAA;AAAA,MAAyB,CAAArI,EAAA,cAAA,GAAA2C;AAAA,MACe,CAAA3C,EAAA,MAAA,GAAAI;AAAA,MACR,CAAAJ,EAAA,SAAA,GAAAU;AAAA,MACG,GAAA0H;AAAA,IAC5B;AAGP,WAAAnH,EAAA,SACIqH;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIRrH,EAAA,QACIqH,GAAA,iCAAA,mDAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[3,4]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.1b1646bf.js","sources":["../../../vue2/src/components/menu/components/menu-item/menu-item.vue","../../../vue2/src/components/menu/menu.types.ts","../../../vue2/src/components/menu/components/menu-list-container/menu-list-container.vue","../../../vue2/src/components/menu/components/sub-menu-item-list/sub-menu-item-list.vue","../../../vue2/src/components/menu/components/menu-item-list/menu-item-list.vue","../../../vue2/src/components/menu/menu.keys.ts","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/options-vertical.vue","../../../vue2/src/components/menu/menu.vue"],"sourcesContent":["<template>\n <base-button\n class=\"b-menu-item\"\n role=\"menuitem\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n tabindex=\"-1\"\n @click=\"onClick\"\n >\n <template v-if=\"icon\" #iconLeft>\n <component :is=\"icon\" class=\"b-menu-item__icon-left\" aria-hidden=\"true\" />\n </template>\n <template #default>\n <bento-typography el=\"span\" variant=\"body\" :stronger=\"isTitle\" class=\"b-menu-item__primary-text\">\n {{ text }}\n </bento-typography>\n <bento-typography v-if=\"secondaryText\" el=\"span\" variant=\"body\" class=\"b-menu-item__secondary-text\">\n {{ secondaryText }}\n </bento-typography>\n </template>\n <template v-if=\"chevron\" #iconRight><chevron-right-icon aria-hidden=\"true\" /></template>\n </base-button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n import { BaseButton, BentoBaseButtonEvent } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import { BentoMenuItem } from './menu-item.types';\n\n /**\n * Menu item component to render items in a menu. For internal use only.\n */\n export default defineComponent({\n name: 'menu-item',\n components: { BaseButton, BentoTypography, ChevronRightIcon },\n props: {\n /**\n * menu-item text that gets displayed as the main label\n */\n text: {\n type: String,\n required: true,\n },\n /**\n * menu-item action that gets executed when the MeniItem is clicked\n */\n handler: {\n type: Function as PropType<BentoMenuItem['handler']>,\n required: true,\n },\n /**\n * menu-item text that gets displayed as the secondary label\n */\n secondaryText: {\n type: String,\n default: null,\n },\n /**\n * Optional chevron icon displayed to the right of the menu-item\n */\n chevron: {\n type: Boolean,\n default: false,\n },\n /**\n * Optional icon displayed to the left of the menu-item\n */\n icon: {\n // Types for Vue2 (Object) and Vue3 (Function)\n // TODO: Remove Object when fully migrated to Vue3\n type: [Object, Function] as PropType<BentoMenuItem['icon']>,\n default: null,\n },\n /**\n * Disables menu-item button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays an indent variant od the menu-item\n */\n indent: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays menu-item button as critical\n */\n critical: {\n type: Boolean,\n default: false,\n },\n /**\n * Renders the text in a bold variant\n */\n isTitle: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoBaseButtonEvent.CLICK],\n setup(props, { emit }) {\n const conditionalClasses = computed(() => ({\n 'b-menu-item--critical': props.critical,\n 'b-menu-item--indent': props.indent,\n }));\n\n const onClick = (e: MouseEvent) => {\n e.stopPropagation();\n props.handler();\n emit(BentoBaseButtonEvent.CLICK);\n };\n\n return {\n // Values\n conditionalClasses,\n\n // Methods\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-item.scss\" />\n","import { BentoButton } from '../button';\n\nexport * from './components/menu-item/menu-item.types';\n\nexport enum BentoMenuEvent {\n BACK = 'back',\n CLOSE = 'close',\n OPEN = 'open',\n}\n\ntype ButtonProps = InstanceType<typeof BentoButton>['$props'];\n\nexport type BentoMenuButtonProps = {\n variant?: ButtonProps['variant'];\n condensed?: ButtonProps['condensed'];\n disabled?: ButtonProps['disabled'];\n};\n","<template>\n <div class=\"b-menu-list-container\"><slot></slot></div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n\n /**\n * Menu list container component to set the correct styling in a menu list. For internal use only.\n */\n export default defineComponent({\n name: 'bento-menu-list-container',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-list-container.scss\" />\n","<template>\n <transition name=\"b-sub-menu-item-list__transition\" appear>\n <menu-list-container class=\"b-sub-menu-item-list\">\n <ul\n ref=\"subMenuItemListRefLocal\"\n role=\"menu\"\n class=\"b-sub-menu-item-list__list\"\n @keydown.down.stop=\"focusNext\"\n @keydown.up.stop=\"focusPrevious\"\n @keydown.esc.stop=\"onBackButton\"\n >\n <li v-for=\"(item, index) in computedItems\" :key=\"`sub-menu-item-list-item-${index}`\" role=\"none\">\n <menu-item\n :text=\"item.text\"\n :handler=\"item.handler\"\n :secondary-text=\"item.secondaryText\"\n :icon=\"item.icon\"\n :is-title=\"item.isTitle\"\n :disabled=\"item.disabled\"\n :critical=\"item.critical\"\n :indent=\"item.indent\"\n :tabindex=\"index === subMenuFocusedIndex ? '0' : '-1'\"\n @click=\"item.clickHandler\"\n />\n <bento-divider v-if=\"item.addDivider\" class=\"b-sub-menu-item-list__divider\" />\n </li>\n </ul>\n </menu-list-container>\n </transition>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, ref } from 'vue';\n import { BentoDivider } from '@/components/divider';\n import { BentoMenuItem, MenuItem } from '../menu-item';\n import MenuListContainer from '../menu-list-container/menu-list-container.vue';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import { BentoMenuEvent } from '../../menu.types';\n import messages from '../../messages.json';\n\n /**\n * SubMenuItemList component to render a submenu with the sliding transition. For internal use only.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'sub-menu-item-list',\n components: { BentoDivider, MenuItem, MenuListContainer },\n props: {\n items: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n title: {\n type: String,\n required: true,\n },\n },\n emits: [BentoMenuEvent.CLOSE, BentoMenuEvent.BACK],\n setup(props, { emit }) {\n const subMenuItemListRefLocal = ref(null);\n const subMenuFocusedIndex = ref(0);\n const numberOfItems = ref(props.items.length);\n\n const closeMenu = () => emit(BentoMenuEvent.CLOSE);\n\n const onBackButton = () => emit(BentoMenuEvent.BACK);\n\n const computedItems = computed(() => {\n const items = props.items?.map(el => ({\n ...el,\n indent: !el.icon,\n isTitle: false,\n clickHandler: closeMenu,\n }));\n return [\n {\n text: props.title,\n secondaryText: null,\n critical: false,\n icon: ChevronLeftIcon,\n isTitle: true,\n disabled: false,\n indent: false,\n handler: onBackButton,\n clickHandler: onBackButton,\n addDivider: true,\n },\n ...items,\n ];\n });\n\n const focusItem = async () => {\n subMenuItemListRefLocal.value?.children?.[subMenuFocusedIndex.value]?.children?.[0]?.focus();\n };\n\n onMounted(async () => {\n // Using setTimeout otherwise the sliding animation doesn't work anymore. The timeout imer is the same as the transition time (0.15s)\n setTimeout(() => focusItem(), 150);\n });\n\n const focusPrevious = () => {\n if (subMenuFocusedIndex.value > 0) {\n subMenuFocusedIndex.value -= 1;\n if (computedItems.value[subMenuFocusedIndex.value].disabled) {\n focusPrevious();\n }\n } else {\n subMenuFocusedIndex.value = numberOfItems.value;\n }\n focusItem();\n };\n\n const focusNext = () => {\n if (subMenuFocusedIndex.value < numberOfItems.value) {\n subMenuFocusedIndex.value += 1;\n if (computedItems.value[subMenuFocusedIndex.value].disabled) {\n focusNext();\n }\n } else {\n subMenuFocusedIndex.value = 0;\n }\n focusItem();\n };\n\n return {\n // Enums\n BentoMenuEvent,\n\n // Values\n subMenuItemListRefLocal,\n subMenuFocusedIndex,\n ChevronLeftIcon,\n computedItems,\n\n // Methods\n closeMenu,\n onBackButton,\n focusPrevious,\n focusNext,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./sub-menu-item-list.scss\" />\n","<template>\n <menu-list-container ref=\"menuItemListWrapperRef\" :style=\"{ height: computedHeight }\">\n <ul\n ref=\"menuItemListRef\"\n class=\"b-menu-item-list\"\n role=\"menu\"\n @keydown.down=\"focusNext\"\n @keydown.up=\"focusPrevious\"\n @keydown.esc=\"closeMenu\"\n @keydown.tab=\"closeMenu\"\n >\n <li\n v-for=\"(item, index) in computedData\"\n :key=\"`menu-item-${index}`\"\n class=\"b-menu-item-list__item\"\n role=\"none\"\n @keydown.right=\"focusRight(item, index)\"\n @keydown.left=\"focusLeft()\"\n >\n <menu-item\n :text=\"item.text\"\n :handler=\"!item.items?.length ? item.handler : () => null\"\n :secondary-text=\"item.secondaryText\"\n :icon=\"item.icon\"\n :chevron=\"!!item.items?.length\"\n :disabled=\"item.disabled\"\n :critical=\"item.critical\"\n :indent=\"item.indent\"\n :tabindex=\"index === subMenuFocusedIndex ? '0' : '-1'\"\n :aria-haspopup=\"!!item.items?.length\"\n :aria-expanded=\"showSubMenu && visibleSubMenuIndex === index\"\n @click=\"toggleMenu(item, index)\"\n />\n <bento-divider v-if=\"item.addDivider\" class=\"b-menu-item-list__divider\" />\n <sub-menu-item-list\n v-if=\"item.items?.length && showSubMenu && visibleSubMenuIndex === index\"\n ref=\"subMenuItemListRef\"\n :items=\"item.items\"\n :title=\"item.text\"\n @back=\"onBackButton\"\n @close=\"closeMenu\"\n />\n </li>\n </ul>\n </menu-list-container>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoDivider } from '@/components/divider';\n import { BentoMenuItem, MenuItem } from '../menu-item';\n import { BentoMenuEvent } from '../../menu.types';\n import MenuListContainer from '../menu-list-container/menu-list-container.vue';\n import SubMenuItemList from '../sub-menu-item-list/sub-menu-item-list.vue';\n\n /**\n * MenuItem list to be used in the Menu component. For internal use only.\n */\n export default defineComponent({\n name: 'menu-item-list',\n components: { BentoDivider, MenuItem, MenuListContainer, SubMenuItemList },\n props: {\n /**\n * The data to be displayed in the list\n */\n data: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n /**\n * Displays the menu-items of the list in the indent variant. Only applies to elements that don't have an icon to their left.\n */\n indentItems: {\n type: Boolean,\n default: false,\n },\n /**\n * If set to true, focuses the last item on the list instead of the first. Used for accessibility purposes when the menu is opened with the 'up' arrow key.\n */\n focusLastElement: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoMenuEvent.CLOSE],\n setup(props, { emit }) {\n const menuItemListRef = ref(null);\n const menuItemListWrapperRef = ref(null);\n const subMenuItemListRef = ref(null);\n const showSubMenu = ref(false);\n const visibleSubMenuIndex = ref(null);\n const focusedIndex = ref(props.focusLastElement ? props.data.length - 1 : 0);\n const subMenuFocusedIndex = ref(0);\n const numberOfItems = ref(props.data.length - 1);\n const hasMenuItemsWithIcon = computed(() => props.data.some(el => el.icon));\n\n const computedData = computed(() => {\n if (props.indentItems || hasMenuItemsWithIcon.value) {\n return props.data.map(el => {\n let indent = false;\n if (!el.icon) {\n indent = true;\n }\n return {\n ...el,\n // eslint-disable-next-line no-param-reassign\n indent,\n };\n });\n }\n return props.data;\n });\n\n const focusItem = () => menuItemListRef.value?.children[focusedIndex.value]?.children[0]?.focus();\n\n const closeMenu = () => emit(BentoMenuEvent.CLOSE);\n\n const toggleMenu = async (item: BentoMenuItem, index: number) => {\n if (item.items) {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = true;\n } else {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = false;\n closeMenu();\n }\n };\n\n const focusPrevious = () => {\n if (focusedIndex.value > 0) {\n focusedIndex.value -= 1;\n if (computedData.value[focusedIndex.value].disabled) {\n focusPrevious();\n }\n } else {\n focusedIndex.value = numberOfItems.value;\n }\n focusItem();\n };\n\n const focusNext = () => {\n if (focusedIndex.value < numberOfItems.value) {\n focusedIndex.value += 1;\n if (computedData.value[focusedIndex.value].disabled) {\n focusNext();\n }\n } else {\n focusedIndex.value = 0;\n }\n focusItem();\n };\n\n const focusRight = (item, index) => {\n if (item?.items?.length) {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = true;\n }\n };\n\n const focusLeft = () => {\n if (visibleSubMenuIndex.value && showSubMenu.value) {\n visibleSubMenuIndex.value = null;\n showSubMenu.value = false;\n }\n };\n\n const onBackButton = () => {\n showSubMenu.value = false;\n visibleSubMenuIndex.value = null;\n // Focus the right element\n focusItem();\n };\n\n const subMenuHeight = computed(() => subMenuItemListRef.value?.[0]?.$el?.offsetHeight);\n\n // When we show the sub menu we need to set the height of the container because of the way the submenus are handled,\n // but the main menu doesn't need a height, as the popover will generate it with the right height\n const computedHeight = computed(() => (showSubMenu.value ? `${subMenuHeight.value}px` : ''));\n\n return {\n // Values\n menuItemListRef,\n menuItemListWrapperRef,\n subMenuItemListRef,\n\n computedData,\n computedHeight,\n\n focusedIndex,\n subMenuFocusedIndex,\n\n showSubMenu,\n visibleSubMenuIndex,\n\n // Methods\n toggleMenu,\n closeMenu,\n focusPrevious,\n focusNext,\n focusRight,\n focusLeft,\n onBackButton,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-item-list.scss\" />\n","export const MENU_INVERSE_INJECTION_KEY = Symbol('menu inverse style injection key');\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M8 4C8.29667 4 8.58668 3.91203 8.83335 3.74721C9.08003 3.58238 9.27229 3.34811 9.38582 3.07403C9.49935 2.79994 9.52906 2.49834 9.47118 2.20737C9.4133 1.91639 9.27044 1.64912 9.06066 1.43934C8.85088 1.22956 8.58361 1.0867 8.29264 1.02882C8.00167 0.970945 7.70006 1.00065 7.42598 1.11418C7.15189 1.22771 6.91762 1.41997 6.7528 1.66665C6.58797 1.91332 6.5 2.20333 6.5 2.5C6.5 2.89783 6.65803 3.27936 6.93934 3.56066C7.22064 3.84197 7.60218 4 8 4Z\"/><path fill=\"#00112C\" d=\"M8 15C8.29667 15 8.58668 14.912 8.83335 14.7472C9.08003 14.5824 9.27229 14.3481 9.38582 14.074C9.49935 13.7999 9.52906 13.4983 9.47118 13.2074C9.4133 12.9164 9.27044 12.6491 9.06066 12.4393C8.85088 12.2296 8.58361 12.0867 8.29264 12.0288C8.00167 11.9709 7.70006 12.0007 7.42598 12.1142C7.15189 12.2277 6.91762 12.42 6.7528 12.6666C6.58797 12.9133 6.5 13.2033 6.5 13.5C6.5 13.8978 6.65803 14.2794 6.93934 14.5607C7.22064 14.842 7.60218 15 8 15Z\"/><path fill=\"#00112C\" d=\"M8.83335 9.24721C8.58668 9.41203 8.29667 9.5 8 9.5C7.60218 9.5 7.22064 9.34197 6.93934 9.06066C6.65803 8.77936 6.5 8.39783 6.5 8C6.5 7.70333 6.58797 7.41332 6.7528 7.16665C6.91762 6.91997 7.15189 6.72771 7.42598 6.61418C7.70006 6.50065 8.00167 6.47094 8.29264 6.52882C8.58361 6.5867 8.85088 6.72956 9.06066 6.93934C9.27044 7.14912 9.4133 7.41639 9.47118 7.70737C9.52906 7.99834 9.49935 8.29994 9.38582 8.57403C9.27229 8.84811 9.08003 9.08238 8.83335 9.24721Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <div\n :class=\"computedClasses\"\n class=\"b-menu\"\n @keydown.down=\"onKeyDown\"\n @keydown.up=\"onKeyUp\"\n @keydown.esc=\"closeMenu\"\n >\n <bento-toggle-button\n ref=\"menuButtonRef\"\n aria-haspopup=\"true\"\n v-bind=\"computedButtonPropsWithDefaults\"\n :aria-controls=\"showMenu ? menuId : null\"\n :toggled=\"showMenu\"\n :inverse=\"isInverseColorSet\"\n @click=\"toggleShowMenu\"\n >\n <template v-if=\"!hasSlot('default') || hasSlot('iconLeft')\" #iconLeft>\n <slot name=\"iconLeft\">\n <options-vertical-icon :title=\"$t('menuButton')\" />\n </slot>\n </template>\n <template v-if=\"hasSlot('default')\" #default>\n <slot />\n </template>\n <template v-if=\"hasSlot('iconRight')\" #iconRight>\n <slot name=\"iconRight\" />\n </template>\n </bento-toggle-button>\n\n <bento-teleport v-if=\"menuButtonRef\" :disabled=\"!teleport\">\n <bento-popover\n v-if=\"menuButtonRef\"\n :id=\"menuId\"\n ref=\"popoverRef\"\n :open=\"showMenu\"\n class=\"b-menu__popover\"\n :style=\"computedMenuWidth\"\n :target-element=\"menuButtonRef\"\n :position=\"menuPosition\"\n :fixed-positioning=\"menuFixedPositioning\"\n :fallback-position=\"[\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'right-end',\n 'left-start',\n 'left-end',\n ]\"\n :teleport=\"teleport\"\n without-space\n >\n <menu-item-list :data=\"data\" :focus-last-element=\"isLastElementFocused\" @close=\"closeMenu\" />\n </bento-popover>\n </bento-teleport>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, inject, PropType, provide, ref } from 'vue';\n import { generateUid } from '@/utils/ts/unique-id';\n import { BentoToggleButton } from '@/components/button';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { BentoMenuItem, MenuItemList } from './components';\n import { BentoMenuButtonProps, BentoMenuEvent } from './menu.types';\n import { DIVIDER_INVERSE_INJECTION_KEY } from '@/components/divider/divider.keys';\n import { MENU_INVERSE_INJECTION_KEY } from './menu.keys';\n import { BentoTeleport } from '@/internal';\n import { useClickOutside, useHasSlot } from '@/composables';\n import OptionsVerticalIcon from '@adyen/ui-assets-icons-16/vue/options-vertical';\n import messages from './messages.json';\n\n /**\n * Menu component to render a series of buttons. Csan render nested submenus.\n *\n * @example\n * import { BentoMenu } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoMenu },\n * template: `\n * <bento-menu\n * :data=[\n * { text: 'Menu item text', handler: () => { some code here } },\n * { text: 'Another menu item text', handler: () => { some other code here }, critical: true }\n * ]\n * />\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-menu',\n components: { BentoToggleButton, BentoPopover, BentoTeleport, MenuItemList, OptionsVerticalIcon },\n props: {\n /**\n * Object containing props to change the menu button appearance. Accepts the same props present in BentoButton.\n */\n button: {\n type: Object as PropType<BentoMenuButtonProps>,\n default: () =>\n ({\n variant: 'secondary',\n } as BentoMenuButtonProps),\n },\n /**\n * The data to be displayed in the list\n */\n data: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n\n /**\n * The position of where the menu should open.\n */\n menuPosition: {\n type: String as PropType<BentoPopoverPositions | `${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Instructs the menu popover to be visible outside of the containing container.\n * @see {@link https://floating-ui.com/docs/usefloating#strategy}\n */\n menuFixedPositioning: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets a custom width for the menu popover.\n */\n menuWidth: {\n type: Number,\n default: null,\n },\n\n /**\n * Can be used to set the inner teleport component to render the menu's popover in the root `body` DOM node\n * (or `dialog` if popover is inside a dialog).\n */\n teleport: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoMenuEvent.CLOSE, BentoMenuEvent.OPEN],\n setup(props, { emit, slots }) {\n const menuButtonRef = ref(null);\n const showMenu = ref(false);\n const isLastElementFocused = ref(false);\n const popoverRef = ref<HTMLElement>(null);\n const menuId = generateUid('menu');\n const popoverId = generateUid('menu-popover');\n\n const isInverseColorSet = inject(MENU_INVERSE_INJECTION_KEY, ref(false));\n provide(DIVIDER_INVERSE_INJECTION_KEY, isInverseColorSet);\n\n const computedClasses = computed(() => ({\n 'b-menu--inverse': isInverseColorSet.value,\n }));\n\n const computedMenuWidth = computed(() => (props.menuWidth ? { width: `${props.menuWidth}px` } : null));\n const computedButtonPropsWithDefaults = computed<BentoMenuButtonProps>(() => {\n if (!props?.button) {\n return undefined;\n }\n return {\n variant: 'secondary',\n ...props.button,\n };\n });\n\n const openMenu = () => {\n showMenu.value = true;\n emit(BentoMenuEvent.OPEN);\n };\n\n const closeMenu = () => {\n if (showMenu.value) {\n showMenu.value = false;\n menuButtonRef.value.$el.focus();\n emit(BentoMenuEvent.CLOSE);\n }\n };\n\n const toggleShowMenu = (e: MouseEvent) => {\n e.stopPropagation();\n if (!showMenu.value) {\n openMenu();\n } else {\n closeMenu();\n }\n };\n\n const onKeyDown = () => {\n isLastElementFocused.value = false;\n openMenu();\n };\n\n const onKeyUp = () => {\n isLastElementFocused.value = true;\n openMenu();\n };\n\n // Ignore the events inside the Button and the Popover\n useClickOutside(popoverRef, closeMenu, { ignore: [menuButtonRef] });\n\n return {\n // Refs\n popoverRef,\n menuButtonRef,\n\n // Values\n menuId,\n popoverId,\n showMenu,\n computedButtonPropsWithDefaults,\n computedMenuWidth,\n isLastElementFocused,\n\n // Classes\n computedClasses,\n isInverseColorSet,\n\n // Methods\n hasSlot: useHasSlot(slots),\n onKeyDown,\n onKeyUp,\n closeMenu,\n toggleShowMenu,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu.scss\" />\n"],"names":["_sfc_main$5","defineComponent","BaseButton","BentoTypography","ChevronRightIcon","BentoBaseButtonEvent","props","emit","computed","e","normalizeClass","_ctx","createSlots","withCtx","createVNode","_component_bento_typography","openBlock","createBlock","resolveDynamicComponent","BentoMenuEvent","BentoMenuEvent2","_sfc_main$4","_sfc_main$3","messages","BentoDivider","MenuItem","MenuListContainer","subMenuItemListRefLocal","ref","subMenuFocusedIndex","numberOfItems","closeMenu","onBackButton","computedItems","items","_a","el","ChevronLeftIcon","focusItem","_e","_d","_c","_b","onMounted","focusPrevious","focusNext","_component_menu_list_container","resolveComponent","Transition","createElementVNode","_cache","withKeys","withModifiers","args","createElementBlock","Fragment","renderList","item","index","_component_bento_divider","_sfc_main$2","SubMenuItemList","menuItemListRef","menuItemListWrapperRef","subMenuItemListRef","showSubMenu","visibleSubMenuIndex","focusedIndex","hasMenuItemsWithIcon","computedData","indent","toggleMenu","focusRight","focusLeft","subMenuHeight","computedHeight","normalizeStyle","$event","createCommentVNode","_component_sub_menu_item_list","MENU_INVERSE_INJECTION_KEY","uuid","mergeProps","_hoisted_1","toDisplayString","_sfc_main","BentoToggleButton","BentoPopover","BentoTeleport","MenuItemList","OptionsVerticalIcon","BentoPopoverPositions","value","slots","menuButtonRef","showMenu","isLastElementFocused","popoverRef","menuId","generateUid","popoverId","isInverseColorSet","inject","provide","DIVIDER_INVERSE_INJECTION_KEY","computedClasses","computedMenuWidth","computedButtonPropsWithDefaults","openMenu","toggleShowMenu","onKeyDown","onKeyUp","useClickOutside","useHasSlot","renderSlot","_component_options_vertical_icon","_component_bento_teleport","_component_bento_popover","_component_menu_item_list"],"mappings":";;;;;;;;;;;;;AAkCI,MAAAA,KAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,Y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AA,EAAA;AAAA;;;;;;;YASA;AAAA,YAAA;AAAA,UACA;AAAA;;;UAGoB,SAAAE,EAAA,MAAA;AAAA,YAAMC,EAAAwG,GAAA;AAAA,cAAuB,MAAA3G,EAAA;AAAA,cAA8B,sBAAAA,EAAA;AAAA;;;;;;;;;;;","x_google_ignoreList":[6]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.51fe0fc2.js","sources":["../../../vue2/src/components/typography/typography.types.ts","../../../vue2/src/utils/ts/dev-environment.ts","../../../vue2/src/utils/ts/print-development-warning.ts","../../../vue2/src/utils/ts/deprecate.ts","../../../vue2/src/components/typography/typography.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTypographyVariant {\n CAPTION = 'caption',\n BODY = 'body',\n /** @deprecated Use \"TITLE\" instead. */\n SUBTITLE = 'subtitle',\n TITLE = 'title',\n}\n\nexport enum BentoTypographyModifier {\n WIDE = 'wide',\n STRONGER = 'stronger',\n STRONGER_WIDE = 'stronger-wide',\n STRONGEST = 'strongest',\n STRONGEST_WIDE = 'strongest-wide',\n MEDIUM = 'm',\n LARGE = 'l',\n MOBILE = 'mobile',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTypographyElement {\n H1 = 'h1',\n H2 = 'h2',\n H3 = 'h3',\n H4 = 'h4',\n H5 = 'h5',\n H6 = 'h6',\n DIV = 'div',\n PARAGRAPH = 'p',\n SPAN = 'span',\n}\n","const DEV_ENVIROMENT_NAMES = ['development', 'DEVELOPMENT', 'dev', 'DEV'];\n\nexport const isDevelopmentEnviroment = () => DEV_ENVIROMENT_NAMES.includes(process.env.NODE_ENV);\n","import { isDevelopmentEnviroment } from '@/utils/ts/dev-environment';\n\n/**\n * Prints console.warn messages in development mode only.\n *\n * @see console.warn for what parameters you can use\n */\n\nexport function printDevelopmentWarning(...args: Parameters<typeof console.warn>) {\n if (isDevelopmentEnviroment()) {\n // eslint-disable-next-line no-console\n console.warn(...args);\n }\n}\n","import { printDevelopmentWarning } from './print-development-warning';\n\nconst DEPRECATION_STYLES = ['color: red', 'background: yellow'].join(';');\nconst shownMessages = new Set<string>();\n\n/**\n * Informs users about the deprecations in development mode only.\n *\n * @param title Indicates what is being deprecated.\n * @param deprecationMessage How to avoid the deprecation by giving an example of the alternatives. Backticks can be used to multi-line the message.\n * @param toBeRemovedInVersion The version it will be removed. Must be in X.Y.Z format.\n */\nexport function deprecate(title: string, deprecationMessage: string, toBeRemovedInVersion: string) {\n // If the message is already showing, don't show it again\n if (!shownMessages.has(title)) {\n printDevelopmentWarning(`%cDEPRECATED:\\x1b[0m ${title}`, DEPRECATION_STYLES);\n // Format multi-line descriptions with the backtick\n printDevelopmentWarning(`${deprecationMessage.replaceAll(' ', '').trim()}`);\n printDevelopmentWarning(`To be removed in: %c${toBeRemovedInVersion}`, DEPRECATION_STYLES);\n shownMessages.add(title);\n }\n}\n\n/**\n * Reset shownMessages set\n *\n * @deprecated For testing purposes only. Do not use.\n */\nexport function resetShownMessages() {\n shownMessages.clear();\n}\n","<template>\n <component :is=\"el\" class=\"b-typography\" :class=\"conditionalClasses\" data-testid=\"typography\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoTypographyElement, BentoTypographyModifier, BentoTypographyVariant } from './typography.types';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Sets the HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n el?: BentoTypographyElement | `${BentoTypographyElement}`;\n\n /**\n * Adds the large class modifier.\n * Applicable to the Title variant.\n */\n large?: boolean;\n\n /**\n * Adds the medium class modifier.\n * Applicable to the Title variant.\n */\n medium?: boolean;\n\n /**\n * Adds the stronger class modifier.\n * Applicable to Caption, Body and Subtitle variants.\n */\n stronger?: boolean;\n\n /**\n * Adds the strongest class modifier.\n * Applicable to Caption, Body and Subtitle variants.\n */\n strongest?: boolean;\n\n /**\n * Sets the type of typography variant.\n * @values caption, body, title.\n */\n variant?: BentoTypographyVariant | `${BentoTypographyVariant}`;\n\n /**\n * Adds the medium class modifier.\n * Applicable to tje Body variant.\n */\n wide?: boolean;\n }>(),\n {\n el: BentoTypographyElement.PARAGRAPH,\n large: false,\n medium: false,\n stronger: false,\n strongest: false,\n variant: BentoTypographyVariant.BODY,\n wide: false,\n }\n );\n\n if (props.variant === BentoTypographyVariant.SUBTITLE) {\n deprecate(\n 'BentoTypography \"subtitle\" variant (BentoTypographyVariant.SUBTITLE)',\n `Use the \"title\" or \"BentoTypographyVariant.TITLE\" variant and (optionally) combine it with a size property. e.g. medium / large.\n <bento-typography :variant=\"BentoTypographyVariant.TITLE\" medium>`,\n '2.0.0'\n );\n }\n\n const conditionalClasses = computed(() => ({\n // Caption\n [`b-typography--${BentoTypographyVariant.CAPTION}`]: props.variant === BentoTypographyVariant.CAPTION,\n [`b-typography--${BentoTypographyVariant.CAPTION}-${BentoTypographyModifier.WIDE}`]:\n props.variant === BentoTypographyVariant.CAPTION && props.wide,\n [`b-typography--${BentoTypographyVariant.CAPTION}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.CAPTION && props.stronger,\n\n // Body\n [`b-typography--${BentoTypographyVariant.BODY}`]: props.variant === BentoTypographyVariant.BODY,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.WIDE}`]:\n props.variant === BentoTypographyVariant.BODY && props.wide,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.BODY && props.stronger,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.STRONGEST}`]:\n props.variant === BentoTypographyVariant.BODY && props.strongest,\n\n // Subtitle\n [`b-typography--${BentoTypographyVariant.SUBTITLE}`]: props.variant === BentoTypographyVariant.SUBTITLE,\n [`b-typography--${BentoTypographyVariant.SUBTITLE}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.SUBTITLE && props.stronger,\n\n // Title\n [`b-typography--${BentoTypographyVariant.TITLE}`]:\n props.variant === BentoTypographyVariant.TITLE && !props.medium && !props.large,\n [`b-typography--${BentoTypographyVariant.TITLE}-${BentoTypographyModifier.MEDIUM}`]:\n props.variant === BentoTypographyVariant.TITLE && props.medium,\n [`b-typography--${BentoTypographyVariant.TITLE}-${BentoTypographyModifier.LARGE}`]:\n props.variant === BentoTypographyVariant.TITLE && props.large,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * The Typography component makes it easy to apply a default set of font weights, sizes and other text styles\n * easily to text. The variants and properties match with those found in Figma.\n *\n * For example, seeing text with the typography styling of\n *\n * @example\n * import { BentoTypography } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTypography },\n * template: `\n * <bento-typography>\n * ... text content\n * </bento-typography>\n * `\n * }\n */\n export default {\n name: 'bento-typography',\n inheritAttrs: true,\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./typography.scss\" />\n<style lang=\"scss\">\n // Reset preset browser margin on all elements but allow for it to be overriden\n .b-typography {\n margin: 0;\n }\n</style>\n"],"names":["BentoTypographyVariant","BentoTypographyVariant2","BentoTypographyModifier","BentoTypographyModifier2","BentoTypographyElement","BentoTypographyElement2","DEV_ENVIROMENT_NAMES","isDevelopmentEnviroment","printDevelopmentWarning","args","DEPRECATION_STYLES","shownMessages","deprecate","title","deprecationMessage","toBeRemovedInVersion","__default__","props","conditionalClasses","computed"],"mappings":";;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,OAAA,QAEAA,EAAA,WAAA,YACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,WAAA,YACAA,EAAA,gBAAA,iBACAA,EAAA,YAAA,aACAA,EAAA,iBAAA,kBACAA,EAAA,SAAA,KACAA,EAAA,QAAA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