@adyen/bento-vue2 1.53.0 → 1.54.0
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 +1832 -2154
- 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/button-actions.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/link.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/payment-method.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/summary-grid.css +1 -0
- package/dist/assets/tabs.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.Cuktzrp5.js → action-bar.CH1Mswou.js} +5 -5
- package/dist/chunks/{action-bar.Cuktzrp5.js.map → action-bar.CH1Mswou.js.map} +1 -1
- package/dist/chunks/{base-modal.DnaWOvaM.js → base-modal.kHzGyWf6.js} +3 -3
- package/dist/chunks/{base-modal.DnaWOvaM.js.map → base-modal.kHzGyWf6.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.twMFsb82.js → button-actions-with-menu.mqNecwDb.js} +5 -5
- package/dist/chunks/{button-actions-with-menu.twMFsb82.js.map → button-actions-with-menu.mqNecwDb.js.map} +1 -1
- package/dist/chunks/{button-actions.DAvSJtOB.js → button-actions.XlUhz42n.js} +42 -100
- package/dist/chunks/{button-actions.DAvSJtOB.js.map → button-actions.XlUhz42n.js.map} +1 -1
- package/dist/chunks/{calendar.CJToU_uI.js → calendar.D4dMXwc0.js} +4 -4
- package/dist/chunks/{calendar.CJToU_uI.js.map → calendar.D4dMXwc0.js.map} +1 -1
- package/dist/chunks/{card.AQO_BjGb.js → card.BT04hjvV.js} +2 -2
- package/dist/chunks/{card.AQO_BjGb.js.map → card.BT04hjvV.js.map} +1 -1
- package/dist/chunks/{checkbox-group.DkM6n3JR.js → checkbox-group.DZF4UIym.js} +4 -4
- package/dist/chunks/{checkbox-group.DkM6n3JR.js.map → checkbox-group.DZF4UIym.js.map} +1 -1
- package/dist/chunks/{checkbox.l7h6GYew.js → checkbox.DloQJI-K.js} +40 -40
- package/dist/chunks/checkbox.DloQJI-K.js.map +1 -0
- package/dist/chunks/{code-snippet.BsEe6nml.js → code-snippet.B3GhZo7r.js} +5 -5
- package/dist/chunks/{code-snippet.BsEe6nml.js.map → code-snippet.B3GhZo7r.js.map} +1 -1
- package/dist/chunks/{controls-group.vFyThDMU.js → controls-group.C-HKhH1m.js} +2 -2
- package/dist/chunks/{controls-group.vFyThDMU.js.map → controls-group.C-HKhH1m.js.map} +1 -1
- package/dist/chunks/{copy.DD_Yfyn_.js → copy.k18tXmP1.js} +3 -3
- package/dist/chunks/{copy.DD_Yfyn_.js.map → copy.k18tXmP1.js.map} +1 -1
- package/dist/chunks/{dashboard-section.z-Rnv5E-.js → dashboard-section.DlIwNKkx.js} +4 -4
- package/dist/chunks/{dashboard-section.z-Rnv5E-.js.map → dashboard-section.DlIwNKkx.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CfQuYKV9.js → dashed-underline.BbQIbZfu.js} +3 -3
- package/dist/chunks/{dashed-underline.CfQuYKV9.js.map → dashed-underline.BbQIbZfu.js.map} +1 -1
- package/dist/chunks/{data-grid-template.73mazFER.js → data-grid-template.BJTWe6Ty.js} +3 -3
- package/dist/chunks/{data-grid-template.73mazFER.js.map → data-grid-template.BJTWe6Ty.js.map} +1 -1
- package/dist/chunks/{data-grid.C_Xoz-GC.js → data-grid.BjtvKzyw.js} +199 -199
- package/dist/chunks/data-grid.BjtvKzyw.js.map +1 -0
- package/dist/chunks/{date-picker.bgk9aymW.js → date-picker.Dy0k-7_1.js} +15 -15
- package/dist/chunks/{date-picker.bgk9aymW.js.map → date-picker.Dy0k-7_1.js.map} +1 -1
- package/dist/chunks/{date-range-picker.-s05jOQA.js → date-range-picker.B_uiZRMc.js} +24 -24
- package/dist/chunks/{date-range-picker.-s05jOQA.js.map → date-range-picker.B_uiZRMc.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.8qh8J-NE.js → dropdown-tag.D3py85f0.js} +4 -4
- package/dist/chunks/{dropdown-tag.8qh8J-NE.js.map → dropdown-tag.D3py85f0.js.map} +1 -1
- package/dist/chunks/{dropdown.DzWXcJyF.js → dropdown.CI6ccgJJ.js} +52 -53
- package/dist/chunks/{dropdown.DzWXcJyF.js.map → dropdown.CI6ccgJJ.js.map} +1 -1
- package/dist/chunks/{error-message.CzQf7YOD.js → error-message.qHRfH-8Y.js} +2 -2
- package/dist/chunks/{error-message.CzQf7YOD.js.map → error-message.qHRfH-8Y.js.map} +1 -1
- package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
- package/dist/chunks/{file-uploader.CcZPr-jD.js → file-uploader.BOWE87dN.js} +469 -449
- package/dist/chunks/file-uploader.BOWE87dN.js.map +1 -0
- package/dist/chunks/{filter-bar.BdGtQC7p.js → filter-bar.pVpO62X3.js} +633 -627
- package/dist/chunks/filter-bar.pVpO62X3.js.map +1 -0
- package/dist/chunks/{focus-trap.CIUzScHc.js → focus-trap.V3Q8H_5C.js} +2 -2
- package/dist/chunks/{focus-trap.CIUzScHc.js.map → focus-trap.V3Q8H_5C.js.map} +1 -1
- package/dist/chunks/{footer-actions.BkHpWa7A.js → footer-actions.DYi_MR9I.js} +2 -2
- package/dist/chunks/{footer-actions.BkHpWa7A.js.map → footer-actions.DYi_MR9I.js.map} +1 -1
- package/dist/chunks/{header-with-views.ChEgH2tn.js → header-with-views.CLSMOYua.js} +11 -11
- package/dist/chunks/{header-with-views.ChEgH2tn.js.map → header-with-views.CLSMOYua.js.map} +1 -1
- package/dist/chunks/{header.0hX8OYwM.js → header.DWx6s2nt.js} +4 -4
- package/dist/chunks/{header.0hX8OYwM.js.map → header.DWx6s2nt.js.map} +1 -1
- package/dist/chunks/{index.BCUiAdb6.js → index.48Mn1OCp.js} +3 -3
- package/dist/chunks/{index.BCUiAdb6.js.map → index.48Mn1OCp.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.w6MpKOWh.js → info-icon-with-popover.B4wYDzGz.js} +2 -2
- package/dist/chunks/{info-icon-with-popover.w6MpKOWh.js.map → info-icon-with-popover.B4wYDzGz.js.map} +1 -1
- package/dist/chunks/{info-icon.C1ReXurF.js → info-icon.J62KXp9I.js} +3 -3
- package/dist/chunks/{info-icon.C1ReXurF.js.map → info-icon.J62KXp9I.js.map} +1 -1
- package/dist/chunks/input-field-password.D6lhO8b2.js +228 -0
- package/dist/chunks/input-field-password.D6lhO8b2.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.C8WTJ1W-.js → input-field-phone-number.CYRNWZL8.js} +3 -3
- package/dist/chunks/{input-field-phone-number.C8WTJ1W-.js.map → input-field-phone-number.CYRNWZL8.js.map} +1 -1
- package/dist/chunks/{input-field.tP3Eupoo.js → input-field.CsnMZceM.js} +3 -3
- package/dist/chunks/{input-field.tP3Eupoo.js.map → input-field.CsnMZceM.js.map} +1 -1
- package/dist/chunks/inspector.types.Cmq6sdCz.js +105 -0
- package/dist/chunks/inspector.types.Cmq6sdCz.js.map +1 -0
- package/dist/chunks/{layout-row.BgBazwnM.js → layout-row.DWRoI0dm.js} +2 -2
- package/dist/chunks/{layout-row.BgBazwnM.js.map → layout-row.DWRoI0dm.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.T9cfTst7.js → listbox-option-tag.BHI-8rRX.js} +2 -2
- package/dist/chunks/{listbox-option-tag.T9cfTst7.js.map → listbox-option-tag.BHI-8rRX.js.map} +1 -1
- package/dist/chunks/{menu.CY7ceslP.js → menu.BoxhffPs.js} +2 -2
- package/dist/chunks/{menu.CY7ceslP.js.map → menu.BoxhffPs.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.Dz5w250z.js → modal-fullscreen.E7e13pW9.js} +3 -3
- package/dist/chunks/{modal-fullscreen.Dz5w250z.js.map → modal-fullscreen.E7e13pW9.js.map} +1 -1
- package/dist/chunks/{modal.CnmRkXZM.js → modal.BUPJIcb6.js} +4 -4
- package/dist/chunks/{modal.CnmRkXZM.js.map → modal.BUPJIcb6.js.map} +1 -1
- package/dist/chunks/{pagination.CvGOUwd8.js → pagination.FBlW1fUz.js} +3 -3
- package/dist/chunks/{pagination.CvGOUwd8.js.map → pagination.FBlW1fUz.js.map} +1 -1
- package/dist/chunks/{payment-method.NZKiNOmM.js → payment-method.Cx4nPDtE.js} +6 -6
- package/dist/chunks/payment-method.Cx4nPDtE.js.map +1 -0
- package/dist/chunks/payment-method.types.BqtH7RM2.js +5 -0
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -0
- package/dist/chunks/{popover.BvsqsZQ1.js → popover.C4PNSrnW.js} +3 -3
- package/dist/chunks/{popover.BvsqsZQ1.js.map → popover.C4PNSrnW.js.map} +1 -1
- package/dist/chunks/{popper-container.LRQgzjRf.js → popper-container.DWY19wS0.js} +2 -2
- package/dist/chunks/{popper-container.LRQgzjRf.js.map → popper-container.DWY19wS0.js.map} +1 -1
- package/dist/chunks/{promo-banner.DDnJwMDC.js → promo-banner.DgCKKp6o.js} +6 -6
- package/dist/chunks/{promo-banner.DDnJwMDC.js.map → promo-banner.DgCKKp6o.js.map} +1 -1
- package/dist/chunks/{radio-group.BvswbJa8.js → radio-group.WbbrQhEO.js} +4 -4
- package/dist/chunks/{radio-group.BvswbJa8.js.map → radio-group.WbbrQhEO.js.map} +1 -1
- package/dist/chunks/{search-bar.kKLreEXo.js → search-bar.CFKWbNeA.js} +3 -3
- package/dist/chunks/{search-bar.kKLreEXo.js.map → search-bar.CFKWbNeA.js.map} +1 -1
- package/dist/chunks/{secondary-nav.C6bfsK2p.js → secondary-nav.C0gPD0MR.js} +3 -3
- package/dist/chunks/{secondary-nav.C6bfsK2p.js.map → secondary-nav.C0gPD0MR.js.map} +1 -1
- package/dist/chunks/{segmented-control.BywW3ont.js → segmented-control.DGNMY2BP.js} +2 -2
- package/dist/chunks/{segmented-control.BywW3ont.js.map → segmented-control.DGNMY2BP.js.map} +1 -1
- package/dist/chunks/{selection-card-group.Ca4G00h5.js → selection-card-group.BmKUEuny.js} +11 -11
- package/dist/chunks/{selection-card-group.Ca4G00h5.js.map → selection-card-group.BmKUEuny.js.map} +1 -1
- package/dist/chunks/{sidepanel.D4H3Vu0m.js → sidepanel.CyhG1nQR.js} +3 -3
- package/dist/chunks/{sidepanel.D4H3Vu0m.js.map → sidepanel.CyhG1nQR.js.map} +1 -1
- package/dist/chunks/{structured-list-item.Bv8reTz2.js → structured-list-item.Co5P9bFC.js} +4 -4
- package/dist/chunks/{structured-list-item.Bv8reTz2.js.map → structured-list-item.Co5P9bFC.js.map} +1 -1
- package/dist/chunks/summary-grid.types.egM7irBt.js +295 -0
- package/dist/chunks/summary-grid.types.egM7irBt.js.map +1 -0
- package/dist/chunks/tabs.C8CgvNt4.js +214 -0
- package/dist/chunks/tabs.C8CgvNt4.js.map +1 -0
- package/dist/chunks/{tag.IyMxowGc.js → tag.CyspYb1E.js} +2 -2
- package/dist/chunks/{tag.IyMxowGc.js.map → tag.CyspYb1E.js.map} +1 -1
- package/dist/chunks/{textarea.B9HjT5LH.js → textarea.CC8esIW6.js} +75 -71
- package/dist/chunks/textarea.CC8esIW6.js.map +1 -0
- package/dist/chunks/{timeline-item.BIwk0vqM.js → timeline-item.Byorbxmc.js} +5 -5
- package/dist/chunks/{timeline-item.BIwk0vqM.js.map → timeline-item.Byorbxmc.js.map} +1 -1
- package/dist/chunks/{tooltip.DShIiBiY.js → tooltip.DOvci5lX.js} +2 -2
- package/dist/chunks/{tooltip.DShIiBiY.js.map → tooltip.DOvci5lX.js.map} +1 -1
- package/dist/chunks/{tutorial.DDlXTjAO.js → tutorial.QwHbq1FO.js} +5 -5
- package/dist/chunks/{tutorial.DDlXTjAO.js.map → tutorial.QwHbq1FO.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.LVldNial.js → use-cached-selected-values.DHpjo2tV.js} +26 -26
- package/dist/chunks/{use-cached-selected-values.LVldNial.js.map → use-cached-selected-values.DHpjo2tV.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.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/dropdown.js +3 -3
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +49 -49
- package/dist/info-icon.js +1 -1
- 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/inspector.js +1 -1
- package/dist/internal.js +10 -10
- package/dist/layout.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +42 -16
- package/dist/styles/bento-light.css +42 -16
- package/dist/styles/bento.css +42 -16
- package/dist/styles/legacy.css +30 -4
- package/dist/styles/styleguide.css +42 -16
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +5535 -5431
- package/package.json +5 -5
- package/dist/assets/summary-grid-item-custom.css +0 -1
- package/dist/chunks/checkbox.l7h6GYew.js.map +0 -1
- package/dist/chunks/data-grid.C_Xoz-GC.js.map +0 -1
- package/dist/chunks/file-uploader.CcZPr-jD.js.map +0 -1
- package/dist/chunks/filter-bar.BdGtQC7p.js.map +0 -1
- package/dist/chunks/input-field-password.CZn4kW8v.js +0 -198
- package/dist/chunks/input-field-password.CZn4kW8v.js.map +0 -1
- package/dist/chunks/inspector.types.A0b4jNO3.js +0 -101
- package/dist/chunks/inspector.types.A0b4jNO3.js.map +0 -1
- package/dist/chunks/payment-method.NZKiNOmM.js.map +0 -1
- package/dist/chunks/payment-method.types.CJKfZQN5.js +0 -5
- package/dist/chunks/payment-method.types.CJKfZQN5.js.map +0 -1
- package/dist/chunks/summary-grid-item-custom.Bbdie4EL.js +0 -631
- package/dist/chunks/summary-grid-item-custom.Bbdie4EL.js.map +0 -1
- package/dist/chunks/tabs.UFoTqvew.js +0 -154
- package/dist/chunks/tabs.UFoTqvew.js.map +0 -1
- package/dist/chunks/textarea.B9HjT5LH.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-tag.8qh8J-NE.js","sources":["../../src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../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([\"input\"]);\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([\"input\"]);\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\" @input=\"onInput\">\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType } 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\n 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([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\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([\"input\"]);\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([\"input\"]);\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","onInput","selectedValue","emit","dropdownItems","computed","props","value","label","src","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","deprecate","__default__$2","__default__$1","__default__","tagItems","_a"],"mappings":";;;;;;;;;;AAkEI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;iBApCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEAE,IAAAC,EAAA,MAAAC,EAAA,MAAA,IAAA,CAAA,EAAA,OAAAC,GAAA,OAAAC,GAAA,KAAAC,EAAA,OAAA,EAAA,OAAAF,GAAA,OAAAC,GAAA,MAAAC,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;sBCqDAC,IAAAV,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;iBA7CAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEA,EAAA,SAAAS,GAAA,OAAAC,EAAA,IAAAC,EAAAP,CAAA,GACAQ,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;;;;;;;;;;;;;;;;sBCQRC,IAAAlB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;0CAlCA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;;;;;;;;;;;;;;;;sBCkCAiB,IAAAnB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;0CAlCA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;;;;;;;;;;;;;;;;sBCsCAkB,IAAApB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;iBAlCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEAmB,IAAAhB,EAAA,MAAA;;AAAA,cAAAiB,IAAAhB,EAAA,UAAA,gBAAAgB,EAAA,IAAA,CAAA,EAAA,OAAAd,GAAA,OAAAD,GAAA,SAAAI,EAAA,OAAA,EAAA,OAAAH,GAAA,OAAAD,GAAA,MAAAI,EAAA;AAAA,KAAA;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"dropdown-tag.D3py85f0.js","sources":["../../src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../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([\"input\"]);\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([\"input\"]);\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\" @input=\"onInput\">\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType } 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\n 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([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\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([\"input\"]);\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([\"input\"]);\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","onInput","selectedValue","emit","dropdownItems","computed","props","value","label","src","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","deprecate","__default__$2","__default__$1","__default__","tagItems","_a"],"mappings":";;;;;;;;;;AAkEI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;iBApCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEAE,IAAAC,EAAA,MAAAC,EAAA,MAAA,IAAA,CAAA,EAAA,OAAAC,GAAA,OAAAC,GAAA,KAAAC,EAAA,OAAA,EAAA,OAAAF,GAAA,OAAAC,GAAA,MAAAC,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;sBCqDAC,IAAAV,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;iBA7CAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEA,EAAA,SAAAS,GAAA,OAAAC,EAAA,IAAAC,EAAAP,CAAA,GACAQ,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;;;;;;;;;;;;;;;;sBCQRC,IAAAlB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;0CAlCA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;;;;;;;;;;;;;;;;sBCkCAiB,IAAAnB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;0CAlCA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;;;;;;;;;;;;;;;;sBCsCAkB,IAAApB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;iBAlCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEAmB,IAAAhB,EAAA,MAAA;;AAAA,cAAAiB,IAAAhB,EAAA,UAAA,gBAAAgB,EAAA,IAAA,CAAA,EAAA,OAAAd,GAAA,OAAAD,GAAA,SAAAI,EAAA,OAAA,EAAA,OAAAH,GAAA,OAAAD,GAAA,MAAAI,EAAA;AAAA,KAAA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ref as C, watch as ue, computed as p, defineComponent as
|
|
1
|
+
import { ref as C, watch as ue, computed as p, defineComponent as A, useSlots as pe, toRefs as fe, nextTick as L, useAttrs as Le, toRef as x, inject as Oe } from "vue";
|
|
2
2
|
import { d as ie, B as Ee } from "./typography.J1v_SPG3.js";
|
|
3
|
+
import { a as U, b as M, c as De, B as P, D as Be } from "./dropdown-default-textbox.CDTdHfTv.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { n as F } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
|
+
import { s as q } from "./events.CMzGybJJ.js";
|
|
3
7
|
import { g as k } from "./generate-uid.NJ8tVoha.js";
|
|
4
|
-
import { u as
|
|
8
|
+
import { u as Ie } from "./aria-label.CaUURpnB.js";
|
|
5
9
|
import { u as V } from "./i18n.BQkEbtPM.js";
|
|
6
|
-
import { u as
|
|
7
|
-
import { a as U, b as P, c as Ie, B as F, D as Te } from "./dropdown-default-textbox.CDTdHfTv.js";
|
|
10
|
+
import { u as Te } from "./use-form-layout-loading.D3lALhtC.js";
|
|
8
11
|
import { u as Ne } from "./use-has-slot.C9lQZ6nz.js";
|
|
9
|
-
import { a as u, b as H, B as J, c as
|
|
12
|
+
import { a as u, b as H, B as J, c as Ae, u as Re } from "./use-cached-selected-values.DHpjo2tV.js";
|
|
10
13
|
import { B as D, a as $e } from "./keyboard-navigation.pB8weElW.js";
|
|
11
14
|
import { B as Me } from "./directive.Cbdox5VL.js";
|
|
12
|
-
import { F as Pe, E as ke } from "./error-message.
|
|
13
|
-
import { P as re } from "./popper-container.
|
|
14
|
-
import { B as Fe } from "./popover.
|
|
15
|
-
import { n as K } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
16
|
-
/* empty css */
|
|
17
|
-
import { s as q } from "./events.CMzGybJJ.js";
|
|
15
|
+
import { F as Pe, E as ke } from "./error-message.qHRfH-8Y.js";
|
|
16
|
+
import { P as re } from "./popper-container.DWY19wS0.js";
|
|
17
|
+
import { B as Fe } from "./popover.C4PNSrnW.js";
|
|
18
18
|
import "../assets/dropdown.css";
|
|
19
19
|
const Ke = {
|
|
20
20
|
"en-US": {
|
|
@@ -81,10 +81,10 @@ const Ke = {
|
|
|
81
81
|
onEscapeKey: O,
|
|
82
82
|
onOutsideDropdownClick: m
|
|
83
83
|
};
|
|
84
|
-
}, je =
|
|
84
|
+
}, je = A({
|
|
85
85
|
i18n: { messages: Ke },
|
|
86
86
|
name: "bento-dropdown-options-container"
|
|
87
|
-
}), We = /* @__PURE__ */
|
|
87
|
+
}), We = /* @__PURE__ */ A({
|
|
88
88
|
...je,
|
|
89
89
|
props: {
|
|
90
90
|
/**
|
|
@@ -244,7 +244,7 @@ var Ue = function() {
|
|
|
244
244
|
return [t._t(l, null, null, s)];
|
|
245
245
|
} };
|
|
246
246
|
})], null, !0) }, e.listeners))], 1)]);
|
|
247
|
-
}, qe = [], He = /* @__PURE__ */
|
|
247
|
+
}, qe = [], He = /* @__PURE__ */ F(
|
|
248
248
|
We,
|
|
249
249
|
Ue,
|
|
250
250
|
qe,
|
|
@@ -262,7 +262,7 @@ const Ve = {
|
|
|
262
262
|
var Ye = function() {
|
|
263
263
|
var t = this, o = t._self._c;
|
|
264
264
|
return o("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? o("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), o("path", { attrs: { fill: "#00112C", d: "M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z" } })]);
|
|
265
|
-
}, Ze = [], Qe = /* @__PURE__ */
|
|
265
|
+
}, Ze = [], Qe = /* @__PURE__ */ F(
|
|
266
266
|
Ve,
|
|
267
267
|
Ye,
|
|
268
268
|
Ze,
|
|
@@ -280,7 +280,7 @@ const Ge = {
|
|
|
280
280
|
var et = function() {
|
|
281
281
|
var t = this, o = t._self._c;
|
|
282
282
|
return o("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? o("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), o("path", { attrs: { fill: "#00112C", d: "M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z" } })]);
|
|
283
|
-
}, tt = [], ot = /* @__PURE__ */
|
|
283
|
+
}, tt = [], ot = /* @__PURE__ */ F(
|
|
284
284
|
Ge,
|
|
285
285
|
et,
|
|
286
286
|
tt,
|
|
@@ -288,10 +288,10 @@ var et = function() {
|
|
|
288
288
|
null,
|
|
289
289
|
null
|
|
290
290
|
);
|
|
291
|
-
const nt = ot.exports, at =
|
|
291
|
+
const nt = ot.exports, at = A({
|
|
292
292
|
name: "dropdown-small-textbox",
|
|
293
293
|
inheritAttrs: !1
|
|
294
|
-
}), st = /* @__PURE__ */
|
|
294
|
+
}), st = /* @__PURE__ */ A({
|
|
295
295
|
...at,
|
|
296
296
|
props: {
|
|
297
297
|
/**
|
|
@@ -368,17 +368,17 @@ const nt = ot.exports, at = R({
|
|
|
368
368
|
}, d = (v) => {
|
|
369
369
|
q(v), o("clear");
|
|
370
370
|
}, g = {
|
|
371
|
-
[
|
|
372
|
-
[
|
|
373
|
-
[
|
|
374
|
-
[
|
|
375
|
-
[
|
|
371
|
+
[M.INPUT]: i,
|
|
372
|
+
[M.OPEN]: m,
|
|
373
|
+
[M.CLOSE]: r,
|
|
374
|
+
[M.CLEAR]: d,
|
|
375
|
+
[M.KEYDOWN]: c
|
|
376
376
|
}, h = () => {
|
|
377
377
|
n.value.focus();
|
|
378
378
|
};
|
|
379
379
|
return t({
|
|
380
380
|
focus: h
|
|
381
|
-
}), { __sfc: !0, emit: o, props: e, baseTextbox: n, conditionalClasses: l, isDropdownOpen: s, onInput: i, onKeyDown: c, openDropdown: m, closeDropdown: r, clearValue: d, listeners: g, focus: h, BentoDropdownSize:
|
|
381
|
+
}), { __sfc: !0, emit: o, props: e, baseTextbox: n, conditionalClasses: l, isDropdownOpen: s, onInput: i, onKeyDown: c, openDropdown: m, closeDropdown: r, clearValue: d, listeners: g, focus: h, BentoDropdownSize: P, DropdownBaseTextbox: De, ChevronDownSmallIcon: Xe, ChevronUpSmallIcon: nt };
|
|
382
382
|
}
|
|
383
383
|
});
|
|
384
384
|
var lt = function() {
|
|
@@ -386,7 +386,7 @@ var lt = function() {
|
|
|
386
386
|
return o("div", { staticClass: "b-dropdown-small-textbox", class: e.conditionalClasses }, [o(e.DropdownBaseTextbox, t._g(t._b({ ref: "baseTextbox", staticClass: "b-dropdown-small-textbox__textbox", attrs: { size: e.BentoDropdownSize.SMALL }, scopedSlots: t._u([{ key: "icon", fn: function() {
|
|
387
387
|
return [o("div", { staticClass: "b-dropdown-small-textbox__chevron" }, [o(e.ChevronUpSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: e.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), o(e.ChevronDownSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: !e.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
388
388
|
}, proxy: !0 }]) }, "dropdown-base-textbox", { ...t.$attrs, ...t.$props }, !1), e.listeners))], 1);
|
|
389
|
-
}, it = [], rt = /* @__PURE__ */
|
|
389
|
+
}, it = [], rt = /* @__PURE__ */ F(
|
|
390
390
|
st,
|
|
391
391
|
lt,
|
|
392
392
|
it,
|
|
@@ -426,12 +426,12 @@ const dt = rt.exports, ct = (a, t) => t.value.reduce((o, e) => {
|
|
|
426
426
|
var b, E;
|
|
427
427
|
n.value && await L(), (E = (b = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : b.$el.querySelectorAll('[role="option"]')[f]) == null || E.focus();
|
|
428
428
|
}, d = async (f) => {
|
|
429
|
-
var E,
|
|
429
|
+
var E, K;
|
|
430
430
|
n.value && await L();
|
|
431
431
|
const b = (E = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : E.$el.querySelectorAll(
|
|
432
432
|
"button"
|
|
433
433
|
);
|
|
434
|
-
b.length ? (
|
|
434
|
+
b.length ? (K = b[f]) == null || K.focus() : r(f);
|
|
435
435
|
}, g = (f) => {
|
|
436
436
|
var b;
|
|
437
437
|
return (b = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : b.setListboxFocusedIndex(
|
|
@@ -519,14 +519,14 @@ const mt = {
|
|
|
519
519
|
all: "Todos",
|
|
520
520
|
clearFilter: "Limpar filtro"
|
|
521
521
|
}
|
|
522
|
-
}, yt = Symbol("input field component injection key"), Ft = Symbol("input field hint injection key"), Kt = Symbol("input field parent component injection key"), bt =
|
|
522
|
+
}, yt = Symbol("input field component injection key"), Ft = Symbol("input field hint injection key"), Kt = Symbol("input field parent component injection key"), bt = A({
|
|
523
523
|
i18n: { messages: mt },
|
|
524
524
|
name: "b-dropdown",
|
|
525
525
|
components: {
|
|
526
|
-
DropdownInputDefault:
|
|
526
|
+
DropdownInputDefault: Be,
|
|
527
527
|
DropdownInputSmall: dt
|
|
528
528
|
}
|
|
529
|
-
}), _t = /* @__PURE__ */
|
|
529
|
+
}), _t = /* @__PURE__ */ A({
|
|
530
530
|
...bt,
|
|
531
531
|
props: {
|
|
532
532
|
/**
|
|
@@ -659,7 +659,7 @@ const mt = {
|
|
|
659
659
|
size: {
|
|
660
660
|
type: String,
|
|
661
661
|
default: null,
|
|
662
|
-
validator: (a) => Object.values(
|
|
662
|
+
validator: (a) => Object.values(P).includes(a)
|
|
663
663
|
},
|
|
664
664
|
/**
|
|
665
665
|
* If enabled, dropdown will display non-selectable, static categories
|
|
@@ -690,21 +690,21 @@ const mt = {
|
|
|
690
690
|
emits: ["input", "show-more"],
|
|
691
691
|
setup(a, { expose: t, emit: o }) {
|
|
692
692
|
var le;
|
|
693
|
-
const e = a, n = Le(), l = pe(), s = Ne(l), { t: i } = V(), c = C(null), m = C(null), r = C(null), d = C(!1), g = k("bento-dropdown-options-container"), h = k("dropdown-label"), v = k("dropdown-description"), O = k("dropdown-error"), { isReadOnly: w } =
|
|
693
|
+
const e = a, n = Le(), l = pe(), s = Ne(l), { t: i } = V(), c = C(null), m = C(null), r = C(null), d = C(!1), g = k("bento-dropdown-options-container"), h = k("dropdown-label"), v = k("dropdown-description"), O = k("dropdown-error"), { isReadOnly: w } = Te(x(e, "readonly")), { cachedSelectedListboxOptions: S, cachedListboxSelectedValues: y, setCachedValues: I } = Ae(
|
|
694
694
|
x(e, "items"),
|
|
695
695
|
x(e, "value"),
|
|
696
696
|
x(e, "multiple")
|
|
697
|
-
), B = C(n["aria-label"]), { ariaLabel: T, label: f } = fe(e), b =
|
|
697
|
+
), B = C(n["aria-label"]), { ariaLabel: T, label: f } = fe(e), b = Ie({
|
|
698
698
|
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
699
699
|
ariaLabel: T || B,
|
|
700
700
|
label: f,
|
|
701
701
|
defaultFallback: i("ariaLabelFallback")
|
|
702
|
-
}), E = e.size ===
|
|
702
|
+
}), E = e.size === P.SMALL || Oe(yt, !1), K = p(() => E ? P.SMALL : P.DEFAULT), me = p(() => ({
|
|
703
703
|
"b-dropdown--condensed": e.condensed
|
|
704
704
|
})), ye = p(() => ({
|
|
705
705
|
"b-dropdown__description--error": !!e.errorMessage
|
|
706
|
-
})), N = C(""),
|
|
707
|
-
items:
|
|
706
|
+
})), N = C(""), R = x(e, "items"), Y = x(e, "staticCategories"), Z = vt(N, R, (le = e == null ? void 0 : e.search) == null ? void 0 : le.searchEvent, Y), j = p(() => e.dynamicFiltering && !!N.value), be = ut({
|
|
707
|
+
items: R,
|
|
708
708
|
placeholder: x(e, "placeholder"),
|
|
709
709
|
isMultiSelect: x(e, "multiple"),
|
|
710
710
|
selectedValues: S
|
|
@@ -715,31 +715,30 @@ const mt = {
|
|
|
715
715
|
);
|
|
716
716
|
if (!e.multiple && e.staticCategories) {
|
|
717
717
|
const _ = e.items.find(
|
|
718
|
-
(
|
|
718
|
+
(W) => W.items.some((xe) => xe.value === e.value)
|
|
719
719
|
);
|
|
720
|
-
return _ ? _.items.find((
|
|
720
|
+
return _ ? _.items.find((W) => W.value === e.value) : null;
|
|
721
721
|
}
|
|
722
722
|
return e.items.find(({ value: _ }) => _ === (e == null ? void 0 : e.value));
|
|
723
723
|
}), Q = p(() => {
|
|
724
724
|
const _ = Z.value.findIndex(({ value: $ }) => e.value === $);
|
|
725
|
-
return _ >
|
|
726
|
-
}), { isMultiLevelSelect: X, flattenedItemsList: G } =
|
|
727
|
-
var _;
|
|
725
|
+
return _ > -1 ? _ : 0;
|
|
726
|
+
}), { isMultiLevelSelect: X, flattenedItemsList: G } = Re(R), ge = p(() => {
|
|
728
727
|
if (e.multiple) {
|
|
729
|
-
const
|
|
730
|
-
return !e.hasMoreItems &&
|
|
728
|
+
const _ = Array.isArray(e.value) ? e.value.length : 0, $ = X.value ? G.value.length : R.value.length;
|
|
729
|
+
return _ === 0 ? null : !e.hasMoreItems && $ > 0 && $ === _ ? i("all") : _;
|
|
731
730
|
}
|
|
732
731
|
return null;
|
|
733
732
|
}), he = p(
|
|
734
733
|
() => `${e.description ? v : ""} ${e.errorMessage ? O : ""}`.trim() || null
|
|
735
734
|
), ee = () => {
|
|
736
735
|
w.value || (d.value = !0);
|
|
737
|
-
},
|
|
736
|
+
}, z = () => {
|
|
738
737
|
d.value = !1;
|
|
739
738
|
}, te = () => {
|
|
740
|
-
w.value || (d.value = !d.value,
|
|
739
|
+
w.value || (d.value = !d.value, j.value && (N.value = ""));
|
|
741
740
|
}, Ce = () => {
|
|
742
|
-
|
|
741
|
+
j.value && (N.value = ""), d.value && (d.value = !1, r.value.onOutsideDropdownClick());
|
|
743
742
|
}, oe = (_) => {
|
|
744
743
|
e.multiple || (N.value = "", d.value = !1), I(_), o("input", y.value);
|
|
745
744
|
}, ne = () => {
|
|
@@ -756,15 +755,15 @@ const mt = {
|
|
|
756
755
|
},
|
|
757
756
|
te,
|
|
758
757
|
ee,
|
|
759
|
-
|
|
758
|
+
z
|
|
760
759
|
), ae = ft(
|
|
761
760
|
{
|
|
762
761
|
inputContainerRef: c,
|
|
763
762
|
isDropdownOpen: d
|
|
764
763
|
},
|
|
765
|
-
|
|
764
|
+
z
|
|
766
765
|
), Se = {
|
|
767
|
-
[u.CLOSE_DROPDOWN]:
|
|
766
|
+
[u.CLOSE_DROPDOWN]: z,
|
|
768
767
|
[u.SELECT]: oe,
|
|
769
768
|
[u.SHOW_MORE]: ne,
|
|
770
769
|
...ae
|
|
@@ -781,7 +780,7 @@ const mt = {
|
|
|
781
780
|
};
|
|
782
781
|
return t({
|
|
783
782
|
focus: se
|
|
784
|
-
}), { __sfc: !0, attrs: n, slots: l, hasSlot: s, props: e, emit: o, t: i, inputContainerRef: c, inputContainerRefWrapper: m, optionsContainerRef: r, isDropdownOpen: d, dropdownOptionsContainerId: g, labelId: h, descriptionId: v, errorId: O, isReadOnly: w, cachedSelectedListboxOptions: S, cachedListboxSelectedValues: y, setCachedValues: I, ariaLabelAttribute: B, ariaLabel: T, label: f, computedAriaLabel: b, isInputComponent: E, size:
|
|
783
|
+
}), { __sfc: !0, attrs: n, slots: l, hasSlot: s, props: e, emit: o, t: i, inputContainerRef: c, inputContainerRefWrapper: m, optionsContainerRef: r, isDropdownOpen: d, dropdownOptionsContainerId: g, labelId: h, descriptionId: v, errorId: O, isReadOnly: w, cachedSelectedListboxOptions: S, cachedListboxSelectedValues: y, setCachedValues: I, ariaLabelAttribute: B, ariaLabel: T, label: f, computedAriaLabel: b, isInputComponent: E, size: K, conditionalClasses: me, descriptionConditionalClasses: ye, searchTerm: N, items: R, staticCategories: Y, filteredItems: Z, isSearching: j, displayValue: be, selectedValueItem: _e, selectedValueIndex: Q, isMultiLevelSelect: X, flattenedItemsList: G, additionalItemsSelected: ge, ariaDescribedBy: he, openDropdown: ee, closeDropdown: z, toggleDropdown: te, clickOutsideDropdown: Ce, onOptionSelected: oe, emitShowMoreEvent: ne, textboxKeyboardNavigationListeners: we, listboxKeyboardNavigationListeners: ae, listboxListeners: Se, focus: se, BentoDropdownOptionsContainer: Je, BentoTypography: Ee, ErrorMessage: ke, FieldLabel: Pe, vBentoClickOutsideDirective: Me, vBentoKeyboardNavigationDirective: $e };
|
|
785
784
|
}
|
|
786
785
|
});
|
|
787
786
|
var gt = function() {
|
|
@@ -800,13 +799,13 @@ var gt = function() {
|
|
|
800
799
|
})], null, !0) }, e.listboxListeners)) : t._e(), t.errorMessage ? o(e.ErrorMessage, { staticClass: "b-dropdown__error-message", attrs: { id: e.errorId, "error-message": t.errorMessage } }) : t._e(), t.description || e.hasSlot("description") ? o(e.BentoTypography, { staticClass: "b-dropdown__description", class: e.descriptionConditionalClasses, attrs: { id: e.descriptionId, el: "span" } }, [t._t("description", function() {
|
|
801
800
|
return [t._v(" " + t._s(t.description) + " ")];
|
|
802
801
|
})], 2) : t._e()], 1);
|
|
803
|
-
}, ht = [], Ct = /* @__PURE__ */
|
|
802
|
+
}, ht = [], Ct = /* @__PURE__ */ F(
|
|
804
803
|
_t,
|
|
805
804
|
gt,
|
|
806
805
|
ht,
|
|
807
806
|
!1,
|
|
808
807
|
null,
|
|
809
|
-
"
|
|
808
|
+
"1bb5aad4"
|
|
810
809
|
);
|
|
811
810
|
const zt = Ct.exports;
|
|
812
811
|
export {
|
|
@@ -816,4 +815,4 @@ export {
|
|
|
816
815
|
Kt as b,
|
|
817
816
|
vt as u
|
|
818
817
|
};
|
|
819
|
-
//# sourceMappingURL=dropdown.
|
|
818
|
+
//# sourceMappingURL=dropdown.CI6ccgJJ.js.map
|