@adyen/bento-vue3 1.108.0 → 1.108.2
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.
- package/dist/accordion.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/navigation-menu-group.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/card.js +1 -1
- package/dist/chunks/{accordion-item.CbW267Sz.js → accordion-item.CFsXrPwd.js} +2 -2
- package/dist/chunks/{accordion-item.CbW267Sz.js.map → accordion-item.CFsXrPwd.js.map} +1 -1
- package/dist/chunks/{calendar.DMZ-bSTO.js → calendar.BHBrXP7_.js} +2 -2
- package/dist/chunks/{calendar.DMZ-bSTO.js.map → calendar.BHBrXP7_.js.map} +1 -1
- package/dist/chunks/{card.BkVZAJ2f.js → card.CEgezjJm.js} +2 -2
- package/dist/chunks/{card.BkVZAJ2f.js.map → card.CEgezjJm.js.map} +1 -1
- package/dist/chunks/{code-snippet.bQFbKfA8.js → code-snippet.DIg7oTE6.js} +2 -2
- package/dist/chunks/{code-snippet.bQFbKfA8.js.map → code-snippet.DIg7oTE6.js.map} +1 -1
- package/dist/chunks/{data-grid._-onMakx.js → data-grid.DiB9ClKW.js} +7 -7
- package/dist/chunks/{data-grid._-onMakx.js.map → data-grid.DiB9ClKW.js.map} +1 -1
- package/dist/chunks/{date-picker.B5rb_5-E.js → date-picker.81ASPpns.js} +8 -8
- package/dist/chunks/{date-picker.B5rb_5-E.js.map → date-picker.81ASPpns.js.map} +1 -1
- package/dist/chunks/{date-range-picker.DNjQmkrl.js → date-range-picker.CFjZwUb_.js} +35 -35
- package/dist/chunks/{date-range-picker.DNjQmkrl.js.map → date-range-picker.CFjZwUb_.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.B8nYIdkZ.js → dropdown-tag.7plhjvUU.js} +2 -2
- package/dist/chunks/{dropdown-tag.B8nYIdkZ.js.map → dropdown-tag.7plhjvUU.js.map} +1 -1
- package/dist/chunks/{dropdown.DIuBwxF-.js → dropdown.ByQDIs7p.js} +43 -43
- package/dist/chunks/{dropdown.DIuBwxF-.js.map → dropdown.ByQDIs7p.js.map} +1 -1
- package/dist/chunks/{filter-bar.BPNkoOkf.js → filter-bar.C1fDfEQj.js} +8 -8
- package/dist/chunks/{filter-bar.BPNkoOkf.js.map → filter-bar.C1fDfEQj.js.map} +1 -1
- package/dist/chunks/{header-with-views.8ZSJ3Dfk.js → header-with-views.ChAss37D.js} +3 -3
- package/dist/chunks/{header-with-views.8ZSJ3Dfk.js.map → header-with-views.ChAss37D.js.map} +1 -1
- package/dist/chunks/{input-field-password.LCZamdFv.js → input-field-password.B3d1f64g.js} +2 -2
- package/dist/chunks/{input-field-password.LCZamdFv.js.map → input-field-password.B3d1f64g.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.CzOJ82aH.js → input-field-phone-number.DF6mnD7K.js} +2 -2
- package/dist/chunks/{input-field-phone-number.CzOJ82aH.js.map → input-field-phone-number.DF6mnD7K.js.map} +1 -1
- package/dist/chunks/{input-field.CuZNoZOd.js → input-field.CG5dopgq.js} +2 -2
- package/dist/chunks/{input-field.CuZNoZOd.js.map → input-field.CG5dopgq.js.map} +1 -1
- package/dist/chunks/{input-time.DcbFfetr.js → input-time.U4n485N0.js} +3 -3
- package/dist/chunks/{input-time.DcbFfetr.js.map → input-time.U4n485N0.js.map} +1 -1
- package/dist/chunks/{navigation-menu-group.CikSYqiG.js → navigation-menu-group.1zd10PO9.js} +2 -2
- package/dist/chunks/{navigation-menu-group.CikSYqiG.js.map → navigation-menu-group.1zd10PO9.js.map} +1 -1
- package/dist/chunks/{pagination.DcJYeAN4.js → pagination.o-BWToPt.js} +2 -2
- package/dist/chunks/{pagination.DcJYeAN4.js.map → pagination.o-BWToPt.js.map} +1 -1
- package/dist/chunks/{search-bar.B3NyMQTb.js → search-bar.Bw7rMy3B.js} +3 -3
- package/dist/chunks/{search-bar.B3NyMQTb.js.map → search-bar.Bw7rMy3B.js.map} +1 -1
- package/dist/chunks/{secondary-nav.Svrjd6Zk.js → secondary-nav.xM1xXQmI.js} +3 -3
- package/dist/chunks/{secondary-nav.Svrjd6Zk.js.map → secondary-nav.xM1xXQmI.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.CjQf74MP.js → use-date-input-formatter.BWGtdqki.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.CjQf74MP.js.map → use-date-input-formatter.BWGtdqki.js.map} +1 -1
- package/dist/chunks/use-expandable-content-height.DmFeas9-.js +36 -0
- package/dist/chunks/use-expandable-content-height.DmFeas9-.js.map +1 -0
- package/dist/code-snippet.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date-time-picker.js +4 -4
- package/dist/dropdown.js +2 -2
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/index.js +19 -19
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/input-time.js +1 -1
- package/dist/internal.js +2 -2
- package/dist/navigation-menu.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +4 -4
- package/dist/chunks/use-expandable-content-height.Bdd9hQwq.js +0 -34
- package/dist/chunks/use-expandable-content-height.Bdd9hQwq.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-tag.B8nYIdkZ.js","sources":["../../../vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue"],"sourcesContent":["<template>\n <div>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n :items=\"dropdownItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { type BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the avatar dropdown with.\n * It must be an array of {@see BentoAvatarListboxOptions }\n * @property {string} value.label - Text to be displayed in the option.\n * @property {string | number} value.value - Value of the option.\n * @property {string} value.src - Image source of the avatar image.\n */\n items: {\n type: Array as PropType<BentoAvatarListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n * @deprecated Since v2.0.0. Use `v-model` or `update:model-value` instead.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\n\n if (props.value) {\n deprecate(\n 'BentoDropdownAvatar \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownAvatar\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Avatar Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownAvatar } from '@adyen/bento-vue2';\n * import type { BentoAvatarListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownAvatar },\n * template: `\n * <bento-dropdown-avatar\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('user-id-1') // Default value\n * const options: BentoAvatarListboxOptions = [\n * { label: 'User 1', value: 'user-id-1' },\n * { label: 'User 2', value: 'user-id-2', src: 'image-source.jpeg' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-avatar',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <div>\n <bento-dropdown\n v-slot=\"{ label }\"\n v-bind=\"$props\"\n :items=\"countryItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, toRefs } from 'vue';\n import { type BentoCountryListboxOptions } from './dropdown-country.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoCountryVariant } from '@/components/country';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCountryListboxOptions }\n * @deprecated Since v2.0.0. Use `BentoDropdown` instead.\n * @property {BentoCountryCode | string} value.value - Country code of the option\n */\n items: {\n type: Array as PropType<BentoCountryListboxOptions>,\n default: () => [],\n },\n\n /**\n * Which label variant to display.\n * @values iso, name, phone_code, capital\n */\n variant: {\n type: String as PropType<BentoCountryVariant | `${BentoCountryVariant}`>,\n default: BentoCountryVariant.CUSTOM,\n validator: (value: BentoCountryVariant) => Object.values(BentoCountryVariant).includes(value),\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n * @deprecated Since v2.0.0. Use `v-model` or `update:model-value` instead.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const { variant, items } = toRefs(props);\n const countryItems = useCountryItems(variant, items);\n\n if (variant.value === 'custom' || items.value.some(item => item.label)) {\n deprecate(\n 'BentoDropdownCountry \"custom\" variant and \"items\" prop \"label\" key',\n 'Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels',\n '2.0.0'\n );\n }\n\n if (props.value) {\n deprecate(\n 'BentoDropdownCountry \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownCountry\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Country Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-country\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-country',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"slotProps\"\n v-bind=\"$props\"\n :search=\"search\"\n :items=\"filteredItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, ref, watch } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '@/internal/listbox/';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the currency dropdown with.\n * It must be an array of {@see BentoCurrencyListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option\n */\n items: {\n type: Array as PropType<BentoCurrencyListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n * @deprecated Since v2.0.0. Use `v-model` or `update:model-value` instead.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const filteredItems = ref<BentoCurrencyListboxOptions>([]);\n\n watch(\n () => props.items,\n () => (filteredItems.value = props.items),\n { immediate: true }\n );\n\n const search = props.search\n ? props.search\n : {\n debounceTime: 500,\n searchEvent: async (searchTerm: string) => {\n // Combine value and label to be able to search by the currency code\n const searchableItems = props.items.map(item => ({\n ...item,\n label: `${item.value} ${item.label}`,\n }));\n\n const searchResults = useSearchBarFilter(\n ref(searchTerm),\n ref<BentoCurrencyListboxOptions>(searchableItems),\n props?.search?.searchEvent,\n ref(false)\n ).value;\n\n // Restore original labels by removing the prepended value\n const normalizedResults = searchResults?.map(result => ({\n ...result,\n label: result.label.substring(result.value.length + 1),\n }));\n\n filteredItems.value = normalizedResults;\n },\n };\n\n if (props.value) {\n deprecate(\n 'BentoDropdownCurrency \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownCurrency\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Currency Dropdown showing a selectable list of currencies.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-currency\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-currency',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <div>\n <bento-dropdown\n class=\"b-dropdown-payment-method\"\n v-bind=\"$props\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <template #display-value=\"{ label, value }\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </template>\n\n <template #default=\"{ value, label, description }\">\n <div class=\"b-dropdown-payment-method__item\">\n <bento-payment-method :type=\"value\" :label=\"description ? undefined : label\" />\n\n <div v-if=\"description\" class=\"b-dropdown-payment-method__text\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n <bento-typography el=\"span\" class=\"b-dropdown-payment-method__description\">{{\n description\n }}</bento-typography>\n </div>\n </div>\n </template>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType } from 'vue';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import { BentoTypography } from '@/components/typography';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { type BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the payment method dropdown with.\n * It must be an array of {@see BentoPaymentMethodListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string} value.value - Payment type code that translates to a payment icon name {@see https://adyen-ui-assets.netlify.app/?path=/story/packages-ui-assets-payment-method-icons--icons}\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n * @deprecated Since v2.0.0. Use `v-model` or `update:model-value` instead.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n if (props.value) {\n deprecate(\n 'BentoDropdownPaymentMethod \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownPaymentMethod\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod } from '@adyen/bento-vue2';\n * import type { BentoPaymentMethodListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownPaymentMethod },\n * template: `\n * <bento-dropdown-payment-method\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 'Visa'\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('ideal') // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: 'ideal' },\n * { label: 'Option 2', value: 'visa' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-payment-method.scss\" />\n","<template>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n class=\"b-dropdown-tag\"\n :items=\"tagItems\"\n show-slot-content-in-multiple\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the tag dropdown with.\n * It must be an array of {@see BentoTagListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string | number} value.value - Value of the option\n * @property {string} value.variant - The BentTag variant shown for the option.\n */\n items: {\n type: Array as PropType<BentoTagListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n * @deprecated Since v2.0.0. Use `v-model` or `update:model-value` instead.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\n\n if (props.value) {\n deprecate(\n 'BentoDropdownTag \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownTag\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Tag Dropdown showing a selectable list of tags.\n *\n * @example\n * import { BentoDropdownTag } from '@adyen/bento-vue2';\n * import type { BentoTagListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownTag },\n * template: `\n * <bento-dropdown-tag\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('unique-id-1') // Default value\n * const options: BentoTagListboxOptions = [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-tag',\n model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","props","__props","emit","__emit","emitValue","useFormFieldEmits","onUpdateModelValue","selectedValue","dropdownItems","computed","value","label","src","deprecate","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","__default__$2","filteredItems","ref","watch","search","searchTerm","searchableItems","normalizedResults","useSearchBarFilter","result","__default__$1","__default__","tagItems"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"dropdown-tag.7plhjvUU.js","sources":["../../../vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue"],"sourcesContent":["<template>\n <div>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n :items=\"dropdownItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { type BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the avatar dropdown with.\n * It must be an array of {@see BentoAvatarListboxOptions }\n * @property {string} value.label - Text to be displayed in the option.\n * @property {string | number} value.value - Value of the option.\n * @property {string} value.src - Image source of the avatar image.\n */\n items: {\n type: Array as PropType<BentoAvatarListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n * @deprecated Since v2.0.0. Use `v-model` or `update:model-value` instead.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\n\n if (props.value) {\n deprecate(\n 'BentoDropdownAvatar \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownAvatar\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Avatar Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownAvatar } from '@adyen/bento-vue2';\n * import type { BentoAvatarListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownAvatar },\n * template: `\n * <bento-dropdown-avatar\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('user-id-1') // Default value\n * const options: BentoAvatarListboxOptions = [\n * { label: 'User 1', value: 'user-id-1' },\n * { label: 'User 2', value: 'user-id-2', src: 'image-source.jpeg' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-avatar',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <div>\n <bento-dropdown\n v-slot=\"{ label }\"\n v-bind=\"$props\"\n :items=\"countryItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, toRefs } from 'vue';\n import { type BentoCountryListboxOptions } from './dropdown-country.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoCountryVariant } from '@/components/country';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCountryListboxOptions }\n * @deprecated Since v2.0.0. Use `BentoDropdown` instead.\n * @property {BentoCountryCode | string} value.value - Country code of the option\n */\n items: {\n type: Array as PropType<BentoCountryListboxOptions>,\n default: () => [],\n },\n\n /**\n * Which label variant to display.\n * @values iso, name, phone_code, capital\n */\n variant: {\n type: String as PropType<BentoCountryVariant | `${BentoCountryVariant}`>,\n default: BentoCountryVariant.CUSTOM,\n validator: (value: BentoCountryVariant) => Object.values(BentoCountryVariant).includes(value),\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n * @deprecated Since v2.0.0. Use `v-model` or `update:model-value` instead.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const { variant, items } = toRefs(props);\n const countryItems = useCountryItems(variant, items);\n\n if (variant.value === 'custom' || items.value.some(item => item.label)) {\n deprecate(\n 'BentoDropdownCountry \"custom\" variant and \"items\" prop \"label\" key',\n 'Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels',\n '2.0.0'\n );\n }\n\n if (props.value) {\n deprecate(\n 'BentoDropdownCountry \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownCountry\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Country Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-country\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-country',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"slotProps\"\n v-bind=\"$props\"\n :search=\"search\"\n :items=\"filteredItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, ref, watch } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '@/internal/listbox/';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the currency dropdown with.\n * It must be an array of {@see BentoCurrencyListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option\n */\n items: {\n type: Array as PropType<BentoCurrencyListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n * @deprecated Since v2.0.0. Use `v-model` or `update:model-value` instead.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const filteredItems = ref<BentoCurrencyListboxOptions>([]);\n\n watch(\n () => props.items,\n () => (filteredItems.value = props.items),\n { immediate: true }\n );\n\n const search = props.search\n ? props.search\n : {\n debounceTime: 500,\n searchEvent: async (searchTerm: string) => {\n // Combine value and label to be able to search by the currency code\n const searchableItems = props.items.map(item => ({\n ...item,\n label: `${item.value} ${item.label}`,\n }));\n\n const searchResults = useSearchBarFilter(\n ref(searchTerm),\n ref<BentoCurrencyListboxOptions>(searchableItems),\n props?.search?.searchEvent,\n ref(false)\n ).value;\n\n // Restore original labels by removing the prepended value\n const normalizedResults = searchResults?.map(result => ({\n ...result,\n label: result.label.substring(result.value.length + 1),\n }));\n\n filteredItems.value = normalizedResults;\n },\n };\n\n if (props.value) {\n deprecate(\n 'BentoDropdownCurrency \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownCurrency\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Currency Dropdown showing a selectable list of currencies.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-currency\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-currency',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <div>\n <bento-dropdown\n class=\"b-dropdown-payment-method\"\n v-bind=\"$props\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <template #display-value=\"{ label, value }\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </template>\n\n <template #default=\"{ value, label, description }\">\n <div class=\"b-dropdown-payment-method__item\">\n <bento-payment-method :type=\"value\" :label=\"description ? undefined : label\" />\n\n <div v-if=\"description\" class=\"b-dropdown-payment-method__text\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n <bento-typography el=\"span\" class=\"b-dropdown-payment-method__description\">{{\n description\n }}</bento-typography>\n </div>\n </div>\n </template>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType } from 'vue';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import { BentoTypography } from '@/components/typography';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { type BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the payment method dropdown with.\n * It must be an array of {@see BentoPaymentMethodListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string} value.value - Payment type code that translates to a payment icon name {@see https://adyen-ui-assets.netlify.app/?path=/story/packages-ui-assets-payment-method-icons--icons}\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n * @deprecated Since v2.0.0. Use `v-model` or `update:model-value` instead.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n if (props.value) {\n deprecate(\n 'BentoDropdownPaymentMethod \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownPaymentMethod\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod } from '@adyen/bento-vue2';\n * import type { BentoPaymentMethodListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownPaymentMethod },\n * template: `\n * <bento-dropdown-payment-method\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 'Visa'\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('ideal') // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: 'ideal' },\n * { label: 'Option 2', value: 'visa' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-payment-method.scss\" />\n","<template>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n class=\"b-dropdown-tag\"\n :items=\"tagItems\"\n show-slot-content-in-multiple\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the tag dropdown with.\n * It must be an array of {@see BentoTagListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string | number} value.value - Value of the option\n * @property {string} value.variant - The BentTag variant shown for the option.\n */\n items: {\n type: Array as PropType<BentoTagListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n * @deprecated Since v2.0.0. Use `v-model` or `update:model-value` instead.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\n\n if (props.value) {\n deprecate(\n 'BentoDropdownTag \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownTag\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Tag Dropdown showing a selectable list of tags.\n *\n * @example\n * import { BentoDropdownTag } from '@adyen/bento-vue2';\n * import type { BentoTagListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownTag },\n * template: `\n * <bento-dropdown-tag\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('unique-id-1') // Default value\n * const options: BentoTagListboxOptions = [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-tag',\n model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","props","__props","emit","__emit","emitValue","useFormFieldEmits","onUpdateModelValue","selectedValue","dropdownItems","computed","value","label","src","deprecate","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","__default__$2","filteredItems","ref","watch","search","searchTerm","searchableItems","normalizedResults","useSearchBarFilter","result","__default__$1","__default__","tagItems"],"mappings":"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"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { computed as r, ref as A, onMounted as Qt, onUnmounted as el, watch as ye, defineComponent as Q, resolveComponent as H, openBlock as b, createElementBlock as L, createVNode as W, withCtx as M, createTextVNode as oe, toDisplayString as Y, createElementVNode as X, renderSlot as J, mergeProps as z, withKeys as ge, createCommentVNode as q, createBlock as F, withModifiers as Ee, normalizeProps as fe, guardReactiveProps as we, withDirectives as Se, vShow as Ue, nextTick as pe, toRef as ue, resolveDirective as wt, toHandlers as ve, Fragment as he, renderList as de, createSlots as Ie, normalizeClass as Oe, unref as f, useSlots as Ke, useAttrs as ft, toRefs as At, resolveDynamicComponent as $t, inject as vt } from "vue";
|
|
2
2
|
import { B as Ne, d as ct } from "./typography.wIM07Hbl.js";
|
|
3
3
|
import { g as Me } from "./generate-uid.DBWe4g6T.js";
|
|
4
|
+
import { u as tl } from "./aria-label.CaUURpnB.js";
|
|
4
5
|
import { u as Pe } from "./index.B875RXHM.js";
|
|
5
|
-
import {
|
|
6
|
+
import { u as ll } from "./form-field.D_2g7vaP.js";
|
|
7
|
+
import { u as al } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
6
8
|
import { u as kt } from "./use-has-slot.CyMiImRQ.js";
|
|
7
|
-
import {
|
|
8
|
-
import { C as ll } from "./cross-circle-fill-small.H1wH-vcZ.js";
|
|
9
|
-
import { _ as te } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
10
|
-
import { C as _t } from "./chevron-down.XeE-LBV_.js";
|
|
11
|
-
import { C as Dt } from "./chevron-up.Cmgl2a3x.js";
|
|
12
|
-
/* empty css */
|
|
13
|
-
import { u as al } from "./aria-label.CaUURpnB.js";
|
|
14
|
-
import { u as ol } from "./form-field.D_2g7vaP.js";
|
|
15
|
-
import { u as sl } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
16
|
-
import { B as nl } from "./directive.D1-d-C2K.js";
|
|
9
|
+
import { B as ol } from "./directive.D1-d-C2K.js";
|
|
17
10
|
import { B as ee, a as Ye } from "./keyboard-navigation.DWmhelVv.js";
|
|
18
|
-
import { B as
|
|
19
|
-
import { B as
|
|
20
|
-
import { o as
|
|
21
|
-
import { B as lt, N as
|
|
22
|
-
import { C as
|
|
23
|
-
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
11
|
+
import { B as _t } from "./loading-indicator.BPol9I84.js";
|
|
12
|
+
import { B as Dt } from "./empty-state.CcmkgiUA.js";
|
|
13
|
+
import { o as sl } from "./resize.Bqks3WUm.js";
|
|
14
|
+
import { B as lt, N as nl } from "./minus-small.BZ-ZyAWF.js";
|
|
15
|
+
import { C as il } from "./checkmark-small.CRuZauJc.js";
|
|
16
|
+
/* empty css */
|
|
17
|
+
import { _ as te } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
18
|
+
import { B as rl } from "./chip.BJq22P-k.js";
|
|
19
|
+
import { C as xt } from "./chevron-down.XeE-LBV_.js";
|
|
20
|
+
import { C as Bt } from "./chevron-up.Cmgl2a3x.js";
|
|
21
|
+
import { b as at, a as dl, h as ul, e as cl } from "./button-actions.iIMUk8Vx.js";
|
|
22
|
+
import { F as pl } from "./field-label.B3HF2C1r.js";
|
|
26
23
|
import { P as St } from "./popper-container.CiDvPvKf.js";
|
|
27
|
-
import { E as
|
|
24
|
+
import { E as bl } from "./error-message.ROkM72Gh.js";
|
|
25
|
+
import { s as Ve } from "./events.BQOQSSb7.js";
|
|
26
|
+
import { C as fl } from "./cross-circle-fill.BWCKKn0E.js";
|
|
27
|
+
import { C as vl } from "./cross-circle-fill-small.H1wH-vcZ.js";
|
|
28
28
|
import "../assets/dropdown.css";
|
|
29
29
|
const Rt = (e, a, n, l) => {
|
|
30
30
|
const i = r(
|
|
@@ -82,7 +82,7 @@ function ml(e, { disabled: a, itemHeight: n, overscan: l = 5, prefixHeight: i })
|
|
|
82
82
|
C();
|
|
83
83
|
};
|
|
84
84
|
a || (Qt(() => {
|
|
85
|
-
s.value && (u.value = s.value.clientHeight, c =
|
|
85
|
+
s.value && (u.value = s.value.clientHeight, c = sl(s.value, ({ clientHeight: w }) => {
|
|
86
86
|
u.value = w, C();
|
|
87
87
|
}), C());
|
|
88
88
|
}), el(() => {
|
|
@@ -689,7 +689,7 @@ const Pl = /* @__PURE__ */ te(Rl, [["render", Nl]]), Fl = {}, zl = /* @__PURE__
|
|
|
689
689
|
class: Oe(["b-checkbox-input", n.value]),
|
|
690
690
|
role: "presentation"
|
|
691
691
|
}, [
|
|
692
|
-
i.indeterminate ? (b(), F(f(
|
|
692
|
+
i.indeterminate ? (b(), F(f(nl), {
|
|
693
693
|
key: 0,
|
|
694
694
|
class: "b-checkbox-input__icon",
|
|
695
695
|
"svg-title": "",
|
|
@@ -700,7 +700,7 @@ const Pl = /* @__PURE__ */ te(Rl, [["render", Nl]]), Fl = {}, zl = /* @__PURE__
|
|
|
700
700
|
"svg-title": "",
|
|
701
701
|
"aria-hidden": "true",
|
|
702
702
|
"data-testid": "decorative-checkbox-double-checkmark-icon"
|
|
703
|
-
})) : i.checked ? (b(), F(f(
|
|
703
|
+
})) : i.checked ? (b(), F(f(il), {
|
|
704
704
|
key: 2,
|
|
705
705
|
class: "b-checkbox-input__icon",
|
|
706
706
|
"svg-title": "",
|
|
@@ -748,7 +748,7 @@ const Ft = {
|
|
|
748
748
|
() => n.loading ? at.LOADING : at.START
|
|
749
749
|
), s = r(() => n.loading ? a("loading") : a("showMore"));
|
|
750
750
|
return (t, o) => l.value || t.loading ? (b(), L("div", Vl, [
|
|
751
|
-
l.value ? (b(), F(f(
|
|
751
|
+
l.value ? (b(), F(f(dl), {
|
|
752
752
|
key: 0,
|
|
753
753
|
state: i.value,
|
|
754
754
|
tabindex: t.tabindex,
|
|
@@ -760,7 +760,7 @@ const Ft = {
|
|
|
760
760
|
oe(Y(s.value), 1)
|
|
761
761
|
]),
|
|
762
762
|
_: 1
|
|
763
|
-
}, 8, ["state", "tabindex", "condensed"])) : t.loading ? (b(), F(f(
|
|
763
|
+
}, 8, ["state", "tabindex", "condensed"])) : t.loading ? (b(), F(f(_t), { key: 1 })) : q("", !0)
|
|
764
764
|
])) : q("", !0);
|
|
765
765
|
}
|
|
766
766
|
}), zt = /* @__PURE__ */ te(Ul, [["__scopeId", "data-v-ae5fccad"]]), Vt = {
|
|
@@ -812,7 +812,7 @@ const Ft = {
|
|
|
812
812
|
ge(Ee(t, ["prevent"]), ["space"])
|
|
813
813
|
]
|
|
814
814
|
}, [
|
|
815
|
-
l.value ? (b(), F(f(
|
|
815
|
+
l.value ? (b(), F(f(Dt), {
|
|
816
816
|
key: 0,
|
|
817
817
|
variant: "basic",
|
|
818
818
|
class: "b-listbox-multi-select-nested-lazy-load__error-message"
|
|
@@ -851,8 +851,8 @@ const Ft = {
|
|
|
851
851
|
BentoTypography: Ne,
|
|
852
852
|
BentoListboxOption: ot,
|
|
853
853
|
BentoListboxMultiSelectNestedLazyLoad: Yl,
|
|
854
|
-
ChevronDownIcon:
|
|
855
|
-
ChevronUpIcon:
|
|
854
|
+
ChevronDownIcon: xt,
|
|
855
|
+
ChevronUpIcon: Bt,
|
|
856
856
|
DecorativeCheckbox: yt
|
|
857
857
|
},
|
|
858
858
|
props: {
|
|
@@ -1499,7 +1499,7 @@ const sa = /* @__PURE__ */ te(ta, [["render", oa], ["__scopeId", "data-v-dba55b0
|
|
|
1499
1499
|
(b(!0), L(he, null, de($e.value, (E) => (b(), L("li", {
|
|
1500
1500
|
key: E.value
|
|
1501
1501
|
}, [
|
|
1502
|
-
W(f(
|
|
1502
|
+
W(f(rl), {
|
|
1503
1503
|
ref_for: !0,
|
|
1504
1504
|
ref_key: "selectedListboxItemsRef",
|
|
1505
1505
|
ref: p,
|
|
@@ -1586,11 +1586,11 @@ const sa = /* @__PURE__ */ te(ta, [["render", oa], ["__scopeId", "data-v-dba55b0
|
|
|
1586
1586
|
}, ca = 36, pa = Q({
|
|
1587
1587
|
name: "bento-listbox",
|
|
1588
1588
|
components: {
|
|
1589
|
-
BentoEmptyState:
|
|
1589
|
+
BentoEmptyState: Dt,
|
|
1590
1590
|
BentoListboxSingleSelect: Bl,
|
|
1591
1591
|
BentoListboxMultiSelect: Et,
|
|
1592
1592
|
BentoTypography: Ne,
|
|
1593
|
-
BentoLoadingIndicator:
|
|
1593
|
+
BentoLoadingIndicator: _t,
|
|
1594
1594
|
BentoListboxLazyLoad: zt
|
|
1595
1595
|
},
|
|
1596
1596
|
directives: { BentoKeyboardNavigationDirective: Ye },
|
|
@@ -2117,7 +2117,7 @@ const gt = {
|
|
|
2117
2117
|
"b-dropdown-options-container--single": !s?.multiple
|
|
2118
2118
|
})), v = r(() => ({
|
|
2119
2119
|
"b-dropdown-options-container__listbox--single": !s?.multiple
|
|
2120
|
-
})), { actions: C, internalSelectedValue: P, listeners: k, onEscapeKey: x, onOutsideDropdownClick: w } = ha(t, o, c, i), _ = r(() => s?.multiple ?
|
|
2120
|
+
})), { actions: C, internalSelectedValue: P, listeners: k, onEscapeKey: x, onOutsideDropdownClick: w } = ha(t, o, c, i), _ = r(() => s?.multiple ? ul : St), T = r(() => {
|
|
2121
2121
|
const O = {
|
|
2122
2122
|
"min-width": `${s?.targetElement?.clientWidth}px`,
|
|
2123
2123
|
"max-width": "min(500px, 95%)"
|
|
@@ -2481,10 +2481,10 @@ const Ia = /* @__PURE__ */ Symbol("dropdown small size injection key"), Wt = /*
|
|
|
2481
2481
|
onKeydown: ge(Ee(ie, ["stop"]), ["enter"]),
|
|
2482
2482
|
onKeyup: ge(ie, ["space"])
|
|
2483
2483
|
}, [
|
|
2484
|
-
e.size === f(Ge).SMALL ? (b(), F(f(
|
|
2484
|
+
e.size === f(Ge).SMALL ? (b(), F(f(vl), {
|
|
2485
2485
|
key: 0,
|
|
2486
2486
|
"svg-title": f(l)("clearSearch")
|
|
2487
|
-
}, null, 8, ["svg-title"])) : (b(), F(f(
|
|
2487
|
+
}, null, 8, ["svg-title"])) : (b(), F(f(fl), {
|
|
2488
2488
|
key: 1,
|
|
2489
2489
|
"svg-title": f(l)("clearSearch")
|
|
2490
2490
|
}, null, 8, ["svg-title"]))
|
|
@@ -2633,10 +2633,10 @@ const Ia = /* @__PURE__ */ Symbol("dropdown small size injection key"), Wt = /*
|
|
|
2633
2633
|
}, ve(C)), Ie({
|
|
2634
2634
|
icon: M(() => [
|
|
2635
2635
|
X("div", Ba, [
|
|
2636
|
-
Se(W(f(
|
|
2636
|
+
Se(W(f(Bt), { "svg-title": "opened" }, null, 512), [
|
|
2637
2637
|
[Ue, m.value]
|
|
2638
2638
|
]),
|
|
2639
|
-
Se(W(f(
|
|
2639
|
+
Se(W(f(xt), { "svg-title": "closed" }, null, 512), [
|
|
2640
2640
|
[Ue, !m.value]
|
|
2641
2641
|
])
|
|
2642
2642
|
])
|
|
@@ -3001,12 +3001,12 @@ const Ht = {
|
|
|
3001
3001
|
},
|
|
3002
3002
|
emits: ["input", "update:model-value", "show-more", "open"],
|
|
3003
3003
|
setup(e, { expose: a, emit: n }) {
|
|
3004
|
-
const l = ft(), i = Ke(), s = kt(i), t = e, o = n, { t: m } = Pe({ messages: Ht }), { emitValue: u } =
|
|
3004
|
+
const l = ft(), i = Ke(), s = kt(i), t = e, o = n, { t: m } = Pe({ messages: Ht }), { emitValue: u } = ll(o), c = A(null), d = A(null), p = A(null), v = A(!1), C = A(!1), P = Me("bento-dropdown-options-container"), k = Me("dropdown-label"), x = Me("dropdown-description"), w = Me("dropdown-error"), { isReadOnly: _ } = al(ue(t, "readonly")), T = r(() => t.modelValue ?? t.value), { cachedSelectedListboxOptions: O, cachedListboxSelectedValues: N, setCachedValues: B } = ga(
|
|
3005
3005
|
ue(t, "items"),
|
|
3006
3006
|
T,
|
|
3007
3007
|
ue(t, "multiple"),
|
|
3008
3008
|
ue(t, "enableValueLabelPair")
|
|
3009
|
-
), V = A(l["aria-label"]), se = A(l["aria-describedby"]), { ariaLabel: ne, label: R } = At(t), D = r(() => m("ariaLabelFallback")), K =
|
|
3009
|
+
), V = A(l["aria-label"]), se = A(l["aria-describedby"]), { ariaLabel: ne, label: R } = At(t), D = r(() => m("ariaLabelFallback")), K = tl({
|
|
3010
3010
|
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
3011
3011
|
ariaLabel: ne.value || V,
|
|
3012
3012
|
label: R,
|
|
@@ -3155,7 +3155,7 @@ const Ht = {
|
|
|
3155
3155
|
}), (h, Te) => Se((b(), L("div", {
|
|
3156
3156
|
class: Oe(["b-dropdown", ie.value])
|
|
3157
3157
|
}, [
|
|
3158
|
-
f(R) ? (b(), F(f(
|
|
3158
|
+
f(R) ? (b(), F(f(pl), {
|
|
3159
3159
|
key: 0,
|
|
3160
3160
|
id: f(k),
|
|
3161
3161
|
condensed: h.condensed,
|
|
@@ -3214,7 +3214,7 @@ const Ht = {
|
|
|
3214
3214
|
], 16)), [
|
|
3215
3215
|
[f(Ye)]
|
|
3216
3216
|
]),
|
|
3217
|
-
c.value ? (b(), F(f(
|
|
3217
|
+
c.value ? (b(), F(f(cl), {
|
|
3218
3218
|
key: 1,
|
|
3219
3219
|
disabled: h.teleport?.disabled,
|
|
3220
3220
|
to: h.teleport?.to
|
|
@@ -3252,7 +3252,7 @@ const Ht = {
|
|
|
3252
3252
|
]),
|
|
3253
3253
|
_: 3
|
|
3254
3254
|
}, 8, ["disabled", "to"])) : q("", !0),
|
|
3255
|
-
h.errorMessage ? (b(), F(f(
|
|
3255
|
+
h.errorMessage ? (b(), F(f(bl), {
|
|
3256
3256
|
key: 2,
|
|
3257
3257
|
id: f(w),
|
|
3258
3258
|
"error-message": h.errorMessage,
|
|
@@ -3272,7 +3272,7 @@ const Ht = {
|
|
|
3272
3272
|
_: 3
|
|
3273
3273
|
}, 8, ["id", "class"])) : q("", !0)
|
|
3274
3274
|
], 2)), [
|
|
3275
|
-
[f(
|
|
3275
|
+
[f(ol), G.value]
|
|
3276
3276
|
]);
|
|
3277
3277
|
}
|
|
3278
3278
|
}), Do = /* @__PURE__ */ te(ao, [["__scopeId", "data-v-df996f26"]]);
|
|
@@ -3292,4 +3292,4 @@ export {
|
|
|
3292
3292
|
yt as j,
|
|
3293
3293
|
ga as u
|
|
3294
3294
|
};
|
|
3295
|
-
//# sourceMappingURL=dropdown.
|
|
3295
|
+
//# sourceMappingURL=dropdown.ByQDIs7p.js.map
|