@adyen/bento-vue3 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 (134) hide show
  1. package/dist/accordion.js +2 -2
  2. package/dist/alert.js +3 -3
  3. package/dist/assets/index.css +1 -1
  4. package/dist/assets/index10.css +1 -1
  5. package/dist/assets/index11.css +1 -1
  6. package/dist/assets/index12.css +1 -1
  7. package/dist/assets/index13.css +1 -1
  8. package/dist/assets/index14.css +1 -1
  9. package/dist/assets/index15.css +1 -1
  10. package/dist/assets/index16.css +1 -1
  11. package/dist/assets/index17.css +1 -1
  12. package/dist/assets/index18.css +1 -1
  13. package/dist/assets/index19.css +1 -1
  14. package/dist/assets/index2.css +1 -1
  15. package/dist/assets/index20.css +1 -1
  16. package/dist/assets/index21.css +1 -1
  17. package/dist/assets/index22.css +1 -1
  18. package/dist/assets/index23.css +1 -1
  19. package/dist/assets/index24.css +1 -1
  20. package/dist/assets/index25.css +1 -1
  21. package/dist/assets/index26.css +1 -1
  22. package/dist/assets/index27.css +1 -1
  23. package/dist/assets/index28.css +1 -1
  24. package/dist/assets/index3.css +1 -1
  25. package/dist/assets/index30.css +1 -1
  26. package/dist/assets/index31.css +1 -1
  27. package/dist/assets/index32.css +1 -1
  28. package/dist/assets/index33.css +1 -1
  29. package/dist/assets/index34.css +1 -1
  30. package/dist/assets/index35.css +1 -1
  31. package/dist/assets/index36.css +1 -1
  32. package/dist/assets/index37.css +1 -1
  33. package/dist/assets/index38.css +1 -1
  34. package/dist/assets/index39.css +1 -1
  35. package/dist/assets/index4.css +1 -1
  36. package/dist/assets/index40.css +1 -1
  37. package/dist/assets/index41.css +1 -1
  38. package/dist/assets/index42.css +1 -1
  39. package/dist/assets/index5.css +1 -1
  40. package/dist/assets/index6.css +1 -1
  41. package/dist/assets/index7.css +1 -1
  42. package/dist/assets/index8.css +1 -1
  43. package/dist/assets/index9.css +1 -1
  44. package/dist/avatar-image.js +1 -1
  45. package/dist/badge.js +1 -1
  46. package/dist/button.js +5 -5
  47. package/dist/card.js +2 -2
  48. package/dist/checkbox.js +6 -6
  49. package/dist/chunks/{base-button.6d2843c2.js → base-button.c4ac1ad1.js} +2 -2
  50. package/dist/chunks/{base-button.6d2843c2.js.map → base-button.c4ac1ad1.js.map} +1 -1
  51. package/dist/chunks/{base-modal.3ccb9eb5.js → base-modal.db7a9829.js} +4 -4
  52. package/dist/chunks/{base-modal.3ccb9eb5.js.map → base-modal.db7a9829.js.map} +1 -1
  53. package/dist/chunks/{button.a8462029.js → button.7d09c245.js} +2 -2
  54. package/dist/chunks/{button.a8462029.js.map → button.7d09c245.js.map} +1 -1
  55. package/dist/chunks/{calendar.3f930683.js → calendar.0e42130b.js} +4 -4
  56. package/dist/chunks/{calendar.3f930683.js.map → calendar.0e42130b.js.map} +1 -1
  57. package/dist/chunks/{checkbox.5e1e05ae.js → checkbox.17462cb0.js} +3 -3
  58. package/dist/chunks/{checkbox.5e1e05ae.js.map → checkbox.17462cb0.js.map} +1 -1
  59. package/dist/chunks/{controls-group.3b0dfb94.js → controls-group.0d6db9c0.js} +2 -2
  60. package/dist/chunks/{controls-group.3b0dfb94.js.map → controls-group.0d6db9c0.js.map} +1 -1
  61. package/dist/chunks/{copy.1d14b783.js → copy.c9a29be0.js} +3 -3
  62. package/dist/chunks/{copy.1d14b783.js.map → copy.c9a29be0.js.map} +1 -1
  63. package/dist/chunks/{dropdown-default-textbox.a90e84f9.js → dropdown-default-textbox.cd789a95.js} +2 -2
  64. package/dist/chunks/{dropdown-default-textbox.a90e84f9.js.map → dropdown-default-textbox.cd789a95.js.map} +1 -1
  65. package/dist/chunks/{dropdown.b798a82e.js → dropdown.ff4f94a8.js} +22 -22
  66. package/dist/chunks/{dropdown.b798a82e.js.map → dropdown.ff4f94a8.js.map} +1 -1
  67. package/dist/chunks/{error-message.9acead25.js → error-message.8c67a507.js} +2 -2
  68. package/dist/chunks/{error-message.9acead25.js.map → error-message.8c67a507.js.map} +1 -1
  69. package/dist/chunks/{footer-actions.9537d0df.js → footer-actions.a587e374.js} +3 -3
  70. package/dist/chunks/{footer-actions.9537d0df.js.map → footer-actions.a587e374.js.map} +1 -1
  71. package/dist/chunks/{index.e84dbeae.js → index.140bf28f.js} +2 -2
  72. package/dist/chunks/{index.e84dbeae.js.map → index.140bf28f.js.map} +1 -1
  73. package/dist/chunks/{index.228ecda0.js → index.450b70d5.js} +3 -3
  74. package/dist/chunks/{index.228ecda0.js.map → index.450b70d5.js.map} +1 -1
  75. package/dist/chunks/{index.89b00b94.js → index.77c651df.js} +2 -2
  76. package/dist/chunks/{index.89b00b94.js.map → index.77c651df.js.map} +1 -1
  77. package/dist/chunks/{index.9d8273fc.js → index.ee69b530.js} +6 -6
  78. package/dist/chunks/{index.9d8273fc.js.map → index.ee69b530.js.map} +1 -1
  79. package/dist/chunks/{index.c2a80208.js → index.fd1cd23a.js} +20 -20
  80. package/dist/chunks/{index.c2a80208.js.map → index.fd1cd23a.js.map} +1 -1
  81. package/dist/chunks/{index.d26fdf71.js → index.fdb0c13d.js} +2 -2
  82. package/dist/chunks/{index.d26fdf71.js.map → index.fdb0c13d.js.map} +1 -1
  83. package/dist/chunks/{listbox-option-tag.0c9c571e.js → listbox-option-tag.ffe70226.js} +3 -3
  84. package/dist/chunks/{listbox-option-tag.0c9c571e.js.map → listbox-option-tag.ffe70226.js.map} +1 -1
  85. package/dist/chunks/{listbox.6b52af1a.js → listbox.f535a736.js} +4 -4
  86. package/dist/chunks/{listbox.6b52af1a.js.map → listbox.f535a736.js.map} +1 -1
  87. package/dist/chunks/{loading-button.081adbf3.js → loading-button.bc6e3967.js} +2 -2
  88. package/dist/chunks/{loading-button.081adbf3.js.map → loading-button.bc6e3967.js.map} +1 -1
  89. package/dist/chunks/{tooltip.e4e34b86.js → tooltip.973c86d3.js} +2 -2
  90. package/dist/chunks/{tooltip.e4e34b86.js.map → tooltip.973c86d3.js.map} +1 -1
  91. package/dist/code-snippet.js +7 -7
  92. package/dist/country.js +2 -2
  93. package/dist/currency.js +1 -1
  94. package/dist/data-grid.js +192 -189
  95. package/dist/data-grid.js.map +1 -1
  96. package/dist/date-picker.js +20 -20
  97. package/dist/date-picker.js.map +1 -1
  98. package/dist/date-range-picker.js +2 -2
  99. package/dist/date.js +1 -1
  100. package/dist/divider.js +1 -1
  101. package/dist/dropdown.js +4 -4
  102. package/dist/empty-state.js +3 -3
  103. package/dist/filter-bar.js +13 -13
  104. package/dist/focus-trap.js +1 -1
  105. package/dist/form-layout.js +2 -2
  106. package/dist/header.js +2 -2
  107. package/dist/index.js +14 -14
  108. package/dist/info-icon.js +2 -2
  109. package/dist/input-field.js +4 -4
  110. package/dist/internal.js +6 -6
  111. package/dist/link.js +2 -2
  112. package/dist/loading-indicator.js +1 -1
  113. package/dist/menu.js +4 -4
  114. package/dist/modal.js +3 -3
  115. package/dist/pagination.js +3 -3
  116. package/dist/payment-method.js +2 -2
  117. package/dist/popover.js +3 -3
  118. package/dist/popper-container.js +2 -2
  119. package/dist/radio-group.js +4 -4
  120. package/dist/search-bar.js +2 -2
  121. package/dist/segmented-control.js +4 -4
  122. package/dist/sidepanel.js +5 -5
  123. package/dist/status.js +1 -1
  124. package/dist/structured-list.js +1 -1
  125. package/dist/summary-grid.js +3 -3
  126. package/dist/tabs.js +2 -2
  127. package/dist/tag.js +3 -3
  128. package/dist/textarea.js +4 -4
  129. package/dist/timeline.js +5 -5
  130. package/dist/toast.js +3 -3
  131. package/dist/toggle.js +2 -2
  132. package/dist/typography.js +1 -1
  133. package/dist/web-types.json +1 -1
  134. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.5e1e05ae.js","sources":["../../../vue2/src/components/checkbox/checkbox.types.ts","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/minus-small.vue","../../../vue2/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","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$1","toDisplayString","_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","createBlock","_component_checkmark_small_icon","createCommentVNode","_component_minus_small_icon","createElementVNode","_cache","args","_hoisted_3","_component_bento_typography","_component_error_message"],"mappings":";;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,W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AA,QACD,UAAAyD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAA1D,EAAA,YAAAA,EAAA,SAAA,GAAA0D,CAAA;AAAA;;IAGK,CAAA;AAAA,IACS1D,EAAA,QAAA,SAAA,KAAAA,EAAA,0BAAAH,EAAA,GAAAC,EAAA,QAAA6D,IAAA;AAAA,MAEL3D,EAAA,QAAA,SAAA,KAAAH,EAAA,GAAAuD,EAAAQ,GAAA;AAAA,QAFkD,KAAA;AAAA,QAAI,OAAA;AAAA,QAAc,IAAA;AAAA;;;;;;MAI7E,CAAA,KAAAN,EAAA,IAAA,EAAA;AAAA,MAOStD,EAAA,QAAA,SAAA,KAAAA,EAAA,QAAA,aAAA,KAAAH,EAAA,GAAAuD,EAAAQ,GAAA;AAAA,QANG,KAAA;AAAA,QACb,IAAA5D,EAAA;AAAA,QACF,OAAA;AAAA,QACI,IAAA;AAAA;;;;;;MAIU,GAAA,GAAA,CAAA,IAAA,CAAA,KAAAsD,EAAA,IAAA,EAAA;AAAA,MAAsEtD,EAAA,0BAAAH,EAAA,GAAAuD,EAAAS,GAAA;AAAA,QAAlC,KAAA;AAAA,QAAG,IAAA7D,EAAA;AAAA;;;;;;","x_google_ignoreList":[1]}
1
+ {"version":3,"file":"checkbox.17462cb0.js","sources":["../../../vue2/src/components/checkbox/checkbox.types.ts","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/minus-small.vue","../../../vue2/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","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$1","toDisplayString","_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","createBlock","_component_checkmark_small_icon","createCommentVNode","_component_minus_small_icon","createElementVNode","_cache","args","_hoisted_3","_component_bento_typography","_component_error_message"],"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;ACLR,IAAAE,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARuK,MAAA;AAAA,E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AA,SAAA,KAAAH,EAAA,GAAAuD,EAAAQ,GAAA;AAAA,QAFkD,KAAA;AAAA,QAAI,OAAA;AAAA,QAAc,IAAA;AAAA;;;;;;MAI7E,CAAA,KAAAN,EAAA,IAAA,EAAA;AAAA,MAOStD,EAAA,QAAA,SAAA,KAAAA,EAAA,QAAA,aAAA,KAAAH,EAAA,GAAAuD,EAAAQ,GAAA;AAAA,QANG,KAAA;AAAA,QACb,IAAA5D,EAAA;AAAA,QACF,OAAA;AAAA,QACI,IAAA;AAAA;;;;;;MAIU,GAAA,GAAA,CAAA,IAAA,CAAA,KAAAsD,EAAA,IAAA,EAAA;AAAA,MAAsEtD,EAAA,0BAAAH,EAAA,GAAAuD,EAAAS,GAAA;AAAA,QAAlC,KAAA;AAAA,QAAG,IAAA7D,EAAA;AAAA;;;;;;","x_google_ignoreList":[1]}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as B, useAttrs as S, computed as u, openBlock as l, createElementBlock as p, normalizeClass as f, unref as t, createElementVNode as y, createVNode as C, withCtx as a, createTextVNode as n, toDisplayString as i, createBlock as d, createCommentVNode as r, renderSlot as k } from "vue";
2
- import { d as q, B as c } from "./index.89b00b94.js";
2
+ import { d as q, B as c } from "./index.77c651df.js";
3
3
  import { BentoInfoIcon as v } from "../info-icon.js";
4
4
  import { u as L } from "./i18n.6c402773.js";
5
5
  import { _ as T } from "./_plugin-vue_export-helper.dad06003.js";
@@ -133,4 +133,4 @@ const $ = /* @__PURE__ */ T(I, [["__scopeId", "data-v-40e6d8cc"]]);
133
133
  export {
134
134
  $ as C
135
135
  };
136
- //# sourceMappingURL=controls-group.3b0dfb94.js.map
136
+ //# sourceMappingURL=controls-group.0d6db9c0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"controls-group.3b0dfb94.js","sources":["../../../vue2/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","deprecate"],"mappings":";;;;;;;;;;;;;;GAyJIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA9GA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,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;AAKJ,WADA,CAAAA,EAAA,eAAAA,EAAA,aAAA,QAEIE;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"controls-group.0d6db9c0.js","sources":["../../../vue2/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","deprecate"],"mappings":";;;;;;;;;;;;;;GAyJIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA9GA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,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;AAKJ,WADA,CAAAA,EAAA,eAAAA,EAAA,aAAA,QAEIE;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { openBlock as n, createElementBlock as p, mergeProps as T, toDisplayString as m, createCommentVNode as g, pushScopeId as b, popScopeId as k, createElementVNode as h, defineComponent as w, ref as y, computed as V, resolveComponent as C, resolveDirective as R, withDirectives as v, renderSlot as I, createBlock as P, withCtx as S, createVNode as E } from "vue";
2
- import { a as H } from "./button.a8462029.js";
2
+ import { a as H } from "./button.7d09c245.js";
3
3
  import { PopperContainerPosition as D } from "../popper-container.js";
4
- import { b as F } from "./tooltip.e4e34b86.js";
4
+ import { b as F } from "./tooltip.973c86d3.js";
5
5
  import { u as O } from "./i18n.6c402773.js";
6
6
  import { _ as $ } from "./_plugin-vue_export-helper.dad06003.js";
7
7
  import "../assets/copy.css";
@@ -124,4 +124,4 @@ const Q = /* @__PURE__ */ $(G, [["render", Z], ["__scopeId", "data-v-65c935fd"]]
124
124
  export {
125
125
  Q as C
126
126
  };
127
- //# sourceMappingURL=copy.1d14b783.js.map
127
+ //# sourceMappingURL=copy.c9a29be0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"copy.1d14b783.js","sources":["../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/copy.vue","../../../vue2/src/components/internal/copy/copy.types.ts","../../../vue2/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","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$1","toDisplayString","CopyTooltipState","CopyTooltipState2","_sfc_main","defineComponent","messages","BentoButton","CopyIcon","BentoTooltipDirective","PopperContainerPosition","props","useI18n","copyState","ref","showScreenReaderAlert","onClickCopy","resetText","computed","_directive_bento_tooltip_directive","resolveDirective","_cache","args","renderSlot","withDirectives","createBlock","_component_bento_button","withCtx","createVNode","_component_copy_icon"],"mappings":";;;;;;;AAKI,IAAAA,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARuK,MAAA;AAAA,EAAe,aAAA;AAAA,EAAoB,GAAA;AAAA,EAAmnB,aAAA;;;AAAr0B,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;6BAAYH,EAAA,GAAAC,EAAA,SAAAG,GAAAC,EAAAF,EAAA,OAAA,WAAA,CAAA,GAAA,CAAA;;;;;;;;;;;ACF9F,IAAAG,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA;AC4CR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA,EAAA,UAAAC,EAAA;AAAA,EACV,MAAA;AAAA,EACX,YAAA,EAAA,aAAAC,GAAA,UAAAC,EAAA;AAAA,EAC8B,YAAA,EAAA,uBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAC7B,MAAA;AAAA,MAIG,MAAA;AAAA,MACI,UAAA;AAAA,IACI;AAAA;AAAA;AAAA;AAAA,IACd,iBAAA;AAAA,MAKiB,MAAA;AAAA,MACP,SAAAC,EAAA;AAAA,IAC2B;AAAA,EACrC;AAAA,EACJ,MAAAC,GAAA;AAEI,UAAA,EAAA,EAAA,IAAAC,EAAA,EAAA,UAAAN,EAAA,CAAA,GACAO,IAAAC,EAAAZ,EAAA,OAAA,GA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AAAA,MACH,UAAAC,EAAA,MAAA;AAAA,QAAaC,EAAAC,GAAA;AAAA;;;;;;IAGD,CAAA;AAAA;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"copy.c9a29be0.js","sources":["../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/copy.vue","../../../vue2/src/components/internal/copy/copy.types.ts","../../../vue2/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","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$1","toDisplayString","CopyTooltipState","CopyTooltipState2","_sfc_main","defineComponent","messages","BentoButton","CopyIcon","BentoTooltipDirective","PopperContainerPosition","props","useI18n","copyState","ref","showScreenReaderAlert","onClickCopy","resetText","computed","_directive_bento_tooltip_directive","resolveDirective","_cache","args","renderSlot","withDirectives","createBlock","_component_bento_button","withCtx","createVNode","_component_copy_icon"],"mappings":";;;;;;;AAKI,IAAAA,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARuK,MAAA;AAAA,EAAe,aAAA;AAAA,EAAoB,GAAA;AAAA,EAAmnB,aAAA;;;AAAr0B,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;6BAAYH,EAAA,GAAAC,EAAA,SAAAG,GAAAC,EAAAF,EAAA,OAAA,WAAA,CAAA,GAAA,CAAA;;;;;;;;;;;ACF9F,IAAAG,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA;AC4CR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA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AA,EAAA,CAAA,IAAA,IAAAC,MAAAvB,EAAA,aAAAA,EAAA,UAAA,GAAAuB,CAAA;AAAA,IACvB,YAAAD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAvB,EAAA,aAAAA,EAAA,UAAA,GAAAuB,CAAA;AAAA,EAAQ,GAAA;AAAA;MAAiE,KAAA;AAAA;IAC/E,GAAA;AAAA,MAD6DC,EAAAxB,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,IAAnB,CAAA,IAAA;AAAA;IAYvC,CAAA,IAAAyB,GAAA5B,EAAA,GAAA6B,EAAAC,GAAA;AAAA,MANO,KAAA;AAAA,MACjB,SAAA;AAAA;IAEkB,GAAA;AAAA,MACH,UAAAC,EAAA,MAAA;AAAA,QAAaC,EAAAC,GAAA;AAAA;;;;;;IAGD,CAAA;AAAA;;;;","x_google_ignoreList":[0]}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as B, ref as Y, computed as y, resolveComponent as v, openBlock as l, createElementBlock as d, normalizeClass as h, withKeys as C, createVNode as g, withCtx as _, mergeProps as E, renderSlot as S, normalizeProps as L, createTextVNode as D, toDisplayString as I, Fragment as $, renderList as V, createElementVNode as k, guardReactiveProps as R, createCommentVNode as N, withModifiers as x, toHandlers as M, createSlots as W, withDirectives as A, vShow as P } from "vue";
2
2
  import { g as q } from "./unique-id.a2a2b458.js";
3
3
  import { u as H } from "./use-has-slot.9fac7123.js";
4
- import { B as j } from "./index.89b00b94.js";
4
+ import { B as j } from "./index.77c651df.js";
5
5
  import { d as z, B as G } from "./debounce.f8d92e44.js";
6
6
  import { C as J } from "./cross-circle-fill.0feb37b3.js";
7
7
  import { _ as T } from "./_plugin-vue_export-helper.dad06003.js";
@@ -411,4 +411,4 @@ export {
411
411
  u as b,
412
412
  Ie as c
413
413
  };
414
- //# sourceMappingURL=dropdown-default-textbox.a90e84f9.js.map
414
+ //# sourceMappingURL=dropdown-default-textbox.cd789a95.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-default-textbox.a90e84f9.js","sources":["../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../../vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["import { PropType } from 'vue';\nimport { Booleanish } from '@/types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'open',\n KEYDOWN = 'keydown',\n CLOSE = 'close',\n INPUT = 'input',\n CLEAR = 'clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"dynamicFiltering\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n :tabindex=\"0\"\n >\n <!-- <span :aria-hidden=\"!displayValue ? true : null\"> -->\n <slot v-if=\"selectedValueItem && !multiple\" v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n <template v-else-if=\"selectedValueItem && showSlotContentInMultiple\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n <!-- </span> -->\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n tabindex=\"0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-icon :svg-title=\"'clearSearch'\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoKeyboardNavigationKeyDownEvent, BentoListboxOptionItem, Booleanish } from '@/types';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n name: 'dropdown-base-textbox',\n components: { BentoTypography, CrossCircleFillIcon },\n inheritAttrs: false,\n props: {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n },\n emits: [\n DropdownBaseTextboxEvent.OPEN,\n DropdownBaseTextboxEvent.CLOSE,\n DropdownBaseTextboxEvent.INPUT,\n DropdownBaseTextboxEvent.CLEAR,\n DropdownBaseTextboxEvent.KEYDOWN,\n ],\n setup(props, { emit, slots, attrs }) {\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n } as HTMLAttributes)\n );\n\n /**\n * Triggered on click, space and enter user events. It will open the dropdown.\n * @event open\n */\n const onOpenDropdown = () => {\n if (!props.disabled && !props.readonly) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.OPEN);\n }\n };\n\n /**\n * Triggered on click, space, enter and esc user events. It will close the dropdown.\n * @event close\n */\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent =\n props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = debounce<(event: Event) => void>((event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n }, props.debounceTime);\n\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as BentoListboxOptionItem[]) : []\n );\n\n return {\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n DropdownBaseTextboxEvent,\n\n // Values\n conditionalClasses,\n textboxId,\n textbox,\n isFiltering,\n ariaAttributes,\n selectedValueItems,\n\n // Events\n onCloseDropdown,\n onToggleDropdown,\n onClearSearch,\n onInputEvent,\n\n // Methods\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n components: { ChevronDownIcon, ChevronUpIcon, DropdownBaseTextbox },\n inheritAttrs: false,\n emits: [\n DropdownBaseTextboxEvent.OPEN,\n DropdownBaseTextboxEvent.CLOSE,\n DropdownBaseTextboxEvent.INPUT,\n DropdownBaseTextboxEvent.CLEAR,\n DropdownBaseTextboxEvent.KEYDOWN,\n ],\n props: {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n },\n setup(props, { slots, emit }) {\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (e: Event) => {\n emit(DropdownBaseTextboxEvent.INPUT, e);\n };\n const onKeyDown = (e: Event) => {\n emit(DropdownBaseTextboxEvent.KEYDOWN, e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.OPEN);\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.CLOSE);\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.CLEAR);\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n return {\n // Enums\n DropdownBaseTextboxEvent,\n\n // Values\n conditionalClasses,\n isDropdownOpen,\n slots,\n\n // Events\n listeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","_sfc_main$1","defineComponent","BentoTypography","CrossCircleIcon","props","emit","slots","attrs","textbox","ref","textboxId","generateUid","conditionalClasses","computed","isFiltering","ariaAttributes","_a","onOpenDropdown","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","selectedValueItems","BentoKeyboardNavigationKeyDownEvent","useHasSlot","openBlock","createElementBlock","normalizeClass","_ctx","_cache","args","createVNode","_component_bento_typography","withCtx","mergeProps","withKeys","_hoisted_1$1","createTextVNode","toDisplayString","_hoisted_3","Fragment","renderList","singleItem","createElementVNode","_hoisted_4","renderSlot","normalizeProps","guardReactiveProps","_hoisted_2","_hoisted_5","createCommentVNode","_hoisted_6","withModifiers","_sfc_main","ChevronDownIcon","ChevronUpIcon","DropdownBaseTextbox","isDropdownOpen","onInput","e","onKeyDown","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners","toHandlers","createSlots","_hoisted_1","withDirectives","_component_chevron_up_icon","innerSlot","scope"],"mappings":";;;;;;;;;;AA0EY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA;ACQR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,iBAAAC,GAAA,qBAAAC,EAAA;AAAA,EAC6C,cAAA;AAAA,EACrC,OAAA;AAAA;AAAA;AAAA;AAAA,IACP,yBAAA,EAAA,MAAA,QAAA,SAAA,EAAA;AAAA;AAAA;AAAA;AAAA,IAIiD,cAAA;AAAA,MAKtC,MAAA;AAAA,MACJ,UAAA;AAAA,IACI;AAAA;AAAA;AAAA;AAAA,IACd,cAAA;AAAA,MAKc,MAAA,CAAA,QAAA,OAAA;AAAA,MACY,UAAA;AAAA,IACZ;AAAA;AAAA;AAAA;AAAA,IACd,WAAA;AAAA,MAKW,MAAA;AAAA,MACD,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,gBAAA;AAAA,MAKgB,MAAA;AAAA,MACN,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,cAAA,EAAA,MAAA,QAAA,SAAA,IAAA;AAAA;AAAA;AAAA;AAAA,IAK2C,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKD,cAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKE,kBAAA;AAAA,MAK1B,MAAA;A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A,IAAA,GAAAiE;AAAA,MACD,CAAAjE,EAAA,KAAA,GAAAmE;AAAA,MACC,CAAAnE,EAAA,KAAA,GAAAoE;AAAA,MACA,CAAApE,EAAA,OAAA,GAAAgE;AAAA,IACE;AAGxC,WAAA;AAAA;AAAA,MAAO,0BAAAhE;AAAA;AAAA,MAEH,oBAAAc;AAAA,MAGA,gBAAA+C;AAAA,MACA,OAAArD;AAAA;AAAA,MACA,WAAA6D;AAAA,IAGA;AAAA,EACJ;AAER,CAAA;;;;AArMoE,SAAAxC,EAAA,GAAAC,EAAA,OAAA;AAAA,IAA6B,OAAAC,EAAA,CAAA,8BAAAC,EAAA,kBAAA,CAAA;AAAA;EAgBrE,GAAA;AAAA;MAZP,OAAA;AAAA,MACb,OAAAA,EAAA;AAAA,IAKe,GAAAsC,EAAAtC,EAAA,SAAA,CAAA,GAAAuC,EAAA;AAAA,MAIL,MAAAlC,EAAA,MAAA;AAAA,QAFFU,EAAA,OAAAyB,IAAA;AAAA,UAAuCC,EAAAtC,EAAAuC,GAAA,EAAA,aAAA,SAAA,GAAA,MAAA,GAAA,GAAA;AAAA;UAC0B,CAAA;AAAA;;;;;;;;QALrE,MAAAC;AAAA,QAAA,IAAAtC,EAAA,CAAAuC,MAAA;AAAA;;;;;;;"}
1
+ {"version":3,"file":"dropdown-default-textbox.cd789a95.js","sources":["../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../../vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["import { PropType } from 'vue';\nimport { Booleanish } from '@/types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'open',\n KEYDOWN = 'keydown',\n CLOSE = 'close',\n INPUT = 'input',\n CLEAR = 'clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"dynamicFiltering\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n :tabindex=\"0\"\n >\n <!-- <span :aria-hidden=\"!displayValue ? true : null\"> -->\n <slot v-if=\"selectedValueItem && !multiple\" v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n <template v-else-if=\"selectedValueItem && showSlotContentInMultiple\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n <!-- </span> -->\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n tabindex=\"0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-icon :svg-title=\"'clearSearch'\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoKeyboardNavigationKeyDownEvent, BentoListboxOptionItem, Booleanish } from '@/types';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n name: 'dropdown-base-textbox',\n components: { BentoTypography, CrossCircleFillIcon },\n inheritAttrs: false,\n props: {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n },\n emits: [\n DropdownBaseTextboxEvent.OPEN,\n DropdownBaseTextboxEvent.CLOSE,\n DropdownBaseTextboxEvent.INPUT,\n DropdownBaseTextboxEvent.CLEAR,\n DropdownBaseTextboxEvent.KEYDOWN,\n ],\n setup(props, { emit, slots, attrs }) {\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n } as HTMLAttributes)\n );\n\n /**\n * Triggered on click, space and enter user events. It will open the dropdown.\n * @event open\n */\n const onOpenDropdown = () => {\n if (!props.disabled && !props.readonly) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.OPEN);\n }\n };\n\n /**\n * Triggered on click, space, enter and esc user events. It will close the dropdown.\n * @event close\n */\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent =\n props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = debounce<(event: Event) => void>((event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n }, props.debounceTime);\n\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as BentoListboxOptionItem[]) : []\n );\n\n return {\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n DropdownBaseTextboxEvent,\n\n // Values\n conditionalClasses,\n textboxId,\n textbox,\n isFiltering,\n ariaAttributes,\n selectedValueItems,\n\n // Events\n onCloseDropdown,\n onToggleDropdown,\n onClearSearch,\n onInputEvent,\n\n // Methods\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n components: { ChevronDownIcon, ChevronUpIcon, DropdownBaseTextbox },\n inheritAttrs: false,\n emits: [\n DropdownBaseTextboxEvent.OPEN,\n DropdownBaseTextboxEvent.CLOSE,\n DropdownBaseTextboxEvent.INPUT,\n DropdownBaseTextboxEvent.CLEAR,\n DropdownBaseTextboxEvent.KEYDOWN,\n ],\n props: {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: Number, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n },\n setup(props, { slots, emit }) {\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (e: Event) => {\n emit(DropdownBaseTextboxEvent.INPUT, e);\n };\n const onKeyDown = (e: Event) => {\n emit(DropdownBaseTextboxEvent.KEYDOWN, e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.OPEN);\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.CLOSE);\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit(DropdownBaseTextboxEvent.CLEAR);\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n return {\n // Enums\n DropdownBaseTextboxEvent,\n\n // Values\n conditionalClasses,\n isDropdownOpen,\n slots,\n\n // Events\n listeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","_sfc_main$1","defineComponent","BentoTypography","CrossCircleIcon","props","emit","slots","attrs","textbox","ref","textboxId","generateUid","conditionalClasses","computed","isFiltering","ariaAttributes","_a","onOpenDropdown","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","selectedValueItems","BentoKeyboardNavigationKeyDownEvent","useHasSlot","openBlock","createElementBlock","normalizeClass","_ctx","_cache","args","createVNode","_component_bento_typography","withCtx","mergeProps","withKeys","_hoisted_1$1","createTextVNode","toDisplayString","_hoisted_3","Fragment","renderList","singleItem","createElementVNode","_hoisted_4","renderSlot","normalizeProps","guardReactiveProps","_hoisted_2","_hoisted_5","createCommentVNode","_hoisted_6","withModifiers","_sfc_main","ChevronDownIcon","ChevronUpIcon","DropdownBaseTextbox","isDropdownOpen","onInput","e","onKeyDown","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners","toHandlers","createSlots","_hoisted_1","withDirectives","_component_chevron_up_icon","innerSlot","scope"],"mappings":";;;;;;;;;;AA0EY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA;ACQR,MAAAE,IAAAC,EAAA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OAAA;AAAA,MACb,OAAAA,EAAA;AAAA,IAKe,GAAAsC,EAAAtC,EAAA,SAAA,CAAA,GAAAuC,EAAA;AAAA,MAIL,MAAAlC,EAAA,MAAA;AAAA,QAFFU,EAAA,OAAAyB,IAAA;AAAA,UAAuCC,EAAAtC,EAAAuC,GAAA,EAAA,aAAA,SAAA,GAAA,MAAA,GAAA,GAAA;AAAA;UAC0B,CAAA;AAAA;;;;;;;;QALrE,MAAAC;AAAA,QAAA,IAAAtC,EAAA,CAAAuC,MAAA;AAAA;;;;;;;"}
@@ -1,18 +1,18 @@
1
1
  import { ref as $, watch as be, computed as c, defineComponent as ne, toRefs as ve, resolveComponent as R, openBlock as b, createBlock as B, resolveDynamicComponent as ye, mergeProps as A, withCtx as E, createElementVNode as U, withKeys as Ne, createVNode as z, toHandlers as x, createSlots as Z, renderList as Y, renderSlot as G, normalizeProps as Q, guardReactiveProps as X, createElementBlock as O, toDisplayString as P, createCommentVNode as L, pushScopeId as ge, popScopeId as he, normalizeClass as we, withDirectives as q, vShow as de, nextTick as I, toRef as N, resolveDirective as ue, createTextVNode as W } from "vue";
2
- import { a as s, B as ee, b as te } from "./listbox.6b52af1a.js";
2
+ import { a as s, B as ee, b as te } from "./listbox.f535a736.js";
3
3
  import { B as Me } from "./directive.0408e565.js";
4
4
  import { B as D, a as Pe } from "./debounce.f8d92e44.js";
5
- import { B as Ke, d as ke } from "./index.89b00b94.js";
5
+ import { D as Ke, a as M, b as j, c as ke } from "./dropdown-default-textbox.cd789a95.js";
6
+ import { _ as F } from "./_plugin-vue_export-helper.dad06003.js";
7
+ import { B as ze, d as Fe } from "./index.77c651df.js";
6
8
  import { g as k } from "./unique-id.a2a2b458.js";
7
9
  import { u as le } from "./i18n.6c402773.js";
8
- import { u as ze } from "./aria-label.ac9651a5.js";
9
- import { u as Fe } from "./use-form-layout-loading.d03e5d48.js";
10
- import { PopperContainer as j } from "../popper-container.js";
10
+ import { u as We } from "./aria-label.ac9651a5.js";
11
+ import { u as xe } from "./use-form-layout-loading.d03e5d48.js";
12
+ import { PopperContainer as J } from "../popper-container.js";
11
13
  import { BentoPopover as ce } from "../popover.js";
12
- import { BentoButtonActionsLayout as We } from "../button.js";
13
- import { _ as F } from "./_plugin-vue_export-helper.dad06003.js";
14
- import { D as xe, a as M, b as J, c as qe } from "./dropdown-default-textbox.a90e84f9.js";
15
- import { E as Ue } from "./error-message.9acead25.js";
14
+ import { BentoButtonActionsLayout as qe } from "../button.js";
15
+ import { E as Ue } from "./error-message.8c67a507.js";
16
16
  import "../assets/dropdown.css";
17
17
  var T = /* @__PURE__ */ ((e) => (e.DEFAULT = "DropdownInputDefault", e.SMALL = "DropdownInputSmall", e))(T || {});
18
18
  const oe = {
@@ -74,7 +74,7 @@ const oe = {
74
74
  name: "bento-dropdown-options-container",
75
75
  components: {
76
76
  BentoListbox: ee,
77
- PopperContainer: j,
77
+ PopperContainer: J,
78
78
  BentoPopover: ce
79
79
  },
80
80
  props: {
@@ -168,7 +168,7 @@ const oe = {
168
168
  * Reference to the DOM element or Vue component for positioning
169
169
  * the Dropdown container.
170
170
  */
171
- targetElement: { type: j.props.targetElement.type, required: !0 }
171
+ targetElement: { type: J.props.targetElement.type, required: !0 }
172
172
  },
173
173
  emits: [
174
174
  s.CLOSE_DROPDOWN,
@@ -190,12 +190,12 @@ const oe = {
190
190
  a,
191
191
  o
192
192
  ), C = c(
193
- () => e != null && e.multiple ? ce : j
193
+ () => e != null && e.multiple ? ce : J
194
194
  ), v = c(
195
195
  () => {
196
196
  var K;
197
197
  return e != null && e.multiple ? {
198
- actionsLayout: We.SPACE_BETWEEN,
198
+ actionsLayout: qe.SPACE_BETWEEN,
199
199
  actions: y.value,
200
200
  divider: !0,
201
201
  id: k(`dropdown-options-${e.id}`),
@@ -316,7 +316,7 @@ function at(e, o, n, t, a, i) {
316
316
  }
317
317
  const it = /* @__PURE__ */ F(tt, [["render", at], ["__scopeId", "data-v-6f20d431"]]), st = ne({
318
318
  name: "dropdown-small-textbox",
319
- components: { ChevronDownSmallIcon: et, ChevronUpSmallIcon: it, DropdownBaseTextbox: xe },
319
+ components: { ChevronDownSmallIcon: et, ChevronUpSmallIcon: it, DropdownBaseTextbox: Ke },
320
320
  inheritAttrs: !1,
321
321
  props: {
322
322
  /**
@@ -391,9 +391,9 @@ const it = /* @__PURE__ */ F(tt, [["render", at], ["__scopeId", "data-v-6f20d431
391
391
  emits: [M.OPEN, M.CLOSE],
392
392
  setup(e, { emit: o }) {
393
393
  const n = c(() => ({
394
- [`b-dropdown-small-textbox--${J.DISABLED}`]: e.disabled,
395
- [`b-dropdown-small-textbox--${J.READONLY}`]: e.readonly,
396
- [`b-dropdown-small-textbox--${J.OPENED}`]: e.open
394
+ [`b-dropdown-small-textbox--${j.DISABLED}`]: e.disabled,
395
+ [`b-dropdown-small-textbox--${j.READONLY}`]: e.readonly,
396
+ [`b-dropdown-small-textbox--${j.OPENED}`]: e.open
397
397
  })), t = c(() => e.open && !e.disabled && !e.readonly), a = () => {
398
398
  o(M.OPEN);
399
399
  }, i = () => {
@@ -552,8 +552,8 @@ const ft = ({ items: e, placeholder: o, selectedValue: n }) => {
552
552
  name: "b-dropdown",
553
553
  components: {
554
554
  BentoDropdownOptionsContainer: Je,
555
- BentoTypography: Ke,
556
- DropdownInputDefault: qe,
555
+ BentoTypography: ze,
556
+ DropdownInputDefault: ke,
557
557
  DropdownInputSmall: ut,
558
558
  ErrorMessage: Ue
559
559
  },
@@ -693,7 +693,7 @@ const ft = ({ items: e, placeholder: o, selectedValue: n }) => {
693
693
  emits: ["input", s.SHOW_MORE],
694
694
  setup(e, { attrs: o, emit: n, slots: t }) {
695
695
  var re;
696
- const { t: a } = le({ messages: me }), i = $(null), r = $(null), d = $(null), l = $(!1), f = k("bento-dropdown-options-container"), _ = k("dropdown-label"), y = k("dropdown-description"), g = k("dropdown-error"), { isReadOnly: m } = Fe(N(e, "readonly")), h = $(o["aria-label"]), { ariaLabel: C } = ve(e), v = ze({
696
+ const { t: a } = le({ messages: me }), i = $(null), r = $(null), d = $(null), l = $(!1), f = k("bento-dropdown-options-container"), _ = k("dropdown-label"), y = k("dropdown-description"), g = k("dropdown-error"), { isReadOnly: m } = xe(N(e, "readonly")), h = $(o["aria-label"]), { ariaLabel: C } = ve(e), v = We({
697
697
  ariaLabel: h.value,
698
698
  // TODO: take this line away when the aria-label props is removed
699
699
  label: C,
@@ -754,7 +754,7 @@ const ft = ({ items: e, placeholder: o, selectedValue: n }) => {
754
754
  [s.SHOW_MORE]: se,
755
755
  ...Re
756
756
  };
757
- return e.error && ke(
757
+ return e.error && Fe(
758
758
  'BentoDropdown "error" property',
759
759
  `Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
760
760
  Having the field as "undefined" will hide/remove the error.
@@ -924,4 +924,4 @@ export {
924
924
  T as a,
925
925
  ct as u
926
926
  };
927
- //# sourceMappingURL=dropdown.b798a82e.js.map
927
+ //# sourceMappingURL=dropdown.ff4f94a8.js.map