@adyen/bento-vue3 1.89.2 → 1.90.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +2 -0
- package/dist/@types/index.d.ts +403 -298
- package/dist/accordion.js +1 -1
- 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/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/input-time.css +1 -0
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/accordion-item.CZIxxSsH.js +141 -0
- package/dist/chunks/{accordion-item.BX1KrLMl.js.map → accordion-item.CZIxxSsH.js.map} +1 -1
- package/dist/chunks/action-bar.Pe_hvtja.js +336 -0
- package/dist/chunks/{action-bar.DLMaIUWW.js.map → action-bar.Pe_hvtja.js.map} +1 -1
- package/dist/chunks/ai-tag.BSlc78DU.js +137 -0
- package/dist/chunks/{ai-tag.DK63ExDc.js.map → ai-tag.BSlc78DU.js.map} +1 -1
- package/dist/chunks/{alert.C_8-VNi_.js → alert.CFWN2E0b.js} +86 -79
- package/dist/chunks/{alert.C_8-VNi_.js.map → alert.CFWN2E0b.js.map} +1 -1
- package/dist/chunks/anchor-scroller.DSfXK6vK.js +214 -0
- package/dist/chunks/{anchor-scroller.NhjLDBZI.js.map → anchor-scroller.DSfXK6vK.js.map} +1 -1
- package/dist/chunks/{base-modal.C2-JyHC_.js → base-modal.BjjDrx0z.js} +132 -125
- package/dist/chunks/{base-modal.C2-JyHC_.js.map → base-modal.BjjDrx0z.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BQFAgAI2.js → button-actions-with-menu.DvkS16ur.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.BQFAgAI2.js.map → button-actions-with-menu.DvkS16ur.js.map} +1 -1
- package/dist/chunks/{button-actions.cMQWyZne.js → button-actions.Bh_PZ_fV.js} +202 -188
- package/dist/chunks/{button-actions.cMQWyZne.js.map → button-actions.Bh_PZ_fV.js.map} +1 -1
- package/dist/chunks/{calendar.DcCqkSNJ.js → calendar.CH-1Vgeb.js} +343 -329
- package/dist/chunks/{calendar.DcCqkSNJ.js.map → calendar.CH-1Vgeb.js.map} +1 -1
- package/dist/chunks/card.BzCGCCzH.js +223 -0
- package/dist/chunks/{card.CoxQ_L0w.js.map → card.BzCGCCzH.js.map} +1 -1
- package/dist/chunks/{checkbox-group.96n9Cc3W.js → checkbox-group.D_fN6Glu.js} +4 -4
- package/dist/chunks/{checkbox-group.96n9Cc3W.js.map → checkbox-group.D_fN6Glu.js.map} +1 -1
- package/dist/chunks/{checkbox.C6ATh8f5.js → checkbox.BlAhQl9N.js} +78 -71
- package/dist/chunks/{checkbox.C6ATh8f5.js.map → checkbox.BlAhQl9N.js.map} +1 -1
- package/dist/chunks/chip.DFldnqfz.js +72 -0
- package/dist/chunks/{chip.CdgpQyXN.js.map → chip.DFldnqfz.js.map} +1 -1
- package/dist/chunks/{code-snippet.DgAuuZF5.js → code-snippet.BePxxR3q.js} +113 -106
- package/dist/chunks/{code-snippet.DgAuuZF5.js.map → code-snippet.BePxxR3q.js.map} +1 -1
- package/dist/chunks/{controls-group.C7hOE1F4.js → controls-group.Cxk-0fCy.js} +2 -2
- package/dist/chunks/{controls-group.C7hOE1F4.js.map → controls-group.Cxk-0fCy.js.map} +1 -1
- package/dist/chunks/copy.CL893i9-.js +114 -0
- package/dist/chunks/{copy.C2kQ1PbI.js.map → copy.CL893i9-.js.map} +1 -1
- package/dist/chunks/{country.CaGc08Ps.js → country.15m_ATbO.js} +3 -3
- package/dist/chunks/{country.CaGc08Ps.js.map → country.15m_ATbO.js.map} +1 -1
- package/dist/chunks/country.types.6a7xxZIR.js +26 -0
- package/dist/chunks/{country.types.DjpMGz7a.js.map → country.types.6a7xxZIR.js.map} +1 -1
- package/dist/chunks/{dashboard-section.UafHRkMa.js → dashboard-section.CiNDItU2.js} +3 -3
- package/dist/chunks/{dashboard-section.UafHRkMa.js.map → dashboard-section.CiNDItU2.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CcDV2Aks.js → dashed-underline.CwdpUz76.js} +3 -3
- package/dist/chunks/{dashed-underline.CcDV2Aks.js.map → dashed-underline.CwdpUz76.js.map} +1 -1
- package/dist/chunks/{data-grid-template.CnC4TQvk.js → data-grid-template.nXn1dLCw.js} +4 -4
- package/dist/chunks/{data-grid-template.CnC4TQvk.js.map → data-grid-template.nXn1dLCw.js.map} +1 -1
- package/dist/chunks/data-grid.CXWaoqzi.js +4242 -0
- package/dist/chunks/data-grid.CXWaoqzi.js.map +1 -0
- package/dist/chunks/date-picker.DPjCROIP.js +238 -0
- package/dist/chunks/{date-picker.dlzZ_-5f.js.map → date-picker.DPjCROIP.js.map} +1 -1
- package/dist/chunks/date-range-picker.fyrfFd04.js +998 -0
- package/dist/chunks/date-range-picker.fyrfFd04.js.map +1 -0
- package/dist/chunks/dialog-page.Bh-7RAwX.js +163 -0
- package/dist/chunks/{dialog-page.COfKqjT-.js.map → dialog-page.Bh-7RAwX.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.bq9AlGzJ.js → dropdown-default-textbox.aYsTZDZ7.js} +69 -62
- package/dist/chunks/{dropdown-default-textbox.bq9AlGzJ.js.map → dropdown-default-textbox.aYsTZDZ7.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.Ysrac5GN.js → dropdown-tag.B7OA_Yv9.js} +5 -5
- package/dist/chunks/{dropdown-tag.Ysrac5GN.js.map → dropdown-tag.B7OA_Yv9.js.map} +1 -1
- package/dist/chunks/{dropdown.MhmX1P9o.js → dropdown.Do-mZiI6.js} +285 -271
- package/dist/chunks/{dropdown.MhmX1P9o.js.map → dropdown.Do-mZiI6.js.map} +1 -1
- package/dist/chunks/error-message.849uzpkq.js +157 -0
- package/dist/chunks/{error-message.DCgo8q20.js.map → error-message.849uzpkq.js.map} +1 -1
- package/dist/chunks/{file-uploader.Bfd1uUMe.js → file-uploader.BUvDU_cn.js} +604 -583
- package/dist/chunks/{file-uploader.Bfd1uUMe.js.map → file-uploader.BUvDU_cn.js.map} +1 -1
- package/dist/chunks/{filter-bar.CkAjLQol.js → filter-bar.fowl40RS.js} +998 -928
- package/dist/chunks/{filter-bar.CkAjLQol.js.map → filter-bar.fowl40RS.js.map} +1 -1
- package/dist/chunks/fixed-scroller.yVsaQzy5.js +157 -0
- package/dist/chunks/{fixed-scroller.DtkaGyMD.js.map → fixed-scroller.yVsaQzy5.js.map} +1 -1
- package/dist/chunks/{footer-actions.BcYSsoUg.js → footer-actions.uoNbOGAQ.js} +2 -2
- package/dist/chunks/{footer-actions.BcYSsoUg.js.map → footer-actions.uoNbOGAQ.js.map} +1 -1
- package/dist/chunks/form-layout-title.Cr3wdpK_.js +239 -0
- package/dist/chunks/{form-layout-title.DW5Kg1rh.js.map → form-layout-title.Cr3wdpK_.js.map} +1 -1
- package/dist/chunks/{header-meta.Bym9AlQm.js → header-meta.CmH6SnjE.js} +98 -84
- package/dist/chunks/{header-meta.Bym9AlQm.js.map → header-meta.CmH6SnjE.js.map} +1 -1
- package/dist/chunks/{header-with-views.Djba6iol.js → header-with-views.B2pPBcTf.js} +1091 -1070
- package/dist/chunks/{header-with-views.Djba6iol.js.map → header-with-views.B2pPBcTf.js.map} +1 -1
- package/dist/chunks/{header.o-7SyHtU.js → header.BVM8Usdi.js} +3 -3
- package/dist/chunks/{header.o-7SyHtU.js.map → header.BVM8Usdi.js.map} +1 -1
- package/dist/chunks/{info-icon.BUala_wq.js → info-icon.B3MDsjMu.js} +2 -2
- package/dist/chunks/{info-icon.BUala_wq.js.map → info-icon.B3MDsjMu.js.map} +1 -1
- package/dist/chunks/input-field-password.CHb2Ros_.js +353 -0
- package/dist/chunks/{input-field-password.DZytmp_p.js.map → input-field-password.CHb2Ros_.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.CxblrmaU.js → input-field-phone-number.DM2rmZkQ.js} +12 -5
- package/dist/chunks/{input-field-phone-number.CxblrmaU.js.map → input-field-phone-number.DM2rmZkQ.js.map} +1 -1
- package/dist/chunks/{input-field.CfU0ZKtL.js → input-field.DnYjM6yy.js} +118 -111
- package/dist/chunks/{input-field.CfU0ZKtL.js.map → input-field.DnYjM6yy.js.map} +1 -1
- package/dist/chunks/input-time.DeJ8lDio.js +103 -0
- package/dist/chunks/input-time.DeJ8lDio.js.map +1 -0
- package/dist/chunks/{inspector.B9k4tJWe.js → inspector.DMhKNW1K.js} +70 -63
- package/dist/chunks/{inspector.B9k4tJWe.js.map → inspector.DMhKNW1K.js.map} +1 -1
- package/dist/chunks/{list-item.DO5uULke.js → list-item.BHvXpqaS.js} +2 -2
- package/dist/chunks/{list-item.DO5uULke.js.map → list-item.BHvXpqaS.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.Cvplth7d.js → listbox-option-tag.CVxaZqbc.js} +2 -2
- package/dist/chunks/{listbox-option-tag.Cvplth7d.js.map → listbox-option-tag.CVxaZqbc.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.CuKVyTWb.js → modal-fullscreen.9CSTqFQc.js} +54 -47
- package/dist/chunks/{modal-fullscreen.CuKVyTWb.js.map → modal-fullscreen.9CSTqFQc.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js → modal.vue_vue_type_script_setup_true_lang.BAxTkaQM.js} +48 -41
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js.map → modal.vue_vue_type_script_setup_true_lang.BAxTkaQM.js.map} +1 -1
- package/dist/chunks/pagination.DL-h8OLF.js +413 -0
- package/dist/chunks/{pagination.dpVc6Yt0.js.map → pagination.DL-h8OLF.js.map} +1 -1
- package/dist/chunks/{promo-banner.BzveHNOI.js → promo-banner.-H4r_cwj.js} +39 -32
- package/dist/chunks/{promo-banner.BzveHNOI.js.map → promo-banner.-H4r_cwj.js.map} +1 -1
- package/dist/chunks/{radio-group.Cuiq4mxy.js → radio-group.DzhQgXv9.js} +4 -4
- package/dist/chunks/{radio-group.Cuiq4mxy.js.map → radio-group.DzhQgXv9.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.DLMiT4f5.js → rich-text-editor.Ij2t4pyI.js} +418 -411
- package/dist/chunks/{rich-text-editor.DLMiT4f5.js.map → rich-text-editor.Ij2t4pyI.js.map} +1 -1
- package/dist/chunks/search-bar.DfNwnjes.js +114 -0
- package/dist/chunks/{search-bar.CsFyP0_I.js.map → search-bar.DfNwnjes.js.map} +1 -1
- package/dist/chunks/secondary-nav.CvipTDRh.js +285 -0
- package/dist/chunks/secondary-nav.CvipTDRh.js.map +1 -0
- package/dist/chunks/{segmented-control.KeQ5kuR1.js → segmented-control.CQWOO1-J.js} +2 -2
- package/dist/chunks/{segmented-control.KeQ5kuR1.js.map → segmented-control.CQWOO1-J.js.map} +1 -1
- package/dist/chunks/{selection-card-group.XM11Kk-4.js → selection-card-group.CcOWQAUC.js} +11 -11
- package/dist/chunks/{selection-card-group.XM11Kk-4.js.map → selection-card-group.CcOWQAUC.js.map} +1 -1
- package/dist/chunks/{sidepanel.b2QZ1Jsx.js → sidepanel.BObSv8UU.js} +56 -49
- package/dist/chunks/{sidepanel.b2QZ1Jsx.js.map → sidepanel.BObSv8UU.js.map} +1 -1
- package/dist/chunks/step.AsX2jAeL.js +268 -0
- package/dist/chunks/{step.BlwoLfdw.js.map → step.AsX2jAeL.js.map} +1 -1
- package/dist/chunks/structured-list-item.CgJR_ufh.js +112 -0
- package/dist/chunks/{structured-list-item.e-8kRleh.js.map → structured-list-item.CgJR_ufh.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.CcvOC03H.js → summary-grid.types.DKPhtHw3.js} +5 -5
- package/dist/chunks/{summary-grid.types.CcvOC03H.js.map → summary-grid.types.DKPhtHw3.js.map} +1 -1
- package/dist/chunks/{tab.mR5uUSdp.js → tab.9nyNZiGw.js} +2 -2
- package/dist/chunks/{tab.mR5uUSdp.js.map → tab.9nyNZiGw.js.map} +1 -1
- package/dist/chunks/{tag.DujMVFh-.js → tag.YN2r-Pp3.js} +2 -2
- package/dist/chunks/{tag.DujMVFh-.js.map → tag.YN2r-Pp3.js.map} +1 -1
- package/dist/chunks/textarea.C-sBemuo.js +256 -0
- package/dist/chunks/{textarea.CHV6Z8nt.js.map → textarea.C-sBemuo.js.map} +1 -1
- package/dist/chunks/timeline-item.CHk8wXeT.js +433 -0
- package/dist/chunks/{timeline-item.CaGcRZbt.js.map → timeline-item.CHk8wXeT.js.map} +1 -1
- package/dist/chunks/{toast.C2oehk9P.js → toast.De4MTkiH.js} +64 -57
- package/dist/chunks/{toast.C2oehk9P.js.map → toast.De4MTkiH.js.map} +1 -1
- package/dist/chunks/{tooltip.CbADa_4p.js → tooltip.DHfG2aRt.js} +40 -38
- package/dist/chunks/tooltip.DHfG2aRt.js.map +1 -0
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js → tutorial.vue_vue_type_script_setup_true_lang.CUDeriBU.js} +120 -113
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js.map → tutorial.vue_vue_type_script_setup_true_lang.CUDeriBU.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.ClEJRFAd.js → use-cached-selected-values.DIbfa5F1.js} +381 -360
- package/dist/chunks/{use-cached-selected-values.ClEJRFAd.js.map → use-cached-selected-values.DIbfa5F1.js.map} +1 -1
- package/dist/chunks/{use-country-items.D_3LBe2I.js → use-country-items.Dp7X1r2e.js} +3 -3
- package/dist/chunks/{use-country-items.D_3LBe2I.js.map → use-country-items.Dp7X1r2e.js.map} +1 -1
- package/dist/chunks/{use-country-phon-code.DoqTGkNr.js → use-country-phon-code.BzcawGpE.js} +107 -104
- package/dist/chunks/{use-country-phon-code.DoqTGkNr.js.map → use-country-phon-code.BzcawGpE.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.CDRzd-hW.js → use-date-input-formatter.BiIraXZZ.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.CDRzd-hW.js.map → use-date-input-formatter.BiIraXZZ.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +3 -3
- 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/draggable-handle.js +51 -44
- package/dist/draggable-handle.js.map +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.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 +205 -203
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/input-time.js +5 -0
- package/dist/input-time.js.map +1 -0
- package/dist/inspector.js +1 -1
- package/dist/internal.js +12 -12
- 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/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/stepper.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/toast.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +4 -4
- package/dist/chunks/accordion-item.BX1KrLMl.js +0 -134
- package/dist/chunks/action-bar.DLMaIUWW.js +0 -329
- package/dist/chunks/ai-tag.DK63ExDc.js +0 -130
- package/dist/chunks/anchor-scroller.NhjLDBZI.js +0 -207
- package/dist/chunks/card.CoxQ_L0w.js +0 -216
- package/dist/chunks/chip.CdgpQyXN.js +0 -65
- package/dist/chunks/copy.C2kQ1PbI.js +0 -107
- package/dist/chunks/country.types.DjpMGz7a.js +0 -19
- package/dist/chunks/data-grid.BSIXLRm7.js +0 -4014
- package/dist/chunks/data-grid.BSIXLRm7.js.map +0 -1
- package/dist/chunks/date-picker.dlzZ_-5f.js +0 -231
- package/dist/chunks/date-range-picker.DC6CK0As.js +0 -995
- package/dist/chunks/date-range-picker.DC6CK0As.js.map +0 -1
- package/dist/chunks/dialog-page.COfKqjT-.js +0 -156
- package/dist/chunks/error-message.DCgo8q20.js +0 -143
- package/dist/chunks/fixed-scroller.DtkaGyMD.js +0 -150
- package/dist/chunks/form-layout-title.DW5Kg1rh.js +0 -230
- package/dist/chunks/input-field-password.DZytmp_p.js +0 -346
- package/dist/chunks/pagination.dpVc6Yt0.js +0 -401
- package/dist/chunks/search-bar.CsFyP0_I.js +0 -107
- package/dist/chunks/secondary-nav.CLBdq98c.js +0 -138
- package/dist/chunks/secondary-nav.CLBdq98c.js.map +0 -1
- package/dist/chunks/step.BlwoLfdw.js +0 -259
- package/dist/chunks/structured-list-item.e-8kRleh.js +0 -105
- package/dist/chunks/textarea.CHV6Z8nt.js +0 -247
- package/dist/chunks/timeline-item.CaGcRZbt.js +0 -419
- package/dist/chunks/tooltip.CbADa_4p.js.map +0 -1
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
import { computed as b, ref as
|
|
1
|
+
import { computed as b, ref as I, onMounted as ut, onUnmounted as bt, watch as fe, defineComponent as J, resolveComponent as _, openBlock as d, createElementBlock as y, createVNode as N, withCtx as L, createTextVNode as K, toDisplayString as V, createElementVNode as G, renderSlot as W, mergeProps as w, withKeys as be, createCommentVNode as q, createBlock as A, withModifiers as ae, normalizeProps as oe, guardReactiveProps as me, withDirectives as ne, vShow as ze, nextTick as Ye, toRef as pe, resolveDirective as Ue, toHandlers as ee, Fragment as te, renderList as j, createSlots as ge, normalizeClass as ve, unref as B, useSlots as mt, useAttrs as pt } from "vue";
|
|
2
2
|
import { B as F, a as he } from "./keyboard-navigation.DWmhelVv.js";
|
|
3
|
-
import { B as
|
|
4
|
-
import { B as
|
|
5
|
-
import { B as
|
|
6
|
-
import { u as
|
|
7
|
-
import { d as
|
|
3
|
+
import { B as ie } from "./typography.B3J6_tYk.js";
|
|
4
|
+
import { B as gt } from "./loading-indicator.BPol9I84.js";
|
|
5
|
+
import { B as vt } from "./empty-state.DT4sFyjB.js";
|
|
6
|
+
import { u as Ie } from "./index.B875RXHM.js";
|
|
7
|
+
import { d as ft } from "./debounce.DUTu11PS.js";
|
|
8
8
|
import { o as yt } from "./resize.Bqks3WUm.js";
|
|
9
9
|
import { C as Se, N as St } from "./minus-small.CnYLTuSv.js";
|
|
10
10
|
import { C as ht } from "./checkmark-small.CRuZauJc.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { _ as H } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
13
|
-
import { B as Ct } from "./chip.
|
|
13
|
+
import { B as Ct } from "./chip.DFldnqfz.js";
|
|
14
14
|
import { C as Et } from "./chevron-down.XeE-LBV_.js";
|
|
15
15
|
import { C as Ot } from "./chevron-up.Cmgl2a3x.js";
|
|
16
|
-
import { g as
|
|
17
|
-
import { a as Tt, b as
|
|
16
|
+
import { g as Me } from "./generate-uid.DBWe4g6T.js";
|
|
17
|
+
import { a as Tt, b as Pe } from "./button-actions.Bh_PZ_fV.js";
|
|
18
18
|
import "../assets/use-cached-selected-values.css";
|
|
19
19
|
const Fe = (e, t, o, s) => {
|
|
20
20
|
const r = b(
|
|
21
21
|
() => !!e.value?.length && e.value?.length === t.value.length
|
|
22
|
-
),
|
|
22
|
+
), i = b(() => e.value == null || e.value.length === 0 ? !1 : e.value?.length !== t.value.length);
|
|
23
23
|
return {
|
|
24
24
|
isAllSelected: r,
|
|
25
|
-
isIndeterminate:
|
|
26
|
-
toggleSelectAll: (
|
|
27
|
-
|
|
25
|
+
isIndeterminate: i,
|
|
26
|
+
toggleSelectAll: (f) => {
|
|
27
|
+
f ? o() : s();
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
function Lt(e, { disabled: t, itemHeight: o, overscan: s = 5, prefixHeight: r }) {
|
|
32
|
-
const
|
|
32
|
+
const i = I(null), a = I([]), f = I(0), S = I(0), n = I(0);
|
|
33
33
|
let u;
|
|
34
34
|
const l = b(() => {
|
|
35
|
-
const
|
|
35
|
+
const k = typeof o == "number" ? e.value.length * o : e.value.reduce((T, O, D) => T + o(D), 0), $ = typeof o == "number" ? f.value * o : e.value.slice(0, f.value).reduce((T, O, D) => T + o(D), 0);
|
|
36
36
|
return {
|
|
37
37
|
style: {
|
|
38
38
|
marginTop: `${$}px`,
|
|
39
|
-
height: `${
|
|
39
|
+
height: `${k - $}px`
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
}), m = () => {
|
|
43
|
-
const
|
|
43
|
+
const k = r?.value ?? 0, $ = Math.max(i.value.scrollTop - k, 0);
|
|
44
44
|
if (typeof o == "number")
|
|
45
45
|
return Math.floor($ / o);
|
|
46
46
|
let T = 0, O = 0;
|
|
47
47
|
for (let D = 0; D < e.value.length; D += 1) {
|
|
48
|
-
const
|
|
49
|
-
if (T +=
|
|
48
|
+
const z = o(D);
|
|
49
|
+
if (T += z, T >= $) {
|
|
50
50
|
O = D;
|
|
51
51
|
break;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
return O;
|
|
55
55
|
}, C = () => {
|
|
56
|
-
if (
|
|
57
|
-
return Math.ceil(
|
|
58
|
-
const
|
|
56
|
+
if (n.value = i.value.clientHeight, typeof o == "number")
|
|
57
|
+
return Math.ceil(n.value / o);
|
|
58
|
+
const k = f.value ?? 0;
|
|
59
59
|
let $ = 0, T = 0;
|
|
60
|
-
for (let O =
|
|
60
|
+
for (let O = k; O < e.value.length; O += 1) {
|
|
61
61
|
const D = o(O);
|
|
62
|
-
if ($ += D, T = O, $ >
|
|
62
|
+
if ($ += D, T = O, $ > n.value)
|
|
63
63
|
break;
|
|
64
64
|
}
|
|
65
|
-
return T -
|
|
65
|
+
return T - k;
|
|
66
66
|
}, h = () => {
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
69
|
-
|
|
67
|
+
if (i.value) {
|
|
68
|
+
const k = C();
|
|
69
|
+
f.value = m(), S.value = Math.min(f.value + k + s, e.value.length), a.value = e.value.slice(f.value, S.value);
|
|
70
70
|
}
|
|
71
71
|
}, R = () => {
|
|
72
72
|
h();
|
|
73
73
|
};
|
|
74
74
|
t || (ut(() => {
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
i.value && (n.value = i.value.clientHeight, u = yt(i.value, ({ clientHeight: k }) => {
|
|
76
|
+
n.value = k, h();
|
|
77
77
|
}), h());
|
|
78
78
|
}), bt(() => {
|
|
79
79
|
u?.disconnect();
|
|
80
|
-
}),
|
|
80
|
+
}), fe(
|
|
81
81
|
() => e.value,
|
|
82
82
|
() => {
|
|
83
83
|
h();
|
|
84
84
|
}
|
|
85
85
|
));
|
|
86
86
|
const x = {
|
|
87
|
-
ref:
|
|
87
|
+
ref: i,
|
|
88
88
|
style: { overflowY: "auto" }
|
|
89
89
|
};
|
|
90
90
|
return t ? {
|
|
91
|
-
containerRef:
|
|
91
|
+
containerRef: i,
|
|
92
92
|
containerProps: x,
|
|
93
93
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
94
94
|
onScroll: () => {
|
|
95
95
|
},
|
|
96
96
|
list: e
|
|
97
97
|
} : {
|
|
98
|
-
containerRef:
|
|
98
|
+
containerRef: i,
|
|
99
99
|
containerProps: x,
|
|
100
100
|
onScroll: R,
|
|
101
|
-
list:
|
|
101
|
+
list: a,
|
|
102
102
|
wrapperProps: l
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
var p = /* @__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))(p || {}), le = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(le || {});
|
|
106
|
-
const
|
|
106
|
+
const It = J({
|
|
107
107
|
name: "bento-listbox-static-category",
|
|
108
108
|
components: {
|
|
109
|
-
BentoTypography:
|
|
109
|
+
BentoTypography: ie
|
|
110
110
|
},
|
|
111
111
|
props: {
|
|
112
112
|
/**
|
|
@@ -117,15 +117,15 @@ const _t = X({
|
|
|
117
117
|
required: !0
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
}),
|
|
121
|
-
function
|
|
122
|
-
const
|
|
120
|
+
}), _t = ["aria-label"];
|
|
121
|
+
function At(e, t, o, s, r, i) {
|
|
122
|
+
const a = _("bento-typography");
|
|
123
123
|
return d(), y("div", {
|
|
124
124
|
class: "b-listbox-single-select-category",
|
|
125
125
|
role: "group",
|
|
126
126
|
"aria-label": e.categoryLabel
|
|
127
127
|
}, [
|
|
128
|
-
|
|
128
|
+
N(a, {
|
|
129
129
|
variant: "caption",
|
|
130
130
|
el: "span",
|
|
131
131
|
class: "b-listbox-single-select-category__label-text",
|
|
@@ -139,9 +139,9 @@ function kt(e, t, o, s, r, n) {
|
|
|
139
139
|
G("div", null, [
|
|
140
140
|
W(e.$slots, "default", {}, void 0, !0)
|
|
141
141
|
])
|
|
142
|
-
], 8,
|
|
142
|
+
], 8, _t);
|
|
143
143
|
}
|
|
144
|
-
const
|
|
144
|
+
const kt = /* @__PURE__ */ H(It, [["render", At], ["__scopeId", "data-v-27c4e09a"]]), $t = J({
|
|
145
145
|
name: "bento-listbox-option",
|
|
146
146
|
props: {
|
|
147
147
|
/**
|
|
@@ -166,38 +166,38 @@ const At = /* @__PURE__ */ H(_t, [["render", kt], ["__scopeId", "data-v-27c4e09a
|
|
|
166
166
|
// Values
|
|
167
167
|
conditionalClasses: o,
|
|
168
168
|
// Events
|
|
169
|
-
onClick: (
|
|
170
|
-
t(p.CLICK,
|
|
169
|
+
onClick: (i) => {
|
|
170
|
+
t(p.CLICK, i);
|
|
171
171
|
},
|
|
172
|
-
onOptionSelected: (
|
|
173
|
-
t(
|
|
172
|
+
onOptionSelected: (i, a) => {
|
|
173
|
+
t(i, a);
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
177
|
});
|
|
178
|
-
function Dt(e, t, o, s, r,
|
|
178
|
+
function Dt(e, t, o, s, r, i) {
|
|
179
179
|
return d(), y("div", w({
|
|
180
180
|
class: ["b-listbox-option", e.conditionalClasses],
|
|
181
181
|
role: "option"
|
|
182
182
|
}, e.$attrs, {
|
|
183
|
-
onClick: t[0] || (t[0] = (...
|
|
183
|
+
onClick: t[0] || (t[0] = (...a) => e.onClick && e.onClick(...a)),
|
|
184
184
|
onKeydown: [
|
|
185
|
-
t[1] || (t[1] = be((
|
|
186
|
-
t[2] || (t[2] = be((
|
|
187
|
-
t[3] || (t[3] = be((
|
|
185
|
+
t[1] || (t[1] = be((a) => e.onOptionSelected(e.BentoListboxEvent.ENTER, a), ["enter"])),
|
|
186
|
+
t[2] || (t[2] = be((a) => e.onOptionSelected(e.BentoListboxEvent.SPACE, a), ["space"])),
|
|
187
|
+
t[3] || (t[3] = be((a) => e.onOptionSelected(e.BentoListboxEvent.TAB, a), ["tab"]))
|
|
188
188
|
]
|
|
189
189
|
}), [
|
|
190
190
|
W(e.$slots, "default", {}, void 0, !0)
|
|
191
191
|
], 16);
|
|
192
192
|
}
|
|
193
193
|
const Ce = /* @__PURE__ */ H($t, [["render", Dt], ["__scopeId", "data-v-1495b1db"]]);
|
|
194
|
-
let
|
|
194
|
+
let Ne = 0;
|
|
195
195
|
const Bt = {
|
|
196
196
|
beforeCreate() {
|
|
197
|
-
this.uuid =
|
|
197
|
+
this.uuid = Ne.toString(), Ne += 1;
|
|
198
198
|
}
|
|
199
199
|
}, Rt = { key: 0 };
|
|
200
|
-
function
|
|
200
|
+
function Mt(e, t, o, s, r, i) {
|
|
201
201
|
return d(), y("svg", w({ role: "img" }, e.$attrs, {
|
|
202
202
|
class: "ui-assets-icons-16",
|
|
203
203
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -212,12 +212,12 @@ function Pt(e, t, o, s, r, n) {
|
|
|
212
212
|
}, null, -1))
|
|
213
213
|
], 16);
|
|
214
214
|
}
|
|
215
|
-
const
|
|
215
|
+
const Pt = /* @__PURE__ */ H(Bt, [["render", Mt]]), Nt = J({
|
|
216
216
|
name: "bento-listbox-single-select-option",
|
|
217
217
|
components: {
|
|
218
218
|
BentoListboxOption: Ce,
|
|
219
|
-
BentoTypography:
|
|
220
|
-
CheckmarkIcon:
|
|
219
|
+
BentoTypography: ie,
|
|
220
|
+
CheckmarkIcon: Pt
|
|
221
221
|
},
|
|
222
222
|
props: {
|
|
223
223
|
/**
|
|
@@ -239,14 +239,14 @@ const Nt = /* @__PURE__ */ H(Bt, [["render", Pt]]), Mt = X({
|
|
|
239
239
|
},
|
|
240
240
|
emits: [p.ENTER, p.SELECT, p.SPACE, p.TAB],
|
|
241
241
|
setup(e, { emit: t }) {
|
|
242
|
-
const o = (
|
|
243
|
-
e.disabled || t(
|
|
244
|
-
}, s = b(() => e.disabled ? !0 : null), r = b(() => e.selected ? !0 : null),
|
|
242
|
+
const o = (a) => {
|
|
243
|
+
e.disabled || t(a, e.option);
|
|
244
|
+
}, s = b(() => e.disabled ? !0 : null), r = b(() => e.selected ? !0 : null), i = b(() => e.disabled ? -1 : 0);
|
|
245
245
|
return {
|
|
246
246
|
// Values
|
|
247
247
|
ariaDisabled: s,
|
|
248
248
|
ariaSelected: r,
|
|
249
|
-
tabIndex:
|
|
249
|
+
tabIndex: i,
|
|
250
250
|
// Enums
|
|
251
251
|
BentoListboxEvent: p,
|
|
252
252
|
// Events
|
|
@@ -254,30 +254,30 @@ const Nt = /* @__PURE__ */ H(Bt, [["render", Pt]]), Mt = X({
|
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
256
|
}), wt = { class: "b-listbox-single-select-option__text" }, Gt = { class: "b-listbox-single-select-option__check-icon" };
|
|
257
|
-
function xt(e, t, o, s, r,
|
|
258
|
-
const
|
|
259
|
-
return d(),
|
|
257
|
+
function xt(e, t, o, s, r, i) {
|
|
258
|
+
const a = _("bento-typography"), f = _("checkmark-icon"), S = _("bento-listbox-option");
|
|
259
|
+
return d(), A(S, {
|
|
260
260
|
class: "b-listbox-single-select-option",
|
|
261
261
|
disabled: e.disabled,
|
|
262
262
|
selected: e.selected,
|
|
263
263
|
"aria-selected": e.ariaSelected,
|
|
264
264
|
"aria-disabled": e.ariaDisabled,
|
|
265
265
|
tabindex: e.tabIndex,
|
|
266
|
-
onClick: t[0] || (t[0] = (
|
|
267
|
-
onEnterPressed: t[1] || (t[1] = (
|
|
268
|
-
onSpacePressed: t[2] || (t[2] =
|
|
269
|
-
onTabPressed: t[3] || (t[3] = (
|
|
266
|
+
onClick: t[0] || (t[0] = (n) => e.onOptionSelected(e.BentoListboxEvent.SELECT)),
|
|
267
|
+
onEnterPressed: t[1] || (t[1] = (n) => e.onOptionSelected(e.BentoListboxEvent.ENTER)),
|
|
268
|
+
onSpacePressed: t[2] || (t[2] = ae((n) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
|
|
269
|
+
onTabPressed: t[3] || (t[3] = (n) => e.onOptionSelected(e.BentoListboxEvent.TAB))
|
|
270
270
|
}, {
|
|
271
271
|
default: L(() => [
|
|
272
272
|
W(e.$slots, "default", oe(me(e.option)), () => [
|
|
273
273
|
G("span", wt, [
|
|
274
|
-
|
|
274
|
+
N(a, { el: "span" }, {
|
|
275
275
|
default: L(() => [
|
|
276
276
|
K(V(e.option.label), 1)
|
|
277
277
|
]),
|
|
278
278
|
_: 1
|
|
279
279
|
}),
|
|
280
|
-
e.option.description ? (d(),
|
|
280
|
+
e.option.description ? (d(), A(a, {
|
|
281
281
|
key: 0,
|
|
282
282
|
class: "b-listbox-single-select-option__description",
|
|
283
283
|
el: "span"
|
|
@@ -290,16 +290,16 @@ function xt(e, t, o, s, r, n) {
|
|
|
290
290
|
])
|
|
291
291
|
], !0),
|
|
292
292
|
G("span", Gt, [
|
|
293
|
-
|
|
294
|
-
[
|
|
293
|
+
ne(N(f, { "svg-title": "selected" }, null, 512), [
|
|
294
|
+
[ze, e.selected]
|
|
295
295
|
])
|
|
296
296
|
])
|
|
297
297
|
]),
|
|
298
298
|
_: 3
|
|
299
299
|
}, 8, ["disabled", "selected", "aria-selected", "aria-disabled", "tabindex"]);
|
|
300
300
|
}
|
|
301
|
-
const Vt = /* @__PURE__ */ H(
|
|
302
|
-
const o = b(() => e.value.length - 1), s =
|
|
301
|
+
const Vt = /* @__PURE__ */ H(Nt, [["render", xt], ["__scopeId", "data-v-4f41af07"]]), Ke = ({ items: e }, t) => {
|
|
302
|
+
const o = b(() => e.value.length - 1), s = I(0), r = (m) => {
|
|
303
303
|
switch (m) {
|
|
304
304
|
case "increase":
|
|
305
305
|
s.value += 1;
|
|
@@ -308,18 +308,18 @@ const Vt = /* @__PURE__ */ H(Mt, [["render", xt], ["__scopeId", "data-v-4f41af07
|
|
|
308
308
|
s.value -= 1;
|
|
309
309
|
break;
|
|
310
310
|
}
|
|
311
|
-
},
|
|
311
|
+
}, i = ({ edgeCaseItem: m }, C) => {
|
|
312
312
|
s.value !== m && (r(C), t(s.value));
|
|
313
|
-
},
|
|
314
|
-
l(m),
|
|
313
|
+
}, a = (m) => {
|
|
314
|
+
l(m), i(
|
|
315
315
|
{
|
|
316
316
|
edgeCaseItem: o.value
|
|
317
317
|
},
|
|
318
318
|
"increase"
|
|
319
319
|
/* INCREASE */
|
|
320
320
|
);
|
|
321
|
-
},
|
|
322
|
-
l(m),
|
|
321
|
+
}, f = (m) => {
|
|
322
|
+
l(m), i(
|
|
323
323
|
{
|
|
324
324
|
edgeCaseItem: 0
|
|
325
325
|
},
|
|
@@ -328,7 +328,7 @@ const Vt = /* @__PURE__ */ H(Mt, [["render", xt], ["__scopeId", "data-v-4f41af07
|
|
|
328
328
|
);
|
|
329
329
|
}, S = () => {
|
|
330
330
|
s.value = 0, t(s.value);
|
|
331
|
-
},
|
|
331
|
+
}, n = () => {
|
|
332
332
|
s.value = o.value, t(s.value);
|
|
333
333
|
}, u = (m) => {
|
|
334
334
|
s.value = m;
|
|
@@ -337,36 +337,36 @@ const Vt = /* @__PURE__ */ H(Mt, [["render", xt], ["__scopeId", "data-v-4f41af07
|
|
|
337
337
|
};
|
|
338
338
|
return {
|
|
339
339
|
moveToFirstElement: S,
|
|
340
|
-
moveToLastElement:
|
|
341
|
-
moveToNextElement:
|
|
342
|
-
moveToPreviousElement:
|
|
340
|
+
moveToLastElement: n,
|
|
341
|
+
moveToNextElement: a,
|
|
342
|
+
moveToPreviousElement: f,
|
|
343
343
|
setListboxFocusedIndex: u,
|
|
344
344
|
preventDefault: l,
|
|
345
345
|
focusedIndex: s
|
|
346
346
|
};
|
|
347
|
-
}, We = (e, t, o =
|
|
348
|
-
const r =
|
|
347
|
+
}, We = (e, t, o = I("option"), s = !0) => {
|
|
348
|
+
const r = I([]), i = async () => {
|
|
349
349
|
if (!e.value || e.value.nodeType === Node.COMMENT_NODE)
|
|
350
350
|
return;
|
|
351
|
-
const
|
|
352
|
-
r.value = s ?
|
|
351
|
+
const a = Array.from(e.value.querySelectorAll(`[role="${o.value}"]`));
|
|
352
|
+
r.value = s ? a.filter((f) => f.checkVisibility()) : a;
|
|
353
353
|
};
|
|
354
|
-
return
|
|
354
|
+
return fe(
|
|
355
355
|
t,
|
|
356
356
|
() => {
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
Ye(() => {
|
|
358
|
+
i();
|
|
359
359
|
});
|
|
360
360
|
},
|
|
361
361
|
{ immediate: !0 }
|
|
362
362
|
), {
|
|
363
363
|
visibleDomOptions: r,
|
|
364
|
-
updateVisibleDomOptions:
|
|
364
|
+
updateVisibleDomOptions: i
|
|
365
365
|
};
|
|
366
|
-
},
|
|
366
|
+
}, zt = J({
|
|
367
367
|
name: "bento-listbox-single-select",
|
|
368
368
|
components: {
|
|
369
|
-
BentoListboxSingleSelectCategory:
|
|
369
|
+
BentoListboxSingleSelectCategory: kt,
|
|
370
370
|
BentoListboxSingleSelectOption: Vt
|
|
371
371
|
},
|
|
372
372
|
directives: { BentoKeyboardNavigationDirective: he },
|
|
@@ -412,23 +412,23 @@ const Vt = /* @__PURE__ */ H(Mt, [["render", xt], ["__scopeId", "data-v-4f41af07
|
|
|
412
412
|
},
|
|
413
413
|
emits: [p.SELECT, p.ENTER, p.SPACE, p.TAB],
|
|
414
414
|
setup(e, { emit: t, expose: o, slots: s, attrs: r }) {
|
|
415
|
-
const
|
|
415
|
+
const i = I(null), a = I([]), f = b(() => !!e.selectedValue?.length && e.selectedValue.at(0)), S = b(
|
|
416
416
|
() => ({
|
|
417
417
|
"aria-label": r["aria-label"]?.toString(),
|
|
418
418
|
"aria-busy": r["aria-busy"]?.toString(),
|
|
419
419
|
"aria-atomic": r["aria-atomic"]?.toString(),
|
|
420
420
|
"aria-live": r["aria-live"]?.toString()
|
|
421
421
|
})
|
|
422
|
-
),
|
|
422
|
+
), n = b(() => !!e.items.some(({ items: O }) => !!O)), u = (O) => (D) => {
|
|
423
423
|
t(O, [D]);
|
|
424
|
-
}, { visibleDomOptions: l } = We(
|
|
424
|
+
}, { visibleDomOptions: l } = We(i, pe(e, "items"), I("option"), !1), m = (O) => {
|
|
425
425
|
l.value[O]?.focus();
|
|
426
426
|
}, {
|
|
427
427
|
moveToNextElement: C,
|
|
428
428
|
moveToPreviousElement: h,
|
|
429
429
|
moveToFirstElement: R,
|
|
430
430
|
moveToLastElement: x,
|
|
431
|
-
setListboxFocusedIndex:
|
|
431
|
+
setListboxFocusedIndex: k
|
|
432
432
|
} = Ke(
|
|
433
433
|
{
|
|
434
434
|
items: l
|
|
@@ -450,23 +450,23 @@ const Vt = /* @__PURE__ */ H(Mt, [["render", xt], ["__scopeId", "data-v-4f41af07
|
|
|
450
450
|
* Reference for a single listbox item.
|
|
451
451
|
* Required for keyboard navigation in dropdown as $children is removed in vue@3
|
|
452
452
|
*/
|
|
453
|
-
listboxItemRef:
|
|
453
|
+
listboxItemRef: a,
|
|
454
454
|
/**
|
|
455
455
|
* Method to set the index of the item to be focused on
|
|
456
456
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
457
457
|
*/
|
|
458
|
-
setListboxFocusedIndex:
|
|
458
|
+
setListboxFocusedIndex: k
|
|
459
459
|
}), {
|
|
460
460
|
// Enums
|
|
461
461
|
BentoListboxEvent: p,
|
|
462
462
|
// Values
|
|
463
|
-
listboxRef:
|
|
464
|
-
listboxItemRef:
|
|
465
|
-
selectedItem:
|
|
463
|
+
listboxRef: i,
|
|
464
|
+
listboxItemRef: a,
|
|
465
|
+
selectedItem: f,
|
|
466
466
|
slots: s,
|
|
467
467
|
ariaAttributes: S,
|
|
468
468
|
// Computed
|
|
469
|
-
hasCategories:
|
|
469
|
+
hasCategories: n,
|
|
470
470
|
// Methods
|
|
471
471
|
onOptionSelected: u,
|
|
472
472
|
// Keyboard navigation
|
|
@@ -475,15 +475,15 @@ const Vt = /* @__PURE__ */ H(Mt, [["render", xt], ["__scopeId", "data-v-4f41af07
|
|
|
475
475
|
};
|
|
476
476
|
}
|
|
477
477
|
});
|
|
478
|
-
function
|
|
479
|
-
const
|
|
480
|
-
return
|
|
481
|
-
e.hasCategories && e.staticCategories ? (d(!0), y(te, { key: 0 }, j(e.items, (
|
|
482
|
-
key:
|
|
483
|
-
"category-label":
|
|
478
|
+
function Yt(e, t, o, s, r, i) {
|
|
479
|
+
const a = _("bento-listbox-single-select-option"), f = _("bento-listbox-single-select-category"), S = Ue("bento-keyboard-navigation-directive");
|
|
480
|
+
return ne((d(), y("div", w({ ref: "listboxRef" }, e.ariaAttributes, { role: "listbox" }, ee(e.listboxListeners, !0)), [
|
|
481
|
+
e.hasCategories && e.staticCategories ? (d(!0), y(te, { key: 0 }, j(e.items, (n) => (d(), A(f, {
|
|
482
|
+
key: n.value,
|
|
483
|
+
"category-label": n.label
|
|
484
484
|
}, {
|
|
485
485
|
default: L(() => [
|
|
486
|
-
(d(!0), y(te, null, j(
|
|
486
|
+
(d(!0), y(te, null, j(n.items, (u) => (d(), A(a, w({
|
|
487
487
|
key: u.value,
|
|
488
488
|
ref_for: !0,
|
|
489
489
|
ref: "listboxItemRef",
|
|
@@ -491,7 +491,7 @@ function Ut(e, t, o, s, r, n) {
|
|
|
491
491
|
option: u,
|
|
492
492
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(u) : null,
|
|
493
493
|
selected: u.value === e.selectedItem.value
|
|
494
|
-
}, ee(e.listboxOptionListeners)),
|
|
494
|
+
}, ee(e.listboxOptionListeners)), ge({ _: 2 }, [
|
|
495
495
|
j(e.slots, (l, m) => ({
|
|
496
496
|
name: m,
|
|
497
497
|
fn: L((C) => [
|
|
@@ -501,15 +501,15 @@ function Ut(e, t, o, s, r, n) {
|
|
|
501
501
|
]), 1040, ["option", "disabled", "selected"]))), 128))
|
|
502
502
|
]),
|
|
503
503
|
_: 2
|
|
504
|
-
}, 1032, ["category-label"]))), 128)) : (d(!0), y(te, { key: 1 }, j(e.items, (
|
|
505
|
-
key:
|
|
504
|
+
}, 1032, ["category-label"]))), 128)) : (d(!0), y(te, { key: 1 }, j(e.items, (n) => (d(), A(a, w({
|
|
505
|
+
key: n.value,
|
|
506
506
|
ref_for: !0,
|
|
507
507
|
ref: "listboxItemRef",
|
|
508
508
|
role: "option",
|
|
509
|
-
option:
|
|
510
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
511
|
-
selected:
|
|
512
|
-
}, ee(e.listboxOptionListeners)),
|
|
509
|
+
option: n,
|
|
510
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null,
|
|
511
|
+
selected: n.value === e.selectedItem.value
|
|
512
|
+
}, ee(e.listboxOptionListeners)), ge({ _: 2 }, [
|
|
513
513
|
j(e.slots, (u, l) => ({
|
|
514
514
|
name: l,
|
|
515
515
|
fn: L((m) => [
|
|
@@ -521,14 +521,14 @@ function Ut(e, t, o, s, r, n) {
|
|
|
521
521
|
[S]
|
|
522
522
|
]);
|
|
523
523
|
}
|
|
524
|
-
const
|
|
524
|
+
const Ut = /* @__PURE__ */ H(zt, [["render", Yt]]);
|
|
525
525
|
let we = 0;
|
|
526
526
|
const Ft = {
|
|
527
527
|
beforeCreate() {
|
|
528
528
|
this.uuid = we.toString(), we += 1;
|
|
529
529
|
}
|
|
530
530
|
}, Kt = { key: 0 };
|
|
531
|
-
function Wt(e, t, o, s, r,
|
|
531
|
+
function Wt(e, t, o, s, r, i) {
|
|
532
532
|
return d(), y("svg", w({ role: "img" }, e.$attrs, {
|
|
533
533
|
class: "ui-assets-icons-16",
|
|
534
534
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -547,7 +547,7 @@ function Wt(e, t, o, s, r, n) {
|
|
|
547
547
|
}, null, -1))
|
|
548
548
|
], 16);
|
|
549
549
|
}
|
|
550
|
-
const Ht = /* @__PURE__ */ H(Ft, [["render", Wt]]), jt = {}, qt = /* @__PURE__ */
|
|
550
|
+
const Ht = /* @__PURE__ */ H(Ft, [["render", Wt]]), jt = {}, qt = /* @__PURE__ */ J({
|
|
551
551
|
...jt,
|
|
552
552
|
__name: "decorative-checkbox",
|
|
553
553
|
props: {
|
|
@@ -564,47 +564,54 @@ const Ht = /* @__PURE__ */ H(Ft, [["render", Wt]]), jt = {}, qt = /* @__PURE__ *
|
|
|
564
564
|
[`b-checkbox-input__outline--${Se.CHECKED}`]: (t.checked || t.allSelected) && !t.indeterminate,
|
|
565
565
|
[`b-checkbox-input__outline--${Se.INDETERMINATE}`]: t.indeterminate
|
|
566
566
|
}));
|
|
567
|
-
return (r,
|
|
568
|
-
class:
|
|
567
|
+
return (r, i) => (d(), y("div", {
|
|
568
|
+
class: ve(["b-checkbox-input", o.value]),
|
|
569
569
|
role: "presentation"
|
|
570
570
|
}, [
|
|
571
|
-
r.indeterminate ? (d(),
|
|
571
|
+
r.indeterminate ? (d(), A(B(St), {
|
|
572
572
|
key: 0,
|
|
573
573
|
class: "b-checkbox-input__icon",
|
|
574
574
|
"svg-title": "",
|
|
575
575
|
"aria-hidden": "true"
|
|
576
|
-
})) : r.allSelected ? (d(),
|
|
576
|
+
})) : r.allSelected ? (d(), A(B(Ht), {
|
|
577
577
|
key: 1,
|
|
578
578
|
class: "b-checkbox-input__icon",
|
|
579
579
|
"svg-title": "",
|
|
580
580
|
"aria-hidden": "true",
|
|
581
581
|
"data-testid": "decorative-checkbox-double-checkmark-icon"
|
|
582
|
-
})) : r.checked ? (d(),
|
|
582
|
+
})) : r.checked ? (d(), A(B(ht), {
|
|
583
583
|
key: 2,
|
|
584
584
|
class: "b-checkbox-input__icon",
|
|
585
585
|
"svg-title": "",
|
|
586
586
|
"aria-hidden": "true"
|
|
587
587
|
})) : q("", !0),
|
|
588
588
|
G("div", {
|
|
589
|
-
class:
|
|
589
|
+
class: ve(["b-checkbox-input__outline", s.value])
|
|
590
590
|
}, null, 2)
|
|
591
591
|
], 2));
|
|
592
592
|
}
|
|
593
|
-
}),
|
|
593
|
+
}), _e = /* @__PURE__ */ H(qt, [["__scopeId", "data-v-08d3142e"]]);
|
|
594
594
|
var He = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(He || {}), Q = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(Q || {});
|
|
595
595
|
const Ge = {
|
|
596
|
+
"de-DE": { categoryClosed: "{category} geschlossen", categoryOpened: "{category} geöffnet" },
|
|
597
|
+
"en-GB": { categoryClosed: "{category} closed", categoryOpened: "{category} opened" },
|
|
596
598
|
"en-US": { categoryClosed: "{category} closed", categoryOpened: "{category} opened" },
|
|
599
|
+
"es-ES": { categoryClosed: "{category} cerrado", categoryOpened: "{category} abierto" },
|
|
600
|
+
"es-MX": { categoryClosed: "{category} cerrado", categoryOpened: "{category} abierto" },
|
|
601
|
+
"fr-FR": { categoryClosed: "{category} fermée", categoryOpened: "{category} ouverte" },
|
|
602
|
+
"it-IT": { categoryClosed: "{category} chiuso", categoryOpened: "{category} aperto" },
|
|
597
603
|
"ja-JP": { categoryClosed: "{category}を閉じました", categoryOpened: "{category}を開きました" },
|
|
598
|
-
"pt-BR": { categoryClosed: "{category}
|
|
599
|
-
},
|
|
604
|
+
"pt-BR": { categoryClosed: "{category} fechada", categoryOpened: "{categoria} aberta" },
|
|
605
|
+
"zh-CN": { categoryClosed: "{category} 已关闭", categoryOpened: "{category} 已打开" }
|
|
606
|
+
}, Xt = J({
|
|
600
607
|
i18n: { messages: Ge },
|
|
601
608
|
name: "bento-listbox-multi-select-category",
|
|
602
609
|
components: {
|
|
603
|
-
BentoTypography:
|
|
610
|
+
BentoTypography: ie,
|
|
604
611
|
BentoListboxOption: Ce,
|
|
605
612
|
ChevronDownIcon: Et,
|
|
606
613
|
ChevronUpIcon: Ot,
|
|
607
|
-
DecorativeCheckbox:
|
|
614
|
+
DecorativeCheckbox: _e
|
|
608
615
|
},
|
|
609
616
|
props: {
|
|
610
617
|
/**
|
|
@@ -655,54 +662,54 @@ const Ge = {
|
|
|
655
662
|
Q.TOGGLE_CATEGORY_VISIBILITY
|
|
656
663
|
],
|
|
657
664
|
setup(e, { emit: t }) {
|
|
658
|
-
const o =
|
|
659
|
-
() => e.category.items.every((
|
|
660
|
-
), S = pe(e, "staticCategories"),
|
|
661
|
-
[`b-listbox-multi-select-category--${He.DISABLED}`]:
|
|
662
|
-
})), l = (
|
|
663
|
-
|
|
664
|
-
}, m = (
|
|
665
|
-
const
|
|
666
|
-
return { isDisabled:
|
|
665
|
+
const o = I(!1), { t: s } = Ie({ messages: Ge }), r = Me("category-group"), i = Me("category-name"), a = (M) => e.isOptionDisabled ? e.isOptionDisabled(M) : !1, f = b(
|
|
666
|
+
() => e.category.items.every((M) => a(M))
|
|
667
|
+
), S = pe(e, "staticCategories"), n = b(() => o.value || e.staticCategories), u = b(() => ({
|
|
668
|
+
[`b-listbox-multi-select-category--${He.DISABLED}`]: f.value
|
|
669
|
+
})), l = (M, Y) => {
|
|
670
|
+
M.preventDefault(), o.value = Y !== void 0 ? Y : !o.value, t(Q.TOGGLE_CATEGORY_VISIBILITY, e.category.value);
|
|
671
|
+
}, m = (M) => {
|
|
672
|
+
const Y = a(M), Z = e.selectedItemsList?.includes(M.value) || !1;
|
|
673
|
+
return { isDisabled: Y, isPreSelected: Z };
|
|
667
674
|
}, C = b(
|
|
668
|
-
() => e.category.items.filter((
|
|
669
|
-
const { isDisabled:
|
|
670
|
-
return
|
|
675
|
+
() => e.category.items.filter((M) => {
|
|
676
|
+
const { isDisabled: Y, isPreSelected: Z } = m(M);
|
|
677
|
+
return Y && Z || !Y;
|
|
671
678
|
})
|
|
672
679
|
), h = b(
|
|
673
680
|
() => C.value?.filter(
|
|
674
|
-
({ value:
|
|
681
|
+
({ value: M }) => e.selectedItemsList?.includes(M)
|
|
675
682
|
)
|
|
676
683
|
), R = b(() => {
|
|
677
|
-
const
|
|
678
|
-
return s(
|
|
684
|
+
const M = o.value ? "categoryOpened" : "categoryClosed";
|
|
685
|
+
return s(M, { category: e.category.label });
|
|
679
686
|
}), x = () => {
|
|
680
687
|
t(Q.SELECT_CATEGORY);
|
|
681
|
-
},
|
|
688
|
+
}, k = () => {
|
|
682
689
|
t(Q.UNSELECT_CATEGORY);
|
|
683
690
|
}, { isAllSelected: $, isIndeterminate: T, toggleSelectAll: O } = Fe(
|
|
684
691
|
h,
|
|
685
692
|
C,
|
|
686
693
|
x,
|
|
687
|
-
|
|
688
|
-
), D = b(() => T.value ? "mixed" : `${$.value}`),
|
|
689
|
-
|
|
694
|
+
k
|
|
695
|
+
), D = b(() => T.value ? "mixed" : `${$.value}`), z = I($.value), re = () => {
|
|
696
|
+
z.value = !z.value, O(z.value);
|
|
690
697
|
};
|
|
691
|
-
return
|
|
692
|
-
|
|
698
|
+
return fe($, () => {
|
|
699
|
+
z.value = $.value;
|
|
693
700
|
}), {
|
|
694
701
|
// Values
|
|
695
702
|
chevronTitle: R,
|
|
696
703
|
conditionalClass: u,
|
|
697
|
-
hasAllPropsDisabled:
|
|
704
|
+
hasAllPropsDisabled: f,
|
|
698
705
|
isOpen: o,
|
|
699
706
|
isAllSelected: $,
|
|
700
707
|
isIndeterminate: T,
|
|
701
708
|
isStaticCategory: S,
|
|
702
709
|
categoryGroupId: r,
|
|
703
|
-
categoryNameId:
|
|
710
|
+
categoryNameId: i,
|
|
704
711
|
// Computed
|
|
705
|
-
showItemChildren:
|
|
712
|
+
showItemChildren: n,
|
|
706
713
|
ariaCheckedComputed: D,
|
|
707
714
|
// Methods
|
|
708
715
|
handleSelectAll: re,
|
|
@@ -710,17 +717,17 @@ const Ge = {
|
|
|
710
717
|
toggleSelectAll: O
|
|
711
718
|
};
|
|
712
719
|
}
|
|
713
|
-
}),
|
|
720
|
+
}), Jt = { class: "b-listbox-multi-select-category__label" }, Zt = {
|
|
714
721
|
key: 1,
|
|
715
722
|
class: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category",
|
|
716
723
|
"aria-hidden": "true"
|
|
717
724
|
}, Qt = { class: "b-listbox-multi-select-category__label" }, es = ["id", "aria-label"];
|
|
718
|
-
function ts(e, t, o, s, r,
|
|
719
|
-
const
|
|
725
|
+
function ts(e, t, o, s, r, i) {
|
|
726
|
+
const a = _("decorative-checkbox"), f = _("bento-typography"), S = _("chevron-up-icon"), n = _("chevron-down-icon"), u = _("bento-listbox-option");
|
|
720
727
|
return d(), y("div", null, [
|
|
721
728
|
e.isStaticCategory ? (d(), y("div", Zt, [
|
|
722
729
|
G("span", Qt, [
|
|
723
|
-
|
|
730
|
+
N(f, {
|
|
724
731
|
el: "span",
|
|
725
732
|
variant: "caption",
|
|
726
733
|
class: "b-listbox-multi-select-category__label-text"
|
|
@@ -731,9 +738,9 @@ function ts(e, t, o, s, r, n) {
|
|
|
731
738
|
_: 1
|
|
732
739
|
})
|
|
733
740
|
])
|
|
734
|
-
])) : (d(),
|
|
741
|
+
])) : (d(), A(u, {
|
|
735
742
|
key: 0,
|
|
736
|
-
class:
|
|
743
|
+
class: ve(["b-listbox-multi-select-category__option", e.conditionalClass]),
|
|
737
744
|
tabindex: e.tabindex,
|
|
738
745
|
"aria-selected": e.ariaCheckedComputed !== "false",
|
|
739
746
|
"aria-checked": e.ariaCheckedComputed,
|
|
@@ -744,20 +751,20 @@ function ts(e, t, o, s, r, n) {
|
|
|
744
751
|
"aria-labelledby": e.categoryNameId,
|
|
745
752
|
onClick: e.handleSelectAll,
|
|
746
753
|
onEnterPressed: e.handleSelectAll,
|
|
747
|
-
onSpacePressed:
|
|
754
|
+
onSpacePressed: ae(e.handleSelectAll, ["prevent"]),
|
|
748
755
|
onKeydown: [
|
|
749
756
|
t[1] || (t[1] = be((l) => e.toggleOpen(l, !1), ["arrow-left", "native"])),
|
|
750
757
|
t[2] || (t[2] = be((l) => e.toggleOpen(l, !0), ["arrow-right", "native"]))
|
|
751
758
|
]
|
|
752
759
|
}, {
|
|
753
760
|
default: L(() => [
|
|
754
|
-
|
|
761
|
+
N(a, {
|
|
755
762
|
indeterminate: e.isIndeterminate,
|
|
756
763
|
disabled: e.hasAllPropsDisabled,
|
|
757
764
|
checked: e.isAllSelected
|
|
758
765
|
}, null, 8, ["indeterminate", "disabled", "checked"]),
|
|
759
|
-
G("span",
|
|
760
|
-
|
|
766
|
+
G("span", Jt, [
|
|
767
|
+
N(f, {
|
|
761
768
|
id: e.categoryNameId,
|
|
762
769
|
el: "span",
|
|
763
770
|
class: "b-listbox-multi-select-category__label-text"
|
|
@@ -771,12 +778,12 @@ function ts(e, t, o, s, r, n) {
|
|
|
771
778
|
"aria-hidden": "true",
|
|
772
779
|
class: "b-listbox-multi-select-category__label-chevron",
|
|
773
780
|
"data-testid": "toggle-listbox",
|
|
774
|
-
onClickCapture: t[0] || (t[0] =
|
|
781
|
+
onClickCapture: t[0] || (t[0] = ae((...l) => e.toggleOpen && e.toggleOpen(...l), ["stop"]))
|
|
775
782
|
}, [
|
|
776
|
-
e.isOpen ? (d(),
|
|
783
|
+
e.isOpen ? (d(), A(S, {
|
|
777
784
|
key: 0,
|
|
778
785
|
"svg-title": e.chevronTitle
|
|
779
|
-
}, null, 8, ["svg-title"])) : (d(),
|
|
786
|
+
}, null, 8, ["svg-title"])) : (d(), A(n, {
|
|
780
787
|
key: 1,
|
|
781
788
|
"svg-title": e.chevronTitle
|
|
782
789
|
}, null, 8, ["svg-title"]))
|
|
@@ -785,26 +792,26 @@ function ts(e, t, o, s, r, n) {
|
|
|
785
792
|
]),
|
|
786
793
|
_: 1
|
|
787
794
|
}, 8, ["class", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "aria-expanded", "aria-owns", "aria-labelledby", "onClick", "onEnterPressed", "onSpacePressed"])),
|
|
788
|
-
|
|
795
|
+
ne(G("div", {
|
|
789
796
|
id: e.categoryGroupId,
|
|
790
797
|
role: "group",
|
|
791
798
|
"aria-label": e.category.label
|
|
792
799
|
}, [
|
|
793
800
|
W(e.$slots, "default", {}, void 0, !0)
|
|
794
801
|
], 8, es), [
|
|
795
|
-
[
|
|
802
|
+
[ze, e.showItemChildren]
|
|
796
803
|
])
|
|
797
804
|
]);
|
|
798
805
|
}
|
|
799
|
-
const ss = /* @__PURE__ */ H(
|
|
800
|
-
var
|
|
801
|
-
const ls =
|
|
806
|
+
const ss = /* @__PURE__ */ H(Xt, [["render", ts], ["__scopeId", "data-v-60c04867"]]);
|
|
807
|
+
var X = /* @__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))(X || {});
|
|
808
|
+
const ls = J({
|
|
802
809
|
name: "listbox-multi-select-options",
|
|
803
810
|
components: {
|
|
804
811
|
BentoListboxOption: Ce,
|
|
805
|
-
BentoTypography:
|
|
812
|
+
BentoTypography: ie,
|
|
806
813
|
ListboxMultiSelectCategory: ss,
|
|
807
|
-
DecorativeCheckbox:
|
|
814
|
+
DecorativeCheckbox: _e
|
|
808
815
|
},
|
|
809
816
|
inheritAttrs: !1,
|
|
810
817
|
props: {
|
|
@@ -874,23 +881,23 @@ const ls = X({
|
|
|
874
881
|
}
|
|
875
882
|
},
|
|
876
883
|
emits: [
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
884
|
+
X.TOGGLE_CHECKBOX_SELECTION,
|
|
885
|
+
X.SELECT_CATEGORY,
|
|
886
|
+
X.UNSELECT_CATEGORY,
|
|
887
|
+
X.TOGGLE_CATEGORY_VISIBILITY
|
|
881
888
|
],
|
|
882
889
|
setup(e, { emit: t }) {
|
|
883
|
-
const o = (
|
|
884
|
-
e.isOptionDisabled(
|
|
885
|
-
}, s = (
|
|
890
|
+
const o = (n) => {
|
|
891
|
+
e.isOptionDisabled(n) || t(X.TOGGLE_CHECKBOX_SELECTION, n);
|
|
892
|
+
}, s = (n) => !!n.items, r = (n) => {
|
|
886
893
|
const u = e.isMultiLevel && e.searching;
|
|
887
|
-
return
|
|
888
|
-
},
|
|
889
|
-
if (s(
|
|
890
|
-
const u = n
|
|
891
|
-
t(u,
|
|
894
|
+
return n.description && (!e.isMultiLevel || u);
|
|
895
|
+
}, i = (n) => n.items ? !!n.items.find((u) => e.selectedItemsList.includes(u.value)) : e.selectedItemsList.includes(n.value), a = (n) => {
|
|
896
|
+
if (s(n)) {
|
|
897
|
+
const u = i(n) ? X.UNSELECT_CATEGORY : X.SELECT_CATEGORY;
|
|
898
|
+
t(u, n);
|
|
892
899
|
} else
|
|
893
|
-
o(
|
|
900
|
+
o(n);
|
|
894
901
|
};
|
|
895
902
|
return {
|
|
896
903
|
// Values
|
|
@@ -899,26 +906,26 @@ const ls = X({
|
|
|
899
906
|
"b-listbox-multi-select-options__category-option": e.categoryItems
|
|
900
907
|
})),
|
|
901
908
|
// Methods
|
|
902
|
-
isOptionSelected:
|
|
909
|
+
isOptionSelected: i,
|
|
903
910
|
shouldShowDescription: r,
|
|
904
911
|
toggleCheckboxSelection: o,
|
|
905
|
-
toggleSearchOption:
|
|
906
|
-
computedTabindex: (
|
|
912
|
+
toggleSearchOption: a,
|
|
913
|
+
computedTabindex: (n) => e.itemsIndex[n] === e.focusedIndex ? 0 : -1,
|
|
907
914
|
// Enums
|
|
908
915
|
BentoListboxEvent: p,
|
|
909
|
-
ListboxMultiSelectOptionsEvent:
|
|
916
|
+
ListboxMultiSelectOptionsEvent: X
|
|
910
917
|
};
|
|
911
918
|
}
|
|
912
|
-
}), os = { class: "b-listbox-multi-select__option-text" },
|
|
913
|
-
function
|
|
914
|
-
const
|
|
919
|
+
}), os = { class: "b-listbox-multi-select__option-text" }, as = { class: "b-listbox-multi-select__option-text" };
|
|
920
|
+
function ns(e, t, o, s, r, i) {
|
|
921
|
+
const a = _("decorative-checkbox"), f = _("bento-typography"), S = _("bento-listbox-option"), n = _("listbox-multi-select-options", !0), u = _("listbox-multi-select-category");
|
|
915
922
|
return d(), y("div", null, [
|
|
916
923
|
(d(!0), y(te, null, j(e.items, (l) => (d(), y("div", {
|
|
917
924
|
key: `selected-${l.value}`
|
|
918
925
|
}, [
|
|
919
|
-
e.searching && e.isMultiLevel ? (d(),
|
|
926
|
+
e.searching && e.isMultiLevel ? (d(), A(S, {
|
|
920
927
|
key: 0,
|
|
921
|
-
class:
|
|
928
|
+
class: ve(["b-listbox-multi-select-options", e.conditionalClasses]),
|
|
922
929
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
923
930
|
tabindex: e.computedTabindex(l.value),
|
|
924
931
|
"aria-selected": `${e.isOptionSelected(l)}`,
|
|
@@ -927,22 +934,22 @@ function as(e, t, o, s, r, n) {
|
|
|
927
934
|
role: e.$attrs.role || "option",
|
|
928
935
|
onClick: (m) => e.toggleSearchOption(l),
|
|
929
936
|
onEnterPressed: (m) => e.toggleSearchOption(l),
|
|
930
|
-
onSpacePressed:
|
|
937
|
+
onSpacePressed: ae((m) => e.toggleSearchOption(l), ["prevent"])
|
|
931
938
|
}, {
|
|
932
939
|
default: L(() => [
|
|
933
|
-
|
|
940
|
+
N(a, {
|
|
934
941
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
935
942
|
checked: e.isOptionSelected(l)
|
|
936
943
|
}, null, 8, ["disabled", "checked"]),
|
|
937
944
|
W(e.$slots, "default", w({ ref_for: !0 }, l), () => [
|
|
938
945
|
G("span", os, [
|
|
939
|
-
|
|
946
|
+
N(f, { el: "span" }, {
|
|
940
947
|
default: L(() => [
|
|
941
948
|
K(V(l.label), 1)
|
|
942
949
|
]),
|
|
943
950
|
_: 2
|
|
944
951
|
}, 1024),
|
|
945
|
-
e.shouldShowDescription(l) ? (d(),
|
|
952
|
+
e.shouldShowDescription(l) ? (d(), A(f, {
|
|
946
953
|
key: 0,
|
|
947
954
|
class: "b-listbox-multi-select__option-description",
|
|
948
955
|
el: "span"
|
|
@@ -957,7 +964,7 @@ function as(e, t, o, s, r, n) {
|
|
|
957
964
|
]),
|
|
958
965
|
_: 2
|
|
959
966
|
}, 1032, ["class", "disabled", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"])) : (d(), y(te, { key: 1 }, [
|
|
960
|
-
l.items ? (d(),
|
|
967
|
+
l.items ? (d(), A(u, {
|
|
961
968
|
key: 0,
|
|
962
969
|
category: l,
|
|
963
970
|
"static-categories": e.staticCategories,
|
|
@@ -969,7 +976,7 @@ function as(e, t, o, s, r, n) {
|
|
|
969
976
|
onToggleCategoryVisibility: t[1] || (t[1] = (m) => e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, m))
|
|
970
977
|
}, {
|
|
971
978
|
default: L(() => [
|
|
972
|
-
|
|
979
|
+
N(n, {
|
|
973
980
|
"category-items": "",
|
|
974
981
|
items: l.items,
|
|
975
982
|
"is-option-disabled": e.isOptionDisabled,
|
|
@@ -984,9 +991,9 @@ function as(e, t, o, s, r, n) {
|
|
|
984
991
|
}, null, 8, ["items", "is-option-disabled", "items-index", "focused-index", "is-multi-level", "static-categories", "selected-items-list", "searching", "role"])
|
|
985
992
|
]),
|
|
986
993
|
_: 2
|
|
987
|
-
}, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (d(),
|
|
994
|
+
}, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (d(), A(S, {
|
|
988
995
|
key: 1,
|
|
989
|
-
class:
|
|
996
|
+
class: ve(["b-listbox-multi-select-options", e.conditionalClasses]),
|
|
990
997
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
991
998
|
tabindex: e.computedTabindex(l.value),
|
|
992
999
|
"aria-selected": `${e.isOptionSelected(l)}`,
|
|
@@ -995,22 +1002,22 @@ function as(e, t, o, s, r, n) {
|
|
|
995
1002
|
role: e.$attrs.role || "option",
|
|
996
1003
|
onClick: (m) => e.toggleCheckboxSelection(l),
|
|
997
1004
|
onEnterPressed: (m) => e.toggleCheckboxSelection(l),
|
|
998
|
-
onSpacePressed:
|
|
1005
|
+
onSpacePressed: ae((m) => e.toggleCheckboxSelection(l), ["prevent"])
|
|
999
1006
|
}, {
|
|
1000
1007
|
default: L(() => [
|
|
1001
|
-
|
|
1008
|
+
N(a, {
|
|
1002
1009
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
1003
1010
|
checked: e.isOptionSelected(l)
|
|
1004
1011
|
}, null, 8, ["disabled", "checked"]),
|
|
1005
1012
|
W(e.$slots, "default", w({ ref_for: !0 }, l), () => [
|
|
1006
|
-
G("span",
|
|
1007
|
-
|
|
1013
|
+
G("span", as, [
|
|
1014
|
+
N(f, { el: "span" }, {
|
|
1008
1015
|
default: L(() => [
|
|
1009
1016
|
K(V(l.label), 1)
|
|
1010
1017
|
]),
|
|
1011
1018
|
_: 2
|
|
1012
1019
|
}, 1024),
|
|
1013
|
-
e.shouldShowDescription(l) ? (d(),
|
|
1020
|
+
e.shouldShowDescription(l) ? (d(), A(f, {
|
|
1014
1021
|
key: 0,
|
|
1015
1022
|
class: "b-listbox-multi-select__option-description",
|
|
1016
1023
|
el: "span"
|
|
@@ -1029,21 +1036,28 @@ function as(e, t, o, s, r, n) {
|
|
|
1029
1036
|
]))), 128))
|
|
1030
1037
|
]);
|
|
1031
1038
|
}
|
|
1032
|
-
const
|
|
1039
|
+
const is = /* @__PURE__ */ H(ls, [["render", ns], ["__scopeId", "data-v-237dfc58"]]), rs = (e) => {
|
|
1033
1040
|
const t = b(() => !!e.value?.find(({ items: s }) => !!s)), o = b(() => t.value ? e.value?.reduce((s, r) => (r.items ? s.push(...r.items.flat()) : s.push(r), s), []) : e.value);
|
|
1034
1041
|
return {
|
|
1035
1042
|
isMultiLevelSelect: t,
|
|
1036
1043
|
flattenedItemsList: o
|
|
1037
1044
|
};
|
|
1038
1045
|
}, je = {
|
|
1046
|
+
"de-DE": { allSelected: "Alle ausgewählt ({total})", numberOfTotalSelected: "{number} von {total} ausgewählt", numbersSelected: "{number} ausgewählt", selectAll: "Alle auswählen ({total})" },
|
|
1047
|
+
"en-GB": { allSelected: "All selected ({total})", numberOfTotalSelected: "{number} of {total} selected", numbersSelected: "{number} selected", selectAll: "Select all ({total})" },
|
|
1039
1048
|
"en-US": { allSelected: "All selected ({total})", numberOfTotalSelected: "{number} of {total} selected", numbersSelected: "{number} selected", selectAll: "Select all ({total})" },
|
|
1049
|
+
"es-ES": { allSelected: "Todos seleccionados ({total})", numberOfTotalSelected: "{number} de {total} seleccionados", numbersSelected: "{number} seleccionado", selectAll: "Seleccionar todo ({total})" },
|
|
1050
|
+
"es-MX": { allSelected: "Todos seleccionados ({total})", numberOfTotalSelected: "{number} de {total} seleccionados", numbersSelected: "{número} seleccionado", selectAll: "Seleccionar todo ({total})" },
|
|
1051
|
+
"fr-FR": { allSelected: "Tous sélectionnés ({total})", numberOfTotalSelected: "{number} sélectionné(s) sur {total}", numbersSelected: "{number} sélectionné(s)", selectAll: "Tout sélectionner ({total})" },
|
|
1052
|
+
"it-IT": { allSelected: "Tutti i selezionati ({total})", numberOfTotalSelected: "{numero} su {totale} selezionati", numbersSelected: "{numero} selezionati", selectAll: "Seleziona tutto ({total})" },
|
|
1040
1053
|
"ja-JP": { allSelected: "すべて選択 ({total})", numberOfTotalSelected: "{number}/{total}件が選択されました", numbersSelected: "{number}件選択済み", selectAll: "すべて選択 ({total})" },
|
|
1041
|
-
"pt-BR": { allSelected: "Todos os selecionados ({total})", numberOfTotalSelected: "{number} de {total} selecionados", numbersSelected: "{number} selecionados", selectAll: "Selecionar tudo ({total})" }
|
|
1054
|
+
"pt-BR": { allSelected: "Todos os selecionados ({total})", numberOfTotalSelected: "{number} de {total} selecionados", numbersSelected: "{number} selecionados", selectAll: "Selecionar tudo ({total})" },
|
|
1055
|
+
"zh-CN": { allSelected: "全部已选 ({total})", numberOfTotalSelected: "已选择 {number} 个,共 {total} 个", numbersSelected: "已选择 {number} 个", selectAll: "选择全部({total})个" }
|
|
1042
1056
|
}, cs = { key: 0 }, ds = ["role"], us = {
|
|
1043
1057
|
key: 1,
|
|
1044
1058
|
class: "b-listbox-multi-select__divider",
|
|
1045
1059
|
"aria-hidden": "true"
|
|
1046
|
-
}, bs = { i18n: { messages: je } }, ms = /* @__PURE__ */
|
|
1060
|
+
}, bs = { i18n: { messages: je } }, ms = /* @__PURE__ */ J({
|
|
1047
1061
|
...bs,
|
|
1048
1062
|
__name: "listbox-multi-select",
|
|
1049
1063
|
props: {
|
|
@@ -1057,7 +1071,7 @@ const ns = /* @__PURE__ */ H(ls, [["render", as], ["__scopeId", "data-v-237dfc58
|
|
|
1057
1071
|
},
|
|
1058
1072
|
emits: ["select"],
|
|
1059
1073
|
setup(e, { expose: t, emit: o }) {
|
|
1060
|
-
const s = e, r = o, { t:
|
|
1074
|
+
const s = e, r = o, { t: i, n: a } = Ie({ messages: je }), f = mt(), S = pt(), n = b(
|
|
1061
1075
|
() => ({
|
|
1062
1076
|
"aria-label": S["aria-label"]?.toString(),
|
|
1063
1077
|
"aria-busy": S["aria-busy"]?.toString(),
|
|
@@ -1065,77 +1079,77 @@ const ns = /* @__PURE__ */ H(ls, [["render", as], ["__scopeId", "data-v-237dfc58
|
|
|
1065
1079
|
"aria-live": S["aria-live"]?.toString(),
|
|
1066
1080
|
"aria-multiselectable": !0
|
|
1067
1081
|
})
|
|
1068
|
-
), u =
|
|
1069
|
-
const
|
|
1070
|
-
return { isDisabled:
|
|
1082
|
+
), u = I(null), l = I(null), m = I(null), C = I(null), h = b(() => s.selectedValues.map(({ value: c }) => c)), { isMultiLevelSelect: R, flattenedItemsList: x } = rs(pe(s, "items")), k = b(() => R.value && !s.staticCategories), $ = b(() => k.value ? "tree" : "listbox"), T = b(() => k.value ? "treeitem" : "option"), O = (c) => {
|
|
1083
|
+
const v = s.isOptionDisabled(c), g = h.value?.includes(c.value) || !1;
|
|
1084
|
+
return { isDisabled: v, isPreSelected: g };
|
|
1071
1085
|
}, D = b(() => {
|
|
1072
1086
|
if (s.searching && R)
|
|
1073
1087
|
return s.items;
|
|
1074
|
-
const c = x.value.filter((
|
|
1075
|
-
const { isDisabled:
|
|
1076
|
-
return
|
|
1088
|
+
const c = x.value.filter((v) => {
|
|
1089
|
+
const { isDisabled: g, isPreSelected: P } = O(v);
|
|
1090
|
+
return g && P || !g;
|
|
1077
1091
|
});
|
|
1078
|
-
return s.selectedValues.forEach((
|
|
1079
|
-
c.find((
|
|
1092
|
+
return s.selectedValues.forEach((v) => {
|
|
1093
|
+
c.find((g) => g.value === v.value) || c.push(v);
|
|
1080
1094
|
}), c;
|
|
1081
|
-
}),
|
|
1095
|
+
}), z = b(
|
|
1082
1096
|
() => D.value?.filter((c) => c.items && R.value && s.searching ? c.items.filter(
|
|
1083
|
-
(
|
|
1097
|
+
(g) => (s.selectedValues ?? []).includes(g.value)
|
|
1084
1098
|
).length === c.items.length : h.value?.includes(c.value))
|
|
1085
|
-
), re = () => R.value && !s.searching ? x.value.length : s.items.length,
|
|
1086
|
-
const c = D.value.length,
|
|
1087
|
-
return
|
|
1088
|
-
}),
|
|
1089
|
-
const
|
|
1090
|
-
const { isDisabled: E, isPreSelected: ue } = O(
|
|
1099
|
+
), re = () => R.value && !s.searching ? x.value.length : s.items.length, M = b(() => {
|
|
1100
|
+
const c = D.value.length, v = re(), g = z.value?.length || 0;
|
|
1101
|
+
return g === 0 ? i("selectAll", { total: a(c) }) : g === v ? i("allSelected", { total: a(v) }) : g <= v ? i("numberOfTotalSelected", { number: a(g), total: a(v) }) : i("numbersSelected", { number: a(g) });
|
|
1102
|
+
}), Y = (c) => {
|
|
1103
|
+
const v = (P) => {
|
|
1104
|
+
const { isDisabled: E, isPreSelected: ue } = O(P);
|
|
1091
1105
|
return E && ue || !E;
|
|
1092
|
-
},
|
|
1093
|
-
r("select", [...s.selectedValues, ...
|
|
1106
|
+
}, g = c.filter(v).filter((P) => !h.value.includes(P.value));
|
|
1107
|
+
r("select", [...s.selectedValues, ...g]);
|
|
1094
1108
|
}, Z = (c) => {
|
|
1095
|
-
const
|
|
1109
|
+
const v = (E) => {
|
|
1096
1110
|
const { isDisabled: ue, isPreSelected: dt } = O(E);
|
|
1097
1111
|
return !(ue && dt);
|
|
1098
|
-
},
|
|
1099
|
-
r("select",
|
|
1112
|
+
}, g = c.filter(v).map(({ value: E }) => E), P = s.selectedValues.filter((E) => !g?.includes(E.value));
|
|
1113
|
+
r("select", P);
|
|
1100
1114
|
}, Ee = () => {
|
|
1101
|
-
|
|
1115
|
+
Y(x.value);
|
|
1102
1116
|
}, Oe = () => {
|
|
1103
1117
|
Z(x.value);
|
|
1104
|
-
}, { isAllSelected:
|
|
1105
|
-
|
|
1118
|
+
}, { isAllSelected: U, isIndeterminate: se, toggleSelectAll: qe } = Fe(
|
|
1119
|
+
z,
|
|
1106
1120
|
D,
|
|
1107
1121
|
Ee,
|
|
1108
1122
|
Oe
|
|
1109
|
-
),
|
|
1123
|
+
), Ae = b(() => se.value ? "mixed" : `${U.value}`), ye = I(U.value), Te = () => {
|
|
1110
1124
|
ye.value = !ye.value, qe(ye.value);
|
|
1111
1125
|
};
|
|
1112
|
-
|
|
1113
|
-
ye.value =
|
|
1126
|
+
fe(U, () => {
|
|
1127
|
+
ye.value = U.value;
|
|
1114
1128
|
});
|
|
1115
|
-
const
|
|
1116
|
-
|
|
1117
|
-
},
|
|
1129
|
+
const Xe = (c) => {
|
|
1130
|
+
Y(c.items);
|
|
1131
|
+
}, ke = (c) => {
|
|
1118
1132
|
Z(c.items);
|
|
1119
|
-
}, ce = (c,
|
|
1120
|
-
let
|
|
1121
|
-
const
|
|
1122
|
-
|
|
1123
|
-
},
|
|
1133
|
+
}, ce = (c, v) => {
|
|
1134
|
+
let g = !1;
|
|
1135
|
+
const P = s.selectedValues.filter(({ value: E }) => v.value === E ? (g = !0, !1) : !0);
|
|
1136
|
+
g || P.push(v), r(c, P);
|
|
1137
|
+
}, Je = b(() => {
|
|
1124
1138
|
if (!R.value)
|
|
1125
1139
|
return s.selectedValues;
|
|
1126
|
-
const c = (E) => h.value.includes(E.value),
|
|
1140
|
+
const c = (E) => h.value.includes(E.value), v = (E) => !s.staticCategories && E.every((ue) => c(ue));
|
|
1127
1141
|
return s.items.flatMap(
|
|
1128
|
-
(E) => E.items && !
|
|
1142
|
+
(E) => E.items && !v(E.items) ? E.items : E
|
|
1129
1143
|
).filter((E) => E.items ? !0 : c(E));
|
|
1130
1144
|
}), Ze = b(() => {
|
|
1131
|
-
const c = ["automatic", "button"].includes(s.lazyLoadType),
|
|
1132
|
-
return c && s.hasMoreItems ? !!s.selectedValues?.length :
|
|
1133
|
-
}), $e = b(() => ["automatic", "button"].includes(s.lazyLoadType) ? !s.hasMoreItems : !0), de =
|
|
1145
|
+
const c = ["automatic", "button"].includes(s.lazyLoadType), v = s.selectedValues?.length > 0 && z.value?.length !== x.value?.length;
|
|
1146
|
+
return c && s.hasMoreItems ? !!s.selectedValues?.length : v;
|
|
1147
|
+
}), $e = b(() => ["automatic", "button"].includes(s.lazyLoadType) ? !s.hasMoreItems : !0), de = I([]), { visibleDomOptions: De, updateVisibleDomOptions: Qe } = We(
|
|
1134
1148
|
u,
|
|
1135
1149
|
pe(s, "items"),
|
|
1136
1150
|
T
|
|
1137
1151
|
), et = (c) => {
|
|
1138
|
-
de.value.includes(c) ? de.value = de.value.filter((
|
|
1152
|
+
de.value.includes(c) ? de.value = de.value.filter((v) => v !== c) : de.value.push(c), Ye(() => {
|
|
1139
1153
|
Qe();
|
|
1140
1154
|
});
|
|
1141
1155
|
}, tt = (c) => {
|
|
@@ -1144,89 +1158,89 @@ const ns = /* @__PURE__ */ H(ls, [["render", as], ["__scopeId", "data-v-237dfc58
|
|
|
1144
1158
|
moveToNextElement: st,
|
|
1145
1159
|
moveToPreviousElement: lt,
|
|
1146
1160
|
moveToFirstElement: ot,
|
|
1147
|
-
moveToLastElement:
|
|
1161
|
+
moveToLastElement: at,
|
|
1148
1162
|
preventDefault: Be,
|
|
1149
1163
|
focusedIndex: Re,
|
|
1150
|
-
setListboxFocusedIndex:
|
|
1164
|
+
setListboxFocusedIndex: nt
|
|
1151
1165
|
} = Ke(
|
|
1152
1166
|
{
|
|
1153
1167
|
items: De
|
|
1154
1168
|
},
|
|
1155
1169
|
tt
|
|
1156
|
-
),
|
|
1170
|
+
), it = {
|
|
1157
1171
|
[F.ARROW_UP]: (c) => lt(c),
|
|
1158
1172
|
[F.ARROW_DOWN]: (c) => st(c),
|
|
1159
1173
|
[F.HOME]: ot,
|
|
1160
|
-
[F.END]:
|
|
1174
|
+
[F.END]: at
|
|
1161
1175
|
};
|
|
1162
1176
|
t({
|
|
1163
1177
|
/**
|
|
1164
1178
|
* Method to set the index of the item to be focused on
|
|
1165
1179
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
1166
1180
|
*/
|
|
1167
|
-
setListboxFocusedIndex:
|
|
1181
|
+
setListboxFocusedIndex: nt
|
|
1168
1182
|
});
|
|
1169
1183
|
const rt = {
|
|
1170
1184
|
[F.ARROW_UP]: Be,
|
|
1171
1185
|
[F.ARROW_DOWN]: Be
|
|
1172
1186
|
}, ct = b(() => {
|
|
1173
1187
|
let c = 1;
|
|
1174
|
-
const
|
|
1175
|
-
return s.items.forEach((
|
|
1176
|
-
let
|
|
1177
|
-
|
|
1178
|
-
}),
|
|
1188
|
+
const v = {};
|
|
1189
|
+
return s.items.forEach((g) => {
|
|
1190
|
+
let P = de.value.includes(g.value);
|
|
1191
|
+
g.items ? (s.staticCategories ? P = !0 : v[g.value] = c++, P && g.items.forEach((E) => v[E.value] = c++)) : v[g.value] = c++;
|
|
1192
|
+
}), v;
|
|
1179
1193
|
});
|
|
1180
|
-
return (c,
|
|
1194
|
+
return (c, v) => (d(), y("div", {
|
|
1181
1195
|
ref_key: "listboxRef",
|
|
1182
1196
|
ref: u,
|
|
1183
1197
|
class: "b-listbox-multi-select"
|
|
1184
1198
|
}, [
|
|
1185
1199
|
Ze.value ? (d(), y("div", cs, [
|
|
1186
|
-
|
|
1187
|
-
(d(!0), y(te, null, j(
|
|
1188
|
-
key:
|
|
1200
|
+
ne((d(), y("ul", w({ class: "b-listbox-multi-select__chips" }, ee(rt, !0)), [
|
|
1201
|
+
(d(!0), y(te, null, j(Je.value, (g) => (d(), y("li", {
|
|
1202
|
+
key: g.value
|
|
1189
1203
|
}, [
|
|
1190
|
-
|
|
1204
|
+
N(B(Ct), {
|
|
1191
1205
|
ref_for: !0,
|
|
1192
1206
|
ref_key: "selectedListboxItemsRef",
|
|
1193
1207
|
ref: m,
|
|
1194
|
-
disabled: c.isOptionDisabled(
|
|
1195
|
-
label:
|
|
1208
|
+
disabled: c.isOptionDisabled(g),
|
|
1209
|
+
label: g.label,
|
|
1196
1210
|
condensed: "",
|
|
1197
|
-
onClick: (
|
|
1211
|
+
onClick: (P) => g.items ? ke(g) : ce("select", g)
|
|
1198
1212
|
}, null, 8, ["disabled", "label", "onClick"])
|
|
1199
1213
|
]))), 128))
|
|
1200
1214
|
], 16)), [
|
|
1201
1215
|
[B(he)]
|
|
1202
1216
|
]),
|
|
1203
|
-
|
|
1217
|
+
v[4] || (v[4] = G("hr", {
|
|
1204
1218
|
class: "b-listbox-multi-select__divider",
|
|
1205
1219
|
"aria-hidden": "true"
|
|
1206
1220
|
}, null, -1))
|
|
1207
1221
|
])) : q("", !0),
|
|
1208
|
-
|
|
1209
|
-
$e.value ? (d(),
|
|
1222
|
+
ne((d(), y("div", w(n.value, { role: $.value }, ee(it, !0)), [
|
|
1223
|
+
$e.value ? (d(), A(B(Ce), {
|
|
1210
1224
|
key: 0,
|
|
1211
1225
|
ref_key: "selectAllListboxItemsRef",
|
|
1212
1226
|
ref: l,
|
|
1213
1227
|
class: "b-listbox-multi-select__option",
|
|
1214
1228
|
tabindex: B(Re) === 0 ? 0 : -1,
|
|
1215
|
-
"aria-selected":
|
|
1216
|
-
"aria-checked":
|
|
1229
|
+
"aria-selected": Ae.value !== "false",
|
|
1230
|
+
"aria-checked": Ae.value,
|
|
1217
1231
|
role: T.value,
|
|
1218
1232
|
onClick: Te,
|
|
1219
1233
|
onEnterPressed: Te,
|
|
1220
|
-
onSpacePressed:
|
|
1234
|
+
onSpacePressed: ae(Te, ["prevent"])
|
|
1221
1235
|
}, {
|
|
1222
1236
|
default: L(() => [
|
|
1223
|
-
|
|
1224
|
-
checked: B(
|
|
1237
|
+
N(B(_e), {
|
|
1238
|
+
checked: B(U),
|
|
1225
1239
|
indeterminate: B(se)
|
|
1226
1240
|
}, null, 8, ["checked", "indeterminate"]),
|
|
1227
|
-
|
|
1241
|
+
N(B(ie), { el: "span" }, {
|
|
1228
1242
|
default: L(() => [
|
|
1229
|
-
K(V(
|
|
1243
|
+
K(V(M.value), 1)
|
|
1230
1244
|
]),
|
|
1231
1245
|
_: 1
|
|
1232
1246
|
})
|
|
@@ -1234,7 +1248,7 @@ const ns = /* @__PURE__ */ H(ls, [["render", as], ["__scopeId", "data-v-237dfc58
|
|
|
1234
1248
|
_: 1
|
|
1235
1249
|
}, 8, ["tabindex", "aria-selected", "aria-checked", "role"])) : q("", !0),
|
|
1236
1250
|
$e.value ? (d(), y("hr", us)) : q("", !0),
|
|
1237
|
-
|
|
1251
|
+
N(B(is), {
|
|
1238
1252
|
ref_key: "listboxItemsRef",
|
|
1239
1253
|
ref: C,
|
|
1240
1254
|
items: c.items,
|
|
@@ -1246,18 +1260,18 @@ const ns = /* @__PURE__ */ H(ls, [["render", as], ["__scopeId", "data-v-237dfc58
|
|
|
1246
1260
|
"focused-index": B(Re),
|
|
1247
1261
|
"items-index": ct.value,
|
|
1248
1262
|
role: T.value,
|
|
1249
|
-
onToggleCheckboxSelection:
|
|
1250
|
-
onSelectCategory:
|
|
1251
|
-
onUnselectCategory:
|
|
1263
|
+
onToggleCheckboxSelection: v[0] || (v[0] = (g) => ce("select", g)),
|
|
1264
|
+
onSelectCategory: Xe,
|
|
1265
|
+
onUnselectCategory: ke,
|
|
1252
1266
|
onToggleCategoryVisibility: et,
|
|
1253
|
-
onSpacePressed:
|
|
1254
|
-
onTabPressed:
|
|
1255
|
-
onEnterPressed:
|
|
1256
|
-
},
|
|
1257
|
-
j(B(
|
|
1258
|
-
name:
|
|
1267
|
+
onSpacePressed: v[1] || (v[1] = (g) => ce(B(p).SPACE, g)),
|
|
1268
|
+
onTabPressed: v[2] || (v[2] = (g) => ce(B(p).TAB, g)),
|
|
1269
|
+
onEnterPressed: v[3] || (v[3] = (g) => ce(B(p).ENTER, g))
|
|
1270
|
+
}, ge({ _: 2 }, [
|
|
1271
|
+
j(B(f), (g, P) => ({
|
|
1272
|
+
name: P,
|
|
1259
1273
|
fn: L((E) => [
|
|
1260
|
-
W(c.$slots,
|
|
1274
|
+
W(c.$slots, P, oe(me(E)), void 0, !0)
|
|
1261
1275
|
])
|
|
1262
1276
|
}))
|
|
1263
1277
|
]), 1032, ["items", "is-option-disabled", "is-multi-level", "static-categories", "searching", "selected-items-list", "focused-index", "items-index", "role"])
|
|
@@ -1267,17 +1281,24 @@ const ns = /* @__PURE__ */ H(ls, [["render", as], ["__scopeId", "data-v-237dfc58
|
|
|
1267
1281
|
], 512));
|
|
1268
1282
|
}
|
|
1269
1283
|
}), xe = /* @__PURE__ */ H(ms, [["__scopeId", "data-v-d170602c"]]), Ve = {
|
|
1284
|
+
"de-DE": { loading: "Laden", showMore: "Mehr anzeigen" },
|
|
1285
|
+
"en-GB": { loading: "Loading", showMore: "Show more" },
|
|
1270
1286
|
"en-US": { loading: "Loading", showMore: "Show more" },
|
|
1271
|
-
"
|
|
1272
|
-
"
|
|
1273
|
-
|
|
1287
|
+
"es-ES": { loading: "Cargando", showMore: "Mostrar más" },
|
|
1288
|
+
"es-MX": { loading: "Cargando", showMore: "Mostrar más" },
|
|
1289
|
+
"fr-FR": { loading: "Chargement", showMore: "Afficher plus" },
|
|
1290
|
+
"it-IT": { loading: "Caricamento", showMore: "Mostra di più" },
|
|
1291
|
+
"ja-JP": { loading: "読み込み中", showMore: "さらに表示" },
|
|
1292
|
+
"pt-BR": { loading: "Carregando", showMore: "Mostrar mais" },
|
|
1293
|
+
"zh-CN": { loading: "正在加载", showMore: "显示更多" }
|
|
1294
|
+
}, ps = 36, gs = J({
|
|
1274
1295
|
name: "bento-listbox",
|
|
1275
1296
|
components: {
|
|
1276
|
-
BentoEmptyState:
|
|
1277
|
-
BentoListboxSingleSelect:
|
|
1297
|
+
BentoEmptyState: vt,
|
|
1298
|
+
BentoListboxSingleSelect: Ut,
|
|
1278
1299
|
BentoListboxMultiSelect: xe,
|
|
1279
|
-
BentoTypography:
|
|
1280
|
-
BentoLoadingIndicator:
|
|
1300
|
+
BentoTypography: ie,
|
|
1301
|
+
BentoLoadingIndicator: gt,
|
|
1281
1302
|
BentoLoadingButton: Tt
|
|
1282
1303
|
},
|
|
1283
1304
|
directives: { BentoKeyboardNavigationDirective: he },
|
|
@@ -1390,8 +1411,8 @@ const ns = /* @__PURE__ */ H(ls, [["render", as], ["__scopeId", "data-v-237dfc58
|
|
|
1390
1411
|
p.TAB
|
|
1391
1412
|
],
|
|
1392
1413
|
setup(e, { emit: t, slots: o }) {
|
|
1393
|
-
const s =
|
|
1394
|
-
containerRef:
|
|
1414
|
+
const s = I([]), r = pe(e, "items"), { t: i } = Ie({ messages: Ve }), a = b(() => e.lazyLoadType !== le.AUTOMATIC), f = b(() => e.lazyLoadType === le.AUTOMATIC), S = () => typeof e?.virtualScroll == "object" && e?.virtualScroll?.itemHeight ? e.virtualScroll.itemHeight : ps, {
|
|
1415
|
+
containerRef: n,
|
|
1395
1416
|
containerProps: u,
|
|
1396
1417
|
onScroll: l,
|
|
1397
1418
|
list: m,
|
|
@@ -1401,12 +1422,12 @@ const ns = /* @__PURE__ */ H(ls, [["render", as], ["__scopeId", "data-v-237dfc58
|
|
|
1401
1422
|
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1402
1423
|
disabled: e?.multiple || e?.virtualScroll === !1 || e?.lazyLoadType !== "none"
|
|
1403
1424
|
}), h = b(
|
|
1404
|
-
() => e.componentLoading !== void 0 ||
|
|
1425
|
+
() => e.componentLoading !== void 0 || a.value ? "true" : void 0
|
|
1405
1426
|
), R = b(
|
|
1406
|
-
() =>
|
|
1427
|
+
() => a.value && e.loading || e.componentLoading ? "true" : "false"
|
|
1407
1428
|
), x = b(
|
|
1408
|
-
() =>
|
|
1409
|
-
),
|
|
1429
|
+
() => a.value || e.componentLoading !== void 0 ? "polite" : void 0
|
|
1430
|
+
), k = b(
|
|
1410
1431
|
() => ({
|
|
1411
1432
|
"aria-label": e.ariaLabel,
|
|
1412
1433
|
"aria-busy": R.value,
|
|
@@ -1415,26 +1436,26 @@ const ns = /* @__PURE__ */ H(ls, [["render", as], ["__scopeId", "data-v-237dfc58
|
|
|
1415
1436
|
})
|
|
1416
1437
|
), $ = b(
|
|
1417
1438
|
() => e.componentLoading ? {
|
|
1418
|
-
...
|
|
1439
|
+
...k.value,
|
|
1419
1440
|
role: "alert"
|
|
1420
1441
|
} : {}
|
|
1421
|
-
), T = (
|
|
1422
|
-
t(
|
|
1442
|
+
), T = (U) => (se) => {
|
|
1443
|
+
t(U, se);
|
|
1423
1444
|
}, O = () => {
|
|
1424
1445
|
t(p.SHOW_MORE);
|
|
1425
|
-
}, D =
|
|
1426
|
-
const
|
|
1427
|
-
if (!
|
|
1446
|
+
}, D = ft(() => {
|
|
1447
|
+
const U = n.value;
|
|
1448
|
+
if (!U)
|
|
1428
1449
|
return;
|
|
1429
|
-
const se = Math.round(
|
|
1450
|
+
const se = Math.round(U.scrollTop) + U.clientHeight >= U.scrollHeight;
|
|
1430
1451
|
e.hasMoreItems && se && !e.loading && O();
|
|
1431
|
-
}),
|
|
1432
|
-
|
|
1433
|
-
}, re = b(() => e.items?.length === 0),
|
|
1452
|
+
}), z = () => {
|
|
1453
|
+
f.value ? D() : l();
|
|
1454
|
+
}, re = b(() => e.items?.length === 0), M = b(
|
|
1434
1455
|
() => e.lazyLoadType === le.BUTTON && e.hasMoreItems
|
|
1435
|
-
),
|
|
1436
|
-
() => e.loading ?
|
|
1437
|
-
), Z = b(() => e.loading ?
|
|
1456
|
+
), Y = b(
|
|
1457
|
+
() => e.loading ? Pe.LOADING : Pe.START
|
|
1458
|
+
), Z = b(() => e.loading ? i("loading") : i("showMore")), Ee = b(() => ({
|
|
1438
1459
|
...e.emptyState,
|
|
1439
1460
|
variant: "condensed"
|
|
1440
1461
|
})), Oe = {
|
|
@@ -1445,18 +1466,18 @@ const ns = /* @__PURE__ */ H(ls, [["render", as], ["__scopeId", "data-v-237dfc58
|
|
|
1445
1466
|
};
|
|
1446
1467
|
return {
|
|
1447
1468
|
// Refs
|
|
1448
|
-
listboxRef:
|
|
1469
|
+
listboxRef: n,
|
|
1449
1470
|
listboxItemRef: s,
|
|
1450
1471
|
// a11y
|
|
1451
|
-
ariaAttributes:
|
|
1472
|
+
ariaAttributes: k,
|
|
1452
1473
|
listboxContainerAttributes: $,
|
|
1453
1474
|
// Values
|
|
1454
1475
|
containerProps: u,
|
|
1455
1476
|
isSearchResultEmpty: re,
|
|
1456
1477
|
limitedEmptyStateProps: Ee,
|
|
1457
|
-
loadingButtonState:
|
|
1478
|
+
loadingButtonState: Y,
|
|
1458
1479
|
slots: o,
|
|
1459
|
-
shouldDisplayShowMoreButton:
|
|
1480
|
+
shouldDisplayShowMoreButton: M,
|
|
1460
1481
|
showMoreButtonText: Z,
|
|
1461
1482
|
virtualisedItems: m,
|
|
1462
1483
|
wrapperProps: C,
|
|
@@ -1464,13 +1485,13 @@ const ns = /* @__PURE__ */ H(ls, [["render", as], ["__scopeId", "data-v-237dfc58
|
|
|
1464
1485
|
BentoKeyboardNavigationKeyDownEvent: F,
|
|
1465
1486
|
BentoListboxEvent: p,
|
|
1466
1487
|
// Methods
|
|
1467
|
-
onListboxContainerScroll:
|
|
1488
|
+
onListboxContainerScroll: z,
|
|
1468
1489
|
onOptionSelected: T,
|
|
1469
1490
|
emitShowMore: O,
|
|
1470
1491
|
listboxListeners: Oe
|
|
1471
1492
|
};
|
|
1472
1493
|
}
|
|
1473
|
-
}),
|
|
1494
|
+
}), vs = ["id"], fs = {
|
|
1474
1495
|
key: 0,
|
|
1475
1496
|
class: "b-listbox__loading-filtered-items"
|
|
1476
1497
|
}, ys = {
|
|
@@ -1483,9 +1504,9 @@ const ns = /* @__PURE__ */ H(ls, [["render", as], ["__scopeId", "data-v-237dfc58
|
|
|
1483
1504
|
key: 3,
|
|
1484
1505
|
class: "b-listbox__lazy-load"
|
|
1485
1506
|
};
|
|
1486
|
-
function Cs(e, t, o, s, r,
|
|
1487
|
-
const
|
|
1488
|
-
return
|
|
1507
|
+
function Cs(e, t, o, s, r, i) {
|
|
1508
|
+
const a = _("bento-loading-indicator"), f = _("bento-empty-state"), S = _("bento-typography"), n = _("bento-listbox-multi-select"), u = _("bento-listbox-single-select"), l = _("bento-loading-button"), m = Ue("bento-keyboard-navigation-directive");
|
|
1509
|
+
return ne((d(), y("div", w({
|
|
1489
1510
|
id: e.id,
|
|
1490
1511
|
ref: "listboxRef",
|
|
1491
1512
|
class: "b-listbox",
|
|
@@ -1496,10 +1517,10 @@ function Cs(e, t, o, s, r, n) {
|
|
|
1496
1517
|
onScroll: t[0] || (t[0] = (...C) => e.onListboxContainerScroll && e.onListboxContainerScroll(...C))
|
|
1497
1518
|
}), [
|
|
1498
1519
|
G("div", oe(me(e.wrapperProps)), [
|
|
1499
|
-
e.componentLoading ? (d(), y("div",
|
|
1500
|
-
|
|
1520
|
+
e.componentLoading ? (d(), y("div", fs, [
|
|
1521
|
+
N(a)
|
|
1501
1522
|
])) : e.isSearchResultEmpty ? (d(), y("div", ys, [
|
|
1502
|
-
e.emptyState ? (d(),
|
|
1523
|
+
e.emptyState ? (d(), A(f, oe(w({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (d(), A(S, {
|
|
1503
1524
|
key: 1,
|
|
1504
1525
|
el: "span"
|
|
1505
1526
|
}, {
|
|
@@ -1509,7 +1530,7 @@ function Cs(e, t, o, s, r, n) {
|
|
|
1509
1530
|
_: 1
|
|
1510
1531
|
}))
|
|
1511
1532
|
])) : (d(), y(te, { key: 2 }, [
|
|
1512
|
-
e.multiple ? (d(),
|
|
1533
|
+
e.multiple ? (d(), A(n, w({
|
|
1513
1534
|
key: 0,
|
|
1514
1535
|
ref: "listboxItemRef",
|
|
1515
1536
|
"has-more-items": e.hasMoreItems
|
|
@@ -1520,14 +1541,14 @@ function Cs(e, t, o, s, r, n) {
|
|
|
1520
1541
|
"selected-values": e.selectedValue,
|
|
1521
1542
|
searching: e.searching,
|
|
1522
1543
|
"is-option-disabled": e.isOptionDisabled
|
|
1523
|
-
}, ee(e.listboxListeners)),
|
|
1544
|
+
}, ee(e.listboxListeners)), ge({ _: 2 }, [
|
|
1524
1545
|
j(e.slots, (C, h) => ({
|
|
1525
1546
|
name: h,
|
|
1526
1547
|
fn: L((R) => [
|
|
1527
1548
|
W(e.$slots, h, oe(me(R)), void 0, !0)
|
|
1528
1549
|
])
|
|
1529
1550
|
}))
|
|
1530
|
-
]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (d(),
|
|
1551
|
+
]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (d(), A(u, w({
|
|
1531
1552
|
key: 1,
|
|
1532
1553
|
ref: "listboxItemRef",
|
|
1533
1554
|
items: e.virtualisedItems
|
|
@@ -1535,7 +1556,7 @@ function Cs(e, t, o, s, r, n) {
|
|
|
1535
1556
|
"selected-value": e.selectedValue,
|
|
1536
1557
|
"static-categories": e.staticCategories,
|
|
1537
1558
|
"is-option-disabled": e.isOptionDisabled
|
|
1538
|
-
}, ee(e.listboxListeners)),
|
|
1559
|
+
}, ee(e.listboxListeners)), ge({ _: 2 }, [
|
|
1539
1560
|
j(e.slots, (C, h) => ({
|
|
1540
1561
|
name: h,
|
|
1541
1562
|
fn: L((R) => [
|
|
@@ -1544,7 +1565,7 @@ function Cs(e, t, o, s, r, n) {
|
|
|
1544
1565
|
}))
|
|
1545
1566
|
]), 1040, ["items", "selected-value", "static-categories", "is-option-disabled"])),
|
|
1546
1567
|
e.shouldDisplayShowMoreButton ? (d(), y("div", Ss, [
|
|
1547
|
-
|
|
1568
|
+
N(l, {
|
|
1548
1569
|
state: e.loadingButtonState,
|
|
1549
1570
|
variant: "secondary",
|
|
1550
1571
|
onClickCapture: e.emitShowMore
|
|
@@ -1555,15 +1576,15 @@ function Cs(e, t, o, s, r, n) {
|
|
|
1555
1576
|
_: 1
|
|
1556
1577
|
}, 8, ["state", "onClickCapture"])
|
|
1557
1578
|
])) : e.loading ? (d(), y("div", hs, [
|
|
1558
|
-
|
|
1579
|
+
N(a)
|
|
1559
1580
|
])) : q("", !0)
|
|
1560
1581
|
], 64))
|
|
1561
1582
|
], 16)
|
|
1562
|
-
], 16,
|
|
1583
|
+
], 16, vs)), [
|
|
1563
1584
|
[m]
|
|
1564
1585
|
]);
|
|
1565
1586
|
}
|
|
1566
|
-
const Vs = /* @__PURE__ */ H(
|
|
1587
|
+
const Vs = /* @__PURE__ */ H(gs, [["render", Cs], ["__scopeId", "data-v-ef1c27fa"]]), Le = (e, t) => {
|
|
1567
1588
|
for (const o of e) {
|
|
1568
1589
|
if (o.value === t)
|
|
1569
1590
|
return o;
|
|
@@ -1574,25 +1595,25 @@ const Vs = /* @__PURE__ */ H(vs, [["render", Cs], ["__scopeId", "data-v-ef1c27fa
|
|
|
1574
1595
|
}
|
|
1575
1596
|
}
|
|
1576
1597
|
return null;
|
|
1577
|
-
}, Es = (e) => typeof e == "object" && e !== null && "value" in e && "label" in e,
|
|
1578
|
-
const r =
|
|
1579
|
-
o.value ?
|
|
1580
|
-
},
|
|
1581
|
-
o.value ?
|
|
1598
|
+
}, Es = (e) => typeof e == "object" && e !== null && "value" in e && "label" in e, zs = (e, t, o, s) => {
|
|
1599
|
+
const r = I([]), i = I(), a = (u) => {
|
|
1600
|
+
o.value ? i.value = u.map(({ value: l }) => l) : i.value = u.length > 0 ? u[0].value : null;
|
|
1601
|
+
}, f = (u) => {
|
|
1602
|
+
o.value ? i.value = u.map(({ value: l, label: m }) => ({ value: l, label: m })) : i.value = u.length > 0 ? { value: u[0].value, label: u[0].label } : null;
|
|
1582
1603
|
}, S = (u) => {
|
|
1583
|
-
r.value = u, s?.value ?
|
|
1584
|
-
},
|
|
1585
|
-
r.value = [],
|
|
1604
|
+
r.value = u, s?.value ? f(u) : a(u);
|
|
1605
|
+
}, n = () => {
|
|
1606
|
+
r.value = [], i.value = null;
|
|
1586
1607
|
};
|
|
1587
|
-
return
|
|
1608
|
+
return fe(
|
|
1588
1609
|
() => t.value,
|
|
1589
1610
|
() => {
|
|
1590
1611
|
if (!t.value && t.value !== 0) {
|
|
1591
|
-
|
|
1612
|
+
n();
|
|
1592
1613
|
return;
|
|
1593
1614
|
}
|
|
1594
1615
|
const u = !Array.isArray(t.value), l = [...r.value];
|
|
1595
|
-
|
|
1616
|
+
n();
|
|
1596
1617
|
const m = (C) => {
|
|
1597
1618
|
if (Es(C))
|
|
1598
1619
|
r.value.push(C);
|
|
@@ -1603,29 +1624,29 @@ const Vs = /* @__PURE__ */ H(vs, [["render", Cs], ["__scopeId", "data-v-ef1c27fa
|
|
|
1603
1624
|
};
|
|
1604
1625
|
if (u) {
|
|
1605
1626
|
const C = t.value;
|
|
1606
|
-
m(C), s?.value ?
|
|
1627
|
+
m(C), s?.value ? f(r.value) : a(r.value);
|
|
1607
1628
|
return;
|
|
1608
1629
|
}
|
|
1609
|
-
t.value.forEach(m), s?.value ?
|
|
1630
|
+
t.value.forEach(m), s?.value ? f(r.value) : a(r.value);
|
|
1610
1631
|
},
|
|
1611
1632
|
{ immediate: !0 }
|
|
1612
1633
|
), {
|
|
1613
1634
|
// Values
|
|
1614
1635
|
cachedSelectedListboxOptions: r,
|
|
1615
|
-
cachedListboxSelectedValues:
|
|
1636
|
+
cachedListboxSelectedValues: i,
|
|
1616
1637
|
// Methods
|
|
1617
|
-
resetCache:
|
|
1638
|
+
resetCache: n,
|
|
1618
1639
|
setCachedValues: S
|
|
1619
1640
|
};
|
|
1620
1641
|
};
|
|
1621
1642
|
export {
|
|
1622
1643
|
p as B,
|
|
1623
|
-
|
|
1624
|
-
|
|
1644
|
+
Pt as C,
|
|
1645
|
+
_e as D,
|
|
1625
1646
|
le as a,
|
|
1626
1647
|
Vs as b,
|
|
1627
1648
|
rs as c,
|
|
1628
1649
|
We as d,
|
|
1629
|
-
|
|
1650
|
+
zs as u
|
|
1630
1651
|
};
|
|
1631
|
-
//# sourceMappingURL=use-cached-selected-values.
|
|
1652
|
+
//# sourceMappingURL=use-cached-selected-values.DIbfa5F1.js.map
|