@adyen/bento-vue2 1.96.1 → 1.97.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 (178) hide show
  1. package/dist/@types/index.d.ts +162 -127
  2. package/dist/action-bar.js +1 -1
  3. package/dist/ai-tag.js +1 -1
  4. package/dist/alert.js +1 -1
  5. package/dist/assets/accordion-item.css +1 -1
  6. package/dist/assets/action-bar.css +1 -1
  7. package/dist/assets/alert.css +1 -1
  8. package/dist/assets/base-modal.css +1 -1
  9. package/dist/assets/button-actions.css +1 -1
  10. package/dist/assets/calendar.css +1 -1
  11. package/dist/assets/card.css +1 -1
  12. package/dist/assets/country.css +1 -1
  13. package/dist/assets/data-grid.css +1 -1
  14. package/dist/assets/date-picker.css +1 -1
  15. package/dist/assets/date-range-picker.css +1 -1
  16. package/dist/assets/date-time-picker.css +1 -1
  17. package/dist/assets/dialog-page.css +1 -1
  18. package/dist/assets/dropdown.css +1 -1
  19. package/dist/assets/file-uploader.css +1 -1
  20. package/dist/assets/filter-bar.css +1 -1
  21. package/dist/assets/inspector.css +1 -1
  22. package/dist/assets/modal-fullscreen.css +1 -1
  23. package/dist/assets/navigation-menu-group.css +1 -1
  24. package/dist/assets/secondary-nav.css +1 -1
  25. package/dist/assets/sidepanel.css +1 -1
  26. package/dist/assets/summary-grid.css +1 -1
  27. package/dist/assets/textarea.css +1 -1
  28. package/dist/button.js +1 -1
  29. package/dist/card.js +1 -1
  30. package/dist/checkbox.js +2 -2
  31. package/dist/chunks/{action-bar.Chu-0oVy.js → action-bar.B890LCTe.js} +3 -3
  32. package/dist/chunks/{action-bar.Chu-0oVy.js.map → action-bar.B890LCTe.js.map} +1 -1
  33. package/dist/chunks/{ai-tag.DVmvni7U.js → ai-tag.C8RxACNj.js} +2 -2
  34. package/dist/chunks/{ai-tag.DVmvni7U.js.map → ai-tag.C8RxACNj.js.map} +1 -1
  35. package/dist/chunks/{alert.B4bHCE8V.js → alert.BDkEbdf4.js} +10 -10
  36. package/dist/chunks/{alert.B4bHCE8V.js.map → alert.BDkEbdf4.js.map} +1 -1
  37. package/dist/chunks/{base-modal.CC7gm9fc.js → base-modal.CDMoF3b_.js} +3 -3
  38. package/dist/chunks/{base-modal.CC7gm9fc.js.map → base-modal.CDMoF3b_.js.map} +1 -1
  39. package/dist/chunks/{button-actions-with-menu.BlOBDvdL.js → button-actions-with-menu.DqDQ_gVX.js} +2 -2
  40. package/dist/chunks/{button-actions-with-menu.BlOBDvdL.js.map → button-actions-with-menu.DqDQ_gVX.js.map} +1 -1
  41. package/dist/chunks/{button-actions.D1jRC1fs.js → button-actions.DKc63aCb.js} +122 -110
  42. package/dist/chunks/{button-actions.D1jRC1fs.js.map → button-actions.DKc63aCb.js.map} +1 -1
  43. package/dist/chunks/calendar.BckAv9N_.js +1235 -0
  44. package/dist/chunks/calendar.BckAv9N_.js.map +1 -0
  45. package/dist/chunks/{card.ErZLKN0q.js → card.ChBURa5R.js} +2 -2
  46. package/dist/chunks/{card.ErZLKN0q.js.map → card.ChBURa5R.js.map} +1 -1
  47. package/dist/chunks/{checkbox-group.CNTMMwQr.js → checkbox-group.BAjvgXlc.js} +2 -2
  48. package/dist/chunks/{checkbox-group.CNTMMwQr.js.map → checkbox-group.BAjvgXlc.js.map} +1 -1
  49. package/dist/chunks/{checkbox.BIzqX_eH.js → checkbox.BAQDBNL6.js} +18 -18
  50. package/dist/chunks/{checkbox.BIzqX_eH.js.map → checkbox.BAQDBNL6.js.map} +1 -1
  51. package/dist/chunks/{code-snippet.lcQRsLdZ.js → code-snippet.nUo9bjhC.js} +3 -3
  52. package/dist/chunks/{code-snippet.lcQRsLdZ.js.map → code-snippet.nUo9bjhC.js.map} +1 -1
  53. package/dist/chunks/{country.BEwW8TQo.js → country.nGZJwp_A.js} +2 -2
  54. package/dist/chunks/country.nGZJwp_A.js.map +1 -0
  55. package/dist/chunks/{dashboard-section.DiGQXS9L.js → dashboard-section.BDDVJpxY.js} +2 -2
  56. package/dist/chunks/{dashboard-section.DiGQXS9L.js.map → dashboard-section.BDDVJpxY.js.map} +1 -1
  57. package/dist/chunks/{dashed-underline.Cl07OQID.js → dashed-underline.CfEmbgOv.js} +2 -2
  58. package/dist/chunks/{dashed-underline.Cl07OQID.js.map → dashed-underline.CfEmbgOv.js.map} +1 -1
  59. package/dist/chunks/{data-grid-template.BVppx9kZ.js → data-grid-template.BUlLHTYe.js} +2 -2
  60. package/dist/chunks/{data-grid-template.BVppx9kZ.js.map → data-grid-template.BUlLHTYe.js.map} +1 -1
  61. package/dist/chunks/{data-grid.DQwAkw4U.js → data-grid.0OiCQjFc.js} +28 -29
  62. package/dist/chunks/{data-grid.DQwAkw4U.js.map → data-grid.0OiCQjFc.js.map} +1 -1
  63. package/dist/chunks/date-picker.CsFSskqf.js +245 -0
  64. package/dist/chunks/date-picker.CsFSskqf.js.map +1 -0
  65. package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
  66. package/dist/chunks/date-range-picker.Bczgdu5X.js +1250 -0
  67. package/dist/chunks/date-range-picker.Bczgdu5X.js.map +1 -0
  68. package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
  69. package/dist/chunks/date-time-picker.DT54TiG4.js +177 -0
  70. package/dist/chunks/date-time-picker.DT54TiG4.js.map +1 -0
  71. package/dist/chunks/{draggable-handle.DIhHtHG9.js → draggable-handle.DwJBaf5y.js} +2 -2
  72. package/dist/chunks/{draggable-handle.DIhHtHG9.js.map → draggable-handle.DwJBaf5y.js.map} +1 -1
  73. package/dist/chunks/{dropdown-tag.CuDxdSfb.js → dropdown-tag.BqSrkuwj.js} +2 -2
  74. package/dist/chunks/{dropdown-tag.CuDxdSfb.js.map → dropdown-tag.BqSrkuwj.js.map} +1 -1
  75. package/dist/chunks/dropdown.CIEm6MBB.js +2660 -0
  76. package/dist/chunks/dropdown.CIEm6MBB.js.map +1 -0
  77. package/dist/chunks/{file-uploader.CO2MeHwl.js → file-uploader.DOvQMUHC.js} +2 -2
  78. package/dist/chunks/{file-uploader.CO2MeHwl.js.map → file-uploader.DOvQMUHC.js.map} +1 -1
  79. package/dist/chunks/{filter-bar.DQ9fJXq1.js → filter-bar.DVRPM9tf.js} +318 -319
  80. package/dist/chunks/filter-bar.DVRPM9tf.js.map +1 -0
  81. package/dist/chunks/{footer-actions.CZE9dcmA.js → footer-actions.C1sXd7ti.js} +2 -2
  82. package/dist/chunks/{footer-actions.CZE9dcmA.js.map → footer-actions.C1sXd7ti.js.map} +1 -1
  83. package/dist/chunks/{form-layout-title.CXXdsiK5.js → form-layout-title.xrix5vY3.js} +2 -2
  84. package/dist/chunks/{form-layout-title.CXXdsiK5.js.map → form-layout-title.xrix5vY3.js.map} +1 -1
  85. package/dist/chunks/{header-meta.6rZdOgXD.js → header-meta.D1eb37QJ.js} +2 -2
  86. package/dist/chunks/{header-meta.6rZdOgXD.js.map → header-meta.D1eb37QJ.js.map} +1 -1
  87. package/dist/chunks/{header-with-views.4VNHbNk0.js → header-with-views.Bk6ly102.js} +8 -8
  88. package/dist/chunks/{header-with-views.4VNHbNk0.js.map → header-with-views.Bk6ly102.js.map} +1 -1
  89. package/dist/chunks/{header.BsroOD5b.js → header.CszOmM16.js} +3 -3
  90. package/dist/chunks/{header.BsroOD5b.js.map → header.CszOmM16.js.map} +1 -1
  91. package/dist/chunks/{input-field-password.CRqYWZGS.js → input-field-password.C4Wxsl16.js} +3 -3
  92. package/dist/chunks/{input-field-password.CRqYWZGS.js.map → input-field-password.C4Wxsl16.js.map} +1 -1
  93. package/dist/chunks/{input-field-phone-number.DHiuL0cF.js → input-field-phone-number.BhYTU628.js} +2 -2
  94. package/dist/chunks/{input-field-phone-number.DHiuL0cF.js.map → input-field-phone-number.BhYTU628.js.map} +1 -1
  95. package/dist/chunks/{input-field.BkQZ6Qzl.js → input-field.3tzX7t2y.js} +2 -2
  96. package/dist/chunks/{input-field.BkQZ6Qzl.js.map → input-field.3tzX7t2y.js.map} +1 -1
  97. package/dist/chunks/{input-time.BiOHvUEA.js → input-time.Bf-ZrCPX.js} +34 -34
  98. package/dist/chunks/{input-time.BiOHvUEA.js.map → input-time.Bf-ZrCPX.js.map} +1 -1
  99. package/dist/chunks/{modal-fullscreen.OS6KhVdg.js → modal-fullscreen.Dg1Hi3jB.js} +2 -2
  100. package/dist/chunks/{modal-fullscreen.OS6KhVdg.js.map → modal-fullscreen.Dg1Hi3jB.js.map} +1 -1
  101. package/dist/chunks/{modal.DHL3TGHv.js → modal.DZTEFM_E.js} +4 -4
  102. package/dist/chunks/{modal.DHL3TGHv.js.map → modal.DZTEFM_E.js.map} +1 -1
  103. package/dist/chunks/{pagination.DItyAwy1.js → pagination.C6HIPq58.js} +2 -2
  104. package/dist/chunks/{pagination.DItyAwy1.js.map → pagination.C6HIPq58.js.map} +1 -1
  105. package/dist/chunks/{rich-text-editor.D5URbwnM.js → rich-text-editor.-B96ibAd.js} +3 -3
  106. package/dist/chunks/{rich-text-editor.D5URbwnM.js.map → rich-text-editor.-B96ibAd.js.map} +1 -1
  107. package/dist/chunks/{search-bar.D-WK8eMQ.js → search-bar.DunTxVmZ.js} +5 -5
  108. package/dist/chunks/{search-bar.D-WK8eMQ.js.map → search-bar.DunTxVmZ.js.map} +1 -1
  109. package/dist/chunks/{secondary-nav.C7lEDaoj.js → secondary-nav.CGGPkYpc.js} +2 -2
  110. package/dist/chunks/{secondary-nav.C7lEDaoj.js.map → secondary-nav.CGGPkYpc.js.map} +1 -1
  111. package/dist/chunks/{selection-card-group.CiFW4AZR.js → selection-card-group.ZZ_qF1L1.js} +8 -8
  112. package/dist/chunks/{selection-card-group.CiFW4AZR.js.map → selection-card-group.ZZ_qF1L1.js.map} +1 -1
  113. package/dist/chunks/{sidepanel.B8zQp_MJ.js → sidepanel.ChuW63J7.js} +3 -3
  114. package/dist/chunks/{sidepanel.B8zQp_MJ.js.map → sidepanel.ChuW63J7.js.map} +1 -1
  115. package/dist/chunks/{summary-grid.types.CkqRXOKv.js → summary-grid.types.BnEhhDQz.js} +3 -3
  116. package/dist/chunks/summary-grid.types.BnEhhDQz.js.map +1 -0
  117. package/dist/chunks/{timeline-item.sdxvTjmS.js → timeline-item.DzMh520x.js} +3 -3
  118. package/dist/chunks/{timeline-item.sdxvTjmS.js.map → timeline-item.DzMh520x.js.map} +1 -1
  119. package/dist/chunks/{tutorial.Ba9dqb2j.js → tutorial.CkeL_7Je.js} +2 -2
  120. package/dist/chunks/{tutorial.Ba9dqb2j.js.map → tutorial.CkeL_7Je.js.map} +1 -1
  121. package/dist/chunks/use-bento-delayed-hover.D4rfUUOr.js.map +1 -1
  122. package/dist/chunks/{use-date-input-formatter.B5GQd3s2.js → use-date-input-formatter.Dq9C0nc9.js} +2 -2
  123. package/dist/chunks/{use-date-input-formatter.B5GQd3s2.js.map → use-date-input-formatter.Dq9C0nc9.js.map} +1 -1
  124. package/dist/code-snippet.js +1 -1
  125. package/dist/country.js +1 -1
  126. package/dist/dashboard-template.js +1 -1
  127. package/dist/dashed-underline.js +1 -1
  128. package/dist/data-grid-template.js +1 -1
  129. package/dist/data-grid.js +1 -1
  130. package/dist/date-picker.js +2 -2
  131. package/dist/date-range-picker.js +2 -2
  132. package/dist/date-time-picker.js +1 -1
  133. package/dist/draggable.js +1 -1
  134. package/dist/dropdown.js +10 -11
  135. package/dist/dropdown.js.map +1 -1
  136. package/dist/file-uploader.js +1 -1
  137. package/dist/filter-bar.js +1 -1
  138. package/dist/form-layout.js +1 -1
  139. package/dist/header-with-views.js +1 -1
  140. package/dist/header.js +1 -1
  141. package/dist/index.js +269 -270
  142. package/dist/index.js.map +1 -1
  143. package/dist/input-field-password.js +1 -1
  144. package/dist/input-field-phone-number.js +1 -1
  145. package/dist/input-field.js +1 -1
  146. package/dist/input-time.js +1 -1
  147. package/dist/internal.js +13 -13
  148. package/dist/menu.js +1 -1
  149. package/dist/modal-fullscreen.js +1 -1
  150. package/dist/modal.js +2 -2
  151. package/dist/pagination.js +1 -1
  152. package/dist/popover.js +1 -1
  153. package/dist/rich-text-editor.js +1 -1
  154. package/dist/search-bar.js +2 -2
  155. package/dist/secondary-nav.js +1 -1
  156. package/dist/selection-card.js +1 -1
  157. package/dist/sidepanel.js +1 -1
  158. package/dist/summary-grid.js +1 -1
  159. package/dist/timeline.js +1 -1
  160. package/dist/tutorial.js +1 -1
  161. package/dist/web-types.json +205 -2
  162. package/package.json +3 -3
  163. package/dist/assets/use-cached-selected-values.css +0 -1
  164. package/dist/chunks/calendar.D0JIbmoS.js +0 -1151
  165. package/dist/chunks/calendar.D0JIbmoS.js.map +0 -1
  166. package/dist/chunks/country.BEwW8TQo.js.map +0 -1
  167. package/dist/chunks/date-picker.BWxvyK5J.js +0 -245
  168. package/dist/chunks/date-picker.BWxvyK5J.js.map +0 -1
  169. package/dist/chunks/date-range-picker.gfRJmzXn.js +0 -1114
  170. package/dist/chunks/date-range-picker.gfRJmzXn.js.map +0 -1
  171. package/dist/chunks/date-time-picker.BIl9kFLh.js +0 -129
  172. package/dist/chunks/date-time-picker.BIl9kFLh.js.map +0 -1
  173. package/dist/chunks/dropdown.C70AlvOT.js +0 -1155
  174. package/dist/chunks/dropdown.C70AlvOT.js.map +0 -1
  175. package/dist/chunks/filter-bar.DQ9fJXq1.js.map +0 -1
  176. package/dist/chunks/summary-grid.types.CkqRXOKv.js.map +0 -1
  177. package/dist/chunks/use-cached-selected-values.D0s14AxT.js +0 -1520
  178. package/dist/chunks/use-cached-selected-values.D0s14AxT.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown.CIEm6MBB.js","sources":["../../src/composables/use-checkbox-select-all/use-checkbox-select-all.ts","../../src/composables/use-virtual-list/use-virtual-list.ts","../../src/types/listbox.ts","../../src/components/internal/listbox/components/listbox-single-select/components/listbox-single-select-category/listbox-single-select-category.vue","../../src/components/internal/listbox/components/listbox-option/listbox-option.vue","../../../ui-assets/icons-16/dist/vue/checkmark.vue","../../src/components/internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue","../../src/components/internal/listbox/composables/useListboxKeyboardNavigation.ts","../../src/components/internal/listbox/composables/use-visible-dom-options/use-visible-dom-options.ts","../../src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue","../../../ui-assets/icons-16/dist/vue/double-checkmark-small.vue","../../src/components/internal/decorative-checkbox/decorative-checkbox.vue","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.types.ts","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.types.ts","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue","../../src/components/internal/listbox/composables/use-multi-level-items/use-multi-level-items.ts","../../src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue","../../src/utils/ts/debounce/debounce.ts","../../src/components/internal/listbox/listbox.vue","../../src/components/internal/listbox/composables/use-cached-selected-values/use-cached-selected-values.ts","../../src/components/dropdown/dropdown.types.ts","../../src/components/dropdown/components/dropdown-options-container/composables/use-dropdown-options-listbox.ts","../../src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/dropdown.keys.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue","../../../ui-assets/icons-16/dist/vue/chevron-down-small.vue","../../../ui-assets/icons-16/dist/vue/chevron-up-small.vue","../../src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue","../../src/components/dropdown/composables/use-display-value.ts","../../src/components/dropdown/composables/use-keyboard-navigation.ts","../../src/components/search-bar/useSearchBarDataFilter.ts","../../src/components/dropdown/dropdown.vue"],"sourcesContent":["import { computed } from 'vue';\nimport type { ComputedRef } from 'vue';\nimport type { Fn } from '@/types/functions';\nimport type { BentoListboxMultiSelectValue, BentoListboxOptions } from '@/types/listbox';\n\n/**\n * Callback function that alllows to select all the items when called\n * @callback selectAllCallback\n */\n\n/**\n * Callback function that alllows to select all the items when called\n * @callback unselectAllCallback\n */\n\n/**\n * @typedef {Object} UseCheckboxSelectAll\n * @property {Ref<boolean>} isAllSelected - Indicates if all values are selected. Pass this to the :value property.\n * @property {Ref<boolean>} isIndeterminate - Indicates if it is in an indeterminated state (not all values are selected nor unselected). Pass this to the :indeterminate property.\n * @property {(selectedValue: boolean) => void} toggleSelectAll - Handles the select all flow, selects or unselects all and nullifies the indeterminated state. Pass this to the @input method.\n */\n\n/**\n * Composable to handle a 3 way checkbox state that allows to manage\n * a \"select all\", \"unselect all\" and an intermediate state where\n * not all are selected.\n *\n * @example\n * const checkboxVModelRef = ref<number[]>([]);\n *\n * const { isAllSelected, isIndeterminate, toggleSelectAll, updateIndeterminate } = useCheckboxSelectAll(\n * checkboxVModelRef,\n * () => { checkboxVModelRef.value = [...] // select all logic },\n * () => { checkboxVModelRef.value = [] // unselect all logic },\n * );\n * toggleSelectAll(true|false); // Hook this to the @input method\n * updateIndeterminate(totalOfAvailableItems);\n *\n *\n * @param {ComputedRef<BentoListboxMultiSelectValue>} selectedItemsList - Reference to the list of selected values\n * @param {ComputedRef<BentoListboxOptions>} items - Reference to the list of all available items in the dropdown\n * @param {selectAllCallback} selectAll - Callback function that alllows to select all the items when called\n * @param {unselectAllCallback} unselectAll - Callback function that alllows to select all the items when called\n * @returns {UseCheckboxSelectAll} Values to be set to the bento-checkbox value and indeterminate props, as well as functions to update them accordingly\n *\n */\nexport const useCheckboxSelectAll = (\n selectedItemsList: ComputedRef<BentoListboxMultiSelectValue>,\n items: ComputedRef<BentoListboxOptions>,\n selectAll: Fn,\n unselectAll: Fn\n) => {\n const isAllSelected = computed(\n () => !!selectedItemsList.value?.length && selectedItemsList.value?.length === items.value.length\n );\n const isIndeterminate = computed(() => {\n // eslint-disable-next-line eqeqeq\n if (selectedItemsList.value == undefined || selectedItemsList.value.length === 0) {\n return false;\n }\n\n return selectedItemsList.value?.length !== items.value.length;\n });\n\n const toggleSelectAll = (selectedValue: boolean) => {\n if (selectedValue) {\n selectAll();\n } else {\n unselectAll();\n }\n };\n\n return {\n isAllSelected,\n isIndeterminate,\n\n toggleSelectAll,\n };\n};\n","import { computed, onMounted, onUnmounted, type Ref, ref, type UnwrapRef, watch } from 'vue';\nimport type {\n UseVirtualListContainerProps,\n UseVirtualListOptions,\n UseVirtualListWrapperProps,\n} from './use-virtual-list.types';\nimport { observeSizeOfElement } from '../../utils/ts/resize';\n\n/**\n * Sets up a virtual scrolling functionality on a container element and a list of items to virtually scroll over.\n * This composables returns the containerProps and wrapperProps objects that should be v-binded onto the container and wrapper elements\n * of the list you wish to virtually scroll.\n *\n * This will return a filtered down list object the user can render based on how much the user has scrolled on the container.\n *\n * @usage\n * <template>\n * <div v-bind=\"containerProps\" @scroll=\"onScroll\">\n * <ul v-bind=\"wrapperProps\">\n * <li v-for=\"item in list\" :key=\"item.index\" style=\"height: 22px\">\n * {{ item.label }}\n * </li>\n * </ul>\n * </div>\n * </template>\n *\n * <script setup lang=\"ts\"\n * import { useVirtualList } from '@adyen/bento-vue2';\n *\n * const DEFAULT_OPTIONS: { label: string }[] = new Array(100)\n * .fill(0)\n * .map((_, index) => ({ label: `Option ${index + 1}` }));\n * const ITEMS = ref(DEFAULT_OPTIONS);\n * const ITEM_HEIGHT = 30;\n *\n * const { containerProps, wrapperProps, list, onScroll } = useVirtualList(ITEMS, { itemHeight: ITEM_HEIGHT });\n * </script>\n *\n *\n * @param items - a reference to a list of items to virtually scroll over.\n * @param options - customizes how the Virtual scroller list functions.\n * @param options.itemHeight - the height in pixel or a function that returns the height in pixels for each item.\n * @param options.overscan - number of pre-rendered DOM nodes. Prevents whitespace between items if you scroll very quickly.\n * @param options.prefixHeight - the prefix height of elements present the scrollable area but not present in the items property.\n * @param options.disabled - if set to true, disables the virtual scrolling functionality.\n */\nexport function useVirtualList<T>(\n items: Ref<Array<T>>,\n { disabled, itemHeight, overscan = 5, prefixHeight }: UseVirtualListOptions\n) {\n const containerRef: Ref<UnwrapRef<HTMLElement | null>> = ref<HTMLElement | null>(null);\n const list = ref<Array<T>>([]) as Ref<Array<T>>;\n const startIndex = ref(0);\n const endIndex = ref(0);\n const containerHeight = ref(0);\n let listObserver;\n\n const wrapperProps = computed<UseVirtualListWrapperProps>(() => {\n const totalHeight =\n typeof itemHeight === 'number'\n ? items.value.length * itemHeight\n : items.value.reduce((sum, _, index) => sum + itemHeight(index), 0);\n\n const offSetTop =\n typeof itemHeight === 'number'\n ? startIndex.value * itemHeight\n : items.value.slice(0, startIndex.value).reduce((sum, _, i) => sum + itemHeight(i), 0);\n\n return {\n style: {\n marginTop: `${offSetTop}px`,\n height: `${totalHeight - offSetTop}px`,\n },\n };\n });\n\n /**\n * Gets the offset for the first item to show within the visible area.\n * @returns offset number.\n */\n const getOffset = () => {\n const prefixHeightIfSet = prefixHeight?.value ?? 0;\n const scrollTop = Math.max(containerRef.value.scrollTop - prefixHeightIfSet, 0);\n if (typeof itemHeight === 'number') {\n return Math.floor(scrollTop / itemHeight);\n }\n\n let sum = 0;\n let offset = 0;\n\n for (let i = 0; i < items.value.length; i += 1) {\n const size = itemHeight(i);\n sum += size;\n if (sum >= scrollTop) {\n offset = i;\n break;\n }\n }\n return offset;\n };\n\n /**\n * Gets the visible number of items based on the container size and item heights.\n * @returns visible number of items.\n */\n const getVisibileNumberOfItems = () => {\n containerHeight.value = containerRef.value.clientHeight;\n if (typeof itemHeight === 'number') {\n return Math.ceil(containerHeight.value / itemHeight);\n }\n\n const start = startIndex.value ?? 0;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < items.value.length; i += 1) {\n const size = itemHeight(i);\n sum += size;\n capacity = i;\n if (sum > containerHeight.value) {\n break;\n }\n }\n return capacity - start;\n };\n\n const updateVisibleItems = () => {\n if (containerRef.value) {\n const visibleCount = getVisibileNumberOfItems();\n startIndex.value = getOffset();\n endIndex.value = Math.min(startIndex.value + visibleCount + overscan, items.value.length);\n list.value = items.value.slice(startIndex.value, endIndex.value);\n }\n };\n\n const onScroll = () => {\n updateVisibleItems();\n };\n\n if (!disabled) {\n onMounted(() => {\n if (containerRef.value) {\n containerHeight.value = containerRef.value.clientHeight;\n // When the listbox opens we need to update the height\n listObserver = observeSizeOfElement(containerRef.value, ({ clientHeight }) => {\n containerHeight.value = clientHeight;\n updateVisibleItems();\n });\n updateVisibleItems();\n }\n });\n\n onUnmounted(() => {\n listObserver?.disconnect();\n });\n\n watch(\n () => items.value,\n () => {\n updateVisibleItems();\n }\n );\n }\n\n const containerProps: UseVirtualListContainerProps = {\n ref: containerRef,\n style: { overflowY: 'auto' },\n };\n\n /**\n * Scrolls the container to ensure the item at the given index is visible.\n * Uses a scroll-into-view approach: only scrolls if the item is outside the current viewport.\n */\n const scrollToIndex = (index: number) => {\n if (!containerRef.value) {\n return;\n }\n\n const itemTop =\n typeof itemHeight === 'number'\n ? index * itemHeight\n : items.value.slice(0, index).reduce((sum, _, i) => sum + itemHeight(i), 0);\n\n const currentHeight = typeof itemHeight === 'number' ? itemHeight : itemHeight(index);\n const itemBottom = itemTop + currentHeight;\n\n const { scrollTop, clientHeight: viewportHeight } = containerRef.value;\n const viewportBottom = scrollTop + viewportHeight;\n\n if (itemBottom > viewportBottom) {\n containerRef.value.scrollTop = viewportHeight > 0 ? itemBottom - viewportHeight : itemTop;\n } else if (itemTop < scrollTop) {\n containerRef.value.scrollTop = itemTop;\n }\n\n updateVisibleItems();\n };\n\n if (disabled) {\n return {\n containerRef,\n containerProps,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onScroll: () => {},\n list: items,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n scrollToIndex: () => {},\n startIndex: ref(0),\n };\n }\n\n return {\n containerRef,\n containerProps,\n onScroll,\n list,\n wrapperProps,\n scrollToIndex,\n startIndex,\n };\n}\n","import { type BentoSearchBarItem } from '@/components/search-bar/search-bar.types';\nimport { type BentoEmptyStateProps } from '@/components/empty-state/empty-state.types';\nimport { type OmitStrict } from '@/types/omit-strict';\nimport { type BentoButtonActionObject } from '@/components/button/components/button-actions/button-actions.types';\nimport { type UseVirtualListItemHeight } from '@/composables/use-virtual-list/use-virtual-list.types';\n\nexport type BentoListboxValue = string | number;\n\nexport type BentoListboxMultiSelectValue = Array<BentoListboxValue>;\n\nexport interface BentoListboxOptionItem extends BentoSearchBarItem {\n data?: unknown;\n description?: string;\n value: BentoListboxValue;\n displayValue?: string;\n items?: Array<BentoListboxOptionItem>; // Reference itself for multi-level options\n}\n\nexport interface BentoListboxSelectedValueLabelPair {\n value: BentoListboxOptionItem['value'];\n label: BentoListboxOptionItem['label'];\n}\n\nexport type BentoListboxSelectedValue =\n | BentoListboxValue\n | BentoListboxMultiSelectValue\n | BentoListboxSelectedValueLabelPair\n | Array<BentoListboxSelectedValueLabelPair>;\n\nexport type BentoListboxOptions = Array<BentoListboxOptionItem>;\n\nexport type BentoListboxIsOptionDisabled = undefined | ((optionValue: BentoListboxOptionItem) => boolean);\n\nexport enum BentoListboxEvent {\n SELECT = 'select',\n SHOW_MORE = 'show-more',\n ESCAPE = 'escape-pressed',\n CLICK = 'click',\n ENTER = 'enter-pressed',\n SPACE = 'space-pressed',\n TAB = 'tab-pressed',\n CLOSE_DROPDOWN = 'close-dropdown',\n}\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoListboxLazyLoadType {\n AUTOMATIC = 'automatic',\n BUTTON = 'button',\n NONE = 'none',\n}\n\nexport interface BentoListboxSearchOptions {\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime?: number;\n\n /**\n * The event that triggers upon user filtering the listbox items.\n */\n searchEvent: (searchValue: string) => void;\n}\n\nexport type BentoListboxEmptyStateProps = { action: { icon?: any } & BentoButtonActionObject } & OmitStrict<\n BentoEmptyStateProps,\n 'variant' | 'image' | 'description'\n>;\n\nexport type BentoListboxVirtulisationOptions = boolean | { itemHeight: UseVirtualListItemHeight };\n\nexport type BentoListboxItemRole = 'treeitem' | 'option';\n","<template>\n <div class=\"b-listbox-single-select-category\" role=\"group\" :aria-label=\"categoryLabel\">\n <bento-typography\n variant=\"caption\"\n el=\"span\"\n class=\"b-listbox-single-select-category__label-text\"\n aria-hidden=\"true\"\n >\n {{ categoryLabel }}\n </bento-typography>\n <div>\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import { BentoTypography } from '@/components/typography';\n\n export default defineComponent({\n name: 'bento-listbox-static-category',\n components: {\n BentoTypography,\n },\n props: {\n /**\n * Category label text\n */\n categoryLabel: {\n type: String,\n required: true,\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-single-select-category.scss\" />\n","<template>\n <div\n class=\"b-listbox-option\"\n role=\"option\"\n :class=\"conditionalClasses\"\n v-bind=\"$attrs\"\n @click=\"onClick\"\n @keydown.enter=\"onOptionSelected(BentoListboxEvent.ENTER, $event)\"\n @keydown.space=\"onOptionSelected(BentoListboxEvent.SPACE, $event)\"\n @keydown.tab=\"onOptionSelected(BentoListboxEvent.TAB, $event)\"\n >\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoListboxEvent } from '@/types/listbox';\n import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n\n /**\n * listbox option wrapper.\n * Contains only styles and allows the Multi-Select and Single-Select DRY the styles.\n *\n * Options and Attributes are inherited (`inheritAttrs: true`)\n *\n * @example\n * <bento-listbox-option\n * ...props\n * ...attrs\n * />\n */\n export default defineComponent({\n name: 'bento-listbox-option',\n props: {\n /**\n * Setting this property to true will disable the option.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Indicates if the value is selected. Only one element can be selected at a time.\n */\n selected: { type: Boolean, default: false },\n },\n emits: [BentoListboxEvent.CLICK, BentoListboxEvent.ENTER, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit }) {\n const conditionalClasses = computed(() => ({\n 'b-listbox-option--disabled': props.disabled,\n 'b-listbox-option--selected': props.selected,\n }));\n\n const onClick = (e: Event) => {\n emit(BentoListboxEvent.CLICK, e);\n };\n\n const onOptionSelected = (eventName, e: Event) => {\n emit(eventName, e);\n };\n\n return {\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n\n // Values\n conditionalClasses,\n\n // Events\n onClick,\n onOptionSelected,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-option.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" 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=\"#001222\" d=\"M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <bento-listbox-option\n class=\"b-listbox-single-select-option\"\n :disabled=\"disabled\"\n :selected=\"selected\"\n :aria-selected=\"ariaSelected\"\n :aria-disabled=\"ariaDisabled\"\n :tabindex=\"tabIndex\"\n @click=\"onOptionSelected(BentoListboxEvent.SELECT)\"\n @enter-pressed=\"onOptionSelected(BentoListboxEvent.ENTER)\"\n @space-pressed.prevent=\"onOptionSelected(BentoListboxEvent.SPACE)\"\n @tab-pressed=\"onOptionSelected(BentoListboxEvent.TAB)\"\n >\n <slot v-bind=\"option\">\n <span class=\"b-listbox-single-select-option__text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"option.description\"\n class=\"b-listbox-single-select-option__description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n <span class=\"b-listbox-single-select-option__check-icon\">\n <checkmark-icon v-show=\"selected\" svg-title=\"selected\" />\n </span>\n </bento-listbox-option>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoListboxOption } from '../listbox-option';\n import { BentoListboxEvent, type BentoListboxOptionItem } from '@/types/listbox';\n import CheckmarkIcon from '@adyen/ui-assets-icons-16/vue/checkmark';\n\n /**\n * Listbox option element.\n *\n * @example\n * <bento-listbox-single-select-option\n * v-for=\"option in options\"\n * :key=\"option.value\"\n * :option=\"option\"\n * :selected=\"option.selected\"\n * @select=\"onOptionSelected\"\n * />\n */\n export default defineComponent({\n name: 'bento-listbox-single-select-option',\n components: {\n BentoListboxOption,\n BentoTypography,\n CheckmarkIcon,\n },\n props: {\n /**\n * Setting this property to true will disable the option.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * The option item that contains all the option item's data.\n * @type {BentoListboxOptionItem}\n */\n option: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n\n /**\n * Indicates if the value is selected. Only one element can be selected at a time.\n */\n selected: { type: Boolean, default: false },\n },\n emits: [BentoListboxEvent.ENTER, BentoListboxEvent.SELECT, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit }) {\n const onOptionSelected = eventName => {\n if (props.disabled) {\n return;\n }\n\n /**\n * Trigerred when an option is clicked or selected via keyboard navigation.\n * Indicates which option was selected.\n *\n * @event {string} - The corresponding event\n * @property {number} selectedValue - Selected option's value\n */\n emit(eventName, props.option);\n };\n\n const ariaDisabled = computed(() => (props.disabled ? true : null));\n const ariaSelected = computed(() => (props.selected ? true : null));\n const tabIndex = computed(() => (props.disabled ? -1 : 0));\n\n return {\n // Values\n ariaDisabled,\n ariaSelected,\n tabIndex,\n\n // Enums\n BentoListboxEvent,\n\n // Events\n onOptionSelected,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-single-select-option.scss\" />\n","import { computed, type Ref, ref } from 'vue';\n\nconst enum ListboxKeyboardNavigationMutationDirection {\n INCREASE = 'increase',\n DECREASE = 'decrease',\n}\n\nexport const useListboxKeyboardNavigation = (\n { items, totalItemCount }: { items: Ref<Array<HTMLElement>>; totalItemCount?: Ref<number> },\n focusItem: (index: number) => void\n) => {\n const lastItemIndex = computed(() => (totalItemCount?.value ? totalItemCount.value - 1 : items.value.length - 1));\n const focusedIndex = ref(0);\n\n const mutateFocusedIndex = (direction: ListboxKeyboardNavigationMutationDirection) => {\n switch (direction) {\n case ListboxKeyboardNavigationMutationDirection.INCREASE:\n focusedIndex.value += 1;\n break;\n case ListboxKeyboardNavigationMutationDirection.DECREASE:\n focusedIndex.value -= 1;\n break;\n default:\n break;\n }\n };\n\n const calculateFocusedIndex = ({ edgeCaseItem }, direction) => {\n const isEdgeCaseItem = focusedIndex.value === edgeCaseItem;\n if (isEdgeCaseItem) {\n return;\n }\n mutateFocusedIndex(direction);\n focusItem(focusedIndex.value);\n };\n\n const moveToNextElement = (event?: CustomEvent<KeyboardEvent>) => {\n // prevent arrow down to scroll down the container\n preventDefault(event);\n calculateFocusedIndex(\n {\n edgeCaseItem: lastItemIndex.value,\n },\n ListboxKeyboardNavigationMutationDirection.INCREASE\n );\n };\n\n const moveToPreviousElement = (event?: CustomEvent<KeyboardEvent>) => {\n // prevent arrow up to scroll up the container\n preventDefault(event);\n calculateFocusedIndex(\n {\n edgeCaseItem: 0,\n },\n ListboxKeyboardNavigationMutationDirection.DECREASE\n );\n };\n\n const moveToFirstElement = () => {\n focusedIndex.value = 0;\n focusItem(focusedIndex.value);\n };\n\n const moveToLastElement = () => {\n focusedIndex.value = lastItemIndex.value;\n focusItem(focusedIndex.value);\n };\n\n const setListboxFocusedIndex = (index: number) => {\n focusedIndex.value = index;\n };\n\n const preventDefault = (event?: CustomEvent<KeyboardEvent>) => {\n event?.detail?.preventDefault();\n };\n\n return {\n moveToFirstElement,\n moveToLastElement,\n moveToNextElement,\n moveToPreviousElement,\n setListboxFocusedIndex,\n preventDefault,\n focusedIndex,\n };\n};\n","import { type BentoListboxItemRole, type BentoListboxOptions } from '@/types/listbox';\nimport { nextTick, ref, type Ref, watch } from 'vue';\n\n/**\n * Composable that provides a reactive list of visible DOM options within a container.\n * It queries for all elements with `role=\"option\"` inside the container and filters\n * them based on their visibility. This is useful for components with virtual scrolling\n * or complex layouts where not all options are visible at once. It automatically\n * updates the list of visible options whenever the `items` array changes.\n *\n * @param containerRef A ref to the HTML container element that holds the options.\n * @param items The list of items for the listbox. The watcher on this parameter triggers the update.\n * @param role The role of the option elements to query for. Defaults to 'option'.\n * @param checkVisibility If true, it will only return visible options. Defaults to true.\n * @returns An object containing:\n * - `visibleDomOptions`: A reactive list of visible option elements.\n * - `updateVisibleDomOptions`: A function to manually trigger an update of the visible options.\n */\nexport const useVisibleDomOptions = (\n containerRef: Ref<Element | undefined>,\n items: Ref<BentoListboxOptions>,\n role: Ref<BentoListboxItemRole> = ref('option'),\n checkVisibility: boolean = true\n) => {\n const visibleDomOptions = ref<Array<HTMLDivElement>>([]);\n\n const updateVisibleDomOptions = async () => {\n if (!containerRef.value || containerRef.value.nodeType === Node.COMMENT_NODE) {\n return;\n }\n\n const options = Array.from(containerRef.value.querySelectorAll<HTMLDivElement>(`[role=\"${role.value}\"]`));\n\n visibleDomOptions.value = checkVisibility\n ? options.filter((option: HTMLDivElement) => option.checkVisibility())\n : options;\n };\n\n watch(\n items,\n () => {\n nextTick(() => {\n updateVisibleDomOptions();\n });\n },\n { immediate: true }\n );\n\n return {\n visibleDomOptions,\n updateVisibleDomOptions,\n };\n};\n","<template>\n <div\n ref=\"listboxRef\"\n v-bento-keyboard-navigation-directive\n v-bind=\"ariaAttributes\"\n role=\"listbox\"\n v-on=\"listboxListeners\"\n @focusin=\"handleVirtualScrollingFocus\"\n >\n <template v-if=\"hasCategories && staticCategories\">\n <template v-for=\"item in items\">\n <bento-listbox-single-select-category\n v-if=\"item.items && item.items.length > 0\"\n :key=\"`category-${item.value}`\"\n :category-label=\"item.label\"\n >\n <bento-listbox-single-select-option\n v-for=\"option in item.items\"\n :key=\"option.value\"\n ref=\"listboxItemRef\"\n role=\"option\"\n :option=\"option\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :selected=\"option.value === selectedItem.value\"\n v-on=\"listboxOptionListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select-option>\n </bento-listbox-single-select-category>\n\n <bento-listbox-single-select-option\n v-else\n :key=\"`option-${item.value}`\"\n ref=\"listboxItemRef\"\n role=\"option\"\n :option=\"item\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(item) : null\"\n :selected=\"item.value === selectedItem.value\"\n v-on=\"listboxOptionListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select-option>\n </template>\n </template>\n <template v-else>\n <bento-listbox-single-select-option\n v-for=\"option in items\"\n :key=\"option.value\"\n ref=\"listboxItemRef\"\n role=\"option\"\n :option=\"option\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :selected=\"option.value === selectedItem.value\"\n v-on=\"listboxOptionListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select-option>\n </template>\n </div>\n</template>\n<script lang=\"ts\">\n import { computed, defineComponent, type HTMLAttributes, nextTick, type PropType, ref, toRef } from 'vue';\n import { BentoListboxSingleSelectCategory } from './components/listbox-single-select-category';\n import { BentoListboxSingleSelectOption } from '../listbox-single-select-option';\n import { useListboxKeyboardNavigation } from '../../composables/useListboxKeyboardNavigation';\n import { useVisibleDomOptions } from '@/internal/listbox/composables/use-visible-dom-options/use-visible-dom-options';\n import { BentoListboxEvent, type BentoListboxIsOptionDisabled, type BentoListboxOptions } from '@/types/listbox';\n import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n import { type Booleanish } from '@/types/prop-types';\n\n import { BentoKeyboardNavigationDirective } from '@/directives';\n\n /**\n * Listbox single-select options list\n *\n * @example\n * import { BentoListboxMultiSelect } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoListboxMultiSelect },\n * template: `\n * <bento-listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-listbox-single-select',\n components: {\n BentoListboxSingleSelectCategory,\n BentoListboxSingleSelectOption,\n },\n directives: { BentoKeyboardNavigationDirective },\n inheritAttrs: false,\n props: {\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: () => false,\n },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\n * @property {string} value.label - Text to be displayed in the option\n * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected\n */\n selectedValue: {\n type: Array as PropType<BentoListboxOptions>,\n default: undefined,\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Total number of items in the full list (used for virtual scroll keyboard navigation).\n * When greater than 0, virtual scroll keyboard navigation is enabled.\n */\n totalItemCount: { type: Number, default: 0 },\n\n /**\n * Function to scroll the virtual list container to a given item index.\n */\n scrollToIndex: { type: Function as PropType<(index: number) => void>, default: undefined },\n\n /**\n * The start index of the currently rendered virtual scroll slice.\n */\n virtualScrollStartIndex: { type: Number, default: 0 },\n },\n emits: [BentoListboxEvent.SELECT, BentoListboxEvent.ENTER, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit, expose, slots, attrs }) {\n const listboxRef = ref(null);\n const listboxItemRef = ref([]);\n const selectedItem = computed(() => !!props.selectedValue?.length && props.selectedValue.at(0));\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-label': attrs['aria-label']?.toString() as string,\n 'aria-busy': attrs['aria-busy']?.toString() as Booleanish,\n 'aria-atomic': attrs['aria-atomic']?.toString() as Booleanish,\n 'aria-live': attrs['aria-live']?.toString() as string,\n }) as HTMLAttributes\n );\n\n /**\n * Finds out if items have sub items\n */\n const hasCategories = computed(() => !!props.items.some(({ items }) => !!items));\n\n const onOptionSelected = eventName => (selectedOption: BentoListboxOptions) => {\n emit(eventName, [selectedOption]);\n };\n\n // Keyboard navigation\n const { visibleDomOptions, updateVisibleDomOptions } = useVisibleDomOptions(\n listboxRef,\n toRef(props, 'items'),\n ref('option'),\n false\n );\n\n const isVirtualScrollEnabled = computed(() => props.totalItemCount > 0);\n\n // When virtual scroll re-renders items (e.g. on mouse wheel scroll), the\n // browser may auto-focus an option. Sync the keyboard navigation index to\n // match the focused element so subsequent arrow key presses navigate from\n // the correct position.\n const handleVirtualScrollingFocus = (event: FocusEvent) => {\n if (!isVirtualScrollEnabled.value) {\n return;\n }\n\n const target = event.target as HTMLElement;\n if (target === listboxRef.value || target?.getAttribute('role') !== 'option') {\n return;\n }\n\n const localIndex = visibleDomOptions.value.indexOf(target as HTMLDivElement);\n if (localIndex !== -1) {\n const globalIndex = localIndex + props.virtualScrollStartIndex;\n setListboxFocusedIndex(globalIndex);\n }\n };\n\n const focusItem = async (globalIndex: number) => {\n if (isVirtualScrollEnabled.value && props.scrollToIndex) {\n props.scrollToIndex(globalIndex);\n await nextTick();\n await updateVisibleDomOptions();\n const newDomIndex = globalIndex - props.virtualScrollStartIndex;\n visibleDomOptions.value[newDomIndex]?.focus();\n } else {\n visibleDomOptions.value[globalIndex]?.focus();\n }\n };\n\n const navigateToItem = async (globalIndex: number) => {\n setListboxFocusedIndex(globalIndex);\n await focusItem(globalIndex);\n };\n\n const {\n moveToNextElement,\n moveToPreviousElement,\n moveToFirstElement,\n moveToLastElement,\n setListboxFocusedIndex,\n } = useListboxKeyboardNavigation(\n {\n items: visibleDomOptions,\n totalItemCount: toRef(props, 'totalItemCount'),\n },\n focusItem\n );\n\n const listboxListeners = {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: moveToPreviousElement,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: moveToNextElement,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: moveToFirstElement,\n [BentoKeyboardNavigationKeyDownEvent.END]: moveToLastElement,\n };\n\n const listboxOptionListeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected(BentoListboxEvent.SELECT),\n [BentoListboxEvent.SPACE]: onOptionSelected(BentoListboxEvent.SPACE),\n [BentoListboxEvent.TAB]: onOptionSelected(BentoListboxEvent.TAB),\n [BentoListboxEvent.ENTER]: onOptionSelected(BentoListboxEvent.ENTER),\n };\n\n expose({\n /**\n * Reference for a single listbox item.\n * Required for keyboard navigation in dropdown as $children is removed in vue@3\n */\n listboxItemRef,\n /**\n * Method to set the index of the item to be focused on\n * Used for focus management to be kept in-sync with parent e.g. dropdowns\n */\n setListboxFocusedIndex,\n /**\n * Navigates to an item by global index, handling virtual scroll if enabled.\n * Scrolls the virtual list and focuses the item.\n */\n navigateToItem,\n });\n\n return {\n // Enums\n BentoListboxEvent,\n\n // Values\n listboxRef,\n listboxItemRef,\n selectedItem,\n slots,\n ariaAttributes,\n\n // Computed\n hasCategories,\n\n // Methods\n onOptionSelected,\n\n // Keyboard navigation\n listboxListeners,\n listboxOptionListeners,\n\n // Virtual scroll focus management\n handleVirtualScrollingFocus,\n };\n },\n });\n</script>\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=\"#001222\" d=\"M9.69043 5.75L4.62988 10.8105L1.56934 7.75L2.62988 6.68945L4.62988 8.68945L8.62988 4.68945L9.69043 5.75Z\"/><path fill=\"#001222\" d=\"M13.9307 5.75L8.87012 10.8105L7.80957 9.75L12.8701 4.68945L13.9307 5.75Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <div class=\"b-checkbox-input\" :class=\"conditionalClasses\" role=\"presentation\">\n <!-- Don't change order because it matters for CSS. Icons first -->\n <minus-small-icon v-if=\"indeterminate\" class=\"b-checkbox-input__icon\" svg-title=\"\" aria-hidden=\"true\" />\n <double-checkmark-small-icon\n v-else-if=\"allSelected\"\n class=\"b-checkbox-input__icon\"\n svg-title=\"\"\n aria-hidden=\"true\"\n data-testid=\"decorative-checkbox-double-checkmark-icon\"\n />\n <checkmark-small-icon v-else-if=\"checked\" class=\"b-checkbox-input__icon\" svg-title=\"\" aria-hidden=\"true\" />\n <div class=\"b-checkbox-input__outline\" :class=\"outlineConditionalClasses\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { CheckboxInputState } from '@/internal/checkbox-input/checkbox-input.types';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import MinusSmallIcon from '@adyen/ui-assets-icons-16/vue/minus-small';\n import DoubleCheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/double-checkmark-small';\n\n const props = defineProps({\n disabled: { type: Boolean, default: false },\n indeterminate: { type: Boolean, default: false },\n checked: { type: Boolean, default: false },\n allSelected: { type: Boolean, default: false }\n});\n\n const conditionalClasses = computed(() => ({\n [`b-checkbox-input--${CheckboxInputState.DISABLED}`]: props.disabled,\n }));\n\n const outlineConditionalClasses = computed(() => ({\n [`b-checkbox-input__outline--${CheckboxInputState.UNCHECKED}`]:\n !props.checked && !props.indeterminate && !props.allSelected,\n [`b-checkbox-input__outline--${CheckboxInputState.CHECKED}`]:\n (props.checked || props.allSelected) && !props.indeterminate,\n [`b-checkbox-input__outline--${CheckboxInputState.INDETERMINATE}`]: props.indeterminate,\n }));\n</script>\n\n<script lang=\"ts\">\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"@/internal/checkbox-input/checkbox-input.scss\" />\n","export enum ListboxMultiSelectCategoryClass {\n DISABLED = 'disabled',\n STATIC_CATEGORY = 'static-category',\n}\n\nexport enum ListboxMultiSelectCategoryEvent {\n SELECT_CATEGORY = 'select-category',\n UNSELECT_CATEGORY = 'unselect-category',\n TOGGLE_CATEGORY_VISIBILITY = 'toggle-category-visibility',\n}\n","<template>\n <div>\n <bento-listbox-option\n v-if=\"!isStaticCategory\"\n class=\"b-listbox-multi-select-category__option\"\n :class=\"conditionalClass\"\n :tabindex=\"tabindex\"\n :aria-selected=\"ariaCheckedComputed !== 'false'\"\n :aria-checked=\"ariaCheckedComputed\"\n :aria-disabled=\"hasAllPropsDisabled\"\n :aria-expanded=\"`${isOpen}`\"\n role=\"treeitem\"\n :aria-owns=\"categoryGroupId\"\n :aria-labelledby=\"categoryNameId\"\n @click=\"handleSelectAll\"\n @enter-pressed=\"handleSelectAll\"\n @space-pressed.prevent=\"handleSelectAll\"\n @keydown.arrow-left.native=\"toggleOpen($event, false)\"\n @keydown.arrow-right.native=\"toggleOpen($event, true)\"\n >\n <decorative-checkbox\n :indeterminate=\"isIndeterminate\"\n :disabled=\"hasAllPropsDisabled\"\n :checked=\"isAllSelected\"\n />\n <span class=\"b-listbox-multi-select-category__label\">\n <bento-typography :id=\"categoryNameId\" el=\"span\" class=\"b-listbox-multi-select-category__label-text\">\n {{ category.label }}\n </bento-typography>\n <div\n aria-hidden=\"true\"\n class=\"b-listbox-multi-select-category__label-chevron\"\n data-testid=\"toggle-listbox\"\n @click.capture.stop=\"toggleOpen\"\n >\n <chevron-up-icon v-if=\"isOpen\" :svg-title=\"chevronTitle\" />\n <chevron-down-icon v-else :svg-title=\"chevronTitle\" />\n </div>\n </span>\n </bento-listbox-option>\n\n <div\n v-else\n class=\"b-listbox-multi-select-category b-listbox-multi-select-category--static-category\"\n aria-hidden=\"true\"\n >\n <span class=\"b-listbox-multi-select-category__label\">\n <bento-typography el=\"span\" variant=\"caption\" class=\"b-listbox-multi-select-category__label-text\">\n {{ category.label }}\n </bento-typography>\n </span>\n </div>\n\n <div v-show=\"showItemChildren\" :id=\"categoryGroupId\" role=\"group\" :aria-label=\"category.label\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, ref, toRef, watch } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoListboxOption } from '../../../../../listbox-option';\n import { DecorativeCheckbox } from '@/internal/decorative-checkbox';\n\n import {\n type BentoListboxIsOptionDisabled,\n type BentoListboxMultiSelectValue,\n type BentoListboxOptionItem,\n type BentoListboxValue,\n } from '@/types/listbox';\n import { useCheckboxSelectAll } from '@/composables';\n import {\n ListboxMultiSelectCategoryClass,\n ListboxMultiSelectCategoryEvent,\n } from './listbox-multi-select-category.types';\n import { useI18n } from '@/utils/ts/i18n';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n import messages from './messages.json';\n import { generateUid } from '@/core/utils/ts';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Listbox multi-select category list.\n * Allows the rendering of nested lists\n *\n * @example\n * import { ListboxMultiSelectCategory } from '@/internal/listbox';\n *\n * export default {\n * components: { BentoListboxMultiSelectCategory },\n * template: `\n * <listbox-multi-select-category\n * :category=\"option\"\n * :is-option-disabled=\"true\"\n * :selected-items-list=\"['option-1']\"\n * @select-category=\"$emit('select-category', option)\"\n * @unselect-category=\"$emit('unselect-category', option)\"\n * >\n * <listbox-multi-select-options\n * category-items\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :is-multi-level=\"true\"\n * :selected-items-list=\"['option-']\"\n * :searching=\"false\"\n * @toggle-checkbox-selection=\"value => toggleCheckboxSelection(value)\"\n * />\n * </listbox-multi-select-category>\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-listbox-multi-select-category',\n components: {\n BentoTypography,\n BentoListboxOption,\n ChevronDownIcon,\n ChevronUpIcon,\n DecorativeCheckbox,\n },\n props: {\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\n * @property {string} value.label - Text to be displayed in the option\n * @property {string,number} value.value - Value of the option\n * @property {BentoListboxOptionItem} value.items - Category items list\n */\n category: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: [Function] as PropType<BentoListboxIsOptionDisabled>,\n default: () => false,\n },\n\n /**\n * The `input` value.\n * Providing an empty array will select no options.\n */\n selectedItemsList: {\n type: Array as PropType<Array<BentoListboxValue>>,\n default: () => [],\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Category's tabindex\n */\n tabindex: { type: Number, default: -1 },\n },\n emits: [\n ListboxMultiSelectCategoryEvent.SELECT_CATEGORY,\n ListboxMultiSelectCategoryEvent.UNSELECT_CATEGORY,\n ListboxMultiSelectCategoryEvent.TOGGLE_CATEGORY_VISIBILITY,\n ],\n setup(props, { emit }) {\n const isOpen = ref(false);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const categoryGroupId = generateUid('category-group');\n const categoryNameId = generateUid('category-name');\n\n // This method should be used to determine if an option is disabled as it works for both vue 2 & 3.\n const vue2Vue3FixedisOptionDisabled = option =>\n props.isOptionDisabled ? props.isOptionDisabled(option) : false;\n\n const hasAllPropsDisabled = computed(() =>\n props.category.items.every(option => vue2Vue3FixedisOptionDisabled(option))\n );\n\n const isStaticCategory = toRef(props, 'staticCategories');\n\n // Display item children if is open state or if static categories is enabled\n const showItemChildren = computed(() => isOpen.value || props.staticCategories);\n\n const conditionalClass = computed(() => ({\n [`b-listbox-multi-select-category--${ListboxMultiSelectCategoryClass.DISABLED}`]:\n hasAllPropsDisabled.value,\n }));\n\n const toggleOpen = (event: Event, open?: boolean) => {\n event.preventDefault();\n isOpen.value = open !== undefined ? open : !isOpen.value;\n emit(ListboxMultiSelectCategoryEvent.TOGGLE_CATEGORY_VISIBILITY, props.category.value);\n };\n\n const optionStates = (option: BentoListboxOptionItem) => {\n const isDisabled = vue2Vue3FixedisOptionDisabled(option);\n const isPreSelected =\n (props.selectedItemsList as BentoListboxMultiSelectValue)?.includes(option.value) || false;\n return { isDisabled, isPreSelected };\n };\n\n const enabledItems = computed(() =>\n props.category.items.filter(option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n })\n );\n\n const visibleSelectedList = computed(\n () =>\n enabledItems.value?.filter(({ value }) =>\n props.selectedItemsList?.includes(value)\n ) as unknown as BentoListboxMultiSelectValue\n );\n\n const chevronTitle = computed(() => {\n const messageName = isOpen.value ? 'categoryOpened' : 'categoryClosed';\n return t(messageName, { category: props.category.label }) as string;\n });\n\n const selectAll = () => {\n emit(ListboxMultiSelectCategoryEvent.SELECT_CATEGORY);\n };\n const unselectAll = () => {\n emit(ListboxMultiSelectCategoryEvent.UNSELECT_CATEGORY);\n };\n\n const { isAllSelected, isIndeterminate, toggleSelectAll } = useCheckboxSelectAll(\n visibleSelectedList,\n enabledItems,\n selectAll,\n unselectAll\n );\n\n const ariaCheckedComputed = computed(() => {\n if (isIndeterminate.value) {\n return 'mixed';\n }\n\n return `${isAllSelected.value}`;\n });\n\n const isSelectAllOn = ref(isAllSelected.value);\n\n const handleSelectAll = () => {\n isSelectAllOn.value = !isSelectAllOn.value;\n toggleSelectAll(isSelectAllOn.value);\n };\n\n watch(isAllSelected, () => {\n isSelectAllOn.value = isAllSelected.value;\n });\n\n return {\n // Values\n chevronTitle,\n conditionalClass,\n hasAllPropsDisabled,\n isOpen,\n isAllSelected,\n isIndeterminate,\n isStaticCategory,\n categoryGroupId,\n categoryNameId,\n\n // Computed\n showItemChildren,\n ariaCheckedComputed,\n\n // Methods\n handleSelectAll,\n toggleOpen,\n toggleSelectAll,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select-category.scss\" />\n","export enum ListboxMultiSelectOptionsEvent {\n SELECT_CATEGORY = 'select-category',\n TOGGLE_CHECKBOX_SELECTION = 'toggle-checkbox-selection',\n UNSELECT_CATEGORY = 'unselect-category',\n TOGGLE_CATEGORY_VISIBILITY = 'toggle-category-visibility',\n}\n","<template>\n <div>\n <div v-for=\"option in items\" :key=\"`selected-${option.value}`\">\n <template v-if=\"searching && isMultiLevel\">\n <bento-listbox-option\n class=\"b-listbox-multi-select-options\"\n :class=\"conditionalClasses\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :tabindex=\"computedTabindex(option.value)\"\n :aria-selected=\"`${isOptionSelected(option)}`\"\n :aria-checked=\"`${isOptionSelected(option)}`\"\n :aria-disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :role=\"$attrs['role'] || 'option'\"\n @click=\"toggleSearchOption(option)\"\n @enter-pressed=\"toggleSearchOption(option)\"\n @space-pressed.prevent=\"toggleSearchOption(option)\"\n >\n <decorative-checkbox\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :checked=\"isOptionSelected(option)\"\n />\n <slot v-bind=\"option\">\n <span class=\"b-listbox-multi-select__option-text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"shouldShowDescription(option)\"\n class=\"b-listbox-multi-select__option-description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n </bento-listbox-option>\n </template>\n\n <template v-else>\n <!-- Category -->\n <template v-if=\"option.items\">\n <listbox-multi-select-category\n :category=\"option\"\n :static-categories=\"staticCategories\"\n :is-option-disabled=\"isOptionDisabled\"\n :selected-items-list=\"selectedItemsList\"\n :tabindex=\"computedTabindex(option.value)\"\n @select-category=\"$emit(ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, option)\"\n @unselect-category=\"$emit(ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, option)\"\n @toggle-category-visibility=\"\n $emit(ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, $event)\n \"\n >\n <listbox-multi-select-options\n category-items\n :items=\"option.items\"\n :is-option-disabled=\"isOptionDisabled\"\n :items-index=\"itemsIndex\"\n :focused-index=\"focusedIndex\"\n :is-multi-level=\"isMultiLevel\"\n :static-categories=\"staticCategories\"\n :selected-items-list=\"selectedItemsList\"\n :searching=\"searching\"\n :role=\"$attrs['role'] || 'option'\"\n @toggle-checkbox-selection=\"value => toggleCheckboxSelection(value)\"\n />\n </listbox-multi-select-category>\n </template>\n\n <!-- Option -->\n <bento-listbox-option\n v-else\n class=\"b-listbox-multi-select-options\"\n :class=\"conditionalClasses\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :tabindex=\"computedTabindex(option.value)\"\n :aria-selected=\"`${isOptionSelected(option)}`\"\n :aria-checked=\"`${isOptionSelected(option)}`\"\n :aria-disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :role=\"$attrs['role'] || 'option'\"\n @click=\"toggleCheckboxSelection(option)\"\n @enter-pressed=\"toggleCheckboxSelection(option)\"\n @space-pressed.prevent=\"toggleCheckboxSelection(option)\"\n >\n <decorative-checkbox\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :checked=\"isOptionSelected(option)\"\n />\n <slot v-bind=\"option\">\n <span class=\"b-listbox-multi-select__option-text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"shouldShowDescription(option)\"\n class=\"b-listbox-multi-select__option-description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n </bento-listbox-option>\n </template>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { BentoListboxOption } from '../../../listbox-option';\n import { BentoTypography } from '@/components/typography';\n import { ListboxMultiSelectCategory } from './components/listbox-multi-select-category';\n import { DecorativeCheckbox } from '@/internal/decorative-checkbox';\n\n import {\n BentoListboxEvent,\n type BentoListboxIsOptionDisabled,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxValue,\n } from '@/types/listbox';\n import { ListboxMultiSelectOptionsEvent } from './listbox-multi-select-options.types';\n\n /**\n * Listbox multi-select options list\n *\n * @example\n * import { ListboxMultiSelectOptions } from './components/listbox-multi-select-options';\n *\n * export default {\n * components: { ListboxMultiSelect },\n * template: `\n * <listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'listbox-multi-select-options',\n components: {\n BentoListboxOption,\n BentoTypography,\n ListboxMultiSelectCategory,\n DecorativeCheckbox,\n },\n inheritAttrs: false,\n props: {\n /**\n * Indicates if the items listed are inside a category\n * so they can be padded to right by one level in recursion.\n * Items of categories are automatically defined as \"categoryItems\"\n */\n categoryItems: { type: Boolean, default: false },\n\n /**\n * Current focused option index\n */\n focusedIndex: { type: Number, default: 0 },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: () => false,\n },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\n * @property {string} value.label - Text to be displayed in the option\n * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * Indicates if the elements options are inside a multi-level category\n */\n isMultiLevel: { type: Boolean, default: false },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: { type: Boolean, default: false },\n\n /**\n * List of selected items.\n * Providing an empty array will select no options.\n */\n selectedItemsList: {\n type: Array as PropType<Array<BentoListboxValue>>,\n default: () => [],\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Object with the index of each item.\n */\n itemsIndex: {\n type: Object as PropType<Record<string, number>>,\n default: () => ({}),\n },\n },\n emits: [\n ListboxMultiSelectOptionsEvent.TOGGLE_CHECKBOX_SELECTION,\n ListboxMultiSelectOptionsEvent.SELECT_CATEGORY,\n ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY,\n ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY,\n ],\n setup(props, { emit }) {\n const toggleCheckboxSelection = (option: BentoListboxOptionItem) => {\n if (props.isOptionDisabled(option)) {\n return;\n }\n emit(ListboxMultiSelectOptionsEvent.TOGGLE_CHECKBOX_SELECTION, option);\n };\n\n const isCategory = (option: BentoListboxOptionItem) => !!option.items;\n const shouldShowDescription = (option: BentoListboxOptionItem) => {\n const isSearchingMultiLevel = props.isMultiLevel && props.searching;\n\n return option.description && (!props.isMultiLevel || isSearchingMultiLevel);\n };\n\n const isOptionSelected = option => {\n if (option.items) {\n return !!option.items.find(item => props.selectedItemsList.includes(item.value));\n }\n return props.selectedItemsList.includes(option.value);\n };\n\n const toggleSearchOption = option => {\n if (isCategory(option)) {\n const event = isOptionSelected(option)\n ? ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY\n : ListboxMultiSelectOptionsEvent.SELECT_CATEGORY;\n emit(event, option);\n } else {\n toggleCheckboxSelection(option);\n }\n };\n\n const conditionalClasses = computed(() => ({\n 'b-listbox-multi-select-options__static-category-option': props.staticCategories,\n 'b-listbox-multi-select-options__category-option': props.categoryItems,\n }));\n\n const computedTabindex = value => (props.itemsIndex[value] === props.focusedIndex ? 0 : -1);\n\n return {\n // Values\n conditionalClasses,\n\n // Methods\n isOptionSelected,\n shouldShowDescription,\n toggleCheckboxSelection,\n toggleSearchOption,\n computedTabindex,\n\n // Enums\n BentoListboxEvent,\n ListboxMultiSelectOptionsEvent,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select-options.scss\" />\n","import { type BentoListboxOptions } from '@/types/listbox';\nimport { computed, type Ref } from 'vue';\n\n/**\n * Checks if items array is flat or has multi levels and converts items into a flat array if needed\n *\n * It receives a layout of type @see BentoLayoutGroupProportions to\n * generate the class and apply it to the children of the @see BentoFormLayoutGroup component\n *\n * @param {Ref<BentoListboxOptions>} itemsList - ref of the list of items for the listbox\n * @returns {ComputedRef<boolean>} isMultiLevelSelect - Indicates if items array is multi level\n * @returns {ComputedRef<any[]>} flattenedItemsList - list of items computed into a flat array\n */\nexport const useMultiLevelItems = (itemsList: Ref<BentoListboxOptions>) => {\n const isMultiLevelSelect = computed(() => !!itemsList.value?.find(({ items }) => !!items));\n\n const flattenedItemsList = computed(() => {\n if (isMultiLevelSelect.value) {\n return itemsList.value?.reduce((acc, val) => {\n if (val.items) {\n acc.push(...val.items.flat());\n } else {\n acc.push(val);\n }\n return acc;\n }, []);\n }\n\n return itemsList.value;\n });\n\n return {\n isMultiLevelSelect,\n flattenedItemsList,\n };\n};\n","<template>\n <div ref=\"listboxRef\" class=\"b-listbox-multi-select\">\n <!-- Selected options -->\n <div v-if=\"showSelectedItems\">\n <ul\n v-bento-keyboard-navigation-directive\n class=\"b-listbox-multi-select__chips\"\n v-on=\"chipsSectionListeners\"\n >\n <li v-for=\"item in selectedOptions\" :key=\"item.value\">\n <bento-chip\n ref=\"selectedListboxItemsRef\"\n :disabled=\"isOptionDisabled(item)\"\n :label=\"item.label\"\n condensed\n @click=\"item.items ? unselectAllCategory(item) : toggleCheckboxSelection('select', item)\"\n />\n </li>\n </ul>\n\n <hr class=\"b-listbox-multi-select__divider\" aria-hidden=\"true\" />\n </div>\n\n <div v-bento-keyboard-navigation-directive v-bind=\"ariaAttributes\" :role=\"computedRole\" v-on=\"listboxListeners\">\n <!-- Select all -->\n <bento-listbox-option\n v-if=\"showSelectAllCheckbox\"\n ref=\"selectAllListboxItemsRef\"\n class=\"b-listbox-multi-select__option\"\n :tabindex=\"focusedIndex === 0 ? 0 : -1\"\n :aria-selected=\"ariaCheckedComputed !== 'false'\"\n :aria-checked=\"ariaCheckedComputed\"\n :role=\"computedOptionRole\"\n @click=\"handleSelectAll\"\n @enter-pressed=\"handleSelectAll\"\n @space-pressed.prevent=\"handleSelectAll\"\n >\n <decorative-checkbox :checked=\"isAllSelected\" :indeterminate=\"isIndeterminate\" />\n <bento-typography el=\"span\">\n {{ selectAllCheckboxText }}\n </bento-typography>\n </bento-listbox-option>\n <hr v-if=\"showSelectAllCheckbox\" class=\"b-listbox-multi-select__divider\" aria-hidden=\"true\" />\n\n <!-- Available options -->\n <listbox-multi-select-options\n ref=\"listboxItemsRef\"\n :items=\"items\"\n :is-option-disabled=\"isOptionDisabled\"\n :is-multi-level=\"isMultiLevelSelect\"\n :static-categories=\"staticCategories\"\n :searching=\"searching\"\n :selected-items-list=\"selectedItemsList\"\n :focused-index=\"focusedIndex\"\n :items-index=\"computedItemsIndex\"\n :role=\"computedOptionRole\"\n @toggle-checkbox-selection=\"toggleCheckboxSelection('select', $event)\"\n @select-category=\"selectAllCategory\"\n @unselect-category=\"unselectAllCategory\"\n @toggle-category-visibility=\"toggleCategoryVisibility\"\n @space-pressed=\"toggleCheckboxSelection(BentoListboxEvent.SPACE, $event)\"\n @tab-pressed=\"toggleCheckboxSelection(BentoListboxEvent.TAB, $event)\"\n @enter-pressed=\"toggleCheckboxSelection(BentoListboxEvent.ENTER, $event)\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </listbox-multi-select-options>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\n import { computed, type HTMLAttributes, nextTick, ref, toRef, useAttrs, useSlots, watch } from 'vue';\n import { isVue2 } from 'vue-demi';\n\n import { DecorativeCheckbox } from '@/internal/decorative-checkbox';\n import { BentoTypography } from '@/components/typography';\n import { BentoChip } from '@/components/chip';\n import { BentoListboxOption } from '../listbox-option';\n import { ListboxMultiSelectOptions } from './components/listbox-multi-select-options';\n\n import { useCheckboxSelectAll } from '@/composables';\n import { useListboxKeyboardNavigation } from '../../composables/useListboxKeyboardNavigation';\n import { useMultiLevelItems } from '../../composables/use-multi-level-items/use-multi-level-items';\n import { useVisibleDomOptions } from '@/internal/listbox/composables/use-visible-dom-options/use-visible-dom-options';\n\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n import {\n BentoListboxEvent,\n type BentoListboxMultiSelectValue,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxValue,\n } from '@/types/listbox';\n import { type Booleanish } from '@/types/prop-types';\n import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n import { type ListboxMultiSelectProps } from './listbox-multi-select.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n hasMoreItems: { type: Boolean, default: false },\n isOptionDisabled: { default: isVue2 ? () => () => false : () => false },\n items: null,\n lazyLoadType: { default: 'none' },\n searching: { type: Boolean, default: false },\n selectedValues: null,\n staticCategories: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"select\"]);\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n const slots = useSlots();\n const attrs = useAttrs();\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-label': attrs['aria-label']?.toString() as string,\n 'aria-busy': attrs['aria-busy']?.toString() as Booleanish,\n 'aria-atomic': attrs['aria-atomic']?.toString() as Booleanish,\n 'aria-live': attrs['aria-live']?.toString() as string,\n 'aria-multiselectable': true,\n }) as HTMLAttributes\n );\n const listboxRef = ref(null);\n const selectAllListboxItemsRef = ref(null);\n const selectedListboxItemsRef = ref(null);\n const listboxItemsRef = ref(null);\n\n const selectedItemsList = computed<Array<BentoListboxValue>>(() => props.selectedValues.map(({ value }) => value));\n\n const { isMultiLevelSelect, flattenedItemsList } = useMultiLevelItems(toRef(props, 'items'));\n\n const isTreePattern = computed(() => isMultiLevelSelect.value && !props.staticCategories);\n\n const computedRole = computed(() => (isTreePattern.value ? 'tree' : 'listbox'));\n const computedOptionRole = computed(() => (isTreePattern.value ? 'treeitem' : 'option'));\n\n const optionStates = (option: BentoListboxOptionItem) => {\n const isDisabled = props.isOptionDisabled(option);\n const isPreSelected =\n (selectedItemsList.value as BentoListboxMultiSelectValue)?.includes(option.value) || false;\n return { isDisabled, isPreSelected };\n };\n\n // Items that are not disabled and pre-selected disabled items\n const enabledItems = computed(() => {\n if (props.searching && isMultiLevelSelect) {\n return props.items;\n }\n\n const fullItemsList = flattenedItemsList.value.filter(option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n });\n\n props.selectedValues.forEach(selectedValue => {\n if (!fullItemsList.find(item => item.value === selectedValue.value)) {\n fullItemsList.push(selectedValue);\n }\n });\n\n return fullItemsList;\n });\n\n const visibleSelectedList = computed(\n () =>\n enabledItems.value?.filter(option => {\n if (option.items && isMultiLevelSelect.value && props.searching) {\n const amountOfSelectedCategoryOptions = option.items.filter(categoryOption =>\n (props.selectedValues ?? []).includes(categoryOption.value)\n ).length;\n return amountOfSelectedCategoryOptions === option.items.length;\n }\n\n return selectedItemsList.value?.includes(option.value); // Check for category\n }) as BentoListboxMultiSelectValue\n );\n\n const calculateTotalItems = () => {\n if (isMultiLevelSelect.value && !props.searching) {\n return flattenedItemsList.value.length;\n }\n\n return props.items.length;\n };\n\n const selectAllCheckboxText = computed(() => {\n const possibleSelections = enabledItems.value.length;\n const total = calculateTotalItems();\n const amountSelectedValues = visibleSelectedList.value?.length || 0;\n\n if (amountSelectedValues === 0) {\n return t('selectAll', { total: n(possibleSelections) });\n }\n\n if (amountSelectedValues === total) {\n return t('allSelected', { total: n(total) });\n }\n\n return amountSelectedValues <= total\n ? t('numberOfTotalSelected', { number: n(amountSelectedValues), total: n(total) })\n : t('numbersSelected', { number: n(amountSelectedValues) });\n });\n\n const selectAll = (selectableItems: BentoListboxOptions) => {\n const filterOutDisabledAndNotPreselectedOptions = option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n };\n\n // Adding or removing this list of values\n const addOrRemoveList = selectableItems\n .filter(filterOutDisabledAndNotPreselectedOptions)\n .filter(item => !selectedItemsList.value.includes(item.value)); // MAKE SURE NOT TO ADD DUPLICATES\n\n emit('select', [...props.selectedValues, ...addOrRemoveList]);\n };\n\n const unselectAll = (selectableItems: BentoListboxOptions) => {\n const findEnabledUnselectedItems = option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return !(isDisabled && isPreSelected);\n };\n\n const unselectedItemsList = selectableItems.filter(findEnabledUnselectedItems).map(({ value }) => value);\n const newSelectedList = props.selectedValues.filter(item => !unselectedItemsList?.includes(item.value));\n emit('select', newSelectedList);\n };\n\n const selectAllItems = () => {\n selectAll(flattenedItemsList.value);\n };\n\n const unselectAllItems = () => {\n unselectAll(flattenedItemsList.value);\n };\n\n const { isAllSelected, isIndeterminate, toggleSelectAll } = useCheckboxSelectAll(\n visibleSelectedList,\n enabledItems,\n selectAllItems,\n unselectAllItems\n );\n\n const ariaCheckedComputed = computed(() => {\n if (isIndeterminate.value) {\n return 'mixed';\n }\n\n return `${isAllSelected.value}`;\n });\n\n const isSelectAllOn = ref(isAllSelected.value);\n\n const handleSelectAll = () => {\n isSelectAllOn.value = !isSelectAllOn.value;\n toggleSelectAll(isSelectAllOn.value);\n };\n\n watch(isAllSelected, () => {\n isSelectAllOn.value = isAllSelected.value;\n });\n\n const selectAllCategory = (category: BentoListboxOptionItem) => {\n selectAll(category.items);\n };\n\n const unselectAllCategory = (category: BentoListboxOptionItem) => {\n unselectAll(category.items);\n };\n\n const toggleCheckboxSelection = (eventName, selectedOption: BentoListboxOptionItem) => {\n let exists = false;\n const newSelectedList = props.selectedValues.filter(({ value }) => {\n if (selectedOption.value === value) {\n exists = true;\n return false;\n }\n\n return true;\n });\n\n if (!exists) {\n newSelectedList.push(selectedOption);\n }\n emit(eventName, newSelectedList);\n };\n\n const selectedOptions = computed(() => {\n if (!isMultiLevelSelect.value) {\n return props.selectedValues;\n }\n\n const isOptionSelected = (option: BentoListboxOptionItem): boolean =>\n (selectedItemsList.value as unknown as Array<string | number>).includes(option.value);\n\n const categoryOptionsSelected = (categoryOptions: Array<BentoListboxOptionItem>): boolean =>\n !props.staticCategories && categoryOptions.every(option => isOptionSelected(option));\n\n const optionsFlat = props.items.flatMap(option =>\n option.items && !categoryOptionsSelected(option.items) ? option.items : option\n );\n\n const options = optionsFlat.filter(option => {\n if (option.items) {\n return true;\n }\n return isOptionSelected(option);\n });\n\n return options;\n });\n\n const showSelectedItems = computed(() => {\n const isLazyLoad = ['automatic', 'button'].includes(props.lazyLoadType);\n const hasAllItemsSelected =\n props.selectedValues?.length > 0 && visibleSelectedList.value?.length !== flattenedItemsList.value?.length;\n\n if (isLazyLoad && props.hasMoreItems) {\n return !!props.selectedValues?.length;\n }\n\n return hasAllItemsSelected;\n });\n\n const showSelectAllCheckbox = computed(() => {\n const isLazyLoad = ['automatic', 'button'].includes(props.lazyLoadType);\n\n if (!isLazyLoad) {\n return true;\n }\n\n return !props.hasMoreItems;\n });\n\n // Keyboard navigation\n const expandedCategories = ref([]);\n\n const { visibleDomOptions, updateVisibleDomOptions } = useVisibleDomOptions(\n listboxRef,\n toRef(props, 'items'),\n computedOptionRole\n );\n\n const toggleCategoryVisibility = category => {\n if (expandedCategories.value.includes(category)) {\n expandedCategories.value = expandedCategories.value.filter(item => item !== category);\n } else {\n expandedCategories.value.push(category);\n }\n\n nextTick(() => {\n updateVisibleDomOptions();\n });\n };\n\n const focusItem = (nextFocusedItemIndex: number) => {\n visibleDomOptions.value[nextFocusedItemIndex]?.focus();\n };\n\n const {\n moveToNextElement,\n moveToPreviousElement,\n moveToFirstElement,\n moveToLastElement,\n preventDefault,\n focusedIndex,\n setListboxFocusedIndex,\n } = useListboxKeyboardNavigation(\n {\n items: visibleDomOptions,\n },\n focusItem\n );\n\n const listboxListeners = {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: (event: CustomEvent<KeyboardEvent>) =>\n moveToPreviousElement(event),\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: (event: CustomEvent<KeyboardEvent>) =>\n moveToNextElement(event),\n [BentoKeyboardNavigationKeyDownEvent.HOME]: moveToFirstElement,\n [BentoKeyboardNavigationKeyDownEvent.END]: moveToLastElement,\n };\n\n defineExpose({\n /**\n * Method to set the index of the item to be focused on\n * Used for focus management to be kept in-sync with parent e.g. dropdowns\n */\n setListboxFocusedIndex,\n });\n\n const chipsSectionListeners = {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: preventDefault,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: preventDefault,\n };\n\n const computedItemsIndex = computed(() => {\n let itemIndex = showSelectAllCheckbox.value ? 1 : 0;\n const indexMap = {};\n\n props.items.forEach(item => {\n let subItemsVisible = expandedCategories.value.includes(item.value);\n\n if (item.items) {\n if (props.staticCategories) {\n subItemsVisible = true;\n } else {\n indexMap[item.value] = itemIndex++;\n }\n\n if (subItemsVisible) {\n item.items.forEach(subItem => (indexMap[subItem.value] = itemIndex++));\n }\n } else {\n indexMap[item.value] = itemIndex++;\n }\n });\n return indexMap;\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Listbox multi-select options list\n *\n * @example\n * import { BentoListboxMultiSelect } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoListboxMultiSelect },\n * template: `\n * <bento-listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default { i18n: { messages } };\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select.scss\" />\n","/**\n * The debounce() method is used to create a debounced function which\n * delays the given callback function until after the stated wait time\n * in milliseconds have passed since the last time this debounced function was called.\n *\n * @param {Function} callback - The function to debounce.\n * @param debounceTime - The number of milliseconds to delay.\n * @returns {Function} - Returns the new debounced function.\n */\nexport const debounce = <T extends (...args: Array<any>) => any>(callback: T, debounceTime = 300) => {\n let timeoutId: ReturnType<typeof setTimeout>;\n\n const callable = (...args: any) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => callback(...args), debounceTime);\n };\n return <T>(<any>callable);\n};\n","<template>\n <div\n :id=\"id\"\n ref=\"listboxRef\"\n v-bento-keyboard-navigation-directive\n class=\"b-listbox\"\n tabindex=\"-1\"\n v-bind=\"listboxContainerAttributes\"\n :style=\"containerProps?.style\"\n data-testid=\"listbox-container\"\n @scroll=\"onListboxContainerScroll\"\n >\n <div v-bind=\"wrapperProps\">\n <!-- Loading filtered items loading -->\n <div v-if=\"componentLoading\" class=\"b-listbox__loading-filtered-items\">\n <bento-loading-indicator />\n </div>\n <!-- Empty search message -->\n <div v-else-if=\"isSearchResultEmpty\" class=\"b-listbox__empty-search-message\">\n <bento-empty-state v-if=\"emptyState\" v-bind=\"limitedEmptyStateProps\" />\n <bento-typography v-else el=\"span\">{{ noResultsMessage }}</bento-typography>\n </div>\n\n <template v-else>\n <!-- Multi select -->\n <template v-if=\"multiple\">\n <bento-listbox-multi-select\n ref=\"listboxItemRef\"\n :has-more-items=\"hasMoreItems\"\n v-bind=\"ariaAttributes\"\n :items=\"items\"\n :lazy-load-type=\"lazyLoadType\"\n :static-categories=\"staticCategories\"\n :selected-values=\"selectedValue\"\n :searching=\"searching\"\n :is-option-disabled=\"isOptionDisabled\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-multi-select>\n </template>\n\n <!-- Single select -->\n <template v-else>\n <bento-listbox-single-select\n ref=\"listboxItemRef\"\n :items=\"virtualisedItems\"\n :total-item-count=\"totalItemCount\"\n :scroll-to-index=\"scrollToIndex\"\n :virtual-scroll-start-index=\"virtualScrollStartIndex\"\n v-bind=\"ariaAttributes\"\n :selected-value=\"selectedValue\"\n :static-categories=\"staticCategories\"\n :is-option-disabled=\"isOptionDisabled\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select>\n </template>\n\n <!-- Lazy Loading -->\n <div v-if=\"shouldDisplayShowMoreButton\" class=\"b-listbox__lazy-load\">\n <bento-loading-button :state=\"loadingButtonState\" variant=\"secondary\" @click.capture=\"emitShowMore\">\n {{ showMoreButtonText }}\n </bento-loading-button>\n </div>\n <div v-else-if=\"loading\" class=\"b-listbox__lazy-load\">\n <bento-loading-indicator />\n </div>\n </template>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, ref, toRef } from 'vue';\n import {\n type BentoListboxEmptyStateProps,\n BentoListboxEvent,\n type BentoListboxIsOptionDisabled,\n BentoListboxLazyLoadType,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxVirtulisationOptions,\n } from '@/types/listbox';\n import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n import { BentoKeyboardNavigationDirective } from '@/directives';\n import { BentoListboxSingleSelect } from './components/listbox-single-select';\n import { BentoListboxMultiSelect } from './components/listbox-multi-select';\n import { BentoTypography } from '@/components/typography';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import { BentoLoadingButton, BentoLoadingButtonState } from '@/components/button';\n import { BentoEmptyState } from '@/components/empty-state';\n import { useI18n } from '@/utils/ts/i18n';\n import { debounce } from '@/utils/ts/debounce';\n import { useVirtualList } from '@/composables/use-virtual-list';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const DEFAULT_DROPDOWN_ITEM_HEIGHT = 36;\n\n /**\n * Listbox container.\n * It lists all the available options.\n *\n * @example\n * <bento-listbox\n * v-slot=\"{label, value}\"\n * :id=\"listboxOptionsContainerId\"\n * :aria-label=\"ariaLabel\"\n * :disabled=\"disabled\"\n * :multiple=\"multiple\"\n * :selected=\"value\"\n * :isOptionDisabled=\"option => option.value === 2\"\n * :items=\"[{\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * }]\"\n * @select=\"onOptionSelected\"\n * >\n * </bento-listbox>\n */\n export default defineComponent({\n name: 'bento-listbox',\n components: {\n BentoEmptyState,\n BentoListboxSingleSelect,\n BentoListboxMultiSelect,\n BentoTypography,\n BentoLoadingIndicator,\n BentoLoadingButton,\n },\n directives: { BentoKeyboardNavigationDirective },\n i18n: { messages },\n props: {\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Empty state props that will be used with the inner empty state component to be displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoListboxEmptyStateProps>,\n default: undefined,\n },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.\n */\n id: { type: String, required: true },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Listbox option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: () => undefined,\n },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * Indicates if new options are lazy loading.\n */\n loading: { type: Boolean, default: false },\n\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType: {\n type: String as PropType<BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`>,\n default: BentoListboxLazyLoadType.NONE,\n validator: (value: BentoListboxLazyLoadType) => Object.values(BentoListboxLazyLoadType).includes(value),\n },\n\n /**\n * Indicates the listbox is loading filtered items.\n */\n componentLoading: { 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 * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Messaged displayed when no items are listed in the listbox\n */\n noResultsMessage: { type: String, required: true },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: BentoListboxMultiSelect.props.searching,\n\n /**\n * The `input` value.\n * Providing an empty string or empty array will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected for single select\n */\n selectedValue: {\n type: Array as PropType<BentoListboxOptions>,\n default: () => [],\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<BentoListboxVirtulisationOptions>,\n default: false,\n },\n },\n emits: [\n BentoListboxEvent.SELECT,\n BentoListboxEvent.SPACE,\n BentoListboxEvent.SHOW_MORE,\n BentoListboxEvent.ENTER,\n BentoListboxEvent.ESCAPE,\n BentoListboxEvent.TAB,\n ],\n setup(props, { emit, slots }) {\n const listboxItemRef = ref([]);\n const items = toRef(props, 'items');\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isLazyLoadListbox = computed(() => props.lazyLoadType !== BentoListboxLazyLoadType.AUTOMATIC);\n const hasAutomaticLazyLoader = computed(() => props.lazyLoadType === BentoListboxLazyLoadType.AUTOMATIC);\n\n // Virtual scrolling\n const virtualScrollItemHeight = () => {\n if (typeof props?.virtualScroll === 'object' && props?.virtualScroll?.itemHeight) {\n return props.virtualScroll.itemHeight;\n }\n return DEFAULT_DROPDOWN_ITEM_HEIGHT;\n };\n const isVirtualScrollEnabled =\n !props?.multiple && props?.virtualScroll !== false && props?.lazyLoadType === 'none';\n\n const {\n containerRef: listboxRef,\n containerProps,\n onScroll: onContainerScroll,\n list: virtualisedItems,\n wrapperProps,\n scrollToIndex,\n startIndex: virtualScrollStartIndex,\n } = useVirtualList<BentoListboxOptionItem>(items, {\n itemHeight: virtualScrollItemHeight(),\n // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select\n disabled: !isVirtualScrollEnabled,\n });\n\n const totalItemCount = computed(() => (isVirtualScrollEnabled ? items.value.length : 0));\n\n // Aria a11y\n const ariaAtomic = computed<HTMLAttributes['aria-atomic']>(() =>\n props.componentLoading !== undefined || isLazyLoadListbox.value ? 'true' : undefined\n );\n const ariaBusy = computed<HTMLAttributes['aria-busy']>(() =>\n (isLazyLoadListbox.value && props.loading) || props.componentLoading ? 'true' : 'false'\n );\n const ariaLive = computed<HTMLAttributes['aria-live']>(() =>\n isLazyLoadListbox.value || props.componentLoading !== undefined ? 'polite' : undefined\n );\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-label': props.ariaLabel,\n 'aria-busy': ariaBusy.value,\n 'aria-atomic': ariaAtomic.value,\n 'aria-live': ariaLive.value,\n }) as HTMLAttributes\n );\n\n const listboxContainerAttributes = computed(\n () =>\n (props.componentLoading\n ? {\n ...ariaAttributes.value,\n role: 'alert',\n }\n : {}) as HTMLAttributes\n );\n\n const onOptionSelected = eventName => (selectedItem: BentoListboxOptions) => {\n emit(eventName, selectedItem);\n };\n\n const emitShowMore = () => {\n emit(BentoListboxEvent.SHOW_MORE);\n };\n\n const emitShowMoreOnScrollEnd = debounce(() => {\n const container = listboxRef.value;\n\n if (!container) {\n return;\n }\n\n const isAtBottom = Math.round(container.scrollTop) + container.clientHeight >= container.scrollHeight;\n\n if (props.hasMoreItems && isAtBottom && !props.loading) {\n emitShowMore();\n }\n });\n\n const onListboxContainerScroll = () => {\n if (hasAutomaticLazyLoader.value) {\n emitShowMoreOnScrollEnd();\n } else {\n onContainerScroll();\n }\n };\n\n const isSearchResultEmpty = computed(() => props.items?.length === 0);\n\n const shouldDisplayShowMoreButton = computed(\n () => props.lazyLoadType === BentoListboxLazyLoadType.BUTTON && props.hasMoreItems\n );\n\n const loadingButtonState = computed(() =>\n props.loading ? BentoLoadingButtonState.LOADING : BentoLoadingButtonState.START\n );\n\n const showMoreButtonText = computed(() => (props.loading ? t('loading') : t('showMore')));\n\n const limitedEmptyStateProps = computed<InstanceType<typeof BentoEmptyState>['$props']>(() => ({\n ...props.emptyState,\n variant: 'condensed',\n }));\n\n const listboxListeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected(BentoListboxEvent.SELECT),\n [BentoListboxEvent.SPACE]: onOptionSelected(BentoListboxEvent.SPACE),\n [BentoListboxEvent.TAB]: onOptionSelected(BentoListboxEvent.TAB),\n [BentoListboxEvent.ENTER]: onOptionSelected(BentoListboxEvent.ENTER),\n };\n\n return {\n // Refs\n listboxRef,\n listboxItemRef,\n\n // a11y\n ariaAttributes,\n listboxContainerAttributes,\n\n // Values\n containerProps,\n isSearchResultEmpty,\n limitedEmptyStateProps,\n loadingButtonState,\n slots,\n shouldDisplayShowMoreButton,\n showMoreButtonText,\n virtualisedItems,\n wrapperProps,\n\n // Virtual scroll\n totalItemCount,\n scrollToIndex,\n virtualScrollStartIndex,\n\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n\n // Methods\n onListboxContainerScroll,\n onOptionSelected,\n emitShowMore,\n listboxListeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox.scss\" />\n","import {\n type BentoListboxMultiSelectValue,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxSelectedValue,\n type BentoListboxSelectedValueLabelPair,\n type BentoListboxValue,\n} from '@/types/listbox';\nimport { ref, type Ref, watch } from 'vue';\n\n/**\n * Extracts an item's label from the items in the list of options\n * displayed in the Listbox.\n *\n * Searches through all items and their sub-items (categories).\n *\n * @param items List of options displayed in the Listbox\n * @param value Selected value that needs to be found in the list\n * @returns Label found\n */\nconst findItem = (items: BentoListboxOptions, value: BentoListboxValue): BentoListboxOptionItem => {\n for (const item of items) {\n if (item.value === value) {\n return item;\n }\n\n if (item.items) {\n // recursively look for the value and continue to the next item if value is not found\n const label = findItem(item.items, value);\n\n if (label) {\n return label;\n }\n }\n }\n\n return null;\n};\n\n/**\n * Type guard to check if a value is of type BentoListboxSelectedValueLabelPair.\n * @param value The value to check.\n * @returns True if the value is BentoListboxSelectedValueLabelPair, false otherwise.\n */\nconst isBentoListboxSelectedValueLabelPair = (\n value: BentoListboxSelectedValue\n): value is BentoListboxSelectedValueLabelPair => {\n return typeof value === 'object' && value !== null && 'value' in value && 'label' in value;\n};\n\n/**\n * Creates two lists (one with value/label pairs and one simply with values) that are\n * used to cache the internal option selections to preserve the `label` in case the\n * value is loaded from external sources and might not be found in the list of `items`\n * later on.\n *\n * This helps with external searches and lazy loaded lists.\n *\n * @param items List of options displayed in the Listbox\n * @param selectedValues Selected list of values\n * @param multiple Indicates if the Listbox is multi-select (true) or single-select (false)\n * @param enableValueLabelPair Indicates if the Listbox should emit value/label pairs.\n * @returns Two lists of cached items. One list with label/value pairs and one with only the values stored.\n */\nexport const useCachedSelectedValues = (\n items: Ref<BentoListboxOptions>,\n selectedValues: Ref<BentoListboxSelectedValue>,\n multiple: Ref<boolean>,\n enableValueLabelPair?: Ref<boolean>\n) => {\n const cachedSelectedListboxOptions = ref<BentoListboxOptions>([]);\n const cachedListboxSelectedValues = ref<BentoListboxSelectedValue>();\n\n /**\n * Sets the cached selected values based on a simple value (string or number).\n * It handles both single and multi-select modes.\n * @param newSelectedValues The new list of selected options.\n */\n const setSimpleSelectedValues = (newSelectedValues: BentoListboxOptions) => {\n if (multiple.value) {\n cachedListboxSelectedValues.value = newSelectedValues.map(({ value }) => value);\n } else {\n cachedListboxSelectedValues.value = newSelectedValues.length > 0 ? newSelectedValues[0].value : null;\n }\n };\n\n const setValueLabelPair = (newSelectedValues: BentoListboxOptions) => {\n if (multiple.value) {\n cachedListboxSelectedValues.value = newSelectedValues.map(({ value, label }) => ({ value, label }));\n } else {\n cachedListboxSelectedValues.value =\n newSelectedValues.length > 0\n ? { value: newSelectedValues[0].value, label: newSelectedValues[0].label }\n : null;\n }\n };\n\n const setCachedValues = (newSelectedValues: BentoListboxOptions) => {\n cachedSelectedListboxOptions.value = newSelectedValues;\n if (enableValueLabelPair?.value) {\n setValueLabelPair(newSelectedValues);\n } else {\n setSimpleSelectedValues(newSelectedValues);\n }\n };\n\n const resetCache = () => {\n cachedSelectedListboxOptions.value = [];\n cachedListboxSelectedValues.value = null;\n };\n\n watch(\n () => selectedValues.value,\n () => {\n if (!selectedValues.value && selectedValues.value !== 0) {\n resetCache();\n return;\n }\n\n const isSingleSelect = !Array.isArray(selectedValues.value);\n // Make a copy of cache\n const cachedCopy = [...cachedSelectedListboxOptions.value];\n // Clear cache\n resetCache();\n\n const addValue = (value: BentoListboxSelectedValue) => {\n // When it's a value/label pair, add it immediately\n // Otherwise search if the value is available in the list\n // and create a value/label pair to be added to the list\n if (isBentoListboxSelectedValueLabelPair(value)) {\n cachedSelectedListboxOptions.value.push(value);\n } else {\n // Search label by value in \"items\"\n let selectedItem = findItem(items.value, value as BentoListboxValue);\n\n // Search in previous cache\n if (!selectedItem) {\n selectedItem = findItem(cachedCopy, value as BentoListboxValue);\n }\n\n // Transform value to label if not found anywhere\n if (!selectedItem) {\n selectedItem = { value: value as BentoListboxValue, label: value.toString() };\n }\n\n cachedSelectedListboxOptions.value.push(selectedItem);\n }\n };\n\n if (isSingleSelect) {\n const value = selectedValues.value as BentoListboxValue;\n\n addValue(value);\n if (enableValueLabelPair?.value) {\n setValueLabelPair(cachedSelectedListboxOptions.value);\n } else {\n setSimpleSelectedValues(cachedSelectedListboxOptions.value);\n }\n return;\n }\n\n // Multi-select\n (selectedValues.value as BentoListboxMultiSelectValue).forEach(addValue);\n // Add each selected value in the cache\n if (enableValueLabelPair?.value) {\n setValueLabelPair(cachedSelectedListboxOptions.value);\n } else {\n setSimpleSelectedValues(cachedSelectedListboxOptions.value);\n }\n },\n { immediate: true }\n );\n\n return {\n // Values\n cachedSelectedListboxOptions,\n cachedListboxSelectedValues,\n // Methods\n resetCache,\n setCachedValues,\n };\n};\n","import type {\n BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps,\n BentoListboxSearchOptions as BentoDropdownSearchOptions,\n BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions,\n BentoListboxIsOptionDisabled,\n BentoListboxLazyLoadType,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n} from '../../types/listbox';\nimport { type FormField } from '../../types/form-field';\nimport type { BentoTeleportProps } from '../internal/teleport/teleport.types';\nexport type { BentoDropdownSearchOptions, BentoDropdownEmptyStateProps, BentoDropdownVirtulisationOptions };\nexport interface BentoDropdownProps extends FormField {\n /**\n * @deprecated Since v2.0.0. Use `aria-label` instead.\n * Defines a string value that labels an interactive element.\n */\n ariaLabel?: string;\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed?: boolean;\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState?: BentoDropdownEmptyStateProps;\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering?: boolean;\n /**\n * Highlights the dropdown in an erroneous state.\n * @deprecated Since v2.0.0. Use `errorMessage` instead.\n */\n error?: boolean;\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems?: boolean;\n /**\n * Function that dertermines which options are disabled from interaction.\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?: BentoListboxIsOptionDisabled;\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoListboxOptionItem }\n * @property value.label - Text to be displayed in the option\n * @property value.value - Value of the option\n */\n items?: BentoListboxOptions;\n /**\n * Indicates if new options are lazy loading.\n */\n loading?: boolean;\n /**\n * Indicates that dropdown items are loading\n */\n componentLoading?: boolean;\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?: BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`;\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple?: boolean;\n /**\n * Dropdown search options and events.\n * @see BentoDropdownSearchOptions\n */\n search?: BentoDropdownSearchOptions;\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple?: boolean;\n /**\n * @deprecated Since v2.0.0. Do not use. Only the `default` size is supported.\n */\n size?: BentoDropdownSize | `${BentoDropdownSize}`;\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories?: boolean;\n /**\n * Renders the dropdown options container in the root `body` DOM node\n * (or `dialog` if the dropdown is inside a dialog).\n */\n teleport?: BentoTeleportProps;\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 * @deprecated Since v2.0.0. Use `v-model` or `model-value` instead.\n */\n value?: BentoListboxSelectedValue;\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 modelValue?: BentoListboxSelectedValue;\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?: BentoDropdownVirtulisationOptions;\n /**\n * Enables value/label value handling. When `true`, the component expects and emits value/label\n * pair objects instead of primitive values.\n *\n * This affects both the `value` prop and the `input` event payload.\n *\n * - **Input (`value` prop):** Expects a `{ value: string | number, label: string }` object (or an array of them for multi-select).\n * - **Output (`input` event):** Emits a `{ value: string | number, label: string }` object (or an array of them) upon selection.\n *\n * This is particularly useful when a selected item's label is not available in the `items` prop,\n * allowing the component to display the correct label for values loaded from external sources.\n * @default false\n */\n enableValueLabelPair?: boolean;\n}\n\n/**\n * @deprecated Since v2.0.0. Do not use. Only the `default` size is supported.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types/listbox';\n","import { computed, ref, type Ref, watch } from 'vue';\nimport { BentoListboxEvent, type BentoListboxOptions } from '@/types/listbox';\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<BentoListboxOptions>,\n multiple: Ref<boolean>,\n isOpen: Ref<boolean>,\n emit: (event: BentoListboxEvent | BentoDropdownEvent, selectedValue?: BentoListboxOptions) => 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: BentoListboxOptions) => {\n internalSelectedValue.value = newSelectedValue;\n if (!multiple.value) {\n emit(BentoDropdownEvent.SELECT, newSelectedValue);\n }\n };\n\n const onTabKey = (newSelectedValue: BentoListboxOptions) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.TAB);\n };\n\n const onEnterKey = (newSelectedValue: BentoListboxOptions) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.ENTER);\n };\n\n const onSpaceKey = (newSelectedValue: BentoListboxOptions) => {\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 v-if=\"isDropdownOpen\"\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 :component-loading=\"componentLoading\"\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, type PropType, ref, toRefs, useSlots } from 'vue';\n import { BentoListbox } from '@/internal/listbox';\n import {\n type BentoListboxEvent,\n type BentoListboxIsOptionDisabled,\n type BentoListboxOptions,\n } from '@/types/listbox';\n import { PopperContainer } from '@/components/popper-container';\n import {\n type BentoDropdownEmptyStateProps,\n type BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n type 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 '@/core/utils/ts';\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 const props = defineProps({\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Indicates that dropdown items are loading\n */\n componentLoading: { 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 * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.\n */\n id: { type: String, required: true },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoDropdownIsOptionDisabled}\n * @param {BentoDropdownOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: undefined,\n },\n\n /**\n * 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 lazy 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: Array as PropType<BentoListboxOptions>,\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--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 ariaLabel: props.ariaLabel,\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","import { type PropType } from 'vue';\nimport { type Booleanish } from '@/types/prop-types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\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 possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { 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 * Selected option's label\n */\n displayValue: { type: String, default: null },\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 * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","export const DROPDOWN_SMALL_SIZE_INJECTION_KEY = Symbol('dropdown small size injection key');\nexport const DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY = Symbol('dropdown underline style injection key');\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n :variant=\"isUnderlineStyle ? 'title' : 'body'\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n size=\"1\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n :required=\"showRequiredAttribute\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n :aria-readonly=\"readonly ? 'true' : null\"\n role=\"combobox\"\n :tabindex=\"disabled ? -1 : 0\"\n >\n <template v-if=\"shouldShowSingleSelectSlot\">\n <slot v-if=\"hasSlot('display-value')\" v-bind=\"selectedValueItem\" name=\"display-value\"></slot>\n <slot v-else v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n </template>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n :tabindex=\"disabled ? -1 : 0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"t('clearSearch')\" />\n <cross-circle-fill-icon v-else :svg-title=\"t('clearSearch')\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, inject, nextTick, type PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n import { DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY } from '../../dropdown.keys';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\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 * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\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 * 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 * 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 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 * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\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 * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits([]);\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n // Inject underline style key to change the dropdown layout\n const isUnderlineStyle = inject(DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY, false);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n 'b-dropdown-base-textbox--underline': isUnderlineStyle,\n }));\n\n const showRequiredAttribute = computed(() =>\n shouldShowInput.value && attrs['aria-required'] ? ('true' as Booleanish) : null\n );\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n 'aria-required': attrs['aria-required'] as Booleanish,\n }) as HTMLAttributes\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as Array<BentoListboxOptionItem>) : []\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n () => {\n if (shouldShowInput.value && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value.focus();\n });\n }\n }\n );\n\n const onOpenDropdown = async () => {\n if (!props.disabled && !props.readonly) {\n emit(DropdownBaseTextboxEvent.OPEN);\n // wait for popover to open before setting focus\n await nextTick();\n textbox.value.focus();\n }\n };\n\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = (event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n const focus = () => {\n textbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope ?? {}\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, type PropType, ref, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\n\n const slots = useSlots();\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: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\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 * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.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=\"#001222\" 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 import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\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=\"#001222\" 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 import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <div class=\"b-dropdown-small-textbox\" :class=\"conditionalClasses\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-small-textbox__textbox\"\n :size=\"BentoDropdownSize.SMALL\"\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, inject, type PropType, ref } from 'vue';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n import { type Booleanish } from '@/types/prop-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 import { stopEventPropagation } from '@/utils/ts/events';\n import { DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY } from '../../dropdown.keys';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\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 * 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 baseTextbox = ref(null);\n\n // Inject underline style key to change the dropdown layout\n const isUnderlineStyle = inject(DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY, false);\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 'b-dropdown-small-textbox--underline': isUnderlineStyle,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\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, type Ref } from 'vue';\nimport { type UseDisplayValueOptions } from './use-display-value.types';\nimport { type BentoListboxOptions } from '@/types/listbox';\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: Ref<BentoListboxOptions>, items: Ref<BentoListboxOptions>) =>\n items.value\n .reduce((acc, option) => {\n // Category items\n if (option.items) {\n const selectedCategoryOptions = option.items.filter(categoryOption =>\n selectedValues.value.find(selectedOption => selectedOption.value === 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.displayValue ?? option.label);\n } else {\n // If category is partially selected add each selected option and category\n selectedCategoryOptions.forEach(({ label, displayValue }) => acc.push(displayValue ?? label));\n }\n }\n\n // Non-category option\n if (selectedValues.value.find(selectedOption => selectedOption.value === option.value)) {\n acc.push(option.displayValue ?? option.label);\n }\n\n return acc;\n }, [])\n .join(', ');\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 = ({ items, placeholder, selectedValues, isMultiSelect }: UseDisplayValueOptions) => {\n const isCategoryMultilevel = computed(\n () => isMultiSelect.value && items.value.find(option => option.items?.length)\n );\n\n const computedDisplayValue = computed(() => {\n // If no value selected, return placeholder or nothing\n if (!selectedValues.value.length) {\n return placeholder.value || null;\n }\n\n // Category multi select\n if (isCategoryMultilevel.value) {\n return categoryMultiSelect(selectedValues, items);\n }\n\n return selectedValues.value.map(({ label, displayValue }) => displayValue ?? label).join(', ');\n });\n\n return computedDisplayValue;\n};\n","import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\nimport { BentoListboxEvent } from '@/types/listbox';\nimport { computed, nextTick, type Ref } from 'vue';\nimport {\n type UseListboxKeyboardNavigationOptions,\n type 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 Down\n * - Arrow Up\n * - Home key\n * - End key\n * - Space key\n * - Enter key\n * - Tab\n * - Escape 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 totalItemCount,\n isVirtualScroll,\n }: UseTextboxKeyboardNavigationOptions,\n toggleDropdown: () => void,\n openDropdown: () => void,\n closeDropdown: () => void\n) => {\n const focusOnOption = async (index: number) => {\n if (isDynamicFltering.value) {\n await nextTick();\n }\n items.value[index]?.focus();\n };\n\n const focusOnChip = async (index: number) => {\n if (isDynamicFltering.value) {\n await nextTick();\n }\n\n const chips =\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.$el.querySelectorAll(\n 'button'\n );\n\n if (chips?.length) {\n chips[index]?.focus();\n } else {\n focusOnOption(index);\n }\n };\n\n const setListboxFocusedIndex = (selectedIndex: number) => {\n return optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.setListboxFocusedIndex(\n selectedIndex\n );\n };\n\n const navigateToItem = async (index: number) => {\n await optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.navigateToItem(index);\n };\n\n /**\n * Navigates to an option by index using different strategies depending on scrolling mode.\n * When virtual scrolling is enabled, `navigateToItem` scrolls the virtual list to render\n * the target item before focusing it. Otherwise, the item is already in the DOM so we\n * directly update the focused index and move focus.\n */\n const navigateToOption = (index: number) => {\n nextTick(() => {\n if (isVirtualScroll) {\n navigateToItem(index);\n } else {\n setListboxFocusedIndex(index);\n focusOnOption(index);\n }\n });\n };\n\n const skipToFirstOption = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n navigateToOption(0);\n };\n\n const skipToLastOption = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n\n nextTick(() => {\n navigateToOption(isVirtualScroll ? totalItemCount.value - 1 : items.value.length - 1);\n });\n };\n\n const onArrowDown = ({ detail: event }) => {\n event.preventDefault();\n\n skipToFirstOption();\n };\n\n const onArrowUp = ({ detail: event }) => {\n event.preventDefault();\n\n skipToLastOption();\n };\n\n const onHomeKey = () => {\n skipToFirstOption();\n };\n\n const onEndKey = () => {\n skipToLastOption();\n };\n\n const onSpaceKey = ({ detail: event }) => {\n event.preventDefault();\n toggleDropdown();\n if (isDropdownOpen.value) {\n if (isMultiple) {\n focusOnChip(0);\n } else {\n navigateToOption(selectedValueIndex.value);\n }\n }\n };\n\n const onEnterKey = ({ detail: event }) => {\n event.preventDefault();\n toggleDropdown();\n if (isDropdownOpen.value) {\n if (isMultiple) {\n focusOnChip(0);\n } else {\n navigateToOption(selectedValueIndex.value);\n }\n }\n };\n\n const onTab = () => {\n // tab should not navigate through a combobox\n if (isDropdownOpen.value) {\n closeDropdown();\n }\n };\n\n const onEscapeKey = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n focusOnTextbox(inputContainerRef);\n }\n };\n\n const textboxKeyboardNavigationListeners = computed(() => ({\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: onArrowDown,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: onArrowUp,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: onHomeKey,\n [BentoKeyboardNavigationKeyDownEvent.END]: onEndKey,\n ...(!isDynamicFltering.value ? { [BentoKeyboardNavigationKeyDownEvent.SPACE]: onSpaceKey } : {}),\n [BentoKeyboardNavigationKeyDownEvent.ENTER]: onEnterKey,\n ...(!isDynamicFltering.value ? { [BentoKeyboardNavigationKeyDownEvent.TAB]: onTab } : {}),\n [BentoKeyboardNavigationKeyDownEvent.ESCAPE]: onEscapeKey,\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, type Ref, watch } from 'vue';\nimport { type BentoSearchBarItem } from './search-bar.types';\nimport { debounce } from '@/utils/ts/debounce';\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 * @param {Function} searchEvent - Optional search event to trigger on search term change.\n * @param {Ref<Boolean>} ignoreGroups - Boolean that determines if search returns items with subitems\n * @param {Number} debounceTime - Optional debounce time for the search event.\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<Array<T>>,\n searchEvent?: (searchValue: string) => void,\n ignoreGroups?: Ref<boolean>,\n debounceTime?: number\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 if (ignoreGroups?.value && option.items) {\n return [...findHits(searchTermLowerCased, option.items)];\n }\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 const debouncedSearchEvent =\n searchEvent !== undefined ? debounce(() => searchEvent(searchTermRef.value), debounceTime ?? 300) : undefined;\n\n // If search event exists trigger it on the search term changing\n watch(searchTermRef, () => {\n if (debouncedSearchEvent !== undefined) {\n debouncedSearchEvent();\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","<!-- 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=\"clickOutsideDropdownOptions\" 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=\"computedSize\"\n ref=\"inputContainerRef\"\n :condensed=\"condensed\"\n :value=\"searchTerm\"\n :additional-items-selected=\"additionalItemsSelected\"\n :aria-controls=\"dropdownOptionsContainerId\"\n :ariaExpanded=\"isDropdownOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-label=\"computedAriaLabel\"\n :aria-readonly=\"isReadOnly\"\n :aria-required=\"required\"\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-teleport v-if=\"inputContainerRef\" :disabled=\"teleport?.disabled\" :to=\"teleport?.to\">\n <bento-dropdown-options-container\n :id=\"dropdownOptionsContainerId\"\n ref=\"optionsContainerRef\"\n :aria-label=\"computedAriaLabel\"\n :component-loading=\"componentLoading\"\n :empty-state=\"emptyState\"\n :disabled=\"disabled\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"filteredItems\"\n :multiple=\"multiple\"\n :static-categories=\"staticCategories\"\n :open=\"isDropdownOpen\"\n :selected-value=\"cachedSelectedListboxOptions\"\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 </bento-teleport>\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 {\n computed,\n defineComponent,\n inject,\n nextTick,\n type Ref,\n ref,\n toRef,\n toRefs,\n useAttrs,\n useSlots,\n watch,\n } from 'vue';\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, useCachedSelectedValues, useMultiLevelItems } from '@/internal/listbox';\n import { ErrorMessage } from '@/internal/error-message';\n import { FieldLabel } from '@/internal/field-label';\n import { BentoTeleport } from '@/internal/teleport';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/core/utils/ts';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n // Composables\n import { useDisplayValue, useListboxKeyboardNavigation, useTextboxKeyboardNavigation } from './composables';\n import { useVisibleDomOptions } from '@/internal/listbox/composables/use-visible-dom-options/use-visible-dom-options';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n import { useHasSlot } from '@/composables';\n\n // Directives\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n // Types\n import { BentoDropdownEvent, type BentoDropdownProps, BentoDropdownSize } from './dropdown.types';\n import {\n BentoListboxEvent,\n type BentoListboxItemRole,\n type BentoListboxMultiSelectValue,\n type BentoListboxOptions,\n type BentoListboxSelectedValue,\n type BentoListboxSelectedValueLabelPair,\n } from '@/types/listbox';\n import { DROPDOWN_SMALL_SIZE_INJECTION_KEY } from './dropdown.keys';\n\n import messages from './messages.json';\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 description: { default: null },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n label: { default: null },\n optional: { type: Boolean, default: false },\n placeholder: { default: null },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n ariaLabel: { default: null },\n condensed: { type: Boolean, default: false },\n emptyState: { default: undefined },\n dynamicFiltering: { type: Boolean, default: false },\n error: { type: Boolean, default: false },\n hasMoreItems: { type: Boolean, default: false },\n isOptionDisabled: { type: Function, default: undefined },\n items: { default: () => [] },\n loading: { type: Boolean, default: false },\n componentLoading: { type: Boolean, default: false },\n lazyLoadType: { default: BentoListbox.props.lazyLoadType.default },\n multiple: { type: Boolean, default: false },\n search: { default: undefined },\n showSlotContentInMultiple: { type: Boolean, default: false },\n size: { default: null },\n staticCategories: { type: Boolean, default: false },\n teleport: { default: () => ({ disabled: true }) },\n value: { default: null },\n modelValue: { default: null },\n virtualScroll: { type: Boolean, default: false },\n enableValueLabelPair: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\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 dropdownValue = computed(() => props.modelValue ?? props.value);\n\n const { cachedSelectedListboxOptions, cachedListboxSelectedValues, setCachedValues } = useCachedSelectedValues(\n toRef(props, 'items'),\n dropdownValue,\n toRef(props, 'multiple'),\n toRef(props, 'enableValueLabelPair')\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const ariaDescribedByAttribute = ref(attrs['aria-describedby']);\n const { ariaLabel, label } = toRefs(props);\n\n // vue-i18n issue with t() used in script - direct usage in template works\n // requires either createI18n({ legacy: false }) or to be wrapped in computed()\n const computedAriaLabelFallbackMessage = computed(() => t('ariaLabelFallback'));\n const computedAriaLabel = useAriaLabel({\n // TODO: take ariaLabel ref away when aria-label prop is removed\n ariaLabel: ariaLabel.value || (ariaLabelAttribute as Ref<string>),\n label,\n defaultFallback: computedAriaLabelFallbackMessage,\n });\n\n // Inject input field component key to change the dropdown size\n const isInputComponent = props.size === BentoDropdownSize.SMALL || inject(DROPDOWN_SMALL_SIZE_INJECTION_KEY, false);\n const computedSize = 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 staticCategories = toRef(props, 'staticCategories');\n const filteredItems = useSearchBarFilter(\n searchTerm,\n items,\n props?.search?.searchEvent,\n staticCategories,\n props?.search?.debounceTime\n );\n const isSearching = computed(() => props.dynamicFiltering && !!searchTerm.value);\n\n const displayValue = useDisplayValue({\n items,\n placeholder: toRef(props, 'placeholder'),\n isMultiSelect: toRef(props, 'multiple'),\n selectedValues: cachedSelectedListboxOptions,\n });\n\n const selectedValueItem = computed(() => {\n if (props?.multiple && Array.isArray(dropdownValue.value)) {\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 === dropdownValue.value)\n );\n\n // Find the specific item within the category\n const selectedCategoryItem = category\n ? category.items.find(item => item.value === dropdownValue.value)\n : props.items.find(({ value }) => value === dropdownValue.value);\n\n return selectedCategoryItem ?? null;\n }\n\n return props.items.find(({ value }) => value === dropdownValue.value);\n });\n\n const selectedValueIndex = computed(() => {\n const index = filteredItems.value.findIndex(({ value }) => {\n return props.enableValueLabelPair\n ? (dropdownValue.value as BentoListboxSelectedValueLabelPair).value === value\n : dropdownValue.value === value;\n });\n return index > -1 ? index : 0;\n });\n\n const { isMultiLevelSelect, flattenedItemsList } = useMultiLevelItems(items);\n\n const isTreePattern = computed(() => isMultiLevelSelect.value && !props.staticCategories);\n\n const computedOptionRole = computed<BentoListboxItemRole>(() => (isTreePattern.value ? 'treeitem' : 'option'));\n\n const additionalItemsSelected = computed(() => {\n if (props.multiple) {\n const selectedItemsCount = Array.isArray(dropdownValue.value) ? dropdownValue.value.length : 0;\n const total = isMultiLevelSelect.value ? flattenedItemsList.value.length : items.value.length;\n\n if (selectedItemsCount === 0) {\n return null;\n }\n\n // Display count always - show \"all\" only when is not external filtering (hasMoreItems = true)\n if (!props.hasMoreItems && total > 0 && total === selectedItemsCount) {\n return t('all');\n }\n\n return selectedItemsCount;\n }\n\n return null;\n });\n\n // ARIA\n const ariaDescribedBy = computed(\n () =>\n [\n props.description ? descriptionId : null,\n ariaDescribedByAttribute.value,\n props.errorMessage ? errorId : null,\n ]\n .filter(Boolean)\n .join(' ') || null\n );\n\n const listboxRef = computed(() => optionsContainerRef.value?.$el as HTMLDivElement);\n\n const { visibleDomOptions, updateVisibleDomOptions } = useVisibleDomOptions(\n listboxRef,\n filteredItems,\n computedOptionRole\n );\n\n const openDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = true;\n nextTick(() => {\n updateVisibleDomOptions();\n });\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 nextTick(() => {\n updateVisibleDomOptions();\n });\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 clickOutsideDropdownOptions = computed(() => [\n clickOutsideDropdown,\n {\n ignore: [listboxRef],\n },\n ]);\n\n const onOptionSelected = async (selectedValue: BentoListboxOptions) => {\n // Clear and close the dropdown on single selection\n if (!props.multiple) {\n searchTerm.value = '';\n isDropdownOpen.value = false;\n }\n\n setCachedValues(selectedValue);\n\n /**\n * Emit the value/label pair objects if enableValueLabelPair is enabled,\n * otherwise just emit the list of selected values (number or string)\n */\n emitValue(cachedListboxSelectedValues.value);\n\n // Focus the input after selection and dropdown has closed\n if (!props.multiple) {\n await nextTick();\n focus();\n }\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: visibleDomOptions,\n isMultiple: props.multiple,\n totalItemCount: computed(() => filteredItems.value.length),\n isVirtualScroll: !props?.multiple && props?.virtualScroll !== false && props?.lazyLoadType === 'none',\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\n if (props.value) {\n deprecate(\n 'BentoDropdown \"value\" property',\n `The use of \"value\" prop in \"BentoDropdown\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n\n const focus = () => {\n inputContainerRef.value.focus();\n };\n\n watch(\n () => isDropdownOpen.value,\n (isOpen: boolean) => {\n if (isOpen) {\n emit('open');\n }\n }\n );\n\n defineExpose({\n focus,\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 model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown.scss\" />\n"],"names":["useCheckboxSelectAll","selectedItemsList","items","selectAll","unselectAll","isAllSelected","computed","_a","_b","isIndeterminate","selectedValue","useVirtualList","disabled","itemHeight","overscan","prefixHeight","containerRef","ref","list","startIndex","endIndex","containerHeight","listObserver","wrapperProps","totalHeight","sum","_","index","offSetTop","i","getOffset","prefixHeightIfSet","scrollTop","offset","size","getVisibileNumberOfItems","start","capacity","updateVisibleItems","visibleCount","onScroll","onMounted","observeSizeOfElement","clientHeight","onUnmounted","watch","containerProps","scrollToIndex","itemTop","currentHeight","itemBottom","viewportHeight","viewportBottom","BentoListboxEvent","BentoListboxEvent2","BentoListboxLazyLoadType","BentoListboxLazyLoadType2","_sfc_main$h","defineComponent","BentoTypography","_sfc_main$g","props","emit","conditionalClasses","BentoKeyboardNavigationKeyDownEvent","e","eventName","uuid$3","_sfc_main$f","_sfc_main$e","BentoListboxOption","CheckmarkIcon","onOptionSelected","ariaDisabled","ariaSelected","tabIndex","useListboxKeyboardNavigation$1","totalItemCount","focusItem","lastItemIndex","focusedIndex","mutateFocusedIndex","direction","calculateFocusedIndex","edgeCaseItem","moveToNextElement","event","preventDefault","moveToPreviousElement","moveToFirstElement","moveToLastElement","setListboxFocusedIndex","useVisibleDomOptions","role","checkVisibility","visibleDomOptions","updateVisibleDomOptions","options","option","nextTick","_sfc_main$d","BentoListboxSingleSelectCategory","BentoListboxSingleSelectOption","BentoKeyboardNavigationDirective","expose","slots","attrs","listboxRef","listboxItemRef","selectedItem","ariaAttributes","_c","_d","hasCategories","selectedOption","toRef","isVirtualScrollEnabled","handleVirtualScrollingFocus","target","localIndex","globalIndex","newDomIndex","navigateToItem","listboxListeners","listboxOptionListeners","uuid$2","_sfc_main$c","__default__$6","CheckboxInputState","outlineConditionalClasses","ListboxMultiSelectCategoryClass","ListboxMultiSelectCategoryClass2","ListboxMultiSelectCategoryEvent","ListboxMultiSelectCategoryEvent2","_sfc_main$a","messages$5","ChevronDownIcon","ChevronUpIcon","DecorativeCheckbox","isOpen","useI18n","categoryGroupId","generateUid","categoryNameId","vue2Vue3FixedisOptionDisabled","hasAllPropsDisabled","isStaticCategory","showItemChildren","conditionalClass","toggleOpen","open","optionStates","isDisabled","isPreSelected","enabledItems","visibleSelectedList","value","chevronTitle","messageName","toggleSelectAll","ariaCheckedComputed","isSelectAllOn","handleSelectAll","ListboxMultiSelectOptionsEvent","ListboxMultiSelectOptionsEvent2","_sfc_main$9","ListboxMultiSelectCategory","toggleCheckboxSelection","isCategory","shouldShowDescription","isSearchingMultiLevel","isOptionSelected","item","toggleSearchOption","useMultiLevelItems","itemsList","isMultiLevelSelect","flattenedItemsList","acc","val","__default__$5","messages$4","t","n","useSlots","useAttrs","selectAllListboxItemsRef","selectedListboxItemsRef","listboxItemsRef","isTreePattern","computedRole","computedOptionRole","fullItemsList","categoryOption","calculateTotalItems","selectAllCheckboxText","possibleSelections","total","amountSelectedValues","selectableItems","filterOutDisabledAndNotPreselectedOptions","addOrRemoveList","findEnabledUnselectedItems","unselectedItemsList","newSelectedList","selectAllItems","unselectAllItems","selectAllCategory","category","unselectAllCategory","exists","selectedOptions","categoryOptionsSelected","categoryOptions","showSelectedItems","isLazyLoad","hasAllItemsSelected","showSelectAllCheckbox","expandedCategories","toggleCategoryVisibility","nextFocusedItemIndex","chipsSectionListeners","computedItemsIndex","itemIndex","indexMap","subItemsVisible","subItem","debounce","callback","debounceTime","timeoutId","args","DEFAULT_DROPDOWN_ITEM_HEIGHT","_sfc_main$7","BentoEmptyState","BentoListboxSingleSelect","BentoListboxMultiSelect","BentoLoadingIndicator","BentoLoadingButton","messages$3","isLazyLoadListbox","hasAutomaticLazyLoader","virtualScrollItemHeight","onContainerScroll","virtualisedItems","virtualScrollStartIndex","ariaAtomic","ariaBusy","ariaLive","listboxContainerAttributes","emitShowMore","emitShowMoreOnScrollEnd","container","isAtBottom","onListboxContainerScroll","isSearchResultEmpty","shouldDisplayShowMoreButton","loadingButtonState","BentoLoadingButtonState","showMoreButtonText","limitedEmptyStateProps","findItem","label","isBentoListboxSelectedValueLabelPair","useCachedSelectedValues","selectedValues","multiple","enableValueLabelPair","cachedSelectedListboxOptions","cachedListboxSelectedValues","setSimpleSelectedValues","newSelectedValues","setValueLabelPair","setCachedValues","resetCache","isSingleSelect","cachedCopy","addValue","BentoDropdownSize","BentoDropdownSize2","useDropdownOptionsListbox","internalSelectedValue","isApplyButtonDisabled","onApplyClick","onCancelClick","onOutsideDropdownClick","actions","newSelectedValue","onTabKey","onEnterKey","onSpaceKey","onEscapeKey","emitShowMoreEvent","listeners","__default__$4","messages$2","toRefs","dropdownOptionsListboxRef","isDropdownOpen","noResultsMessage","conditionalListboxClasses","popperContainerOrPopoverComponent","BentoPopover","PopperContainer","popperContainerOrPopoverProps","containerMinAndMaxWidth","DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","DROPDOWN_SMALL_SIZE_INJECTION_KEY","DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY","__default__$3","messages$1","hasSlot","useHasSlot","textbox","textboxId","isUnderlineStyle","inject","showRequiredAttribute","shouldShowInput","comboboxConditionalClasses","isFiltering","selectedValueItems","shouldShowSingleSelectSlot","shouldShowMultipleSlot","onOpenDropdown","onCloseDropdown","onToggleDropdown","onClearSearch","onInputEvent","focus","__default__$2","baseTextbox","onInput","newInput","onKeyDown","openDropdown","stopEventPropagation","closeDropdown","clearValue","uuid$1","_sfc_main$3","uuid","_sfc_main$2","__default__$1","categoryMultiSelect","selectedCategoryOptions","displayValue","useDisplayValue","placeholder","isMultiSelect","isCategoryMultilevel","focusOnTextbox","elementToFocusOn","useTextboxKeyboardNavigation","inputContainerRef","optionsContainerRef","selectedValueIndex","isDynamicFltering","isMultiple","isVirtualScroll","toggleDropdown","focusOnOption","focusOnChip","chips","selectedIndex","navigateToOption","skipToFirstOption","skipToLastOption","onArrowDown","onArrowUp","onHomeKey","onEndKey","onTab","useListboxKeyboardNavigation","closeDropdownAndFocusOnTextbox","useSearchBarFilter","searchTerm","data","searchEvent","ignoreGroups","searchTermRef","dataRef","findHits","searchTermLowerCased","debouncedSearchEvent","__default__","messages","DropdownInputDefault","DropdownInputSmall","emitValue","useFormFieldEmits","inputContainerRefWrapper","dropdownOptionsContainerId","labelId","descriptionId","errorId","isReadOnly","useFormLayoutFieldLoading","dropdownValue","ariaLabelAttribute","ariaDescribedByAttribute","ariaLabel","computedAriaLabelFallbackMessage","computedAriaLabel","useAriaLabel","isInputComponent","computedSize","descriptionConditionalClasses","staticCategories","filteredItems","isSearching","selectedValueItem","categoryItem","additionalItemsSelected","selectedItemsCount","ariaDescribedBy","clickOutsideDropdown","clickOutsideDropdownOptions","textboxKeyboardNavigationListeners","listboxKeyboardNavigationListeners","deprecate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CO,MAAAA,KAAA,CAAAC,GAAAC,GAAAC,GAAAC,MAAA;AAMH,QAAAC,IAAAC;AAAA,IAAsB,MAAA;;AAAA,cAAA,GAAAC,IAAAN,EAAA,UAAA,QAAAM,EAAA,aAAAC,IAAAP,EAAA,UAAA,gBAAAO,EAAA,YAAAN,EAAA,MAAA;AAAA;AAAA,EACyE,GAE/FO,IAAAH,EAAA,MAAA;;AAEI,WAAAL,EAAA,SAAA,QAAAA,EAAA,MAAA,WAAA,IACI,OAGJM,IAAAN,EAAA,UAAA,gBAAAM,EAAA,YAAAL,EAAA,MAAA;AAAA,EAAuD,CAAA;AAW3D,SAAA;AAAA,IAAO,eAAAG;AAAA,IACH,iBAAAI;AAAA,IACA,iBAVJ,CAAAC,MAAA;AACI,MAAAA,IACIP,EAAA,IAEAC,EAAA;AAAA,IACJ;AA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