@adyen/bento-vue3 1.97.0 → 1.98.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 +56 -0
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/anchor-scroller.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/data-grid.css +1 -1
- package/dist/assets/date.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/draggable-handle.css +1 -1
- package/dist/assets/draggable.css +1 -0
- 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/header-meta.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/list-item.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/navigation-menu-group.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.BEV9uXHS.js → action-bar.Dd0rr7Sb.js} +4 -4
- package/dist/chunks/{action-bar.BEV9uXHS.js.map → action-bar.Dd0rr7Sb.js.map} +1 -1
- package/dist/chunks/{ai-tag.BSzY3-0w.js → ai-tag.DOQ-UnnF.js} +2 -2
- package/dist/chunks/{ai-tag.BSzY3-0w.js.map → ai-tag.DOQ-UnnF.js.map} +1 -1
- package/dist/chunks/{anchor-scroller.J2mkf0uu.js → anchor-scroller.NRHfj2FY.js} +2 -2
- package/dist/chunks/{anchor-scroller.J2mkf0uu.js.map → anchor-scroller.NRHfj2FY.js.map} +1 -1
- package/dist/chunks/{base-modal.B7SiRo7c.js → base-modal.BzbJbryi.js} +5 -5
- package/dist/chunks/{base-modal.B7SiRo7c.js.map → base-modal.BzbJbryi.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.DoUcLg-M.js → button-actions-with-menu.DZdmQdah.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.DoUcLg-M.js.map → button-actions-with-menu.DZdmQdah.js.map} +1 -1
- package/dist/chunks/{button-actions.CWmTl4cF.js → button-actions.CgZbPzhi.js} +2 -2
- package/dist/chunks/{button-actions.CWmTl4cF.js.map → button-actions.CgZbPzhi.js.map} +1 -1
- package/dist/chunks/{calendar.6NKd6IMo.js → calendar.D0RdoofE.js} +318 -317
- package/dist/chunks/calendar.D0RdoofE.js.map +1 -0
- package/dist/chunks/{card.Ca7FkYxy.js → card.BpPQzOoN.js} +2 -2
- package/dist/chunks/{card.Ca7FkYxy.js.map → card.BpPQzOoN.js.map} +1 -1
- package/dist/chunks/{checkbox-group.BWx4wn0F.js → checkbox-group.MwUU4K4P.js} +3 -3
- package/dist/chunks/{checkbox-group.BWx4wn0F.js.map → checkbox-group.MwUU4K4P.js.map} +1 -1
- package/dist/chunks/{checkbox.DwfrmbwI.js → checkbox.SA_J0v-N.js} +18 -18
- package/dist/chunks/{checkbox.DwfrmbwI.js.map → checkbox.SA_J0v-N.js.map} +1 -1
- package/dist/chunks/{code-snippet.Cp61a0Ud.js → code-snippet.CEsdQBL7.js} +4 -4
- package/dist/chunks/{code-snippet.Cp61a0Ud.js.map → code-snippet.CEsdQBL7.js.map} +1 -1
- package/dist/chunks/{controls-group.B-wIl-I7.js → controls-group.BfBnWu0u.js} +2 -2
- package/dist/chunks/{controls-group.B-wIl-I7.js.map → controls-group.BfBnWu0u.js.map} +1 -1
- package/dist/chunks/{copy.XM_7RiIR.js → copy.nnaqOH6I.js} +3 -3
- package/dist/chunks/{copy.XM_7RiIR.js.map → copy.nnaqOH6I.js.map} +1 -1
- package/dist/chunks/{dashboard-section.BR0xU-b-.js → dashboard-section.B82okI3e.js} +4 -4
- package/dist/chunks/{dashboard-section.BR0xU-b-.js.map → dashboard-section.B82okI3e.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CxpIRlCx.js → dashed-underline.x_gU4d-A.js} +4 -4
- package/dist/chunks/{dashed-underline.CxpIRlCx.js.map → dashed-underline.x_gU4d-A.js.map} +1 -1
- package/dist/chunks/{data-grid-template.LTILymaF.js → data-grid-template.BdabDTqN.js} +4 -4
- package/dist/chunks/{data-grid-template.LTILymaF.js.map → data-grid-template.BdabDTqN.js.map} +1 -1
- package/dist/chunks/{data-grid.xcmkjuyg.js → data-grid.DXF4Cg7m.js} +140 -140
- package/dist/chunks/{data-grid.xcmkjuyg.js.map → data-grid.DXF4Cg7m.js.map} +1 -1
- package/dist/chunks/{date-picker.CCETX031.js → date-picker.DhtLcpyr.js} +7 -7
- package/dist/chunks/{date-picker.CCETX031.js.map → date-picker.DhtLcpyr.js.map} +1 -1
- package/dist/chunks/{date-range-picker.CtGaxtYh.js → date-range-picker.CChROXhw.js} +10 -10
- package/dist/chunks/{date-range-picker.CtGaxtYh.js.map → date-range-picker.CChROXhw.js.map} +1 -1
- package/dist/chunks/{date.R2Wz6o7J.js → date.BFhwd9CA.js} +28 -25
- package/dist/chunks/date.BFhwd9CA.js.map +1 -0
- package/dist/chunks/{dialog-page.BOwnhJze.js → dialog-page.BYMSk5DR.js} +2 -2
- package/dist/chunks/{dialog-page.BOwnhJze.js.map → dialog-page.BYMSk5DR.js.map} +1 -1
- package/dist/chunks/draggable-handle.y_1hfypa.js +1542 -0
- package/dist/chunks/draggable-handle.y_1hfypa.js.map +1 -0
- package/dist/chunks/draggable.5evQkGJ4.js +176 -0
- package/dist/chunks/draggable.5evQkGJ4.js.map +1 -0
- package/dist/chunks/{drawer.BQoyUVOW.js → drawer.Cz62dnhy.js} +2 -2
- package/dist/chunks/{drawer.BQoyUVOW.js.map → drawer.Cz62dnhy.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.BgZYYc_D.js → dropdown-tag.DCwovT-N.js} +3 -3
- package/dist/chunks/{dropdown-tag.BgZYYc_D.js.map → dropdown-tag.DCwovT-N.js.map} +1 -1
- package/dist/chunks/{dropdown.C97ShfXZ.js → dropdown.CGUBk0iO.js} +1028 -1010
- package/dist/chunks/dropdown.CGUBk0iO.js.map +1 -0
- package/dist/chunks/{field-label.CLV3nSzz.js → field-label.yQ_2Qg88.js} +2 -2
- package/dist/chunks/{field-label.CLV3nSzz.js.map → field-label.yQ_2Qg88.js.map} +1 -1
- package/dist/chunks/{file-uploader.CXgAfp0m.js → file-uploader.xzoJqcg1.js} +3 -3
- package/dist/chunks/{file-uploader.CXgAfp0m.js.map → file-uploader.xzoJqcg1.js.map} +1 -1
- package/dist/chunks/{filter-bar.D8BVPHLT.js → filter-bar.DjUo6CwN.js} +22 -20
- package/dist/chunks/filter-bar.DjUo6CwN.js.map +1 -0
- package/dist/chunks/{focus-trap.Dl_rHbwH.js → focus-trap.3-5C2gYa.js} +2 -2
- package/dist/chunks/{focus-trap.Dl_rHbwH.js.map → focus-trap.3-5C2gYa.js.map} +1 -1
- package/dist/chunks/{footer-actions.C_HlJeXP.js → footer-actions.sEd1kzgV.js} +2 -2
- package/dist/chunks/{footer-actions.C_HlJeXP.js.map → footer-actions.sEd1kzgV.js.map} +1 -1
- package/dist/chunks/generate-uid.DBWe4g6T.js.map +1 -1
- package/dist/chunks/header-meta.DWWL88nm.js +248 -0
- package/dist/chunks/{header-meta.yBxBW12f.js.map → header-meta.DWWL88nm.js.map} +1 -1
- package/dist/chunks/{header-with-views.qCyKEZW1.js → header-with-views.-QuYbGZW.js} +10 -10
- package/dist/chunks/{header-with-views.qCyKEZW1.js.map → header-with-views.-QuYbGZW.js.map} +1 -1
- package/dist/chunks/{header.aJLkRe1D.js → header.B6pGQk7G.js} +3 -3
- package/dist/chunks/{header.aJLkRe1D.js.map → header.B6pGQk7G.js.map} +1 -1
- package/dist/chunks/index.B875RXHM.js.map +1 -1
- package/dist/chunks/{index.oOAkh64h.js → index.DtuWfdhd.js} +14 -14
- package/dist/chunks/{index.oOAkh64h.js.map → index.DtuWfdhd.js.map} +1 -1
- package/dist/chunks/{info-icon.1FtkyuYH.js → info-icon.DvhV1I7b.js} +3 -3
- package/dist/chunks/{info-icon.1FtkyuYH.js.map → info-icon.DvhV1I7b.js.map} +1 -1
- package/dist/chunks/{input-field-password.DUSoJYKT.js → input-field-password.wB3hoH6J.js} +5 -5
- package/dist/chunks/{input-field-password.DUSoJYKT.js.map → input-field-password.wB3hoH6J.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.Q-bQJL4g.js → input-field-phone-number.BmVS8zco.js} +2 -2
- package/dist/chunks/{input-field-phone-number.Q-bQJL4g.js.map → input-field-phone-number.BmVS8zco.js.map} +1 -1
- package/dist/chunks/{input-field.CvnmfrzQ.js → input-field.lSSH5S7P.js} +3 -3
- package/dist/chunks/{input-field.CvnmfrzQ.js.map → input-field.lSSH5S7P.js.map} +1 -1
- package/dist/chunks/{input-time.CGPUOOQ9.js → input-time.nwnBuzgX.js} +3 -3
- package/dist/chunks/{input-time.CGPUOOQ9.js.map → input-time.nwnBuzgX.js.map} +1 -1
- package/dist/chunks/{inspector.BvBC1ABK.js → inspector.CTBNfXvo.js} +3 -3
- package/dist/chunks/{inspector.BvBC1ABK.js.map → inspector.CTBNfXvo.js.map} +1 -1
- package/dist/chunks/{layout-row.BsGdHl3d.js → layout-row.7mhpRkAj.js} +2 -2
- package/dist/chunks/{layout-row.BsGdHl3d.js.map → layout-row.7mhpRkAj.js.map} +1 -1
- package/dist/chunks/list-item.DqZuLQXc.js +222 -0
- package/dist/chunks/list-item.DqZuLQXc.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.yF6p9iQw.js → listbox-option-tag.DdWLEXEA.js} +2 -2
- package/dist/chunks/{listbox-option-tag.yF6p9iQw.js.map → listbox-option-tag.DdWLEXEA.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.CBxh_3gU.js → modal-fullscreen.T5PF8pWA.js} +4 -4
- package/dist/chunks/{modal-fullscreen.CBxh_3gU.js.map → modal-fullscreen.T5PF8pWA.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.C3xuswtY.js → modal.vue_vue_type_script_setup_true_lang.BOOZl25a.js} +4 -4
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.C3xuswtY.js.map → modal.vue_vue_type_script_setup_true_lang.BOOZl25a.js.map} +1 -1
- package/dist/chunks/{navigation-menu-group.CQ6ImGsJ.js → navigation-menu-group.CIV5BQJA.js} +3 -3
- package/dist/chunks/{navigation-menu-group.CQ6ImGsJ.js.map → navigation-menu-group.CIV5BQJA.js.map} +1 -1
- package/dist/chunks/{pagination.cNByWBP1.js → pagination.DX2mxVYn.js} +2 -2
- package/dist/chunks/{pagination.cNByWBP1.js.map → pagination.DX2mxVYn.js.map} +1 -1
- package/dist/chunks/popover.types.B92uj134.js +6 -0
- package/dist/chunks/{popover.types.DATOPtuh.js.map → popover.types.B92uj134.js.map} +1 -1
- package/dist/chunks/{popper-container.BH4WxeUj.js → popper-container.DRt5hgY8.js} +2 -2
- package/dist/chunks/{popper-container.BH4WxeUj.js.map → popper-container.DRt5hgY8.js.map} +1 -1
- package/dist/chunks/{promo-banner.DvV9eXs4.js → promo-banner.DICpj6e6.js} +2 -2
- package/dist/chunks/{promo-banner.DvV9eXs4.js.map → promo-banner.DICpj6e6.js.map} +1 -1
- package/dist/chunks/{radio-group.Cg67ZU0c.js → radio-group.DZkv4S3H.js} +3 -3
- package/dist/chunks/{radio-group.Cg67ZU0c.js.map → radio-group.DZkv4S3H.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.CJA_d518.js → rich-text-editor.D94Vaa4k.js} +4 -4
- package/dist/chunks/{rich-text-editor.CJA_d518.js.map → rich-text-editor.D94Vaa4k.js.map} +1 -1
- package/dist/chunks/{search-bar.CLjqWNaI.js → search-bar.f03s-Ljw.js} +3 -3
- package/dist/chunks/{search-bar.CLjqWNaI.js.map → search-bar.f03s-Ljw.js.map} +1 -1
- package/dist/chunks/{secondary-nav.BU47gyEO.js → secondary-nav.BQOLLVwy.js} +4 -4
- package/dist/chunks/{secondary-nav.BU47gyEO.js.map → secondary-nav.BQOLLVwy.js.map} +1 -1
- package/dist/chunks/{segmented-control.D6Yvxxpc.js → segmented-control.CDV9IQDC.js} +2 -2
- package/dist/chunks/{segmented-control.D6Yvxxpc.js.map → segmented-control.CDV9IQDC.js.map} +1 -1
- package/dist/chunks/{selection-card-group.C2Av3uyz.js → selection-card-group.Cvz-uxZ1.js} +11 -11
- package/dist/chunks/{selection-card-group.C2Av3uyz.js.map → selection-card-group.Cvz-uxZ1.js.map} +1 -1
- package/dist/chunks/{sidepanel.Dw2If3qM.js → sidepanel.DWgn0NNb.js} +5 -5
- package/dist/chunks/{sidepanel.Dw2If3qM.js.map → sidepanel.DWgn0NNb.js.map} +1 -1
- package/dist/chunks/{structured-list-item.BhYtSw2f.js → structured-list-item.RunfI9Pj.js} +4 -4
- package/dist/chunks/{structured-list-item.BhYtSw2f.js.map → structured-list-item.RunfI9Pj.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.Cnrc4ThJ.js → summary-grid.types.DiJtaVN-.js} +5 -5
- package/dist/chunks/{summary-grid.types.Cnrc4ThJ.js.map → summary-grid.types.DiJtaVN-.js.map} +1 -1
- package/dist/chunks/{tab.ByjWuWQz.js → tab.CnvwN1lS.js} +2 -2
- package/dist/chunks/{tab.ByjWuWQz.js.map → tab.CnvwN1lS.js.map} +1 -1
- package/dist/chunks/{tag.Uu-6AQys.js → tag.BDBpa51Z.js} +2 -2
- package/dist/chunks/{tag.Uu-6AQys.js.map → tag.BDBpa51Z.js.map} +1 -1
- package/dist/chunks/{textarea.QgSLPL7S.js → textarea.Cb6Fu5-u.js} +2 -2
- package/dist/chunks/{textarea.QgSLPL7S.js.map → textarea.Cb6Fu5-u.js.map} +1 -1
- package/dist/chunks/{timeline-item.BWhCoOf1.js → timeline-item.XpxLQwxK.js} +7 -7
- package/dist/chunks/{timeline-item.BWhCoOf1.js.map → timeline-item.XpxLQwxK.js.map} +1 -1
- package/dist/chunks/{tooltip.Djn54E1O.js → tooltip.DaO3Jkem.js} +3 -3
- package/dist/chunks/{tooltip.Djn54E1O.js.map → tooltip.DaO3Jkem.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.QWcInKo7.js → tutorial.vue_vue_type_script_setup_true_lang.DjvXPcvu.js} +4 -4
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.QWcInKo7.js.map → tutorial.vue_vue_type_script_setup_true_lang.DjvXPcvu.js.map} +1 -1
- package/dist/chunks/{use-bento-delayed-hover.Csc3nIWt.js → use-bento-delayed-hover.4NBNqVyw.js} +2 -2
- package/dist/chunks/{use-bento-delayed-hover.Csc3nIWt.js.map → use-bento-delayed-hover.4NBNqVyw.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.QXaVIBS0.js → use-date-input-formatter.S-t29v8i.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.QXaVIBS0.js.map → use-date-input-formatter.S-t29v8i.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/date-time-picker.js +4 -4
- package/dist/date.js +1 -1
- package/dist/draggable.js +4 -3
- package/dist/draggable.js.map +1 -1
- package/dist/drawer.js +1 -1
- package/dist/dropdown.js +2 -2
- 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 +260 -259
- package/dist/index.js.map +1 -1
- 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/input-time.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +11 -11
- package/dist/layout.js +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/navigation-menu.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover.js +2 -2
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.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/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 +1 -1
- package/package.json +7 -7
- package/dist/chunks/calendar.6NKd6IMo.js.map +0 -1
- package/dist/chunks/date.R2Wz6o7J.js.map +0 -1
- package/dist/chunks/draggable-handle.CUecl-HB.js +0 -1649
- package/dist/chunks/draggable-handle.CUecl-HB.js.map +0 -1
- package/dist/chunks/dropdown.C97ShfXZ.js.map +0 -1
- package/dist/chunks/filter-bar.D8BVPHLT.js.map +0 -1
- package/dist/chunks/header-meta.yBxBW12f.js +0 -243
- package/dist/chunks/list-item.E1o7yuEB.js +0 -128
- package/dist/chunks/list-item.E1o7yuEB.js.map +0 -1
- package/dist/chunks/popover.types.DATOPtuh.js +0 -6
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { computed as d, ref as
|
|
2
|
-
import { B as Ie, d as
|
|
1
|
+
import { computed as d, ref as w, onMounted as Vt, onUnmounted as zt, watch as Ce, defineComponent as Z, resolveComponent as K, openBlock as p, createElementBlock as E, createVNode as F, withCtx as k, createTextVNode as oe, toDisplayString as Y, createElementVNode as W, renderSlot as j, mergeProps as M, withKeys as me, createCommentVNode as J, createBlock as N, withModifiers as Le, normalizeProps as ce, guardReactiveProps as Se, withDirectives as ue, vShow as Ne, nextTick as ne, toRef as ae, resolveDirective as Ot, toHandlers as ie, Fragment as pe, renderList as le, createSlots as ve, normalizeClass as fe, unref as b, useSlots as Ge, useAttrs as dt, toRefs as Lt, resolveDynamicComponent as It, inject as ct } from "vue";
|
|
2
|
+
import { B as Ie, d as nt } from "./typography.B3J6_tYk.js";
|
|
3
3
|
import { g as Oe } from "./generate-uid.DBWe4g6T.js";
|
|
4
|
-
import { u as
|
|
4
|
+
import { u as Gt } from "./aria-label.CaUURpnB.js";
|
|
5
5
|
import { u as ke } from "./index.B875RXHM.js";
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { B as
|
|
10
|
-
import { B as H, a as
|
|
11
|
-
import { B as
|
|
12
|
-
import { B as
|
|
13
|
-
import { o as
|
|
14
|
-
import { C as
|
|
15
|
-
import { C as
|
|
6
|
+
import { u as Kt } from "./form-field.D_2g7vaP.js";
|
|
7
|
+
import { u as Ut } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
8
|
+
import { u as Tt } from "./use-has-slot.CyMiImRQ.js";
|
|
9
|
+
import { B as qt } from "./directive.D1-d-C2K.js";
|
|
10
|
+
import { B as H, a as ze } from "./keyboard-navigation.DWmhelVv.js";
|
|
11
|
+
import { B as Yt } from "./loading-indicator.BPol9I84.js";
|
|
12
|
+
import { B as Wt } from "./empty-state.DT4sFyjB.js";
|
|
13
|
+
import { o as jt } from "./resize.Bqks3WUm.js";
|
|
14
|
+
import { C as We, N as Ht } from "./minus-small.CnYLTuSv.js";
|
|
15
|
+
import { C as Jt } from "./checkmark-small.CRuZauJc.js";
|
|
16
16
|
/* empty css */
|
|
17
17
|
import { _ as ee } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
18
|
-
import { B as
|
|
19
|
-
import { C as
|
|
20
|
-
import { C as
|
|
21
|
-
import { a as
|
|
22
|
-
import { F as
|
|
23
|
-
import { P as
|
|
24
|
-
import { E as
|
|
25
|
-
import { C as
|
|
26
|
-
import { C as
|
|
27
|
-
import { s as
|
|
18
|
+
import { B as Xt } from "./chip.DFldnqfz.js";
|
|
19
|
+
import { C as At } from "./chevron-down.XeE-LBV_.js";
|
|
20
|
+
import { C as $t } from "./chevron-up.Cmgl2a3x.js";
|
|
21
|
+
import { a as Zt, b as ft, h as Qt, e as el } from "./button-actions.CgZbPzhi.js";
|
|
22
|
+
import { F as tl } from "./field-label.yQ_2Qg88.js";
|
|
23
|
+
import { P as mt } from "./popper-container.DRt5hgY8.js";
|
|
24
|
+
import { E as ll } from "./error-message.Dyvrw6ZB.js";
|
|
25
|
+
import { C as ol } from "./cross-circle-fill.BWCKKn0E.js";
|
|
26
|
+
import { C as al } from "./cross-circle-fill-small.H1wH-vcZ.js";
|
|
27
|
+
import { s as Re } from "./events.BQOQSSb7.js";
|
|
28
28
|
import "../assets/dropdown.css";
|
|
29
|
-
const
|
|
29
|
+
const wt = (e, l, n, o) => {
|
|
30
30
|
const a = d(
|
|
31
31
|
() => !!e.value?.length && e.value?.length === l.value.length
|
|
32
32
|
), s = d(() => e.value == null || e.value.length === 0 ? !1 : e.value?.length !== l.value.length);
|
|
@@ -38,73 +38,73 @@ const $t = (e, l, n, o) => {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
|
-
function
|
|
42
|
-
const s =
|
|
41
|
+
function sl(e, { disabled: l, itemHeight: n, overscan: o = 5, prefixHeight: a }) {
|
|
42
|
+
const s = w(null), t = w([]), i = w(0), h = w(0), c = w(0);
|
|
43
43
|
let u;
|
|
44
44
|
const r = d(() => {
|
|
45
|
-
const C = typeof n == "number" ? e.value.length * n : e.value.reduce((B,
|
|
45
|
+
const C = typeof n == "number" ? e.value.length * n : e.value.reduce((B, D, A) => B + n(A), 0), I = typeof n == "number" ? i.value * n : e.value.slice(0, i.value).reduce((B, D, A) => B + n(A), 0);
|
|
46
46
|
return {
|
|
47
47
|
style: {
|
|
48
|
-
marginTop: `${
|
|
49
|
-
height: `${C -
|
|
48
|
+
marginTop: `${I}px`,
|
|
49
|
+
height: `${C - I}px`
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
}),
|
|
53
|
-
const C = a?.value ?? 0,
|
|
52
|
+
}), f = () => {
|
|
53
|
+
const C = a?.value ?? 0, I = Math.max(s.value.scrollTop - C, 0);
|
|
54
54
|
if (typeof n == "number")
|
|
55
|
-
return Math.floor(
|
|
56
|
-
let B = 0,
|
|
57
|
-
for (let
|
|
58
|
-
const
|
|
59
|
-
if (B +=
|
|
60
|
-
|
|
55
|
+
return Math.floor(I / n);
|
|
56
|
+
let B = 0, D = 0;
|
|
57
|
+
for (let A = 0; A < e.value.length; A += 1) {
|
|
58
|
+
const P = n(A);
|
|
59
|
+
if (B += P, B >= I) {
|
|
60
|
+
D = A;
|
|
61
61
|
break;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
return
|
|
64
|
+
return D;
|
|
65
65
|
}, v = () => {
|
|
66
66
|
if (c.value = s.value.clientHeight, typeof n == "number")
|
|
67
67
|
return Math.ceil(c.value / n);
|
|
68
68
|
const C = i.value ?? 0;
|
|
69
|
-
let
|
|
70
|
-
for (let
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
69
|
+
let I = 0, B = 0;
|
|
70
|
+
for (let D = C; D < e.value.length; D += 1) {
|
|
71
|
+
const A = n(D);
|
|
72
|
+
if (I += A, B = D, I > c.value)
|
|
73
73
|
break;
|
|
74
74
|
}
|
|
75
75
|
return B - C;
|
|
76
|
-
},
|
|
76
|
+
}, L = () => {
|
|
77
77
|
if (s.value) {
|
|
78
78
|
const C = v();
|
|
79
|
-
i.value =
|
|
79
|
+
i.value = f(), h.value = Math.min(i.value + C + o, e.value.length), t.value = e.value.slice(i.value, h.value);
|
|
80
80
|
}
|
|
81
|
-
},
|
|
82
|
-
|
|
81
|
+
}, _ = () => {
|
|
82
|
+
L();
|
|
83
83
|
};
|
|
84
|
-
l || (
|
|
85
|
-
s.value && (c.value = s.value.clientHeight, u =
|
|
86
|
-
c.value = C,
|
|
87
|
-
}),
|
|
88
|
-
}),
|
|
84
|
+
l || (Vt(() => {
|
|
85
|
+
s.value && (c.value = s.value.clientHeight, u = jt(s.value, ({ clientHeight: C }) => {
|
|
86
|
+
c.value = C, L();
|
|
87
|
+
}), L());
|
|
88
|
+
}), zt(() => {
|
|
89
89
|
u?.disconnect();
|
|
90
|
-
}),
|
|
90
|
+
}), Ce(
|
|
91
91
|
() => e.value,
|
|
92
92
|
() => {
|
|
93
|
-
|
|
93
|
+
L();
|
|
94
94
|
}
|
|
95
95
|
));
|
|
96
|
-
const
|
|
96
|
+
const g = {
|
|
97
97
|
ref: s,
|
|
98
98
|
style: { overflowY: "auto" }
|
|
99
|
-
},
|
|
99
|
+
}, V = (C) => {
|
|
100
100
|
if (!s.value)
|
|
101
101
|
return;
|
|
102
|
-
const
|
|
103
|
-
|
|
102
|
+
const I = typeof n == "number" ? C * n : e.value.slice(0, C).reduce(($, z, G) => $ + n(G), 0), B = typeof n == "number" ? n : n(C), D = I + B, { scrollTop: A, clientHeight: P } = s.value, x = A + P;
|
|
103
|
+
D > x ? s.value.scrollTop = P > 0 ? D - P : I : I < A && (s.value.scrollTop = I), L();
|
|
104
104
|
};
|
|
105
105
|
return l ? {
|
|
106
106
|
containerRef: s,
|
|
107
|
-
containerProps:
|
|
107
|
+
containerProps: g,
|
|
108
108
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
109
109
|
onScroll: () => {
|
|
110
110
|
},
|
|
@@ -112,19 +112,19 @@ function al(e, { disabled: l, itemHeight: n, overscan: o = 5, prefixHeight: a })
|
|
|
112
112
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
113
113
|
scrollToIndex: () => {
|
|
114
114
|
},
|
|
115
|
-
startIndex:
|
|
115
|
+
startIndex: w(0)
|
|
116
116
|
} : {
|
|
117
117
|
containerRef: s,
|
|
118
|
-
containerProps:
|
|
119
|
-
onScroll:
|
|
118
|
+
containerProps: g,
|
|
119
|
+
onScroll: _,
|
|
120
120
|
list: t,
|
|
121
121
|
wrapperProps: r,
|
|
122
|
-
scrollToIndex:
|
|
122
|
+
scrollToIndex: V,
|
|
123
123
|
startIndex: i
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
var
|
|
127
|
-
const
|
|
126
|
+
var y = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more", e.ESCAPE = "escape-pressed", e.CLICK = "click", e.ENTER = "enter-pressed", e.SPACE = "space-pressed", e.TAB = "tab-pressed", e.CLOSE_DROPDOWN = "close-dropdown", e))(y || {}), Ee = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(Ee || {});
|
|
127
|
+
const nl = Z({
|
|
128
128
|
name: "bento-listbox-static-category",
|
|
129
129
|
components: {
|
|
130
130
|
BentoTypography: Ie
|
|
@@ -138,31 +138,31 @@ const sl = Z({
|
|
|
138
138
|
required: !0
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
}),
|
|
142
|
-
function
|
|
141
|
+
}), il = ["aria-label"];
|
|
142
|
+
function rl(e, l, n, o, a, s) {
|
|
143
143
|
const t = K("bento-typography");
|
|
144
144
|
return p(), E("div", {
|
|
145
145
|
class: "b-listbox-single-select-category",
|
|
146
146
|
role: "group",
|
|
147
147
|
"aria-label": e.categoryLabel
|
|
148
148
|
}, [
|
|
149
|
-
|
|
149
|
+
F(t, {
|
|
150
150
|
variant: "caption",
|
|
151
151
|
el: "span",
|
|
152
152
|
class: "b-listbox-single-select-category__label-text",
|
|
153
153
|
"aria-hidden": "true"
|
|
154
154
|
}, {
|
|
155
|
-
default:
|
|
156
|
-
oe(
|
|
155
|
+
default: k(() => [
|
|
156
|
+
oe(Y(e.categoryLabel), 1)
|
|
157
157
|
]),
|
|
158
158
|
_: 1
|
|
159
159
|
}),
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
W("div", null, [
|
|
161
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
162
162
|
])
|
|
163
|
-
], 8,
|
|
163
|
+
], 8, il);
|
|
164
164
|
}
|
|
165
|
-
const
|
|
165
|
+
const dl = /* @__PURE__ */ ee(nl, [["render", rl], ["__scopeId", "data-v-27c4e09a"]]), cl = Z({
|
|
166
166
|
name: "bento-listbox-option",
|
|
167
167
|
props: {
|
|
168
168
|
/**
|
|
@@ -174,7 +174,7 @@ const rl = /* @__PURE__ */ ee(sl, [["render", il], ["__scopeId", "data-v-27c4e09
|
|
|
174
174
|
*/
|
|
175
175
|
selected: { type: Boolean, default: !1 }
|
|
176
176
|
},
|
|
177
|
-
emits: [
|
|
177
|
+
emits: [y.CLICK, y.ENTER, y.SPACE, y.TAB],
|
|
178
178
|
setup(e, { emit: l }) {
|
|
179
179
|
const n = d(() => ({
|
|
180
180
|
"b-listbox-option--disabled": e.disabled,
|
|
@@ -183,12 +183,12 @@ const rl = /* @__PURE__ */ ee(sl, [["render", il], ["__scopeId", "data-v-27c4e09
|
|
|
183
183
|
return {
|
|
184
184
|
// Enums
|
|
185
185
|
BentoKeyboardNavigationKeyDownEvent: H,
|
|
186
|
-
BentoListboxEvent:
|
|
186
|
+
BentoListboxEvent: y,
|
|
187
187
|
// Values
|
|
188
188
|
conditionalClasses: n,
|
|
189
189
|
// Events
|
|
190
190
|
onClick: (s) => {
|
|
191
|
-
l(
|
|
191
|
+
l(y.CLICK, s);
|
|
192
192
|
},
|
|
193
193
|
onOptionSelected: (s, t) => {
|
|
194
194
|
l(s, t);
|
|
@@ -196,49 +196,49 @@ const rl = /* @__PURE__ */ ee(sl, [["render", il], ["__scopeId", "data-v-27c4e09
|
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
|
-
function
|
|
200
|
-
return p(), E("div",
|
|
199
|
+
function ul(e, l, n, o, a, s) {
|
|
200
|
+
return p(), E("div", M({
|
|
201
201
|
class: ["b-listbox-option", e.conditionalClasses],
|
|
202
202
|
role: "option"
|
|
203
203
|
}, e.$attrs, {
|
|
204
204
|
onClick: l[0] || (l[0] = (...t) => e.onClick && e.onClick(...t)),
|
|
205
205
|
onKeydown: [
|
|
206
|
-
l[1] || (l[1] =
|
|
207
|
-
l[2] || (l[2] =
|
|
208
|
-
l[3] || (l[3] =
|
|
206
|
+
l[1] || (l[1] = me((t) => e.onOptionSelected(e.BentoListboxEvent.ENTER, t), ["enter"])),
|
|
207
|
+
l[2] || (l[2] = me((t) => e.onOptionSelected(e.BentoListboxEvent.SPACE, t), ["space"])),
|
|
208
|
+
l[3] || (l[3] = me((t) => e.onOptionSelected(e.BentoListboxEvent.TAB, t), ["tab"]))
|
|
209
209
|
]
|
|
210
210
|
}), [
|
|
211
|
-
|
|
211
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
212
212
|
], 16);
|
|
213
213
|
}
|
|
214
|
-
const
|
|
215
|
-
let
|
|
216
|
-
const
|
|
214
|
+
const je = /* @__PURE__ */ ee(cl, [["render", ul], ["__scopeId", "data-v-1495b1db"]]);
|
|
215
|
+
let vt = 0;
|
|
216
|
+
const pl = {
|
|
217
217
|
beforeCreate() {
|
|
218
|
-
this.uuid =
|
|
218
|
+
this.uuid = vt.toString(), vt += 1;
|
|
219
219
|
}
|
|
220
|
-
},
|
|
221
|
-
function
|
|
222
|
-
return p(), E("svg",
|
|
220
|
+
}, bl = { key: 0 };
|
|
221
|
+
function fl(e, l, n, o, a, s) {
|
|
222
|
+
return p(), E("svg", M({ role: "img" }, e.$attrs, {
|
|
223
223
|
class: "ui-assets-icons-16",
|
|
224
224
|
xmlns: "http://www.w3.org/2000/svg",
|
|
225
225
|
width: "16",
|
|
226
226
|
height: "16",
|
|
227
227
|
fill: "none"
|
|
228
228
|
}), [
|
|
229
|
-
e.$attrs["svg-title"] ? (p(), E("title",
|
|
230
|
-
l[0] || (l[0] =
|
|
229
|
+
e.$attrs["svg-title"] ? (p(), E("title", bl, Y(e.$attrs["svg-title"]), 1)) : J("", !0),
|
|
230
|
+
l[0] || (l[0] = W("path", {
|
|
231
231
|
fill: "#001222",
|
|
232
232
|
d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z"
|
|
233
233
|
}, null, -1))
|
|
234
234
|
], 16);
|
|
235
235
|
}
|
|
236
|
-
const
|
|
236
|
+
const ml = /* @__PURE__ */ ee(pl, [["render", fl]]), vl = Z({
|
|
237
237
|
name: "bento-listbox-single-select-option",
|
|
238
238
|
components: {
|
|
239
|
-
BentoListboxOption:
|
|
239
|
+
BentoListboxOption: je,
|
|
240
240
|
BentoTypography: Ie,
|
|
241
|
-
CheckmarkIcon:
|
|
241
|
+
CheckmarkIcon: ml
|
|
242
242
|
},
|
|
243
243
|
props: {
|
|
244
244
|
/**
|
|
@@ -258,7 +258,7 @@ const fl = /* @__PURE__ */ ee(ul, [["render", bl]]), ml = Z({
|
|
|
258
258
|
*/
|
|
259
259
|
selected: { type: Boolean, default: !1 }
|
|
260
260
|
},
|
|
261
|
-
emits: [
|
|
261
|
+
emits: [y.ENTER, y.SELECT, y.SPACE, y.TAB],
|
|
262
262
|
setup(e, { emit: l }) {
|
|
263
263
|
const n = (t) => {
|
|
264
264
|
e.disabled || l(t, e.option);
|
|
@@ -269,15 +269,15 @@ const fl = /* @__PURE__ */ ee(ul, [["render", bl]]), ml = Z({
|
|
|
269
269
|
ariaSelected: a,
|
|
270
270
|
tabIndex: s,
|
|
271
271
|
// Enums
|
|
272
|
-
BentoListboxEvent:
|
|
272
|
+
BentoListboxEvent: y,
|
|
273
273
|
// Events
|
|
274
274
|
onOptionSelected: n
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
}),
|
|
278
|
-
function
|
|
279
|
-
const t = K("bento-typography"), i = K("checkmark-icon"),
|
|
280
|
-
return p(), N(
|
|
277
|
+
}), yl = { class: "b-listbox-single-select-option__text" }, gl = { class: "b-listbox-single-select-option__check-icon" };
|
|
278
|
+
function hl(e, l, n, o, a, s) {
|
|
279
|
+
const t = K("bento-typography"), i = K("checkmark-icon"), h = K("bento-listbox-option");
|
|
280
|
+
return p(), N(h, {
|
|
281
281
|
class: "b-listbox-single-select-option",
|
|
282
282
|
disabled: e.disabled,
|
|
283
283
|
selected: e.selected,
|
|
@@ -289,12 +289,12 @@ function gl(e, l, n, o, a, s) {
|
|
|
289
289
|
onSpacePressed: l[2] || (l[2] = Le((c) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
|
|
290
290
|
onTabPressed: l[3] || (l[3] = (c) => e.onOptionSelected(e.BentoListboxEvent.TAB))
|
|
291
291
|
}, {
|
|
292
|
-
default:
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
default:
|
|
297
|
-
oe(
|
|
292
|
+
default: k(() => [
|
|
293
|
+
j(e.$slots, "default", ce(Se(e.option)), () => [
|
|
294
|
+
W("span", yl, [
|
|
295
|
+
F(t, { el: "span" }, {
|
|
296
|
+
default: k(() => [
|
|
297
|
+
oe(Y(e.option.label), 1)
|
|
298
298
|
]),
|
|
299
299
|
_: 1
|
|
300
300
|
}),
|
|
@@ -303,24 +303,24 @@ function gl(e, l, n, o, a, s) {
|
|
|
303
303
|
class: "b-listbox-single-select-option__description",
|
|
304
304
|
el: "span"
|
|
305
305
|
}, {
|
|
306
|
-
default:
|
|
307
|
-
oe(
|
|
306
|
+
default: k(() => [
|
|
307
|
+
oe(Y(e.option.description), 1)
|
|
308
308
|
]),
|
|
309
309
|
_: 1
|
|
310
310
|
})) : J("", !0)
|
|
311
311
|
])
|
|
312
312
|
], !0),
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
[
|
|
313
|
+
W("span", gl, [
|
|
314
|
+
ue(F(i, { "svg-title": "selected" }, null, 512), [
|
|
315
|
+
[Ne, e.selected]
|
|
316
316
|
])
|
|
317
317
|
])
|
|
318
318
|
]),
|
|
319
319
|
_: 3
|
|
320
320
|
}, 8, ["disabled", "selected", "aria-selected", "aria-disabled", "tabindex"]);
|
|
321
321
|
}
|
|
322
|
-
const
|
|
323
|
-
const o = d(() => l?.value ? l.value - 1 : e.value.length - 1), a =
|
|
322
|
+
const Sl = /* @__PURE__ */ ee(vl, [["render", hl], ["__scopeId", "data-v-4f41af07"]]), kt = ({ items: e, totalItemCount: l }, n) => {
|
|
323
|
+
const o = d(() => l?.value ? l.value - 1 : e.value.length - 1), a = w(0), s = (v) => {
|
|
324
324
|
switch (v) {
|
|
325
325
|
case "increase":
|
|
326
326
|
a.value += 1;
|
|
@@ -329,18 +329,18 @@ const hl = /* @__PURE__ */ ee(ml, [["render", gl], ["__scopeId", "data-v-4f41af0
|
|
|
329
329
|
a.value -= 1;
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
|
-
}, t = ({ edgeCaseItem: v },
|
|
333
|
-
a.value !== v && (s(
|
|
332
|
+
}, t = ({ edgeCaseItem: v }, L) => {
|
|
333
|
+
a.value !== v && (s(L), n(a.value));
|
|
334
334
|
}, i = (v) => {
|
|
335
|
-
|
|
335
|
+
f(v), t(
|
|
336
336
|
{
|
|
337
337
|
edgeCaseItem: o.value
|
|
338
338
|
},
|
|
339
339
|
"increase"
|
|
340
340
|
/* INCREASE */
|
|
341
341
|
);
|
|
342
|
-
},
|
|
343
|
-
|
|
342
|
+
}, h = (v) => {
|
|
343
|
+
f(v), t(
|
|
344
344
|
{
|
|
345
345
|
edgeCaseItem: 0
|
|
346
346
|
},
|
|
@@ -353,29 +353,29 @@ const hl = /* @__PURE__ */ ee(ml, [["render", gl], ["__scopeId", "data-v-4f41af0
|
|
|
353
353
|
a.value = o.value, n(a.value);
|
|
354
354
|
}, r = (v) => {
|
|
355
355
|
a.value = v;
|
|
356
|
-
},
|
|
356
|
+
}, f = (v) => {
|
|
357
357
|
v?.detail?.preventDefault();
|
|
358
358
|
};
|
|
359
359
|
return {
|
|
360
360
|
moveToFirstElement: c,
|
|
361
361
|
moveToLastElement: u,
|
|
362
362
|
moveToNextElement: i,
|
|
363
|
-
moveToPreviousElement:
|
|
363
|
+
moveToPreviousElement: h,
|
|
364
364
|
setListboxFocusedIndex: r,
|
|
365
|
-
preventDefault:
|
|
365
|
+
preventDefault: f,
|
|
366
366
|
focusedIndex: a
|
|
367
367
|
};
|
|
368
|
-
},
|
|
369
|
-
const a =
|
|
368
|
+
}, ut = (e, l, n = w("option"), o = !0) => {
|
|
369
|
+
const a = w([]), s = async () => {
|
|
370
370
|
if (!e.value || e.value.nodeType === Node.COMMENT_NODE)
|
|
371
371
|
return;
|
|
372
372
|
const t = Array.from(e.value.querySelectorAll(`[role="${n.value}"]`));
|
|
373
373
|
a.value = o ? t.filter((i) => i.checkVisibility()) : t;
|
|
374
374
|
};
|
|
375
|
-
return
|
|
375
|
+
return Ce(
|
|
376
376
|
l,
|
|
377
377
|
() => {
|
|
378
|
-
|
|
378
|
+
ne(() => {
|
|
379
379
|
s();
|
|
380
380
|
});
|
|
381
381
|
},
|
|
@@ -384,13 +384,13 @@ const hl = /* @__PURE__ */ ee(ml, [["render", gl], ["__scopeId", "data-v-4f41af0
|
|
|
384
384
|
visibleDomOptions: a,
|
|
385
385
|
updateVisibleDomOptions: s
|
|
386
386
|
};
|
|
387
|
-
},
|
|
387
|
+
}, Cl = Z({
|
|
388
388
|
name: "bento-listbox-single-select",
|
|
389
389
|
components: {
|
|
390
|
-
BentoListboxSingleSelectCategory:
|
|
391
|
-
BentoListboxSingleSelectOption:
|
|
390
|
+
BentoListboxSingleSelectCategory: dl,
|
|
391
|
+
BentoListboxSingleSelectOption: Sl
|
|
392
392
|
},
|
|
393
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
393
|
+
directives: { BentoKeyboardNavigationDirective: ze },
|
|
394
394
|
inheritAttrs: !1,
|
|
395
395
|
props: {
|
|
396
396
|
/**
|
|
@@ -444,64 +444,66 @@ const hl = /* @__PURE__ */ ee(ml, [["render", gl], ["__scopeId", "data-v-4f41af0
|
|
|
444
444
|
*/
|
|
445
445
|
virtualScrollStartIndex: { type: Number, default: 0 }
|
|
446
446
|
},
|
|
447
|
-
emits: [
|
|
447
|
+
emits: [y.SELECT, y.ENTER, y.SPACE, y.TAB],
|
|
448
448
|
setup(e, { emit: l, expose: n, slots: o, attrs: a }) {
|
|
449
|
-
const s =
|
|
449
|
+
const s = w(null), t = w([]), i = d(() => !!e.selectedValue?.length && e.selectedValue.at(0)), h = d(
|
|
450
450
|
() => ({
|
|
451
451
|
"aria-label": a["aria-label"]?.toString(),
|
|
452
452
|
"aria-busy": a["aria-busy"]?.toString(),
|
|
453
453
|
"aria-atomic": a["aria-atomic"]?.toString(),
|
|
454
454
|
"aria-live": a["aria-live"]?.toString()
|
|
455
455
|
})
|
|
456
|
-
), c = d(() => !!e.items.some(({ items:
|
|
457
|
-
l(
|
|
458
|
-
}, { visibleDomOptions: r, updateVisibleDomOptions:
|
|
456
|
+
), c = d(() => !!e.items.some(({ items: $ }) => !!$)), u = ($) => (z) => {
|
|
457
|
+
l($, [z]);
|
|
458
|
+
}, { visibleDomOptions: r, updateVisibleDomOptions: f } = ut(
|
|
459
459
|
s,
|
|
460
460
|
ae(e, "items"),
|
|
461
|
-
|
|
461
|
+
w("option"),
|
|
462
462
|
!1
|
|
463
|
-
), v = d(() => e.totalItemCount > 0),
|
|
463
|
+
), v = d(() => e.totalItemCount > 0), L = ($) => {
|
|
464
464
|
if (!v.value)
|
|
465
465
|
return;
|
|
466
|
-
const
|
|
467
|
-
if (
|
|
466
|
+
const z = $.target;
|
|
467
|
+
if (z === s.value || z?.getAttribute("role") !== "option")
|
|
468
468
|
return;
|
|
469
|
-
const
|
|
470
|
-
if (
|
|
471
|
-
const
|
|
472
|
-
|
|
469
|
+
const G = r.value.indexOf(z);
|
|
470
|
+
if (G !== -1) {
|
|
471
|
+
const R = G + e.virtualScrollStartIndex;
|
|
472
|
+
A(R);
|
|
473
473
|
}
|
|
474
|
-
},
|
|
474
|
+
}, _ = async ($) => {
|
|
475
475
|
if (v.value && e.scrollToIndex) {
|
|
476
|
-
e.scrollToIndex(
|
|
477
|
-
const
|
|
478
|
-
r.value[
|
|
476
|
+
e.scrollToIndex($), await ne(), await f();
|
|
477
|
+
const z = $ - e.virtualScrollStartIndex;
|
|
478
|
+
r.value[z]?.focus();
|
|
479
479
|
} else
|
|
480
|
-
r.value[
|
|
481
|
-
},
|
|
482
|
-
|
|
480
|
+
r.value[$]?.focus();
|
|
481
|
+
}, g = async ($) => {
|
|
482
|
+
A($), await _($);
|
|
483
|
+
}, V = async ($) => {
|
|
484
|
+
await f(), v.value && e.scrollToIndex ? e.scrollToIndex($) : r.value[$]?.scrollIntoView?.({ block: "nearest" });
|
|
483
485
|
}, {
|
|
484
|
-
moveToNextElement:
|
|
485
|
-
moveToPreviousElement:
|
|
486
|
-
moveToFirstElement:
|
|
487
|
-
moveToLastElement:
|
|
488
|
-
setListboxFocusedIndex:
|
|
486
|
+
moveToNextElement: C,
|
|
487
|
+
moveToPreviousElement: I,
|
|
488
|
+
moveToFirstElement: B,
|
|
489
|
+
moveToLastElement: D,
|
|
490
|
+
setListboxFocusedIndex: A
|
|
489
491
|
} = kt(
|
|
490
492
|
{
|
|
491
493
|
items: r,
|
|
492
494
|
totalItemCount: ae(e, "totalItemCount")
|
|
493
495
|
},
|
|
494
|
-
|
|
495
|
-
),
|
|
496
|
-
[H.ARROW_UP]:
|
|
497
|
-
[H.ARROW_DOWN]:
|
|
498
|
-
[H.HOME]:
|
|
499
|
-
[H.END]:
|
|
500
|
-
},
|
|
501
|
-
[
|
|
502
|
-
[
|
|
503
|
-
[
|
|
504
|
-
[
|
|
496
|
+
_
|
|
497
|
+
), P = {
|
|
498
|
+
[H.ARROW_UP]: I,
|
|
499
|
+
[H.ARROW_DOWN]: C,
|
|
500
|
+
[H.HOME]: B,
|
|
501
|
+
[H.END]: D
|
|
502
|
+
}, x = {
|
|
503
|
+
[y.SELECT]: u(y.SELECT),
|
|
504
|
+
[y.SPACE]: u(y.SPACE),
|
|
505
|
+
[y.TAB]: u(y.TAB),
|
|
506
|
+
[y.ENTER]: u(y.ENTER)
|
|
505
507
|
};
|
|
506
508
|
return n({
|
|
507
509
|
/**
|
|
@@ -513,45 +515,50 @@ const hl = /* @__PURE__ */ ee(ml, [["render", gl], ["__scopeId", "data-v-4f41af0
|
|
|
513
515
|
* Method to set the index of the item to be focused on
|
|
514
516
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
515
517
|
*/
|
|
516
|
-
setListboxFocusedIndex:
|
|
518
|
+
setListboxFocusedIndex: A,
|
|
517
519
|
/**
|
|
518
520
|
* Navigates to an item by global index, handling virtual scroll if enabled.
|
|
519
521
|
* Scrolls the virtual list and focuses the item.
|
|
520
522
|
*/
|
|
521
|
-
navigateToItem:
|
|
523
|
+
navigateToItem: g,
|
|
524
|
+
/**
|
|
525
|
+
* Scrolls to an item by global index without changing focus.
|
|
526
|
+
* Used when the dropdown opens via click to bring the selected option into view.
|
|
527
|
+
*/
|
|
528
|
+
scrollToItem: V
|
|
522
529
|
}), {
|
|
523
530
|
// Enums
|
|
524
|
-
BentoListboxEvent:
|
|
531
|
+
BentoListboxEvent: y,
|
|
525
532
|
// Values
|
|
526
533
|
listboxRef: s,
|
|
527
534
|
listboxItemRef: t,
|
|
528
535
|
selectedItem: i,
|
|
529
536
|
slots: o,
|
|
530
|
-
ariaAttributes:
|
|
537
|
+
ariaAttributes: h,
|
|
531
538
|
// Computed
|
|
532
539
|
hasCategories: c,
|
|
533
540
|
// Methods
|
|
534
541
|
onOptionSelected: u,
|
|
535
542
|
// Keyboard navigation
|
|
536
|
-
listboxListeners:
|
|
537
|
-
listboxOptionListeners:
|
|
543
|
+
listboxListeners: P,
|
|
544
|
+
listboxOptionListeners: x,
|
|
538
545
|
// Virtual scroll focus management
|
|
539
|
-
handleVirtualScrollingFocus:
|
|
546
|
+
handleVirtualScrollingFocus: L
|
|
540
547
|
};
|
|
541
548
|
}
|
|
542
549
|
});
|
|
543
|
-
function
|
|
544
|
-
const t = K("bento-listbox-single-select-option"), i = K("bento-listbox-single-select-category"),
|
|
545
|
-
return
|
|
550
|
+
function El(e, l, n, o, a, s) {
|
|
551
|
+
const t = K("bento-listbox-single-select-option"), i = K("bento-listbox-single-select-category"), h = Ot("bento-keyboard-navigation-directive");
|
|
552
|
+
return ue((p(), E("div", M({ ref: "listboxRef" }, e.ariaAttributes, { role: "listbox" }, ie(e.listboxListeners, !0), {
|
|
546
553
|
onFocusin: l[0] || (l[0] = (...c) => e.handleVirtualScrollingFocus && e.handleVirtualScrollingFocus(...c))
|
|
547
554
|
}), [
|
|
548
|
-
e.hasCategories && e.staticCategories ? (p(!0), E(
|
|
555
|
+
e.hasCategories && e.staticCategories ? (p(!0), E(pe, { key: 0 }, le(e.items, (c) => (p(), E(pe, null, [
|
|
549
556
|
c.items && c.items.length > 0 ? (p(), N(i, {
|
|
550
557
|
key: `category-${c.value}`,
|
|
551
558
|
"category-label": c.label
|
|
552
559
|
}, {
|
|
553
|
-
default:
|
|
554
|
-
(p(!0), E(
|
|
560
|
+
default: k(() => [
|
|
561
|
+
(p(!0), E(pe, null, le(c.items, (u) => (p(), N(t, M({
|
|
555
562
|
key: u.value,
|
|
556
563
|
ref_for: !0,
|
|
557
564
|
ref: "listboxItemRef",
|
|
@@ -559,17 +566,17 @@ function Cl(e, l, n, o, a, s) {
|
|
|
559
566
|
option: u,
|
|
560
567
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(u) : null,
|
|
561
568
|
selected: u.value === e.selectedItem.value
|
|
562
|
-
},
|
|
563
|
-
le(e.slots, (r,
|
|
564
|
-
name:
|
|
565
|
-
fn:
|
|
566
|
-
|
|
569
|
+
}, ie(e.listboxOptionListeners)), ve({ _: 2 }, [
|
|
570
|
+
le(e.slots, (r, f) => ({
|
|
571
|
+
name: f,
|
|
572
|
+
fn: k((v) => [
|
|
573
|
+
j(e.$slots, f, M({ ref_for: !0 }, v))
|
|
567
574
|
])
|
|
568
575
|
}))
|
|
569
576
|
]), 1040, ["option", "disabled", "selected"]))), 128))
|
|
570
577
|
]),
|
|
571
578
|
_: 2
|
|
572
|
-
}, 1032, ["category-label"])) : (p(), N(t,
|
|
579
|
+
}, 1032, ["category-label"])) : (p(), N(t, M({
|
|
573
580
|
key: `option-${c.value}`,
|
|
574
581
|
ref_for: !0,
|
|
575
582
|
ref: "listboxItemRef",
|
|
@@ -577,15 +584,15 @@ function Cl(e, l, n, o, a, s) {
|
|
|
577
584
|
option: c,
|
|
578
585
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(c) : null,
|
|
579
586
|
selected: c.value === e.selectedItem.value
|
|
580
|
-
},
|
|
587
|
+
}, ie(e.listboxOptionListeners)), ve({ _: 2 }, [
|
|
581
588
|
le(e.slots, (u, r) => ({
|
|
582
589
|
name: r,
|
|
583
|
-
fn:
|
|
584
|
-
|
|
590
|
+
fn: k((f) => [
|
|
591
|
+
j(e.$slots, r, M({ ref_for: !0 }, f))
|
|
585
592
|
])
|
|
586
593
|
}))
|
|
587
594
|
]), 1040, ["option", "disabled", "selected"]))
|
|
588
|
-
], 64))), 256)) : (p(!0), E(
|
|
595
|
+
], 64))), 256)) : (p(!0), E(pe, { key: 1 }, le(e.items, (c) => (p(), N(t, M({
|
|
589
596
|
key: c.value,
|
|
590
597
|
ref_for: !0,
|
|
591
598
|
ref: "listboxItemRef",
|
|
@@ -593,46 +600,46 @@ function Cl(e, l, n, o, a, s) {
|
|
|
593
600
|
option: c,
|
|
594
601
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(c) : null,
|
|
595
602
|
selected: c.value === e.selectedItem.value
|
|
596
|
-
},
|
|
603
|
+
}, ie(e.listboxOptionListeners)), ve({ _: 2 }, [
|
|
597
604
|
le(e.slots, (u, r) => ({
|
|
598
605
|
name: r,
|
|
599
|
-
fn:
|
|
600
|
-
|
|
606
|
+
fn: k((f) => [
|
|
607
|
+
j(e.$slots, r, M({ ref_for: !0 }, f))
|
|
601
608
|
])
|
|
602
609
|
}))
|
|
603
610
|
]), 1040, ["option", "disabled", "selected"]))), 128))
|
|
604
611
|
], 16)), [
|
|
605
|
-
[
|
|
612
|
+
[h]
|
|
606
613
|
]);
|
|
607
614
|
}
|
|
608
|
-
const
|
|
609
|
-
let
|
|
610
|
-
const
|
|
615
|
+
const Ol = /* @__PURE__ */ ee(Cl, [["render", El]]);
|
|
616
|
+
let yt = 0;
|
|
617
|
+
const Ll = {
|
|
611
618
|
beforeCreate() {
|
|
612
|
-
this.uuid =
|
|
619
|
+
this.uuid = yt.toString(), yt += 1;
|
|
613
620
|
}
|
|
614
|
-
},
|
|
615
|
-
function
|
|
616
|
-
return p(), E("svg",
|
|
621
|
+
}, Il = { key: 0 };
|
|
622
|
+
function Tl(e, l, n, o, a, s) {
|
|
623
|
+
return p(), E("svg", M({ role: "img" }, e.$attrs, {
|
|
617
624
|
class: "ui-assets-icons-16",
|
|
618
625
|
xmlns: "http://www.w3.org/2000/svg",
|
|
619
626
|
width: "16",
|
|
620
627
|
height: "16",
|
|
621
628
|
fill: "none"
|
|
622
629
|
}), [
|
|
623
|
-
e.$attrs["svg-title"] ? (p(), E("title",
|
|
624
|
-
l[0] || (l[0] =
|
|
630
|
+
e.$attrs["svg-title"] ? (p(), E("title", Il, Y(e.$attrs["svg-title"]), 1)) : J("", !0),
|
|
631
|
+
l[0] || (l[0] = W("path", {
|
|
625
632
|
fill: "#001222",
|
|
626
633
|
d: "M9.69043 5.75L4.62988 10.8105L1.56934 7.75L2.62988 6.68945L4.62988 8.68945L8.62988 4.68945L9.69043 5.75Z"
|
|
627
634
|
}, null, -1)),
|
|
628
|
-
l[1] || (l[1] =
|
|
635
|
+
l[1] || (l[1] = W("path", {
|
|
629
636
|
fill: "#001222",
|
|
630
637
|
d: "M13.9307 5.75L8.87012 10.8105L7.80957 9.75L12.8701 4.68945L13.9307 5.75Z"
|
|
631
638
|
}, null, -1))
|
|
632
639
|
], 16);
|
|
633
640
|
}
|
|
634
|
-
const
|
|
635
|
-
|
|
641
|
+
const Al = /* @__PURE__ */ ee(Ll, [["render", Tl]]), $l = {}, wl = /* @__PURE__ */ Z({
|
|
642
|
+
...$l,
|
|
636
643
|
__name: "decorative-checkbox",
|
|
637
644
|
props: {
|
|
638
645
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -642,41 +649,41 @@ const Tl = /* @__PURE__ */ ee(Ol, [["render", Il]]), Al = {}, $l = /* @__PURE__
|
|
|
642
649
|
},
|
|
643
650
|
setup(e) {
|
|
644
651
|
const l = e, n = d(() => ({
|
|
645
|
-
[`b-checkbox-input--${
|
|
652
|
+
[`b-checkbox-input--${We.DISABLED}`]: l.disabled
|
|
646
653
|
})), o = d(() => ({
|
|
647
|
-
[`b-checkbox-input__outline--${
|
|
648
|
-
[`b-checkbox-input__outline--${
|
|
649
|
-
[`b-checkbox-input__outline--${
|
|
654
|
+
[`b-checkbox-input__outline--${We.UNCHECKED}`]: !l.checked && !l.indeterminate && !l.allSelected,
|
|
655
|
+
[`b-checkbox-input__outline--${We.CHECKED}`]: (l.checked || l.allSelected) && !l.indeterminate,
|
|
656
|
+
[`b-checkbox-input__outline--${We.INDETERMINATE}`]: l.indeterminate
|
|
650
657
|
}));
|
|
651
658
|
return (a, s) => (p(), E("div", {
|
|
652
|
-
class:
|
|
659
|
+
class: fe(["b-checkbox-input", n.value]),
|
|
653
660
|
role: "presentation"
|
|
654
661
|
}, [
|
|
655
|
-
a.indeterminate ? (p(), N(b(
|
|
662
|
+
a.indeterminate ? (p(), N(b(Ht), {
|
|
656
663
|
key: 0,
|
|
657
664
|
class: "b-checkbox-input__icon",
|
|
658
665
|
"svg-title": "",
|
|
659
666
|
"aria-hidden": "true"
|
|
660
|
-
})) : a.allSelected ? (p(), N(b(
|
|
667
|
+
})) : a.allSelected ? (p(), N(b(Al), {
|
|
661
668
|
key: 1,
|
|
662
669
|
class: "b-checkbox-input__icon",
|
|
663
670
|
"svg-title": "",
|
|
664
671
|
"aria-hidden": "true",
|
|
665
672
|
"data-testid": "decorative-checkbox-double-checkmark-icon"
|
|
666
|
-
})) : a.checked ? (p(), N(b(
|
|
673
|
+
})) : a.checked ? (p(), N(b(Jt), {
|
|
667
674
|
key: 2,
|
|
668
675
|
class: "b-checkbox-input__icon",
|
|
669
676
|
"svg-title": "",
|
|
670
677
|
"aria-hidden": "true"
|
|
671
678
|
})) : J("", !0),
|
|
672
|
-
|
|
673
|
-
class:
|
|
679
|
+
W("div", {
|
|
680
|
+
class: fe(["b-checkbox-input__outline", o.value])
|
|
674
681
|
}, null, 2)
|
|
675
682
|
], 2));
|
|
676
683
|
}
|
|
677
|
-
}),
|
|
678
|
-
var
|
|
679
|
-
const
|
|
684
|
+
}), pt = /* @__PURE__ */ ee(wl, [["__scopeId", "data-v-08d3142e"]]);
|
|
685
|
+
var _t = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(_t || {}), we = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(we || {});
|
|
686
|
+
const gt = {
|
|
680
687
|
"de-DE": { categoryClosed: "{category} geschlossen", categoryOpened: "{category} geöffnet" },
|
|
681
688
|
"en-GB": { categoryClosed: "{category} closed", categoryOpened: "{category} opened" },
|
|
682
689
|
"en-US": { categoryClosed: "{category} closed", categoryOpened: "{category} opened" },
|
|
@@ -688,14 +695,14 @@ const yt = {
|
|
|
688
695
|
"pt-BR": { categoryClosed: "{category} fechada", categoryOpened: "{categoria} aberta" },
|
|
689
696
|
"zh-CN": { categoryClosed: "{category} 已关闭", categoryOpened: "{category} 已打开" }
|
|
690
697
|
}, kl = Z({
|
|
691
|
-
i18n: { messages:
|
|
698
|
+
i18n: { messages: gt },
|
|
692
699
|
name: "bento-listbox-multi-select-category",
|
|
693
700
|
components: {
|
|
694
701
|
BentoTypography: Ie,
|
|
695
|
-
BentoListboxOption:
|
|
696
|
-
ChevronDownIcon:
|
|
697
|
-
ChevronUpIcon:
|
|
698
|
-
DecorativeCheckbox:
|
|
702
|
+
BentoListboxOption: je,
|
|
703
|
+
ChevronDownIcon: At,
|
|
704
|
+
ChevronUpIcon: $t,
|
|
705
|
+
DecorativeCheckbox: pt
|
|
699
706
|
},
|
|
700
707
|
props: {
|
|
701
708
|
/**
|
|
@@ -741,90 +748,90 @@ const yt = {
|
|
|
741
748
|
tabindex: { type: Number, default: -1 }
|
|
742
749
|
},
|
|
743
750
|
emits: [
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
751
|
+
we.SELECT_CATEGORY,
|
|
752
|
+
we.UNSELECT_CATEGORY,
|
|
753
|
+
we.TOGGLE_CATEGORY_VISIBILITY
|
|
747
754
|
],
|
|
748
755
|
setup(e, { emit: l }) {
|
|
749
|
-
const n =
|
|
750
|
-
() => e.category.items.every((
|
|
751
|
-
),
|
|
752
|
-
[`b-listbox-multi-select-category--${
|
|
753
|
-
})), r = (
|
|
754
|
-
|
|
755
|
-
},
|
|
756
|
-
const
|
|
757
|
-
return { isDisabled:
|
|
756
|
+
const n = w(!1), { t: o } = ke({ messages: gt }), a = Oe("category-group"), s = Oe("category-name"), t = (x) => e.isOptionDisabled ? e.isOptionDisabled(x) : !1, i = d(
|
|
757
|
+
() => e.category.items.every((x) => t(x))
|
|
758
|
+
), h = ae(e, "staticCategories"), c = d(() => n.value || e.staticCategories), u = d(() => ({
|
|
759
|
+
[`b-listbox-multi-select-category--${_t.DISABLED}`]: i.value
|
|
760
|
+
})), r = (x, $) => {
|
|
761
|
+
x.preventDefault(), n.value = $ !== void 0 ? $ : !n.value, l(we.TOGGLE_CATEGORY_VISIBILITY, e.category.value);
|
|
762
|
+
}, f = (x) => {
|
|
763
|
+
const $ = t(x), z = e.selectedItemsList?.includes(x.value) || !1;
|
|
764
|
+
return { isDisabled: $, isPreSelected: z };
|
|
758
765
|
}, v = d(
|
|
759
|
-
() => e.category.items.filter((
|
|
760
|
-
const { isDisabled:
|
|
761
|
-
return
|
|
766
|
+
() => e.category.items.filter((x) => {
|
|
767
|
+
const { isDisabled: $, isPreSelected: z } = f(x);
|
|
768
|
+
return $ && z || !$;
|
|
762
769
|
})
|
|
763
|
-
),
|
|
770
|
+
), L = d(
|
|
764
771
|
() => v.value?.filter(
|
|
765
|
-
({ value:
|
|
772
|
+
({ value: x }) => e.selectedItemsList?.includes(x)
|
|
766
773
|
)
|
|
767
|
-
),
|
|
768
|
-
const
|
|
769
|
-
return o(
|
|
770
|
-
}),
|
|
771
|
-
l(
|
|
772
|
-
},
|
|
773
|
-
l(
|
|
774
|
-
}, { isAllSelected: C, isIndeterminate:
|
|
775
|
-
|
|
774
|
+
), _ = d(() => {
|
|
775
|
+
const x = n.value ? "categoryOpened" : "categoryClosed";
|
|
776
|
+
return o(x, { category: e.category.label });
|
|
777
|
+
}), g = () => {
|
|
778
|
+
l(we.SELECT_CATEGORY);
|
|
779
|
+
}, V = () => {
|
|
780
|
+
l(we.UNSELECT_CATEGORY);
|
|
781
|
+
}, { isAllSelected: C, isIndeterminate: I, toggleSelectAll: B } = wt(
|
|
782
|
+
L,
|
|
776
783
|
v,
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
),
|
|
780
|
-
|
|
784
|
+
g,
|
|
785
|
+
V
|
|
786
|
+
), D = d(() => I.value ? "mixed" : `${C.value}`), A = w(C.value), P = () => {
|
|
787
|
+
A.value = !A.value, B(A.value);
|
|
781
788
|
};
|
|
782
|
-
return
|
|
783
|
-
|
|
789
|
+
return Ce(C, () => {
|
|
790
|
+
A.value = C.value;
|
|
784
791
|
}), {
|
|
785
792
|
// Values
|
|
786
|
-
chevronTitle:
|
|
793
|
+
chevronTitle: _,
|
|
787
794
|
conditionalClass: u,
|
|
788
795
|
hasAllPropsDisabled: i,
|
|
789
796
|
isOpen: n,
|
|
790
797
|
isAllSelected: C,
|
|
791
|
-
isIndeterminate:
|
|
792
|
-
isStaticCategory:
|
|
798
|
+
isIndeterminate: I,
|
|
799
|
+
isStaticCategory: h,
|
|
793
800
|
categoryGroupId: a,
|
|
794
801
|
categoryNameId: s,
|
|
795
802
|
// Computed
|
|
796
803
|
showItemChildren: c,
|
|
797
|
-
ariaCheckedComputed:
|
|
804
|
+
ariaCheckedComputed: D,
|
|
798
805
|
// Methods
|
|
799
|
-
handleSelectAll:
|
|
806
|
+
handleSelectAll: P,
|
|
800
807
|
toggleOpen: r,
|
|
801
808
|
toggleSelectAll: B
|
|
802
809
|
};
|
|
803
810
|
}
|
|
804
|
-
}),
|
|
811
|
+
}), _l = { class: "b-listbox-multi-select-category__label" }, Dl = {
|
|
805
812
|
key: 1,
|
|
806
813
|
class: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category",
|
|
807
814
|
"aria-hidden": "true"
|
|
808
|
-
},
|
|
809
|
-
function
|
|
810
|
-
const t = K("decorative-checkbox"), i = K("bento-typography"),
|
|
815
|
+
}, xl = { class: "b-listbox-multi-select-category__label" }, Bl = ["id", "aria-label"];
|
|
816
|
+
function Rl(e, l, n, o, a, s) {
|
|
817
|
+
const t = K("decorative-checkbox"), i = K("bento-typography"), h = K("chevron-up-icon"), c = K("chevron-down-icon"), u = K("bento-listbox-option");
|
|
811
818
|
return p(), E("div", null, [
|
|
812
|
-
e.isStaticCategory ? (p(), E("div",
|
|
813
|
-
|
|
814
|
-
|
|
819
|
+
e.isStaticCategory ? (p(), E("div", Dl, [
|
|
820
|
+
W("span", xl, [
|
|
821
|
+
F(i, {
|
|
815
822
|
el: "span",
|
|
816
823
|
variant: "caption",
|
|
817
824
|
class: "b-listbox-multi-select-category__label-text"
|
|
818
825
|
}, {
|
|
819
|
-
default:
|
|
820
|
-
oe(
|
|
826
|
+
default: k(() => [
|
|
827
|
+
oe(Y(e.category.label), 1)
|
|
821
828
|
]),
|
|
822
829
|
_: 1
|
|
823
830
|
})
|
|
824
831
|
])
|
|
825
832
|
])) : (p(), N(u, {
|
|
826
833
|
key: 0,
|
|
827
|
-
class:
|
|
834
|
+
class: fe(["b-listbox-multi-select-category__option", e.conditionalClass]),
|
|
828
835
|
tabindex: e.tabindex,
|
|
829
836
|
"aria-selected": e.ariaCheckedComputed !== "false",
|
|
830
837
|
"aria-checked": e.ariaCheckedComputed,
|
|
@@ -837,34 +844,34 @@ function xl(e, l, n, o, a, s) {
|
|
|
837
844
|
onEnterPressed: e.handleSelectAll,
|
|
838
845
|
onSpacePressed: Le(e.handleSelectAll, ["prevent"]),
|
|
839
846
|
onKeydown: [
|
|
840
|
-
l[1] || (l[1] =
|
|
841
|
-
l[2] || (l[2] =
|
|
847
|
+
l[1] || (l[1] = me((r) => e.toggleOpen(r, !1), ["arrow-left", "native"])),
|
|
848
|
+
l[2] || (l[2] = me((r) => e.toggleOpen(r, !0), ["arrow-right", "native"]))
|
|
842
849
|
]
|
|
843
850
|
}, {
|
|
844
|
-
default:
|
|
845
|
-
|
|
851
|
+
default: k(() => [
|
|
852
|
+
F(t, {
|
|
846
853
|
indeterminate: e.isIndeterminate,
|
|
847
854
|
disabled: e.hasAllPropsDisabled,
|
|
848
855
|
checked: e.isAllSelected
|
|
849
856
|
}, null, 8, ["indeterminate", "disabled", "checked"]),
|
|
850
|
-
|
|
851
|
-
|
|
857
|
+
W("span", _l, [
|
|
858
|
+
F(i, {
|
|
852
859
|
id: e.categoryNameId,
|
|
853
860
|
el: "span",
|
|
854
861
|
class: "b-listbox-multi-select-category__label-text"
|
|
855
862
|
}, {
|
|
856
|
-
default:
|
|
857
|
-
oe(
|
|
863
|
+
default: k(() => [
|
|
864
|
+
oe(Y(e.category.label), 1)
|
|
858
865
|
]),
|
|
859
866
|
_: 1
|
|
860
867
|
}, 8, ["id"]),
|
|
861
|
-
|
|
868
|
+
W("div", {
|
|
862
869
|
"aria-hidden": "true",
|
|
863
870
|
class: "b-listbox-multi-select-category__label-chevron",
|
|
864
871
|
"data-testid": "toggle-listbox",
|
|
865
872
|
onClickCapture: l[0] || (l[0] = Le((...r) => e.toggleOpen && e.toggleOpen(...r), ["stop"]))
|
|
866
873
|
}, [
|
|
867
|
-
e.isOpen ? (p(), N(
|
|
874
|
+
e.isOpen ? (p(), N(h, {
|
|
868
875
|
key: 0,
|
|
869
876
|
"svg-title": e.chevronTitle
|
|
870
877
|
}, null, 8, ["svg-title"])) : (p(), N(c, {
|
|
@@ -876,26 +883,26 @@ function xl(e, l, n, o, a, s) {
|
|
|
876
883
|
]),
|
|
877
884
|
_: 1
|
|
878
885
|
}, 8, ["class", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "aria-expanded", "aria-owns", "aria-labelledby", "onClick", "onEnterPressed", "onSpacePressed"])),
|
|
879
|
-
|
|
886
|
+
ue(W("div", {
|
|
880
887
|
id: e.categoryGroupId,
|
|
881
888
|
role: "group",
|
|
882
889
|
"aria-label": e.category.label
|
|
883
890
|
}, [
|
|
884
|
-
|
|
891
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
885
892
|
], 8, Bl), [
|
|
886
|
-
[
|
|
893
|
+
[Ne, e.showItemChildren]
|
|
887
894
|
])
|
|
888
895
|
]);
|
|
889
896
|
}
|
|
890
|
-
const
|
|
891
|
-
var
|
|
892
|
-
const
|
|
897
|
+
const Ml = /* @__PURE__ */ ee(kl, [["render", Rl], ["__scopeId", "data-v-60c04867"]]);
|
|
898
|
+
var he = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(he || {});
|
|
899
|
+
const Nl = Z({
|
|
893
900
|
name: "listbox-multi-select-options",
|
|
894
901
|
components: {
|
|
895
|
-
BentoListboxOption:
|
|
902
|
+
BentoListboxOption: je,
|
|
896
903
|
BentoTypography: Ie,
|
|
897
|
-
ListboxMultiSelectCategory:
|
|
898
|
-
DecorativeCheckbox:
|
|
904
|
+
ListboxMultiSelectCategory: Ml,
|
|
905
|
+
DecorativeCheckbox: pt
|
|
899
906
|
},
|
|
900
907
|
inheritAttrs: !1,
|
|
901
908
|
props: {
|
|
@@ -965,20 +972,20 @@ const Ml = Z({
|
|
|
965
972
|
}
|
|
966
973
|
},
|
|
967
974
|
emits: [
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
975
|
+
he.TOGGLE_CHECKBOX_SELECTION,
|
|
976
|
+
he.SELECT_CATEGORY,
|
|
977
|
+
he.UNSELECT_CATEGORY,
|
|
978
|
+
he.TOGGLE_CATEGORY_VISIBILITY
|
|
972
979
|
],
|
|
973
980
|
setup(e, { emit: l }) {
|
|
974
981
|
const n = (c) => {
|
|
975
|
-
e.isOptionDisabled(c) || l(
|
|
982
|
+
e.isOptionDisabled(c) || l(he.TOGGLE_CHECKBOX_SELECTION, c);
|
|
976
983
|
}, o = (c) => !!c.items, a = (c) => {
|
|
977
984
|
const u = e.isMultiLevel && e.searching;
|
|
978
985
|
return c.description && (!e.isMultiLevel || u);
|
|
979
986
|
}, s = (c) => c.items ? !!c.items.find((u) => e.selectedItemsList.includes(u.value)) : e.selectedItemsList.includes(c.value), t = (c) => {
|
|
980
987
|
if (o(c)) {
|
|
981
|
-
const u = s(c) ?
|
|
988
|
+
const u = s(c) ? he.UNSELECT_CATEGORY : he.SELECT_CATEGORY;
|
|
982
989
|
l(u, c);
|
|
983
990
|
} else
|
|
984
991
|
n(c);
|
|
@@ -996,40 +1003,40 @@ const Ml = Z({
|
|
|
996
1003
|
toggleSearchOption: t,
|
|
997
1004
|
computedTabindex: (c) => e.itemsIndex[c] === e.focusedIndex ? 0 : -1,
|
|
998
1005
|
// Enums
|
|
999
|
-
BentoListboxEvent:
|
|
1000
|
-
ListboxMultiSelectOptionsEvent:
|
|
1006
|
+
BentoListboxEvent: y,
|
|
1007
|
+
ListboxMultiSelectOptionsEvent: he
|
|
1001
1008
|
};
|
|
1002
1009
|
}
|
|
1003
|
-
}),
|
|
1004
|
-
function
|
|
1005
|
-
const t = K("decorative-checkbox"), i = K("bento-typography"),
|
|
1010
|
+
}), Pl = { class: "b-listbox-multi-select__option-text" }, Fl = { class: "b-listbox-multi-select__option-text" };
|
|
1011
|
+
function Vl(e, l, n, o, a, s) {
|
|
1012
|
+
const t = K("decorative-checkbox"), i = K("bento-typography"), h = K("bento-listbox-option"), c = K("listbox-multi-select-options", !0), u = K("listbox-multi-select-category");
|
|
1006
1013
|
return p(), E("div", null, [
|
|
1007
|
-
(p(!0), E(
|
|
1014
|
+
(p(!0), E(pe, null, le(e.items, (r) => (p(), E("div", {
|
|
1008
1015
|
key: `selected-${r.value}`
|
|
1009
1016
|
}, [
|
|
1010
|
-
e.searching && e.isMultiLevel ? (p(), N(
|
|
1017
|
+
e.searching && e.isMultiLevel ? (p(), N(h, {
|
|
1011
1018
|
key: 0,
|
|
1012
|
-
class:
|
|
1019
|
+
class: fe(["b-listbox-multi-select-options", e.conditionalClasses]),
|
|
1013
1020
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(r) : null,
|
|
1014
1021
|
tabindex: e.computedTabindex(r.value),
|
|
1015
1022
|
"aria-selected": `${e.isOptionSelected(r)}`,
|
|
1016
1023
|
"aria-checked": `${e.isOptionSelected(r)}`,
|
|
1017
1024
|
"aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(r) : null,
|
|
1018
1025
|
role: e.$attrs.role || "option",
|
|
1019
|
-
onClick: (
|
|
1020
|
-
onEnterPressed: (
|
|
1021
|
-
onSpacePressed: Le((
|
|
1026
|
+
onClick: (f) => e.toggleSearchOption(r),
|
|
1027
|
+
onEnterPressed: (f) => e.toggleSearchOption(r),
|
|
1028
|
+
onSpacePressed: Le((f) => e.toggleSearchOption(r), ["prevent"])
|
|
1022
1029
|
}, {
|
|
1023
|
-
default:
|
|
1024
|
-
|
|
1030
|
+
default: k(() => [
|
|
1031
|
+
F(t, {
|
|
1025
1032
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(r) : null,
|
|
1026
1033
|
checked: e.isOptionSelected(r)
|
|
1027
1034
|
}, null, 8, ["disabled", "checked"]),
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
default:
|
|
1032
|
-
oe(
|
|
1035
|
+
j(e.$slots, "default", M({ ref_for: !0 }, r), () => [
|
|
1036
|
+
W("span", Pl, [
|
|
1037
|
+
F(i, { el: "span" }, {
|
|
1038
|
+
default: k(() => [
|
|
1039
|
+
oe(Y(r.label), 1)
|
|
1033
1040
|
]),
|
|
1034
1041
|
_: 2
|
|
1035
1042
|
}, 1024),
|
|
@@ -1038,8 +1045,8 @@ function Fl(e, l, n, o, a, s) {
|
|
|
1038
1045
|
class: "b-listbox-multi-select__option-description",
|
|
1039
1046
|
el: "span"
|
|
1040
1047
|
}, {
|
|
1041
|
-
default:
|
|
1042
|
-
oe(
|
|
1048
|
+
default: k(() => [
|
|
1049
|
+
oe(Y(r.description), 1)
|
|
1043
1050
|
]),
|
|
1044
1051
|
_: 2
|
|
1045
1052
|
}, 1024)) : J("", !0)
|
|
@@ -1047,7 +1054,7 @@ function Fl(e, l, n, o, a, s) {
|
|
|
1047
1054
|
], !0)
|
|
1048
1055
|
]),
|
|
1049
1056
|
_: 2
|
|
1050
|
-
}, 1032, ["class", "disabled", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"])) : (p(), E(
|
|
1057
|
+
}, 1032, ["class", "disabled", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"])) : (p(), E(pe, { key: 1 }, [
|
|
1051
1058
|
r.items ? (p(), N(u, {
|
|
1052
1059
|
key: 0,
|
|
1053
1060
|
category: r,
|
|
@@ -1055,12 +1062,12 @@ function Fl(e, l, n, o, a, s) {
|
|
|
1055
1062
|
"is-option-disabled": e.isOptionDisabled,
|
|
1056
1063
|
"selected-items-list": e.selectedItemsList,
|
|
1057
1064
|
tabindex: e.computedTabindex(r.value),
|
|
1058
|
-
onSelectCategory: (
|
|
1059
|
-
onUnselectCategory: (
|
|
1060
|
-
onToggleCategoryVisibility: l[1] || (l[1] = (
|
|
1065
|
+
onSelectCategory: (f) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, r),
|
|
1066
|
+
onUnselectCategory: (f) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, r),
|
|
1067
|
+
onToggleCategoryVisibility: l[1] || (l[1] = (f) => e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, f))
|
|
1061
1068
|
}, {
|
|
1062
|
-
default:
|
|
1063
|
-
|
|
1069
|
+
default: k(() => [
|
|
1070
|
+
F(c, {
|
|
1064
1071
|
"category-items": "",
|
|
1065
1072
|
items: r.items,
|
|
1066
1073
|
"is-option-disabled": e.isOptionDisabled,
|
|
@@ -1071,33 +1078,33 @@ function Fl(e, l, n, o, a, s) {
|
|
|
1071
1078
|
"selected-items-list": e.selectedItemsList,
|
|
1072
1079
|
searching: e.searching,
|
|
1073
1080
|
role: e.$attrs.role || "option",
|
|
1074
|
-
onToggleCheckboxSelection: l[0] || (l[0] = (
|
|
1081
|
+
onToggleCheckboxSelection: l[0] || (l[0] = (f) => e.toggleCheckboxSelection(f))
|
|
1075
1082
|
}, null, 8, ["items", "is-option-disabled", "items-index", "focused-index", "is-multi-level", "static-categories", "selected-items-list", "searching", "role"])
|
|
1076
1083
|
]),
|
|
1077
1084
|
_: 2
|
|
1078
|
-
}, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (p(), N(
|
|
1085
|
+
}, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (p(), N(h, {
|
|
1079
1086
|
key: 1,
|
|
1080
|
-
class:
|
|
1087
|
+
class: fe(["b-listbox-multi-select-options", e.conditionalClasses]),
|
|
1081
1088
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(r) : null,
|
|
1082
1089
|
tabindex: e.computedTabindex(r.value),
|
|
1083
1090
|
"aria-selected": `${e.isOptionSelected(r)}`,
|
|
1084
1091
|
"aria-checked": `${e.isOptionSelected(r)}`,
|
|
1085
1092
|
"aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(r) : null,
|
|
1086
1093
|
role: e.$attrs.role || "option",
|
|
1087
|
-
onClick: (
|
|
1088
|
-
onEnterPressed: (
|
|
1089
|
-
onSpacePressed: Le((
|
|
1094
|
+
onClick: (f) => e.toggleCheckboxSelection(r),
|
|
1095
|
+
onEnterPressed: (f) => e.toggleCheckboxSelection(r),
|
|
1096
|
+
onSpacePressed: Le((f) => e.toggleCheckboxSelection(r), ["prevent"])
|
|
1090
1097
|
}, {
|
|
1091
|
-
default:
|
|
1092
|
-
|
|
1098
|
+
default: k(() => [
|
|
1099
|
+
F(t, {
|
|
1093
1100
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(r) : null,
|
|
1094
1101
|
checked: e.isOptionSelected(r)
|
|
1095
1102
|
}, null, 8, ["disabled", "checked"]),
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
default:
|
|
1100
|
-
oe(
|
|
1103
|
+
j(e.$slots, "default", M({ ref_for: !0 }, r), () => [
|
|
1104
|
+
W("span", Fl, [
|
|
1105
|
+
F(i, { el: "span" }, {
|
|
1106
|
+
default: k(() => [
|
|
1107
|
+
oe(Y(r.label), 1)
|
|
1101
1108
|
]),
|
|
1102
1109
|
_: 2
|
|
1103
1110
|
}, 1024),
|
|
@@ -1106,8 +1113,8 @@ function Fl(e, l, n, o, a, s) {
|
|
|
1106
1113
|
class: "b-listbox-multi-select__option-description",
|
|
1107
1114
|
el: "span"
|
|
1108
1115
|
}, {
|
|
1109
|
-
default:
|
|
1110
|
-
oe(
|
|
1116
|
+
default: k(() => [
|
|
1117
|
+
oe(Y(r.description), 1)
|
|
1111
1118
|
]),
|
|
1112
1119
|
_: 2
|
|
1113
1120
|
}, 1024)) : J("", !0)
|
|
@@ -1120,13 +1127,13 @@ function Fl(e, l, n, o, a, s) {
|
|
|
1120
1127
|
]))), 128))
|
|
1121
1128
|
]);
|
|
1122
1129
|
}
|
|
1123
|
-
const
|
|
1130
|
+
const zl = /* @__PURE__ */ ee(Nl, [["render", Vl], ["__scopeId", "data-v-237dfc58"]]), Dt = (e) => {
|
|
1124
1131
|
const l = d(() => !!e.value?.find(({ items: o }) => !!o)), n = d(() => l.value ? e.value?.reduce((o, a) => (a.items ? o.push(...a.items.flat()) : o.push(a), o), []) : e.value);
|
|
1125
1132
|
return {
|
|
1126
1133
|
isMultiLevelSelect: l,
|
|
1127
1134
|
flattenedItemsList: n
|
|
1128
1135
|
};
|
|
1129
|
-
},
|
|
1136
|
+
}, xt = {
|
|
1130
1137
|
"de-DE": { allSelected: "Alle ausgewählt ({total})", numberOfTotalSelected: "{number} von {total} ausgewählt", numbersSelected: "{number} ausgewählt", selectAll: "Alle auswählen ({total})" },
|
|
1131
1138
|
"en-GB": { allSelected: "All selected ({total})", numberOfTotalSelected: "{number} of {total} selected", numbersSelected: "{number} selected", selectAll: "Select all ({total})" },
|
|
1132
1139
|
"en-US": { allSelected: "All selected ({total})", numberOfTotalSelected: "{number} of {total} selected", numbersSelected: "{number} selected", selectAll: "Select all ({total})" },
|
|
@@ -1137,12 +1144,12 @@ const Vl = /* @__PURE__ */ ee(Ml, [["render", Fl], ["__scopeId", "data-v-237dfc5
|
|
|
1137
1144
|
"ja-JP": { allSelected: "すべて選択 ({total})", numberOfTotalSelected: "{total}件中{number}件を選択済み", numbersSelected: "{number}件選択済み", selectAll: "すべて選択 ({total})" },
|
|
1138
1145
|
"pt-BR": { allSelected: "Todos os selecionados ({total})", numberOfTotalSelected: "{number} de {total} selecionados", numbersSelected: "{number} selecionados", selectAll: "Selecionar tudo ({total})" },
|
|
1139
1146
|
"zh-CN": { allSelected: "全部已选 ({total})", numberOfTotalSelected: "已选择 {number} 个,共 {total} 个", numbersSelected: "已选择 {number} 个", selectAll: "选择全部({total})个" }
|
|
1140
|
-
},
|
|
1147
|
+
}, Gl = { key: 0 }, Kl = ["role"], Ul = {
|
|
1141
1148
|
key: 1,
|
|
1142
1149
|
class: "b-listbox-multi-select__divider",
|
|
1143
1150
|
"aria-hidden": "true"
|
|
1144
|
-
},
|
|
1145
|
-
...
|
|
1151
|
+
}, ql = { i18n: { messages: xt } }, Yl = /* @__PURE__ */ Z({
|
|
1152
|
+
...ql,
|
|
1146
1153
|
__name: "listbox-multi-select",
|
|
1147
1154
|
props: {
|
|
1148
1155
|
hasMoreItems: { type: Boolean, default: !1 },
|
|
@@ -1155,221 +1162,225 @@ const Vl = /* @__PURE__ */ ee(Ml, [["render", Fl], ["__scopeId", "data-v-237dfc5
|
|
|
1155
1162
|
},
|
|
1156
1163
|
emits: ["select"],
|
|
1157
1164
|
setup(e, { expose: l, emit: n }) {
|
|
1158
|
-
const o = e, a = n, { t: s, n: t } = ke({ messages:
|
|
1165
|
+
const o = e, a = n, { t: s, n: t } = ke({ messages: xt }), i = Ge(), h = dt(), c = d(
|
|
1159
1166
|
() => ({
|
|
1160
|
-
"aria-label":
|
|
1161
|
-
"aria-busy":
|
|
1162
|
-
"aria-atomic":
|
|
1163
|
-
"aria-live":
|
|
1167
|
+
"aria-label": h["aria-label"]?.toString(),
|
|
1168
|
+
"aria-busy": h["aria-busy"]?.toString(),
|
|
1169
|
+
"aria-atomic": h["aria-atomic"]?.toString(),
|
|
1170
|
+
"aria-live": h["aria-live"]?.toString(),
|
|
1164
1171
|
"aria-multiselectable": !0
|
|
1165
1172
|
})
|
|
1166
|
-
), u =
|
|
1167
|
-
const
|
|
1168
|
-
return { isDisabled:
|
|
1169
|
-
},
|
|
1170
|
-
if (o.searching &&
|
|
1173
|
+
), u = w(null), r = w(null), f = w(null), v = w(null), L = d(() => o.selectedValues.map(({ value: S }) => S)), { isMultiLevelSelect: _, flattenedItemsList: g } = Dt(ae(o, "items")), V = d(() => _.value && !o.staticCategories), C = d(() => V.value ? "tree" : "listbox"), I = d(() => V.value ? "treeitem" : "option"), B = (S) => {
|
|
1174
|
+
const T = o.isOptionDisabled(S), O = L.value?.includes(S.value) || !1;
|
|
1175
|
+
return { isDisabled: T, isPreSelected: O };
|
|
1176
|
+
}, D = d(() => {
|
|
1177
|
+
if (o.searching && _)
|
|
1171
1178
|
return o.items;
|
|
1172
|
-
const
|
|
1173
|
-
const { isDisabled:
|
|
1174
|
-
return
|
|
1179
|
+
const S = g.value.filter((T) => {
|
|
1180
|
+
const { isDisabled: O, isPreSelected: U } = B(T);
|
|
1181
|
+
return O && U || !O;
|
|
1175
1182
|
});
|
|
1176
|
-
return o.selectedValues.forEach((
|
|
1177
|
-
|
|
1178
|
-
}),
|
|
1179
|
-
}),
|
|
1180
|
-
() =>
|
|
1181
|
-
(
|
|
1182
|
-
).length ===
|
|
1183
|
-
),
|
|
1184
|
-
const
|
|
1185
|
-
return
|
|
1186
|
-
}),
|
|
1187
|
-
const
|
|
1188
|
-
const { isDisabled:
|
|
1189
|
-
return
|
|
1190
|
-
},
|
|
1191
|
-
a("select", [...o.selectedValues, ...
|
|
1192
|
-
},
|
|
1193
|
-
const
|
|
1194
|
-
const { isDisabled:
|
|
1195
|
-
return !(
|
|
1196
|
-
},
|
|
1197
|
-
a("select",
|
|
1183
|
+
return o.selectedValues.forEach((T) => {
|
|
1184
|
+
S.find((O) => O.value === T.value) || S.push(T);
|
|
1185
|
+
}), S;
|
|
1186
|
+
}), A = d(
|
|
1187
|
+
() => D.value?.filter((S) => S.items && _.value && o.searching ? S.items.filter(
|
|
1188
|
+
(O) => (o.selectedValues ?? []).includes(O.value)
|
|
1189
|
+
).length === S.items.length : L.value?.includes(S.value))
|
|
1190
|
+
), P = () => _.value && !o.searching ? g.value.length : o.items.length, x = d(() => {
|
|
1191
|
+
const S = D.value.length, T = P(), O = A.value?.length || 0;
|
|
1192
|
+
return O === 0 ? s("selectAll", { total: t(S) }) : O === T ? s("allSelected", { total: t(T) }) : O <= T ? s("numberOfTotalSelected", { number: t(O), total: t(T) }) : s("numbersSelected", { number: t(O) });
|
|
1193
|
+
}), $ = (S) => {
|
|
1194
|
+
const T = (U) => {
|
|
1195
|
+
const { isDisabled: q, isPreSelected: Ae } = B(U);
|
|
1196
|
+
return q && Ae || !q;
|
|
1197
|
+
}, O = S.filter(T).filter((U) => !L.value.includes(U.value));
|
|
1198
|
+
a("select", [...o.selectedValues, ...O]);
|
|
1199
|
+
}, z = (S) => {
|
|
1200
|
+
const T = (q) => {
|
|
1201
|
+
const { isDisabled: Ae, isPreSelected: m } = B(q);
|
|
1202
|
+
return !(Ae && m);
|
|
1203
|
+
}, O = S.filter(T).map(({ value: q }) => q), U = o.selectedValues.filter((q) => !O?.includes(q.value));
|
|
1204
|
+
a("select", U);
|
|
1198
1205
|
}, G = () => {
|
|
1199
|
-
|
|
1200
|
-
},
|
|
1201
|
-
|
|
1202
|
-
}, { isAllSelected: Q, isIndeterminate:
|
|
1203
|
-
|
|
1204
|
-
|
|
1206
|
+
$(g.value);
|
|
1207
|
+
}, R = () => {
|
|
1208
|
+
z(g.value);
|
|
1209
|
+
}, { isAllSelected: Q, isIndeterminate: _e, toggleSelectAll: Pe } = wt(
|
|
1210
|
+
A,
|
|
1211
|
+
D,
|
|
1205
1212
|
G,
|
|
1206
|
-
|
|
1207
|
-
),
|
|
1208
|
-
X.value = !X.value,
|
|
1213
|
+
R
|
|
1214
|
+
), De = d(() => _e.value ? "mixed" : `${Q.value}`), X = w(Q.value), re = () => {
|
|
1215
|
+
X.value = !X.value, Pe(X.value);
|
|
1209
1216
|
};
|
|
1210
|
-
|
|
1217
|
+
Ce(Q, () => {
|
|
1211
1218
|
X.value = Q.value;
|
|
1212
1219
|
});
|
|
1213
|
-
const
|
|
1214
|
-
|
|
1215
|
-
}, Te = (
|
|
1216
|
-
|
|
1217
|
-
},
|
|
1218
|
-
let
|
|
1219
|
-
const
|
|
1220
|
-
|
|
1221
|
-
},
|
|
1222
|
-
if (!
|
|
1220
|
+
const Ke = (S) => {
|
|
1221
|
+
$(S.items);
|
|
1222
|
+
}, Te = (S) => {
|
|
1223
|
+
z(S.items);
|
|
1224
|
+
}, ye = (S, T) => {
|
|
1225
|
+
let O = !1;
|
|
1226
|
+
const U = o.selectedValues.filter(({ value: q }) => T.value === q ? (O = !0, !1) : !0);
|
|
1227
|
+
O || U.push(T), a(S, U);
|
|
1228
|
+
}, He = d(() => {
|
|
1229
|
+
if (!_.value)
|
|
1223
1230
|
return o.selectedValues;
|
|
1224
|
-
const
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1231
|
+
const S = (m) => L.value.includes(m.value), T = (m) => !o.staticCategories && m.every((se) => S(se)), O = o.items.flatMap(
|
|
1232
|
+
(m) => m.items && !T(m.items) ? m.items : m
|
|
1233
|
+
), U = O.filter((m) => m.items ? !0 : S(m)), q = /* @__PURE__ */ new Set();
|
|
1234
|
+
O.forEach((m) => {
|
|
1235
|
+
q.add(m.value), m.items?.forEach((se) => q.add(se.value));
|
|
1236
|
+
});
|
|
1237
|
+
const Ae = o.selectedValues.filter((m) => !q.has(m.value));
|
|
1238
|
+
return [...U, ...Ae];
|
|
1239
|
+
}), Je = d(() => {
|
|
1240
|
+
const S = ["automatic", "button"].includes(o.lazyLoadType), T = o.selectedValues?.length > 0 && A.value?.length !== g.value?.length;
|
|
1241
|
+
return S && o.hasMoreItems ? !!o.selectedValues?.length : T;
|
|
1242
|
+
}), xe = d(() => ["automatic", "button"].includes(o.lazyLoadType) ? !o.hasMoreItems : !0), ge = w([]), { visibleDomOptions: Fe, updateVisibleDomOptions: Xe } = ut(
|
|
1232
1243
|
u,
|
|
1233
1244
|
ae(o, "items"),
|
|
1234
|
-
|
|
1235
|
-
),
|
|
1236
|
-
|
|
1237
|
-
|
|
1245
|
+
I
|
|
1246
|
+
), Ze = (S) => {
|
|
1247
|
+
ge.value.includes(S) ? ge.value = ge.value.filter((T) => T !== S) : ge.value.push(S), ne(() => {
|
|
1248
|
+
Xe();
|
|
1238
1249
|
});
|
|
1239
|
-
},
|
|
1240
|
-
|
|
1250
|
+
}, Qe = (S) => {
|
|
1251
|
+
Fe.value[S]?.focus();
|
|
1241
1252
|
}, {
|
|
1242
|
-
moveToNextElement:
|
|
1243
|
-
moveToPreviousElement:
|
|
1244
|
-
moveToFirstElement:
|
|
1245
|
-
moveToLastElement:
|
|
1246
|
-
preventDefault:
|
|
1247
|
-
focusedIndex:
|
|
1248
|
-
setListboxFocusedIndex:
|
|
1253
|
+
moveToNextElement: et,
|
|
1254
|
+
moveToPreviousElement: Ue,
|
|
1255
|
+
moveToFirstElement: tt,
|
|
1256
|
+
moveToLastElement: qe,
|
|
1257
|
+
preventDefault: Ye,
|
|
1258
|
+
focusedIndex: Be,
|
|
1259
|
+
setListboxFocusedIndex: Ve
|
|
1249
1260
|
} = kt(
|
|
1250
1261
|
{
|
|
1251
|
-
items:
|
|
1262
|
+
items: Fe
|
|
1252
1263
|
},
|
|
1253
|
-
|
|
1254
|
-
),
|
|
1255
|
-
[H.ARROW_UP]: (
|
|
1256
|
-
[H.ARROW_DOWN]: (
|
|
1257
|
-
[H.HOME]:
|
|
1258
|
-
[H.END]:
|
|
1264
|
+
Qe
|
|
1265
|
+
), lt = {
|
|
1266
|
+
[H.ARROW_UP]: (S) => Ue(S),
|
|
1267
|
+
[H.ARROW_DOWN]: (S) => et(S),
|
|
1268
|
+
[H.HOME]: tt,
|
|
1269
|
+
[H.END]: qe
|
|
1259
1270
|
};
|
|
1260
1271
|
l({
|
|
1261
1272
|
/**
|
|
1262
1273
|
* Method to set the index of the item to be focused on
|
|
1263
1274
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
1264
1275
|
*/
|
|
1265
|
-
setListboxFocusedIndex:
|
|
1276
|
+
setListboxFocusedIndex: Ve
|
|
1266
1277
|
});
|
|
1267
|
-
const
|
|
1268
|
-
[H.ARROW_UP]:
|
|
1269
|
-
[H.ARROW_DOWN]:
|
|
1270
|
-
},
|
|
1271
|
-
let
|
|
1272
|
-
const
|
|
1273
|
-
return o.items.forEach((
|
|
1274
|
-
let
|
|
1275
|
-
|
|
1276
|
-
}),
|
|
1278
|
+
const ot = {
|
|
1279
|
+
[H.ARROW_UP]: Ye,
|
|
1280
|
+
[H.ARROW_DOWN]: Ye
|
|
1281
|
+
}, at = d(() => {
|
|
1282
|
+
let S = xe.value ? 1 : 0;
|
|
1283
|
+
const T = {};
|
|
1284
|
+
return o.items.forEach((O) => {
|
|
1285
|
+
let U = ge.value.includes(O.value);
|
|
1286
|
+
O.items ? (o.staticCategories ? U = !0 : T[O.value] = S++, U && O.items.forEach((q) => T[q.value] = S++)) : T[O.value] = S++;
|
|
1287
|
+
}), T;
|
|
1277
1288
|
});
|
|
1278
|
-
return (
|
|
1289
|
+
return (S, T) => (p(), E("div", {
|
|
1279
1290
|
ref_key: "listboxRef",
|
|
1280
1291
|
ref: u,
|
|
1281
1292
|
class: "b-listbox-multi-select"
|
|
1282
1293
|
}, [
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
(p(!0), E(
|
|
1286
|
-
key:
|
|
1294
|
+
Je.value ? (p(), E("div", Gl, [
|
|
1295
|
+
ue((p(), E("ul", M({ class: "b-listbox-multi-select__chips" }, ie(ot, !0)), [
|
|
1296
|
+
(p(!0), E(pe, null, le(He.value, (O) => (p(), E("li", {
|
|
1297
|
+
key: O.value
|
|
1287
1298
|
}, [
|
|
1288
|
-
|
|
1299
|
+
F(b(Xt), {
|
|
1289
1300
|
ref_for: !0,
|
|
1290
1301
|
ref_key: "selectedListboxItemsRef",
|
|
1291
|
-
ref:
|
|
1292
|
-
disabled:
|
|
1293
|
-
label:
|
|
1302
|
+
ref: f,
|
|
1303
|
+
disabled: S.isOptionDisabled(O),
|
|
1304
|
+
label: O.label,
|
|
1294
1305
|
condensed: "",
|
|
1295
|
-
onClick: (
|
|
1306
|
+
onClick: (U) => O.items ? Te(O) : ye("select", O)
|
|
1296
1307
|
}, null, 8, ["disabled", "label", "onClick"])
|
|
1297
1308
|
]))), 128))
|
|
1298
1309
|
], 16)), [
|
|
1299
|
-
[b(
|
|
1310
|
+
[b(ze)]
|
|
1300
1311
|
]),
|
|
1301
|
-
|
|
1312
|
+
T[4] || (T[4] = W("hr", {
|
|
1302
1313
|
class: "b-listbox-multi-select__divider",
|
|
1303
1314
|
"aria-hidden": "true"
|
|
1304
1315
|
}, null, -1))
|
|
1305
1316
|
])) : J("", !0),
|
|
1306
|
-
|
|
1307
|
-
|
|
1317
|
+
ue((p(), E("div", M(c.value, { role: C.value }, ie(lt, !0)), [
|
|
1318
|
+
xe.value ? (p(), N(b(je), {
|
|
1308
1319
|
key: 0,
|
|
1309
1320
|
ref_key: "selectAllListboxItemsRef",
|
|
1310
1321
|
ref: r,
|
|
1311
1322
|
class: "b-listbox-multi-select__option",
|
|
1312
|
-
tabindex: b(
|
|
1313
|
-
"aria-selected":
|
|
1314
|
-
"aria-checked":
|
|
1315
|
-
role:
|
|
1316
|
-
onClick:
|
|
1317
|
-
onEnterPressed:
|
|
1318
|
-
onSpacePressed: Le(
|
|
1323
|
+
tabindex: b(Be) === 0 ? 0 : -1,
|
|
1324
|
+
"aria-selected": De.value !== "false",
|
|
1325
|
+
"aria-checked": De.value,
|
|
1326
|
+
role: I.value,
|
|
1327
|
+
onClick: re,
|
|
1328
|
+
onEnterPressed: re,
|
|
1329
|
+
onSpacePressed: Le(re, ["prevent"])
|
|
1319
1330
|
}, {
|
|
1320
|
-
default:
|
|
1321
|
-
|
|
1331
|
+
default: k(() => [
|
|
1332
|
+
F(b(pt), {
|
|
1322
1333
|
checked: b(Q),
|
|
1323
|
-
indeterminate: b(
|
|
1334
|
+
indeterminate: b(_e)
|
|
1324
1335
|
}, null, 8, ["checked", "indeterminate"]),
|
|
1325
|
-
|
|
1326
|
-
default:
|
|
1327
|
-
oe(
|
|
1336
|
+
F(b(Ie), { el: "span" }, {
|
|
1337
|
+
default: k(() => [
|
|
1338
|
+
oe(Y(x.value), 1)
|
|
1328
1339
|
]),
|
|
1329
1340
|
_: 1
|
|
1330
1341
|
})
|
|
1331
1342
|
]),
|
|
1332
1343
|
_: 1
|
|
1333
1344
|
}, 8, ["tabindex", "aria-selected", "aria-checked", "role"])) : J("", !0),
|
|
1334
|
-
|
|
1335
|
-
|
|
1345
|
+
xe.value ? (p(), E("hr", Ul)) : J("", !0),
|
|
1346
|
+
F(b(zl), {
|
|
1336
1347
|
ref_key: "listboxItemsRef",
|
|
1337
1348
|
ref: v,
|
|
1338
|
-
items:
|
|
1339
|
-
"is-option-disabled":
|
|
1340
|
-
"is-multi-level": b(
|
|
1341
|
-
"static-categories":
|
|
1342
|
-
searching:
|
|
1343
|
-
"selected-items-list":
|
|
1344
|
-
"focused-index": b(
|
|
1345
|
-
"items-index":
|
|
1346
|
-
role:
|
|
1347
|
-
onToggleCheckboxSelection:
|
|
1348
|
-
onSelectCategory:
|
|
1349
|
+
items: S.items,
|
|
1350
|
+
"is-option-disabled": S.isOptionDisabled,
|
|
1351
|
+
"is-multi-level": b(_),
|
|
1352
|
+
"static-categories": S.staticCategories,
|
|
1353
|
+
searching: S.searching,
|
|
1354
|
+
"selected-items-list": L.value,
|
|
1355
|
+
"focused-index": b(Be),
|
|
1356
|
+
"items-index": at.value,
|
|
1357
|
+
role: I.value,
|
|
1358
|
+
onToggleCheckboxSelection: T[0] || (T[0] = (O) => ye("select", O)),
|
|
1359
|
+
onSelectCategory: Ke,
|
|
1349
1360
|
onUnselectCategory: Te,
|
|
1350
|
-
onToggleCategoryVisibility:
|
|
1351
|
-
onSpacePressed:
|
|
1352
|
-
onTabPressed:
|
|
1353
|
-
onEnterPressed:
|
|
1354
|
-
},
|
|
1355
|
-
le(b(i), (
|
|
1356
|
-
name:
|
|
1357
|
-
fn:
|
|
1358
|
-
|
|
1361
|
+
onToggleCategoryVisibility: Ze,
|
|
1362
|
+
onSpacePressed: T[1] || (T[1] = (O) => ye(b(y).SPACE, O)),
|
|
1363
|
+
onTabPressed: T[2] || (T[2] = (O) => ye(b(y).TAB, O)),
|
|
1364
|
+
onEnterPressed: T[3] || (T[3] = (O) => ye(b(y).ENTER, O))
|
|
1365
|
+
}, ve({ _: 2 }, [
|
|
1366
|
+
le(b(i), (O, U) => ({
|
|
1367
|
+
name: U,
|
|
1368
|
+
fn: k((q) => [
|
|
1369
|
+
j(S.$slots, U, ce(Se(q)), void 0, !0)
|
|
1359
1370
|
])
|
|
1360
1371
|
}))
|
|
1361
1372
|
]), 1032, ["items", "is-option-disabled", "is-multi-level", "static-categories", "searching", "selected-items-list", "focused-index", "items-index", "role"])
|
|
1362
|
-
], 16,
|
|
1363
|
-
[b(
|
|
1373
|
+
], 16, Kl)), [
|
|
1374
|
+
[b(ze)]
|
|
1364
1375
|
])
|
|
1365
1376
|
], 512));
|
|
1366
1377
|
}
|
|
1367
|
-
}),
|
|
1378
|
+
}), ht = /* @__PURE__ */ ee(Yl, [["__scopeId", "data-v-dc9c0984"]]), Bt = (e, l = 300) => {
|
|
1368
1379
|
let n;
|
|
1369
1380
|
return (...a) => {
|
|
1370
1381
|
n && clearTimeout(n), n = setTimeout(() => e(...a), l);
|
|
1371
1382
|
};
|
|
1372
|
-
},
|
|
1383
|
+
}, St = {
|
|
1373
1384
|
"de-DE": { loading: "Laden", showMore: "Mehr anzeigen" },
|
|
1374
1385
|
"en-GB": { loading: "Loading", showMore: "Show more" },
|
|
1375
1386
|
"en-US": { loading: "Loading", showMore: "Show more" },
|
|
@@ -1380,18 +1391,18 @@ const Vl = /* @__PURE__ */ ee(Ml, [["render", Fl], ["__scopeId", "data-v-237dfc5
|
|
|
1380
1391
|
"ja-JP": { loading: "読み込み中", showMore: "さらに表示" },
|
|
1381
1392
|
"pt-BR": { loading: "Carregando", showMore: "Mostrar mais" },
|
|
1382
1393
|
"zh-CN": { loading: "正在加载", showMore: "显示更多" }
|
|
1383
|
-
},
|
|
1394
|
+
}, Wl = 36, jl = Z({
|
|
1384
1395
|
name: "bento-listbox",
|
|
1385
1396
|
components: {
|
|
1386
|
-
BentoEmptyState:
|
|
1387
|
-
BentoListboxSingleSelect:
|
|
1388
|
-
BentoListboxMultiSelect:
|
|
1397
|
+
BentoEmptyState: Wt,
|
|
1398
|
+
BentoListboxSingleSelect: Ol,
|
|
1399
|
+
BentoListboxMultiSelect: ht,
|
|
1389
1400
|
BentoTypography: Ie,
|
|
1390
|
-
BentoLoadingIndicator:
|
|
1391
|
-
BentoLoadingButton:
|
|
1401
|
+
BentoLoadingIndicator: Yt,
|
|
1402
|
+
BentoLoadingButton: Zt
|
|
1392
1403
|
},
|
|
1393
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
1394
|
-
i18n: { messages:
|
|
1404
|
+
directives: { BentoKeyboardNavigationDirective: ze },
|
|
1405
|
+
i18n: { messages: St },
|
|
1395
1406
|
props: {
|
|
1396
1407
|
/**
|
|
1397
1408
|
* Defines a string value that labels an interactive element.
|
|
@@ -1472,7 +1483,7 @@ const Vl = /* @__PURE__ */ ee(Ml, [["render", Fl], ["__scopeId", "data-v-237dfc5
|
|
|
1472
1483
|
*
|
|
1473
1484
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1474
1485
|
*/
|
|
1475
|
-
searching:
|
|
1486
|
+
searching: ht.props.searching,
|
|
1476
1487
|
/**
|
|
1477
1488
|
* The `input` value.
|
|
1478
1489
|
* Providing an empty string or empty array will select no options.
|
|
@@ -1492,116 +1503,116 @@ const Vl = /* @__PURE__ */ ee(Ml, [["render", Fl], ["__scopeId", "data-v-237dfc5
|
|
|
1492
1503
|
}
|
|
1493
1504
|
},
|
|
1494
1505
|
emits: [
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1506
|
+
y.SELECT,
|
|
1507
|
+
y.SPACE,
|
|
1508
|
+
y.SHOW_MORE,
|
|
1509
|
+
y.ENTER,
|
|
1510
|
+
y.ESCAPE,
|
|
1511
|
+
y.TAB
|
|
1501
1512
|
],
|
|
1502
1513
|
setup(e, { emit: l, slots: n }) {
|
|
1503
|
-
const o =
|
|
1514
|
+
const o = w([]), a = ae(e, "items"), { t: s } = ke({ messages: St }), t = d(() => e.lazyLoadType !== Ee.AUTOMATIC), i = d(() => e.lazyLoadType === Ee.AUTOMATIC), h = () => typeof e?.virtualScroll == "object" && e?.virtualScroll?.itemHeight ? e.virtualScroll.itemHeight : Wl, c = !e?.multiple && e?.virtualScroll !== !1 && e?.lazyLoadType === "none", {
|
|
1504
1515
|
containerRef: u,
|
|
1505
1516
|
containerProps: r,
|
|
1506
|
-
onScroll:
|
|
1517
|
+
onScroll: f,
|
|
1507
1518
|
list: v,
|
|
1508
|
-
wrapperProps:
|
|
1509
|
-
scrollToIndex:
|
|
1510
|
-
startIndex:
|
|
1511
|
-
} =
|
|
1512
|
-
itemHeight:
|
|
1519
|
+
wrapperProps: L,
|
|
1520
|
+
scrollToIndex: _,
|
|
1521
|
+
startIndex: g
|
|
1522
|
+
} = sl(a, {
|
|
1523
|
+
itemHeight: h(),
|
|
1513
1524
|
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1514
1525
|
disabled: !c
|
|
1515
|
-
}),
|
|
1526
|
+
}), V = d(() => c ? a.value.length : 0), C = d(
|
|
1516
1527
|
() => e.componentLoading !== void 0 || t.value ? "true" : void 0
|
|
1517
|
-
),
|
|
1528
|
+
), I = d(
|
|
1518
1529
|
() => t.value && e.loading || e.componentLoading ? "true" : "false"
|
|
1519
1530
|
), B = d(
|
|
1520
1531
|
() => t.value || e.componentLoading !== void 0 ? "polite" : void 0
|
|
1521
|
-
),
|
|
1532
|
+
), D = d(
|
|
1522
1533
|
() => ({
|
|
1523
1534
|
"aria-label": e.ariaLabel,
|
|
1524
|
-
"aria-busy":
|
|
1535
|
+
"aria-busy": I.value,
|
|
1525
1536
|
"aria-atomic": C.value,
|
|
1526
1537
|
"aria-live": B.value
|
|
1527
1538
|
})
|
|
1528
|
-
),
|
|
1539
|
+
), A = d(
|
|
1529
1540
|
() => e.componentLoading ? {
|
|
1530
|
-
...
|
|
1541
|
+
...D.value,
|
|
1531
1542
|
role: "alert"
|
|
1532
1543
|
} : {}
|
|
1533
|
-
),
|
|
1534
|
-
l(X,
|
|
1535
|
-
},
|
|
1536
|
-
l(
|
|
1537
|
-
},
|
|
1544
|
+
), P = (X) => (re) => {
|
|
1545
|
+
l(X, re);
|
|
1546
|
+
}, x = () => {
|
|
1547
|
+
l(y.SHOW_MORE);
|
|
1548
|
+
}, $ = Bt(() => {
|
|
1538
1549
|
const X = u.value;
|
|
1539
1550
|
if (!X)
|
|
1540
1551
|
return;
|
|
1541
|
-
const
|
|
1542
|
-
e.hasMoreItems &&
|
|
1543
|
-
}),
|
|
1544
|
-
i.value ?
|
|
1545
|
-
}, G = d(() => e.items?.length === 0),
|
|
1552
|
+
const re = Math.round(X.scrollTop) + X.clientHeight >= X.scrollHeight;
|
|
1553
|
+
e.hasMoreItems && re && !e.loading && x();
|
|
1554
|
+
}), z = () => {
|
|
1555
|
+
i.value ? $() : f();
|
|
1556
|
+
}, G = d(() => e.items?.length === 0), R = d(
|
|
1546
1557
|
() => e.lazyLoadType === Ee.BUTTON && e.hasMoreItems
|
|
1547
1558
|
), Q = d(
|
|
1548
|
-
() => e.loading ?
|
|
1549
|
-
),
|
|
1559
|
+
() => e.loading ? ft.LOADING : ft.START
|
|
1560
|
+
), _e = d(() => e.loading ? s("loading") : s("showMore")), Pe = d(() => ({
|
|
1550
1561
|
...e.emptyState,
|
|
1551
1562
|
variant: "condensed"
|
|
1552
|
-
})),
|
|
1553
|
-
[
|
|
1554
|
-
[
|
|
1555
|
-
[
|
|
1556
|
-
[
|
|
1563
|
+
})), De = {
|
|
1564
|
+
[y.SELECT]: P(y.SELECT),
|
|
1565
|
+
[y.SPACE]: P(y.SPACE),
|
|
1566
|
+
[y.TAB]: P(y.TAB),
|
|
1567
|
+
[y.ENTER]: P(y.ENTER)
|
|
1557
1568
|
};
|
|
1558
1569
|
return {
|
|
1559
1570
|
// Refs
|
|
1560
1571
|
listboxRef: u,
|
|
1561
1572
|
listboxItemRef: o,
|
|
1562
1573
|
// a11y
|
|
1563
|
-
ariaAttributes:
|
|
1564
|
-
listboxContainerAttributes:
|
|
1574
|
+
ariaAttributes: D,
|
|
1575
|
+
listboxContainerAttributes: A,
|
|
1565
1576
|
// Values
|
|
1566
1577
|
containerProps: r,
|
|
1567
1578
|
isSearchResultEmpty: G,
|
|
1568
|
-
limitedEmptyStateProps:
|
|
1579
|
+
limitedEmptyStateProps: Pe,
|
|
1569
1580
|
loadingButtonState: Q,
|
|
1570
1581
|
slots: n,
|
|
1571
|
-
shouldDisplayShowMoreButton:
|
|
1572
|
-
showMoreButtonText:
|
|
1582
|
+
shouldDisplayShowMoreButton: R,
|
|
1583
|
+
showMoreButtonText: _e,
|
|
1573
1584
|
virtualisedItems: v,
|
|
1574
|
-
wrapperProps:
|
|
1585
|
+
wrapperProps: L,
|
|
1575
1586
|
// Virtual scroll
|
|
1576
|
-
totalItemCount:
|
|
1577
|
-
scrollToIndex:
|
|
1578
|
-
virtualScrollStartIndex:
|
|
1587
|
+
totalItemCount: V,
|
|
1588
|
+
scrollToIndex: _,
|
|
1589
|
+
virtualScrollStartIndex: g,
|
|
1579
1590
|
// Enums
|
|
1580
1591
|
BentoKeyboardNavigationKeyDownEvent: H,
|
|
1581
|
-
BentoListboxEvent:
|
|
1592
|
+
BentoListboxEvent: y,
|
|
1582
1593
|
// Methods
|
|
1583
|
-
onListboxContainerScroll:
|
|
1584
|
-
onOptionSelected:
|
|
1585
|
-
emitShowMore:
|
|
1586
|
-
listboxListeners:
|
|
1594
|
+
onListboxContainerScroll: z,
|
|
1595
|
+
onOptionSelected: P,
|
|
1596
|
+
emitShowMore: x,
|
|
1597
|
+
listboxListeners: De
|
|
1587
1598
|
};
|
|
1588
1599
|
}
|
|
1589
|
-
}),
|
|
1600
|
+
}), Hl = ["id"], Jl = {
|
|
1590
1601
|
key: 0,
|
|
1591
1602
|
class: "b-listbox__loading-filtered-items"
|
|
1592
|
-
},
|
|
1603
|
+
}, Xl = {
|
|
1593
1604
|
key: 1,
|
|
1594
1605
|
class: "b-listbox__empty-search-message"
|
|
1595
|
-
},
|
|
1606
|
+
}, Zl = {
|
|
1596
1607
|
key: 2,
|
|
1597
1608
|
class: "b-listbox__lazy-load"
|
|
1598
|
-
},
|
|
1609
|
+
}, Ql = {
|
|
1599
1610
|
key: 3,
|
|
1600
1611
|
class: "b-listbox__lazy-load"
|
|
1601
1612
|
};
|
|
1602
|
-
function
|
|
1603
|
-
const t = K("bento-loading-indicator"), i = K("bento-empty-state"),
|
|
1604
|
-
return
|
|
1613
|
+
function eo(e, l, n, o, a, s) {
|
|
1614
|
+
const t = K("bento-loading-indicator"), i = K("bento-empty-state"), h = K("bento-typography"), c = K("bento-listbox-multi-select"), u = K("bento-listbox-single-select"), r = K("bento-loading-button"), f = Ot("bento-keyboard-navigation-directive");
|
|
1615
|
+
return ue((p(), E("div", M({
|
|
1605
1616
|
id: e.id,
|
|
1606
1617
|
ref: "listboxRef",
|
|
1607
1618
|
class: "b-listbox",
|
|
@@ -1611,21 +1622,21 @@ function Ql(e, l, n, o, a, s) {
|
|
|
1611
1622
|
"data-testid": "listbox-container",
|
|
1612
1623
|
onScroll: l[0] || (l[0] = (...v) => e.onListboxContainerScroll && e.onListboxContainerScroll(...v))
|
|
1613
1624
|
}), [
|
|
1614
|
-
|
|
1615
|
-
e.componentLoading ? (p(), E("div",
|
|
1616
|
-
|
|
1617
|
-
])) : e.isSearchResultEmpty ? (p(), E("div",
|
|
1618
|
-
e.emptyState ? (p(), N(i,
|
|
1625
|
+
W("div", ce(Se(e.wrapperProps)), [
|
|
1626
|
+
e.componentLoading ? (p(), E("div", Jl, [
|
|
1627
|
+
F(t)
|
|
1628
|
+
])) : e.isSearchResultEmpty ? (p(), E("div", Xl, [
|
|
1629
|
+
e.emptyState ? (p(), N(i, ce(M({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (p(), N(h, {
|
|
1619
1630
|
key: 1,
|
|
1620
1631
|
el: "span"
|
|
1621
1632
|
}, {
|
|
1622
|
-
default:
|
|
1623
|
-
oe(
|
|
1633
|
+
default: k(() => [
|
|
1634
|
+
oe(Y(e.noResultsMessage), 1)
|
|
1624
1635
|
]),
|
|
1625
1636
|
_: 1
|
|
1626
1637
|
}))
|
|
1627
|
-
])) : (p(), E(
|
|
1628
|
-
e.multiple ? (p(), N(c,
|
|
1638
|
+
])) : (p(), E(pe, { key: 2 }, [
|
|
1639
|
+
e.multiple ? (p(), N(c, M({
|
|
1629
1640
|
key: 0,
|
|
1630
1641
|
ref: "listboxItemRef",
|
|
1631
1642
|
"has-more-items": e.hasMoreItems
|
|
@@ -1636,14 +1647,14 @@ function Ql(e, l, n, o, a, s) {
|
|
|
1636
1647
|
"selected-values": e.selectedValue,
|
|
1637
1648
|
searching: e.searching,
|
|
1638
1649
|
"is-option-disabled": e.isOptionDisabled
|
|
1639
|
-
},
|
|
1640
|
-
le(e.slots, (v,
|
|
1641
|
-
name:
|
|
1642
|
-
fn:
|
|
1643
|
-
|
|
1650
|
+
}, ie(e.listboxListeners)), ve({ _: 2 }, [
|
|
1651
|
+
le(e.slots, (v, L) => ({
|
|
1652
|
+
name: L,
|
|
1653
|
+
fn: k((_) => [
|
|
1654
|
+
j(e.$slots, L, ce(Se(_)), void 0, !0)
|
|
1644
1655
|
])
|
|
1645
1656
|
}))
|
|
1646
|
-
]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (p(), N(u,
|
|
1657
|
+
]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (p(), N(u, M({
|
|
1647
1658
|
key: 1,
|
|
1648
1659
|
ref: "listboxItemRef",
|
|
1649
1660
|
items: e.virtualisedItems,
|
|
@@ -1654,56 +1665,56 @@ function Ql(e, l, n, o, a, s) {
|
|
|
1654
1665
|
"selected-value": e.selectedValue,
|
|
1655
1666
|
"static-categories": e.staticCategories,
|
|
1656
1667
|
"is-option-disabled": e.isOptionDisabled
|
|
1657
|
-
},
|
|
1658
|
-
le(e.slots, (v,
|
|
1659
|
-
name:
|
|
1660
|
-
fn:
|
|
1661
|
-
|
|
1668
|
+
}, ie(e.listboxListeners)), ve({ _: 2 }, [
|
|
1669
|
+
le(e.slots, (v, L) => ({
|
|
1670
|
+
name: L,
|
|
1671
|
+
fn: k((_) => [
|
|
1672
|
+
j(e.$slots, L, ce(Se(_)), void 0, !0)
|
|
1662
1673
|
])
|
|
1663
1674
|
}))
|
|
1664
1675
|
]), 1040, ["items", "total-item-count", "scroll-to-index", "virtual-scroll-start-index", "selected-value", "static-categories", "is-option-disabled"])),
|
|
1665
|
-
e.shouldDisplayShowMoreButton ? (p(), E("div",
|
|
1666
|
-
|
|
1676
|
+
e.shouldDisplayShowMoreButton ? (p(), E("div", Zl, [
|
|
1677
|
+
F(r, {
|
|
1667
1678
|
state: e.loadingButtonState,
|
|
1668
1679
|
variant: "secondary",
|
|
1669
1680
|
onClickCapture: e.emitShowMore
|
|
1670
1681
|
}, {
|
|
1671
|
-
default:
|
|
1672
|
-
oe(
|
|
1682
|
+
default: k(() => [
|
|
1683
|
+
oe(Y(e.showMoreButtonText), 1)
|
|
1673
1684
|
]),
|
|
1674
1685
|
_: 1
|
|
1675
1686
|
}, 8, ["state", "onClickCapture"])
|
|
1676
|
-
])) : e.loading ? (p(), E("div",
|
|
1677
|
-
|
|
1687
|
+
])) : e.loading ? (p(), E("div", Ql, [
|
|
1688
|
+
F(t)
|
|
1678
1689
|
])) : J("", !0)
|
|
1679
1690
|
], 64))
|
|
1680
1691
|
], 16)
|
|
1681
|
-
], 16,
|
|
1682
|
-
[
|
|
1692
|
+
], 16, Hl)), [
|
|
1693
|
+
[f]
|
|
1683
1694
|
]);
|
|
1684
1695
|
}
|
|
1685
|
-
const
|
|
1696
|
+
const it = /* @__PURE__ */ ee(jl, [["render", eo], ["__scopeId", "data-v-7026ea79"]]), rt = (e, l) => {
|
|
1686
1697
|
for (const n of e) {
|
|
1687
1698
|
if (n.value === l)
|
|
1688
1699
|
return n;
|
|
1689
1700
|
if (n.items) {
|
|
1690
|
-
const o =
|
|
1701
|
+
const o = rt(n.items, l);
|
|
1691
1702
|
if (o)
|
|
1692
1703
|
return o;
|
|
1693
1704
|
}
|
|
1694
1705
|
}
|
|
1695
1706
|
return null;
|
|
1696
|
-
},
|
|
1697
|
-
const a =
|
|
1707
|
+
}, to = (e) => typeof e == "object" && e !== null && "value" in e && "label" in e, lo = (e, l, n, o) => {
|
|
1708
|
+
const a = w([]), s = w(), t = (u) => {
|
|
1698
1709
|
n.value ? s.value = u.map(({ value: r }) => r) : s.value = u.length > 0 ? u[0].value : null;
|
|
1699
1710
|
}, i = (u) => {
|
|
1700
|
-
n.value ? s.value = u.map(({ value: r, label:
|
|
1701
|
-
},
|
|
1711
|
+
n.value ? s.value = u.map(({ value: r, label: f }) => ({ value: r, label: f })) : s.value = u.length > 0 ? { value: u[0].value, label: u[0].label } : null;
|
|
1712
|
+
}, h = (u) => {
|
|
1702
1713
|
a.value = u, o?.value ? i(u) : t(u);
|
|
1703
1714
|
}, c = () => {
|
|
1704
1715
|
a.value = [], s.value = null;
|
|
1705
1716
|
};
|
|
1706
|
-
return
|
|
1717
|
+
return Ce(
|
|
1707
1718
|
() => l.value,
|
|
1708
1719
|
() => {
|
|
1709
1720
|
if (!l.value && l.value !== 0) {
|
|
@@ -1712,20 +1723,20 @@ const nt = /* @__PURE__ */ ee(Wl, [["render", Ql], ["__scopeId", "data-v-7026ea7
|
|
|
1712
1723
|
}
|
|
1713
1724
|
const u = !Array.isArray(l.value), r = [...a.value];
|
|
1714
1725
|
c();
|
|
1715
|
-
const
|
|
1716
|
-
if (
|
|
1726
|
+
const f = (v) => {
|
|
1727
|
+
if (to(v))
|
|
1717
1728
|
a.value.push(v);
|
|
1718
1729
|
else {
|
|
1719
|
-
let
|
|
1720
|
-
|
|
1730
|
+
let L = rt(e.value, v);
|
|
1731
|
+
L || (L = rt(r, v)), L || (L = { value: v, label: v.toString() }), a.value.push(L);
|
|
1721
1732
|
}
|
|
1722
1733
|
};
|
|
1723
1734
|
if (u) {
|
|
1724
1735
|
const v = l.value;
|
|
1725
|
-
|
|
1736
|
+
f(v), o?.value ? i(a.value) : t(a.value);
|
|
1726
1737
|
return;
|
|
1727
1738
|
}
|
|
1728
|
-
l.value.forEach(
|
|
1739
|
+
l.value.forEach(f), o?.value ? i(a.value) : t(a.value);
|
|
1729
1740
|
},
|
|
1730
1741
|
{ immediate: !0 }
|
|
1731
1742
|
), {
|
|
@@ -1734,11 +1745,11 @@ const nt = /* @__PURE__ */ ee(Wl, [["render", Ql], ["__scopeId", "data-v-7026ea7
|
|
|
1734
1745
|
cachedListboxSelectedValues: s,
|
|
1735
1746
|
// Methods
|
|
1736
1747
|
resetCache: c,
|
|
1737
|
-
setCachedValues:
|
|
1748
|
+
setCachedValues: h
|
|
1738
1749
|
};
|
|
1739
1750
|
};
|
|
1740
|
-
var
|
|
1741
|
-
const
|
|
1751
|
+
var Me = /* @__PURE__ */ ((e) => (e.DEFAULT = "DropdownInputDefault", e.SMALL = "DropdownInputSmall", e))(Me || {});
|
|
1752
|
+
const bt = {
|
|
1742
1753
|
"de-DE": { apply: "Anwenden", cancel: "Abbrechen", noOptionsMatchThisSearch: "Für diese Suche wurden keine Ergebnisse gefunden." },
|
|
1743
1754
|
"en-GB": { apply: "Apply", cancel: "Cancel", noOptionsMatchThisSearch: "No options match this search" },
|
|
1744
1755
|
"en-US": { apply: "Apply", cancel: "Cancel", noOptionsMatchThisSearch: "No options match this search" },
|
|
@@ -1749,17 +1760,17 @@ const pt = {
|
|
|
1749
1760
|
"ja-JP": { apply: "適用", cancel: "キャンセル", noOptionsMatchThisSearch: "この検索に一致するオプションはありません" },
|
|
1750
1761
|
"pt-BR": { apply: "Aplicar", cancel: "Cancelar", noOptionsMatchThisSearch: "Nenhuma opção corresponde a esta busca" },
|
|
1751
1762
|
"zh-CN": { apply: "应用", cancel: "取消", noOptionsMatchThisSearch: "没有符合此搜索条件的选项" }
|
|
1752
|
-
},
|
|
1753
|
-
const a =
|
|
1754
|
-
|
|
1763
|
+
}, oo = (e, l, n, o) => {
|
|
1764
|
+
const a = w(e.value), { t: s } = ke({ messages: bt });
|
|
1765
|
+
Ce(e, () => {
|
|
1755
1766
|
a.value = e.value;
|
|
1756
1767
|
});
|
|
1757
1768
|
const t = d(
|
|
1758
1769
|
() => JSON.stringify(a.value) === JSON.stringify(e.value)
|
|
1759
1770
|
), i = () => {
|
|
1760
|
-
o(
|
|
1761
|
-
},
|
|
1762
|
-
a.value = e.value, o(
|
|
1771
|
+
o(y.SELECT, a.value), o(y.CLOSE_DROPDOWN);
|
|
1772
|
+
}, h = () => {
|
|
1773
|
+
a.value = e.value, o(y.CLOSE_DROPDOWN);
|
|
1763
1774
|
}, c = () => {
|
|
1764
1775
|
n.value && l.value && (a.value = e.value);
|
|
1765
1776
|
}, u = d(() => [
|
|
@@ -1770,41 +1781,41 @@ const pt = {
|
|
|
1770
1781
|
},
|
|
1771
1782
|
{
|
|
1772
1783
|
title: s("cancel"),
|
|
1773
|
-
event:
|
|
1784
|
+
event: h
|
|
1774
1785
|
}
|
|
1775
1786
|
]), r = (C) => {
|
|
1776
|
-
a.value = C, l.value || o(
|
|
1777
|
-
},
|
|
1778
|
-
r(C), o(
|
|
1787
|
+
a.value = C, l.value || o(y.SELECT, C);
|
|
1788
|
+
}, f = (C) => {
|
|
1789
|
+
r(C), o(y.TAB);
|
|
1779
1790
|
}, v = (C) => {
|
|
1780
|
-
r(C), o(
|
|
1781
|
-
},
|
|
1782
|
-
r(C), o(
|
|
1783
|
-
},
|
|
1784
|
-
|
|
1785
|
-
},
|
|
1786
|
-
o(
|
|
1787
|
-
},
|
|
1788
|
-
[
|
|
1789
|
-
[
|
|
1790
|
-
[
|
|
1791
|
-
[
|
|
1792
|
-
[
|
|
1791
|
+
r(C), o(y.ENTER);
|
|
1792
|
+
}, L = (C) => {
|
|
1793
|
+
r(C), o(y.SPACE);
|
|
1794
|
+
}, _ = () => {
|
|
1795
|
+
h(), o(y.ESCAPE);
|
|
1796
|
+
}, g = () => {
|
|
1797
|
+
o(y.SHOW_MORE);
|
|
1798
|
+
}, V = {
|
|
1799
|
+
[y.SELECT]: r,
|
|
1800
|
+
[y.SHOW_MORE]: g,
|
|
1801
|
+
[y.TAB]: f,
|
|
1802
|
+
[y.SPACE]: L,
|
|
1803
|
+
[y.ENTER]: v
|
|
1793
1804
|
};
|
|
1794
1805
|
return {
|
|
1795
1806
|
// Values
|
|
1796
1807
|
actions: u,
|
|
1797
1808
|
internalSelectedValue: a,
|
|
1798
1809
|
// Methods
|
|
1799
|
-
listeners:
|
|
1800
|
-
onEscapeKey:
|
|
1810
|
+
listeners: V,
|
|
1811
|
+
onEscapeKey: _,
|
|
1801
1812
|
onOutsideDropdownClick: c
|
|
1802
1813
|
};
|
|
1803
|
-
},
|
|
1804
|
-
i18n: { messages:
|
|
1814
|
+
}, ao = Z({
|
|
1815
|
+
i18n: { messages: bt },
|
|
1805
1816
|
name: "bento-dropdown-options-container"
|
|
1806
|
-
}),
|
|
1807
|
-
...
|
|
1817
|
+
}), so = /* @__PURE__ */ Z({
|
|
1818
|
+
...ao,
|
|
1808
1819
|
props: {
|
|
1809
1820
|
/**
|
|
1810
1821
|
* Defines a string value that labels an interactive element.
|
|
@@ -1894,7 +1905,7 @@ const pt = {
|
|
|
1894
1905
|
*
|
|
1895
1906
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1896
1907
|
*/
|
|
1897
|
-
searching:
|
|
1908
|
+
searching: it.props.searching,
|
|
1898
1909
|
/**
|
|
1899
1910
|
* If enabled, dropdown will display non-selectable, static categories
|
|
1900
1911
|
*/
|
|
@@ -1903,7 +1914,7 @@ const pt = {
|
|
|
1903
1914
|
* Reference to the DOM element or Vue component for positioning
|
|
1904
1915
|
* the Dropdown container.
|
|
1905
1916
|
*/
|
|
1906
|
-
targetElement: { type:
|
|
1917
|
+
targetElement: { type: mt.props.targetElement.type, required: !0 },
|
|
1907
1918
|
/**
|
|
1908
1919
|
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
1909
1920
|
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
@@ -1914,19 +1925,19 @@ const pt = {
|
|
|
1914
1925
|
}
|
|
1915
1926
|
},
|
|
1916
1927
|
setup(e, { expose: l, emit: n }) {
|
|
1917
|
-
const o =
|
|
1928
|
+
const o = Ge(), a = n, s = e, { selectedValue: t, multiple: i } = Lt(s), h = w(null), { t: c } = ke({ messages: bt }), u = d(() => s.open && !s.disabled), r = d(() => c("noOptionsMatchThisSearch")), f = d(() => ({
|
|
1918
1929
|
"b-dropdown-options-container--single": !s?.multiple
|
|
1919
1930
|
})), v = d(() => ({
|
|
1920
1931
|
"b-dropdown-options-container__listbox--single": !s?.multiple
|
|
1921
|
-
})), { actions:
|
|
1922
|
-
const
|
|
1932
|
+
})), { actions: L, internalSelectedValue: _, listeners: g, onEscapeKey: V, onOutsideDropdownClick: C } = oo(t, i, u, a), I = d(() => s?.multiple ? Qt : mt), B = d(() => {
|
|
1933
|
+
const D = {
|
|
1923
1934
|
"min-width": `${s?.targetElement?.clientWidth}px`,
|
|
1924
1935
|
"max-width": "min(500px, 95%)"
|
|
1925
1936
|
};
|
|
1926
1937
|
return s?.multiple ? {
|
|
1927
1938
|
actionsLayout: "space-between",
|
|
1928
1939
|
ariaLabel: s.ariaLabel,
|
|
1929
|
-
actions:
|
|
1940
|
+
actions: L.value,
|
|
1930
1941
|
divider: !0,
|
|
1931
1942
|
fallbackPosition: ["top-start"],
|
|
1932
1943
|
id: Oe(`dropdown-options-${s.id}`),
|
|
@@ -1934,7 +1945,7 @@ const pt = {
|
|
|
1934
1945
|
position: "bottom-start",
|
|
1935
1946
|
style: {
|
|
1936
1947
|
width: "auto",
|
|
1937
|
-
...
|
|
1948
|
+
...D
|
|
1938
1949
|
},
|
|
1939
1950
|
targetElement: s.targetElement
|
|
1940
1951
|
} : {
|
|
@@ -1943,36 +1954,36 @@ const pt = {
|
|
|
1943
1954
|
position: "bottom-start",
|
|
1944
1955
|
style: {
|
|
1945
1956
|
display: u.value ? "block" : "none",
|
|
1946
|
-
...
|
|
1957
|
+
...D
|
|
1947
1958
|
},
|
|
1948
1959
|
targetElement: s.targetElement
|
|
1949
1960
|
};
|
|
1950
1961
|
});
|
|
1951
1962
|
return l({
|
|
1952
1963
|
onOutsideDropdownClick: C
|
|
1953
|
-
}), (
|
|
1964
|
+
}), (D, A) => u.value ? (p(), N(It(I.value), M({
|
|
1954
1965
|
key: 0,
|
|
1955
|
-
class: ["b-dropdown-options-container",
|
|
1966
|
+
class: ["b-dropdown-options-container", f.value]
|
|
1956
1967
|
}, B.value), {
|
|
1957
|
-
default:
|
|
1958
|
-
|
|
1959
|
-
onKeydown:
|
|
1968
|
+
default: k(() => [
|
|
1969
|
+
W("div", {
|
|
1970
|
+
onKeydown: A[0] || (A[0] = me(
|
|
1960
1971
|
//@ts-ignore
|
|
1961
|
-
(...
|
|
1972
|
+
(...P) => b(V) && b(V)(...P),
|
|
1962
1973
|
["esc"]
|
|
1963
1974
|
))
|
|
1964
1975
|
}, [
|
|
1965
|
-
|
|
1976
|
+
F(b(it), M({
|
|
1966
1977
|
id: e.id,
|
|
1967
1978
|
ref_key: "dropdownOptionsListboxRef",
|
|
1968
|
-
ref:
|
|
1979
|
+
ref: h,
|
|
1969
1980
|
"aria-label": e.ariaLabel,
|
|
1970
1981
|
class: ["b-dropdown-options-container__listbox", v.value],
|
|
1971
1982
|
"component-loading": e.componentLoading,
|
|
1972
1983
|
"empty-state": e.emptyState,
|
|
1973
1984
|
"is-option-disabled": e.isOptionDisabled,
|
|
1974
1985
|
items: e.items,
|
|
1975
|
-
"selected-value": b(
|
|
1986
|
+
"selected-value": b(_),
|
|
1976
1987
|
multiple: b(i),
|
|
1977
1988
|
"static-categories": e.staticCategories,
|
|
1978
1989
|
"no-results-message": r.value,
|
|
@@ -1981,11 +1992,11 @@ const pt = {
|
|
|
1981
1992
|
"lazy-load-type": e.lazyLoadType,
|
|
1982
1993
|
"has-more-items": e.hasMoreItems,
|
|
1983
1994
|
"virtual-scroll": e.virtualScroll
|
|
1984
|
-
},
|
|
1985
|
-
le(b(o), (
|
|
1986
|
-
name:
|
|
1987
|
-
fn:
|
|
1988
|
-
|
|
1995
|
+
}, ie(b(g))), ve({ _: 2 }, [
|
|
1996
|
+
le(b(o), (P, x) => ({
|
|
1997
|
+
name: x,
|
|
1998
|
+
fn: k(($) => [
|
|
1999
|
+
j(D.$slots, x, ce(Se($)), void 0, !0)
|
|
1989
2000
|
])
|
|
1990
2001
|
}))
|
|
1991
2002
|
]), 1040, ["id", "aria-label", "class", "component-loading", "empty-state", "is-option-disabled", "items", "selected-value", "multiple", "static-categories", "no-results-message", "searching", "loading", "lazy-load-type", "has-more-items", "virtual-scroll"])
|
|
@@ -1994,9 +2005,9 @@ const pt = {
|
|
|
1994
2005
|
_: 3
|
|
1995
2006
|
}, 16, ["class"])) : J("", !0);
|
|
1996
2007
|
}
|
|
1997
|
-
}),
|
|
1998
|
-
var
|
|
1999
|
-
const
|
|
2008
|
+
}), no = /* @__PURE__ */ ee(so, [["__scopeId", "data-v-f5790908"]]);
|
|
2009
|
+
var be = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.READONLY = "readonly", e.HAS_ITEMS = "has-items", e.OPENED = "opened", e.ERROR = "error", e))(be || {}), te = /* @__PURE__ */ ((e) => (e.OPEN = "dropdown-base-open", e.KEYDOWN = "dropdown-base-keydown", e.CLOSE = "dropdown-base-close", e.INPUT = "dropdown-base-input", e.CLEAR = "dropdown-base-clear", e))(te || {});
|
|
2010
|
+
const io = /* @__PURE__ */ Symbol("dropdown small size injection key"), Rt = /* @__PURE__ */ Symbol("dropdown underline style injection key"), Mt = {
|
|
2000
2011
|
"de-DE": { clearSearch: "Suche löschen" },
|
|
2001
2012
|
"en-GB": { clearSearch: "Clear search" },
|
|
2002
2013
|
"en-US": { clearSearch: "Clear search" },
|
|
@@ -2007,22 +2018,22 @@ const no = /* @__PURE__ */ Symbol("dropdown small size injection key"), xt = /*
|
|
|
2007
2018
|
"ja-JP": { clearSearch: "検索をクリア" },
|
|
2008
2019
|
"pt-BR": { clearSearch: "Limpar busca" },
|
|
2009
2020
|
"zh-CN": { clearSearch: "清除搜索" }
|
|
2010
|
-
},
|
|
2021
|
+
}, ro = ["id", "value", "disabled", "readonly", "required"], co = ["id", "aria-readonly", "tabindex"], uo = {
|
|
2011
2022
|
key: 1,
|
|
2012
2023
|
class: "b-dropdown-base-textbox__input-multiple-selected"
|
|
2013
|
-
},
|
|
2024
|
+
}, po = { class: "b-dropdown-base-textbox__input-selected-element" }, bo = {
|
|
2014
2025
|
key: 2,
|
|
2015
2026
|
class: "b-dropdown-base-textbox__additional-items"
|
|
2016
|
-
},
|
|
2027
|
+
}, fo = {
|
|
2017
2028
|
key: 3,
|
|
2018
2029
|
class: "b-dropdown-base-textbox__icon",
|
|
2019
2030
|
"aria-hidden": "true"
|
|
2020
|
-
},
|
|
2021
|
-
i18n: { messages:
|
|
2031
|
+
}, mo = ["tabindex", "onKeydown"], vo = Z({
|
|
2032
|
+
i18n: { messages: Mt },
|
|
2022
2033
|
name: "dropdown-base-textbox",
|
|
2023
2034
|
inheritAttrs: !1
|
|
2024
|
-
}),
|
|
2025
|
-
...
|
|
2035
|
+
}), yo = /* @__PURE__ */ Z({
|
|
2036
|
+
...vo,
|
|
2026
2037
|
props: {
|
|
2027
2038
|
/**
|
|
2028
2039
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -2107,16 +2118,16 @@ const no = /* @__PURE__ */ Symbol("dropdown small size injection key"), xt = /*
|
|
|
2107
2118
|
}
|
|
2108
2119
|
},
|
|
2109
2120
|
setup(e, { expose: l, emit: n }) {
|
|
2110
|
-
const { t: o } = ke({ messages:
|
|
2111
|
-
[`b-dropdown-base-textbox--${
|
|
2112
|
-
[`b-dropdown-base-textbox--${
|
|
2113
|
-
[`b-dropdown-base-textbox--${
|
|
2121
|
+
const { t: o } = ke({ messages: Mt }), a = dt(), s = Ge(), t = Tt(s), i = e, h = n, c = w(null), u = Oe("textbox"), r = ct(Rt, !1), f = d(() => ({
|
|
2122
|
+
[`b-dropdown-base-textbox--${be.DISABLED}`]: i.disabled,
|
|
2123
|
+
[`b-dropdown-base-textbox--${be.READONLY}`]: i.readonly,
|
|
2124
|
+
[`b-dropdown-base-textbox--${be.HAS_ITEMS}`]: !!i.additionalItemsSelected,
|
|
2114
2125
|
"b-dropdown-base-textbox--underline": r
|
|
2115
2126
|
})), v = d(
|
|
2116
2127
|
() => C.value && a["aria-required"] ? "true" : null
|
|
2117
|
-
),
|
|
2128
|
+
), L = d(() => ({
|
|
2118
2129
|
"b-dropdown-base-textbox__input--dynamic-filtering": i.dynamicFiltering
|
|
2119
|
-
})),
|
|
2130
|
+
})), _ = d(() => i.dynamicFiltering && !!i.value && i.open), g = d(
|
|
2120
2131
|
() => ({
|
|
2121
2132
|
"aria-haspopup": "listbox",
|
|
2122
2133
|
"aria-controls": i.ariaControls,
|
|
@@ -2128,46 +2139,46 @@ const no = /* @__PURE__ */ Symbol("dropdown small size injection key"), xt = /*
|
|
|
2128
2139
|
"aria-disabled": i.disabled ? !0 : null,
|
|
2129
2140
|
"aria-required": a["aria-required"]
|
|
2130
2141
|
})
|
|
2131
|
-
),
|
|
2142
|
+
), V = d(
|
|
2132
2143
|
() => i.multiple ? i.selectedValueItem : []
|
|
2133
|
-
), C = d(() => i.dynamicFiltering && (i.open || i.alwaysComboboxIsInput)),
|
|
2134
|
-
() => i.multiple && i.selectedValueItem &&
|
|
2144
|
+
), C = d(() => i.dynamicFiltering && (i.open || i.alwaysComboboxIsInput)), I = d(() => i.selectedValueItem && !i.multiple), B = d(
|
|
2145
|
+
() => i.multiple && i.selectedValueItem && V.value.length > 0 && i.showSlotContentInMultiple
|
|
2135
2146
|
);
|
|
2136
|
-
|
|
2147
|
+
Ce(
|
|
2137
2148
|
() => C.value,
|
|
2138
2149
|
() => {
|
|
2139
|
-
C.value && !i.alwaysComboboxIsInput &&
|
|
2150
|
+
C.value && !i.alwaysComboboxIsInput && ne(() => {
|
|
2140
2151
|
c.value.focus();
|
|
2141
2152
|
});
|
|
2142
2153
|
}
|
|
2143
2154
|
);
|
|
2144
|
-
const
|
|
2145
|
-
!i.disabled && !i.readonly && (
|
|
2146
|
-
},
|
|
2147
|
-
i.open && (c.value.focus(),
|
|
2148
|
-
},
|
|
2149
|
-
|
|
2150
|
-
},
|
|
2151
|
-
!i.readonly && !i.disabled ?
|
|
2155
|
+
const D = async () => {
|
|
2156
|
+
!i.disabled && !i.readonly && (h(te.OPEN), await ne(), c.value.focus());
|
|
2157
|
+
}, A = () => {
|
|
2158
|
+
i.open && (c.value.focus(), h(te.CLOSE));
|
|
2159
|
+
}, P = (G) => i.open && G.target.tagName === "INPUT" ? null : i.open ? A() : D(), x = () => {
|
|
2160
|
+
h(te.CLEAR), h(te.INPUT, ""), c.value.focus();
|
|
2161
|
+
}, $ = (G) => {
|
|
2162
|
+
!i.readonly && !i.disabled ? h(te.INPUT, G.target.value) : (G.preventDefault(), G.stopPropagation());
|
|
2152
2163
|
};
|
|
2153
2164
|
return l({
|
|
2154
2165
|
focus: () => {
|
|
2155
2166
|
c.value.focus();
|
|
2156
2167
|
}
|
|
2157
|
-
}), (G,
|
|
2158
|
-
class:
|
|
2168
|
+
}), (G, R) => (p(), E("div", {
|
|
2169
|
+
class: fe(G.$attrs.class),
|
|
2159
2170
|
"data-testid": "textbox-wrapper",
|
|
2160
|
-
onClick:
|
|
2161
|
-
onKeydown:
|
|
2171
|
+
onClick: P,
|
|
2172
|
+
onKeydown: me(A, ["escape"])
|
|
2162
2173
|
}, [
|
|
2163
|
-
|
|
2164
|
-
class:
|
|
2174
|
+
F(b(Ie), {
|
|
2175
|
+
class: fe(["b-dropdown-base-textbox", f.value]),
|
|
2165
2176
|
variant: b(r) ? "title" : "body",
|
|
2166
2177
|
el: "div",
|
|
2167
2178
|
"data-testid": "base-textbox"
|
|
2168
2179
|
}, {
|
|
2169
|
-
default:
|
|
2170
|
-
C.value ? (p(), E("input",
|
|
2180
|
+
default: k(() => [
|
|
2181
|
+
C.value ? (p(), E("input", M({ key: 0 }, g.value, {
|
|
2171
2182
|
id: b(u),
|
|
2172
2183
|
ref_key: "textbox",
|
|
2173
2184
|
ref: c,
|
|
@@ -2181,70 +2192,70 @@ const no = /* @__PURE__ */ Symbol("dropdown small size injection key"), xt = /*
|
|
|
2181
2192
|
readonly: e.readonly,
|
|
2182
2193
|
required: v.value,
|
|
2183
2194
|
onKeydown: [
|
|
2184
|
-
|
|
2185
|
-
|
|
2195
|
+
R[0] || (R[0] = (Q) => G.$emit(b(te).KEYDOWN, Q)),
|
|
2196
|
+
me(P, ["enter"])
|
|
2186
2197
|
],
|
|
2187
|
-
onInput:
|
|
2188
|
-
}), null, 16,
|
|
2198
|
+
onInput: $
|
|
2199
|
+
}), null, 16, ro)) : (p(), E("div", M({
|
|
2189
2200
|
key: 1,
|
|
2190
2201
|
id: b(u)
|
|
2191
|
-
},
|
|
2202
|
+
}, g.value, {
|
|
2192
2203
|
ref_key: "textbox",
|
|
2193
2204
|
ref: c,
|
|
2194
|
-
class: ["b-dropdown-base-textbox__input",
|
|
2205
|
+
class: ["b-dropdown-base-textbox__input", L.value],
|
|
2195
2206
|
"aria-readonly": e.readonly ? "true" : null,
|
|
2196
2207
|
role: "combobox",
|
|
2197
2208
|
tabindex: e.disabled ? -1 : 0
|
|
2198
2209
|
}), [
|
|
2199
|
-
|
|
2200
|
-
b(t)("display-value") ?
|
|
2201
|
-
oe(
|
|
2210
|
+
I.value ? (p(), E(pe, { key: 0 }, [
|
|
2211
|
+
b(t)("display-value") ? j(G.$slots, "display-value", ce(M({ key: 0 }, e.selectedValueItem)), void 0, !0) : j(G.$slots, "default", ce(M({ key: 1 }, e.selectedValueItem)), () => [
|
|
2212
|
+
oe(Y(e.displayValue), 1)
|
|
2202
2213
|
], !0)
|
|
2203
|
-
], 64)) : B.value ? (p(), E("div",
|
|
2204
|
-
(p(!0), E(
|
|
2214
|
+
], 64)) : B.value ? (p(), E("div", uo, [
|
|
2215
|
+
(p(!0), E(pe, null, le(V.value, (Q) => (p(), E("div", {
|
|
2205
2216
|
key: Q.value
|
|
2206
2217
|
}, [
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
oe(
|
|
2218
|
+
W("div", po, [
|
|
2219
|
+
j(G.$slots, "default", M({ ref_for: !0 }, Q), () => [
|
|
2220
|
+
oe(Y(e.displayValue), 1)
|
|
2210
2221
|
], !0)
|
|
2211
2222
|
])
|
|
2212
2223
|
]))), 128))
|
|
2213
|
-
])) : (p(), E(
|
|
2214
|
-
oe(
|
|
2224
|
+
])) : (p(), E(pe, { key: 2 }, [
|
|
2225
|
+
oe(Y(e.displayValue), 1)
|
|
2215
2226
|
], 64))
|
|
2216
|
-
], 16,
|
|
2217
|
-
e.additionalItemsSelected ? (p(), E("span",
|
|
2218
|
-
b(t)("icon") && !
|
|
2219
|
-
|
|
2227
|
+
], 16, co)),
|
|
2228
|
+
e.additionalItemsSelected ? (p(), E("span", bo, Y(e.additionalItemsSelected), 1)) : J("", !0),
|
|
2229
|
+
b(t)("icon") && !_.value ? (p(), E("span", fo, [
|
|
2230
|
+
j(G.$slots, "icon", {}, void 0, !0)
|
|
2220
2231
|
])) : J("", !0),
|
|
2221
|
-
|
|
2232
|
+
_.value ? (p(), E("span", {
|
|
2222
2233
|
key: 4,
|
|
2223
2234
|
class: "b-dropdown-base-textbox__clear-search",
|
|
2224
2235
|
tabindex: e.disabled ? -1 : 0,
|
|
2225
2236
|
"data-testid": "clear-search-button",
|
|
2226
|
-
onClick: Le(
|
|
2227
|
-
onKeydown:
|
|
2228
|
-
onKeyup:
|
|
2237
|
+
onClick: Le(x, ["stop"]),
|
|
2238
|
+
onKeydown: me(Le(x, ["stop"]), ["enter"]),
|
|
2239
|
+
onKeyup: me(x, ["space"])
|
|
2229
2240
|
}, [
|
|
2230
|
-
e.size === b(
|
|
2241
|
+
e.size === b(Me).SMALL ? (p(), N(b(al), {
|
|
2231
2242
|
key: 0,
|
|
2232
2243
|
"svg-title": b(o)("clearSearch")
|
|
2233
|
-
}, null, 8, ["svg-title"])) : (p(), N(b(
|
|
2244
|
+
}, null, 8, ["svg-title"])) : (p(), N(b(ol), {
|
|
2234
2245
|
key: 1,
|
|
2235
2246
|
"svg-title": b(o)("clearSearch")
|
|
2236
2247
|
}, null, 8, ["svg-title"]))
|
|
2237
|
-
], 40,
|
|
2248
|
+
], 40, mo)) : J("", !0)
|
|
2238
2249
|
]),
|
|
2239
2250
|
_: 3
|
|
2240
2251
|
}, 8, ["class", "variant"])
|
|
2241
2252
|
], 34));
|
|
2242
2253
|
}
|
|
2243
|
-
}),
|
|
2254
|
+
}), Nt = /* @__PURE__ */ ee(yo, [["__scopeId", "data-v-d9e852a4"]]), go = { class: "b-dropdown-default-textbox__chevron" }, ho = Z({
|
|
2244
2255
|
name: "dropdown-default-textbox",
|
|
2245
2256
|
inheritAttrs: !1
|
|
2246
|
-
}),
|
|
2247
|
-
...
|
|
2257
|
+
}), So = /* @__PURE__ */ Z({
|
|
2258
|
+
...ho,
|
|
2248
2259
|
props: {
|
|
2249
2260
|
/**
|
|
2250
2261
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -2332,26 +2343,26 @@ const no = /* @__PURE__ */ Symbol("dropdown small size injection key"), xt = /*
|
|
|
2332
2343
|
},
|
|
2333
2344
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
2334
2345
|
setup(e, { expose: l, emit: n }) {
|
|
2335
|
-
const o = n, a =
|
|
2336
|
-
[`b-dropdown-default-textbox--${
|
|
2337
|
-
[`b-dropdown-default-textbox--${
|
|
2338
|
-
[`b-dropdown-default-textbox--${
|
|
2339
|
-
[`b-dropdown-default-textbox--${
|
|
2346
|
+
const o = n, a = Ge(), s = e, t = w(null), i = d(() => ({
|
|
2347
|
+
[`b-dropdown-default-textbox--${be.ERROR}`]: !s.disabled && !s.readonly && s.isInvalid,
|
|
2348
|
+
[`b-dropdown-default-textbox--${be.DISABLED}`]: s.disabled,
|
|
2349
|
+
[`b-dropdown-default-textbox--${be.READONLY}`]: s.readonly,
|
|
2350
|
+
[`b-dropdown-default-textbox--${be.OPENED}`]: s.open,
|
|
2340
2351
|
"b-dropdown-default-textbox--condensed": s.condensed
|
|
2341
|
-
})),
|
|
2342
|
-
o("input",
|
|
2343
|
-
}, u = (
|
|
2344
|
-
o("keydown",
|
|
2345
|
-
}, r = (
|
|
2346
|
-
|
|
2347
|
-
},
|
|
2348
|
-
|
|
2349
|
-
}, v = (
|
|
2350
|
-
|
|
2351
|
-
},
|
|
2352
|
+
})), h = d(() => s.open && !s.disabled && !s.readonly), c = (g) => {
|
|
2353
|
+
o("input", g);
|
|
2354
|
+
}, u = (g) => {
|
|
2355
|
+
o("keydown", g);
|
|
2356
|
+
}, r = (g) => {
|
|
2357
|
+
Re(g), o("open");
|
|
2358
|
+
}, f = (g) => {
|
|
2359
|
+
Re(g), o("close");
|
|
2360
|
+
}, v = (g) => {
|
|
2361
|
+
Re(g), o("clear");
|
|
2362
|
+
}, L = {
|
|
2352
2363
|
[te.INPUT]: c,
|
|
2353
2364
|
[te.OPEN]: r,
|
|
2354
|
-
[te.CLOSE]:
|
|
2365
|
+
[te.CLOSE]: f,
|
|
2355
2366
|
[te.CLEAR]: v,
|
|
2356
2367
|
[te.KEYDOWN]: u
|
|
2357
2368
|
};
|
|
@@ -2359,87 +2370,87 @@ const no = /* @__PURE__ */ Symbol("dropdown small size injection key"), xt = /*
|
|
|
2359
2370
|
focus: () => {
|
|
2360
2371
|
t.value.focus();
|
|
2361
2372
|
}
|
|
2362
|
-
}), (
|
|
2363
|
-
class:
|
|
2373
|
+
}), (g, V) => (p(), E("div", {
|
|
2374
|
+
class: fe(["b-dropdown-default-textbox", i.value]),
|
|
2364
2375
|
"data-testid": "default-textbox"
|
|
2365
2376
|
}, [
|
|
2366
|
-
|
|
2377
|
+
F(Nt, M({
|
|
2367
2378
|
ref_key: "baseTextbox",
|
|
2368
2379
|
ref: t
|
|
2369
|
-
}, { ...
|
|
2380
|
+
}, { ...g.$attrs, ...g.$props }, {
|
|
2370
2381
|
class: "b-dropdown-default-textbox__textbox",
|
|
2371
2382
|
value: e.value
|
|
2372
|
-
},
|
|
2373
|
-
icon:
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
[
|
|
2383
|
+
}, ie(L)), ve({
|
|
2384
|
+
icon: k(() => [
|
|
2385
|
+
W("div", go, [
|
|
2386
|
+
ue(F(b($t), { "svg-title": "opened" }, null, 512), [
|
|
2387
|
+
[Ne, h.value]
|
|
2377
2388
|
]),
|
|
2378
|
-
|
|
2379
|
-
[
|
|
2389
|
+
ue(F(b(At), { "svg-title": "closed" }, null, 512), [
|
|
2390
|
+
[Ne, !h.value]
|
|
2380
2391
|
])
|
|
2381
2392
|
])
|
|
2382
2393
|
]),
|
|
2383
2394
|
_: 2
|
|
2384
2395
|
}, [
|
|
2385
|
-
le(b(a), (C,
|
|
2386
|
-
name:
|
|
2387
|
-
fn:
|
|
2388
|
-
|
|
2396
|
+
le(b(a), (C, I) => ({
|
|
2397
|
+
name: I,
|
|
2398
|
+
fn: k((B) => [
|
|
2399
|
+
j(g.$slots, I, ce(Se(B ?? {})), void 0, !0)
|
|
2389
2400
|
])
|
|
2390
2401
|
}))
|
|
2391
2402
|
]), 1040, ["value"])
|
|
2392
2403
|
], 2));
|
|
2393
2404
|
}
|
|
2394
|
-
}),
|
|
2395
|
-
let
|
|
2396
|
-
const
|
|
2405
|
+
}), Co = /* @__PURE__ */ ee(So, [["__scopeId", "data-v-c3e3ce21"]]);
|
|
2406
|
+
let Ct = 0;
|
|
2407
|
+
const Eo = {
|
|
2397
2408
|
beforeCreate() {
|
|
2398
|
-
this.uuid =
|
|
2409
|
+
this.uuid = Ct.toString(), Ct += 1;
|
|
2399
2410
|
}
|
|
2400
|
-
},
|
|
2401
|
-
function
|
|
2402
|
-
return p(), E("svg",
|
|
2411
|
+
}, Oo = { key: 0 };
|
|
2412
|
+
function Lo(e, l, n, o, a, s) {
|
|
2413
|
+
return p(), E("svg", M({ role: "img" }, e.$attrs, {
|
|
2403
2414
|
class: "ui-assets-icons-16",
|
|
2404
2415
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2405
2416
|
width: "16",
|
|
2406
2417
|
height: "16",
|
|
2407
2418
|
fill: "none"
|
|
2408
2419
|
}), [
|
|
2409
|
-
e.$attrs["svg-title"] ? (p(), E("title",
|
|
2410
|
-
l[0] || (l[0] =
|
|
2420
|
+
e.$attrs["svg-title"] ? (p(), E("title", Oo, Y(e.$attrs["svg-title"]), 1)) : J("", !0),
|
|
2421
|
+
l[0] || (l[0] = W("path", {
|
|
2411
2422
|
fill: "#001222",
|
|
2412
2423
|
d: "M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z"
|
|
2413
2424
|
}, null, -1))
|
|
2414
2425
|
], 16);
|
|
2415
2426
|
}
|
|
2416
|
-
const
|
|
2417
|
-
let
|
|
2418
|
-
const
|
|
2427
|
+
const Io = /* @__PURE__ */ ee(Eo, [["render", Lo]]);
|
|
2428
|
+
let Et = 0;
|
|
2429
|
+
const To = {
|
|
2419
2430
|
beforeCreate() {
|
|
2420
|
-
this.uuid =
|
|
2431
|
+
this.uuid = Et.toString(), Et += 1;
|
|
2421
2432
|
}
|
|
2422
|
-
},
|
|
2423
|
-
function
|
|
2424
|
-
return p(), E("svg",
|
|
2433
|
+
}, Ao = { key: 0 };
|
|
2434
|
+
function $o(e, l, n, o, a, s) {
|
|
2435
|
+
return p(), E("svg", M({ role: "img" }, e.$attrs, {
|
|
2425
2436
|
class: "ui-assets-icons-16",
|
|
2426
2437
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2427
2438
|
width: "16",
|
|
2428
2439
|
height: "16",
|
|
2429
2440
|
fill: "none"
|
|
2430
2441
|
}), [
|
|
2431
|
-
e.$attrs["svg-title"] ? (p(), E("title",
|
|
2432
|
-
l[0] || (l[0] =
|
|
2442
|
+
e.$attrs["svg-title"] ? (p(), E("title", Ao, Y(e.$attrs["svg-title"]), 1)) : J("", !0),
|
|
2443
|
+
l[0] || (l[0] = W("path", {
|
|
2433
2444
|
fill: "#001222",
|
|
2434
2445
|
d: "M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z"
|
|
2435
2446
|
}, null, -1))
|
|
2436
2447
|
], 16);
|
|
2437
2448
|
}
|
|
2438
|
-
const
|
|
2449
|
+
const wo = /* @__PURE__ */ ee(To, [["render", $o]]), ko = { class: "b-dropdown-small-textbox__chevron" }, _o = Z({
|
|
2439
2450
|
name: "dropdown-small-textbox",
|
|
2440
2451
|
inheritAttrs: !1
|
|
2441
|
-
}),
|
|
2442
|
-
...
|
|
2452
|
+
}), Do = /* @__PURE__ */ Z({
|
|
2453
|
+
..._o,
|
|
2443
2454
|
props: {
|
|
2444
2455
|
/**
|
|
2445
2456
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -2496,25 +2507,25 @@ const $o = /* @__PURE__ */ ee(Io, [["render", Ao]]), ko = { class: "b-dropdown-s
|
|
|
2496
2507
|
},
|
|
2497
2508
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
2498
2509
|
setup(e, { expose: l, emit: n }) {
|
|
2499
|
-
const o = n, a = e, s =
|
|
2500
|
-
[`b-dropdown-small-textbox--${
|
|
2501
|
-
[`b-dropdown-small-textbox--${
|
|
2502
|
-
[`b-dropdown-small-textbox--${
|
|
2510
|
+
const o = n, a = e, s = w(null), t = ct(Rt, !1), i = d(() => ({
|
|
2511
|
+
[`b-dropdown-small-textbox--${be.DISABLED}`]: a.disabled,
|
|
2512
|
+
[`b-dropdown-small-textbox--${be.READONLY}`]: a.readonly,
|
|
2513
|
+
[`b-dropdown-small-textbox--${be.OPENED}`]: a.open,
|
|
2503
2514
|
"b-dropdown-small-textbox--underline": t
|
|
2504
|
-
})),
|
|
2505
|
-
o("input",
|
|
2506
|
-
}, u = (
|
|
2507
|
-
o("keydown",
|
|
2508
|
-
}, r = (
|
|
2509
|
-
|
|
2510
|
-
},
|
|
2511
|
-
|
|
2512
|
-
}, v = (
|
|
2513
|
-
|
|
2514
|
-
},
|
|
2515
|
+
})), h = d(() => a.open && !a.disabled && !a.readonly), c = (g) => {
|
|
2516
|
+
o("input", g);
|
|
2517
|
+
}, u = (g) => {
|
|
2518
|
+
o("keydown", g);
|
|
2519
|
+
}, r = (g) => {
|
|
2520
|
+
Re(g), o("open");
|
|
2521
|
+
}, f = (g) => {
|
|
2522
|
+
Re(g), o("close");
|
|
2523
|
+
}, v = (g) => {
|
|
2524
|
+
Re(g), o("clear");
|
|
2525
|
+
}, L = {
|
|
2515
2526
|
[te.INPUT]: c,
|
|
2516
2527
|
[te.OPEN]: r,
|
|
2517
|
-
[te.CLOSE]:
|
|
2528
|
+
[te.CLOSE]: f,
|
|
2518
2529
|
[te.CLEAR]: v,
|
|
2519
2530
|
[te.KEYDOWN]: u
|
|
2520
2531
|
};
|
|
@@ -2522,23 +2533,23 @@ const $o = /* @__PURE__ */ ee(Io, [["render", Ao]]), ko = { class: "b-dropdown-s
|
|
|
2522
2533
|
focus: () => {
|
|
2523
2534
|
s.value.focus();
|
|
2524
2535
|
}
|
|
2525
|
-
}), (
|
|
2526
|
-
class:
|
|
2536
|
+
}), (g, V) => (p(), E("div", {
|
|
2537
|
+
class: fe(["b-dropdown-small-textbox", i.value])
|
|
2527
2538
|
}, [
|
|
2528
|
-
|
|
2539
|
+
F(Nt, M({
|
|
2529
2540
|
ref_key: "baseTextbox",
|
|
2530
2541
|
ref: s
|
|
2531
|
-
}, { ...
|
|
2542
|
+
}, { ...g.$attrs, ...g.$props }, {
|
|
2532
2543
|
class: "b-dropdown-small-textbox__textbox",
|
|
2533
|
-
size: b(
|
|
2534
|
-
},
|
|
2535
|
-
icon:
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
[
|
|
2544
|
+
size: b(Me).SMALL
|
|
2545
|
+
}, ie(L)), {
|
|
2546
|
+
icon: k(() => [
|
|
2547
|
+
W("div", ko, [
|
|
2548
|
+
ue(F(b(wo), { "svg-title": "opened" }, null, 512), [
|
|
2549
|
+
[Ne, h.value]
|
|
2539
2550
|
]),
|
|
2540
|
-
|
|
2541
|
-
[
|
|
2551
|
+
ue(F(b(Io), { "svg-title": "closed" }, null, 512), [
|
|
2552
|
+
[Ne, !h.value]
|
|
2542
2553
|
])
|
|
2543
2554
|
])
|
|
2544
2555
|
]),
|
|
@@ -2546,7 +2557,7 @@ const $o = /* @__PURE__ */ ee(Io, [["render", Ao]]), ko = { class: "b-dropdown-s
|
|
|
2546
2557
|
}, 16, ["size"])
|
|
2547
2558
|
], 2));
|
|
2548
2559
|
}
|
|
2549
|
-
}),
|
|
2560
|
+
}), xo = /* @__PURE__ */ ee(Do, [["__scopeId", "data-v-5fe55c74"]]), Bo = (e, l) => l.value.reduce((n, o) => {
|
|
2550
2561
|
if (o.items) {
|
|
2551
2562
|
const a = o.items.filter(
|
|
2552
2563
|
(t) => e.value.find((i) => i.value === t.value)
|
|
@@ -2554,14 +2565,14 @@ const $o = /* @__PURE__ */ ee(Io, [["render", Ao]]), ko = { class: "b-dropdown-s
|
|
|
2554
2565
|
a.length === o.items.length ? n.push(o.displayValue ?? o.label) : a.forEach(({ label: t, displayValue: i }) => n.push(i ?? t));
|
|
2555
2566
|
}
|
|
2556
2567
|
return e.value.find((a) => a.value === o.value) && n.push(o.displayValue ?? o.label), n;
|
|
2557
|
-
}, []).join(", "),
|
|
2568
|
+
}, []).join(", "), Ro = ({ items: e, placeholder: l, selectedValues: n, isMultiSelect: o }) => {
|
|
2558
2569
|
const a = d(
|
|
2559
2570
|
() => o.value && e.value.find((t) => t.items?.length)
|
|
2560
2571
|
);
|
|
2561
2572
|
return d(() => n.value.length ? a.value ? Bo(n, e) : n.value.map(({ label: t, displayValue: i }) => i ?? t).join(", ") : l.value || null);
|
|
2562
|
-
},
|
|
2573
|
+
}, Pt = (e) => {
|
|
2563
2574
|
e.value.$children?.[0].$refs.textbox.focus();
|
|
2564
|
-
},
|
|
2575
|
+
}, Mo = ({
|
|
2565
2576
|
inputContainerRef: e,
|
|
2566
2577
|
optionsContainerRef: l,
|
|
2567
2578
|
selectedValueIndex: n,
|
|
@@ -2570,74 +2581,74 @@ const $o = /* @__PURE__ */ ee(Io, [["render", Ao]]), ko = { class: "b-dropdown-s
|
|
|
2570
2581
|
items: s,
|
|
2571
2582
|
isMultiple: t,
|
|
2572
2583
|
totalItemCount: i,
|
|
2573
|
-
isVirtualScroll:
|
|
2584
|
+
isVirtualScroll: h
|
|
2574
2585
|
}, c, u, r) => {
|
|
2575
|
-
const
|
|
2576
|
-
a.value && await
|
|
2577
|
-
}, v = async (
|
|
2578
|
-
a.value && await
|
|
2586
|
+
const f = async (R) => {
|
|
2587
|
+
a.value && await ne(), s.value[R]?.focus();
|
|
2588
|
+
}, v = async (R) => {
|
|
2589
|
+
a.value && await ne();
|
|
2579
2590
|
const Q = l.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.$el.querySelectorAll(
|
|
2580
2591
|
"button"
|
|
2581
2592
|
);
|
|
2582
|
-
Q?.length ? Q[
|
|
2583
|
-
},
|
|
2584
|
-
|
|
2585
|
-
),
|
|
2586
|
-
await l.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.navigateToItem(
|
|
2587
|
-
},
|
|
2588
|
-
|
|
2589
|
-
|
|
2593
|
+
Q?.length ? Q[R]?.focus() : f(R);
|
|
2594
|
+
}, L = (R) => l.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.setListboxFocusedIndex(
|
|
2595
|
+
R
|
|
2596
|
+
), _ = async (R) => {
|
|
2597
|
+
await l.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.navigateToItem(R);
|
|
2598
|
+
}, g = (R) => {
|
|
2599
|
+
ne(() => {
|
|
2600
|
+
h ? _(R) : (L(R), f(R));
|
|
2590
2601
|
});
|
|
2591
|
-
},
|
|
2592
|
-
o.value || u(),
|
|
2602
|
+
}, V = () => {
|
|
2603
|
+
o.value || u(), g(0);
|
|
2593
2604
|
}, C = () => {
|
|
2594
|
-
o.value || u(),
|
|
2595
|
-
|
|
2605
|
+
o.value || u(), ne(() => {
|
|
2606
|
+
g(h ? i.value - 1 : s.value.length - 1);
|
|
2596
2607
|
});
|
|
2597
|
-
},
|
|
2598
|
-
|
|
2599
|
-
}, B = ({ detail:
|
|
2600
|
-
|
|
2601
|
-
},
|
|
2602
|
-
|
|
2603
|
-
},
|
|
2608
|
+
}, I = ({ detail: R }) => {
|
|
2609
|
+
R.preventDefault(), V();
|
|
2610
|
+
}, B = ({ detail: R }) => {
|
|
2611
|
+
R.preventDefault(), C();
|
|
2612
|
+
}, D = () => {
|
|
2613
|
+
V();
|
|
2614
|
+
}, A = () => {
|
|
2604
2615
|
C();
|
|
2605
|
-
},
|
|
2606
|
-
|
|
2607
|
-
},
|
|
2608
|
-
|
|
2609
|
-
},
|
|
2616
|
+
}, P = ({ detail: R }) => {
|
|
2617
|
+
R.preventDefault(), c(), o.value && (t ? v(0) : g(n.value));
|
|
2618
|
+
}, x = ({ detail: R }) => {
|
|
2619
|
+
R.preventDefault(), c(), o.value && (t ? v(0) : g(n.value));
|
|
2620
|
+
}, $ = () => {
|
|
2610
2621
|
o.value && r();
|
|
2611
|
-
},
|
|
2612
|
-
o.value && (r(),
|
|
2622
|
+
}, z = () => {
|
|
2623
|
+
o.value && (r(), Pt(e));
|
|
2613
2624
|
};
|
|
2614
2625
|
return d(() => ({
|
|
2615
|
-
[H.ARROW_DOWN]:
|
|
2626
|
+
[H.ARROW_DOWN]: I,
|
|
2616
2627
|
[H.ARROW_UP]: B,
|
|
2617
|
-
[H.HOME]:
|
|
2618
|
-
[H.END]:
|
|
2619
|
-
...a.value ? {} : { [H.SPACE]:
|
|
2620
|
-
[H.ENTER]:
|
|
2621
|
-
...a.value ? {} : { [H.TAB]:
|
|
2622
|
-
[H.ESCAPE]:
|
|
2628
|
+
[H.HOME]: D,
|
|
2629
|
+
[H.END]: A,
|
|
2630
|
+
...a.value ? {} : { [H.SPACE]: P },
|
|
2631
|
+
[H.ENTER]: x,
|
|
2632
|
+
...a.value ? {} : { [H.TAB]: $ },
|
|
2633
|
+
[H.ESCAPE]: z
|
|
2623
2634
|
}));
|
|
2624
|
-
},
|
|
2635
|
+
}, No = ({ inputContainerRef: e, isDropdownOpen: l }, n) => {
|
|
2625
2636
|
const o = () => {
|
|
2626
|
-
l.value && n(),
|
|
2627
|
-
|
|
2637
|
+
l.value && n(), ne(() => {
|
|
2638
|
+
Pt(e);
|
|
2628
2639
|
});
|
|
2629
2640
|
};
|
|
2630
2641
|
return {
|
|
2631
|
-
[
|
|
2632
|
-
[
|
|
2633
|
-
[
|
|
2634
|
-
[
|
|
2642
|
+
[y.ENTER]: o,
|
|
2643
|
+
[y.ESCAPE]: o,
|
|
2644
|
+
[y.TAB]: o,
|
|
2645
|
+
[y.SPACE]: o
|
|
2635
2646
|
};
|
|
2636
2647
|
};
|
|
2637
|
-
function
|
|
2638
|
-
const s =
|
|
2639
|
-
return
|
|
2640
|
-
|
|
2648
|
+
function Po(e, l, n, o, a) {
|
|
2649
|
+
const s = w(e), t = w(l), i = (u, r = []) => r.flatMap((f) => f.label.toLocaleLowerCase().includes(u) ? o?.value && f.items ? [...i(u, f.items)] : [f, ...i(u, f.items)] : f.items ? [...i(u, f.items)] : []), h = n !== void 0 ? Bt(() => n(s.value), a ?? 300) : void 0;
|
|
2650
|
+
return Ce(s, () => {
|
|
2651
|
+
h !== void 0 && h();
|
|
2641
2652
|
}), d(() => {
|
|
2642
2653
|
if (!s.value || n !== void 0)
|
|
2643
2654
|
return t.value;
|
|
@@ -2645,7 +2656,7 @@ function No(e, l, n, o, a) {
|
|
|
2645
2656
|
return i(u, t.value);
|
|
2646
2657
|
});
|
|
2647
2658
|
}
|
|
2648
|
-
const
|
|
2659
|
+
const Ft = {
|
|
2649
2660
|
"de-DE": { all: "Alle", ariaLabelFallback: "Dropdown", clearSearch: "Filter löschen" },
|
|
2650
2661
|
"en-GB": { all: "All", ariaLabelFallback: "Dropdown", clearSearch: "Clear filter" },
|
|
2651
2662
|
"en-US": { all: "All", ariaLabelFallback: "Dropdown", clearSearch: "Clear filter" },
|
|
@@ -2656,16 +2667,16 @@ const Pt = {
|
|
|
2656
2667
|
"ja-JP": { all: "すべて", ariaLabelFallback: "ドロップダウン", clearSearch: "フィルターをクリア" },
|
|
2657
2668
|
"pt-BR": { all: "Todos", ariaLabelFallback: "Menu suspenso", clearSearch: "Limpar filtro" },
|
|
2658
2669
|
"zh-CN": { all: "全部", ariaLabelFallback: "下拉菜单", clearSearch: "清除筛选器" }
|
|
2659
|
-
},
|
|
2660
|
-
i18n: { messages:
|
|
2670
|
+
}, Fo = Z({
|
|
2671
|
+
i18n: { messages: Ft },
|
|
2661
2672
|
name: "b-dropdown",
|
|
2662
2673
|
components: {
|
|
2663
|
-
DropdownInputDefault:
|
|
2664
|
-
DropdownInputSmall:
|
|
2674
|
+
DropdownInputDefault: Co,
|
|
2675
|
+
DropdownInputSmall: xo
|
|
2665
2676
|
},
|
|
2666
2677
|
model: { prop: "modelValue" }
|
|
2667
|
-
}),
|
|
2668
|
-
...
|
|
2678
|
+
}), Vo = /* @__PURE__ */ Z({
|
|
2679
|
+
...Fo,
|
|
2669
2680
|
props: {
|
|
2670
2681
|
ariaLabel: { default: null },
|
|
2671
2682
|
condensed: { type: Boolean, default: !1 },
|
|
@@ -2677,7 +2688,7 @@ const Pt = {
|
|
|
2677
2688
|
items: { default: () => [] },
|
|
2678
2689
|
loading: { type: Boolean, default: !1 },
|
|
2679
2690
|
componentLoading: { type: Boolean, default: !1 },
|
|
2680
|
-
lazyLoadType: { default:
|
|
2691
|
+
lazyLoadType: { default: it.props.lazyLoadType.default },
|
|
2681
2692
|
multiple: { type: Boolean, default: !1 },
|
|
2682
2693
|
search: { default: void 0 },
|
|
2683
2694
|
showSlotContentInMultiple: { type: Boolean, default: !1 },
|
|
@@ -2700,259 +2711,266 @@ const Pt = {
|
|
|
2700
2711
|
},
|
|
2701
2712
|
emits: ["input", "update:model-value", "show-more", "open"],
|
|
2702
2713
|
setup(e, { expose: l, emit: n }) {
|
|
2703
|
-
const o =
|
|
2714
|
+
const o = dt(), a = Ge(), s = Tt(a), t = e, i = n, { t: h } = ke({ messages: Ft }), { emitValue: c } = Kt(i), u = w(null), r = w(null), f = w(null), v = w(!1), L = Oe("bento-dropdown-options-container"), _ = Oe("dropdown-label"), g = Oe("dropdown-description"), V = Oe("dropdown-error"), { isReadOnly: C } = Ut(ae(t, "readonly")), I = d(() => t.modelValue ?? t.value), { cachedSelectedListboxOptions: B, cachedListboxSelectedValues: D, setCachedValues: A } = lo(
|
|
2704
2715
|
ae(t, "items"),
|
|
2705
|
-
|
|
2716
|
+
I,
|
|
2706
2717
|
ae(t, "multiple"),
|
|
2707
2718
|
ae(t, "enableValueLabelPair")
|
|
2708
|
-
),
|
|
2719
|
+
), P = w(o["aria-label"]), x = w(o["aria-describedby"]), { ariaLabel: $, label: z } = Lt(t), G = d(() => h("ariaLabelFallback")), R = Gt({
|
|
2709
2720
|
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
2710
|
-
ariaLabel:
|
|
2711
|
-
label:
|
|
2721
|
+
ariaLabel: $.value || P,
|
|
2722
|
+
label: z,
|
|
2712
2723
|
defaultFallback: G
|
|
2713
|
-
}), Q = t.size ===
|
|
2724
|
+
}), Q = t.size === Me.SMALL || ct(io, !1), _e = d(() => Q ? Me.SMALL : Me.DEFAULT), Pe = d(() => ({
|
|
2714
2725
|
"b-dropdown--condensed": t.condensed
|
|
2715
|
-
})),
|
|
2726
|
+
})), De = d(() => ({
|
|
2716
2727
|
"b-dropdown__description--error": !!t.errorMessage
|
|
2717
|
-
})), X =
|
|
2728
|
+
})), X = w(""), re = ae(t, "items"), Ke = ae(t, "staticCategories"), Te = Po(
|
|
2718
2729
|
X,
|
|
2719
|
-
|
|
2730
|
+
re,
|
|
2720
2731
|
t?.search?.searchEvent,
|
|
2721
|
-
|
|
2732
|
+
Ke,
|
|
2722
2733
|
t?.search?.debounceTime
|
|
2723
|
-
),
|
|
2724
|
-
items:
|
|
2734
|
+
), ye = d(() => t.dynamicFiltering && !!X.value), He = Ro({
|
|
2735
|
+
items: re,
|
|
2725
2736
|
placeholder: ae(t, "placeholder"),
|
|
2726
2737
|
isMultiSelect: ae(t, "multiple"),
|
|
2727
2738
|
selectedValues: B
|
|
2728
|
-
}),
|
|
2729
|
-
if (t?.multiple && Array.isArray(
|
|
2739
|
+
}), Je = d(() => {
|
|
2740
|
+
if (t?.multiple && Array.isArray(I.value))
|
|
2730
2741
|
return t.items.filter(
|
|
2731
|
-
({ value:
|
|
2742
|
+
({ value: m }) => t?.value && (t?.value).includes(m)
|
|
2732
2743
|
);
|
|
2733
2744
|
if (!t.multiple && t.staticCategories) {
|
|
2734
|
-
const
|
|
2735
|
-
(
|
|
2745
|
+
const m = t.items.find(
|
|
2746
|
+
(de) => de.items?.some(($e) => $e.value === I.value)
|
|
2736
2747
|
);
|
|
2737
|
-
return (
|
|
2748
|
+
return (m ? m.items.find((de) => de.value === I.value) : t.items.find(({ value: de }) => de === I.value)) ?? null;
|
|
2738
2749
|
}
|
|
2739
|
-
return t.items.find(({ value:
|
|
2740
|
-
}),
|
|
2741
|
-
const
|
|
2742
|
-
return
|
|
2743
|
-
}), { isMultiLevelSelect:
|
|
2750
|
+
return t.items.find(({ value: m }) => m === I.value);
|
|
2751
|
+
}), xe = d(() => {
|
|
2752
|
+
const se = (ge.value ? Fe.value : Te.value).findIndex(({ value: de }) => t.enableValueLabelPair ? I.value?.value === de : I.value === de);
|
|
2753
|
+
return se > -1 ? se : 0;
|
|
2754
|
+
}), { isMultiLevelSelect: ge, flattenedItemsList: Fe } = Dt(re), Xe = d(() => ge.value && !t.staticCategories), Ze = d(() => Xe.value ? "treeitem" : "option"), Qe = d(() => {
|
|
2744
2755
|
if (t.multiple) {
|
|
2745
|
-
const
|
|
2746
|
-
return
|
|
2756
|
+
const m = Array.isArray(I.value) ? I.value.length : 0, se = ge.value ? Fe.value.length : re.value.length;
|
|
2757
|
+
return m === 0 ? null : !t.hasMoreItems && se > 0 && se === m ? h("all") : m;
|
|
2747
2758
|
}
|
|
2748
2759
|
return null;
|
|
2749
|
-
}),
|
|
2760
|
+
}), et = d(
|
|
2750
2761
|
() => [
|
|
2751
|
-
t.description ?
|
|
2752
|
-
|
|
2753
|
-
t.errorMessage ?
|
|
2762
|
+
t.description ? g : null,
|
|
2763
|
+
x.value,
|
|
2764
|
+
t.errorMessage ? V : null
|
|
2754
2765
|
].filter(Boolean).join(" ") || null
|
|
2755
|
-
),
|
|
2756
|
-
|
|
2766
|
+
), Ue = d(() => f.value?.$el), { visibleDomOptions: tt, updateVisibleDomOptions: qe } = ut(
|
|
2767
|
+
Ue,
|
|
2757
2768
|
Te,
|
|
2758
|
-
|
|
2759
|
-
),
|
|
2760
|
-
C.value || (v.value = !0,
|
|
2761
|
-
|
|
2769
|
+
Ze
|
|
2770
|
+
), Ye = () => {
|
|
2771
|
+
C.value || (v.value = !0, ne(() => {
|
|
2772
|
+
qe();
|
|
2762
2773
|
}));
|
|
2763
|
-
},
|
|
2774
|
+
}, Be = () => {
|
|
2764
2775
|
v.value = !1;
|
|
2765
|
-
},
|
|
2766
|
-
C.value || (v.value = !v.value,
|
|
2767
|
-
|
|
2768
|
-
}),
|
|
2769
|
-
},
|
|
2770
|
-
|
|
2771
|
-
},
|
|
2772
|
-
|
|
2776
|
+
}, Ve = () => {
|
|
2777
|
+
C.value || (v.value = !v.value, ne(() => {
|
|
2778
|
+
qe();
|
|
2779
|
+
}), ye.value && (X.value = ""));
|
|
2780
|
+
}, lt = () => {
|
|
2781
|
+
ye.value && (X.value = ""), v.value && (v.value = !1, f.value.onOutsideDropdownClick());
|
|
2782
|
+
}, ot = d(() => [
|
|
2783
|
+
lt,
|
|
2773
2784
|
{
|
|
2774
|
-
ignore: [
|
|
2785
|
+
ignore: [Ue]
|
|
2775
2786
|
}
|
|
2776
|
-
]),
|
|
2777
|
-
t.multiple || (X.value = "", v.value = !1),
|
|
2778
|
-
},
|
|
2779
|
-
i(
|
|
2780
|
-
},
|
|
2787
|
+
]), at = async (m) => {
|
|
2788
|
+
t.multiple || (X.value = "", v.value = !1), A(m), c(D.value), t.multiple || (await ne(), q());
|
|
2789
|
+
}, S = () => {
|
|
2790
|
+
i(y.SHOW_MORE);
|
|
2791
|
+
}, T = Mo(
|
|
2781
2792
|
{
|
|
2782
2793
|
inputContainerRef: u,
|
|
2783
|
-
optionsContainerRef:
|
|
2784
|
-
selectedValueIndex:
|
|
2794
|
+
optionsContainerRef: f,
|
|
2795
|
+
selectedValueIndex: xe,
|
|
2785
2796
|
isDropdownOpen: v,
|
|
2786
2797
|
isDynamicFltering: ae(t, "dynamicFiltering"),
|
|
2787
|
-
items:
|
|
2798
|
+
items: tt,
|
|
2788
2799
|
isMultiple: t.multiple,
|
|
2789
2800
|
totalItemCount: d(() => Te.value.length),
|
|
2790
2801
|
isVirtualScroll: !t?.multiple && t?.virtualScroll !== !1 && t?.lazyLoadType === "none"
|
|
2791
2802
|
},
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
),
|
|
2803
|
+
Ve,
|
|
2804
|
+
Ye,
|
|
2805
|
+
Be
|
|
2806
|
+
), O = No(
|
|
2796
2807
|
{
|
|
2797
2808
|
inputContainerRef: u,
|
|
2798
2809
|
isDropdownOpen: v
|
|
2799
2810
|
},
|
|
2800
|
-
|
|
2801
|
-
),
|
|
2802
|
-
[
|
|
2803
|
-
[
|
|
2804
|
-
[
|
|
2805
|
-
...
|
|
2811
|
+
Be
|
|
2812
|
+
), U = {
|
|
2813
|
+
[y.CLOSE_DROPDOWN]: Be,
|
|
2814
|
+
[y.SELECT]: at,
|
|
2815
|
+
[y.SHOW_MORE]: S,
|
|
2816
|
+
...O
|
|
2806
2817
|
};
|
|
2807
|
-
t.error &&
|
|
2818
|
+
t.error && nt(
|
|
2808
2819
|
'BentoDropdown "error" property',
|
|
2809
2820
|
`Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
|
|
2810
2821
|
Having the field as "undefined" will hide/remove the error.
|
|
2811
2822
|
<bento-dropdown errorMessage="Error message text" />`,
|
|
2812
2823
|
"2.0.0"
|
|
2813
|
-
), t.size &&
|
|
2824
|
+
), t.size && nt('BentoDropdown "size" property', "Do not use. Only 'default' size should be used.", "2.0.0"), t.value && nt(
|
|
2814
2825
|
'BentoDropdown "value" property',
|
|
2815
2826
|
`The use of "value" prop in "BentoDropdown" is no longer supported.
|
|
2816
2827
|
Use the "v-model" or "model-value" property instead.`,
|
|
2817
2828
|
"2.0.0"
|
|
2818
2829
|
);
|
|
2819
|
-
const
|
|
2830
|
+
const q = () => {
|
|
2820
2831
|
u.value.focus();
|
|
2832
|
+
}, Ae = async () => {
|
|
2833
|
+
if (await ne(), !v.value || t.multiple || !f.value)
|
|
2834
|
+
return;
|
|
2835
|
+
const m = xe.value;
|
|
2836
|
+
if (m <= 0)
|
|
2837
|
+
return;
|
|
2838
|
+
f.value?.$refs?.dropdownOptionsListboxRef?.$refs?.listboxItemRef?.scrollToItem?.(m);
|
|
2821
2839
|
};
|
|
2822
|
-
return
|
|
2840
|
+
return Ce(
|
|
2823
2841
|
() => v.value,
|
|
2824
|
-
(
|
|
2825
|
-
|
|
2842
|
+
(m) => {
|
|
2843
|
+
m && (i("open"), Ae());
|
|
2826
2844
|
}
|
|
2827
2845
|
), l({
|
|
2828
|
-
focus:
|
|
2829
|
-
}), (
|
|
2830
|
-
class:
|
|
2846
|
+
focus: q
|
|
2847
|
+
}), (m, se) => ue((p(), E("div", {
|
|
2848
|
+
class: fe(["b-dropdown", Pe.value])
|
|
2831
2849
|
}, [
|
|
2832
|
-
b(
|
|
2850
|
+
b(z) ? (p(), N(b(tl), {
|
|
2833
2851
|
key: 0,
|
|
2834
|
-
id: b(
|
|
2835
|
-
condensed:
|
|
2836
|
-
label: b(
|
|
2837
|
-
"tooltip-text":
|
|
2838
|
-
optional:
|
|
2839
|
-
required:
|
|
2852
|
+
id: b(_),
|
|
2853
|
+
condensed: m.condensed,
|
|
2854
|
+
label: b(z),
|
|
2855
|
+
"tooltip-text": m.tooltipText,
|
|
2856
|
+
optional: m.optional,
|
|
2857
|
+
required: m.required
|
|
2840
2858
|
}, null, 8, ["id", "condensed", "label", "tooltip-text", "optional", "required"])) : J("", !0),
|
|
2841
|
-
|
|
2859
|
+
ue((p(), E("div", M({
|
|
2842
2860
|
ref_key: "inputContainerRefWrapper",
|
|
2843
2861
|
ref: r
|
|
2844
|
-
},
|
|
2845
|
-
(p(), N(
|
|
2862
|
+
}, ie(b(T), !0)), [
|
|
2863
|
+
(p(), N(It(_e.value), {
|
|
2846
2864
|
ref_key: "inputContainerRef",
|
|
2847
2865
|
ref: u,
|
|
2848
|
-
condensed:
|
|
2866
|
+
condensed: m.condensed,
|
|
2849
2867
|
value: X.value,
|
|
2850
|
-
"additional-items-selected":
|
|
2851
|
-
"aria-controls": b(
|
|
2868
|
+
"additional-items-selected": Qe.value,
|
|
2869
|
+
"aria-controls": b(L),
|
|
2852
2870
|
ariaExpanded: v.value,
|
|
2853
|
-
"aria-labelledby": b(
|
|
2854
|
-
"aria-describedby":
|
|
2855
|
-
"aria-label": b(
|
|
2871
|
+
"aria-labelledby": b(z) ? b(_) : null,
|
|
2872
|
+
"aria-describedby": et.value,
|
|
2873
|
+
"aria-label": b(R),
|
|
2856
2874
|
"aria-readonly": b(C),
|
|
2857
|
-
"aria-required":
|
|
2875
|
+
"aria-required": m.required,
|
|
2858
2876
|
readonly: b(C),
|
|
2859
|
-
disabled:
|
|
2860
|
-
"display-value": b(
|
|
2861
|
-
"dynamic-filtering":
|
|
2862
|
-
"is-invalid": !!
|
|
2863
|
-
multiple:
|
|
2877
|
+
disabled: m.disabled,
|
|
2878
|
+
"display-value": b(He),
|
|
2879
|
+
"dynamic-filtering": m.dynamicFiltering,
|
|
2880
|
+
"is-invalid": !!m.errorMessage || m.error,
|
|
2881
|
+
multiple: m.multiple,
|
|
2864
2882
|
open: v.value,
|
|
2865
|
-
"selected-value-item": b(Q) ? void 0 :
|
|
2866
|
-
"show-slot-content-in-multiple":
|
|
2867
|
-
onInput:
|
|
2868
|
-
onOpen:
|
|
2869
|
-
onClose:
|
|
2870
|
-
},
|
|
2871
|
-
le(b(a), (
|
|
2872
|
-
name:
|
|
2873
|
-
fn:
|
|
2874
|
-
|
|
2883
|
+
"selected-value-item": b(Q) ? void 0 : Je.value,
|
|
2884
|
+
"show-slot-content-in-multiple": m.showSlotContentInMultiple,
|
|
2885
|
+
onInput: se[0] || (se[0] = (de) => X.value = de),
|
|
2886
|
+
onOpen: Ve,
|
|
2887
|
+
onClose: Ve
|
|
2888
|
+
}, ve({ _: 2 }, [
|
|
2889
|
+
le(b(a), (de, $e) => ({
|
|
2890
|
+
name: $e,
|
|
2891
|
+
fn: k((st) => [
|
|
2892
|
+
j(m.$slots, $e, ce(Se(st)), void 0, !0)
|
|
2875
2893
|
])
|
|
2876
2894
|
}))
|
|
2877
2895
|
]), 1064, ["condensed", "value", "additional-items-selected", "aria-controls", "ariaExpanded", "aria-labelledby", "aria-describedby", "aria-label", "aria-readonly", "aria-required", "readonly", "disabled", "display-value", "dynamic-filtering", "is-invalid", "multiple", "open", "selected-value-item", "show-slot-content-in-multiple"]))
|
|
2878
2896
|
], 16)), [
|
|
2879
|
-
[b(
|
|
2897
|
+
[b(ze)]
|
|
2880
2898
|
]),
|
|
2881
|
-
u.value ? (p(), N(b(
|
|
2899
|
+
u.value ? (p(), N(b(el), {
|
|
2882
2900
|
key: 1,
|
|
2883
|
-
disabled:
|
|
2884
|
-
to:
|
|
2901
|
+
disabled: m.teleport?.disabled,
|
|
2902
|
+
to: m.teleport?.to
|
|
2885
2903
|
}, {
|
|
2886
|
-
default:
|
|
2887
|
-
|
|
2888
|
-
id: b(
|
|
2904
|
+
default: k(() => [
|
|
2905
|
+
F(b(no), M({
|
|
2906
|
+
id: b(L),
|
|
2889
2907
|
ref_key: "optionsContainerRef",
|
|
2890
|
-
ref:
|
|
2891
|
-
"aria-label": b(
|
|
2892
|
-
"component-loading":
|
|
2893
|
-
"empty-state":
|
|
2894
|
-
disabled:
|
|
2895
|
-
"is-option-disabled":
|
|
2908
|
+
ref: f,
|
|
2909
|
+
"aria-label": b(R),
|
|
2910
|
+
"component-loading": m.componentLoading,
|
|
2911
|
+
"empty-state": m.emptyState,
|
|
2912
|
+
disabled: m.disabled,
|
|
2913
|
+
"is-option-disabled": m.isOptionDisabled,
|
|
2896
2914
|
items: b(Te),
|
|
2897
|
-
multiple:
|
|
2898
|
-
"static-categories":
|
|
2915
|
+
multiple: m.multiple,
|
|
2916
|
+
"static-categories": Ke.value,
|
|
2899
2917
|
open: v.value,
|
|
2900
2918
|
"selected-value": b(B),
|
|
2901
|
-
searching:
|
|
2919
|
+
searching: ye.value,
|
|
2902
2920
|
"target-element": r.value,
|
|
2903
|
-
loading:
|
|
2904
|
-
"has-more-items":
|
|
2905
|
-
"lazy-load-type":
|
|
2906
|
-
"virtual-scroll":
|
|
2907
|
-
},
|
|
2908
|
-
le(b(a), (
|
|
2909
|
-
name:
|
|
2910
|
-
fn:
|
|
2911
|
-
|
|
2921
|
+
loading: m.loading,
|
|
2922
|
+
"has-more-items": m.hasMoreItems,
|
|
2923
|
+
"lazy-load-type": m.lazyLoadType,
|
|
2924
|
+
"virtual-scroll": m.virtualScroll
|
|
2925
|
+
}, ie(U)), ve({ _: 2 }, [
|
|
2926
|
+
le(b(a), (de, $e) => ({
|
|
2927
|
+
name: $e,
|
|
2928
|
+
fn: k((st) => [
|
|
2929
|
+
j(m.$slots, $e, ce(Se(st)), void 0, !0)
|
|
2912
2930
|
])
|
|
2913
2931
|
}))
|
|
2914
2932
|
]), 1040, ["id", "aria-label", "component-loading", "empty-state", "disabled", "is-option-disabled", "items", "multiple", "static-categories", "open", "selected-value", "searching", "target-element", "loading", "has-more-items", "lazy-load-type", "virtual-scroll"])
|
|
2915
2933
|
]),
|
|
2916
2934
|
_: 3
|
|
2917
2935
|
}, 8, ["disabled", "to"])) : J("", !0),
|
|
2918
|
-
|
|
2936
|
+
m.errorMessage ? (p(), N(b(ll), {
|
|
2919
2937
|
key: 2,
|
|
2920
|
-
id: b(
|
|
2921
|
-
"error-message":
|
|
2938
|
+
id: b(V),
|
|
2939
|
+
"error-message": m.errorMessage,
|
|
2922
2940
|
class: "b-dropdown__error-message"
|
|
2923
2941
|
}, null, 8, ["id", "error-message"])) : J("", !0),
|
|
2924
|
-
|
|
2942
|
+
m.description || b(s)("description") ? (p(), N(b(Ie), {
|
|
2925
2943
|
key: 3,
|
|
2926
|
-
id: b(
|
|
2927
|
-
class:
|
|
2944
|
+
id: b(g),
|
|
2945
|
+
class: fe(["b-dropdown__description", De.value]),
|
|
2928
2946
|
el: "span"
|
|
2929
2947
|
}, {
|
|
2930
|
-
default:
|
|
2931
|
-
|
|
2932
|
-
oe(
|
|
2948
|
+
default: k(() => [
|
|
2949
|
+
j(m.$slots, "description", {}, () => [
|
|
2950
|
+
oe(Y(m.description), 1)
|
|
2933
2951
|
], !0)
|
|
2934
2952
|
]),
|
|
2935
2953
|
_: 3
|
|
2936
2954
|
}, 8, ["id", "class"])) : J("", !0)
|
|
2937
2955
|
], 2)), [
|
|
2938
|
-
[b(
|
|
2956
|
+
[b(qt), ot.value]
|
|
2939
2957
|
]);
|
|
2940
2958
|
}
|
|
2941
|
-
}),
|
|
2959
|
+
}), fa = /* @__PURE__ */ ee(Vo, [["__scopeId", "data-v-66790b9d"]]);
|
|
2942
2960
|
export {
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2961
|
+
fa as B,
|
|
2962
|
+
ml as C,
|
|
2963
|
+
Co as D,
|
|
2964
|
+
y as a,
|
|
2947
2965
|
Ee as b,
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2966
|
+
Me as c,
|
|
2967
|
+
it as d,
|
|
2968
|
+
Dt as e,
|
|
2969
|
+
Po as f,
|
|
2952
2970
|
Bt as g,
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2971
|
+
io as h,
|
|
2972
|
+
Rt as i,
|
|
2973
|
+
pt as j,
|
|
2974
|
+
lo as u
|
|
2957
2975
|
};
|
|
2958
|
-
//# sourceMappingURL=dropdown.
|
|
2976
|
+
//# sourceMappingURL=dropdown.CGUBk0iO.js.map
|