@adyen/bento-vue2 1.16.0 → 1.17.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 (201) hide show
  1. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.types.d.ts +2 -1
  2. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/index.d.ts +1 -1
  3. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-lazy-loading/use-lazy-loading.d.ts +1 -1
  4. package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/payment-method/composables/index.d.ts +1 -1
  6. package/dist/@types/packages/vue2/src/components/payment-method/composables/use-payment-icon/use-payment-icon.d.ts +4 -0
  7. package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +3 -1
  8. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.types.d.ts +3 -6
  9. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +17 -22
  10. package/dist/accordion.js +3 -3
  11. package/dist/action-bar.js +6 -6
  12. package/dist/alert.js +7 -7
  13. package/dist/assets/base-modal.css +1 -1
  14. package/dist/assets/index10.css +1 -1
  15. package/dist/assets/index11.css +1 -1
  16. package/dist/assets/index12.css +1 -1
  17. package/dist/assets/index13.css +1 -1
  18. package/dist/assets/index14.css +1 -1
  19. package/dist/assets/index15.css +1 -1
  20. package/dist/assets/index16.css +1 -1
  21. package/dist/assets/index17.css +1 -1
  22. package/dist/assets/index18.css +1 -1
  23. package/dist/assets/index19.css +1 -1
  24. package/dist/assets/index2.css +1 -1
  25. package/dist/assets/index20.css +1 -1
  26. package/dist/assets/index21.css +1 -1
  27. package/dist/assets/index22.css +1 -1
  28. package/dist/assets/index23.css +1 -1
  29. package/dist/assets/index24.css +1 -1
  30. package/dist/assets/index25.css +1 -1
  31. package/dist/assets/index26.css +1 -1
  32. package/dist/assets/index27.css +1 -1
  33. package/dist/assets/index28.css +1 -1
  34. package/dist/assets/index29.css +1 -1
  35. package/dist/assets/index3.css +1 -1
  36. package/dist/assets/index30.css +1 -1
  37. package/dist/assets/index31.css +1 -1
  38. package/dist/assets/index32.css +1 -1
  39. package/dist/assets/index33.css +1 -1
  40. package/dist/assets/index34.css +1 -1
  41. package/dist/assets/index35.css +1 -1
  42. package/dist/assets/index36.css +1 -1
  43. package/dist/assets/index37.css +1 -1
  44. package/dist/assets/index38.css +1 -1
  45. package/dist/assets/index39.css +1 -1
  46. package/dist/assets/index4.css +1 -1
  47. package/dist/assets/index40.css +1 -1
  48. package/dist/assets/index41.css +1 -1
  49. package/dist/assets/index42.css +1 -1
  50. package/dist/assets/index43.css +1 -1
  51. package/dist/assets/index44.css +1 -1
  52. package/dist/assets/index46.css +1 -1
  53. package/dist/assets/index47.css +1 -1
  54. package/dist/assets/index5.css +1 -1
  55. package/dist/assets/index6.css +1 -1
  56. package/dist/assets/index7.css +1 -1
  57. package/dist/assets/index8.css +1 -1
  58. package/dist/assets/index9.css +1 -1
  59. package/dist/avatar-image.js +1 -1
  60. package/dist/button.js +5 -5
  61. package/dist/card.js +3 -3
  62. package/dist/checkbox.js +6 -6
  63. package/dist/checkbox.js.map +1 -1
  64. package/dist/chunks/{arrow-left.3364fcac.js → arrow-left.2db60716.js} +2 -2
  65. package/dist/chunks/{arrow-left.3364fcac.js.map → arrow-left.2db60716.js.map} +1 -1
  66. package/dist/chunks/{base-button.0da9c5b8.js → base-button.7b173f0c.js} +2 -2
  67. package/dist/chunks/{base-button.0da9c5b8.js.map → base-button.7b173f0c.js.map} +1 -1
  68. package/dist/chunks/{base-modal.e87e997c.js → base-modal.1180d950.js} +6 -6
  69. package/dist/chunks/{base-modal.e87e997c.js.map → base-modal.1180d950.js.map} +1 -1
  70. package/dist/chunks/{button-actions-with-menu.e2f54e3a.js → button-actions-with-menu.101db268.js} +3 -3
  71. package/dist/chunks/{button-actions-with-menu.e2f54e3a.js.map → button-actions-with-menu.101db268.js.map} +1 -1
  72. package/dist/chunks/{button.6050544b.js → button.5d0c33b3.js} +3 -3
  73. package/dist/chunks/{button.6050544b.js.map → button.5d0c33b3.js.map} +1 -1
  74. package/dist/chunks/{calendar.74dbf195.js → calendar.a64cead0.js} +5 -5
  75. package/dist/chunks/{calendar.74dbf195.js.map → calendar.a64cead0.js.map} +1 -1
  76. package/dist/chunks/{checkbox.e77bb779.js → checkbox.d1adfacc.js} +4 -4
  77. package/dist/chunks/{checkbox.e77bb779.js.map → checkbox.d1adfacc.js.map} +1 -1
  78. package/dist/chunks/{checkmark-circle-fill.7a7cedf8.js → checkmark-circle-fill.345311d2.js} +2 -2
  79. package/dist/chunks/{checkmark-circle-fill.7a7cedf8.js.map → checkmark-circle-fill.345311d2.js.map} +1 -1
  80. package/dist/chunks/{checkmark-small.90120f18.js → checkmark-small.520f01b1.js} +2 -2
  81. package/dist/chunks/{checkmark-small.90120f18.js.map → checkmark-small.520f01b1.js.map} +1 -1
  82. package/dist/chunks/{checkmark.d9f63666.js → checkmark.a6ed8f47.js} +2 -2
  83. package/dist/chunks/{checkmark.d9f63666.js.map → checkmark.a6ed8f47.js.map} +1 -1
  84. package/dist/chunks/{chevron-left.97a9a569.js → chevron-left.5edf02ac.js} +2 -2
  85. package/dist/chunks/{chevron-left.97a9a569.js.map → chevron-left.5edf02ac.js.map} +1 -1
  86. package/dist/chunks/{chevron-up.47c6b4cf.js → chevron-up.81185563.js} +2 -2
  87. package/dist/chunks/{chevron-up.47c6b4cf.js.map → chevron-up.81185563.js.map} +1 -1
  88. package/dist/chunks/{controls-group.e72e1aa2.js → controls-group.0f02d583.js} +3 -3
  89. package/dist/chunks/{controls-group.e72e1aa2.js.map → controls-group.0f02d583.js.map} +1 -1
  90. package/dist/chunks/{copy.d1a20b0c.js → copy.63cb6668.js} +4 -4
  91. package/dist/chunks/{copy.d1a20b0c.js.map → copy.63cb6668.js.map} +1 -1
  92. package/dist/chunks/{cross-circle-fill.c0077c13.js → cross-circle-fill.27580c4b.js} +2 -2
  93. package/dist/chunks/{cross-circle-fill.c0077c13.js.map → cross-circle-fill.27580c4b.js.map} +1 -1
  94. package/dist/chunks/{cross-small.189cbd3c.js → cross-small.e851e0de.js} +2 -2
  95. package/dist/chunks/{cross-small.189cbd3c.js.map → cross-small.e851e0de.js.map} +1 -1
  96. package/dist/chunks/{cross.ad9be76b.js → cross.04678d81.js} +2 -2
  97. package/dist/chunks/{cross.ad9be76b.js.map → cross.04678d81.js.map} +1 -1
  98. package/dist/chunks/{dropdown-default-textbox.29ac8970.js → dropdown-default-textbox.25ef120f.js} +4 -4
  99. package/dist/chunks/{dropdown-default-textbox.29ac8970.js.map → dropdown-default-textbox.25ef120f.js.map} +1 -1
  100. package/dist/chunks/{dropdown.91a69131.js → dropdown.9096a595.js} +14 -14
  101. package/dist/chunks/{dropdown.91a69131.js.map → dropdown.9096a595.js.map} +1 -1
  102. package/dist/chunks/{error-message.b9419287.js → error-message.01187b47.js} +3 -3
  103. package/dist/chunks/{error-message.b9419287.js.map → error-message.01187b47.js.map} +1 -1
  104. package/dist/chunks/{fixed-scroller.0146b898.js → fixed-scroller.cbab7134.js} +3 -3
  105. package/dist/chunks/{fixed-scroller.0146b898.js.map → fixed-scroller.cbab7134.js.map} +1 -1
  106. package/dist/chunks/{footer-actions.9bdf8416.js → footer-actions.cf51cdef.js} +3 -3
  107. package/dist/chunks/{footer-actions.9bdf8416.js.map → footer-actions.cf51cdef.js.map} +1 -1
  108. package/dist/chunks/{index.fb2f88c6.js → index.0a498a56.js} +3 -3
  109. package/dist/chunks/{index.fb2f88c6.js.map → index.0a498a56.js.map} +1 -1
  110. package/dist/chunks/{index.c4c59719.js → index.1cbce5a5.js} +502 -496
  111. package/dist/chunks/index.1cbce5a5.js.map +1 -0
  112. package/dist/chunks/{index.c4de22d3.js → index.433594f1.js} +3 -3
  113. package/dist/chunks/{index.c4de22d3.js.map → index.433594f1.js.map} +1 -1
  114. package/dist/chunks/{index.ea487c48.js → index.4ea5bda4.js} +2 -2
  115. package/dist/chunks/{index.ea487c48.js.map → index.4ea5bda4.js.map} +1 -1
  116. package/dist/chunks/{index.be0a3199.js → index.58ecd7ad.js} +2 -2
  117. package/dist/chunks/{index.be0a3199.js.map → index.58ecd7ad.js.map} +1 -1
  118. package/dist/chunks/{index.e876bfd9.js → index.786ee2d7.js} +6 -6
  119. package/dist/chunks/{index.e876bfd9.js.map → index.786ee2d7.js.map} +1 -1
  120. package/dist/chunks/{index.6d903b9b.js → index.7c480d3a.js} +3 -3
  121. package/dist/chunks/{index.6d903b9b.js.map → index.7c480d3a.js.map} +1 -1
  122. package/dist/chunks/{index.657f464c.js → index.80a842a9.js} +2 -2
  123. package/dist/chunks/{index.657f464c.js.map → index.80a842a9.js.map} +1 -1
  124. package/dist/chunks/{index.56204a08.js → index.ab6d4c73.js} +2 -2
  125. package/dist/chunks/{index.56204a08.js.map → index.ab6d4c73.js.map} +1 -1
  126. package/dist/chunks/{index.da09aaef.js → index.b2f96aa4.js} +96 -89
  127. package/dist/chunks/{index.da09aaef.js.map → index.b2f96aa4.js.map} +1 -1
  128. package/dist/chunks/{index.911b7a93.js → index.f1208b85.js} +149 -149
  129. package/dist/chunks/index.f1208b85.js.map +1 -0
  130. package/dist/chunks/{index.cbd58064.js → index.fa59768c.js} +7 -7
  131. package/dist/chunks/{index.cbd58064.js.map → index.fa59768c.js.map} +1 -1
  132. package/dist/chunks/{info-filled.1c693e75.js → info-filled.c37e091d.js} +2 -2
  133. package/dist/chunks/{info-filled.1c693e75.js.map → info-filled.c37e091d.js.map} +1 -1
  134. package/dist/chunks/{info.cdd7d4de.js → info.8b6328aa.js} +2 -2
  135. package/dist/chunks/{info.cdd7d4de.js.map → info.8b6328aa.js.map} +1 -1
  136. package/dist/chunks/{listbox-option-tag.e69e6052.js → listbox-option-tag.ae6d3f5d.js} +3 -3
  137. package/dist/chunks/{listbox-option-tag.e69e6052.js.map → listbox-option-tag.ae6d3f5d.js.map} +1 -1
  138. package/dist/chunks/{listbox.e7b0d444.js → listbox.8f2e4e83.js} +8 -8
  139. package/dist/chunks/{listbox.e7b0d444.js.map → listbox.8f2e4e83.js.map} +1 -1
  140. package/dist/chunks/{loading-button.92c986d5.js → loading-button.6055bc08.js} +4 -4
  141. package/dist/chunks/{loading-button.92c986d5.js.map → loading-button.6055bc08.js.map} +1 -1
  142. package/dist/chunks/{refresh.0900199c.js → refresh.71a03998.js} +2 -2
  143. package/dist/chunks/{refresh.0900199c.js.map → refresh.71a03998.js.map} +1 -1
  144. package/dist/chunks/{search.aefc7b18.js → search.471270fe.js} +2 -2
  145. package/dist/chunks/{search.aefc7b18.js.map → search.471270fe.js.map} +1 -1
  146. package/dist/chunks/{tooltip.0311abc2.js → tooltip.a007fd93.js} +3 -3
  147. package/dist/chunks/{tooltip.0311abc2.js.map → tooltip.a007fd93.js.map} +1 -1
  148. package/dist/code-snippet.js +7 -7
  149. package/dist/code-snippet.js.map +1 -1
  150. package/dist/country.js +2 -2
  151. package/dist/currency.js +1 -1
  152. package/dist/data-grid.js +1 -1
  153. package/dist/date-picker.js +18 -18
  154. package/dist/date-range-picker.js +2 -2
  155. package/dist/date.js +1 -1
  156. package/dist/divider.js +1 -1
  157. package/dist/dropdown.js +6 -6
  158. package/dist/empty-state.js +3 -3
  159. package/dist/filter-bar.js +20 -20
  160. package/dist/focus-trap.js +1 -1
  161. package/dist/form-layout.js +2 -2
  162. package/dist/header.js +128 -129
  163. package/dist/header.js.map +1 -1
  164. package/dist/index.js +297 -2936
  165. package/dist/index.js.map +1 -1
  166. package/dist/info-icon.js +4 -4
  167. package/dist/input-field.js +4 -4
  168. package/dist/internal.js +7 -7
  169. package/dist/link.js +1 -1
  170. package/dist/loading-indicator.js +1 -1
  171. package/dist/menu.js +1 -1
  172. package/dist/modal.js +5 -5
  173. package/dist/pagination.js +4 -4
  174. package/dist/payment-method.js +46 -46
  175. package/dist/payment-method.js.map +1 -1
  176. package/dist/popover.js +1 -1
  177. package/dist/popper-container.js +1 -1
  178. package/dist/radio-group.js +86 -96
  179. package/dist/radio-group.js.map +1 -1
  180. package/dist/search-bar.js +4 -4
  181. package/dist/secondary-nav.js +2 -2
  182. package/dist/segmented-control.js +4 -4
  183. package/dist/sidepanel.js +7 -7
  184. package/dist/status.js +2 -2
  185. package/dist/stepper.js +4 -4
  186. package/dist/structured-list.js +1 -1
  187. package/dist/summary-grid.js +3 -3
  188. package/dist/tabs.js +3 -3
  189. package/dist/tag.js +3 -3
  190. package/dist/textarea.js +4 -4
  191. package/dist/timeline.js +6 -6
  192. package/dist/toast.js +5 -5
  193. package/dist/toggle.js +3 -3
  194. package/dist/tutorial.js +5 -5
  195. package/dist/typography.js +1 -1
  196. package/dist/web-types.json +15 -5
  197. package/package.json +2 -2
  198. package/dist/@types/packages/vue2/src/components/payment-method/composables/usePaymentIcon.d.ts +0 -3
  199. package/dist/chunks/index.911b7a93.js.map +0 -1
  200. package/dist/chunks/index.c4c59719.js.map +0 -1
  201. /package/dist/assets/{cross-circle-fill.css → cross.css} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-default-textbox.29ac8970.js","sources":["../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["import { PropType } from 'vue';\nimport { Booleanish } from '@/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 = 'open',\n KEYDOWN = 'keydown',\n CLOSE = 'close',\n INPUT = 'input',\n CLEAR = 'clear',\n}\n\nexport default DropdownBaseTextboxProps;\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 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 :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\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 role=\"combobox\"\n :tabindex=\"0\"\n >\n <!-- <span :aria-hidden=\"!displayValue ? true : null\"> -->\n <slot v-if=\"selectedValueItem && !multiple\" v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n <template v-else-if=\"selectedValueItem && showSlotContentInMultiple\">\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 <!-- </span> -->\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=\"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-icon :svg-title=\"'clearSearch'\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\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 * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * 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 | 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 const emit = defineEmits<{\n /**\n * Emitted when the \"clear\" button is clicked\n */\n (e: DropdownBaseTextboxEvent.CLEAR);\n\n /**\n * Emitted on click, space, enter and esc user events. It will close the dropdown.\n */\n (e: DropdownBaseTextboxEvent.CLOSE);\n\n /**\n * Emitted when `dynamicFiltering` is enabled and a search input is entered\n */\n (e: DropdownBaseTextboxEvent.INPUT, searchValue: string);\n\n /**\n * Emitted when any key is pressed and the focus is on the input field\n */\n (e: DropdownBaseTextboxEvent.KEYDOWN, event: KeyboardEvent);\n\n /**\n * Emitted on click, space and enter user events. It will open the dropdown.\n */\n (e: DropdownBaseTextboxEvent.OPEN);\n }>();\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\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 }));\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 } as HTMLAttributes)\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\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 = () => {\n if (!props.disabled && !props.readonly) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.OPEN);\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 = debounce<(event: Event) => void>((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 }, props.debounceTime);\n\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as BentoListboxOptionItem[]) : []\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 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 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\">\n import { computed, defineComponent, PropType } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\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 /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n components: { ChevronDownIcon, ChevronUpIcon, DropdownBaseTextbox },\n inheritAttrs: false,\n emits: [\n DropdownBaseTextboxEvent.OPEN,\n DropdownBaseTextboxEvent.CLOSE,\n DropdownBaseTextboxEvent.INPUT,\n DropdownBaseTextboxEvent.CLEAR,\n DropdownBaseTextboxEvent.KEYDOWN,\n ],\n props: {\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 * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | 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 setup(props, { slots, emit }) {\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 = (e: Event) => {\n emit(DropdownBaseTextboxEvent.INPUT, e);\n };\n const onKeyDown = (e: Event) => {\n emit(DropdownBaseTextboxEvent.KEYDOWN, e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.OPEN);\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.CLOSE);\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.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 return {\n // Enums\n DropdownBaseTextboxEvent,\n\n // Values\n conditionalClasses,\n isDropdownOpen,\n slots,\n\n // Events\n listeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__","defineComponent","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","textbox","ref","textboxId","generateUid","conditionalClasses","computed","props","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","shouldShowInput","watch","nextTick","onOpenDropdown","emit","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","selectedValueItems","_sfc_main","ChevronDownIcon","ChevronUpIcon","DropdownBaseTextbox","isDropdownOpen","onInput","e","onKeyDown","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;AA0EY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA;ACmOR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA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file":"dropdown-default-textbox.25ef120f.js","sources":["../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["import { PropType } from 'vue';\nimport { Booleanish } from '@/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 = 'open',\n KEYDOWN = 'keydown',\n CLOSE = 'close',\n INPUT = 'input',\n CLEAR = 'clear',\n}\n\nexport default DropdownBaseTextboxProps;\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 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 :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\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 role=\"combobox\"\n :tabindex=\"0\"\n >\n <!-- <span :aria-hidden=\"!displayValue ? true : null\"> -->\n <slot v-if=\"selectedValueItem && !multiple\" v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n <template v-else-if=\"selectedValueItem && showSlotContentInMultiple\">\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 <!-- </span> -->\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=\"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-icon :svg-title=\"'clearSearch'\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\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 * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * 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 | 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 const emit = defineEmits<{\n /**\n * Emitted when the \"clear\" button is clicked\n */\n (e: DropdownBaseTextboxEvent.CLEAR);\n\n /**\n * Emitted on click, space, enter and esc user events. It will close the dropdown.\n */\n (e: DropdownBaseTextboxEvent.CLOSE);\n\n /**\n * Emitted when `dynamicFiltering` is enabled and a search input is entered\n */\n (e: DropdownBaseTextboxEvent.INPUT, searchValue: string);\n\n /**\n * Emitted when any key is pressed and the focus is on the input field\n */\n (e: DropdownBaseTextboxEvent.KEYDOWN, event: KeyboardEvent);\n\n /**\n * Emitted on click, space and enter user events. It will open the dropdown.\n */\n (e: DropdownBaseTextboxEvent.OPEN);\n }>();\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\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 }));\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 } as HTMLAttributes)\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\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 = () => {\n if (!props.disabled && !props.readonly) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.OPEN);\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 = debounce<(event: Event) => void>((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 }, props.debounceTime);\n\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as BentoListboxOptionItem[]) : []\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 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 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\">\n import { computed, defineComponent, PropType } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\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 /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n components: { ChevronDownIcon, ChevronUpIcon, DropdownBaseTextbox },\n inheritAttrs: false,\n emits: [\n DropdownBaseTextboxEvent.OPEN,\n DropdownBaseTextboxEvent.CLOSE,\n DropdownBaseTextboxEvent.INPUT,\n DropdownBaseTextboxEvent.CLEAR,\n DropdownBaseTextboxEvent.KEYDOWN,\n ],\n props: {\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 * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | 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 setup(props, { slots, emit }) {\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 = (e: Event) => {\n emit(DropdownBaseTextboxEvent.INPUT, e);\n };\n const onKeyDown = (e: Event) => {\n emit(DropdownBaseTextboxEvent.KEYDOWN, e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.OPEN);\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.CLOSE);\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.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 return {\n // Enums\n DropdownBaseTextboxEvent,\n\n // Values\n conditionalClasses,\n isDropdownOpen,\n slots,\n\n // Events\n listeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__","defineComponent","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","textbox","ref","textboxId","generateUid","conditionalClasses","computed","props","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","shouldShowInput","watch","nextTick","onOpenDropdown","emit","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","selectedValueItems","_sfc_main","ChevronDownIcon","ChevronUpIcon","DropdownBaseTextbox","isDropdownOpen","onInput","e","onKeyDown","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;AA0EY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA;ACmOR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,cAAA;AAEV,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA/NAC,IAAAC,EAAA,GACAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GA6HAI,IAAAC,EAAA,IAAA,GACAC,IAAAC,EAAA,SAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,CAAA,4BAAAjB,EAAA,UAAA,GAAAkB,EAAA;AAAA,MACkC,CAAA,4BAAAlB,EAAA,UAAA,GAAAkB,EAAA;AAAA,MACA,CAAA,4BAAAlB,EAAA,WAAA,GAAA,CAAA,CAAAkB,EAAA;AAAA,IACG,EAAA,GAGhFC,IAAAF,EAAA,OAAA;AAAA,MAAmD,CAAA,mDAAA,GAAAC,EAAA;AAAA,IACc,EAAA,GAGjEE,IAAAH,EAAA,MAAAC,EAAA,oBAAA,CAAA,CAAAA,EAAA,SAAAA,EAAA,IAAA,GAEAG,IAAAJ;AAAA,MAA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AH,CAAA,GACAd,EAAAzB,EAAA,KAAA;AAAA,IAAA,GAEA4C,IAAA,CAAAL,MAAA;AACA,MAAAG,EAAAH,CAAA,GACAd,EAAAzB,EAAA,KAAA;AAAA,IAAA,GAGA6C,IAAA;AAAA,MAAA,CAAA7C,EAAA,KAAA,GAAAsC;AAAA,MACA,CAAAtC,EAAA,IAAA,GAAAyC;AAAA,MACA,CAAAzC,EAAA,KAAA,GAAA2C;AAAA,MACA,CAAA3C,EAAA,KAAA,GAAA4C;AAAA,MACA,CAAA5C,EAAA,OAAA,GAAAwC;AAAA,IACA;AAGA,WAAA;AAAA;AAAA,MAAA,0BAAAxC;AAAA;AAAA,MAEA,oBAAAc;AAAA,MAGA,gBAAAuB;AAAA,MACA,OAAA/B;AAAA;AAAA,MACA,WAAAuC;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,17 +1,17 @@
1
1
  import { ref as y, watch as ne, computed as c, defineComponent as I, useSlots as le, toRefs as se, nextTick as E, useAttrs as be, toRef as O, inject as ye } from "vue";
2
- import { d as V, B as ge } from "./index.56204a08.js";
2
+ import { d as V, B as ge } from "./index.ab6d4c73.js";
3
+ import { D as K, a as F, b as xe, c as we } from "./dropdown-default-textbox.25ef120f.js";
4
+ import { n as A } from "./_plugin-vue2_normalizer.71e2aa87.js";
3
5
  import { g as T } from "./unique-id.a2a2b458.js";
4
- import { u as xe } from "./aria-label.ac9651a5.js";
6
+ import { u as he } from "./aria-label.ac9651a5.js";
5
7
  import { u as U } from "./i18n.eb5b985b.js";
6
- import { u as we } from "./use-form-layout-loading.d03e5d48.js";
7
- import { u as he } from "./use-has-slot.fbeb19ec.js";
8
- import { D as K, a as F, b as Se, c as Le } from "./dropdown-default-textbox.29ac8970.js";
9
- import { n as A } from "./_plugin-vue2_normalizer.71e2aa87.js";
10
- import { b as u, a as z, B as W, u as Ce } from "./listbox.e7b0d444.js";
8
+ import { u as Se } from "./use-form-layout-loading.d03e5d48.js";
9
+ import { u as Le } from "./use-has-slot.fbeb19ec.js";
10
+ import { b as u, a as z, B as W, u as Ce } from "./listbox.8f2e4e83.js";
11
11
  import { B as $, a as Oe } from "./keyboard-navigation.ca47dfa8.js";
12
- import { a as ee } from "./index.c4de22d3.js";
13
- import { a as $e } from "./index.e876bfd9.js";
14
- import { E as Ee, F as De } from "./error-message.b9419287.js";
12
+ import { a as ee } from "./index.433594f1.js";
13
+ import { a as $e } from "./index.786ee2d7.js";
14
+ import { E as Ee, F as De } from "./error-message.01187b47.js";
15
15
  import { B as Ie } from "./directive.0408e565.js";
16
16
  import "../assets/dropdown.css";
17
17
  var L = /* @__PURE__ */ ((n) => (n.DEFAULT = "DropdownInputDefault", n.SMALL = "DropdownInputSmall", n))(L || {});
@@ -365,7 +365,7 @@ const Ye = Je.exports, Ze = I({
365
365
  [F.OPEN]: s,
366
366
  [F.CLOSE]: a
367
367
  };
368
- return { __sfc: !0, emit: e, props: o, conditionalClasses: t, isDropdownOpen: l, openDropdown: s, closeDropdown: a, listeners: i, DropdownBaseTextbox: Se, ChevronDownSmallIcon: Ue, ChevronUpSmallIcon: Ye };
368
+ return { __sfc: !0, emit: e, props: o, conditionalClasses: t, isDropdownOpen: l, openDropdown: s, closeDropdown: a, listeners: i, DropdownBaseTextbox: xe, ChevronDownSmallIcon: Ue, ChevronUpSmallIcon: Ye };
369
369
  }
370
370
  });
371
371
  var Qe = function() {
@@ -513,7 +513,7 @@ const rt = {
513
513
  i18n: { messages: rt },
514
514
  name: "b-dropdown",
515
515
  components: {
516
- DropdownInputDefault: Le,
516
+ DropdownInputDefault: we,
517
517
  DropdownInputSmall: et
518
518
  }
519
519
  }), ct = /* @__PURE__ */ I({
@@ -676,7 +676,7 @@ const rt = {
676
676
  emits: ["input", "show-more"],
677
677
  setup(n, { emit: e }) {
678
678
  var X;
679
- const o = n, t = be(), l = le(), s = he(l), { t: a } = U(), i = y(null), d = y(null), f = y(null), v = y(!1), b = T("bento-dropdown-options-container"), C = T("dropdown-label"), g = T("dropdown-description"), w = T("dropdown-error"), { isReadOnly: x } = we(O(o, "readonly")), h = y(t["aria-label"]), { ariaLabel: S } = se(o), r = xe({
679
+ const o = n, t = be(), l = le(), s = Le(l), { t: a } = U(), i = y(null), d = y(null), f = y(null), v = y(!1), b = T("bento-dropdown-options-container"), C = T("dropdown-label"), g = T("dropdown-description"), w = T("dropdown-error"), { isReadOnly: x } = Se(O(o, "readonly")), h = y(t["aria-label"]), { ariaLabel: S } = se(o), r = he({
680
680
  ariaLabel: h.value,
681
681
  // TODO: take this line away when the aria-label props is removed
682
682
  label: S,
@@ -794,4 +794,4 @@ export {
794
794
  L as a,
795
795
  it as u
796
796
  };
797
- //# sourceMappingURL=dropdown.91a69131.js.map
797
+ //# sourceMappingURL=dropdown.9096a595.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.91a69131.js","sources":["../../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","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-down-small.vue","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-up-small.vue","../../src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue","../../src/components/dropdown/composables/use-display-value.ts","../../src/components/dropdown/composables/use-keyboard-navigation.ts","../../src/components/search-bar/useSearchBarDataFilter.ts","../../src/components/input-field/input-field.keys.ts","../../src/components/dropdown/dropdown.vue"],"sourcesContent":["/**\n * @deprecated Do not use. Only 'default' size should be used.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types';\n\nexport type { BentoListboxSearchOptions as BentoDropdownSearchOptions } from '@/types';\nexport type { BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps } from '@/types';\nexport type { BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions } from '@/types';\n","import { computed, ref, Ref, watch } from 'vue';\nimport { BentoListboxEvent, BentoListboxSelectedValue } from '@/types';\nimport { BentoDropdownEvent } from '../../../dropdown.types';\nimport { useI18n } from '@/utils/ts/i18n';\nimport messages from '../messages.json';\n\ntype MessageSchema = (typeof messages)['en-US'];\n\n/**\n * A composable that handles all dropdown options option selecting logic & listeners.\n * If single select dropdown then emits straight up to dropdown.\n * If multi select dropdown then stores selections in internal state and only emits when Apply button is pressed.\n *\n * @param selectedValue The selectedValue property passed into the dropdown options container component.\n * @param multiple The multiple property passed into the dropdown options container component.\n * @param isOpen The isOpen property passed into the dropdown options container component.\n * @param emit The emit function for the dropdown options container component.\n */\nexport const useDropdownOptionsListbox = (\n selectedValue: Ref<BentoListboxSelectedValue>,\n multiple: Ref<boolean>,\n isOpen: Ref<boolean>,\n emit: (event: BentoListboxEvent | BentoDropdownEvent, selectedValue?: BentoListboxSelectedValue) => void\n) => {\n const internalSelectedValue = ref(selectedValue.value);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n watch(selectedValue, () => {\n internalSelectedValue.value = selectedValue.value;\n });\n\n // Multi-select dropdown cancel and apply button logic\n const isApplyButtonDisabled = computed(\n () => JSON.stringify(internalSelectedValue.value) === JSON.stringify(selectedValue.value)\n );\n\n const onApplyClick = () => {\n emit(BentoListboxEvent.SELECT, internalSelectedValue.value);\n emit(BentoDropdownEvent.CLOSE_DROPDOWN);\n };\n\n const onCancelClick = () => {\n internalSelectedValue.value = selectedValue.value;\n emit(BentoDropdownEvent.CLOSE_DROPDOWN);\n };\n\n const onOutsideDropdownClick = () => {\n if (isOpen.value && multiple.value) {\n internalSelectedValue.value = selectedValue.value;\n }\n };\n\n const actions = computed(() => [\n {\n title: t('apply') as string,\n event: onApplyClick,\n disabled: isApplyButtonDisabled.value,\n },\n {\n title: t('cancel') as string,\n event: onCancelClick,\n },\n ]);\n\n // Click and keyboard navigation event listners\n const onOptionSelected = (newSelectedValue: BentoListboxSelectedValue) => {\n internalSelectedValue.value = newSelectedValue;\n if (!multiple.value) {\n emit(BentoDropdownEvent.SELECT, newSelectedValue);\n }\n };\n\n const onTabKey = (newSelectedValue: BentoListboxSelectedValue) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.TAB);\n };\n\n const onEnterKey = (newSelectedValue: BentoListboxSelectedValue) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.ENTER);\n };\n\n const onSpaceKey = (newSelectedValue: BentoListboxSelectedValue) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.SPACE);\n };\n\n const onEscapeKey = () => {\n onCancelClick();\n emit(BentoListboxEvent.ESCAPE);\n };\n\n const emitShowMoreEvent = () => {\n emit(BentoDropdownEvent.SHOW_MORE);\n };\n\n const listeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected,\n [BentoListboxEvent.SHOW_MORE]: emitShowMoreEvent,\n [BentoListboxEvent.TAB]: onTabKey,\n [BentoListboxEvent.SPACE]: onSpaceKey,\n [BentoListboxEvent.ENTER]: onEnterKey,\n };\n\n return {\n // Values\n actions,\n internalSelectedValue,\n\n // Methods\n listeners,\n onEscapeKey,\n onOutsideDropdownClick,\n };\n};\n","<template>\n <component\n :is=\"popperContainerOrPopoverComponent\"\n class=\"b-dropdown-options-container\"\n :class=\"conditionalClasses\"\n v-bind=\"popperContainerOrPopoverProps\"\n >\n <div @keydown.esc=\"onEscapeKey\">\n <bento-listbox\n :id=\"id\"\n ref=\"dropdownOptionsListboxRef\"\n :aria-label=\"ariaLabel\"\n class=\"b-dropdown-options-container__listbox\"\n :class=\"conditionalListboxClasses\"\n :empty-state=\"emptyState\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"items\"\n :selected-value=\"internalSelectedValue\"\n :multiple=\"multiple\"\n :static-categories=\"staticCategories\"\n :no-results-message=\"noResultsMessage\"\n :searching=\"searching\"\n :loading=\"loading\"\n :lazy-load-type=\"lazyLoadType\"\n :has-more-items=\"hasMoreItems\"\n :virtual-scroll=\"virtualScroll\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox>\n </div>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRefs, useSlots } from 'vue';\n import { BentoListbox } from '@/internal';\n import {\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n } from '@/types';\n import { PopperContainer } from '@/components/popper-container';\n import {\n BentoDropdownEmptyStateProps,\n BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n BentoDropdownSize,\n BentoDropdownVirtulisationOptions,\n } from '../../dropdown.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoPopover } from '@/components/popover';\n import { useDropdownOptionsListbox } from './composables/use-dropdown-options-listbox';\n import { generateUid } from '@/utils/ts/unique-id';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n\n const emit = defineEmits<{\n /**\n * Emitted when the dropdown is closing.\n */\n (e: BentoDropdownEvent.CLOSE_DROPDOWN);\n\n /**\n * Emitted when the `ENTER` key is pressed\n */\n (e: BentoListboxEvent.ENTER, newSelectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when the `ESCAPE` key is pressed\n */\n (e: BentoListboxEvent.ESCAPE);\n\n /**\n * Emitted when an item is selected\n */\n (e: BentoListboxEvent.SELECT, newSelectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: BentoDropdownEvent.SHOW_MORE);\n\n /**\n * Emitted when the `SPACE` key is pressed\n */\n (e: BentoListboxEvent.SPACE, newSelectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when the `TAB` key is pressed\n */\n (e: BentoListboxEvent.TAB, newSelectedValue: BentoListboxSelectedValue);\n }>();\n\n const props = defineProps({\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoDropdownEmptyStateProps>,\n default: undefined,\n },\n\n /**\n * Disables dropdown functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.\n */\n id: { type: String, required: true },\n\n /**\n * Dropdown input size\n */\n inputSize: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: BentoDropdownSize.DEFAULT,\n validator: (value: BentoDropdownSize) => Object.values(BentoDropdownSize).includes(value),\n },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoDropdownIsOptionDisabled}\n * @param {BentoDropdownOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: undefined,\n },\n\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoDropdownOptionItem }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType: {\n type: String as PropType<BentoDropdownLazyLoadType | `${BentoDropdownLazyLoadType}`>,\n default: BentoDropdownLazyLoadType.AUTOMATIC,\n validator: (value: BentoDropdownLazyLoadType) => Object.values(BentoDropdownLazyLoadType).includes(value),\n },\n\n /**\n * Indicates if new options are loading.\n */\n loading: { type: Boolean, default: false },\n\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the container can be displayed.\n */\n open: { type: Boolean, required: true },\n\n /**\n * The `input` value.\n * Providing an empty string or empty array will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected for single select\n */\n selectedValue: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: null,\n },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: BentoListbox.props.searching,\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Reference to the DOM element or Vue component for positioning\n * the Dropdown container.\n */\n targetElement: { type: PopperContainer.props.targetElement.type, required: true },\n\n /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll: {\n type: [Boolean, Object] as PropType<BentoDropdownVirtulisationOptions>,\n default: false,\n },\n });\n\n const { selectedValue, multiple } = toRefs(props);\n const dropdownOptionsListboxRef = ref(null);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isDropdownOpen = computed(() => props.open && !props.disabled);\n const noResultsMessage = computed(() => t('noOptionsMatchThisSearch') as string);\n\n const conditionalClasses = computed(() => ({\n 'b-dropdown-options-container--single': !props?.multiple,\n }));\n\n const conditionalListboxClasses = computed(() => ({\n 'b-dropdown-options-container__listbox--small': props.inputSize === BentoDropdownSize.SMALL,\n 'b-dropdown-options-container__listbox--single': !props?.multiple,\n }));\n\n const { actions, internalSelectedValue, listeners, onEscapeKey, onOutsideDropdownClick } =\n useDropdownOptionsListbox(selectedValue, multiple, isDropdownOpen, emit);\n\n // Use different components depending on if the dropdown is a single or multi-select\n const popperContainerOrPopoverComponent = computed(() => (props?.multiple ? BentoPopover : PopperContainer));\n\n const popperContainerOrPopoverProps = computed(() => {\n const containerMinAndMaxWidth = {\n 'min-width': `${(props?.targetElement as HTMLElement)?.clientWidth}px`,\n 'max-width': 'min(500px, 95%)',\n };\n\n return props?.multiple\n ? ({\n actionsLayout: 'space-between',\n actions: actions.value,\n divider: true,\n fallbackPosition: ['top-start'],\n id: generateUid(`dropdown-options-${props.id}`),\n open: props.open,\n position: 'bottom-start',\n style: {\n width: 'auto',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof BentoPopover>['$props'])\n : ({\n fallbackPosition: ['top-start'],\n offset: [0, 8],\n position: 'bottom-start',\n style: {\n display: isDropdownOpen.value ? 'block' : 'none',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof PopperContainer>['$props']);\n });\n\n defineExpose({\n onOutsideDropdownClick,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dropdown options container.\n * It lists all the available options.\n *\n * @example\n * <bento-dropdown-options-container\n * v-if=\"inputContainerRef\" <!-- Ref to the input to match the width -->\n * :id=\"dropdownOptionsContainerId\"\n * :target-element=\"inputContainerRef\"\n * :aria-label=\"ariaLabel\"\n * :open=\"isDropdownOpen\"\n * :disabled=\"disabled\"\n * :multiple=\"multiple\"\n * :selected=\"value\"\n * :isOptionDisabled=\"option => option.value === 2\"\n * :items=\"[{\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * }]\"\n * @select=\"onOptionSelected\"\n * />\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-dropdown-options-container',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-options-container.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <div class=\"b-dropdown-small-textbox\" :class=\"conditionalClasses\">\n <dropdown-base-textbox\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-small-textbox__textbox\"\n v-on=\"listeners\"\n >\n <template #icon>\n <div class=\"b-dropdown-small-textbox__chevron\">\n <chevron-up-small-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-small-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types';\n import { Booleanish } from '@/types';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import ChevronDownSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-down-small';\n import ChevronUpSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-up-small';\n\n const emit = defineEmits<{\n /**\n * Emitted on click, space, enter and esc user events. It will close the dropdown.\n */\n (e: DropdownBaseTextboxEvent.CLOSE);\n\n /**\n * Emitted on click, space and enter user events. It will open the dropdown.\n */\n (e: DropdownBaseTextboxEvent.OPEN);\n }>();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n });\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const openDropdown = () => {\n emit(DropdownBaseTextboxEvent.OPEN);\n };\n\n const closeDropdown = () => {\n emit(DropdownBaseTextboxEvent.CLOSE);\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component in its small variant used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-small-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-small-textbox.scss\" />\n","import { computed } from 'vue';\nimport {\n CategoryMultiSelectOptions,\n MultiSelectOptions,\n SingleSelectOptions,\n UseDisplayValue,\n} from './use-display-value.types';\nimport { BentoListboxMultiSelectValue, BentoListboxOptionItem } from '@/types';\n\n/**\n * Generates the `displayValue` for the Single select based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * @param options Single select options\n * @returns The text to be displayed by the dropdown\n */\nconst singleSelect = ({ items, placeholder, selectedValue, staticCategories }: SingleSelectOptions) => {\n // If no value selected, return placeholder or nothing\n if (!selectedValue.value) {\n return placeholder.value || null;\n }\n\n // Find selected values in the list of items\n let selectedItem: BentoListboxOptionItem;\n if (staticCategories) {\n const category = items.value.find(cat => cat.items.some(item => item.value === selectedValue.value));\n selectedItem = category?.items.find(item => item.value === selectedValue.value);\n } else {\n selectedItem = items.value.find(({ value }) => value === selectedValue.value);\n }\n\n // Return selected value's label or the selected value's value when it is not found\n return selectedItem ? selectedItem.label : selectedValue.value.toString();\n};\n\n/**\n * Generates the `displayValue` for the Multi Select based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * @param options Category select options\n * @returns The text to be displayed by the dropdown\n */\nconst multiSelect = ({ selectedValues, items, placeholder }: MultiSelectOptions) => {\n // No selected values\n if (!selectedValues.value || (selectedValues.value as BentoListboxMultiSelectValue)?.length === 0) {\n return placeholder.value || null;\n }\n\n return (selectedValues.value as BentoListboxMultiSelectValue)\n .map(selectedValue => {\n const selectedItem = items.value.find(({ value }) => value === selectedValue);\n return selectedItem ? selectedItem.label : selectedValue;\n })\n .join(', ');\n};\n\n/**\n * Generates the `displayValue` for the Category Multi Select based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * @param options Multi select options\n * @returns The text to be displayed by the dropdown\n */\nconst categoryMultiSelect = ({ selectedValues, items, placeholder }: CategoryMultiSelectOptions) => {\n // No selected values\n if (!selectedValues.value || !(selectedValues.value as Array<string | number>)?.length) {\n return placeholder.value || null;\n }\n\n return items.value\n .reduce((acc, option) => {\n // Category items\n if (option.items) {\n const selectedCategoryOptions = option.items.filter(categoryOption =>\n (selectedValues.value as Array<string | number>).includes(categoryOption.value)\n );\n\n // If the category is fully selected add the category name\n const isCategoryFullySelected = selectedCategoryOptions.length === option.items.length;\n if (isCategoryFullySelected) {\n acc.push(option.label);\n } else {\n // If category is partially selected add each selected option and category\n selectedCategoryOptions.forEach(({ label }) => acc.push(label));\n }\n }\n\n // Non-category option\n if ((selectedValues.value as Array<string | number>).includes(option.value)) {\n acc.push(option.label);\n }\n\n return acc;\n }, [])\n .join(', ');\n};\n\n/**\n * Generates the `displayValue` for the Dropdown based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * When there is a selected value but the value is not present in the list, the\n * value is then returned as there is no way to know what the text/label is.\n *\n * @param options Options needed to calculate the display value based on the type of Dropdown (single, multi, category)\n * @returns The text to be displayed by the dropdown\n */\nexport const useDisplayValue: UseDisplayValue = ({ items, placeholder, value, multiple, staticCategories }) => {\n const isCategoryMultilevel = computed(() => items.value.find(option => option.items?.length));\n\n const displayValue = computed(() => {\n if (!multiple.value) {\n const result = singleSelect({\n items,\n placeholder,\n selectedValue: value,\n staticCategories: staticCategories.value,\n });\n return result;\n }\n\n // Category multi select\n if (isCategoryMultilevel.value) {\n return categoryMultiSelect({ selectedValues: value, placeholder, items });\n }\n\n // Multi select\n return multiSelect({ selectedValues: value, items, placeholder });\n });\n\n return displayValue;\n};\n","import { BentoKeyboardNavigationKeyDownEvent } from '@/types';\nimport { BentoListboxEvent } from '@/types/listbox';\nimport { computed, nextTick, Ref } from 'vue';\nimport {\n UseListboxKeyboardNavigationOptions,\n UseTextboxKeyboardNavigationOptions,\n} from './use-keyboard-navigation.types';\n\n/**\n * Returns the focus to the textbox of the dropdown if it exists\n * when the dropdown is being closed.\n * @param elementToFocusOn Reference to the input container\n */\nconst focusOnTextbox = (elementToFocusOn: Ref) => {\n elementToFocusOn.value.$children?.[0].$refs.textbox.focus();\n};\n\n/**\n * Controls the keyboard navigation inside the Dropdown's textbox for Single and Multi select.\n * Adds support for the keys:\n *\n * - Arrow up\n * - Arrow Down\n * - End key\n * - Home key\n * - Escape key\n * - Space key\n * - Enter Key\n *\n * @param options Options from the Dropdown to handle the navigation\n * @param toggleDropdown Function to open/close the Dropdown\n * @param openDropdown Function to open the Dropdown\n * @param closeDropdown Function to close the Dropdown\n * @returns List of event listeners available to the Dropdown's textbox\n */\nexport const useTextboxKeyboardNavigation = (\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering,\n items,\n isMultiple,\n }: UseTextboxKeyboardNavigationOptions,\n toggleDropdown: () => void,\n openDropdown: () => void,\n closeDropdown: () => void\n) => {\n const onArrowDown = ({ detail: event }) => {\n event.preventDefault();\n if (!isDropdownOpen.value) {\n openDropdown();\n nextTick(() => {\n if (isMultiple) {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n selectedValueIndex.value\n ].$el.focus();\n }\n });\n }\n };\n const onArrowUp = ({ detail: event }) => {\n event.preventDefault();\n if (!isDropdownOpen.value) {\n openDropdown();\n nextTick(() => {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n });\n }\n };\n\n const onEndKey = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n nextTick(() => {\n if (isMultiple) {\n const firstLayer =\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children;\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n firstLayer.length - 1\n ].$children[items.length - 1].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n items.length - 1\n ].$el.focus();\n }\n });\n }\n };\n\n const onEscapeKey = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n focusOnTextbox(inputContainerRef);\n }\n };\n\n const onHomeKey = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n nextTick(() => {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n });\n };\n\n const onSpaceKey = ({ detail: event }) => {\n event.preventDefault();\n toggleDropdown();\n if (isDropdownOpen.value) {\n nextTick(() => {\n if (isMultiple) {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n selectedValueIndex.value\n ].$el.focus();\n }\n });\n }\n };\n\n const onEnterKey = () => {\n toggleDropdown();\n if (isDropdownOpen.value) {\n nextTick(() => {\n if (isMultiple) {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n selectedValueIndex.value\n ].$el.focus();\n }\n });\n }\n };\n\n const textboxKeyboardNavigationListeners = computed(() => ({\n ...(!isDynamicFltering.value ? { [BentoKeyboardNavigationKeyDownEvent.SPACE]: onSpaceKey } : {}),\n [BentoKeyboardNavigationKeyDownEvent.ENTER]: onEnterKey,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: onArrowDown,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: onArrowUp,\n [BentoKeyboardNavigationKeyDownEvent.END]: onEndKey,\n [BentoKeyboardNavigationKeyDownEvent.ESCAPE]: onEscapeKey,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: onHomeKey,\n }));\n\n return textboxKeyboardNavigationListeners;\n};\n\n/**\n * Controls the keyboard navigation inside the Dropdown's listbox container for Single and Multi select.\n * Adds support for the keys:\n *\n * - Escape key\n * - Enter Key\n * - Tab\n * - Space key\n *\n * @param options Options from the Dropdown to handle the navigation inside the listbox\n * @param closeDropdown Function to close the Dropdown\n * @returns List of event listeners available to the Dropdown's listbox container\n */\nexport const useListboxKeyboardNavigation = (\n { inputContainerRef, isDropdownOpen }: UseListboxKeyboardNavigationOptions,\n closeDropdown: () => void\n) => {\n const closeDropdownAndFocusOnTextbox = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n }\n nextTick(() => {\n focusOnTextbox(inputContainerRef);\n });\n };\n\n const listboxKeyboardNavigationListeners = {\n [BentoListboxEvent.ENTER]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.ESCAPE]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.TAB]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.SPACE]: closeDropdownAndFocusOnTextbox,\n };\n\n return listboxKeyboardNavigationListeners;\n};\n","import { computed, ref, Ref, watch } from 'vue';\nimport { BentoSearchBarItem } from './search-bar.types';\n\n/**\n * Filters an array {@see BentoSearchBarData} containing elements of type {@see BentoSearchBarItem}\n * by the {@param searchTerm}.\n *\n * @param {Ref<String>} searchTerm - Text that satisfies the search criteria.\n * @param {Ref<BentoSearchBarData>} data - Array to be filtered by {@param searchTerm}\n * @returns {Ref<BentoSearchBarData>} New instance of the array filtered by the {@param searchTerm} text\n */\nexport function useSearchBarFilter<T extends BentoSearchBarItem>(\n searchTerm: Ref<string>,\n data: Ref<T[]>,\n searchEvent?: (searchValue: string) => void\n) {\n const searchTermRef = ref(searchTerm);\n const dataRef = ref(data);\n\n const findHits = (searchTermLowerCased: string, options: Array<BentoSearchBarItem> = []) =>\n options.flatMap(option => {\n if (option.label.toLocaleLowerCase().includes(searchTermLowerCased)) {\n return [option, ...findHits(searchTermLowerCased, option.items)];\n }\n\n if (option.items) {\n return [...findHits(searchTermLowerCased, option.items)];\n }\n\n return [];\n });\n\n // If search event exists trigger it on the search term changing\n watch(searchTermRef, () => {\n if (searchEvent !== undefined) {\n searchEvent(searchTermRef.value);\n }\n });\n\n const filterInputData = computed(() => {\n if (!searchTermRef.value) {\n return dataRef.value;\n }\n // If search event exists, emit the new search value into the event and do not manipulate data.\n if (searchEvent !== undefined) {\n return dataRef.value;\n }\n\n const searchTermLowerCased = searchTermRef.value.toLocaleLowerCase();\n const filtered = findHits(searchTermLowerCased, dataRef.value);\n return filtered;\n });\n\n return filterInputData;\n}\n","export const INPUT_FIELD_COMPONENT_INJECTION_KEY = Symbol('input field component injection key');\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div v-bento-click-outside-directive=\"clickOutsideDropdown\" class=\"b-dropdown\" :class=\"conditionalClasses\">\n <field-label\n v-if=\"label\"\n :id=\"labelId\"\n :condensed=\"condensed\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n <div\n ref=\"inputContainerRefWrapper\"\n v-bento-keyboard-navigation-directive\n v-on=\"textboxKeyboardNavigationListeners\"\n >\n <component\n :is=\"size\"\n ref=\"inputContainerRef\"\n :condensed=\"condensed\"\n :value=\"searchTerm\"\n :additional-items-selected=\"additionalItemsSelected\"\n :ariaControls=\"dropdownOptionsContainerId\"\n :ariaExpanded=\"isDropdownOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-label=\"computedAriaLabel\"\n :aria-readonly=\"isReadOnly\"\n :readonly=\"isReadOnly\"\n :disabled=\"disabled\"\n :display-value=\"displayValue\"\n :dynamic-filtering=\"dynamicFiltering\"\n :is-invalid=\"!!errorMessage || error\"\n :multiple=\"multiple\"\n :open=\"isDropdownOpen\"\n :selected-value-item=\"!isInputComponent ? selectedValueItem : undefined\"\n :show-slot-content-in-multiple=\"showSlotContentInMultiple\"\n @input=\"searchTerm = $event\"\n @open=\"toggleDropdown\"\n @close=\"toggleDropdown\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </component>\n </div>\n <bento-dropdown-options-container\n v-if=\"inputContainerRef\"\n :id=\"dropdownOptionsContainerId\"\n ref=\"optionsContainerRef\"\n :aria-label=\"computedAriaLabel\"\n :empty-state=\"emptyState\"\n :debounce-time=\"search?.debounceTime\"\n :disabled=\"disabled\"\n :input-size=\"size\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"filteredItems\"\n :multiple=\"multiple\"\n :static-categories=\"staticCategories\"\n :open=\"isDropdownOpen\"\n :selected-value=\"value\"\n :searching=\"isSearching\"\n :target-element=\"inputContainerRefWrapper\"\n :loading=\"loading\"\n :has-more-items=\"hasMoreItems\"\n :lazy-load-type=\"lazyLoadType\"\n :virtual-scroll=\"virtualScroll\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-dropdown-options-container>\n <error-message\n v-if=\"!!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-dropdown__error-message\"\n />\n <bento-typography\n v-if=\"description || hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-dropdown__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n <slot name=\"description\">\n {{ description }}\n </slot>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, inject, PropType, Ref, ref, toRef, toRefs, useAttrs, useSlots } from 'vue';\n\n // Components\n import { BentoDropdownOptionsContainer } from './components/dropdown-options-container';\n import { BentoTypography } from '@/components/typography';\n import { DropdownInputDefault, DropdownInputSmall } from './components';\n import { BentoListbox, ErrorMessage, FieldLabel, useMultiLevelItems } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n\n // Composables\n import { useDisplayValue, useListboxKeyboardNavigation, useTextboxKeyboardNavigation } from './composables';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n\n // Directives\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n // Types\n import {\n BentoDropdownEmptyStateProps,\n BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n BentoDropdownSearchOptions,\n BentoDropdownSize,\n BentoDropdownVirtulisationOptions,\n } from './dropdown.types';\n import {\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxMultiSelectValue,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n } from '@/types';\n\n import messages from './messages.json';\n import { useHasSlot } from '@/composables';\n import { INPUT_FIELD_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoDropdownEmptyStateProps>,\n default: undefined,\n },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Highlights the dropdown in an erroneous state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown in an erroneous state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Descriptive supporting text visbile underneath the dropdown.\n */\n description: { type: String, default: null },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Function that dertermines which options are disabled from interaction.\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: undefined,\n },\n\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoListboxOptionItem }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n default: () => [],\n },\n\n /**\n * Text that is displayed as a label above the element.\n */\n label: { type: String, default: null },\n\n /**\n * Indicates if new options are loading.\n */\n loading: { type: Boolean, default: false },\n\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType: {\n type: String as PropType<BentoDropdownLazyLoadType | `${BentoDropdownLazyLoadType}`>,\n default: BentoListbox.props.lazyLoadType.default,\n validator: (value: BentoDropdownLazyLoadType) => Object.values(BentoDropdownLazyLoadType).includes(value),\n },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Text that appears in the form control when it has no value set\n */\n placeholder: { type: String, default: null },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Dropdown search options and events.\n * @see BentoDropdownSearchOptions\n */\n search: {\n type: Object as PropType<BentoDropdownSearchOptions>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * @deprecated Do not use. Only 'default' size should be used.\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n validator: (value: BentoDropdownSize) => Object.values(BentoDropdownSize).includes(value),\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n */\n value: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: null,\n },\n\n /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll: {\n type: [Boolean, Object] as PropType<BentoDropdownVirtulisationOptions>,\n default: false,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const inputContainerRef = ref(null);\n const inputContainerRefWrapper = ref(null);\n const optionsContainerRef: Ref<InstanceType<typeof BentoDropdownOptionsContainer>> = ref(null);\n const isDropdownOpen = ref(false);\n const dropdownOptionsContainerId = generateUid('bento-dropdown-options-container');\n const labelId = generateUid('dropdown-label');\n const descriptionId = generateUid('dropdown-description');\n const errorId = generateUid('dropdown-error');\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: t('ariaLabelFallback'),\n });\n\n // Inject input field component key to change the dropdown size\n const isInputComponent =\n props.size === BentoDropdownSize.SMALL || inject(INPUT_FIELD_COMPONENT_INJECTION_KEY, false);\n const size = computed(() => (isInputComponent ? BentoDropdownSize.SMALL : BentoDropdownSize.DEFAULT));\n\n const conditionalClasses = computed(() => ({\n 'b-dropdown--condensed': props.condensed,\n }));\n\n // Description styles\n const descriptionConditionalClasses = computed(() => ({\n 'b-dropdown__description--error': !!props.errorMessage,\n }));\n\n // Filtering\n const searchTerm = ref('');\n const items = toRef(props, 'items');\n const filteredItems = useSearchBarFilter(searchTerm, items, props?.search?.searchEvent);\n const isSearching = computed(() => props.dynamicFiltering && !!searchTerm.value);\n\n const displayValue = useDisplayValue({\n items,\n staticCategories: toRef(props, 'staticCategories'),\n multiple: toRef(props, 'multiple'),\n placeholder: toRef(props, 'placeholder'),\n value: toRef(props, 'value'),\n });\n\n const selectedValueItem = computed(() => {\n if (props?.multiple) {\n return props.items.filter(\n ({ value }) => props?.value && (props?.value as BentoListboxMultiSelectValue).includes(value)\n );\n }\n if (!props.multiple && props.staticCategories) {\n // Find the category that holds the selected value\n const category = props.items.find(categoryItem =>\n categoryItem.items.some(item => item.value === props.value)\n );\n // Find the specific item within the category\n const selectedCategoryItem = category ? category.items.find(item => item.value === props.value) : null;\n\n return selectedCategoryItem;\n }\n\n return props.items.find(({ value }) => value === props?.value);\n });\n\n const selectedValueIndex = computed(() => {\n const index = props.items.findIndex(({ value }) => props.value === value);\n return index > 0 ? index : 0;\n });\n\n const { isMultiLevelSelect, flattenedItemsList } = useMultiLevelItems(items);\n\n const additionalItemsSelected = computed(() => {\n if (props.multiple) {\n const selectedItems = (props?.value as BentoListboxMultiSelectValue)?.length;\n const total = isMultiLevelSelect.value ? flattenedItemsList.value.length : items.value.length;\n return total === selectedItems ? t('all') : selectedItems;\n }\n\n return null;\n });\n\n // ARIA\n const ariaDescribedBy = computed(\n () => `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''}`.trim() || null\n );\n\n const openDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = true;\n };\n\n const closeDropdown = () => {\n isDropdownOpen.value = false;\n };\n\n const toggleDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = !isDropdownOpen.value;\n\n // Clear search\n if (isSearching.value) {\n searchTerm.value = '';\n }\n };\n\n const clickOutsideDropdown = () => {\n if (isSearching.value) {\n searchTerm.value = '';\n }\n\n if (isDropdownOpen.value) {\n isDropdownOpen.value = false;\n // Reset the internal dropdown options state\n optionsContainerRef.value.onOutsideDropdownClick();\n }\n };\n\n const onOptionSelected = (selectedValue: BentoListboxSelectedValue) => {\n // Clear and close the dropdown on single selection\n if (!props.multiple) {\n searchTerm.value = '';\n isDropdownOpen.value = false;\n }\n\n emit('input', selectedValue);\n };\n\n const emitShowMoreEvent = () => {\n emit(BentoDropdownEvent.SHOW_MORE);\n };\n\n const textboxKeyboardNavigationListeners = useTextboxKeyboardNavigation(\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering: toRef(props, 'dynamicFiltering'),\n items: props.items,\n isMultiple: props.multiple,\n },\n toggleDropdown,\n openDropdown,\n closeDropdown\n );\n\n const listboxKeyboardNavigationListeners = useListboxKeyboardNavigation(\n {\n inputContainerRef,\n isDropdownOpen,\n },\n closeDropdown\n );\n\n const listboxListeners = {\n [BentoListboxEvent.CLOSE_DROPDOWN]: closeDropdown,\n [BentoListboxEvent.SELECT]: onOptionSelected,\n [BentoListboxEvent.SHOW_MORE]: emitShowMoreEvent,\n ...listboxKeyboardNavigationListeners,\n };\n\n if (props.error) {\n deprecate(\n 'BentoDropdown \"error\" property',\n `Use the BentoDropdown \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n if (props.size) {\n deprecate('BentoDropdown \"size\" property', `Do not use. Only 'default' size should be used.`, '2.0.0');\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Dropdown shows a selected option's.\n * Use a dropdown when you want users to select options\n * from a list of pre-defined options.\n *\n * @example\n * import { BentoDropdown } from '@adyen/bento-vue2';\n * import type { BentoDropdownOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(2) // Default value\n * const options: BentoDropdownOptions = [\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'b-dropdown',\n components: {\n DropdownInputDefault,\n DropdownInputSmall,\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","useDropdownOptionsListbox","selectedValue","multiple","isOpen","emit","internalSelectedValue","ref","t","useI18n","watch","isApplyButtonDisabled","computed","onApplyClick","BentoListboxEvent","onCancelClick","onOutsideDropdownClick","actions","onOptionSelected","newSelectedValue","onTabKey","onEnterKey","onSpaceKey","onEscapeKey","emitShowMoreEvent","listeners","__default__$2","defineComponent","messages$1","slots","useSlots","toRefs","props","dropdownOptionsListboxRef","isDropdownOpen","noResultsMessage","conditionalClasses","conditionalListboxClasses","popperContainerOrPopoverComponent","BentoPopover","PopperContainer","popperContainerOrPopoverProps","containerMinAndMaxWidth","_a","generateUid","expose","uuid$1","_sfc_main$3","uuid","_sfc_main$2","__default__$1","DropdownBaseTextboxState","openDropdown","DropdownBaseTextboxEvent","closeDropdown","singleSelect","items","placeholder","staticCategories","selectedItem","category","cat","item","value","multiSelect","selectedValues","categoryMultiSelect","acc","option","selectedCategoryOptions","categoryOption","label","useDisplayValue","isCategoryMultilevel","focusOnTextbox","elementToFocusOn","useTextboxKeyboardNavigation","inputContainerRef","optionsContainerRef","selectedValueIndex","isDynamicFltering","isMultiple","toggleDropdown","onArrowDown","event","nextTick","_b","onArrowUp","onEndKey","firstLayer","onHomeKey","BentoKeyboardNavigationKeyDownEvent","useListboxKeyboardNavigation","closeDropdownAndFocusOnTextbox","useSearchBarFilter","searchTerm","data","searchEvent","searchTermRef","dataRef","findHits","searchTermLowerCased","options","INPUT_FIELD_COMPONENT_INJECTION_KEY","__default__","messages","DropdownInputDefault","DropdownInputSmall","attrs","useAttrs","hasSlot","useHasSlot","inputContainerRefWrapper","dropdownOptionsContainerId","labelId","descriptionId","errorId","isReadOnly","useFormLayoutFieldLoading","toRef","ariaLabelAttribute","ariaLabel","computedAriaLabel","useAriaLabel","isInputComponent","inject","size","descriptionConditionalClasses","filteredItems","isSearching","displayValue","selectedValueItem","categoryItem","index","isMultiLevelSelect","flattenedItemsList","useMultiLevelItems","additionalItemsSelected","selectedItems","ariaDescribedBy","clickOutsideDropdown","textboxKeyboardNavigationListeners","listboxKeyboardNavigationListeners","listboxListeners","deprecate"],"mappings":";;;;;;;;;;;;;;;;AAGY,IAAAA,IAAA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,MAAA,uBAAA;AAAA,IACJ,GAGJ5D,IAAA,CAAAhB,MAAA;AAEI,MAAA8B,EAAA,aACI+D,EAAA,QAAA,IACA7D,EAAA,QAAA,KAGJ7B,EAAA,SAAAH,CAAA;AAAA,IAA2B,GAG/BsB,IAAA,MAAA;AACI,MAAAnB,EAAAS,EAAA,SAAA;AAAA,IAAiC,GAGrC+H,KAAAjE;AAAA,MAA2C;AAAA,QACvC,mBAAAC;AAAA,QACI,qBAAAC;AAAA,QACA,oBAAAC;AAAA,QACA,gBAAA7C;AAAA,QACA,mBAAAqF,EAAAvF,GAAA,kBAAA;AAAA,QACkD,OAAAA,EAAA;AAAA,QACrC,YAAAA,EAAA;AAAA,MACK;AAAA,MACtBkD;AAAA,MACA9B;AAAA,MACAE;AAAA,IACA,GAGJwF,IAAAlD;AAAA,MAA2C;AAAA,QACvC,mBAAAf;AAAA,QACI,gBAAA3C;AAAA,MACA;AAAA,MACJoB;AAAA,IACA,GAGJyF,KAAA;AAAA,MAAyB,CAAAjI,EAAA,cAAA,GAAAwC;AAAA,MACe,CAAAxC,EAAA,MAAA,GAAAI;AAAA,MACR,CAAAJ,EAAA,SAAA,GAAAU;AAAA,MACG,GAAAsH;AAAA,IAC5B;AAGP,WAAA9G,EAAA,SACIgH;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIRhH,EAAA,QACIgH,EAAA,iCAAA,mDAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[3,4]}
1
+ {"version":3,"file":"dropdown.9096a595.js","sources":["../../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","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-down-small.vue","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-up-small.vue","../../src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue","../../src/components/dropdown/composables/use-display-value.ts","../../src/components/dropdown/composables/use-keyboard-navigation.ts","../../src/components/search-bar/useSearchBarDataFilter.ts","../../src/components/input-field/input-field.keys.ts","../../src/components/dropdown/dropdown.vue"],"sourcesContent":["/**\n * @deprecated Do not use. Only 'default' size should be used.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types';\n\nexport type { BentoListboxSearchOptions as BentoDropdownSearchOptions } from '@/types';\nexport type { BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps } from '@/types';\nexport type { BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions } from '@/types';\n","import { computed, ref, Ref, watch } from 'vue';\nimport { BentoListboxEvent, BentoListboxSelectedValue } from '@/types';\nimport { BentoDropdownEvent } from '../../../dropdown.types';\nimport { useI18n } from '@/utils/ts/i18n';\nimport messages from '../messages.json';\n\ntype MessageSchema = (typeof messages)['en-US'];\n\n/**\n * A composable that handles all dropdown options option selecting logic & listeners.\n * If single select dropdown then emits straight up to dropdown.\n * If multi select dropdown then stores selections in internal state and only emits when Apply button is pressed.\n *\n * @param selectedValue The selectedValue property passed into the dropdown options container component.\n * @param multiple The multiple property passed into the dropdown options container component.\n * @param isOpen The isOpen property passed into the dropdown options container component.\n * @param emit The emit function for the dropdown options container component.\n */\nexport const useDropdownOptionsListbox = (\n selectedValue: Ref<BentoListboxSelectedValue>,\n multiple: Ref<boolean>,\n isOpen: Ref<boolean>,\n emit: (event: BentoListboxEvent | BentoDropdownEvent, selectedValue?: BentoListboxSelectedValue) => void\n) => {\n const internalSelectedValue = ref(selectedValue.value);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n watch(selectedValue, () => {\n internalSelectedValue.value = selectedValue.value;\n });\n\n // Multi-select dropdown cancel and apply button logic\n const isApplyButtonDisabled = computed(\n () => JSON.stringify(internalSelectedValue.value) === JSON.stringify(selectedValue.value)\n );\n\n const onApplyClick = () => {\n emit(BentoListboxEvent.SELECT, internalSelectedValue.value);\n emit(BentoDropdownEvent.CLOSE_DROPDOWN);\n };\n\n const onCancelClick = () => {\n internalSelectedValue.value = selectedValue.value;\n emit(BentoDropdownEvent.CLOSE_DROPDOWN);\n };\n\n const onOutsideDropdownClick = () => {\n if (isOpen.value && multiple.value) {\n internalSelectedValue.value = selectedValue.value;\n }\n };\n\n const actions = computed(() => [\n {\n title: t('apply') as string,\n event: onApplyClick,\n disabled: isApplyButtonDisabled.value,\n },\n {\n title: t('cancel') as string,\n event: onCancelClick,\n },\n ]);\n\n // Click and keyboard navigation event listners\n const onOptionSelected = (newSelectedValue: BentoListboxSelectedValue) => {\n internalSelectedValue.value = newSelectedValue;\n if (!multiple.value) {\n emit(BentoDropdownEvent.SELECT, newSelectedValue);\n }\n };\n\n const onTabKey = (newSelectedValue: BentoListboxSelectedValue) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.TAB);\n };\n\n const onEnterKey = (newSelectedValue: BentoListboxSelectedValue) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.ENTER);\n };\n\n const onSpaceKey = (newSelectedValue: BentoListboxSelectedValue) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.SPACE);\n };\n\n const onEscapeKey = () => {\n onCancelClick();\n emit(BentoListboxEvent.ESCAPE);\n };\n\n const emitShowMoreEvent = () => {\n emit(BentoDropdownEvent.SHOW_MORE);\n };\n\n const listeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected,\n [BentoListboxEvent.SHOW_MORE]: emitShowMoreEvent,\n [BentoListboxEvent.TAB]: onTabKey,\n [BentoListboxEvent.SPACE]: onSpaceKey,\n [BentoListboxEvent.ENTER]: onEnterKey,\n };\n\n return {\n // Values\n actions,\n internalSelectedValue,\n\n // Methods\n listeners,\n onEscapeKey,\n onOutsideDropdownClick,\n };\n};\n","<template>\n <component\n :is=\"popperContainerOrPopoverComponent\"\n class=\"b-dropdown-options-container\"\n :class=\"conditionalClasses\"\n v-bind=\"popperContainerOrPopoverProps\"\n >\n <div @keydown.esc=\"onEscapeKey\">\n <bento-listbox\n :id=\"id\"\n ref=\"dropdownOptionsListboxRef\"\n :aria-label=\"ariaLabel\"\n class=\"b-dropdown-options-container__listbox\"\n :class=\"conditionalListboxClasses\"\n :empty-state=\"emptyState\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"items\"\n :selected-value=\"internalSelectedValue\"\n :multiple=\"multiple\"\n :static-categories=\"staticCategories\"\n :no-results-message=\"noResultsMessage\"\n :searching=\"searching\"\n :loading=\"loading\"\n :lazy-load-type=\"lazyLoadType\"\n :has-more-items=\"hasMoreItems\"\n :virtual-scroll=\"virtualScroll\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox>\n </div>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRefs, useSlots } from 'vue';\n import { BentoListbox } from '@/internal';\n import {\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n } from '@/types';\n import { PopperContainer } from '@/components/popper-container';\n import {\n BentoDropdownEmptyStateProps,\n BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n BentoDropdownSize,\n BentoDropdownVirtulisationOptions,\n } from '../../dropdown.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoPopover } from '@/components/popover';\n import { useDropdownOptionsListbox } from './composables/use-dropdown-options-listbox';\n import { generateUid } from '@/utils/ts/unique-id';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n\n const emit = defineEmits<{\n /**\n * Emitted when the dropdown is closing.\n */\n (e: BentoDropdownEvent.CLOSE_DROPDOWN);\n\n /**\n * Emitted when the `ENTER` key is pressed\n */\n (e: BentoListboxEvent.ENTER, newSelectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when the `ESCAPE` key is pressed\n */\n (e: BentoListboxEvent.ESCAPE);\n\n /**\n * Emitted when an item is selected\n */\n (e: BentoListboxEvent.SELECT, newSelectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: BentoDropdownEvent.SHOW_MORE);\n\n /**\n * Emitted when the `SPACE` key is pressed\n */\n (e: BentoListboxEvent.SPACE, newSelectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when the `TAB` key is pressed\n */\n (e: BentoListboxEvent.TAB, newSelectedValue: BentoListboxSelectedValue);\n }>();\n\n const props = defineProps({\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoDropdownEmptyStateProps>,\n default: undefined,\n },\n\n /**\n * Disables dropdown functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.\n */\n id: { type: String, required: true },\n\n /**\n * Dropdown input size\n */\n inputSize: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: BentoDropdownSize.DEFAULT,\n validator: (value: BentoDropdownSize) => Object.values(BentoDropdownSize).includes(value),\n },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoDropdownIsOptionDisabled}\n * @param {BentoDropdownOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: undefined,\n },\n\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoDropdownOptionItem }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType: {\n type: String as PropType<BentoDropdownLazyLoadType | `${BentoDropdownLazyLoadType}`>,\n default: BentoDropdownLazyLoadType.AUTOMATIC,\n validator: (value: BentoDropdownLazyLoadType) => Object.values(BentoDropdownLazyLoadType).includes(value),\n },\n\n /**\n * Indicates if new options are loading.\n */\n loading: { type: Boolean, default: false },\n\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the container can be displayed.\n */\n open: { type: Boolean, required: true },\n\n /**\n * The `input` value.\n * Providing an empty string or empty array will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected for single select\n */\n selectedValue: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: null,\n },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: BentoListbox.props.searching,\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Reference to the DOM element or Vue component for positioning\n * the Dropdown container.\n */\n targetElement: { type: PopperContainer.props.targetElement.type, required: true },\n\n /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll: {\n type: [Boolean, Object] as PropType<BentoDropdownVirtulisationOptions>,\n default: false,\n },\n });\n\n const { selectedValue, multiple } = toRefs(props);\n const dropdownOptionsListboxRef = ref(null);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isDropdownOpen = computed(() => props.open && !props.disabled);\n const noResultsMessage = computed(() => t('noOptionsMatchThisSearch') as string);\n\n const conditionalClasses = computed(() => ({\n 'b-dropdown-options-container--single': !props?.multiple,\n }));\n\n const conditionalListboxClasses = computed(() => ({\n 'b-dropdown-options-container__listbox--small': props.inputSize === BentoDropdownSize.SMALL,\n 'b-dropdown-options-container__listbox--single': !props?.multiple,\n }));\n\n const { actions, internalSelectedValue, listeners, onEscapeKey, onOutsideDropdownClick } =\n useDropdownOptionsListbox(selectedValue, multiple, isDropdownOpen, emit);\n\n // Use different components depending on if the dropdown is a single or multi-select\n const popperContainerOrPopoverComponent = computed(() => (props?.multiple ? BentoPopover : PopperContainer));\n\n const popperContainerOrPopoverProps = computed(() => {\n const containerMinAndMaxWidth = {\n 'min-width': `${(props?.targetElement as HTMLElement)?.clientWidth}px`,\n 'max-width': 'min(500px, 95%)',\n };\n\n return props?.multiple\n ? ({\n actionsLayout: 'space-between',\n actions: actions.value,\n divider: true,\n fallbackPosition: ['top-start'],\n id: generateUid(`dropdown-options-${props.id}`),\n open: props.open,\n position: 'bottom-start',\n style: {\n width: 'auto',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof BentoPopover>['$props'])\n : ({\n fallbackPosition: ['top-start'],\n offset: [0, 8],\n position: 'bottom-start',\n style: {\n display: isDropdownOpen.value ? 'block' : 'none',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof PopperContainer>['$props']);\n });\n\n defineExpose({\n onOutsideDropdownClick,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dropdown options container.\n * It lists all the available options.\n *\n * @example\n * <bento-dropdown-options-container\n * v-if=\"inputContainerRef\" <!-- Ref to the input to match the width -->\n * :id=\"dropdownOptionsContainerId\"\n * :target-element=\"inputContainerRef\"\n * :aria-label=\"ariaLabel\"\n * :open=\"isDropdownOpen\"\n * :disabled=\"disabled\"\n * :multiple=\"multiple\"\n * :selected=\"value\"\n * :isOptionDisabled=\"option => option.value === 2\"\n * :items=\"[{\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * }]\"\n * @select=\"onOptionSelected\"\n * />\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-dropdown-options-container',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-options-container.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <div class=\"b-dropdown-small-textbox\" :class=\"conditionalClasses\">\n <dropdown-base-textbox\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-small-textbox__textbox\"\n v-on=\"listeners\"\n >\n <template #icon>\n <div class=\"b-dropdown-small-textbox__chevron\">\n <chevron-up-small-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-small-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types';\n import { Booleanish } from '@/types';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import ChevronDownSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-down-small';\n import ChevronUpSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-up-small';\n\n const emit = defineEmits<{\n /**\n * Emitted on click, space, enter and esc user events. It will close the dropdown.\n */\n (e: DropdownBaseTextboxEvent.CLOSE);\n\n /**\n * Emitted on click, space and enter user events. It will open the dropdown.\n */\n (e: DropdownBaseTextboxEvent.OPEN);\n }>();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n });\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const openDropdown = () => {\n emit(DropdownBaseTextboxEvent.OPEN);\n };\n\n const closeDropdown = () => {\n emit(DropdownBaseTextboxEvent.CLOSE);\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component in its small variant used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-small-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-small-textbox.scss\" />\n","import { computed } from 'vue';\nimport {\n CategoryMultiSelectOptions,\n MultiSelectOptions,\n SingleSelectOptions,\n UseDisplayValue,\n} from './use-display-value.types';\nimport { BentoListboxMultiSelectValue, BentoListboxOptionItem } from '@/types';\n\n/**\n * Generates the `displayValue` for the Single select based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * @param options Single select options\n * @returns The text to be displayed by the dropdown\n */\nconst singleSelect = ({ items, placeholder, selectedValue, staticCategories }: SingleSelectOptions) => {\n // If no value selected, return placeholder or nothing\n if (!selectedValue.value) {\n return placeholder.value || null;\n }\n\n // Find selected values in the list of items\n let selectedItem: BentoListboxOptionItem;\n if (staticCategories) {\n const category = items.value.find(cat => cat.items.some(item => item.value === selectedValue.value));\n selectedItem = category?.items.find(item => item.value === selectedValue.value);\n } else {\n selectedItem = items.value.find(({ value }) => value === selectedValue.value);\n }\n\n // Return selected value's label or the selected value's value when it is not found\n return selectedItem ? selectedItem.label : selectedValue.value.toString();\n};\n\n/**\n * Generates the `displayValue` for the Multi Select based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * @param options Category select options\n * @returns The text to be displayed by the dropdown\n */\nconst multiSelect = ({ selectedValues, items, placeholder }: MultiSelectOptions) => {\n // No selected values\n if (!selectedValues.value || (selectedValues.value as BentoListboxMultiSelectValue)?.length === 0) {\n return placeholder.value || null;\n }\n\n return (selectedValues.value as BentoListboxMultiSelectValue)\n .map(selectedValue => {\n const selectedItem = items.value.find(({ value }) => value === selectedValue);\n return selectedItem ? selectedItem.label : selectedValue;\n })\n .join(', ');\n};\n\n/**\n * Generates the `displayValue` for the Category Multi Select based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * @param options Multi select options\n * @returns The text to be displayed by the dropdown\n */\nconst categoryMultiSelect = ({ selectedValues, items, placeholder }: CategoryMultiSelectOptions) => {\n // No selected values\n if (!selectedValues.value || !(selectedValues.value as Array<string | number>)?.length) {\n return placeholder.value || null;\n }\n\n return items.value\n .reduce((acc, option) => {\n // Category items\n if (option.items) {\n const selectedCategoryOptions = option.items.filter(categoryOption =>\n (selectedValues.value as Array<string | number>).includes(categoryOption.value)\n );\n\n // If the category is fully selected add the category name\n const isCategoryFullySelected = selectedCategoryOptions.length === option.items.length;\n if (isCategoryFullySelected) {\n acc.push(option.label);\n } else {\n // If category is partially selected add each selected option and category\n selectedCategoryOptions.forEach(({ label }) => acc.push(label));\n }\n }\n\n // Non-category option\n if ((selectedValues.value as Array<string | number>).includes(option.value)) {\n acc.push(option.label);\n }\n\n return acc;\n }, [])\n .join(', ');\n};\n\n/**\n * Generates the `displayValue` for the Dropdown based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * When there is a selected value but the value is not present in the list, the\n * value is then returned as there is no way to know what the text/label is.\n *\n * @param options Options needed to calculate the display value based on the type of Dropdown (single, multi, category)\n * @returns The text to be displayed by the dropdown\n */\nexport const useDisplayValue: UseDisplayValue = ({ items, placeholder, value, multiple, staticCategories }) => {\n const isCategoryMultilevel = computed(() => items.value.find(option => option.items?.length));\n\n const displayValue = computed(() => {\n if (!multiple.value) {\n const result = singleSelect({\n items,\n placeholder,\n selectedValue: value,\n staticCategories: staticCategories.value,\n });\n return result;\n }\n\n // Category multi select\n if (isCategoryMultilevel.value) {\n return categoryMultiSelect({ selectedValues: value, placeholder, items });\n }\n\n // Multi select\n return multiSelect({ selectedValues: value, items, placeholder });\n });\n\n return displayValue;\n};\n","import { BentoKeyboardNavigationKeyDownEvent } from '@/types';\nimport { BentoListboxEvent } from '@/types/listbox';\nimport { computed, nextTick, Ref } from 'vue';\nimport {\n UseListboxKeyboardNavigationOptions,\n UseTextboxKeyboardNavigationOptions,\n} from './use-keyboard-navigation.types';\n\n/**\n * Returns the focus to the textbox of the dropdown if it exists\n * when the dropdown is being closed.\n * @param elementToFocusOn Reference to the input container\n */\nconst focusOnTextbox = (elementToFocusOn: Ref) => {\n elementToFocusOn.value.$children?.[0].$refs.textbox.focus();\n};\n\n/**\n * Controls the keyboard navigation inside the Dropdown's textbox for Single and Multi select.\n * Adds support for the keys:\n *\n * - Arrow up\n * - Arrow Down\n * - End key\n * - Home key\n * - Escape key\n * - Space key\n * - Enter Key\n *\n * @param options Options from the Dropdown to handle the navigation\n * @param toggleDropdown Function to open/close the Dropdown\n * @param openDropdown Function to open the Dropdown\n * @param closeDropdown Function to close the Dropdown\n * @returns List of event listeners available to the Dropdown's textbox\n */\nexport const useTextboxKeyboardNavigation = (\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering,\n items,\n isMultiple,\n }: UseTextboxKeyboardNavigationOptions,\n toggleDropdown: () => void,\n openDropdown: () => void,\n closeDropdown: () => void\n) => {\n const onArrowDown = ({ detail: event }) => {\n event.preventDefault();\n if (!isDropdownOpen.value) {\n openDropdown();\n nextTick(() => {\n if (isMultiple) {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n selectedValueIndex.value\n ].$el.focus();\n }\n });\n }\n };\n const onArrowUp = ({ detail: event }) => {\n event.preventDefault();\n if (!isDropdownOpen.value) {\n openDropdown();\n nextTick(() => {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n });\n }\n };\n\n const onEndKey = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n nextTick(() => {\n if (isMultiple) {\n const firstLayer =\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children;\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n firstLayer.length - 1\n ].$children[items.length - 1].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n items.length - 1\n ].$el.focus();\n }\n });\n }\n };\n\n const onEscapeKey = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n focusOnTextbox(inputContainerRef);\n }\n };\n\n const onHomeKey = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n nextTick(() => {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n });\n };\n\n const onSpaceKey = ({ detail: event }) => {\n event.preventDefault();\n toggleDropdown();\n if (isDropdownOpen.value) {\n nextTick(() => {\n if (isMultiple) {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n selectedValueIndex.value\n ].$el.focus();\n }\n });\n }\n };\n\n const onEnterKey = () => {\n toggleDropdown();\n if (isDropdownOpen.value) {\n nextTick(() => {\n if (isMultiple) {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n selectedValueIndex.value\n ].$el.focus();\n }\n });\n }\n };\n\n const textboxKeyboardNavigationListeners = computed(() => ({\n ...(!isDynamicFltering.value ? { [BentoKeyboardNavigationKeyDownEvent.SPACE]: onSpaceKey } : {}),\n [BentoKeyboardNavigationKeyDownEvent.ENTER]: onEnterKey,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: onArrowDown,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: onArrowUp,\n [BentoKeyboardNavigationKeyDownEvent.END]: onEndKey,\n [BentoKeyboardNavigationKeyDownEvent.ESCAPE]: onEscapeKey,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: onHomeKey,\n }));\n\n return textboxKeyboardNavigationListeners;\n};\n\n/**\n * Controls the keyboard navigation inside the Dropdown's listbox container for Single and Multi select.\n * Adds support for the keys:\n *\n * - Escape key\n * - Enter Key\n * - Tab\n * - Space key\n *\n * @param options Options from the Dropdown to handle the navigation inside the listbox\n * @param closeDropdown Function to close the Dropdown\n * @returns List of event listeners available to the Dropdown's listbox container\n */\nexport const useListboxKeyboardNavigation = (\n { inputContainerRef, isDropdownOpen }: UseListboxKeyboardNavigationOptions,\n closeDropdown: () => void\n) => {\n const closeDropdownAndFocusOnTextbox = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n }\n nextTick(() => {\n focusOnTextbox(inputContainerRef);\n });\n };\n\n const listboxKeyboardNavigationListeners = {\n [BentoListboxEvent.ENTER]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.ESCAPE]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.TAB]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.SPACE]: closeDropdownAndFocusOnTextbox,\n };\n\n return listboxKeyboardNavigationListeners;\n};\n","import { computed, ref, Ref, watch } from 'vue';\nimport { BentoSearchBarItem } from './search-bar.types';\n\n/**\n * Filters an array {@see BentoSearchBarData} containing elements of type {@see BentoSearchBarItem}\n * by the {@param searchTerm}.\n *\n * @param {Ref<String>} searchTerm - Text that satisfies the search criteria.\n * @param {Ref<BentoSearchBarData>} data - Array to be filtered by {@param searchTerm}\n * @returns {Ref<BentoSearchBarData>} New instance of the array filtered by the {@param searchTerm} text\n */\nexport function useSearchBarFilter<T extends BentoSearchBarItem>(\n searchTerm: Ref<string>,\n data: Ref<T[]>,\n searchEvent?: (searchValue: string) => void\n) {\n const searchTermRef = ref(searchTerm);\n const dataRef = ref(data);\n\n const findHits = (searchTermLowerCased: string, options: Array<BentoSearchBarItem> = []) =>\n options.flatMap(option => {\n if (option.label.toLocaleLowerCase().includes(searchTermLowerCased)) {\n return [option, ...findHits(searchTermLowerCased, option.items)];\n }\n\n if (option.items) {\n return [...findHits(searchTermLowerCased, option.items)];\n }\n\n return [];\n });\n\n // If search event exists trigger it on the search term changing\n watch(searchTermRef, () => {\n if (searchEvent !== undefined) {\n searchEvent(searchTermRef.value);\n }\n });\n\n const filterInputData = computed(() => {\n if (!searchTermRef.value) {\n return dataRef.value;\n }\n // If search event exists, emit the new search value into the event and do not manipulate data.\n if (searchEvent !== undefined) {\n return dataRef.value;\n }\n\n const searchTermLowerCased = searchTermRef.value.toLocaleLowerCase();\n const filtered = findHits(searchTermLowerCased, dataRef.value);\n return filtered;\n });\n\n return filterInputData;\n}\n","export const INPUT_FIELD_COMPONENT_INJECTION_KEY = Symbol('input field component injection key');\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div v-bento-click-outside-directive=\"clickOutsideDropdown\" class=\"b-dropdown\" :class=\"conditionalClasses\">\n <field-label\n v-if=\"label\"\n :id=\"labelId\"\n :condensed=\"condensed\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n <div\n ref=\"inputContainerRefWrapper\"\n v-bento-keyboard-navigation-directive\n v-on=\"textboxKeyboardNavigationListeners\"\n >\n <component\n :is=\"size\"\n ref=\"inputContainerRef\"\n :condensed=\"condensed\"\n :value=\"searchTerm\"\n :additional-items-selected=\"additionalItemsSelected\"\n :ariaControls=\"dropdownOptionsContainerId\"\n :ariaExpanded=\"isDropdownOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-label=\"computedAriaLabel\"\n :aria-readonly=\"isReadOnly\"\n :readonly=\"isReadOnly\"\n :disabled=\"disabled\"\n :display-value=\"displayValue\"\n :dynamic-filtering=\"dynamicFiltering\"\n :is-invalid=\"!!errorMessage || error\"\n :multiple=\"multiple\"\n :open=\"isDropdownOpen\"\n :selected-value-item=\"!isInputComponent ? selectedValueItem : undefined\"\n :show-slot-content-in-multiple=\"showSlotContentInMultiple\"\n @input=\"searchTerm = $event\"\n @open=\"toggleDropdown\"\n @close=\"toggleDropdown\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </component>\n </div>\n <bento-dropdown-options-container\n v-if=\"inputContainerRef\"\n :id=\"dropdownOptionsContainerId\"\n ref=\"optionsContainerRef\"\n :aria-label=\"computedAriaLabel\"\n :empty-state=\"emptyState\"\n :debounce-time=\"search?.debounceTime\"\n :disabled=\"disabled\"\n :input-size=\"size\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"filteredItems\"\n :multiple=\"multiple\"\n :static-categories=\"staticCategories\"\n :open=\"isDropdownOpen\"\n :selected-value=\"value\"\n :searching=\"isSearching\"\n :target-element=\"inputContainerRefWrapper\"\n :loading=\"loading\"\n :has-more-items=\"hasMoreItems\"\n :lazy-load-type=\"lazyLoadType\"\n :virtual-scroll=\"virtualScroll\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-dropdown-options-container>\n <error-message\n v-if=\"!!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-dropdown__error-message\"\n />\n <bento-typography\n v-if=\"description || hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-dropdown__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n <slot name=\"description\">\n {{ description }}\n </slot>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, inject, PropType, Ref, ref, toRef, toRefs, useAttrs, useSlots } from 'vue';\n\n // Components\n import { BentoDropdownOptionsContainer } from './components/dropdown-options-container';\n import { BentoTypography } from '@/components/typography';\n import { DropdownInputDefault, DropdownInputSmall } from './components';\n import { BentoListbox, ErrorMessage, FieldLabel, useMultiLevelItems } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n\n // Composables\n import { useDisplayValue, useListboxKeyboardNavigation, useTextboxKeyboardNavigation } from './composables';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n\n // Directives\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n // Types\n import {\n BentoDropdownEmptyStateProps,\n BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n BentoDropdownSearchOptions,\n BentoDropdownSize,\n BentoDropdownVirtulisationOptions,\n } from './dropdown.types';\n import {\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxMultiSelectValue,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n } from '@/types';\n\n import messages from './messages.json';\n import { useHasSlot } from '@/composables';\n import { INPUT_FIELD_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoDropdownEmptyStateProps>,\n default: undefined,\n },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Highlights the dropdown in an erroneous state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown in an erroneous state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Descriptive supporting text visbile underneath the dropdown.\n */\n description: { type: String, default: null },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Function that dertermines which options are disabled from interaction.\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: undefined,\n },\n\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoListboxOptionItem }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n default: () => [],\n },\n\n /**\n * Text that is displayed as a label above the element.\n */\n label: { type: String, default: null },\n\n /**\n * Indicates if new options are loading.\n */\n loading: { type: Boolean, default: false },\n\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType: {\n type: String as PropType<BentoDropdownLazyLoadType | `${BentoDropdownLazyLoadType}`>,\n default: BentoListbox.props.lazyLoadType.default,\n validator: (value: BentoDropdownLazyLoadType) => Object.values(BentoDropdownLazyLoadType).includes(value),\n },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Text that appears in the form control when it has no value set\n */\n placeholder: { type: String, default: null },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Dropdown search options and events.\n * @see BentoDropdownSearchOptions\n */\n search: {\n type: Object as PropType<BentoDropdownSearchOptions>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * @deprecated Do not use. Only 'default' size should be used.\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n validator: (value: BentoDropdownSize) => Object.values(BentoDropdownSize).includes(value),\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n */\n value: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: null,\n },\n\n /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll: {\n type: [Boolean, Object] as PropType<BentoDropdownVirtulisationOptions>,\n default: false,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const inputContainerRef = ref(null);\n const inputContainerRefWrapper = ref(null);\n const optionsContainerRef: Ref<InstanceType<typeof BentoDropdownOptionsContainer>> = ref(null);\n const isDropdownOpen = ref(false);\n const dropdownOptionsContainerId = generateUid('bento-dropdown-options-container');\n const labelId = generateUid('dropdown-label');\n const descriptionId = generateUid('dropdown-description');\n const errorId = generateUid('dropdown-error');\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: t('ariaLabelFallback'),\n });\n\n // Inject input field component key to change the dropdown size\n const isInputComponent =\n props.size === BentoDropdownSize.SMALL || inject(INPUT_FIELD_COMPONENT_INJECTION_KEY, false);\n const size = computed(() => (isInputComponent ? BentoDropdownSize.SMALL : BentoDropdownSize.DEFAULT));\n\n const conditionalClasses = computed(() => ({\n 'b-dropdown--condensed': props.condensed,\n }));\n\n // Description styles\n const descriptionConditionalClasses = computed(() => ({\n 'b-dropdown__description--error': !!props.errorMessage,\n }));\n\n // Filtering\n const searchTerm = ref('');\n const items = toRef(props, 'items');\n const filteredItems = useSearchBarFilter(searchTerm, items, props?.search?.searchEvent);\n const isSearching = computed(() => props.dynamicFiltering && !!searchTerm.value);\n\n const displayValue = useDisplayValue({\n items,\n staticCategories: toRef(props, 'staticCategories'),\n multiple: toRef(props, 'multiple'),\n placeholder: toRef(props, 'placeholder'),\n value: toRef(props, 'value'),\n });\n\n const selectedValueItem = computed(() => {\n if (props?.multiple) {\n return props.items.filter(\n ({ value }) => props?.value && (props?.value as BentoListboxMultiSelectValue).includes(value)\n );\n }\n if (!props.multiple && props.staticCategories) {\n // Find the category that holds the selected value\n const category = props.items.find(categoryItem =>\n categoryItem.items.some(item => item.value === props.value)\n );\n // Find the specific item within the category\n const selectedCategoryItem = category ? category.items.find(item => item.value === props.value) : null;\n\n return selectedCategoryItem;\n }\n\n return props.items.find(({ value }) => value === props?.value);\n });\n\n const selectedValueIndex = computed(() => {\n const index = props.items.findIndex(({ value }) => props.value === value);\n return index > 0 ? index : 0;\n });\n\n const { isMultiLevelSelect, flattenedItemsList } = useMultiLevelItems(items);\n\n const additionalItemsSelected = computed(() => {\n if (props.multiple) {\n const selectedItems = (props?.value as BentoListboxMultiSelectValue)?.length;\n const total = isMultiLevelSelect.value ? flattenedItemsList.value.length : items.value.length;\n return total === selectedItems ? t('all') : selectedItems;\n }\n\n return null;\n });\n\n // ARIA\n const ariaDescribedBy = computed(\n () => `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''}`.trim() || null\n );\n\n const openDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = true;\n };\n\n const closeDropdown = () => {\n isDropdownOpen.value = false;\n };\n\n const toggleDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = !isDropdownOpen.value;\n\n // Clear search\n if (isSearching.value) {\n searchTerm.value = '';\n }\n };\n\n const clickOutsideDropdown = () => {\n if (isSearching.value) {\n searchTerm.value = '';\n }\n\n if (isDropdownOpen.value) {\n isDropdownOpen.value = false;\n // Reset the internal dropdown options state\n optionsContainerRef.value.onOutsideDropdownClick();\n }\n };\n\n const onOptionSelected = (selectedValue: BentoListboxSelectedValue) => {\n // Clear and close the dropdown on single selection\n if (!props.multiple) {\n searchTerm.value = '';\n isDropdownOpen.value = false;\n }\n\n emit('input', selectedValue);\n };\n\n const emitShowMoreEvent = () => {\n emit(BentoDropdownEvent.SHOW_MORE);\n };\n\n const textboxKeyboardNavigationListeners = useTextboxKeyboardNavigation(\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering: toRef(props, 'dynamicFiltering'),\n items: props.items,\n isMultiple: props.multiple,\n },\n toggleDropdown,\n openDropdown,\n closeDropdown\n );\n\n const listboxKeyboardNavigationListeners = useListboxKeyboardNavigation(\n {\n inputContainerRef,\n isDropdownOpen,\n },\n closeDropdown\n );\n\n const listboxListeners = {\n [BentoListboxEvent.CLOSE_DROPDOWN]: closeDropdown,\n [BentoListboxEvent.SELECT]: onOptionSelected,\n [BentoListboxEvent.SHOW_MORE]: emitShowMoreEvent,\n ...listboxKeyboardNavigationListeners,\n };\n\n if (props.error) {\n deprecate(\n 'BentoDropdown \"error\" property',\n `Use the BentoDropdown \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n if (props.size) {\n deprecate('BentoDropdown \"size\" property', `Do not use. Only 'default' size should be used.`, '2.0.0');\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Dropdown shows a selected option's.\n * Use a dropdown when you want users to select options\n * from a list of pre-defined options.\n *\n * @example\n * import { BentoDropdown } from '@adyen/bento-vue2';\n * import type { BentoDropdownOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(2) // Default value\n * const options: BentoDropdownOptions = [\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'b-dropdown',\n components: {\n DropdownInputDefault,\n DropdownInputSmall,\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","useDropdownOptionsListbox","selectedValue","multiple","isOpen","emit","internalSelectedValue","ref","t","useI18n","watch","isApplyButtonDisabled","computed","onApplyClick","BentoListboxEvent","onCancelClick","onOutsideDropdownClick","actions","onOptionSelected","newSelectedValue","onTabKey","onEnterKey","onSpaceKey","onEscapeKey","emitShowMoreEvent","listeners","__default__$2","defineComponent","messages$1","slots","useSlots","toRefs","props","dropdownOptionsListboxRef","isDropdownOpen","noResultsMessage","conditionalClasses","conditionalListboxClasses","popperContainerOrPopoverComponent","BentoPopover","PopperContainer","popperContainerOrPopoverProps","containerMinAndMaxWidth","_a","generateUid","expose","uuid$1","_sfc_main$3","uuid","_sfc_main$2","__default__$1","DropdownBaseTextboxState","openDropdown","DropdownBaseTextboxEvent","closeDropdown","singleSelect","items","placeholder","staticCategories","selectedItem","category","cat","item","value","multiSelect","selectedValues","categoryMultiSelect","acc","option","selectedCategoryOptions","categoryOption","label","useDisplayValue","isCategoryMultilevel","focusOnTextbox","elementToFocusOn","useTextboxKeyboardNavigation","inputContainerRef","optionsContainerRef","selectedValueIndex","isDynamicFltering","isMultiple","toggleDropdown","onArrowDown","event","nextTick","_b","onArrowUp","onEndKey","firstLayer","onHomeKey","BentoKeyboardNavigationKeyDownEvent","useListboxKeyboardNavigation","closeDropdownAndFocusOnTextbox","useSearchBarFilter","searchTerm","data","searchEvent","searchTermRef","dataRef","findHits","searchTermLowerCased","options","INPUT_FIELD_COMPONENT_INJECTION_KEY","__default__","messages","DropdownInputDefault","DropdownInputSmall","attrs","useAttrs","hasSlot","useHasSlot","inputContainerRefWrapper","dropdownOptionsContainerId","labelId","descriptionId","errorId","isReadOnly","useFormLayoutFieldLoading","toRef","ariaLabelAttribute","ariaLabel","computedAriaLabel","useAriaLabel","isInputComponent","inject","size","descriptionConditionalClasses","filteredItems","isSearching","displayValue","selectedValueItem","categoryItem","index","isMultiLevelSelect","flattenedItemsList","useMultiLevelItems","additionalItemsSelected","selectedItems","ariaDescribedBy","clickOutsideDropdown","textboxKeyboardNavigationListeners","listboxKeyboardNavigationListeners","listboxListeners","deprecate"],"mappings":";;;;;;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;GCeLE,KAAA,CAAAC,GAAAC,GAAAC,GAAAC,MAAA;AAMH,QAAAC,IAAAC,EAAAL,EAAA,KAAA,GACA,EAAA,GAAAM,EAAA,IAAAC,EAAA;AAEA,EAAAC,GAAAR,GAAA,MAAA;AACI,IAAAI,EAAA,QAAAJ,EAAA;AAAA,EAA4C,CAAA;AAIhD,QAAAS,IAAAC;AAAA,IAA8B,MAAA,KAAA,UAAAN,EAAA,KAAA,MAAA,KAAA,UAAAJ,EAAA,KAAA;AAAA,EAC8D,GAG5FW,IAAA,MAAA;AACI,IAAAR,EAAAS,EAAA,QAAAR,EAAA,KAAA,GACAD,EAAAS,EAAA,cAAA;AAAA,EAAsC,GAG1CC,IAAA,MAAA;AACI,IAAAT,EAAA,QAAAJ,EAAA,OACAG,EAAAS,EAAA,cAAA;AAAA,EAAsC,GAG1CE,IAAA,MAAA;AACI,IAAAZ,EAAA,SAAAD,EAAA,UACIG,EAAA,QAAAJ,EAAA;AAAA,EACJ,GAGJe,IAAAL,EAAA,MAAA;AAAA,IAA+B;AAAA,MAC3B,OAAAJ,EAAA,OAAA;AAAA,MACoB,OAAAK;AAAA,MAC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