@adyen/bento-vue3 1.4.1 → 1.5.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 (220) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
  3. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-lazy-load/data-grid-lazy-load.vue.d.ts +17 -0
  4. package/dist/@types/packages/vue2/src/components/data-grid/components/index.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/data-grid/composables/index.d.ts +1 -0
  6. package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnHeadersTopPosition/useCalculateColumnHeadersTopPosition.d.ts +2 -0
  7. package/dist/@types/packages/vue2/src/components/data-grid/composables/useLazyLoading/useLazyLoading.d.ts +8 -0
  8. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +3 -1
  9. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +28 -2
  10. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +455 -123
  11. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +3 -3
  12. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +13 -13
  13. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue.d.ts +4 -4
  14. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +12 -3
  15. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +3 -3
  16. package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +5 -1
  17. package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +12 -3
  18. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.types.d.ts +2 -1
  19. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.vue.d.ts +2 -0
  20. package/dist/@types/packages/vue2/src/components/image/index.d.ts +1 -0
  21. package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +2 -0
  22. package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +24 -0
  23. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -3
  24. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +3 -1
  25. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +14 -3
  26. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.types.d.ts +1 -9
  27. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.utils.d.ts +5 -21
  28. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +122 -72
  29. package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +3 -2
  30. package/dist/@types/packages/vue2/src/components/stepper/components/step/index.d.ts +1 -0
  31. package/dist/@types/packages/vue2/src/components/stepper/components/step/step.vue.d.ts +35 -0
  32. package/dist/@types/packages/vue2/src/components/stepper/composables/useKeyboardNavigation/useKeyboardNavigation.d.ts +15 -0
  33. package/dist/@types/packages/vue2/src/components/stepper/index.d.ts +3 -0
  34. package/dist/@types/packages/vue2/src/components/stepper/stepper.keys.d.ts +3 -0
  35. package/dist/@types/packages/vue2/src/components/stepper/stepper.types.d.ts +24 -0
  36. package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +44 -0
  37. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
  38. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +363 -82
  39. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  40. package/dist/@types/packages/vue2/src/types/index.d.ts +1 -0
  41. package/dist/@types/packages/vue2/src/types/lazy-load.d.ts +1 -0
  42. package/dist/accordion.js +3 -3
  43. package/dist/alert.js +4 -4
  44. package/dist/assets/base-button.css +1 -1
  45. package/dist/assets/base-modal.css +1 -1
  46. package/dist/assets/button.css +1 -1
  47. package/dist/assets/calendar.css +1 -1
  48. package/dist/assets/checkbox.css +1 -1
  49. package/dist/assets/dropdown-default-textbox.css +1 -1
  50. package/dist/assets/dropdown.css +1 -1
  51. package/dist/assets/index.css +1 -1
  52. package/dist/assets/index10.css +1 -1
  53. package/dist/assets/index11.css +1 -1
  54. package/dist/assets/index12.css +1 -1
  55. package/dist/assets/index13.css +1 -1
  56. package/dist/assets/index14.css +1 -1
  57. package/dist/assets/index15.css +1 -1
  58. package/dist/assets/index16.css +1 -1
  59. package/dist/assets/index17.css +1 -1
  60. package/dist/assets/index18.css +1 -1
  61. package/dist/assets/index19.css +1 -1
  62. package/dist/assets/index2.css +1 -1
  63. package/dist/assets/index20.css +1 -1
  64. package/dist/assets/index21.css +1 -1
  65. package/dist/assets/index22.css +1 -1
  66. package/dist/assets/index23.css +1 -1
  67. package/dist/assets/index24.css +1 -1
  68. package/dist/assets/index25.css +1 -1
  69. package/dist/assets/index26.css +1 -1
  70. package/dist/assets/index27.css +1 -1
  71. package/dist/assets/index28.css +1 -1
  72. package/dist/assets/index29.css +1 -1
  73. package/dist/assets/index3.css +1 -1
  74. package/dist/assets/index30.css +1 -1
  75. package/dist/assets/index31.css +1 -1
  76. package/dist/assets/index32.css +1 -1
  77. package/dist/assets/index33.css +1 -1
  78. package/dist/assets/index34.css +1 -1
  79. package/dist/assets/index35.css +1 -1
  80. package/dist/assets/index36.css +1 -1
  81. package/dist/assets/index37.css +1 -1
  82. package/dist/assets/index38.css +1 -1
  83. package/dist/assets/index39.css +1 -1
  84. package/dist/assets/index4.css +1 -1
  85. package/dist/assets/index40.css +1 -1
  86. package/dist/assets/index41.css +1 -1
  87. package/dist/assets/index42.css +1 -1
  88. package/dist/assets/index43.css +1 -1
  89. package/dist/assets/index44.css +1 -0
  90. package/dist/assets/index5.css +1 -1
  91. package/dist/assets/index6.css +1 -1
  92. package/dist/assets/index7.css +1 -1
  93. package/dist/assets/index8.css +1 -1
  94. package/dist/assets/index9.css +1 -1
  95. package/dist/assets/tooltip.css +1 -1
  96. package/dist/avatar-image.js +1 -1
  97. package/dist/badge.js +1 -1
  98. package/dist/button.js +5 -5
  99. package/dist/card.js +4 -4
  100. package/dist/checkbox.js +6 -6
  101. package/dist/chunks/base-button.9740f320.js +116 -0
  102. package/dist/chunks/base-button.9740f320.js.map +1 -0
  103. package/dist/chunks/base-modal.be77971f.js +296 -0
  104. package/dist/chunks/base-modal.be77971f.js.map +1 -0
  105. package/dist/chunks/{button.7d09c245.js → button.7072457f.js} +3 -3
  106. package/dist/chunks/{button.7d09c245.js.map → button.7072457f.js.map} +1 -1
  107. package/dist/chunks/{calendar.0e42130b.js → calendar.1e50c7d1.js} +5 -5
  108. package/dist/chunks/{calendar.0e42130b.js.map → calendar.1e50c7d1.js.map} +1 -1
  109. package/dist/chunks/{checkbox.17462cb0.js → checkbox.638bab98.js} +24 -24
  110. package/dist/chunks/{checkbox.17462cb0.js.map → checkbox.638bab98.js.map} +1 -1
  111. package/dist/chunks/{chevron-up.c03b58f8.js → chevron-up.9bf21068.js} +3 -3
  112. package/dist/chunks/{chevron-up.c03b58f8.js.map → chevron-up.9bf21068.js.map} +1 -1
  113. package/dist/chunks/{controls-group.0d6db9c0.js → controls-group.efcf4e8d.js} +2 -2
  114. package/dist/chunks/{controls-group.0d6db9c0.js.map → controls-group.efcf4e8d.js.map} +1 -1
  115. package/dist/chunks/{copy.c9a29be0.js → copy.527c3d76.js} +3 -3
  116. package/dist/chunks/{copy.c9a29be0.js.map → copy.527c3d76.js.map} +1 -1
  117. package/dist/chunks/debounce.b5ef6acf.js +10 -0
  118. package/dist/chunks/debounce.b5ef6acf.js.map +1 -0
  119. package/dist/chunks/{dropdown-default-textbox.cd789a95.js → dropdown-default-textbox.a1789dc7.js} +19 -18
  120. package/dist/chunks/{dropdown-default-textbox.cd789a95.js.map → dropdown-default-textbox.a1789dc7.js.map} +1 -1
  121. package/dist/chunks/{dropdown.ff4f94a8.js → dropdown.22e51667.js} +9 -7
  122. package/dist/chunks/dropdown.22e51667.js.map +1 -0
  123. package/dist/chunks/{error-message.8c67a507.js → error-message.37b6c7aa.js} +2 -2
  124. package/dist/chunks/{error-message.8c67a507.js.map → error-message.37b6c7aa.js.map} +1 -1
  125. package/dist/chunks/{footer-actions.a587e374.js → footer-actions.5275203a.js} +3 -3
  126. package/dist/chunks/{footer-actions.a587e374.js.map → footer-actions.5275203a.js.map} +1 -1
  127. package/dist/chunks/{grid-layout.984317d7.js → grid-layout.c98e6bc7.js} +2 -2
  128. package/dist/chunks/{grid-layout.984317d7.js.map → grid-layout.c98e6bc7.js.map} +1 -1
  129. package/dist/chunks/{index.77c651df.js → index.32ed68b7.js} +2 -2
  130. package/dist/chunks/{index.77c651df.js.map → index.32ed68b7.js.map} +1 -1
  131. package/dist/chunks/{index.fdb0c13d.js → index.604da8e9.js} +3 -3
  132. package/dist/chunks/{index.fdb0c13d.js.map → index.604da8e9.js.map} +1 -1
  133. package/dist/chunks/{index.fd1cd23a.js → index.a57930ba.js} +197 -188
  134. package/dist/chunks/index.a57930ba.js.map +1 -0
  135. package/dist/chunks/{index.ee69b530.js → index.c22c4278.js} +6 -6
  136. package/dist/chunks/{index.ee69b530.js.map → index.c22c4278.js.map} +1 -1
  137. package/dist/chunks/{index.140bf28f.js → index.c62ea69f.js} +2 -2
  138. package/dist/chunks/{index.140bf28f.js.map → index.c62ea69f.js.map} +1 -1
  139. package/dist/chunks/{index.450b70d5.js → index.dd20095f.js} +3 -3
  140. package/dist/chunks/{index.450b70d5.js.map → index.dd20095f.js.map} +1 -1
  141. package/dist/chunks/{debounce.f8d92e44.js → keyboard-navigation.ca47dfa8.js} +11 -17
  142. package/dist/chunks/keyboard-navigation.ca47dfa8.js.map +1 -0
  143. package/dist/chunks/{listbox-option-tag.ffe70226.js → listbox-option-tag.fa70334e.js} +3 -3
  144. package/dist/chunks/{listbox-option-tag.ffe70226.js.map → listbox-option-tag.fa70334e.js.map} +1 -1
  145. package/dist/chunks/{listbox.f535a736.js → listbox.4205c0de.js} +12 -11
  146. package/dist/chunks/{listbox.f535a736.js.map → listbox.4205c0de.js.map} +1 -1
  147. package/dist/chunks/{loading-button.bc6e3967.js → loading-button.41c15584.js} +2 -2
  148. package/dist/chunks/{loading-button.bc6e3967.js.map → loading-button.41c15584.js.map} +1 -1
  149. package/dist/chunks/{tooltip.973c86d3.js → tooltip.c8350cd0.js} +37 -36
  150. package/dist/chunks/{tooltip.973c86d3.js.map → tooltip.c8350cd0.js.map} +1 -1
  151. package/dist/chunks/use-has-slot.3daaffc6.js +17 -0
  152. package/dist/chunks/use-has-slot.3daaffc6.js.map +1 -0
  153. package/dist/code-snippet.js +469 -466
  154. package/dist/code-snippet.js.map +1 -1
  155. package/dist/country.js +2 -2
  156. package/dist/currency.js +1 -1
  157. package/dist/data-grid.js +963 -834
  158. package/dist/data-grid.js.map +1 -1
  159. package/dist/date-picker.js +8 -8
  160. package/dist/date-range-picker.js +2 -2
  161. package/dist/date.js +1 -1
  162. package/dist/divider.js +1 -1
  163. package/dist/dropdown.js +4 -4
  164. package/dist/empty-state.js +21 -21
  165. package/dist/empty-state.js.map +1 -1
  166. package/dist/filter-bar.js +853 -784
  167. package/dist/filter-bar.js.map +1 -1
  168. package/dist/focus-trap.js +1 -1
  169. package/dist/form-layout.js +72 -51
  170. package/dist/form-layout.js.map +1 -1
  171. package/dist/header.js +190 -112
  172. package/dist/header.js.map +1 -1
  173. package/dist/image.js +3 -1
  174. package/dist/index.js +219 -211
  175. package/dist/index.js.map +1 -1
  176. package/dist/info-icon.js +2 -2
  177. package/dist/input-field.js +5 -5
  178. package/dist/internal.js +7 -7
  179. package/dist/link.js +2 -2
  180. package/dist/loading-indicator.js +1 -1
  181. package/dist/menu.js +114 -104
  182. package/dist/menu.js.map +1 -1
  183. package/dist/modal.js +33 -30
  184. package/dist/modal.js.map +1 -1
  185. package/dist/pagination.js +4 -4
  186. package/dist/payment-method.js +2 -2
  187. package/dist/popover.js +72 -61
  188. package/dist/popover.js.map +1 -1
  189. package/dist/popper-container.js +1238 -192
  190. package/dist/popper-container.js.map +1 -1
  191. package/dist/radio-group.js +5 -5
  192. package/dist/search-bar.js +3 -3
  193. package/dist/segmented-control.js +15 -15
  194. package/dist/segmented-control.js.map +1 -1
  195. package/dist/sidepanel.js +7 -7
  196. package/dist/sidepanel.js.map +1 -1
  197. package/dist/status.js +2 -2
  198. package/dist/stepper.js +276 -0
  199. package/dist/stepper.js.map +1 -0
  200. package/dist/structured-list.js +1 -1
  201. package/dist/summary-grid.js +5 -5
  202. package/dist/tabs.js +2 -2
  203. package/dist/tag.js +3 -3
  204. package/dist/textarea.js +4 -4
  205. package/dist/timeline.js +5 -5
  206. package/dist/toast.js +4 -4
  207. package/dist/toggle.js +12 -12
  208. package/dist/toggle.js.map +1 -1
  209. package/dist/typography.js +1 -1
  210. package/dist/web-types.json +1 -1
  211. package/package.json +3 -3
  212. package/dist/chunks/base-button.c4ac1ad1.js +0 -108
  213. package/dist/chunks/base-button.c4ac1ad1.js.map +0 -1
  214. package/dist/chunks/base-modal.db7a9829.js +0 -291
  215. package/dist/chunks/base-modal.db7a9829.js.map +0 -1
  216. package/dist/chunks/debounce.f8d92e44.js.map +0 -1
  217. package/dist/chunks/dropdown.ff4f94a8.js.map +0 -1
  218. package/dist/chunks/index.fd1cd23a.js.map +0 -1
  219. package/dist/chunks/use-has-slot.9fac7123.js +0 -16
  220. package/dist/chunks/use-has-slot.9fac7123.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-default-textbox.cd789a95.js","sources":["../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../../vue2/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, 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=\"dynamicFiltering\"\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 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 lang=\"ts\">\n import { computed, defineComponent, PropType, ref } 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 { BentoKeyboardNavigationKeyDownEvent, BentoListboxOptionItem, Booleanish } from '@/types';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\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 components: { BentoTypography, CrossCircleFillIcon },\n inheritAttrs: false,\n props: {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Custom debounce time 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: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\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 * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n },\n emits: [\n DropdownBaseTextboxEvent.OPEN,\n DropdownBaseTextboxEvent.CLOSE,\n DropdownBaseTextboxEvent.INPUT,\n DropdownBaseTextboxEvent.CLEAR,\n DropdownBaseTextboxEvent.KEYDOWN,\n ],\n setup(props, { emit, slots, attrs }) {\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 isFiltering = computed(() => props.dynamicFiltering && !!props.value);\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 /**\n * Triggered on click, space and enter user events. It will open the dropdown.\n * @event open\n */\n const onOpenDropdown = () => {\n if (!props.disabled && !props.readonly) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.OPEN);\n }\n };\n\n /**\n * Triggered on click, space, enter and esc user events. It will close the dropdown.\n * @event close\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 =\n 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\n return {\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n DropdownBaseTextboxEvent,\n\n // Values\n conditionalClasses,\n textboxId,\n textbox,\n isFiltering,\n ariaAttributes,\n selectedValueItems,\n\n // Events\n onCloseDropdown,\n onToggleDropdown,\n onClearSearch,\n onInputEvent,\n\n // Methods\n hasSlot: useHasSlot(slots),\n };\n },\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, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The 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 }));\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","_sfc_main$1","defineComponent","BentoTypography","CrossCircleIcon","props","emit","slots","attrs","textbox","ref","textboxId","generateUid","conditionalClasses","computed","isFiltering","ariaAttributes","_a","onOpenDropdown","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","selectedValueItems","BentoKeyboardNavigationKeyDownEvent","useHasSlot","openBlock","createElementBlock","normalizeClass","_ctx","_cache","args","createVNode","_component_bento_typography","withCtx","mergeProps","withKeys","_hoisted_1$1","createTextVNode","toDisplayString","_hoisted_3","Fragment","renderList","singleItem","createElementVNode","_hoisted_4","renderSlot","normalizeProps","guardReactiveProps","_hoisted_2","_hoisted_5","createCommentVNode","_hoisted_6","withModifiers","_sfc_main","ChevronDownIcon","ChevronUpIcon","DropdownBaseTextbox","isDropdownOpen","onInput","e","onKeyDown","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners","toHandlers","createSlots","_hoisted_1","withDirectives","_component_chevron_up_icon","innerSlot","scope"],"mappings":";;;;;;;;;;AA0EY,IAAAA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;AAGxC,WAAA;AAAA;AAAA,MAAO,0BAAAhE;AAAA;AAAA,MAEH,oBAAAc;AAAA,MAGA,gBAAA+C;AAAA,MACA,OAAArD;AAAA;AAAA,MACA,WAAA6D;AAAA,IAGA;AAAA,EACJ;AAER,CAAA;;;;AArMoE,SAAAxC,EAAA,GAAAC,EAAA,OAAA;AAAA,IAA6B,OAAAC,EAAA,CAAA,8BAAAC,EAAA,kBAAA,CAAA;AAAA;EAgBrE,GAAA;AAAA;MAZP,OAAA;AAAA,MACb,OAAAA,EAAA;AAAA,IAKe,GAAAsC,EAAAtC,EAAA,SAAA,CAAA,GAAAuC,EAAA;AAAA,MAIL,MAAAlC,EAAA,MAAA;AAAA,QAFFU,EAAA,OAAAyB,IAAA;AAAA,UAAuCC,EAAAtC,EAAAuC,GAAA,EAAA,aAAA,SAAA,GAAA,MAAA,GAAA,GAAA;AAAA;UAC0B,CAAA;AAAA;;;;;;;;QALrE,MAAAC;AAAA,QAAA,IAAAtC,EAAA,CAAAuC,MAAA;AAAA;;;;;;;"}
1
+ {"version":3,"file":"dropdown-default-textbox.a1789dc7.js","sources":["../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../../vue2/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, 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=\"dynamicFiltering\"\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 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 lang=\"ts\">\n import { computed, defineComponent, PropType, ref } 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 { BentoKeyboardNavigationKeyDownEvent, BentoListboxOptionItem, Booleanish } from '@/types';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\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 components: { BentoTypography, CrossCircleFillIcon },\n inheritAttrs: false,\n props: {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Custom debounce time 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: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\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 * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n },\n emits: [\n DropdownBaseTextboxEvent.OPEN,\n DropdownBaseTextboxEvent.CLOSE,\n DropdownBaseTextboxEvent.INPUT,\n DropdownBaseTextboxEvent.CLEAR,\n DropdownBaseTextboxEvent.KEYDOWN,\n ],\n setup(props, { emit, slots, attrs }) {\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 isFiltering = computed(() => props.dynamicFiltering && !!props.value);\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 /**\n * Triggered on click, space and enter user events. It will open the dropdown.\n * @event open\n */\n const onOpenDropdown = () => {\n if (!props.disabled && !props.readonly) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.OPEN);\n }\n };\n\n /**\n * Triggered on click, space, enter and esc user events. It will close the dropdown.\n * @event close\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 =\n 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\n return {\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n DropdownBaseTextboxEvent,\n\n // Values\n conditionalClasses,\n textboxId,\n textbox,\n isFiltering,\n ariaAttributes,\n selectedValueItems,\n\n // Events\n onCloseDropdown,\n onToggleDropdown,\n onClearSearch,\n onInputEvent,\n\n // Methods\n hasSlot: useHasSlot(slots),\n };\n },\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, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The 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 }));\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","_sfc_main$1","defineComponent","BentoTypography","CrossCircleIcon","props","emit","slots","attrs","textbox","ref","textboxId","generateUid","conditionalClasses","computed","isFiltering","ariaAttributes","_a","onOpenDropdown","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","selectedValueItems","BentoKeyboardNavigationKeyDownEvent","useHasSlot","openBlock","createElementBlock","normalizeClass","_ctx","_cache","args","createVNode","_component_bento_typography","withCtx","mergeProps","withKeys","_hoisted_1$1","createTextVNode","toDisplayString","_hoisted_3","Fragment","renderList","singleItem","createElementVNode","_hoisted_4","renderSlot","normalizeProps","guardReactiveProps","_hoisted_2","_hoisted_5","createCommentVNode","_hoisted_6","withModifiers","_sfc_main","ChevronDownIcon","ChevronUpIcon","DropdownBaseTextbox","isDropdownOpen","onInput","e","onKeyDown","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners","toHandlers","createSlots","_hoisted_1","withDirectives","_component_chevron_up_icon","innerSlot","scope"],"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;ACQR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,iBAAAC,GAAA,qBAAAC,EAAA;AAAA,EAC6C,cAAA;AAAA,EACrC,OAAA;AAAA;AAAA;AAAA;AAAA,IACP,yB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,OAAAyB,IAAA;AAAA,UAAuCC,EAAAtC,EAAAuC,GAAA,EAAA,aAAA,SAAA,GAAA,MAAA,GAAA,GAAA;AAAA;UAC0B,CAAA;AAAA;;;;;;;;QALrE,MAAAC;AAAA,QAAA,IAAAtC,EAAA,CAAAuC,MAAA;AAAA;;;;;;;"}
@@ -1,10 +1,10 @@
1
1
  import { ref as $, watch as be, computed as c, defineComponent as ne, toRefs as ve, resolveComponent as R, openBlock as b, createBlock as B, resolveDynamicComponent as ye, mergeProps as A, withCtx as E, createElementVNode as U, withKeys as Ne, createVNode as z, toHandlers as x, createSlots as Z, renderList as Y, renderSlot as G, normalizeProps as Q, guardReactiveProps as X, createElementBlock as O, toDisplayString as P, createCommentVNode as L, pushScopeId as ge, popScopeId as he, normalizeClass as we, withDirectives as q, vShow as de, nextTick as I, toRef as N, resolveDirective as ue, createTextVNode as W } from "vue";
2
- import { a as s, B as ee, b as te } from "./listbox.f535a736.js";
2
+ import { a as s, B as ee, b as te } from "./listbox.4205c0de.js";
3
3
  import { B as Me } from "./directive.0408e565.js";
4
- import { B as D, a as Pe } from "./debounce.f8d92e44.js";
5
- import { D as Ke, a as M, b as j, c as ke } from "./dropdown-default-textbox.cd789a95.js";
4
+ import { B as D, a as Pe } from "./keyboard-navigation.ca47dfa8.js";
5
+ import { D as Ke, a as M, b as j, c as ke } from "./dropdown-default-textbox.a1789dc7.js";
6
6
  import { _ as F } from "./_plugin-vue_export-helper.dad06003.js";
7
- import { B as ze, d as Fe } from "./index.77c651df.js";
7
+ import { B as ze, d as Fe } from "./index.32ed68b7.js";
8
8
  import { g as k } from "./unique-id.a2a2b458.js";
9
9
  import { u as le } from "./i18n.6c402773.js";
10
10
  import { u as We } from "./aria-label.ac9651a5.js";
@@ -12,7 +12,7 @@ import { u as xe } from "./use-form-layout-loading.d03e5d48.js";
12
12
  import { PopperContainer as J } from "../popper-container.js";
13
13
  import { BentoPopover as ce } from "../popover.js";
14
14
  import { BentoButtonActionsLayout as qe } from "../button.js";
15
- import { E as Ue } from "./error-message.8c67a507.js";
15
+ import { E as Ue } from "./error-message.37b6c7aa.js";
16
16
  import "../assets/dropdown.css";
17
17
  var T = /* @__PURE__ */ ((e) => (e.DEFAULT = "DropdownInputDefault", e.SMALL = "DropdownInputSmall", e))(T || {});
18
18
  const oe = {
@@ -198,12 +198,14 @@ const oe = {
198
198
  actionsLayout: qe.SPACE_BETWEEN,
199
199
  actions: y.value,
200
200
  divider: !0,
201
+ fallbackPosition: ["top-start"],
201
202
  id: k(`dropdown-options-${e.id}`),
202
203
  open: e.open,
203
204
  position: "bottom-start",
204
205
  style: { width: `${(K = e == null ? void 0 : e.targetElement) == null ? void 0 : K.clientWidth}px` },
205
206
  targetElement: e.targetElement
206
207
  } : {
208
+ fallbackPosition: ["top-start"],
207
209
  matchWidth: !0,
208
210
  offset: [0, 8],
209
211
  position: "bottom-start",
@@ -268,7 +270,7 @@ function je(e, o, n, t, a, i) {
268
270
  _: 3
269
271
  }, 16, ["class"]);
270
272
  }
271
- const Je = /* @__PURE__ */ F(Ve, [["render", je], ["__scopeId", "data-v-de2a5709"]]);
273
+ const Je = /* @__PURE__ */ F(Ve, [["render", je], ["__scopeId", "data-v-0b470d58"]]);
272
274
  let fe = 0;
273
275
  const Ze = {
274
276
  beforeCreate() {
@@ -924,4 +926,4 @@ export {
924
926
  T as a,
925
927
  ct as u
926
928
  };
927
- //# sourceMappingURL=dropdown.ff4f94a8.js.map
929
+ //# sourceMappingURL=dropdown.22e51667.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown.22e51667.js","sources":["../../../vue2/src/components/dropdown/dropdown.types.ts","../../../vue2/src/components/dropdown/components/dropdown-options-container/composables/useDropdownOptionsListbox.ts","../../../vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-down-small.vue","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-up-small.vue","../../../vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue","../../../vue2/src/components/search-bar/useSearchBarDataFilter.ts","../../../vue2/src/components/dropdown/composables/useDisplayValue.ts","../../../vue2/src/components/dropdown/composables/useKeyboardNavigation.ts","../../../vue2/src/components/dropdown/dropdown.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types';\n\nexport type { BentoListboxSearchOptions as BentoDropdownSearchOptions } from '@/types';\n","import { computed, ref, Ref, watch } from 'vue';\nimport { BentoListboxEvent, BentoListboxSelectedValue } from '@/types';\nimport { BentoDropdownEvent } from '../../../dropdown.types';\nimport { useI18n } from '@/utils/ts/i18n';\nimport messages from '../messages.json';\n\ntype MessageSchema = (typeof messages)['en-US'];\n\n/**\n * A composable that handles all dropdown options option selecting logic & listeners.\n * If single select dropdown then emits straight up to dropdown.\n * If multi select dropdown then stores selections in internal state and only emits when Apply button is pressed.\n *\n * @param selectedValue - the selectedValue property passed into the dropdown options container component.\n * @param multiple - the multiple property passed into the dropdown options container component.\n * @param emit - the emit function for the dropdown options container component.\n */\nexport const useDropdownOptionsListbox = (\n selectedValue: Ref<BentoListboxSelectedValue>,\n multiple: Ref<boolean>,\n emit: (event: BentoListboxEvent | BentoDropdownEvent, selectedValue?: BentoListboxSelectedValue) => void\n) => {\n const internalSelectedValue = ref(selectedValue.value);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n watch(selectedValue, () => {\n internalSelectedValue.value = selectedValue.value;\n });\n\n // Multi-select dropdown cancel and apply button logic\n const isApplyButtonDisabled = computed(\n () => JSON.stringify(internalSelectedValue.value) === JSON.stringify(selectedValue.value)\n );\n\n const onApplyClick = () => {\n emit(BentoListboxEvent.SELECT, internalSelectedValue.value);\n emit(BentoDropdownEvent.CLOSE_DROPDOWN);\n };\n\n const onCancelClick = () => {\n internalSelectedValue.value = selectedValue.value;\n emit(BentoDropdownEvent.CLOSE_DROPDOWN);\n };\n const actions = computed(() => [\n {\n title: t('apply') as string,\n event: onApplyClick,\n disabled: isApplyButtonDisabled.value,\n },\n {\n title: t('cancel') as string,\n event: onCancelClick,\n },\n ]);\n\n // Click and keyboard navigation event listners\n const onOptionSelected = (newSelectedValue: BentoListboxSelectedValue) => {\n internalSelectedValue.value = newSelectedValue;\n if (!multiple.value) {\n emit(BentoDropdownEvent.SELECT, newSelectedValue);\n }\n };\n\n const onTabKey = (newSelectedValue: BentoListboxSelectedValue) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.TAB);\n };\n\n const onEnterKey = (newSelectedValue: BentoListboxSelectedValue) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.ENTER);\n };\n\n const onSpaceKey = (newSelectedValue: BentoListboxSelectedValue) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.SPACE);\n };\n\n const onEscapeKey = () => {\n onCancelClick();\n emit(BentoListboxEvent.ESCAPE);\n };\n\n const emitShowMoreEvent = () => {\n emit(BentoDropdownEvent.SHOW_MORE);\n };\n\n const listeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected,\n [BentoListboxEvent.SHOW_MORE]: emitShowMoreEvent,\n [BentoListboxEvent.TAB]: onTabKey,\n [BentoListboxEvent.SPACE]: onSpaceKey,\n [BentoListboxEvent.ENTER]: onEnterKey,\n };\n\n return {\n // Values\n actions,\n internalSelectedValue,\n\n // Methods\n listeners,\n onEscapeKey,\n };\n};\n","<template>\n <component\n :is=\"popperContainerOrPopoverComponent\"\n class=\"b-dropdown-options-container\"\n :class=\"conditionalClasses\"\n v-bind=\"popperContainerOrPopoverProps\"\n >\n <div @keydown.esc=\"onEscapeKey\">\n <bento-listbox\n :id=\"id\"\n ref=\"dropdownOptionsListboxRef\"\n :aria-label=\"ariaLabel\"\n class=\"b-dropdown-options-container__listbox\"\n :class=\"conditionalListboxClasses\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"items\"\n :selected-value=\"internalSelectedValue\"\n :multiple=\"multiple\"\n :no-results-message=\"noResultsMessage\"\n :searching=\"searching\"\n :loading=\"loading\"\n :lazy-load-type=\"lazyLoadType\"\n :has-more-items=\"hasMoreItems\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox>\n </div>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRefs } from 'vue';\n import { BentoListbox } from '@/internal';\n import {\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n } from '@/types';\n import { PopperContainer } from '@/components/popper-container';\n import { BentoDropdownEvent, BentoDropdownLazyLoadType, BentoDropdownSize } from '../../dropdown.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoButtonActionsLayout } from '@/components/button';\n import { BentoPopover } from '@/components/popover';\n import { useDropdownOptionsListbox } from './composables/useDropdownOptionsListbox';\n import { generateUid } from '@/utils/ts/unique-id';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Dropdown options container.\n * It lists all the available options.\n *\n * @example\n * <bento-dropdown-options-container\n * v-if=\"inputContainerRef\" <!-- Ref to the input to match the width -->\n * :id=\"dropdownOptionsContainerId\"\n * :target-element=\"inputContainerRef\"\n * :aria-label=\"ariaLabel\"\n * :open=\"isDropdownOpen\"\n * :disabled=\"disabled\"\n * :multiple=\"multiple\"\n * :selected=\"value\"\n * :isOptionDisabled=\"option => option.value === 2\"\n * :items=\"[{\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * }]\"\n * @select=\"onOptionSelected\"\n * />\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-dropdown-options-container',\n components: {\n BentoListbox,\n PopperContainer,\n BentoPopover,\n },\n props: {\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Disables dropdown functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.\n */\n id: { type: String, required: true },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoDropdownIsOptionDisabled}\n * @param {BentoDropdownOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: undefined,\n },\n\n /**\n * Dropdown input size\n */\n inputSize: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: BentoDropdownSize.DEFAULT,\n validator: (value: BentoDropdownSize) => Object.values(BentoDropdownSize).includes(value),\n },\n\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoDropdownOptionItem }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * Indicates if new options are loading.\n */\n loading: { type: Boolean, default: false },\n\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType: {\n type: String as PropType<BentoDropdownLazyLoadType | `${BentoDropdownLazyLoadType}`>,\n default: BentoDropdownLazyLoadType.AUTOMATIC,\n validator: (value: BentoDropdownLazyLoadType) =>\n Object.values(BentoDropdownLazyLoadType).includes(value),\n },\n\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the container can be displayed.\n */\n open: { type: Boolean, required: true },\n\n /**\n * The `input` value.\n * Providing an empty string or empty array will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected for single select\n */\n selectedValue: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: null,\n },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: BentoListbox.props.searching,\n\n /**\n * Reference to the DOM element or Vue component for positioning\n * the Dropdown container.\n */\n targetElement: { type: PopperContainer.props.targetElement.type, required: true },\n },\n emits: [\n BentoDropdownEvent.CLOSE_DROPDOWN,\n BentoDropdownEvent.SHOW_MORE,\n BentoListboxEvent.SELECT,\n BentoListboxEvent.ENTER,\n BentoListboxEvent.ESCAPE,\n BentoListboxEvent.SPACE,\n BentoListboxEvent.TAB,\n ],\n setup(props, { emit, slots }) {\n const { selectedValue, multiple } = toRefs(props);\n const dropdownOptionsListboxRef = ref(null);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isDropdownOpen = computed(() => props.open && !props.disabled);\n const noResultsMessage = computed(() => t('noOptionsMatchThisSearch') as string);\n\n const conditionalClasses = computed(() => ({\n 'b-dropdown-options-container--single': !props?.multiple,\n }));\n\n const conditionalListboxClasses = computed(() => ({\n 'b-dropdown-options-container__listbox--small': props.inputSize === BentoDropdownSize.SMALL,\n 'b-dropdown-options-container__listbox--single': !props?.multiple,\n }));\n\n const { actions, internalSelectedValue, listeners, onEscapeKey } = useDropdownOptionsListbox(\n selectedValue,\n multiple,\n emit\n );\n\n // Use different components depending on if the dropdown is a single or multi-select\n const popperContainerOrPopoverComponent = computed(() =>\n props?.multiple ? BentoPopover : PopperContainer\n );\n\n const popperContainerOrPopoverProps = computed(() =>\n props?.multiple\n ? ({\n actionsLayout: BentoButtonActionsLayout.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: { width: `${(props?.targetElement as HTMLElement)?.clientWidth}px` },\n targetElement: props.targetElement,\n } as InstanceType<typeof BentoPopover>['$props'])\n : ({\n fallbackPosition: ['top-start'],\n matchWidth: true,\n offset: [0, 8],\n position: 'bottom-start',\n style: { display: isDropdownOpen.value ? 'block' : 'none' },\n targetElement: props.targetElement,\n } as InstanceType<typeof PopperContainer>['$props'])\n );\n\n return {\n // Values\n isDropdownOpen,\n conditionalClasses,\n conditionalListboxClasses,\n noResultsMessage,\n slots,\n actions,\n internalSelectedValue,\n\n // Component wrapper\n popperContainerOrPopoverComponent,\n popperContainerOrPopoverProps,\n\n // Refs\n dropdownOptionsListboxRef,\n\n // Events\n onEscapeKey,\n listeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-options-container.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M4.4697 5.96967C4.76259 5.67678 5.23747 5.67678 5.53036 5.96967L8.00003 8.43934L10.4697 5.96967C10.7626 5.67678 11.2375 5.67678 11.5304 5.96967C11.8233 6.26256 11.8233 6.73744 11.5304 7.03033L8.53036 10.0303C8.23747 10.3232 7.76259 10.3232 7.4697 10.0303L4.4697 7.03033C4.17681 6.73744 4.17681 6.26256 4.4697 5.96967Z\" clip-rule=\"evenodd\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M11.5303 10.0303C11.2374 10.3232 10.7626 10.3232 10.4697 10.0303L8 7.56066L5.53033 10.0303C5.23744 10.3232 4.76256 10.3232 4.46967 10.0303C4.17678 9.73744 4.17678 9.26256 4.46967 8.96967L7.46967 5.96967C7.61032 5.82902 7.80109 5.75 8 5.75C8.19891 5.75 8.38968 5.82902 8.53033 5.96967L11.5303 8.96967C11.8232 9.26256 11.8232 9.73744 11.5303 10.0303Z\" clip-rule=\"evenodd\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n","<template>\n <div class=\"b-dropdown-small-textbox\" :class=\"conditionalClasses\">\n <dropdown-base-textbox\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-small-textbox__textbox\"\n v-on=\"listeners\"\n >\n <template #icon>\n <div class=\"b-dropdown-small-textbox__chevron\">\n <chevron-up-small-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-small-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types';\n import { Booleanish } from '@/types';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import ChevronDownSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-down-small';\n import ChevronUpSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-up-small';\n\n /**\n * For internal use only, textbox component in its small variant used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-small-textbox',\n components: { ChevronDownSmallIcon, ChevronUpSmallIcon, DropdownBaseTextbox },\n inheritAttrs: false,\n props: {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n },\n emits: [DropdownBaseTextboxEvent.OPEN, DropdownBaseTextboxEvent.CLOSE],\n setup(props, { emit }) {\n const conditionalClasses = computed(() => ({\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const openDropdown = () => {\n emit(DropdownBaseTextboxEvent.OPEN);\n };\n\n const closeDropdown = () => {\n emit(DropdownBaseTextboxEvent.CLOSE);\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n };\n\n return {\n // Values\n conditionalClasses,\n isDropdownOpen,\n\n // Events\n listeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-small-textbox.scss\" />\n","import { computed, ref, Ref, watch } from 'vue';\nimport { BentoSearchBarItem } from './search-bar.types';\n\n/**\n * Filters an array {@see BentoSearchBarData} containing elements of type {@see BentoSearchBarItem}\n * by the {@param searchTerm}.\n *\n * @param {Ref<String>} searchTerm - Text that satisfies the search criteria.\n * @param {Ref<BentoSearchBarData>} data - Array to be filtered by {@param searchTerm}\n * @returns {Ref<BentoSearchBarData>} New instance of the array filtered by the {@param searchTerm} text\n */\nexport function useSearchBarFilter<T extends BentoSearchBarItem>(\n searchTerm: Ref<string>,\n data: Ref<T[]>,\n searchEvent?: (searchValue: string) => void\n) {\n const searchTermRef = ref(searchTerm);\n const dataRef = ref(data);\n\n const findHits = (searchTermLowerCased: string, options: Array<BentoSearchBarItem> = []) =>\n options.flatMap(option => {\n if (option.label.toLocaleLowerCase().includes(searchTermLowerCased)) {\n return [option, ...findHits(searchTermLowerCased, option.items)];\n }\n\n if (option.items) {\n return [...findHits(searchTermLowerCased, option.items)];\n }\n\n return [];\n });\n\n // If search event exists trigger it on the search term changing\n watch(searchTermRef, () => {\n if (searchEvent !== undefined) {\n searchEvent(searchTermRef.value);\n }\n });\n\n const filterInputData = computed(() => {\n if (!searchTermRef.value) {\n return dataRef.value;\n }\n // If search event exists, emit the new search value into the event and do not manipulate data.\n if (searchEvent !== undefined) {\n return dataRef.value;\n }\n\n const searchTermLowerCased = searchTermRef.value.toLocaleLowerCase();\n const filtered = findHits(searchTermLowerCased, dataRef.value);\n return filtered;\n });\n\n return filterInputData;\n}\n","import { computed } from 'vue';\nimport { UseDisplayValue } from './useDisplayValue.types';\n\nconst singleSelect = ({ items, placeholder, selectedValue }) => {\n const selectedItem = items.value.find(({ value }) => value === selectedValue.value);\n return selectedItem?.label || placeholder.value || null;\n};\n\nconst multiSelect = ({ selectedValues, items, placeholder }) => {\n // No selected values\n if (!selectedValues.value || (selectedValues.value as Array<string | number>)?.length === 0) {\n return placeholder.value || null;\n }\n\n return (selectedValues.value as Array<string | number>)\n .map(selectedValue => {\n const { label } = items.value.find(({ value }) => value === selectedValue);\n return label;\n })\n .join(', ');\n};\n\nconst categoryMultiSelect = ({ selectedValues, items, placeholder }) => {\n // No selected values\n if (!selectedValues.value || !(selectedValues.value as Array<string | number>)?.length) {\n return placeholder.value || null;\n }\n\n return items.value\n .reduce((acc, option) => {\n // Category items\n if (option.items) {\n const selectedCategoryOptions = option.items.filter(categoryOption =>\n (selectedValues.value as Array<string | number>).includes(categoryOption.value)\n );\n\n // If the category is fully selected add the category name\n const isCategoryFullySelected = selectedCategoryOptions.length === option.items.length;\n if (isCategoryFullySelected) {\n acc.push(option.label);\n } else {\n // If category is partially selected add each selected option and category\n selectedCategoryOptions.forEach(({ label }) => acc.push(label));\n }\n }\n\n // Non-category option\n if ((selectedValues.value as Array<string | number>).includes(option.value)) {\n acc.push(option.label);\n }\n\n return acc;\n }, [])\n .join(', ');\n};\n\nexport const useDisplayValue: UseDisplayValue = ({ items, placeholder, value, multiple }) => {\n const isCategoryMultilevel = computed(() => items.value.find(option => option.items?.length));\n\n const displayValue = computed(() => {\n // Single select\n if (!multiple.value) {\n return singleSelect({ items, placeholder, selectedValue: value });\n }\n\n // Category multi select\n if (isCategoryMultilevel.value) {\n return categoryMultiSelect({ selectedValues: value, placeholder, items });\n }\n\n // Multi select\n return multiSelect({ selectedValues: value, items, placeholder });\n });\n\n return displayValue;\n};\n","import { BentoKeyboardNavigationKeyDownEvent } from '@/types';\nimport { BentoListboxEvent } from '@/types/listbox';\nimport { computed, nextTick, Ref } from 'vue';\n\nconst focusOnTextbox = (elementToFocusOn: Ref) => {\n elementToFocusOn.value.$children?.[0].$refs.textbox.focus();\n};\n\nexport const useTextboxKeyboardNavigation = (\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering,\n items,\n isMultiple,\n },\n toggleDropdown,\n openDropdown,\n closeDropdown\n) => {\n const onArrowDown = ({ detail: event }) => {\n event.preventDefault();\n if (!isDropdownOpen.value) {\n openDropdown();\n nextTick(() => {\n if (isMultiple) {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n selectedValueIndex.value\n ].$el.focus();\n }\n });\n }\n };\n const onArrowUp = ({ detail: event }) => {\n event.preventDefault();\n if (!isDropdownOpen.value) {\n openDropdown();\n nextTick(() => {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n });\n }\n };\n\n const onEndKey = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n nextTick(() => {\n if (isMultiple) {\n const firstLayer =\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children;\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n firstLayer.length - 1\n ].$children[items.length - 1].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n items.length - 1\n ].$el.focus();\n }\n });\n }\n };\n\n const onEscapeKey = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n focusOnTextbox(inputContainerRef);\n }\n };\n\n const onHomeKey = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n nextTick(() => {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n });\n };\n\n const onSpaceKey = ({ detail: event }) => {\n event.preventDefault();\n toggleDropdown();\n if (isDropdownOpen.value) {\n nextTick(() => {\n if (isMultiple) {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n selectedValueIndex.value\n ].$el.focus();\n }\n });\n }\n };\n\n const onEnterKey = () => {\n toggleDropdown();\n if (isDropdownOpen.value) {\n nextTick(() => {\n if (isMultiple) {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[0].$el.focus();\n } else {\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children?.[\n selectedValueIndex.value\n ].$el.focus();\n }\n });\n }\n };\n\n const textboxKeyboardNavigationListeners = computed(() => ({\n ...(!isDynamicFltering.value ? { [BentoKeyboardNavigationKeyDownEvent.SPACE]: onSpaceKey } : {}),\n [BentoKeyboardNavigationKeyDownEvent.ENTER]: onEnterKey,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: onArrowDown,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: onArrowUp,\n [BentoKeyboardNavigationKeyDownEvent.END]: onEndKey,\n [BentoKeyboardNavigationKeyDownEvent.ESCAPE]: onEscapeKey,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: onHomeKey,\n }));\n\n return textboxKeyboardNavigationListeners;\n};\n\nexport const useListboxKeyboardNavigation = ({ inputContainerRef, isDropdownOpen }, closeDropdown) => {\n const closeDropdownAndFocusOnTextbox = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n }\n nextTick(() => {\n focusOnTextbox(inputContainerRef);\n });\n };\n\n const listboxKeyboardNavigationListeners = {\n [BentoListboxEvent.ENTER]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.ESCAPE]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.TAB]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.SPACE]: closeDropdownAndFocusOnTextbox,\n };\n\n return listboxKeyboardNavigationListeners;\n};\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div v-bento-click-outside-directive=\"closeOpenedDropdown\" class=\"b-dropdown\">\n <div v-if=\"label\" :id=\"labelId\" class=\"b-dropdown__label\">\n <bento-typography el=\"span\" stronger>{{ label }}</bento-typography>\n <bento-typography v-if=\"optional\" class=\"b-dropdown__label-requirement\" el=\"span\">\n ({{ $t('optional') }})\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-dropdown__label-requirement\" el=\"span\">\n ({{ $t('required') }})\n </bento-typography>\n </div>\n <div\n ref=\"inputContainerRefWrapper\"\n v-bento-keyboard-navigation-directive\n v-on=\"textboxKeyboardNavigationListeners\"\n >\n <component\n :is=\"size\"\n ref=\"inputContainerRef\"\n :value=\"searchTerm\"\n :additional-items-selected=\"additionalItemsSelected\"\n :ariaControls=\"dropdownOptionsContainerId\"\n :ariaExpanded=\"isDropdownOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-label=\"computedAriaLabel\"\n :aria-readonly=\"isReadOnly\"\n :readonly=\"isReadOnly\"\n :disabled=\"disabled\"\n :display-value=\"displayValue\"\n :dynamic-filtering=\"dynamicFiltering\"\n :is-invalid=\"!!errorMessage || error\"\n :multiple=\"multiple\"\n :open=\"isDropdownOpen\"\n :selected-value-item=\"idDefaultSize ? selectedValueItem : undefined\"\n :show-slot-content-in-multiple=\"showSlotContentInMultiple\"\n @input=\"searchTerm = $event\"\n @open=\"toggleDropdown\"\n @close=\"toggleDropdown\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </component>\n </div>\n <bento-dropdown-options-container\n v-if=\"inputContainerRef\"\n :id=\"dropdownOptionsContainerId\"\n ref=\"optionsContainerRef\"\n :aria-label=\"computedAriaLabel\"\n :debounce-time=\"search?.debounceTime\"\n :disabled=\"disabled\"\n :input-size=\"size\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"filteredItems\"\n :multiple=\"multiple\"\n :open=\"isDropdownOpen\"\n :selected-value=\"value\"\n :searching=\"isSearching\"\n :target-element=\"inputContainerRefWrapper\"\n :loading=\"loading\"\n :has-more-items=\"hasMoreItems\"\n :lazy-load-type=\"lazyLoadType\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-dropdown-options-container>\n <error-message\n v-if=\"!!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-dropdown__error-message\"\n />\n <bento-typography\n v-if=\"description\"\n :id=\"descriptionId\"\n class=\"b-dropdown__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n {{ description }}\n </bento-typography>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef, toRefs } from 'vue';\n import {\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxMultiSelectValue,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n } from '@/types';\n import { BentoDropdownOptionsContainer } from './components/dropdown-options-container';\n import { BentoClickOutsideDirective } from '@/directives/click-outside';\n import { BentoKeyboardNavigationDirective } from '@/directives';\n import { DropdownInputDefault, DropdownInputSmall } from './components';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n import { BentoTypography } from '@/components/typography';\n import { BentoListbox, ErrorMessage } from '@/internal';\n import { generateUid } from '@/utils/ts/unique-id';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useI18n } from '@/utils/ts/i18n';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import {\n BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n BentoDropdownSearchOptions,\n BentoDropdownSize,\n } from './dropdown.types';\n import { useDisplayValue } from './composables/useDisplayValue';\n import messages from './messages.json';\n import { useListboxKeyboardNavigation, useTextboxKeyboardNavigation } from './composables/useKeyboardNavigation';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * A Dropdown shows a selected option's.\n * Use a dropdown when you want users to select options\n * from a list of pre-defined options.\n *\n * @example\n * import { BentoDropdown } from '@adyen/bento-vue2';\n * import type { BentoDropdownOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(2) // Default value\n * const options: BentoDropdownOptions = [\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'b-dropdown',\n components: {\n BentoDropdownOptionsContainer,\n BentoTypography,\n DropdownInputDefault,\n DropdownInputSmall,\n ErrorMessage,\n },\n directives: { BentoClickOutsideDirective, BentoKeyboardNavigationDirective },\n props: {\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Text that appears in the form control when it has no value set\n */\n placeholder: {\n type: String,\n default: null,\n },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Highlights the dropdown in an erroneous state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown in an erroneous state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Text that is displayed as a label above the element.\n */\n label: { type: String, default: null },\n\n /**\n * Descriptive supporting text visbile underneath the dropdown.\n */\n description: { type: String, default: null },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Function that dertermines which options are disabled from interaction.\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: undefined,\n },\n\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoListboxOptionItem }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n default: () => [],\n },\n\n /**\n * Indicates if new options are loading.\n */\n loading: { type: Boolean, default: false },\n\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType: {\n type: String as PropType<BentoDropdownLazyLoadType | `${BentoDropdownLazyLoadType}`>,\n default: BentoListbox.props.lazyLoadType.default,\n validator: (value: BentoDropdownLazyLoadType) =>\n Object.values(BentoDropdownLazyLoadType).includes(value),\n },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown input size\n * * @see BentoDropdownSize\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: BentoDropdownSize.DEFAULT,\n validator: (value: BentoDropdownSize) => Object.values(BentoDropdownSize).includes(value),\n },\n\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n */\n value: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: null,\n },\n\n /**\n * Dropdown search options and events.\n * @see BentoDropdownSearchOptions\n */\n search: {\n type: Object as PropType<BentoDropdownSearchOptions>,\n default: undefined,\n },\n },\n emits: ['input', BentoDropdownEvent.SHOW_MORE],\n setup(props, { attrs, emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const inputContainerRef = ref(null);\n const inputContainerRefWrapper = ref(null);\n const optionsContainerRef = ref(null);\n const isDropdownOpen = ref(false);\n const dropdownOptionsContainerId = generateUid('bento-dropdown-options-container');\n const labelId = generateUid('dropdown-label');\n const descriptionId = generateUid('dropdown-description');\n const errorId = generateUid('dropdown-error');\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: t('ariaLabelFallback'),\n });\n\n // Description styles\n const descriptionConditionalClasses = computed(() => ({\n 'b-dropdown__description--error': !!props.errorMessage,\n }));\n\n // Filtering\n const searchTerm = ref('');\n const items = toRef(props, 'items');\n const filteredItems = useSearchBarFilter(searchTerm, items, props?.search?.searchEvent);\n const isSearching = computed(() => props.dynamicFiltering && !!searchTerm.value);\n\n const displayValue = useDisplayValue({\n items,\n multiple: toRef(props, 'multiple'),\n placeholder: toRef(props, 'placeholder'),\n value: toRef(props, 'value'),\n });\n\n const idDefaultSize = computed(() => props.size === BentoDropdownSize.DEFAULT);\n\n const selectedValueItem = computed(() =>\n props?.multiple\n ? props.items.filter(\n ({ value }) => props?.value && (props?.value as BentoListboxMultiSelectValue).includes(value)\n )\n : props.items.find(({ value }) => value === props?.value)\n );\n\n const selectedValueIndex = computed(() => {\n const index = props.items.findIndex(({ value }) => props.value === value);\n return index > 0 ? index : 0;\n });\n\n const additionalItemsSelected = computed(() => {\n if (props.multiple) {\n return (props?.value as BentoListboxMultiSelectValue)?.length;\n }\n\n return null;\n });\n\n // ARIA\n const ariaDescribedBy = computed(\n () => `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''}`.trim() || null\n );\n\n const openDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = true;\n };\n\n const closeDropdown = () => {\n isDropdownOpen.value = false;\n };\n\n const toggleDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = !isDropdownOpen.value;\n\n // Clear search\n if (isSearching.value) {\n searchTerm.value = '';\n }\n };\n\n const closeOpenedDropdown = () => {\n if (isSearching.value) {\n searchTerm.value = '';\n }\n\n if (isDropdownOpen.value) {\n isDropdownOpen.value = false;\n }\n };\n\n const onOptionSelected = (selectedValue: BentoListboxSelectedValue) => {\n // Clear and close the dropdown on single selection\n if (!props.multiple) {\n searchTerm.value = '';\n isDropdownOpen.value = false;\n }\n\n emit('input', selectedValue);\n };\n\n const emitShowMoreEvent = () => {\n emit(BentoDropdownEvent.SHOW_MORE);\n };\n\n const textboxKeyboardNavigationListeners = useTextboxKeyboardNavigation(\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering: toRef(props, 'dynamicFiltering'),\n items: props.items,\n isMultiple: props.multiple,\n },\n toggleDropdown,\n openDropdown,\n closeDropdown\n );\n\n const listboxKeyboardNavigationListeners = useListboxKeyboardNavigation(\n {\n inputContainerRef,\n isDropdownOpen,\n },\n closeDropdown\n );\n\n const listboxListeners = {\n [BentoListboxEvent.CLOSE_DROPDOWN]: closeDropdown,\n [BentoListboxEvent.SELECT]: onOptionSelected,\n [BentoListboxEvent.SHOW_MORE]: emitShowMoreEvent,\n ...listboxKeyboardNavigationListeners,\n };\n\n if (props.error) {\n deprecate(\n 'BentoDropdown \"error\" property',\n `Use the BentoDropdown \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n return {\n // Values\n computedAriaLabel,\n additionalItemsSelected,\n idDefaultSize,\n isDropdownOpen,\n displayValue,\n dropdownOptionsContainerId,\n filteredItems,\n isSearching,\n isReadOnly,\n searchTerm,\n labelId,\n descriptionId,\n errorId,\n ariaDescribedBy,\n selectedValueItem,\n // Conciliation of Vue2 $scopedSlots and Vue3 $scopes.\n // The setup method and the \"useSlots\" composible define\n // { slots } as a proxy of $scopedSlots and $scopes in their\n // respective Vue version. Source: https://github.com/vuejs/composition-api/issues/84#issuecomment-524885445\n slots,\n descriptionConditionalClasses,\n\n // Refs\n inputContainerRef,\n inputContainerRefWrapper,\n optionsContainerRef,\n\n // Events\n closeOpenedDropdown,\n toggleDropdown,\n onOptionSelected,\n emitShowMoreEvent,\n textboxKeyboardNavigationListeners,\n listboxListeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","useDropdownOptionsListbox","selectedValue","multiple","emit","internalSelectedValue","ref","t","useI18n","messages$1","watch","isApplyButtonDisabled","computed","onApplyClick","BentoListboxEvent","onCancelClick","actions","onOptionSelected","newSelectedValue","onTabKey","onEnterKey","onSpaceKey","onEscapeKey","emitShowMoreEvent","listeners","_sfc_main$4","defineComponent","BentoListbox","PopperContainer","BentoPopover","value","BentoListboxLazyLoadType","props","slots","toRefs","dropdownOptionsListboxRef","isDropdownOpen","noResultsMessage","conditionalClasses","conditionalListboxClasses","popperContainerOrPopoverComponent","popperContainerOrPopoverProps","BentoButtonActionsLayout","generateUid","_a","_component_bento_listbox","resolveComponent","_ctx","withCtx","createElementVNode","_cache","withKeys","args","toHandlers","createSlots","innerSlot","scope","uuid$1","openBlock","createElementBlock","mergeProps","_hoisted_1$3","toDisplayString","uuid","_hoisted_1$2","_sfc_main$1","ChevronDownSmallIcon","ChevronUpSmallIcon","DropdownBaseTextbox","DropdownBaseTextboxEvent","DropdownBaseTextboxState","openDropdown","closeDropdown","normalizeClass","_hoisted_1$1","withDirectives","createVNode","_component_chevron_up_small_icon","useSearchBarFilter","searchTerm","data","searchEvent","searchTermRef","dataRef","findHits","searchTermLowerCased","options","option","singleSelect","items","placeholder","selectedItem","multiSelect","selectedValues","label","categoryMultiSelect","acc","selectedCategoryOptions","categoryOption","useDisplayValue","isCategoryMultilevel","focusOnTextbox","elementToFocusOn","useTextboxKeyboardNavigation","inputContainerRef","optionsContainerRef","selectedValueIndex","isDynamicFltering","isMultiple","toggleDropdown","onArrowDown","event","nextTick","_b","onArrowUp","onEndKey","firstLayer","onHomeKey","BentoKeyboardNavigationKeyDownEvent","useListboxKeyboardNavigation","closeDropdownAndFocusOnTextbox","_sfc_main","messages","BentoDropdownOptionsContainer","BentoTypography","DropdownInputDefault","DropdownInputSmall","ErrorMessage","BentoClickOutsideDirective","BentoKeyboardNavigationDirective","attrs","inputContainerRefWrapper","dropdownOptionsContainerId","labelId","descriptionId","errorId","isReadOnly","useFormLayoutFieldLoading","toRef","ariaLabelAttribute","ariaLabel","computedAriaLabel","useAriaLabel","descriptionConditionalClasses","filteredItems","isSearching","displayValue","idDefaultSize","selectedValueItem","index","additionalItemsSelected","ariaDescribedBy","closeOpenedDropdown","textboxKeyboardNavigationListeners","listboxKeyboardNavigationListeners","listboxListeners","deprecate","createCommentVNode","createBlock","_component_bento_typography","resolveDynamicComponent","$event","_component_error_message"],"mappings":";;;;;;;;;;;;;;;;AAGY,IAAAA,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AqG,EAAA,IAAA,EAAA;AAAA,IAIV9G,EAAA,gBAAAW,EAAA,GAAAoG,EAAAI,GAAA;AAAA,MAHc,KAAA;AAAA,MACX,IAAAnH,EAAA;AAAA,MACK,iBAAAA,EAAA;AAAA;IAGA,GAAA,MAAA,GAAA,CAAA,MAAA,eAAA,CAAA,KAAA8G,EAAA,IAAA,EAAA;AAAA,IAOS9G,EAAA,eAAAW,EAAA,GAAAoG,EAAAC,GAAA;AAAA,MANG,KAAA;AAAA,MACb,IAAAhH,EAAA;AAAA,MAEF,OAAA0B,GAAA,CAAA,2BAAA1B,EAAA,6BAAA,CAAA;AAAA;;;;;;;;;;;;","x_google_ignoreList":[3,4]}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as a, openBlock as n, createBlock as _, unref as e, withCtx as i, createElementVNode as c, createVNode as p, createTextVNode as m, toDisplayString as l } from "vue";
2
- import { B as d } from "./index.77c651df.js";
2
+ import { B as d } from "./index.32ed68b7.js";
3
3
  import { C as g } from "./cross-circle-fill.0feb37b3.js";
4
4
  import { u } from "./i18n.6c402773.js";
5
5
  import { _ as f } from "./_plugin-vue_export-helper.dad06003.js";
@@ -46,4 +46,4 @@ const I = /* @__PURE__ */ f(b, [["__scopeId", "data-v-024e50b0"]]);
46
46
  export {
47
47
  I as E
48
48
  };
49
- //# sourceMappingURL=error-message.8c67a507.js.map
49
+ //# sourceMappingURL=error-message.37b6c7aa.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-message.8c67a507.js","sources":["../../../vue2/src/components/internal/error-message/error-message.vue"],"sourcesContent":["<template>\n <bento-typography :id=\"$attrs.id\" class=\"b-error-message\" el=\"span\" aria-live=\"polite\">\n <div class=\"b-error-message__icon\">\n <cross-circle-icon :svg-title=\"t('error')\" />\n </div>\n {{ errorMessage }}\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import CrossCircleIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * An error message component should be used whenever it is necessary to add an error message to a component.\n * If adding to a form component, the proper accessibility measures should be taken when necessary\n * (ex. associating an element with this one using aria-describedby).\n\n * @example\n * import { ErrorMessage } from '@/components/internal/error-message';\n *\n * export default {\n * components: { ErrorMessage },\n * template: `\n * <error-message :error-message=\"errorMessage\" />\n * `\n * }\n */\n\n defineProps({\n /**\n * The rendered error message\n */\n errorMessage: {\n type: String,\n required: true,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n name: 'error-message',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./error-message.scss\" />\n"],"names":["__default__","messages","t","useI18n"],"mappings":";;;;;;;;;;2CA+CIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;AAPA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"error-message.37b6c7aa.js","sources":["../../../vue2/src/components/internal/error-message/error-message.vue"],"sourcesContent":["<template>\n <bento-typography :id=\"$attrs.id\" class=\"b-error-message\" el=\"span\" aria-live=\"polite\">\n <div class=\"b-error-message__icon\">\n <cross-circle-icon :svg-title=\"t('error')\" />\n </div>\n {{ errorMessage }}\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import CrossCircleIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * An error message component should be used whenever it is necessary to add an error message to a component.\n * If adding to a form component, the proper accessibility measures should be taken when necessary\n * (ex. associating an element with this one using aria-describedby).\n\n * @example\n * import { ErrorMessage } from '@/components/internal/error-message';\n *\n * export default {\n * components: { ErrorMessage },\n * template: `\n * <error-message :error-message=\"errorMessage\" />\n * `\n * }\n */\n\n defineProps({\n /**\n * The rendered error message\n */\n errorMessage: {\n type: String,\n required: true,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n name: 'error-message',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./error-message.scss\" />\n"],"names":["__default__","messages","t","useI18n"],"mappings":";;;;;;;;;;2CA+CIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;AAPA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as d, toRefs as _, computed as f, onMounted as p, openBlock as s, createElementBlock as g, createElementVNode as m, createBlock as c, unref as o, withCtx as h, createTextVNode as v, toDisplayString as b, createCommentVNode as i, createVNode as y } from "vue";
2
- import { B as A } from "./index.77c651df.js";
3
- import { B } from "./button.7d09c245.js";
2
+ import { B as A } from "./index.32ed68b7.js";
3
+ import { B } from "./button.7072457f.js";
4
4
  import { BentoButtonActions as l } from "../button.js";
5
5
  import { _ as w } from "./_plugin-vue_export-helper.dad06003.js";
6
6
  import "../assets/footer-actions.css";
@@ -108,4 +108,4 @@ const F = /* @__PURE__ */ w(E, [["__scopeId", "data-v-c305c175"]]);
108
108
  export {
109
109
  F
110
110
  };
111
- //# sourceMappingURL=footer-actions.a587e374.js.map
111
+ //# sourceMappingURL=footer-actions.5275203a.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"footer-actions.a587e374.js","sources":["../../../vue2/src/components/internal/footer-actions/footer-actions.vue"],"sourcesContent":["<template>\n <div class=\"b-footer-actions\">\n <div class=\"b-footer-actions__wrapper\">\n <bento-typography v-if=\"actionsLabel\" class=\"b-footer-actions__label\" el=\"span\" variant=\"body\" stronger>\n {{ actionsLabel }}\n </bento-typography>\n\n <bento-button-actions\n v-if=\"alignedActions.leftAligned\"\n class=\"b-footer-actions__left-group\"\n :actions=\"alignedActions.leftAligned\"\n layout=\"buttons-start\"\n ></bento-button-actions>\n\n <bento-button-actions\n class=\"b-footer-actions__right-group\"\n :actions=\"alignedActions.rightAligned\"\n layout=\"buttons-end\"\n ></bento-button-actions>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import { computed, onMounted, PropType, toRefs } from 'vue';\n import { BentoButtonActions, BentoButtonActionsList, BentoButtonVariant } from '@/components/button';\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n required: true,\n },\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n });\n\n const { actions, destructiveActions } = toRefs(props);\n\n const alignedActions = computed(() => {\n const rightAlignedButtons =\n actions.value.length < 3 ? actions.value : actions.value.slice(0, actions.value.length - 1);\n\n // Add red color to the 1-st Action button\n rightAlignedButtons[0].critical = destructiveActions.value || rightAlignedButtons[0].critical;\n\n return {\n leftAligned:\n actions.value.length === 3\n ? [\n {\n ...actions.value[actions.value.length - 1],\n variant: BentoButtonVariant.SECONDARY,\n },\n ]\n : null,\n rightAligned: [...rightAlignedButtons],\n };\n });\n\n onMounted(() => {\n if (props.actions && props.actions.length > 3) {\n throw new Error('Not more than 3 action buttons may be provided to Bento Modal default variant');\n }\n\n if (props.actionsLabel && props.actions && props.actions.length > 2) {\n throw new Error(\n 'Not more than 2 action buttons may be provided with actions label to Bento Modal default variant'\n );\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to handle the logic of displaying actions in default Modal and Sidepanel\n\n * @example\n * import { FooterActions } from '@/components/internal/footer-actions';\n *\n * export default {\n * components: { FooterActions },\n * template: `\n * <footer-actions :actions=\"BentoButtonActionsList\" actions-label=\"Label\" :destructive-actions=\"true\" />\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./footer-actions.scss\" />\n"],"names":["__default__","actions","destructiveActions","toRefs","props","alignedActions","computed","rightAlignedButtons","BentoButtonVariant","onMounted"],"mappings":";;;;;;qFA+HIA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAlDA,EAAA,SAAAC,GAAA,oBAAAC,EAAA,IAAAC,EAAAC,CAAA,GAEAC,IAAAC,EAAA,MAAA;AACI,YAAAC,IAAAN,EAAA,MAAA,SAAA,IAAAA,EAAA,QAAAA,EAAA,MAAA,MAAA,GAAAA,EAAA,MAAA,SAAA,CAAA;AAIA,aAAAM,EAAA,CAAA,EAAA,WAAAL,EAAA,SAAAK,EAAA,CAAA,EAAA,UAEA;AAAA,QAAO,aAAAN,EAAA,MAAA,WAAA,IAAA;AAAA,UAGO;AAAA,YACI,GAAAA,EAAA,MAAAA,EAAA,MAAA,SAAA,CAAA;AAAA,YAC6C,SAAAO,EAAA;AAAA,UACb;AAAA,QAChC,IAAA;AAAA,QAEJ,cAAA,CAAA,GAAAD,CAAA;AAAA,MAC2B;AAAA,IACzC,CAAA;AAGJ,WAAAE,EAAA,MAAA;AACI,UAAAL,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA,MAAA,+EAAA;AAGJ,UAAAA,EAAA,gBAAAA,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA;AAAA,UAAU;AAAA,QACN;AAAA,IAER,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"footer-actions.5275203a.js","sources":["../../../vue2/src/components/internal/footer-actions/footer-actions.vue"],"sourcesContent":["<template>\n <div class=\"b-footer-actions\">\n <div class=\"b-footer-actions__wrapper\">\n <bento-typography v-if=\"actionsLabel\" class=\"b-footer-actions__label\" el=\"span\" variant=\"body\" stronger>\n {{ actionsLabel }}\n </bento-typography>\n\n <bento-button-actions\n v-if=\"alignedActions.leftAligned\"\n class=\"b-footer-actions__left-group\"\n :actions=\"alignedActions.leftAligned\"\n layout=\"buttons-start\"\n ></bento-button-actions>\n\n <bento-button-actions\n class=\"b-footer-actions__right-group\"\n :actions=\"alignedActions.rightAligned\"\n layout=\"buttons-end\"\n ></bento-button-actions>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import { computed, onMounted, PropType, toRefs } from 'vue';\n import { BentoButtonActions, BentoButtonActionsList, BentoButtonVariant } from '@/components/button';\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n required: true,\n },\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n });\n\n const { actions, destructiveActions } = toRefs(props);\n\n const alignedActions = computed(() => {\n const rightAlignedButtons =\n actions.value.length < 3 ? actions.value : actions.value.slice(0, actions.value.length - 1);\n\n // Add red color to the 1-st Action button\n rightAlignedButtons[0].critical = destructiveActions.value || rightAlignedButtons[0].critical;\n\n return {\n leftAligned:\n actions.value.length === 3\n ? [\n {\n ...actions.value[actions.value.length - 1],\n variant: BentoButtonVariant.SECONDARY,\n },\n ]\n : null,\n rightAligned: [...rightAlignedButtons],\n };\n });\n\n onMounted(() => {\n if (props.actions && props.actions.length > 3) {\n throw new Error('Not more than 3 action buttons may be provided to Bento Modal default variant');\n }\n\n if (props.actionsLabel && props.actions && props.actions.length > 2) {\n throw new Error(\n 'Not more than 2 action buttons may be provided with actions label to Bento Modal default variant'\n );\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to handle the logic of displaying actions in default Modal and Sidepanel\n\n * @example\n * import { FooterActions } from '@/components/internal/footer-actions';\n *\n * export default {\n * components: { FooterActions },\n * template: `\n * <footer-actions :actions=\"BentoButtonActionsList\" actions-label=\"Label\" :destructive-actions=\"true\" />\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./footer-actions.scss\" />\n"],"names":["__default__","actions","destructiveActions","toRefs","props","alignedActions","computed","rightAlignedButtons","BentoButtonVariant","onMounted"],"mappings":";;;;;;qFA+HIA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAlDA,EAAA,SAAAC,GAAA,oBAAAC,EAAA,IAAAC,EAAAC,CAAA,GAEAC,IAAAC,EAAA,MAAA;AACI,YAAAC,IAAAN,EAAA,MAAA,SAAA,IAAAA,EAAA,QAAAA,EAAA,MAAA,MAAA,GAAAA,EAAA,MAAA,SAAA,CAAA;AAIA,aAAAM,EAAA,CAAA,EAAA,WAAAL,EAAA,SAAAK,EAAA,CAAA,EAAA,UAEA;AAAA,QAAO,aAAAN,EAAA,MAAA,WAAA,IAAA;AAAA,UAGO;AAAA,YACI,GAAAA,EAAA,MAAAA,EAAA,MAAA,SAAA,CAAA;AAAA,YAC6C,SAAAO,EAAA;AAAA,UACb;AAAA,QAChC,IAAA;AAAA,QAEJ,cAAA,CAAA,GAAAD,CAAA;AAAA,MAC2B;AAAA,IACzC,CAAA;AAGJ,WAAAE,EAAA,MAAA;AACI,UAAAL,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA,MAAA,+EAAA;AAGJ,UAAAA,EAAA,gBAAAA,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA;AAAA,UAAU;AAAA,QACN;AAAA,IAER,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as g, computed as p, openBlock as t, createElementBlock as l, normalizeClass as e, renderSlot as a, createCommentVNode as u } from "vue";
2
- import { u as _ } from "./use-has-slot.9fac7123.js";
2
+ import { u as _ } from "./use-has-slot.3daaffc6.js";
3
3
  import { _ as S } from "./_plugin-vue_export-helper.dad06003.js";
4
4
  import "../assets/grid-layout.css";
5
5
  var i = /* @__PURE__ */ ((o) => (o.INLINE = "inline-size", o.SIZE = "size", o.NORMAL = "normal", o))(i || {});
@@ -102,4 +102,4 @@ export {
102
102
  z as G,
103
103
  i as a
104
104
  };
105
- //# sourceMappingURL=grid-layout.984317d7.js.map
105
+ //# sourceMappingURL=grid-layout.c98e6bc7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"grid-layout.984317d7.js","sources":["../../../vue2/src/components/internal/grid-layout/grid-layout.types.ts","../../../vue2/src/components/internal/grid-layout/grid-layout.vue"],"sourcesContent":["export enum GridLayoutContainerType {\n INLINE = 'inline-size',\n SIZE = 'size',\n NORMAL = 'normal',\n}\n\nexport interface GridLayoutColumnWidth {\n small: number | string;\n medium: number | string;\n large: number | string;\n}\n\nexport type GridLayoutColumnWidths = Array<'auto' | GridLayoutColumnWidth>;\n","<template>\n <div class=\"b-grid-layout\" :class=\"computedClasses\" data-testid=\"grid-layout\">\n <div\n v-if=\"hasSlot('col-1')\"\n class=\"b-grid-layout__column\"\n :class=\"computeColumnSize(0)\"\n data-testid=\"grid-layout-col-1\"\n >\n <slot name=\"col-1\"></slot>\n </div>\n <div\n v-if=\"hasSlot('col-2')\"\n class=\"b-grid-layout__column\"\n :class=\"computeColumnSize(1)\"\n data-testid=\"grid-layout-col-2\"\n >\n <slot name=\"col-2\"></slot>\n </div>\n <div\n v-if=\"hasSlot('col-3')\"\n class=\"b-grid-layout__column\"\n :class=\"computeColumnSize(2)\"\n data-testid=\"grid-layout-col-3\"\n >\n <slot name=\"col-3\"></slot>\n </div>\n <div\n v-if=\"hasSlot('col-4')\"\n class=\"b-grid-layout__column\"\n :class=\"computeColumnSize(3)\"\n data-testid=\"grid-layout-col-4\"\n >\n <slot name=\"col-4\"></slot>\n </div>\n <div\n v-if=\"hasSlot('col-5')\"\n class=\"b-grid-layout__column\"\n :class=\"computeColumnSize(4)\"\n data-testid=\"grid-layout-col-5\"\n >\n <slot name=\"col-5\"></slot>\n </div>\n <div\n v-if=\"hasSlot('col-6')\"\n class=\"b-grid-layout__column\"\n :class=\"computeColumnSize(5)\"\n data-testid=\"grid-layout-col-6\"\n >\n <slot name=\"col-6\"></slot>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { useHasSlot } from '@/composables';\n import { GridLayoutColumnWidth, GridLayoutColumnWidths, GridLayoutContainerType } from './grid-layout.types';\n\n /**\n * Component used to render the grid layout in the bento-summary-grid. For internal use only\n */\n export default defineComponent({\n name: 'grid-layout',\n props: {\n /**\n * Sets the responsive columns widths for the grid.\n */\n columnWidth: {\n type: Array as PropType<GridLayoutColumnWidths>,\n default: null,\n validator: (array: GridLayoutColumnWidths) => array && array.length <= 6,\n },\n\n /**\n * Set the type of CSS container the grid layout has\n * @values inline-size, size, normal\n */\n containerType: {\n type: String as PropType<GridLayoutContainerType>,\n default: GridLayoutContainerType.INLINE,\n },\n },\n setup(props, { slots }) {\n // TODO: add a computedItems computed here that only returns the slots that are presents so as to be able to render the divs in the template via a v-for\n const computeColumnSize = index => {\n if (props.columnWidth?.[index] && props.columnWidth?.[index] !== 'auto') {\n const columnWidth = props.columnWidth[index] as GridLayoutColumnWidth;\n return [\n `b-grid-layout__column--${columnWidth.small}`,\n `b-grid-layout-m__column--${columnWidth.medium}`,\n `b-grid-layout-l__column--${columnWidth.large}`,\n ];\n }\n return null;\n };\n\n const computedClasses = computed(() => ({\n 'b-grid-layout--container-type-normal': props.containerType === GridLayoutContainerType.NORMAL,\n 'b-grid-layout--container-type-size': props.containerType === GridLayoutContainerType.SIZE,\n }));\n\n return {\n // Values\n computeColumnSize,\n computedClasses,\n\n // Methods\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./grid-layout.scss\" />\n"],"names":["GridLayoutContainerType","GridLayoutContainerType2","_sfc_main","defineComponent","array","props","slots","computeColumnSize","index","_a","_b","columnWidth","computedClasses","computed","useHasSlot","openBlock","createElementBlock","normalizeClass","_ctx"],"mappings":";;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,SAAA,eACAA,EAAA,OAAA,QACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA,CAAA,CAAA;AC6DR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,OAAA;AAAA;AAAA;AAAA;AAAA,IACC,aAAA;AAAA,MAIU,MAAA;AAAA,MACH,SAAA;AAAA,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A,OAAA,KAAAH,EAAA,GAAAC,EAAA,OAAA;AAAA,MAEU,KAAA;AAAA,MAEN,OAAAC,EAAA,CAAA,yBAAAC,EAAA,kBAAA,CAAA,CAAA,CAAA;AAAA;IAE0B,GAAA;AAAA;;IAE9BA,EAAA,QAAA,OAAA,KAAAH,EAAA,GAAAC,EAAA,OAAA;AAAA,MAEU,KAAA;AAAA,MAEN,OAAAC,EAAA,CAAA,yBAAAC,EAAA,kBAAA,CAAA,CAAA,CAAA;AAAA;IAE0B,GAAA;AAAA;;IAE9BA,EAAA,QAAA,OAAA,KAAAH,EAAA,GAAAC,EAAA,OAAA;AAAA,MAEU,KAAA;AAAA,MAEN,OAAAC,EAAA,CAAA,yBAAAC,EAAA,kBAAA,CAAA,CAAA,CAAA;AAAA;IAE0B,GAAA;AAAA;;IAE9BA,EAAA,QAAA,OAAA,KAAAH,EAAA,GAAAC,EAAA,OAAA;AAAA,MAEU,KAAA;AAAA,MAEN,OAAAC,EAAA,CAAA,yBAAAC,EAAA,kBAAA,CAAA,CAAA,CAAA;AAAA;IAE0B,GAAA;AAAA;;;;;"}
1
+ {"version":3,"file":"grid-layout.c98e6bc7.js","sources":["../../../vue2/src/components/internal/grid-layout/grid-layout.types.ts","../../../vue2/src/components/internal/grid-layout/grid-layout.vue"],"sourcesContent":["export enum GridLayoutContainerType {\n INLINE = 'inline-size',\n SIZE = 'size',\n NORMAL = 'normal',\n}\n\nexport interface GridLayoutColumnWidth {\n small: number | string;\n medium: number | string;\n large: number | string;\n}\n\nexport type GridLayoutColumnWidths = Array<'auto' | GridLayoutColumnWidth>;\n","<template>\n <div class=\"b-grid-layout\" :class=\"computedClasses\" data-testid=\"grid-layout\">\n <div\n v-if=\"hasSlot('col-1')\"\n class=\"b-grid-layout__column\"\n :class=\"computeColumnSize(0)\"\n data-testid=\"grid-layout-col-1\"\n >\n <slot name=\"col-1\"></slot>\n </div>\n <div\n v-if=\"hasSlot('col-2')\"\n class=\"b-grid-layout__column\"\n :class=\"computeColumnSize(1)\"\n data-testid=\"grid-layout-col-2\"\n >\n <slot name=\"col-2\"></slot>\n </div>\n <div\n v-if=\"hasSlot('col-3')\"\n class=\"b-grid-layout__column\"\n :class=\"computeColumnSize(2)\"\n data-testid=\"grid-layout-col-3\"\n >\n <slot name=\"col-3\"></slot>\n </div>\n <div\n v-if=\"hasSlot('col-4')\"\n class=\"b-grid-layout__column\"\n :class=\"computeColumnSize(3)\"\n data-testid=\"grid-layout-col-4\"\n >\n <slot name=\"col-4\"></slot>\n </div>\n <div\n v-if=\"hasSlot('col-5')\"\n class=\"b-grid-layout__column\"\n :class=\"computeColumnSize(4)\"\n data-testid=\"grid-layout-col-5\"\n >\n <slot name=\"col-5\"></slot>\n </div>\n <div\n v-if=\"hasSlot('col-6')\"\n class=\"b-grid-layout__column\"\n :class=\"computeColumnSize(5)\"\n data-testid=\"grid-layout-col-6\"\n >\n <slot name=\"col-6\"></slot>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { useHasSlot } from '@/composables';\n import { GridLayoutColumnWidth, GridLayoutColumnWidths, GridLayoutContainerType } from './grid-layout.types';\n\n /**\n * Component used to render the grid layout in the bento-summary-grid. For internal use only\n */\n export default defineComponent({\n name: 'grid-layout',\n props: {\n /**\n * Sets the responsive columns widths for the grid.\n */\n columnWidth: {\n type: Array as PropType<GridLayoutColumnWidths>,\n default: null,\n validator: (array: GridLayoutColumnWidths) => array && array.length <= 6,\n },\n\n /**\n * Set the type of CSS container the grid layout has\n * @values inline-size, size, normal\n */\n containerType: {\n type: String as PropType<GridLayoutContainerType>,\n default: GridLayoutContainerType.INLINE,\n },\n },\n setup(props, { slots }) {\n // TODO: add a computedItems computed here that only returns the slots that are presents so as to be able to render the divs in the template via a v-for\n const computeColumnSize = index => {\n if (props.columnWidth?.[index] && props.columnWidth?.[index] !== 'auto') {\n const columnWidth = props.columnWidth[index] as GridLayoutColumnWidth;\n return [\n `b-grid-layout__column--${columnWidth.small}`,\n `b-grid-layout-m__column--${columnWidth.medium}`,\n `b-grid-layout-l__column--${columnWidth.large}`,\n ];\n }\n return null;\n };\n\n const computedClasses = computed(() => ({\n 'b-grid-layout--container-type-normal': props.containerType === GridLayoutContainerType.NORMAL,\n 'b-grid-layout--container-type-size': props.containerType === GridLayoutContainerType.SIZE,\n }));\n\n return {\n // Values\n computeColumnSize,\n computedClasses,\n\n // Methods\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./grid-layout.scss\" />\n"],"names":["GridLayoutContainerType","GridLayoutContainerType2","_sfc_main","defineComponent","array","props","slots","computeColumnSize","index","_a","_b","columnWidth","computedClasses","computed","useHasSlot","openBlock","createElementBlock","normalizeClass","_ctx"],"mappings":";;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,SAAA,eACAA,EAAA,OAAA,QACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA,CAAA,CAAA;AC6DR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,OAAA;AAAA;AAAA;AAAA;AAAA,IACC,aAAA;AAAA,MAIU,MAAA;AAAA,MACH,SAAA;AAAA,MACG,WAAA,CAAAC,MAAAA,KAAAA,EAAA,UAAA;AAAA,IAC8D;AAAA;AAAA;AAAA;AAAA;AAAA,IAC3E,eAAA;AAAA,MAMe,MAAA;AAAA,MACL,SAAAJ,EAAA;AAAA,IAC2B;AAAA,EACrC;AAAA,EACJ,MAAAK,GAAA,EAAA,OAAAC,EAAA,GAAA;AAGI,UAAAC,IAAA,CAAAC,MAAA;;AACI,WAAAC,IAAAJ,EAAA,gBAAA,QAAAI,EAAAD,QAAAE,IAAAL,EAAA,gBAAA,gBAAAK,EAAAF,QAAA,QAAA;AACI,cAAAG,IAAAN,EAAA,YAAAG,CAAA;AACA,eAAA;AAAA,UAAO,0BAAAG,EAAA;AAAA,UACmC,4BAAAA,EAAA;AAAA,UACE,4BAAAA,EAAA;AAAA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B,GAAA;AAAA;;IAE9BA,EAAA,QAAA,OAAA,KAAAH,EAAA,GAAAC,EAAA,OAAA;AAAA,MAEU,KAAA;AAAA,MAEN,OAAAC,EAAA,CAAA,yBAAAC,EAAA,kBAAA,CAAA,CAAA,CAAA;AAAA;IAE0B,GAAA;AAAA;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as o, computed as d, openBlock as c, createBlock as E, resolveDynamicComponent as T, normalizeClass as u, withCtx as v, renderSlot as I } from "vue";
2
2
  import { _ as O } from "./_plugin-vue_export-helper.dad06003.js";
3
- import "../assets/index37.css";
3
+ import "../assets/index25.css";
4
4
  var e = /* @__PURE__ */ ((t) => (t.CAPTION = "caption", t.BODY = "body", t.SUBTITLE = "subtitle", t.TITLE = "title", t))(e || {}), a = /* @__PURE__ */ ((t) => (t.WIDE = "wide", t.STRONGER = "stronger", t.STRONGER_WIDE = "stronger-wide", t.STRONGEST = "strongest", t.STRONGEST_WIDE = "strongest-wide", t.MEDIUM = "m", t.LARGE = "l", t.MOBILE = "mobile", t))(a || {}), i = /* @__PURE__ */ ((t) => (t.H1 = "h1", t.H2 = "h2", t.H3 = "h3", t.H4 = "h4", t.H5 = "h5", t.H6 = "h6", t.DIV = "div", t.PARAGRAPH = "p", t.SPAN = "span", t))(i || {});
5
5
  const D = ["development", "DEVELOPMENT", "dev", "DEV"], $ = () => D.includes(process.env.NODE_ENV);
6
6
  function r(...t) {
@@ -121,4 +121,4 @@ export {
121
121
  _ as d,
122
122
  r as p
123
123
  };
124
- //# sourceMappingURL=index.77c651df.js.map
124
+ //# sourceMappingURL=index.32ed68b7.js.map