@adyen/bento-vue2 1.6.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/packages/core/src/components/button/button.types.d.ts +3 -1
  3. package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +43 -0
  4. package/dist/@types/packages/vue2/src/components/action-bar/index.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +4 -4
  6. package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -1
  7. package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +290 -281
  8. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +9 -0
  9. package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +3 -3
  10. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -1
  11. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +5 -5
  12. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
  13. package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +4 -3
  14. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +53 -70
  15. package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +1 -1
  16. package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +20 -2
  17. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +18 -0
  18. package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +20 -2
  19. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +1 -1
  20. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +1 -1
  21. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +45 -27
  22. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +1 -1
  23. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +21 -3
  24. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +24 -6
  25. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +21 -3
  26. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +21 -3
  27. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +21 -3
  28. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.types.d.ts +2 -0
  29. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +22 -4
  30. package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +5 -2
  31. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +234 -12
  32. package/dist/@types/packages/vue2/src/components/filter-bar/components/boolean-filter/boolean-filter.vue.d.ts +12 -5
  33. package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +1 -1
  34. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +2 -1
  35. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +1 -0
  36. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +12 -2
  37. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +10 -0
  38. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue.d.ts +3 -3
  39. package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +1 -1
  40. package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +3 -3
  41. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +1 -1
  42. package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +21 -0
  43. package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +18 -0
  44. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +19 -0
  45. package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
  46. package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/fixed-scroller.vue.d.ts +22 -1
  47. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +94 -8
  48. package/dist/@types/packages/vue2/src/components/internal/teleport/index.d.ts +1 -0
  49. package/dist/@types/packages/vue2/src/components/internal/teleport/teleport.vue.d.ts +50 -0
  50. package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +1 -1
  51. package/dist/@types/packages/vue2/src/components/menu/menu.keys.d.ts +1 -0
  52. package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +15 -11
  53. package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +9 -0
  54. package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +9 -0
  55. package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +1 -0
  56. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +4 -4
  57. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +5 -5
  58. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +10 -5
  59. package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +21 -0
  60. package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +21 -5
  61. package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +3 -3
  62. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +1 -2
  63. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
  64. package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.keys.d.ts +1 -0
  65. package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +3 -0
  66. package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +1 -0
  67. package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +9 -0
  68. package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +1 -0
  69. package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +2 -0
  70. package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +5 -5
  71. package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +6 -3
  72. package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +9 -2
  73. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +13 -13
  74. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/index.d.ts +1 -0
  75. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue.d.ts +12 -0
  76. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/index.d.ts +1 -0
  77. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue.d.ts +226 -0
  78. package/dist/@types/packages/vue2/src/components/tutorial/index.d.ts +2 -0
  79. package/dist/@types/packages/vue2/src/components/tutorial/tutorial.types.d.ts +13 -0
  80. package/dist/@types/packages/vue2/src/components/tutorial/tutorial.vue.d.ts +16 -0
  81. package/dist/@types/packages/vue2/src/composables/index.d.ts +5 -2
  82. package/dist/@types/packages/vue2/src/composables/use-click-outside/use-click-outside.d.ts +3 -0
  83. package/dist/@types/packages/vue2/src/composables/use-form-validate/index.d.ts +2 -0
  84. package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.d.ts +12 -0
  85. package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.types.d.ts +5 -0
  86. package/dist/@types/packages/vue2/src/composables/use-virtual-list/index.d.ts +2 -0
  87. package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.d.ts +15 -0
  88. package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.types.d.ts +20 -0
  89. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  90. package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +2 -2
  91. package/dist/@types/packages/vue2/src/types/listbox.d.ts +12 -0
  92. package/dist/accordion.js +41 -32
  93. package/dist/accordion.js.map +1 -1
  94. package/dist/action-bar.js +191 -0
  95. package/dist/action-bar.js.map +1 -0
  96. package/dist/alert.js +3 -3
  97. package/dist/assets/base-modal.css +1 -1
  98. package/dist/assets/button-actions-with-menu.css +1 -0
  99. package/dist/assets/button.css +1 -1
  100. package/dist/assets/calendar.css +1 -1
  101. package/dist/assets/checkbox.css +1 -1
  102. package/dist/assets/checkmark.css +1 -0
  103. package/dist/assets/chevron-left.css +1 -0
  104. package/dist/assets/dropdown-default-textbox.css +1 -1
  105. package/dist/assets/dropdown.css +1 -1
  106. package/dist/assets/fixed-scroller.css +1 -0
  107. package/dist/assets/index.css +1 -1
  108. package/dist/assets/index10.css +1 -1
  109. package/dist/assets/index11.css +1 -1
  110. package/dist/assets/index12.css +1 -1
  111. package/dist/assets/index13.css +1 -1
  112. package/dist/assets/index14.css +1 -1
  113. package/dist/assets/index15.css +1 -1
  114. package/dist/assets/index16.css +1 -1
  115. package/dist/assets/index17.css +1 -1
  116. package/dist/assets/index18.css +1 -1
  117. package/dist/assets/index19.css +1 -1
  118. package/dist/assets/index2.css +1 -1
  119. package/dist/assets/index20.css +1 -1
  120. package/dist/assets/index21.css +1 -1
  121. package/dist/assets/index22.css +1 -1
  122. package/dist/assets/index23.css +1 -1
  123. package/dist/assets/index24.css +1 -1
  124. package/dist/assets/index25.css +1 -1
  125. package/dist/assets/index26.css +1 -1
  126. package/dist/assets/index27.css +1 -1
  127. package/dist/assets/index28.css +1 -1
  128. package/dist/assets/index29.css +1 -1
  129. package/dist/assets/index3.css +1 -1
  130. package/dist/assets/index30.css +1 -1
  131. package/dist/assets/index31.css +1 -1
  132. package/dist/assets/index32.css +1 -1
  133. package/dist/assets/index33.css +1 -1
  134. package/dist/assets/index34.css +1 -1
  135. package/dist/assets/index35.css +1 -1
  136. package/dist/assets/index36.css +1 -1
  137. package/dist/assets/index37.css +1 -1
  138. package/dist/assets/index39.css +1 -1
  139. package/dist/assets/index4.css +1 -1
  140. package/dist/assets/index40.css +1 -1
  141. package/dist/assets/index41.css +1 -1
  142. package/dist/assets/index42.css +1 -1
  143. package/dist/assets/index43.css +1 -1
  144. package/dist/assets/index44.css +1 -1
  145. package/dist/assets/index45.css +1 -0
  146. package/dist/assets/index5.css +1 -1
  147. package/dist/assets/index6.css +1 -1
  148. package/dist/assets/index7.css +1 -1
  149. package/dist/assets/index8.css +1 -1
  150. package/dist/assets/index9.css +1 -1
  151. package/dist/assets/listbox.css +1 -1
  152. package/dist/assets/refresh.css +1 -0
  153. package/dist/avatar-image.js +1 -1
  154. package/dist/badge.js +1 -1
  155. package/dist/button.js +21 -14
  156. package/dist/button.js.map +1 -1
  157. package/dist/card.js +54 -54
  158. package/dist/card.js.map +1 -1
  159. package/dist/checkbox.js +6 -6
  160. package/dist/chunks/{base-button.d1ba66cd.js → base-button.7886a7e6.js} +2 -2
  161. package/dist/chunks/{base-button.d1ba66cd.js.map → base-button.7886a7e6.js.map} +1 -1
  162. package/dist/chunks/{base-modal.ec74044e.js → base-modal.88e7b9d4.js} +4 -4
  163. package/dist/chunks/{base-modal.ec74044e.js.map → base-modal.88e7b9d4.js.map} +1 -1
  164. package/dist/chunks/button-actions-with-menu.a5413243.js +105 -0
  165. package/dist/chunks/button-actions-with-menu.a5413243.js.map +1 -0
  166. package/dist/chunks/button.e09d5980.js +125 -0
  167. package/dist/chunks/button.e09d5980.js.map +1 -0
  168. package/dist/chunks/{calendar.b74f8a0f.js → calendar.24d0ac04.js} +294 -272
  169. package/dist/chunks/calendar.24d0ac04.js.map +1 -0
  170. package/dist/chunks/{checkbox.96ee3f71.js → checkbox.5343e28e.js} +7 -7
  171. package/dist/chunks/{checkbox.96ee3f71.js.map → checkbox.5343e28e.js.map} +1 -1
  172. package/dist/chunks/checkmark.78f3ed9c.js +26 -0
  173. package/dist/chunks/checkmark.78f3ed9c.js.map +1 -0
  174. package/dist/chunks/{chevron-right.3b826337.js → chevron-left.c10778d3.js} +8 -8
  175. package/dist/chunks/chevron-left.c10778d3.js.map +1 -0
  176. package/dist/chunks/{controls-group.e9537e45.js → controls-group.2a21bd83.js} +2 -2
  177. package/dist/chunks/{controls-group.e9537e45.js.map → controls-group.2a21bd83.js.map} +1 -1
  178. package/dist/chunks/{copy.2ff56819.js → copy.346eadb1.js} +4 -4
  179. package/dist/chunks/{copy.2ff56819.js.map → copy.346eadb1.js.map} +1 -1
  180. package/dist/chunks/{dropdown-default-textbox.3df0bf23.js → dropdown-default-textbox.25134789.js} +4 -4
  181. package/dist/chunks/dropdown-default-textbox.25134789.js.map +1 -0
  182. package/dist/chunks/{dropdown.3f198167.js → dropdown.f1253a54.js} +111 -81
  183. package/dist/chunks/dropdown.f1253a54.js.map +1 -0
  184. package/dist/chunks/{error-message.f5454f19.js → error-message.8302a46c.js} +2 -2
  185. package/dist/chunks/{error-message.f5454f19.js.map → error-message.8302a46c.js.map} +1 -1
  186. package/dist/chunks/fixed-scroller.8994e30a.js +108 -0
  187. package/dist/chunks/fixed-scroller.8994e30a.js.map +1 -0
  188. package/dist/chunks/{footer-actions.00d20947.js → footer-actions.c9b2cb74.js} +3 -3
  189. package/dist/chunks/{footer-actions.00d20947.js.map → footer-actions.c9b2cb74.js.map} +1 -1
  190. package/dist/chunks/{index.c39c64c9.js → index.2625175a.js} +2 -2
  191. package/dist/chunks/{index.c39c64c9.js.map → index.2625175a.js.map} +1 -1
  192. package/dist/chunks/index.37283390.js +475 -0
  193. package/dist/chunks/index.37283390.js.map +1 -0
  194. package/dist/chunks/index.8ac70774.js +1328 -0
  195. package/dist/chunks/index.8ac70774.js.map +1 -0
  196. package/dist/chunks/{index.2fce7703.js → index.965ac1af.js} +2 -2
  197. package/dist/chunks/{index.2fce7703.js.map → index.965ac1af.js.map} +1 -1
  198. package/dist/chunks/{index.eb52e785.js → index.a201f750.js} +6 -5
  199. package/dist/chunks/{index.eb52e785.js.map → index.a201f750.js.map} +1 -1
  200. package/dist/chunks/{index.a709a6b0.js → index.b83f8b7e.js} +2 -2
  201. package/dist/chunks/{index.a709a6b0.js.map → index.b83f8b7e.js.map} +1 -1
  202. package/dist/chunks/{index.298f5eed.js → index.d6b5f5e1.js} +6 -6
  203. package/dist/chunks/{index.298f5eed.js.map → index.d6b5f5e1.js.map} +1 -1
  204. package/dist/chunks/{index.31949c1a.js → index.e566354f.js} +91 -74
  205. package/dist/chunks/index.e566354f.js.map +1 -0
  206. package/dist/chunks/{listbox-option-tag.1362a2d7.js → listbox-option-tag.6a09e8e2.js} +8 -7
  207. package/dist/chunks/{listbox-option-tag.1362a2d7.js.map → listbox-option-tag.6a09e8e2.js.map} +1 -1
  208. package/dist/chunks/{listbox.e7bf46e4.js → listbox.73c38f38.js} +479 -385
  209. package/dist/chunks/listbox.73c38f38.js.map +1 -0
  210. package/dist/chunks/{loading-button.0ad06c99.js → loading-button.c65682d6.js} +2 -2
  211. package/dist/chunks/{loading-button.0ad06c99.js.map → loading-button.c65682d6.js.map} +1 -1
  212. package/dist/chunks/refresh.eb485c6f.js +26 -0
  213. package/dist/chunks/refresh.eb485c6f.js.map +1 -0
  214. package/dist/chunks/summary-grid.keys.1d1028c2.js +5 -0
  215. package/dist/chunks/summary-grid.keys.1d1028c2.js.map +1 -0
  216. package/dist/chunks/{tooltip.68e81e9c.js → tooltip.104e5fac.js} +39 -36
  217. package/dist/chunks/{tooltip.68e81e9c.js.map → tooltip.104e5fac.js.map} +1 -1
  218. package/dist/code-snippet.js +7 -7
  219. package/dist/code-snippet.js.map +1 -1
  220. package/dist/country.js +537 -528
  221. package/dist/country.js.map +1 -1
  222. package/dist/currency.js +1 -1
  223. package/dist/data-grid.js +10 -10
  224. package/dist/data-grid.js.map +1 -1
  225. package/dist/date-picker.js +99 -89
  226. package/dist/date-picker.js.map +1 -1
  227. package/dist/date-range-picker.js +2 -2
  228. package/dist/date.js +1 -1
  229. package/dist/divider.js +1 -1
  230. package/dist/dropdown.js +4 -4
  231. package/dist/empty-state.js +8 -7
  232. package/dist/empty-state.js.map +1 -1
  233. package/dist/filter-bar.js +500 -486
  234. package/dist/filter-bar.js.map +1 -1
  235. package/dist/focus-trap.js +1 -1
  236. package/dist/form-layout.js +2 -2
  237. package/dist/header.js +104 -183
  238. package/dist/header.js.map +1 -1
  239. package/dist/image.js +3 -3
  240. package/dist/index.js +171 -169
  241. package/dist/index.js.map +1 -1
  242. package/dist/info-icon.js +3 -3
  243. package/dist/input-field.js +7 -7
  244. package/dist/internal.js +20 -106
  245. package/dist/internal.js.map +1 -1
  246. package/dist/link.js +2 -2
  247. package/dist/loading-indicator.js +1 -1
  248. package/dist/menu.js +3 -466
  249. package/dist/menu.js.map +1 -1
  250. package/dist/modal.js +3 -3
  251. package/dist/pagination.js +40 -26
  252. package/dist/pagination.js.map +1 -1
  253. package/dist/payment-method.js +33 -26
  254. package/dist/payment-method.js.map +1 -1
  255. package/dist/popover.js +4 -4
  256. package/dist/popper-container.js +6 -1270
  257. package/dist/popper-container.js.map +1 -1
  258. package/dist/radio-group.js +97 -81
  259. package/dist/radio-group.js.map +1 -1
  260. package/dist/search-bar.js +2 -2
  261. package/dist/segmented-control.js +100 -70
  262. package/dist/segmented-control.js.map +1 -1
  263. package/dist/sidepanel.js +53 -51
  264. package/dist/sidepanel.js.map +1 -1
  265. package/dist/status.js +2 -2
  266. package/dist/stepper.js +3 -3
  267. package/dist/structured-list.js +1 -1
  268. package/dist/summary-grid.js +109 -119
  269. package/dist/summary-grid.js.map +1 -1
  270. package/dist/tabs.js +81 -71
  271. package/dist/tabs.js.map +1 -1
  272. package/dist/tag.js +3 -3
  273. package/dist/textarea.js +4 -4
  274. package/dist/timeline.js +170 -162
  275. package/dist/timeline.js.map +1 -1
  276. package/dist/toast.js +3 -3
  277. package/dist/toggle.js +6 -6
  278. package/dist/tutorial.js +307 -0
  279. package/dist/tutorial.js.map +1 -0
  280. package/dist/typography.js +1 -1
  281. package/dist/web-types.json +828 -122
  282. package/package.json +7 -4
  283. package/dist/assets/chevron-right.css +0 -1
  284. package/dist/chunks/button.eb60d460.js +0 -117
  285. package/dist/chunks/button.eb60d460.js.map +0 -1
  286. package/dist/chunks/calendar.b74f8a0f.js.map +0 -1
  287. package/dist/chunks/chevron-right.3b826337.js.map +0 -1
  288. package/dist/chunks/dropdown-default-textbox.3df0bf23.js.map +0 -1
  289. package/dist/chunks/dropdown.3f198167.js.map +0 -1
  290. package/dist/chunks/index.31949c1a.js.map +0 -1
  291. package/dist/chunks/listbox.e7bf46e4.js.map +0 -1
@@ -1,34 +1,112 @@
1
- import { computed as r, defineComponent as k, ref as C, onMounted as de, toRef as _e, watch as be } from "vue";
2
- import { B as $ } from "./index.2fce7703.js";
3
- import { BentoLoadingIndicator as ve } from "../loading-indicator.js";
4
- import { u as F } from "./i18n.155748d6.js";
5
- import { d as me } from "./debounce.b5ef6acf.js";
6
- import { n as R } from "./_plugin-vue2_normalizer.71e2aa87.js";
7
- import { B as h, a as G } from "./keyboard-navigation.ca47dfa8.js";
8
- import { B as U } from "./checkbox.96ee3f71.js";
9
- import { C as fe, a as ge } from "./chevron-up.674ec2e5.js";
10
- import { B as pe, a as Y } from "./loading-button.0ad06c99.js";
1
+ import { computed as r, ref as h, onMounted as J, onUnmounted as ve, watch as Q, defineComponent as D, toRef as Z } from "vue";
2
+ import { B as F } from "./index.965ac1af.js";
3
+ import { BentoLoadingIndicator as _e } from "../loading-indicator.js";
4
+ import { BentoEmptyState as me } from "../empty-state.js";
5
+ import { u as K } from "./i18n.155748d6.js";
6
+ import { d as fe } from "./debounce.b5ef6acf.js";
7
+ import { C as ge } from "./checkmark.78f3ed9c.js";
8
+ import { B, a as q } from "./keyboard-navigation.ca47dfa8.js";
9
+ import { n as N } from "./_plugin-vue2_normalizer.71e2aa87.js";
10
+ import { B as j } from "./checkbox.5343e28e.js";
11
+ import "./index.af05ced4.js";
12
+ import { C as ye, a as Ee } from "./chevron-up.674ec2e5.js";
13
+ import { B as Se, a as H } from "./loading-button.c65682d6.js";
14
+ import { o as xe } from "./resize.a041304d.js";
11
15
  import "../assets/listbox.css";
12
- const K = (t, e, l, s) => {
16
+ const ee = (t, e, l, s) => {
13
17
  const n = r(
14
18
  () => {
15
- var u, d;
16
- return !!((u = t.value) != null && u.length) && ((d = t.value) == null ? void 0 : d.length) === e.value.length;
19
+ var c, v;
20
+ return !!((c = t.value) != null && c.length) && ((v = t.value) == null ? void 0 : v.length) === e.value.length;
17
21
  }
18
- ), c = r(() => {
19
- var u;
20
- return t.value == null || t.value.length === 0 ? !1 : ((u = t.value) == null ? void 0 : u.length) !== e.value.length;
22
+ ), o = r(() => {
23
+ var c;
24
+ return t.value == null || t.value.length === 0 ? !1 : ((c = t.value) == null ? void 0 : c.length) !== e.value.length;
21
25
  });
22
26
  return {
23
27
  isAllSelected: n,
24
- isIndeterminate: c,
25
- toggleSelectAll: (u) => {
26
- u ? l() : s();
28
+ isIndeterminate: o,
29
+ toggleSelectAll: (c) => {
30
+ c ? l() : s();
27
31
  }
28
32
  };
29
33
  };
30
- var o = /* @__PURE__ */ ((t) => (t.SELECT = "select", t.SHOW_MORE = "show-more", t.ESCAPE = "escape-pressed", t.CLICK = "click", t.ENTER = "enter-pressed", t.SPACE = "space-pressed", t.TAB = "tab-pressed", t.CLOSE_DROPDOWN = "close-dropdown", t))(o || {}), D = /* @__PURE__ */ ((t) => (t.AUTOMATIC = "automatic", t.BUTTON = "button", t.NONE = "none", t))(D || {});
31
- const Ee = k({
34
+ function pe(t, { disabled: e, itemHeight: l, overscan: s = 5, prefixHeight: n }) {
35
+ const o = h(null), _ = h([]), c = h(0), v = h(0), b = h(0);
36
+ let S;
37
+ const L = r(() => {
38
+ const d = typeof l == "number" ? t.value.length * l : t.value.reduce((g, x, C) => g + l(C), 0), y = typeof l == "number" ? c.value * l : t.value.slice(0, c.value).reduce((g, x, C) => g + l(C), 0);
39
+ return {
40
+ style: {
41
+ marginTop: `${y}px`,
42
+ height: `${d - y}px`
43
+ }
44
+ };
45
+ }), p = () => {
46
+ const d = (n == null ? void 0 : n.value) ?? 0, y = Math.max(o.value.scrollTop - d, 0);
47
+ if (typeof l == "number")
48
+ return Math.floor(y / l);
49
+ let g = 0, x = 0;
50
+ for (let C = 0; C < t.value.length; C += 1) {
51
+ const M = l(C);
52
+ if (g += M, g >= y) {
53
+ x = C;
54
+ break;
55
+ }
56
+ }
57
+ return x;
58
+ }, f = () => {
59
+ if (b.value = o.value.clientHeight, typeof l == "number")
60
+ return Math.ceil(b.value / l);
61
+ const d = c.value ?? 0;
62
+ let y = 0, g = 0;
63
+ for (let x = d; x < t.value.length; x += 1) {
64
+ const C = l(x);
65
+ if (y += C, g = x, y > b.value)
66
+ break;
67
+ }
68
+ return g - d;
69
+ }, T = () => {
70
+ if (o.value) {
71
+ const d = f();
72
+ c.value = p(), v.value = Math.min(c.value + d + s, t.value.length), _.value = t.value.slice(c.value, v.value);
73
+ }
74
+ }, I = () => {
75
+ T();
76
+ };
77
+ e || (J(() => {
78
+ o.value && (b.value = o.value.clientHeight, S = xe(o.value, ({ clientHeight: d }) => {
79
+ b.value = d, T();
80
+ }), T());
81
+ }), ve(() => {
82
+ S == null || S.disconnect();
83
+ }), Q(
84
+ () => t.value,
85
+ () => {
86
+ T();
87
+ }
88
+ ));
89
+ const A = {
90
+ ref: o,
91
+ style: { overflowY: "auto" }
92
+ };
93
+ return e ? {
94
+ containerRef: o,
95
+ containerProps: A,
96
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
97
+ onScroll: () => {
98
+ },
99
+ list: t
100
+ } : {
101
+ containerRef: o,
102
+ containerProps: A,
103
+ onScroll: I,
104
+ list: _,
105
+ wrapperProps: L
106
+ };
107
+ }
108
+ var i = /* @__PURE__ */ ((t) => (t.SELECT = "select", t.SHOW_MORE = "show-more", t.ESCAPE = "escape-pressed", t.CLICK = "click", t.ENTER = "enter-pressed", t.SPACE = "space-pressed", t.TAB = "tab-pressed", t.CLOSE_DROPDOWN = "close-dropdown", t))(i || {}), P = /* @__PURE__ */ ((t) => (t.AUTOMATIC = "automatic", t.BUTTON = "button", t.NONE = "none", t))(P || {});
109
+ const Ce = D({
32
110
  name: "bento-listbox-option",
33
111
  props: {
34
112
  /**
@@ -40,7 +118,7 @@ const Ee = k({
40
118
  */
41
119
  selected: { type: Boolean, default: !1 }
42
120
  },
43
- emits: [o.CLICK, o.ENTER, o.SPACE, o.TAB],
121
+ emits: [i.CLICK, i.ENTER, i.SPACE, i.TAB],
44
122
  setup(t, { emit: e }) {
45
123
  const l = r(() => ({
46
124
  "b-listbox-option--disabled": t.disabled,
@@ -48,21 +126,21 @@ const Ee = k({
48
126
  }));
49
127
  return {
50
128
  // Enums
51
- BentoKeyboardNavigationKeyDownEvent: h,
52
- BentoListboxEvent: o,
129
+ BentoKeyboardNavigationKeyDownEvent: B,
130
+ BentoListboxEvent: i,
53
131
  // Values
54
132
  conditionalClasses: l,
55
133
  // Events
56
- onClick: (c) => {
57
- e(o.CLICK, c);
134
+ onClick: (o) => {
135
+ e(i.CLICK, o);
58
136
  },
59
- onOptionSelected: (c, v) => {
60
- e(c, v);
137
+ onOptionSelected: (o, _) => {
138
+ e(o, _);
61
139
  }
62
140
  };
63
141
  }
64
142
  });
65
- var xe = function() {
143
+ var he = function() {
66
144
  var e = this, l = e._self._c;
67
145
  return e._self._setupProxy, l("label", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(s) {
68
146
  return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, s);
@@ -71,42 +149,22 @@ var xe = function() {
71
149
  }, function(s) {
72
150
  return !s.type.indexOf("key") && e._k(s.keyCode, "tab", 9, s.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, s);
73
151
  }] } }, "label", e.$attrs, !1), [e._t("default")], 2);
74
- }, ye = [], Se = /* @__PURE__ */ R(
75
- Ee,
76
- xe,
77
- ye,
78
- !1,
79
- null,
80
- "d7fb415c",
81
- null,
82
- null
83
- );
84
- const P = Se.exports;
85
- let V = 0;
86
- const Ce = {
87
- beforeCreate() {
88
- this.uuid = V.toString(), V += 1;
89
- }
90
- };
91
- var he = function() {
92
- var e = this, l = e._self._c;
93
- return l("svg", e._b({ attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#00112C", "fill-rule": "evenodd", d: "M14.5303 4.53033C14.8232 4.23744 14.8232 3.76256 14.5303 3.46967C14.2374 3.17678 13.7626 3.17678 13.4697 3.46967L6 10.9393L2.53033 7.46967C2.23744 7.17678 1.76256 7.17678 1.46967 7.46967C1.17678 7.76256 1.17678 8.23744 1.46967 8.53033L5.46967 12.5303C5.50628 12.5669 5.54574 12.599 5.58732 12.6264C5.87844 12.8186 6.27405 12.7866 6.53033 12.5303L14.5303 4.53033Z", "clip-rule": "evenodd" } })]);
94
- }, Le = [], Oe = /* @__PURE__ */ R(
152
+ }, Te = [], Oe = /* @__PURE__ */ N(
95
153
  Ce,
96
154
  he,
97
- Le,
155
+ Te,
98
156
  !1,
99
157
  null,
100
- "4687fbd0",
158
+ "d7fb415c",
101
159
  null,
102
160
  null
103
161
  );
104
- const Te = Oe.exports, Ae = k({
162
+ const U = Oe.exports, Le = D({
105
163
  name: "bento-listbox-single-select-option",
106
164
  components: {
107
- BentoListboxOption: P,
108
- BentoTypography: $,
109
- CheckmarkIcon: Te
165
+ BentoListboxOption: U,
166
+ BentoTypography: F,
167
+ CheckmarkIcon: ge
110
168
  },
111
169
  props: {
112
170
  /**
@@ -126,24 +184,24 @@ const Te = Oe.exports, Ae = k({
126
184
  */
127
185
  selected: { type: Boolean, default: !1 }
128
186
  },
129
- emits: [o.ENTER, o.SELECT, o.SPACE, o.TAB],
187
+ emits: [i.ENTER, i.SELECT, i.SPACE, i.TAB],
130
188
  setup(t, { emit: e }) {
131
- const l = (v) => {
132
- t.disabled || e(v, t.option.value);
133
- }, s = r(() => t.disabled ? !0 : null), n = r(() => t.selected ? !0 : null), c = r(() => t.disabled ? -1 : 0);
189
+ const l = (_) => {
190
+ t.disabled || e(_, t.option.value);
191
+ }, s = r(() => t.disabled ? !0 : null), n = r(() => t.selected ? !0 : null), o = r(() => t.disabled ? -1 : 0);
134
192
  return {
135
193
  // Values
136
194
  ariaDisabled: s,
137
195
  ariaSelected: n,
138
- tabIndex: c,
196
+ tabIndex: o,
139
197
  // Enums
140
- BentoListboxEvent: o,
198
+ BentoListboxEvent: i,
141
199
  // Events
142
200
  onOptionSelected: l
143
201
  };
144
202
  }
145
203
  });
146
- var Ie = function() {
204
+ var Ae = function() {
147
205
  var e = this, l = e._self._c;
148
206
  return e._self._setupProxy, l("bento-listbox-option", { staticClass: "b-listbox-single-select-option", attrs: { disabled: e.disabled, selected: e.selected, "aria-selected": e.ariaSelected, "aria-disabled": e.ariaDisabled, tabindex: e.tabIndex }, on: e._d({ click: function(s) {
149
207
  return e.onOptionSelected(e.BentoListboxEvent.SELECT);
@@ -156,23 +214,23 @@ var Ie = function() {
156
214
  }]) }, [e._t("default", function() {
157
215
  return [l("span", { staticClass: "b-listbox-single-select-option__text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? l("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
158
216
  }, null, e.option), l("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [l("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
159
- }, Be = [], Re = /* @__PURE__ */ R(
217
+ }, Ie = [], Be = /* @__PURE__ */ N(
218
+ Le,
160
219
  Ae,
161
220
  Ie,
162
- Be,
163
221
  !1,
164
222
  null,
165
223
  "092ed5ee",
166
224
  null,
167
225
  null
168
226
  );
169
- const ke = Re.exports, W = ({ items: t, isOptionDisabled: e }, l) => {
170
- const s = r(() => t.value.length - 1), n = C(0);
171
- de(() => {
172
- e && (n.value = t.value.findIndex((m) => !e(m)));
227
+ const Re = Be.exports, te = ({ items: t, isOptionDisabled: e }, l) => {
228
+ const s = r(() => t.value.length - 1), n = h(0);
229
+ J(() => {
230
+ e && (n.value = t.value.findIndex((f) => !e(f)));
173
231
  });
174
- const c = (m) => !e || !!e && e(t.value[m]), v = (m) => !e || !!e && !e(t.value[m]), u = (m) => {
175
- switch (m) {
232
+ const o = (f) => !e || !!e && e(t.value[f]), _ = (f) => !e || !!e && !e(t.value[f]), c = (f) => {
233
+ switch (f) {
176
234
  case "increase":
177
235
  n.value += 1;
178
236
  break;
@@ -180,47 +238,47 @@ const ke = Re.exports, W = ({ items: t, isOptionDisabled: e }, l) => {
180
238
  n.value -= 1;
181
239
  break;
182
240
  }
183
- }, d = ({ edgeCaseItem: m, isItemBeforeEdgeCaseItem: O }, T, L) => {
184
- n.value !== m && (O ? v(m) && u(L) : (u(L), c(n.value) && T()), l(n.value));
185
- }, _ = () => {
186
- const m = n.value === s.value - 2;
187
- d(
241
+ }, v = ({ edgeCaseItem: f, isItemBeforeEdgeCaseItem: T }, I, A) => {
242
+ n.value !== f && (T ? _(f) && c(A) : (c(A), o(n.value) && I()), l(n.value));
243
+ }, b = () => {
244
+ const f = n.value === s.value - 2;
245
+ v(
188
246
  {
189
- isItemBeforeEdgeCaseItem: m,
247
+ isItemBeforeEdgeCaseItem: f,
190
248
  edgeCaseItem: s.value
191
249
  },
192
- _,
250
+ b,
193
251
  "increase"
194
252
  /* INCREASE */
195
253
  );
196
- }, x = () => {
197
- const m = n.value === 1;
198
- d(
254
+ }, S = () => {
255
+ const f = n.value === 1;
256
+ v(
199
257
  {
200
258
  edgeCaseItem: 0,
201
- isItemBeforeEdgeCaseItem: m
259
+ isItemBeforeEdgeCaseItem: f
202
260
  },
203
- x,
261
+ S,
204
262
  "decrease"
205
263
  /* DECREASE */
206
264
  );
207
265
  };
208
266
  return {
209
267
  moveToFirstElement: () => {
210
- n.value = 0, c(n.value) ? _() : l(n.value);
268
+ n.value = 0, o(n.value) ? b() : l(n.value);
211
269
  },
212
270
  moveToLastElement: () => {
213
- n.value = s.value, c(n.value) ? x() : l(n.value);
271
+ n.value = s.value, o(n.value) ? S() : l(n.value);
214
272
  },
215
- moveToNextElement: _,
216
- moveToPreviousElement: x
273
+ moveToNextElement: b,
274
+ moveToPreviousElement: S
217
275
  };
218
- }, De = k({
276
+ }, ke = D({
219
277
  name: "bento-listbox-single-select",
220
278
  components: {
221
- BentoListboxSingleSelectOption: ke
279
+ BentoListboxSingleSelectOption: Re
222
280
  },
223
- directives: { BentoKeyboardNavigationDirective: G },
281
+ directives: { BentoKeyboardNavigationDirective: q },
224
282
  inheritAttrs: !1,
225
283
  props: {
226
284
  /**
@@ -257,76 +315,76 @@ const ke = Re.exports, W = ({ items: t, isOptionDisabled: e }, l) => {
257
315
  default: void 0
258
316
  }
259
317
  },
260
- emits: [o.SELECT, o.ENTER, o.SPACE, o.TAB],
318
+ emits: [i.SELECT, i.ENTER, i.SPACE, i.TAB],
261
319
  setup(t, { emit: e, slots: l }) {
262
- const s = C([]), n = (y) => (m) => {
263
- e(y, m);
264
- }, c = (y) => s.value[y].$el.focus(), { moveToNextElement: v, moveToPreviousElement: u, moveToFirstElement: d, moveToLastElement: _ } = W(
320
+ const s = h([]), n = (p) => (f) => {
321
+ e(p, f);
322
+ }, o = (p) => s.value[p].$el.focus(), { moveToNextElement: _, moveToPreviousElement: c, moveToFirstElement: v, moveToLastElement: b } = te(
265
323
  {
266
- items: _e(t, "items"),
324
+ items: Z(t, "items"),
267
325
  isOptionDisabled: t.isOptionDisabled
268
326
  },
269
- c
270
- ), x = {
271
- [h.ARROW_UP]: u,
272
- [h.ARROW_DOWN]: v,
273
- [h.HOME]: d,
274
- [h.END]: _
275
- }, E = {
276
- [o.SELECT]: n(o.SELECT),
277
- [o.SPACE]: n(o.SPACE),
278
- [o.TAB]: n(o.TAB),
279
- [o.ENTER]: n(o.ENTER)
327
+ o
328
+ ), S = {
329
+ [B.ARROW_UP]: c,
330
+ [B.ARROW_DOWN]: _,
331
+ [B.HOME]: v,
332
+ [B.END]: b
333
+ }, L = {
334
+ [i.SELECT]: n(i.SELECT),
335
+ [i.SPACE]: n(i.SPACE),
336
+ [i.TAB]: n(i.TAB),
337
+ [i.ENTER]: n(i.ENTER)
280
338
  };
281
339
  return {
282
340
  // Enums
283
- BentoListboxEvent: o,
341
+ BentoListboxEvent: i,
284
342
  // Values
285
343
  listboxItemRef: s,
286
344
  slots: l,
287
345
  // Methods
288
346
  onOptionSelected: n,
289
347
  // Keyboard navigation
290
- listboxListeners: x,
291
- listboxOptionListeners: E
348
+ listboxListeners: S,
349
+ listboxOptionListeners: L
292
350
  };
293
351
  }
294
352
  });
295
- var Ne = function() {
353
+ var De = function() {
296
354
  var e = this, l = e._self._c;
297
355
  return e._self._setupProxy, l("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }] }, e.listboxListeners), e._l(e.items, function(s) {
298
- return l("bento-listbox-single-select-option", e._g({ key: s.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: s, disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, selected: s.value === e.selectedValue }, scopedSlots: e._u([e._l(e.slots, function(n, c) {
299
- return { key: c, fn: function(v) {
300
- return [e._t(c, null, null, v)];
356
+ return l("bento-listbox-single-select-option", e._g({ key: s.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: s, disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, selected: s.value === e.selectedValue }, scopedSlots: e._u([e._l(e.slots, function(n, o) {
357
+ return { key: o, fn: function(_) {
358
+ return [e._t(o, null, null, _)];
301
359
  } };
302
360
  })], null, !0) }, e.listboxOptionListeners));
303
361
  }), 1);
304
- }, $e = [], Pe = /* @__PURE__ */ R(
362
+ }, Ne = [], Pe = /* @__PURE__ */ N(
363
+ ke,
305
364
  De,
306
365
  Ne,
307
- $e,
308
366
  !1,
309
367
  null,
310
368
  null,
311
369
  null,
312
370
  null
313
371
  );
314
- const we = Pe.exports;
315
- var q = /* @__PURE__ */ ((t) => (t.DISABLED = "disabled", t))(q || {}), N = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.UNSELECT_CATEGORY = "unselect-category", t))(N || {});
316
- const Me = {
372
+ const Me = Pe.exports;
373
+ var le = /* @__PURE__ */ ((t) => (t.DISABLED = "disabled", t))(le || {}), G = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.UNSELECT_CATEGORY = "unselect-category", t))(G || {});
374
+ const $e = {
317
375
  "en-US": {
318
376
  categoryClosed: "{category} closed",
319
377
  categoryOpened: "{category} opened"
320
378
  }
321
- }, Fe = k({
322
- i18n: { messages: Me },
379
+ }, we = D({
380
+ i18n: { messages: $e },
323
381
  name: "bento-listbox-multi-select-category",
324
382
  components: {
325
- BentoCheckbox: U,
326
- BentoTypography: $,
327
- BentoListboxOption: P,
328
- ChevronDownIcon: fe,
329
- ChevronUpIcon: ge
383
+ BentoCheckbox: j,
384
+ BentoTypography: F,
385
+ BentoListboxOption: U,
386
+ ChevronDownIcon: ye,
387
+ ChevronUpIcon: Ee
330
388
  },
331
389
  props: {
332
390
  /**
@@ -363,57 +421,57 @@ const Me = {
363
421
  default: () => []
364
422
  }
365
423
  },
366
- emits: [N.SELECT_CATEGORY, N.UNSELECT_CATEGORY],
424
+ emits: [G.SELECT_CATEGORY, G.UNSELECT_CATEGORY],
367
425
  setup(t, { emit: e }) {
368
- const l = C(!1), { t: s } = F(), n = (f) => t.isOptionDisabled ? t.isOptionDisabled(f) : !1, c = r(
369
- () => t.category.items.every((f) => n(f))
370
- ), v = r(() => ({
371
- [`b-listbox-multi-select-category--${q.DISABLED}`]: c.value
372
- })), u = (f) => {
373
- f.preventDefault(), l.value = !l.value;
374
- }, d = (f) => {
375
- var A;
376
- const S = n(f), p = ((A = t.selectedItemsList) == null ? void 0 : A.includes(f.value)) || !1;
377
- return { isDisabled: S, isPreSelected: p };
378
- }, _ = r(
379
- () => t.category.items.filter((f) => {
380
- const { isDisabled: S, isPreSelected: p } = d(f);
381
- return S && p || !S;
426
+ const l = h(!1), { t: s } = K(), n = (d) => t.isOptionDisabled ? t.isOptionDisabled(d) : !1, o = r(
427
+ () => t.category.items.every((d) => n(d))
428
+ ), _ = r(() => ({
429
+ [`b-listbox-multi-select-category--${le.DISABLED}`]: o.value
430
+ })), c = (d) => {
431
+ d.preventDefault(), l.value = !l.value;
432
+ }, v = (d) => {
433
+ var x;
434
+ const y = n(d), g = ((x = t.selectedItemsList) == null ? void 0 : x.includes(d.value)) || !1;
435
+ return { isDisabled: y, isPreSelected: g };
436
+ }, b = r(
437
+ () => t.category.items.filter((d) => {
438
+ const { isDisabled: y, isPreSelected: g } = v(d);
439
+ return y && g || !y;
382
440
  })
383
- ), x = r(
441
+ ), S = r(
384
442
  () => {
385
- var f;
386
- return (f = _.value) == null ? void 0 : f.filter(
387
- ({ value: S }) => {
388
- var p;
389
- return (p = t.selectedItemsList) == null ? void 0 : p.includes(S);
443
+ var d;
444
+ return (d = b.value) == null ? void 0 : d.filter(
445
+ ({ value: y }) => {
446
+ var g;
447
+ return (g = t.selectedItemsList) == null ? void 0 : g.includes(y);
390
448
  }
391
449
  );
392
450
  }
393
- ), E = r(() => {
394
- const f = l.value ? "categoryOpened" : "categoryClosed";
395
- return s(f, { category: t.category.label });
396
- }), y = () => {
397
- e(N.SELECT_CATEGORY);
398
- }, m = () => {
399
- e(N.UNSELECT_CATEGORY);
400
- }, { isAllSelected: O, isIndeterminate: T, toggleSelectAll: L } = K(
401
- x,
402
- _,
403
- y,
404
- m
451
+ ), L = r(() => {
452
+ const d = l.value ? "categoryOpened" : "categoryClosed";
453
+ return s(d, { category: t.category.label });
454
+ }), p = () => {
455
+ e(G.SELECT_CATEGORY);
456
+ }, f = () => {
457
+ e(G.UNSELECT_CATEGORY);
458
+ }, { isAllSelected: T, isIndeterminate: I, toggleSelectAll: A } = ee(
459
+ S,
460
+ b,
461
+ p,
462
+ f
405
463
  );
406
464
  return {
407
465
  // Values
408
- chevronTitle: E,
409
- conditionalClass: v,
410
- hasAllPropsDisabled: c,
466
+ chevronTitle: L,
467
+ conditionalClass: _,
468
+ hasAllPropsDisabled: o,
411
469
  isOpen: l,
412
- isAllSelected: O,
413
- isIndeterminate: T,
470
+ isAllSelected: T,
471
+ isIndeterminate: I,
414
472
  // Methods
415
- toggleOpen: u,
416
- toggleSelectAll: L
473
+ toggleOpen: c,
474
+ toggleSelectAll: A
417
475
  };
418
476
  }
419
477
  });
@@ -422,25 +480,25 @@ var Ge = function() {
422
480
  return e._self._setupProxy, l("div", [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass }, [l("bento-checkbox", { attrs: { "model-value": e.isAllSelected, indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, "aria-label": e.category.label, value: e.category.value }, on: { "update:model-value": e.toggleSelectAll } }), l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { el: "span" } }, [e._v(" " + e._s(e.category.label) + " ")]), l("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "data-testid": "toggle-listbox" }, on: { "!click": function(s) {
423
481
  return e.toggleOpen.apply(null, arguments);
424
482
  } } }, [e.isOpen ? l("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : l("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), l("div", { directives: [{ name: "show", rawName: "v-show", value: e.isOpen, expression: "isOpen" }] }, [e._t("default")], 2)], 1);
425
- }, Ue = [], Ye = /* @__PURE__ */ R(
426
- Fe,
483
+ }, Fe = [], Ue = /* @__PURE__ */ N(
484
+ we,
427
485
  Ge,
428
- Ue,
486
+ Fe,
429
487
  !1,
430
488
  null,
431
489
  "360ce3ac",
432
490
  null,
433
491
  null
434
492
  );
435
- const Ve = Ye.exports;
436
- var B = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", t.UNSELECT_CATEGORY = "unselect-category", t))(B || {});
437
- const He = k({
493
+ const Ye = Ue.exports;
494
+ var k = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", t.UNSELECT_CATEGORY = "unselect-category", t))(k || {});
495
+ const Ve = D({
438
496
  name: "listbox-multi-select-options",
439
497
  components: {
440
- BentoCheckbox: U,
441
- BentoListboxOption: P,
442
- BentoTypography: $,
443
- ListboxMultiSelectCategory: Ve
498
+ BentoCheckbox: j,
499
+ BentoListboxOption: U,
500
+ BentoTypography: F,
501
+ ListboxMultiSelectCategory: Ye
444
502
  },
445
503
  props: {
446
504
  /**
@@ -494,20 +552,20 @@ const He = k({
494
552
  }
495
553
  },
496
554
  emits: [
497
- B.TOGGLE_CHECKBOX_SELECTION,
498
- B.SELECT_CATEGORY,
499
- B.UNSELECT_CATEGORY
555
+ k.TOGGLE_CHECKBOX_SELECTION,
556
+ k.SELECT_CATEGORY,
557
+ k.UNSELECT_CATEGORY
500
558
  ],
501
559
  setup(t, { emit: e }) {
502
- const l = (d) => {
503
- e(B.TOGGLE_CHECKBOX_SELECTION, d);
504
- }, s = (d) => !!d.items, n = (d) => {
505
- const _ = t.isMultiLevel && t.searching;
506
- return d.description && (!t.isMultiLevel || _);
507
- }, c = (d) => d.items ? !!d.items.find((_) => t.selectedItemsList.includes(_.value)) : t.selectedItemsList.includes(d.value), v = (d, _) => {
508
- if (s(_))
509
- return e(d ? B.SELECT_CATEGORY : B.UNSELECT_CATEGORY, _);
510
- l(_.value);
560
+ const l = (v) => {
561
+ e(k.TOGGLE_CHECKBOX_SELECTION, v);
562
+ }, s = (v) => !!v.items, n = (v) => {
563
+ const b = t.isMultiLevel && t.searching;
564
+ return v.description && (!t.isMultiLevel || b);
565
+ }, o = (v) => v.items ? !!v.items.find((b) => t.selectedItemsList.includes(b.value)) : t.selectedItemsList.includes(v.value), _ = (v, b) => {
566
+ if (s(b))
567
+ return e(v ? k.SELECT_CATEGORY : k.UNSELECT_CATEGORY, b);
568
+ l(b.value);
511
569
  };
512
570
  return {
513
571
  // Values
@@ -516,17 +574,17 @@ const He = k({
516
574
  })),
517
575
  // Methods
518
576
  isCategory: s,
519
- isOptionSelected: c,
577
+ isOptionSelected: o,
520
578
  shouldShowDescription: n,
521
579
  toggleCheckboxSelection: l,
522
- selectSearch: v,
580
+ selectSearch: _,
523
581
  // Enums
524
- BentoListboxEvent: o,
525
- ListboxMultiSelectOptionsEvent: B
582
+ BentoListboxEvent: i,
583
+ ListboxMultiSelectOptionsEvent: k
526
584
  };
527
585
  }
528
586
  });
529
- var Ke = function() {
587
+ var ze = function() {
530
588
  var e = this, l = e._self._c;
531
589
  return e._self._setupProxy, l("div", e._l(e.items, function(s) {
532
590
  return l("div", { key: `selected-${s.value}` }, [e.searching && e.isMultiLevel ? [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null } }, [l("bento-checkbox", { attrs: { "model-value": e.isOptionSelected(s), "aria-label": s.label, disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, value: s.value }, on: { "update:model-value": (n) => e.selectSearch(n, s) } }), e._t("default", function() {
@@ -541,9 +599,9 @@ var Ke = function() {
541
599
  return [l("span", { staticClass: "b-listbox-multi-select__option-text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(s.label))]), e.shouldShowDescription(s) ? l("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(s.description) + " ")]) : e._e()], 1)];
542
600
  }, null, s)], 2)]], 2);
543
601
  }), 0);
544
- }, We = [], qe = /* @__PURE__ */ R(
545
- He,
546
- Ke,
602
+ }, We = [], Ke = /* @__PURE__ */ N(
603
+ Ve,
604
+ ze,
547
605
  We,
548
606
  !1,
549
607
  null,
@@ -551,22 +609,22 @@ var Ke = function() {
551
609
  null,
552
610
  null
553
611
  );
554
- const ze = qe.exports, je = {
612
+ const qe = Ke.exports, je = {
555
613
  "en-US": {
556
614
  allSelected: "All selected ({total})",
557
615
  numberOfTotalSelected: "{number} of {total} selected",
558
616
  selectAll: "Select all ({total})"
559
617
  }
560
- }, Xe = k({
618
+ }, He = D({
561
619
  i18n: { messages: je },
562
620
  name: "bento-listbox-multi-select",
563
621
  components: {
564
- BentoCheckbox: U,
565
- BentoListboxOption: P,
566
- BentoTypography: $,
567
- ListboxMultiSelectOptions: ze
622
+ BentoCheckbox: j,
623
+ BentoListboxOption: U,
624
+ BentoTypography: F,
625
+ ListboxMultiSelectOptions: qe
568
626
  },
569
- directives: { BentoKeyboardNavigationDirective: G },
627
+ directives: { BentoKeyboardNavigationDirective: q },
570
628
  props: {
571
629
  /**
572
630
  * Function that allows the options to be disabled
@@ -608,145 +666,145 @@ const ze = qe.exports, je = {
608
666
  default: () => []
609
667
  }
610
668
  },
611
- emits: [o.SELECT],
669
+ emits: [i.SELECT],
612
670
  setup(t, { emit: e, slots: l }) {
613
- const { t: s } = F(), n = C(null), c = C(null), v = C(null), u = C();
614
- be(
671
+ const { t: s } = K(), n = h(null), o = h(null), _ = h(null), c = h();
672
+ Q(
615
673
  () => t.selectedValues,
616
674
  () => {
617
- u.value = [...t.selectedValues ?? []];
675
+ c.value = [...t.selectedValues ?? []];
618
676
  },
619
677
  {
620
678
  immediate: !0
621
679
  }
622
680
  );
623
- const d = r(() => !!t.items.find(({ items: i }) => !!i)), _ = r(() => d.value ? t.items.reduce((i, a) => (a.items ? i.push(...a.items.flat()) : i.push(a), i), []) : t.items), x = (i) => {
624
- var b;
625
- const a = t.isOptionDisabled(i), g = ((b = u.value) == null ? void 0 : b.includes(i.value)) || !1;
626
- return { isDisabled: a, isPreSelected: g };
627
- }, E = r(
628
- () => t.searching && d ? t.items : _.value.filter((i) => {
629
- const { isDisabled: a, isPreSelected: g } = x(i);
630
- return a && g || !a;
681
+ const v = r(() => !!t.items.find(({ items: a }) => !!a)), b = r(() => v.value ? t.items.reduce((a, u) => (u.items ? a.push(...u.items.flat()) : a.push(u), a), []) : t.items), S = (a) => {
682
+ var m;
683
+ const u = t.isOptionDisabled(a), E = ((m = c.value) == null ? void 0 : m.includes(a.value)) || !1;
684
+ return { isDisabled: u, isPreSelected: E };
685
+ }, L = r(
686
+ () => t.searching && v ? t.items : b.value.filter((a) => {
687
+ const { isDisabled: u, isPreSelected: E } = S(a);
688
+ return u && E || !u;
631
689
  })
632
- ), y = r(
690
+ ), p = r(
633
691
  () => {
634
- var i;
635
- return (i = E.value) == null ? void 0 : i.filter((a) => {
636
- var g;
637
- return a.items && d.value && t.searching ? a.items.filter(
638
- (I) => (t.selectedValues ?? []).includes(
639
- I.value
692
+ var a;
693
+ return (a = L.value) == null ? void 0 : a.filter((u) => {
694
+ var E;
695
+ return u.items && v.value && t.searching ? u.items.filter(
696
+ (R) => (t.selectedValues ?? []).includes(
697
+ R.value
640
698
  )
641
- ).length === a.items.length : (g = u.value) == null ? void 0 : g.includes(a.value);
699
+ ).length === u.items.length : (E = c.value) == null ? void 0 : E.includes(u.value);
642
700
  });
643
701
  }
644
- ), m = () => d.value && !t.searching ? E.value.length : t.items.length, O = r(() => {
645
- var g;
646
- const i = m(), a = ((g = y.value) == null ? void 0 : g.length) || 0;
647
- return a === 0 ? s("selectAll", { total: i }) : a === i ? s("allSelected", { total: i }) : s("numberOfTotalSelected", { number: a, total: i });
648
- }), T = (i) => {
649
- const a = (b) => {
650
- const { isDisabled: I, isPreSelected: M } = x(b);
651
- return I && M || !I;
652
- }, g = i.filter(a).filter((b) => !u.value.includes(b.value)).map(({ value: b }) => b);
653
- u.value = [...u.value, ...g], e(o.SELECT, u.value);
654
- }, L = (i) => {
655
- const a = (b) => {
656
- const { isDisabled: I, isPreSelected: M } = x(b);
657
- return !(I && M);
658
- }, g = i.filter(a).map(({ value: b }) => b);
659
- u.value = u.value.filter((b) => !(g != null && g.includes(b))), e(o.SELECT, u.value);
660
- }, f = () => {
661
- T(_.value);
662
- }, S = () => {
663
- L(_.value);
664
- }, { isAllSelected: p, isIndeterminate: A, toggleSelectAll: z } = K(
665
- y,
666
- E,
667
- f,
668
- S
669
- ), j = (i) => {
670
- T(i.items);
671
- }, X = (i) => {
672
- L(i.items);
673
- }, Z = (i, a) => {
674
- let g = !1;
675
- u.value = u.value.filter((b) => a === b ? (g = !0, !1) : !0), g || u.value.push(a), e(i, u.value);
676
- }, w = r(() => {
677
- const i = (b) => u.value.includes(b.value), a = (b) => !!b.find((I) => i(I));
678
- return t.items.filter((b) => b.items && a(b.items) ? !0 : i(b));
679
- }), J = r(() => {
680
- var i;
681
- return ((i = w.value) == null ? void 0 : i.length) > 0;
682
- }), Q = r(
702
+ ), f = () => v.value && !t.searching ? L.value.length : t.items.length, T = r(() => {
703
+ var E;
704
+ const a = f(), u = ((E = p.value) == null ? void 0 : E.length) || 0;
705
+ return u === 0 ? s("selectAll", { total: a }) : u === a ? s("allSelected", { total: a }) : s("numberOfTotalSelected", { number: u, total: a });
706
+ }), I = (a) => {
707
+ const u = (m) => {
708
+ const { isDisabled: R, isPreSelected: W } = S(m);
709
+ return R && W || !R;
710
+ }, E = a.filter(u).filter((m) => !c.value.includes(m.value)).map(({ value: m }) => m);
711
+ c.value = [...c.value, ...E], e(i.SELECT, c.value);
712
+ }, A = (a) => {
713
+ const u = (m) => {
714
+ const { isDisabled: R, isPreSelected: W } = S(m);
715
+ return !(R && W);
716
+ }, E = a.filter(u).map(({ value: m }) => m);
717
+ c.value = c.value.filter((m) => !(E != null && E.includes(m))), e(i.SELECT, c.value);
718
+ }, d = () => {
719
+ I(b.value);
720
+ }, y = () => {
721
+ A(b.value);
722
+ }, { isAllSelected: g, isIndeterminate: x, toggleSelectAll: C } = ee(
723
+ p,
724
+ L,
725
+ d,
726
+ y
727
+ ), M = (a) => {
728
+ I(a.items);
729
+ }, Y = (a) => {
730
+ A(a.items);
731
+ }, V = (a, u) => {
732
+ let E = !1;
733
+ c.value = c.value.filter((m) => u === m ? (E = !0, !1) : !0), E || c.value.push(u), e(a, c.value);
734
+ }, $ = r(() => {
735
+ const a = (m) => c.value.includes(m.value), u = (m) => !!m.find((R) => a(R));
736
+ return t.items.filter((m) => m.items && u(m.items) ? !0 : a(m));
737
+ }), z = r(() => {
738
+ var a;
739
+ return ((a = $.value) == null ? void 0 : a.length) > 0;
740
+ }), O = r(
683
741
  () => {
684
- var i, a;
685
- return ((i = y.value) == null ? void 0 : i.length) === ((a = _.value) == null ? void 0 : a.length);
742
+ var a, u;
743
+ return ((a = p.value) == null ? void 0 : a.length) === ((u = b.value) == null ? void 0 : u.length);
686
744
  }
687
- ), ee = r(
745
+ ), w = r(
688
746
  () => n.value ? [n.value] : []
689
- ), te = r(
747
+ ), se = r(
690
748
  () => {
691
- var i, a;
692
- return (a = (i = c.value) == null ? void 0 : i.$children) != null && a.length ? c.value.$children : [];
749
+ var a, u;
750
+ return (u = (a = o.value) == null ? void 0 : a.$children) != null && u.length ? o.value.$children : [];
693
751
  }
694
- ), se = r(
752
+ ), ne = r(
695
753
  () => {
696
- var i, a;
697
- return (a = (i = v.value) == null ? void 0 : i.$children) != null && a.length ? v.value.$children : [];
754
+ var a, u;
755
+ return (u = (a = _.value) == null ? void 0 : a.$children) != null && u.length ? _.value.$children : [];
698
756
  }
699
- ), le = r(() => ({ label: O, value: p })), ne = r(() => [
700
- le,
701
- ...w.value,
702
- ..._.value
703
- ]), oe = (i) => {
757
+ ), oe = r(() => ({ label: T, value: g })), ie = r(() => [
758
+ oe,
759
+ ...$.value,
760
+ ...b.value
761
+ ]), ae = (a) => {
704
762
  [
705
- ...ee.value,
706
- ...te.value,
707
- ...se.value
708
- ][i].$el.focus();
709
- }, { moveToNextElement: ie, moveToPreviousElement: ae, moveToFirstElement: ce, moveToLastElement: re } = W(
763
+ ...w.value,
764
+ ...se.value,
765
+ ...ne.value
766
+ ][a].$el.focus();
767
+ }, { moveToNextElement: ce, moveToPreviousElement: re, moveToFirstElement: ue, moveToLastElement: de } = te(
710
768
  {
711
- items: C(ne),
769
+ items: h(ie),
712
770
  isOptionDisabled: t.isOptionDisabled
713
771
  },
714
- oe
715
- ), ue = {
716
- [h.ARROW_UP]: ae,
717
- [h.ARROW_DOWN]: ie,
718
- [h.HOME]: ce,
719
- [h.END]: re
772
+ ae
773
+ ), be = {
774
+ [B.ARROW_UP]: re,
775
+ [B.ARROW_DOWN]: ce,
776
+ [B.HOME]: ue,
777
+ [B.END]: de
720
778
  };
721
779
  return {
722
780
  // Refs
723
781
  selectAllListboxItemsRef: n,
724
- selectedListboxItemsRef: c,
725
- listboxItemsRef: v,
782
+ selectedListboxItemsRef: o,
783
+ listboxItemsRef: _,
726
784
  // Values
727
- isAllSelected: p,
728
- isAllItemsIncludingDisabled: Q,
729
- isAnOptionSelected: J,
730
- isIndeterminate: A,
731
- isMultiLevelSelect: d,
732
- flattenedItemsList: _,
733
- selectedItemsList: u,
734
- selectAllCheckboxText: O,
735
- selectedOptions: w,
785
+ isAllSelected: g,
786
+ isAllItemsIncludingDisabled: O,
787
+ isAnOptionSelected: z,
788
+ isIndeterminate: x,
789
+ isMultiLevelSelect: v,
790
+ flattenedItemsList: b,
791
+ selectedItemsList: c,
792
+ selectAllCheckboxText: T,
793
+ selectedOptions: $,
736
794
  slots: l,
737
795
  // Enums
738
- BentoListboxEvent: o,
796
+ BentoListboxEvent: i,
739
797
  // Methods
740
- selectAllCategory: j,
741
- toggleCheckboxSelection: Z,
742
- toggleSelectAll: z,
743
- unselectAllCategory: X,
798
+ selectAllCategory: M,
799
+ toggleCheckboxSelection: V,
800
+ toggleSelectAll: C,
801
+ unselectAllCategory: Y,
744
802
  // Events
745
- listboxListeners: ue
803
+ listboxListeners: be
746
804
  };
747
805
  }
748
806
  });
749
- var Ze = function() {
807
+ var Xe = function() {
750
808
  var e = this, l = e._self._c;
751
809
  return e._self._setupProxy, l("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select" }, e.listboxListeners), [l("bento-listbox-option", { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option" }, [l("bento-checkbox", { attrs: { "aria-label": e.selectAllCheckboxText, "model-value": e.isAllSelected, indeterminate: e.isIndeterminate }, on: { "update:model-value": e.toggleSelectAll } }), l("bento-typography", { attrs: { el: "span" } }, [e._v(" " + e._s(e.selectAllCheckboxText) + " ")])], 1), e.isAnOptionSelected ? l("div", [l("hr", { staticClass: "b-listbox-multi-select__divider" }), l("listbox-multi-select-options", { ref: "selectedListboxItemsRef", attrs: { items: e.selectedOptions, "is-option-disabled": e.isOptionDisabled, "is-multi-level": e.isMultiLevelSelect, searching: e.searching, "selected-items-list": e.selectedItemsList }, on: e._d({ "select-category": e.selectAllCategory, "unselect-category": e.unselectAllCategory, "toggle-checkbox-selection": function(s) {
752
810
  return e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, s);
@@ -757,8 +815,8 @@ var Ze = function() {
757
815
  }, e.BentoListboxEvent.ENTER, function(s) {
758
816
  return e.toggleCheckboxSelection(e.BentoListboxEvent.ENTER, s);
759
817
  }]), scopedSlots: e._u([e._l(e.slots, function(s, n) {
760
- return { key: n, fn: function(c) {
761
- return [e._t(n, null, null, c)];
818
+ return { key: n, fn: function(o) {
819
+ return [e._t(n, null, null, o)];
762
820
  } };
763
821
  })], null, !0) })], 1) : e._e(), l("div", { directives: [{ name: "show", rawName: "v-show", value: !e.isAllItemsIncludingDisabled, expression: "!isAllItemsIncludingDisabled" }] }, [l("hr", { staticClass: "b-listbox-multi-select__divider" }), l("listbox-multi-select-options", { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": e.isMultiLevelSelect, searching: e.searching, "selected-items-list": e.selectedItemsList }, on: e._d({ "toggle-checkbox-selection": function(s) {
764
822
  return e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, s);
@@ -769,13 +827,13 @@ var Ze = function() {
769
827
  }, e.BentoListboxEvent.ENTER, function(s) {
770
828
  return e.toggleCheckboxSelection(e.BentoListboxEvent.ENTER, s);
771
829
  }]), scopedSlots: e._u([e._l(e.slots, function(s, n) {
772
- return { key: n, fn: function(c) {
773
- return [e._t(n, null, null, c)];
830
+ return { key: n, fn: function(o) {
831
+ return [e._t(n, null, null, o)];
774
832
  } };
775
833
  })], null, !0) })], 1)], 1);
776
- }, Je = [], Qe = /* @__PURE__ */ R(
834
+ }, Je = [], Qe = /* @__PURE__ */ N(
835
+ He,
777
836
  Xe,
778
- Ze,
779
837
  Je,
780
838
  !1,
781
839
  null,
@@ -783,27 +841,35 @@ var Ze = function() {
783
841
  null,
784
842
  null
785
843
  );
786
- const H = Qe.exports, et = {
844
+ const X = Qe.exports, Ze = {
787
845
  "en-US": {
788
846
  showMore: "Show more",
789
847
  loading: "Loading"
790
848
  }
791
- }, tt = k({
849
+ }, et = 36, tt = D({
792
850
  name: "bento-listbox",
793
851
  components: {
794
- BentoListboxSingleSelect: we,
795
- BentoListboxMultiSelect: H,
796
- BentoTypography: $,
797
- BentoLoadingIndicator: ve,
798
- BentoLoadingButton: pe
852
+ BentoEmptyState: me,
853
+ BentoListboxSingleSelect: Me,
854
+ BentoListboxMultiSelect: X,
855
+ BentoTypography: F,
856
+ BentoLoadingIndicator: _e,
857
+ BentoLoadingButton: Se
799
858
  },
800
- directives: { BentoKeyboardNavigationDirective: G },
801
- i18n: { messages: et },
859
+ directives: { BentoKeyboardNavigationDirective: q },
860
+ i18n: { messages: Ze },
802
861
  props: {
803
862
  /**
804
863
  * Defines a string value that labels an interactive element.
805
864
  */
806
865
  ariaLabel: { type: String, default: null },
866
+ /**
867
+ * Empty state props that will be used with the inner empty state component to be displayed when no search results are found.
868
+ */
869
+ emptyState: {
870
+ type: Object,
871
+ default: void 0
872
+ },
807
873
  /**
808
874
  * Indicates whether there are more items to load
809
875
  */
@@ -847,8 +913,8 @@ const H = Qe.exports, et = {
847
913
  */
848
914
  lazyLoadType: {
849
915
  type: String,
850
- default: D.NONE,
851
- validator: (t) => Object.values(D).includes(t)
916
+ default: P.NONE,
917
+ validator: (t) => Object.values(P).includes(t)
852
918
  },
853
919
  /**
854
920
  * If enabled, the user will be able to select multiple items.
@@ -864,7 +930,7 @@ const H = Qe.exports, et = {
864
930
  *
865
931
  * If enabled, hides the "Select all" checkbox in "multiple" mode.
866
932
  */
867
- searching: H.props.searching,
933
+ searching: X.props.searching,
868
934
  /**
869
935
  * The `input` value.
870
936
  * Providing an empty string or empty array will select no options.
@@ -873,97 +939,125 @@ const H = Qe.exports, et = {
873
939
  selectedValue: {
874
940
  type: [String, Number, Array],
875
941
  default: void 0
942
+ },
943
+ /**
944
+ * Enables virtual scrolling if set to true or by providing an object with itemHeight function.
945
+ * The itemHeight function is used to calculate the height of rendered item given it's index.
946
+ */
947
+ virtualScroll: {
948
+ type: [Boolean, Object],
949
+ default: !1
876
950
  }
877
951
  },
878
952
  emits: [
879
- o.SELECT,
880
- o.SPACE,
881
- o.SHOW_MORE,
882
- o.ENTER,
883
- o.ESCAPE,
884
- o.TAB
953
+ i.SELECT,
954
+ i.SPACE,
955
+ i.SHOW_MORE,
956
+ i.ENTER,
957
+ i.ESCAPE,
958
+ i.TAB
885
959
  ],
886
960
  setup(t, { emit: e, slots: l }) {
887
- const { t: s } = F(), n = C(null), c = C([]), v = r(() => t.lazyLoadType !== D.AUTOMATIC), u = r(() => t.lazyLoadType === D.AUTOMATIC), d = r(
888
- () => v.value ? "true" : void 0
889
- ), _ = r(
890
- () => v.value && t.loading ? "true" : "false"
891
- ), x = r(
892
- () => v.value ? "polite" : void 0
893
- ), E = (p) => (A) => {
894
- e(p, A);
895
- }, y = () => {
896
- e(o.SHOW_MORE);
897
- }, m = me(() => {
898
- const p = n.value, A = p.scrollTop + p.clientHeight >= p.scrollHeight;
899
- t.hasMoreItems && A && !t.loading && y();
900
- }), O = r(() => {
901
- var p;
902
- return t.searching && ((p = t.items) == null ? void 0 : p.length) === 0;
961
+ const s = h([]), n = Z(t, "items"), { t: o } = K(), _ = r(() => t.lazyLoadType !== P.AUTOMATIC), c = r(() => t.lazyLoadType === P.AUTOMATIC), v = () => {
962
+ var O;
963
+ return typeof (t == null ? void 0 : t.virtualScroll) == "object" && ((O = t == null ? void 0 : t.virtualScroll) != null && O.itemHeight) ? t.virtualScroll.itemHeight : et;
964
+ }, {
965
+ containerRef: b,
966
+ containerProps: S,
967
+ onScroll: L,
968
+ list: p,
969
+ wrapperProps: f
970
+ } = pe(n, {
971
+ itemHeight: v(),
972
+ // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
973
+ disabled: (t == null ? void 0 : t.multiple) || (t == null ? void 0 : t.virtualScroll) === !1 || (t == null ? void 0 : t.lazyLoadType) !== "none"
903
974
  }), T = r(
904
- () => t.lazyLoadType === D.BUTTON && t.hasMoreItems
905
- ), L = r(
906
- () => t.loading ? Y.LOADING : Y.START
907
- ), f = r(() => t.loading ? s("loading") : s("showMore")), S = {
908
- [o.SELECT]: E(o.SELECT),
909
- [o.SPACE]: E(o.SPACE),
910
- [o.TAB]: E(o.TAB),
911
- [o.ENTER]: E(o.ENTER)
975
+ () => _.value ? "true" : void 0
976
+ ), I = r(
977
+ () => _.value && t.loading ? "true" : "false"
978
+ ), A = r(
979
+ () => _.value ? "polite" : void 0
980
+ ), d = (O) => (w) => {
981
+ e(O, w);
982
+ }, y = () => {
983
+ e(i.SHOW_MORE);
984
+ }, g = fe(() => {
985
+ const O = b.value, w = O.scrollTop + O.clientHeight >= O.scrollHeight;
986
+ t.hasMoreItems && w && !t.loading && y();
987
+ }), x = () => {
988
+ c.value ? g() : L();
989
+ }, C = r(() => {
990
+ var O;
991
+ return t.searching && ((O = t.items) == null ? void 0 : O.length) === 0;
992
+ }), M = r(
993
+ () => t.lazyLoadType === P.BUTTON && t.hasMoreItems
994
+ ), Y = r(
995
+ () => t.loading ? H.LOADING : H.START
996
+ ), V = r(() => t.loading ? o("loading") : o("showMore")), $ = r(() => ({
997
+ ...t.emptyState,
998
+ variant: "condensed"
999
+ })), z = {
1000
+ [i.SELECT]: d(i.SELECT),
1001
+ [i.SPACE]: d(i.SPACE),
1002
+ [i.TAB]: d(i.TAB),
1003
+ [i.ENTER]: d(i.ENTER)
912
1004
  };
913
1005
  return {
914
1006
  // Refs
915
- listboxRef: n,
916
- listboxItemRef: c,
1007
+ listboxRef: b,
1008
+ listboxItemRef: s,
917
1009
  // a11y
918
- ariaAtomic: d,
919
- ariaBusy: _,
920
- ariaLive: x,
1010
+ ariaAtomic: T,
1011
+ ariaBusy: I,
1012
+ ariaLive: A,
921
1013
  // Values
922
- hasAutomaticLazyLoader: u,
923
- isSearchResultEmpty: O,
924
- loadingButtonState: L,
1014
+ containerProps: S,
1015
+ isSearchResultEmpty: C,
1016
+ limitedEmptyStateProps: $,
1017
+ loadingButtonState: Y,
925
1018
  slots: l,
926
- shouldDisplayShowMoreButton: T,
927
- showMoreButtonText: f,
1019
+ shouldDisplayShowMoreButton: M,
1020
+ showMoreButtonText: V,
1021
+ virtualisedItems: p,
1022
+ wrapperProps: f,
928
1023
  // Enums
929
- BentoKeyboardNavigationKeyDownEvent: h,
930
- BentoListboxEvent: o,
1024
+ BentoKeyboardNavigationKeyDownEvent: B,
1025
+ BentoListboxEvent: i,
931
1026
  // Methods
932
- onOptionSelected: E,
933
- emitShowMoreOnScrollEnd: m,
1027
+ onListboxContainerScroll: x,
1028
+ onOptionSelected: d,
934
1029
  emitShowMore: y,
935
- listboxListeners: S
1030
+ listboxListeners: z
936
1031
  };
937
1032
  }
938
1033
  });
939
- var st = function() {
1034
+ var lt = function() {
940
1035
  var e = this, l = e._self._c;
941
- return e._self._setupProxy, l("div", { directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", attrs: { id: e.id, role: "listbox", tabindex: "-1", "aria-busy": e.ariaBusy, "aria-atomic": e.ariaAtomic, "aria-label": e.ariaLabel, "aria-live": e.ariaLive }, on: { scroll: () => e.hasAutomaticLazyLoader ? e.emitShowMoreOnScrollEnd() : void 0 } }, [e.isSearchResultEmpty ? l("div", { staticClass: "b-listbox__empty-search-message" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [l("bento-listbox-multi-select", e._g({ ref: "listboxItemRef", attrs: { items: e.items, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(s, n) {
942
- return { key: n, fn: function(c) {
943
- return [e._t(n, null, null, c)];
1036
+ return e._self._setupProxy, l("div", e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox", attrs: { id: e.id, role: "listbox", tabindex: "-1", "aria-busy": e.ariaBusy, "aria-atomic": e.ariaAtomic, "aria-label": e.ariaLabel, "aria-live": e.ariaLive }, on: { scroll: e.onListboxContainerScroll } }, "div", e.containerProps, !1), [l("div", e._b({}, "div", e.wrapperProps, !1), [e.isSearchResultEmpty ? l("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? l("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [l("bento-listbox-multi-select", e._g({ ref: "listboxItemRef", attrs: { items: e.items, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(s, n) {
1037
+ return { key: n, fn: function(o) {
1038
+ return [e._t(n, null, null, o)];
944
1039
  } };
945
- })], null, !0) }, e.listboxListeners))] : [l("bento-listbox-single-select", e._g({ ref: "listboxItemRef", attrs: { items: e.items, "selected-value": e.selectedValue, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(s, n) {
946
- return { key: n, fn: function(c) {
947
- return [e._t(n, null, null, c)];
1040
+ })], null, !0) }, e.listboxListeners))] : [l("bento-listbox-single-select", e._g({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "selected-value": e.selectedValue, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(s, n) {
1041
+ return { key: n, fn: function(o) {
1042
+ return [e._t(n, null, null, o)];
948
1043
  } };
949
1044
  })], null, !0) }, e.listboxListeners))], e.shouldDisplayShowMoreButton ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(s) {
950
1045
  return e.emitShowMore.apply(null, arguments);
951
- } } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-indicator")], 1) : e._e()]], 2);
952
- }, lt = [], nt = /* @__PURE__ */ R(
1046
+ } } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-indicator")], 1) : e._e()]], 2)]);
1047
+ }, st = [], nt = /* @__PURE__ */ N(
953
1048
  tt,
954
- st,
955
1049
  lt,
1050
+ st,
956
1051
  !1,
957
1052
  null,
958
- "0bc89a2b",
1053
+ "d5d56fed",
959
1054
  null,
960
1055
  null
961
1056
  );
962
- const mt = nt.exports;
1057
+ const Et = nt.exports;
963
1058
  export {
964
- o as B,
965
- Te as C,
966
- D as a,
967
- mt as b
1059
+ Et as B,
1060
+ i as a,
1061
+ P as b
968
1062
  };
969
- //# sourceMappingURL=listbox.e7bf46e4.js.map
1063
+ //# sourceMappingURL=listbox.73c38f38.js.map