@adyen/bento-vue2 1.81.0 → 1.82.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/README.md +1 -1
- package/dist/@types/components.d.ts +196 -0
- package/dist/@types/index.d.ts +17585 -0
- package/dist/@types/use-form-v4.d.ts +86 -0
- package/dist/accordion.js +6 -0
- package/dist/accordion.js.map +1 -0
- package/dist/action-bar.js +5 -0
- package/dist/action-bar.js.map +1 -0
- package/dist/alert.js +8 -0
- package/dist/alert.js.map +1 -0
- package/dist/assets/accordion-item.css +1 -0
- package/dist/assets/action-bar.css +1 -0
- package/dist/assets/ai-button.css +1 -0
- package/dist/assets/alert.css +1 -0
- package/dist/assets/avatar.css +1 -0
- package/dist/assets/base-button.css +1 -0
- package/dist/assets/base-modal.css +1 -0
- package/dist/assets/button-actions-with-menu.css +1 -0
- package/dist/assets/button-actions.css +1 -0
- package/dist/assets/button.css +1 -0
- package/dist/assets/calendar.css +1 -0
- package/dist/assets/card.css +1 -0
- package/dist/assets/checkbox-group.css +1 -0
- package/dist/assets/checkbox-input.css +1 -0
- package/dist/assets/checkbox.css +1 -0
- package/dist/assets/chip.css +1 -0
- package/dist/assets/code-snippet.css +1 -0
- package/dist/assets/controls-group.css +1 -0
- package/dist/assets/copy.css +1 -0
- package/dist/assets/country.css +1 -0
- package/dist/assets/currency.css +1 -0
- package/dist/assets/dashboard-section.css +1 -0
- package/dist/assets/dashed-underline.css +1 -0
- package/dist/assets/data-grid-template.css +1 -0
- package/dist/assets/data-grid.css +1 -0
- package/dist/assets/date-picker.css +1 -0
- package/dist/assets/date-range-picker.css +1 -0
- package/dist/assets/date.css +1 -0
- package/dist/assets/dialog-page.css +1 -0
- package/dist/assets/divider.css +1 -0
- package/dist/assets/dropdown-default-textbox.css +1 -0
- package/dist/assets/dropdown-tag.css +1 -0
- package/dist/assets/dropdown.css +1 -0
- package/dist/assets/empty-state.css +1 -0
- package/dist/assets/field-label.css +1 -0
- package/dist/assets/file-uploader.css +1 -0
- package/dist/assets/filter-bar.css +1 -0
- package/dist/assets/fixed-scroller.css +1 -0
- package/dist/assets/focus-trap.css +1 -0
- package/dist/assets/footer-actions.css +1 -0
- package/dist/assets/form-layout-title.css +1 -0
- package/dist/assets/grid-layout.css +1 -0
- package/dist/assets/header-meta.css +1 -0
- package/dist/assets/header-with-views.css +1 -0
- package/dist/assets/header.css +1 -0
- package/dist/assets/index.css +1 -0
- package/dist/assets/info-icon.css +1 -0
- package/dist/assets/input-field-password.css +1 -0
- package/dist/assets/input-field-phone-number.css +1 -0
- package/dist/assets/input-field.css +1 -0
- package/dist/assets/inspector.css +1 -0
- package/dist/assets/layout-row.css +1 -0
- package/dist/assets/link.css +1 -0
- package/dist/assets/listbox-option-tag.css +1 -0
- package/dist/assets/loading-indicator.css +1 -0
- package/dist/assets/main.css +1 -0
- package/dist/assets/modal-fullscreen.css +1 -0
- package/dist/assets/pagination.css +1 -0
- package/dist/assets/payment-method.css +1 -0
- package/dist/assets/popper-container.css +1 -0
- package/dist/assets/promo-banner.css +1 -0
- package/dist/assets/radio-group.css +1 -0
- package/dist/assets/radio-input.css +1 -0
- package/dist/assets/rich-text-editor.css +1 -0
- package/dist/assets/search-bar.css +1 -0
- package/dist/assets/secondary-nav.css +1 -0
- package/dist/assets/segmented-control.css +1 -0
- package/dist/assets/selection-card-group.css +1 -0
- package/dist/assets/sidepanel.css +1 -0
- package/dist/assets/status.css +1 -0
- package/dist/assets/step.css +1 -0
- package/dist/assets/structured-list-item.css +1 -0
- package/dist/assets/summary-grid.css +1 -0
- package/dist/assets/tab.css +1 -0
- package/dist/assets/tag.css +1 -0
- package/dist/assets/textarea.css +1 -0
- package/dist/assets/timeline-item.css +1 -0
- package/dist/assets/toast.css +1 -0
- package/dist/assets/toggle.css +1 -0
- package/dist/assets/tooltip.css +1 -0
- package/dist/assets/tutorial.css +1 -0
- package/dist/assets/typography.css +1 -0
- package/dist/assets/use-cached-selected-values.css +1 -0
- package/dist/avatar.js +5 -0
- package/dist/avatar.js.map +1 -0
- package/dist/button.js +18 -0
- package/dist/button.js.map +1 -0
- package/dist/card.js +7 -0
- package/dist/card.js.map +1 -0
- package/dist/checkbox.js +11 -0
- package/dist/checkbox.js.map +1 -0
- package/dist/chip.js +5 -0
- package/dist/chip.js.map +1 -0
- package/dist/chunks/1-generic-use.CZhwP2Yc.js +5 -0
- package/dist/chunks/1-generic-use.CZhwP2Yc.js.map +1 -0
- package/dist/chunks/1-generic-use.R6x8PEGA.js +5 -0
- package/dist/chunks/1-generic-use.R6x8PEGA.js.map +1 -0
- package/dist/chunks/2-generic-use.CNKjB4B7.js +5 -0
- package/dist/chunks/2-generic-use.CNKjB4B7.js.map +1 -0
- package/dist/chunks/2-generic-use.w0fUhovx.js +5 -0
- package/dist/chunks/2-generic-use.w0fUhovx.js.map +1 -0
- package/dist/chunks/3-generic-use.BLEzR04g.js +5 -0
- package/dist/chunks/3-generic-use.BLEzR04g.js.map +1 -0
- package/dist/chunks/3-generic-use.D3NFHgI4.js +5 -0
- package/dist/chunks/3-generic-use.D3NFHgI4.js.map +1 -0
- package/dist/chunks/4-generic-use.CULEpvgj.js +5 -0
- package/dist/chunks/4-generic-use.CULEpvgj.js.map +1 -0
- package/dist/chunks/4-generic-use.D82y3n39.js +5 -0
- package/dist/chunks/4-generic-use.D82y3n39.js.map +1 -0
- package/dist/chunks/_plugin-vue2_normalizer.CeySl7Fu.js +11 -0
- package/dist/chunks/_plugin-vue2_normalizer.CeySl7Fu.js.map +1 -0
- package/dist/chunks/accordion-item.G1q4zgBG.js +117 -0
- package/dist/chunks/accordion-item.G1q4zgBG.js.map +1 -0
- package/dist/chunks/action-bar.Dhl3T4j-.js +160 -0
- package/dist/chunks/action-bar.Dhl3T4j-.js.map +1 -0
- package/dist/chunks/adding-payment-methods.BJZLPxtM.js +5 -0
- package/dist/chunks/adding-payment-methods.BJZLPxtM.js.map +1 -0
- package/dist/chunks/adding-payment-methods.Dle8zt43.js +5 -0
- package/dist/chunks/adding-payment-methods.Dle8zt43.js.map +1 -0
- package/dist/chunks/adyen-giving.Ffw_DlJK.js +5 -0
- package/dist/chunks/adyen-giving.Ffw_DlJK.js.map +1 -0
- package/dist/chunks/adyen-giving.LiKHj_jY.js +5 -0
- package/dist/chunks/adyen-giving.LiKHj_jY.js.map +1 -0
- package/dist/chunks/ai-button.DBwtNkyS.js +67 -0
- package/dist/chunks/ai-button.DBwtNkyS.js.map +1 -0
- package/dist/chunks/alert.SZPP58tl.js +103 -0
- package/dist/chunks/alert.SZPP58tl.js.map +1 -0
- package/dist/chunks/aria-label.CaUURpnB.js +13 -0
- package/dist/chunks/aria-label.CaUURpnB.js.map +1 -0
- package/dist/chunks/avatar.CeDqq2Z-.js +71 -0
- package/dist/chunks/avatar.CeDqq2Z-.js.map +1 -0
- package/dist/chunks/base-button.BdST9XT3.js +86 -0
- package/dist/chunks/base-button.BdST9XT3.js.map +1 -0
- package/dist/chunks/base-modal.C-UqIAY8.js +310 -0
- package/dist/chunks/base-modal.C-UqIAY8.js.map +1 -0
- package/dist/chunks/bin.Ddb69cr1.js +24 -0
- package/dist/chunks/bin.Ddb69cr1.js.map +1 -0
- package/dist/chunks/button-actions-with-menu.KKq9Cuk1.js +85 -0
- package/dist/chunks/button-actions-with-menu.KKq9Cuk1.js.map +1 -0
- package/dist/chunks/button-actions.N3D-Bb_x.js +1035 -0
- package/dist/chunks/button-actions.N3D-Bb_x.js.map +1 -0
- package/dist/chunks/button-actions.types.BptAXjD8.js +8 -0
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -0
- package/dist/chunks/button.CS_kdxYh.js +110 -0
- package/dist/chunks/button.CS_kdxYh.js.map +1 -0
- package/dist/chunks/calendar.Bhj58zR3.js +1832 -0
- package/dist/chunks/calendar.Bhj58zR3.js.map +1 -0
- package/dist/chunks/card.BYWF_Zvo.js +137 -0
- package/dist/chunks/card.BYWF_Zvo.js.map +1 -0
- package/dist/chunks/checkbox-group.CIIa-cYP.js +142 -0
- package/dist/chunks/checkbox-group.CIIa-cYP.js.map +1 -0
- package/dist/chunks/checkbox-input.B0NsfSNR.js +117 -0
- package/dist/chunks/checkbox-input.B0NsfSNR.js.map +1 -0
- package/dist/chunks/checkbox.CiWvdg8S.js +178 -0
- package/dist/chunks/checkbox.CiWvdg8S.js.map +1 -0
- package/dist/chunks/checkmark-circle-fill.BttTCjrM.js +24 -0
- package/dist/chunks/checkmark-circle-fill.BttTCjrM.js.map +1 -0
- package/dist/chunks/checkmark-small.DVDtD4HQ.js +24 -0
- package/dist/chunks/checkmark-small.DVDtD4HQ.js.map +1 -0
- package/dist/chunks/chevron-down.eYtgv5ly.js +24 -0
- package/dist/chunks/chevron-down.eYtgv5ly.js.map +1 -0
- package/dist/chunks/chevron-left.BS24hEFa.js +43 -0
- package/dist/chunks/chevron-left.BS24hEFa.js.map +1 -0
- package/dist/chunks/chevron-up.d8cwIlA_.js +24 -0
- package/dist/chunks/chevron-up.d8cwIlA_.js.map +1 -0
- package/dist/chunks/chip.B0DRDvaa.js +63 -0
- package/dist/chunks/chip.B0DRDvaa.js.map +1 -0
- package/dist/chunks/click-outside.C1Ud8AA2.js +23 -0
- package/dist/chunks/click-outside.C1Ud8AA2.js.map +1 -0
- package/dist/chunks/code-snippet.BMzhRl4c.js +268 -0
- package/dist/chunks/code-snippet.BMzhRl4c.js.map +1 -0
- package/dist/chunks/codemirror.Cy7iSLbd.js +14628 -0
- package/dist/chunks/codemirror.Cy7iSLbd.js.map +1 -0
- package/dist/chunks/constructNow.BhymNmy5.js +8 -0
- package/dist/chunks/constructNow.BhymNmy5.js.map +1 -0
- package/dist/chunks/controls-group.GchVWe7h.js +84 -0
- package/dist/chunks/controls-group.GchVWe7h.js.map +1 -0
- package/dist/chunks/copy.DauzzgJV.js +96 -0
- package/dist/chunks/copy.DauzzgJV.js.map +1 -0
- package/dist/chunks/country.B3z3-QRY.js +69 -0
- package/dist/chunks/country.B3z3-QRY.js.map +1 -0
- package/dist/chunks/country.types.C0Q_hhgJ.js +269 -0
- package/dist/chunks/country.types.C0Q_hhgJ.js.map +1 -0
- package/dist/chunks/cross-circle-fill-small.DfxDedRr.js +24 -0
- package/dist/chunks/cross-circle-fill-small.DfxDedRr.js.map +1 -0
- package/dist/chunks/cross-circle-fill.DTDtgLMf.js +24 -0
- package/dist/chunks/cross-circle-fill.DTDtgLMf.js.map +1 -0
- package/dist/chunks/cross-small.CoQUe8SS.js +24 -0
- package/dist/chunks/cross-small.CoQUe8SS.js.map +1 -0
- package/dist/chunks/cross.CC_B-vG-.js +24 -0
- package/dist/chunks/cross.CC_B-vG-.js.map +1 -0
- package/dist/chunks/currency.Cwhzzxw2.js +114 -0
- package/dist/chunks/currency.Cwhzzxw2.js.map +1 -0
- package/dist/chunks/dashboard-section.CgAfEay4.js +102 -0
- package/dist/chunks/dashboard-section.CgAfEay4.js.map +1 -0
- package/dist/chunks/dashed-underline.CMdNukpN.js +77 -0
- package/dist/chunks/dashed-underline.CMdNukpN.js.map +1 -0
- package/dist/chunks/data-grid-template.keys.VezYtHtM.js +5 -0
- package/dist/chunks/data-grid-template.keys.VezYtHtM.js.map +1 -0
- package/dist/chunks/data-grid-template.m4hsFMe2.js +111 -0
- package/dist/chunks/data-grid-template.m4hsFMe2.js.map +1 -0
- package/dist/chunks/data-grid.rAVOFiTv.js +3294 -0
- package/dist/chunks/data-grid.rAVOFiTv.js.map +1 -0
- package/dist/chunks/date-format.B8RU7D42.js +17 -0
- package/dist/chunks/date-format.B8RU7D42.js.map +1 -0
- package/dist/chunks/date-picker.nLuHJgOC.js +169 -0
- package/dist/chunks/date-picker.nLuHJgOC.js.map +1 -0
- package/dist/chunks/date-picker.types.Ckt7zxGy.js +5 -0
- package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -0
- package/dist/chunks/date-range-picker.D2MKhVMf.js +906 -0
- package/dist/chunks/date-range-picker.D2MKhVMf.js.map +1 -0
- package/dist/chunks/date-range-picker.types.Ckt7zxGy.js +5 -0
- package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -0
- package/dist/chunks/date.C1z2TXzM.js +160 -0
- package/dist/chunks/date.C1z2TXzM.js.map +1 -0
- package/dist/chunks/debounce.DUTu11PS.js +10 -0
- package/dist/chunks/debounce.DUTu11PS.js.map +1 -0
- package/dist/chunks/delight.CDBAFnwC.js +5 -0
- package/dist/chunks/delight.CDBAFnwC.js.map +1 -0
- package/dist/chunks/delight.xKDCvvaS.js +5 -0
- package/dist/chunks/delight.xKDCvvaS.js.map +1 -0
- package/dist/chunks/dialog-page.krM2wQpm.js +131 -0
- package/dist/chunks/dialog-page.krM2wQpm.js.map +1 -0
- package/dist/chunks/differenceInMonths.Cab3nOsb.js +1590 -0
- package/dist/chunks/differenceInMonths.Cab3nOsb.js.map +1 -0
- package/dist/chunks/directive.Cbdox5VL.js +23 -0
- package/dist/chunks/directive.Cbdox5VL.js.map +1 -0
- package/dist/chunks/divider.DX5gwN7p.js +35 -0
- package/dist/chunks/divider.DX5gwN7p.js.map +1 -0
- package/dist/chunks/dot.BW9SneIk.js +24 -0
- package/dist/chunks/dot.BW9SneIk.js.map +1 -0
- package/dist/chunks/dropdown-default-textbox.uWZMxeI7.js +350 -0
- package/dist/chunks/dropdown-default-textbox.uWZMxeI7.js.map +1 -0
- package/dist/chunks/dropdown-tag.BnqOBdMp.js +294 -0
- package/dist/chunks/dropdown-tag.BnqOBdMp.js.map +1 -0
- package/dist/chunks/dropdown.BijF56Y7.js +714 -0
- package/dist/chunks/dropdown.BijF56Y7.js.map +1 -0
- package/dist/chunks/empty-state.BsdRxzS2.js +106 -0
- package/dist/chunks/empty-state.BsdRxzS2.js.map +1 -0
- package/dist/chunks/es6.MoTTyETW.js +12 -0
- package/dist/chunks/es6.MoTTyETW.js.map +1 -0
- package/dist/chunks/events.BQOQSSb7.js +44 -0
- package/dist/chunks/events.BQOQSSb7.js.map +1 -0
- package/dist/chunks/expand.Bbielaja.js +24 -0
- package/dist/chunks/expand.Bbielaja.js.map +1 -0
- package/dist/chunks/field-label.DHGAa4cq.js +121 -0
- package/dist/chunks/field-label.DHGAa4cq.js.map +1 -0
- package/dist/chunks/file-uploader.D2s5qccE.js +1917 -0
- package/dist/chunks/file-uploader.D2s5qccE.js.map +1 -0
- package/dist/chunks/filter-bar.DISI1jAU.js +2472 -0
- package/dist/chunks/filter-bar.DISI1jAU.js.map +1 -0
- package/dist/chunks/fixed-scroller.CgVOf5VE.js +106 -0
- package/dist/chunks/fixed-scroller.CgVOf5VE.js.map +1 -0
- package/dist/chunks/focus-trap.CNIU5jOz.js +1168 -0
- package/dist/chunks/focus-trap.CNIU5jOz.js.map +1 -0
- package/dist/chunks/footer-actions.CFZwikg0.js +96 -0
- package/dist/chunks/footer-actions.CFZwikg0.js.map +1 -0
- package/dist/chunks/form-field.D_2g7vaP.js +10 -0
- package/dist/chunks/form-field.D_2g7vaP.js.map +1 -0
- package/dist/chunks/form-layout-title.B_oVSX5b.js +197 -0
- package/dist/chunks/form-layout-title.B_oVSX5b.js.map +1 -0
- package/dist/chunks/form-layout.types.bZW9iR6_.js +5 -0
- package/dist/chunks/form-layout.types.bZW9iR6_.js.map +1 -0
- package/dist/chunks/generate-uid.NJ8tVoha.js +32 -0
- package/dist/chunks/generate-uid.NJ8tVoha.js.map +1 -0
- package/dist/chunks/get-slot-text.Bjb9dTSV.js +12 -0
- package/dist/chunks/get-slot-text.Bjb9dTSV.js.map +1 -0
- package/dist/chunks/getRoundingMethod.C3eaeGLR.js +10 -0
- package/dist/chunks/getRoundingMethod.C3eaeGLR.js.map +1 -0
- package/dist/chunks/getTimezoneOffsetInMilliseconds.B7sxiukN.js +484 -0
- package/dist/chunks/getTimezoneOffsetInMilliseconds.B7sxiukN.js.map +1 -0
- package/dist/chunks/grid-layout.1aIiz2N_.js +76 -0
- package/dist/chunks/grid-layout.1aIiz2N_.js.map +1 -0
- package/dist/chunks/header-meta.D0UdrdVf.js +170 -0
- package/dist/chunks/header-meta.D0UdrdVf.js.map +1 -0
- package/dist/chunks/header-with-views.BjZkBSI0.js +1591 -0
- package/dist/chunks/header-with-views.BjZkBSI0.js.map +1 -0
- package/dist/chunks/header.QYvN86kI.js +103 -0
- package/dist/chunks/header.QYvN86kI.js.map +1 -0
- package/dist/chunks/image.C2D2hKat.js +56 -0
- package/dist/chunks/image.C2D2hKat.js.map +1 -0
- package/dist/chunks/index.B6WW_F-J.js +31 -0
- package/dist/chunks/index.B6WW_F-J.js.map +1 -0
- package/dist/chunks/index.BDK4hwK_.js +593 -0
- package/dist/chunks/index.BDK4hwK_.js.map +1 -0
- package/dist/chunks/index.Cl4_42j5.js +8 -0
- package/dist/chunks/index.Cl4_42j5.js.map +1 -0
- package/dist/chunks/info-icon.iKLaNff6.js +37 -0
- package/dist/chunks/info-icon.iKLaNff6.js.map +1 -0
- package/dist/chunks/info.CcMZ4aGg.js +24 -0
- package/dist/chunks/info.CcMZ4aGg.js.map +1 -0
- package/dist/chunks/input-field-password.BeRjHhu6.js +270 -0
- package/dist/chunks/input-field-password.BeRjHhu6.js.map +1 -0
- package/dist/chunks/input-field-phone-number.DLOUy8_E.js +3324 -0
- package/dist/chunks/input-field-phone-number.DLOUy8_E.js.map +1 -0
- package/dist/chunks/input-field.B1Q1-zLo.js +171 -0
- package/dist/chunks/input-field.B1Q1-zLo.js.map +1 -0
- package/dist/chunks/inspector.C6bbjQC0.js +117 -0
- package/dist/chunks/inspector.C6bbjQC0.js.map +1 -0
- package/dist/chunks/inspector.types.DyHwE18g.js +5 -0
- package/dist/chunks/inspector.types.DyHwE18g.js.map +1 -0
- package/dist/chunks/internal-error.BLZodVBE.js +5 -0
- package/dist/chunks/internal-error.BLZodVBE.js.map +1 -0
- package/dist/chunks/internal-error.BmrwJFpR.js +5 -0
- package/dist/chunks/internal-error.BmrwJFpR.js.map +1 -0
- package/dist/chunks/keyboard-navigation.DWmhelVv.js +66 -0
- package/dist/chunks/keyboard-navigation.DWmhelVv.js.map +1 -0
- package/dist/chunks/layout-row.DwdZbpVG.js +87 -0
- package/dist/chunks/layout-row.DwdZbpVG.js.map +1 -0
- package/dist/chunks/link.D8qpqg3W.js +95 -0
- package/dist/chunks/link.D8qpqg3W.js.map +1 -0
- package/dist/chunks/listbox-option-tag.CK628fjn.js +44 -0
- package/dist/chunks/listbox-option-tag.CK628fjn.js.map +1 -0
- package/dist/chunks/loading-indicator.PxbRzshH.js +42 -0
- package/dist/chunks/loading-indicator.PxbRzshH.js.map +1 -0
- package/dist/chunks/minus-small.DJacLGTw.js +27 -0
- package/dist/chunks/minus-small.DJacLGTw.js.map +1 -0
- package/dist/chunks/modal-fullscreen.UqZgbaDw.js +221 -0
- package/dist/chunks/modal-fullscreen.UqZgbaDw.js.map +1 -0
- package/dist/chunks/modal.DCgB0pA2.js +445 -0
- package/dist/chunks/modal.DCgB0pA2.js.map +1 -0
- package/dist/chunks/no-results-found.Bg_ZcEid.js +5 -0
- package/dist/chunks/no-results-found.Bg_ZcEid.js.map +1 -0
- package/dist/chunks/no-results-found.BqvYsBR6.js +5 -0
- package/dist/chunks/no-results-found.BqvYsBR6.js.map +1 -0
- package/dist/chunks/notifications-cleared.BMZk37uf.js +5 -0
- package/dist/chunks/notifications-cleared.BMZk37uf.js.map +1 -0
- package/dist/chunks/notifications-cleared.C7W9ZXY7.js +5 -0
- package/dist/chunks/notifications-cleared.C7W9ZXY7.js.map +1 -0
- package/dist/chunks/on-click-outside.D9aY9g8G.js +101 -0
- package/dist/chunks/on-click-outside.D9aY9g8G.js.map +1 -0
- package/dist/chunks/page-not-found.COJLPVaU.js +5 -0
- package/dist/chunks/page-not-found.COJLPVaU.js.map +1 -0
- package/dist/chunks/page-not-found.DWW6W-PZ.js +5 -0
- package/dist/chunks/page-not-found.DWW6W-PZ.js.map +1 -0
- package/dist/chunks/pagination.CylAnOyc.js +338 -0
- package/dist/chunks/pagination.CylAnOyc.js.map +1 -0
- package/dist/chunks/payment-method.C8Ie97qE.js +76 -0
- package/dist/chunks/payment-method.C8Ie97qE.js.map +1 -0
- package/dist/chunks/payment-method.types.BqtH7RM2.js +5 -0
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -0
- package/dist/chunks/planned-maintenance.C61sWB9h.js +5 -0
- package/dist/chunks/planned-maintenance.C61sWB9h.js.map +1 -0
- package/dist/chunks/planned-maintenance.jmWYTdet.js +5 -0
- package/dist/chunks/planned-maintenance.jmWYTdet.js.map +1 -0
- package/dist/chunks/popover.types.WDh5ggr3.js +6 -0
- package/dist/chunks/popover.types.WDh5ggr3.js.map +1 -0
- package/dist/chunks/popper-container.Cdokz_NE.js +1404 -0
- package/dist/chunks/popper-container.Cdokz_NE.js.map +1 -0
- package/dist/chunks/promo-banner.DikQcQU2.js +70 -0
- package/dist/chunks/promo-banner.DikQcQU2.js.map +1 -0
- package/dist/chunks/radio-group.Cr7UcYij.js +178 -0
- package/dist/chunks/radio-group.Cr7UcYij.js.map +1 -0
- package/dist/chunks/radio-input.kzb4gxLW.js +90 -0
- package/dist/chunks/radio-input.kzb4gxLW.js.map +1 -0
- package/dist/chunks/referrals.BvtT-kQS.js +5 -0
- package/dist/chunks/referrals.BvtT-kQS.js.map +1 -0
- package/dist/chunks/referrals.aX8WZigH.js +5 -0
- package/dist/chunks/referrals.aX8WZigH.js.map +1 -0
- package/dist/chunks/refresh.arF7jP-l.js +24 -0
- package/dist/chunks/refresh.arF7jP-l.js.map +1 -0
- package/dist/chunks/resize.Bqks3WUm.js +15 -0
- package/dist/chunks/resize.Bqks3WUm.js.map +1 -0
- package/dist/chunks/rich-text-editor.NKPFP8Ss.js +6203 -0
- package/dist/chunks/rich-text-editor.NKPFP8Ss.js.map +1 -0
- package/dist/chunks/search-bar.VctrP6lp.js +98 -0
- package/dist/chunks/search-bar.VctrP6lp.js.map +1 -0
- package/dist/chunks/search.D53Ia3rC.js +24 -0
- package/dist/chunks/search.D53Ia3rC.js.map +1 -0
- package/dist/chunks/secondary-nav.jpMeWSZj.js +112 -0
- package/dist/chunks/secondary-nav.jpMeWSZj.js.map +1 -0
- package/dist/chunks/segmented-control._CuB62pG.js +113 -0
- package/dist/chunks/segmented-control._CuB62pG.js.map +1 -0
- package/dist/chunks/segmented-control.types.BHRLV8KU.js +5 -0
- package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -0
- package/dist/chunks/selection-card-group.jykyd9iE.js +240 -0
- package/dist/chunks/selection-card-group.jykyd9iE.js.map +1 -0
- package/dist/chunks/show.B_mKPF6I.js +43 -0
- package/dist/chunks/show.B_mKPF6I.js.map +1 -0
- package/dist/chunks/sidepanel.CP-b8Zcg.js +210 -0
- package/dist/chunks/sidepanel.CP-b8Zcg.js.map +1 -0
- package/dist/chunks/status.types.BpMK-6IT.js +36 -0
- package/dist/chunks/status.types.BpMK-6IT.js.map +1 -0
- package/dist/chunks/step.4hMAy8v_.js +217 -0
- package/dist/chunks/step.4hMAy8v_.js.map +1 -0
- package/dist/chunks/structured-list-item.BLJabJwA.js +90 -0
- package/dist/chunks/structured-list-item.BLJabJwA.js.map +1 -0
- package/dist/chunks/success.DhioLvPD.js +5 -0
- package/dist/chunks/success.DhioLvPD.js.map +1 -0
- package/dist/chunks/success.nNwxJRBS.js +5 -0
- package/dist/chunks/success.nNwxJRBS.js.map +1 -0
- package/dist/chunks/summary-grid.keys.Xx-W5a2w.js +6 -0
- package/dist/chunks/summary-grid.keys.Xx-W5a2w.js.map +1 -0
- package/dist/chunks/summary-grid.types.B0w2S_9r.js +337 -0
- package/dist/chunks/summary-grid.types.B0w2S_9r.js.map +1 -0
- package/dist/chunks/tab.DXE68qVf.js +192 -0
- package/dist/chunks/tab.DXE68qVf.js.map +1 -0
- package/dist/chunks/tabs.keys.B4qGhjp2.js +7 -0
- package/dist/chunks/tabs.keys.B4qGhjp2.js.map +1 -0
- package/dist/chunks/tag.7fp_M9Au.js +44 -0
- package/dist/chunks/tag.7fp_M9Au.js.map +1 -0
- package/dist/chunks/textarea.Ci9sKDFy.js +173 -0
- package/dist/chunks/textarea.Ci9sKDFy.js.map +1 -0
- package/dist/chunks/timeline-item.DcIQ-Q1T.js +255 -0
- package/dist/chunks/timeline-item.DcIQ-Q1T.js.map +1 -0
- package/dist/chunks/toast.DGvNp4ZM.js +171 -0
- package/dist/chunks/toast.DGvNp4ZM.js.map +1 -0
- package/dist/chunks/toggle.D2wmNu7m.js +108 -0
- package/dist/chunks/toggle.D2wmNu7m.js.map +1 -0
- package/dist/chunks/tooltip.BcQ24pKP.js +189 -0
- package/dist/chunks/tooltip.BcQ24pKP.js.map +1 -0
- package/dist/chunks/truncate.BfIl_-71.js +8 -0
- package/dist/chunks/truncate.BfIl_-71.js.map +1 -0
- package/dist/chunks/tutorial.Co2F7l0B.js +347 -0
- package/dist/chunks/tutorial.Co2F7l0B.js.map +1 -0
- package/dist/chunks/typography.hlOAxsEn.js +87 -0
- package/dist/chunks/typography.hlOAxsEn.js.map +1 -0
- package/dist/chunks/upload-files.5wQwbfkp.js +5 -0
- package/dist/chunks/upload-files.5wQwbfkp.js.map +1 -0
- package/dist/chunks/upload-files.jTQY6y2X.js +5 -0
- package/dist/chunks/upload-files.jTQY6y2X.js.map +1 -0
- package/dist/chunks/use-bento-toast-controller.BhtohoS1.js +52 -0
- package/dist/chunks/use-bento-toast-controller.BhtohoS1.js.map +1 -0
- package/dist/chunks/use-cached-selected-values.BYiLNRRi.js +1343 -0
- package/dist/chunks/use-cached-selected-values.BYiLNRRi.js.map +1 -0
- package/dist/chunks/use-country-items.B3Cd3Tdo.js +30 -0
- package/dist/chunks/use-country-items.B3Cd3Tdo.js.map +1 -0
- package/dist/chunks/use-country-phon-code.Bui3zD6W.js +5621 -0
- package/dist/chunks/use-country-phon-code.Bui3zD6W.js.map +1 -0
- package/dist/chunks/use-default-slot-validator.BDn0wkYP.js +13 -0
- package/dist/chunks/use-default-slot-validator.BDn0wkYP.js.map +1 -0
- package/dist/chunks/use-expandable-content-height.GkjjbmPy.js +17 -0
- package/dist/chunks/use-expandable-content-height.GkjjbmPy.js.map +1 -0
- package/dist/chunks/use-form-layout-loading.CWbjZiwP.js +12 -0
- package/dist/chunks/use-form-layout-loading.CWbjZiwP.js.map +1 -0
- package/dist/chunks/use-has-slot.C9lQZ6nz.js +6 -0
- package/dist/chunks/use-has-slot.C9lQZ6nz.js.map +1 -0
- package/dist/chunks/warning-filled.CbJ1pcB2.js +24 -0
- package/dist/chunks/warning-filled.CbJ1pcB2.js.map +1 -0
- package/dist/chunks/wrong-environment.BOsyKdRI.js +5 -0
- package/dist/chunks/wrong-environment.BOsyKdRI.js.map +1 -0
- package/dist/chunks/wrong-environment.BiHTPtbJ.js +5 -0
- package/dist/chunks/wrong-environment.BiHTPtbJ.js.map +1 -0
- package/dist/click-outside.js +5 -0
- package/dist/click-outside.js.map +1 -0
- package/dist/code-snippet.js +8 -0
- package/dist/code-snippet.js.map +1 -0
- package/dist/country.js +12 -0
- package/dist/country.js.map +1 -0
- package/dist/currency.js +6 -0
- package/dist/currency.js.map +1 -0
- package/dist/dashboard-template.js +6 -0
- package/dist/dashboard-template.js.map +1 -0
- package/dist/dashed-underline.js +5 -0
- package/dist/dashed-underline.js.map +1 -0
- package/dist/data-grid-template.js +5 -0
- package/dist/data-grid-template.js.map +1 -0
- package/dist/data-grid.js +13 -0
- package/dist/data-grid.js.map +1 -0
- package/dist/date-picker.js +10 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/date-range-picker.js +10 -0
- package/dist/date-range-picker.js.map +1 -0
- package/dist/date.js +6 -0
- package/dist/date.js.map +1 -0
- package/dist/divider.js +5 -0
- package/dist/divider.js.map +1 -0
- package/dist/dropdown.js +16 -0
- package/dist/dropdown.js.map +1 -0
- package/dist/empty-state.js +8 -0
- package/dist/empty-state.js.map +1 -0
- package/dist/file-uploader.js +5 -0
- package/dist/file-uploader.js.map +1 -0
- package/dist/filter-bar.js +9 -0
- package/dist/filter-bar.js.map +1 -0
- package/dist/focus-trap.js +5 -0
- package/dist/focus-trap.js.map +1 -0
- package/dist/fonts/fonts.css +2 -0
- package/dist/form-layout.js +8 -0
- package/dist/form-layout.js.map +1 -0
- package/dist/header-with-views.js +5 -0
- package/dist/header-with-views.js.map +1 -0
- package/dist/header.js +5 -0
- package/dist/header.js.map +1 -0
- package/dist/image.js +7 -0
- package/dist/image.js.map +1 -0
- package/dist/index.js +442 -0
- package/dist/index.js.map +1 -0
- package/dist/info-icon.js +5 -0
- package/dist/info-icon.js.map +1 -0
- package/dist/input-field-password.js +10 -0
- package/dist/input-field-password.js.map +1 -0
- package/dist/input-field-phone-number.js +6 -0
- package/dist/input-field-phone-number.js.map +1 -0
- package/dist/input-field.js +10 -0
- package/dist/input-field.js.map +1 -0
- package/dist/inspector.js +7 -0
- package/dist/inspector.js.map +1 -0
- package/dist/internal.js +45 -0
- package/dist/internal.js.map +1 -0
- package/dist/layout.js +6 -0
- package/dist/layout.js.map +1 -0
- package/dist/link.js +6 -0
- package/dist/link.js.map +1 -0
- package/dist/loading-indicator.js +6 -0
- package/dist/loading-indicator.js.map +1 -0
- package/dist/menu.js +6 -0
- package/dist/menu.js.map +1 -0
- package/dist/modal-fullscreen.js +6 -0
- package/dist/modal-fullscreen.js.map +1 -0
- package/dist/modal.js +14 -0
- package/dist/modal.js.map +1 -0
- package/dist/pagination.js +5 -0
- package/dist/pagination.js.map +1 -0
- package/dist/payment-method.js +7 -0
- package/dist/payment-method.js.map +1 -0
- package/dist/popover.js +7 -0
- package/dist/popover.js.map +1 -0
- package/dist/popper-container.js +9 -0
- package/dist/popper-container.js.map +1 -0
- package/dist/promo-banner.js +7 -0
- package/dist/promo-banner.js.map +1 -0
- package/dist/radio-group.js +9 -0
- package/dist/radio-group.js.map +1 -0
- package/dist/rich-text-editor.js +5 -0
- package/dist/rich-text-editor.js.map +1 -0
- package/dist/search-bar.js +9 -0
- package/dist/search-bar.js.map +1 -0
- package/dist/secondary-nav.js +5 -0
- package/dist/secondary-nav.js.map +1 -0
- package/dist/segmented-control.js +7 -0
- package/dist/segmented-control.js.map +1 -0
- package/dist/selection-card.js +7 -0
- package/dist/selection-card.js.map +1 -0
- package/dist/sidepanel.js +7 -0
- package/dist/sidepanel.js.map +1 -0
- package/dist/status.js +6 -0
- package/dist/status.js.map +1 -0
- package/dist/stepper.js +8 -0
- package/dist/stepper.js.map +1 -0
- package/dist/structured-list.js +6 -0
- package/dist/structured-list.js.map +1 -0
- package/dist/styles/bento-dark.css +2133 -0
- package/dist/styles/bento-light.css +2132 -0
- package/dist/styles/bento.css +2132 -0
- package/dist/styles/legacy.css +2132 -0
- package/dist/styles/styleguide.css +2187 -0
- package/dist/styles/utility.css +1002 -0
- package/dist/summary-grid.js +12 -0
- package/dist/summary-grid.js.map +1 -0
- package/dist/tabs.js +6 -0
- package/dist/tabs.js.map +1 -0
- package/dist/tag.js +6 -0
- package/dist/tag.js.map +1 -0
- package/dist/textarea.js +5 -0
- package/dist/textarea.js.map +1 -0
- package/dist/timeline.js +10 -0
- package/dist/timeline.js.map +1 -0
- package/dist/toast.js +5 -0
- package/dist/toast.js.map +1 -0
- package/dist/toggle.js +7 -0
- package/dist/toggle.js.map +1 -0
- package/dist/tutorial.js +5 -0
- package/dist/tutorial.js.map +1 -0
- package/dist/typography.js +8 -0
- package/dist/typography.js.map +1 -0
- package/dist/use-form-v4.js +8300 -0
- package/dist/use-form-v4.js.map +1 -0
- package/dist/web-types.json +17262 -0
- package/package.json +27 -24
|
@@ -0,0 +1,1343 @@
|
|
|
1
|
+
import { computed as i, ref as S, onMounted as Me, onUnmounted as we, watch as X, defineComponent as G, nextTick as ge, toRef as H, useSlots as Ge, useAttrs as Pe } from "vue";
|
|
2
|
+
import { B as $, a as se } from "./keyboard-navigation.DWmhelVv.js";
|
|
3
|
+
import { B as j } from "./typography.hlOAxsEn.js";
|
|
4
|
+
import { B as Fe } from "./loading-indicator.PxbRzshH.js";
|
|
5
|
+
import { B as Ye } from "./empty-state.BsdRxzS2.js";
|
|
6
|
+
import { u as le } from "./index.B6WW_F-J.js";
|
|
7
|
+
import { d as Ue } from "./debounce.DUTu11PS.js";
|
|
8
|
+
import "./index.Cl4_42j5.js";
|
|
9
|
+
import { C as Z, N as ze } from "./minus-small.DJacLGTw.js";
|
|
10
|
+
import { C as Ve } from "./checkmark-small.DVDtD4HQ.js";
|
|
11
|
+
/* empty css */
|
|
12
|
+
import { n as M } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
13
|
+
import { B as We } from "./chip.B0DRDvaa.js";
|
|
14
|
+
import { C as Ke } from "./chevron-down.eYtgv5ly.js";
|
|
15
|
+
import { C as je } from "./chevron-up.d8cwIlA_.js";
|
|
16
|
+
import { g as be } from "./generate-uid.NJ8tVoha.js";
|
|
17
|
+
import { a as qe, b as fe } from "./button-actions.N3D-Bb_x.js";
|
|
18
|
+
import { o as He } from "./resize.Bqks3WUm.js";
|
|
19
|
+
import "../assets/use-cached-selected-values.css";
|
|
20
|
+
const pe = (s, e, l, t) => {
|
|
21
|
+
const n = i(
|
|
22
|
+
() => {
|
|
23
|
+
var f, L;
|
|
24
|
+
return !!((f = s.value) != null && f.length) && ((L = s.value) == null ? void 0 : L.length) === e.value.length;
|
|
25
|
+
}
|
|
26
|
+
), a = i(() => {
|
|
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: n,
|
|
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: n }) {
|
|
39
|
+
const a = S(null), r = S([]), f = S(0), L = S(0), d = S(0);
|
|
40
|
+
let b;
|
|
41
|
+
const T = i(() => {
|
|
42
|
+
const I = typeof l == "number" ? s.value.length * l : s.value.reduce((C, m, y) => C + l(y), 0), O = typeof l == "number" ? f.value * l : s.value.slice(0, f.value).reduce((C, m, y) => C + l(y), 0);
|
|
43
|
+
return {
|
|
44
|
+
style: {
|
|
45
|
+
marginTop: `${O}px`,
|
|
46
|
+
height: `${I - O}px`
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}), g = () => {
|
|
50
|
+
const I = (n == null ? void 0 : n.value) ?? 0, O = Math.max(a.value.scrollTop - I, 0);
|
|
51
|
+
if (typeof l == "number")
|
|
52
|
+
return Math.floor(O / l);
|
|
53
|
+
let C = 0, m = 0;
|
|
54
|
+
for (let y = 0; y < s.value.length; y += 1) {
|
|
55
|
+
const R = l(y);
|
|
56
|
+
if (C += R, C >= O) {
|
|
57
|
+
m = y;
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return m;
|
|
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, C = 0;
|
|
67
|
+
for (let m = I; m < s.value.length; m += 1) {
|
|
68
|
+
const y = l(m);
|
|
69
|
+
if (O += y, C = m, O > d.value)
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
return C - I;
|
|
73
|
+
}, x = () => {
|
|
74
|
+
if (a.value) {
|
|
75
|
+
const I = p();
|
|
76
|
+
f.value = g(), L.value = Math.min(f.value + I + t, s.value.length), r.value = s.value.slice(f.value, L.value);
|
|
77
|
+
}
|
|
78
|
+
}, D = () => {
|
|
79
|
+
x();
|
|
80
|
+
};
|
|
81
|
+
e || (Me(() => {
|
|
82
|
+
a.value && (d.value = a.value.clientHeight, b = He(a.value, ({ clientHeight: I }) => {
|
|
83
|
+
d.value = I, x();
|
|
84
|
+
}), x());
|
|
85
|
+
}), we(() => {
|
|
86
|
+
b == null || b.disconnect();
|
|
87
|
+
}), X(
|
|
88
|
+
() => s.value,
|
|
89
|
+
() => {
|
|
90
|
+
x();
|
|
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: D,
|
|
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 Ze = 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 Je = 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__ */ M(
|
|
132
|
+
Ze,
|
|
133
|
+
Je,
|
|
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 = i(() => ({
|
|
154
|
+
"b-listbox-option--disabled": s.disabled,
|
|
155
|
+
"b-listbox-option--selected": s.selected
|
|
156
|
+
}));
|
|
157
|
+
return {
|
|
158
|
+
// Enums
|
|
159
|
+
BentoKeyboardNavigationKeyDownEvent: $,
|
|
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
|
+
}, nt = [], at = /* @__PURE__ */ M(
|
|
183
|
+
st,
|
|
184
|
+
lt,
|
|
185
|
+
nt,
|
|
186
|
+
!1,
|
|
187
|
+
null,
|
|
188
|
+
"c345b6c0"
|
|
189
|
+
);
|
|
190
|
+
const J = at.exports;
|
|
191
|
+
let ve = 0;
|
|
192
|
+
const it = {
|
|
193
|
+
beforeCreate() {
|
|
194
|
+
this.uuid = ve.toString(), ve += 1;
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
var ot = 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__ */ M(
|
|
201
|
+
it,
|
|
202
|
+
ot,
|
|
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: J,
|
|
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 = i(() => s.disabled ? !0 : null), n = i(() => s.selected ? !0 : null), a = i(() => s.disabled ? -1 : 0);
|
|
238
|
+
return {
|
|
239
|
+
// Values
|
|
240
|
+
ariaDisabled: t,
|
|
241
|
+
ariaSelected: n,
|
|
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 = [], vt = /* @__PURE__ */ M(
|
|
264
|
+
dt,
|
|
265
|
+
bt,
|
|
266
|
+
ft,
|
|
267
|
+
!1,
|
|
268
|
+
null,
|
|
269
|
+
"bb14d75a"
|
|
270
|
+
);
|
|
271
|
+
const mt = vt.exports, ye = ({ items: s }, e) => {
|
|
272
|
+
const l = i(() => s.value.length - 1), t = S(0), n = (g) => {
|
|
273
|
+
switch (g) {
|
|
274
|
+
case "increase":
|
|
275
|
+
t.value += 1;
|
|
276
|
+
break;
|
|
277
|
+
case "decrease":
|
|
278
|
+
t.value -= 1;
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
}, a = ({ edgeCaseItem: g }, p) => {
|
|
282
|
+
t.value !== g && (n(p), e(t.value));
|
|
283
|
+
}, r = (g) => {
|
|
284
|
+
T(g), a(
|
|
285
|
+
{
|
|
286
|
+
edgeCaseItem: l.value
|
|
287
|
+
},
|
|
288
|
+
"increase"
|
|
289
|
+
/* INCREASE */
|
|
290
|
+
);
|
|
291
|
+
}, f = (g) => {
|
|
292
|
+
T(g), a(
|
|
293
|
+
{
|
|
294
|
+
edgeCaseItem: 0
|
|
295
|
+
},
|
|
296
|
+
"decrease"
|
|
297
|
+
/* DECREASE */
|
|
298
|
+
);
|
|
299
|
+
}, L = () => {
|
|
300
|
+
t.value = 0, e(t.value);
|
|
301
|
+
}, d = () => {
|
|
302
|
+
t.value = l.value, e(t.value);
|
|
303
|
+
}, b = (g) => {
|
|
304
|
+
t.value = g;
|
|
305
|
+
}, T = (g) => {
|
|
306
|
+
var p;
|
|
307
|
+
(p = g == null ? void 0 : g.detail) == null || p.preventDefault();
|
|
308
|
+
};
|
|
309
|
+
return {
|
|
310
|
+
moveToFirstElement: L,
|
|
311
|
+
moveToLastElement: d,
|
|
312
|
+
moveToNextElement: r,
|
|
313
|
+
moveToPreviousElement: f,
|
|
314
|
+
setListboxFocusedIndex: b,
|
|
315
|
+
preventDefault: T,
|
|
316
|
+
focusedIndex: t
|
|
317
|
+
};
|
|
318
|
+
}, he = (s, e, l = S("option"), t = !0) => {
|
|
319
|
+
const n = S([]), 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
|
+
n.value = t ? r.filter((f) => f.checkVisibility()) : r;
|
|
324
|
+
};
|
|
325
|
+
return X(
|
|
326
|
+
e,
|
|
327
|
+
() => {
|
|
328
|
+
ge(() => {
|
|
329
|
+
a();
|
|
330
|
+
});
|
|
331
|
+
},
|
|
332
|
+
{ immediate: !0 }
|
|
333
|
+
), {
|
|
334
|
+
visibleDomOptions: n,
|
|
335
|
+
updateVisibleDomOptions: a
|
|
336
|
+
};
|
|
337
|
+
}, _t = G({
|
|
338
|
+
name: "bento-listbox-single-select",
|
|
339
|
+
components: {
|
|
340
|
+
BentoListboxSingleSelectCategory: tt,
|
|
341
|
+
BentoListboxSingleSelectOption: mt
|
|
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: n }) {
|
|
386
|
+
const a = S(null), r = S([]), f = i(() => {
|
|
387
|
+
var m;
|
|
388
|
+
return !!((m = s.selectedValue) != null && m.length) && s.selectedValue.at(0);
|
|
389
|
+
}), L = i(
|
|
390
|
+
() => {
|
|
391
|
+
var m, y, R, P;
|
|
392
|
+
return {
|
|
393
|
+
"aria-label": (m = n["aria-label"]) == null ? void 0 : m.toString(),
|
|
394
|
+
"aria-busy": (y = n["aria-busy"]) == null ? void 0 : y.toString(),
|
|
395
|
+
"aria-atomic": (R = n["aria-atomic"]) == null ? void 0 : R.toString(),
|
|
396
|
+
"aria-live": (P = n["aria-live"]) == null ? void 0 : P.toString()
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
), d = i(() => !!s.items.some(({ items: m }) => !!m)), b = (m) => (y) => {
|
|
400
|
+
e(m, [y]);
|
|
401
|
+
}, { visibleDomOptions: T } = he(a, H(s, "items"), S("option"), !1), g = (m) => {
|
|
402
|
+
var y;
|
|
403
|
+
(y = T.value[m]) == null || y.focus();
|
|
404
|
+
}, {
|
|
405
|
+
moveToNextElement: p,
|
|
406
|
+
moveToPreviousElement: x,
|
|
407
|
+
moveToFirstElement: D,
|
|
408
|
+
moveToLastElement: B,
|
|
409
|
+
setListboxFocusedIndex: I
|
|
410
|
+
} = ye(
|
|
411
|
+
{
|
|
412
|
+
items: T
|
|
413
|
+
},
|
|
414
|
+
g
|
|
415
|
+
), O = {
|
|
416
|
+
[$.ARROW_UP]: x,
|
|
417
|
+
[$.ARROW_DOWN]: p,
|
|
418
|
+
[$.HOME]: D,
|
|
419
|
+
[$.END]: B
|
|
420
|
+
}, C = {
|
|
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: L,
|
|
446
|
+
// Computed
|
|
447
|
+
hasCategories: d,
|
|
448
|
+
// Methods
|
|
449
|
+
onOptionSelected: b,
|
|
450
|
+
// Keyboard navigation
|
|
451
|
+
listboxListeners: O,
|
|
452
|
+
listboxOptionListeners: C
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
var gt = 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(n) {
|
|
460
|
+
return l("bento-listbox-single-select-option", e._g({ key: n.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: n, disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null, selected: n.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(n, 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__ */ M(
|
|
474
|
+
_t,
|
|
475
|
+
gt,
|
|
476
|
+
pt,
|
|
477
|
+
!1,
|
|
478
|
+
null,
|
|
479
|
+
null
|
|
480
|
+
);
|
|
481
|
+
const ht = yt.exports;
|
|
482
|
+
let me = 0;
|
|
483
|
+
const Ct = {
|
|
484
|
+
beforeCreate() {
|
|
485
|
+
this.uuid = me.toString(), me += 1;
|
|
486
|
+
}
|
|
487
|
+
};
|
|
488
|
+
var xt = 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
|
+
}, St = [], Ot = /* @__PURE__ */ M(
|
|
492
|
+
Ct,
|
|
493
|
+
xt,
|
|
494
|
+
St,
|
|
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 = i(() => ({
|
|
510
|
+
[`b-checkbox-input--${Z.DISABLED}`]: e.disabled
|
|
511
|
+
})), t = i(() => ({
|
|
512
|
+
[`b-checkbox-input__outline--${Z.UNCHECKED}`]: !e.checked && !e.indeterminate && !e.allSelected,
|
|
513
|
+
[`b-checkbox-input__outline--${Z.CHECKED}`]: (e.checked || e.allSelected) && !e.indeterminate,
|
|
514
|
+
[`b-checkbox-input__outline--${Z.INDETERMINATE}`]: e.indeterminate
|
|
515
|
+
}));
|
|
516
|
+
return { __sfc: !0, props: e, conditionalClasses: l, outlineConditionalClasses: t, CheckmarkSmallIcon: Ve, MinusSmallIcon: ze, DoubleCheckmarkSmallIcon: Et };
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
var Lt = 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
|
+
}, At = [], kt = /* @__PURE__ */ M(
|
|
523
|
+
It,
|
|
524
|
+
Lt,
|
|
525
|
+
At,
|
|
526
|
+
!1,
|
|
527
|
+
null,
|
|
528
|
+
"b87bbaf9"
|
|
529
|
+
);
|
|
530
|
+
const ne = kt.exports;
|
|
531
|
+
var Ce = /* @__PURE__ */ ((s) => (s.DISABLED = "disabled", s.STATIC_CATEGORY = "static-category", s))(Ce || {}), z = /* @__PURE__ */ ((s) => (s.SELECT_CATEGORY = "select-category", s.UNSELECT_CATEGORY = "unselect-category", s.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", s))(z || {});
|
|
532
|
+
const Dt = {
|
|
533
|
+
"en-US": {
|
|
534
|
+
categoryClosed: "{category} closed",
|
|
535
|
+
categoryOpened: "{category} opened"
|
|
536
|
+
}
|
|
537
|
+
}, Rt = G({
|
|
538
|
+
i18n: { messages: Dt },
|
|
539
|
+
name: "bento-listbox-multi-select-category",
|
|
540
|
+
components: {
|
|
541
|
+
BentoTypography: j,
|
|
542
|
+
BentoListboxOption: J,
|
|
543
|
+
ChevronDownIcon: Ke,
|
|
544
|
+
ChevronUpIcon: je,
|
|
545
|
+
DecorativeCheckbox: ne
|
|
546
|
+
},
|
|
547
|
+
props: {
|
|
548
|
+
/**
|
|
549
|
+
* The option elements to populate the listbox with.
|
|
550
|
+
* It must be an array of {@see BentoListboxOptionItem }.
|
|
551
|
+
*
|
|
552
|
+
* @property {string} value.label - Text to be displayed in the option
|
|
553
|
+
* @property {string,number} value.value - Value of the option
|
|
554
|
+
* @property {BentoListboxOptionItem} value.items - Category items list
|
|
555
|
+
*/
|
|
556
|
+
category: {
|
|
557
|
+
type: Object,
|
|
558
|
+
required: !0
|
|
559
|
+
},
|
|
560
|
+
/**
|
|
561
|
+
* Function that allows the options to be disabled
|
|
562
|
+
*
|
|
563
|
+
* @type {BentoListboxIsOptionDisabled}
|
|
564
|
+
* @param {BentoListboxOptionItem} option - listbox option object
|
|
565
|
+
* @param {string} option.label - Option's label text
|
|
566
|
+
* @param {string|number} option.value - Option's value
|
|
567
|
+
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
568
|
+
*/
|
|
569
|
+
isOptionDisabled: {
|
|
570
|
+
type: [Function],
|
|
571
|
+
default: () => !1
|
|
572
|
+
},
|
|
573
|
+
/**
|
|
574
|
+
* The `input` value.
|
|
575
|
+
* Providing an empty array will select no options.
|
|
576
|
+
*/
|
|
577
|
+
selectedItemsList: {
|
|
578
|
+
type: Array,
|
|
579
|
+
default: () => []
|
|
580
|
+
},
|
|
581
|
+
/**
|
|
582
|
+
* If enabled, dropdown will display non-selectable, static categories
|
|
583
|
+
*/
|
|
584
|
+
staticCategories: { type: Boolean, default: !1 },
|
|
585
|
+
/**
|
|
586
|
+
* Category's tabindex
|
|
587
|
+
*/
|
|
588
|
+
tabindex: { type: Number, default: -1 }
|
|
589
|
+
},
|
|
590
|
+
emits: [
|
|
591
|
+
z.SELECT_CATEGORY,
|
|
592
|
+
z.UNSELECT_CATEGORY,
|
|
593
|
+
z.TOGGLE_CATEGORY_VISIBILITY
|
|
594
|
+
],
|
|
595
|
+
setup(s, { emit: e }) {
|
|
596
|
+
const l = S(!1), { t } = le(), n = be("category-group"), a = be("category-name"), r = (E) => s.isOptionDisabled ? s.isOptionDisabled(E) : !1, f = i(
|
|
597
|
+
() => s.category.items.every((E) => r(E))
|
|
598
|
+
), L = H(s, "staticCategories"), d = i(() => l.value || s.staticCategories), b = i(() => ({
|
|
599
|
+
[`b-listbox-multi-select-category--${Ce.DISABLED}`]: f.value
|
|
600
|
+
})), T = (E, A) => {
|
|
601
|
+
E.preventDefault(), l.value = A !== void 0 ? A : !l.value, e(z.TOGGLE_CATEGORY_VISIBILITY, s.category.value);
|
|
602
|
+
}, g = (E) => {
|
|
603
|
+
var Y;
|
|
604
|
+
const A = r(E), N = ((Y = s.selectedItemsList) == null ? void 0 : Y.includes(E.value)) || !1;
|
|
605
|
+
return { isDisabled: A, isPreSelected: N };
|
|
606
|
+
}, p = i(
|
|
607
|
+
() => s.category.items.filter((E) => {
|
|
608
|
+
const { isDisabled: A, isPreSelected: N } = g(E);
|
|
609
|
+
return A && N || !A;
|
|
610
|
+
})
|
|
611
|
+
), x = i(
|
|
612
|
+
() => {
|
|
613
|
+
var E;
|
|
614
|
+
return (E = p.value) == null ? void 0 : E.filter(
|
|
615
|
+
({ value: A }) => {
|
|
616
|
+
var N;
|
|
617
|
+
return (N = s.selectedItemsList) == null ? void 0 : N.includes(A);
|
|
618
|
+
}
|
|
619
|
+
);
|
|
620
|
+
}
|
|
621
|
+
), D = i(() => {
|
|
622
|
+
const E = l.value ? "categoryOpened" : "categoryClosed";
|
|
623
|
+
return t(E, { category: s.category.label });
|
|
624
|
+
}), B = () => {
|
|
625
|
+
e(z.SELECT_CATEGORY);
|
|
626
|
+
}, I = () => {
|
|
627
|
+
e(z.UNSELECT_CATEGORY);
|
|
628
|
+
}, { isAllSelected: O, isIndeterminate: C, toggleSelectAll: m } = pe(
|
|
629
|
+
x,
|
|
630
|
+
p,
|
|
631
|
+
B,
|
|
632
|
+
I
|
|
633
|
+
), y = i(() => C.value ? "mixed" : `${O.value}`), R = S(O.value), P = () => {
|
|
634
|
+
R.value = !R.value, m(R.value);
|
|
635
|
+
};
|
|
636
|
+
return X(O, () => {
|
|
637
|
+
R.value = O.value;
|
|
638
|
+
}), {
|
|
639
|
+
// Values
|
|
640
|
+
chevronTitle: D,
|
|
641
|
+
conditionalClass: b,
|
|
642
|
+
hasAllPropsDisabled: f,
|
|
643
|
+
isOpen: l,
|
|
644
|
+
isAllSelected: O,
|
|
645
|
+
isIndeterminate: C,
|
|
646
|
+
isStaticCategory: L,
|
|
647
|
+
categoryGroupId: n,
|
|
648
|
+
categoryNameId: a,
|
|
649
|
+
// Computed
|
|
650
|
+
showItemChildren: d,
|
|
651
|
+
ariaCheckedComputed: y,
|
|
652
|
+
// Methods
|
|
653
|
+
handleSelectAll: P,
|
|
654
|
+
toggleOpen: T,
|
|
655
|
+
toggleSelectAll: m
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
var Bt = function() {
|
|
660
|
+
var e = this, l = e._self._c;
|
|
661
|
+
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) {
|
|
662
|
+
return t.preventDefault(), e.handleSelectAll.apply(null, arguments);
|
|
663
|
+
} }, nativeOn: { keydown: [function(t) {
|
|
664
|
+
return !t.type.indexOf("key") && e._k(t.keyCode, "arrow-left", void 0, t.key, void 0) ? null : e.toggleOpen(t, !1);
|
|
665
|
+
}, function(t) {
|
|
666
|
+
return !t.type.indexOf("key") && e._k(t.keyCode, "arrow-right", void 0, t.key, void 0) ? null : e.toggleOpen(t, !0);
|
|
667
|
+
}] } }, [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) {
|
|
668
|
+
return t.stopPropagation(), e.toggleOpen.apply(null, arguments);
|
|
669
|
+
} } }, [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);
|
|
670
|
+
}, $t = [], Nt = /* @__PURE__ */ M(
|
|
671
|
+
Rt,
|
|
672
|
+
Bt,
|
|
673
|
+
$t,
|
|
674
|
+
!1,
|
|
675
|
+
null,
|
|
676
|
+
"00ccd708"
|
|
677
|
+
);
|
|
678
|
+
const Mt = Nt.exports;
|
|
679
|
+
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 || {});
|
|
680
|
+
const wt = G({
|
|
681
|
+
name: "listbox-multi-select-options",
|
|
682
|
+
components: {
|
|
683
|
+
BentoListboxOption: J,
|
|
684
|
+
BentoTypography: j,
|
|
685
|
+
ListboxMultiSelectCategory: Mt,
|
|
686
|
+
DecorativeCheckbox: ne
|
|
687
|
+
},
|
|
688
|
+
inheritAttrs: !1,
|
|
689
|
+
props: {
|
|
690
|
+
/**
|
|
691
|
+
* Indicates if the items listed are inside a category
|
|
692
|
+
* so they can be padded to right by one level in recursion.
|
|
693
|
+
* Items of categories are automatically defined as "categoryItems"
|
|
694
|
+
*/
|
|
695
|
+
categoryItems: { type: Boolean, default: !1 },
|
|
696
|
+
/**
|
|
697
|
+
* Current focused option index
|
|
698
|
+
*/
|
|
699
|
+
focusedIndex: { type: Number, default: 0 },
|
|
700
|
+
/**
|
|
701
|
+
* Function that allows the options to be disabled
|
|
702
|
+
*
|
|
703
|
+
* @type {BentoListboxIsOptionDisabled}
|
|
704
|
+
* @param {BentoListboxOptionItem} option - listbox option object
|
|
705
|
+
* @param {string} option.label - Option's label text
|
|
706
|
+
* @param {string|number} option.value - Option's value
|
|
707
|
+
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
708
|
+
*/
|
|
709
|
+
isOptionDisabled: {
|
|
710
|
+
type: Function,
|
|
711
|
+
default: () => !1
|
|
712
|
+
},
|
|
713
|
+
/**
|
|
714
|
+
* The option elements to populate the listbox with.
|
|
715
|
+
* It must be an array of {@see BentoListboxOptionItem }.
|
|
716
|
+
*
|
|
717
|
+
* @property {string} value.label - Text to be displayed in the option
|
|
718
|
+
* @property {string,number} value.value - Value of the option
|
|
719
|
+
*/
|
|
720
|
+
items: {
|
|
721
|
+
type: Array,
|
|
722
|
+
required: !0
|
|
723
|
+
},
|
|
724
|
+
/**
|
|
725
|
+
* Indicates if the elements options are inside a multi-level category
|
|
726
|
+
*/
|
|
727
|
+
isMultiLevel: { type: Boolean, default: !1 },
|
|
728
|
+
/**
|
|
729
|
+
* Flag that indicates that an external search it's being made
|
|
730
|
+
* to filter out the items inside the the multi-select listbox
|
|
731
|
+
*
|
|
732
|
+
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
733
|
+
*/
|
|
734
|
+
searching: { type: Boolean, default: !1 },
|
|
735
|
+
/**
|
|
736
|
+
* List of selected items.
|
|
737
|
+
* Providing an empty array will select no options.
|
|
738
|
+
*/
|
|
739
|
+
selectedItemsList: {
|
|
740
|
+
type: Array,
|
|
741
|
+
default: () => []
|
|
742
|
+
},
|
|
743
|
+
/**
|
|
744
|
+
* If enabled, dropdown will display non-selectable, static categories
|
|
745
|
+
*/
|
|
746
|
+
staticCategories: { type: Boolean, default: !1 },
|
|
747
|
+
/**
|
|
748
|
+
* Object with the index of each item.
|
|
749
|
+
*/
|
|
750
|
+
itemsIndex: {
|
|
751
|
+
type: Object,
|
|
752
|
+
default: () => ({})
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
emits: [
|
|
756
|
+
w.TOGGLE_CHECKBOX_SELECTION,
|
|
757
|
+
w.SELECT_CATEGORY,
|
|
758
|
+
w.UNSELECT_CATEGORY,
|
|
759
|
+
w.TOGGLE_CATEGORY_VISIBILITY
|
|
760
|
+
],
|
|
761
|
+
setup(s, { emit: e }) {
|
|
762
|
+
const l = (d) => {
|
|
763
|
+
s.isOptionDisabled(d) || e(w.TOGGLE_CHECKBOX_SELECTION, d);
|
|
764
|
+
}, t = (d) => !!d.items, n = (d) => {
|
|
765
|
+
const b = s.isMultiLevel && s.searching;
|
|
766
|
+
return d.description && (!s.isMultiLevel || b);
|
|
767
|
+
}, a = (d) => d.items ? !!d.items.find((b) => s.selectedItemsList.includes(b.value)) : s.selectedItemsList.includes(d.value), r = (d) => {
|
|
768
|
+
if (t(d)) {
|
|
769
|
+
const b = a(d) ? w.UNSELECT_CATEGORY : w.SELECT_CATEGORY;
|
|
770
|
+
e(b, d);
|
|
771
|
+
} else
|
|
772
|
+
l(d);
|
|
773
|
+
};
|
|
774
|
+
return {
|
|
775
|
+
// Values
|
|
776
|
+
conditionalClasses: i(() => ({
|
|
777
|
+
"b-listbox-multi-select-options__static-category-option": s.staticCategories,
|
|
778
|
+
"b-listbox-multi-select-options__category-option": s.categoryItems
|
|
779
|
+
})),
|
|
780
|
+
// Methods
|
|
781
|
+
isOptionSelected: a,
|
|
782
|
+
shouldShowDescription: n,
|
|
783
|
+
toggleCheckboxSelection: l,
|
|
784
|
+
toggleSearchOption: r,
|
|
785
|
+
computedTabindex: (d) => s.itemsIndex[d] === s.focusedIndex ? 0 : -1,
|
|
786
|
+
// Enums
|
|
787
|
+
BentoListboxEvent: c,
|
|
788
|
+
ListboxMultiSelectOptionsEvent: w
|
|
789
|
+
};
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
var Gt = function() {
|
|
793
|
+
var e = this, l = e._self._c;
|
|
794
|
+
return e._self._setupProxy, l("div", e._l(e.items, function(t) {
|
|
795
|
+
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 }, on: { click: function(n) {
|
|
796
|
+
return e.toggleSearchOption(t);
|
|
797
|
+
}, "enter-pressed": function(n) {
|
|
798
|
+
return e.toggleSearchOption(t);
|
|
799
|
+
}, "space-pressed": function(n) {
|
|
800
|
+
return n.preventDefault(), e.toggleSearchOption(t);
|
|
801
|
+
} } }, [l("decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, checked: e.isOptionSelected(t) } }), e._t("default", function() {
|
|
802
|
+
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)];
|
|
803
|
+
}, 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(n) {
|
|
804
|
+
return e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, t);
|
|
805
|
+
}, "unselect-category": function(n) {
|
|
806
|
+
return e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, t);
|
|
807
|
+
}, "toggle-category-visibility": function(n) {
|
|
808
|
+
return e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, n);
|
|
809
|
+
} } }, [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 }, on: { "toggle-checkbox-selection": (n) => e.toggleCheckboxSelection(n) } })], 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 }, on: { click: function(n) {
|
|
810
|
+
return e.toggleCheckboxSelection(t);
|
|
811
|
+
}, "enter-pressed": function(n) {
|
|
812
|
+
return e.toggleCheckboxSelection(t);
|
|
813
|
+
}, "space-pressed": function(n) {
|
|
814
|
+
return n.preventDefault(), e.toggleCheckboxSelection(t);
|
|
815
|
+
} } }, [l("decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, checked: e.isOptionSelected(t) } }), e._t("default", function() {
|
|
816
|
+
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)];
|
|
817
|
+
}, null, t)], 2)]], 2);
|
|
818
|
+
}), 0);
|
|
819
|
+
}, Pt = [], Ft = /* @__PURE__ */ M(
|
|
820
|
+
wt,
|
|
821
|
+
Gt,
|
|
822
|
+
Pt,
|
|
823
|
+
!1,
|
|
824
|
+
null,
|
|
825
|
+
"68986632"
|
|
826
|
+
);
|
|
827
|
+
const Yt = Ft.exports, Ut = (s) => {
|
|
828
|
+
const e = i(() => {
|
|
829
|
+
var t;
|
|
830
|
+
return !!((t = s.value) != null && t.find(({ items: n }) => !!n));
|
|
831
|
+
}), l = i(() => {
|
|
832
|
+
var t;
|
|
833
|
+
return e.value ? (t = s.value) == null ? void 0 : t.reduce((n, a) => (a.items ? n.push(...a.items.flat()) : n.push(a), n), []) : s.value;
|
|
834
|
+
});
|
|
835
|
+
return {
|
|
836
|
+
isMultiLevelSelect: e,
|
|
837
|
+
flattenedItemsList: l
|
|
838
|
+
};
|
|
839
|
+
}, zt = {
|
|
840
|
+
"en-US": {
|
|
841
|
+
allSelected: "All selected ({total})",
|
|
842
|
+
numberOfTotalSelected: "{number} of {total} selected",
|
|
843
|
+
numbersSelected: "{number} selected",
|
|
844
|
+
selectAll: "Select all ({total})"
|
|
845
|
+
},
|
|
846
|
+
"ja-JP": {
|
|
847
|
+
allSelected: "すべて選択済み ({total})",
|
|
848
|
+
numberOfTotalSelected: "{total}件中{number}件を選択済み",
|
|
849
|
+
numbersSelected: "{number}件を選択済み",
|
|
850
|
+
selectAll: "すべて選択 ({total})"
|
|
851
|
+
},
|
|
852
|
+
"pt-BR": {
|
|
853
|
+
allSelected: "Todos selecionados ({total})",
|
|
854
|
+
numberOfTotalSelected: "{number} de {total} selecionados",
|
|
855
|
+
numbersSelected: "{number} selecionados",
|
|
856
|
+
selectAll: "Selecionar todos ({total})"
|
|
857
|
+
}
|
|
858
|
+
}, Vt = { i18n: { messages: zt } }, Wt = /* @__PURE__ */ G({
|
|
859
|
+
...Vt,
|
|
860
|
+
__name: "listbox-multi-select",
|
|
861
|
+
props: {
|
|
862
|
+
hasMoreItems: { type: Boolean, default: !1 },
|
|
863
|
+
isOptionDisabled: { default: () => () => !1 },
|
|
864
|
+
items: null,
|
|
865
|
+
lazyLoadType: { default: "none" },
|
|
866
|
+
searching: { type: Boolean, default: !1 },
|
|
867
|
+
selectedValues: null,
|
|
868
|
+
staticCategories: { type: Boolean, default: !1 }
|
|
869
|
+
},
|
|
870
|
+
emits: ["select"],
|
|
871
|
+
setup(s, { expose: e, emit: l }) {
|
|
872
|
+
const t = s, { t: n, n: a } = le(), r = Ge(), f = Pe(), L = i(
|
|
873
|
+
() => {
|
|
874
|
+
var o, u, v, h;
|
|
875
|
+
return {
|
|
876
|
+
"aria-label": (o = f["aria-label"]) == null ? void 0 : o.toString(),
|
|
877
|
+
"aria-busy": (u = f["aria-busy"]) == null ? void 0 : u.toString(),
|
|
878
|
+
"aria-atomic": (v = f["aria-atomic"]) == null ? void 0 : v.toString(),
|
|
879
|
+
"aria-live": (h = f["aria-live"]) == null ? void 0 : h.toString(),
|
|
880
|
+
"aria-multiselectable": !0
|
|
881
|
+
};
|
|
882
|
+
}
|
|
883
|
+
), d = S(null), b = S(null), T = S(null), g = S(null), p = i(() => t.selectedValues.map(({ value: o }) => o)), { isMultiLevelSelect: x, flattenedItemsList: D } = Ut(H(t, "items")), B = i(() => x.value && !t.staticCategories), I = i(() => B.value ? "tree" : "listbox"), O = i(() => B.value ? "treeitem" : "option"), C = (o) => {
|
|
884
|
+
var h;
|
|
885
|
+
const u = t.isOptionDisabled(o), v = ((h = p.value) == null ? void 0 : h.includes(o.value)) || !1;
|
|
886
|
+
return { isDisabled: u, isPreSelected: v };
|
|
887
|
+
}, m = i(() => {
|
|
888
|
+
if (t.searching && x)
|
|
889
|
+
return t.items;
|
|
890
|
+
const o = D.value.filter((u) => {
|
|
891
|
+
const { isDisabled: v, isPreSelected: h } = C(u);
|
|
892
|
+
return v && h || !v;
|
|
893
|
+
});
|
|
894
|
+
return t.selectedValues.forEach((u) => {
|
|
895
|
+
o.find((v) => v.value === u.value) || o.push(u);
|
|
896
|
+
}), o;
|
|
897
|
+
}), y = i(
|
|
898
|
+
() => {
|
|
899
|
+
var o;
|
|
900
|
+
return (o = m.value) == null ? void 0 : o.filter((u) => {
|
|
901
|
+
var v;
|
|
902
|
+
return u.items && x.value && t.searching ? u.items.filter(
|
|
903
|
+
(_) => (t.selectedValues ?? []).includes(_.value)
|
|
904
|
+
).length === u.items.length : (v = p.value) == null ? void 0 : v.includes(u.value);
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
), R = () => x.value && !t.searching ? D.value.length : t.items.length, P = i(() => {
|
|
908
|
+
var h;
|
|
909
|
+
const o = m.value.length, u = R(), v = ((h = y.value) == null ? void 0 : h.length) || 0;
|
|
910
|
+
return v === 0 ? n("selectAll", { total: a(o) }) : v === u ? n("allSelected", { total: a(u) }) : v <= u ? n("numberOfTotalSelected", { number: a(v), total: a(u) }) : n("numbersSelected", { number: a(v) });
|
|
911
|
+
}), E = (o) => {
|
|
912
|
+
const u = (h) => {
|
|
913
|
+
const { isDisabled: _, isPreSelected: F } = C(h);
|
|
914
|
+
return _ && F || !_;
|
|
915
|
+
}, v = o.filter(u).filter((h) => !p.value.includes(h.value));
|
|
916
|
+
l("select", [...t.selectedValues, ...v]);
|
|
917
|
+
}, A = (o) => {
|
|
918
|
+
const u = (_) => {
|
|
919
|
+
const { isDisabled: F, isPreSelected: Ne } = C(_);
|
|
920
|
+
return !(F && Ne);
|
|
921
|
+
}, v = o.filter(u).map(({ value: _ }) => _), h = t.selectedValues.filter((_) => !(v != null && v.includes(_.value)));
|
|
922
|
+
l("select", h);
|
|
923
|
+
}, N = () => {
|
|
924
|
+
E(D.value);
|
|
925
|
+
}, Y = () => {
|
|
926
|
+
A(D.value);
|
|
927
|
+
}, { isAllSelected: U, isIndeterminate: k, toggleSelectAll: V } = pe(
|
|
928
|
+
y,
|
|
929
|
+
m,
|
|
930
|
+
N,
|
|
931
|
+
Y
|
|
932
|
+
), xe = i(() => k.value ? "mixed" : `${U.value}`), q = S(U.value), Se = () => {
|
|
933
|
+
q.value = !q.value, V(q.value);
|
|
934
|
+
};
|
|
935
|
+
X(U, () => {
|
|
936
|
+
q.value = U.value;
|
|
937
|
+
});
|
|
938
|
+
const Oe = (o) => {
|
|
939
|
+
E(o.items);
|
|
940
|
+
}, Ee = (o) => {
|
|
941
|
+
A(o.items);
|
|
942
|
+
}, Te = (o, u) => {
|
|
943
|
+
let v = !1;
|
|
944
|
+
const h = t.selectedValues.filter(({ value: _ }) => u.value === _ ? (v = !0, !1) : !0);
|
|
945
|
+
v || h.push(u), l(o, h);
|
|
946
|
+
}, Ie = i(() => {
|
|
947
|
+
if (!x.value)
|
|
948
|
+
return t.selectedValues;
|
|
949
|
+
const o = (_) => p.value.includes(_.value), u = (_) => !t.staticCategories && _.every((F) => o(F));
|
|
950
|
+
return t.items.flatMap(
|
|
951
|
+
(_) => _.items && !u(_.items) ? _.items : _
|
|
952
|
+
).filter((_) => _.items ? !0 : o(_));
|
|
953
|
+
}), Le = i(() => {
|
|
954
|
+
var v, h, _, F;
|
|
955
|
+
const o = ["automatic", "button"].includes(t.lazyLoadType), u = ((v = t.selectedValues) == null ? void 0 : v.length) > 0 && ((h = y.value) == null ? void 0 : h.length) !== ((_ = D.value) == null ? void 0 : _.length);
|
|
956
|
+
return o && t.hasMoreItems ? !!((F = t.selectedValues) != null && F.length) : u;
|
|
957
|
+
}), Ae = i(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), W = S([]), { visibleDomOptions: Q, updateVisibleDomOptions: ae } = he(
|
|
958
|
+
d,
|
|
959
|
+
H(t, "items"),
|
|
960
|
+
O
|
|
961
|
+
), ke = (o) => {
|
|
962
|
+
W.value.includes(o) ? W.value = W.value.filter((u) => u !== o) : W.value.push(o), ge(() => {
|
|
963
|
+
ae();
|
|
964
|
+
});
|
|
965
|
+
}, ie = (o) => {
|
|
966
|
+
var u;
|
|
967
|
+
(u = Q.value[o]) == null || u.focus();
|
|
968
|
+
}, {
|
|
969
|
+
moveToNextElement: oe,
|
|
970
|
+
moveToPreviousElement: ce,
|
|
971
|
+
moveToFirstElement: re,
|
|
972
|
+
moveToLastElement: ue,
|
|
973
|
+
preventDefault: ee,
|
|
974
|
+
focusedIndex: De,
|
|
975
|
+
setListboxFocusedIndex: de
|
|
976
|
+
} = ye(
|
|
977
|
+
{
|
|
978
|
+
items: Q
|
|
979
|
+
},
|
|
980
|
+
ie
|
|
981
|
+
), Re = {
|
|
982
|
+
[$.ARROW_UP]: (o) => ce(o),
|
|
983
|
+
[$.ARROW_DOWN]: (o) => oe(o),
|
|
984
|
+
[$.HOME]: re,
|
|
985
|
+
[$.END]: ue
|
|
986
|
+
};
|
|
987
|
+
e({
|
|
988
|
+
/**
|
|
989
|
+
* Method to set the index of the item to be focused on
|
|
990
|
+
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
991
|
+
*/
|
|
992
|
+
setListboxFocusedIndex: de
|
|
993
|
+
});
|
|
994
|
+
const Be = {
|
|
995
|
+
[$.ARROW_UP]: ee,
|
|
996
|
+
[$.ARROW_DOWN]: ee
|
|
997
|
+
}, $e = i(() => {
|
|
998
|
+
let o = 1;
|
|
999
|
+
const u = {};
|
|
1000
|
+
return t.items.forEach((v) => {
|
|
1001
|
+
let h = W.value.includes(v.value);
|
|
1002
|
+
v.items ? (t.staticCategories ? h = !0 : u[v.value] = o++, h && v.items.forEach((_) => u[_.value] = o++)) : u[v.value] = o++;
|
|
1003
|
+
}), u;
|
|
1004
|
+
});
|
|
1005
|
+
return { __sfc: !0, props: t, emit: l, t: n, n: a, slots: r, attrs: f, ariaAttributes: L, listboxRef: d, selectAllListboxItemsRef: b, selectedListboxItemsRef: T, listboxItemsRef: g, selectedItemsList: p, isMultiLevelSelect: x, flattenedItemsList: D, isTreePattern: B, computedRole: I, computedOptionRole: O, optionStates: C, enabledItems: m, visibleSelectedList: y, calculateTotalItems: R, selectAllCheckboxText: P, selectAll: E, unselectAll: A, selectAllItems: N, unselectAllItems: Y, isAllSelected: U, isIndeterminate: k, toggleSelectAll: V, ariaCheckedComputed: xe, isSelectAllOn: q, handleSelectAll: Se, selectAllCategory: Oe, unselectAllCategory: Ee, toggleCheckboxSelection: Te, selectedOptions: Ie, showSelectedItems: Le, showSelectAllCheckbox: Ae, expandedCategories: W, visibleDomOptions: Q, updateVisibleDomOptions: ae, toggleCategoryVisibility: ke, focusItem: ie, moveToNextElement: oe, moveToPreviousElement: ce, moveToFirstElement: re, moveToLastElement: ue, preventDefault: ee, focusedIndex: De, setListboxFocusedIndex: de, listboxListeners: Re, chipsSectionListeners: Be, computedItemsIndex: $e, DecorativeCheckbox: ne, BentoTypography: j, BentoChip: We, BentoListboxOption: J, ListboxMultiSelectOptions: Yt, vBentoKeyboardNavigationDirective: se, BentoListboxEvent: c };
|
|
1006
|
+
}
|
|
1007
|
+
});
|
|
1008
|
+
var Kt = function() {
|
|
1009
|
+
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
1010
|
+
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(n) {
|
|
1011
|
+
return l("li", { key: n.value }, [l(t.BentoChip, { ref: "selectedListboxItemsRef", refInFor: !0, attrs: { disabled: e.isOptionDisabled(n), label: n.label, condensed: "" }, on: { click: function(a) {
|
|
1012
|
+
n.items ? t.unselectAllCategory(n) : t.toggleCheckboxSelection("select", n);
|
|
1013
|
+
} } })], 1);
|
|
1014
|
+
}), 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(n) {
|
|
1015
|
+
return n.preventDefault(), t.handleSelectAll.apply(null, arguments);
|
|
1016
|
+
} } }, [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(n) {
|
|
1017
|
+
return t.toggleCheckboxSelection("select", n);
|
|
1018
|
+
}, "select-category": t.selectAllCategory, "unselect-category": t.unselectAllCategory, "toggle-category-visibility": t.toggleCategoryVisibility, "space-pressed": function(n) {
|
|
1019
|
+
return t.toggleCheckboxSelection(t.BentoListboxEvent.SPACE, n);
|
|
1020
|
+
}, "tab-pressed": function(n) {
|
|
1021
|
+
return t.toggleCheckboxSelection(t.BentoListboxEvent.TAB, n);
|
|
1022
|
+
}, "enter-pressed": function(n) {
|
|
1023
|
+
return t.toggleCheckboxSelection(t.BentoListboxEvent.ENTER, n);
|
|
1024
|
+
} }, scopedSlots: e._u([e._l(t.slots, function(n, a) {
|
|
1025
|
+
return { key: a, fn: function(r) {
|
|
1026
|
+
return [e._t(a, null, null, r)];
|
|
1027
|
+
} };
|
|
1028
|
+
})], null, !0) })], 1)]);
|
|
1029
|
+
}, jt = [], qt = /* @__PURE__ */ M(
|
|
1030
|
+
Wt,
|
|
1031
|
+
Kt,
|
|
1032
|
+
jt,
|
|
1033
|
+
!1,
|
|
1034
|
+
null,
|
|
1035
|
+
"efcc8ad5"
|
|
1036
|
+
);
|
|
1037
|
+
const _e = qt.exports, Ht = {
|
|
1038
|
+
"en-US": {
|
|
1039
|
+
loading: "Loading",
|
|
1040
|
+
showMore: "Show more"
|
|
1041
|
+
},
|
|
1042
|
+
"ja-JP": {
|
|
1043
|
+
loading: "読み込み中",
|
|
1044
|
+
showMore: "表示内容を増やす"
|
|
1045
|
+
},
|
|
1046
|
+
"pt-BR": {
|
|
1047
|
+
loading: "Carregando",
|
|
1048
|
+
showMore: "Mostrar mais"
|
|
1049
|
+
}
|
|
1050
|
+
}, Xt = 36, Zt = G({
|
|
1051
|
+
name: "bento-listbox",
|
|
1052
|
+
components: {
|
|
1053
|
+
BentoEmptyState: Ye,
|
|
1054
|
+
BentoListboxSingleSelect: ht,
|
|
1055
|
+
BentoListboxMultiSelect: _e,
|
|
1056
|
+
BentoTypography: j,
|
|
1057
|
+
BentoLoadingIndicator: Fe,
|
|
1058
|
+
BentoLoadingButton: qe
|
|
1059
|
+
},
|
|
1060
|
+
directives: { BentoKeyboardNavigationDirective: se },
|
|
1061
|
+
i18n: { messages: Ht },
|
|
1062
|
+
props: {
|
|
1063
|
+
/**
|
|
1064
|
+
* Defines a string value that labels an interactive element.
|
|
1065
|
+
*/
|
|
1066
|
+
ariaLabel: { type: String, default: null },
|
|
1067
|
+
/**
|
|
1068
|
+
* Empty state props that will be used with the inner empty state component to be displayed when no search results are found.
|
|
1069
|
+
*/
|
|
1070
|
+
emptyState: {
|
|
1071
|
+
type: Object,
|
|
1072
|
+
default: void 0
|
|
1073
|
+
},
|
|
1074
|
+
/**
|
|
1075
|
+
* Indicates whether there are more items to load
|
|
1076
|
+
*/
|
|
1077
|
+
hasMoreItems: { type: Boolean, default: !1 },
|
|
1078
|
+
/**
|
|
1079
|
+
* Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.
|
|
1080
|
+
*/
|
|
1081
|
+
id: { type: String, required: !0 },
|
|
1082
|
+
/**
|
|
1083
|
+
* Function that allows the options to be disabled
|
|
1084
|
+
*
|
|
1085
|
+
* @type {BentoListboxIsOptionDisabled}
|
|
1086
|
+
* @param {BentoListboxOptionItem} option - Listbox option object
|
|
1087
|
+
* @param {string} option.label - Option's label text
|
|
1088
|
+
* @param {string|number} option.value - Option's value
|
|
1089
|
+
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
1090
|
+
*/
|
|
1091
|
+
isOptionDisabled: {
|
|
1092
|
+
type: Function,
|
|
1093
|
+
default: () => {
|
|
1094
|
+
}
|
|
1095
|
+
},
|
|
1096
|
+
/**
|
|
1097
|
+
* The option elements to populate the listbox with.
|
|
1098
|
+
* It must be an array of {@see BentoListboxOptionItem }
|
|
1099
|
+
* * @property {string} value.label - Text to be displayed in the option
|
|
1100
|
+
* * @property {string,number} value.value - Value of the option
|
|
1101
|
+
*/
|
|
1102
|
+
items: {
|
|
1103
|
+
type: Array,
|
|
1104
|
+
required: !0
|
|
1105
|
+
},
|
|
1106
|
+
/**
|
|
1107
|
+
* Indicates if new options are lazy loading.
|
|
1108
|
+
*/
|
|
1109
|
+
loading: { type: Boolean, default: !1 },
|
|
1110
|
+
/**
|
|
1111
|
+
* The type of `Lazy Load`.
|
|
1112
|
+
* Type "automatic" will enable infinite scrolling
|
|
1113
|
+
* Type "button" will enable lazy loading with "Show more" button
|
|
1114
|
+
*/
|
|
1115
|
+
lazyLoadType: {
|
|
1116
|
+
type: String,
|
|
1117
|
+
default: K.NONE,
|
|
1118
|
+
validator: (s) => Object.values(K).includes(s)
|
|
1119
|
+
},
|
|
1120
|
+
/**
|
|
1121
|
+
* Indicates the listbox is loading filtered items.
|
|
1122
|
+
*/
|
|
1123
|
+
componentLoading: { type: Boolean, default: !1 },
|
|
1124
|
+
/**
|
|
1125
|
+
* If enabled, the user will be able to select multiple items.
|
|
1126
|
+
*/
|
|
1127
|
+
multiple: { type: Boolean, default: !1 },
|
|
1128
|
+
/**
|
|
1129
|
+
* If enabled, dropdown will display non-selectable, static categories
|
|
1130
|
+
*/
|
|
1131
|
+
staticCategories: { type: Boolean, default: !1 },
|
|
1132
|
+
/**
|
|
1133
|
+
* Messaged displayed when no items are listed in the listbox
|
|
1134
|
+
*/
|
|
1135
|
+
noResultsMessage: { type: String, required: !0 },
|
|
1136
|
+
/**
|
|
1137
|
+
* Flag that indicates that an external search it's being made
|
|
1138
|
+
* to filter out the items inside the the multi-select listbox
|
|
1139
|
+
*
|
|
1140
|
+
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1141
|
+
*/
|
|
1142
|
+
searching: _e.props.searching,
|
|
1143
|
+
/**
|
|
1144
|
+
* The `input` value.
|
|
1145
|
+
* Providing an empty string or empty array will select no options.
|
|
1146
|
+
* Set to an empty string `''` if you don't want any of the available options to be selected for single select
|
|
1147
|
+
*/
|
|
1148
|
+
selectedValue: {
|
|
1149
|
+
type: Array,
|
|
1150
|
+
default: () => []
|
|
1151
|
+
},
|
|
1152
|
+
/**
|
|
1153
|
+
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
1154
|
+
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
1155
|
+
*/
|
|
1156
|
+
virtualScroll: {
|
|
1157
|
+
type: [Boolean, Object],
|
|
1158
|
+
default: !1
|
|
1159
|
+
}
|
|
1160
|
+
},
|
|
1161
|
+
emits: [
|
|
1162
|
+
c.SELECT,
|
|
1163
|
+
c.SPACE,
|
|
1164
|
+
c.SHOW_MORE,
|
|
1165
|
+
c.ENTER,
|
|
1166
|
+
c.ESCAPE,
|
|
1167
|
+
c.TAB
|
|
1168
|
+
],
|
|
1169
|
+
setup(s, { emit: e, slots: l }) {
|
|
1170
|
+
const t = S([]), n = H(s, "items"), { t: a } = le(), r = i(() => s.lazyLoadType !== K.AUTOMATIC), f = i(() => s.lazyLoadType === K.AUTOMATIC), L = () => {
|
|
1171
|
+
var k;
|
|
1172
|
+
return typeof (s == null ? void 0 : s.virtualScroll) == "object" && ((k = s == null ? void 0 : s.virtualScroll) != null && k.itemHeight) ? s.virtualScroll.itemHeight : Xt;
|
|
1173
|
+
}, {
|
|
1174
|
+
containerRef: d,
|
|
1175
|
+
containerProps: b,
|
|
1176
|
+
onScroll: T,
|
|
1177
|
+
list: g,
|
|
1178
|
+
wrapperProps: p
|
|
1179
|
+
} = Xe(n, {
|
|
1180
|
+
itemHeight: L(),
|
|
1181
|
+
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1182
|
+
disabled: (s == null ? void 0 : s.multiple) || (s == null ? void 0 : s.virtualScroll) === !1 || (s == null ? void 0 : s.lazyLoadType) !== "none"
|
|
1183
|
+
}), x = i(
|
|
1184
|
+
() => s.componentLoading !== void 0 || r.value ? "true" : void 0
|
|
1185
|
+
), D = i(
|
|
1186
|
+
() => r.value && s.loading || s.componentLoading ? "true" : "false"
|
|
1187
|
+
), B = i(
|
|
1188
|
+
() => r.value || s.componentLoading !== void 0 ? "polite" : void 0
|
|
1189
|
+
), I = i(
|
|
1190
|
+
() => ({
|
|
1191
|
+
"aria-label": s.ariaLabel,
|
|
1192
|
+
"aria-busy": D.value,
|
|
1193
|
+
"aria-atomic": x.value,
|
|
1194
|
+
"aria-live": B.value
|
|
1195
|
+
})
|
|
1196
|
+
), O = i(
|
|
1197
|
+
() => s.componentLoading ? {
|
|
1198
|
+
...I.value,
|
|
1199
|
+
role: "alert"
|
|
1200
|
+
} : {}
|
|
1201
|
+
), C = (k) => (V) => {
|
|
1202
|
+
e(k, V);
|
|
1203
|
+
}, m = () => {
|
|
1204
|
+
e(c.SHOW_MORE);
|
|
1205
|
+
}, y = Ue(() => {
|
|
1206
|
+
const k = d.value;
|
|
1207
|
+
if (!k)
|
|
1208
|
+
return;
|
|
1209
|
+
const V = Math.round(k.scrollTop) + k.clientHeight >= k.scrollHeight;
|
|
1210
|
+
s.hasMoreItems && V && !s.loading && m();
|
|
1211
|
+
}), R = () => {
|
|
1212
|
+
f.value ? y() : T();
|
|
1213
|
+
}, P = i(() => {
|
|
1214
|
+
var k;
|
|
1215
|
+
return ((k = s.items) == null ? void 0 : k.length) === 0;
|
|
1216
|
+
}), E = i(
|
|
1217
|
+
() => s.lazyLoadType === K.BUTTON && s.hasMoreItems
|
|
1218
|
+
), A = i(
|
|
1219
|
+
() => s.loading ? fe.LOADING : fe.START
|
|
1220
|
+
), N = i(() => s.loading ? a("loading") : a("showMore")), Y = i(() => ({
|
|
1221
|
+
...s.emptyState,
|
|
1222
|
+
variant: "condensed"
|
|
1223
|
+
})), U = {
|
|
1224
|
+
[c.SELECT]: C(c.SELECT),
|
|
1225
|
+
[c.SPACE]: C(c.SPACE),
|
|
1226
|
+
[c.TAB]: C(c.TAB),
|
|
1227
|
+
[c.ENTER]: C(c.ENTER)
|
|
1228
|
+
};
|
|
1229
|
+
return {
|
|
1230
|
+
// Refs
|
|
1231
|
+
listboxRef: d,
|
|
1232
|
+
listboxItemRef: t,
|
|
1233
|
+
// a11y
|
|
1234
|
+
ariaAttributes: I,
|
|
1235
|
+
listboxContainerAttributes: O,
|
|
1236
|
+
// Values
|
|
1237
|
+
containerProps: b,
|
|
1238
|
+
isSearchResultEmpty: P,
|
|
1239
|
+
limitedEmptyStateProps: Y,
|
|
1240
|
+
loadingButtonState: A,
|
|
1241
|
+
slots: l,
|
|
1242
|
+
shouldDisplayShowMoreButton: E,
|
|
1243
|
+
showMoreButtonText: N,
|
|
1244
|
+
virtualisedItems: g,
|
|
1245
|
+
wrapperProps: p,
|
|
1246
|
+
// Enums
|
|
1247
|
+
BentoKeyboardNavigationKeyDownEvent: $,
|
|
1248
|
+
BentoListboxEvent: c,
|
|
1249
|
+
// Methods
|
|
1250
|
+
onListboxContainerScroll: R,
|
|
1251
|
+
onOptionSelected: C,
|
|
1252
|
+
emitShowMore: m,
|
|
1253
|
+
listboxListeners: U
|
|
1254
|
+
};
|
|
1255
|
+
}
|
|
1256
|
+
});
|
|
1257
|
+
var Jt = function() {
|
|
1258
|
+
var t;
|
|
1259
|
+
var e = this, l = e._self._c;
|
|
1260
|
+
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(n, a) {
|
|
1261
|
+
return { key: a, fn: function(r) {
|
|
1262
|
+
return [e._t(a, null, null, r)];
|
|
1263
|
+
} };
|
|
1264
|
+
})], 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(n, a) {
|
|
1265
|
+
return { key: a, fn: function(r) {
|
|
1266
|
+
return [e._t(a, null, null, r)];
|
|
1267
|
+
} };
|
|
1268
|
+
})], 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(n) {
|
|
1269
|
+
return e.emitShowMore.apply(null, arguments);
|
|
1270
|
+
} } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-indicator")], 1) : e._e()]], 2)]);
|
|
1271
|
+
}, Qt = [], es = /* @__PURE__ */ M(
|
|
1272
|
+
Zt,
|
|
1273
|
+
Jt,
|
|
1274
|
+
Qt,
|
|
1275
|
+
!1,
|
|
1276
|
+
null,
|
|
1277
|
+
"35cb3605"
|
|
1278
|
+
);
|
|
1279
|
+
const hs = es.exports, te = (s, e) => {
|
|
1280
|
+
for (const l of s) {
|
|
1281
|
+
if (l.value === e)
|
|
1282
|
+
return l;
|
|
1283
|
+
if (l.items) {
|
|
1284
|
+
const t = te(l.items, e);
|
|
1285
|
+
if (t)
|
|
1286
|
+
return t;
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
return null;
|
|
1290
|
+
}, ts = (s) => typeof s == "object" && s !== null && "value" in s && "label" in s, Cs = (s, e, l, t) => {
|
|
1291
|
+
const n = S([]), a = S(), r = (b) => {
|
|
1292
|
+
l.value ? a.value = b.map(({ value: T }) => T) : a.value = b.length > 0 ? b[0].value : null;
|
|
1293
|
+
}, f = (b) => {
|
|
1294
|
+
l.value ? a.value = b.map(({ value: T, label: g }) => ({ value: T, label: g })) : a.value = b.length > 0 ? { value: b[0].value, label: b[0].label } : null;
|
|
1295
|
+
}, L = (b) => {
|
|
1296
|
+
n.value = b, t != null && t.value ? f(b) : r(b);
|
|
1297
|
+
}, d = () => {
|
|
1298
|
+
n.value = [], a.value = null;
|
|
1299
|
+
};
|
|
1300
|
+
return X(
|
|
1301
|
+
() => e.value,
|
|
1302
|
+
() => {
|
|
1303
|
+
if (!e.value && e.value !== 0) {
|
|
1304
|
+
d();
|
|
1305
|
+
return;
|
|
1306
|
+
}
|
|
1307
|
+
const b = !Array.isArray(e.value), T = [...n.value];
|
|
1308
|
+
d();
|
|
1309
|
+
const g = (p) => {
|
|
1310
|
+
if (ts(p))
|
|
1311
|
+
n.value.push(p);
|
|
1312
|
+
else {
|
|
1313
|
+
let x = te(s.value, p);
|
|
1314
|
+
x || (x = te(T, p)), x || (x = { value: p, label: p.toString() }), n.value.push(x);
|
|
1315
|
+
}
|
|
1316
|
+
};
|
|
1317
|
+
if (b) {
|
|
1318
|
+
const p = e.value;
|
|
1319
|
+
g(p), t != null && t.value ? f(n.value) : r(n.value);
|
|
1320
|
+
return;
|
|
1321
|
+
}
|
|
1322
|
+
e.value.forEach(g), t != null && t.value ? f(n.value) : r(n.value);
|
|
1323
|
+
},
|
|
1324
|
+
{ immediate: !0 }
|
|
1325
|
+
), {
|
|
1326
|
+
// Values
|
|
1327
|
+
cachedSelectedListboxOptions: n,
|
|
1328
|
+
cachedListboxSelectedValues: a,
|
|
1329
|
+
// Methods
|
|
1330
|
+
resetCache: d,
|
|
1331
|
+
setCachedValues: L
|
|
1332
|
+
};
|
|
1333
|
+
};
|
|
1334
|
+
export {
|
|
1335
|
+
K as B,
|
|
1336
|
+
ne as D,
|
|
1337
|
+
c as a,
|
|
1338
|
+
hs as b,
|
|
1339
|
+
Cs as c,
|
|
1340
|
+
he as d,
|
|
1341
|
+
Ut as u
|
|
1342
|
+
};
|
|
1343
|
+
//# sourceMappingURL=use-cached-selected-values.BYiLNRRi.js.map
|