@adyen/bento-vue2 1.90.0 → 1.92.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 +372 -236
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.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/checkbox-group.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- 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/error-message.css +1 -1
- package/dist/assets/field-label.css +1 -0
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/input-time.css +1 -1
- 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/assets/toggle.css +1 -1
- package/dist/assets/use-cached-selected-values.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.B63qIiiH.js → action-bar.ChuPTyQG.js} +3 -3
- package/dist/chunks/{action-bar.B63qIiiH.js.map → action-bar.ChuPTyQG.js.map} +1 -1
- package/dist/chunks/{ai-tag.CCJCOdXu.js → ai-tag.Dt8nijLW.js} +2 -2
- package/dist/chunks/{ai-tag.CCJCOdXu.js.map → ai-tag.Dt8nijLW.js.map} +1 -1
- package/dist/chunks/{alert.CXRb-Smf.js → alert.CLqcPN0Q.js} +73 -55
- package/dist/chunks/alert.CLqcPN0Q.js.map +1 -0
- package/dist/chunks/{base-modal.DpmeDmq-.js → base-modal.DMdzcBrq.js} +4 -4
- package/dist/chunks/base-modal.DMdzcBrq.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.ChTUOsZl.js → button-actions-with-menu.CXFziNUr.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.ChTUOsZl.js.map → button-actions-with-menu.CXFziNUr.js.map} +1 -1
- package/dist/chunks/{button-actions.BmU1DngD.js → button-actions.CXD6_9qN.js} +5 -5
- package/dist/chunks/button-actions.CXD6_9qN.js.map +1 -0
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
- package/dist/chunks/button.C9b2AC9w.js.map +1 -1
- package/dist/chunks/calendar.rZsIZPxm.js +1232 -0
- package/dist/chunks/calendar.rZsIZPxm.js.map +1 -0
- package/dist/chunks/{card.WWUfBkqf.js → card.Brma5kdb.js} +2 -2
- package/dist/chunks/card.Brma5kdb.js.map +1 -0
- package/dist/chunks/{checkbox-group.CI0xDnql.js → checkbox-group.DWZvFkjz.js} +6 -6
- package/dist/chunks/checkbox-group.DWZvFkjz.js.map +1 -0
- package/dist/chunks/{checkbox.TsWA6O3Z.js → checkbox.BZP0wtnE.js} +20 -22
- package/dist/chunks/checkbox.BZP0wtnE.js.map +1 -0
- package/dist/chunks/{click-outside.CDz_x8mN.js → click-outside.BG01Sm0A.js} +2 -2
- package/dist/chunks/{click-outside.CDz_x8mN.js.map → click-outside.BG01Sm0A.js.map} +1 -1
- package/dist/chunks/{code-snippet.4DX9iUV8.js → code-snippet.DHAymIXp.js} +3 -3
- package/dist/chunks/code-snippet.DHAymIXp.js.map +1 -0
- package/dist/chunks/constructNow.CK0ryPil.js +8 -0
- package/dist/chunks/{constructNow.CIc7d13I.js.map → constructNow.CK0ryPil.js.map} +1 -1
- package/dist/chunks/{controls-group.D_KE99mg.js → controls-group.DSm2Ujwt.js} +2 -2
- package/dist/chunks/{controls-group.D_KE99mg.js.map → controls-group.DSm2Ujwt.js.map} +1 -1
- package/dist/chunks/country.types.jjXwaoMl.js.map +1 -1
- package/dist/chunks/{dashboard-section.TWlLdQHG.js → dashboard-section.D9rS8myE.js} +2 -2
- package/dist/chunks/{dashboard-section.TWlLdQHG.js.map → dashboard-section.D9rS8myE.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CpDuQ3Fo.js → dashed-underline.D_FhFRXM.js} +2 -2
- package/dist/chunks/{dashed-underline.CpDuQ3Fo.js.map → dashed-underline.D_FhFRXM.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DZaE-kOS.js → data-grid-template.CRijG20n.js} +2 -2
- package/dist/chunks/{data-grid-template.DZaE-kOS.js.map → data-grid-template.CRijG20n.js.map} +1 -1
- package/dist/chunks/{data-grid.x6cEW0az.js → data-grid.hMM9F36T.js} +540 -538
- package/dist/chunks/data-grid.hMM9F36T.js.map +1 -0
- package/dist/chunks/date-picker.BSo6Cvum.js +237 -0
- package/dist/chunks/date-picker.BSo6Cvum.js.map +1 -0
- package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/date-range-picker.D90k5b8p.js +1097 -0
- package/dist/chunks/date-range-picker.D90k5b8p.js.map +1 -0
- package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/{de.BJvo6njq.js → de.pvjpUJ1o.js} +2 -2
- package/dist/chunks/{de.BJvo6njq.js.map → de.pvjpUJ1o.js.map} +1 -1
- package/dist/chunks/{differenceInMonths.CIYECBxK.js → differenceInMonths.CpwVtHZX.js} +3 -2
- package/dist/chunks/{differenceInMonths.CIYECBxK.js.map → differenceInMonths.CpwVtHZX.js.map} +1 -1
- package/dist/chunks/{directive.rXUeDb8p.js → directive.Bfr4fuOy.js} +2 -2
- package/dist/chunks/{directive.rXUeDb8p.js.map → directive.Bfr4fuOy.js.map} +1 -1
- package/dist/{draggable-handle.js → chunks/draggable-handle.BR_aQH5N.js} +49 -40
- package/dist/chunks/draggable-handle.BR_aQH5N.js.map +1 -0
- package/dist/chunks/{dropdown-tag.t3FlJUSy.js → dropdown-tag.z3rsxbpW.js} +4 -4
- package/dist/chunks/dropdown-tag.z3rsxbpW.js.map +1 -0
- package/dist/chunks/dropdown.BYJwx-JD.js +1148 -0
- package/dist/chunks/dropdown.BYJwx-JD.js.map +1 -0
- package/dist/chunks/{en-GB.C3-QUpva.js → en-GB.-Q7Oq-nY.js} +2 -2
- package/dist/chunks/{en-GB.C3-QUpva.js.map → en-GB.-Q7Oq-nY.js.map} +1 -1
- package/dist/chunks/{en-US.YeSsZuOc.js → en-US.BK5uiAND.js} +5 -5
- package/dist/chunks/{en-US.YeSsZuOc.js.map → en-US.BK5uiAND.js.map} +1 -1
- package/dist/chunks/error-message.CyERcfdt.js +72 -0
- package/dist/chunks/error-message.CyERcfdt.js.map +1 -0
- package/dist/chunks/{es.DyUjjSL8.js → es.2H4LvTyV.js} +2 -2
- package/dist/chunks/{es.DyUjjSL8.js.map → es.2H4LvTyV.js.map} +1 -1
- package/dist/chunks/field-label.DjjjkcO6.js +97 -0
- package/dist/chunks/field-label.DjjjkcO6.js.map +1 -0
- package/dist/chunks/{file-uploader.Cig5gDXT.js → file-uploader.Djl0xaDN.js} +4 -4
- package/dist/chunks/{file-uploader.Cig5gDXT.js.map → file-uploader.Djl0xaDN.js.map} +1 -1
- package/dist/chunks/{filter-bar.x445KK3y.js → filter-bar.C9rWMIWO.js} +899 -882
- package/dist/chunks/filter-bar.C9rWMIWO.js.map +1 -0
- package/dist/chunks/{footer-actions.CIkul1OD.js → footer-actions.D9mHwk5l.js} +2 -2
- package/dist/chunks/{footer-actions.CIkul1OD.js.map → footer-actions.D9mHwk5l.js.map} +1 -1
- package/dist/chunks/{form-layout-title.DR5M7GP3.js → form-layout-title.zZVLCyqe.js} +71 -62
- package/dist/chunks/form-layout-title.zZVLCyqe.js.map +1 -0
- package/dist/chunks/{fr.JD_4GwS8.js → fr.Cu0IIfBP.js} +2 -2
- package/dist/chunks/{fr.JD_4GwS8.js.map → fr.Cu0IIfBP.js.map} +1 -1
- package/dist/chunks/{header-meta.BC5fdpD1.js → header-meta.BSPnWWmi.js} +14 -14
- package/dist/chunks/{header-meta.BC5fdpD1.js.map → header-meta.BSPnWWmi.js.map} +1 -1
- package/dist/chunks/{header-with-views.-cvdi9-L.js → header-with-views.g6J7x6l2.js} +10 -10
- package/dist/chunks/{header-with-views.-cvdi9-L.js.map → header-with-views.g6J7x6l2.js.map} +1 -1
- package/dist/chunks/{header.DtmZjxiU.js → header.DyZG7qWe.js} +3 -3
- package/dist/chunks/header.DyZG7qWe.js.map +1 -0
- package/dist/chunks/{input-field-password.Bdlw4dzr.js → input-field-password.CiDdI6A_.js} +4 -4
- package/dist/chunks/input-field-password.CiDdI6A_.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.DPuWxBBz.js → input-field-phone-number.DFS58acU.js} +3 -3
- package/dist/chunks/{input-field-phone-number.DPuWxBBz.js.map → input-field-phone-number.DFS58acU.js.map} +1 -1
- package/dist/chunks/input-field.CGLjYab8.js +222 -0
- package/dist/chunks/input-field.CGLjYab8.js.map +1 -0
- package/dist/chunks/input-time.BhAUyKZM.js +135 -0
- package/dist/chunks/input-time.BhAUyKZM.js.map +1 -0
- package/dist/chunks/isSameWeek.TrpUOIn5.js +14 -0
- package/dist/chunks/{isSameWeek.CzBCmu7d.js.map → isSameWeek.TrpUOIn5.js.map} +1 -1
- package/dist/chunks/{it.BlUnV-yA.js → it.B65snrJA.js} +3 -3
- package/dist/chunks/{it.BlUnV-yA.js.map → it.B65snrJA.js.map} +1 -1
- package/dist/chunks/{ja.nUwDmVf2.js → ja.xGVfFSzL.js} +2 -2
- package/dist/chunks/{ja.nUwDmVf2.js.map → ja.xGVfFSzL.js.map} +1 -1
- package/dist/chunks/link.DB5g6d48.js.map +1 -1
- package/dist/chunks/{modal-fullscreen.CaxuXW-H.js → modal-fullscreen.De6mevyD.js} +2 -2
- package/dist/chunks/{modal-fullscreen.CaxuXW-H.js.map → modal-fullscreen.De6mevyD.js.map} +1 -1
- package/dist/chunks/{modal.Brif0vAy.js → modal.BXxwn9H4.js} +93 -91
- package/dist/chunks/{modal.Brif0vAy.js.map → modal.BXxwn9H4.js.map} +1 -1
- package/dist/chunks/on-click-outside.Cy1eFULD.js +109 -0
- package/dist/chunks/on-click-outside.Cy1eFULD.js.map +1 -0
- package/dist/chunks/{pagination.BmrU_sn_.js → pagination.BzsKZFnw.js} +37 -37
- package/dist/chunks/{pagination.BmrU_sn_.js.map → pagination.BzsKZFnw.js.map} +1 -1
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
- package/dist/chunks/popover.types.hA13DZPg.js.map +1 -1
- package/dist/chunks/popper-container.C_n9Ds1W.js.map +1 -1
- package/dist/chunks/promo-banner.Dc_kK1x9.js.map +1 -1
- package/dist/chunks/{pt-BR.BCU2Hj36.js → pt-BR.D9FuAQZm.js} +2 -2
- package/dist/chunks/{pt-BR.BCU2Hj36.js.map → pt-BR.D9FuAQZm.js.map} +1 -1
- package/dist/chunks/{radio-group.5oS-AeYN.js → radio-group.Bb-L-0io.js} +3 -3
- package/dist/chunks/radio-group.Bb-L-0io.js.map +1 -0
- package/dist/chunks/{rich-text-editor.DSGTe8Zt.js → rich-text-editor.DPpIzYid.js} +7 -6
- package/dist/chunks/{rich-text-editor.DSGTe8Zt.js.map → rich-text-editor.DPpIzYid.js.map} +1 -1
- package/dist/chunks/{search-bar.CNfoeLLt.js → search-bar.BEOieKeA.js} +4 -4
- package/dist/chunks/{search-bar.CNfoeLLt.js.map → search-bar.BEOieKeA.js.map} +1 -1
- package/dist/chunks/{secondary-nav.IF5CgeIP.js → secondary-nav.BBL5zZPK.js} +2 -2
- package/dist/chunks/{secondary-nav.IF5CgeIP.js.map → secondary-nav.BBL5zZPK.js.map} +1 -1
- package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
- package/dist/chunks/{selection-card-group.DZjFeQKR.js → selection-card-group.CLJPaknG.js} +10 -10
- package/dist/chunks/{selection-card-group.DZjFeQKR.js.map → selection-card-group.CLJPaknG.js.map} +1 -1
- package/dist/chunks/{sidepanel.DZDXuyzg.js → sidepanel.nW0Bhk_u.js} +4 -4
- package/dist/chunks/{sidepanel.DZDXuyzg.js.map → sidepanel.nW0Bhk_u.js.map} +1 -1
- package/dist/chunks/{startOfWeek.CXhhX-R7.js → startOfWeek.Br5KM4z_.js} +2 -2
- package/dist/chunks/{startOfWeek.CXhhX-R7.js.map → startOfWeek.Br5KM4z_.js.map} +1 -1
- package/dist/chunks/status.types.Dx8MDhEH.js.map +1 -1
- package/dist/chunks/{summary-grid.types.CrPNQbX0.js → summary-grid.types.Dp_efYVN.js} +2 -2
- package/dist/chunks/{summary-grid.types.CrPNQbX0.js.map → summary-grid.types.Dp_efYVN.js.map} +1 -1
- package/dist/chunks/tag.D2xagTJv.js.map +1 -1
- package/dist/chunks/{textarea.Bi53QF5Q.js → textarea.CJS-1I41.js} +5 -4
- package/dist/chunks/textarea.CJS-1I41.js.map +1 -0
- package/dist/chunks/{timeline-item.C6Bi0eam.js → timeline-item.CF9jbIRr.js} +5 -5
- package/dist/chunks/timeline-item.CF9jbIRr.js.map +1 -0
- package/dist/chunks/{toggle.B1z1YPe_.js → toggle.Ca-MM3dt.js} +3 -5
- package/dist/chunks/toggle.Ca-MM3dt.js.map +1 -0
- package/dist/chunks/tooltip.BxtnF3is.js.map +1 -1
- package/dist/chunks/{tutorial.BCiZMLJE.js → tutorial.CoWDVs7_.js} +2 -2
- package/dist/chunks/{tutorial.BCiZMLJE.js.map → tutorial.CoWDVs7_.js.map} +1 -1
- package/dist/chunks/typography.C8lPlsbD.js.map +1 -1
- package/dist/chunks/use-cached-selected-values.Du8-wWR2.js +1520 -0
- package/dist/chunks/use-cached-selected-values.Du8-wWR2.js.map +1 -0
- package/dist/chunks/{use-date-input-formatter.DRMt9yR2.js → use-date-input-formatter.ibZeLD_V.js} +4 -4
- package/dist/chunks/{use-date-input-formatter.DRMt9yR2.js.map → use-date-input-formatter.ibZeLD_V.js.map} +1 -1
- package/dist/chunks/use-touch-device.DTqFAbXh.js +11 -0
- package/dist/chunks/use-touch-device.DTqFAbXh.js.map +1 -0
- package/dist/chunks/{zh-CN.ChYkuQAR.js → zh-CN.Be4pa3-g.js} +3 -3
- package/dist/chunks/{zh-CN.ChYkuQAR.js.map → zh-CN.Be4pa3-g.js.map} +1 -1
- package/dist/click-outside.js +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/draggable.js +1396 -0
- package/dist/draggable.js.map +1 -0
- package/dist/dropdown.js +11 -12
- package/dist/dropdown.js.map +1 -1
- 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 +274 -271
- package/dist/index.js.map +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/internal.js +24 -23
- package/dist/internal.js.map +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/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/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +144 -7
- package/package.json +8 -13
- package/dist/assets/dropdown-default-textbox.css +0 -1
- package/dist/chunks/alert.CXRb-Smf.js.map +0 -1
- package/dist/chunks/base-modal.DpmeDmq-.js.map +0 -1
- package/dist/chunks/button-actions.BmU1DngD.js.map +0 -1
- package/dist/chunks/calendar.uvIGF_jU.js +0 -1154
- package/dist/chunks/calendar.uvIGF_jU.js.map +0 -1
- package/dist/chunks/card.WWUfBkqf.js.map +0 -1
- package/dist/chunks/checkbox-group.CI0xDnql.js.map +0 -1
- package/dist/chunks/checkbox.TsWA6O3Z.js.map +0 -1
- package/dist/chunks/code-snippet.4DX9iUV8.js.map +0 -1
- package/dist/chunks/constructNow.CIc7d13I.js +0 -8
- package/dist/chunks/data-grid.x6cEW0az.js.map +0 -1
- package/dist/chunks/date-picker.Dln8ocL4.js +0 -222
- package/dist/chunks/date-picker.Dln8ocL4.js.map +0 -1
- package/dist/chunks/date-range-picker.DPGy2h-9.js +0 -1068
- package/dist/chunks/date-range-picker.DPGy2h-9.js.map +0 -1
- package/dist/chunks/debounce.DUTu11PS.js +0 -10
- package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.CjhLIxVq.js +0 -364
- package/dist/chunks/dropdown-default-textbox.CjhLIxVq.js.map +0 -1
- package/dist/chunks/dropdown-tag.t3FlJUSy.js.map +0 -1
- package/dist/chunks/dropdown.CvNI2V33.js +0 -790
- package/dist/chunks/dropdown.CvNI2V33.js.map +0 -1
- package/dist/chunks/error-message.BUNKRa_w.js +0 -160
- package/dist/chunks/error-message.BUNKRa_w.js.map +0 -1
- package/dist/chunks/filter-bar.x445KK3y.js.map +0 -1
- package/dist/chunks/form-layout-title.DR5M7GP3.js.map +0 -1
- package/dist/chunks/header.DtmZjxiU.js.map +0 -1
- package/dist/chunks/input-field-password.Bdlw4dzr.js.map +0 -1
- package/dist/chunks/input-field.DH25CU_G.js +0 -207
- package/dist/chunks/input-field.DH25CU_G.js.map +0 -1
- package/dist/chunks/input-time.6eJ4-QdU.js +0 -92
- package/dist/chunks/input-time.6eJ4-QdU.js.map +0 -1
- package/dist/chunks/isSameWeek.CzBCmu7d.js +0 -14
- package/dist/chunks/on-click-outside.BW4rkhzG.js +0 -91
- package/dist/chunks/on-click-outside.BW4rkhzG.js.map +0 -1
- package/dist/chunks/radio-group.5oS-AeYN.js.map +0 -1
- package/dist/chunks/textarea.Bi53QF5Q.js.map +0 -1
- package/dist/chunks/timeline-item.C6Bi0eam.js.map +0 -1
- package/dist/chunks/toggle.B1z1YPe_.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.Bn3Y8Iuq.js +0 -1450
- package/dist/chunks/use-cached-selected-values.Bn3Y8Iuq.js.map +0 -1
- package/dist/chunks/warning-filled.CbJ1pcB2.js +0 -24
- package/dist/chunks/warning-filled.CbJ1pcB2.js.map +0 -1
- package/dist/draggable-handle.js.map +0 -1
|
@@ -1,1450 +0,0 @@
|
|
|
1
|
-
import { computed as n, ref as x, onMounted as Ne, onUnmounted as we, watch as X, defineComponent as G, nextTick as _e, toRef as H, useSlots as Ge, useAttrs as Pe } from "vue";
|
|
2
|
-
import { B as M, a as se } from "./keyboard-navigation.DWmhelVv.js";
|
|
3
|
-
import { B as j } from "./typography.C8lPlsbD.js";
|
|
4
|
-
import { B as Fe } from "./loading-indicator.PxbRzshH.js";
|
|
5
|
-
import { B as Ye } from "./empty-state.DMV23IZy.js";
|
|
6
|
-
import { u as le } from "./index.B6WW_F-J.js";
|
|
7
|
-
import { d as ze } from "./debounce.DUTu11PS.js";
|
|
8
|
-
import { o as Ue } from "./resize.Bqks3WUm.js";
|
|
9
|
-
import "./index.Cl4_42j5.js";
|
|
10
|
-
import { C as J, N as Ve } from "./minus-small.DJacLGTw.js";
|
|
11
|
-
import { C as We } from "./checkmark-small.DVDtD4HQ.js";
|
|
12
|
-
/* empty css */
|
|
13
|
-
import { n as N } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
14
|
-
import { B as Ke } from "./chip.BFY_-VCz.js";
|
|
15
|
-
import { C as je } from "./chevron-down.eYtgv5ly.js";
|
|
16
|
-
import { C as qe } from "./chevron-up.d8cwIlA_.js";
|
|
17
|
-
import { g as be } from "./generate-uid.NJ8tVoha.js";
|
|
18
|
-
import { a as He, b as fe } from "./button-actions.BmU1DngD.js";
|
|
19
|
-
import "../assets/use-cached-selected-values.css";
|
|
20
|
-
const pe = (s, e, l, t) => {
|
|
21
|
-
const o = n(
|
|
22
|
-
() => {
|
|
23
|
-
var f, A;
|
|
24
|
-
return !!((f = s.value) != null && f.length) && ((A = s.value) == null ? void 0 : A.length) === e.value.length;
|
|
25
|
-
}
|
|
26
|
-
), a = n(() => {
|
|
27
|
-
var f;
|
|
28
|
-
return s.value == null || s.value.length === 0 ? !1 : ((f = s.value) == null ? void 0 : f.length) !== e.value.length;
|
|
29
|
-
});
|
|
30
|
-
return {
|
|
31
|
-
isAllSelected: o,
|
|
32
|
-
isIndeterminate: a,
|
|
33
|
-
toggleSelectAll: (f) => {
|
|
34
|
-
f ? l() : t();
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
function Xe(s, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: o }) {
|
|
39
|
-
const a = x(null), r = x([]), f = x(0), A = x(0), d = x(0);
|
|
40
|
-
let b;
|
|
41
|
-
const T = n(() => {
|
|
42
|
-
const I = typeof l == "number" ? s.value.length * l : s.value.reduce((S, v, y) => S + l(y), 0), O = typeof l == "number" ? f.value * l : s.value.slice(0, f.value).reduce((S, v, y) => S + l(y), 0);
|
|
43
|
-
return {
|
|
44
|
-
style: {
|
|
45
|
-
marginTop: `${O}px`,
|
|
46
|
-
height: `${I - O}px`
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
}), _ = () => {
|
|
50
|
-
const I = (o == null ? void 0 : o.value) ?? 0, O = Math.max(a.value.scrollTop - I, 0);
|
|
51
|
-
if (typeof l == "number")
|
|
52
|
-
return Math.floor(O / l);
|
|
53
|
-
let S = 0, v = 0;
|
|
54
|
-
for (let y = 0; y < s.value.length; y += 1) {
|
|
55
|
-
const D = l(y);
|
|
56
|
-
if (S += D, S >= O) {
|
|
57
|
-
v = y;
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return v;
|
|
62
|
-
}, p = () => {
|
|
63
|
-
if (d.value = a.value.clientHeight, typeof l == "number")
|
|
64
|
-
return Math.ceil(d.value / l);
|
|
65
|
-
const I = f.value ?? 0;
|
|
66
|
-
let O = 0, S = 0;
|
|
67
|
-
for (let v = I; v < s.value.length; v += 1) {
|
|
68
|
-
const y = l(v);
|
|
69
|
-
if (O += y, S = v, O > d.value)
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
return S - I;
|
|
73
|
-
}, C = () => {
|
|
74
|
-
if (a.value) {
|
|
75
|
-
const I = p();
|
|
76
|
-
f.value = _(), A.value = Math.min(f.value + I + t, s.value.length), r.value = s.value.slice(f.value, A.value);
|
|
77
|
-
}
|
|
78
|
-
}, R = () => {
|
|
79
|
-
C();
|
|
80
|
-
};
|
|
81
|
-
e || (Ne(() => {
|
|
82
|
-
a.value && (d.value = a.value.clientHeight, b = Ue(a.value, ({ clientHeight: I }) => {
|
|
83
|
-
d.value = I, C();
|
|
84
|
-
}), C());
|
|
85
|
-
}), we(() => {
|
|
86
|
-
b == null || b.disconnect();
|
|
87
|
-
}), X(
|
|
88
|
-
() => s.value,
|
|
89
|
-
() => {
|
|
90
|
-
C();
|
|
91
|
-
}
|
|
92
|
-
));
|
|
93
|
-
const B = {
|
|
94
|
-
ref: a,
|
|
95
|
-
style: { overflowY: "auto" }
|
|
96
|
-
};
|
|
97
|
-
return e ? {
|
|
98
|
-
containerRef: a,
|
|
99
|
-
containerProps: B,
|
|
100
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
101
|
-
onScroll: () => {
|
|
102
|
-
},
|
|
103
|
-
list: s
|
|
104
|
-
} : {
|
|
105
|
-
containerRef: a,
|
|
106
|
-
containerProps: B,
|
|
107
|
-
onScroll: R,
|
|
108
|
-
list: r,
|
|
109
|
-
wrapperProps: T
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
var c = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.SHOW_MORE = "show-more", s.ESCAPE = "escape-pressed", s.CLICK = "click", s.ENTER = "enter-pressed", s.SPACE = "space-pressed", s.TAB = "tab-pressed", s.CLOSE_DROPDOWN = "close-dropdown", s))(c || {}), K = /* @__PURE__ */ ((s) => (s.AUTOMATIC = "automatic", s.BUTTON = "button", s.NONE = "none", s))(K || {});
|
|
113
|
-
const Je = G({
|
|
114
|
-
name: "bento-listbox-static-category",
|
|
115
|
-
components: {
|
|
116
|
-
BentoTypography: j
|
|
117
|
-
},
|
|
118
|
-
props: {
|
|
119
|
-
/**
|
|
120
|
-
* Category label text
|
|
121
|
-
*/
|
|
122
|
-
categoryLabel: {
|
|
123
|
-
type: String,
|
|
124
|
-
required: !0
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
var Ze = function() {
|
|
129
|
-
var e = this, l = e._self._c;
|
|
130
|
-
return e._self._setupProxy, l("div", { staticClass: "b-listbox-single-select-category", attrs: { role: "group", "aria-label": e.categoryLabel } }, [l("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span", "aria-hidden": "true" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), l("div", [e._t("default")], 2)], 1);
|
|
131
|
-
}, Qe = [], et = /* @__PURE__ */ N(
|
|
132
|
-
Je,
|
|
133
|
-
Ze,
|
|
134
|
-
Qe,
|
|
135
|
-
!1,
|
|
136
|
-
null,
|
|
137
|
-
"bfbc1649"
|
|
138
|
-
);
|
|
139
|
-
const tt = et.exports, st = G({
|
|
140
|
-
name: "bento-listbox-option",
|
|
141
|
-
props: {
|
|
142
|
-
/**
|
|
143
|
-
* Setting this property to true will disable the option.
|
|
144
|
-
*/
|
|
145
|
-
disabled: { type: Boolean, default: !1 },
|
|
146
|
-
/**
|
|
147
|
-
* Indicates if the value is selected. Only one element can be selected at a time.
|
|
148
|
-
*/
|
|
149
|
-
selected: { type: Boolean, default: !1 }
|
|
150
|
-
},
|
|
151
|
-
emits: [c.CLICK, c.ENTER, c.SPACE, c.TAB],
|
|
152
|
-
setup(s, { emit: e }) {
|
|
153
|
-
const l = n(() => ({
|
|
154
|
-
"b-listbox-option--disabled": s.disabled,
|
|
155
|
-
"b-listbox-option--selected": s.selected
|
|
156
|
-
}));
|
|
157
|
-
return {
|
|
158
|
-
// Enums
|
|
159
|
-
BentoKeyboardNavigationKeyDownEvent: M,
|
|
160
|
-
BentoListboxEvent: c,
|
|
161
|
-
// Values
|
|
162
|
-
conditionalClasses: l,
|
|
163
|
-
// Events
|
|
164
|
-
onClick: (a) => {
|
|
165
|
-
e(c.CLICK, a);
|
|
166
|
-
},
|
|
167
|
-
onOptionSelected: (a, r) => {
|
|
168
|
-
e(a, r);
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
var lt = function() {
|
|
174
|
-
var e = this, l = e._self._c;
|
|
175
|
-
return e._self._setupProxy, l("div", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(t) {
|
|
176
|
-
return !t.type.indexOf("key") && e._k(t.keyCode, "enter", 13, t.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, t);
|
|
177
|
-
}, function(t) {
|
|
178
|
-
return !t.type.indexOf("key") && e._k(t.keyCode, "space", 32, t.key, [" ", "Spacebar"]) ? null : e.onOptionSelected(e.BentoListboxEvent.SPACE, t);
|
|
179
|
-
}, function(t) {
|
|
180
|
-
return !t.type.indexOf("key") && e._k(t.keyCode, "tab", 9, t.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, t);
|
|
181
|
-
}] } }, "div", e.$attrs, !1), [e._t("default")], 2);
|
|
182
|
-
}, ot = [], at = /* @__PURE__ */ N(
|
|
183
|
-
st,
|
|
184
|
-
lt,
|
|
185
|
-
ot,
|
|
186
|
-
!1,
|
|
187
|
-
null,
|
|
188
|
-
"c345b6c0"
|
|
189
|
-
);
|
|
190
|
-
const Z = at.exports;
|
|
191
|
-
let me = 0;
|
|
192
|
-
const nt = {
|
|
193
|
-
beforeCreate() {
|
|
194
|
-
this.uuid = me.toString(), me += 1;
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
var it = function() {
|
|
198
|
-
var e = this, l = e._self._c;
|
|
199
|
-
return l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z" } })]);
|
|
200
|
-
}, ct = [], rt = /* @__PURE__ */ N(
|
|
201
|
-
nt,
|
|
202
|
-
it,
|
|
203
|
-
ct,
|
|
204
|
-
!1,
|
|
205
|
-
null,
|
|
206
|
-
null
|
|
207
|
-
);
|
|
208
|
-
const ut = rt.exports, dt = G({
|
|
209
|
-
name: "bento-listbox-single-select-option",
|
|
210
|
-
components: {
|
|
211
|
-
BentoListboxOption: Z,
|
|
212
|
-
BentoTypography: j,
|
|
213
|
-
CheckmarkIcon: ut
|
|
214
|
-
},
|
|
215
|
-
props: {
|
|
216
|
-
/**
|
|
217
|
-
* Setting this property to true will disable the option.
|
|
218
|
-
*/
|
|
219
|
-
disabled: { type: Boolean, default: !1 },
|
|
220
|
-
/**
|
|
221
|
-
* The option item that contains all the option item's data.
|
|
222
|
-
* @type {BentoListboxOptionItem}
|
|
223
|
-
*/
|
|
224
|
-
option: {
|
|
225
|
-
type: Object,
|
|
226
|
-
required: !0
|
|
227
|
-
},
|
|
228
|
-
/**
|
|
229
|
-
* Indicates if the value is selected. Only one element can be selected at a time.
|
|
230
|
-
*/
|
|
231
|
-
selected: { type: Boolean, default: !1 }
|
|
232
|
-
},
|
|
233
|
-
emits: [c.ENTER, c.SELECT, c.SPACE, c.TAB],
|
|
234
|
-
setup(s, { emit: e }) {
|
|
235
|
-
const l = (r) => {
|
|
236
|
-
s.disabled || e(r, s.option);
|
|
237
|
-
}, t = n(() => s.disabled ? !0 : null), o = n(() => s.selected ? !0 : null), a = n(() => s.disabled ? -1 : 0);
|
|
238
|
-
return {
|
|
239
|
-
// Values
|
|
240
|
-
ariaDisabled: t,
|
|
241
|
-
ariaSelected: o,
|
|
242
|
-
tabIndex: a,
|
|
243
|
-
// Enums
|
|
244
|
-
BentoListboxEvent: c,
|
|
245
|
-
// Events
|
|
246
|
-
onOptionSelected: l
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
var bt = function() {
|
|
251
|
-
var e = this, l = e._self._c;
|
|
252
|
-
return e._self._setupProxy, l("bento-listbox-option", { staticClass: "b-listbox-single-select-option", attrs: { disabled: e.disabled, selected: e.selected, "aria-selected": e.ariaSelected, "aria-disabled": e.ariaDisabled, tabindex: e.tabIndex }, on: { click: function(t) {
|
|
253
|
-
return e.onOptionSelected(e.BentoListboxEvent.SELECT);
|
|
254
|
-
}, "enter-pressed": function(t) {
|
|
255
|
-
return e.onOptionSelected(e.BentoListboxEvent.ENTER);
|
|
256
|
-
}, "space-pressed": function(t) {
|
|
257
|
-
return t.preventDefault(), e.onOptionSelected(e.BentoListboxEvent.SPACE);
|
|
258
|
-
}, "tab-pressed": function(t) {
|
|
259
|
-
return e.onOptionSelected(e.BentoListboxEvent.TAB);
|
|
260
|
-
} } }, [e._t("default", function() {
|
|
261
|
-
return [l("span", { staticClass: "b-listbox-single-select-option__text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? l("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
|
|
262
|
-
}, null, e.option), l("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [l("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
|
|
263
|
-
}, ft = [], mt = /* @__PURE__ */ N(
|
|
264
|
-
dt,
|
|
265
|
-
bt,
|
|
266
|
-
ft,
|
|
267
|
-
!1,
|
|
268
|
-
null,
|
|
269
|
-
"bb14d75a"
|
|
270
|
-
);
|
|
271
|
-
const vt = mt.exports, ye = ({ items: s }, e) => {
|
|
272
|
-
const l = n(() => s.value.length - 1), t = x(0), o = (_) => {
|
|
273
|
-
switch (_) {
|
|
274
|
-
case "increase":
|
|
275
|
-
t.value += 1;
|
|
276
|
-
break;
|
|
277
|
-
case "decrease":
|
|
278
|
-
t.value -= 1;
|
|
279
|
-
break;
|
|
280
|
-
}
|
|
281
|
-
}, a = ({ edgeCaseItem: _ }, p) => {
|
|
282
|
-
t.value !== _ && (o(p), e(t.value));
|
|
283
|
-
}, r = (_) => {
|
|
284
|
-
T(_), a(
|
|
285
|
-
{
|
|
286
|
-
edgeCaseItem: l.value
|
|
287
|
-
},
|
|
288
|
-
"increase"
|
|
289
|
-
/* INCREASE */
|
|
290
|
-
);
|
|
291
|
-
}, f = (_) => {
|
|
292
|
-
T(_), a(
|
|
293
|
-
{
|
|
294
|
-
edgeCaseItem: 0
|
|
295
|
-
},
|
|
296
|
-
"decrease"
|
|
297
|
-
/* DECREASE */
|
|
298
|
-
);
|
|
299
|
-
}, A = () => {
|
|
300
|
-
t.value = 0, e(t.value);
|
|
301
|
-
}, d = () => {
|
|
302
|
-
t.value = l.value, e(t.value);
|
|
303
|
-
}, b = (_) => {
|
|
304
|
-
t.value = _;
|
|
305
|
-
}, T = (_) => {
|
|
306
|
-
var p;
|
|
307
|
-
(p = _ == null ? void 0 : _.detail) == null || p.preventDefault();
|
|
308
|
-
};
|
|
309
|
-
return {
|
|
310
|
-
moveToFirstElement: A,
|
|
311
|
-
moveToLastElement: d,
|
|
312
|
-
moveToNextElement: r,
|
|
313
|
-
moveToPreviousElement: f,
|
|
314
|
-
setListboxFocusedIndex: b,
|
|
315
|
-
preventDefault: T,
|
|
316
|
-
focusedIndex: t
|
|
317
|
-
};
|
|
318
|
-
}, he = (s, e, l = x("option"), t = !0) => {
|
|
319
|
-
const o = x([]), a = async () => {
|
|
320
|
-
if (!s.value || s.value.nodeType === Node.COMMENT_NODE)
|
|
321
|
-
return;
|
|
322
|
-
const r = Array.from(s.value.querySelectorAll(`[role="${l.value}"]`));
|
|
323
|
-
o.value = t ? r.filter((f) => f.checkVisibility()) : r;
|
|
324
|
-
};
|
|
325
|
-
return X(
|
|
326
|
-
e,
|
|
327
|
-
() => {
|
|
328
|
-
_e(() => {
|
|
329
|
-
a();
|
|
330
|
-
});
|
|
331
|
-
},
|
|
332
|
-
{ immediate: !0 }
|
|
333
|
-
), {
|
|
334
|
-
visibleDomOptions: o,
|
|
335
|
-
updateVisibleDomOptions: a
|
|
336
|
-
};
|
|
337
|
-
}, gt = G({
|
|
338
|
-
name: "bento-listbox-single-select",
|
|
339
|
-
components: {
|
|
340
|
-
BentoListboxSingleSelectCategory: tt,
|
|
341
|
-
BentoListboxSingleSelectOption: vt
|
|
342
|
-
},
|
|
343
|
-
directives: { BentoKeyboardNavigationDirective: se },
|
|
344
|
-
inheritAttrs: !1,
|
|
345
|
-
props: {
|
|
346
|
-
/**
|
|
347
|
-
* Function that allows the options to be disabled
|
|
348
|
-
*
|
|
349
|
-
* @type {BentoListboxIsOptionDisabled}
|
|
350
|
-
* @param {BentoListboxOptionItem} option - listbox option object
|
|
351
|
-
* @param {string} option.label - Option's label text
|
|
352
|
-
* @param {string|number} option.value - Option's value
|
|
353
|
-
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
354
|
-
*/
|
|
355
|
-
isOptionDisabled: {
|
|
356
|
-
type: Function,
|
|
357
|
-
default: () => !1
|
|
358
|
-
},
|
|
359
|
-
/**
|
|
360
|
-
* The option elements to populate the listbox with.
|
|
361
|
-
* It must be an array of {@see BentoListboxOptionItem }.
|
|
362
|
-
*
|
|
363
|
-
* @property {string} value.label - Text to be displayed in the option
|
|
364
|
-
* @property {string,number} value.value - Value of the option
|
|
365
|
-
*/
|
|
366
|
-
items: {
|
|
367
|
-
type: Array,
|
|
368
|
-
required: !0
|
|
369
|
-
},
|
|
370
|
-
/**
|
|
371
|
-
* The `input` value.
|
|
372
|
-
* Providing an empty string will select no options.
|
|
373
|
-
* Set to an empty string `''` if you don't want any of the available options to be selected
|
|
374
|
-
*/
|
|
375
|
-
selectedValue: {
|
|
376
|
-
type: Array,
|
|
377
|
-
default: void 0
|
|
378
|
-
},
|
|
379
|
-
/**
|
|
380
|
-
* If enabled, dropdown will display non-selectable, static categories
|
|
381
|
-
*/
|
|
382
|
-
staticCategories: { type: Boolean, default: !1 }
|
|
383
|
-
},
|
|
384
|
-
emits: [c.SELECT, c.ENTER, c.SPACE, c.TAB],
|
|
385
|
-
setup(s, { emit: e, expose: l, slots: t, attrs: o }) {
|
|
386
|
-
const a = x(null), r = x([]), f = n(() => {
|
|
387
|
-
var v;
|
|
388
|
-
return !!((v = s.selectedValue) != null && v.length) && s.selectedValue.at(0);
|
|
389
|
-
}), A = n(
|
|
390
|
-
() => {
|
|
391
|
-
var v, y, D, P;
|
|
392
|
-
return {
|
|
393
|
-
"aria-label": (v = o["aria-label"]) == null ? void 0 : v.toString(),
|
|
394
|
-
"aria-busy": (y = o["aria-busy"]) == null ? void 0 : y.toString(),
|
|
395
|
-
"aria-atomic": (D = o["aria-atomic"]) == null ? void 0 : D.toString(),
|
|
396
|
-
"aria-live": (P = o["aria-live"]) == null ? void 0 : P.toString()
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
), d = n(() => !!s.items.some(({ items: v }) => !!v)), b = (v) => (y) => {
|
|
400
|
-
e(v, [y]);
|
|
401
|
-
}, { visibleDomOptions: T } = he(a, H(s, "items"), x("option"), !1), _ = (v) => {
|
|
402
|
-
var y;
|
|
403
|
-
(y = T.value[v]) == null || y.focus();
|
|
404
|
-
}, {
|
|
405
|
-
moveToNextElement: p,
|
|
406
|
-
moveToPreviousElement: C,
|
|
407
|
-
moveToFirstElement: R,
|
|
408
|
-
moveToLastElement: B,
|
|
409
|
-
setListboxFocusedIndex: I
|
|
410
|
-
} = ye(
|
|
411
|
-
{
|
|
412
|
-
items: T
|
|
413
|
-
},
|
|
414
|
-
_
|
|
415
|
-
), O = {
|
|
416
|
-
[M.ARROW_UP]: C,
|
|
417
|
-
[M.ARROW_DOWN]: p,
|
|
418
|
-
[M.HOME]: R,
|
|
419
|
-
[M.END]: B
|
|
420
|
-
}, S = {
|
|
421
|
-
[c.SELECT]: b(c.SELECT),
|
|
422
|
-
[c.SPACE]: b(c.SPACE),
|
|
423
|
-
[c.TAB]: b(c.TAB),
|
|
424
|
-
[c.ENTER]: b(c.ENTER)
|
|
425
|
-
};
|
|
426
|
-
return l({
|
|
427
|
-
/**
|
|
428
|
-
* Reference for a single listbox item.
|
|
429
|
-
* Required for keyboard navigation in dropdown as $children is removed in vue@3
|
|
430
|
-
*/
|
|
431
|
-
listboxItemRef: r,
|
|
432
|
-
/**
|
|
433
|
-
* Method to set the index of the item to be focused on
|
|
434
|
-
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
435
|
-
*/
|
|
436
|
-
setListboxFocusedIndex: I
|
|
437
|
-
}), {
|
|
438
|
-
// Enums
|
|
439
|
-
BentoListboxEvent: c,
|
|
440
|
-
// Values
|
|
441
|
-
listboxRef: a,
|
|
442
|
-
listboxItemRef: r,
|
|
443
|
-
selectedItem: f,
|
|
444
|
-
slots: t,
|
|
445
|
-
ariaAttributes: A,
|
|
446
|
-
// Computed
|
|
447
|
-
hasCategories: d,
|
|
448
|
-
// Methods
|
|
449
|
-
onOptionSelected: b,
|
|
450
|
-
// Keyboard navigation
|
|
451
|
-
listboxListeners: O,
|
|
452
|
-
listboxOptionListeners: S
|
|
453
|
-
};
|
|
454
|
-
}
|
|
455
|
-
});
|
|
456
|
-
var _t = function() {
|
|
457
|
-
var e = this, l = e._self._c;
|
|
458
|
-
return e._self._setupProxy, l("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", attrs: { role: "listbox" } }, "div", e.ariaAttributes, !1), e.listboxListeners), [e.hasCategories && e.staticCategories ? e._l(e.items, function(t) {
|
|
459
|
-
return l("bento-listbox-single-select-category", { key: t.value, attrs: { "category-label": t.label } }, e._l(t.items, function(o) {
|
|
460
|
-
return l("bento-listbox-single-select-option", e._g({ key: o.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: o, disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null, selected: o.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(a, r) {
|
|
461
|
-
return { key: r, fn: function(f) {
|
|
462
|
-
return [e._t(r, null, null, f)];
|
|
463
|
-
} };
|
|
464
|
-
})], null, !0) }, e.listboxOptionListeners));
|
|
465
|
-
}), 1);
|
|
466
|
-
}) : e._l(e.items, function(t) {
|
|
467
|
-
return l("bento-listbox-single-select-option", e._g({ key: t.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: t, disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, selected: t.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(o, a) {
|
|
468
|
-
return { key: a, fn: function(r) {
|
|
469
|
-
return [e._t(a, null, null, r)];
|
|
470
|
-
} };
|
|
471
|
-
})], null, !0) }, e.listboxOptionListeners));
|
|
472
|
-
})], 2);
|
|
473
|
-
}, pt = [], yt = /* @__PURE__ */ N(
|
|
474
|
-
gt,
|
|
475
|
-
_t,
|
|
476
|
-
pt,
|
|
477
|
-
!1,
|
|
478
|
-
null,
|
|
479
|
-
null
|
|
480
|
-
);
|
|
481
|
-
const ht = yt.exports;
|
|
482
|
-
let ve = 0;
|
|
483
|
-
const St = {
|
|
484
|
-
beforeCreate() {
|
|
485
|
-
this.uuid = ve.toString(), ve += 1;
|
|
486
|
-
}
|
|
487
|
-
};
|
|
488
|
-
var Ct = function() {
|
|
489
|
-
var e = this, l = e._self._c;
|
|
490
|
-
return l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M9.69043 5.75L4.62988 10.8105L1.56934 7.75L2.62988 6.68945L4.62988 8.68945L8.62988 4.68945L9.69043 5.75Z" } }), l("path", { attrs: { fill: "#001222", d: "M13.9307 5.75L8.87012 10.8105L7.80957 9.75L12.8701 4.68945L13.9307 5.75Z" } })]);
|
|
491
|
-
}, xt = [], Ot = /* @__PURE__ */ N(
|
|
492
|
-
St,
|
|
493
|
-
Ct,
|
|
494
|
-
xt,
|
|
495
|
-
!1,
|
|
496
|
-
null,
|
|
497
|
-
null
|
|
498
|
-
);
|
|
499
|
-
const Et = Ot.exports, Tt = {}, It = /* @__PURE__ */ G({
|
|
500
|
-
...Tt,
|
|
501
|
-
__name: "decorative-checkbox",
|
|
502
|
-
props: {
|
|
503
|
-
disabled: { type: Boolean, default: !1 },
|
|
504
|
-
indeterminate: { type: Boolean, default: !1 },
|
|
505
|
-
checked: { type: Boolean, default: !1 },
|
|
506
|
-
allSelected: { type: Boolean, default: !1 }
|
|
507
|
-
},
|
|
508
|
-
setup(s) {
|
|
509
|
-
const e = s, l = n(() => ({
|
|
510
|
-
[`b-checkbox-input--${J.DISABLED}`]: e.disabled
|
|
511
|
-
})), t = n(() => ({
|
|
512
|
-
[`b-checkbox-input__outline--${J.UNCHECKED}`]: !e.checked && !e.indeterminate && !e.allSelected,
|
|
513
|
-
[`b-checkbox-input__outline--${J.CHECKED}`]: (e.checked || e.allSelected) && !e.indeterminate,
|
|
514
|
-
[`b-checkbox-input__outline--${J.INDETERMINATE}`]: e.indeterminate
|
|
515
|
-
}));
|
|
516
|
-
return { __sfc: !0, props: e, conditionalClasses: l, outlineConditionalClasses: t, CheckmarkSmallIcon: We, MinusSmallIcon: Ve, DoubleCheckmarkSmallIcon: Et };
|
|
517
|
-
}
|
|
518
|
-
});
|
|
519
|
-
var At = function() {
|
|
520
|
-
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
521
|
-
return l("div", { staticClass: "b-checkbox-input", class: t.conditionalClasses, attrs: { role: "presentation" } }, [e.indeterminate ? l(t.MinusSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e.allSelected ? l(t.DoubleCheckmarkSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true", "data-testid": "decorative-checkbox-double-checkmark-icon" } }) : e.checked ? l(t.CheckmarkSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e._e(), l("div", { staticClass: "b-checkbox-input__outline", class: t.outlineConditionalClasses })], 1);
|
|
522
|
-
}, Lt = [], kt = /* @__PURE__ */ N(
|
|
523
|
-
It,
|
|
524
|
-
At,
|
|
525
|
-
Lt,
|
|
526
|
-
!1,
|
|
527
|
-
null,
|
|
528
|
-
"b87bbaf9"
|
|
529
|
-
);
|
|
530
|
-
const oe = kt.exports;
|
|
531
|
-
var Se = /* @__PURE__ */ ((s) => (s.DISABLED = "disabled", s.STATIC_CATEGORY = "static-category", s))(Se || {}), U = /* @__PURE__ */ ((s) => (s.SELECT_CATEGORY = "select-category", s.UNSELECT_CATEGORY = "unselect-category", s.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", s))(U || {});
|
|
532
|
-
const Rt = {
|
|
533
|
-
"de-DE": {
|
|
534
|
-
categoryClosed: "{category} geschlossen",
|
|
535
|
-
categoryOpened: "{category} geöffnet"
|
|
536
|
-
},
|
|
537
|
-
"en-GB": {
|
|
538
|
-
categoryClosed: "{category} closed",
|
|
539
|
-
categoryOpened: "{category} opened"
|
|
540
|
-
},
|
|
541
|
-
"en-US": {
|
|
542
|
-
categoryClosed: "{category} closed",
|
|
543
|
-
categoryOpened: "{category} opened"
|
|
544
|
-
},
|
|
545
|
-
"es-ES": {
|
|
546
|
-
categoryClosed: "{category} cerrado",
|
|
547
|
-
categoryOpened: "{category} abierto"
|
|
548
|
-
},
|
|
549
|
-
"es-MX": {
|
|
550
|
-
categoryClosed: "{category} cerrado",
|
|
551
|
-
categoryOpened: "{category} abierto"
|
|
552
|
-
},
|
|
553
|
-
"fr-FR": {
|
|
554
|
-
categoryClosed: "{category} fermée",
|
|
555
|
-
categoryOpened: "{category} ouverte"
|
|
556
|
-
},
|
|
557
|
-
"it-IT": {
|
|
558
|
-
categoryClosed: "{category} chiuso",
|
|
559
|
-
categoryOpened: "{category} aperto"
|
|
560
|
-
},
|
|
561
|
-
"ja-JP": {
|
|
562
|
-
categoryClosed: "{category}を閉じました",
|
|
563
|
-
categoryOpened: "{category}を開きました"
|
|
564
|
-
},
|
|
565
|
-
"pt-BR": {
|
|
566
|
-
categoryClosed: "{category} fechada",
|
|
567
|
-
categoryOpened: "{categoria} aberta"
|
|
568
|
-
},
|
|
569
|
-
"zh-CN": {
|
|
570
|
-
categoryClosed: "{category} 已关闭",
|
|
571
|
-
categoryOpened: "{category} 已打开"
|
|
572
|
-
}
|
|
573
|
-
}, Dt = G({
|
|
574
|
-
i18n: { messages: Rt },
|
|
575
|
-
name: "bento-listbox-multi-select-category",
|
|
576
|
-
components: {
|
|
577
|
-
BentoTypography: j,
|
|
578
|
-
BentoListboxOption: Z,
|
|
579
|
-
ChevronDownIcon: je,
|
|
580
|
-
ChevronUpIcon: qe,
|
|
581
|
-
DecorativeCheckbox: oe
|
|
582
|
-
},
|
|
583
|
-
props: {
|
|
584
|
-
/**
|
|
585
|
-
* The option elements to populate the listbox with.
|
|
586
|
-
* It must be an array of {@see BentoListboxOptionItem }.
|
|
587
|
-
*
|
|
588
|
-
* @property {string} value.label - Text to be displayed in the option
|
|
589
|
-
* @property {string,number} value.value - Value of the option
|
|
590
|
-
* @property {BentoListboxOptionItem} value.items - Category items list
|
|
591
|
-
*/
|
|
592
|
-
category: {
|
|
593
|
-
type: Object,
|
|
594
|
-
required: !0
|
|
595
|
-
},
|
|
596
|
-
/**
|
|
597
|
-
* Function that allows the options to be disabled
|
|
598
|
-
*
|
|
599
|
-
* @type {BentoListboxIsOptionDisabled}
|
|
600
|
-
* @param {BentoListboxOptionItem} option - listbox option object
|
|
601
|
-
* @param {string} option.label - Option's label text
|
|
602
|
-
* @param {string|number} option.value - Option's value
|
|
603
|
-
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
604
|
-
*/
|
|
605
|
-
isOptionDisabled: {
|
|
606
|
-
type: [Function],
|
|
607
|
-
default: () => !1
|
|
608
|
-
},
|
|
609
|
-
/**
|
|
610
|
-
* The `input` value.
|
|
611
|
-
* Providing an empty array will select no options.
|
|
612
|
-
*/
|
|
613
|
-
selectedItemsList: {
|
|
614
|
-
type: Array,
|
|
615
|
-
default: () => []
|
|
616
|
-
},
|
|
617
|
-
/**
|
|
618
|
-
* If enabled, dropdown will display non-selectable, static categories
|
|
619
|
-
*/
|
|
620
|
-
staticCategories: { type: Boolean, default: !1 },
|
|
621
|
-
/**
|
|
622
|
-
* Category's tabindex
|
|
623
|
-
*/
|
|
624
|
-
tabindex: { type: Number, default: -1 }
|
|
625
|
-
},
|
|
626
|
-
emits: [
|
|
627
|
-
U.SELECT_CATEGORY,
|
|
628
|
-
U.UNSELECT_CATEGORY,
|
|
629
|
-
U.TOGGLE_CATEGORY_VISIBILITY
|
|
630
|
-
],
|
|
631
|
-
setup(s, { emit: e }) {
|
|
632
|
-
const l = x(!1), { t } = le(), o = be("category-group"), a = be("category-name"), r = (E) => s.isOptionDisabled ? s.isOptionDisabled(E) : !1, f = n(
|
|
633
|
-
() => s.category.items.every((E) => r(E))
|
|
634
|
-
), A = H(s, "staticCategories"), d = n(() => l.value || s.staticCategories), b = n(() => ({
|
|
635
|
-
[`b-listbox-multi-select-category--${Se.DISABLED}`]: f.value
|
|
636
|
-
})), T = (E, L) => {
|
|
637
|
-
E.preventDefault(), l.value = L !== void 0 ? L : !l.value, e(U.TOGGLE_CATEGORY_VISIBILITY, s.category.value);
|
|
638
|
-
}, _ = (E) => {
|
|
639
|
-
var Y;
|
|
640
|
-
const L = r(E), $ = ((Y = s.selectedItemsList) == null ? void 0 : Y.includes(E.value)) || !1;
|
|
641
|
-
return { isDisabled: L, isPreSelected: $ };
|
|
642
|
-
}, p = n(
|
|
643
|
-
() => s.category.items.filter((E) => {
|
|
644
|
-
const { isDisabled: L, isPreSelected: $ } = _(E);
|
|
645
|
-
return L && $ || !L;
|
|
646
|
-
})
|
|
647
|
-
), C = n(
|
|
648
|
-
() => {
|
|
649
|
-
var E;
|
|
650
|
-
return (E = p.value) == null ? void 0 : E.filter(
|
|
651
|
-
({ value: L }) => {
|
|
652
|
-
var $;
|
|
653
|
-
return ($ = s.selectedItemsList) == null ? void 0 : $.includes(L);
|
|
654
|
-
}
|
|
655
|
-
);
|
|
656
|
-
}
|
|
657
|
-
), R = n(() => {
|
|
658
|
-
const E = l.value ? "categoryOpened" : "categoryClosed";
|
|
659
|
-
return t(E, { category: s.category.label });
|
|
660
|
-
}), B = () => {
|
|
661
|
-
e(U.SELECT_CATEGORY);
|
|
662
|
-
}, I = () => {
|
|
663
|
-
e(U.UNSELECT_CATEGORY);
|
|
664
|
-
}, { isAllSelected: O, isIndeterminate: S, toggleSelectAll: v } = pe(
|
|
665
|
-
C,
|
|
666
|
-
p,
|
|
667
|
-
B,
|
|
668
|
-
I
|
|
669
|
-
), y = n(() => S.value ? "mixed" : `${O.value}`), D = x(O.value), P = () => {
|
|
670
|
-
D.value = !D.value, v(D.value);
|
|
671
|
-
};
|
|
672
|
-
return X(O, () => {
|
|
673
|
-
D.value = O.value;
|
|
674
|
-
}), {
|
|
675
|
-
// Values
|
|
676
|
-
chevronTitle: R,
|
|
677
|
-
conditionalClass: b,
|
|
678
|
-
hasAllPropsDisabled: f,
|
|
679
|
-
isOpen: l,
|
|
680
|
-
isAllSelected: O,
|
|
681
|
-
isIndeterminate: S,
|
|
682
|
-
isStaticCategory: A,
|
|
683
|
-
categoryGroupId: o,
|
|
684
|
-
categoryNameId: a,
|
|
685
|
-
// Computed
|
|
686
|
-
showItemChildren: d,
|
|
687
|
-
ariaCheckedComputed: y,
|
|
688
|
-
// Methods
|
|
689
|
-
handleSelectAll: P,
|
|
690
|
-
toggleOpen: T,
|
|
691
|
-
toggleSelectAll: v
|
|
692
|
-
};
|
|
693
|
-
}
|
|
694
|
-
});
|
|
695
|
-
var Bt = function() {
|
|
696
|
-
var e = this, l = e._self._c;
|
|
697
|
-
return e._self._setupProxy, l("div", [e.isStaticCategory ? l("div", { staticClass: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category", attrs: { "aria-hidden": "true" } }, [l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { el: "span", variant: "caption" } }, [e._v(" " + e._s(e.category.label) + " ")])], 1)]) : l("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass, attrs: { tabindex: e.tabindex, "aria-selected": e.ariaCheckedComputed !== "false", "aria-checked": e.ariaCheckedComputed, "aria-disabled": e.hasAllPropsDisabled, "aria-expanded": `${e.isOpen}`, role: "treeitem", "aria-owns": e.categoryGroupId, "aria-labelledby": e.categoryNameId }, on: { click: e.handleSelectAll, "enter-pressed": e.handleSelectAll, "space-pressed": function(t) {
|
|
698
|
-
return t.preventDefault(), e.handleSelectAll.apply(null, arguments);
|
|
699
|
-
} }, nativeOn: { keydown: [function(t) {
|
|
700
|
-
return !t.type.indexOf("key") && e._k(t.keyCode, "arrow-left", void 0, t.key, void 0) ? null : e.toggleOpen(t, !1);
|
|
701
|
-
}, function(t) {
|
|
702
|
-
return !t.type.indexOf("key") && e._k(t.keyCode, "arrow-right", void 0, t.key, void 0) ? null : e.toggleOpen(t, !0);
|
|
703
|
-
}] } }, [l("decorative-checkbox", { attrs: { indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, checked: e.isAllSelected } }), l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { id: e.categoryNameId, el: "span" } }, [e._v(" " + e._s(e.category.label) + " ")]), l("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "aria-hidden": "true", "data-testid": "toggle-listbox" }, on: { "!click": function(t) {
|
|
704
|
-
return t.stopPropagation(), e.toggleOpen.apply(null, arguments);
|
|
705
|
-
} } }, [e.isOpen ? l("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : l("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), l("div", { directives: [{ name: "show", rawName: "v-show", value: e.showItemChildren, expression: "showItemChildren" }], attrs: { id: e.categoryGroupId, role: "group", "aria-label": e.category.label } }, [e._t("default")], 2)], 1);
|
|
706
|
-
}, Mt = [], $t = /* @__PURE__ */ N(
|
|
707
|
-
Dt,
|
|
708
|
-
Bt,
|
|
709
|
-
Mt,
|
|
710
|
-
!1,
|
|
711
|
-
null,
|
|
712
|
-
"00ccd708"
|
|
713
|
-
);
|
|
714
|
-
const Nt = $t.exports;
|
|
715
|
-
var w = /* @__PURE__ */ ((s) => (s.SELECT_CATEGORY = "select-category", s.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", s.UNSELECT_CATEGORY = "unselect-category", s.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", s))(w || {});
|
|
716
|
-
const wt = G({
|
|
717
|
-
name: "listbox-multi-select-options",
|
|
718
|
-
components: {
|
|
719
|
-
BentoListboxOption: Z,
|
|
720
|
-
BentoTypography: j,
|
|
721
|
-
ListboxMultiSelectCategory: Nt,
|
|
722
|
-
DecorativeCheckbox: oe
|
|
723
|
-
},
|
|
724
|
-
inheritAttrs: !1,
|
|
725
|
-
props: {
|
|
726
|
-
/**
|
|
727
|
-
* Indicates if the items listed are inside a category
|
|
728
|
-
* so they can be padded to right by one level in recursion.
|
|
729
|
-
* Items of categories are automatically defined as "categoryItems"
|
|
730
|
-
*/
|
|
731
|
-
categoryItems: { type: Boolean, default: !1 },
|
|
732
|
-
/**
|
|
733
|
-
* Current focused option index
|
|
734
|
-
*/
|
|
735
|
-
focusedIndex: { type: Number, default: 0 },
|
|
736
|
-
/**
|
|
737
|
-
* Function that allows the options to be disabled
|
|
738
|
-
*
|
|
739
|
-
* @type {BentoListboxIsOptionDisabled}
|
|
740
|
-
* @param {BentoListboxOptionItem} option - listbox option object
|
|
741
|
-
* @param {string} option.label - Option's label text
|
|
742
|
-
* @param {string|number} option.value - Option's value
|
|
743
|
-
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
744
|
-
*/
|
|
745
|
-
isOptionDisabled: {
|
|
746
|
-
type: Function,
|
|
747
|
-
default: () => !1
|
|
748
|
-
},
|
|
749
|
-
/**
|
|
750
|
-
* The option elements to populate the listbox with.
|
|
751
|
-
* It must be an array of {@see BentoListboxOptionItem }.
|
|
752
|
-
*
|
|
753
|
-
* @property {string} value.label - Text to be displayed in the option
|
|
754
|
-
* @property {string,number} value.value - Value of the option
|
|
755
|
-
*/
|
|
756
|
-
items: {
|
|
757
|
-
type: Array,
|
|
758
|
-
required: !0
|
|
759
|
-
},
|
|
760
|
-
/**
|
|
761
|
-
* Indicates if the elements options are inside a multi-level category
|
|
762
|
-
*/
|
|
763
|
-
isMultiLevel: { type: Boolean, default: !1 },
|
|
764
|
-
/**
|
|
765
|
-
* Flag that indicates that an external search it's being made
|
|
766
|
-
* to filter out the items inside the the multi-select listbox
|
|
767
|
-
*
|
|
768
|
-
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
769
|
-
*/
|
|
770
|
-
searching: { type: Boolean, default: !1 },
|
|
771
|
-
/**
|
|
772
|
-
* List of selected items.
|
|
773
|
-
* Providing an empty array will select no options.
|
|
774
|
-
*/
|
|
775
|
-
selectedItemsList: {
|
|
776
|
-
type: Array,
|
|
777
|
-
default: () => []
|
|
778
|
-
},
|
|
779
|
-
/**
|
|
780
|
-
* If enabled, dropdown will display non-selectable, static categories
|
|
781
|
-
*/
|
|
782
|
-
staticCategories: { type: Boolean, default: !1 },
|
|
783
|
-
/**
|
|
784
|
-
* Object with the index of each item.
|
|
785
|
-
*/
|
|
786
|
-
itemsIndex: {
|
|
787
|
-
type: Object,
|
|
788
|
-
default: () => ({})
|
|
789
|
-
}
|
|
790
|
-
},
|
|
791
|
-
emits: [
|
|
792
|
-
w.TOGGLE_CHECKBOX_SELECTION,
|
|
793
|
-
w.SELECT_CATEGORY,
|
|
794
|
-
w.UNSELECT_CATEGORY,
|
|
795
|
-
w.TOGGLE_CATEGORY_VISIBILITY
|
|
796
|
-
],
|
|
797
|
-
setup(s, { emit: e }) {
|
|
798
|
-
const l = (d) => {
|
|
799
|
-
s.isOptionDisabled(d) || e(w.TOGGLE_CHECKBOX_SELECTION, d);
|
|
800
|
-
}, t = (d) => !!d.items, o = (d) => {
|
|
801
|
-
const b = s.isMultiLevel && s.searching;
|
|
802
|
-
return d.description && (!s.isMultiLevel || b);
|
|
803
|
-
}, a = (d) => d.items ? !!d.items.find((b) => s.selectedItemsList.includes(b.value)) : s.selectedItemsList.includes(d.value), r = (d) => {
|
|
804
|
-
if (t(d)) {
|
|
805
|
-
const b = a(d) ? w.UNSELECT_CATEGORY : w.SELECT_CATEGORY;
|
|
806
|
-
e(b, d);
|
|
807
|
-
} else
|
|
808
|
-
l(d);
|
|
809
|
-
};
|
|
810
|
-
return {
|
|
811
|
-
// Values
|
|
812
|
-
conditionalClasses: n(() => ({
|
|
813
|
-
"b-listbox-multi-select-options__static-category-option": s.staticCategories,
|
|
814
|
-
"b-listbox-multi-select-options__category-option": s.categoryItems
|
|
815
|
-
})),
|
|
816
|
-
// Methods
|
|
817
|
-
isOptionSelected: a,
|
|
818
|
-
shouldShowDescription: o,
|
|
819
|
-
toggleCheckboxSelection: l,
|
|
820
|
-
toggleSearchOption: r,
|
|
821
|
-
computedTabindex: (d) => s.itemsIndex[d] === s.focusedIndex ? 0 : -1,
|
|
822
|
-
// Enums
|
|
823
|
-
BentoListboxEvent: c,
|
|
824
|
-
ListboxMultiSelectOptionsEvent: w
|
|
825
|
-
};
|
|
826
|
-
}
|
|
827
|
-
});
|
|
828
|
-
var Gt = function() {
|
|
829
|
-
var e = this, l = e._self._c;
|
|
830
|
-
return e._self._setupProxy, l("div", e._l(e.items, function(t) {
|
|
831
|
-
return l("div", { key: `selected-${t.value}` }, [e.searching && e.isMultiLevel ? [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(t.value), "aria-selected": `${e.isOptionSelected(t)}`, "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null, role: e.$attrs.role || "option" }, on: { click: function(o) {
|
|
832
|
-
return e.toggleSearchOption(t);
|
|
833
|
-
}, "enter-pressed": function(o) {
|
|
834
|
-
return e.toggleSearchOption(t);
|
|
835
|
-
}, "space-pressed": function(o) {
|
|
836
|
-
return o.preventDefault(), e.toggleSearchOption(t);
|
|
837
|
-
} } }, [l("decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, checked: e.isOptionSelected(t) } }), e._t("default", function() {
|
|
838
|
-
return [l("span", { staticClass: "b-listbox-multi-select__option-text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(t.label))]), e.shouldShowDescription(t) ? l("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(t.description) + " ")]) : e._e()], 1)];
|
|
839
|
-
}, null, t)], 2)] : [t.items ? [l("listbox-multi-select-category", { attrs: { category: t, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList, tabindex: e.computedTabindex(t.value) }, on: { "select-category": function(o) {
|
|
840
|
-
return e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, t);
|
|
841
|
-
}, "unselect-category": function(o) {
|
|
842
|
-
return e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, t);
|
|
843
|
-
}, "toggle-category-visibility": function(o) {
|
|
844
|
-
return e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, o);
|
|
845
|
-
} } }, [l("listbox-multi-select-options", { attrs: { "category-items": "", items: t.items, "is-option-disabled": e.isOptionDisabled, "items-index": e.itemsIndex, "focused-index": e.focusedIndex, "is-multi-level": e.isMultiLevel, "static-categories": e.staticCategories, "selected-items-list": e.selectedItemsList, searching: e.searching, role: e.$attrs.role || "option" }, on: { "toggle-checkbox-selection": (o) => e.toggleCheckboxSelection(o) } })], 1)] : l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(t.value), "aria-selected": `${e.isOptionSelected(t)}`, "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null, role: e.$attrs.role || "option" }, on: { click: function(o) {
|
|
846
|
-
return e.toggleCheckboxSelection(t);
|
|
847
|
-
}, "enter-pressed": function(o) {
|
|
848
|
-
return e.toggleCheckboxSelection(t);
|
|
849
|
-
}, "space-pressed": function(o) {
|
|
850
|
-
return o.preventDefault(), e.toggleCheckboxSelection(t);
|
|
851
|
-
} } }, [l("decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, checked: e.isOptionSelected(t) } }), e._t("default", function() {
|
|
852
|
-
return [l("span", { staticClass: "b-listbox-multi-select__option-text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(t.label))]), e.shouldShowDescription(t) ? l("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(t.description) + " ")]) : e._e()], 1)];
|
|
853
|
-
}, null, t)], 2)]], 2);
|
|
854
|
-
}), 0);
|
|
855
|
-
}, Pt = [], Ft = /* @__PURE__ */ N(
|
|
856
|
-
wt,
|
|
857
|
-
Gt,
|
|
858
|
-
Pt,
|
|
859
|
-
!1,
|
|
860
|
-
null,
|
|
861
|
-
"0985e0a4"
|
|
862
|
-
);
|
|
863
|
-
const Yt = Ft.exports, zt = (s) => {
|
|
864
|
-
const e = n(() => {
|
|
865
|
-
var t;
|
|
866
|
-
return !!((t = s.value) != null && t.find(({ items: o }) => !!o));
|
|
867
|
-
}), l = n(() => {
|
|
868
|
-
var t;
|
|
869
|
-
return e.value ? (t = s.value) == null ? void 0 : t.reduce((o, a) => (a.items ? o.push(...a.items.flat()) : o.push(a), o), []) : s.value;
|
|
870
|
-
});
|
|
871
|
-
return {
|
|
872
|
-
isMultiLevelSelect: e,
|
|
873
|
-
flattenedItemsList: l
|
|
874
|
-
};
|
|
875
|
-
}, Ut = {
|
|
876
|
-
"de-DE": {
|
|
877
|
-
allSelected: "Alle ausgewählt ({total})",
|
|
878
|
-
numberOfTotalSelected: "{number} von {total} ausgewählt",
|
|
879
|
-
numbersSelected: "{number} ausgewählt",
|
|
880
|
-
selectAll: "Alle auswählen ({total})"
|
|
881
|
-
},
|
|
882
|
-
"en-GB": {
|
|
883
|
-
allSelected: "All selected ({total})",
|
|
884
|
-
numberOfTotalSelected: "{number} of {total} selected",
|
|
885
|
-
numbersSelected: "{number} selected",
|
|
886
|
-
selectAll: "Select all ({total})"
|
|
887
|
-
},
|
|
888
|
-
"en-US": {
|
|
889
|
-
allSelected: "All selected ({total})",
|
|
890
|
-
numberOfTotalSelected: "{number} of {total} selected",
|
|
891
|
-
numbersSelected: "{number} selected",
|
|
892
|
-
selectAll: "Select all ({total})"
|
|
893
|
-
},
|
|
894
|
-
"es-ES": {
|
|
895
|
-
allSelected: "Todos seleccionados ({total})",
|
|
896
|
-
numberOfTotalSelected: "{number} de {total} seleccionados",
|
|
897
|
-
numbersSelected: "{number} seleccionado",
|
|
898
|
-
selectAll: "Seleccionar todo ({total})"
|
|
899
|
-
},
|
|
900
|
-
"es-MX": {
|
|
901
|
-
allSelected: "Todos seleccionados ({total})",
|
|
902
|
-
numberOfTotalSelected: "{number} de {total} seleccionados",
|
|
903
|
-
numbersSelected: "{número} seleccionado",
|
|
904
|
-
selectAll: "Seleccionar todo ({total})"
|
|
905
|
-
},
|
|
906
|
-
"fr-FR": {
|
|
907
|
-
allSelected: "Tous sélectionnés ({total})",
|
|
908
|
-
numberOfTotalSelected: "{number} sélectionné(s) sur {total}",
|
|
909
|
-
numbersSelected: "{number} sélectionné(s)",
|
|
910
|
-
selectAll: "Tout sélectionner ({total})"
|
|
911
|
-
},
|
|
912
|
-
"it-IT": {
|
|
913
|
-
allSelected: "Tutti i selezionati ({total})",
|
|
914
|
-
numberOfTotalSelected: "{numero} su {totale} selezionati",
|
|
915
|
-
numbersSelected: "{numero} selezionati",
|
|
916
|
-
selectAll: "Seleziona tutto ({total})"
|
|
917
|
-
},
|
|
918
|
-
"ja-JP": {
|
|
919
|
-
allSelected: "すべて選択 ({total})",
|
|
920
|
-
numberOfTotalSelected: "{number}/{total}件が選択されました",
|
|
921
|
-
numbersSelected: "{number}件選択済み",
|
|
922
|
-
selectAll: "すべて選択 ({total})"
|
|
923
|
-
},
|
|
924
|
-
"pt-BR": {
|
|
925
|
-
allSelected: "Todos os selecionados ({total})",
|
|
926
|
-
numberOfTotalSelected: "{number} de {total} selecionados",
|
|
927
|
-
numbersSelected: "{number} selecionados",
|
|
928
|
-
selectAll: "Selecionar tudo ({total})"
|
|
929
|
-
},
|
|
930
|
-
"zh-CN": {
|
|
931
|
-
allSelected: "全部已选 ({total})",
|
|
932
|
-
numberOfTotalSelected: "已选择 {number} 个,共 {total} 个",
|
|
933
|
-
numbersSelected: "已选择 {number} 个",
|
|
934
|
-
selectAll: "选择全部({total})个"
|
|
935
|
-
}
|
|
936
|
-
}, Vt = { i18n: { messages: Ut } }, Wt = /* @__PURE__ */ G({
|
|
937
|
-
...Vt,
|
|
938
|
-
__name: "listbox-multi-select",
|
|
939
|
-
props: {
|
|
940
|
-
hasMoreItems: { type: Boolean, default: !1 },
|
|
941
|
-
isOptionDisabled: { default: () => () => !1 },
|
|
942
|
-
items: null,
|
|
943
|
-
lazyLoadType: { default: "none" },
|
|
944
|
-
searching: { type: Boolean, default: !1 },
|
|
945
|
-
selectedValues: null,
|
|
946
|
-
staticCategories: { type: Boolean, default: !1 }
|
|
947
|
-
},
|
|
948
|
-
emits: ["select"],
|
|
949
|
-
setup(s, { expose: e, emit: l }) {
|
|
950
|
-
const t = s, { t: o, n: a } = le(), r = Ge(), f = Pe(), A = n(
|
|
951
|
-
() => {
|
|
952
|
-
var i, u, m, h;
|
|
953
|
-
return {
|
|
954
|
-
"aria-label": (i = f["aria-label"]) == null ? void 0 : i.toString(),
|
|
955
|
-
"aria-busy": (u = f["aria-busy"]) == null ? void 0 : u.toString(),
|
|
956
|
-
"aria-atomic": (m = f["aria-atomic"]) == null ? void 0 : m.toString(),
|
|
957
|
-
"aria-live": (h = f["aria-live"]) == null ? void 0 : h.toString(),
|
|
958
|
-
"aria-multiselectable": !0
|
|
959
|
-
};
|
|
960
|
-
}
|
|
961
|
-
), d = x(null), b = x(null), T = x(null), _ = x(null), p = n(() => t.selectedValues.map(({ value: i }) => i)), { isMultiLevelSelect: C, flattenedItemsList: R } = zt(H(t, "items")), B = n(() => C.value && !t.staticCategories), I = n(() => B.value ? "tree" : "listbox"), O = n(() => B.value ? "treeitem" : "option"), S = (i) => {
|
|
962
|
-
var h;
|
|
963
|
-
const u = t.isOptionDisabled(i), m = ((h = p.value) == null ? void 0 : h.includes(i.value)) || !1;
|
|
964
|
-
return { isDisabled: u, isPreSelected: m };
|
|
965
|
-
}, v = n(() => {
|
|
966
|
-
if (t.searching && C)
|
|
967
|
-
return t.items;
|
|
968
|
-
const i = R.value.filter((u) => {
|
|
969
|
-
const { isDisabled: m, isPreSelected: h } = S(u);
|
|
970
|
-
return m && h || !m;
|
|
971
|
-
});
|
|
972
|
-
return t.selectedValues.forEach((u) => {
|
|
973
|
-
i.find((m) => m.value === u.value) || i.push(u);
|
|
974
|
-
}), i;
|
|
975
|
-
}), y = n(
|
|
976
|
-
() => {
|
|
977
|
-
var i;
|
|
978
|
-
return (i = v.value) == null ? void 0 : i.filter((u) => {
|
|
979
|
-
var m;
|
|
980
|
-
return u.items && C.value && t.searching ? u.items.filter(
|
|
981
|
-
(g) => (t.selectedValues ?? []).includes(g.value)
|
|
982
|
-
).length === u.items.length : (m = p.value) == null ? void 0 : m.includes(u.value);
|
|
983
|
-
});
|
|
984
|
-
}
|
|
985
|
-
), D = () => C.value && !t.searching ? R.value.length : t.items.length, P = n(() => {
|
|
986
|
-
var h;
|
|
987
|
-
const i = v.value.length, u = D(), m = ((h = y.value) == null ? void 0 : h.length) || 0;
|
|
988
|
-
return m === 0 ? o("selectAll", { total: a(i) }) : m === u ? o("allSelected", { total: a(u) }) : m <= u ? o("numberOfTotalSelected", { number: a(m), total: a(u) }) : o("numbersSelected", { number: a(m) });
|
|
989
|
-
}), E = (i) => {
|
|
990
|
-
const u = (h) => {
|
|
991
|
-
const { isDisabled: g, isPreSelected: F } = S(h);
|
|
992
|
-
return g && F || !g;
|
|
993
|
-
}, m = i.filter(u).filter((h) => !p.value.includes(h.value));
|
|
994
|
-
l("select", [...t.selectedValues, ...m]);
|
|
995
|
-
}, L = (i) => {
|
|
996
|
-
const u = (g) => {
|
|
997
|
-
const { isDisabled: F, isPreSelected: $e } = S(g);
|
|
998
|
-
return !(F && $e);
|
|
999
|
-
}, m = i.filter(u).map(({ value: g }) => g), h = t.selectedValues.filter((g) => !(m != null && m.includes(g.value)));
|
|
1000
|
-
l("select", h);
|
|
1001
|
-
}, $ = () => {
|
|
1002
|
-
E(R.value);
|
|
1003
|
-
}, Y = () => {
|
|
1004
|
-
L(R.value);
|
|
1005
|
-
}, { isAllSelected: z, isIndeterminate: k, toggleSelectAll: V } = pe(
|
|
1006
|
-
y,
|
|
1007
|
-
v,
|
|
1008
|
-
$,
|
|
1009
|
-
Y
|
|
1010
|
-
), Ce = n(() => k.value ? "mixed" : `${z.value}`), q = x(z.value), xe = () => {
|
|
1011
|
-
q.value = !q.value, V(q.value);
|
|
1012
|
-
};
|
|
1013
|
-
X(z, () => {
|
|
1014
|
-
q.value = z.value;
|
|
1015
|
-
});
|
|
1016
|
-
const Oe = (i) => {
|
|
1017
|
-
E(i.items);
|
|
1018
|
-
}, Ee = (i) => {
|
|
1019
|
-
L(i.items);
|
|
1020
|
-
}, Te = (i, u) => {
|
|
1021
|
-
let m = !1;
|
|
1022
|
-
const h = t.selectedValues.filter(({ value: g }) => u.value === g ? (m = !0, !1) : !0);
|
|
1023
|
-
m || h.push(u), l(i, h);
|
|
1024
|
-
}, Ie = n(() => {
|
|
1025
|
-
if (!C.value)
|
|
1026
|
-
return t.selectedValues;
|
|
1027
|
-
const i = (g) => p.value.includes(g.value), u = (g) => !t.staticCategories && g.every((F) => i(F));
|
|
1028
|
-
return t.items.flatMap(
|
|
1029
|
-
(g) => g.items && !u(g.items) ? g.items : g
|
|
1030
|
-
).filter((g) => g.items ? !0 : i(g));
|
|
1031
|
-
}), Ae = n(() => {
|
|
1032
|
-
var m, h, g, F;
|
|
1033
|
-
const i = ["automatic", "button"].includes(t.lazyLoadType), u = ((m = t.selectedValues) == null ? void 0 : m.length) > 0 && ((h = y.value) == null ? void 0 : h.length) !== ((g = R.value) == null ? void 0 : g.length);
|
|
1034
|
-
return i && t.hasMoreItems ? !!((F = t.selectedValues) != null && F.length) : u;
|
|
1035
|
-
}), Le = n(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), W = x([]), { visibleDomOptions: Q, updateVisibleDomOptions: ae } = he(
|
|
1036
|
-
d,
|
|
1037
|
-
H(t, "items"),
|
|
1038
|
-
O
|
|
1039
|
-
), ke = (i) => {
|
|
1040
|
-
W.value.includes(i) ? W.value = W.value.filter((u) => u !== i) : W.value.push(i), _e(() => {
|
|
1041
|
-
ae();
|
|
1042
|
-
});
|
|
1043
|
-
}, ne = (i) => {
|
|
1044
|
-
var u;
|
|
1045
|
-
(u = Q.value[i]) == null || u.focus();
|
|
1046
|
-
}, {
|
|
1047
|
-
moveToNextElement: ie,
|
|
1048
|
-
moveToPreviousElement: ce,
|
|
1049
|
-
moveToFirstElement: re,
|
|
1050
|
-
moveToLastElement: ue,
|
|
1051
|
-
preventDefault: ee,
|
|
1052
|
-
focusedIndex: Re,
|
|
1053
|
-
setListboxFocusedIndex: de
|
|
1054
|
-
} = ye(
|
|
1055
|
-
{
|
|
1056
|
-
items: Q
|
|
1057
|
-
},
|
|
1058
|
-
ne
|
|
1059
|
-
), De = {
|
|
1060
|
-
[M.ARROW_UP]: (i) => ce(i),
|
|
1061
|
-
[M.ARROW_DOWN]: (i) => ie(i),
|
|
1062
|
-
[M.HOME]: re,
|
|
1063
|
-
[M.END]: ue
|
|
1064
|
-
};
|
|
1065
|
-
e({
|
|
1066
|
-
/**
|
|
1067
|
-
* Method to set the index of the item to be focused on
|
|
1068
|
-
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
1069
|
-
*/
|
|
1070
|
-
setListboxFocusedIndex: de
|
|
1071
|
-
});
|
|
1072
|
-
const Be = {
|
|
1073
|
-
[M.ARROW_UP]: ee,
|
|
1074
|
-
[M.ARROW_DOWN]: ee
|
|
1075
|
-
}, Me = n(() => {
|
|
1076
|
-
let i = 1;
|
|
1077
|
-
const u = {};
|
|
1078
|
-
return t.items.forEach((m) => {
|
|
1079
|
-
let h = W.value.includes(m.value);
|
|
1080
|
-
m.items ? (t.staticCategories ? h = !0 : u[m.value] = i++, h && m.items.forEach((g) => u[g.value] = i++)) : u[m.value] = i++;
|
|
1081
|
-
}), u;
|
|
1082
|
-
});
|
|
1083
|
-
return { __sfc: !0, props: t, emit: l, t: o, n: a, slots: r, attrs: f, ariaAttributes: A, listboxRef: d, selectAllListboxItemsRef: b, selectedListboxItemsRef: T, listboxItemsRef: _, selectedItemsList: p, isMultiLevelSelect: C, flattenedItemsList: R, isTreePattern: B, computedRole: I, computedOptionRole: O, optionStates: S, enabledItems: v, visibleSelectedList: y, calculateTotalItems: D, selectAllCheckboxText: P, selectAll: E, unselectAll: L, selectAllItems: $, unselectAllItems: Y, isAllSelected: z, isIndeterminate: k, toggleSelectAll: V, ariaCheckedComputed: Ce, isSelectAllOn: q, handleSelectAll: xe, selectAllCategory: Oe, unselectAllCategory: Ee, toggleCheckboxSelection: Te, selectedOptions: Ie, showSelectedItems: Ae, showSelectAllCheckbox: Le, expandedCategories: W, visibleDomOptions: Q, updateVisibleDomOptions: ae, toggleCategoryVisibility: ke, focusItem: ne, moveToNextElement: ie, moveToPreviousElement: ce, moveToFirstElement: re, moveToLastElement: ue, preventDefault: ee, focusedIndex: Re, setListboxFocusedIndex: de, listboxListeners: De, chipsSectionListeners: Be, computedItemsIndex: Me, DecorativeCheckbox: oe, BentoTypography: j, BentoChip: Ke, BentoListboxOption: Z, ListboxMultiSelectOptions: Yt, vBentoKeyboardNavigationDirective: se, BentoListboxEvent: c };
|
|
1084
|
-
}
|
|
1085
|
-
});
|
|
1086
|
-
var Kt = function() {
|
|
1087
|
-
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
1088
|
-
return l("div", { ref: "listboxRef", staticClass: "b-listbox-multi-select" }, [t.showSelectedItems ? l("div", [l("ul", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select__chips" }, t.chipsSectionListeners), e._l(t.selectedOptions, function(o) {
|
|
1089
|
-
return l("li", { key: o.value }, [l(t.BentoChip, { ref: "selectedListboxItemsRef", refInFor: !0, attrs: { disabled: e.isOptionDisabled(o), label: o.label, condensed: "" }, on: { click: function(a) {
|
|
1090
|
-
o.items ? t.unselectAllCategory(o) : t.toggleCheckboxSelection("select", o);
|
|
1091
|
-
} } })], 1);
|
|
1092
|
-
}), 0), l("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } })]) : e._e(), l("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], attrs: { role: t.computedRole } }, "div", t.ariaAttributes, !1), t.listboxListeners), [t.showSelectAllCheckbox ? l(t.BentoListboxOption, { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option", attrs: { tabindex: t.focusedIndex === 0 ? 0 : -1, "aria-selected": t.ariaCheckedComputed !== "false", "aria-checked": t.ariaCheckedComputed, role: t.computedOptionRole }, on: { click: t.handleSelectAll, "enter-pressed": t.handleSelectAll, "space-pressed": function(o) {
|
|
1093
|
-
return o.preventDefault(), t.handleSelectAll.apply(null, arguments);
|
|
1094
|
-
} } }, [l(t.DecorativeCheckbox, { attrs: { checked: t.isAllSelected, indeterminate: t.isIndeterminate } }), l(t.BentoTypography, { attrs: { el: "span" } }, [e._v(" " + e._s(t.selectAllCheckboxText) + " ")])], 1) : e._e(), t.showSelectAllCheckbox ? l("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } }) : e._e(), l(t.ListboxMultiSelectOptions, { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": t.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": t.selectedItemsList, "focused-index": t.focusedIndex, "items-index": t.computedItemsIndex, role: t.computedOptionRole }, on: { "toggle-checkbox-selection": function(o) {
|
|
1095
|
-
return t.toggleCheckboxSelection("select", o);
|
|
1096
|
-
}, "select-category": t.selectAllCategory, "unselect-category": t.unselectAllCategory, "toggle-category-visibility": t.toggleCategoryVisibility, "space-pressed": function(o) {
|
|
1097
|
-
return t.toggleCheckboxSelection(t.BentoListboxEvent.SPACE, o);
|
|
1098
|
-
}, "tab-pressed": function(o) {
|
|
1099
|
-
return t.toggleCheckboxSelection(t.BentoListboxEvent.TAB, o);
|
|
1100
|
-
}, "enter-pressed": function(o) {
|
|
1101
|
-
return t.toggleCheckboxSelection(t.BentoListboxEvent.ENTER, o);
|
|
1102
|
-
} }, scopedSlots: e._u([e._l(t.slots, function(o, a) {
|
|
1103
|
-
return { key: a, fn: function(r) {
|
|
1104
|
-
return [e._t(a, null, null, r)];
|
|
1105
|
-
} };
|
|
1106
|
-
})], null, !0) })], 1)]);
|
|
1107
|
-
}, jt = [], qt = /* @__PURE__ */ N(
|
|
1108
|
-
Wt,
|
|
1109
|
-
Kt,
|
|
1110
|
-
jt,
|
|
1111
|
-
!1,
|
|
1112
|
-
null,
|
|
1113
|
-
"efcc8ad5"
|
|
1114
|
-
);
|
|
1115
|
-
const ge = qt.exports, Ht = {
|
|
1116
|
-
"de-DE": {
|
|
1117
|
-
loading: "Laden",
|
|
1118
|
-
showMore: "Mehr anzeigen"
|
|
1119
|
-
},
|
|
1120
|
-
"en-GB": {
|
|
1121
|
-
loading: "Loading",
|
|
1122
|
-
showMore: "Show more"
|
|
1123
|
-
},
|
|
1124
|
-
"en-US": {
|
|
1125
|
-
loading: "Loading",
|
|
1126
|
-
showMore: "Show more"
|
|
1127
|
-
},
|
|
1128
|
-
"es-ES": {
|
|
1129
|
-
loading: "Cargando",
|
|
1130
|
-
showMore: "Mostrar más"
|
|
1131
|
-
},
|
|
1132
|
-
"es-MX": {
|
|
1133
|
-
loading: "Cargando",
|
|
1134
|
-
showMore: "Mostrar más"
|
|
1135
|
-
},
|
|
1136
|
-
"fr-FR": {
|
|
1137
|
-
loading: "Chargement",
|
|
1138
|
-
showMore: "Afficher plus"
|
|
1139
|
-
},
|
|
1140
|
-
"it-IT": {
|
|
1141
|
-
loading: "Caricamento",
|
|
1142
|
-
showMore: "Mostra di più"
|
|
1143
|
-
},
|
|
1144
|
-
"ja-JP": {
|
|
1145
|
-
loading: "読み込み中",
|
|
1146
|
-
showMore: "さらに表示"
|
|
1147
|
-
},
|
|
1148
|
-
"pt-BR": {
|
|
1149
|
-
loading: "Carregando",
|
|
1150
|
-
showMore: "Mostrar mais"
|
|
1151
|
-
},
|
|
1152
|
-
"zh-CN": {
|
|
1153
|
-
loading: "正在加载",
|
|
1154
|
-
showMore: "显示更多"
|
|
1155
|
-
}
|
|
1156
|
-
}, Xt = 36, Jt = G({
|
|
1157
|
-
name: "bento-listbox",
|
|
1158
|
-
components: {
|
|
1159
|
-
BentoEmptyState: Ye,
|
|
1160
|
-
BentoListboxSingleSelect: ht,
|
|
1161
|
-
BentoListboxMultiSelect: ge,
|
|
1162
|
-
BentoTypography: j,
|
|
1163
|
-
BentoLoadingIndicator: Fe,
|
|
1164
|
-
BentoLoadingButton: He
|
|
1165
|
-
},
|
|
1166
|
-
directives: { BentoKeyboardNavigationDirective: se },
|
|
1167
|
-
i18n: { messages: Ht },
|
|
1168
|
-
props: {
|
|
1169
|
-
/**
|
|
1170
|
-
* Defines a string value that labels an interactive element.
|
|
1171
|
-
*/
|
|
1172
|
-
ariaLabel: { type: String, default: null },
|
|
1173
|
-
/**
|
|
1174
|
-
* Empty state props that will be used with the inner empty state component to be displayed when no search results are found.
|
|
1175
|
-
*/
|
|
1176
|
-
emptyState: {
|
|
1177
|
-
type: Object,
|
|
1178
|
-
default: void 0
|
|
1179
|
-
},
|
|
1180
|
-
/**
|
|
1181
|
-
* Indicates whether there are more items to load
|
|
1182
|
-
*/
|
|
1183
|
-
hasMoreItems: { type: Boolean, default: !1 },
|
|
1184
|
-
/**
|
|
1185
|
-
* Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.
|
|
1186
|
-
*/
|
|
1187
|
-
id: { type: String, required: !0 },
|
|
1188
|
-
/**
|
|
1189
|
-
* Function that allows the options to be disabled
|
|
1190
|
-
*
|
|
1191
|
-
* @type {BentoListboxIsOptionDisabled}
|
|
1192
|
-
* @param {BentoListboxOptionItem} option - Listbox option object
|
|
1193
|
-
* @param {string} option.label - Option's label text
|
|
1194
|
-
* @param {string|number} option.value - Option's value
|
|
1195
|
-
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
1196
|
-
*/
|
|
1197
|
-
isOptionDisabled: {
|
|
1198
|
-
type: Function,
|
|
1199
|
-
default: () => {
|
|
1200
|
-
}
|
|
1201
|
-
},
|
|
1202
|
-
/**
|
|
1203
|
-
* The option elements to populate the listbox with.
|
|
1204
|
-
* It must be an array of {@see BentoListboxOptionItem }
|
|
1205
|
-
* * @property {string} value.label - Text to be displayed in the option
|
|
1206
|
-
* * @property {string,number} value.value - Value of the option
|
|
1207
|
-
*/
|
|
1208
|
-
items: {
|
|
1209
|
-
type: Array,
|
|
1210
|
-
required: !0
|
|
1211
|
-
},
|
|
1212
|
-
/**
|
|
1213
|
-
* Indicates if new options are lazy loading.
|
|
1214
|
-
*/
|
|
1215
|
-
loading: { type: Boolean, default: !1 },
|
|
1216
|
-
/**
|
|
1217
|
-
* The type of `Lazy Load`.
|
|
1218
|
-
* Type "automatic" will enable infinite scrolling
|
|
1219
|
-
* Type "button" will enable lazy loading with "Show more" button
|
|
1220
|
-
*/
|
|
1221
|
-
lazyLoadType: {
|
|
1222
|
-
type: String,
|
|
1223
|
-
default: K.NONE,
|
|
1224
|
-
validator: (s) => Object.values(K).includes(s)
|
|
1225
|
-
},
|
|
1226
|
-
/**
|
|
1227
|
-
* Indicates the listbox is loading filtered items.
|
|
1228
|
-
*/
|
|
1229
|
-
componentLoading: { type: Boolean, default: !1 },
|
|
1230
|
-
/**
|
|
1231
|
-
* If enabled, the user will be able to select multiple items.
|
|
1232
|
-
*/
|
|
1233
|
-
multiple: { type: Boolean, default: !1 },
|
|
1234
|
-
/**
|
|
1235
|
-
* If enabled, dropdown will display non-selectable, static categories
|
|
1236
|
-
*/
|
|
1237
|
-
staticCategories: { type: Boolean, default: !1 },
|
|
1238
|
-
/**
|
|
1239
|
-
* Messaged displayed when no items are listed in the listbox
|
|
1240
|
-
*/
|
|
1241
|
-
noResultsMessage: { type: String, required: !0 },
|
|
1242
|
-
/**
|
|
1243
|
-
* Flag that indicates that an external search it's being made
|
|
1244
|
-
* to filter out the items inside the the multi-select listbox
|
|
1245
|
-
*
|
|
1246
|
-
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1247
|
-
*/
|
|
1248
|
-
searching: ge.props.searching,
|
|
1249
|
-
/**
|
|
1250
|
-
* The `input` value.
|
|
1251
|
-
* Providing an empty string or empty array will select no options.
|
|
1252
|
-
* Set to an empty string `''` if you don't want any of the available options to be selected for single select
|
|
1253
|
-
*/
|
|
1254
|
-
selectedValue: {
|
|
1255
|
-
type: Array,
|
|
1256
|
-
default: () => []
|
|
1257
|
-
},
|
|
1258
|
-
/**
|
|
1259
|
-
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
1260
|
-
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
1261
|
-
*/
|
|
1262
|
-
virtualScroll: {
|
|
1263
|
-
type: [Boolean, Object],
|
|
1264
|
-
default: !1
|
|
1265
|
-
}
|
|
1266
|
-
},
|
|
1267
|
-
emits: [
|
|
1268
|
-
c.SELECT,
|
|
1269
|
-
c.SPACE,
|
|
1270
|
-
c.SHOW_MORE,
|
|
1271
|
-
c.ENTER,
|
|
1272
|
-
c.ESCAPE,
|
|
1273
|
-
c.TAB
|
|
1274
|
-
],
|
|
1275
|
-
setup(s, { emit: e, slots: l }) {
|
|
1276
|
-
const t = x([]), o = H(s, "items"), { t: a } = le(), r = n(() => s.lazyLoadType !== K.AUTOMATIC), f = n(() => s.lazyLoadType === K.AUTOMATIC), A = () => {
|
|
1277
|
-
var k;
|
|
1278
|
-
return typeof (s == null ? void 0 : s.virtualScroll) == "object" && ((k = s == null ? void 0 : s.virtualScroll) != null && k.itemHeight) ? s.virtualScroll.itemHeight : Xt;
|
|
1279
|
-
}, {
|
|
1280
|
-
containerRef: d,
|
|
1281
|
-
containerProps: b,
|
|
1282
|
-
onScroll: T,
|
|
1283
|
-
list: _,
|
|
1284
|
-
wrapperProps: p
|
|
1285
|
-
} = Xe(o, {
|
|
1286
|
-
itemHeight: A(),
|
|
1287
|
-
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1288
|
-
disabled: (s == null ? void 0 : s.multiple) || (s == null ? void 0 : s.virtualScroll) === !1 || (s == null ? void 0 : s.lazyLoadType) !== "none"
|
|
1289
|
-
}), C = n(
|
|
1290
|
-
() => s.componentLoading !== void 0 || r.value ? "true" : void 0
|
|
1291
|
-
), R = n(
|
|
1292
|
-
() => r.value && s.loading || s.componentLoading ? "true" : "false"
|
|
1293
|
-
), B = n(
|
|
1294
|
-
() => r.value || s.componentLoading !== void 0 ? "polite" : void 0
|
|
1295
|
-
), I = n(
|
|
1296
|
-
() => ({
|
|
1297
|
-
"aria-label": s.ariaLabel,
|
|
1298
|
-
"aria-busy": R.value,
|
|
1299
|
-
"aria-atomic": C.value,
|
|
1300
|
-
"aria-live": B.value
|
|
1301
|
-
})
|
|
1302
|
-
), O = n(
|
|
1303
|
-
() => s.componentLoading ? {
|
|
1304
|
-
...I.value,
|
|
1305
|
-
role: "alert"
|
|
1306
|
-
} : {}
|
|
1307
|
-
), S = (k) => (V) => {
|
|
1308
|
-
e(k, V);
|
|
1309
|
-
}, v = () => {
|
|
1310
|
-
e(c.SHOW_MORE);
|
|
1311
|
-
}, y = ze(() => {
|
|
1312
|
-
const k = d.value;
|
|
1313
|
-
if (!k)
|
|
1314
|
-
return;
|
|
1315
|
-
const V = Math.round(k.scrollTop) + k.clientHeight >= k.scrollHeight;
|
|
1316
|
-
s.hasMoreItems && V && !s.loading && v();
|
|
1317
|
-
}), D = () => {
|
|
1318
|
-
f.value ? y() : T();
|
|
1319
|
-
}, P = n(() => {
|
|
1320
|
-
var k;
|
|
1321
|
-
return ((k = s.items) == null ? void 0 : k.length) === 0;
|
|
1322
|
-
}), E = n(
|
|
1323
|
-
() => s.lazyLoadType === K.BUTTON && s.hasMoreItems
|
|
1324
|
-
), L = n(
|
|
1325
|
-
() => s.loading ? fe.LOADING : fe.START
|
|
1326
|
-
), $ = n(() => s.loading ? a("loading") : a("showMore")), Y = n(() => ({
|
|
1327
|
-
...s.emptyState,
|
|
1328
|
-
variant: "condensed"
|
|
1329
|
-
})), z = {
|
|
1330
|
-
[c.SELECT]: S(c.SELECT),
|
|
1331
|
-
[c.SPACE]: S(c.SPACE),
|
|
1332
|
-
[c.TAB]: S(c.TAB),
|
|
1333
|
-
[c.ENTER]: S(c.ENTER)
|
|
1334
|
-
};
|
|
1335
|
-
return {
|
|
1336
|
-
// Refs
|
|
1337
|
-
listboxRef: d,
|
|
1338
|
-
listboxItemRef: t,
|
|
1339
|
-
// a11y
|
|
1340
|
-
ariaAttributes: I,
|
|
1341
|
-
listboxContainerAttributes: O,
|
|
1342
|
-
// Values
|
|
1343
|
-
containerProps: b,
|
|
1344
|
-
isSearchResultEmpty: P,
|
|
1345
|
-
limitedEmptyStateProps: Y,
|
|
1346
|
-
loadingButtonState: L,
|
|
1347
|
-
slots: l,
|
|
1348
|
-
shouldDisplayShowMoreButton: E,
|
|
1349
|
-
showMoreButtonText: $,
|
|
1350
|
-
virtualisedItems: _,
|
|
1351
|
-
wrapperProps: p,
|
|
1352
|
-
// Enums
|
|
1353
|
-
BentoKeyboardNavigationKeyDownEvent: M,
|
|
1354
|
-
BentoListboxEvent: c,
|
|
1355
|
-
// Methods
|
|
1356
|
-
onListboxContainerScroll: D,
|
|
1357
|
-
onOptionSelected: S,
|
|
1358
|
-
emitShowMore: v,
|
|
1359
|
-
listboxListeners: z
|
|
1360
|
-
};
|
|
1361
|
-
}
|
|
1362
|
-
});
|
|
1363
|
-
var Zt = function() {
|
|
1364
|
-
var t;
|
|
1365
|
-
var e = this, l = e._self._c;
|
|
1366
|
-
return e._self._setupProxy, l("div", e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: (t = e.containerProps) == null ? void 0 : t.style, attrs: { id: e.id, tabindex: "-1", "data-testid": "listbox-container" }, on: { scroll: e.onListboxContainerScroll } }, "div", e.listboxContainerAttributes, !1), [l("div", e._b({}, "div", e.wrapperProps, !1), [e.componentLoading ? l("div", { staticClass: "b-listbox__loading-filtered-items" }, [l("bento-loading-indicator")], 1) : e.isSearchResultEmpty ? l("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? l("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [l("bento-listbox-multi-select", e._g(e._b({ ref: "listboxItemRef", attrs: { "has-more-items": e.hasMoreItems, items: e.items, "lazy-load-type": e.lazyLoadType, "static-categories": e.staticCategories, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(o, a) {
|
|
1367
|
-
return { key: a, fn: function(r) {
|
|
1368
|
-
return [e._t(a, null, null, r)];
|
|
1369
|
-
} };
|
|
1370
|
-
})], null, !0) }, "bento-listbox-multi-select", e.ariaAttributes, !1), e.listboxListeners))] : [l("bento-listbox-single-select", e._g(e._b({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "selected-value": e.selectedValue, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(o, a) {
|
|
1371
|
-
return { key: a, fn: function(r) {
|
|
1372
|
-
return [e._t(a, null, null, r)];
|
|
1373
|
-
} };
|
|
1374
|
-
})], null, !0) }, "bento-listbox-single-select", e.ariaAttributes, !1), e.listboxListeners))], e.shouldDisplayShowMoreButton ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(o) {
|
|
1375
|
-
return e.emitShowMore.apply(null, arguments);
|
|
1376
|
-
} } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-indicator")], 1) : e._e()]], 2)]);
|
|
1377
|
-
}, Qt = [], es = /* @__PURE__ */ N(
|
|
1378
|
-
Jt,
|
|
1379
|
-
Zt,
|
|
1380
|
-
Qt,
|
|
1381
|
-
!1,
|
|
1382
|
-
null,
|
|
1383
|
-
"35cb3605"
|
|
1384
|
-
);
|
|
1385
|
-
const hs = es.exports, te = (s, e) => {
|
|
1386
|
-
for (const l of s) {
|
|
1387
|
-
if (l.value === e)
|
|
1388
|
-
return l;
|
|
1389
|
-
if (l.items) {
|
|
1390
|
-
const t = te(l.items, e);
|
|
1391
|
-
if (t)
|
|
1392
|
-
return t;
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
return null;
|
|
1396
|
-
}, ts = (s) => typeof s == "object" && s !== null && "value" in s && "label" in s, Ss = (s, e, l, t) => {
|
|
1397
|
-
const o = x([]), a = x(), r = (b) => {
|
|
1398
|
-
l.value ? a.value = b.map(({ value: T }) => T) : a.value = b.length > 0 ? b[0].value : null;
|
|
1399
|
-
}, f = (b) => {
|
|
1400
|
-
l.value ? a.value = b.map(({ value: T, label: _ }) => ({ value: T, label: _ })) : a.value = b.length > 0 ? { value: b[0].value, label: b[0].label } : null;
|
|
1401
|
-
}, A = (b) => {
|
|
1402
|
-
o.value = b, t != null && t.value ? f(b) : r(b);
|
|
1403
|
-
}, d = () => {
|
|
1404
|
-
o.value = [], a.value = null;
|
|
1405
|
-
};
|
|
1406
|
-
return X(
|
|
1407
|
-
() => e.value,
|
|
1408
|
-
() => {
|
|
1409
|
-
if (!e.value && e.value !== 0) {
|
|
1410
|
-
d();
|
|
1411
|
-
return;
|
|
1412
|
-
}
|
|
1413
|
-
const b = !Array.isArray(e.value), T = [...o.value];
|
|
1414
|
-
d();
|
|
1415
|
-
const _ = (p) => {
|
|
1416
|
-
if (ts(p))
|
|
1417
|
-
o.value.push(p);
|
|
1418
|
-
else {
|
|
1419
|
-
let C = te(s.value, p);
|
|
1420
|
-
C || (C = te(T, p)), C || (C = { value: p, label: p.toString() }), o.value.push(C);
|
|
1421
|
-
}
|
|
1422
|
-
};
|
|
1423
|
-
if (b) {
|
|
1424
|
-
const p = e.value;
|
|
1425
|
-
_(p), t != null && t.value ? f(o.value) : r(o.value);
|
|
1426
|
-
return;
|
|
1427
|
-
}
|
|
1428
|
-
e.value.forEach(_), t != null && t.value ? f(o.value) : r(o.value);
|
|
1429
|
-
},
|
|
1430
|
-
{ immediate: !0 }
|
|
1431
|
-
), {
|
|
1432
|
-
// Values
|
|
1433
|
-
cachedSelectedListboxOptions: o,
|
|
1434
|
-
cachedListboxSelectedValues: a,
|
|
1435
|
-
// Methods
|
|
1436
|
-
resetCache: d,
|
|
1437
|
-
setCachedValues: A
|
|
1438
|
-
};
|
|
1439
|
-
};
|
|
1440
|
-
export {
|
|
1441
|
-
c as B,
|
|
1442
|
-
ut as C,
|
|
1443
|
-
oe as D,
|
|
1444
|
-
K as a,
|
|
1445
|
-
hs as b,
|
|
1446
|
-
zt as c,
|
|
1447
|
-
he as d,
|
|
1448
|
-
Ss as u
|
|
1449
|
-
};
|
|
1450
|
-
//# sourceMappingURL=use-cached-selected-values.Bn3Y8Iuq.js.map
|