@adyen/bento-vue2 1.4.0 → 1.4.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 (129) hide show
  1. package/dist/accordion.js +2 -2
  2. package/dist/alert.js +3 -3
  3. package/dist/assets/index12.css +1 -1
  4. package/dist/assets/index13.css +1 -1
  5. package/dist/assets/index14.css +1 -1
  6. package/dist/assets/index15.css +1 -1
  7. package/dist/assets/index16.css +1 -1
  8. package/dist/assets/index17.css +1 -1
  9. package/dist/assets/index18.css +1 -1
  10. package/dist/assets/index19.css +1 -1
  11. package/dist/assets/index2.css +1 -1
  12. package/dist/assets/index20.css +1 -1
  13. package/dist/assets/index21.css +1 -1
  14. package/dist/assets/index22.css +1 -1
  15. package/dist/assets/index23.css +1 -1
  16. package/dist/assets/index24.css +1 -1
  17. package/dist/assets/index25.css +1 -1
  18. package/dist/assets/index26.css +1 -1
  19. package/dist/assets/index27.css +1 -1
  20. package/dist/assets/index28.css +1 -1
  21. package/dist/assets/index29.css +1 -1
  22. package/dist/assets/index3.css +1 -1
  23. package/dist/assets/index30.css +1 -1
  24. package/dist/assets/index31.css +1 -1
  25. package/dist/assets/index32.css +1 -1
  26. package/dist/assets/index33.css +1 -1
  27. package/dist/assets/index34.css +1 -1
  28. package/dist/assets/index35.css +1 -1
  29. package/dist/assets/index36.css +1 -1
  30. package/dist/assets/index37.css +1 -1
  31. package/dist/assets/index38.css +1 -1
  32. package/dist/assets/index39.css +1 -1
  33. package/dist/assets/index4.css +1 -1
  34. package/dist/assets/index40.css +1 -1
  35. package/dist/assets/index42.css +1 -1
  36. package/dist/assets/index5.css +1 -1
  37. package/dist/assets/index6.css +1 -1
  38. package/dist/assets/index7.css +1 -1
  39. package/dist/assets/index8.css +1 -1
  40. package/dist/assets/index9.css +1 -1
  41. package/dist/avatar-image.js +1 -1
  42. package/dist/button.js +5 -5
  43. package/dist/card.js +2 -2
  44. package/dist/checkbox.js +6 -6
  45. package/dist/chunks/{base-button.bd8fa976.js → base-button.7a676605.js} +2 -2
  46. package/dist/chunks/{base-button.bd8fa976.js.map → base-button.7a676605.js.map} +1 -1
  47. package/dist/chunks/{base-modal.a365f260.js → base-modal.a51d2395.js} +4 -4
  48. package/dist/chunks/{base-modal.a365f260.js.map → base-modal.a51d2395.js.map} +1 -1
  49. package/dist/chunks/{button.fb307df3.js → button.66df5734.js} +2 -2
  50. package/dist/chunks/{button.fb307df3.js.map → button.66df5734.js.map} +1 -1
  51. package/dist/chunks/{calendar.79ea42c1.js → calendar.c20df708.js} +4 -4
  52. package/dist/chunks/{calendar.79ea42c1.js.map → calendar.c20df708.js.map} +1 -1
  53. package/dist/chunks/{checkbox.c7d791ed.js → checkbox.5a69ce9d.js} +3 -3
  54. package/dist/chunks/{checkbox.c7d791ed.js.map → checkbox.5a69ce9d.js.map} +1 -1
  55. package/dist/chunks/{controls-group.5d3e04dd.js → controls-group.a2a2916f.js} +2 -2
  56. package/dist/chunks/{controls-group.5d3e04dd.js.map → controls-group.a2a2916f.js.map} +1 -1
  57. package/dist/chunks/{copy.ac796536.js → copy.982e1b19.js} +3 -3
  58. package/dist/chunks/{copy.ac796536.js.map → copy.982e1b19.js.map} +1 -1
  59. package/dist/chunks/{dropdown-default-textbox.109c36d2.js → dropdown-default-textbox.9bef4138.js} +2 -2
  60. package/dist/chunks/{dropdown-default-textbox.109c36d2.js.map → dropdown-default-textbox.9bef4138.js.map} +1 -1
  61. package/dist/chunks/{dropdown.fd93f0ce.js → dropdown.15cc1c45.js} +5 -5
  62. package/dist/chunks/{dropdown.fd93f0ce.js.map → dropdown.15cc1c45.js.map} +1 -1
  63. package/dist/chunks/{error-message.3b3c33d4.js → error-message.7a5db7f6.js} +2 -2
  64. package/dist/chunks/{error-message.3b3c33d4.js.map → error-message.7a5db7f6.js.map} +1 -1
  65. package/dist/chunks/{footer-actions.f02e8699.js → footer-actions.6ddac024.js} +3 -3
  66. package/dist/chunks/{footer-actions.f02e8699.js.map → footer-actions.6ddac024.js.map} +1 -1
  67. package/dist/chunks/{index.45295dd3.js → index.1645ffcb.js} +2 -2
  68. package/dist/chunks/{index.45295dd3.js.map → index.1645ffcb.js.map} +1 -1
  69. package/dist/chunks/{index.88ff49c2.js → index.58ce168a.js} +8 -8
  70. package/dist/chunks/{index.88ff49c2.js.map → index.58ce168a.js.map} +1 -1
  71. package/dist/chunks/{index.c8f81673.js → index.876ea5bf.js} +3 -3
  72. package/dist/chunks/{index.c8f81673.js.map → index.876ea5bf.js.map} +1 -1
  73. package/dist/chunks/{index.bd734551.js → index.b9c8c99a.js} +6 -6
  74. package/dist/chunks/{index.bd734551.js.map → index.b9c8c99a.js.map} +1 -1
  75. package/dist/chunks/{index.c85a1ab9.js → index.c39c64c9.js} +2 -2
  76. package/dist/chunks/{index.c85a1ab9.js.map → index.c39c64c9.js.map} +1 -1
  77. package/dist/chunks/{index.9902cae4.js → index.e722eb60.js} +2 -2
  78. package/dist/chunks/{index.9902cae4.js.map → index.e722eb60.js.map} +1 -1
  79. package/dist/chunks/{listbox-option-tag.ec42431b.js → listbox-option-tag.f8b467a7.js} +3 -3
  80. package/dist/chunks/{listbox-option-tag.ec42431b.js.map → listbox-option-tag.f8b467a7.js.map} +1 -1
  81. package/dist/chunks/{listbox.e792d2d6.js → listbox.cbf47484.js} +4 -4
  82. package/dist/chunks/{listbox.e792d2d6.js.map → listbox.cbf47484.js.map} +1 -1
  83. package/dist/chunks/{loading-button.429c8416.js → loading-button.9d18b4f2.js} +2 -2
  84. package/dist/chunks/{loading-button.429c8416.js.map → loading-button.9d18b4f2.js.map} +1 -1
  85. package/dist/chunks/{tooltip.a47ace87.js → tooltip.0297fd5d.js} +2 -2
  86. package/dist/chunks/{tooltip.a47ace87.js.map → tooltip.0297fd5d.js.map} +1 -1
  87. package/dist/code-snippet.js +6 -6
  88. package/dist/country.js +1 -1
  89. package/dist/currency.js +1 -1
  90. package/dist/data-grid.js +181 -178
  91. package/dist/data-grid.js.map +1 -1
  92. package/dist/date-picker.js +7 -7
  93. package/dist/date-range-picker.js +2 -2
  94. package/dist/date.js +1 -1
  95. package/dist/divider.js +1 -1
  96. package/dist/dropdown.js +4 -4
  97. package/dist/empty-state.js +3 -3
  98. package/dist/filter-bar.js +13 -13
  99. package/dist/focus-trap.js +1 -1
  100. package/dist/form-layout.js +2 -2
  101. package/dist/header.js +2 -2
  102. package/dist/index.js +12 -12
  103. package/dist/info-icon.js +2 -2
  104. package/dist/input-field.js +3 -3
  105. package/dist/internal.js +6 -6
  106. package/dist/link.js +2 -2
  107. package/dist/loading-indicator.js +1 -1
  108. package/dist/menu.js +4 -4
  109. package/dist/modal.js +3 -3
  110. package/dist/pagination.js +4 -4
  111. package/dist/payment-method.js +2 -2
  112. package/dist/popover.js +3 -3
  113. package/dist/popper-container.js +2 -2
  114. package/dist/radio-group.js +4 -4
  115. package/dist/search-bar.js +2 -2
  116. package/dist/segmented-control.js +4 -4
  117. package/dist/sidepanel.js +5 -5
  118. package/dist/status.js +2 -2
  119. package/dist/structured-list.js +1 -1
  120. package/dist/summary-grid.js +3 -3
  121. package/dist/tabs.js +2 -2
  122. package/dist/tag.js +3 -3
  123. package/dist/textarea.js +4 -4
  124. package/dist/timeline.js +5 -5
  125. package/dist/toast.js +3 -3
  126. package/dist/toggle.js +2 -2
  127. package/dist/typography.js +1 -1
  128. package/dist/web-types.json +1 -1
  129. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.c7d791ed.js","sources":["../../src/components/checkbox/checkbox.types.ts","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/minus-small.vue","../../src/components/checkbox/checkbox.vue"],"sourcesContent":["export type BentoMultiCheckboxType = Array<string | number>;\nexport type BentoCheckboxType = boolean | BentoMultiCheckboxType;\n\nexport enum BentoCheckboxState {\n UNCHECKED = 'unchecked',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum BentoCheckboxEvent {\n UPDATE = 'update:model-value',\n INPUT = 'input',\n}\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.25 8C4.25 7.58579 4.58579 7.25 5 7.25H11C11.4142 7.25 11.75 7.58579 11.75 8C11.75 8.41421 11.4142 8.75 11 8.75H5C4.58579 8.75 4.25 8.41421 4.25 8Z\" 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 <label class=\"b-checkbox\" :class=\"conditionalClass\">\n <div class=\"b-checkbox__input-container\">\n <!-- Don't change order because it matters for CSS. Icons first -->\n <checkmark-small-icon v-if=\"isChecked\" class=\"b-checkbox__icon\" svg-title=\"checked\" />\n <minus-small-icon v-if=\"isIndeterminate\" class=\"b-checkbox__icon\" svg-title=\"intermediate\" />\n <input\n ref=\"input\"\n role=\"checkbox\"\n class=\"b-checkbox__outline\"\n type=\"checkbox\"\n v-bind=\"$attrs\"\n :aria-label=\"computedAriaLabel\"\n :aria-checked=\"ariaChecked\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-invalid=\"ariaInvalid\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :indeterminate.prop=\"isIndeterminate\"\n :value=\"value\"\n :class=\"conditionalClassOutline\"\n :aria-readonly=\"readonly\"\n @change=\"onChange\"\n @click=\"onClick\"\n />\n </div>\n <span v-if=\"hasSlot('default') || shouldShowErrorMessage\" class=\"b-checkbox__text\">\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-checkbox__label\" el=\"span\" variant=\"body\">\n <slot></slot>\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-checkbox__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n <error-message v-if=\"shouldShowErrorMessage\" :id=\"errorId\" :error-message=\"errorMessage\" />\n </span>\n </label>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRefs } from 'vue';\n import {\n BentoCheckboxEvent,\n BentoCheckboxState,\n BentoCheckboxType,\n BentoMultiCheckboxType,\n } from './checkbox.types';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage } from '@/components/internal/error-message';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import MinusSmallIcon from '@adyen/ui-assets-icons-16/vue/minus-small';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { generateUid } from '@/utils/ts/unique-id';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useI18n } from '@/utils/ts/i18n';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { BentoCheckboxGroupItems } from './components/checkbox-group/checkbox-group.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Checkboxes are used to make a binary choice about an option.\n * The label tag area is also clickable.\n *\n * @usage\n * import { BentoCheckbox } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckbox },\n * template: `\n * <bento-checkbox>\n * Label text\n * <template #description>Sub label text</template>\n * </bento-checkbox>\n * `,\n * }\n */\n export default defineComponent({\n name: 'bento-checkbox',\n i18n: { messages },\n components: {\n BentoTypography,\n ErrorMessage,\n CheckmarkSmallIcon,\n MinusSmallIcon,\n },\n model: { prop: 'modelValue' },\n props: {\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n *\n * In the case of multiple checkboxes this value is used as a unique key.\n */\n value: { type: [String, Number], default: null },\n\n /**\n * When handling a single checkbox with a singular state, use a boolean.\n *\n * When handling multiple checkboxes, use an array of keys.\n * These keys exist as a set \"value\" prop for each checkbox.\n */\n modelValue: {\n type: [Boolean, Array] as PropType<BentoCheckboxType | BentoCheckboxGroupItems>,\n default: false,\n },\n\n /**\n * Setting this property to true will disable the checkbox in your form.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will set the checkbox to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will show the checkbox in error state.\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Renders the checkbox in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The :indeterminate CSS pseudo-class represents any form element\n * whose state is indeterminate, such as checkboxes which have their HTML indeterminate attribute\n * set to true, radio buttons which are members of a group in which all radio buttons are unchecked,\n * and indeterminate <progress> elements. https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate\n * This property lets you control the input.indeterminate native property.\n */\n indeterminate: { type: Boolean, default: false },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Accessible name for the radio button component. It is strongly recommended to pas this value in case this component is used without a label.\n */\n ariaLabel: { type: String, default: null },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { attrs, emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const descriptionId = generateUid('description');\n const errorId = generateUid('error');\n const hasSlot = useHasSlot(slots);\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const defaultSlotValue = getSlotText(slots)('default');\n const descriptionSlotValue = getSlotText(slots)('description');\n\n useDefaultSlotValidator('bento-checkbox', slots.default, slots.description);\n\n const isCheckboxGroup = computed(() => Array.isArray(modelValue.value));\n const isChecked = computed(() => {\n if (!isCheckboxGroup.value) {\n return modelValue.value as boolean;\n }\n\n return (modelValue.value as BentoMultiCheckboxType).some(item => item === value.value);\n });\n const isIndeterminate = computed(() => !isChecked.value && indeterminate.value);\n\n const shouldShowError = computed(\n () => !props.disabled && !props.readonly && (props.hasError || !!props.errorMessage)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !props.readonly && !!props.errorMessage);\n\n // ARIA fields\n const ariaChecked = computed<HTMLAttributes['aria-checked']>(() =>\n isIndeterminate.value ? 'mixed' : `${!!isChecked.value}`\n );\n\n const ariaDescribedBy = computed<HTMLAttributes['aria-describedby']>(\n () =>\n `${shouldShowErrorMessage.value ? errorId : ''} ${\n defaultSlotValue && descriptionSlotValue ? descriptionId : ''\n }`.trim() || null\n );\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: hasSlot('default')\n ? (getSlotText(slots)('default') as string)\n : t('ariaLabelFallback'),\n });\n\n const ariaInvalid = computed<HTMLAttributes['aria-invalid']>(() => shouldShowError.value);\n\n const conditionalClass = computed(() => ({\n [`b-checkbox--${BentoCheckboxState.DISABLED}`]: disabled.value,\n [`b-checkbox--${BentoCheckboxState.READONLY}`]: readonly.value,\n }));\n const conditionalClassOutline = computed(() => ({\n [`b-checkbox__outline--${BentoCheckboxState.UNCHECKED}`]: !isChecked.value && !isIndeterminate.value,\n [`b-checkbox__outline--${BentoCheckboxState.ERROR}`]: shouldShowError.value,\n [`b-checkbox__outline--${BentoCheckboxState.READONLY}`]: readonly.value,\n }));\n\n // readonly attr doesn't work with checkbox, so we need to manually ignore the click instead\n const onClick = (event: Event) => {\n if (readonly.value) {\n event.preventDefault();\n }\n };\n\n const onChange = (event: Event) => {\n if (disabled.value) {\n return;\n }\n\n const newValue: boolean = (event.target as HTMLInputElement).checked;\n\n if (isCheckboxGroup.value) {\n const newCheckedList = [...(modelValue.value as BentoMultiCheckboxType)];\n const index = newCheckedList.indexOf(value.value);\n\n if (index === -1) {\n newCheckedList.push(value.value);\n } else {\n newCheckedList.splice(index, 1);\n }\n emit(BentoCheckboxEvent.UPDATE, newCheckedList);\n emit(BentoCheckboxEvent.INPUT, newCheckedList);\n } else {\n emit(BentoCheckboxEvent.UPDATE, newValue);\n emit(BentoCheckboxEvent.INPUT, newValue);\n }\n };\n\n return {\n // Values\n descriptionId,\n errorId,\n ariaChecked,\n ariaDescribedBy,\n ariaInvalid,\n computedAriaLabel,\n conditionalClass,\n conditionalClassOutline,\n defaultSlotValue,\n descriptionSlotValue,\n isCheckboxGroup,\n isChecked,\n isIndeterminate,\n shouldShowErrorMessage,\n\n // Methods\n hasSlot,\n onChange,\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox.scss\" />\n"],"names":["BentoCheckboxState","BentoCheckboxState2","BentoCheckboxEvent","BentoCheckboxEvent2","uuid","_sfc_main$1","_sfc_main","defineComponent","messages","BentoTypography","ErrorMessage","CheckmarkSmall","MinusSmallIcon","props","attrs","emit","slots","t","useI18n","descriptionId","generateUid","errorId","hasSlot","useHasSlot","disabled","indeterminate","modelValue","readonly","value","toRefs","defaultSlotValue","getSlotText","descriptionSlotValue","useDefaultSlotValidator","isCheckboxGroup","computed","isChecked","item","isIndeterminate","shouldShowError","shouldShowErrorMessage","ariaChecked","ariaDescribedBy","ariaLabelAttribute","ref","ariaLabel","computedAriaLabel","useAriaLabel","ariaInvalid","conditionalClass","conditionalClassOutline","event","newValue","newCheckedList","index"],"mappings":";;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,sBACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;ACLZ,IAAAE,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;A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.5a69ce9d.js","sources":["../../src/components/checkbox/checkbox.types.ts","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/minus-small.vue","../../src/components/checkbox/checkbox.vue"],"sourcesContent":["export type BentoMultiCheckboxType = Array<string | number>;\nexport type BentoCheckboxType = boolean | BentoMultiCheckboxType;\n\nexport enum BentoCheckboxState {\n UNCHECKED = 'unchecked',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum BentoCheckboxEvent {\n UPDATE = 'update:model-value',\n INPUT = 'input',\n}\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.25 8C4.25 7.58579 4.58579 7.25 5 7.25H11C11.4142 7.25 11.75 7.58579 11.75 8C11.75 8.41421 11.4142 8.75 11 8.75H5C4.58579 8.75 4.25 8.41421 4.25 8Z\" 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 <label class=\"b-checkbox\" :class=\"conditionalClass\">\n <div class=\"b-checkbox__input-container\">\n <!-- Don't change order because it matters for CSS. Icons first -->\n <checkmark-small-icon v-if=\"isChecked\" class=\"b-checkbox__icon\" svg-title=\"checked\" />\n <minus-small-icon v-if=\"isIndeterminate\" class=\"b-checkbox__icon\" svg-title=\"intermediate\" />\n <input\n ref=\"input\"\n role=\"checkbox\"\n class=\"b-checkbox__outline\"\n type=\"checkbox\"\n v-bind=\"$attrs\"\n :aria-label=\"computedAriaLabel\"\n :aria-checked=\"ariaChecked\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-invalid=\"ariaInvalid\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :indeterminate.prop=\"isIndeterminate\"\n :value=\"value\"\n :class=\"conditionalClassOutline\"\n :aria-readonly=\"readonly\"\n @change=\"onChange\"\n @click=\"onClick\"\n />\n </div>\n <span v-if=\"hasSlot('default') || shouldShowErrorMessage\" class=\"b-checkbox__text\">\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-checkbox__label\" el=\"span\" variant=\"body\">\n <slot></slot>\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-checkbox__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n <error-message v-if=\"shouldShowErrorMessage\" :id=\"errorId\" :error-message=\"errorMessage\" />\n </span>\n </label>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRefs } from 'vue';\n import {\n BentoCheckboxEvent,\n BentoCheckboxState,\n BentoCheckboxType,\n BentoMultiCheckboxType,\n } from './checkbox.types';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage } from '@/components/internal/error-message';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import MinusSmallIcon from '@adyen/ui-assets-icons-16/vue/minus-small';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { generateUid } from '@/utils/ts/unique-id';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useI18n } from '@/utils/ts/i18n';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { BentoCheckboxGroupItems } from './components/checkbox-group/checkbox-group.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Checkboxes are used to make a binary choice about an option.\n * The label tag area is also clickable.\n *\n * @usage\n * import { BentoCheckbox } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckbox },\n * template: `\n * <bento-checkbox>\n * Label text\n * <template #description>Sub label text</template>\n * </bento-checkbox>\n * `,\n * }\n */\n export default defineComponent({\n name: 'bento-checkbox',\n i18n: { messages },\n components: {\n BentoTypography,\n ErrorMessage,\n CheckmarkSmallIcon,\n MinusSmallIcon,\n },\n model: { prop: 'modelValue' },\n props: {\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n *\n * In the case of multiple checkboxes this value is used as a unique key.\n */\n value: { type: [String, Number], default: null },\n\n /**\n * When handling a single checkbox with a singular state, use a boolean.\n *\n * When handling multiple checkboxes, use an array of keys.\n * These keys exist as a set \"value\" prop for each checkbox.\n */\n modelValue: {\n type: [Boolean, Array] as PropType<BentoCheckboxType | BentoCheckboxGroupItems>,\n default: false,\n },\n\n /**\n * Setting this property to true will disable the checkbox in your form.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will set the checkbox to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will show the checkbox in error state.\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Renders the checkbox in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The :indeterminate CSS pseudo-class represents any form element\n * whose state is indeterminate, such as checkboxes which have their HTML indeterminate attribute\n * set to true, radio buttons which are members of a group in which all radio buttons are unchecked,\n * and indeterminate <progress> elements. https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate\n * This property lets you control the input.indeterminate native property.\n */\n indeterminate: { type: Boolean, default: false },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Accessible name for the radio button component. It is strongly recommended to pas this value in case this component is used without a label.\n */\n ariaLabel: { type: String, default: null },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { attrs, emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const descriptionId = generateUid('description');\n const errorId = generateUid('error');\n const hasSlot = useHasSlot(slots);\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const defaultSlotValue = getSlotText(slots)('default');\n const descriptionSlotValue = getSlotText(slots)('description');\n\n useDefaultSlotValidator('bento-checkbox', slots.default, slots.description);\n\n const isCheckboxGroup = computed(() => Array.isArray(modelValue.value));\n const isChecked = computed(() => {\n if (!isCheckboxGroup.value) {\n return modelValue.value as boolean;\n }\n\n return (modelValue.value as BentoMultiCheckboxType).some(item => item === value.value);\n });\n const isIndeterminate = computed(() => !isChecked.value && indeterminate.value);\n\n const shouldShowError = computed(\n () => !props.disabled && !props.readonly && (props.hasError || !!props.errorMessage)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !props.readonly && !!props.errorMessage);\n\n // ARIA fields\n const ariaChecked = computed<HTMLAttributes['aria-checked']>(() =>\n isIndeterminate.value ? 'mixed' : `${!!isChecked.value}`\n );\n\n const ariaDescribedBy = computed<HTMLAttributes['aria-describedby']>(\n () =>\n `${shouldShowErrorMessage.value ? errorId : ''} ${\n defaultSlotValue && descriptionSlotValue ? descriptionId : ''\n }`.trim() || null\n );\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: hasSlot('default')\n ? (getSlotText(slots)('default') as string)\n : t('ariaLabelFallback'),\n });\n\n const ariaInvalid = computed<HTMLAttributes['aria-invalid']>(() => shouldShowError.value);\n\n const conditionalClass = computed(() => ({\n [`b-checkbox--${BentoCheckboxState.DISABLED}`]: disabled.value,\n [`b-checkbox--${BentoCheckboxState.READONLY}`]: readonly.value,\n }));\n const conditionalClassOutline = computed(() => ({\n [`b-checkbox__outline--${BentoCheckboxState.UNCHECKED}`]: !isChecked.value && !isIndeterminate.value,\n [`b-checkbox__outline--${BentoCheckboxState.ERROR}`]: shouldShowError.value,\n [`b-checkbox__outline--${BentoCheckboxState.READONLY}`]: readonly.value,\n }));\n\n // readonly attr doesn't work with checkbox, so we need to manually ignore the click instead\n const onClick = (event: Event) => {\n if (readonly.value) {\n event.preventDefault();\n }\n };\n\n const onChange = (event: Event) => {\n if (disabled.value) {\n return;\n }\n\n const newValue: boolean = (event.target as HTMLInputElement).checked;\n\n if (isCheckboxGroup.value) {\n const newCheckedList = [...(modelValue.value as BentoMultiCheckboxType)];\n const index = newCheckedList.indexOf(value.value);\n\n if (index === -1) {\n newCheckedList.push(value.value);\n } else {\n newCheckedList.splice(index, 1);\n }\n emit(BentoCheckboxEvent.UPDATE, newCheckedList);\n emit(BentoCheckboxEvent.INPUT, newCheckedList);\n } else {\n emit(BentoCheckboxEvent.UPDATE, newValue);\n emit(BentoCheckboxEvent.INPUT, newValue);\n }\n };\n\n return {\n // Values\n descriptionId,\n errorId,\n ariaChecked,\n ariaDescribedBy,\n ariaInvalid,\n computedAriaLabel,\n conditionalClass,\n conditionalClassOutline,\n defaultSlotValue,\n descriptionSlotValue,\n isCheckboxGroup,\n isChecked,\n isIndeterminate,\n shouldShowErrorMessage,\n\n // Methods\n hasSlot,\n onChange,\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox.scss\" />\n"],"names":["BentoCheckboxState","BentoCheckboxState2","BentoCheckboxEvent","BentoCheckboxEvent2","uuid","_sfc_main$1","_sfc_main","defineComponent","messages","BentoTypography","ErrorMessage","CheckmarkSmall","MinusSmallIcon","props","attrs","emit","slots","t","useI18n","descriptionId","generateUid","errorId","hasSlot","useHasSlot","disabled","indeterminate","modelValue","readonly","value","toRefs","defaultSlotValue","getSlotText","descriptionSlotValue","useDefaultSlotValidator","isCheckboxGroup","computed","isChecked","item","isIndeterminate","shouldShowError","shouldShowErrorMessage","ariaChecked","ariaDescribedBy","ariaLabelAttribute","ref","ariaLabel","computedAriaLabel","useAriaLabel","ariaInvalid","conditionalClass","conditionalClassOutline","event","newValue","newCheckedList","index"],"mappings":";;;;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,EAAAb,EAAA,QAAAmD,CAAA,GACAtC,EAAAb,EAAA,OAAAmD,CAAA;AAAA;AAEA,UAAAtC,EAAAb,EAAA,QAAAkD,CAAA,GACArC,EAAAb,EAAA,OAAAkD,CAAA;AAAA,MACA;AAAA,MAsBA,SAjDA,CAAAD,MAAA;AACA,QAAAxB,EAAA,SACAwB,EAAA,eAAA;AAAA,MACA;AAAA,IA+CA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as p, useAttrs as c, computed as l } from "vue";
2
- import { d as _, B as u } from "./index.45295dd3.js";
2
+ import { d as _, B as u } from "./index.1645ffcb.js";
3
3
  import { BentoInfoIcon as b } from "../info-icon.js";
4
4
  import { u as f } from "./i18n.155748d6.js";
5
5
  import { n as y } from "./_plugin-vue2_normalizer.71e2aa87.js";
@@ -84,4 +84,4 @@ const A = B.exports;
84
84
  export {
85
85
  A as C
86
86
  };
87
- //# sourceMappingURL=controls-group.5d3e04dd.js.map
87
+ //# sourceMappingURL=controls-group.a2a2916f.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"controls-group.5d3e04dd.js","sources":["../../src/components/internal/controls-group/controls-group.vue"],"sourcesContent":["<template>\n <fieldset\n class=\"b-controls-group\"\n :class=\"conditionalClasses\"\n :form=\"form\"\n :disabled=\"disabled\"\n :aria-describedby=\"ariaAttributes['aria-describedby']\"\n >\n <legend class=\"b-controls-group__label-container\" :class=\"legendConditionalClasses\">\n <div v-if=\"label\" class=\"b-controls-group__label\">\n <bento-typography el=\"span\" stronger>\n {{ label }}\n </bento-typography>\n\n <div>\n <bento-info-icon\n v-if=\"!!tooltipText\"\n class=\"b-controls-group__tooltip\"\n :tooltip-text=\"tooltipText\"\n />\n </div>\n <bento-typography v-if=\"optional\" class=\"b-controls-group__label-requirement\" el=\"span\">\n ({{ t('optional') }})\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-controls-group__label-requirement\" el=\"span\">\n ({{ t('required') }})\n </bento-typography>\n </div>\n <bento-typography v-if=\"description\" class=\"b-controls-group__description\" el=\"span\">\n {{ description }}\n </bento-typography>\n </legend>\n <slot />\n </fieldset>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useAttrs } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { useI18n } from '@/utils/ts/i18n';\n import { deprecate } from '@/utils/ts/deprecate';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n\n const props = defineProps({\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * Sets all child controls of the <fieldset> as disabled.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * The value of the id attribute of a <form> element the <fieldset> is to part of, even if it is not inside the form itself.\n */\n form: { type: String, default: null },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n * The label is shown when `hideLabel` is set to `true` or if `description` is passed\n */\n label: { type: String, required: true },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n });\n\n const ariaAttributes = computed(() => ({\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n }));\n\n const conditionalClasses = computed(() => ({\n 'b-controls-group--disabled': props.disabled,\n }));\n\n const legendConditionalClasses = computed(() => {\n const isLabelAndDescriptionPresent = props.label && props.description;\n const shouldShowLabel = isLabelAndDescriptionPresent || props.hideLabel === false;\n\n return {\n 'b-controls-group__label-container--hidden': !shouldShowLabel,\n };\n });\n\n // eslint-disable-next-line eqeqeq -- Needs to show deprecate message when hideLabel is not set and no description available\n const hasNoPropsDefined = !props.description && props.hideLabel == undefined;\n if (hasNoPropsDefined) {\n deprecate(\n `The property \\`label\\` will always be rendered by default.`,\n `After version 2.0.0, the label will be shown by default.\n To continue hiding the label set \\`:hide-label=\"true\"\\`. Up until version 2.0.0, to display the label set \\`hide-label=\"false\"\\`.\n \\`label\\` will always be rendered when \\`description\\` is passed alongside with \\`label\\``,\n `2.0.0`\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A controls group components should be used whenever it is necessary to group a set of controls (i.e. radio buttons or checkboxes)\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * NOTE: This component should not be used by itself but more implemented by other exported components\n * @example\n * import { ControlsGroup, BentoCheckbox } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { ControlsGroup, RadioButton },\n * template: `\n * <controls-group\n * label=\"Your group label\"\n * description=\"Description\"\n * >\n * <radio-button\n * disabled\n * value=\"inputRadio\"\n * >\n * Label text\n * </radio-button>\n * <radio-button\n * value=\"inputRadio\"\n * >\n * Another label text\n * </radio-button>\n * </controls-group>\n * `\n * };\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./controls-group.scss\" />\n"],"names":["__default__","messages","t","useI18n","attrs","useAttrs","ariaAttributes","computed","_a","conditionalClasses","props","legendConditionalClasses","hasNoPropsDefined","deprecate"],"mappings":";;;;;;;;;;;GAyJIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA9GA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,GA6CAC,IAAAC,EAAA,MAAA;;AAAA;AAAA,QAAuC,qBAAAC,IAAAJ,EAAA,kBAAA,MAAA,gBAAAI,EAAA;AAAA,MACqB;AAAA,KAAA,GAG5DC,IAAAF,EAAA,OAAA;AAAA,MAA2C,8BAAAG,EAAA;AAAA,IACH,EAAA,GAGxCC,IAAAJ,EAAA,OAII;AAAA,MAAO,6CAAA,EAHPG,EAAA,SAAAA,EAAA,eACAA,EAAA,cAAA;AAAA,IAGkD,EAClD,GAIJE,IAAA,CAAAF,EAAA,eAAAA,EAAA,aAAA;AACA,WAAAE,KACIC;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IAGA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"controls-group.a2a2916f.js","sources":["../../src/components/internal/controls-group/controls-group.vue"],"sourcesContent":["<template>\n <fieldset\n class=\"b-controls-group\"\n :class=\"conditionalClasses\"\n :form=\"form\"\n :disabled=\"disabled\"\n :aria-describedby=\"ariaAttributes['aria-describedby']\"\n >\n <legend class=\"b-controls-group__label-container\" :class=\"legendConditionalClasses\">\n <div v-if=\"label\" class=\"b-controls-group__label\">\n <bento-typography el=\"span\" stronger>\n {{ label }}\n </bento-typography>\n\n <div>\n <bento-info-icon\n v-if=\"!!tooltipText\"\n class=\"b-controls-group__tooltip\"\n :tooltip-text=\"tooltipText\"\n />\n </div>\n <bento-typography v-if=\"optional\" class=\"b-controls-group__label-requirement\" el=\"span\">\n ({{ t('optional') }})\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-controls-group__label-requirement\" el=\"span\">\n ({{ t('required') }})\n </bento-typography>\n </div>\n <bento-typography v-if=\"description\" class=\"b-controls-group__description\" el=\"span\">\n {{ description }}\n </bento-typography>\n </legend>\n <slot />\n </fieldset>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useAttrs } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { useI18n } from '@/utils/ts/i18n';\n import { deprecate } from '@/utils/ts/deprecate';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n\n const props = defineProps({\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * Sets all child controls of the <fieldset> as disabled.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * The value of the id attribute of a <form> element the <fieldset> is to part of, even if it is not inside the form itself.\n */\n form: { type: String, default: null },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n * The label is shown when `hideLabel` is set to `true` or if `description` is passed\n */\n label: { type: String, required: true },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n });\n\n const ariaAttributes = computed(() => ({\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n }));\n\n const conditionalClasses = computed(() => ({\n 'b-controls-group--disabled': props.disabled,\n }));\n\n const legendConditionalClasses = computed(() => {\n const isLabelAndDescriptionPresent = props.label && props.description;\n const shouldShowLabel = isLabelAndDescriptionPresent || props.hideLabel === false;\n\n return {\n 'b-controls-group__label-container--hidden': !shouldShowLabel,\n };\n });\n\n // eslint-disable-next-line eqeqeq -- Needs to show deprecate message when hideLabel is not set and no description available\n const hasNoPropsDefined = !props.description && props.hideLabel == undefined;\n if (hasNoPropsDefined) {\n deprecate(\n `The property \\`label\\` will always be rendered by default.`,\n `After version 2.0.0, the label will be shown by default.\n To continue hiding the label set \\`:hide-label=\"true\"\\`. Up until version 2.0.0, to display the label set \\`hide-label=\"false\"\\`.\n \\`label\\` will always be rendered when \\`description\\` is passed alongside with \\`label\\``,\n `2.0.0`\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A controls group components should be used whenever it is necessary to group a set of controls (i.e. radio buttons or checkboxes)\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * NOTE: This component should not be used by itself but more implemented by other exported components\n * @example\n * import { ControlsGroup, BentoCheckbox } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { ControlsGroup, RadioButton },\n * template: `\n * <controls-group\n * label=\"Your group label\"\n * description=\"Description\"\n * >\n * <radio-button\n * disabled\n * value=\"inputRadio\"\n * >\n * Label text\n * </radio-button>\n * <radio-button\n * value=\"inputRadio\"\n * >\n * Another label text\n * </radio-button>\n * </controls-group>\n * `\n * };\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./controls-group.scss\" />\n"],"names":["__default__","messages","t","useI18n","attrs","useAttrs","ariaAttributes","computed","_a","conditionalClasses","props","legendConditionalClasses","hasNoPropsDefined","deprecate"],"mappings":";;;;;;;;;;;GAyJIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA9GA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,GA6CAC,IAAAC,EAAA,MAAA;;AAAA;AAAA,QAAuC,qBAAAC,IAAAJ,EAAA,kBAAA,MAAA,gBAAAI,EAAA;AAAA,MACqB;AAAA,KAAA,GAG5DC,IAAAF,EAAA,OAAA;AAAA,MAA2C,8BAAAG,EAAA;AAAA,IACH,EAAA,GAGxCC,IAAAJ,EAAA,OAII;AAAA,MAAO,6CAAA,EAHPG,EAAA,SAAAA,EAAA,eACAA,EAAA,cAAA;AAAA,IAGkD,EAClD,GAIJE,IAAA,CAAAF,EAAA,eAAAA,EAAA,aAAA;AACA,WAAAE,KACIC;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IAGA;;;;;;;;;;;;;;;;;"}
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as p, ref as s, computed as _ } from "vue";
2
- import { a as u } from "./button.fb307df3.js";
2
+ import { a as u } from "./button.66df5734.js";
3
3
  import { PopperContainerPosition as d } from "../popper-container.js";
4
4
  import { u as v } from "./i18n.155748d6.js";
5
5
  import { n as c } from "./_plugin-vue2_normalizer.71e2aa87.js";
6
- import { b as f } from "./tooltip.a47ace87.js";
6
+ import { b as f } from "./tooltip.0297fd5d.js";
7
7
  import "../assets/copy.css";
8
8
  let i = 0;
9
9
  const y = {
@@ -100,4 +100,4 @@ const A = w.exports;
100
100
  export {
101
101
  A as C
102
102
  };
103
- //# sourceMappingURL=copy.ac796536.js.map
103
+ //# sourceMappingURL=copy.982e1b19.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"copy.ac796536.js","sources":["../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/copy.vue","../../src/components/internal/copy/copy.types.ts","../../src/components/internal/copy/copy.vue"],"sourcesContent":["\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=\"M3.5 1.25C2.25736 1.25 1.25 2.25736 1.25 3.5V8.5C1.25 9.74264 2.25736 10.75 3.5 10.75H5.25V12.5C5.25 13.7426 6.25736 14.75 7.5 14.75H12.5C13.7426 14.75 14.75 13.7426 14.75 12.5V7.5C14.75 6.25736 13.7426 5.25 12.5 5.25H10.75V3.5C10.75 2.25736 9.74264 1.25 8.5 1.25H3.5ZM9.25 5.25V3.5C9.25 3.08579 8.91421 2.75 8.5 2.75H3.5C3.08579 2.75 2.75 3.08579 2.75 3.5V8.5C2.75 8.91421 3.08579 9.25 3.5 9.25H5.25V7.5C5.25 6.25736 6.25736 5.25 7.5 5.25H9.25ZM6.75 12.5C6.75 12.9142 7.08579 13.25 7.5 13.25H12.5C12.9142 13.25 13.25 12.9142 13.25 12.5V7.5C13.25 7.08579 12.9142 6.75 12.5 6.75H7.5C7.08579 6.75 6.75 7.08579 6.75 7.5V12.5Z\" 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","export enum CopyTooltipState {\n DEFAULT = 'default',\n COPYING = 'copying',\n ERROR = 'error',\n}\n","<template>\n <div class=\"b-copy\" @mouseleave=\"resetText\" @focusout=\"resetText\">\n <span v-if=\"$slots.default\" v-bento-tooltip-directive:[tooltipPosition]=\"copyText\" @click=\"onClickCopy\">\n <slot />\n </span>\n <bento-button\n v-else\n v-bento-tooltip-directive:[tooltipPosition]=\"copyText\"\n variant=\"tertiary\"\n @click=\"onClickCopy\"\n >\n <template #iconLeft>\n <copy-icon :svg-title=\"$t('copy')\" />\n </template>\n </bento-button>\n <div v-if=\"showScreenReaderAlert\" role=\"alert\" class=\"b-copy__screen-reader-alert\">{{ $t('copied') }}</div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { PopperContainerPosition } from '@/components/popper-container';\n import { BentoTooltipDirective } from '@/directives';\n import { useI18n } from '@/utils/ts/i18n';\n import CopyIcon from '@adyen/ui-assets-icons-16/vue/copy';\n import messages from './messages.json';\n import { CopyTooltipState } from './copy.types';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * An internal button component that copies text to the user's clipboard.\n *\n * @example\n * import { Copy } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { Copy },\n * template: `\n * <copy :text=\"textToCopy\" />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'copy',\n components: { BentoButton, CopyIcon },\n directives: { BentoTooltipDirective },\n props: {\n /**\n * Defines the string that will get copied to the clipboard\n */\n text: {\n type: String,\n required: true,\n },\n\n /**\n * Position the tooltip should take if space is available. Defaults to 'top'\n */\n tooltipPosition: {\n type: String as PropType<PopperContainerPosition>,\n default: PopperContainerPosition.TOP,\n },\n },\n setup(props) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const copyState = ref<CopyTooltipState>(CopyTooltipState.DEFAULT);\n\n const showScreenReaderAlert = ref(false);\n const onClickCopy = async () => {\n try {\n await navigator.clipboard.writeText(props.text);\n copyState.value = CopyTooltipState.COPYING;\n showScreenReaderAlert.value = true;\n } catch (e) {\n copyState.value = CopyTooltipState.ERROR;\n }\n };\n\n const resetText = () => {\n copyState.value = CopyTooltipState.DEFAULT;\n showScreenReaderAlert.value = false;\n };\n\n const copyText = computed(() => {\n switch (copyState.value) {\n case CopyTooltipState.COPYING:\n return t('copied');\n case CopyTooltipState.ERROR:\n return t('copyFailed');\n case CopyTooltipState.DEFAULT:\n default:\n return t('copy');\n }\n });\n\n return {\n copyText,\n onClickCopy,\n resetText,\n showScreenReaderAlert,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./copy.scss\" />\n"],"names":["uuid","_sfc_main$1","CopyTooltipState","CopyTooltipState2","_sfc_main","defineComponent","messages","BentoButton","CopyIcon","BentoTooltipDirective","PopperContainerPosition","props","t","useI18n","copyState","ref","showScreenReaderAlert","onClickCopy","resetText","computed"],"mappings":";;;;;;;AAKA,IAAAA,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;ACZY,IAAAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA;AC4CZ,MAAAE,IAAAC,EAAA;AAAA,EAAA,MAAA,EAAA,UAAAC,EAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA,EAAA,aAAAC,GAAA,UAAAC,EAAA;AAAA,EACA,YAAA,EAAA,uBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,MAAA;AAAA,MAIA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,iBAAA;AAAA,MAKA,MAAA;AAAA,MACA,SAAAC,EAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,MAAAC,GAAA;AAEA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAAb,EAAA,OAAA,GAEAc,IAAAD,EAAA,EAAA,GACAE,IAAA,YAAA;AACA,UAAA;AACA,cAAA,UAAA,UAAA,UAAAN,EAAA,IAAA,GACAG,EAAA,QAAAZ,EAAA,SACAc,EAAA,QAAA;AAAA,MAAA,QAAA;AAEA,QAAAF,EAAA,QAAAZ,EAAA;AAAA,MAAA;AAAA,IACA,GAGAgB,IAAA,MAAA;AACA,MAAAJ,EAAA,QAAAZ,EAAA,SACAc,EAAA,QAAA;AAAA,IAAA;AAeA,WAAA;AAAA,MAAA,UAZAG,EAAA,MAAA;AACA,gBAAAL,EAAA,OAAA;AAAA,UAAA,KAAAZ,EAAA;AAEA,mBAAAU,EAAA,QAAA;AAAA,UAAA,KAAAV,EAAA;AAEA,mBAAAU,EAAA,YAAA;AAAA,UAAA,KAAAV,EAAA;AAAA,UACA;AAEA,mBAAAU,EAAA,MAAA;AAAA,QAAA;AAAA,MACA,CAAA;AAAA,MAIA,aAAAK;AAAA,MACA,WAAAC;AAAA,MACA,uBAAAF;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"copy.982e1b19.js","sources":["../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/copy.vue","../../src/components/internal/copy/copy.types.ts","../../src/components/internal/copy/copy.vue"],"sourcesContent":["\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=\"M3.5 1.25C2.25736 1.25 1.25 2.25736 1.25 3.5V8.5C1.25 9.74264 2.25736 10.75 3.5 10.75H5.25V12.5C5.25 13.7426 6.25736 14.75 7.5 14.75H12.5C13.7426 14.75 14.75 13.7426 14.75 12.5V7.5C14.75 6.25736 13.7426 5.25 12.5 5.25H10.75V3.5C10.75 2.25736 9.74264 1.25 8.5 1.25H3.5ZM9.25 5.25V3.5C9.25 3.08579 8.91421 2.75 8.5 2.75H3.5C3.08579 2.75 2.75 3.08579 2.75 3.5V8.5C2.75 8.91421 3.08579 9.25 3.5 9.25H5.25V7.5C5.25 6.25736 6.25736 5.25 7.5 5.25H9.25ZM6.75 12.5C6.75 12.9142 7.08579 13.25 7.5 13.25H12.5C12.9142 13.25 13.25 12.9142 13.25 12.5V7.5C13.25 7.08579 12.9142 6.75 12.5 6.75H7.5C7.08579 6.75 6.75 7.08579 6.75 7.5V12.5Z\" 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","export enum CopyTooltipState {\n DEFAULT = 'default',\n COPYING = 'copying',\n ERROR = 'error',\n}\n","<template>\n <div class=\"b-copy\" @mouseleave=\"resetText\" @focusout=\"resetText\">\n <span v-if=\"$slots.default\" v-bento-tooltip-directive:[tooltipPosition]=\"copyText\" @click=\"onClickCopy\">\n <slot />\n </span>\n <bento-button\n v-else\n v-bento-tooltip-directive:[tooltipPosition]=\"copyText\"\n variant=\"tertiary\"\n @click=\"onClickCopy\"\n >\n <template #iconLeft>\n <copy-icon :svg-title=\"$t('copy')\" />\n </template>\n </bento-button>\n <div v-if=\"showScreenReaderAlert\" role=\"alert\" class=\"b-copy__screen-reader-alert\">{{ $t('copied') }}</div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { PopperContainerPosition } from '@/components/popper-container';\n import { BentoTooltipDirective } from '@/directives';\n import { useI18n } from '@/utils/ts/i18n';\n import CopyIcon from '@adyen/ui-assets-icons-16/vue/copy';\n import messages from './messages.json';\n import { CopyTooltipState } from './copy.types';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * An internal button component that copies text to the user's clipboard.\n *\n * @example\n * import { Copy } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { Copy },\n * template: `\n * <copy :text=\"textToCopy\" />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'copy',\n components: { BentoButton, CopyIcon },\n directives: { BentoTooltipDirective },\n props: {\n /**\n * Defines the string that will get copied to the clipboard\n */\n text: {\n type: String,\n required: true,\n },\n\n /**\n * Position the tooltip should take if space is available. Defaults to 'top'\n */\n tooltipPosition: {\n type: String as PropType<PopperContainerPosition>,\n default: PopperContainerPosition.TOP,\n },\n },\n setup(props) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const copyState = ref<CopyTooltipState>(CopyTooltipState.DEFAULT);\n\n const showScreenReaderAlert = ref(false);\n const onClickCopy = async () => {\n try {\n await navigator.clipboard.writeText(props.text);\n copyState.value = CopyTooltipState.COPYING;\n showScreenReaderAlert.value = true;\n } catch (e) {\n copyState.value = CopyTooltipState.ERROR;\n }\n };\n\n const resetText = () => {\n copyState.value = CopyTooltipState.DEFAULT;\n showScreenReaderAlert.value = false;\n };\n\n const copyText = computed(() => {\n switch (copyState.value) {\n case CopyTooltipState.COPYING:\n return t('copied');\n case CopyTooltipState.ERROR:\n return t('copyFailed');\n case CopyTooltipState.DEFAULT:\n default:\n return t('copy');\n }\n });\n\n return {\n copyText,\n onClickCopy,\n resetText,\n showScreenReaderAlert,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./copy.scss\" />\n"],"names":["uuid","_sfc_main$1","CopyTooltipState","CopyTooltipState2","_sfc_main","defineComponent","messages","BentoButton","CopyIcon","BentoTooltipDirective","PopperContainerPosition","props","t","useI18n","copyState","ref","showScreenReaderAl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A,UAAA,KAAAV,EAAA;AAAA,UACA;AAEA,mBAAAU,EAAA,MAAA;AAAA,QAAA;AAAA,MACA,CAAA;AAAA,MAIA,aAAAK;AAAA,MACA,WAAAC;AAAA,MACA,uBAAAF;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as x, ref as w, computed as i } from "vue";
2
2
  import { g as E } from "./unique-id.a2a2b458.js";
3
3
  import { u as I } from "./use-has-slot.6052d56a.js";
4
- import { B as S } from "./index.45295dd3.js";
4
+ import { B as S } from "./index.1645ffcb.js";
5
5
  import { d as O, B as D } from "./debounce.f8d92e44.js";
6
6
  import { C as N } from "./cross-circle-fill.d5e9ae44.js";
7
7
  import { n as m } from "./_plugin-vue2_normalizer.71e2aa87.js";
@@ -344,4 +344,4 @@ export {
344
344
  d as b,
345
345
  J as c
346
346
  };
347
- //# sourceMappingURL=dropdown-default-textbox.109c36d2.js.map
347
+ //# sourceMappingURL=dropdown-default-textbox.9bef4138.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-default-textbox.109c36d2.js","sources":["../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["import { PropType } from 'vue';\nimport { Booleanish } from '@/types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'open',\n KEYDOWN = 'keydown',\n CLOSE = 'close',\n INPUT = 'input',\n CLEAR = 'clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"dynamicFiltering\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n :tabindex=\"0\"\n >\n <!-- <span :aria-hidden=\"!displayValue ? true : null\"> -->\n <slot v-if=\"selectedValueItem && !multiple\" v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n <template v-else-if=\"selectedValueItem && showSlotContentInMultiple\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n <!-- </span> -->\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n tabindex=\"0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-icon :svg-title=\"'clearSearch'\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoKeyboardNavigationKeyDownEvent, BentoListboxOptionItem, Booleanish } from '@/types';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n name: 'dropdown-base-textbox',\n components: { BentoTypography, CrossCircleFillIcon },\n inheritAttrs: false,\n props: {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n },\n emits: [\n DropdownBaseTextboxEvent.OPEN,\n DropdownBaseTextboxEvent.CLOSE,\n DropdownBaseTextboxEvent.INPUT,\n DropdownBaseTextboxEvent.CLEAR,\n DropdownBaseTextboxEvent.KEYDOWN,\n ],\n setup(props, { emit, slots, attrs }) {\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n } as HTMLAttributes)\n );\n\n /**\n * Triggered on click, space and enter user events. It will open the dropdown.\n * @event open\n */\n const onOpenDropdown = () => {\n if (!props.disabled && !props.readonly) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.OPEN);\n }\n };\n\n /**\n * Triggered on click, space, enter and esc user events. It will close the dropdown.\n * @event close\n */\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent =\n props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = debounce<(event: Event) => void>((event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n }, props.debounceTime);\n\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as BentoListboxOptionItem[]) : []\n );\n\n return {\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n DropdownBaseTextboxEvent,\n\n // Values\n conditionalClasses,\n textboxId,\n textbox,\n isFiltering,\n ariaAttributes,\n selectedValueItems,\n\n // Events\n onCloseDropdown,\n onToggleDropdown,\n onClearSearch,\n onInputEvent,\n\n // Methods\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n components: { ChevronDownIcon, ChevronUpIcon, DropdownBaseTextbox },\n inheritAttrs: false,\n emits: [\n DropdownBaseTextboxEvent.OPEN,\n DropdownBaseTextboxEvent.CLOSE,\n DropdownBaseTextboxEvent.INPUT,\n DropdownBaseTextboxEvent.CLEAR,\n DropdownBaseTextboxEvent.KEYDOWN,\n ],\n props: {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n },\n setup(props, { slots, emit }) {\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (e: Event) => {\n emit(DropdownBaseTextboxEvent.INPUT, e);\n };\n const onKeyDown = (e: Event) => {\n emit(DropdownBaseTextboxEvent.KEYDOWN, e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.OPEN);\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.CLOSE);\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.CLEAR);\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n return {\n // Enums\n DropdownBaseTextboxEvent,\n\n // Values\n conditionalClasses,\n isDropdownOpen,\n slots,\n\n // Events\n listeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","_sfc_main$1","defineComponent","BentoTypography","CrossCircleIcon","props","emit","slots","attrs","textbox","ref","textboxId","generateUid","conditionalClasses","computed","isFiltering","ariaAttributes","_a","onOpenDropdown","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","selectedValueItems","BentoKeyboardNavigationKeyDownEvent","useHasSlot","_sfc_main","ChevronDownIcon","ChevronUpIcon","DropdownBaseTextbox","isDropdownOpen","onInput","e","onKeyDown","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;AA0EY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA;ACQZ,MAAAE,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,iBAAAC,GAAA,qBAAAC,EAAA;AAAA,EACA,cAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,yBAAA,EAAA,MAAA,QAAA,SAAA,EAAA;AAAA;AAAA;AAAA;AAAA,IAIA,cAAA;AAAA,MAKA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,cAAA;AAAA,MAKA,MAAA,CAAA,QAAA,OAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,WAAA;AAAA,MAKA,MAA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;AAAA,IAAA,GAEAE,IAAA,CAAAF,MAAA;AACA,MAAAG,EAAAH,CAAA,GACA5B,EAAAP,EAAA,IAAA;AAAA,IAAA,GAEAuC,IAAA,CAAAJ,MAAA;AACA,MAAAG,EAAAH,CAAA,GACA5B,EAAAP,EAAA,KAAA;AAAA,IAAA,GAEAwC,IAAA,CAAAL,MAAA;AACA,MAAAG,EAAAH,CAAA,GACA5B,EAAAP,EAAA,KAAA;AAAA,IAAA,GAGAyC,IAAA;AAAA,MAAA,CAAAzC,EAAA,KAAA,GAAAkC;AAAA,MACA,CAAAlC,EAAA,IAAA,GAAAqC;AAAA,MACA,CAAArC,EAAA,KAAA,GAAAuC;AAAA,MACA,CAAAvC,EAAA,KAAA,GAAAwC;AAAA,MACA,CAAAxC,EAAA,OAAA,GAAAoC;AAAA,IACA;AAGA,WAAA;AAAA;AAAA,MAAA,0BAAApC;AAAA;AAAA,MAEA,oBAAAc;AAAA,MAGA,gBAAAmB;AAAA,MACA,OAAAzB;AAAA;AAAA,MACA,WAAAiC;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dropdown-default-textbox.9bef4138.js","sources":["../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["import { PropType } from 'vue';\nimport { Booleanish } from '@/types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'open',\n KEYDOWN = 'keydown',\n CLOSE = 'close',\n INPUT = 'input',\n CLEAR = 'clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"dynamicFiltering\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n :tabindex=\"0\"\n >\n <!-- <span :aria-hidden=\"!displayValue ? true : null\"> -->\n <slot v-if=\"selectedValueItem && !multiple\" v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n <template v-else-if=\"selectedValueItem && showSlotContentInMultiple\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n <!-- </span> -->\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n tabindex=\"0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-icon :svg-title=\"'clearSearch'\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoKeyboardNavigationKeyDownEvent, BentoListboxOptionItem, Booleanish } from '@/types';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n name: 'dropdown-base-textbox',\n components: { BentoTypography, CrossCircleFillIcon },\n inheritAttrs: false,\n props: {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n },\n emits: [\n DropdownBaseTextboxEvent.OPEN,\n DropdownBaseTextboxEvent.CLOSE,\n DropdownBaseTextboxEvent.INPUT,\n DropdownBaseTextboxEvent.CLEAR,\n DropdownBaseTextboxEvent.KEYDOWN,\n ],\n setup(props, { emit, slots, attrs }) {\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n } as HTMLAttributes)\n );\n\n /**\n * Triggered on click, space and enter user events. It will open the dropdown.\n * @event open\n */\n const onOpenDropdown = () => {\n if (!props.disabled && !props.readonly) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.OPEN);\n }\n };\n\n /**\n * Triggered on click, space, enter and esc user events. It will close the dropdown.\n * @event close\n */\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent =\n props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = debounce<(event: Event) => void>((event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n }, props.debounceTime);\n\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as BentoListboxOptionItem[]) : []\n );\n\n return {\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n DropdownBaseTextboxEvent,\n\n // Values\n conditionalClasses,\n textboxId,\n textbox,\n isFiltering,\n ariaAttributes,\n selectedValueItems,\n\n // Events\n onCloseDropdown,\n onToggleDropdown,\n onClearSearch,\n onInputEvent,\n\n // Methods\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n components: { ChevronDownIcon, ChevronUpIcon, DropdownBaseTextbox },\n inheritAttrs: false,\n emits: [\n DropdownBaseTextboxEvent.OPEN,\n DropdownBaseTextboxEvent.CLOSE,\n DropdownBaseTextboxEvent.INPUT,\n DropdownBaseTextboxEvent.CLEAR,\n DropdownBaseTextboxEvent.KEYDOWN,\n ],\n props: {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n },\n setup(props, { slots, emit }) {\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (e: Event) => {\n emit(DropdownBaseTextboxEvent.INPUT, e);\n };\n const onKeyDown = (e: Event) => {\n emit(DropdownBaseTextboxEvent.KEYDOWN, e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.OPEN);\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.CLOSE);\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.CLEAR);\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n return {\n // Enums\n DropdownBaseTextboxEvent,\n\n // Values\n conditionalClasses,\n isDropdownOpen,\n slots,\n\n // Events\n listeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","_sfc_main$1","defineComponent","BentoTypography","CrossCircleIcon","props","emit","slots","attrs","textbox","ref","textboxId","generateUid","conditionalClasses","computed","isFiltering","ariaAttributes","_a","onOpenDropdown","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","selectedValueItems","BentoKeyboardNavigationKeyDownEvent","useHasSlot","_sfc_main","ChevronDownIcon","ChevronUpIcon","DropdownBaseTextbox","isDropdownOpen","onInput","e","onKeyDown","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;AA0EY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA;ACQZ,MAAAE,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,iBAAAC,GAAA,qBAAAC,EAAA;AAAA,EACA,cAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,yBAAA,EAAA,MAAA,QAAA,SAAA,EAAA;AAAA;AAAA;AAAA;AAAA,IAIA,cAAA;AAAA,MAKA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,cAAA;AAAA,MAKA,MAAA,CAAA,QAAA,OAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,I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AAAP,EAAA,SAAAmC,CAAA;AAAA,IAAA,GAEAE,IAAA,CAAAF,MAAA;AACA,MAAAG,EAAAH,CAAA,GACA5B,EAAAP,EAAA,IAAA;AAAA,IAAA,GAEAuC,IAAA,CAAAJ,MAAA;AACA,MAAAG,EAAAH,CAAA,GACA5B,EAAAP,EAAA,KAAA;AAAA,IAAA,GAEAwC,IAAA,CAAAL,MAAA;AACA,MAAAG,EAAAH,CAAA,GACA5B,EAAAP,EAAA,KAAA;AAAA,IAAA,GAGAyC,IAAA;AAAA,MAAA,CAAAzC,EAAA,KAAA,GAAAkC;AAAA,MACA,CAAAlC,EAAA,IAAA,GAAAqC;AAAA,MACA,CAAArC,EAAA,KAAA,GAAAuC;AAAA,MACA,CAAAvC,EAAA,KAAA,GAAAwC;AAAA,MACA,CAAAxC,EAAA,OAAA,GAAAoC;AAAA,IACA;AAGA,WAAA;AAAA;AAAA,MAAA,0BAAApC;AAAA;AAAA,MAEA,oBAAAc;AAAA,MAGA,gBAAAmB;AAAA,MACA,OAAAzB;AAAA;AAAA,MACA,WAAAiC;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,17 +1,17 @@
1
1
  import { ref as b, watch as V, computed as c, defineComponent as F, toRefs as J, nextTick as C, toRef as L } from "vue";
2
- import { D as re, a as $, b as A, c as de } from "./dropdown-default-textbox.109c36d2.js";
2
+ import { D as re, a as $, b as A, c as de } from "./dropdown-default-textbox.9bef4138.js";
3
3
  import { n as B } from "./_plugin-vue2_normalizer.71e2aa87.js";
4
- import { B as ue, d as ce } from "./index.45295dd3.js";
4
+ import { B as ue, d as ce } from "./index.1645ffcb.js";
5
5
  import { g as R } from "./unique-id.a2a2b458.js";
6
6
  import { u as K } from "./i18n.155748d6.js";
7
7
  import { u as fe } from "./aria-label.ac9651a5.js";
8
- import { a as s, B as M, b as P } from "./listbox.e792d2d6.js";
8
+ import { a as s, B as M, b as P } from "./listbox.cbf47484.js";
9
9
  import { B as O, a as pe } from "./debounce.f8d92e44.js";
10
10
  import { u as ve } from "./use-form-layout-loading.d03e5d48.js";
11
11
  import { PopperContainer as N } from "../popper-container.js";
12
12
  import { BentoPopover as U } from "../popover.js";
13
13
  import { BentoButtonActionsLayout as _e } from "../button.js";
14
- import { E as be } from "./error-message.3b3c33d4.js";
14
+ import { E as be } from "./error-message.7a5db7f6.js";
15
15
  import { B as me } from "./directive.0408e565.js";
16
16
  import "../assets/dropdown.css";
17
17
  var E = /* @__PURE__ */ ((t) => (t.DEFAULT = "DropdownInputDefault", t.SMALL = "DropdownInputSmall", t))(E || {});
@@ -798,4 +798,4 @@ export {
798
798
  E as a,
799
799
  ke as u
800
800
  };
801
- //# sourceMappingURL=dropdown.fd93f0ce.js.map
801
+ //# sourceMappingURL=dropdown.15cc1c45.js.map