@adyen/bento-vue3 2.1.0 → 2.2.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/bento-translation-keys.generated.d.ts +10 -0
- package/dist/@types/index.d.ts +67 -10
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.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/alert.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox-input.css +1 -1
- package/dist/assets/dashboard-section.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-filter.css +1 -0
- package/dist/assets/date-range-filter.css +1 -0
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/draggable-handle.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/fixed-scroller.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/grid-layout.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/input-with-dropdown-filter.css +1 -0
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/navigation-menu-group.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/table-of-contents.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/assets/toggle.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.C6XFuiE0.js → action-bar.BIidNGlt.js} +3 -3
- package/dist/chunks/{action-bar.C6XFuiE0.js.map → action-bar.BIidNGlt.js.map} +1 -1
- package/dist/chunks/{ai-tag.BLDTP7fs.js → ai-tag.B1YHMfAh.js} +2 -2
- package/dist/chunks/{ai-tag.BLDTP7fs.js.map → ai-tag.B1YHMfAh.js.map} +1 -1
- package/dist/chunks/{alert.BYmn1ewo.js → alert.PGzfyHZI.js} +80 -98
- package/dist/chunks/alert.PGzfyHZI.js.map +1 -0
- package/dist/chunks/{anchor-scroller.B35-JMuH.js → anchor-scroller.CSOg3htL.js} +2 -2
- package/dist/chunks/{anchor-scroller.B35-JMuH.js.map → anchor-scroller.CSOg3htL.js.map} +1 -1
- package/dist/chunks/{base-modal.CulokESn.js → base-modal.A52tojyk.js} +5 -5
- package/dist/chunks/{base-modal.CulokESn.js.map → base-modal.A52tojyk.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BsCmJeKU.js → button-actions-with-menu.DkPSfKO9.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.BsCmJeKU.js.map → button-actions-with-menu.DkPSfKO9.js.map} +1 -1
- package/dist/chunks/{button-actions.DvuGEQxM.js → button-actions.BYoctIth.js} +2 -2
- package/dist/chunks/button-actions.BYoctIth.js.map +1 -0
- package/dist/chunks/{calendar.EuBZ9HoM.js → calendar.BhoyTBN1.js} +18 -18
- package/dist/chunks/{calendar.EuBZ9HoM.js.map → calendar.BhoyTBN1.js.map} +1 -1
- package/dist/chunks/{card.OErI_R47.js → card.DL3-xIH9.js} +3 -3
- package/dist/chunks/{card.OErI_R47.js.map → card.DL3-xIH9.js.map} +1 -1
- package/dist/chunks/{checkbox-group.Deb5pHjj.js → checkbox-group.993HE54c.js} +3 -3
- package/dist/chunks/{checkbox-group.Deb5pHjj.js.map → checkbox-group.993HE54c.js.map} +1 -1
- package/dist/chunks/{checkbox.YBhv3GCJ.js → checkbox.DpT4DfSl.js} +2 -2
- package/dist/chunks/{checkbox.YBhv3GCJ.js.map → checkbox.DpT4DfSl.js.map} +1 -1
- package/dist/chunks/{code-snippet.DNDXr7t6.js → code-snippet.8XinCILe.js} +4 -4
- package/dist/chunks/{code-snippet.DNDXr7t6.js.map → code-snippet.8XinCILe.js.map} +1 -1
- package/dist/chunks/{controls-group.CC3yZiTT.js → controls-group.BcbFbqr-.js} +2 -2
- package/dist/chunks/{controls-group.CC3yZiTT.js.map → controls-group.BcbFbqr-.js.map} +1 -1
- package/dist/chunks/{copy.YBeE8V9S.js → copy.DrHbwkFX.js} +3 -3
- package/dist/chunks/{copy.YBeE8V9S.js.map → copy.DrHbwkFX.js.map} +1 -1
- package/dist/chunks/{dashboard-section.CjC3fVU6.js → dashboard-section.CVDLs9xL.js} +4 -4
- package/dist/chunks/dashboard-section.CVDLs9xL.js.map +1 -0
- package/dist/chunks/{dashed-underline.DAtZOaad.js → dashed-underline.BH4vfrBh.js} +3 -3
- package/dist/chunks/{dashed-underline.DAtZOaad.js.map → dashed-underline.BH4vfrBh.js.map} +1 -1
- package/dist/chunks/{data-grid-template.bPjGSga2.js → data-grid-template.5keqokzt.js} +4 -4
- package/dist/chunks/{data-grid-template.bPjGSga2.js.map → data-grid-template.5keqokzt.js.map} +1 -1
- package/dist/chunks/{data-grid.o5MQdWnJ.js → data-grid.DP4VPyjR.js} +20 -20
- package/dist/chunks/{data-grid.o5MQdWnJ.js.map → data-grid.DP4VPyjR.js.map} +1 -1
- package/dist/chunks/date-filter.EysjbedJ.js +156 -0
- package/dist/chunks/date-filter.EysjbedJ.js.map +1 -0
- package/dist/chunks/{date-picker.DyB8XkiY.js → date-picker.CQ3eoDIo.js} +10 -10
- package/dist/chunks/{date-picker.DyB8XkiY.js.map → date-picker.CQ3eoDIo.js.map} +1 -1
- package/dist/chunks/date-range-filter.DwNzkqTo.js +949 -0
- package/dist/chunks/date-range-filter.DwNzkqTo.js.map +1 -0
- package/dist/chunks/{date-range-picker.BcQUUVcW.js → date-range-picker.BYGk8uh-.js} +60 -60
- package/dist/chunks/{date-range-picker.BcQUUVcW.js.map → date-range-picker.BYGk8uh-.js.map} +1 -1
- package/dist/chunks/{draggable-handle.CKkSJP0K.js → draggable-handle.D6rFbf1V.js} +2 -2
- package/dist/chunks/{draggable-handle.CKkSJP0K.js.map → draggable-handle.D6rFbf1V.js.map} +1 -1
- package/dist/chunks/{draggable.jzTSFcM7.js → draggable.DH-Wc8GI.js} +2 -2
- package/dist/chunks/{draggable.jzTSFcM7.js.map → draggable.DH-Wc8GI.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.BvXqllkv.js → dropdown-tag.DQ_BcUK7.js} +3 -3
- package/dist/chunks/{dropdown-tag.BvXqllkv.js.map → dropdown-tag.DQ_BcUK7.js.map} +1 -1
- package/dist/chunks/{dropdown.BoSI-Rre.js → dropdown.BJ0cJ9Ea.js} +1471 -1384
- package/dist/chunks/dropdown.BJ0cJ9Ea.js.map +1 -0
- package/dist/chunks/{empty-state.BuK12EGe.js → empty-state.CECdMida.js} +2 -2
- package/dist/chunks/{empty-state.BuK12EGe.js.map → empty-state.CECdMida.js.map} +1 -1
- package/dist/chunks/{field-label.vrUwhoOg.js → field-label.Dm9I8IDI.js} +2 -2
- package/dist/chunks/{field-label.vrUwhoOg.js.map → field-label.Dm9I8IDI.js.map} +1 -1
- package/dist/chunks/{file-uploader.Cv8sm0Jd.js → file-uploader.B8c3MlBD.js} +7 -6
- package/dist/chunks/{file-uploader.Cv8sm0Jd.js.map → file-uploader.B8c3MlBD.js.map} +1 -1
- package/dist/chunks/filter-bar.BPPxuT_w.js +2552 -0
- package/dist/chunks/filter-bar.BPPxuT_w.js.map +1 -0
- package/dist/chunks/{fixed-scroller.C0nVzRBU.js → fixed-scroller.nECGGyOp.js} +15 -15
- package/dist/chunks/{fixed-scroller.C0nVzRBU.js.map → fixed-scroller.nECGGyOp.js.map} +1 -1
- package/dist/chunks/{focus-trap.Co-S6goa.js → focus-trap.BgyHTR_3.js} +1 -2
- package/dist/chunks/{focus-trap.Co-S6goa.js.map → focus-trap.BgyHTR_3.js.map} +1 -1
- package/dist/chunks/{footer-actions.BJif4sIk.js → footer-actions.B2dxp-b_.js} +2 -2
- package/dist/chunks/{footer-actions.BJif4sIk.js.map → footer-actions.B2dxp-b_.js.map} +1 -1
- package/dist/chunks/{form-layout-title.C7f1ByNh.js → form-layout-title.h-7dMAq7.js} +2 -2
- package/dist/chunks/{form-layout-title.C7f1ByNh.js.map → form-layout-title.h-7dMAq7.js.map} +1 -1
- package/dist/chunks/grid-layout.BuhsC4WZ.js +115 -0
- package/dist/chunks/grid-layout.BuhsC4WZ.js.map +1 -0
- package/dist/chunks/{header-with-views.Dl6bfk_7.js → header-with-views.Bux_-bM4.js} +308 -308
- package/dist/chunks/{header-with-views.Dl6bfk_7.js.map → header-with-views.Bux_-bM4.js.map} +1 -1
- package/dist/chunks/{header.E-KFjIG7.js → header.BEnZbxIA.js} +4 -4
- package/dist/chunks/{header.E-KFjIG7.js.map → header.BEnZbxIA.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.DqnQnwMI.js → info-icon-with-popover.BRl6sC0B.js} +3 -3
- package/dist/chunks/{info-icon-with-popover.DqnQnwMI.js.map → info-icon-with-popover.BRl6sC0B.js.map} +1 -1
- package/dist/chunks/{info-icon.D_zu5SYT.js → info-icon.CcM7z-CY.js} +3 -3
- package/dist/chunks/{info-icon.D_zu5SYT.js.map → info-icon.CcM7z-CY.js.map} +1 -1
- package/dist/chunks/{input-field-password.BXptrVTT.js → input-field-password.0W7vePC4.js} +4 -4
- package/dist/chunks/{input-field-password.BXptrVTT.js.map → input-field-password.0W7vePC4.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.Crxi8Wm7.js → input-field-phone-number.RblgK9OP.js} +2 -2
- package/dist/chunks/{input-field-phone-number.Crxi8Wm7.js.map → input-field-phone-number.RblgK9OP.js.map} +1 -1
- package/dist/chunks/{input-field._keU91LW.js → input-field.B-Nta-en.js} +3 -3
- package/dist/chunks/{input-field._keU91LW.js.map → input-field.B-Nta-en.js.map} +1 -1
- package/dist/chunks/{input-time.D7UW_ww_.js → input-time.CMKTGRcV.js} +3 -3
- package/dist/chunks/{input-time.D7UW_ww_.js.map → input-time.CMKTGRcV.js.map} +1 -1
- package/dist/chunks/input-with-dropdown-filter.DXnJOBf6.js +100 -0
- package/dist/chunks/input-with-dropdown-filter.DXnJOBf6.js.map +1 -0
- package/dist/chunks/{inspector-page.DNsc0lK1.js → inspector-page.Bd39LxR2.js} +2 -2
- package/dist/chunks/{inspector-page.DNsc0lK1.js.map → inspector-page.Bd39LxR2.js.map} +1 -1
- package/dist/chunks/{inspector.BLAqbhmV.js → inspector.SmoWfjqp.js} +2 -2
- package/dist/chunks/{inspector.BLAqbhmV.js.map → inspector.SmoWfjqp.js.map} +1 -1
- package/dist/chunks/{list-item.RuGQ8Y4T.js → list-item.CoDag_QY.js} +3 -3
- package/dist/chunks/{list-item.RuGQ8Y4T.js.map → list-item.CoDag_QY.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.71rmQvG8.js → listbox-option-tag.Bhyu9LpW.js} +2 -2
- package/dist/chunks/{listbox-option-tag.71rmQvG8.js.map → listbox-option-tag.Bhyu9LpW.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.jXJnaueu.js → modal-fullscreen.D-ws4648.js} +3 -3
- package/dist/chunks/{modal-fullscreen.jXJnaueu.js.map → modal-fullscreen.D-ws4648.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BwmYlzFm.js → modal.vue_vue_type_script_setup_true_lang.DkjMGIP8.js} +4 -4
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BwmYlzFm.js.map → modal.vue_vue_type_script_setup_true_lang.DkjMGIP8.js.map} +1 -1
- package/dist/chunks/{navigation-menu-group.BnS0isK8.js → navigation-menu-group.BlkhBGX3.js} +2 -2
- package/dist/chunks/{navigation-menu-group.BnS0isK8.js.map → navigation-menu-group.BlkhBGX3.js.map} +1 -1
- package/dist/chunks/{pagination.C-kvJ-XK.js → pagination.CyqfmV_-.js} +4 -4
- package/dist/chunks/{pagination.C-kvJ-XK.js.map → pagination.CyqfmV_-.js.map} +1 -1
- package/dist/chunks/popover.types.CXIAfp1m.js +6 -0
- package/dist/chunks/{popover.types.dhllh3NP.js.map → popover.types.CXIAfp1m.js.map} +1 -1
- package/dist/chunks/{popper-container.Rfj8UdMD.js → popper-container.lfk_dyZi.js} +2 -2
- package/dist/chunks/{popper-container.Rfj8UdMD.js.map → popper-container.lfk_dyZi.js.map} +1 -1
- package/dist/chunks/promo-banner.3d1DHWas.js.map +1 -1
- package/dist/chunks/{radio-group.BTI_2U11.js → radio-group.DGwM-ijw.js} +3 -3
- package/dist/chunks/{radio-group.BTI_2U11.js.map → radio-group.DGwM-ijw.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.ClUU1zPM.js → rich-text-editor.7qlWY3xz.js} +5 -5
- package/dist/chunks/{rich-text-editor.ClUU1zPM.js.map → rich-text-editor.7qlWY3xz.js.map} +1 -1
- package/dist/chunks/{search-bar.D1Jz7hdd.js → search-bar.BRMyMzkF.js} +3 -3
- package/dist/chunks/{search-bar.D1Jz7hdd.js.map → search-bar.BRMyMzkF.js.map} +1 -1
- package/dist/chunks/{secondary-nav.D32VFDTi.js → secondary-nav.BbBhe7QI.js} +3 -3
- package/dist/chunks/{secondary-nav.D32VFDTi.js.map → secondary-nav.BbBhe7QI.js.map} +1 -1
- package/dist/chunks/{segmented-control.CarI0i3p.js → segmented-control.BTILFbBW.js} +2 -2
- package/dist/chunks/{segmented-control.CarI0i3p.js.map → segmented-control.BTILFbBW.js.map} +1 -1
- package/dist/chunks/select-avatar-filter.DdOdBb0C.js +55 -0
- package/dist/chunks/select-avatar-filter.DdOdBb0C.js.map +1 -0
- package/dist/chunks/select-country-filter.D-zpTtKe.js +56 -0
- package/dist/chunks/select-country-filter.D-zpTtKe.js.map +1 -0
- package/dist/chunks/select-currency-filter.BitX4BCE.js +91 -0
- package/dist/chunks/select-currency-filter.BitX4BCE.js.map +1 -0
- package/dist/chunks/select-payment-method-filter.BiZuCZOa.js +55 -0
- package/dist/chunks/select-payment-method-filter.BiZuCZOa.js.map +1 -0
- package/dist/chunks/select-tag-filter.BUIIqK0l.js +63 -0
- package/dist/chunks/select-tag-filter.BUIIqK0l.js.map +1 -0
- package/dist/chunks/{selection-card-group.CQsS8-H9.js → selection-card-group.mCAfzxrB.js} +3 -3
- package/dist/chunks/{selection-card-group.CQsS8-H9.js.map → selection-card-group.mCAfzxrB.js.map} +1 -1
- package/dist/chunks/{sidepanel.CYWPV9dE.js → sidepanel.amz6_quV.js} +12 -12
- package/dist/chunks/sidepanel.amz6_quV.js.map +1 -0
- package/dist/chunks/{structured-list-item.C6SAUS9a.js → structured-list-item.Br6cAwZk.js} +4 -4
- package/dist/chunks/{structured-list-item.C6SAUS9a.js.map → structured-list-item.Br6cAwZk.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.FTWeUNFh.js → summary-grid.types.DUEiCht4.js} +6 -6
- package/dist/chunks/{summary-grid.types.FTWeUNFh.js.map → summary-grid.types.DUEiCht4.js.map} +1 -1
- package/dist/chunks/{tab.CwXAsp9E.js → tab.Df1c3HPX.js} +3 -3
- package/dist/chunks/{tab.CwXAsp9E.js.map → tab.Df1c3HPX.js.map} +1 -1
- package/dist/chunks/{tag.BYxa556o.js → tag.Cg3joxK_.js} +2 -2
- package/dist/chunks/{tag.BYxa556o.js.map → tag.Cg3joxK_.js.map} +1 -1
- package/dist/chunks/{textarea.D4aMdmDx.js → textarea.ClWTwdJT.js} +2 -2
- package/dist/chunks/{textarea.D4aMdmDx.js.map → textarea.ClWTwdJT.js.map} +1 -1
- package/dist/chunks/{timeline-item.De8HCoYw.js → timeline-item.CdOFw-Jn.js} +144 -132
- package/dist/chunks/timeline-item.CdOFw-Jn.js.map +1 -0
- package/dist/chunks/{title-details.8cyCeaLf.js → title-details.Ccs_ltkI.js} +2 -2
- package/dist/chunks/{title-details.8cyCeaLf.js.map → title-details.Ccs_ltkI.js.map} +1 -1
- package/dist/chunks/{tooltip.0QqJo2sa.js → tooltip.B8LTTssT.js} +3 -3
- package/dist/chunks/{tooltip.0QqJo2sa.js.map → tooltip.B8LTTssT.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.Dn4toWHY.js → tutorial.vue_vue_type_script_setup_true_lang.CpzGxsmy.js} +4 -4
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.Dn4toWHY.js.map → tutorial.vue_vue_type_script_setup_true_lang.CpzGxsmy.js.map} +1 -1
- package/dist/chunks/typography.B6elnWpr.js.map +1 -1
- package/dist/chunks/{use-date-input-formatter.BIVkaB1k.js → use-date-input-formatter.COZBxMaZ.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.BIVkaB1k.js.map → use-date-input-formatter.COZBxMaZ.js.map} +1 -1
- package/dist/chunks/warning-filled.Bzh3ib0x.js +25 -0
- package/dist/chunks/warning-filled.Bzh3ib0x.js.map +1 -0
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date-time-picker.js +4 -4
- package/dist/draggable.js +2 -2
- package/dist/dropdown.js +2 -2
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +257 -257
- 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 +2 -2
- package/dist/internal.js +13 -13
- 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/progress-bar.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 +4 -4
- package/dist/chunks/alert.BYmn1ewo.js.map +0 -1
- package/dist/chunks/button-actions.DvuGEQxM.js.map +0 -1
- package/dist/chunks/dashboard-section.CjC3fVU6.js.map +0 -1
- package/dist/chunks/dropdown.BoSI-Rre.js.map +0 -1
- package/dist/chunks/filter-bar.6ElVHgFA.js +0 -3974
- package/dist/chunks/filter-bar.6ElVHgFA.js.map +0 -1
- package/dist/chunks/grid-layout.CCWNscU_.js +0 -113
- package/dist/chunks/grid-layout.CCWNscU_.js.map +0 -1
- package/dist/chunks/popover.types.dhllh3NP.js +0 -6
- package/dist/chunks/sidepanel.CYWPV9dE.js.map +0 -1
- package/dist/chunks/timeline-item.De8HCoYw.js.map +0 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { computed as r, ref as A, onMounted as
|
|
2
|
-
import { B as
|
|
3
|
-
import { g as
|
|
4
|
-
import { u as
|
|
5
|
-
import {
|
|
6
|
-
import { u as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { computed as r, ref as A, onMounted as qt, onUnmounted as Yt, watch as pe, defineComponent as le, resolveComponent as Z, openBlock as p, createElementBlock as E, createVNode as X, withCtx as B, createTextVNode as oe, toDisplayString as q, createElementVNode as Y, renderSlot as Q, mergeProps as z, withKeys as Ce, getCurrentInstance as ot, createCommentVNode as j, createBlock as M, withModifiers as ge, normalizeProps as me, guardReactiveProps as we, withDirectives as Le, vShow as Ke, nextTick as ne, toRef as de, resolveDirective as It, toHandlers as ve, Fragment as ye, renderList as ie, createSlots as Te, normalizeClass as _e, unref as f, useSlots as Ue, useAttrs as mt, toRefs as jt, resolveDynamicComponent as Et, inject as vt } from "vue";
|
|
2
|
+
import { B as Me } from "./typography.B6elnWpr.js";
|
|
3
|
+
import { g as xe } from "./generate-uid.DBWe4g6T.js";
|
|
4
|
+
import { u as Ne } from "./index.CGBfMQdv.js";
|
|
5
|
+
import { u as Ht } from "./form-field.B60VsF8d.js";
|
|
6
|
+
import { u as Jt } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
7
|
+
import { u as Ot } from "./use-has-slot.CyMiImRQ.js";
|
|
8
|
+
import { B as Xt } from "./directive.D1-d-C2K.js";
|
|
9
|
+
import { B as ae, a as Xe } from "./keyboard-navigation.DWmhelVv.js";
|
|
10
|
+
import { B as Tt } from "./loading-indicator.BPol9I84.js";
|
|
11
|
+
import { B as At } from "./empty-state.CECdMida.js";
|
|
12
|
+
import { B as lt, _ as Zt } from "./minus-small.DBR64xRS.js";
|
|
13
|
+
import { _ as Qt } from "./checkmark-small.DJcd8Sd7.js";
|
|
12
14
|
/* empty css */
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { P as ht } from "./popper-container.Rfj8UdMD.js";
|
|
26
|
-
import { E as il } from "./error-message.DJ5l0EUH.js";
|
|
15
|
+
import { _ as ce } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
16
|
+
import { B as el } from "./chip.D4OozULC.js";
|
|
17
|
+
import { _ as wt } from "./chevron-down.DDkuHzKj.js";
|
|
18
|
+
import { _ as _t } from "./chevron-up.CE9uVcoS.js";
|
|
19
|
+
import { b as at, a as tl, h as ll, e as al } from "./button-actions.BYoctIth.js";
|
|
20
|
+
import { o as ol } from "./resize.Bqks3WUm.js";
|
|
21
|
+
import { F as sl } from "./field-label.Dm9I8IDI.js";
|
|
22
|
+
import { P as St } from "./popper-container.lfk_dyZi.js";
|
|
23
|
+
import { E as nl } from "./error-message.DJ5l0EUH.js";
|
|
24
|
+
import { s as Ve } from "./events.BQOQSSb7.js";
|
|
25
|
+
import { _ as il } from "./cross-circle-fill.DJbpTaVE.js";
|
|
26
|
+
import { _ as rl } from "./cross-circle-fill-small.C87G_8OX.js";
|
|
27
27
|
import "../assets/dropdown.css";
|
|
28
|
-
const
|
|
28
|
+
const kt = (e, a, o, l) => {
|
|
29
29
|
const i = r(
|
|
30
30
|
() => !!e.value?.length && e.value?.length === a.value.length
|
|
31
31
|
), s = r(() => e.value == null || e.value.length === 0 ? !1 : e.value?.length !== a.value.length);
|
|
@@ -37,73 +37,73 @@ const _t = (e, a, o, l) => {
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
-
function
|
|
41
|
-
const s = A(null), n = A([]), t = A(0),
|
|
42
|
-
let
|
|
43
|
-
const
|
|
44
|
-
const
|
|
40
|
+
function dl(e, { disabled: a, itemHeight: o, overscan: l = 5, prefixHeight: i }) {
|
|
41
|
+
const s = A(null), n = A([]), t = A(0), m = A(0), d = A(0);
|
|
42
|
+
let u;
|
|
43
|
+
const c = r(() => {
|
|
44
|
+
const C = typeof o == "number" ? e.value.length * o : e.value.reduce(($, I, k) => $ + o(k), 0), N = typeof o == "number" ? t.value * o : e.value.slice(0, t.value).reduce(($, I, k) => $ + o(k), 0);
|
|
45
45
|
return {
|
|
46
46
|
style: {
|
|
47
|
-
marginTop: `${
|
|
48
|
-
height: `${
|
|
47
|
+
marginTop: `${N}px`,
|
|
48
|
+
height: `${C - N}px`
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
}), b = () => {
|
|
52
|
-
const
|
|
52
|
+
const C = i?.value ?? 0, N = Math.max(s.value.scrollTop - C, 0);
|
|
53
53
|
if (typeof o == "number")
|
|
54
|
-
return Math.floor(
|
|
55
|
-
let
|
|
56
|
-
for (let
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
59
|
-
|
|
54
|
+
return Math.floor(N / o);
|
|
55
|
+
let $ = 0, I = 0;
|
|
56
|
+
for (let k = 0; k < e.value.length; k += 1) {
|
|
57
|
+
const W = o(k);
|
|
58
|
+
if ($ += W, $ >= N) {
|
|
59
|
+
I = k;
|
|
60
60
|
break;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
return
|
|
64
|
-
},
|
|
65
|
-
if (
|
|
66
|
-
return Math.ceil(
|
|
67
|
-
const
|
|
68
|
-
let
|
|
69
|
-
for (let
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
63
|
+
return I;
|
|
64
|
+
}, v = () => {
|
|
65
|
+
if (d.value = s.value.clientHeight, typeof o == "number")
|
|
66
|
+
return Math.ceil(d.value / o);
|
|
67
|
+
const C = t.value ?? 0;
|
|
68
|
+
let N = 0, $ = 0;
|
|
69
|
+
for (let I = C; I < e.value.length; I += 1) {
|
|
70
|
+
const k = o(I);
|
|
71
|
+
if (N += k, $ = I, N > d.value)
|
|
72
72
|
break;
|
|
73
73
|
}
|
|
74
|
-
return
|
|
75
|
-
},
|
|
74
|
+
return $ - C;
|
|
75
|
+
}, S = () => {
|
|
76
76
|
if (s.value) {
|
|
77
|
-
const
|
|
78
|
-
t.value = b(),
|
|
77
|
+
const C = v();
|
|
78
|
+
t.value = b(), m.value = Math.min(t.value + C + l, e.value.length), n.value = e.value.slice(t.value, m.value);
|
|
79
79
|
}
|
|
80
|
-
},
|
|
81
|
-
|
|
80
|
+
}, D = () => {
|
|
81
|
+
S();
|
|
82
82
|
};
|
|
83
|
-
a || (
|
|
84
|
-
s.value && (
|
|
85
|
-
|
|
86
|
-
}),
|
|
87
|
-
}),
|
|
88
|
-
|
|
89
|
-
}),
|
|
83
|
+
a || (qt(() => {
|
|
84
|
+
s.value && (d.value = s.value.clientHeight, u = ol(s.value, ({ clientHeight: C }) => {
|
|
85
|
+
d.value = C, S();
|
|
86
|
+
}), S());
|
|
87
|
+
}), Yt(() => {
|
|
88
|
+
u?.disconnect();
|
|
89
|
+
}), pe(
|
|
90
90
|
() => e.value,
|
|
91
91
|
() => {
|
|
92
|
-
|
|
92
|
+
S();
|
|
93
93
|
}
|
|
94
94
|
));
|
|
95
|
-
const
|
|
95
|
+
const G = {
|
|
96
96
|
ref: s,
|
|
97
97
|
style: { overflowY: "auto" }
|
|
98
|
-
},
|
|
98
|
+
}, x = (C) => {
|
|
99
99
|
if (!s.value)
|
|
100
100
|
return;
|
|
101
|
-
const
|
|
102
|
-
|
|
101
|
+
const N = typeof o == "number" ? C * o : e.value.slice(0, C).reduce((H, re, _) => H + o(_), 0), $ = typeof o == "number" ? o : o(C), I = N + $, { scrollTop: k, clientHeight: W } = s.value, P = k + W;
|
|
102
|
+
I > P ? s.value.scrollTop = W > 0 ? I - W : N : N < k && (s.value.scrollTop = N), S();
|
|
103
103
|
};
|
|
104
104
|
return a ? {
|
|
105
105
|
containerRef: s,
|
|
106
|
-
containerProps:
|
|
106
|
+
containerProps: G,
|
|
107
107
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
108
108
|
onScroll: () => {
|
|
109
109
|
},
|
|
@@ -114,19 +114,19 @@ function rl(e, { disabled: a, itemHeight: o, overscan: l = 5, prefixHeight: i })
|
|
|
114
114
|
startIndex: A(0)
|
|
115
115
|
} : {
|
|
116
116
|
containerRef: s,
|
|
117
|
-
containerProps:
|
|
118
|
-
onScroll:
|
|
117
|
+
containerProps: G,
|
|
118
|
+
onScroll: D,
|
|
119
119
|
list: n,
|
|
120
|
-
wrapperProps:
|
|
121
|
-
scrollToIndex:
|
|
120
|
+
wrapperProps: c,
|
|
121
|
+
scrollToIndex: x,
|
|
122
122
|
startIndex: t
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
var
|
|
126
|
-
const
|
|
125
|
+
var g = /* @__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))(g || {}), Ae = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(Ae || {});
|
|
126
|
+
const cl = le({
|
|
127
127
|
name: "bento-listbox-static-category",
|
|
128
128
|
components: {
|
|
129
|
-
BentoTypography:
|
|
129
|
+
BentoTypography: Me
|
|
130
130
|
},
|
|
131
131
|
props: {
|
|
132
132
|
/**
|
|
@@ -138,30 +138,30 @@ const dl = Q({
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}), ul = ["aria-label"];
|
|
141
|
-
function
|
|
142
|
-
const n =
|
|
143
|
-
return p(),
|
|
141
|
+
function pl(e, a, o, l, i, s) {
|
|
142
|
+
const n = Z("bento-typography");
|
|
143
|
+
return p(), E("div", {
|
|
144
144
|
class: "b-listbox-single-select-category",
|
|
145
145
|
role: "group",
|
|
146
146
|
"aria-label": e.categoryLabel
|
|
147
147
|
}, [
|
|
148
|
-
|
|
148
|
+
X(n, {
|
|
149
149
|
variant: "caption",
|
|
150
150
|
el: "span",
|
|
151
151
|
class: "b-listbox-single-select-category__label-text",
|
|
152
152
|
"aria-hidden": "true"
|
|
153
153
|
}, {
|
|
154
|
-
default:
|
|
155
|
-
|
|
154
|
+
default: B(() => [
|
|
155
|
+
oe(q(e.categoryLabel), 1)
|
|
156
156
|
]),
|
|
157
157
|
_: 1
|
|
158
158
|
}),
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
Y("div", null, [
|
|
160
|
+
Q(e.$slots, "default", {}, void 0, !0)
|
|
161
161
|
])
|
|
162
162
|
], 8, ul);
|
|
163
163
|
}
|
|
164
|
-
const
|
|
164
|
+
const bl = /* @__PURE__ */ ce(cl, [["render", pl], ["__scopeId", "data-v-27c4e09a"]]), fl = le({
|
|
165
165
|
name: "bento-listbox-option",
|
|
166
166
|
props: {
|
|
167
167
|
/**
|
|
@@ -177,7 +177,7 @@ const pl = /* @__PURE__ */ ue(dl, [["render", cl], ["__scopeId", "data-v-27c4e09
|
|
|
177
177
|
*/
|
|
178
178
|
selected: { type: Boolean, default: !1 }
|
|
179
179
|
},
|
|
180
|
-
emits: [
|
|
180
|
+
emits: [g.CLICK, g.ENTER, g.SPACE, g.TAB],
|
|
181
181
|
setup(e, { emit: a }) {
|
|
182
182
|
const o = r(() => ({
|
|
183
183
|
"b-listbox-option--active": e.active,
|
|
@@ -186,13 +186,13 @@ const pl = /* @__PURE__ */ ue(dl, [["render", cl], ["__scopeId", "data-v-27c4e09
|
|
|
186
186
|
}));
|
|
187
187
|
return {
|
|
188
188
|
// Enums
|
|
189
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
190
|
-
BentoListboxEvent:
|
|
189
|
+
BentoKeyboardNavigationKeyDownEvent: ae,
|
|
190
|
+
BentoListboxEvent: g,
|
|
191
191
|
// Values
|
|
192
192
|
conditionalClasses: o,
|
|
193
193
|
// Events
|
|
194
194
|
onClick: (s) => {
|
|
195
|
-
a(
|
|
195
|
+
a(g.CLICK, s);
|
|
196
196
|
},
|
|
197
197
|
onOptionSelected: (s, n) => {
|
|
198
198
|
a(s, n);
|
|
@@ -200,45 +200,45 @@ const pl = /* @__PURE__ */ ue(dl, [["render", cl], ["__scopeId", "data-v-27c4e09
|
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
202
|
});
|
|
203
|
-
function
|
|
204
|
-
return p(),
|
|
203
|
+
function ml(e, a, o, l, i, s) {
|
|
204
|
+
return p(), E("div", z({
|
|
205
205
|
class: ["b-listbox-option", e.conditionalClasses],
|
|
206
206
|
role: "option"
|
|
207
207
|
}, e.$attrs, {
|
|
208
208
|
onClick: a[0] || (a[0] = (...n) => e.onClick && e.onClick(...n)),
|
|
209
209
|
onKeydown: [
|
|
210
|
-
a[1] || (a[1] =
|
|
211
|
-
a[2] || (a[2] =
|
|
212
|
-
a[3] || (a[3] =
|
|
210
|
+
a[1] || (a[1] = Ce((n) => e.onOptionSelected(e.BentoListboxEvent.ENTER, n), ["enter"])),
|
|
211
|
+
a[2] || (a[2] = Ce((n) => e.onOptionSelected(e.BentoListboxEvent.SPACE, n), ["space"])),
|
|
212
|
+
a[3] || (a[3] = Ce((n) => e.onOptionSelected(e.BentoListboxEvent.TAB, n), ["tab"]))
|
|
213
213
|
]
|
|
214
214
|
}), [
|
|
215
|
-
|
|
215
|
+
Q(e.$slots, "default", {}, void 0, !0)
|
|
216
216
|
], 16);
|
|
217
217
|
}
|
|
218
|
-
const
|
|
218
|
+
const st = /* @__PURE__ */ ce(fl, [["render", ml], ["__scopeId", "data-v-29f788bd"]]), vl = { key: 0 }, yl = {
|
|
219
219
|
__name: "checkmark",
|
|
220
220
|
setup(e) {
|
|
221
|
-
const a =
|
|
222
|
-
return String(a?.uid ?? a?.proxy?._uid), (o, l) => (p(),
|
|
221
|
+
const a = ot();
|
|
222
|
+
return String(a?.uid ?? a?.proxy?._uid), (o, l) => (p(), E("svg", z({ role: "img" }, o.$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
|
-
o.$attrs["svg-title"] ? (p(),
|
|
230
|
-
l[0] || (l[0] =
|
|
229
|
+
o.$attrs["svg-title"] ? (p(), E("title", vl, q(o.$attrs["svg-title"]), 1)) : j("", !0),
|
|
230
|
+
l[0] || (l[0] = Y("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
|
-
},
|
|
236
|
+
}, gl = le({
|
|
237
237
|
name: "bento-listbox-single-select-option",
|
|
238
238
|
components: {
|
|
239
|
-
BentoListboxOption:
|
|
240
|
-
BentoTypography:
|
|
241
|
-
CheckmarkIcon:
|
|
239
|
+
BentoListboxOption: st,
|
|
240
|
+
BentoTypography: Me,
|
|
241
|
+
CheckmarkIcon: yl
|
|
242
242
|
},
|
|
243
243
|
props: {
|
|
244
244
|
/**
|
|
@@ -262,7 +262,7 @@ const ot = /* @__PURE__ */ ue(bl, [["render", vl], ["__scopeId", "data-v-29f788b
|
|
|
262
262
|
*/
|
|
263
263
|
selected: { type: Boolean, default: !1 }
|
|
264
264
|
},
|
|
265
|
-
emits: [
|
|
265
|
+
emits: [g.ENTER, g.SELECT, g.SPACE, g.TAB],
|
|
266
266
|
setup(e, { emit: a }) {
|
|
267
267
|
const o = (n) => {
|
|
268
268
|
e.disabled || a(n, e.option);
|
|
@@ -273,15 +273,15 @@ const ot = /* @__PURE__ */ ue(bl, [["render", vl], ["__scopeId", "data-v-29f788b
|
|
|
273
273
|
ariaSelected: i,
|
|
274
274
|
tabIndex: s,
|
|
275
275
|
// Enums
|
|
276
|
-
BentoListboxEvent:
|
|
276
|
+
BentoListboxEvent: g,
|
|
277
277
|
// Events
|
|
278
278
|
onOptionSelected: o
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
|
-
}),
|
|
282
|
-
function
|
|
283
|
-
const n =
|
|
284
|
-
return p(),
|
|
281
|
+
}), hl = { class: "b-listbox-single-select-option__text" }, Sl = { class: "b-listbox-single-select-option__check-icon" };
|
|
282
|
+
function Cl(e, a, o, l, i, s) {
|
|
283
|
+
const n = Z("bento-typography"), t = Z("checkmark-icon"), m = Z("bento-listbox-option");
|
|
284
|
+
return p(), M(m, {
|
|
285
285
|
class: "b-listbox-single-select-option",
|
|
286
286
|
active: e.active,
|
|
287
287
|
disabled: e.disabled,
|
|
@@ -289,44 +289,44 @@ function Sl(e, a, o, l, i, s) {
|
|
|
289
289
|
"aria-selected": e.ariaSelected,
|
|
290
290
|
"aria-disabled": e.ariaDisabled,
|
|
291
291
|
tabindex: e.tabIndex,
|
|
292
|
-
onClick: a[0] || (a[0] = (
|
|
293
|
-
onEnterPressed: a[1] || (a[1] = (
|
|
294
|
-
onSpacePressed: a[2] || (a[2] =
|
|
295
|
-
onTabPressed: a[3] || (a[3] = (
|
|
292
|
+
onClick: a[0] || (a[0] = (d) => e.onOptionSelected(e.BentoListboxEvent.SELECT)),
|
|
293
|
+
onEnterPressed: a[1] || (a[1] = (d) => e.onOptionSelected(e.BentoListboxEvent.ENTER)),
|
|
294
|
+
onSpacePressed: a[2] || (a[2] = ge((d) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
|
|
295
|
+
onTabPressed: a[3] || (a[3] = (d) => e.onOptionSelected(e.BentoListboxEvent.TAB))
|
|
296
296
|
}, {
|
|
297
|
-
default:
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
default:
|
|
302
|
-
|
|
297
|
+
default: B(() => [
|
|
298
|
+
Q(e.$slots, "default", me(we(e.option)), () => [
|
|
299
|
+
Y("span", hl, [
|
|
300
|
+
X(n, { el: "span" }, {
|
|
301
|
+
default: B(() => [
|
|
302
|
+
oe(q(e.option.label), 1)
|
|
303
303
|
]),
|
|
304
304
|
_: 1
|
|
305
305
|
}),
|
|
306
|
-
e.option.description ? (p(),
|
|
306
|
+
e.option.description ? (p(), M(n, {
|
|
307
307
|
key: 0,
|
|
308
308
|
class: "b-listbox-single-select-option__description",
|
|
309
309
|
el: "span"
|
|
310
310
|
}, {
|
|
311
|
-
default:
|
|
312
|
-
|
|
311
|
+
default: B(() => [
|
|
312
|
+
oe(q(e.option.description), 1)
|
|
313
313
|
]),
|
|
314
314
|
_: 1
|
|
315
|
-
})) :
|
|
315
|
+
})) : j("", !0)
|
|
316
316
|
])
|
|
317
317
|
], !0),
|
|
318
|
-
|
|
319
|
-
Le(
|
|
320
|
-
[
|
|
318
|
+
Y("span", Sl, [
|
|
319
|
+
Le(X(t, { "svg-title": "selected" }, null, 512), [
|
|
320
|
+
[Ke, e.selected]
|
|
321
321
|
])
|
|
322
322
|
])
|
|
323
323
|
]),
|
|
324
324
|
_: 3
|
|
325
325
|
}, 8, ["active", "disabled", "selected", "aria-selected", "aria-disabled", "tabindex"]);
|
|
326
326
|
}
|
|
327
|
-
const
|
|
328
|
-
const l = r(() => a?.value ? a.value - 1 : e.value.length - 1), i = A(0), s = (
|
|
329
|
-
switch (
|
|
327
|
+
const Ll = /* @__PURE__ */ ce(gl, [["render", Cl], ["__scopeId", "data-v-dc2d167c"]]), $t = ({ items: e, totalItemCount: a }, o) => {
|
|
328
|
+
const l = r(() => a?.value ? a.value - 1 : e.value.length - 1), i = A(0), s = (v) => {
|
|
329
|
+
switch (v) {
|
|
330
330
|
case "increase":
|
|
331
331
|
i.value += 1;
|
|
332
332
|
break;
|
|
@@ -334,53 +334,53 @@ const Cl = /* @__PURE__ */ ue(yl, [["render", Sl], ["__scopeId", "data-v-dc2d167
|
|
|
334
334
|
i.value -= 1;
|
|
335
335
|
break;
|
|
336
336
|
}
|
|
337
|
-
}, n = ({ edgeCaseItem:
|
|
338
|
-
i.value !==
|
|
339
|
-
}, t = (
|
|
340
|
-
b(
|
|
337
|
+
}, n = ({ edgeCaseItem: v }, S) => {
|
|
338
|
+
i.value !== v && (s(S), o(i.value));
|
|
339
|
+
}, t = (v) => {
|
|
340
|
+
b(v), n(
|
|
341
341
|
{
|
|
342
342
|
edgeCaseItem: l.value
|
|
343
343
|
},
|
|
344
344
|
"increase"
|
|
345
345
|
/* INCREASE */
|
|
346
346
|
);
|
|
347
|
-
},
|
|
348
|
-
b(
|
|
347
|
+
}, m = (v) => {
|
|
348
|
+
b(v), n(
|
|
349
349
|
{
|
|
350
350
|
edgeCaseItem: 0
|
|
351
351
|
},
|
|
352
352
|
"decrease"
|
|
353
353
|
/* DECREASE */
|
|
354
354
|
);
|
|
355
|
-
},
|
|
356
|
-
b(
|
|
357
|
-
},
|
|
358
|
-
b(
|
|
359
|
-
},
|
|
360
|
-
i.value =
|
|
361
|
-
}, b = (
|
|
362
|
-
|
|
355
|
+
}, d = (v) => {
|
|
356
|
+
b(v), i.value = 0, o(i.value);
|
|
357
|
+
}, u = (v) => {
|
|
358
|
+
b(v), i.value = l.value, o(i.value);
|
|
359
|
+
}, c = (v) => {
|
|
360
|
+
i.value = v;
|
|
361
|
+
}, b = (v) => {
|
|
362
|
+
v?.detail?.preventDefault(), v?.detail?.stopPropagation();
|
|
363
363
|
};
|
|
364
364
|
return {
|
|
365
|
-
moveToFirstElement:
|
|
366
|
-
moveToLastElement:
|
|
365
|
+
moveToFirstElement: d,
|
|
366
|
+
moveToLastElement: u,
|
|
367
367
|
moveToNextElement: t,
|
|
368
|
-
moveToPreviousElement:
|
|
369
|
-
setListboxFocusedIndex:
|
|
368
|
+
moveToPreviousElement: m,
|
|
369
|
+
setListboxFocusedIndex: c,
|
|
370
370
|
preventDefault: b,
|
|
371
371
|
focusedIndex: i
|
|
372
372
|
};
|
|
373
|
-
},
|
|
373
|
+
}, yt = (e, a, o = A("option"), l = !0) => {
|
|
374
374
|
const i = A([]), s = async () => {
|
|
375
375
|
if (!e.value || e.value.nodeType === Node.COMMENT_NODE)
|
|
376
376
|
return;
|
|
377
377
|
const n = Array.from(e.value.querySelectorAll(`[role="${o.value}"]`));
|
|
378
378
|
i.value = l ? n.filter((t) => t.checkVisibility()) : n;
|
|
379
379
|
};
|
|
380
|
-
return
|
|
380
|
+
return pe(
|
|
381
381
|
a,
|
|
382
382
|
() => {
|
|
383
|
-
|
|
383
|
+
ne(() => {
|
|
384
384
|
s();
|
|
385
385
|
});
|
|
386
386
|
},
|
|
@@ -389,13 +389,13 @@ const Cl = /* @__PURE__ */ ue(yl, [["render", Sl], ["__scopeId", "data-v-dc2d167
|
|
|
389
389
|
visibleDomOptions: i,
|
|
390
390
|
updateVisibleDomOptions: s
|
|
391
391
|
};
|
|
392
|
-
},
|
|
392
|
+
}, Dt = (e, a) => `${e}-option-${encodeURIComponent(String(a))}`, Il = le({
|
|
393
393
|
name: "bento-listbox-single-select",
|
|
394
394
|
components: {
|
|
395
|
-
BentoListboxSingleSelectCategory:
|
|
396
|
-
BentoListboxSingleSelectOption:
|
|
395
|
+
BentoListboxSingleSelectCategory: bl,
|
|
396
|
+
BentoListboxSingleSelectOption: Ll
|
|
397
397
|
},
|
|
398
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
398
|
+
directives: { BentoKeyboardNavigationDirective: Xe },
|
|
399
399
|
inheritAttrs: !1,
|
|
400
400
|
props: {
|
|
401
401
|
/**
|
|
@@ -457,71 +457,69 @@ const Cl = /* @__PURE__ */ ue(yl, [["render", Sl], ["__scopeId", "data-v-dc2d167
|
|
|
457
457
|
*/
|
|
458
458
|
virtualScrollStartIndex: { type: Number, default: 0 }
|
|
459
459
|
},
|
|
460
|
-
emits: [
|
|
460
|
+
emits: [g.SELECT, g.ENTER, g.SPACE, g.TAB],
|
|
461
461
|
setup(e, { emit: a, expose: o, slots: l, attrs: i }) {
|
|
462
|
-
const s = A(), n = A([]), t = r(() => !!e.selectedValue?.length && e.selectedValue.at(0)),
|
|
462
|
+
const s = A(), n = A([]), t = r(() => !!e.selectedValue?.length && e.selectedValue.at(0)), m = r(
|
|
463
463
|
() => ({
|
|
464
464
|
"aria-label": i["aria-label"]?.toString(),
|
|
465
|
-
"aria-busy": i["aria-busy"]?.toString()
|
|
466
|
-
"aria-atomic": i["aria-atomic"]?.toString(),
|
|
467
|
-
"aria-live": i["aria-live"]?.toString()
|
|
465
|
+
"aria-busy": i["aria-busy"]?.toString()
|
|
468
466
|
})
|
|
469
|
-
),
|
|
470
|
-
a(
|
|
471
|
-
},
|
|
467
|
+
), d = r(() => !!e.items.some(({ items: _ }) => !!_)), u = (_) => (J) => {
|
|
468
|
+
a(_, [J]);
|
|
469
|
+
}, c = (_) => Dt(e.optionIdBase, _.value), { visibleDomOptions: b, updateVisibleDomOptions: v } = yt(
|
|
472
470
|
s,
|
|
473
471
|
de(e, "items"),
|
|
474
472
|
A("option"),
|
|
475
473
|
!1
|
|
476
|
-
),
|
|
477
|
-
if (!
|
|
474
|
+
), S = r(() => e.totalItemCount > 0), D = (_) => {
|
|
475
|
+
if (!S.value)
|
|
478
476
|
return;
|
|
479
|
-
const
|
|
480
|
-
if (
|
|
477
|
+
const J = _.target;
|
|
478
|
+
if (J === s.value || J?.getAttribute("role") !== "option")
|
|
481
479
|
return;
|
|
482
|
-
const
|
|
483
|
-
if (
|
|
484
|
-
const
|
|
485
|
-
|
|
480
|
+
const R = b.value.indexOf(J);
|
|
481
|
+
if (R !== -1) {
|
|
482
|
+
const V = R + e.virtualScrollStartIndex;
|
|
483
|
+
P(V);
|
|
486
484
|
}
|
|
487
|
-
},
|
|
488
|
-
if (
|
|
489
|
-
e.scrollToIndex(
|
|
490
|
-
const
|
|
491
|
-
b.value[
|
|
485
|
+
}, G = async (_) => {
|
|
486
|
+
if (S.value && e.scrollToIndex) {
|
|
487
|
+
e.scrollToIndex(_), await ne(), await v();
|
|
488
|
+
const J = _ - e.virtualScrollStartIndex;
|
|
489
|
+
b.value[J]?.focus();
|
|
492
490
|
} else
|
|
493
|
-
b.value[
|
|
494
|
-
},
|
|
495
|
-
|
|
496
|
-
},
|
|
497
|
-
if (!
|
|
491
|
+
b.value[_]?.focus();
|
|
492
|
+
}, x = async (_) => {
|
|
493
|
+
P(_), await G(_);
|
|
494
|
+
}, C = (_, J) => {
|
|
495
|
+
if (!_ || !J)
|
|
498
496
|
return;
|
|
499
|
-
const
|
|
500
|
-
|
|
501
|
-
},
|
|
502
|
-
await
|
|
497
|
+
const R = _.getBoundingClientRect(), V = J, F = V.getBoundingClientRect();
|
|
498
|
+
R.top < F.top ? V.scrollTop -= F.top - R.top : R.bottom > F.bottom && (V.scrollTop += R.bottom - F.bottom);
|
|
499
|
+
}, N = async (_, J) => {
|
|
500
|
+
await v(), S.value && e.scrollToIndex ? e.scrollToIndex(_) : C(b.value[_], J);
|
|
503
501
|
}, {
|
|
504
|
-
moveToNextElement:
|
|
505
|
-
moveToPreviousElement:
|
|
506
|
-
moveToFirstElement:
|
|
507
|
-
moveToLastElement:
|
|
508
|
-
setListboxFocusedIndex:
|
|
509
|
-
} =
|
|
502
|
+
moveToNextElement: $,
|
|
503
|
+
moveToPreviousElement: I,
|
|
504
|
+
moveToFirstElement: k,
|
|
505
|
+
moveToLastElement: W,
|
|
506
|
+
setListboxFocusedIndex: P
|
|
507
|
+
} = $t(
|
|
510
508
|
{
|
|
511
509
|
items: b,
|
|
512
510
|
totalItemCount: de(e, "totalItemCount")
|
|
513
511
|
},
|
|
514
|
-
|
|
515
|
-
),
|
|
516
|
-
[
|
|
517
|
-
[
|
|
518
|
-
[
|
|
519
|
-
[
|
|
520
|
-
},
|
|
521
|
-
[
|
|
522
|
-
[
|
|
523
|
-
[
|
|
524
|
-
[
|
|
512
|
+
G
|
|
513
|
+
), H = {
|
|
514
|
+
[ae.ARROW_UP]: I,
|
|
515
|
+
[ae.ARROW_DOWN]: $,
|
|
516
|
+
[ae.HOME]: k,
|
|
517
|
+
[ae.END]: W
|
|
518
|
+
}, re = {
|
|
519
|
+
[g.SELECT]: u(g.SELECT),
|
|
520
|
+
[g.SPACE]: u(g.SPACE),
|
|
521
|
+
[g.TAB]: u(g.TAB),
|
|
522
|
+
[g.ENTER]: u(g.ENTER)
|
|
525
523
|
};
|
|
526
524
|
return o({
|
|
527
525
|
/**
|
|
@@ -533,134 +531,134 @@ const Cl = /* @__PURE__ */ ue(yl, [["render", Sl], ["__scopeId", "data-v-dc2d167
|
|
|
533
531
|
* Method to set the index of the item to be focused on
|
|
534
532
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
535
533
|
*/
|
|
536
|
-
setListboxFocusedIndex:
|
|
534
|
+
setListboxFocusedIndex: P,
|
|
537
535
|
/**
|
|
538
536
|
* Navigates to an item by global index, handling virtual scroll if enabled.
|
|
539
537
|
* Scrolls the virtual list and focuses the item.
|
|
540
538
|
*/
|
|
541
|
-
navigateToItem:
|
|
539
|
+
navigateToItem: x,
|
|
542
540
|
/**
|
|
543
541
|
* Scrolls to an item by global index without changing focus.
|
|
544
542
|
* Used when the dropdown opens via click to bring the selected option into view.
|
|
545
543
|
*/
|
|
546
|
-
scrollToItem:
|
|
544
|
+
scrollToItem: N
|
|
547
545
|
}), {
|
|
548
546
|
// Enums
|
|
549
|
-
BentoListboxEvent:
|
|
547
|
+
BentoListboxEvent: g,
|
|
550
548
|
// Values
|
|
551
549
|
listboxRef: s,
|
|
552
550
|
listboxItemRef: n,
|
|
553
551
|
selectedItem: t,
|
|
554
552
|
slots: l,
|
|
555
|
-
ariaAttributes:
|
|
556
|
-
getOptionId:
|
|
553
|
+
ariaAttributes: m,
|
|
554
|
+
getOptionId: c,
|
|
557
555
|
// Computed
|
|
558
|
-
hasCategories:
|
|
556
|
+
hasCategories: d,
|
|
559
557
|
// Methods
|
|
560
|
-
onOptionSelected:
|
|
558
|
+
onOptionSelected: u,
|
|
561
559
|
// Keyboard navigation
|
|
562
|
-
listboxListeners:
|
|
563
|
-
listboxOptionListeners:
|
|
560
|
+
listboxListeners: H,
|
|
561
|
+
listboxOptionListeners: re,
|
|
564
562
|
// Virtual scroll focus management
|
|
565
|
-
handleVirtualScrollingFocus:
|
|
563
|
+
handleVirtualScrollingFocus: D
|
|
566
564
|
};
|
|
567
565
|
}
|
|
568
566
|
});
|
|
569
|
-
function
|
|
570
|
-
const n =
|
|
571
|
-
return Le((p(),
|
|
572
|
-
onFocusin: a[0] || (a[0] = (...
|
|
567
|
+
function El(e, a, o, l, i, s) {
|
|
568
|
+
const n = Z("bento-listbox-single-select-option"), t = Z("bento-listbox-single-select-category"), m = It("bento-keyboard-navigation-directive");
|
|
569
|
+
return Le((p(), E("div", z({ ref: "listboxRef" }, e.ariaAttributes, { role: "listbox" }, ve(e.listboxListeners, !0), {
|
|
570
|
+
onFocusin: a[0] || (a[0] = (...d) => e.handleVirtualScrollingFocus && e.handleVirtualScrollingFocus(...d))
|
|
573
571
|
}), [
|
|
574
|
-
e.hasCategories && e.staticCategories ? (p(!0),
|
|
575
|
-
|
|
576
|
-
key: `category-${
|
|
577
|
-
"category-label":
|
|
572
|
+
e.hasCategories && e.staticCategories ? (p(!0), E(ye, { key: 0 }, ie(e.items, (d) => (p(), E(ye, null, [
|
|
573
|
+
d.items && d.items.length > 0 ? (p(), M(t, {
|
|
574
|
+
key: `category-${d.value}`,
|
|
575
|
+
"category-label": d.label
|
|
578
576
|
}, {
|
|
579
|
-
default:
|
|
580
|
-
(p(!0),
|
|
581
|
-
id: e.getOptionId(
|
|
582
|
-
key:
|
|
577
|
+
default: B(() => [
|
|
578
|
+
(p(!0), E(ye, null, ie(d.items, (u) => (p(), M(n, z({
|
|
579
|
+
id: e.getOptionId(u),
|
|
580
|
+
key: u.value,
|
|
583
581
|
ref_for: !0,
|
|
584
582
|
ref: "listboxItemRef",
|
|
585
583
|
role: "option",
|
|
586
|
-
active: e.activeDescendantId === e.getOptionId(
|
|
587
|
-
option:
|
|
588
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
589
|
-
selected:
|
|
590
|
-
},
|
|
591
|
-
|
|
584
|
+
active: e.activeDescendantId === e.getOptionId(u),
|
|
585
|
+
option: u,
|
|
586
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(u) : null,
|
|
587
|
+
selected: u.value === e.selectedItem.value
|
|
588
|
+
}, ve(e.listboxOptionListeners)), Te({ _: 2 }, [
|
|
589
|
+
ie(e.slots, (c, b) => ({
|
|
592
590
|
name: b,
|
|
593
|
-
fn:
|
|
594
|
-
|
|
591
|
+
fn: B((v) => [
|
|
592
|
+
Q(e.$slots, b, z({ ref_for: !0 }, v))
|
|
595
593
|
])
|
|
596
594
|
}))
|
|
597
595
|
]), 1040, ["id", "active", "option", "disabled", "selected"]))), 128))
|
|
598
596
|
]),
|
|
599
597
|
_: 2
|
|
600
|
-
}, 1032, ["category-label"])) : (p(),
|
|
601
|
-
id: e.getOptionId(
|
|
602
|
-
key: `option-${
|
|
598
|
+
}, 1032, ["category-label"])) : (p(), M(n, z({
|
|
599
|
+
id: e.getOptionId(d),
|
|
600
|
+
key: `option-${d.value}`,
|
|
603
601
|
ref_for: !0,
|
|
604
602
|
ref: "listboxItemRef",
|
|
605
603
|
role: "option",
|
|
606
|
-
active: e.activeDescendantId === e.getOptionId(
|
|
607
|
-
option:
|
|
608
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
609
|
-
selected:
|
|
610
|
-
},
|
|
611
|
-
|
|
612
|
-
name:
|
|
613
|
-
fn:
|
|
614
|
-
|
|
604
|
+
active: e.activeDescendantId === e.getOptionId(d),
|
|
605
|
+
option: d,
|
|
606
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(d) : null,
|
|
607
|
+
selected: d.value === e.selectedItem.value
|
|
608
|
+
}, ve(e.listboxOptionListeners)), Te({ _: 2 }, [
|
|
609
|
+
ie(e.slots, (u, c) => ({
|
|
610
|
+
name: c,
|
|
611
|
+
fn: B((b) => [
|
|
612
|
+
Q(e.$slots, c, z({ ref_for: !0 }, b))
|
|
615
613
|
])
|
|
616
614
|
}))
|
|
617
615
|
]), 1040, ["id", "active", "option", "disabled", "selected"]))
|
|
618
|
-
], 64))), 256)) : (p(!0),
|
|
619
|
-
id: e.getOptionId(
|
|
620
|
-
key:
|
|
616
|
+
], 64))), 256)) : (p(!0), E(ye, { key: 1 }, ie(e.items, (d) => (p(), M(n, z({
|
|
617
|
+
id: e.getOptionId(d),
|
|
618
|
+
key: d.value,
|
|
621
619
|
ref_for: !0,
|
|
622
620
|
ref: "listboxItemRef",
|
|
623
621
|
role: "option",
|
|
624
|
-
active: e.activeDescendantId === e.getOptionId(
|
|
625
|
-
option:
|
|
626
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
627
|
-
selected:
|
|
628
|
-
},
|
|
629
|
-
|
|
630
|
-
name:
|
|
631
|
-
fn:
|
|
632
|
-
|
|
622
|
+
active: e.activeDescendantId === e.getOptionId(d),
|
|
623
|
+
option: d,
|
|
624
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(d) : null,
|
|
625
|
+
selected: d.value === e.selectedItem.value
|
|
626
|
+
}, ve(e.listboxOptionListeners)), Te({ _: 2 }, [
|
|
627
|
+
ie(e.slots, (u, c) => ({
|
|
628
|
+
name: c,
|
|
629
|
+
fn: B((b) => [
|
|
630
|
+
Q(e.$slots, c, z({ ref_for: !0 }, b))
|
|
633
631
|
])
|
|
634
632
|
}))
|
|
635
633
|
]), 1040, ["id", "active", "option", "disabled", "selected"]))), 128))
|
|
636
634
|
], 16)), [
|
|
637
|
-
[
|
|
635
|
+
[m]
|
|
638
636
|
]);
|
|
639
637
|
}
|
|
640
|
-
const
|
|
638
|
+
const Ol = /* @__PURE__ */ ce(Il, [["render", El]]), Tl = { key: 0 }, Al = {
|
|
641
639
|
__name: "double-checkmark-small",
|
|
642
640
|
setup(e) {
|
|
643
|
-
const a =
|
|
644
|
-
return String(a?.uid ?? a?.proxy?._uid), (o, l) => (p(),
|
|
641
|
+
const a = ot();
|
|
642
|
+
return String(a?.uid ?? a?.proxy?._uid), (o, l) => (p(), E("svg", z({ role: "img" }, o.$attrs, {
|
|
645
643
|
class: "ui-assets-icons-16",
|
|
646
644
|
xmlns: "http://www.w3.org/2000/svg",
|
|
647
645
|
width: "16",
|
|
648
646
|
height: "16",
|
|
649
647
|
fill: "none"
|
|
650
648
|
}), [
|
|
651
|
-
o.$attrs["svg-title"] ? (p(),
|
|
652
|
-
l[0] || (l[0] =
|
|
649
|
+
o.$attrs["svg-title"] ? (p(), E("title", Tl, q(o.$attrs["svg-title"]), 1)) : j("", !0),
|
|
650
|
+
l[0] || (l[0] = Y("path", {
|
|
653
651
|
fill: "#001222",
|
|
654
652
|
d: "M9.69043 5.75L4.62988 10.8105L1.56934 7.75L2.62988 6.68945L4.62988 8.68945L8.62988 4.68945L9.69043 5.75Z"
|
|
655
653
|
}, null, -1)),
|
|
656
|
-
l[1] || (l[1] =
|
|
654
|
+
l[1] || (l[1] = Y("path", {
|
|
657
655
|
fill: "#001222",
|
|
658
656
|
d: "M13.9307 5.75L8.87012 10.8105L7.80957 9.75L12.8701 4.68945L13.9307 5.75Z"
|
|
659
657
|
}, null, -1))
|
|
660
658
|
], 16));
|
|
661
659
|
}
|
|
662
|
-
},
|
|
663
|
-
...
|
|
660
|
+
}, wl = {}, _l = /* @__PURE__ */ le({
|
|
661
|
+
...wl,
|
|
664
662
|
__name: "decorative-checkbox",
|
|
665
663
|
props: {
|
|
666
664
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -670,41 +668,41 @@ const El = /* @__PURE__ */ ue(Ll, [["render", Il]]), Ol = { key: 0 }, Tl = {
|
|
|
670
668
|
},
|
|
671
669
|
setup(e) {
|
|
672
670
|
const a = e, o = r(() => ({
|
|
673
|
-
[`b-checkbox-input--${
|
|
671
|
+
[`b-checkbox-input--${lt.DISABLED}`]: a.disabled
|
|
674
672
|
})), l = r(() => ({
|
|
675
|
-
[`b-checkbox-input__outline--${
|
|
676
|
-
[`b-checkbox-input__outline--${
|
|
677
|
-
[`b-checkbox-input__outline--${
|
|
673
|
+
[`b-checkbox-input__outline--${lt.UNCHECKED}`]: !a.checked && !a.indeterminate && !a.allSelected,
|
|
674
|
+
[`b-checkbox-input__outline--${lt.CHECKED}`]: (a.checked || a.allSelected) && !a.indeterminate,
|
|
675
|
+
[`b-checkbox-input__outline--${lt.INDETERMINATE}`]: a.indeterminate
|
|
678
676
|
}));
|
|
679
|
-
return (i, s) => (p(),
|
|
680
|
-
class:
|
|
677
|
+
return (i, s) => (p(), E("div", {
|
|
678
|
+
class: _e(["b-checkbox-input", o.value]),
|
|
681
679
|
role: "presentation"
|
|
682
680
|
}, [
|
|
683
|
-
i.indeterminate ? (p(),
|
|
681
|
+
i.indeterminate ? (p(), M(f(Zt), {
|
|
684
682
|
key: 0,
|
|
685
683
|
class: "b-checkbox-input__icon",
|
|
686
684
|
"svg-title": "",
|
|
687
685
|
"aria-hidden": "true"
|
|
688
|
-
})) : i.allSelected ? (p(),
|
|
686
|
+
})) : i.allSelected ? (p(), M(f(Al), {
|
|
689
687
|
key: 1,
|
|
690
688
|
class: "b-checkbox-input__icon",
|
|
691
689
|
"svg-title": "",
|
|
692
690
|
"aria-hidden": "true",
|
|
693
691
|
"data-testid": "decorative-checkbox-double-checkmark-icon"
|
|
694
|
-
})) : i.checked ? (p(),
|
|
692
|
+
})) : i.checked ? (p(), M(f(Qt), {
|
|
695
693
|
key: 2,
|
|
696
694
|
class: "b-checkbox-input__icon",
|
|
697
695
|
"svg-title": "",
|
|
698
696
|
"aria-hidden": "true"
|
|
699
|
-
})) :
|
|
700
|
-
|
|
701
|
-
class:
|
|
697
|
+
})) : j("", !0),
|
|
698
|
+
Y("div", {
|
|
699
|
+
class: _e(["b-checkbox-input__outline", l.value])
|
|
702
700
|
}, null, 2)
|
|
703
701
|
], 2));
|
|
704
702
|
}
|
|
705
|
-
}),
|
|
706
|
-
var xt = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(xt || {}),
|
|
707
|
-
const
|
|
703
|
+
}), gt = /* @__PURE__ */ ce(_l, [["__scopeId", "data-v-e40313a8"]]);
|
|
704
|
+
var xt = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(xt || {}), ze = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(ze || {});
|
|
705
|
+
const Bt = {
|
|
708
706
|
"de-DE": { loading: "Laden", showMore: "Mehr anzeigen" },
|
|
709
707
|
"en-GB": { loading: "Loading", showMore: "Show more" },
|
|
710
708
|
"en-US": { loading: "Loading", showMore: "Show more" },
|
|
@@ -716,14 +714,19 @@ const Dt = {
|
|
|
716
714
|
"ja-JP": { loading: "読み込み中", showMore: "さらに表示" },
|
|
717
715
|
"pt-BR": { loading: "Carregando", showMore: "Mostrar mais" },
|
|
718
716
|
"zh-CN": { loading: "正在加载", showMore: "显示更多" }
|
|
719
|
-
},
|
|
717
|
+
}, kl = {
|
|
720
718
|
key: 0,
|
|
721
719
|
class: "b-listbox-lazy-load"
|
|
722
|
-
},
|
|
720
|
+
}, $l = {
|
|
721
|
+
class: "b-listbox-lazy-load__announcement",
|
|
722
|
+
role: "status",
|
|
723
|
+
"aria-live": "polite",
|
|
724
|
+
"aria-atomic": "true"
|
|
725
|
+
}, Dl = {
|
|
723
726
|
name: "listbox-lazy-load",
|
|
724
|
-
i18n: { messages:
|
|
725
|
-
},
|
|
726
|
-
...
|
|
727
|
+
i18n: { messages: Bt }
|
|
728
|
+
}, xl = /* @__PURE__ */ le({
|
|
729
|
+
...Dl,
|
|
727
730
|
props: {
|
|
728
731
|
condensed: { type: Boolean, default: !1 },
|
|
729
732
|
hasMoreItems: { type: Boolean, default: !1 },
|
|
@@ -733,31 +736,36 @@ const Dt = {
|
|
|
733
736
|
},
|
|
734
737
|
emits: ["show-more"],
|
|
735
738
|
setup(e) {
|
|
736
|
-
const { t: a } =
|
|
737
|
-
() => o.type ===
|
|
739
|
+
const { t: a } = Ne({ messages: Bt }), o = e, l = r(
|
|
740
|
+
() => o.type === Ae.BUTTON && o.hasMoreItems
|
|
738
741
|
), i = r(
|
|
739
|
-
() => o.loading ?
|
|
742
|
+
() => o.loading ? at.LOADING : at.START
|
|
740
743
|
), s = r(() => o.loading ? a("loading") : a("showMore"));
|
|
741
|
-
return (n, t) => l.value || n.loading ? (p(),
|
|
742
|
-
|
|
744
|
+
return (n, t) => l.value || n.loading ? (p(), E("div", kl, [
|
|
745
|
+
Y("div", $l, [
|
|
746
|
+
n.type === f(Ae).AUTOMATIC && n.loading ? (p(), E(ye, { key: 0 }, [
|
|
747
|
+
oe(q(f(a)("loading")), 1)
|
|
748
|
+
], 64)) : j("", !0)
|
|
749
|
+
]),
|
|
750
|
+
l.value ? (p(), M(f(tl), {
|
|
743
751
|
key: 0,
|
|
744
752
|
state: i.value,
|
|
745
753
|
tabindex: n.tabindex,
|
|
746
754
|
condensed: n.condensed,
|
|
747
755
|
variant: "secondary",
|
|
748
|
-
onClickCapture: t[0] || (t[0] = (
|
|
756
|
+
onClickCapture: t[0] || (t[0] = (m) => n.$emit("show-more", m))
|
|
749
757
|
}, {
|
|
750
|
-
default:
|
|
751
|
-
|
|
758
|
+
default: B(() => [
|
|
759
|
+
oe(q(s.value), 1)
|
|
752
760
|
]),
|
|
753
761
|
_: 1
|
|
754
|
-
}, 8, ["state", "tabindex", "condensed"])) : n.loading ? (p(),
|
|
755
|
-
])) :
|
|
762
|
+
}, 8, ["state", "tabindex", "condensed"])) : n.loading ? (p(), M(f(Tt), { key: 1 })) : j("", !0)
|
|
763
|
+
])) : j("", !0);
|
|
756
764
|
}
|
|
757
|
-
}),
|
|
765
|
+
}), Rt = /* @__PURE__ */ ce(xl, [["__scopeId", "data-v-e8b6702e"]]), Mt = {
|
|
758
766
|
"de-DE": { thereWasAnErrorLoadingNewItems: "Beim Laden neuer Artikel ist ein Fehler aufgetreten." },
|
|
759
767
|
"en-GB": { thereWasAnErrorLoadingNewItems: "There was an error loading new items." },
|
|
760
|
-
"en-US": { thereWasAnErrorLoadingNewItems: "There was an error loading new items." },
|
|
768
|
+
"en-US": { loadMoreItemsForCategory: "Load more items for {category}.", loadingItemsForCategory: "Loading items for {category}.", pressEnterOrSpaceToLoadMoreItems: "Press Enter or Space to load more items.", thereWasAnErrorLoadingNewItems: "There was an error loading new items." },
|
|
761
769
|
"es-419": { thereWasAnErrorLoadingNewItems: "Se produjo un error al cargar los nuevos elementos." },
|
|
762
770
|
"es-ES": { thereWasAnErrorLoadingNewItems: "Se produjo un error al cargar los nuevos elementos." },
|
|
763
771
|
"fr-FR": { thereWasAnErrorLoadingNewItems: "Une erreur s'est produite lors du chargement des nouveaux éléments." },
|
|
@@ -765,27 +773,36 @@ const Dt = {
|
|
|
765
773
|
"ja-JP": { thereWasAnErrorLoadingNewItems: "新しいアイテムの読み込みにエラーが発生しました。" },
|
|
766
774
|
"pt-BR": { thereWasAnErrorLoadingNewItems: "Ocorreu um erro ao carregar novos itens." },
|
|
767
775
|
"zh-CN": { thereWasAnErrorLoadingNewItems: "加载新项目时出错。" }
|
|
768
|
-
},
|
|
776
|
+
}, Bl = ["aria-labelledby", "onKeydown"], Rl = ["id"], Ml = {
|
|
777
|
+
class: "b-listbox-multi-select-nested-lazy-load__visually-hidden",
|
|
778
|
+
role: "status",
|
|
779
|
+
"aria-live": "polite",
|
|
780
|
+
"aria-atomic": "true"
|
|
781
|
+
}, Nl = {
|
|
769
782
|
name: "listbox-multi-select-nested-lazy-load",
|
|
770
|
-
i18n: { messages:
|
|
771
|
-
},
|
|
772
|
-
...
|
|
783
|
+
i18n: { messages: Mt }
|
|
784
|
+
}, Pl = /* @__PURE__ */ le({
|
|
785
|
+
...Nl,
|
|
773
786
|
props: {
|
|
774
787
|
index: {},
|
|
775
788
|
option: {}
|
|
776
789
|
},
|
|
777
790
|
setup(e, { expose: a }) {
|
|
778
|
-
const o = A(!1), l = A(!1),
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
791
|
+
const o = A(!1), l = A(!1), i = A(""), s = A(null), n = xe("nested-lazy-load-name");
|
|
792
|
+
let t = !1;
|
|
793
|
+
const { t: m } = Ne({ messages: Mt }), d = e;
|
|
794
|
+
async function u(c) {
|
|
795
|
+
if (c.stopImmediatePropagation(), !(o.value || t)) {
|
|
796
|
+
t = !0, await ne(), s.value?.focus(), l.value = !1, o.value = !0, i.value = m("loadingItemsForCategory", { category: d.option.label }), t = !1;
|
|
782
797
|
try {
|
|
783
|
-
await
|
|
784
|
-
value:
|
|
785
|
-
index:
|
|
786
|
-
});
|
|
798
|
+
await d.option.lazyLoad?.lazyLoadEvent({
|
|
799
|
+
value: d.option.value,
|
|
800
|
+
index: d.index
|
|
801
|
+
}), i.value = "";
|
|
787
802
|
} catch {
|
|
788
|
-
l.value = !0
|
|
803
|
+
l.value = !0, i.value = `${m("thereWasAnErrorLoadingNewItems")} ${m(
|
|
804
|
+
"pressEnterOrSpaceToLoadMoreItems"
|
|
805
|
+
)}`;
|
|
789
806
|
}
|
|
790
807
|
o.value = !1;
|
|
791
808
|
}
|
|
@@ -794,39 +811,53 @@ const Dt = {
|
|
|
794
811
|
/**
|
|
795
812
|
* Trigger the lazy load event programmatically.
|
|
796
813
|
*/
|
|
797
|
-
showMore:
|
|
798
|
-
}), (
|
|
814
|
+
showMore: u
|
|
815
|
+
}), (c, b) => (p(), E("div", {
|
|
816
|
+
ref_key: "nestedLazyLoadRef",
|
|
817
|
+
ref: s,
|
|
799
818
|
role: "treeitem",
|
|
800
819
|
tabindex: 0,
|
|
820
|
+
"aria-labelledby": f(n),
|
|
801
821
|
onKeydown: [
|
|
802
|
-
|
|
803
|
-
|
|
822
|
+
Ce(ge(u, ["prevent"]), ["enter"]),
|
|
823
|
+
Ce(ge(u, ["prevent"]), ["space"])
|
|
804
824
|
]
|
|
805
825
|
}, [
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
])
|
|
814
|
-
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
826
|
+
Y("span", {
|
|
827
|
+
id: f(n),
|
|
828
|
+
class: "b-listbox-multi-select-nested-lazy-load__visually-hidden"
|
|
829
|
+
}, q(f(m)("loadMoreItemsForCategory", { category: c.option.label })), 9, Rl),
|
|
830
|
+
Y("div", Ml, q(i.value), 1),
|
|
831
|
+
Y("div", {
|
|
832
|
+
"aria-hidden": "true",
|
|
833
|
+
onMousedown: b[0] || (b[0] = ge(() => {
|
|
834
|
+
}, ["prevent"]))
|
|
835
|
+
}, [
|
|
836
|
+
l.value ? (p(), M(f(At), {
|
|
837
|
+
key: 0,
|
|
838
|
+
variant: "basic",
|
|
839
|
+
class: "b-listbox-multi-select-nested-lazy-load__error-message"
|
|
840
|
+
}, {
|
|
841
|
+
default: B(() => [
|
|
842
|
+
oe(q(f(m)("thereWasAnErrorLoadingNewItems")), 1)
|
|
843
|
+
]),
|
|
844
|
+
_: 1
|
|
845
|
+
})) : j("", !0),
|
|
846
|
+
X(f(Rt), {
|
|
847
|
+
type: "button",
|
|
848
|
+
tabindex: -1,
|
|
849
|
+
condensed: "",
|
|
850
|
+
"has-more-items": c.option.lazyLoad?.hasMoreItems,
|
|
851
|
+
loading: o.value,
|
|
852
|
+
onShowMore: u
|
|
853
|
+
}, null, 8, ["has-more-items", "loading"])
|
|
854
|
+
], 32)
|
|
855
|
+
], 40, Bl));
|
|
825
856
|
}
|
|
826
|
-
}),
|
|
857
|
+
}), Fl = /* @__PURE__ */ ce(Pl, [["__scopeId", "data-v-d39fec1a"]]), Ct = {
|
|
827
858
|
"de-DE": { categoryClosed: "{category} geschlossen", categoryOpened: "{category} geöffnet" },
|
|
828
859
|
"en-GB": { categoryClosed: "{category} closed", categoryOpened: "{category} opened" },
|
|
829
|
-
"en-US": { categoryClosed: "{category} closed", categoryOpened: "{category} opened" },
|
|
860
|
+
"en-US": { allItemsForCategoryAreLoaded: "All items for {category} are loaded.", categoryClosed: "{category} closed", categoryOpened: "{category} opened" },
|
|
830
861
|
"es-419": { categoryClosed: "{category} cerrado", categoryOpened: "{category} abierta" },
|
|
831
862
|
"es-ES": { categoryClosed: "{category} cerrado", categoryOpened: "{category} abierto" },
|
|
832
863
|
"es-MX": { categoryClosed: "{category} cerrado", categoryOpened: "{category} abierto" },
|
|
@@ -835,16 +866,16 @@ const Dt = {
|
|
|
835
866
|
"ja-JP": { categoryClosed: "{category}を閉じました", categoryOpened: "{category}を開きました" },
|
|
836
867
|
"pt-BR": { categoryClosed: "{category} fechada", categoryOpened: "{categoria} aberta" },
|
|
837
868
|
"zh-CN": { categoryClosed: "{category} 已关闭", categoryOpened: "{category} 已打开" }
|
|
838
|
-
},
|
|
839
|
-
i18n: { messages:
|
|
869
|
+
}, zl = le({
|
|
870
|
+
i18n: { messages: Ct },
|
|
840
871
|
name: "bento-listbox-multi-select-category",
|
|
841
872
|
components: {
|
|
842
|
-
BentoTypography:
|
|
843
|
-
BentoListboxOption:
|
|
844
|
-
BentoListboxMultiSelectNestedLazyLoad:
|
|
845
|
-
ChevronDownIcon:
|
|
846
|
-
ChevronUpIcon:
|
|
847
|
-
DecorativeCheckbox:
|
|
873
|
+
BentoTypography: Me,
|
|
874
|
+
BentoListboxOption: st,
|
|
875
|
+
BentoListboxMultiSelectNestedLazyLoad: Fl,
|
|
876
|
+
ChevronDownIcon: wt,
|
|
877
|
+
ChevronUpIcon: _t,
|
|
878
|
+
DecorativeCheckbox: gt
|
|
848
879
|
},
|
|
849
880
|
props: {
|
|
850
881
|
/**
|
|
@@ -897,89 +928,100 @@ const Dt = {
|
|
|
897
928
|
tabindex: { type: Number, default: -1 }
|
|
898
929
|
},
|
|
899
930
|
emits: [
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
931
|
+
ze.SELECT_CATEGORY,
|
|
932
|
+
ze.UNSELECT_CATEGORY,
|
|
933
|
+
ze.TOGGLE_CATEGORY_VISIBILITY
|
|
903
934
|
],
|
|
904
935
|
setup(e, { emit: a }) {
|
|
905
|
-
const o = A(!1), { t: l } =
|
|
906
|
-
[`b-listbox-multi-select-category--${xt.DISABLED}`]:
|
|
907
|
-
})),
|
|
908
|
-
|
|
909
|
-
}, S = (
|
|
910
|
-
const
|
|
911
|
-
return { isDisabled:
|
|
912
|
-
},
|
|
913
|
-
() => e.category.items.filter((
|
|
914
|
-
const { isDisabled:
|
|
915
|
-
return
|
|
936
|
+
const o = A(!1), { t: l } = Ne({ messages: Ct }), i = xe("category-group"), s = xe("category-name"), n = A(null), t = A(""), m = (R) => e.isOptionDisabled ? e.isOptionDisabled(R) : !1, d = r(() => e.category.lazyLoad && e.category.items?.length === 0 ? !1 : e.category.items.every((R) => m(R))), u = de(e, "staticCategories"), c = r(() => o.value || e.staticCategories), b = r(() => ({
|
|
937
|
+
[`b-listbox-multi-select-category--${xt.DISABLED}`]: d.value
|
|
938
|
+
})), v = (R, V) => {
|
|
939
|
+
R.preventDefault(), e.category.lazyLoad && e.category.items?.length === 0 && n.value.showMore(R), o.value = V !== void 0 ? V : !o.value, a(ze.TOGGLE_CATEGORY_VISIBILITY, e.category.value);
|
|
940
|
+
}, S = (R) => {
|
|
941
|
+
const V = m(R), F = e.selectedItemsList?.includes(R.value) || !1;
|
|
942
|
+
return { isDisabled: V, isPreSelected: F };
|
|
943
|
+
}, D = r(
|
|
944
|
+
() => e.category.items.filter((R) => {
|
|
945
|
+
const { isDisabled: V, isPreSelected: F } = S(R);
|
|
946
|
+
return V && F || !V;
|
|
916
947
|
})
|
|
917
|
-
),
|
|
918
|
-
() =>
|
|
919
|
-
),
|
|
920
|
-
const
|
|
921
|
-
return l(
|
|
922
|
-
}),
|
|
923
|
-
a(
|
|
924
|
-
},
|
|
925
|
-
a(
|
|
926
|
-
},
|
|
948
|
+
), G = r(
|
|
949
|
+
() => D.value?.filter(({ value: R }) => e.selectedItemsList?.includes(R))
|
|
950
|
+
), x = r(() => {
|
|
951
|
+
const R = o.value ? "categoryOpened" : "categoryClosed";
|
|
952
|
+
return l(R, { category: e.category.label });
|
|
953
|
+
}), C = () => {
|
|
954
|
+
a(ze.SELECT_CATEGORY);
|
|
955
|
+
}, N = () => {
|
|
956
|
+
a(ze.UNSELECT_CATEGORY);
|
|
957
|
+
}, $ = r(
|
|
927
958
|
() => !!e.category.lazyLoad && e.selectedItemsList.includes(e.category.value)
|
|
928
959
|
), {
|
|
929
|
-
isAllSelected:
|
|
930
|
-
isIndeterminate:
|
|
931
|
-
toggleSelectAll:
|
|
932
|
-
} =
|
|
933
|
-
|
|
960
|
+
isAllSelected: I,
|
|
961
|
+
isIndeterminate: k,
|
|
962
|
+
toggleSelectAll: W
|
|
963
|
+
} = kt(G, D, C, N), P = r(() => $.value || I.value), H = r(() => !$.value && k.value), re = r(() => H.value ? "mixed" : `${P.value}`), _ = A(P.value), J = () => {
|
|
964
|
+
_.value = !_.value, W(_.value);
|
|
934
965
|
};
|
|
935
|
-
return
|
|
936
|
-
|
|
937
|
-
}),
|
|
966
|
+
return pe(P, () => {
|
|
967
|
+
_.value = P.value;
|
|
968
|
+
}), pe(
|
|
969
|
+
() => e.category.lazyLoad?.hasMoreItems,
|
|
970
|
+
(R, V) => {
|
|
971
|
+
t.value = V === !0 && R === !1 ? l("allItemsForCategoryAreLoaded", { category: e.category.label }) : "";
|
|
972
|
+
}
|
|
973
|
+
), {
|
|
938
974
|
// Refs
|
|
939
975
|
lazyLoadRef: n,
|
|
940
976
|
// Values
|
|
941
|
-
chevronTitle:
|
|
942
|
-
conditionalClass:
|
|
943
|
-
hasAllPropsDisabled:
|
|
977
|
+
chevronTitle: x,
|
|
978
|
+
conditionalClass: b,
|
|
979
|
+
hasAllPropsDisabled: d,
|
|
944
980
|
isOpen: o,
|
|
945
|
-
isAllSelected:
|
|
946
|
-
isIndeterminate:
|
|
981
|
+
isAllSelected: P,
|
|
982
|
+
isIndeterminate: H,
|
|
947
983
|
isStaticCategory: u,
|
|
948
984
|
categoryGroupId: i,
|
|
949
985
|
categoryNameId: s,
|
|
986
|
+
lazyLoadAnnouncement: t,
|
|
950
987
|
// Computed
|
|
951
988
|
showItemChildren: c,
|
|
952
|
-
ariaCheckedComputed:
|
|
989
|
+
ariaCheckedComputed: re,
|
|
953
990
|
// Methods
|
|
954
|
-
handleSelectAll:
|
|
955
|
-
toggleOpen:
|
|
956
|
-
toggleSelectAll:
|
|
991
|
+
handleSelectAll: J,
|
|
992
|
+
toggleOpen: v,
|
|
993
|
+
toggleSelectAll: W
|
|
957
994
|
};
|
|
958
995
|
}
|
|
959
|
-
}),
|
|
996
|
+
}), Vl = { class: "b-listbox-multi-select-category__label" }, Gl = {
|
|
997
|
+
class: "b-listbox-multi-select-category__announcement",
|
|
998
|
+
role: "status",
|
|
999
|
+
"aria-live": "polite",
|
|
1000
|
+
"aria-atomic": "true"
|
|
1001
|
+
}, Kl = {
|
|
960
1002
|
key: 1,
|
|
961
1003
|
class: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category",
|
|
962
1004
|
"aria-hidden": "true"
|
|
963
|
-
},
|
|
964
|
-
function
|
|
965
|
-
const n =
|
|
966
|
-
return p(),
|
|
967
|
-
e.isStaticCategory ? (p(),
|
|
968
|
-
|
|
969
|
-
|
|
1005
|
+
}, Ul = { class: "b-listbox-multi-select-category__label" }, Wl = ["id", "aria-label"];
|
|
1006
|
+
function ql(e, a, o, l, i, s) {
|
|
1007
|
+
const n = Z("decorative-checkbox"), t = Z("bento-typography"), m = Z("chevron-up-icon"), d = Z("chevron-down-icon"), u = Z("bento-listbox-option"), c = Z("bento-listbox-multi-select-nested-lazy-load");
|
|
1008
|
+
return p(), E("div", null, [
|
|
1009
|
+
e.isStaticCategory ? (p(), E("div", Kl, [
|
|
1010
|
+
Y("span", Ul, [
|
|
1011
|
+
X(t, {
|
|
970
1012
|
el: "span",
|
|
971
1013
|
variant: "caption",
|
|
972
1014
|
class: "b-listbox-multi-select-category__label-text"
|
|
973
1015
|
}, {
|
|
974
|
-
default:
|
|
975
|
-
|
|
1016
|
+
default: B(() => [
|
|
1017
|
+
oe(q(e.category.label), 1)
|
|
976
1018
|
]),
|
|
977
1019
|
_: 1
|
|
978
1020
|
})
|
|
979
1021
|
])
|
|
980
|
-
])) : (p(),
|
|
1022
|
+
])) : (p(), M(u, {
|
|
981
1023
|
key: 0,
|
|
982
|
-
class:
|
|
1024
|
+
class: _e(["b-listbox-multi-select-category__option", e.conditionalClass]),
|
|
983
1025
|
tabindex: e.tabindex,
|
|
984
1026
|
"aria-selected": e.ariaCheckedComputed !== "false",
|
|
985
1027
|
"aria-checked": e.ariaCheckedComputed,
|
|
@@ -990,73 +1032,74 @@ function zl(e, a, o, l, i, s) {
|
|
|
990
1032
|
"aria-labelledby": e.categoryNameId,
|
|
991
1033
|
onClick: e.handleSelectAll,
|
|
992
1034
|
onEnterPressed: e.handleSelectAll,
|
|
993
|
-
onSpacePressed:
|
|
1035
|
+
onSpacePressed: ge(e.handleSelectAll, ["prevent"]),
|
|
994
1036
|
onKeydown: [
|
|
995
|
-
a[1] || (a[1] =
|
|
996
|
-
a[2] || (a[2] =
|
|
1037
|
+
a[1] || (a[1] = Ce((b) => e.toggleOpen(b, !1), ["arrow-left", "native"])),
|
|
1038
|
+
a[2] || (a[2] = Ce((b) => e.toggleOpen(b, !0), ["arrow-right", "native"]))
|
|
997
1039
|
]
|
|
998
1040
|
}, {
|
|
999
|
-
default:
|
|
1000
|
-
|
|
1041
|
+
default: B(() => [
|
|
1042
|
+
X(n, {
|
|
1001
1043
|
indeterminate: e.isIndeterminate,
|
|
1002
1044
|
disabled: e.hasAllPropsDisabled,
|
|
1003
1045
|
checked: e.isAllSelected
|
|
1004
1046
|
}, null, 8, ["indeterminate", "disabled", "checked"]),
|
|
1005
|
-
|
|
1006
|
-
|
|
1047
|
+
Y("span", Vl, [
|
|
1048
|
+
X(t, {
|
|
1007
1049
|
id: e.categoryNameId,
|
|
1008
1050
|
el: "span",
|
|
1009
1051
|
class: "b-listbox-multi-select-category__label-text"
|
|
1010
1052
|
}, {
|
|
1011
|
-
default:
|
|
1012
|
-
|
|
1053
|
+
default: B(() => [
|
|
1054
|
+
oe(q(e.category.label), 1)
|
|
1013
1055
|
]),
|
|
1014
1056
|
_: 1
|
|
1015
1057
|
}, 8, ["id"]),
|
|
1016
|
-
|
|
1058
|
+
Y("div", {
|
|
1017
1059
|
"aria-hidden": "true",
|
|
1018
1060
|
class: "b-listbox-multi-select-category__label-chevron",
|
|
1019
1061
|
"data-testid": "toggle-listbox",
|
|
1020
|
-
onClickCapture: a[0] || (a[0] =
|
|
1062
|
+
onClickCapture: a[0] || (a[0] = ge((...b) => e.toggleOpen && e.toggleOpen(...b), ["stop"]))
|
|
1021
1063
|
}, [
|
|
1022
|
-
e.isOpen ? (p(),
|
|
1064
|
+
e.isOpen ? (p(), M(m, {
|
|
1023
1065
|
key: 0,
|
|
1024
1066
|
"svg-title": e.chevronTitle
|
|
1025
|
-
}, null, 8, ["svg-title"])) : (p(),
|
|
1067
|
+
}, null, 8, ["svg-title"])) : (p(), M(d, {
|
|
1026
1068
|
key: 1,
|
|
1027
1069
|
"svg-title": e.chevronTitle
|
|
1028
1070
|
}, null, 8, ["svg-title"]))
|
|
1029
1071
|
], 32)
|
|
1030
|
-
])
|
|
1072
|
+
]),
|
|
1073
|
+
Y("div", Gl, q(e.lazyLoadAnnouncement), 1)
|
|
1031
1074
|
]),
|
|
1032
1075
|
_: 1
|
|
1033
1076
|
}, 8, ["class", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "aria-expanded", "aria-owns", "aria-labelledby", "onClick", "onEnterPressed", "onSpacePressed"])),
|
|
1034
|
-
Le(
|
|
1077
|
+
Le(Y("div", {
|
|
1035
1078
|
id: e.categoryGroupId,
|
|
1036
1079
|
role: "group",
|
|
1037
1080
|
"aria-label": e.category.label
|
|
1038
1081
|
}, [
|
|
1039
|
-
|
|
1040
|
-
e.category.lazyLoad?.hasMoreItems ? (p(),
|
|
1082
|
+
Q(e.$slots, "default", {}, void 0, !0),
|
|
1083
|
+
e.category.lazyLoad?.hasMoreItems ? (p(), M(c, {
|
|
1041
1084
|
key: 0,
|
|
1042
1085
|
ref: "lazyLoadRef",
|
|
1043
1086
|
option: e.category,
|
|
1044
1087
|
index: e.optionIndex
|
|
1045
|
-
}, null, 8, ["option", "index"])) :
|
|
1046
|
-
], 8,
|
|
1047
|
-
[
|
|
1088
|
+
}, null, 8, ["option", "index"])) : j("", !0)
|
|
1089
|
+
], 8, Wl), [
|
|
1090
|
+
[Ke, e.showItemChildren]
|
|
1048
1091
|
])
|
|
1049
1092
|
]);
|
|
1050
1093
|
}
|
|
1051
|
-
const
|
|
1052
|
-
var
|
|
1053
|
-
const
|
|
1094
|
+
const Yl = /* @__PURE__ */ ce(zl, [["render", ql], ["__scopeId", "data-v-0f09e7be"]]);
|
|
1095
|
+
var De = /* @__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))(De || {});
|
|
1096
|
+
const jl = le({
|
|
1054
1097
|
name: "listbox-multi-select-options",
|
|
1055
1098
|
components: {
|
|
1056
|
-
BentoListboxOption:
|
|
1057
|
-
BentoTypography:
|
|
1058
|
-
ListboxMultiSelectCategory:
|
|
1059
|
-
DecorativeCheckbox:
|
|
1099
|
+
BentoListboxOption: st,
|
|
1100
|
+
BentoTypography: Me,
|
|
1101
|
+
ListboxMultiSelectCategory: Yl,
|
|
1102
|
+
DecorativeCheckbox: gt
|
|
1060
1103
|
},
|
|
1061
1104
|
inheritAttrs: !1,
|
|
1062
1105
|
props: {
|
|
@@ -1133,30 +1176,30 @@ const Kl = Q({
|
|
|
1133
1176
|
}
|
|
1134
1177
|
},
|
|
1135
1178
|
emits: [
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1179
|
+
De.TOGGLE_CHECKBOX_SELECTION,
|
|
1180
|
+
De.SELECT_CATEGORY,
|
|
1181
|
+
De.UNSELECT_CATEGORY,
|
|
1182
|
+
De.TOGGLE_CATEGORY_VISIBILITY
|
|
1140
1183
|
],
|
|
1141
1184
|
setup(e, { emit: a }) {
|
|
1142
|
-
const o = (
|
|
1143
|
-
e.isOptionDisabled(
|
|
1144
|
-
}, l = (
|
|
1145
|
-
const
|
|
1146
|
-
return
|
|
1147
|
-
}, s = (
|
|
1148
|
-
const
|
|
1149
|
-
if (
|
|
1150
|
-
const
|
|
1151
|
-
return
|
|
1185
|
+
const o = (d) => {
|
|
1186
|
+
e.isOptionDisabled(d) || a(De.TOGGLE_CHECKBOX_SELECTION, d);
|
|
1187
|
+
}, l = (d) => !!d.items, i = (d) => {
|
|
1188
|
+
const u = e.isMultiLevel && e.searching;
|
|
1189
|
+
return d.description && (!e.isMultiLevel || u);
|
|
1190
|
+
}, s = (d) => {
|
|
1191
|
+
const u = !!e.parentCategory?.lazyLoad && e.selectedItemsList.includes(e.parentCategory.value);
|
|
1192
|
+
if (d.items) {
|
|
1193
|
+
const c = !!d.lazyLoad && e.selectedItemsList.includes(d.value);
|
|
1194
|
+
return u || c || !!d.items.find((b) => e.selectedItemsList.includes(b.value));
|
|
1152
1195
|
}
|
|
1153
|
-
return
|
|
1154
|
-
}, n = (
|
|
1155
|
-
if (l(
|
|
1156
|
-
const
|
|
1157
|
-
a(
|
|
1196
|
+
return u || e.selectedItemsList.includes(d.value);
|
|
1197
|
+
}, n = (d) => {
|
|
1198
|
+
if (l(d)) {
|
|
1199
|
+
const u = s(d) ? De.UNSELECT_CATEGORY : De.SELECT_CATEGORY;
|
|
1200
|
+
a(u, d);
|
|
1158
1201
|
} else
|
|
1159
|
-
o(
|
|
1202
|
+
o(d);
|
|
1160
1203
|
};
|
|
1161
1204
|
return {
|
|
1162
1205
|
// Values
|
|
@@ -1169,76 +1212,76 @@ const Kl = Q({
|
|
|
1169
1212
|
shouldShowDescription: i,
|
|
1170
1213
|
toggleCheckboxSelection: o,
|
|
1171
1214
|
toggleSearchOption: n,
|
|
1172
|
-
computedTabindex: (
|
|
1215
|
+
computedTabindex: (d) => e.itemsIndex[d] === e.focusedIndex ? 0 : -1,
|
|
1173
1216
|
// Enums
|
|
1174
|
-
BentoListboxEvent:
|
|
1175
|
-
ListboxMultiSelectOptionsEvent:
|
|
1217
|
+
BentoListboxEvent: g,
|
|
1218
|
+
ListboxMultiSelectOptionsEvent: De
|
|
1176
1219
|
};
|
|
1177
1220
|
}
|
|
1178
|
-
}),
|
|
1179
|
-
function
|
|
1180
|
-
const n =
|
|
1181
|
-
return p(),
|
|
1182
|
-
(p(!0),
|
|
1183
|
-
key: `selected-${
|
|
1221
|
+
}), Hl = { class: "b-listbox-multi-select__option-text" }, Jl = { class: "b-listbox-multi-select__option-text" };
|
|
1222
|
+
function Xl(e, a, o, l, i, s) {
|
|
1223
|
+
const n = Z("decorative-checkbox"), t = Z("bento-typography"), m = Z("bento-listbox-option"), d = Z("listbox-multi-select-options", !0), u = Z("listbox-multi-select-category");
|
|
1224
|
+
return p(), E("div", null, [
|
|
1225
|
+
(p(!0), E(ye, null, ie(e.items, (c) => (p(), E("div", {
|
|
1226
|
+
key: `selected-${c.value}`
|
|
1184
1227
|
}, [
|
|
1185
|
-
e.searching && e.isMultiLevel ? (p(),
|
|
1228
|
+
e.searching && e.isMultiLevel ? (p(), M(m, {
|
|
1186
1229
|
key: 0,
|
|
1187
|
-
class:
|
|
1188
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
1189
|
-
tabindex: e.computedTabindex(
|
|
1190
|
-
"aria-selected": `${e.isOptionSelected(
|
|
1191
|
-
"aria-checked": `${e.isOptionSelected(
|
|
1192
|
-
"aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(
|
|
1230
|
+
class: _e(["b-listbox-multi-select-options", e.conditionalClasses]),
|
|
1231
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(c) : null,
|
|
1232
|
+
tabindex: e.computedTabindex(c.value),
|
|
1233
|
+
"aria-selected": `${e.isOptionSelected(c)}`,
|
|
1234
|
+
"aria-checked": `${e.isOptionSelected(c)}`,
|
|
1235
|
+
"aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(c) : null,
|
|
1193
1236
|
role: e.$attrs.role || "option",
|
|
1194
|
-
onClick: (b) => e.toggleSearchOption(
|
|
1195
|
-
onEnterPressed: (b) => e.toggleSearchOption(
|
|
1196
|
-
onSpacePressed:
|
|
1237
|
+
onClick: (b) => e.toggleSearchOption(c),
|
|
1238
|
+
onEnterPressed: (b) => e.toggleSearchOption(c),
|
|
1239
|
+
onSpacePressed: ge((b) => e.toggleSearchOption(c), ["prevent"])
|
|
1197
1240
|
}, {
|
|
1198
|
-
default:
|
|
1199
|
-
|
|
1200
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
1201
|
-
checked: e.isOptionSelected(
|
|
1241
|
+
default: B(() => [
|
|
1242
|
+
X(n, {
|
|
1243
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(c) : null,
|
|
1244
|
+
checked: e.isOptionSelected(c)
|
|
1202
1245
|
}, null, 8, ["disabled", "checked"]),
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
default:
|
|
1207
|
-
|
|
1246
|
+
Q(e.$slots, "default", z({ ref_for: !0 }, c), () => [
|
|
1247
|
+
Y("span", Hl, [
|
|
1248
|
+
X(t, { el: "span" }, {
|
|
1249
|
+
default: B(() => [
|
|
1250
|
+
oe(q(c.label), 1)
|
|
1208
1251
|
]),
|
|
1209
1252
|
_: 2
|
|
1210
1253
|
}, 1024),
|
|
1211
|
-
e.shouldShowDescription(
|
|
1254
|
+
e.shouldShowDescription(c) ? (p(), M(t, {
|
|
1212
1255
|
key: 0,
|
|
1213
1256
|
class: "b-listbox-multi-select__option-description",
|
|
1214
1257
|
el: "span"
|
|
1215
1258
|
}, {
|
|
1216
|
-
default:
|
|
1217
|
-
|
|
1259
|
+
default: B(() => [
|
|
1260
|
+
oe(q(c.description), 1)
|
|
1218
1261
|
]),
|
|
1219
1262
|
_: 2
|
|
1220
|
-
}, 1024)) :
|
|
1263
|
+
}, 1024)) : j("", !0)
|
|
1221
1264
|
])
|
|
1222
1265
|
], !0)
|
|
1223
1266
|
]),
|
|
1224
1267
|
_: 2
|
|
1225
|
-
}, 1032, ["class", "disabled", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"])) : (p(),
|
|
1226
|
-
|
|
1268
|
+
}, 1032, ["class", "disabled", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"])) : (p(), E(ye, { key: 1 }, [
|
|
1269
|
+
c.items ? (p(), M(u, {
|
|
1227
1270
|
key: 0,
|
|
1228
|
-
category:
|
|
1271
|
+
category: c,
|
|
1229
1272
|
"static-categories": e.staticCategories,
|
|
1230
1273
|
"is-option-disabled": e.isOptionDisabled,
|
|
1231
1274
|
"selected-items-list": e.selectedItemsList,
|
|
1232
|
-
"option-index": e.itemsIndex[
|
|
1233
|
-
tabindex: e.computedTabindex(
|
|
1234
|
-
onSelectCategory: (b) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY,
|
|
1235
|
-
onUnselectCategory: (b) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY,
|
|
1275
|
+
"option-index": e.itemsIndex[c.value],
|
|
1276
|
+
tabindex: e.computedTabindex(c.value),
|
|
1277
|
+
onSelectCategory: (b) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, c),
|
|
1278
|
+
onUnselectCategory: (b) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, c),
|
|
1236
1279
|
onToggleCategoryVisibility: a[1] || (a[1] = (b) => e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, b))
|
|
1237
1280
|
}, {
|
|
1238
|
-
default:
|
|
1239
|
-
|
|
1281
|
+
default: B(() => [
|
|
1282
|
+
X(d, {
|
|
1240
1283
|
"category-items": "",
|
|
1241
|
-
items:
|
|
1284
|
+
items: c.items,
|
|
1242
1285
|
"is-option-disabled": e.isOptionDisabled,
|
|
1243
1286
|
"items-index": e.itemsIndex,
|
|
1244
1287
|
"focused-index": e.focusedIndex,
|
|
@@ -1246,48 +1289,48 @@ function ql(e, a, o, l, i, s) {
|
|
|
1246
1289
|
"static-categories": e.staticCategories,
|
|
1247
1290
|
"selected-items-list": e.selectedItemsList,
|
|
1248
1291
|
searching: e.searching,
|
|
1249
|
-
"parent-category":
|
|
1292
|
+
"parent-category": c,
|
|
1250
1293
|
role: e.$attrs.role || "option",
|
|
1251
1294
|
onToggleCheckboxSelection: a[0] || (a[0] = (b) => e.toggleCheckboxSelection(b))
|
|
1252
1295
|
}, null, 8, ["items", "is-option-disabled", "items-index", "focused-index", "is-multi-level", "static-categories", "selected-items-list", "searching", "parent-category", "role"])
|
|
1253
1296
|
]),
|
|
1254
1297
|
_: 2
|
|
1255
|
-
}, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "option-index", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (p(),
|
|
1298
|
+
}, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "option-index", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (p(), M(m, {
|
|
1256
1299
|
key: 1,
|
|
1257
|
-
class:
|
|
1258
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
1259
|
-
tabindex: e.computedTabindex(
|
|
1260
|
-
"aria-selected": `${e.isOptionSelected(
|
|
1261
|
-
"aria-checked": `${e.isOptionSelected(
|
|
1262
|
-
"aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(
|
|
1300
|
+
class: _e(["b-listbox-multi-select-options", e.conditionalClasses]),
|
|
1301
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(c) : null,
|
|
1302
|
+
tabindex: e.computedTabindex(c.value),
|
|
1303
|
+
"aria-selected": `${e.isOptionSelected(c)}`,
|
|
1304
|
+
"aria-checked": `${e.isOptionSelected(c)}`,
|
|
1305
|
+
"aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(c) : null,
|
|
1263
1306
|
role: e.$attrs.role || "option",
|
|
1264
|
-
onClick: (b) => e.toggleCheckboxSelection(
|
|
1265
|
-
onEnterPressed: (b) => e.toggleCheckboxSelection(
|
|
1266
|
-
onSpacePressed:
|
|
1307
|
+
onClick: (b) => e.toggleCheckboxSelection(c),
|
|
1308
|
+
onEnterPressed: (b) => e.toggleCheckboxSelection(c),
|
|
1309
|
+
onSpacePressed: ge((b) => e.toggleCheckboxSelection(c), ["prevent"])
|
|
1267
1310
|
}, {
|
|
1268
|
-
default:
|
|
1269
|
-
|
|
1270
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
1271
|
-
checked: e.isOptionSelected(
|
|
1311
|
+
default: B(() => [
|
|
1312
|
+
X(n, {
|
|
1313
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(c) : null,
|
|
1314
|
+
checked: e.isOptionSelected(c)
|
|
1272
1315
|
}, null, 8, ["disabled", "checked"]),
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
default:
|
|
1277
|
-
|
|
1316
|
+
Q(e.$slots, "default", z({ ref_for: !0 }, c), () => [
|
|
1317
|
+
Y("span", Jl, [
|
|
1318
|
+
X(t, { el: "span" }, {
|
|
1319
|
+
default: B(() => [
|
|
1320
|
+
oe(q(c.label), 1)
|
|
1278
1321
|
]),
|
|
1279
1322
|
_: 2
|
|
1280
1323
|
}, 1024),
|
|
1281
|
-
e.shouldShowDescription(
|
|
1324
|
+
e.shouldShowDescription(c) ? (p(), M(t, {
|
|
1282
1325
|
key: 0,
|
|
1283
1326
|
class: "b-listbox-multi-select__option-description",
|
|
1284
1327
|
el: "span"
|
|
1285
1328
|
}, {
|
|
1286
|
-
default:
|
|
1287
|
-
|
|
1329
|
+
default: B(() => [
|
|
1330
|
+
oe(q(c.description), 1)
|
|
1288
1331
|
]),
|
|
1289
1332
|
_: 2
|
|
1290
|
-
}, 1024)) :
|
|
1333
|
+
}, 1024)) : j("", !0)
|
|
1291
1334
|
])
|
|
1292
1335
|
], !0)
|
|
1293
1336
|
]),
|
|
@@ -1297,13 +1340,13 @@ function ql(e, a, o, l, i, s) {
|
|
|
1297
1340
|
]))), 128))
|
|
1298
1341
|
]);
|
|
1299
1342
|
}
|
|
1300
|
-
const
|
|
1343
|
+
const Zl = /* @__PURE__ */ ce(jl, [["render", Xl], ["__scopeId", "data-v-dba55b05"]]), Nt = (e) => {
|
|
1301
1344
|
const a = r(() => !!e.value?.find(({ items: l }) => !!l)), o = r(() => a.value ? e.value?.reduce((l, i) => (i.items ? l.push(...i.items.flat()) : l.push(i), l), []) : e.value);
|
|
1302
1345
|
return {
|
|
1303
1346
|
isMultiLevelSelect: a,
|
|
1304
1347
|
flattenedItemsList: o
|
|
1305
1348
|
};
|
|
1306
|
-
},
|
|
1349
|
+
}, Pt = {
|
|
1307
1350
|
"de-DE": { allSelected: "Alle ausgewählt ({total})", numberOfTotalSelected: "{number} von {total} ausgewählt", numbersSelected: "{number} ausgewählt", selectAll: "Alle auswählen ({total})" },
|
|
1308
1351
|
"en-GB": { allSelected: "All selected ({total})", numberOfTotalSelected: "{number} of {total} selected", numbersSelected: "{number} selected", selectAll: "Select all ({total})" },
|
|
1309
1352
|
"en-US": { allSelected: "All selected ({total})", numberOfTotalSelected: "{number} of {total} selected", numbersSelected: "{number} selected", selectAll: "Select all ({total})" },
|
|
@@ -1315,12 +1358,12 @@ const Yl = /* @__PURE__ */ ue(Kl, [["render", ql], ["__scopeId", "data-v-dba55b0
|
|
|
1315
1358
|
"ja-JP": { allSelected: "すべて選択 ({total})", numberOfTotalSelected: "{total}件中{number}件を選択済み", numbersSelected: "{number}件選択済み", selectAll: "すべて選択 ({total})" },
|
|
1316
1359
|
"pt-BR": { allSelected: "Todos os selecionados ({total})", numberOfTotalSelected: "{number} de {total} selecionados", numbersSelected: "{number} selecionados", selectAll: "Selecionar tudo ({total})" },
|
|
1317
1360
|
"zh-CN": { allSelected: "全部已选 ({total})", numberOfTotalSelected: "已选择 {number} 个,共 {total} 个", numbersSelected: "已选择 {number} 个", selectAll: "选择全部({total})个" }
|
|
1318
|
-
},
|
|
1361
|
+
}, Ql = { key: 0 }, ea = ["role"], ta = {
|
|
1319
1362
|
key: 1,
|
|
1320
1363
|
class: "b-listbox-multi-select__divider",
|
|
1321
1364
|
"aria-hidden": "true"
|
|
1322
|
-
},
|
|
1323
|
-
...
|
|
1365
|
+
}, la = { i18n: { messages: Pt } }, aa = /* @__PURE__ */ le({
|
|
1366
|
+
...la,
|
|
1324
1367
|
__name: "listbox-multi-select",
|
|
1325
1368
|
props: {
|
|
1326
1369
|
hasMoreItems: { type: Boolean, default: !1 },
|
|
@@ -1333,258 +1376,256 @@ const Yl = /* @__PURE__ */ ue(Kl, [["render", ql], ["__scopeId", "data-v-dba55b0
|
|
|
1333
1376
|
},
|
|
1334
1377
|
emits: ["select"],
|
|
1335
1378
|
setup(e, { expose: a, emit: o }) {
|
|
1336
|
-
const l = e, i = o, { t: s, n } =
|
|
1379
|
+
const l = e, i = o, { t: s, n } = Ne({ messages: Pt }), t = Ue(), m = mt(), d = r(
|
|
1337
1380
|
() => ({
|
|
1338
|
-
"aria-label":
|
|
1339
|
-
"aria-busy":
|
|
1340
|
-
"aria-atomic": f["aria-atomic"]?.toString(),
|
|
1341
|
-
"aria-live": f["aria-live"]?.toString(),
|
|
1381
|
+
"aria-label": m["aria-label"]?.toString(),
|
|
1382
|
+
"aria-busy": m["aria-busy"]?.toString(),
|
|
1342
1383
|
"aria-multiselectable": !0
|
|
1343
1384
|
})
|
|
1344
|
-
),
|
|
1345
|
-
const
|
|
1346
|
-
return { isDisabled:
|
|
1347
|
-
},
|
|
1348
|
-
if (l.searching &&
|
|
1385
|
+
), u = A(null), c = A(null), b = A(null), v = A(null), S = r(() => l.selectedValues.map(({ value: h }) => h)), { isMultiLevelSelect: D, flattenedItemsList: G } = Nt(de(l, "items")), x = r(() => l.items.some((h) => h.items && h.lazyLoad)), C = r(() => D.value ? l.items.reduce((h, L) => (L.items ? L.lazyLoad ? h.push(L) : h.push(...L.items) : h.push(L), h), []) : l.items), N = r(() => D.value && !l.staticCategories), $ = r(() => N.value ? "tree" : "listbox"), I = r(() => N.value ? "treeitem" : "option"), k = (h) => {
|
|
1386
|
+
const L = l.isOptionDisabled(h), O = S.value?.includes(h.value) || !1;
|
|
1387
|
+
return { isDisabled: L, isPreSelected: O };
|
|
1388
|
+
}, W = r(() => {
|
|
1389
|
+
if (l.searching && D)
|
|
1349
1390
|
return l.items;
|
|
1350
|
-
const
|
|
1351
|
-
if (
|
|
1391
|
+
const h = C.value.filter((L) => {
|
|
1392
|
+
if (L.lazyLoad)
|
|
1352
1393
|
return !0;
|
|
1353
|
-
const { isDisabled:
|
|
1354
|
-
return
|
|
1394
|
+
const { isDisabled: O, isPreSelected: K } = k(L);
|
|
1395
|
+
return O && K || !O;
|
|
1355
1396
|
});
|
|
1356
|
-
return l.selectedValues.forEach((
|
|
1357
|
-
|
|
1358
|
-
}),
|
|
1359
|
-
}),
|
|
1360
|
-
() =>
|
|
1361
|
-
),
|
|
1362
|
-
const
|
|
1363
|
-
return
|
|
1364
|
-
}),
|
|
1365
|
-
const
|
|
1366
|
-
const { isDisabled:
|
|
1367
|
-
return
|
|
1368
|
-
},
|
|
1369
|
-
i("select", [...l.selectedValues, ...
|
|
1370
|
-
},
|
|
1371
|
-
const
|
|
1372
|
-
const { isDisabled:
|
|
1373
|
-
return !(
|
|
1374
|
-
},
|
|
1375
|
-
i("select",
|
|
1376
|
-
},
|
|
1377
|
-
|
|
1378
|
-
},
|
|
1379
|
-
|
|
1380
|
-
}, { isAllSelected:
|
|
1381
|
-
|
|
1382
|
-
D,
|
|
1397
|
+
return l.selectedValues.forEach((L) => {
|
|
1398
|
+
h.find((O) => O.value === L.value) || h.push(L);
|
|
1399
|
+
}), h;
|
|
1400
|
+
}), P = r(
|
|
1401
|
+
() => W.value?.filter((h) => S.value?.includes(h.value))
|
|
1402
|
+
), H = () => D.value && !l.searching ? G.value.length : l.items.length, re = r(() => {
|
|
1403
|
+
const h = W.value.length, L = H(), O = P.value?.length || 0;
|
|
1404
|
+
return O === 0 ? s("selectAll", { total: n(h) }) : O === L ? s("allSelected", { total: n(L) }) : O <= L ? s("numberOfTotalSelected", { number: n(O), total: n(L) }) : s("numbersSelected", { number: n(O) });
|
|
1405
|
+
}), _ = (h) => {
|
|
1406
|
+
const L = (K) => {
|
|
1407
|
+
const { isDisabled: ee, isPreSelected: ue } = k(K);
|
|
1408
|
+
return ee && ue || !ee;
|
|
1409
|
+
}, O = h.filter(L).filter((K) => !S.value.includes(K.value));
|
|
1410
|
+
i("select", [...l.selectedValues, ...O]);
|
|
1411
|
+
}, J = (h) => {
|
|
1412
|
+
const L = (ee) => {
|
|
1413
|
+
const { isDisabled: ue, isPreSelected: U } = k(ee);
|
|
1414
|
+
return !(ue && U);
|
|
1415
|
+
}, O = h.filter(L).map(({ value: ee }) => ee), K = l.selectedValues.filter((ee) => !O?.includes(ee.value));
|
|
1416
|
+
i("select", K);
|
|
1417
|
+
}, R = () => {
|
|
1418
|
+
_(G.value);
|
|
1419
|
+
}, V = () => {
|
|
1420
|
+
J(G.value);
|
|
1421
|
+
}, { isAllSelected: F, isIndeterminate: Ie, toggleSelectAll: ke } = kt(
|
|
1422
|
+
P,
|
|
1383
1423
|
W,
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1424
|
+
R,
|
|
1425
|
+
V
|
|
1426
|
+
), be = r(() => Ie.value ? "mixed" : `${F.value}`), T = A(F.value), fe = () => {
|
|
1427
|
+
T.value = !T.value, ke(T.value);
|
|
1387
1428
|
};
|
|
1388
|
-
|
|
1389
|
-
|
|
1429
|
+
pe(F, () => {
|
|
1430
|
+
T.value = F.value;
|
|
1390
1431
|
});
|
|
1391
|
-
const
|
|
1392
|
-
if (
|
|
1393
|
-
const
|
|
1394
|
-
i("select", [...
|
|
1432
|
+
const Pe = (h) => {
|
|
1433
|
+
if (h.lazyLoad) {
|
|
1434
|
+
const L = (h.items ?? []).map(({ value: K }) => K), O = l.selectedValues.filter(({ value: K }) => !L.includes(K));
|
|
1435
|
+
i("select", [...O, h]);
|
|
1395
1436
|
} else
|
|
1396
|
-
|
|
1397
|
-
},
|
|
1398
|
-
|
|
1437
|
+
_(h.items);
|
|
1438
|
+
}, Be = (h) => {
|
|
1439
|
+
h.lazyLoad ? i(
|
|
1399
1440
|
"select",
|
|
1400
|
-
l.selectedValues.filter(({ value:
|
|
1401
|
-
) :
|
|
1402
|
-
},
|
|
1403
|
-
let
|
|
1404
|
-
if (
|
|
1405
|
-
i(
|
|
1441
|
+
l.selectedValues.filter(({ value: L }) => L !== h.value)
|
|
1442
|
+
) : J(h.items);
|
|
1443
|
+
}, Ee = (h, L) => {
|
|
1444
|
+
let O = !1, K = l.selectedValues.filter(({ value: ue }) => L.value === ue ? (O = !0, !1) : !0);
|
|
1445
|
+
if (O) {
|
|
1446
|
+
i(h, K);
|
|
1406
1447
|
return;
|
|
1407
1448
|
}
|
|
1408
|
-
const
|
|
1409
|
-
(
|
|
1449
|
+
const ee = l.items.find(
|
|
1450
|
+
(ue) => ue.items?.some((U) => U.value === L.value) && ue.lazyLoad && S.value.includes(ue.value)
|
|
1410
1451
|
);
|
|
1411
|
-
if (
|
|
1412
|
-
|
|
1413
|
-
const
|
|
1414
|
-
(
|
|
1452
|
+
if (ee) {
|
|
1453
|
+
K = K.filter(({ value: U }) => U !== ee.value);
|
|
1454
|
+
const ue = ee.items.filter(
|
|
1455
|
+
(U) => U.value !== L.value
|
|
1415
1456
|
);
|
|
1416
|
-
|
|
1457
|
+
K.push(...ue);
|
|
1417
1458
|
} else
|
|
1418
|
-
|
|
1419
|
-
i(
|
|
1420
|
-
},
|
|
1421
|
-
if (!
|
|
1459
|
+
K.push(L);
|
|
1460
|
+
i(h, K);
|
|
1461
|
+
}, Fe = r(() => {
|
|
1462
|
+
if (!D.value)
|
|
1422
1463
|
return l.selectedValues;
|
|
1423
|
-
const
|
|
1424
|
-
(
|
|
1425
|
-
),
|
|
1426
|
-
|
|
1427
|
-
|
|
1464
|
+
const h = (U) => S.value.includes(U.value), L = (U) => U.lazyLoad && h(U) ? !0 : !l.staticCategories && U.items.length > 0 && U.items.every((Je) => h(Je)), O = l.items.flatMap(
|
|
1465
|
+
(U) => U.items && !L(U) ? U.items : U
|
|
1466
|
+
), K = O.filter((U) => U.items ? !0 : h(U)), ee = /* @__PURE__ */ new Set();
|
|
1467
|
+
O.forEach((U) => {
|
|
1468
|
+
ee.add(U.value), U.items?.forEach((Je) => ee.add(Je.value));
|
|
1428
1469
|
});
|
|
1429
|
-
const
|
|
1430
|
-
return [...
|
|
1431
|
-
}),
|
|
1432
|
-
if (!
|
|
1470
|
+
const ue = l.selectedValues.filter((U) => !ee.has(U.value));
|
|
1471
|
+
return [...K, ...ue];
|
|
1472
|
+
}), We = r(() => {
|
|
1473
|
+
if (!Fe.value?.length)
|
|
1433
1474
|
return !1;
|
|
1434
|
-
const
|
|
1435
|
-
return
|
|
1436
|
-
}),
|
|
1437
|
-
|
|
1475
|
+
const h = ["automatic", "button"].includes(l.lazyLoadType), L = l.selectedValues?.length > 0 && P.value?.length !== W.value?.length;
|
|
1476
|
+
return h && l.hasMoreItems ? !!l.selectedValues?.length : L;
|
|
1477
|
+
}), Ge = r(() => x.value ? !1 : ["automatic", "button"].includes(l.lazyLoadType) ? !l.hasMoreItems : !0), w = A([]), { visibleDomOptions: se, updateVisibleDomOptions: $e } = yt(
|
|
1478
|
+
u,
|
|
1438
1479
|
de(l, "items"),
|
|
1439
|
-
|
|
1440
|
-
),
|
|
1441
|
-
|
|
1442
|
-
|
|
1480
|
+
I
|
|
1481
|
+
), Qe = (h) => {
|
|
1482
|
+
w.value.includes(h) ? w.value = w.value.filter((L) => L !== h) : w.value.push(h), ne(() => {
|
|
1483
|
+
$e();
|
|
1443
1484
|
});
|
|
1444
|
-
},
|
|
1445
|
-
|
|
1485
|
+
}, qe = (h) => {
|
|
1486
|
+
se.value[h]?.focus();
|
|
1446
1487
|
}, {
|
|
1447
1488
|
moveToNextElement: nt,
|
|
1448
1489
|
moveToPreviousElement: it,
|
|
1449
1490
|
moveToFirstElement: rt,
|
|
1450
|
-
moveToLastElement:
|
|
1451
|
-
preventDefault:
|
|
1452
|
-
focusedIndex:
|
|
1453
|
-
setListboxFocusedIndex:
|
|
1454
|
-
} =
|
|
1491
|
+
moveToLastElement: dt,
|
|
1492
|
+
preventDefault: Ye,
|
|
1493
|
+
focusedIndex: et,
|
|
1494
|
+
setListboxFocusedIndex: tt
|
|
1495
|
+
} = $t(
|
|
1455
1496
|
{
|
|
1456
|
-
items:
|
|
1497
|
+
items: se
|
|
1457
1498
|
},
|
|
1458
|
-
|
|
1459
|
-
),
|
|
1460
|
-
[
|
|
1461
|
-
[
|
|
1462
|
-
[
|
|
1463
|
-
[
|
|
1499
|
+
qe
|
|
1500
|
+
), ct = {
|
|
1501
|
+
[ae.ARROW_UP]: (h) => it(h),
|
|
1502
|
+
[ae.ARROW_DOWN]: (h) => nt(h),
|
|
1503
|
+
[ae.HOME]: rt,
|
|
1504
|
+
[ae.END]: dt
|
|
1464
1505
|
};
|
|
1465
1506
|
a({
|
|
1466
1507
|
/**
|
|
1467
1508
|
* Method to set the index of the item to be focused on
|
|
1468
1509
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
1469
1510
|
*/
|
|
1470
|
-
setListboxFocusedIndex:
|
|
1511
|
+
setListboxFocusedIndex: tt
|
|
1471
1512
|
});
|
|
1472
|
-
const
|
|
1473
|
-
[
|
|
1474
|
-
[
|
|
1475
|
-
},
|
|
1476
|
-
let
|
|
1477
|
-
const
|
|
1478
|
-
return l.items.forEach((
|
|
1479
|
-
let
|
|
1480
|
-
|
|
1481
|
-
}),
|
|
1513
|
+
const je = {
|
|
1514
|
+
[ae.ARROW_UP]: Ye,
|
|
1515
|
+
[ae.ARROW_DOWN]: Ye
|
|
1516
|
+
}, He = r(() => {
|
|
1517
|
+
let h = Ge.value ? 1 : 0;
|
|
1518
|
+
const L = {};
|
|
1519
|
+
return l.items.forEach((O) => {
|
|
1520
|
+
let K = w.value.includes(O.value);
|
|
1521
|
+
O.items ? (l.staticCategories ? K = !0 : L[O.value] = h++, K && O.items.forEach((ee) => L[ee.value] = h++)) : L[O.value] = h++;
|
|
1522
|
+
}), L;
|
|
1482
1523
|
});
|
|
1483
|
-
return (
|
|
1524
|
+
return (h, L) => (p(), E("div", {
|
|
1484
1525
|
ref_key: "listboxRef",
|
|
1485
|
-
ref:
|
|
1526
|
+
ref: u,
|
|
1486
1527
|
class: "b-listbox-multi-select"
|
|
1487
1528
|
}, [
|
|
1488
|
-
|
|
1489
|
-
Le((p(),
|
|
1490
|
-
(p(!0),
|
|
1491
|
-
key:
|
|
1529
|
+
We.value ? (p(), E("div", Ql, [
|
|
1530
|
+
Le((p(), E("ul", z({ class: "b-listbox-multi-select__chips" }, ve(je, !0)), [
|
|
1531
|
+
(p(!0), E(ye, null, ie(Fe.value, (O) => (p(), E("li", {
|
|
1532
|
+
key: O.value
|
|
1492
1533
|
}, [
|
|
1493
|
-
|
|
1534
|
+
X(f(el), {
|
|
1494
1535
|
ref_for: !0,
|
|
1495
1536
|
ref_key: "selectedListboxItemsRef",
|
|
1496
1537
|
ref: b,
|
|
1497
|
-
disabled:
|
|
1498
|
-
label:
|
|
1538
|
+
disabled: h.isOptionDisabled(O),
|
|
1539
|
+
label: O.label,
|
|
1499
1540
|
condensed: "",
|
|
1500
|
-
onClick: (
|
|
1541
|
+
onClick: (K) => O.items ? Be(O) : Ee("select", O)
|
|
1501
1542
|
}, null, 8, ["disabled", "label", "onClick"])
|
|
1502
1543
|
]))), 128))
|
|
1503
1544
|
], 16)), [
|
|
1504
|
-
[
|
|
1545
|
+
[f(Xe)]
|
|
1505
1546
|
]),
|
|
1506
|
-
|
|
1547
|
+
L[4] || (L[4] = Y("hr", {
|
|
1507
1548
|
class: "b-listbox-multi-select__divider",
|
|
1508
1549
|
"aria-hidden": "true"
|
|
1509
1550
|
}, null, -1))
|
|
1510
|
-
])) :
|
|
1511
|
-
Le((p(),
|
|
1512
|
-
|
|
1551
|
+
])) : j("", !0),
|
|
1552
|
+
Le((p(), E("div", z(d.value, { role: $.value }, ve(ct, !0)), [
|
|
1553
|
+
Ge.value ? (p(), M(f(st), {
|
|
1513
1554
|
key: 0,
|
|
1514
1555
|
ref_key: "selectAllListboxItemsRef",
|
|
1515
|
-
ref:
|
|
1556
|
+
ref: c,
|
|
1516
1557
|
class: "b-listbox-multi-select__option",
|
|
1517
|
-
tabindex:
|
|
1518
|
-
"aria-selected":
|
|
1519
|
-
"aria-checked":
|
|
1520
|
-
role:
|
|
1521
|
-
onClick:
|
|
1522
|
-
onEnterPressed:
|
|
1523
|
-
onSpacePressed:
|
|
1558
|
+
tabindex: f(et) === 0 ? 0 : -1,
|
|
1559
|
+
"aria-selected": be.value !== "false",
|
|
1560
|
+
"aria-checked": be.value,
|
|
1561
|
+
role: I.value,
|
|
1562
|
+
onClick: fe,
|
|
1563
|
+
onEnterPressed: fe,
|
|
1564
|
+
onSpacePressed: ge(fe, ["prevent"])
|
|
1524
1565
|
}, {
|
|
1525
|
-
default:
|
|
1526
|
-
|
|
1527
|
-
checked:
|
|
1528
|
-
indeterminate:
|
|
1566
|
+
default: B(() => [
|
|
1567
|
+
X(f(gt), {
|
|
1568
|
+
checked: f(F),
|
|
1569
|
+
indeterminate: f(Ie)
|
|
1529
1570
|
}, null, 8, ["checked", "indeterminate"]),
|
|
1530
|
-
|
|
1531
|
-
default:
|
|
1532
|
-
|
|
1571
|
+
X(f(Me), { el: "span" }, {
|
|
1572
|
+
default: B(() => [
|
|
1573
|
+
oe(q(re.value), 1)
|
|
1533
1574
|
]),
|
|
1534
1575
|
_: 1
|
|
1535
1576
|
})
|
|
1536
1577
|
]),
|
|
1537
1578
|
_: 1
|
|
1538
|
-
}, 8, ["tabindex", "aria-selected", "aria-checked", "role"])) :
|
|
1539
|
-
|
|
1540
|
-
|
|
1579
|
+
}, 8, ["tabindex", "aria-selected", "aria-checked", "role"])) : j("", !0),
|
|
1580
|
+
Ge.value ? (p(), E("hr", ta)) : j("", !0),
|
|
1581
|
+
X(f(Zl), {
|
|
1541
1582
|
ref_key: "listboxItemsRef",
|
|
1542
|
-
ref:
|
|
1543
|
-
items:
|
|
1544
|
-
"is-option-disabled":
|
|
1545
|
-
"is-multi-level":
|
|
1546
|
-
"static-categories":
|
|
1547
|
-
searching:
|
|
1548
|
-
"selected-items-list":
|
|
1549
|
-
"focused-index":
|
|
1550
|
-
"items-index":
|
|
1551
|
-
role:
|
|
1552
|
-
onToggleCheckboxSelection:
|
|
1553
|
-
onSelectCategory:
|
|
1554
|
-
onUnselectCategory:
|
|
1555
|
-
onToggleCategoryVisibility:
|
|
1556
|
-
onSpacePressed:
|
|
1557
|
-
onTabPressed:
|
|
1558
|
-
onEnterPressed:
|
|
1559
|
-
},
|
|
1560
|
-
|
|
1561
|
-
name:
|
|
1562
|
-
fn:
|
|
1563
|
-
|
|
1583
|
+
ref: v,
|
|
1584
|
+
items: h.items,
|
|
1585
|
+
"is-option-disabled": h.isOptionDisabled,
|
|
1586
|
+
"is-multi-level": f(D),
|
|
1587
|
+
"static-categories": h.staticCategories,
|
|
1588
|
+
searching: h.searching,
|
|
1589
|
+
"selected-items-list": S.value,
|
|
1590
|
+
"focused-index": f(et),
|
|
1591
|
+
"items-index": He.value,
|
|
1592
|
+
role: I.value,
|
|
1593
|
+
onToggleCheckboxSelection: L[0] || (L[0] = (O) => Ee("select", O)),
|
|
1594
|
+
onSelectCategory: Pe,
|
|
1595
|
+
onUnselectCategory: Be,
|
|
1596
|
+
onToggleCategoryVisibility: Qe,
|
|
1597
|
+
onSpacePressed: L[1] || (L[1] = (O) => Ee(f(g).SPACE, O)),
|
|
1598
|
+
onTabPressed: L[2] || (L[2] = (O) => Ee(f(g).TAB, O)),
|
|
1599
|
+
onEnterPressed: L[3] || (L[3] = (O) => Ee(f(g).ENTER, O))
|
|
1600
|
+
}, Te({ _: 2 }, [
|
|
1601
|
+
ie(f(t), (O, K) => ({
|
|
1602
|
+
name: K,
|
|
1603
|
+
fn: B((ee) => [
|
|
1604
|
+
Q(h.$slots, K, me(we(ee)), void 0, !0)
|
|
1564
1605
|
])
|
|
1565
1606
|
}))
|
|
1566
1607
|
]), 1032, ["items", "is-option-disabled", "is-multi-level", "static-categories", "searching", "selected-items-list", "focused-index", "items-index", "role"])
|
|
1567
|
-
], 16,
|
|
1568
|
-
[
|
|
1608
|
+
], 16, ea)), [
|
|
1609
|
+
[f(Xe)]
|
|
1569
1610
|
])
|
|
1570
1611
|
], 512));
|
|
1571
1612
|
}
|
|
1572
|
-
}),
|
|
1613
|
+
}), Lt = /* @__PURE__ */ ce(aa, [["__scopeId", "data-v-a70d33ef"]]), Ft = (e, a = 300) => {
|
|
1573
1614
|
let o;
|
|
1574
1615
|
return (...i) => {
|
|
1575
1616
|
o && clearTimeout(o), o = setTimeout(() => e(...i), a);
|
|
1576
1617
|
};
|
|
1577
|
-
},
|
|
1618
|
+
}, oa = 36, sa = le({
|
|
1578
1619
|
name: "bento-listbox",
|
|
1579
1620
|
components: {
|
|
1580
|
-
BentoEmptyState:
|
|
1581
|
-
BentoListboxSingleSelect:
|
|
1582
|
-
BentoListboxMultiSelect:
|
|
1583
|
-
BentoTypography:
|
|
1584
|
-
BentoLoadingIndicator:
|
|
1585
|
-
BentoListboxLazyLoad:
|
|
1621
|
+
BentoEmptyState: At,
|
|
1622
|
+
BentoListboxSingleSelect: Ol,
|
|
1623
|
+
BentoListboxMultiSelect: Lt,
|
|
1624
|
+
BentoTypography: Me,
|
|
1625
|
+
BentoLoadingIndicator: Tt,
|
|
1626
|
+
BentoListboxLazyLoad: Rt
|
|
1586
1627
|
},
|
|
1587
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
1628
|
+
directives: { BentoKeyboardNavigationDirective: Xe },
|
|
1588
1629
|
props: {
|
|
1589
1630
|
/**
|
|
1590
1631
|
* Defines a string value that labels an interactive element.
|
|
@@ -1644,8 +1685,8 @@ const Yl = /* @__PURE__ */ ue(Kl, [["render", ql], ["__scopeId", "data-v-dba55b0
|
|
|
1644
1685
|
*/
|
|
1645
1686
|
lazyLoadType: {
|
|
1646
1687
|
type: String,
|
|
1647
|
-
default:
|
|
1648
|
-
validator: (e) => Object.values(
|
|
1688
|
+
default: Ae.NONE,
|
|
1689
|
+
validator: (e) => Object.values(Ae).includes(e)
|
|
1649
1690
|
},
|
|
1650
1691
|
/**
|
|
1651
1692
|
* Indicates the listbox is loading filtered items.
|
|
@@ -1669,7 +1710,7 @@ const Yl = /* @__PURE__ */ ue(Kl, [["render", ql], ["__scopeId", "data-v-dba55b0
|
|
|
1669
1710
|
*
|
|
1670
1711
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1671
1712
|
*/
|
|
1672
|
-
searching:
|
|
1713
|
+
searching: Lt.props.searching,
|
|
1673
1714
|
/**
|
|
1674
1715
|
* The `input` value.
|
|
1675
1716
|
* Providing an empty string or empty array will select no options.
|
|
@@ -1689,109 +1730,103 @@ const Yl = /* @__PURE__ */ ue(Kl, [["render", ql], ["__scopeId", "data-v-dba55b0
|
|
|
1689
1730
|
}
|
|
1690
1731
|
},
|
|
1691
1732
|
emits: [
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1733
|
+
g.SELECT,
|
|
1734
|
+
g.SPACE,
|
|
1735
|
+
g.SHOW_MORE,
|
|
1736
|
+
g.ENTER,
|
|
1737
|
+
g.ESCAPE,
|
|
1738
|
+
g.TAB
|
|
1698
1739
|
],
|
|
1699
1740
|
setup(e, { emit: a, slots: o, expose: l }) {
|
|
1700
|
-
const i = A([]), s = de(e, "items"), n = r(() => e.lazyLoadType !==
|
|
1701
|
-
containerRef:
|
|
1702
|
-
containerProps:
|
|
1741
|
+
const i = A([]), s = de(e, "items"), n = r(() => e.lazyLoadType !== Ae.AUTOMATIC), t = r(() => e.lazyLoadType === Ae.AUTOMATIC), m = () => typeof e?.virtualScroll == "object" && e?.virtualScroll?.itemHeight ? e.virtualScroll.itemHeight : oa, d = !e?.multiple && e?.virtualScroll !== !1 && e?.lazyLoadType === "none", {
|
|
1742
|
+
containerRef: u,
|
|
1743
|
+
containerProps: c,
|
|
1703
1744
|
onScroll: b,
|
|
1704
|
-
list:
|
|
1705
|
-
wrapperProps:
|
|
1706
|
-
scrollToIndex:
|
|
1707
|
-
startIndex:
|
|
1708
|
-
} =
|
|
1709
|
-
itemHeight:
|
|
1745
|
+
list: v,
|
|
1746
|
+
wrapperProps: S,
|
|
1747
|
+
scrollToIndex: D,
|
|
1748
|
+
startIndex: G
|
|
1749
|
+
} = dl(s, {
|
|
1750
|
+
itemHeight: m(),
|
|
1710
1751
|
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1711
|
-
disabled: !
|
|
1712
|
-
}),
|
|
1713
|
-
() => e.componentLoading !== void 0 || n.value ? "true" : void 0
|
|
1714
|
-
), M = r(
|
|
1752
|
+
disabled: !d
|
|
1753
|
+
}), x = r(() => d ? s.value.length : 0), C = r(
|
|
1715
1754
|
() => n.value && e.loading || e.componentLoading ? "true" : "false"
|
|
1716
|
-
),
|
|
1717
|
-
() => n.value || e.componentLoading !== void 0 ? "polite" : void 0
|
|
1718
|
-
), L = r(
|
|
1755
|
+
), N = r(
|
|
1719
1756
|
() => ({
|
|
1720
1757
|
"aria-label": e.ariaLabel,
|
|
1721
|
-
"aria-busy":
|
|
1722
|
-
"aria-atomic": T.value,
|
|
1723
|
-
"aria-live": _.value
|
|
1758
|
+
"aria-busy": C.value
|
|
1724
1759
|
})
|
|
1725
|
-
),
|
|
1760
|
+
), $ = r(
|
|
1726
1761
|
() => e.componentLoading ? {
|
|
1727
|
-
...
|
|
1762
|
+
...N.value,
|
|
1728
1763
|
role: "alert"
|
|
1729
1764
|
} : {}
|
|
1730
|
-
),
|
|
1731
|
-
a(
|
|
1732
|
-
},
|
|
1733
|
-
a(
|
|
1734
|
-
},
|
|
1735
|
-
const
|
|
1736
|
-
if (!
|
|
1765
|
+
), I = (V) => (F) => {
|
|
1766
|
+
a(V, F);
|
|
1767
|
+
}, k = () => {
|
|
1768
|
+
a(g.SHOW_MORE);
|
|
1769
|
+
}, W = Ft(() => {
|
|
1770
|
+
const V = u.value;
|
|
1771
|
+
if (!V)
|
|
1737
1772
|
return;
|
|
1738
|
-
const
|
|
1739
|
-
e.hasMoreItems &&
|
|
1740
|
-
}),
|
|
1741
|
-
t.value ?
|
|
1742
|
-
},
|
|
1743
|
-
() => e.lazyLoadType ===
|
|
1744
|
-
),
|
|
1745
|
-
() => e.loading ?
|
|
1746
|
-
),
|
|
1773
|
+
const F = Math.round(V.scrollTop) + V.clientHeight >= V.scrollHeight;
|
|
1774
|
+
e.hasMoreItems && F && !e.loading && k();
|
|
1775
|
+
}), P = () => {
|
|
1776
|
+
t.value ? W() : b();
|
|
1777
|
+
}, H = r(() => e.items?.length === 0), re = r(
|
|
1778
|
+
() => e.lazyLoadType === Ae.BUTTON && e.hasMoreItems
|
|
1779
|
+
), _ = r(
|
|
1780
|
+
() => e.loading ? at.LOADING : at.START
|
|
1781
|
+
), J = r(() => ({
|
|
1747
1782
|
...e.emptyState,
|
|
1748
1783
|
variant: "condensed"
|
|
1749
|
-
})),
|
|
1750
|
-
[
|
|
1751
|
-
[
|
|
1752
|
-
[
|
|
1753
|
-
[
|
|
1784
|
+
})), R = {
|
|
1785
|
+
[g.SELECT]: I(g.SELECT),
|
|
1786
|
+
[g.SPACE]: I(g.SPACE),
|
|
1787
|
+
[g.TAB]: I(g.TAB),
|
|
1788
|
+
[g.ENTER]: I(g.ENTER)
|
|
1754
1789
|
};
|
|
1755
|
-
return l({ listboxRef:
|
|
1790
|
+
return l({ listboxRef: u, listboxItemRef: i }), {
|
|
1756
1791
|
// Refs
|
|
1757
|
-
listboxRef:
|
|
1792
|
+
listboxRef: u,
|
|
1758
1793
|
listboxItemRef: i,
|
|
1759
1794
|
// a11y
|
|
1760
|
-
ariaAttributes:
|
|
1761
|
-
listboxContainerAttributes:
|
|
1795
|
+
ariaAttributes: N,
|
|
1796
|
+
listboxContainerAttributes: $,
|
|
1762
1797
|
// Values
|
|
1763
|
-
containerProps:
|
|
1764
|
-
isSearchResultEmpty:
|
|
1765
|
-
limitedEmptyStateProps:
|
|
1766
|
-
loadingButtonState:
|
|
1798
|
+
containerProps: c,
|
|
1799
|
+
isSearchResultEmpty: H,
|
|
1800
|
+
limitedEmptyStateProps: J,
|
|
1801
|
+
loadingButtonState: _,
|
|
1767
1802
|
slots: o,
|
|
1768
|
-
shouldDisplayShowMoreButton:
|
|
1769
|
-
virtualisedItems:
|
|
1770
|
-
wrapperProps:
|
|
1803
|
+
shouldDisplayShowMoreButton: re,
|
|
1804
|
+
virtualisedItems: v,
|
|
1805
|
+
wrapperProps: S,
|
|
1771
1806
|
// Virtual scroll
|
|
1772
|
-
totalItemCount:
|
|
1773
|
-
scrollToIndex:
|
|
1774
|
-
virtualScrollStartIndex:
|
|
1807
|
+
totalItemCount: x,
|
|
1808
|
+
scrollToIndex: D,
|
|
1809
|
+
virtualScrollStartIndex: G,
|
|
1775
1810
|
// Enums
|
|
1776
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
1777
|
-
BentoListboxEvent:
|
|
1811
|
+
BentoKeyboardNavigationKeyDownEvent: ae,
|
|
1812
|
+
BentoListboxEvent: g,
|
|
1778
1813
|
// Methods
|
|
1779
|
-
onListboxContainerScroll:
|
|
1780
|
-
onOptionSelected:
|
|
1781
|
-
emitShowMore:
|
|
1782
|
-
listboxListeners:
|
|
1814
|
+
onListboxContainerScroll: P,
|
|
1815
|
+
onOptionSelected: I,
|
|
1816
|
+
emitShowMore: k,
|
|
1817
|
+
listboxListeners: R
|
|
1783
1818
|
};
|
|
1784
1819
|
}
|
|
1785
|
-
}),
|
|
1820
|
+
}), na = ["id"], ia = {
|
|
1786
1821
|
key: 0,
|
|
1787
1822
|
class: "b-listbox__loading-filtered-items"
|
|
1788
|
-
},
|
|
1823
|
+
}, ra = {
|
|
1789
1824
|
key: 1,
|
|
1790
1825
|
class: "b-listbox__empty-search-message"
|
|
1791
1826
|
};
|
|
1792
|
-
function
|
|
1793
|
-
const n =
|
|
1794
|
-
return Le((p(),
|
|
1827
|
+
function da(e, a, o, l, i, s) {
|
|
1828
|
+
const n = Z("bento-loading-indicator"), t = Z("bento-empty-state"), m = Z("bento-typography"), d = Z("bento-listbox-multi-select"), u = Z("bento-listbox-single-select"), c = Z("bento-listbox-lazy-load"), b = It("bento-keyboard-navigation-directive");
|
|
1829
|
+
return Le((p(), E("div", z({
|
|
1795
1830
|
id: e.id,
|
|
1796
1831
|
ref: "listboxRef",
|
|
1797
1832
|
class: "b-listbox",
|
|
@@ -1799,23 +1834,23 @@ function oa(e, a, o, l, i, s) {
|
|
|
1799
1834
|
}, e.listboxContainerAttributes, {
|
|
1800
1835
|
style: e.containerProps?.style,
|
|
1801
1836
|
"data-testid": "listbox-container",
|
|
1802
|
-
onScroll: a[0] || (a[0] = (...
|
|
1837
|
+
onScroll: a[0] || (a[0] = (...v) => e.onListboxContainerScroll && e.onListboxContainerScroll(...v))
|
|
1803
1838
|
}), [
|
|
1804
|
-
|
|
1805
|
-
e.componentLoading ? (p(),
|
|
1806
|
-
|
|
1807
|
-
])) : e.isSearchResultEmpty ? (p(),
|
|
1808
|
-
e.emptyState ? (p(),
|
|
1839
|
+
Y("div", me(we(e.wrapperProps)), [
|
|
1840
|
+
e.componentLoading ? (p(), E("div", ia, [
|
|
1841
|
+
X(n)
|
|
1842
|
+
])) : e.isSearchResultEmpty ? (p(), E("div", ra, [
|
|
1843
|
+
e.emptyState ? (p(), M(t, me(z({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (p(), M(m, {
|
|
1809
1844
|
key: 1,
|
|
1810
1845
|
el: "span"
|
|
1811
1846
|
}, {
|
|
1812
|
-
default:
|
|
1813
|
-
|
|
1847
|
+
default: B(() => [
|
|
1848
|
+
oe(q(e.noResultsMessage), 1)
|
|
1814
1849
|
]),
|
|
1815
1850
|
_: 1
|
|
1816
1851
|
}))
|
|
1817
|
-
])) : (p(),
|
|
1818
|
-
e.multiple ? (p(),
|
|
1852
|
+
])) : (p(), E(ye, { key: 2 }, [
|
|
1853
|
+
e.multiple ? (p(), M(d, z({
|
|
1819
1854
|
key: 0,
|
|
1820
1855
|
ref: "listboxItemRef",
|
|
1821
1856
|
"has-more-items": e.hasMoreItems
|
|
@@ -1826,14 +1861,14 @@ function oa(e, a, o, l, i, s) {
|
|
|
1826
1861
|
"selected-values": e.selectedValue,
|
|
1827
1862
|
searching: e.searching,
|
|
1828
1863
|
"is-option-disabled": e.isOptionDisabled
|
|
1829
|
-
},
|
|
1830
|
-
|
|
1831
|
-
name:
|
|
1832
|
-
fn:
|
|
1833
|
-
|
|
1864
|
+
}, ve(e.listboxListeners)), Te({ _: 2 }, [
|
|
1865
|
+
ie(e.slots, (v, S) => ({
|
|
1866
|
+
name: S,
|
|
1867
|
+
fn: B((D) => [
|
|
1868
|
+
Q(e.$slots, S, me(we(D)), void 0, !0)
|
|
1834
1869
|
])
|
|
1835
1870
|
}))
|
|
1836
|
-
]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (p(),
|
|
1871
|
+
]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (p(), M(u, z({
|
|
1837
1872
|
key: 1,
|
|
1838
1873
|
ref: "listboxItemRef",
|
|
1839
1874
|
"active-descendant-id": e.activeDescendantId,
|
|
@@ -1846,68 +1881,68 @@ function oa(e, a, o, l, i, s) {
|
|
|
1846
1881
|
"selected-value": e.selectedValue,
|
|
1847
1882
|
"static-categories": e.staticCategories,
|
|
1848
1883
|
"is-option-disabled": e.isOptionDisabled
|
|
1849
|
-
},
|
|
1850
|
-
|
|
1851
|
-
name:
|
|
1852
|
-
fn:
|
|
1853
|
-
|
|
1884
|
+
}, ve(e.listboxListeners)), Te({ _: 2 }, [
|
|
1885
|
+
ie(e.slots, (v, S) => ({
|
|
1886
|
+
name: S,
|
|
1887
|
+
fn: B((D) => [
|
|
1888
|
+
Q(e.$slots, S, me(we(D)), void 0, !0)
|
|
1854
1889
|
])
|
|
1855
1890
|
}))
|
|
1856
1891
|
]), 1040, ["active-descendant-id", "items", "option-id-base", "total-item-count", "scroll-to-index", "virtual-scroll-start-index", "selected-value", "static-categories", "is-option-disabled"])),
|
|
1857
|
-
e.lazyLoadType !== "none" ? (p(),
|
|
1892
|
+
e.lazyLoadType !== "none" ? (p(), M(c, {
|
|
1858
1893
|
key: 2,
|
|
1859
1894
|
"has-more-items": e.hasMoreItems,
|
|
1860
1895
|
loading: e.loading,
|
|
1861
1896
|
type: e.lazyLoadType,
|
|
1862
1897
|
onShowMore: e.emitShowMore
|
|
1863
|
-
}, null, 8, ["has-more-items", "loading", "type", "onShowMore"])) :
|
|
1898
|
+
}, null, 8, ["has-more-items", "loading", "type", "onShowMore"])) : j("", !0)
|
|
1864
1899
|
], 64))
|
|
1865
1900
|
], 16)
|
|
1866
|
-
], 16,
|
|
1901
|
+
], 16, na)), [
|
|
1867
1902
|
[b]
|
|
1868
1903
|
]);
|
|
1869
1904
|
}
|
|
1870
|
-
const
|
|
1905
|
+
const bt = /* @__PURE__ */ ce(sa, [["render", da], ["__scopeId", "data-v-b7f464da"]]), ft = (e, a) => {
|
|
1871
1906
|
for (const o of e) {
|
|
1872
1907
|
if (o.value === a)
|
|
1873
1908
|
return o;
|
|
1874
1909
|
if (o.items) {
|
|
1875
|
-
const l =
|
|
1910
|
+
const l = ft(o.items, a);
|
|
1876
1911
|
if (l)
|
|
1877
1912
|
return l;
|
|
1878
1913
|
}
|
|
1879
1914
|
}
|
|
1880
1915
|
return null;
|
|
1881
|
-
},
|
|
1882
|
-
const i = A([]), s = A(), n = (
|
|
1883
|
-
o.value ? s.value =
|
|
1884
|
-
}, t = (
|
|
1885
|
-
o.value ? s.value =
|
|
1886
|
-
},
|
|
1887
|
-
i.value =
|
|
1888
|
-
},
|
|
1916
|
+
}, ca = (e) => typeof e == "object" && e !== null && "value" in e && "label" in e, ua = (e, a, o, l) => {
|
|
1917
|
+
const i = A([]), s = A(), n = (u) => {
|
|
1918
|
+
o.value ? s.value = u.map(({ value: c }) => c) : s.value = u.length > 0 ? u[0].value : null;
|
|
1919
|
+
}, t = (u) => {
|
|
1920
|
+
o.value ? s.value = u.map(({ value: c, label: b }) => ({ value: c, label: b })) : s.value = u.length > 0 ? { value: u[0].value, label: u[0].label } : null;
|
|
1921
|
+
}, m = (u) => {
|
|
1922
|
+
i.value = u, l?.value ? t(u) : n(u);
|
|
1923
|
+
}, d = () => {
|
|
1889
1924
|
i.value = [], s.value = null;
|
|
1890
1925
|
};
|
|
1891
|
-
return
|
|
1926
|
+
return pe(
|
|
1892
1927
|
() => a.value,
|
|
1893
1928
|
() => {
|
|
1894
1929
|
if (!a.value && a.value !== 0) {
|
|
1895
|
-
|
|
1930
|
+
d();
|
|
1896
1931
|
return;
|
|
1897
1932
|
}
|
|
1898
|
-
const
|
|
1899
|
-
|
|
1900
|
-
const b = (
|
|
1901
|
-
if (
|
|
1902
|
-
i.value.push(
|
|
1933
|
+
const u = !Array.isArray(a.value), c = [...i.value];
|
|
1934
|
+
d();
|
|
1935
|
+
const b = (v) => {
|
|
1936
|
+
if (ca(v))
|
|
1937
|
+
i.value.push(v);
|
|
1903
1938
|
else {
|
|
1904
|
-
let
|
|
1905
|
-
|
|
1939
|
+
let S = ft(e.value, v);
|
|
1940
|
+
S || (S = ft(c, v)), S || (S = { value: v, label: v.toString() }), i.value.push(S);
|
|
1906
1941
|
}
|
|
1907
1942
|
};
|
|
1908
|
-
if (
|
|
1909
|
-
const
|
|
1910
|
-
b(
|
|
1943
|
+
if (u) {
|
|
1944
|
+
const v = a.value;
|
|
1945
|
+
b(v), l?.value ? t(i.value) : n(i.value);
|
|
1911
1946
|
return;
|
|
1912
1947
|
}
|
|
1913
1948
|
a.value.forEach(b), l?.value ? t(i.value) : n(i.value);
|
|
@@ -1918,12 +1953,12 @@ const pt = /* @__PURE__ */ ue(ea, [["render", oa], ["__scopeId", "data-v-ccece96
|
|
|
1918
1953
|
cachedSelectedListboxOptions: i,
|
|
1919
1954
|
cachedListboxSelectedValues: s,
|
|
1920
1955
|
// Methods
|
|
1921
|
-
resetCache:
|
|
1922
|
-
setCachedValues:
|
|
1956
|
+
resetCache: d,
|
|
1957
|
+
setCachedValues: m
|
|
1923
1958
|
};
|
|
1924
1959
|
};
|
|
1925
|
-
var
|
|
1926
|
-
const
|
|
1960
|
+
var Ze = /* @__PURE__ */ ((e) => (e.DEFAULT = "DropdownInputDefault", e.SMALL = "DropdownInputSmall", e))(Ze || {});
|
|
1961
|
+
const ht = {
|
|
1927
1962
|
"de-DE": { apply: "Anwenden", cancel: "Abbrechen", noOptionsMatchThisSearch: "Für diese Suche wurden keine Ergebnisse gefunden." },
|
|
1928
1963
|
"en-GB": { apply: "Apply", cancel: "Cancel", noOptionsMatchThisSearch: "No options match this search" },
|
|
1929
1964
|
"en-US": { apply: "Apply", cancel: "Cancel", noOptionsMatchThisSearch: "No options match this search" },
|
|
@@ -1935,20 +1970,20 @@ const gt = {
|
|
|
1935
1970
|
"ja-JP": { apply: "適用", cancel: "キャンセル", noOptionsMatchThisSearch: "この検索に一致するオプションはありません" },
|
|
1936
1971
|
"pt-BR": { apply: "Aplicar", cancel: "Cancelar", noOptionsMatchThisSearch: "Nenhuma opção corresponde a esta busca" },
|
|
1937
1972
|
"zh-CN": { apply: "应用", cancel: "取消", noOptionsMatchThisSearch: "没有符合此搜索条件的选项" }
|
|
1938
|
-
},
|
|
1939
|
-
const i = A(e.value), { t: s } =
|
|
1940
|
-
|
|
1973
|
+
}, pa = (e, a, o, l) => {
|
|
1974
|
+
const i = A(e.value), { t: s } = Ne({ messages: ht });
|
|
1975
|
+
pe(e, () => {
|
|
1941
1976
|
i.value = e.value;
|
|
1942
1977
|
});
|
|
1943
1978
|
const n = r(
|
|
1944
1979
|
() => JSON.stringify(i.value) === JSON.stringify(e.value)
|
|
1945
1980
|
), t = () => {
|
|
1946
|
-
l(
|
|
1947
|
-
},
|
|
1948
|
-
i.value = e.value, l(
|
|
1949
|
-
},
|
|
1981
|
+
l(g.SELECT, i.value), l(g.CLOSE_DROPDOWN);
|
|
1982
|
+
}, m = () => {
|
|
1983
|
+
i.value = e.value, l(g.CLOSE_DROPDOWN);
|
|
1984
|
+
}, d = () => {
|
|
1950
1985
|
o.value && a.value && (i.value = e.value);
|
|
1951
|
-
},
|
|
1986
|
+
}, u = r(() => [
|
|
1952
1987
|
{
|
|
1953
1988
|
title: s("apply"),
|
|
1954
1989
|
event: t,
|
|
@@ -1956,41 +1991,41 @@ const gt = {
|
|
|
1956
1991
|
},
|
|
1957
1992
|
{
|
|
1958
1993
|
title: s("cancel"),
|
|
1959
|
-
event:
|
|
1994
|
+
event: m
|
|
1960
1995
|
}
|
|
1961
|
-
]),
|
|
1962
|
-
i.value =
|
|
1963
|
-
}, b = (
|
|
1964
|
-
|
|
1965
|
-
},
|
|
1966
|
-
|
|
1967
|
-
},
|
|
1968
|
-
|
|
1969
|
-
},
|
|
1970
|
-
|
|
1971
|
-
},
|
|
1972
|
-
l(
|
|
1973
|
-
},
|
|
1974
|
-
[
|
|
1975
|
-
[
|
|
1976
|
-
[
|
|
1977
|
-
[
|
|
1978
|
-
[
|
|
1996
|
+
]), c = (C) => {
|
|
1997
|
+
i.value = C, a.value || l(g.SELECT, C);
|
|
1998
|
+
}, b = (C) => {
|
|
1999
|
+
c(C), l(g.TAB);
|
|
2000
|
+
}, v = (C) => {
|
|
2001
|
+
c(C), l(g.ENTER);
|
|
2002
|
+
}, S = (C) => {
|
|
2003
|
+
c(C), l(g.SPACE);
|
|
2004
|
+
}, D = () => {
|
|
2005
|
+
m(), l(g.ESCAPE);
|
|
2006
|
+
}, G = () => {
|
|
2007
|
+
l(g.SHOW_MORE);
|
|
2008
|
+
}, x = {
|
|
2009
|
+
[g.SELECT]: c,
|
|
2010
|
+
[g.SHOW_MORE]: G,
|
|
2011
|
+
[g.TAB]: b,
|
|
2012
|
+
[g.SPACE]: S,
|
|
2013
|
+
[g.ENTER]: v
|
|
1979
2014
|
};
|
|
1980
2015
|
return {
|
|
1981
2016
|
// Values
|
|
1982
|
-
actions:
|
|
2017
|
+
actions: u,
|
|
1983
2018
|
internalSelectedValue: i,
|
|
1984
2019
|
// Methods
|
|
1985
|
-
listeners:
|
|
1986
|
-
onEscapeKey:
|
|
1987
|
-
onOutsideDropdownClick:
|
|
2020
|
+
listeners: x,
|
|
2021
|
+
onEscapeKey: D,
|
|
2022
|
+
onOutsideDropdownClick: d
|
|
1988
2023
|
};
|
|
1989
|
-
},
|
|
1990
|
-
i18n: { messages:
|
|
2024
|
+
}, ba = le({
|
|
2025
|
+
i18n: { messages: ht },
|
|
1991
2026
|
name: "bento-dropdown-options-container"
|
|
1992
|
-
}),
|
|
1993
|
-
...
|
|
2027
|
+
}), fa = /* @__PURE__ */ le({
|
|
2028
|
+
...ba,
|
|
1994
2029
|
props: {
|
|
1995
2030
|
/**
|
|
1996
2031
|
* Defines a string value that labels an interactive element.
|
|
@@ -2053,8 +2088,8 @@ const gt = {
|
|
|
2053
2088
|
*/
|
|
2054
2089
|
lazyLoadType: {
|
|
2055
2090
|
type: String,
|
|
2056
|
-
default:
|
|
2057
|
-
validator: (e) => Object.values(
|
|
2091
|
+
default: Ae.AUTOMATIC,
|
|
2092
|
+
validator: (e) => Object.values(Ae).includes(e)
|
|
2058
2093
|
},
|
|
2059
2094
|
/**
|
|
2060
2095
|
* Indicates if new options are lazy loading.
|
|
@@ -2084,7 +2119,7 @@ const gt = {
|
|
|
2084
2119
|
*
|
|
2085
2120
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
2086
2121
|
*/
|
|
2087
|
-
searching:
|
|
2122
|
+
searching: bt.props.searching,
|
|
2088
2123
|
/**
|
|
2089
2124
|
* If enabled, dropdown will display non-selectable, static categories
|
|
2090
2125
|
*/
|
|
@@ -2093,7 +2128,7 @@ const gt = {
|
|
|
2093
2128
|
* Reference to the DOM element or Vue component for positioning
|
|
2094
2129
|
* the Dropdown container.
|
|
2095
2130
|
*/
|
|
2096
|
-
targetElement: { type:
|
|
2131
|
+
targetElement: { type: St.props.targetElement.type, required: !0 },
|
|
2097
2132
|
/**
|
|
2098
2133
|
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
2099
2134
|
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
@@ -2104,27 +2139,27 @@ const gt = {
|
|
|
2104
2139
|
}
|
|
2105
2140
|
},
|
|
2106
2141
|
setup(e, { expose: a, emit: o }) {
|
|
2107
|
-
const l =
|
|
2142
|
+
const l = Ue(), i = o, s = e, { selectedValue: n, multiple: t } = jt(s), m = A(null), { t: d } = Ne({ messages: ht }), u = r(() => s.open && !s.disabled), c = r(() => d("noOptionsMatchThisSearch")), b = r(() => ({
|
|
2108
2143
|
"b-dropdown-options-container--single": !s?.multiple
|
|
2109
|
-
})),
|
|
2144
|
+
})), v = r(() => ({
|
|
2110
2145
|
"b-dropdown-options-container__listbox--single": !s?.multiple
|
|
2111
|
-
})), { actions:
|
|
2112
|
-
const
|
|
2146
|
+
})), { actions: S, internalSelectedValue: D, listeners: G, onEscapeKey: x, onOutsideDropdownClick: C } = pa(n, t, u, i), N = r(() => s?.multiple ? ll : St), $ = r(() => {
|
|
2147
|
+
const I = {
|
|
2113
2148
|
"min-width": `${s?.targetElement?.clientWidth}px`,
|
|
2114
2149
|
"max-width": "min(500px, 95%)"
|
|
2115
2150
|
};
|
|
2116
2151
|
return s?.multiple ? {
|
|
2117
2152
|
actionsLayout: "space-between",
|
|
2118
2153
|
ariaLabel: s.ariaLabel,
|
|
2119
|
-
actions:
|
|
2154
|
+
actions: S.value,
|
|
2120
2155
|
divider: !0,
|
|
2121
2156
|
fallbackPosition: ["top-start"],
|
|
2122
|
-
id:
|
|
2157
|
+
id: xe(`dropdown-options-${s.id}`),
|
|
2123
2158
|
open: s.open,
|
|
2124
2159
|
position: "bottom-start",
|
|
2125
2160
|
style: {
|
|
2126
2161
|
width: "auto",
|
|
2127
|
-
...
|
|
2162
|
+
...I
|
|
2128
2163
|
},
|
|
2129
2164
|
targetElement: s.targetElement
|
|
2130
2165
|
} : {
|
|
@@ -2132,70 +2167,70 @@ const gt = {
|
|
|
2132
2167
|
offset: [0, 8],
|
|
2133
2168
|
position: "bottom-start",
|
|
2134
2169
|
style: {
|
|
2135
|
-
display:
|
|
2136
|
-
...
|
|
2170
|
+
display: u.value ? "block" : "none",
|
|
2171
|
+
...I
|
|
2137
2172
|
},
|
|
2138
2173
|
targetElement: s.targetElement
|
|
2139
2174
|
};
|
|
2140
2175
|
});
|
|
2141
2176
|
return a({
|
|
2142
|
-
onOutsideDropdownClick:
|
|
2143
|
-
dropdownOptionsListboxRef:
|
|
2144
|
-
}), (
|
|
2177
|
+
onOutsideDropdownClick: C,
|
|
2178
|
+
dropdownOptionsListboxRef: m
|
|
2179
|
+
}), (I, k) => u.value ? (p(), M(Et(N.value), z({
|
|
2145
2180
|
key: 0,
|
|
2146
2181
|
class: ["b-dropdown-options-container", b.value]
|
|
2147
|
-
},
|
|
2148
|
-
default:
|
|
2149
|
-
|
|
2182
|
+
}, $.value), {
|
|
2183
|
+
default: B(() => [
|
|
2184
|
+
Y("div", {
|
|
2150
2185
|
onKeydown: [
|
|
2151
|
-
|
|
2186
|
+
k[0] || (k[0] = ge(() => {
|
|
2152
2187
|
}, ["stop"])),
|
|
2153
|
-
|
|
2188
|
+
k[1] || (k[1] = Ce(
|
|
2154
2189
|
//@ts-ignore
|
|
2155
|
-
(...
|
|
2190
|
+
(...W) => f(x) && f(x)(...W),
|
|
2156
2191
|
["esc"]
|
|
2157
2192
|
))
|
|
2158
2193
|
]
|
|
2159
2194
|
}, [
|
|
2160
|
-
|
|
2195
|
+
X(f(bt), z({
|
|
2161
2196
|
id: e.id,
|
|
2162
2197
|
ref_key: "dropdownOptionsListboxRef",
|
|
2163
|
-
ref:
|
|
2198
|
+
ref: m,
|
|
2164
2199
|
"active-descendant-id": e.activeDescendantId,
|
|
2165
2200
|
"aria-label": e.ariaLabel,
|
|
2166
|
-
class: ["b-dropdown-options-container__listbox",
|
|
2201
|
+
class: ["b-dropdown-options-container__listbox", v.value],
|
|
2167
2202
|
"component-loading": e.componentLoading,
|
|
2168
2203
|
"empty-state": e.emptyState,
|
|
2169
2204
|
"is-option-disabled": e.isOptionDisabled,
|
|
2170
2205
|
items: e.items,
|
|
2171
|
-
"selected-value":
|
|
2172
|
-
multiple:
|
|
2206
|
+
"selected-value": f(D),
|
|
2207
|
+
multiple: f(t),
|
|
2173
2208
|
"static-categories": e.staticCategories,
|
|
2174
|
-
"no-results-message":
|
|
2209
|
+
"no-results-message": c.value,
|
|
2175
2210
|
searching: e.searching,
|
|
2176
2211
|
loading: e.loading,
|
|
2177
2212
|
"lazy-load-type": e.lazyLoadType,
|
|
2178
2213
|
"has-more-items": e.hasMoreItems,
|
|
2179
2214
|
"virtual-scroll": e.virtualScroll
|
|
2180
|
-
},
|
|
2181
|
-
|
|
2182
|
-
name:
|
|
2183
|
-
fn:
|
|
2184
|
-
|
|
2215
|
+
}, ve(f(G))), Te({ _: 2 }, [
|
|
2216
|
+
ie(f(l), (W, P) => ({
|
|
2217
|
+
name: P,
|
|
2218
|
+
fn: B((H) => [
|
|
2219
|
+
Q(I.$slots, P, me(we(H)), void 0, !0)
|
|
2185
2220
|
])
|
|
2186
2221
|
}))
|
|
2187
2222
|
]), 1040, ["id", "active-descendant-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"])
|
|
2188
2223
|
], 32)
|
|
2189
2224
|
]),
|
|
2190
2225
|
_: 3
|
|
2191
|
-
}, 16, ["class"])) :
|
|
2226
|
+
}, 16, ["class"])) : j("", !0);
|
|
2192
2227
|
}
|
|
2193
|
-
}),
|
|
2194
|
-
var
|
|
2195
|
-
const
|
|
2228
|
+
}), ma = /* @__PURE__ */ ce(fa, [["__scopeId", "data-v-d4561ea6"]]);
|
|
2229
|
+
var 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.CLEAR_SELECTION = "dropdown-base-clear-selection", e))(te || {}), Oe = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.READONLY = "readonly", e.HAS_ITEMS = "has-items", e.OPENED = "opened", e.ERROR = "error", e))(Oe || {});
|
|
2230
|
+
const va = /* @__PURE__ */ Symbol("dropdown small size injection key"), zt = /* @__PURE__ */ Symbol("dropdown underline style injection key"), Vt = {
|
|
2196
2231
|
"de-DE": { clearSearch: "Suche löschen" },
|
|
2197
2232
|
"en-GB": { clearSearch: "Clear search" },
|
|
2198
|
-
"en-US": { clearSearch: "Clear search" },
|
|
2233
|
+
"en-US": { clearSearch: "Clear search", clearSelection: "Clear selection" },
|
|
2199
2234
|
"es-419": { clearSearch: "Borrar búsqueda" },
|
|
2200
2235
|
"es-ES": { clearSearch: "Borrar búsqueda" },
|
|
2201
2236
|
"es-MX": { clearSearch: "Borrar búsqueda" },
|
|
@@ -2204,32 +2239,36 @@ const ca = /* @__PURE__ */ Symbol("dropdown small size injection key"), Ft = /*
|
|
|
2204
2239
|
"ja-JP": { clearSearch: "検索をクリア" },
|
|
2205
2240
|
"pt-BR": { clearSearch: "Limpar busca" },
|
|
2206
2241
|
"zh-CN": { clearSearch: "清除搜索" }
|
|
2207
|
-
},
|
|
2242
|
+
}, ya = {
|
|
2208
2243
|
key: 0,
|
|
2209
2244
|
class: "b-dropdown-base-textbox__autocomplete-suggestion",
|
|
2210
2245
|
"aria-hidden": "true",
|
|
2211
2246
|
"data-testid": "autocomplete-suggestion"
|
|
2212
|
-
},
|
|
2247
|
+
}, ga = ["id", "aria-autocomplete", "value", "disabled", "readonly", "required"], ha = ["id", "aria-readonly", "tabindex"], Sa = {
|
|
2213
2248
|
key: 1,
|
|
2214
2249
|
class: "b-dropdown-base-textbox__input-multiple-selected"
|
|
2215
|
-
},
|
|
2250
|
+
}, Ca = { class: "b-dropdown-base-textbox__input-selected-element" }, La = {
|
|
2216
2251
|
key: 3,
|
|
2217
2252
|
class: "b-dropdown-base-textbox__additional-items"
|
|
2218
|
-
},
|
|
2253
|
+
}, Ia = {
|
|
2219
2254
|
key: 4,
|
|
2220
2255
|
class: "b-dropdown-base-textbox__icon",
|
|
2221
2256
|
"aria-hidden": "true"
|
|
2222
|
-
},
|
|
2257
|
+
}, Ea = ["tabindex", "aria-label", "title", "data-testid", "onKeydown"], Oa = le({
|
|
2223
2258
|
i18n: { messages: Vt },
|
|
2224
2259
|
name: "dropdown-base-textbox",
|
|
2225
2260
|
inheritAttrs: !1
|
|
2226
|
-
}),
|
|
2227
|
-
...
|
|
2261
|
+
}), Ta = /* @__PURE__ */ le({
|
|
2262
|
+
...Oa,
|
|
2228
2263
|
props: {
|
|
2229
2264
|
/**
|
|
2230
2265
|
* The number of additional items that have been selected in the dropdown.
|
|
2231
2266
|
*/
|
|
2232
2267
|
additionalItemsSelected: { type: [Number, String], default: 0 },
|
|
2268
|
+
/**
|
|
2269
|
+
* Allows the selected value to be cleared in a single-select dropdown.
|
|
2270
|
+
*/
|
|
2271
|
+
clearable: { type: Boolean, default: !1 },
|
|
2233
2272
|
/**
|
|
2234
2273
|
* If the combobox DOM element should be an `input` element.
|
|
2235
2274
|
*/
|
|
@@ -2317,16 +2356,20 @@ const ca = /* @__PURE__ */ Symbol("dropdown small size injection key"), Ft = /*
|
|
|
2317
2356
|
}
|
|
2318
2357
|
},
|
|
2319
2358
|
setup(e, { expose: a, emit: o }) {
|
|
2320
|
-
const { t: l } =
|
|
2321
|
-
[`b-dropdown-base-textbox--${
|
|
2322
|
-
[`b-dropdown-base-textbox--${
|
|
2323
|
-
[`b-dropdown-base-textbox--${
|
|
2359
|
+
const { t: l } = Ne({ messages: Vt }), i = mt(), s = Ue(), n = Ot(s), t = e, m = o, d = A(null), u = A(null), c = xe("textbox"), b = A(!1), v = A(t.value), S = vt(zt, !1), D = r(() => ({
|
|
2360
|
+
[`b-dropdown-base-textbox--${Oe.DISABLED}`]: t.disabled,
|
|
2361
|
+
[`b-dropdown-base-textbox--${Oe.READONLY}`]: t.readonly,
|
|
2362
|
+
[`b-dropdown-base-textbox--${Oe.HAS_ITEMS}`]: !!t.additionalItemsSelected,
|
|
2324
2363
|
"b-dropdown-base-textbox--underline": S
|
|
2325
|
-
})),
|
|
2326
|
-
() =>
|
|
2327
|
-
),
|
|
2364
|
+
})), G = r(
|
|
2365
|
+
() => _.value && i["aria-required"] ? "true" : null
|
|
2366
|
+
), x = r(() => ({
|
|
2328
2367
|
"b-dropdown-base-textbox__input--dynamic-filtering": t.dynamicFiltering
|
|
2329
|
-
})),
|
|
2368
|
+
})), C = r(() => t.dynamicFiltering && !!t.value && t.open), N = r(
|
|
2369
|
+
() => t.clearable && t.open && !t.multiple && t.hasSelectedValue
|
|
2370
|
+
), $ = r(
|
|
2371
|
+
() => !t.disabled && !t.readonly && (C.value || N.value)
|
|
2372
|
+
), I = r(() => C.value ? l("clearSearch") : l("clearSelection")), k = (w) => _.value && !t.multiple && !!t.value && w, W = r(
|
|
2330
2373
|
() => ({
|
|
2331
2374
|
"aria-haspopup": "listbox",
|
|
2332
2375
|
"aria-controls": t.ariaControls,
|
|
@@ -2339,157 +2382,176 @@ const ca = /* @__PURE__ */ Symbol("dropdown small size injection key"), Ft = /*
|
|
|
2339
2382
|
"aria-disabled": t.disabled ? !0 : null,
|
|
2340
2383
|
"aria-required": i["aria-required"]
|
|
2341
2384
|
})
|
|
2342
|
-
),
|
|
2385
|
+
), P = r(
|
|
2343
2386
|
() => t.multiple ? t.selectedValueItem : []
|
|
2344
|
-
),
|
|
2387
|
+
), H = r(
|
|
2345
2388
|
() => t.dynamicFiltering && !t.multiple && !t.alwaysComboboxIsInput
|
|
2346
|
-
),
|
|
2347
|
-
() => t.open || t.alwaysComboboxIsInput ||
|
|
2348
|
-
),
|
|
2349
|
-
() => t.multiple && t.selectedValueItem &&
|
|
2389
|
+
), re = r(
|
|
2390
|
+
() => t.open || t.alwaysComboboxIsInput || H.value && b.value
|
|
2391
|
+
), _ = r(() => t.dynamicFiltering && re.value), J = () => !t.value && t.hasSelectedValue && H.value ? t.displayValue ?? "" : t.value, R = r(() => !re.value || t.alwaysComboboxIsInput && !t.open ? t.displayValue : H.value ? v.value : t.value), V = r(() => t.selectedValueItem && !t.multiple), F = r(
|
|
2392
|
+
() => t.multiple && t.selectedValueItem && P.value.length > 0 && t.showSlotContentInMultiple
|
|
2350
2393
|
);
|
|
2351
|
-
|
|
2352
|
-
() =>
|
|
2353
|
-
(
|
|
2354
|
-
|
|
2355
|
-
|
|
2394
|
+
pe(
|
|
2395
|
+
() => _.value,
|
|
2396
|
+
(w, se) => {
|
|
2397
|
+
w ? !se && H.value && (v.value = J()) : v.value = t.value, w && !t.alwaysComboboxIsInput && ne(() => {
|
|
2398
|
+
d.value?.focus(), d.value?.select();
|
|
2356
2399
|
});
|
|
2357
2400
|
}
|
|
2358
|
-
),
|
|
2401
|
+
), pe(
|
|
2359
2402
|
() => t.value,
|
|
2360
|
-
(
|
|
2361
|
-
(!
|
|
2403
|
+
(w) => {
|
|
2404
|
+
(!H.value || w !== v.value) && (v.value = w);
|
|
2362
2405
|
}
|
|
2363
|
-
),
|
|
2406
|
+
), pe(
|
|
2364
2407
|
() => t.displayValue,
|
|
2365
2408
|
() => {
|
|
2366
|
-
|
|
2409
|
+
H.value && t.hasSelectedValue && (v.value = J());
|
|
2410
|
+
}
|
|
2411
|
+
), pe(
|
|
2412
|
+
() => t.hasSelectedValue,
|
|
2413
|
+
(w) => {
|
|
2414
|
+
H.value && !w && (v.value = t.value);
|
|
2367
2415
|
}
|
|
2368
|
-
),
|
|
2416
|
+
), pe(
|
|
2369
2417
|
() => t.open,
|
|
2370
|
-
(
|
|
2371
|
-
|
|
2418
|
+
(w) => {
|
|
2419
|
+
w || (b.value = !1);
|
|
2372
2420
|
}
|
|
2373
2421
|
);
|
|
2374
|
-
const
|
|
2375
|
-
!t.disabled && !t.readonly && (
|
|
2376
|
-
},
|
|
2377
|
-
t.open && (
|
|
2378
|
-
},
|
|
2379
|
-
|
|
2380
|
-
},
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
},
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2422
|
+
const Ie = async () => {
|
|
2423
|
+
!t.disabled && !t.readonly && (m(te.OPEN), await ne(), d.value.focus());
|
|
2424
|
+
}, ke = (w) => {
|
|
2425
|
+
t.open && (w && Ve(w), d.value.focus(), m(te.CLOSE));
|
|
2426
|
+
}, be = (w) => t.open && w.target.tagName === "INPUT" ? null : t.open ? ke() : Ie(), T = (w) => t.dynamicFiltering ? null : be(w), fe = () => {
|
|
2427
|
+
m(te.CLEAR), m(te.INPUT, ""), d.value.focus();
|
|
2428
|
+
}, Pe = () => {
|
|
2429
|
+
if (C.value) {
|
|
2430
|
+
fe();
|
|
2431
|
+
return;
|
|
2432
|
+
}
|
|
2433
|
+
m(te.CLEAR_SELECTION);
|
|
2434
|
+
}, Be = () => {
|
|
2435
|
+
b.value = !0;
|
|
2436
|
+
}, Ee = () => {
|
|
2437
|
+
b.value = !1;
|
|
2438
|
+
}, Fe = (w) => {
|
|
2439
|
+
!H.value || t.open || t.readonly || t.disabled || (w.preventDefault(), w.stopPropagation());
|
|
2440
|
+
}, We = (w) => {
|
|
2441
|
+
!t.readonly && !t.disabled ? (H.value && (v.value = w.target.value), t.dynamicFiltering && !t.open && m(te.OPEN), m(te.INPUT, w.target.value), ne(() => {
|
|
2442
|
+
_.value && d.value?.focus();
|
|
2443
|
+
})) : (w.preventDefault(), w.stopPropagation());
|
|
2390
2444
|
};
|
|
2391
2445
|
return a({
|
|
2392
|
-
focus: () => {
|
|
2393
|
-
u.value.
|
|
2446
|
+
focus: (w = "textbox") => {
|
|
2447
|
+
const se = w === "clear-action" ? u.value : d.value;
|
|
2448
|
+
return se?.focus(), !!se;
|
|
2394
2449
|
}
|
|
2395
|
-
}), (
|
|
2396
|
-
class:
|
|
2450
|
+
}), (w, se) => (p(), E("div", {
|
|
2451
|
+
class: _e(w.$attrs.class),
|
|
2397
2452
|
"data-testid": "textbox-wrapper",
|
|
2398
|
-
onClick:
|
|
2399
|
-
onKeydown:
|
|
2453
|
+
onClick: be,
|
|
2454
|
+
onKeydown: Ce(ke, ["escape"])
|
|
2400
2455
|
}, [
|
|
2401
|
-
|
|
2402
|
-
class:
|
|
2403
|
-
variant:
|
|
2456
|
+
X(f(Me), {
|
|
2457
|
+
class: _e(["b-dropdown-base-textbox", D.value]),
|
|
2458
|
+
variant: f(S) ? "title" : "body",
|
|
2404
2459
|
el: "div",
|
|
2405
2460
|
"data-testid": "base-textbox"
|
|
2406
2461
|
}, {
|
|
2407
|
-
default:
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
])) :
|
|
2411
|
-
|
|
2412
|
-
id:
|
|
2462
|
+
default: B(() => [
|
|
2463
|
+
k(f(n)("autocomplete-suggestion")) ? (p(), E("span", ya, [
|
|
2464
|
+
Q(w.$slots, "autocomplete-suggestion", {}, void 0, !0)
|
|
2465
|
+
])) : j("", !0),
|
|
2466
|
+
_.value ? (p(), E("input", z({ key: 1 }, W.value, {
|
|
2467
|
+
id: f(c),
|
|
2413
2468
|
ref_key: "textbox",
|
|
2414
|
-
ref:
|
|
2469
|
+
ref: d,
|
|
2415
2470
|
class: "b-dropdown-base-textbox__input",
|
|
2416
2471
|
role: "combobox",
|
|
2417
2472
|
type: "text",
|
|
2418
|
-
"aria-autocomplete":
|
|
2473
|
+
"aria-autocomplete": k(f(n)("autocomplete-suggestion")) ? "both" : "list",
|
|
2419
2474
|
size: "1",
|
|
2420
|
-
value:
|
|
2475
|
+
value: R.value,
|
|
2421
2476
|
disabled: e.disabled ? !0 : null,
|
|
2422
2477
|
readonly: e.readonly,
|
|
2423
|
-
required:
|
|
2478
|
+
required: G.value,
|
|
2424
2479
|
onKeydown: [
|
|
2425
|
-
|
|
2426
|
-
|
|
2480
|
+
se[0] || (se[0] = ($e) => w.$emit(f(te).KEYDOWN, $e)),
|
|
2481
|
+
Ce(T, ["enter"])
|
|
2427
2482
|
],
|
|
2428
|
-
onFocus:
|
|
2429
|
-
onBlur:
|
|
2430
|
-
onInput:
|
|
2431
|
-
}), null, 16,
|
|
2483
|
+
onFocus: Be,
|
|
2484
|
+
onBlur: Ee,
|
|
2485
|
+
onInput: We
|
|
2486
|
+
}), null, 16, ga)) : (p(), E("div", z({
|
|
2432
2487
|
key: 2,
|
|
2433
|
-
id:
|
|
2434
|
-
},
|
|
2488
|
+
id: f(c)
|
|
2489
|
+
}, W.value, {
|
|
2435
2490
|
ref_key: "textbox",
|
|
2436
|
-
ref:
|
|
2437
|
-
class: ["b-dropdown-base-textbox__input",
|
|
2491
|
+
ref: d,
|
|
2492
|
+
class: ["b-dropdown-base-textbox__input", x.value],
|
|
2438
2493
|
"aria-readonly": e.readonly ? "true" : null,
|
|
2439
2494
|
role: "combobox",
|
|
2440
2495
|
tabindex: e.disabled ? -1 : 0,
|
|
2441
|
-
onFocus:
|
|
2442
|
-
onMousedown:
|
|
2496
|
+
onFocus: Be,
|
|
2497
|
+
onMousedown: Fe
|
|
2443
2498
|
}), [
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2499
|
+
V.value ? (p(), E(ye, { key: 0 }, [
|
|
2500
|
+
f(n)("display-value") ? Q(w.$slots, "display-value", me(z({ key: 0 }, e.selectedValueItem)), void 0, !0) : Q(w.$slots, "default", me(z({ key: 1 }, e.selectedValueItem)), () => [
|
|
2501
|
+
oe(q(e.displayValue), 1)
|
|
2447
2502
|
], !0)
|
|
2448
|
-
], 64)) :
|
|
2449
|
-
(p(!0),
|
|
2450
|
-
key:
|
|
2503
|
+
], 64)) : F.value ? (p(), E("div", Sa, [
|
|
2504
|
+
(p(!0), E(ye, null, ie(P.value, ($e) => (p(), E("div", {
|
|
2505
|
+
key: $e.value
|
|
2451
2506
|
}, [
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2507
|
+
Y("div", Ca, [
|
|
2508
|
+
Q(w.$slots, "default", z({ ref_for: !0 }, $e), () => [
|
|
2509
|
+
oe(q(e.displayValue), 1)
|
|
2455
2510
|
], !0)
|
|
2456
2511
|
])
|
|
2457
2512
|
]))), 128))
|
|
2458
|
-
])) : (p(),
|
|
2459
|
-
|
|
2513
|
+
])) : (p(), E(ye, { key: 2 }, [
|
|
2514
|
+
oe(q(e.displayValue), 1)
|
|
2460
2515
|
], 64))
|
|
2461
|
-
], 16,
|
|
2462
|
-
e.additionalItemsSelected ? (p(),
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
])) :
|
|
2466
|
-
$.value ? (p(),
|
|
2516
|
+
], 16, ha)),
|
|
2517
|
+
e.additionalItemsSelected ? (p(), E("span", La, q(e.additionalItemsSelected), 1)) : j("", !0),
|
|
2518
|
+
f(n)("icon") && !$.value ? (p(), E("span", Ia, [
|
|
2519
|
+
Q(w.$slots, "icon", {}, void 0, !0)
|
|
2520
|
+
])) : j("", !0),
|
|
2521
|
+
$.value ? (p(), E("span", {
|
|
2467
2522
|
key: 5,
|
|
2468
|
-
|
|
2523
|
+
ref_key: "clearAction",
|
|
2524
|
+
ref: u,
|
|
2525
|
+
class: "b-dropdown-base-textbox__clear-action",
|
|
2469
2526
|
tabindex: e.disabled ? -1 : 0,
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2527
|
+
role: "button",
|
|
2528
|
+
"aria-label": I.value,
|
|
2529
|
+
title: I.value,
|
|
2530
|
+
"data-testid": C.value ? "clear-search-button" : "clear-selection-button",
|
|
2531
|
+
onClick: ge(Pe, ["stop"]),
|
|
2532
|
+
onKeydown: [
|
|
2533
|
+
Ce(ge(Pe, ["stop"]), ["enter"]),
|
|
2534
|
+
Ce(ge(Pe, ["prevent", "stop"]), ["space"])
|
|
2535
|
+
]
|
|
2474
2536
|
}, [
|
|
2475
|
-
e.size ===
|
|
2537
|
+
e.size === f(Ze).SMALL ? (p(), M(f(rl), {
|
|
2476
2538
|
key: 0,
|
|
2477
|
-
"
|
|
2478
|
-
}
|
|
2539
|
+
"aria-hidden": "true"
|
|
2540
|
+
})) : (p(), M(f(il), {
|
|
2479
2541
|
key: 1,
|
|
2480
|
-
"
|
|
2481
|
-
}
|
|
2482
|
-
], 40,
|
|
2542
|
+
"aria-hidden": "true"
|
|
2543
|
+
}))
|
|
2544
|
+
], 40, Ea)) : j("", !0)
|
|
2483
2545
|
]),
|
|
2484
2546
|
_: 3
|
|
2485
2547
|
}, 8, ["class", "variant"])
|
|
2486
2548
|
], 34));
|
|
2487
2549
|
}
|
|
2488
|
-
}),
|
|
2550
|
+
}), Gt = /* @__PURE__ */ ce(Ta, [["__scopeId", "data-v-bf520189"]]), Aa = { class: "b-dropdown-default-textbox__chevron" }, wa = le({
|
|
2489
2551
|
name: "dropdown-default-textbox",
|
|
2490
2552
|
inheritAttrs: !1
|
|
2491
|
-
}),
|
|
2492
|
-
...
|
|
2553
|
+
}), _a = /* @__PURE__ */ le({
|
|
2554
|
+
...wa,
|
|
2493
2555
|
props: {
|
|
2494
2556
|
/**
|
|
2495
2557
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -2534,6 +2596,10 @@ const ca = /* @__PURE__ */ Symbol("dropdown small size injection key"), Ft = /*
|
|
|
2534
2596
|
* Renders the dropdown with a condensed style.
|
|
2535
2597
|
*/
|
|
2536
2598
|
condensed: { type: Boolean, default: !1 },
|
|
2599
|
+
/**
|
|
2600
|
+
* Allows the selected value to be cleared in a single-select dropdown.
|
|
2601
|
+
*/
|
|
2602
|
+
clearable: { type: Boolean, default: !1 },
|
|
2537
2603
|
/**
|
|
2538
2604
|
* Disables any textbox functionality
|
|
2539
2605
|
*/
|
|
@@ -2582,108 +2648,109 @@ const ca = /* @__PURE__ */ Symbol("dropdown small size injection key"), Ft = /*
|
|
|
2582
2648
|
*/
|
|
2583
2649
|
multiple: { type: Boolean, default: !1 }
|
|
2584
2650
|
},
|
|
2585
|
-
emits: ["clear", "close", "input", "keydown", "open"],
|
|
2651
|
+
emits: ["clear", "clear-selection", "close", "input", "keydown", "open"],
|
|
2586
2652
|
setup(e, { expose: a, emit: o }) {
|
|
2587
|
-
const l = o, i =
|
|
2588
|
-
[`b-dropdown-default-textbox--${
|
|
2589
|
-
[`b-dropdown-default-textbox--${
|
|
2590
|
-
[`b-dropdown-default-textbox--${
|
|
2591
|
-
[`b-dropdown-default-textbox--${
|
|
2653
|
+
const l = o, i = Ue(), s = e, n = A(null), t = r(() => ({
|
|
2654
|
+
[`b-dropdown-default-textbox--${Oe.ERROR}`]: !s.disabled && !s.readonly && s.isInvalid,
|
|
2655
|
+
[`b-dropdown-default-textbox--${Oe.DISABLED}`]: s.disabled,
|
|
2656
|
+
[`b-dropdown-default-textbox--${Oe.READONLY}`]: s.readonly,
|
|
2657
|
+
[`b-dropdown-default-textbox--${Oe.OPENED}`]: s.open,
|
|
2592
2658
|
"b-dropdown-default-textbox--condensed": s.condensed
|
|
2593
|
-
})),
|
|
2594
|
-
l("input",
|
|
2595
|
-
},
|
|
2596
|
-
l("keydown",
|
|
2597
|
-
},
|
|
2598
|
-
|
|
2599
|
-
}, b = (
|
|
2600
|
-
|
|
2601
|
-
},
|
|
2602
|
-
|
|
2603
|
-
},
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
[
|
|
2607
|
-
[
|
|
2608
|
-
[
|
|
2659
|
+
})), m = r(() => s.open && !s.disabled && !s.readonly), d = (x) => {
|
|
2660
|
+
l("input", x);
|
|
2661
|
+
}, u = (x) => {
|
|
2662
|
+
l("keydown", x);
|
|
2663
|
+
}, c = (x) => {
|
|
2664
|
+
Ve(x), l("open");
|
|
2665
|
+
}, b = (x) => {
|
|
2666
|
+
Ve(x), l("close");
|
|
2667
|
+
}, v = (x) => {
|
|
2668
|
+
Ve(x), l("clear");
|
|
2669
|
+
}, S = () => {
|
|
2670
|
+
l("clear-selection");
|
|
2671
|
+
}, D = {
|
|
2672
|
+
[te.INPUT]: d,
|
|
2673
|
+
[te.OPEN]: c,
|
|
2674
|
+
[te.CLOSE]: b,
|
|
2675
|
+
[te.CLEAR]: v,
|
|
2676
|
+
[te.CLEAR_SELECTION]: S,
|
|
2677
|
+
[te.KEYDOWN]: u
|
|
2609
2678
|
};
|
|
2610
2679
|
return a({
|
|
2611
|
-
focus: () =>
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
}), (w, $) => (p(), I("div", {
|
|
2615
|
-
class: we(["b-dropdown-default-textbox", t.value]),
|
|
2680
|
+
focus: (x) => n.value.focus(x)
|
|
2681
|
+
}), (x, C) => (p(), E("div", {
|
|
2682
|
+
class: _e(["b-dropdown-default-textbox", t.value]),
|
|
2616
2683
|
"data-testid": "default-textbox"
|
|
2617
2684
|
}, [
|
|
2618
|
-
|
|
2685
|
+
X(Gt, z({
|
|
2619
2686
|
ref_key: "baseTextbox",
|
|
2620
2687
|
ref: n
|
|
2621
|
-
}, { ...
|
|
2688
|
+
}, { ...x.$attrs, ...x.$props }, {
|
|
2622
2689
|
class: "b-dropdown-default-textbox__textbox",
|
|
2623
2690
|
value: e.value
|
|
2624
|
-
},
|
|
2625
|
-
icon:
|
|
2626
|
-
|
|
2627
|
-
Le(
|
|
2628
|
-
[
|
|
2691
|
+
}, ve(D)), Te({
|
|
2692
|
+
icon: B(() => [
|
|
2693
|
+
Y("div", Aa, [
|
|
2694
|
+
Le(X(f(_t), { "svg-title": "opened" }, null, 512), [
|
|
2695
|
+
[Ke, m.value]
|
|
2629
2696
|
]),
|
|
2630
|
-
Le(
|
|
2631
|
-
[
|
|
2697
|
+
Le(X(f(wt), { "svg-title": "closed" }, null, 512), [
|
|
2698
|
+
[Ke, !m.value]
|
|
2632
2699
|
])
|
|
2633
2700
|
])
|
|
2634
2701
|
]),
|
|
2635
2702
|
_: 2
|
|
2636
2703
|
}, [
|
|
2637
|
-
|
|
2638
|
-
name:
|
|
2639
|
-
fn:
|
|
2640
|
-
|
|
2704
|
+
ie(f(i), (N, $) => ({
|
|
2705
|
+
name: $,
|
|
2706
|
+
fn: B((I) => [
|
|
2707
|
+
Q(x.$slots, $, me(we(I ?? {})), void 0, !0)
|
|
2641
2708
|
])
|
|
2642
2709
|
}))
|
|
2643
2710
|
]), 1040, ["value"])
|
|
2644
2711
|
], 2));
|
|
2645
2712
|
}
|
|
2646
|
-
}),
|
|
2713
|
+
}), ka = /* @__PURE__ */ ce(_a, [["__scopeId", "data-v-874bc432"]]), $a = { key: 0 }, Da = {
|
|
2647
2714
|
__name: "chevron-down-small",
|
|
2648
2715
|
setup(e) {
|
|
2649
|
-
const a =
|
|
2650
|
-
return String(a?.uid ?? a?.proxy?._uid), (o, l) => (p(),
|
|
2716
|
+
const a = ot();
|
|
2717
|
+
return String(a?.uid ?? a?.proxy?._uid), (o, l) => (p(), E("svg", z({ role: "img" }, o.$attrs, {
|
|
2651
2718
|
class: "ui-assets-icons-16",
|
|
2652
2719
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2653
2720
|
width: "16",
|
|
2654
2721
|
height: "16",
|
|
2655
2722
|
fill: "none"
|
|
2656
2723
|
}), [
|
|
2657
|
-
o.$attrs["svg-title"] ? (p(),
|
|
2658
|
-
l[0] || (l[0] =
|
|
2724
|
+
o.$attrs["svg-title"] ? (p(), E("title", $a, q(o.$attrs["svg-title"]), 1)) : j("", !0),
|
|
2725
|
+
l[0] || (l[0] = Y("path", {
|
|
2659
2726
|
fill: "#001222",
|
|
2660
2727
|
d: "M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z"
|
|
2661
2728
|
}, null, -1))
|
|
2662
2729
|
], 16));
|
|
2663
2730
|
}
|
|
2664
|
-
},
|
|
2731
|
+
}, xa = { key: 0 }, Ba = {
|
|
2665
2732
|
__name: "chevron-up-small",
|
|
2666
2733
|
setup(e) {
|
|
2667
|
-
const a =
|
|
2668
|
-
return String(a?.uid ?? a?.proxy?._uid), (o, l) => (p(),
|
|
2734
|
+
const a = ot();
|
|
2735
|
+
return String(a?.uid ?? a?.proxy?._uid), (o, l) => (p(), E("svg", z({ role: "img" }, o.$attrs, {
|
|
2669
2736
|
class: "ui-assets-icons-16",
|
|
2670
2737
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2671
2738
|
width: "16",
|
|
2672
2739
|
height: "16",
|
|
2673
2740
|
fill: "none"
|
|
2674
2741
|
}), [
|
|
2675
|
-
o.$attrs["svg-title"] ? (p(),
|
|
2676
|
-
l[0] || (l[0] =
|
|
2742
|
+
o.$attrs["svg-title"] ? (p(), E("title", xa, q(o.$attrs["svg-title"]), 1)) : j("", !0),
|
|
2743
|
+
l[0] || (l[0] = Y("path", {
|
|
2677
2744
|
fill: "#001222",
|
|
2678
2745
|
d: "M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z"
|
|
2679
2746
|
}, null, -1))
|
|
2680
2747
|
], 16));
|
|
2681
2748
|
}
|
|
2682
|
-
},
|
|
2749
|
+
}, Ra = { class: "b-dropdown-small-textbox__chevron" }, Ma = le({
|
|
2683
2750
|
name: "dropdown-small-textbox",
|
|
2684
2751
|
inheritAttrs: !1
|
|
2685
|
-
}),
|
|
2686
|
-
|
|
2752
|
+
}), Na = /* @__PURE__ */ le({
|
|
2753
|
+
...Ma,
|
|
2687
2754
|
props: {
|
|
2688
2755
|
/**
|
|
2689
2756
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -2716,6 +2783,10 @@ const ca = /* @__PURE__ */ Symbol("dropdown small size injection key"), Ft = /*
|
|
|
2716
2783
|
* Disables any textbox functionality
|
|
2717
2784
|
*/
|
|
2718
2785
|
disabled: { type: Boolean, default: !1 },
|
|
2786
|
+
/**
|
|
2787
|
+
* Allows the selected value to be cleared in a single-select dropdown.
|
|
2788
|
+
*/
|
|
2789
|
+
clearable: { type: Boolean, default: !1 },
|
|
2719
2790
|
/**
|
|
2720
2791
|
* Selected option's label
|
|
2721
2792
|
*/
|
|
@@ -2742,76 +2813,77 @@ const ca = /* @__PURE__ */ Symbol("dropdown small size injection key"), Ft = /*
|
|
|
2742
2813
|
*/
|
|
2743
2814
|
value: { type: String, default: "" }
|
|
2744
2815
|
},
|
|
2745
|
-
emits: ["clear", "close", "input", "keydown", "open"],
|
|
2816
|
+
emits: ["clear", "clear-selection", "close", "input", "keydown", "open"],
|
|
2746
2817
|
setup(e, { expose: a, emit: o }) {
|
|
2747
|
-
const l = o, i =
|
|
2748
|
-
[`b-dropdown-small-textbox--${
|
|
2749
|
-
[`b-dropdown-small-textbox--${
|
|
2750
|
-
[`b-dropdown-small-textbox--${
|
|
2818
|
+
const l = o, i = Ue(), s = e, n = A(null), t = vt(zt, !1), m = r(() => ({
|
|
2819
|
+
[`b-dropdown-small-textbox--${Oe.DISABLED}`]: s.disabled,
|
|
2820
|
+
[`b-dropdown-small-textbox--${Oe.READONLY}`]: s.readonly,
|
|
2821
|
+
[`b-dropdown-small-textbox--${Oe.OPENED}`]: s.open,
|
|
2751
2822
|
"b-dropdown-small-textbox--underline": t
|
|
2752
|
-
})),
|
|
2753
|
-
l("input",
|
|
2754
|
-
},
|
|
2755
|
-
l("keydown",
|
|
2756
|
-
}, b = (
|
|
2757
|
-
|
|
2758
|
-
},
|
|
2759
|
-
|
|
2760
|
-
},
|
|
2761
|
-
|
|
2762
|
-
},
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
[
|
|
2766
|
-
[
|
|
2767
|
-
[
|
|
2823
|
+
})), d = r(() => s.open && !s.disabled && !s.readonly), u = (C) => {
|
|
2824
|
+
l("input", C);
|
|
2825
|
+
}, c = (C) => {
|
|
2826
|
+
l("keydown", C);
|
|
2827
|
+
}, b = (C) => {
|
|
2828
|
+
Ve(C), l("open");
|
|
2829
|
+
}, v = (C) => {
|
|
2830
|
+
Ve(C), l("close");
|
|
2831
|
+
}, S = (C) => {
|
|
2832
|
+
Ve(C), l("clear");
|
|
2833
|
+
}, D = () => {
|
|
2834
|
+
l("clear-selection");
|
|
2835
|
+
}, G = {
|
|
2836
|
+
[te.INPUT]: u,
|
|
2837
|
+
[te.OPEN]: b,
|
|
2838
|
+
[te.CLOSE]: v,
|
|
2839
|
+
[te.CLEAR]: S,
|
|
2840
|
+
[te.CLEAR_SELECTION]: D,
|
|
2841
|
+
[te.KEYDOWN]: c
|
|
2768
2842
|
};
|
|
2769
2843
|
return a({
|
|
2770
|
-
focus: () =>
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
}), ($, T) => (p(), I("div", {
|
|
2774
|
-
class: we(["b-dropdown-small-textbox", f.value])
|
|
2844
|
+
focus: (C) => n.value.focus(C)
|
|
2845
|
+
}), (C, N) => (p(), E("div", {
|
|
2846
|
+
class: _e(["b-dropdown-small-textbox", m.value])
|
|
2775
2847
|
}, [
|
|
2776
|
-
|
|
2848
|
+
X(Gt, z({
|
|
2777
2849
|
ref_key: "baseTextbox",
|
|
2778
2850
|
ref: n
|
|
2779
|
-
}, {
|
|
2851
|
+
}, { ...C.$attrs, ...C.$props }, {
|
|
2780
2852
|
class: "b-dropdown-small-textbox__textbox",
|
|
2781
|
-
size:
|
|
2782
|
-
},
|
|
2783
|
-
icon:
|
|
2784
|
-
|
|
2785
|
-
Le(
|
|
2786
|
-
[
|
|
2853
|
+
size: f(Ze).SMALL
|
|
2854
|
+
}, ve(G)), Te({
|
|
2855
|
+
icon: B(() => [
|
|
2856
|
+
Y("div", Ra, [
|
|
2857
|
+
Le(X(f(Ba), { "svg-title": "opened" }, null, 512), [
|
|
2858
|
+
[Ke, d.value]
|
|
2787
2859
|
]),
|
|
2788
|
-
Le(
|
|
2789
|
-
[
|
|
2860
|
+
Le(X(f(Da), { "svg-title": "closed" }, null, 512), [
|
|
2861
|
+
[Ke, !d.value]
|
|
2790
2862
|
])
|
|
2791
2863
|
])
|
|
2792
2864
|
]),
|
|
2793
2865
|
_: 2
|
|
2794
2866
|
}, [
|
|
2795
|
-
|
|
2796
|
-
name:
|
|
2797
|
-
fn:
|
|
2798
|
-
|
|
2867
|
+
ie(f(i), ($, I) => ({
|
|
2868
|
+
name: I,
|
|
2869
|
+
fn: B((k) => [
|
|
2870
|
+
Q(C.$slots, I, me(we(k ?? {})), void 0, !0)
|
|
2799
2871
|
])
|
|
2800
2872
|
}))
|
|
2801
2873
|
]), 1040, ["size"])
|
|
2802
2874
|
], 2));
|
|
2803
2875
|
}
|
|
2804
|
-
}),
|
|
2876
|
+
}), Pa = /* @__PURE__ */ ce(Na, [["__scopeId", "data-v-383a3a02"]]), Fa = (e, a) => {
|
|
2805
2877
|
const o = /* @__PURE__ */ new Set(), l = new Set(e.value.map((s) => s.value)), i = a.value.reduce((s, n) => {
|
|
2806
2878
|
if (n.items)
|
|
2807
2879
|
if (l.has(n.value))
|
|
2808
|
-
s.push(n.displayValue ?? n.label), o.add(n.value), n.items.forEach((
|
|
2880
|
+
s.push(n.displayValue ?? n.label), o.add(n.value), n.items.forEach((m) => o.add(m.value));
|
|
2809
2881
|
else {
|
|
2810
|
-
const
|
|
2811
|
-
(
|
|
2882
|
+
const m = n.items.filter(
|
|
2883
|
+
(u) => l.has(u.value)
|
|
2812
2884
|
);
|
|
2813
|
-
|
|
2814
|
-
s.push(
|
|
2885
|
+
m.length > 0 && m.length === n.items.length ? (s.push(n.displayValue ?? n.label), o.add(n.value), n.items.forEach((u) => o.add(u.value))) : m.forEach(({ label: u, displayValue: c, value: b }) => {
|
|
2886
|
+
s.push(c ?? u), o.add(b);
|
|
2815
2887
|
});
|
|
2816
2888
|
}
|
|
2817
2889
|
else
|
|
@@ -2821,14 +2893,14 @@ const ca = /* @__PURE__ */ Symbol("dropdown small size injection key"), Ft = /*
|
|
|
2821
2893
|
return e.value.forEach((s) => {
|
|
2822
2894
|
o.has(s.value) || i.push(s.displayValue ?? s.label);
|
|
2823
2895
|
}), i.join(", ");
|
|
2824
|
-
},
|
|
2896
|
+
}, za = ({ items: e, placeholder: a, selectedValues: o, isMultiSelect: l }) => {
|
|
2825
2897
|
const i = r(
|
|
2826
2898
|
() => l.value && e.value.find((n) => n.items?.length)
|
|
2827
2899
|
);
|
|
2828
|
-
return r(() => o.value.length ? i.value ?
|
|
2829
|
-
},
|
|
2900
|
+
return r(() => o.value.length ? i.value ? Fa(o, e) : o.value.map(({ label: n, displayValue: t }) => t ?? n).join(", ") : a.value || null);
|
|
2901
|
+
}, Kt = (e) => {
|
|
2830
2902
|
e.value.$children?.[0].$refs.textbox.focus();
|
|
2831
|
-
},
|
|
2903
|
+
}, Va = ({
|
|
2832
2904
|
inputContainerRef: e,
|
|
2833
2905
|
optionsContainerRef: a,
|
|
2834
2906
|
selectedValueIndex: o,
|
|
@@ -2837,98 +2909,108 @@ const ca = /* @__PURE__ */ Symbol("dropdown small size injection key"), Ft = /*
|
|
|
2837
2909
|
items: s,
|
|
2838
2910
|
isMultiple: n,
|
|
2839
2911
|
isSearching: t,
|
|
2840
|
-
activeDescendantIndex:
|
|
2841
|
-
selectFirstMatchedOption:
|
|
2842
|
-
totalItemCount:
|
|
2843
|
-
isVirtualScroll:
|
|
2912
|
+
activeDescendantIndex: m,
|
|
2913
|
+
selectFirstMatchedOption: d,
|
|
2914
|
+
totalItemCount: u,
|
|
2915
|
+
isVirtualScroll: c,
|
|
2844
2916
|
removeActiveDescendant: b
|
|
2845
|
-
},
|
|
2846
|
-
const
|
|
2847
|
-
i.value && await
|
|
2848
|
-
},
|
|
2849
|
-
i.value && await
|
|
2850
|
-
const
|
|
2917
|
+
}, v, S, D) => {
|
|
2918
|
+
const G = async (T) => {
|
|
2919
|
+
i.value && await ne(), s.value[T]?.focus();
|
|
2920
|
+
}, x = async (T) => {
|
|
2921
|
+
i.value && await ne();
|
|
2922
|
+
const fe = a.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.$el.querySelectorAll(
|
|
2851
2923
|
"button"
|
|
2852
2924
|
);
|
|
2853
|
-
|
|
2854
|
-
},
|
|
2855
|
-
|
|
2856
|
-
),
|
|
2857
|
-
await a.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.navigateToItem(
|
|
2858
|
-
},
|
|
2859
|
-
b?.(), !(
|
|
2860
|
-
|
|
2925
|
+
fe?.length ? fe[T]?.focus() : G(T);
|
|
2926
|
+
}, C = (T) => a.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.setListboxFocusedIndex(
|
|
2927
|
+
T
|
|
2928
|
+
), N = async (T) => {
|
|
2929
|
+
await a.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.navigateToItem(T);
|
|
2930
|
+
}, $ = (T) => {
|
|
2931
|
+
b?.(), !(T < 0) && ne(() => {
|
|
2932
|
+
c ? N(T) : (C(T), G(T));
|
|
2861
2933
|
});
|
|
2862
|
-
},
|
|
2863
|
-
l.value ||
|
|
2864
|
-
},
|
|
2865
|
-
l.value ||
|
|
2866
|
-
const
|
|
2867
|
-
|
|
2868
|
-
},
|
|
2869
|
-
l.value ||
|
|
2870
|
-
|
|
2934
|
+
}, I = () => {
|
|
2935
|
+
l.value || S(), $(0);
|
|
2936
|
+
}, k = () => {
|
|
2937
|
+
l.value || S();
|
|
2938
|
+
const T = c ? u.value - 1 : s.value.length - 1, fe = Math.min((m?.value ?? -1) + 1, T);
|
|
2939
|
+
$(fe);
|
|
2940
|
+
}, W = () => {
|
|
2941
|
+
l.value || S(), ne(() => {
|
|
2942
|
+
$(c ? u.value - 1 : s.value.length - 1);
|
|
2871
2943
|
});
|
|
2872
|
-
},
|
|
2873
|
-
|
|
2874
|
-
},
|
|
2875
|
-
if (
|
|
2876
|
-
|
|
2944
|
+
}, P = (T) => {
|
|
2945
|
+
T.preventDefault(), T.stopPropagation();
|
|
2946
|
+
}, H = ({ detail: T }) => {
|
|
2947
|
+
if (P(T), m?.value !== void 0 && m.value >= 0) {
|
|
2948
|
+
k();
|
|
2877
2949
|
return;
|
|
2878
2950
|
}
|
|
2879
|
-
|
|
2880
|
-
},
|
|
2881
|
-
|
|
2882
|
-
},
|
|
2883
|
-
|
|
2884
|
-
},
|
|
2885
|
-
|
|
2886
|
-
},
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2951
|
+
I();
|
|
2952
|
+
}, re = ({ detail: T }) => {
|
|
2953
|
+
P(T), W();
|
|
2954
|
+
}, _ = ({ detail: T }) => {
|
|
2955
|
+
P(T), I();
|
|
2956
|
+
}, J = ({ detail: T }) => {
|
|
2957
|
+
P(T), W();
|
|
2958
|
+
}, R = () => {
|
|
2959
|
+
if (l.value) {
|
|
2960
|
+
if (n.value) {
|
|
2961
|
+
x(0);
|
|
2962
|
+
return;
|
|
2963
|
+
}
|
|
2964
|
+
ne(() => {
|
|
2965
|
+
e.value.focus("clear-action") || $(o.value);
|
|
2966
|
+
});
|
|
2967
|
+
}
|
|
2968
|
+
}, V = ({ detail: T }) => {
|
|
2969
|
+
P(T), v(), R();
|
|
2970
|
+
}, F = async ({ detail: T }) => {
|
|
2971
|
+
if (P(T), i.value && !n.value)
|
|
2972
|
+
return l.value && t.value && await d(), void 0;
|
|
2973
|
+
v(), R();
|
|
2974
|
+
}, Ie = ({ detail: T }) => {
|
|
2975
|
+
T.stopPropagation(), l.value && D();
|
|
2976
|
+
}, ke = ({ detail: T }) => {
|
|
2977
|
+
T.stopPropagation(), l.value && (D(), Kt(e));
|
|
2896
2978
|
};
|
|
2897
2979
|
return r(() => ({
|
|
2898
|
-
[
|
|
2899
|
-
[
|
|
2900
|
-
[
|
|
2901
|
-
[
|
|
2902
|
-
...i.value ? {} : { [
|
|
2903
|
-
[
|
|
2904
|
-
...i.value ? {} : { [
|
|
2905
|
-
[
|
|
2980
|
+
[ae.ARROW_DOWN]: H,
|
|
2981
|
+
[ae.ARROW_UP]: re,
|
|
2982
|
+
[ae.HOME]: _,
|
|
2983
|
+
[ae.END]: J,
|
|
2984
|
+
...i.value ? {} : { [ae.SPACE]: V },
|
|
2985
|
+
[ae.ENTER]: F,
|
|
2986
|
+
...i.value ? {} : { [ae.TAB]: Ie },
|
|
2987
|
+
[ae.ESCAPE]: ke
|
|
2906
2988
|
}));
|
|
2907
|
-
},
|
|
2989
|
+
}, Ga = ({ inputContainerRef: e, isDropdownOpen: a }, o) => {
|
|
2908
2990
|
const l = () => {
|
|
2909
|
-
a.value && o(),
|
|
2910
|
-
|
|
2991
|
+
a.value && o(), ne(() => {
|
|
2992
|
+
Kt(e);
|
|
2911
2993
|
});
|
|
2912
2994
|
};
|
|
2913
2995
|
return {
|
|
2914
|
-
[
|
|
2915
|
-
[
|
|
2916
|
-
[
|
|
2917
|
-
[
|
|
2996
|
+
[g.ENTER]: l,
|
|
2997
|
+
[g.ESCAPE]: l,
|
|
2998
|
+
[g.TAB]: l,
|
|
2999
|
+
[g.SPACE]: l
|
|
2918
3000
|
};
|
|
2919
3001
|
};
|
|
2920
|
-
function
|
|
2921
|
-
const s = A(e), n = A(a), t = (
|
|
2922
|
-
return
|
|
2923
|
-
|
|
3002
|
+
function Ka(e, a, o, l, i) {
|
|
3003
|
+
const s = A(e), n = A(a), t = (u, c = []) => c.flatMap((b) => b.label.toLocaleLowerCase().includes(u) ? l?.value && b.items ? [...t(u, b.items)] : [b, ...t(u, b.items)] : b.items ? [...t(u, b.items)] : []), m = o !== void 0 ? Ft(() => o(s.value), i ?? 300) : void 0;
|
|
3004
|
+
return pe(s, () => {
|
|
3005
|
+
m !== void 0 && m();
|
|
2924
3006
|
}), r(() => {
|
|
2925
3007
|
if (!s.value || o !== void 0)
|
|
2926
3008
|
return n.value;
|
|
2927
|
-
const
|
|
2928
|
-
return t(
|
|
3009
|
+
const u = s.value.toLocaleLowerCase();
|
|
3010
|
+
return t(u, n.value);
|
|
2929
3011
|
});
|
|
2930
3012
|
}
|
|
2931
|
-
const
|
|
3013
|
+
const Ut = {
|
|
2932
3014
|
"de-DE": { all: "Alle", ariaLabelFallback: "Dropdown", clearSearch: "Filter löschen" },
|
|
2933
3015
|
"en-GB": { all: "All", ariaLabelFallback: "Dropdown", clearSearch: "Clear filter" },
|
|
2934
3016
|
"en-US": { all: "All", ariaLabelFallback: "Dropdown", clearSearch: "Clear filter" },
|
|
@@ -2940,18 +3022,19 @@ const Kt = {
|
|
|
2940
3022
|
"ja-JP": { all: "すべて", ariaLabelFallback: "ドロップダウン", clearSearch: "フィルターをクリア" },
|
|
2941
3023
|
"pt-BR": { all: "Todos", ariaLabelFallback: "Menu suspenso", clearSearch: "Limpar filtro" },
|
|
2942
3024
|
"zh-CN": { all: "全部", ariaLabelFallback: "下拉菜单", clearSearch: "清除筛选器" }
|
|
2943
|
-
},
|
|
2944
|
-
i18n: { messages:
|
|
3025
|
+
}, Ua = { class: "b-dropdown__autocomplete-hidden-prefix" }, Wa = le({
|
|
3026
|
+
i18n: { messages: Ut },
|
|
2945
3027
|
name: "bento-dropdown",
|
|
2946
3028
|
components: {
|
|
2947
|
-
DropdownInputDefault:
|
|
2948
|
-
DropdownInputSmall:
|
|
3029
|
+
DropdownInputDefault: ka,
|
|
3030
|
+
DropdownInputSmall: Pa
|
|
2949
3031
|
},
|
|
2950
3032
|
inheritAttrs: !1,
|
|
2951
3033
|
model: { prop: "modelValue", event: "update:model-value" }
|
|
2952
|
-
}),
|
|
2953
|
-
...
|
|
3034
|
+
}), qa = /* @__PURE__ */ le({
|
|
3035
|
+
...Wa,
|
|
2954
3036
|
props: {
|
|
3037
|
+
clearable: { type: Boolean, default: !1 },
|
|
2955
3038
|
condensed: { type: Boolean, default: !1 },
|
|
2956
3039
|
emptyState: { default: void 0 },
|
|
2957
3040
|
dynamicFiltering: { type: Boolean, default: !1 },
|
|
@@ -2960,7 +3043,7 @@ const Kt = {
|
|
|
2960
3043
|
items: { default: () => [] },
|
|
2961
3044
|
loading: { type: Boolean, default: !1 },
|
|
2962
3045
|
componentLoading: { type: Boolean, default: !1 },
|
|
2963
|
-
lazyLoadType: { default:
|
|
3046
|
+
lazyLoadType: { default: bt.props.lazyLoadType.default },
|
|
2964
3047
|
multiple: { type: Boolean, default: !1 },
|
|
2965
3048
|
search: { default: void 0 },
|
|
2966
3049
|
showSlotContentInMultiple: { type: Boolean, default: !1 },
|
|
@@ -2981,277 +3064,281 @@ const Kt = {
|
|
|
2981
3064
|
},
|
|
2982
3065
|
emits: ["update:model-value", "show-more", "open"],
|
|
2983
3066
|
setup(e, { expose: a, emit: o }) {
|
|
2984
|
-
const l =
|
|
3067
|
+
const l = mt(), i = Ue(), s = (y) => Object.fromEntries(Object.entries(y).filter(([he]) => !he.startsWith("aria-"))), n = Ot(i), t = e, m = o, { t: d } = Ne({ messages: Ut }), { emitValue: u } = Ht(m), c = A(null), b = A(null), v = A(null), S = A(!1), D = A(!1), G = xe("bento-dropdown-options-container"), x = xe("dropdown-label"), C = xe("dropdown-description"), N = xe("dropdown-error"), { isReadOnly: $ } = Jt(de(t, "readonly")), I = r(() => t.modelValue), { cachedSelectedListboxOptions: k, cachedListboxSelectedValues: W, setCachedValues: P } = ua(
|
|
2985
3068
|
de(t, "items"),
|
|
2986
|
-
|
|
3069
|
+
I,
|
|
2987
3070
|
de(t, "multiple"),
|
|
2988
3071
|
de(t, "enableValueLabelPair")
|
|
2989
|
-
),
|
|
3072
|
+
), H = A(l["aria-describedby"]), re = r(() => d("ariaLabelFallback")), _ = vt(va, !1), J = r(() => _ ? Ze.SMALL : Ze.DEFAULT), R = r(() => ({
|
|
2990
3073
|
"b-dropdown--condensed": t.condensed
|
|
2991
|
-
})),
|
|
3074
|
+
})), V = r(() => ({
|
|
2992
3075
|
"b-dropdown__description--error": !!t.errorMessage
|
|
2993
|
-
})),
|
|
2994
|
-
|
|
2995
|
-
|
|
3076
|
+
})), F = A(""), Ie = de(t, "items"), ke = de(t, "staticCategories"), be = Ka(
|
|
3077
|
+
F,
|
|
3078
|
+
Ie,
|
|
2996
3079
|
t?.search?.searchEvent,
|
|
2997
|
-
|
|
3080
|
+
ke,
|
|
2998
3081
|
t?.search?.debounceTime
|
|
2999
|
-
),
|
|
3000
|
-
items:
|
|
3082
|
+
), T = r(() => t.dynamicFiltering && !!F.value), fe = za({
|
|
3083
|
+
items: Ie,
|
|
3001
3084
|
placeholder: de(t, "placeholder"),
|
|
3002
3085
|
isMultiSelect: de(t, "multiple"),
|
|
3003
|
-
selectedValues:
|
|
3004
|
-
}),
|
|
3005
|
-
if (t?.multiple && Array.isArray(
|
|
3086
|
+
selectedValues: k
|
|
3087
|
+
}), Pe = r(() => {
|
|
3088
|
+
if (t?.multiple && Array.isArray(I.value))
|
|
3006
3089
|
return t.items.filter(
|
|
3007
|
-
({ value:
|
|
3090
|
+
({ value: y }) => I.value.includes(y)
|
|
3008
3091
|
);
|
|
3009
3092
|
if (!t.multiple && t.staticCategories) {
|
|
3010
|
-
const
|
|
3011
|
-
(
|
|
3093
|
+
const y = t.items.find(
|
|
3094
|
+
(Se) => Se.items?.some((Re) => Re.value === I.value)
|
|
3012
3095
|
);
|
|
3013
|
-
return (
|
|
3096
|
+
return (y ? y.items.find((Se) => Se.value === I.value) : t.items.find(({ value: Se }) => Se === I.value)) ?? null;
|
|
3014
3097
|
}
|
|
3015
|
-
return t.items.find(({ value:
|
|
3016
|
-
}),
|
|
3017
|
-
const
|
|
3018
|
-
return
|
|
3019
|
-
}), { isMultiLevelSelect:
|
|
3098
|
+
return t.items.find(({ value: y }) => y === I.value);
|
|
3099
|
+
}), Be = r(() => {
|
|
3100
|
+
const he = (Ee.value ? Fe.value : be.value).findIndex(({ value: Se }) => t.enableValueLabelPair ? I.value?.value === Se : I.value === Se);
|
|
3101
|
+
return he > -1 ? he : 0;
|
|
3102
|
+
}), { isMultiLevelSelect: Ee, flattenedItemsList: Fe } = Nt(Ie), We = r(() => Ee.value && !t.staticCategories), Ge = r(() => We.value ? "treeitem" : "option"), w = r(() => {
|
|
3020
3103
|
if (t.multiple) {
|
|
3021
|
-
const
|
|
3022
|
-
return
|
|
3104
|
+
const y = Array.isArray(I.value) ? I.value.length : 0, he = Ee.value ? Fe.value.length : Ie.value.length;
|
|
3105
|
+
return y === 0 ? null : !t.hasMoreItems && he > 0 && he === y ? d("all") : y;
|
|
3023
3106
|
}
|
|
3024
3107
|
return null;
|
|
3025
|
-
}),
|
|
3026
|
-
() =>
|
|
3027
|
-
),
|
|
3028
|
-
() => !t.multiple &&
|
|
3108
|
+
}), se = r(
|
|
3109
|
+
() => be.value.find((y) => !t.isOptionDisabled?.(y))
|
|
3110
|
+
), $e = r(() => t.multiple || !T.value || !D.value ? "" : se.value?.label ?? ""), Qe = r(() => $e.value.toLocaleLowerCase().startsWith(F.value.toLocaleLowerCase()) ? $e.value.slice(F.value.length) : ""), qe = r(
|
|
3111
|
+
() => !t.multiple && S.value && T.value && D.value && se.value ? Dt(G, se.value.value) : null
|
|
3029
3112
|
), nt = r(
|
|
3030
|
-
() =>
|
|
3031
|
-
), it = (
|
|
3032
|
-
|
|
3033
|
-
}, rt =
|
|
3113
|
+
() => qe.value ? be.value.findIndex(({ value: y }) => y === se.value?.value) : -1
|
|
3114
|
+
), it = (y) => {
|
|
3115
|
+
F.value = y, D.value = !0;
|
|
3116
|
+
}, rt = async () => {
|
|
3117
|
+
P([]), u(null), await ne(), ut();
|
|
3118
|
+
}, dt = r(
|
|
3034
3119
|
() => [
|
|
3035
|
-
t.description ?
|
|
3036
|
-
|
|
3037
|
-
t.errorMessage ?
|
|
3120
|
+
t.description ? C : null,
|
|
3121
|
+
H.value,
|
|
3122
|
+
t.errorMessage ? N : null
|
|
3038
3123
|
].filter(Boolean).join(" ") || null
|
|
3039
|
-
),
|
|
3040
|
-
const
|
|
3041
|
-
return
|
|
3042
|
-
}), { visibleDomOptions: et, updateVisibleDomOptions:
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
),
|
|
3047
|
-
|
|
3048
|
-
|
|
3124
|
+
), Ye = r(() => {
|
|
3125
|
+
const y = v.value?.dropdownOptionsListboxRef;
|
|
3126
|
+
return y?.listboxRef?.value ?? y?.listboxRef;
|
|
3127
|
+
}), { visibleDomOptions: et, updateVisibleDomOptions: tt } = yt(
|
|
3128
|
+
Ye,
|
|
3129
|
+
be,
|
|
3130
|
+
Ge
|
|
3131
|
+
), ct = () => {
|
|
3132
|
+
$.value || (S.value = !0, ne(() => {
|
|
3133
|
+
tt();
|
|
3049
3134
|
}));
|
|
3050
|
-
},
|
|
3051
|
-
|
|
3052
|
-
},
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
}),
|
|
3056
|
-
},
|
|
3057
|
-
|
|
3058
|
-
},
|
|
3059
|
-
|
|
3135
|
+
}, je = () => {
|
|
3136
|
+
S.value = !1;
|
|
3137
|
+
}, He = () => {
|
|
3138
|
+
$.value || (S.value = !S.value, ne(() => {
|
|
3139
|
+
tt();
|
|
3140
|
+
}), T.value && (F.value = ""));
|
|
3141
|
+
}, h = () => {
|
|
3142
|
+
T.value && (F.value = ""), S.value && (S.value = !1, v.value.onOutsideDropdownClick());
|
|
3143
|
+
}, L = r(() => [
|
|
3144
|
+
h,
|
|
3060
3145
|
{
|
|
3061
|
-
ignore: [
|
|
3146
|
+
ignore: [Ye]
|
|
3062
3147
|
}
|
|
3063
|
-
]),
|
|
3064
|
-
t.multiple || (
|
|
3065
|
-
},
|
|
3066
|
-
|
|
3067
|
-
},
|
|
3148
|
+
]), O = async (y) => {
|
|
3149
|
+
t.multiple || (F.value = "", S.value = !1), P(y), u(W.value), t.multiple || (await ne(), ut());
|
|
3150
|
+
}, K = async () => se.value ? (await O([se.value]), !0) : !1, ee = () => {
|
|
3151
|
+
m(g.SHOW_MORE);
|
|
3152
|
+
}, ue = Va(
|
|
3068
3153
|
{
|
|
3069
|
-
inputContainerRef:
|
|
3070
|
-
optionsContainerRef:
|
|
3071
|
-
selectedValueIndex:
|
|
3072
|
-
isDropdownOpen:
|
|
3154
|
+
inputContainerRef: c,
|
|
3155
|
+
optionsContainerRef: v,
|
|
3156
|
+
selectedValueIndex: Be,
|
|
3157
|
+
isDropdownOpen: S,
|
|
3073
3158
|
isDynamicFltering: de(t, "dynamicFiltering"),
|
|
3074
3159
|
items: et,
|
|
3075
3160
|
isMultiple: de(t, "multiple"),
|
|
3076
|
-
isSearching:
|
|
3161
|
+
isSearching: T,
|
|
3077
3162
|
activeDescendantIndex: nt,
|
|
3078
|
-
selectFirstMatchedOption:
|
|
3079
|
-
totalItemCount: r(() =>
|
|
3163
|
+
selectFirstMatchedOption: K,
|
|
3164
|
+
totalItemCount: r(() => be.value.length),
|
|
3080
3165
|
isVirtualScroll: !t?.multiple && t?.virtualScroll !== !1 && t?.lazyLoadType === "none",
|
|
3081
3166
|
removeActiveDescendant: () => {
|
|
3082
|
-
|
|
3167
|
+
D.value = !1;
|
|
3083
3168
|
}
|
|
3084
3169
|
},
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
),
|
|
3170
|
+
He,
|
|
3171
|
+
ct,
|
|
3172
|
+
je
|
|
3173
|
+
), U = Ga(
|
|
3089
3174
|
{
|
|
3090
|
-
inputContainerRef:
|
|
3091
|
-
isDropdownOpen:
|
|
3175
|
+
inputContainerRef: c,
|
|
3176
|
+
isDropdownOpen: S
|
|
3092
3177
|
},
|
|
3093
|
-
|
|
3094
|
-
),
|
|
3095
|
-
[
|
|
3096
|
-
[
|
|
3097
|
-
[
|
|
3098
|
-
...
|
|
3099
|
-
},
|
|
3100
|
-
|
|
3101
|
-
},
|
|
3102
|
-
if (await
|
|
3178
|
+
je
|
|
3179
|
+
), Je = {
|
|
3180
|
+
[g.CLOSE_DROPDOWN]: je,
|
|
3181
|
+
[g.SELECT]: O,
|
|
3182
|
+
[g.SHOW_MORE]: ee,
|
|
3183
|
+
...U
|
|
3184
|
+
}, ut = () => {
|
|
3185
|
+
c.value?.focus();
|
|
3186
|
+
}, Wt = async () => {
|
|
3187
|
+
if (await ne(), !S.value || t.multiple || !v.value)
|
|
3103
3188
|
return;
|
|
3104
|
-
const
|
|
3105
|
-
if (
|
|
3189
|
+
const y = Be.value;
|
|
3190
|
+
if (y <= 0)
|
|
3106
3191
|
return;
|
|
3107
|
-
const
|
|
3108
|
-
|
|
3192
|
+
const he = v.value.dropdownOptionsListboxRef, Se = he?.listboxRef;
|
|
3193
|
+
he?.listboxItemRef?.scrollToItem?.(y, Se);
|
|
3109
3194
|
};
|
|
3110
|
-
return
|
|
3111
|
-
() =>
|
|
3112
|
-
(
|
|
3113
|
-
|
|
3195
|
+
return pe(
|
|
3196
|
+
() => S.value,
|
|
3197
|
+
(y) => {
|
|
3198
|
+
y && (m("open"), Wt());
|
|
3114
3199
|
}
|
|
3115
3200
|
), a({
|
|
3116
|
-
focus:
|
|
3117
|
-
}), (
|
|
3118
|
-
class: ["b-dropdown",
|
|
3201
|
+
focus: ut
|
|
3202
|
+
}), (y, he) => Le((p(), E("div", z(s(y.$attrs), {
|
|
3203
|
+
class: ["b-dropdown", R.value]
|
|
3119
3204
|
}), [
|
|
3120
|
-
|
|
3205
|
+
y.label ? (p(), M(f(sl), {
|
|
3121
3206
|
key: 0,
|
|
3122
|
-
id:
|
|
3123
|
-
condensed:
|
|
3124
|
-
label:
|
|
3125
|
-
"tooltip-text":
|
|
3126
|
-
optional:
|
|
3127
|
-
required:
|
|
3128
|
-
}, null, 8, ["id", "condensed", "label", "tooltip-text", "optional", "required"])) :
|
|
3129
|
-
Le((p(),
|
|
3207
|
+
id: f(x),
|
|
3208
|
+
condensed: y.condensed,
|
|
3209
|
+
label: y.label,
|
|
3210
|
+
"tooltip-text": y.tooltipText,
|
|
3211
|
+
optional: y.optional,
|
|
3212
|
+
required: y.required
|
|
3213
|
+
}, null, 8, ["id", "condensed", "label", "tooltip-text", "optional", "required"])) : j("", !0),
|
|
3214
|
+
Le((p(), E("div", z({
|
|
3130
3215
|
ref_key: "inputContainerRefWrapper",
|
|
3131
3216
|
ref: b
|
|
3132
|
-
},
|
|
3133
|
-
(p(),
|
|
3217
|
+
}, ve(f(ue), !0)), [
|
|
3218
|
+
(p(), M(Et(J.value), {
|
|
3134
3219
|
ref_key: "inputContainerRef",
|
|
3135
|
-
ref:
|
|
3136
|
-
condensed:
|
|
3137
|
-
value:
|
|
3138
|
-
"additional-items-selected":
|
|
3139
|
-
"aria-controls":
|
|
3140
|
-
"aria-active-descendant":
|
|
3141
|
-
ariaExpanded:
|
|
3142
|
-
"aria-labelledby":
|
|
3143
|
-
"aria-describedby":
|
|
3144
|
-
"aria-label":
|
|
3145
|
-
"aria-readonly":
|
|
3146
|
-
"aria-required":
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
"
|
|
3151
|
-
"
|
|
3152
|
-
"
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
"
|
|
3220
|
+
ref: c,
|
|
3221
|
+
condensed: y.condensed,
|
|
3222
|
+
value: F.value,
|
|
3223
|
+
"additional-items-selected": w.value,
|
|
3224
|
+
"aria-controls": f(G),
|
|
3225
|
+
"aria-active-descendant": qe.value,
|
|
3226
|
+
ariaExpanded: S.value,
|
|
3227
|
+
"aria-labelledby": y.label ? f(x) : null,
|
|
3228
|
+
"aria-describedby": dt.value,
|
|
3229
|
+
"aria-label": y.$attrs["aria-label"] ?? y.label ?? re.value,
|
|
3230
|
+
"aria-readonly": f($),
|
|
3231
|
+
"aria-required": y.required,
|
|
3232
|
+
clearable: y.clearable && !y.required,
|
|
3233
|
+
readonly: f($),
|
|
3234
|
+
disabled: y.disabled,
|
|
3235
|
+
"display-value": f(fe),
|
|
3236
|
+
"dynamic-filtering": y.dynamicFiltering,
|
|
3237
|
+
"has-selected-value": f(k).length > 0,
|
|
3238
|
+
"is-invalid": !!y.errorMessage,
|
|
3239
|
+
multiple: y.multiple,
|
|
3240
|
+
open: S.value,
|
|
3241
|
+
"selected-value-item": f(_) ? void 0 : Pe.value,
|
|
3242
|
+
"show-slot-content-in-multiple": y.showSlotContentInMultiple,
|
|
3157
3243
|
onInput: it,
|
|
3158
|
-
onOpen:
|
|
3159
|
-
onClose:
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3244
|
+
onOpen: He,
|
|
3245
|
+
onClose: He,
|
|
3246
|
+
onClearSelection: rt
|
|
3247
|
+
}, Te({
|
|
3248
|
+
"autocomplete-suggestion": B(() => [
|
|
3249
|
+
Qe.value ? (p(), E(ye, { key: 0 }, [
|
|
3250
|
+
Y("span", Ua, q(F.value), 1),
|
|
3251
|
+
oe(q(Qe.value), 1)
|
|
3252
|
+
], 64)) : j("", !0)
|
|
3166
3253
|
]),
|
|
3167
3254
|
_: 2
|
|
3168
3255
|
}, [
|
|
3169
|
-
|
|
3170
|
-
name:
|
|
3171
|
-
fn:
|
|
3172
|
-
|
|
3256
|
+
ie(f(i), (Se, Re) => ({
|
|
3257
|
+
name: Re,
|
|
3258
|
+
fn: B((pt) => [
|
|
3259
|
+
Q(y.$slots, Re, me(we(pt)), void 0, !0)
|
|
3173
3260
|
])
|
|
3174
3261
|
}))
|
|
3175
|
-
]), 1064, ["condensed", "value", "additional-items-selected", "aria-controls", "aria-active-descendant", "ariaExpanded", "aria-labelledby", "aria-describedby", "aria-label", "aria-readonly", "aria-required", "readonly", "disabled", "display-value", "dynamic-filtering", "has-selected-value", "is-invalid", "multiple", "open", "selected-value-item", "show-slot-content-in-multiple"]))
|
|
3262
|
+
]), 1064, ["condensed", "value", "additional-items-selected", "aria-controls", "aria-active-descendant", "ariaExpanded", "aria-labelledby", "aria-describedby", "aria-label", "aria-readonly", "aria-required", "clearable", "readonly", "disabled", "display-value", "dynamic-filtering", "has-selected-value", "is-invalid", "multiple", "open", "selected-value-item", "show-slot-content-in-multiple"]))
|
|
3176
3263
|
], 16)), [
|
|
3177
|
-
[
|
|
3264
|
+
[f(Xe)]
|
|
3178
3265
|
]),
|
|
3179
|
-
|
|
3266
|
+
c.value ? (p(), M(f(al), {
|
|
3180
3267
|
key: 1,
|
|
3181
|
-
disabled:
|
|
3182
|
-
to:
|
|
3268
|
+
disabled: y.teleport?.disabled,
|
|
3269
|
+
to: y.teleport?.to
|
|
3183
3270
|
}, {
|
|
3184
|
-
default:
|
|
3185
|
-
|
|
3186
|
-
id:
|
|
3271
|
+
default: B(() => [
|
|
3272
|
+
X(f(ma), z({
|
|
3273
|
+
id: f(G),
|
|
3187
3274
|
ref_key: "optionsContainerRef",
|
|
3188
|
-
ref:
|
|
3189
|
-
"aria-label":
|
|
3190
|
-
"active-descendant-id":
|
|
3191
|
-
"component-loading":
|
|
3192
|
-
"empty-state":
|
|
3193
|
-
disabled:
|
|
3194
|
-
"is-option-disabled":
|
|
3195
|
-
items:
|
|
3196
|
-
multiple:
|
|
3197
|
-
"static-categories":
|
|
3198
|
-
open:
|
|
3199
|
-
"selected-value":
|
|
3200
|
-
searching:
|
|
3275
|
+
ref: v,
|
|
3276
|
+
"aria-label": y.$attrs["aria-label"] ?? y.label ?? re.value,
|
|
3277
|
+
"active-descendant-id": qe.value,
|
|
3278
|
+
"component-loading": y.componentLoading,
|
|
3279
|
+
"empty-state": y.emptyState,
|
|
3280
|
+
disabled: y.disabled,
|
|
3281
|
+
"is-option-disabled": y.isOptionDisabled,
|
|
3282
|
+
items: f(be),
|
|
3283
|
+
multiple: y.multiple,
|
|
3284
|
+
"static-categories": ke.value,
|
|
3285
|
+
open: S.value,
|
|
3286
|
+
"selected-value": f(k),
|
|
3287
|
+
searching: T.value,
|
|
3201
3288
|
"target-element": b.value,
|
|
3202
|
-
loading:
|
|
3203
|
-
"has-more-items":
|
|
3204
|
-
"lazy-load-type":
|
|
3205
|
-
"virtual-scroll":
|
|
3206
|
-
},
|
|
3207
|
-
|
|
3208
|
-
name:
|
|
3209
|
-
fn:
|
|
3210
|
-
|
|
3289
|
+
loading: y.loading,
|
|
3290
|
+
"has-more-items": y.hasMoreItems,
|
|
3291
|
+
"lazy-load-type": y.lazyLoadType,
|
|
3292
|
+
"virtual-scroll": y.virtualScroll
|
|
3293
|
+
}, ve(Je)), Te({ _: 2 }, [
|
|
3294
|
+
ie(f(i), (Se, Re) => ({
|
|
3295
|
+
name: Re,
|
|
3296
|
+
fn: B((pt) => [
|
|
3297
|
+
Q(y.$slots, Re, me(we(pt)), void 0, !0)
|
|
3211
3298
|
])
|
|
3212
3299
|
}))
|
|
3213
3300
|
]), 1040, ["id", "aria-label", "active-descendant-id", "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"])
|
|
3214
3301
|
]),
|
|
3215
3302
|
_: 3
|
|
3216
|
-
}, 8, ["disabled", "to"])) :
|
|
3217
|
-
|
|
3303
|
+
}, 8, ["disabled", "to"])) : j("", !0),
|
|
3304
|
+
y.errorMessage ? (p(), M(f(nl), {
|
|
3218
3305
|
key: 2,
|
|
3219
|
-
id:
|
|
3220
|
-
"error-message":
|
|
3306
|
+
id: f(N),
|
|
3307
|
+
"error-message": y.errorMessage,
|
|
3221
3308
|
class: "b-dropdown__error-message"
|
|
3222
|
-
}, null, 8, ["id", "error-message"])) :
|
|
3223
|
-
|
|
3309
|
+
}, null, 8, ["id", "error-message"])) : j("", !0),
|
|
3310
|
+
y.description || f(n)("description") ? (p(), M(f(Me), {
|
|
3224
3311
|
key: 3,
|
|
3225
|
-
id:
|
|
3226
|
-
class:
|
|
3312
|
+
id: f(C),
|
|
3313
|
+
class: _e(["b-dropdown__description", V.value]),
|
|
3227
3314
|
el: "span"
|
|
3228
3315
|
}, {
|
|
3229
|
-
default:
|
|
3230
|
-
|
|
3231
|
-
|
|
3316
|
+
default: B(() => [
|
|
3317
|
+
Q(y.$slots, "description", {}, () => [
|
|
3318
|
+
oe(q(y.description), 1)
|
|
3232
3319
|
], !0)
|
|
3233
3320
|
]),
|
|
3234
3321
|
_: 3
|
|
3235
|
-
}, 8, ["id", "class"])) :
|
|
3322
|
+
}, 8, ["id", "class"])) : j("", !0)
|
|
3236
3323
|
], 16)), [
|
|
3237
|
-
[
|
|
3324
|
+
[f(Xt), L.value]
|
|
3238
3325
|
]);
|
|
3239
3326
|
}
|
|
3240
|
-
}),
|
|
3327
|
+
}), So = /* @__PURE__ */ ce(qa, [["__scopeId", "data-v-c93d3f55"]]);
|
|
3241
3328
|
export {
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3329
|
+
So as B,
|
|
3330
|
+
ka as D,
|
|
3331
|
+
yl as _,
|
|
3332
|
+
g as a,
|
|
3333
|
+
Ae as b,
|
|
3334
|
+
Ze as c,
|
|
3335
|
+
bt as d,
|
|
3336
|
+
Nt as e,
|
|
3337
|
+
Ka as f,
|
|
3338
|
+
Ft as g,
|
|
3339
|
+
va as h,
|
|
3340
|
+
zt as i,
|
|
3341
|
+
gt as j,
|
|
3342
|
+
ua as u
|
|
3256
3343
|
};
|
|
3257
|
-
//# sourceMappingURL=dropdown.
|
|
3344
|
+
//# sourceMappingURL=dropdown.BJ0cJ9Ea.js.map
|