@adyen/bento-vue3 1.28.1 → 1.29.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/components.d.ts +4 -0
- package/dist/@types/packages/core/src/types/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/{internal/avatar → avatar}/avatar.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/{avatar-image → avatar/components/avatar-image}/avatar-image.vue.d.ts +15 -4
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/index.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +2 -3
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +16 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +10 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +6 -4
- package/dist/@types/packages/vue2/src/components/filter-bar/components/input-filter/input-filter.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.types.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/inspector/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/inspector/inspector.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/inspector/inspector.types.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/inspector/inspector.vue.d.ts +110 -0
- package/dist/@types/packages/vue2/src/components/internal/index.d.ts +0 -1
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/search-bar/search-bar.vue.d.ts +12 -1
- package/dist/@types/packages/vue2/src/components/secondary-nav/secondary-nav.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/tag/tag.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/types/index.d.ts +1 -1
- package/dist/@types/packages/vue2/src/types/listbox.d.ts +1 -1
- 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/avatar.css +1 -0
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/code-snippet.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -0
- package/dist/assets/listbox-option-tag.css +1 -1
- package/dist/assets/loading-button.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/radio-group.css +1 -1
- package/dist/assets/search-bar.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/segmented-control.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/structured-list-item.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/avatar.js +5 -0
- package/dist/avatar.js.map +1 -0
- package/dist/button.js +2 -2
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.BvAtk-jI.js → action-bar.UcSSukRr.js} +5 -5
- package/dist/chunks/{action-bar.BvAtk-jI.js.map → action-bar.UcSSukRr.js.map} +1 -1
- package/dist/chunks/avatar.IHx0kN0u.js +94 -0
- package/dist/chunks/avatar.IHx0kN0u.js.map +1 -0
- package/dist/chunks/{base-modal.BgYlnM_Q.js → base-modal.CY-t-QYh.js} +2 -2
- package/dist/chunks/{base-modal.BgYlnM_Q.js.map → base-modal.CY-t-QYh.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.C14zvgVo.js → button-actions-with-menu.Dnyh1m51.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.C14zvgVo.js.map → button-actions-with-menu.Dnyh1m51.js.map} +1 -1
- package/dist/chunks/{button-actions.hGhRdgC2.js → button-actions.BpLFzJJY.js} +2 -2
- package/dist/chunks/{button-actions.hGhRdgC2.js.map → button-actions.BpLFzJJY.js.map} +1 -1
- package/dist/chunks/{card.C7zLKdcy.js → card.DOQt8sH5.js} +2 -2
- package/dist/chunks/{card.C7zLKdcy.js.map → card.DOQt8sH5.js.map} +1 -1
- package/dist/chunks/{checkbox-group.BcT-eZ2p.js → checkbox-group.DS_f6k8E.js} +4 -4
- package/dist/chunks/{checkbox-group.BcT-eZ2p.js.map → checkbox-group.DS_f6k8E.js.map} +1 -1
- package/dist/chunks/{checkbox.xjIFibII.js → checkbox.C5cMvVMm.js} +3 -3
- package/dist/chunks/{checkbox.xjIFibII.js.map → checkbox.C5cMvVMm.js.map} +1 -1
- package/dist/chunks/{code-snippet.e8bxDBCO.js → code-snippet.68epWI-z.js} +184 -208
- package/dist/chunks/code-snippet.68epWI-z.js.map +1 -0
- package/dist/chunks/{controls-group.DWu8NqKL.js → controls-group.fAwpZLvA.js} +2 -2
- package/dist/chunks/{controls-group.DWu8NqKL.js.map → controls-group.fAwpZLvA.js.map} +1 -1
- package/dist/chunks/{copy.BhO7oRgC.js → copy.B6CXENok.js} +3 -3
- package/dist/chunks/{copy.BhO7oRgC.js.map → copy.B6CXENok.js.map} +1 -1
- package/dist/chunks/cross-circle-fill-small.DiZWEd7W.js +29 -0
- package/dist/chunks/cross-circle-fill-small.DiZWEd7W.js.map +1 -0
- package/dist/chunks/{dashboard-section.DKeDjvkB.js → dashboard-section.Bzj5vzTE.js} +3 -3
- package/dist/chunks/{dashboard-section.DKeDjvkB.js.map → dashboard-section.Bzj5vzTE.js.map} +1 -1
- package/dist/chunks/{dashed-underline.DGTW7Y_-.js → dashed-underline.SEXinixe.js} +3 -3
- package/dist/chunks/{dashed-underline.DGTW7Y_-.js.map → dashed-underline.SEXinixe.js.map} +1 -1
- package/dist/chunks/{data-grid-template.6Nls-D4o.js → data-grid-template.BRRSej-5.js} +2 -2
- package/dist/chunks/{data-grid-template.6Nls-D4o.js.map → data-grid-template.BRRSej-5.js.map} +1 -1
- package/dist/chunks/{data-grid.CTLlk_RW.js → data-grid.D0dri6Lc.js} +15 -15
- package/dist/chunks/{data-grid.CTLlk_RW.js.map → data-grid.D0dri6Lc.js.map} +1 -1
- package/dist/chunks/{date-picker.CoPmllNh.js → date-picker.NKXc916N.js} +15 -15
- package/dist/chunks/{date-picker.CoPmllNh.js.map → date-picker.NKXc916N.js.map} +1 -1
- package/dist/chunks/{date-range-picker.C36PxTCQ.js → date-range-picker.DXdh7SCV.js} +13 -13
- package/dist/chunks/{date-range-picker.C36PxTCQ.js.map → date-range-picker.DXdh7SCV.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.-Oy2eT40.js → dropdown-default-textbox.Bx0-dxhU.js} +112 -96
- package/dist/chunks/dropdown-default-textbox.Bx0-dxhU.js.map +1 -0
- package/dist/chunks/{dropdown-tag.C-LxVWlt.js → dropdown-tag.DPTV12uX.js} +14 -13
- package/dist/chunks/dropdown-tag.DPTV12uX.js.map +1 -0
- package/dist/chunks/{dropdown.CxBlK83Q.js → dropdown.CoVT4i0B.js} +360 -349
- package/dist/chunks/dropdown.CoVT4i0B.js.map +1 -0
- package/dist/chunks/{error-message.DyjHMyEZ.js → error-message.oV0CXm1m.js} +3 -3
- package/dist/chunks/{error-message.DyjHMyEZ.js.map → error-message.oV0CXm1m.js.map} +1 -1
- package/dist/chunks/es6.BvpG4Oi6.js +9 -0
- package/dist/chunks/es6.BvpG4Oi6.js.map +1 -0
- package/dist/chunks/expand.D1DTqaBO.js +33 -0
- package/dist/chunks/expand.D1DTqaBO.js.map +1 -0
- package/dist/chunks/{filter-bar.DmPkRBf4.js → filter-bar.d1IKC-Nr.js} +329 -320
- package/dist/chunks/filter-bar.d1IKC-Nr.js.map +1 -0
- package/dist/chunks/{footer-actions.D9nQFagi.js → footer-actions.Cuiq9UJH.js} +2 -2
- package/dist/chunks/{footer-actions.D9nQFagi.js.map → footer-actions.Cuiq9UJH.js.map} +1 -1
- package/dist/chunks/{header.Cr7115vM.js → header.B4il13uF.js} +3 -3
- package/dist/chunks/{header.Cr7115vM.js.map → header.B4il13uF.js.map} +1 -1
- package/dist/chunks/index.DKQuLmwu.js +182 -0
- package/dist/chunks/{index.Dytpif0G.js.map → index.DKQuLmwu.js.map} +1 -1
- package/dist/chunks/{info-icon.DvL1e5Iu.js → info-icon.B8AL324x.js} +3 -3
- package/dist/chunks/{info-icon.DvL1e5Iu.js.map → info-icon.B8AL324x.js.map} +1 -1
- package/dist/chunks/{input-field.iH1ICJkQ.js → input-field.CKh69yj2.js} +119 -113
- package/dist/chunks/input-field.CKh69yj2.js.map +1 -0
- package/dist/chunks/inspector.types.88WOdYA6.js +116 -0
- package/dist/chunks/inspector.types.88WOdYA6.js.map +1 -0
- package/dist/chunks/listbox-option-tag.m6aNQTJN.js +55 -0
- package/dist/chunks/listbox-option-tag.m6aNQTJN.js.map +1 -0
- package/dist/chunks/loading-button.BxDrDxmI.js +123 -0
- package/dist/chunks/loading-button.BxDrDxmI.js.map +1 -0
- package/dist/chunks/{menu.DN-xhDQU.js → menu.PtOT_BKl.js} +2 -2
- package/dist/chunks/{menu.DN-xhDQU.js.map → menu.PtOT_BKl.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.CeogBGfr.js → modal-fullscreen.BkuEaCdO.js} +2 -2
- package/dist/chunks/{modal-fullscreen.CeogBGfr.js.map → modal-fullscreen.BkuEaCdO.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BBef1Rl9.js → modal.vue_vue_type_script_setup_true_lang.CQXfT4eW.js} +4 -4
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BBef1Rl9.js.map → modal.vue_vue_type_script_setup_true_lang.CQXfT4eW.js.map} +1 -1
- package/dist/chunks/{pagination.BwG1MF4j.js → pagination.DeOBHgWf.js} +2 -2
- package/dist/chunks/{pagination.BwG1MF4j.js.map → pagination.DeOBHgWf.js.map} +1 -1
- package/dist/chunks/{popover.DRb2GW7t.js → popover.CvUTNkQG.js} +3 -3
- package/dist/chunks/{popover.DRb2GW7t.js.map → popover.CvUTNkQG.js.map} +1 -1
- package/dist/chunks/{popper-container.B76aE-3-.js → popper-container.50jF-_VU.js} +487 -435
- package/dist/chunks/popper-container.50jF-_VU.js.map +1 -0
- package/dist/chunks/{radio-group.B9HCffiZ.js → radio-group.r5U1kQIe.js} +95 -93
- package/dist/chunks/radio-group.r5U1kQIe.js.map +1 -0
- package/dist/chunks/search-bar.DmXr-0Ax.js +116 -0
- package/dist/chunks/search-bar.DmXr-0Ax.js.map +1 -0
- package/dist/chunks/secondary-nav.DnQPIiYO.js +137 -0
- package/dist/chunks/secondary-nav.DnQPIiYO.js.map +1 -0
- package/dist/chunks/{segmented-control.DyINOWUl.js → segmented-control.ClihHHOR.js} +2 -2
- package/dist/chunks/{segmented-control.DyINOWUl.js.map → segmented-control.ClihHHOR.js.map} +1 -1
- package/dist/chunks/{selection-card-group.C-YLePO4.js → selection-card-group.AkttDBv5.js} +3 -3
- package/dist/chunks/{selection-card-group.C-YLePO4.js.map → selection-card-group.AkttDBv5.js.map} +1 -1
- package/dist/chunks/{sidepanel.B-LtA15e.js → sidepanel.Dv73FrCn.js} +2 -2
- package/dist/chunks/{sidepanel.B-LtA15e.js.map → sidepanel.Dv73FrCn.js.map} +1 -1
- package/dist/chunks/{structured-list-item.DQiPKhOI.js → structured-list-item.DrYz5IsA.js} +4 -4
- package/dist/chunks/{structured-list-item.DQiPKhOI.js.map → structured-list-item.DrYz5IsA.js.map} +1 -1
- package/dist/chunks/{summary-grid-item-custom.B941Kdvq.js → summary-grid-item-custom.MloQOKnI.js} +4 -4
- package/dist/chunks/{summary-grid-item-custom.B941Kdvq.js.map → summary-grid-item-custom.MloQOKnI.js.map} +1 -1
- package/dist/chunks/{tag.CPhtHjDD.js → tag.D0imyBj_.js} +2 -2
- package/dist/chunks/{tag.CPhtHjDD.js.map → tag.D0imyBj_.js.map} +1 -1
- package/dist/chunks/textarea.meOoBSoa.js +267 -0
- package/dist/chunks/textarea.meOoBSoa.js.map +1 -0
- package/dist/chunks/{timeline-item.Cap9MXkH.js → timeline-item.BF6w6sUT.js} +181 -168
- package/dist/chunks/timeline-item.BF6w6sUT.js.map +1 -0
- package/dist/chunks/{tooltip.CTR3s-Rm.js → tooltip.C0jTO2wt.js} +2 -2
- package/dist/chunks/{tooltip.CTR3s-Rm.js.map → tooltip.C0jTO2wt.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.WNVsOZdp.js → tutorial.vue_vue_type_script_setup_true_lang.PX3UIJgR.js} +5 -5
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.WNVsOZdp.js.map → tutorial.vue_vue_type_script_setup_true_lang.PX3UIJgR.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.BQBWFTvi.js → use-cached-selected-values.Bh2VFRA-.js} +3 -3
- package/dist/chunks/use-cached-selected-values.Bh2VFRA-.js.map +1 -0
- 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 +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/dropdown.js +11 -10
- package/dist/dropdown.js.map +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +241 -236
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +6 -0
- package/dist/inspector.js.map +1 -0
- package/dist/internal.js +30 -31
- 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/popover.js +1 -1
- package/dist/popper-container.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/summary-grid.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 +1 -1
- package/package.json +2 -2
- package/dist/assets/avatar-image.css +0 -1
- package/dist/avatar-image.js +0 -7
- package/dist/avatar-image.js.map +0 -1
- package/dist/chunks/avatar-image.DO4w_loj.js +0 -61
- package/dist/chunks/avatar-image.DO4w_loj.js.map +0 -1
- package/dist/chunks/code-snippet.e8bxDBCO.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.-Oy2eT40.js.map +0 -1
- package/dist/chunks/dropdown-tag.C-LxVWlt.js.map +0 -1
- package/dist/chunks/dropdown.CxBlK83Q.js.map +0 -1
- package/dist/chunks/filter-bar.DmPkRBf4.js.map +0 -1
- package/dist/chunks/index.Dytpif0G.js +0 -125
- package/dist/chunks/input-field.iH1ICJkQ.js.map +0 -1
- package/dist/chunks/listbox-option-tag.Bv4-hXnG.js +0 -94
- package/dist/chunks/listbox-option-tag.Bv4-hXnG.js.map +0 -1
- package/dist/chunks/loading-button.BI32pZiW.js +0 -117
- package/dist/chunks/loading-button.BI32pZiW.js.map +0 -1
- package/dist/chunks/popper-container.B76aE-3-.js.map +0 -1
- package/dist/chunks/radio-group.B9HCffiZ.js.map +0 -1
- package/dist/chunks/search-bar.DxskyM4e.js +0 -107
- package/dist/chunks/search-bar.DxskyM4e.js.map +0 -1
- package/dist/chunks/secondary-nav.D66nxbU-.js +0 -112
- package/dist/chunks/secondary-nav.D66nxbU-.js.map +0 -1
- package/dist/chunks/textarea.CJ8xiMjv.js +0 -288
- package/dist/chunks/textarea.CJ8xiMjv.js.map +0 -1
- package/dist/chunks/timeline-item.Cap9MXkH.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.BQBWFTvi.js.map +0 -1
- /package/dist/@types/packages/{vue2/src/components/button → core/src}/components/loading-button/loading-button.types.d.ts +0 -0
- /package/dist/@types/packages/{vue2 → core}/src/types/omit-strict.d.ts +0 -0
- /package/dist/@types/packages/vue2/src/components/{avatar-image → avatar/components/avatar-image}/avatar-image.types.d.ts +0 -0
- /package/dist/@types/packages/vue2/src/components/{avatar-image → avatar/components/avatar-image}/index.d.ts +0 -0
- /package/dist/@types/packages/vue2/src/components/{internal/avatar → avatar}/index.d.ts +0 -0
package/dist/chunks/{dropdown-default-textbox.-Oy2eT40.js → dropdown-default-textbox.Bx0-dxhU.js}
RENAMED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { o as U } from "./on-click-outside.CcNG5w7_.js";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { g as
|
|
4
|
-
import { u as
|
|
5
|
-
import { B as
|
|
6
|
-
import { d as
|
|
7
|
-
import { C as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { defineComponent as D, useAttrs as oe, useSlots as J, ref as ae, computed as r, watch as le, nextTick as ne, openBlock as s, createElementBlock as i, normalizeClass as $, withKeys as C, createVNode as _, unref as o, withCtx as P, mergeProps as g, renderSlot as k, normalizeProps as K, createTextVNode as A, toDisplayString as h, Fragment as Y, renderList as Q, createElementVNode as X, guardReactiveProps as Z, createCommentVNode as B, withModifiers as q, createBlock as z, toHandlers as se, createSlots as de, withDirectives as H, vShow as W } from "vue";
|
|
3
|
+
import { g as ie } from "./unique-id.XFfoKuc2.js";
|
|
4
|
+
import { u as re } from "./use-has-slot.B7eQSabc.js";
|
|
5
|
+
import { B as ue } from "./typography.D7onlQ9v.js";
|
|
6
|
+
import { d as ce } from "./debounce.DUTu11PS.js";
|
|
7
|
+
import { C as pe } from "./cross-circle-fill.vLaelNTN.js";
|
|
8
|
+
import { C as be } from "./cross-circle-fill-small.DiZWEd7W.js";
|
|
9
|
+
import { _ as ee } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
10
|
+
import { s as V } from "./events.CMzGybJJ.js";
|
|
11
|
+
import { C as fe, a as ye } from "./chevron-up.5-KtIp8i.js";
|
|
11
12
|
import "../assets/dropdown-default-textbox.css";
|
|
12
13
|
const j = (t, a) => {
|
|
13
14
|
const e = !a.modifiers.bubble;
|
|
@@ -17,32 +18,32 @@ const j = (t, a) => {
|
|
|
17
18
|
const [b, f] = a.value;
|
|
18
19
|
t.__onClickOutside_stop = U(t, b, { capture: e, ...f });
|
|
19
20
|
}
|
|
20
|
-
},
|
|
21
|
+
}, G = (t) => {
|
|
21
22
|
t.__onClickOutside_stop();
|
|
22
|
-
},
|
|
23
|
+
}, Te = {
|
|
23
24
|
// Vue 2 Directive hooks
|
|
24
25
|
inserted: j,
|
|
25
|
-
unbind:
|
|
26
|
+
unbind: G,
|
|
26
27
|
// Vue 3 Directive hooks
|
|
27
28
|
beforeMount: j,
|
|
28
|
-
unmounted:
|
|
29
|
+
unmounted: G
|
|
29
30
|
};
|
|
30
|
-
var c = /* @__PURE__ */ ((t) => (t.DISABLED = "disabled", t.READONLY = "readonly", t.HAS_ITEMS = "has-items", t.OPENED = "opened", t.ERROR = "error", t))(c || {}), d = /* @__PURE__ */ ((t) => (t.OPEN = "dropdown-base-open", t.KEYDOWN = "dropdown-base-keydown", t.CLOSE = "dropdown-base-close", t.INPUT = "dropdown-base-input", t.CLEAR = "dropdown-base-clear", t))(d || {});
|
|
31
|
-
const
|
|
31
|
+
var te = /* @__PURE__ */ ((t) => (t.DEFAULT = "DropdownInputDefault", t.SMALL = "DropdownInputSmall", t))(te || {}), c = /* @__PURE__ */ ((t) => (t.DISABLED = "disabled", t.READONLY = "readonly", t.HAS_ITEMS = "has-items", t.OPENED = "opened", t.ERROR = "error", t))(c || {}), d = /* @__PURE__ */ ((t) => (t.OPEN = "dropdown-base-open", t.KEYDOWN = "dropdown-base-keydown", t.CLOSE = "dropdown-base-close", t.INPUT = "dropdown-base-input", t.CLEAR = "dropdown-base-clear", t))(d || {});
|
|
32
|
+
const me = ["onKeydown"], xe = ["id", "value", "disabled", "readonly", "onKeydown"], ve = ["id"], we = {
|
|
32
33
|
key: 1,
|
|
33
34
|
class: "b-dropdown-base-textbox__input-multiple-selected"
|
|
34
|
-
},
|
|
35
|
+
}, Ie = { class: "b-dropdown-base-textbox__input-selected-element" }, Se = {
|
|
35
36
|
key: 2,
|
|
36
37
|
class: "b-dropdown-base-textbox__additional-items"
|
|
37
|
-
},
|
|
38
|
+
}, Ce = {
|
|
38
39
|
key: 3,
|
|
39
40
|
class: "b-dropdown-base-textbox__icon",
|
|
40
41
|
"aria-hidden": "true"
|
|
41
|
-
},
|
|
42
|
+
}, he = ["onClick", "onKeydown", "onKeyup"], _e = D({
|
|
42
43
|
name: "dropdown-base-textbox",
|
|
43
44
|
inheritAttrs: !1
|
|
44
|
-
}),
|
|
45
|
-
...
|
|
45
|
+
}), ge = /* @__PURE__ */ D({
|
|
46
|
+
..._e,
|
|
46
47
|
props: {
|
|
47
48
|
/**
|
|
48
49
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -121,16 +122,23 @@ const be = ["onKeydown"], fe = ["id", "value", "disabled", "readonly", "onKeydow
|
|
|
121
122
|
/**
|
|
122
123
|
* Toggles whether to use the slot content select items shown in the textbox in multiple mode.
|
|
123
124
|
*/
|
|
124
|
-
showSlotContentInMultiple: { type: Boolean, default: !1 }
|
|
125
|
+
showSlotContentInMultiple: { type: Boolean, default: !1 },
|
|
126
|
+
/**
|
|
127
|
+
* Dropdown size
|
|
128
|
+
*/
|
|
129
|
+
size: {
|
|
130
|
+
type: String,
|
|
131
|
+
default: null
|
|
132
|
+
}
|
|
125
133
|
},
|
|
126
134
|
setup(t, { emit: a }) {
|
|
127
|
-
const e = t, b =
|
|
135
|
+
const e = t, b = oe(), f = J(), m = re(f), u = ae(null), x = ie("textbox"), E = r(() => ({
|
|
128
136
|
[`b-dropdown-base-textbox--${c.DISABLED}`]: e.disabled,
|
|
129
137
|
[`b-dropdown-base-textbox--${c.READONLY}`]: e.readonly,
|
|
130
138
|
[`b-dropdown-base-textbox--${c.HAS_ITEMS}`]: !!e.additionalItemsSelected
|
|
131
|
-
})),
|
|
139
|
+
})), L = r(() => ({
|
|
132
140
|
"b-dropdown-base-textbox__input--dynamic-filtering": e.dynamicFiltering
|
|
133
|
-
})), v = r(() => e.dynamicFiltering && !!e.value && e.open),
|
|
141
|
+
})), v = r(() => e.dynamicFiltering && !!e.value && e.open), w = r(
|
|
134
142
|
() => {
|
|
135
143
|
var n;
|
|
136
144
|
return {
|
|
@@ -146,106 +154,113 @@ const be = ["onKeydown"], fe = ["id", "value", "disabled", "readonly", "onKeydow
|
|
|
146
154
|
}
|
|
147
155
|
), l = r(
|
|
148
156
|
() => e.multiple ? e.selectedValueItem : []
|
|
149
|
-
),
|
|
157
|
+
), I = r(() => e.dynamicFiltering && (e.open || e.alwaysComboboxIsInput)), R = r(() => e.selectedValueItem && !e.multiple), S = r(
|
|
150
158
|
() => e.multiple && e.selectedValueItem && l.value.length > 0 && e.showSlotContentInMultiple
|
|
151
159
|
);
|
|
152
|
-
|
|
153
|
-
() =>
|
|
160
|
+
le(
|
|
161
|
+
() => I.value,
|
|
154
162
|
() => {
|
|
155
|
-
|
|
163
|
+
I.value && !e.alwaysComboboxIsInput && ne(() => {
|
|
156
164
|
u.value.focus();
|
|
157
165
|
});
|
|
158
166
|
}
|
|
159
167
|
);
|
|
160
|
-
const
|
|
168
|
+
const N = () => {
|
|
161
169
|
!e.disabled && !e.readonly && (u.value.focus(), a(d.OPEN));
|
|
162
170
|
}, F = () => {
|
|
163
171
|
e.open && (u.value.focus(), a(d.CLOSE));
|
|
164
|
-
}, M = (n) => e.open && n.target.tagName === "INPUT" ? null : e.open ? F() :
|
|
172
|
+
}, M = (n) => e.open && n.target.tagName === "INPUT" ? null : e.open ? F() : N(), O = () => {
|
|
165
173
|
a(d.CLEAR), a(d.INPUT, ""), u.value.focus();
|
|
166
|
-
}, T =
|
|
174
|
+
}, T = ce((n) => {
|
|
167
175
|
!e.readonly && !e.disabled ? a(d.INPUT, n.target.value) : (n.preventDefault(), n.stopPropagation());
|
|
168
176
|
}, e.debounceTime);
|
|
169
177
|
return (n, y) => (s(), i("div", {
|
|
170
|
-
class:
|
|
178
|
+
class: $(n.$attrs.class),
|
|
171
179
|
"data-testid": "textbox-wrapper",
|
|
172
180
|
onClick: M,
|
|
173
|
-
onKeydown:
|
|
181
|
+
onKeydown: C(F, ["escape"])
|
|
174
182
|
}, [
|
|
175
|
-
|
|
176
|
-
class:
|
|
183
|
+
_(o(ue), {
|
|
184
|
+
class: $(["b-dropdown-base-textbox", o(E)]),
|
|
177
185
|
el: "div",
|
|
178
186
|
"data-testid": "base-textbox"
|
|
179
187
|
}, {
|
|
180
188
|
default: P(() => [
|
|
181
|
-
o(
|
|
182
|
-
id: o(
|
|
189
|
+
o(I) ? (s(), i("input", g({ key: 0 }, o(w), {
|
|
190
|
+
id: o(x),
|
|
183
191
|
ref_key: "textbox",
|
|
184
192
|
ref: u,
|
|
185
193
|
class: "b-dropdown-base-textbox__input",
|
|
186
194
|
role: "combobox",
|
|
187
195
|
type: "text",
|
|
188
196
|
"aria-autocomplete": "list",
|
|
197
|
+
size: "1",
|
|
189
198
|
value: t.open ? t.value : t.displayValue,
|
|
190
199
|
disabled: t.disabled ? !0 : null,
|
|
191
200
|
readonly: t.readonly,
|
|
192
201
|
onKeydown: [
|
|
193
202
|
y[0] || (y[0] = (p) => n.$emit(o(d).KEYDOWN, p)),
|
|
194
|
-
|
|
203
|
+
C(M, ["enter"])
|
|
195
204
|
],
|
|
196
205
|
onInput: y[1] || (y[1] = //@ts-ignore
|
|
197
206
|
(...p) => o(T) && o(T)(...p))
|
|
198
|
-
}), null, 16,
|
|
207
|
+
}), null, 16, xe)) : (s(), i("div", g({
|
|
199
208
|
key: 1,
|
|
200
|
-
id: o(
|
|
201
|
-
}, o(
|
|
209
|
+
id: o(x)
|
|
210
|
+
}, o(w), {
|
|
202
211
|
ref_key: "textbox",
|
|
203
212
|
ref: u,
|
|
204
|
-
class: ["b-dropdown-base-textbox__input", o(
|
|
213
|
+
class: ["b-dropdown-base-textbox__input", o(L)],
|
|
205
214
|
role: "combobox",
|
|
206
215
|
tabindex: 0
|
|
207
216
|
}), [
|
|
208
|
-
o(R) ?
|
|
209
|
-
|
|
210
|
-
], !0) : o(
|
|
211
|
-
(s(!0), i(Y, null,
|
|
217
|
+
o(R) ? k(n.$slots, "default", K(g({ key: 0 }, t.selectedValueItem)), () => [
|
|
218
|
+
A(h(t.displayValue), 1)
|
|
219
|
+
], !0) : o(S) ? (s(), i("div", we, [
|
|
220
|
+
(s(!0), i(Y, null, Q(o(l), (p) => (s(), i("div", {
|
|
212
221
|
key: p.value
|
|
213
222
|
}, [
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
223
|
+
X("div", Ie, [
|
|
224
|
+
k(n.$slots, "default", K(Z(p)), () => [
|
|
225
|
+
A(h(t.displayValue), 1)
|
|
217
226
|
], !0)
|
|
218
227
|
])
|
|
219
228
|
]))), 128))
|
|
220
229
|
])) : (s(), i(Y, { key: 2 }, [
|
|
221
|
-
|
|
230
|
+
A(h(t.displayValue), 1)
|
|
222
231
|
], 64))
|
|
223
|
-
], 16,
|
|
224
|
-
t.additionalItemsSelected ? (s(), i("span",
|
|
225
|
-
o(
|
|
226
|
-
|
|
227
|
-
])) :
|
|
232
|
+
], 16, ve)),
|
|
233
|
+
t.additionalItemsSelected ? (s(), i("span", Se, h(t.additionalItemsSelected), 1)) : B("", !0),
|
|
234
|
+
o(m)("icon") && !o(v) ? (s(), i("span", Ce, [
|
|
235
|
+
k(n.$slots, "icon", {}, void 0, !0)
|
|
236
|
+
])) : B("", !0),
|
|
228
237
|
o(v) ? (s(), i("span", {
|
|
229
238
|
key: 4,
|
|
230
239
|
class: "b-dropdown-base-textbox__clear-search",
|
|
231
240
|
tabindex: "0",
|
|
232
241
|
"data-testid": "clear-search-button",
|
|
233
|
-
onClick: q(
|
|
234
|
-
onKeydown:
|
|
235
|
-
onKeyup:
|
|
242
|
+
onClick: q(O, ["stop"]),
|
|
243
|
+
onKeydown: C(q(O, ["stop"]), ["enter"]),
|
|
244
|
+
onKeyup: C(O, ["space"])
|
|
236
245
|
}, [
|
|
237
|
-
|
|
238
|
-
|
|
246
|
+
t.size === o(te).SMALL ? (s(), z(o(be), {
|
|
247
|
+
key: 0,
|
|
248
|
+
"svg-title": "clearSearch"
|
|
249
|
+
})) : (s(), z(o(pe), {
|
|
250
|
+
key: 1,
|
|
251
|
+
"svg-title": "clearSearch"
|
|
252
|
+
}))
|
|
253
|
+
], 40, he)) : B("", !0)
|
|
239
254
|
]),
|
|
240
255
|
_: 3
|
|
241
256
|
}, 8, ["class"])
|
|
242
|
-
], 42,
|
|
257
|
+
], 42, me));
|
|
243
258
|
}
|
|
244
|
-
}),
|
|
259
|
+
}), ke = /* @__PURE__ */ ee(ge, [["__scopeId", "data-v-3cc2ab54"]]), De = { class: "b-dropdown-default-textbox__chevron" }, Ee = D({
|
|
245
260
|
name: "dropdown-default-textbox",
|
|
246
261
|
inheritAttrs: !1
|
|
247
|
-
}),
|
|
248
|
-
...
|
|
262
|
+
}), Le = /* @__PURE__ */ D({
|
|
263
|
+
...Ee,
|
|
249
264
|
props: {
|
|
250
265
|
/**
|
|
251
266
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -337,64 +352,65 @@ const be = ["onKeydown"], fe = ["id", "value", "disabled", "readonly", "onKeydow
|
|
|
337
352
|
},
|
|
338
353
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
339
354
|
setup(t, { emit: a }) {
|
|
340
|
-
const e = t, b =
|
|
355
|
+
const e = t, b = J(), f = r(() => ({
|
|
341
356
|
[`b-dropdown-default-textbox--${c.ERROR}`]: !e.disabled && !e.readonly && e.isInvalid,
|
|
342
357
|
[`b-dropdown-default-textbox--${c.DISABLED}`]: e.disabled,
|
|
343
358
|
[`b-dropdown-default-textbox--${c.READONLY}`]: e.readonly,
|
|
344
359
|
[`b-dropdown-default-textbox--${c.OPENED}`]: e.open,
|
|
345
360
|
"b-dropdown-default-textbox--condensed": e.condensed
|
|
346
|
-
})),
|
|
361
|
+
})), m = r(() => e.open && !e.disabled && !e.readonly), u = (l) => {
|
|
347
362
|
a("input", l);
|
|
348
|
-
},
|
|
363
|
+
}, x = (l) => {
|
|
349
364
|
a("keydown", l);
|
|
350
|
-
},
|
|
351
|
-
|
|
352
|
-
},
|
|
353
|
-
|
|
365
|
+
}, E = (l) => {
|
|
366
|
+
V(l), a("open");
|
|
367
|
+
}, L = (l) => {
|
|
368
|
+
V(l), a("close");
|
|
354
369
|
}, v = (l) => {
|
|
355
|
-
|
|
356
|
-
},
|
|
370
|
+
V(l), a("clear");
|
|
371
|
+
}, w = {
|
|
357
372
|
[d.INPUT]: u,
|
|
358
|
-
[d.OPEN]:
|
|
359
|
-
[d.CLOSE]:
|
|
373
|
+
[d.OPEN]: E,
|
|
374
|
+
[d.CLOSE]: L,
|
|
360
375
|
[d.CLEAR]: v,
|
|
361
|
-
[d.KEYDOWN]:
|
|
376
|
+
[d.KEYDOWN]: x
|
|
362
377
|
};
|
|
363
|
-
return (l,
|
|
364
|
-
class:
|
|
378
|
+
return (l, I) => (s(), i("div", {
|
|
379
|
+
class: $(["b-dropdown-default-textbox", o(f)]),
|
|
365
380
|
"data-testid": "default-textbox"
|
|
366
381
|
}, [
|
|
367
|
-
|
|
382
|
+
_(ke, g({ ...l.$attrs, ...l.$props }, {
|
|
368
383
|
class: "b-dropdown-default-textbox__textbox",
|
|
369
384
|
value: t.value
|
|
370
|
-
},
|
|
385
|
+
}, se(w)), de({
|
|
371
386
|
icon: P(() => [
|
|
372
|
-
|
|
373
|
-
H(
|
|
374
|
-
[W, o(
|
|
387
|
+
X("div", De, [
|
|
388
|
+
H(_(o(fe), { "svg-title": "opened" }, null, 512), [
|
|
389
|
+
[W, o(m)]
|
|
375
390
|
]),
|
|
376
|
-
H(
|
|
377
|
-
[W, !o(
|
|
391
|
+
H(_(o(ye), { "svg-title": "closed" }, null, 512), [
|
|
392
|
+
[W, !o(m)]
|
|
378
393
|
])
|
|
379
394
|
])
|
|
380
395
|
]),
|
|
381
396
|
_: 2
|
|
382
397
|
}, [
|
|
383
|
-
|
|
384
|
-
name:
|
|
385
|
-
fn: P((
|
|
386
|
-
|
|
398
|
+
Q(o(b), (R, S) => ({
|
|
399
|
+
name: S,
|
|
400
|
+
fn: P((N) => [
|
|
401
|
+
k(l.$slots, S, K(Z(N)), void 0, !0)
|
|
387
402
|
])
|
|
388
403
|
}))
|
|
389
404
|
]), 1040, ["value"])
|
|
390
405
|
], 2));
|
|
391
406
|
}
|
|
392
|
-
}),
|
|
407
|
+
}), Ue = /* @__PURE__ */ ee(Le, [["__scopeId", "data-v-742f436a"]]);
|
|
393
408
|
export {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
409
|
+
te as B,
|
|
410
|
+
Ue as D,
|
|
411
|
+
Te as a,
|
|
412
|
+
c as b,
|
|
413
|
+
d as c,
|
|
414
|
+
ke as d
|
|
399
415
|
};
|
|
400
|
-
//# sourceMappingURL=dropdown-default-textbox
|
|
416
|
+
//# sourceMappingURL=dropdown-default-textbox.Bx0-dxhU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-default-textbox.Bx0-dxhU.js","sources":["../../../vue2/src/directives/click-outside/directive.ts","../../../vue2/src/components/dropdown/dropdown.types.ts","../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../../vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["import { onClickOutside } from './on-click-outside';\nimport type { DirectiveHook } from 'vue';\n\ntype Element = HTMLElement & { __onClickOutside_stop?: () => void };\n\n/**\n * Attaches the click outside listener to target element to register clicks outside the element.\n * @param targetElement Element to attach listener to.\n * @param binding\n */\nconst bindDirective: DirectiveHook<Element> = (targetElement, binding) => {\n const capture = !binding.modifiers.bubble;\n if (typeof binding.value === 'function') {\n // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n targetElement.__onClickOutside_stop = onClickOutside(targetElement, binding.value, { capture });\n } else {\n const [handler, options] = binding.value;\n // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n targetElement.__onClickOutside_stop = onClickOutside(targetElement, handler, { capture, ...options });\n }\n};\n\n/**\n * Removes click outside listener from the target element.\n * @param targetElement Element to detach listener from.\n */\nconst unbindDirective: DirectiveHook<Element> = targetElement => {\n // eslint-disable-next-line no-underscore-dangle\n targetElement.__onClickOutside_stop();\n};\n\nexport const BentoClickOutsideDirective = {\n // Vue 2 Directive hooks\n inserted: bindDirective,\n unbind: unbindDirective,\n\n // Vue 3 Directive hooks\n beforeMount: bindDirective,\n unmounted: unbindDirective,\n};\n","/**\n * @deprecated Do not use. Only 'default' size should be used.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types';\n\nexport type { BentoListboxSearchOptions as BentoDropdownSearchOptions } from '@/types';\nexport type { BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps } from '@/types';\nexport type { BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions } from '@/types';\n","import { PropType } from 'vue';\nimport { Booleanish } from '@/types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n size=\"1\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n role=\"combobox\"\n :tabindex=\"0\"\n >\n <slot v-if=\"shouldShowSingleSelectSlot\" v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n tabindex=\"0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"'clearSearch'\" />\n <cross-circle-fill-icon v-else :svg-title=\"'clearSearch'\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the \"clear\" button is clicked\n */\n (e: DropdownBaseTextboxEvent.CLEAR);\n\n /**\n * Emitted on click, space, enter and esc user events. It will close the dropdown.\n */\n (e: DropdownBaseTextboxEvent.CLOSE);\n\n /**\n * Emitted when `dynamicFiltering` is enabled and a search input is entered\n */\n (e: DropdownBaseTextboxEvent.INPUT, searchValue: string);\n\n /**\n * Emitted when any key is pressed and the focus is on the input field\n */\n (e: DropdownBaseTextboxEvent.KEYDOWN, event: KeyboardEvent);\n\n /**\n * Emitted on click, space and enter user events. It will open the dropdown.\n */\n (e: DropdownBaseTextboxEvent.OPEN);\n }>();\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n } as HTMLAttributes)\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as BentoListboxOptionItem[]) : []\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n () => {\n if (shouldShowInput.value && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value.focus();\n });\n }\n }\n );\n\n const onOpenDropdown = () => {\n if (!props.disabled && !props.readonly) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.OPEN);\n }\n };\n\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = debounce<(event: Event) => void>((event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n }, props.debounceTime);\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, PropType, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits<{\n /**\n * Emitted on clearing the input.\n */\n (e: 'clear');\n\n /**\n * Emitted on click, space and enter user events. It will open the dropdown.\n */\n (e: 'close');\n\n /**\n * Emitted on input event.\n */\n (e: 'input', newInput: string);\n\n /**\n * Emitted on keydown event.\n */\n (e: 'keydown', keydownEvent: KeyboardEvent);\n\n /**\n * Emitted on click, space, enter and esc user events. It will close the dropdown.\n */\n (e: 'open');\n }>();\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["bindDirective","targetElement","binding","capture","onClickOutside","handler","options","unbindDirective","BentoClickOutsideDirective","BentoDropdownSize","BentoDropdownSize2","DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__$1","defineComponent","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","textbox","ref","textboxId","generateUid","conditionalClasses","computed","props","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","selectedValueItems","shouldShowInput","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","emit","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","__default__","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":"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"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { defineComponent as s, computed as v, openBlock as _, createElementBlock as y, createVNode as m, mergeProps as f, unref as c, withCtx as l, toRefs as h, createTextVNode as I, toDisplayString as g, createBlock as b } from "vue";
|
|
2
|
-
import { B as
|
|
3
|
-
import { B as
|
|
2
|
+
import { B as C } from "./avatar.IHx0kN0u.js";
|
|
3
|
+
import { B as n } from "./dropdown.CoVT4i0B.js";
|
|
4
4
|
import { d as A, B as x } from "./typography.D7onlQ9v.js";
|
|
5
5
|
import { u as D } from "./use-country-items.CongYNiX.js";
|
|
6
6
|
import { B } from "./country.types.Br0AjxGy.js";
|
|
7
|
+
import { L as w } from "./listbox-option-tag.m6aNQTJN.js";
|
|
7
8
|
import { B as T } from "./payment-method.NCItxw1D.js";
|
|
8
9
|
import { _ as k } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
9
10
|
import "../assets/dropdown-tag.css";
|
|
10
11
|
const O = s({
|
|
11
12
|
name: "bento-dropdown-avatar"
|
|
12
|
-
}),
|
|
13
|
+
}), H = /* @__PURE__ */ s({
|
|
13
14
|
...O,
|
|
14
15
|
props: {
|
|
15
16
|
...n.props,
|
|
@@ -45,7 +46,7 @@ const O = s({
|
|
|
45
46
|
}
|
|
46
47
|
}), S = s({
|
|
47
48
|
name: "b-dropdown-country"
|
|
48
|
-
}),
|
|
49
|
+
}), J = /* @__PURE__ */ s({
|
|
49
50
|
...S,
|
|
50
51
|
props: {
|
|
51
52
|
...n.props,
|
|
@@ -95,7 +96,7 @@ const O = s({
|
|
|
95
96
|
}
|
|
96
97
|
}), V = s({
|
|
97
98
|
name: "b-dropdown-currency"
|
|
98
|
-
}),
|
|
99
|
+
}), K = /* @__PURE__ */ s({
|
|
99
100
|
...V,
|
|
100
101
|
props: {
|
|
101
102
|
...n.props,
|
|
@@ -122,7 +123,7 @@ const O = s({
|
|
|
122
123
|
}
|
|
123
124
|
}), L = s({
|
|
124
125
|
name: "bento-dropdown-payment-method"
|
|
125
|
-
}),
|
|
126
|
+
}), Q = /* @__PURE__ */ s({
|
|
126
127
|
...L,
|
|
127
128
|
props: {
|
|
128
129
|
...n.props,
|
|
@@ -190,12 +191,12 @@ const O = s({
|
|
|
190
191
|
_: 1
|
|
191
192
|
}, 16, ["items"]));
|
|
192
193
|
}
|
|
193
|
-
}),
|
|
194
|
+
}), W = /* @__PURE__ */ k(N, [["__scopeId", "data-v-4aa0c20f"]]);
|
|
194
195
|
export {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
196
|
+
H as _,
|
|
197
|
+
J as a,
|
|
198
|
+
K as b,
|
|
199
|
+
Q as c,
|
|
200
|
+
W as d
|
|
200
201
|
};
|
|
201
|
-
//# sourceMappingURL=dropdown-tag.
|
|
202
|
+
//# sourceMappingURL=dropdown-tag.DPTV12uX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-tag.DPTV12uX.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\" @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<{\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 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","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":";;;;;;;;;;AAuEI,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;;;;;;;;;;;;;;;;ICqDAC,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;;;;;;;;;;;;;;;;;ICQRC,IAAAlB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;AAlCA,UAAAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA;;;;;;;;ICkCAiB,IAAAnB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;AAlCA,UAAAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA;;;;;;;;;;;;;ICsCAkB,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;;;;;;;;;;;;;;;;"}
|