@adyen/bento-vue2 1.7.0 → 1.7.1

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 (148) hide show
  1. package/dist/accordion.js +2 -2
  2. package/dist/action-bar.js +4 -4
  3. package/dist/alert.js +3 -3
  4. package/dist/assets/base-modal.css +1 -1
  5. package/dist/assets/index.css +1 -1
  6. package/dist/assets/index10.css +1 -1
  7. package/dist/assets/index11.css +1 -1
  8. package/dist/assets/index12.css +1 -1
  9. package/dist/assets/index13.css +1 -1
  10. package/dist/assets/index14.css +1 -1
  11. package/dist/assets/index15.css +1 -1
  12. package/dist/assets/index16.css +1 -1
  13. package/dist/assets/index17.css +1 -1
  14. package/dist/assets/index18.css +1 -1
  15. package/dist/assets/index19.css +1 -1
  16. package/dist/assets/index2.css +1 -1
  17. package/dist/assets/index20.css +1 -1
  18. package/dist/assets/index21.css +1 -1
  19. package/dist/assets/index22.css +1 -1
  20. package/dist/assets/index23.css +1 -1
  21. package/dist/assets/index24.css +1 -1
  22. package/dist/assets/index25.css +1 -1
  23. package/dist/assets/index26.css +1 -1
  24. package/dist/assets/index27.css +1 -1
  25. package/dist/assets/index28.css +1 -1
  26. package/dist/assets/index29.css +1 -1
  27. package/dist/assets/index3.css +1 -1
  28. package/dist/assets/index30.css +1 -1
  29. package/dist/assets/index31.css +1 -1
  30. package/dist/assets/index32.css +1 -1
  31. package/dist/assets/index33.css +1 -1
  32. package/dist/assets/index34.css +1 -1
  33. package/dist/assets/index35.css +1 -1
  34. package/dist/assets/index36.css +1 -1
  35. package/dist/assets/index37.css +1 -1
  36. package/dist/assets/index38.css +1 -1
  37. package/dist/assets/index39.css +1 -1
  38. package/dist/assets/index4.css +1 -1
  39. package/dist/assets/index40.css +1 -1
  40. package/dist/assets/index41.css +1 -1
  41. package/dist/assets/index42.css +1 -1
  42. package/dist/assets/index43.css +1 -1
  43. package/dist/assets/index44.css +1 -1
  44. package/dist/assets/index45.css +1 -1
  45. package/dist/assets/index5.css +1 -1
  46. package/dist/assets/index6.css +1 -1
  47. package/dist/assets/index7.css +1 -1
  48. package/dist/assets/index8.css +1 -1
  49. package/dist/assets/index9.css +1 -1
  50. package/dist/avatar-image.js +1 -1
  51. package/dist/badge.js +1 -1
  52. package/dist/button.js +5 -5
  53. package/dist/card.js +1 -1
  54. package/dist/checkbox.js +6 -6
  55. package/dist/chunks/{base-button.7886a7e6.js → base-button.9ec79f68.js} +2 -2
  56. package/dist/chunks/{base-button.7886a7e6.js.map → base-button.9ec79f68.js.map} +1 -1
  57. package/dist/chunks/{base-modal.88e7b9d4.js → base-modal.ab0f82b2.js} +4 -4
  58. package/dist/chunks/{base-modal.88e7b9d4.js.map → base-modal.ab0f82b2.js.map} +1 -1
  59. package/dist/chunks/{button-actions-with-menu.a5413243.js → button-actions-with-menu.9d1365e9.js} +2 -2
  60. package/dist/chunks/{button-actions-with-menu.a5413243.js.map → button-actions-with-menu.9d1365e9.js.map} +1 -1
  61. package/dist/chunks/{button.e09d5980.js → button.1dfed6fa.js} +2 -2
  62. package/dist/chunks/{button.e09d5980.js.map → button.1dfed6fa.js.map} +1 -1
  63. package/dist/chunks/{calendar.24d0ac04.js → calendar.10c1c697.js} +4 -4
  64. package/dist/chunks/{calendar.24d0ac04.js.map → calendar.10c1c697.js.map} +1 -1
  65. package/dist/chunks/{checkbox.5343e28e.js → checkbox.65480106.js} +3 -3
  66. package/dist/chunks/{checkbox.5343e28e.js.map → checkbox.65480106.js.map} +1 -1
  67. package/dist/chunks/{controls-group.2a21bd83.js → controls-group.066adff1.js} +2 -2
  68. package/dist/chunks/{controls-group.2a21bd83.js.map → controls-group.066adff1.js.map} +1 -1
  69. package/dist/chunks/{copy.346eadb1.js → copy.c41143ac.js} +4 -4
  70. package/dist/chunks/{copy.346eadb1.js.map → copy.c41143ac.js.map} +1 -1
  71. package/dist/chunks/{dropdown-default-textbox.25134789.js → dropdown-default-textbox.62feef5c.js} +2 -2
  72. package/dist/chunks/{dropdown-default-textbox.25134789.js.map → dropdown-default-textbox.62feef5c.js.map} +1 -1
  73. package/dist/chunks/{dropdown.f1253a54.js → dropdown.805b5c7d.js} +6 -6
  74. package/dist/chunks/{dropdown.f1253a54.js.map → dropdown.805b5c7d.js.map} +1 -1
  75. package/dist/chunks/{error-message.8302a46c.js → error-message.a7c6edb2.js} +2 -2
  76. package/dist/chunks/{error-message.8302a46c.js.map → error-message.a7c6edb2.js.map} +1 -1
  77. package/dist/chunks/{fixed-scroller.8994e30a.js → fixed-scroller.92574ff8.js} +2 -2
  78. package/dist/chunks/{fixed-scroller.8994e30a.js.map → fixed-scroller.92574ff8.js.map} +1 -1
  79. package/dist/chunks/{footer-actions.c9b2cb74.js → footer-actions.55ce06ef.js} +3 -3
  80. package/dist/chunks/{footer-actions.c9b2cb74.js.map → footer-actions.55ce06ef.js.map} +1 -1
  81. package/dist/chunks/{index.965ac1af.js → index.4de86bd4.js} +2 -2
  82. package/dist/chunks/{index.965ac1af.js.map → index.4de86bd4.js.map} +1 -1
  83. package/dist/chunks/{index.2625175a.js → index.77d9d16d.js} +2 -2
  84. package/dist/chunks/{index.2625175a.js.map → index.77d9d16d.js.map} +1 -1
  85. package/dist/chunks/{index.37283390.js → index.9da73645.js} +5 -5
  86. package/dist/chunks/{index.37283390.js.map → index.9da73645.js.map} +1 -1
  87. package/dist/chunks/{index.b83f8b7e.js → index.c2dde601.js} +2 -2
  88. package/dist/chunks/{index.b83f8b7e.js.map → index.c2dde601.js.map} +1 -1
  89. package/dist/chunks/{index.a201f750.js → index.e1602f79.js} +3 -3
  90. package/dist/chunks/{index.a201f750.js.map → index.e1602f79.js.map} +1 -1
  91. package/dist/chunks/{index.e566354f.js → index.e350b173.js} +8 -8
  92. package/dist/chunks/{index.e566354f.js.map → index.e350b173.js.map} +1 -1
  93. package/dist/chunks/{index.8ac70774.js → index.eec7f750.js} +3 -3
  94. package/dist/chunks/{index.8ac70774.js.map → index.eec7f750.js.map} +1 -1
  95. package/dist/chunks/{index.d6b5f5e1.js → index.f649c9af.js} +6 -6
  96. package/dist/chunks/{index.d6b5f5e1.js.map → index.f649c9af.js.map} +1 -1
  97. package/dist/chunks/{listbox-option-tag.6a09e8e2.js → listbox-option-tag.9ddbbdad.js} +3 -3
  98. package/dist/chunks/{listbox-option-tag.6a09e8e2.js.map → listbox-option-tag.9ddbbdad.js.map} +1 -1
  99. package/dist/chunks/{listbox.73c38f38.js → listbox.a144a5c8.js} +4 -4
  100. package/dist/chunks/{listbox.73c38f38.js.map → listbox.a144a5c8.js.map} +1 -1
  101. package/dist/chunks/{loading-button.c65682d6.js → loading-button.70de254a.js} +2 -2
  102. package/dist/chunks/{loading-button.c65682d6.js.map → loading-button.70de254a.js.map} +1 -1
  103. package/dist/chunks/{tooltip.104e5fac.js → tooltip.57d6cc22.js} +3 -3
  104. package/dist/chunks/{tooltip.104e5fac.js.map → tooltip.57d6cc22.js.map} +1 -1
  105. package/dist/code-snippet.js +7 -7
  106. package/dist/country.js +2 -2
  107. package/dist/currency.js +1 -1
  108. package/dist/data-grid.js +8 -8
  109. package/dist/date-picker.js +7 -7
  110. package/dist/date-range-picker.js +2 -2
  111. package/dist/date.js +1 -1
  112. package/dist/divider.js +1 -1
  113. package/dist/dropdown.js +4 -4
  114. package/dist/empty-state.js +3 -3
  115. package/dist/filter-bar.js +13 -13
  116. package/dist/focus-trap.js +1 -1
  117. package/dist/form-layout.js +2 -2
  118. package/dist/header.js +3 -3
  119. package/dist/index.js +13 -13
  120. package/dist/info-icon.js +3 -3
  121. package/dist/input-field.js +4 -4
  122. package/dist/internal.js +7 -7
  123. package/dist/link.js +2 -2
  124. package/dist/loading-indicator.js +1 -1
  125. package/dist/menu.js +1 -1
  126. package/dist/modal.js +3 -3
  127. package/dist/pagination.js +4 -4
  128. package/dist/payment-method.js +2 -2
  129. package/dist/popover.js +4 -4
  130. package/dist/popper-container.js +1 -1
  131. package/dist/radio-group.js +4 -4
  132. package/dist/search-bar.js +2 -2
  133. package/dist/segmented-control.js +3 -3
  134. package/dist/sidepanel.js +5 -5
  135. package/dist/status.js +2 -2
  136. package/dist/stepper.js +3 -3
  137. package/dist/structured-list.js +1 -1
  138. package/dist/summary-grid.js +3 -3
  139. package/dist/tabs.js +3 -3
  140. package/dist/tag.js +3 -3
  141. package/dist/textarea.js +4 -4
  142. package/dist/timeline.js +5 -5
  143. package/dist/toast.js +3 -3
  144. package/dist/toggle.js +2 -2
  145. package/dist/tutorial.js +4 -4
  146. package/dist/typography.js +1 -1
  147. package/dist/web-types.json +7 -7
  148. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.f1253a54.js","sources":["../../src/components/dropdown/dropdown.types.ts","../../src/components/dropdown/components/dropdown-options-container/composables/useDropdownOptionsListbox.ts","../../src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-down-small.vue","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-up-small.vue","../../src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue","../../src/components/search-bar/useSearchBarDataFilter.ts","../../src/components/dropdown/composables/useDisplayValue.ts","../../src/components/dropdown/composables/useKeyboardNavigation.ts","../../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';\nexport type { BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps } from '@/types';\nexport type { BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions } from '@/types';\n","import { computed, ref, Ref, watch } from 'vue';\nimport { BentoListboxEvent, BentoListboxSelectedValue } from '@/types';\nimport { BentoDropdownEvent } from '../../../dropdown.types';\nimport { useI18n } from '@/utils/ts/i18n';\nimport messages from '../messages.json';\n\ntype MessageSchema = (typeof messages)['en-US'];\n\n/**\n * A composable that handles all dropdown options option selecting logic & listeners.\n * If single select dropdown then emits straight up to dropdown.\n * If multi select dropdown then stores selections in internal state and only emits when Apply button is pressed.\n *\n * @param selectedValue - the selectedValue property passed into the dropdown options container component.\n * @param multiple - the multiple property passed into the dropdown options container component.\n * @param 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 :empty-state=\"emptyState\"\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 :virtual-scroll=\"virtualScroll\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox>\n </div>\n </component>\n</template>\n\n<script 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 {\n BentoDropdownEmptyStateProps,\n BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n BentoDropdownSize,\n BentoDropdownVirtulisationOptions,\n } from '../../dropdown.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoPopover } from '@/components/popover';\n import { useDropdownOptionsListbox } from './composables/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 * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoDropdownEmptyStateProps>,\n default: undefined,\n },\n\n /**\n * Disables dropdown functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.\n */\n id: { type: String, required: true },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoDropdownIsOptionDisabled}\n * @param {BentoDropdownOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: undefined,\n },\n\n /**\n * 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 /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll: {\n type: [Boolean, Object] as PropType<BentoDropdownVirtulisationOptions>,\n default: false,\n },\n },\n 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 const containerMinAndMaxWidth = {\n 'min-width': `${(props?.targetElement as HTMLElement)?.clientWidth}px`,\n 'max-width': 'min(500px, 95%)',\n };\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: 'space-between',\n actions: actions.value,\n divider: true,\n fallbackPosition: ['top-start'],\n id: generateUid(`dropdown-options-${props.id}`),\n open: props.open,\n position: 'bottom-start',\n style: {\n width: 'auto',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof BentoPopover>['$props'])\n : ({\n fallbackPosition: ['top-start'],\n offset: [0, 8],\n position: 'bottom-start',\n style: {\n display: isDropdownOpen.value ? 'block' : 'none',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof PopperContainer>['$props'])\n );\n\n 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 :empty-state=\"emptyState\"\n :debounce-time=\"search?.debounceTime\"\n :disabled=\"disabled\"\n :input-size=\"size\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"filteredItems\"\n :multiple=\"multiple\"\n :open=\"isDropdownOpen\"\n :selected-value=\"value\"\n :searching=\"isSearching\"\n :target-element=\"inputContainerRefWrapper\"\n :loading=\"loading\"\n :has-more-items=\"hasMoreItems\"\n :lazy-load-type=\"lazyLoadType\"\n :virtual-scroll=\"virtualScroll\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-dropdown-options-container>\n <error-message\n v-if=\"!!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-dropdown__error-message\"\n />\n <bento-typography\n v-if=\"description\"\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 BentoDropdownEmptyStateProps,\n BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n BentoDropdownSearchOptions,\n BentoDropdownSize,\n BentoDropdownVirtulisationOptions,\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 * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoDropdownEmptyStateProps>,\n default: undefined,\n },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * 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 * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll: {\n type: [Boolean, Object] as PropType<BentoDropdownVirtulisationOptions>,\n default: false,\n },\n\n /**\n * 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","watch","isApplyButtonDisabled","computed","onApplyClick","BentoListboxEvent","onCancelClick","actions","onOptionSelected","newSelectedValue","onTabKey","onEnterKey","onSpaceKey","onEscapeKey","emitShowMoreEvent","listeners","_sfc_main$4","defineComponent","messages$1","BentoListbox","PopperContainer","BentoPopover","value","BentoListboxLazyLoadType","props","slots","toRefs","dropdownOptionsListboxRef","isDropdownOpen","noResultsMessage","containerMinAndMaxWidth","_a","conditionalClasses","conditionalListboxClasses","popperContainerOrPopoverComponent","popperContainerOrPopoverProps","generateUid","uuid$1","_sfc_main$3","uuid","_sfc_main$2","_sfc_main$1","ChevronDownSmallIcon","ChevronUpSmallIcon","DropdownBaseTextbox","DropdownBaseTextboxEvent","DropdownBaseTextboxState","openDropdown","closeDropdown","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"],"mappings":";;;;;;;;;;;;;;;AAGY,IAA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F;AAAA;AAAA,MACA,mBAAAvC;AAAA,MAGA,0BAAA2B;AAAA,MACA,qBAAA1B;AAAA;AAAA,MACA,qBAAA+C;AAAA,MAGA,gBAAA3C;AAAA,MACA,kBAAAxE;AAAA,MACA,mBAAAM;AAAA,MACA,oCAAA8G;AAAA,MACA,kBAAAE;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[3,4]}
1
+ {"version":3,"file":"dropdown.805b5c7d.js","sources":["../../src/components/dropdown/dropdown.types.ts","../../src/components/dropdown/components/dropdown-options-container/composables/useDropdownOptionsListbox.ts","../../src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-down-small.vue","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-up-small.vue","../../src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue","../../src/components/search-bar/useSearchBarDataFilter.ts","../../src/components/dropdown/composables/useDisplayValue.ts","../../src/components/dropdown/composables/useKeyboardNavigation.ts","../../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';\nexport type { BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps } from '@/types';\nexport type { BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions } from '@/types';\n","import { computed, ref, Ref, watch } from 'vue';\nimport { BentoListboxEvent, BentoListboxSelectedValue } from '@/types';\nimport { BentoDropdownEvent } from '../../../dropdown.types';\nimport { useI18n } from '@/utils/ts/i18n';\nimport messages from '../messages.json';\n\ntype MessageSchema = (typeof messages)['en-US'];\n\n/**\n * A composable that handles all dropdown options option selecting logic & listeners.\n * If single select dropdown then emits straight up to dropdown.\n * If multi select dropdown then stores selections in internal state and only emits when Apply button is pressed.\n *\n * @param selectedValue - the selectedValue property passed into the dropdown options container component.\n * @param multiple - the multiple property passed into the dropdown options container component.\n * @param 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 :empty-state=\"emptyState\"\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 :virtual-scroll=\"virtualScroll\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox>\n </div>\n </component>\n</template>\n\n<script 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 {\n BentoDropdownEmptyStateProps,\n BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n BentoDropdownSize,\n BentoDropdownVirtulisationOptions,\n } from '../../dropdown.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoPopover } from '@/components/popover';\n import { useDropdownOptionsListbox } from './composables/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 * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoDropdownEmptyStateProps>,\n default: undefined,\n },\n\n /**\n * Disables dropdown functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.\n */\n id: { type: String, required: true },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoDropdownIsOptionDisabled}\n * @param {BentoDropdownOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: undefined,\n },\n\n /**\n * 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 /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll: {\n type: [Boolean, Object] as PropType<BentoDropdownVirtulisationOptions>,\n default: false,\n },\n },\n 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 const containerMinAndMaxWidth = {\n 'min-width': `${(props?.targetElement as HTMLElement)?.clientWidth}px`,\n 'max-width': 'min(500px, 95%)',\n };\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: 'space-between',\n actions: actions.value,\n divider: true,\n fallbackPosition: ['top-start'],\n id: generateUid(`dropdown-options-${props.id}`),\n open: props.open,\n position: 'bottom-start',\n style: {\n width: 'auto',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof BentoPopover>['$props'])\n : ({\n fallbackPosition: ['top-start'],\n offset: [0, 8],\n position: 'bottom-start',\n style: {\n display: isDropdownOpen.value ? 'block' : 'none',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof PopperContainer>['$props'])\n );\n\n 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 :empty-state=\"emptyState\"\n :debounce-time=\"search?.debounceTime\"\n :disabled=\"disabled\"\n :input-size=\"size\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"filteredItems\"\n :multiple=\"multiple\"\n :open=\"isDropdownOpen\"\n :selected-value=\"value\"\n :searching=\"isSearching\"\n :target-element=\"inputContainerRefWrapper\"\n :loading=\"loading\"\n :has-more-items=\"hasMoreItems\"\n :lazy-load-type=\"lazyLoadType\"\n :virtual-scroll=\"virtualScroll\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-dropdown-options-container>\n <error-message\n v-if=\"!!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-dropdown__error-message\"\n />\n <bento-typography\n v-if=\"description\"\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 BentoDropdownEmptyStateProps,\n BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n BentoDropdownSearchOptions,\n BentoDropdownSize,\n BentoDropdownVirtulisationOptions,\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 * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoDropdownEmptyStateProps>,\n default: undefined,\n },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * 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 * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll: {\n type: [Boolean, Object] as PropType<BentoDropdownVirtulisationOptions>,\n default: false,\n },\n\n /**\n * 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","watch","isApplyButtonDisabled","computed","onApplyClick","BentoListboxEvent","onCancelClick","actions","onOptionSelected","newSelectedValue","onTabKey","onEnterKey","onSpaceKey","onEscapeKey","emitShowMoreEvent","listeners","_sfc_main$4","defineComponent","messages$1","BentoListbox","PopperContainer","BentoPopover","value","BentoListboxLazyLoadType","props","slots","toRefs","dropdownOptionsListboxRef","isDropdownOpen","noResultsMessage","containerMinAndMaxWidth","_a","conditionalClasses","conditionalListboxClasses","popperContainerOrPopoverComponent","popperContainerOrPopoverProps","generateUid","uuid$1","_sfc_main$3","uuid","_sfc_main$2","_sfc_main$1","ChevronDownSmallIcon","ChevronUpSmallIcon","DropdownBaseTextbox","DropdownBaseTextboxEvent","DropdownBaseTextboxState","openDropdown","closeDropdown","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"],"mappings":";;;;;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,KAAA,CAA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A,MACA,qBAAA+C;AAAA,MAGA,gBAAA3C;AAAA,MACA,kBAAAxE;AAAA,MACA,mBAAAM;AAAA,MACA,oCAAA8G;AAAA,MACA,kBAAAE;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[3,4]}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as t } from "vue";
2
- import { B as n } from "./index.965ac1af.js";
2
+ import { B as n } from "./index.4de86bd4.js";
3
3
  import { C as _ } from "./cross-circle-fill.d5e9ae44.js";
4
4
  import { u as a } from "./i18n.155748d6.js";
5
5
  import { n as i } from "./_plugin-vue2_normalizer.71e2aa87.js";
@@ -44,4 +44,4 @@ const b = f.exports;
44
44
  export {
45
45
  b as E
46
46
  };
47
- //# sourceMappingURL=error-message.8302a46c.js.map
47
+ //# sourceMappingURL=error-message.a7c6edb2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-message.8302a46c.js","sources":["../../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":";;;;;;;;;;GA+CIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;AAPA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"error-message.a7c6edb2.js","sources":["../../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":";;;;;;;;;;GA+CIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;AAPA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { ref as r, onMounted as R, computed as f, defineComponent as x } from "vue";
2
- import { a as L } from "./button.e09d5980.js";
2
+ import { a as L } from "./button.1dfed6fa.js";
3
3
  import { u as y } from "./i18n.155748d6.js";
4
4
  import { C, a as b } from "./chevron-left.c10778d3.js";
5
5
  import { o as m } from "./resize.a041304d.js";
@@ -105,4 +105,4 @@ const U = P.exports;
105
105
  export {
106
106
  U as F
107
107
  };
108
- //# sourceMappingURL=fixed-scroller.8994e30a.js.map
108
+ //# sourceMappingURL=fixed-scroller.92574ff8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fixed-scroller.8994e30a.js","sources":["../../src/components/internal/fixed-scroller/composables/useFixedScroller.ts","../../src/components/internal/fixed-scroller/fixed-scroller.vue"],"sourcesContent":["import { observeSizeOfElement } from '@/utils/ts/resize';\nimport { computed, onMounted, ref } from 'vue';\nimport type { Ref } from 'vue';\n\n// Adding an offset of \"1\" so that the border can be shown within the boundaries\nconst OVERFLOW_CLIP_OFFSET = 1;\n// Add the gradient offset to the calculations\nconst GRADIENT_OFFSET = 40;\n\ninterface useFixedScrollerProps {\n contentRef?: Ref<HTMLElement | undefined>;\n containerRef?: Ref<HTMLElement | undefined>;\n leftButtonRef?: Ref<HTMLElement | undefined>;\n rightButtonRef?: Ref<HTMLElement | undefined>;\n}\n\n/**\n * Function to calculate the offset of each view and change the \"view\" via offsets\n * through the functions `scrollLeft` and `scrollRight` whilst providing a way to\n * show and hide the buttons based on the current \"view\" via\n * `shouldShowLeftButton` and `shouldShowRightButton`.\n *\n * Each view is pre-calculated (offsetArray) and updated if the content changes as a computed ref:\n * First view: Always 0 (x axis beginning).\n * Last view: total content space - visible width\n * Intermediate views: Previous offset (to the left) plus the visible space taking\n * away the space the buttons take so that the whole view can be rendered\n *\n *\n * @param {useFixedScrollerProps} props - All the necessary references to calculate the scroll\n * @param {Ref<HTMLElement | undefined>} props.containerRef - Reference to the container, this defines the visible space width\n * @param {Ref<HTMLElement | undefined>} props.contentRef - Reference to the content itself, this defines the total content width\n * @param {Ref<HTMLElement | undefined>} props.leftButtonRef - Reference to the left button, used to calculate total space in which the content will be rendered\n * @param {Ref<HTMLElement | undefined>} props.rightButtonRef - Reference to the right button, used to calculate total space in which the content will be rendered\n * @returns {Object} response - Values used in the view to show the buttons and to change the view right or left\n * @returns {Ref<number>} response.offset - Offset value by which the view will move on the x axis. To be used in `styles`.\n * @returns {ComputedRef<boolean>} response.shouldShowLeftButton - Indicates if the button on the left should be shown\n * @returns {ComputedRef<boolean>} response.shouldShowRightButton - Indicates if the button on the right should be shown\n * @returns {() => {}} response.scrollLeft - Used to shift the view to the left\n * @returns {() => {}} response.scrollRight - Used to shift the view to the right\n */\nexport const useFixedScroller = ({\n contentRef,\n containerRef,\n leftButtonRef,\n rightButtonRef,\n}: useFixedScrollerProps) => {\n const offset = ref(0);\n const currentView = ref(0);\n\n // Calculated using 'scrollWidth' to get the full width of the content\n const totalContentWidth = ref(0);\n // Calculated using 'clientWidth' to get the rendered componen width\n const visibleSpaceWidth = ref(0);\n\n onMounted(() => {\n observeSizeOfElement(containerRef.value, () => {\n if (containerRef.value) {\n // Set new width when resized\n visibleSpaceWidth.value = containerRef.value.offsetWidth;\n // Reset the offset and view\n currentView.value = 0;\n offset.value = 0;\n }\n });\n\n observeSizeOfElement(contentRef.value, () => {\n totalContentWidth.value = contentRef.value?.scrollWidth;\n });\n });\n\n // Sum of the space used by the Left and Right buttons\n // Used to calculate how much space the \"actual\" visible space is\n const buttonsWidth = computed(() => {\n const leftButtonWidth = leftButtonRef.value?.scrollWidth\n ? leftButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n const rightButtonWidth = rightButtonRef.value?.scrollWidth\n ? rightButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n\n return leftButtonWidth + rightButtonWidth;\n });\n // Total number of pages/views available.\n // Calculated as \"ceil\" because if the space doesn't fit \"one view\" (irrational number) the content flows to the next view (integer).\n const totalViews = computed(() => Math.ceil(totalContentWidth.value / visibleSpaceWidth.value) ?? 0);\n\n // Calculation of offsets per view (index).\n // This allows to easily swap the offset without on-the-fly calculations\n const offsetArray = computed(() => {\n const calculatedOffsetList = new Array(totalViews.value).fill(0);\n\n calculatedOffsetList.forEach((_, index) => {\n // First offset will be 0\n if (index === 0) {\n return;\n }\n\n // Calculate last\n if (index === totalViews.value - 1) {\n calculatedOffsetList[calculatedOffsetList.length - 1] = -(\n totalContentWidth.value -\n visibleSpaceWidth.value +\n OVERFLOW_CLIP_OFFSET\n );\n\n return;\n }\n\n // Calculate each offset - Move 1 view\n const previousOffset = calculatedOffsetList[index - 1];\n calculatedOffsetList[index] = -(visibleSpaceWidth.value + Math.abs(previousOffset) - buttonsWidth.value);\n });\n\n return calculatedOffsetList;\n });\n\n // Hide left button when it's the first view\n const shouldShowLeftButton = computed(() => currentView.value !== 0);\n // Hide right button if it's the last view\n const shouldShowRightButton = computed(\n () => offset.value >= -(totalContentWidth.value - visibleSpaceWidth.value - 1)\n );\n\n /**\n * Shifts the current offset by one view to the left.\n */\n const scrollLeft = () => {\n // Do nothing if it is already in page 0\n if (currentView.value === 0) {\n return;\n }\n\n currentView.value -= 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n /**\n * Shifts the current offset by one view to the right.\n */\n const scrollRight = () => {\n // Do nothing if it is already in last page\n if (currentView.value === totalViews.value - 1) {\n return;\n }\n\n currentView.value += 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n return {\n offset,\n shouldShowLeftButton,\n shouldShowRightButton,\n\n // Methods\n scrollLeft,\n scrollRight,\n };\n};\n","<template>\n <div ref=\"fixedScrollerRef\" class=\"b-fixed-scroller\">\n <div class=\"b-fixed-scroller__container\">\n <div\n ref=\"contentRef\"\n class=\"b-fixed-scroller__content\"\n :style=\"{\n transform: `translateX(${offset}px)`,\n paddingTop: shouldShowLeftButton || shouldShowRightButton ? `${extraPaddingTop}px` : null,\n }\"\n >\n <slot></slot>\n </div>\n </div>\n\n <div v-if=\"shouldShowLeftButton\" ref=\"leftButtonRef\" class=\"b-fixed-scroller__left\">\n <bento-button variant=\"secondary\" :aria-label=\"t('scrollLeft')\" :condensed=\"condensed\" @click=\"scrollLeft\">\n <template #iconLeft>\n <chevron-left-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n <div v-if=\"shouldShowRightButton\" ref=\"rightButtonRef\" class=\"b-fixed-scroller__right\">\n <bento-button\n variant=\"secondary\"\n :aria-label=\"t('scrollRight')\"\n :condensed=\"condensed\"\n @click=\"scrollRight\"\n >\n <template #iconLeft>\n <chevron-right-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { useFixedScroller } from './composables';\n import { useI18n } from '@/utils/ts/i18n';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const contentRef = ref(null);\n const fixedScrollerRef = ref(null);\n const leftButtonRef = ref(null);\n const rightButtonRef = ref(null);\n\n defineProps({\n /**\n * Applies the condensed style to the buttons\n */\n condensed: { type: Boolean, default: false },\n /**\n * Padding to be applied to the top of the scroller container\n */\n extraPaddingTop: { type: Number, default: 0 },\n });\n\n const { offset, shouldShowLeftButton, shouldShowRightButton, scrollLeft, scrollRight } = useFixedScroller({\n contentRef,\n containerRef: fixedScrollerRef,\n leftButtonRef,\n rightButtonRef,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Allows to horizontally scroll content by one view at a time.\n *\n * @example\n * import { FixedScroller } from '@/internal';\n *\n * export default {\n * components: { FixedScroller },\n * template: `\n * <fixed-scroller>\n * <div style=\"display: flex; gap: 8px;\">\n * {{ Content here }}\n * </div>\n * </fixed-scroller>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./fixed-scroller.scss\" />\n"],"names":["OVERFLOW_CLIP_OFFSET","GRADIENT_OFFSET","useFixedScroller","contentRef","containerRef","leftButtonRef","rightButtonRef","offset","ref","currentView","totalContentWidth","visibleSpaceWidth","onMounted","observeSizeOfElement","_a","buttonsWidth","computed","leftButtonWidth","rightButtonWidth","_b","totalViews","offsetArray","calculatedOffsetList","_","index","previousOffset","shouldShowLeftButton","shouldShowRightButton","__default__","messages","t","useI18n","fixedScrollerRef","scrollLeft","scrollRight"],"mappings":";;;;;;;AAKA,MAAAA,IAAA,GAEAC,IAAA,IAkCOC,IAAA,CAAA;AAAA,EAA0B,YAAAC;AAAA,EAC7B,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AAEJ,MAAA;AACI,QAAAC,IAAAC,EAAA,CAAA,GACAC,IAAAD,EAAA,CAAA,GAGAE,IAAAF,EAAA,CAAA,GAEAG,IAAAH,EAAA,CAAA;AAEA,EAAAI,EAAA,MAAA;AACI,IAAAC,EAAAT,EAAA,OAAA,MAAA;AACI,MAAAA,EAAA,UAEIO,EAAA,QAAAP,EAAA,MAAA,aAEAK,EAAA,QAAA,GACAF,EAAA,QAAA;AAAA,IACJ,CAAA,GAGJM,EAAAV,EAAA,OAAA,MAAA;;AACI,MAAAO,EAAA,SAAAI,IAAAX,EAAA,UAAA,gBAAAW,EAAA;AAAA,IAA4C,CAAA;AAAA,EAC/C,CAAA;AAKL,QAAAC,IAAAC,EAAA,MAAA;;AACI,UAAAC,KAAAH,IAAAT,EAAA,UAAA,QAAAS,EAAA,cAAAT,EAAA,MAAA,cAAAJ,IAAA,GAGAiB,KAAAC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;;;AA9CA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEA5B,IAAAK,EAAA,IAAA,GACAwB,IAAAxB,EAAA,IAAA,GACAH,IAAAG,EAAA,IAAA,GACAF,IAAAE,EAAA,IAAA,GAaA,EAAA,QAAAD,GAAA,sBAAAmB,GAAA,uBAAAC,GAAA,YAAAM,GAAA,aAAAC,EAAA,IAAAhC,EAAA;AAAA,MAA0G,YAAAC;AAAA,MACtG,cAAA6B;AAAA,MACc,eAAA3B;AAAA,MACd,gBAAAC;AAAA,IACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"fixed-scroller.92574ff8.js","sources":["../../src/components/internal/fixed-scroller/composables/useFixedScroller.ts","../../src/components/internal/fixed-scroller/fixed-scroller.vue"],"sourcesContent":["import { observeSizeOfElement } from '@/utils/ts/resize';\nimport { computed, onMounted, ref } from 'vue';\nimport type { Ref } from 'vue';\n\n// Adding an offset of \"1\" so that the border can be shown within the boundaries\nconst OVERFLOW_CLIP_OFFSET = 1;\n// Add the gradient offset to the calculations\nconst GRADIENT_OFFSET = 40;\n\ninterface useFixedScrollerProps {\n contentRef?: Ref<HTMLElement | undefined>;\n containerRef?: Ref<HTMLElement | undefined>;\n leftButtonRef?: Ref<HTMLElement | undefined>;\n rightButtonRef?: Ref<HTMLElement | undefined>;\n}\n\n/**\n * Function to calculate the offset of each view and change the \"view\" via offsets\n * through the functions `scrollLeft` and `scrollRight` whilst providing a way to\n * show and hide the buttons based on the current \"view\" via\n * `shouldShowLeftButton` and `shouldShowRightButton`.\n *\n * Each view is pre-calculated (offsetArray) and updated if the content changes as a computed ref:\n * First view: Always 0 (x axis beginning).\n * Last view: total content space - visible width\n * Intermediate views: Previous offset (to the left) plus the visible space taking\n * away the space the buttons take so that the whole view can be rendered\n *\n *\n * @param {useFixedScrollerProps} props - All the necessary references to calculate the scroll\n * @param {Ref<HTMLElement | undefined>} props.containerRef - Reference to the container, this defines the visible space width\n * @param {Ref<HTMLElement | undefined>} props.contentRef - Reference to the content itself, this defines the total content width\n * @param {Ref<HTMLElement | undefined>} props.leftButtonRef - Reference to the left button, used to calculate total space in which the content will be rendered\n * @param {Ref<HTMLElement | undefined>} props.rightButtonRef - Reference to the right button, used to calculate total space in which the content will be rendered\n * @returns {Object} response - Values used in the view to show the buttons and to change the view right or left\n * @returns {Ref<number>} response.offset - Offset value by which the view will move on the x axis. To be used in `styles`.\n * @returns {ComputedRef<boolean>} response.shouldShowLeftButton - Indicates if the button on the left should be shown\n * @returns {ComputedRef<boolean>} response.shouldShowRightButton - Indicates if the button on the right should be shown\n * @returns {() => {}} response.scrollLeft - Used to shift the view to the left\n * @returns {() => {}} response.scrollRight - Used to shift the view to the right\n */\nexport const useFixedScroller = ({\n contentRef,\n containerRef,\n leftButtonRef,\n rightButtonRef,\n}: useFixedScrollerProps) => {\n const offset = ref(0);\n const currentView = ref(0);\n\n // Calculated using 'scrollWidth' to get the full width of the content\n const totalContentWidth = ref(0);\n // Calculated using 'clientWidth' to get the rendered componen width\n const visibleSpaceWidth = ref(0);\n\n onMounted(() => {\n observeSizeOfElement(containerRef.value, () => {\n if (containerRef.value) {\n // Set new width when resized\n visibleSpaceWidth.value = containerRef.value.offsetWidth;\n // Reset the offset and view\n currentView.value = 0;\n offset.value = 0;\n }\n });\n\n observeSizeOfElement(contentRef.value, () => {\n totalContentWidth.value = contentRef.value?.scrollWidth;\n });\n });\n\n // Sum of the space used by the Left and Right buttons\n // Used to calculate how much space the \"actual\" visible space is\n const buttonsWidth = computed(() => {\n const leftButtonWidth = leftButtonRef.value?.scrollWidth\n ? leftButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n const rightButtonWidth = rightButtonRef.value?.scrollWidth\n ? rightButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n\n return leftButtonWidth + rightButtonWidth;\n });\n // Total number of pages/views available.\n // Calculated as \"ceil\" because if the space doesn't fit \"one view\" (irrational number) the content flows to the next view (integer).\n const totalViews = computed(() => Math.ceil(totalContentWidth.value / visibleSpaceWidth.value) ?? 0);\n\n // Calculation of offsets per view (index).\n // This allows to easily swap the offset without on-the-fly calculations\n const offsetArray = computed(() => {\n const calculatedOffsetList = new Array(totalViews.value).fill(0);\n\n calculatedOffsetList.forEach((_, index) => {\n // First offset will be 0\n if (index === 0) {\n return;\n }\n\n // Calculate last\n if (index === totalViews.value - 1) {\n calculatedOffsetList[calculatedOffsetList.length - 1] = -(\n totalContentWidth.value -\n visibleSpaceWidth.value +\n OVERFLOW_CLIP_OFFSET\n );\n\n return;\n }\n\n // Calculate each offset - Move 1 view\n const previousOffset = calculatedOffsetList[index - 1];\n calculatedOffsetList[index] = -(visibleSpaceWidth.value + Math.abs(previousOffset) - buttonsWidth.value);\n });\n\n return calculatedOffsetList;\n });\n\n // Hide left button when it's the first view\n const shouldShowLeftButton = computed(() => currentView.value !== 0);\n // Hide right button if it's the last view\n const shouldShowRightButton = computed(\n () => offset.value >= -(totalContentWidth.value - visibleSpaceWidth.value - 1)\n );\n\n /**\n * Shifts the current offset by one view to the left.\n */\n const scrollLeft = () => {\n // Do nothing if it is already in page 0\n if (currentView.value === 0) {\n return;\n }\n\n currentView.value -= 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n /**\n * Shifts the current offset by one view to the right.\n */\n const scrollRight = () => {\n // Do nothing if it is already in last page\n if (currentView.value === totalViews.value - 1) {\n return;\n }\n\n currentView.value += 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n return {\n offset,\n shouldShowLeftButton,\n shouldShowRightButton,\n\n // Methods\n scrollLeft,\n scrollRight,\n };\n};\n","<template>\n <div ref=\"fixedScrollerRef\" class=\"b-fixed-scroller\">\n <div class=\"b-fixed-scroller__container\">\n <div\n ref=\"contentRef\"\n class=\"b-fixed-scroller__content\"\n :style=\"{\n transform: `translateX(${offset}px)`,\n paddingTop: shouldShowLeftButton || shouldShowRightButton ? `${extraPaddingTop}px` : null,\n }\"\n >\n <slot></slot>\n </div>\n </div>\n\n <div v-if=\"shouldShowLeftButton\" ref=\"leftButtonRef\" class=\"b-fixed-scroller__left\">\n <bento-button variant=\"secondary\" :aria-label=\"t('scrollLeft')\" :condensed=\"condensed\" @click=\"scrollLeft\">\n <template #iconLeft>\n <chevron-left-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n <div v-if=\"shouldShowRightButton\" ref=\"rightButtonRef\" class=\"b-fixed-scroller__right\">\n <bento-button\n variant=\"secondary\"\n :aria-label=\"t('scrollRight')\"\n :condensed=\"condensed\"\n @click=\"scrollRight\"\n >\n <template #iconLeft>\n <chevron-right-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { useFixedScroller } from './composables';\n import { useI18n } from '@/utils/ts/i18n';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const contentRef = ref(null);\n const fixedScrollerRef = ref(null);\n const leftButtonRef = ref(null);\n const rightButtonRef = ref(null);\n\n defineProps({\n /**\n * Applies the condensed style to the buttons\n */\n condensed: { type: Boolean, default: false },\n /**\n * Padding to be applied to the top of the scroller container\n */\n extraPaddingTop: { type: Number, default: 0 },\n });\n\n const { offset, shouldShowLeftButton, shouldShowRightButton, scrollLeft, scrollRight } = useFixedScroller({\n contentRef,\n containerRef: fixedScrollerRef,\n leftButtonRef,\n rightButtonRef,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Allows to horizontally scroll content by one view at a time.\n *\n * @example\n * import { FixedScroller } from '@/internal';\n *\n * export default {\n * components: { FixedScroller },\n * template: `\n * <fixed-scroller>\n * <div style=\"display: flex; gap: 8px;\">\n * {{ Content here }}\n * </div>\n * </fixed-scroller>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./fixed-scroller.scss\" />\n"],"names":["OVERFLOW_CLIP_OFFSET","GRADIENT_OFFSET","useFixedScroller","contentRef","containerRef","leftButtonRef","rightButtonRef","offset","ref","currentView","totalContentWidth","visibleSpaceWidth","onMounted","observeSizeOfElement","_a","buttonsWidth","computed","leftButtonWidth","rightButtonWidth","_b","totalViews","offsetArray","calculatedOffsetList","_","index","previousOffset","shouldShowLeftButton","shouldShowRightButton","__default__","messages","t","useI18n","fixedScrollerRef","scrollLeft","scrollRight"],"mappings":";;;;;;;AAKA,MAAAA,IAAA,GAEAC,IAAA,IAkCOC,IAAA,CAAA;AAAA,EAA0B,YAAAC;AAAA,EAC7B,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AAEJ,MAAA;AACI,QAAAC,IAAAC,EAAA,CAAA,GACAC,IAAAD,EAAA,CAAA,GAGAE,IAAAF,EAAA,CAAA,GAEAG,IAAAH,EAAA,CAAA;AAEA,EAAAI,EAAA,MAAA;AACI,IAAAC,EAAAT,EAAA,OAAA,MAAA;AACI,MAAAA,EAAA,UAEIO,EAAA,QAAAP,EAAA,MAAA,aAEAK,EAAA,QAAA,GACAF,EAAA,QAAA;AAAA,IACJ,CAAA,GAGJM,EAAAV,EAAA,OAAA,MAAA;;AACI,MAAAO,EAAA,SAAAI,IAAAX,EAAA,UAAA,gBAAAW,EAAA;AAAA,IAA4C,CAAA;AAAA,EAC/C,CAAA;AAKL,QAAAC,IAAAC,EAAA,MAAA;;AACI,UAAAC,KAAAH,IAAAT,EAAA,UAAA,QAAAS,EAAA,cAAAT,EAAA,MAAA,cAAAJ,IAAA,GAGAiB,KAAAC,IAAAb,EAAA,UAAA,QAAAa,EAAA,cAAAb,EAAA,MAAA,cAAAL,IAAA;AAIA,WAAAgB,IAAAC;AAAA,EAAyB,CAAA,GAI7BE,IAAAJ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,IAAA,GACAF,IAAAE,EAAA,IAAA,GAaA,EAAA,QAAAD,GAAA,sBAAAmB,GAAA,uBAAAC,GAAA,YAAAM,GAAA,aAAAC,EAAA,IAAAhC,EAAA;AAAA,MAA0G,YAAAC;AAAA,MACtG,cAAA6B;AAAA,MACc,eAAA3B;AAAA,MACd,gBAAAC;AAAA,IACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as i, toRefs as r, computed as l, onMounted as c } from "vue";
2
- import { B as _ } from "./index.965ac1af.js";
3
- import { B as u } from "./button.e09d5980.js";
2
+ import { B as _ } from "./index.4de86bd4.js";
3
+ import { B as u } from "./button.1dfed6fa.js";
4
4
  import { BentoButtonActions as d } from "../button.js";
5
5
  import { n as p } from "./_plugin-vue2_normalizer.71e2aa87.js";
6
6
  import "../assets/footer-actions.css";
@@ -95,4 +95,4 @@ const w = b.exports;
95
95
  export {
96
96
  w as F
97
97
  };
98
- //# sourceMappingURL=footer-actions.c9b2cb74.js.map
98
+ //# sourceMappingURL=footer-actions.55ce06ef.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"footer-actions.c9b2cb74.js","sources":["../../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":";;;;;;AA+HI,MAAAA,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.55ce06ef.js","sources":["../../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":";;;;;;AA+HI,MAAAA,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,6 +1,6 @@
1
1
  import { defineComponent as c, computed as o } from "vue";
2
2
  import { n as E } from "./_plugin-vue2_normalizer.71e2aa87.js";
3
- import "../assets/index31.css";
3
+ import "../assets/index38.css";
4
4
  var a = /* @__PURE__ */ ((t) => (t.CAPTION = "caption", t.BODY = "body", t.SUBTITLE = "subtitle", t.TITLE = "title", t))(a || {}), e = /* @__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))(e || {}), l = /* @__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))(l || {});
5
5
  const T = ["development", "DEVELOPMENT", "dev", "DEV"], d = () => T.includes(process.env.NODE_ENV);
6
6
  function i(...t) {
@@ -123,4 +123,4 @@ export {
123
123
  v as d,
124
124
  i as p
125
125
  };
126
- //# sourceMappingURL=index.965ac1af.js.map
126
+ //# sourceMappingURL=index.4de86bd4.js.map