@adyen/bento-vue3 1.68.0 → 1.68.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/@types/index.d.ts +296 -25
- package/dist/action-bar.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/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/inspector.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/chunks/{action-bar.C93kgr7l.js → action-bar.CflF49oL.js} +2 -2
- package/dist/chunks/{action-bar.C93kgr7l.js.map → action-bar.CflF49oL.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.DUccmaB2.js → button-actions-with-menu.8ZYh7-9s.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.DUccmaB2.js.map → button-actions-with-menu.8ZYh7-9s.js.map} +1 -1
- package/dist/chunks/{code-snippet.aucmPbLw.js → code-snippet.D5M76Qy6.js} +2 -2
- package/dist/chunks/{code-snippet.aucmPbLw.js.map → code-snippet.D5M76Qy6.js.map} +1 -1
- package/dist/chunks/{dashboard-section.CUcq2ahu.js → dashboard-section.Bhd5Lsy2.js} +2 -2
- package/dist/chunks/{dashboard-section.CUcq2ahu.js.map → dashboard-section.Bhd5Lsy2.js.map} +1 -1
- package/dist/chunks/{data-grid-template.CDsV2GFG.js → data-grid-template.DSwj7e1E.js} +2 -2
- package/dist/chunks/{data-grid-template.CDsV2GFG.js.map → data-grid-template.DSwj7e1E.js.map} +1 -1
- package/dist/chunks/{data-grid.BJHcfrTG.js → data-grid.BEdELRNZ.js} +10 -11
- package/dist/chunks/data-grid.BEdELRNZ.js.map +1 -0
- package/dist/chunks/{date-picker.DgpMAGYp.js → date-picker.CAoXTiZR.js} +14 -14
- package/dist/chunks/{date-picker.DgpMAGYp.js.map → date-picker.CAoXTiZR.js.map} +1 -1
- package/dist/chunks/{date-range-picker.Bxa_f6Q0.js → date-range-picker.DtV4L3L6.js} +22 -22
- package/dist/chunks/{date-range-picker.Bxa_f6Q0.js.map → date-range-picker.DtV4L3L6.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.AV8Pi1SS.js → dropdown-tag.B3fptORX.js} +2 -2
- package/dist/chunks/{dropdown-tag.AV8Pi1SS.js.map → dropdown-tag.B3fptORX.js.map} +1 -1
- package/dist/chunks/{dropdown.CJBk1euy.js → dropdown.CMOYmQLB.js} +24 -24
- package/dist/chunks/{dropdown.CJBk1euy.js.map → dropdown.CMOYmQLB.js.map} +1 -1
- package/dist/chunks/{filter-bar.6D-9UEng.js → filter-bar.DoHMLZ4O.js} +6 -6
- package/dist/chunks/{filter-bar.6D-9UEng.js.map → filter-bar.DoHMLZ4O.js.map} +1 -1
- package/dist/chunks/{header-with-views.DbBUHvvE.js → header-with-views.BUed3ocZ.js} +4 -4
- package/dist/chunks/{header-with-views.DbBUHvvE.js.map → header-with-views.BUed3ocZ.js.map} +1 -1
- package/dist/chunks/{header.wiq0wlgm.js → header.CwKjDgKv.js} +2 -2
- package/dist/chunks/{header.wiq0wlgm.js.map → header.CwKjDgKv.js.map} +1 -1
- package/dist/chunks/{input-field-password.Cr3A_4n0.js → input-field-password.DN0Jro1V.js} +3 -3
- package/dist/chunks/{input-field-password.Cr3A_4n0.js.map → input-field-password.DN0Jro1V.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.DZp5IzU3.js → input-field-phone-number.BhPsrafR.js} +3 -3
- package/dist/chunks/{input-field-phone-number.DZp5IzU3.js.map → input-field-phone-number.BhPsrafR.js.map} +1 -1
- package/dist/chunks/{input-field.CmV2d_Zc.js → input-field.su5Cq8Dt.js} +2 -2
- package/dist/chunks/{input-field.CmV2d_Zc.js.map → input-field.su5Cq8Dt.js.map} +1 -1
- package/dist/chunks/{menu.C-3obPGl.js → menu.EtjeOPXX.js} +182 -183
- package/dist/chunks/menu.EtjeOPXX.js.map +1 -0
- package/dist/chunks/{pagination.DLYrWpKr.js → pagination.fYQak4C8.js} +2 -2
- package/dist/chunks/{pagination.DLYrWpKr.js.map → pagination.fYQak4C8.js.map} +1 -1
- package/dist/chunks/popover.types.V8old-GW.js.map +1 -1
- package/dist/chunks/{search-bar.CpQ_MEVj.js → search-bar.CUrcP_wf.js} +3 -3
- package/dist/chunks/{search-bar.CpQ_MEVj.js.map → search-bar.CUrcP_wf.js.map} +1 -1
- package/dist/chunks/{secondary-nav.RTBLEukC.js → secondary-nav.j3ddtYoZ.js} +2 -2
- package/dist/chunks/{secondary-nav.RTBLEukC.js.map → secondary-nav.j3ddtYoZ.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.nYHtTHqy.js → tutorial.vue_vue_type_script_setup_true_lang.Dmf8fGaM.js} +2 -2
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.nYHtTHqy.js.map → tutorial.vue_vue_type_script_setup_true_lang.Dmf8fGaM.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/dropdown.js +2 -2
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +20 -20
- 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/internal.js +1 -1
- package/dist/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/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/chunks/data-grid.BJHcfrTG.js.map +0 -1
- package/dist/chunks/menu.C-3obPGl.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as i, computed as I, createElementBlock as B, openBlock as y, createVNode as l, mergeProps as v, withCtx as f, unref as _, toRefs as A, createTextVNode as T, toDisplayString as x, ref as h, watch as D, createBlock as g } from "vue";
|
|
2
2
|
import { B as k } from "./avatar.B0-9jC6H.js";
|
|
3
|
-
import { B as m, u as O } from "./dropdown.
|
|
3
|
+
import { B as m, u as O } from "./dropdown.CMOYmQLB.js";
|
|
4
4
|
import { d as S, B as E } from "./typography.DN5eC5ch.js";
|
|
5
5
|
import { u as V } from "./use-country-items.Duh4bMqW.js";
|
|
6
6
|
import { B as $ } from "./country.types.C0Q_hhgJ.js";
|
|
@@ -227,4 +227,4 @@ export {
|
|
|
227
227
|
et as c,
|
|
228
228
|
ot as d
|
|
229
229
|
};
|
|
230
|
-
//# sourceMappingURL=dropdown-tag.
|
|
230
|
+
//# sourceMappingURL=dropdown-tag.B3fptORX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-tag.AV8Pi1SS.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 v-slot=\"{ label, data }\" v-bind=\"$props\" :items=\"dropdownItems\" @input=\"onInput\">\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\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 item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n }>();\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\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 });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ label }\" v-bind=\"$props\" :items=\"countryItems\" @input=\"onInput\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType, toRefs } from 'vue';\n import { BentoCountryListboxOptions } from './dropdown-country.types';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\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 {string} value.label - Use BentoDropdown instead of custom labels\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 item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n }>();\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', 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</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 });\n</script>\n","<template>\n <bento-dropdown v-slot=\"slotProps\" v-bind=\"$props\" :search=\"search\" :items=\"filteredItems\" @input=\"onInput\">\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType, ref, watch } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types';\n import { ListboxOptionTag } from '@/internal';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useSearchBarFilter } from '@/components/search-bar';\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 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 item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n }>();\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\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</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 });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ value, label }\" v-bind=\"$props\" @input=\"onInput\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n 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 item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n }>();\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\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 });\n</script>\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 @input=\"onInput\"\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, PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '../../../../../types';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\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 item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n }>();\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\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 });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","props","__props","emit","__emit","onInput","selectedValue","dropdownItems","computed","value","label","src","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","deprecate","__default__$2","filteredItems","ref","watch","search","searchTerm","searchableItems","searchResults","useSearchBarFilter","_a","normalizedResults","result","__default__$1","__default__","tagItems"],"mappings":";;;;;;;;;;AAuEI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;AA1DA,UAAAC,IAAAC,GAeAC,IAAAC,GAOAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA,GAEAC,IAAAC,EAAA,MAAAP,EAAA,MAAA,IAAA,CAAA,EAAA,OAAAQ,GAAA,OAAAC,GAAA,KAAAC,EAAA,OAAA,EAAA,OAAAF,GAAA,OAAAC,GAAA,MAAAC,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;ICqDAC,IAAAZ,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA5EA,UAAAC,IAAAC,GAwBAC,IAAAC,GAOAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA,GAEA,EAAA,SAAAO,GAAA,OAAAC,EAAA,IAAAC,EAAAd,CAAA,GACAe,IAAAC,EAAAJ,GAAAC,CAAA;AAEA,YAAAD,EAAA,UAAA,YAAAC,EAAA,MAAA,KAAA,CAAAI,MAAAA,EAAA,KAAA,MACIC;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IACA;;;;;;;;;;;;;;;;;IC4CRC,IAAApB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;AA1FA,UAAAC,IAAAC,GAcAC,IAAAC,GAOAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA,GACAe,IAAAC,EAAA,CAAA,CAAA;AAEA,IAAAC;AAAA,MAAA,MAAAtB,EAAA;AAAA,MACgB,MAAAoB,EAAA,QAAApB,EAAA;AAAA,MACuB,EAAA,WAAA,GAAA;AAAA,IACjB;AAGtB,UAAAuB,IAAAvB,EAAA,SAAAA,EAAA,SAAA;AAAA,MAEM,cAAA;AAAA,MACkB,aAAA,OAAAwB,MAAA;;AAGV,cAAAC,IAAAzB,EAAA,MAAA,IAAA,CAAAiB,OAAA;AAAA,UAAiD,GAAAA;AAAA,UAC1C,OAAA,GAAAA,EAAA,KAAA,IAAAA,EAAA,KAAA;AAAA,QAC+B,EAAA,GAGtCS,IAAAC;AAAA,UAAsBN,EAAAG,CAAA;AAAA,UACJH,EAAAI,CAAA;AAAA,WACkCG,IAAA5B,KAAA,gBAAAA,EAAA,WAAA,gBAAA4B,EAAA;AAAA,UACjCP,EAAA,EAAA;AAAA,QACN,EAAA,OAIbQ,IAAAH,KAAA,gBAAAA,EAAA,IAAA,CAAAI,OAAA;AAAA,UAAwD,GAAAA;AAAA,UACjD,OAAAA,EAAA,MAAA,UAAAA,EAAA,MAAA,SAAA,CAAA;AAAA,QACkD;AAGzD,QAAAV,EAAA,QAAAS;AAAA,MAAsB;AAAA,IAC1B;;;;;;;;;;;;ICDVE,IAAAhC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;AAzCA,UAAAG,IAAAC,GAOAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA;;;;;;;;;;;;;ICsCA2B,IAAAjC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;AAxDA,UAAAC,IAAAC,GAeAC,IAAAC,GAOAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA,GAEA4B,IAAA1B,EAAA,MAAA;;AAAA,cAAAqB,IAAA5B,EAAA,UAAA,gBAAA4B,EAAA,IAAA,CAAA,EAAA,OAAAnB,GAAA,OAAAD,GAAA,SAAAI,EAAA,OAAA,EAAA,OAAAH,GAAA,OAAAD,GAAA,MAAAI,EAAA;AAAA,KAAA;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"dropdown-tag.B3fptORX.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 v-slot=\"{ label, data }\" v-bind=\"$props\" :items=\"dropdownItems\" @input=\"onInput\">\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\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 item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n }>();\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\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 });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ label }\" v-bind=\"$props\" :items=\"countryItems\" @input=\"onInput\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType, toRefs } from 'vue';\n import { BentoCountryListboxOptions } from './dropdown-country.types';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\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 {string} value.label - Use BentoDropdown instead of custom labels\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 item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n }>();\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', 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</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 });\n</script>\n","<template>\n <bento-dropdown v-slot=\"slotProps\" v-bind=\"$props\" :search=\"search\" :items=\"filteredItems\" @input=\"onInput\">\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType, ref, watch } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types';\n import { ListboxOptionTag } from '@/internal';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useSearchBarFilter } from '@/components/search-bar';\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 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 item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n }>();\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\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</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 });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ value, label }\" v-bind=\"$props\" @input=\"onInput\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n 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 item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n }>();\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\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 });\n</script>\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 @input=\"onInput\"\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, PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '../../../../../types';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\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 item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n }>();\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\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 });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","props","__props","emit","__emit","onInput","selectedValue","dropdownItems","computed","value","label","src","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","deprecate","__default__$2","filteredItems","ref","watch","search","searchTerm","searchableItems","searchResults","useSearchBarFilter","_a","normalizedResults","result","__default__$1","__default__","tagItems"],"mappings":";;;;;;;;;;AAuEI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;AA1DA,UAAAC,IAAAC,GAeAC,IAAAC,GAOAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA,GAEAC,IAAAC,EAAA,MAAAP,EAAA,MAAA,IAAA,CAAA,EAAA,OAAAQ,GAAA,OAAAC,GAAA,KAAAC,EAAA,OAAA,EAAA,OAAAF,GAAA,OAAAC,GAAA,MAAAC,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;ICqDAC,IAAAZ,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA5EA,UAAAC,IAAAC,GAwBAC,IAAAC,GAOAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA,GAEA,EAAA,SAAAO,GAAA,OAAAC,EAAA,IAAAC,EAAAd,CAAA,GACAe,IAAAC,EAAAJ,GAAAC,CAAA;AAEA,YAAAD,EAAA,UAAA,YAAAC,EAAA,MAAA,KAAA,CAAAI,MAAAA,EAAA,KAAA,MACIC;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IACA;;;;;;;;;;;;;;;;;IC4CRC,IAAApB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;AA1FA,UAAAC,IAAAC,GAcAC,IAAAC,GAOAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA,GACAe,IAAAC,EAAA,CAAA,CAAA;AAEA,IAAAC;AAAA,MAAA,MAAAtB,EAAA;AAAA,MACgB,MAAAoB,EAAA,QAAApB,EAAA;AAAA,MACuB,EAAA,WAAA,GAAA;AAAA,IACjB;AAGtB,UAAAuB,IAAAvB,EAAA,SAAAA,EAAA,SAAA;AAAA,MAEM,cAAA;AAAA,MACkB,aAAA,OAAAwB,MAAA;;AAGV,cAAAC,IAAAzB,EAAA,MAAA,IAAA,CAAAiB,OAAA;AAAA,UAAiD,GAAAA;AAAA,UAC1C,OAAA,GAAAA,EAAA,KAAA,IAAAA,EAAA,KAAA;AAAA,QAC+B,EAAA,GAGtCS,IAAAC;AAAA,UAAsBN,EAAAG,CAAA;AAAA,UACJH,EAAAI,CAAA;AAAA,WACkCG,IAAA5B,KAAA,gBAAAA,EAAA,WAAA,gBAAA4B,EAAA;AAAA,UACjCP,EAAA,EAAA;AAAA,QACN,EAAA,OAIbQ,IAAAH,KAAA,gBAAAA,EAAA,IAAA,CAAAI,OAAA;AAAA,UAAwD,GAAAA;AAAA,UACjD,OAAAA,EAAA,MAAA,UAAAA,EAAA,MAAA,SAAA,CAAA;AAAA,QACkD;AAGzD,QAAAV,EAAA,QAAAS;AAAA,MAAsB;AAAA,IAC1B;;;;;;;;;;;;ICDVE,IAAAhC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;AAzCA,UAAAG,IAAAC,GAOAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA;;;;;;;;;;;;;ICsCA2B,IAAAjC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;AAxDA,UAAAC,IAAAC,GAeAC,IAAAC,GAOAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA,GAEA4B,IAAA1B,EAAA,MAAA;;AAAA,cAAAqB,IAAA5B,EAAA,UAAA,gBAAA4B,EAAA,IAAA,CAAA,EAAA,OAAAnB,GAAA,OAAAD,GAAA,SAAAI,EAAA,OAAA,EAAA,OAAAH,GAAA,OAAAD,GAAA,MAAAI,EAAA;AAAA,KAAA;;;;;;;;;;;;;;;;"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { ref as C, watch as Ie, computed as d, defineComponent as z, useSlots as Ne, toRefs as $e, createBlock as _, openBlock as S, resolveDynamicComponent as Ae, mergeProps as R, withCtx as F, createElementVNode as oe, withKeys as tt, unref as s, createVNode as X, toHandlers as te, createSlots as ce, renderList as pe, renderSlot as G, normalizeProps as fe, guardReactiveProps as me, createElementBlock as P, createCommentVNode as K, toDisplayString as be, normalizeClass as ve, withDirectives as ae, vShow as Ce, nextTick as I, useAttrs as at, toRef as B, inject as ot, createTextVNode as lt } from "vue";
|
|
2
2
|
import { d as Oe, B as nt } from "./typography.DN5eC5ch.js";
|
|
3
|
+
import { a as de, b as H, c as st, B as ee, D as it } from "./dropdown-default-textbox.Ce5D3ipi.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { _ as Y } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
+
import { s as ue } from "./events.FNmSWp_P.js";
|
|
3
7
|
import { g as J } from "./generate-uid.NJ8tVoha.js";
|
|
4
|
-
import { u as
|
|
8
|
+
import { u as rt } from "./aria-label.CaUURpnB.js";
|
|
5
9
|
import { u as ge } from "./i18n.B6g5VX0q.js";
|
|
6
|
-
import { a as f, b as ye, B as Be, c as
|
|
7
|
-
import { u as
|
|
8
|
-
import { B as
|
|
9
|
-
import {
|
|
10
|
-
import { B as A, a as pt } from "./keyboard-navigation.CqgGzfZQ.js";
|
|
11
|
-
import { a as ue, b as H, c as ft, B as ee, D as mt } from "./dropdown-default-textbox.Ce5D3ipi.js";
|
|
10
|
+
import { a as f, b as ye, B as Be, c as dt, u as ut, d as ct } from "./use-cached-selected-values.Dyoz6cUK.js";
|
|
11
|
+
import { u as pt } from "./use-form-layout-loading.D3lALhtC.js";
|
|
12
|
+
import { B as ft } from "./directive.Cbdox5VL.js";
|
|
13
|
+
import { B as A, a as mt } from "./keyboard-navigation.CqgGzfZQ.js";
|
|
12
14
|
import { u as vt } from "./use-has-slot.B7eQSabc.js";
|
|
13
15
|
import { F as yt, E as bt } from "./error-message.DHMHq9bR.js";
|
|
14
16
|
import { P as De } from "./popper-container.b5h4zYgT.js";
|
|
15
17
|
import "./popper-container.types.BCZMbVFD.js";
|
|
16
18
|
import { B as gt } from "./popover.DYgCCUCJ.js";
|
|
17
|
-
import { _ as Y } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
18
|
-
/* empty css */
|
|
19
19
|
import "../assets/dropdown.css";
|
|
20
20
|
const he = {
|
|
21
21
|
"en-US": {
|
|
@@ -386,19 +386,19 @@ const It = /* @__PURE__ */ Y(Dt, [["render", xt]]), Nt = { class: "b-dropdown-sm
|
|
|
386
386
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
387
387
|
setup(t, { expose: r, emit: i }) {
|
|
388
388
|
const a = i, n = t, l = C(null), e = d(() => ({
|
|
389
|
-
[`b-dropdown-small-textbox--${
|
|
390
|
-
[`b-dropdown-small-textbox--${
|
|
391
|
-
[`b-dropdown-small-textbox--${
|
|
389
|
+
[`b-dropdown-small-textbox--${de.DISABLED}`]: n.disabled,
|
|
390
|
+
[`b-dropdown-small-textbox--${de.READONLY}`]: n.readonly,
|
|
391
|
+
[`b-dropdown-small-textbox--${de.OPENED}`]: n.open
|
|
392
392
|
})), u = d(() => n.open && !n.disabled && !n.readonly), v = (m) => {
|
|
393
393
|
a("input", m);
|
|
394
394
|
}, b = (m) => {
|
|
395
395
|
a("keydown", m);
|
|
396
396
|
}, c = (m) => {
|
|
397
|
-
|
|
397
|
+
ue(m), a("open");
|
|
398
398
|
}, g = (m) => {
|
|
399
|
-
|
|
399
|
+
ue(m), a("close");
|
|
400
400
|
}, p = (m) => {
|
|
401
|
-
|
|
401
|
+
ue(m), a("clear");
|
|
402
402
|
}, w = {
|
|
403
403
|
[H.INPUT]: v,
|
|
404
404
|
[H.OPEN]: c,
|
|
@@ -413,7 +413,7 @@ const It = /* @__PURE__ */ Y(Dt, [["render", xt]]), Nt = { class: "b-dropdown-sm
|
|
|
413
413
|
}), (m, D) => (S(), P("div", {
|
|
414
414
|
class: ve(["b-dropdown-small-textbox", e.value])
|
|
415
415
|
}, [
|
|
416
|
-
X(
|
|
416
|
+
X(st, R({
|
|
417
417
|
ref_key: "baseTextbox",
|
|
418
418
|
ref: l
|
|
419
419
|
}, { ...m.$attrs, ...m.$props }, {
|
|
@@ -558,7 +558,7 @@ const Re = {
|
|
|
558
558
|
i18n: { messages: Re },
|
|
559
559
|
name: "b-dropdown",
|
|
560
560
|
components: {
|
|
561
|
-
DropdownInputDefault:
|
|
561
|
+
DropdownInputDefault: it,
|
|
562
562
|
DropdownInputSmall: Mt
|
|
563
563
|
}
|
|
564
564
|
}), Vt = /* @__PURE__ */ z({
|
|
@@ -596,12 +596,12 @@ const Re = {
|
|
|
596
596
|
emits: ["input", "show-more"],
|
|
597
597
|
setup(t, { expose: r, emit: i }) {
|
|
598
598
|
var Ee;
|
|
599
|
-
const a = at(), n = Ne(), l = vt(n), e = t, u = i, { t: v } = ge({ messages: Re }), b = C(null), c = C(null), g = C(null), p = C(!1), w = J("bento-dropdown-options-container"), O = J("dropdown-label"), m = J("dropdown-description"), D = J("dropdown-error"), { isReadOnly: E } =
|
|
599
|
+
const a = at(), n = Ne(), l = vt(n), e = t, u = i, { t: v } = ge({ messages: Re }), b = C(null), c = C(null), g = C(null), p = C(!1), w = J("bento-dropdown-options-container"), O = J("dropdown-label"), m = J("dropdown-description"), D = J("dropdown-error"), { isReadOnly: E } = pt(B(e, "readonly")), { cachedSelectedListboxOptions: h, cachedListboxSelectedValues: V, setCachedValues: W } = dt(
|
|
600
600
|
B(e, "items"),
|
|
601
601
|
B(e, "value"),
|
|
602
602
|
B(e, "multiple"),
|
|
603
603
|
B(e, "enableValueLabelPair")
|
|
604
|
-
), N = C(a["aria-label"]), { ariaLabel: T, label: $ } = $e(e), y = d(() => v("ariaLabelFallback")), L =
|
|
604
|
+
), N = C(a["aria-label"]), { ariaLabel: T, label: $ } = $e(e), y = d(() => v("ariaLabelFallback")), L = rt({
|
|
605
605
|
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
606
606
|
ariaLabel: T.value || N,
|
|
607
607
|
label: $,
|
|
@@ -630,7 +630,7 @@ const Re = {
|
|
|
630
630
|
}), Fe = d(() => {
|
|
631
631
|
const o = le.value.findIndex(({ value: x }) => e.enableValueLabelPair ? e.value.value === x : e.value === x);
|
|
632
632
|
return o > -1 ? o : 0;
|
|
633
|
-
}), { isMultiLevelSelect: Se, flattenedItemsList: ze } =
|
|
633
|
+
}), { isMultiLevelSelect: Se, flattenedItemsList: ze } = ut(Q), Ve = d(() => Se.value && !e.staticCategories), We = d(() => Ve.value ? "treeitem" : "option"), Ue = d(() => {
|
|
634
634
|
if (e.multiple) {
|
|
635
635
|
const o = Array.isArray(e.value) ? e.value.length : 0, x = Se.value ? ze.value.length : Q.value.length;
|
|
636
636
|
return o === 0 ? null : !e.hasMoreItems && x > 0 && x === o ? v("all") : o;
|
|
@@ -641,7 +641,7 @@ const Re = {
|
|
|
641
641
|
), qe = d(() => {
|
|
642
642
|
var o;
|
|
643
643
|
return (o = g.value) == null ? void 0 : o.$el;
|
|
644
|
-
}), { visibleDomOptions: He, updateVisibleDomOptions: we } =
|
|
644
|
+
}), { visibleDomOptions: He, updateVisibleDomOptions: we } = ct(
|
|
645
645
|
qe,
|
|
646
646
|
le,
|
|
647
647
|
We
|
|
@@ -747,7 +747,7 @@ const Re = {
|
|
|
747
747
|
}))
|
|
748
748
|
]), 1064, ["condensed", "value", "additional-items-selected", "aria-controls", "ariaExpanded", "aria-labelledby", "aria-describedby", "aria-label", "aria-readonly", "readonly", "disabled", "display-value", "dynamic-filtering", "is-invalid", "multiple", "open", "selected-value-item", "show-slot-content-in-multiple"]))
|
|
749
749
|
], 16)), [
|
|
750
|
-
[s(
|
|
750
|
+
[s(mt)]
|
|
751
751
|
]),
|
|
752
752
|
b.value ? (S(), _(s(wt), R({
|
|
753
753
|
key: 1,
|
|
@@ -799,7 +799,7 @@ const Re = {
|
|
|
799
799
|
_: 3
|
|
800
800
|
}, 8, ["id", "class"])) : K("", !0)
|
|
801
801
|
], 2)), [
|
|
802
|
-
[s(
|
|
802
|
+
[s(ft), Ye]
|
|
803
803
|
]);
|
|
804
804
|
};
|
|
805
805
|
}
|
|
@@ -811,4 +811,4 @@ export {
|
|
|
811
811
|
da as b,
|
|
812
812
|
Kt as u
|
|
813
813
|
};
|
|
814
|
-
//# sourceMappingURL=dropdown.
|
|
814
|
+
//# sourceMappingURL=dropdown.CMOYmQLB.js.map
|