@adyen/bento-vue3 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/dist/@types/components.d.ts +196 -0
- package/dist/@types/index.d.ts +17825 -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-vue_export-helper.CHgC5LLL.js +10 -0
- package/dist/chunks/_plugin-vue_export-helper.CHgC5LLL.js.map +1 -0
- package/dist/chunks/accordion-item.DHyAfeAu.js +143 -0
- package/dist/chunks/accordion-item.DHyAfeAu.js.map +1 -0
- package/dist/chunks/action-bar.BsLU4Bp3.js +202 -0
- package/dist/chunks/action-bar.BsLU4Bp3.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.DaRuea3x.js +93 -0
- package/dist/chunks/ai-button.DaRuea3x.js.map +1 -0
- package/dist/chunks/alert.C2pusd-_.js +171 -0
- package/dist/chunks/alert.C2pusd-_.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.P2Fkz2I6.js +95 -0
- package/dist/chunks/avatar.P2Fkz2I6.js.map +1 -0
- package/dist/chunks/base-button.BSLpAs8A.js +114 -0
- package/dist/chunks/base-button.BSLpAs8A.js.map +1 -0
- package/dist/chunks/base-modal.Bt3mQ_5Y.js +441 -0
- package/dist/chunks/base-modal.Bt3mQ_5Y.js.map +1 -0
- package/dist/chunks/bin.DuHlEQBO.js +37 -0
- package/dist/chunks/bin.DuHlEQBO.js.map +1 -0
- package/dist/chunks/button-actions-with-menu.D2GU8abn.js +93 -0
- package/dist/chunks/button-actions-with-menu.D2GU8abn.js.map +1 -0
- package/dist/chunks/button-actions.CbEoQYUV.js +1367 -0
- package/dist/chunks/button-actions.CbEoQYUV.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.DhcxX2GJ.js +131 -0
- package/dist/chunks/button.DhcxX2GJ.js.map +1 -0
- package/dist/chunks/calendar.CyJXcMz2.js +1962 -0
- package/dist/chunks/calendar.CyJXcMz2.js.map +1 -0
- package/dist/chunks/card.s3fBTh55.js +228 -0
- package/dist/chunks/card.s3fBTh55.js.map +1 -0
- package/dist/chunks/checkbox-group.tnj89uhH.js +177 -0
- package/dist/chunks/checkbox-group.tnj89uhH.js.map +1 -0
- package/dist/chunks/checkbox-input.BXNGT9U0.js +144 -0
- package/dist/chunks/checkbox-input.BXNGT9U0.js.map +1 -0
- package/dist/chunks/checkbox.Wqhh2aRA.js +257 -0
- package/dist/chunks/checkbox.Wqhh2aRA.js.map +1 -0
- package/dist/chunks/checkmark-circle-fill._6-d40ru.js +44 -0
- package/dist/chunks/checkmark-circle-fill._6-d40ru.js.map +1 -0
- package/dist/chunks/checkmark-small.x-gmK2Dt.js +29 -0
- package/dist/chunks/checkmark-small.x-gmK2Dt.js.map +1 -0
- package/dist/chunks/chevron-down.DCQ6ZLaq.js +29 -0
- package/dist/chunks/chevron-down.DCQ6ZLaq.js.map +1 -0
- package/dist/chunks/chevron-left.Cfn1uGLH.js +52 -0
- package/dist/chunks/chevron-left.Cfn1uGLH.js.map +1 -0
- package/dist/chunks/chevron-up.kfuLRpZb.js +29 -0
- package/dist/chunks/chevron-up.kfuLRpZb.js.map +1 -0
- package/dist/chunks/chip.CoV28mKv.js +71 -0
- package/dist/chunks/chip.CoV28mKv.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.LRw3jGjV.js +343 -0
- package/dist/chunks/code-snippet.LRw3jGjV.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.B2Qci77U.js +101 -0
- package/dist/chunks/controls-group.B2Qci77U.js.map +1 -0
- package/dist/chunks/copy.D5CBHqUB.js +117 -0
- package/dist/chunks/copy.D5CBHqUB.js.map +1 -0
- package/dist/chunks/country.D484ezGU.js +69 -0
- package/dist/chunks/country.D484ezGU.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.Dv5-PxwF.js +29 -0
- package/dist/chunks/cross-circle-fill-small.Dv5-PxwF.js.map +1 -0
- package/dist/chunks/cross-circle-fill.CYLL7jfC.js +44 -0
- package/dist/chunks/cross-circle-fill.CYLL7jfC.js.map +1 -0
- package/dist/chunks/cross-small.n1UO5wNB.js +29 -0
- package/dist/chunks/cross-small.n1UO5wNB.js.map +1 -0
- package/dist/chunks/cross.B92GxFTY.js +29 -0
- package/dist/chunks/cross.B92GxFTY.js.map +1 -0
- package/dist/chunks/currency.WmvQjX7l.js +116 -0
- package/dist/chunks/currency.WmvQjX7l.js.map +1 -0
- package/dist/chunks/dashboard-section.DlokD9Rf.js +165 -0
- package/dist/chunks/dashboard-section.DlokD9Rf.js.map +1 -0
- package/dist/chunks/dashed-underline.Dw1Iqk0l.js +114 -0
- package/dist/chunks/dashed-underline.Dw1Iqk0l.js.map +1 -0
- package/dist/chunks/data-grid-template.BwTVHbpB.js +144 -0
- package/dist/chunks/data-grid-template.BwTVHbpB.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.Be6Ao4He.js +4271 -0
- package/dist/chunks/data-grid.Be6Ao4He.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.CYBx1TS_.js +245 -0
- package/dist/chunks/date-picker.CYBx1TS_.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.BgEM0fyZ.js +1109 -0
- package/dist/chunks/date-range-picker.BgEM0fyZ.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.DZvVL-uz.js +163 -0
- package/dist/chunks/date.DZvVL-uz.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.BY6T1jYZ.js +175 -0
- package/dist/chunks/dialog-page.BY6T1jYZ.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.Dho4_hQ7.js +33 -0
- package/dist/chunks/divider.Dho4_hQ7.js.map +1 -0
- package/dist/chunks/dot.ob6N-5Um.js +29 -0
- package/dist/chunks/dot.ob6N-5Um.js.map +1 -0
- package/dist/chunks/dropdown-default-textbox.CNrsjXUU.js +425 -0
- package/dist/chunks/dropdown-default-textbox.CNrsjXUU.js.map +1 -0
- package/dist/chunks/dropdown-tag.DmIHi3i-.js +301 -0
- package/dist/chunks/dropdown-tag.DmIHi3i-.js.map +1 -0
- package/dist/chunks/dropdown.Be6ses6k.js +833 -0
- package/dist/chunks/dropdown.Be6ses6k.js.map +1 -0
- package/dist/chunks/empty-state.Be6M8ivH.js +140 -0
- package/dist/chunks/empty-state.Be6M8ivH.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.C9IAqYYL.js +33 -0
- package/dist/chunks/expand.C9IAqYYL.js.map +1 -0
- package/dist/chunks/field-label.Cu6X9V0_.js +158 -0
- package/dist/chunks/field-label.Cu6X9V0_.js.map +1 -0
- package/dist/chunks/file-uploader.Bdhm4TVh.js +2299 -0
- package/dist/chunks/file-uploader.Bdhm4TVh.js.map +1 -0
- package/dist/chunks/filter-bar.CLNU1Ixm.js +3211 -0
- package/dist/chunks/filter-bar.CLNU1Ixm.js.map +1 -0
- package/dist/chunks/fixed-scroller.Dmg8r9QP.js +147 -0
- package/dist/chunks/fixed-scroller.Dmg8r9QP.js.map +1 -0
- package/dist/chunks/focus-trap.BaHvK7aT.js +1171 -0
- package/dist/chunks/focus-trap.BaHvK7aT.js.map +1 -0
- package/dist/chunks/footer-actions.C_EniPHo.js +110 -0
- package/dist/chunks/footer-actions.C_EniPHo.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.sxPU_lB_.js +214 -0
- package/dist/chunks/form-layout-title.sxPU_lB_.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.CQRAP2_q.js +12 -0
- package/dist/chunks/get-slot-text.CQRAP2_q.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.DDaRNz4-.js +114 -0
- package/dist/chunks/grid-layout.DDaRNz4-.js.map +1 -0
- package/dist/chunks/header-meta.DMjERxW-.js +221 -0
- package/dist/chunks/header-meta.DMjERxW-.js.map +1 -0
- package/dist/chunks/header-with-views.CVgISUVn.js +2426 -0
- package/dist/chunks/header-with-views.CVgISUVn.js.map +1 -0
- package/dist/chunks/header.Dq5aBp9l.js +141 -0
- package/dist/chunks/header.Dq5aBp9l.js.map +1 -0
- package/dist/chunks/image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js +47 -0
- package/dist/chunks/image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js.map +1 -0
- package/dist/chunks/index.CWuzEfiV.js +6 -0
- package/dist/chunks/index.CWuzEfiV.js.map +1 -0
- package/dist/chunks/index.E60QniEu.js +592 -0
- package/dist/chunks/index.E60QniEu.js.map +1 -0
- package/dist/chunks/index.pdBj0KQU.js +15 -0
- package/dist/chunks/index.pdBj0KQU.js.map +1 -0
- package/dist/chunks/info-icon.C7RAAeQQ.js +35 -0
- package/dist/chunks/info-icon.C7RAAeQQ.js.map +1 -0
- package/dist/chunks/info.BKwey1HA.js +44 -0
- package/dist/chunks/info.BKwey1HA.js.map +1 -0
- package/dist/chunks/input-field-password.BhksIaXB.js +396 -0
- package/dist/chunks/input-field-password.BhksIaXB.js.map +1 -0
- package/dist/chunks/input-field-phone-number.jW5pH96y.js +3333 -0
- package/dist/chunks/input-field-phone-number.jW5pH96y.js.map +1 -0
- package/dist/chunks/input-field.CYBjHzVA.js +318 -0
- package/dist/chunks/input-field.CYBjHzVA.js.map +1 -0
- package/dist/chunks/inspector.BBhrSgO6.js +200 -0
- package/dist/chunks/inspector.BBhrSgO6.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.BxP9SxrL.js +100 -0
- package/dist/chunks/layout-row.BxP9SxrL.js.map +1 -0
- package/dist/chunks/link.cwPmWlsk.js +116 -0
- package/dist/chunks/link.cwPmWlsk.js.map +1 -0
- package/dist/chunks/listbox-option-tag.VRGb_04i.js +57 -0
- package/dist/chunks/listbox-option-tag.VRGb_04i.js.map +1 -0
- package/dist/chunks/loading-indicator.Db794TT5.js +33 -0
- package/dist/chunks/loading-indicator.Db794TT5.js.map +1 -0
- package/dist/chunks/minus-small.DYIyF5XW.js +32 -0
- package/dist/chunks/minus-small.DYIyF5XW.js.map +1 -0
- package/dist/chunks/modal-fullscreen.hOTnlB9T.js +285 -0
- package/dist/chunks/modal-fullscreen.hOTnlB9T.js.map +1 -0
- package/dist/chunks/modal.vue_vue_type_script_setup_true_lang.DFCZG9Zc.js +501 -0
- package/dist/chunks/modal.vue_vue_type_script_setup_true_lang.DFCZG9Zc.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.Cj_FYHm-.js +461 -0
- package/dist/chunks/pagination.Cj_FYHm-.js.map +1 -0
- package/dist/chunks/payment-method.CExDsirg.js +128 -0
- package/dist/chunks/payment-method.CExDsirg.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.DgfeurkF.js +6 -0
- package/dist/chunks/popover.types.DgfeurkF.js.map +1 -0
- package/dist/chunks/popper-container.I9gzp1NR.js +1413 -0
- package/dist/chunks/popper-container.I9gzp1NR.js.map +1 -0
- package/dist/chunks/promo-banner.B-TLTLEd.js +126 -0
- package/dist/chunks/promo-banner.B-TLTLEd.js.map +1 -0
- package/dist/chunks/radio-group.C0qJThJ2.js +278 -0
- package/dist/chunks/radio-group.C0qJThJ2.js.map +1 -0
- package/dist/chunks/radio-input.CBNE-AkM.js +95 -0
- package/dist/chunks/radio-input.CBNE-AkM.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.BB4ouvz_.js +29 -0
- package/dist/chunks/refresh.BB4ouvz_.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.CDcfVhGv.js +6224 -0
- package/dist/chunks/rich-text-editor.CDcfVhGv.js.map +1 -0
- package/dist/chunks/search-bar.CIi1zffn.js +116 -0
- package/dist/chunks/search-bar.CIi1zffn.js.map +1 -0
- package/dist/chunks/search.PczW-onY.js +44 -0
- package/dist/chunks/search.PczW-onY.js.map +1 -0
- package/dist/chunks/secondary-nav.C9ApoJ-J.js +138 -0
- package/dist/chunks/secondary-nav.C9ApoJ-J.js.map +1 -0
- package/dist/chunks/segmented-control.PlGfqyxH.js +145 -0
- package/dist/chunks/segmented-control.PlGfqyxH.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.DjlLf4oi.js +415 -0
- package/dist/chunks/selection-card-group.DjlLf4oi.js.map +1 -0
- package/dist/chunks/show.CT4Augxb.js +64 -0
- package/dist/chunks/show.CT4Augxb.js.map +1 -0
- package/dist/chunks/sidepanel.CiyGOtAx.js +254 -0
- package/dist/chunks/sidepanel.CiyGOtAx.js.map +1 -0
- package/dist/chunks/status.types.-l2qJxLn.js +44 -0
- package/dist/chunks/status.types.-l2qJxLn.js.map +1 -0
- package/dist/chunks/step.rYLkDMZ0.js +267 -0
- package/dist/chunks/step.rYLkDMZ0.js.map +1 -0
- package/dist/chunks/structured-list-item.CsUD3M_V.js +111 -0
- package/dist/chunks/structured-list-item.CsUD3M_V.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.BzPSYDUX.js +496 -0
- package/dist/chunks/summary-grid.types.BzPSYDUX.js.map +1 -0
- package/dist/chunks/tab.BAwuVDsV.js +252 -0
- package/dist/chunks/tab.BAwuVDsV.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.EDED27n5.js +57 -0
- package/dist/chunks/tag.EDED27n5.js.map +1 -0
- package/dist/chunks/textarea.7MePsezm.js +254 -0
- package/dist/chunks/textarea.7MePsezm.js.map +1 -0
- package/dist/chunks/timeline-item.D6SeOiVe.js +428 -0
- package/dist/chunks/timeline-item.D6SeOiVe.js.map +1 -0
- package/dist/chunks/toast.BFw86uEp.js +221 -0
- package/dist/chunks/toast.BFw86uEp.js.map +1 -0
- package/dist/chunks/toggle.BHCUjMpp.js +143 -0
- package/dist/chunks/toggle.BHCUjMpp.js.map +1 -0
- package/dist/chunks/tooltip.B76ucISL.js +202 -0
- package/dist/chunks/tooltip.B76ucISL.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.vue_vue_type_script_setup_true_lang.CyO3qbAU.js +421 -0
- package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.CyO3qbAU.js.map +1 -0
- package/dist/chunks/typography.yBEME_Gu.js +83 -0
- package/dist/chunks/typography.yBEME_Gu.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.DK1PV3YW.js +50 -0
- package/dist/chunks/use-bento-toast-controller.DK1PV3YW.js.map +1 -0
- package/dist/chunks/use-cached-selected-values.DimYI3lv.js +1702 -0
- package/dist/chunks/use-cached-selected-values.DimYI3lv.js.map +1 -0
- package/dist/chunks/use-country-items.Dzbl2UsO.js +30 -0
- package/dist/chunks/use-country-items.Dzbl2UsO.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.O02rzsob.js +16 -0
- package/dist/chunks/use-default-slot-validator.O02rzsob.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.B7eQSabc.js +15 -0
- package/dist/chunks/use-has-slot.B7eQSabc.js.map +1 -0
- package/dist/chunks/warning-filled.BMGD0G-_.js +29 -0
- package/dist/chunks/warning-filled.BMGD0G-_.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 +439 -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 +49 -0
- package/package.json +13 -12
|
@@ -0,0 +1,1702 @@
|
|
|
1
|
+
import { computed as v, ref as L, onMounted as ut, onUnmounted as bt, watch as ye, defineComponent as J, resolveComponent as A, createElementBlock as E, openBlock as m, createVNode as G, createElementVNode as U, withCtx as k, createTextVNode as K, toDisplayString as V, renderSlot as j, mergeProps as x, withKeys as me, createCommentVNode as X, createBlock as $, withModifiers as re, normalizeProps as ae, guardReactiveProps as ve, withDirectives as ce, vShow as Ue, nextTick as ze, toRef as fe, resolveDirective as Ve, toHandlers as se, Fragment as le, renderList as H, createSlots as pe, normalizeClass as ge, unref as M, useSlots as mt, useAttrs as vt } from "vue";
|
|
2
|
+
import { B as F, a as Ce } from "./keyboard-navigation.DWmhelVv.js";
|
|
3
|
+
import { B as de } from "./typography.yBEME_Gu.js";
|
|
4
|
+
import { B as ft } from "./loading-indicator.Db794TT5.js";
|
|
5
|
+
import { B as pt } from "./empty-state.Be6M8ivH.js";
|
|
6
|
+
import { u as Ie } from "./index.pdBj0KQU.js";
|
|
7
|
+
import { d as gt } from "./debounce.DUTu11PS.js";
|
|
8
|
+
import { C as he, N as yt } from "./minus-small.DYIyF5XW.js";
|
|
9
|
+
import { C as St } from "./checkmark-small.x-gmK2Dt.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
12
|
+
import { B as ht } from "./chip.CoV28mKv.js";
|
|
13
|
+
import { C as Ct } from "./chevron-down.DCQ6ZLaq.js";
|
|
14
|
+
import { C as Et } from "./chevron-up.kfuLRpZb.js";
|
|
15
|
+
import { g as Ne } from "./generate-uid.NJ8tVoha.js";
|
|
16
|
+
import { a as Ot, b as Me } from "./button-actions.CbEoQYUV.js";
|
|
17
|
+
import { o as Tt } from "./resize.Bqks3WUm.js";
|
|
18
|
+
import "../assets/use-cached-selected-values.css";
|
|
19
|
+
const Fe = (e, t, i, s) => {
|
|
20
|
+
const n = v(
|
|
21
|
+
() => {
|
|
22
|
+
var p, y;
|
|
23
|
+
return !!((p = e.value) != null && p.length) && ((y = e.value) == null ? void 0 : y.length) === t.value.length;
|
|
24
|
+
}
|
|
25
|
+
), o = v(() => {
|
|
26
|
+
var p;
|
|
27
|
+
return e.value == null || e.value.length === 0 ? !1 : ((p = e.value) == null ? void 0 : p.length) !== t.value.length;
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
isAllSelected: n,
|
|
31
|
+
isIndeterminate: o,
|
|
32
|
+
toggleSelectAll: (p) => {
|
|
33
|
+
p ? i() : s();
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
function _t(e, { disabled: t, itemHeight: i, overscan: s = 5, prefixHeight: n }) {
|
|
38
|
+
const o = L(null), a = L([]), p = L(0), y = L(0), r = L(0);
|
|
39
|
+
let u;
|
|
40
|
+
const l = v(() => {
|
|
41
|
+
const B = typeof i == "number" ? e.value.length * i : e.value.reduce((I, S, _) => I + i(_), 0), R = typeof i == "number" ? p.value * i : e.value.slice(0, p.value).reduce((I, S, _) => I + i(_), 0);
|
|
42
|
+
return {
|
|
43
|
+
style: {
|
|
44
|
+
marginTop: `${R}px`,
|
|
45
|
+
height: `${B - R}px`
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}), f = () => {
|
|
49
|
+
const B = (n == null ? void 0 : n.value) ?? 0, R = Math.max(o.value.scrollTop - B, 0);
|
|
50
|
+
if (typeof i == "number")
|
|
51
|
+
return Math.floor(R / i);
|
|
52
|
+
let I = 0, S = 0;
|
|
53
|
+
for (let _ = 0; _ < e.value.length; _ += 1) {
|
|
54
|
+
const Y = i(_);
|
|
55
|
+
if (I += Y, I >= R) {
|
|
56
|
+
S = _;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return S;
|
|
61
|
+
}, O = () => {
|
|
62
|
+
if (r.value = o.value.clientHeight, typeof i == "number")
|
|
63
|
+
return Math.ceil(r.value / i);
|
|
64
|
+
const B = p.value ?? 0;
|
|
65
|
+
let R = 0, I = 0;
|
|
66
|
+
for (let S = B; S < e.value.length; S += 1) {
|
|
67
|
+
const _ = i(S);
|
|
68
|
+
if (R += _, I = S, R > r.value)
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
return I - B;
|
|
72
|
+
}, T = () => {
|
|
73
|
+
if (o.value) {
|
|
74
|
+
const B = O();
|
|
75
|
+
p.value = f(), y.value = Math.min(p.value + B + s, e.value.length), a.value = e.value.slice(p.value, y.value);
|
|
76
|
+
}
|
|
77
|
+
}, D = () => {
|
|
78
|
+
T();
|
|
79
|
+
};
|
|
80
|
+
t || (ut(() => {
|
|
81
|
+
o.value && (r.value = o.value.clientHeight, u = Tt(o.value, ({ clientHeight: B }) => {
|
|
82
|
+
r.value = B, T();
|
|
83
|
+
}), T());
|
|
84
|
+
}), bt(() => {
|
|
85
|
+
u == null || u.disconnect();
|
|
86
|
+
}), ye(
|
|
87
|
+
() => e.value,
|
|
88
|
+
() => {
|
|
89
|
+
T();
|
|
90
|
+
}
|
|
91
|
+
));
|
|
92
|
+
const P = {
|
|
93
|
+
ref: o,
|
|
94
|
+
style: { overflowY: "auto" }
|
|
95
|
+
};
|
|
96
|
+
return t ? {
|
|
97
|
+
containerRef: o,
|
|
98
|
+
containerProps: P,
|
|
99
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
100
|
+
onScroll: () => {
|
|
101
|
+
},
|
|
102
|
+
list: e
|
|
103
|
+
} : {
|
|
104
|
+
containerRef: o,
|
|
105
|
+
containerProps: P,
|
|
106
|
+
onScroll: D,
|
|
107
|
+
list: a,
|
|
108
|
+
wrapperProps: l
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
var g = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more", e.ESCAPE = "escape-pressed", e.CLICK = "click", e.ENTER = "enter-pressed", e.SPACE = "space-pressed", e.TAB = "tab-pressed", e.CLOSE_DROPDOWN = "close-dropdown", e))(g || {}), ne = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(ne || {});
|
|
112
|
+
const It = J({
|
|
113
|
+
name: "bento-listbox-static-category",
|
|
114
|
+
components: {
|
|
115
|
+
BentoTypography: de
|
|
116
|
+
},
|
|
117
|
+
props: {
|
|
118
|
+
/**
|
|
119
|
+
* Category label text
|
|
120
|
+
*/
|
|
121
|
+
categoryLabel: {
|
|
122
|
+
type: String,
|
|
123
|
+
required: !0
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}), kt = ["aria-label"];
|
|
127
|
+
function Lt(e, t, i, s, n, o) {
|
|
128
|
+
const a = A("bento-typography");
|
|
129
|
+
return m(), E("div", {
|
|
130
|
+
class: "b-listbox-single-select-category",
|
|
131
|
+
role: "group",
|
|
132
|
+
"aria-label": e.categoryLabel
|
|
133
|
+
}, [
|
|
134
|
+
G(a, {
|
|
135
|
+
variant: "caption",
|
|
136
|
+
el: "span",
|
|
137
|
+
class: "b-listbox-single-select-category__label-text",
|
|
138
|
+
"aria-hidden": "true"
|
|
139
|
+
}, {
|
|
140
|
+
default: k(() => [
|
|
141
|
+
K(V(e.categoryLabel), 1)
|
|
142
|
+
]),
|
|
143
|
+
_: 1
|
|
144
|
+
}),
|
|
145
|
+
U("div", null, [
|
|
146
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
147
|
+
])
|
|
148
|
+
], 8, kt);
|
|
149
|
+
}
|
|
150
|
+
const At = /* @__PURE__ */ q(It, [["render", Lt], ["__scopeId", "data-v-27c4e09a"]]), $t = J({
|
|
151
|
+
name: "bento-listbox-option",
|
|
152
|
+
props: {
|
|
153
|
+
/**
|
|
154
|
+
* Setting this property to true will disable the option.
|
|
155
|
+
*/
|
|
156
|
+
disabled: { type: Boolean, default: !1 },
|
|
157
|
+
/**
|
|
158
|
+
* Indicates if the value is selected. Only one element can be selected at a time.
|
|
159
|
+
*/
|
|
160
|
+
selected: { type: Boolean, default: !1 }
|
|
161
|
+
},
|
|
162
|
+
emits: [g.CLICK, g.ENTER, g.SPACE, g.TAB],
|
|
163
|
+
setup(e, { emit: t }) {
|
|
164
|
+
const i = v(() => ({
|
|
165
|
+
"b-listbox-option--disabled": e.disabled,
|
|
166
|
+
"b-listbox-option--selected": e.selected
|
|
167
|
+
}));
|
|
168
|
+
return {
|
|
169
|
+
// Enums
|
|
170
|
+
BentoKeyboardNavigationKeyDownEvent: F,
|
|
171
|
+
BentoListboxEvent: g,
|
|
172
|
+
// Values
|
|
173
|
+
conditionalClasses: i,
|
|
174
|
+
// Events
|
|
175
|
+
onClick: (o) => {
|
|
176
|
+
t(g.CLICK, o);
|
|
177
|
+
},
|
|
178
|
+
onOptionSelected: (o, a) => {
|
|
179
|
+
t(o, a);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
function Dt(e, t, i, s, n, o) {
|
|
185
|
+
return m(), E("div", x({
|
|
186
|
+
class: ["b-listbox-option", e.conditionalClasses],
|
|
187
|
+
role: "option"
|
|
188
|
+
}, e.$attrs, {
|
|
189
|
+
onClick: t[0] || (t[0] = (...a) => e.onClick && e.onClick(...a)),
|
|
190
|
+
onKeydown: [
|
|
191
|
+
t[1] || (t[1] = me((a) => e.onOptionSelected(e.BentoListboxEvent.ENTER, a), ["enter"])),
|
|
192
|
+
t[2] || (t[2] = me((a) => e.onOptionSelected(e.BentoListboxEvent.SPACE, a), ["space"])),
|
|
193
|
+
t[3] || (t[3] = me((a) => e.onOptionSelected(e.BentoListboxEvent.TAB, a), ["tab"]))
|
|
194
|
+
]
|
|
195
|
+
}), [
|
|
196
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
197
|
+
], 16);
|
|
198
|
+
}
|
|
199
|
+
const Ee = /* @__PURE__ */ q($t, [["render", Dt], ["__scopeId", "data-v-1495b1db"]]);
|
|
200
|
+
let Pe = 0;
|
|
201
|
+
const Bt = {
|
|
202
|
+
beforeCreate() {
|
|
203
|
+
this.uuid = Pe.toString(), Pe += 1;
|
|
204
|
+
}
|
|
205
|
+
}, Rt = { key: 0 };
|
|
206
|
+
function Nt(e, t, i, s, n, o) {
|
|
207
|
+
return m(), E("svg", x({ role: "img" }, e.$attrs, {
|
|
208
|
+
class: "ui-assets-icons-16",
|
|
209
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
210
|
+
width: "16",
|
|
211
|
+
height: "16",
|
|
212
|
+
fill: "none"
|
|
213
|
+
}), [
|
|
214
|
+
e.$attrs["svg-title"] ? (m(), E("title", Rt, V(e.$attrs["svg-title"]), 1)) : X("", !0),
|
|
215
|
+
t[0] || (t[0] = U("path", {
|
|
216
|
+
fill: "#001222",
|
|
217
|
+
d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z"
|
|
218
|
+
}, null, -1))
|
|
219
|
+
], 16);
|
|
220
|
+
}
|
|
221
|
+
const Mt = /* @__PURE__ */ q(Bt, [["render", Nt]]), Pt = J({
|
|
222
|
+
name: "bento-listbox-single-select-option",
|
|
223
|
+
components: {
|
|
224
|
+
BentoListboxOption: Ee,
|
|
225
|
+
BentoTypography: de,
|
|
226
|
+
CheckmarkIcon: Mt
|
|
227
|
+
},
|
|
228
|
+
props: {
|
|
229
|
+
/**
|
|
230
|
+
* Setting this property to true will disable the option.
|
|
231
|
+
*/
|
|
232
|
+
disabled: { type: Boolean, default: !1 },
|
|
233
|
+
/**
|
|
234
|
+
* The option item that contains all the option item's data.
|
|
235
|
+
* @type {BentoListboxOptionItem}
|
|
236
|
+
*/
|
|
237
|
+
option: {
|
|
238
|
+
type: Object,
|
|
239
|
+
required: !0
|
|
240
|
+
},
|
|
241
|
+
/**
|
|
242
|
+
* Indicates if the value is selected. Only one element can be selected at a time.
|
|
243
|
+
*/
|
|
244
|
+
selected: { type: Boolean, default: !1 }
|
|
245
|
+
},
|
|
246
|
+
emits: [g.ENTER, g.SELECT, g.SPACE, g.TAB],
|
|
247
|
+
setup(e, { emit: t }) {
|
|
248
|
+
const i = (a) => {
|
|
249
|
+
e.disabled || t(a, e.option);
|
|
250
|
+
}, s = v(() => e.disabled ? !0 : null), n = v(() => e.selected ? !0 : null), o = v(() => e.disabled ? -1 : 0);
|
|
251
|
+
return {
|
|
252
|
+
// Values
|
|
253
|
+
ariaDisabled: s,
|
|
254
|
+
ariaSelected: n,
|
|
255
|
+
tabIndex: o,
|
|
256
|
+
// Enums
|
|
257
|
+
BentoListboxEvent: g,
|
|
258
|
+
// Events
|
|
259
|
+
onOptionSelected: i
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
}), wt = { class: "b-listbox-single-select-option__text" }, Gt = { class: "b-listbox-single-select-option__check-icon" };
|
|
263
|
+
function xt(e, t, i, s, n, o) {
|
|
264
|
+
const a = A("bento-typography"), p = A("checkmark-icon"), y = A("bento-listbox-option");
|
|
265
|
+
return m(), $(y, {
|
|
266
|
+
class: "b-listbox-single-select-option",
|
|
267
|
+
disabled: e.disabled,
|
|
268
|
+
selected: e.selected,
|
|
269
|
+
"aria-selected": e.ariaSelected,
|
|
270
|
+
"aria-disabled": e.ariaDisabled,
|
|
271
|
+
tabindex: e.tabIndex,
|
|
272
|
+
onClick: t[0] || (t[0] = (r) => e.onOptionSelected(e.BentoListboxEvent.SELECT)),
|
|
273
|
+
onEnterPressed: t[1] || (t[1] = (r) => e.onOptionSelected(e.BentoListboxEvent.ENTER)),
|
|
274
|
+
onSpacePressed: t[2] || (t[2] = re((r) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
|
|
275
|
+
onTabPressed: t[3] || (t[3] = (r) => e.onOptionSelected(e.BentoListboxEvent.TAB))
|
|
276
|
+
}, {
|
|
277
|
+
default: k(() => [
|
|
278
|
+
j(e.$slots, "default", ae(ve(e.option)), () => [
|
|
279
|
+
U("span", wt, [
|
|
280
|
+
G(a, { el: "span" }, {
|
|
281
|
+
default: k(() => [
|
|
282
|
+
K(V(e.option.label), 1)
|
|
283
|
+
]),
|
|
284
|
+
_: 1
|
|
285
|
+
}),
|
|
286
|
+
e.option.description ? (m(), $(a, {
|
|
287
|
+
key: 0,
|
|
288
|
+
class: "b-listbox-single-select-option__description",
|
|
289
|
+
el: "span"
|
|
290
|
+
}, {
|
|
291
|
+
default: k(() => [
|
|
292
|
+
K(V(e.option.description), 1)
|
|
293
|
+
]),
|
|
294
|
+
_: 1
|
|
295
|
+
})) : X("", !0)
|
|
296
|
+
])
|
|
297
|
+
], !0),
|
|
298
|
+
U("span", Gt, [
|
|
299
|
+
ce(G(p, { "svg-title": "selected" }, null, 512), [
|
|
300
|
+
[Ue, e.selected]
|
|
301
|
+
])
|
|
302
|
+
])
|
|
303
|
+
]),
|
|
304
|
+
_: 3
|
|
305
|
+
}, 8, ["disabled", "selected", "aria-selected", "aria-disabled", "tabindex"]);
|
|
306
|
+
}
|
|
307
|
+
const Yt = /* @__PURE__ */ q(Pt, [["render", xt], ["__scopeId", "data-v-4f41af07"]]), Ke = ({ items: e }, t) => {
|
|
308
|
+
const i = v(() => e.value.length - 1), s = L(0), n = (f) => {
|
|
309
|
+
switch (f) {
|
|
310
|
+
case "increase":
|
|
311
|
+
s.value += 1;
|
|
312
|
+
break;
|
|
313
|
+
case "decrease":
|
|
314
|
+
s.value -= 1;
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
}, o = ({ edgeCaseItem: f }, O) => {
|
|
318
|
+
s.value !== f && (n(O), t(s.value));
|
|
319
|
+
}, a = (f) => {
|
|
320
|
+
l(f), o(
|
|
321
|
+
{
|
|
322
|
+
edgeCaseItem: i.value
|
|
323
|
+
},
|
|
324
|
+
"increase"
|
|
325
|
+
/* INCREASE */
|
|
326
|
+
);
|
|
327
|
+
}, p = (f) => {
|
|
328
|
+
l(f), o(
|
|
329
|
+
{
|
|
330
|
+
edgeCaseItem: 0
|
|
331
|
+
},
|
|
332
|
+
"decrease"
|
|
333
|
+
/* DECREASE */
|
|
334
|
+
);
|
|
335
|
+
}, y = () => {
|
|
336
|
+
s.value = 0, t(s.value);
|
|
337
|
+
}, r = () => {
|
|
338
|
+
s.value = i.value, t(s.value);
|
|
339
|
+
}, u = (f) => {
|
|
340
|
+
s.value = f;
|
|
341
|
+
}, l = (f) => {
|
|
342
|
+
var O;
|
|
343
|
+
(O = f == null ? void 0 : f.detail) == null || O.preventDefault();
|
|
344
|
+
};
|
|
345
|
+
return {
|
|
346
|
+
moveToFirstElement: y,
|
|
347
|
+
moveToLastElement: r,
|
|
348
|
+
moveToNextElement: a,
|
|
349
|
+
moveToPreviousElement: p,
|
|
350
|
+
setListboxFocusedIndex: u,
|
|
351
|
+
preventDefault: l,
|
|
352
|
+
focusedIndex: s
|
|
353
|
+
};
|
|
354
|
+
}, We = (e, t, i = L("option"), s = !0) => {
|
|
355
|
+
const n = L([]), o = async () => {
|
|
356
|
+
if (!e.value || e.value.nodeType === Node.COMMENT_NODE)
|
|
357
|
+
return;
|
|
358
|
+
const a = Array.from(e.value.querySelectorAll(`[role="${i.value}"]`));
|
|
359
|
+
n.value = s ? a.filter((p) => p.checkVisibility()) : a;
|
|
360
|
+
};
|
|
361
|
+
return ye(
|
|
362
|
+
t,
|
|
363
|
+
() => {
|
|
364
|
+
ze(() => {
|
|
365
|
+
o();
|
|
366
|
+
});
|
|
367
|
+
},
|
|
368
|
+
{ immediate: !0 }
|
|
369
|
+
), {
|
|
370
|
+
visibleDomOptions: n,
|
|
371
|
+
updateVisibleDomOptions: o
|
|
372
|
+
};
|
|
373
|
+
}, Ut = J({
|
|
374
|
+
name: "bento-listbox-single-select",
|
|
375
|
+
components: {
|
|
376
|
+
BentoListboxSingleSelectCategory: At,
|
|
377
|
+
BentoListboxSingleSelectOption: Yt
|
|
378
|
+
},
|
|
379
|
+
directives: { BentoKeyboardNavigationDirective: Ce },
|
|
380
|
+
inheritAttrs: !1,
|
|
381
|
+
props: {
|
|
382
|
+
/**
|
|
383
|
+
* Function that allows the options to be disabled
|
|
384
|
+
*
|
|
385
|
+
* @type {BentoListboxIsOptionDisabled}
|
|
386
|
+
* @param {BentoListboxOptionItem} option - listbox option object
|
|
387
|
+
* @param {string} option.label - Option's label text
|
|
388
|
+
* @param {string|number} option.value - Option's value
|
|
389
|
+
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
390
|
+
*/
|
|
391
|
+
isOptionDisabled: {
|
|
392
|
+
type: Function,
|
|
393
|
+
default: () => !1
|
|
394
|
+
},
|
|
395
|
+
/**
|
|
396
|
+
* The option elements to populate the listbox with.
|
|
397
|
+
* It must be an array of {@see BentoListboxOptionItem }.
|
|
398
|
+
*
|
|
399
|
+
* @property {string} value.label - Text to be displayed in the option
|
|
400
|
+
* @property {string,number} value.value - Value of the option
|
|
401
|
+
*/
|
|
402
|
+
items: {
|
|
403
|
+
type: Array,
|
|
404
|
+
required: !0
|
|
405
|
+
},
|
|
406
|
+
/**
|
|
407
|
+
* The `input` value.
|
|
408
|
+
* Providing an empty string will select no options.
|
|
409
|
+
* Set to an empty string `''` if you don't want any of the available options to be selected
|
|
410
|
+
*/
|
|
411
|
+
selectedValue: {
|
|
412
|
+
type: Array,
|
|
413
|
+
default: void 0
|
|
414
|
+
},
|
|
415
|
+
/**
|
|
416
|
+
* If enabled, dropdown will display non-selectable, static categories
|
|
417
|
+
*/
|
|
418
|
+
staticCategories: { type: Boolean, default: !1 }
|
|
419
|
+
},
|
|
420
|
+
emits: [g.SELECT, g.ENTER, g.SPACE, g.TAB],
|
|
421
|
+
setup(e, { emit: t, expose: i, slots: s, attrs: n }) {
|
|
422
|
+
const o = L(null), a = L([]), p = v(() => {
|
|
423
|
+
var S;
|
|
424
|
+
return !!((S = e.selectedValue) != null && S.length) && e.selectedValue.at(0);
|
|
425
|
+
}), y = v(
|
|
426
|
+
() => {
|
|
427
|
+
var S, _, Y, Q;
|
|
428
|
+
return {
|
|
429
|
+
"aria-label": (S = n["aria-label"]) == null ? void 0 : S.toString(),
|
|
430
|
+
"aria-busy": (_ = n["aria-busy"]) == null ? void 0 : _.toString(),
|
|
431
|
+
"aria-atomic": (Y = n["aria-atomic"]) == null ? void 0 : Y.toString(),
|
|
432
|
+
"aria-live": (Q = n["aria-live"]) == null ? void 0 : Q.toString()
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
), r = v(() => !!e.items.some(({ items: S }) => !!S)), u = (S) => (_) => {
|
|
436
|
+
t(S, [_]);
|
|
437
|
+
}, { visibleDomOptions: l } = We(o, fe(e, "items"), L("option"), !1), f = (S) => {
|
|
438
|
+
var _;
|
|
439
|
+
(_ = l.value[S]) == null || _.focus();
|
|
440
|
+
}, {
|
|
441
|
+
moveToNextElement: O,
|
|
442
|
+
moveToPreviousElement: T,
|
|
443
|
+
moveToFirstElement: D,
|
|
444
|
+
moveToLastElement: P,
|
|
445
|
+
setListboxFocusedIndex: B
|
|
446
|
+
} = Ke(
|
|
447
|
+
{
|
|
448
|
+
items: l
|
|
449
|
+
},
|
|
450
|
+
f
|
|
451
|
+
), R = {
|
|
452
|
+
[F.ARROW_UP]: T,
|
|
453
|
+
[F.ARROW_DOWN]: O,
|
|
454
|
+
[F.HOME]: D,
|
|
455
|
+
[F.END]: P
|
|
456
|
+
}, I = {
|
|
457
|
+
[g.SELECT]: u(g.SELECT),
|
|
458
|
+
[g.SPACE]: u(g.SPACE),
|
|
459
|
+
[g.TAB]: u(g.TAB),
|
|
460
|
+
[g.ENTER]: u(g.ENTER)
|
|
461
|
+
};
|
|
462
|
+
return i({
|
|
463
|
+
/**
|
|
464
|
+
* Reference for a single listbox item.
|
|
465
|
+
* Required for keyboard navigation in dropdown as $children is removed in vue@3
|
|
466
|
+
*/
|
|
467
|
+
listboxItemRef: a,
|
|
468
|
+
/**
|
|
469
|
+
* Method to set the index of the item to be focused on
|
|
470
|
+
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
471
|
+
*/
|
|
472
|
+
setListboxFocusedIndex: B
|
|
473
|
+
}), {
|
|
474
|
+
// Enums
|
|
475
|
+
BentoListboxEvent: g,
|
|
476
|
+
// Values
|
|
477
|
+
listboxRef: o,
|
|
478
|
+
listboxItemRef: a,
|
|
479
|
+
selectedItem: p,
|
|
480
|
+
slots: s,
|
|
481
|
+
ariaAttributes: y,
|
|
482
|
+
// Computed
|
|
483
|
+
hasCategories: r,
|
|
484
|
+
// Methods
|
|
485
|
+
onOptionSelected: u,
|
|
486
|
+
// Keyboard navigation
|
|
487
|
+
listboxListeners: R,
|
|
488
|
+
listboxOptionListeners: I
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
function zt(e, t, i, s, n, o) {
|
|
493
|
+
const a = A("bento-listbox-single-select-option"), p = A("bento-listbox-single-select-category"), y = Ve("bento-keyboard-navigation-directive");
|
|
494
|
+
return ce((m(), E("div", x({ ref: "listboxRef" }, e.ariaAttributes, { role: "listbox" }, se(e.listboxListeners, !0)), [
|
|
495
|
+
e.hasCategories && e.staticCategories ? (m(!0), E(le, { key: 0 }, H(e.items, (r) => (m(), $(p, {
|
|
496
|
+
key: r.value,
|
|
497
|
+
"category-label": r.label
|
|
498
|
+
}, {
|
|
499
|
+
default: k(() => [
|
|
500
|
+
(m(!0), E(le, null, H(r.items, (u) => (m(), $(a, x({
|
|
501
|
+
key: u.value,
|
|
502
|
+
ref_for: !0,
|
|
503
|
+
ref: "listboxItemRef",
|
|
504
|
+
role: "option",
|
|
505
|
+
option: u,
|
|
506
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(u) : null,
|
|
507
|
+
selected: u.value === e.selectedItem.value
|
|
508
|
+
}, se(e.listboxOptionListeners)), pe({ _: 2 }, [
|
|
509
|
+
H(e.slots, (l, f) => ({
|
|
510
|
+
name: f,
|
|
511
|
+
fn: k((O) => [
|
|
512
|
+
j(e.$slots, f, x({ ref_for: !0 }, O))
|
|
513
|
+
])
|
|
514
|
+
}))
|
|
515
|
+
]), 1040, ["option", "disabled", "selected"]))), 128))
|
|
516
|
+
]),
|
|
517
|
+
_: 2
|
|
518
|
+
}, 1032, ["category-label"]))), 128)) : (m(!0), E(le, { key: 1 }, H(e.items, (r) => (m(), $(a, x({
|
|
519
|
+
key: r.value,
|
|
520
|
+
ref_for: !0,
|
|
521
|
+
ref: "listboxItemRef",
|
|
522
|
+
role: "option",
|
|
523
|
+
option: r,
|
|
524
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(r) : null,
|
|
525
|
+
selected: r.value === e.selectedItem.value
|
|
526
|
+
}, se(e.listboxOptionListeners)), pe({ _: 2 }, [
|
|
527
|
+
H(e.slots, (u, l) => ({
|
|
528
|
+
name: l,
|
|
529
|
+
fn: k((f) => [
|
|
530
|
+
j(e.$slots, l, x({ ref_for: !0 }, f))
|
|
531
|
+
])
|
|
532
|
+
}))
|
|
533
|
+
]), 1040, ["option", "disabled", "selected"]))), 128))
|
|
534
|
+
], 16)), [
|
|
535
|
+
[y]
|
|
536
|
+
]);
|
|
537
|
+
}
|
|
538
|
+
const Vt = /* @__PURE__ */ q(Ut, [["render", zt]]);
|
|
539
|
+
let we = 0;
|
|
540
|
+
const Ft = {
|
|
541
|
+
beforeCreate() {
|
|
542
|
+
this.uuid = we.toString(), we += 1;
|
|
543
|
+
}
|
|
544
|
+
}, Kt = { key: 0 };
|
|
545
|
+
function Wt(e, t, i, s, n, o) {
|
|
546
|
+
return m(), E("svg", x({ role: "img" }, e.$attrs, {
|
|
547
|
+
class: "ui-assets-icons-16",
|
|
548
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
549
|
+
width: "16",
|
|
550
|
+
height: "16",
|
|
551
|
+
fill: "none"
|
|
552
|
+
}), [
|
|
553
|
+
e.$attrs["svg-title"] ? (m(), E("title", Kt, V(e.$attrs["svg-title"]), 1)) : X("", !0),
|
|
554
|
+
t[0] || (t[0] = U("path", {
|
|
555
|
+
fill: "#001222",
|
|
556
|
+
d: "M9.69043 5.75L4.62988 10.8105L1.56934 7.75L2.62988 6.68945L4.62988 8.68945L8.62988 4.68945L9.69043 5.75Z"
|
|
557
|
+
}, null, -1)),
|
|
558
|
+
t[1] || (t[1] = U("path", {
|
|
559
|
+
fill: "#001222",
|
|
560
|
+
d: "M13.9307 5.75L8.87012 10.8105L7.80957 9.75L12.8701 4.68945L13.9307 5.75Z"
|
|
561
|
+
}, null, -1))
|
|
562
|
+
], 16);
|
|
563
|
+
}
|
|
564
|
+
const jt = /* @__PURE__ */ q(Ft, [["render", Wt]]), qt = {}, Ht = /* @__PURE__ */ J({
|
|
565
|
+
...qt,
|
|
566
|
+
__name: "decorative-checkbox",
|
|
567
|
+
props: {
|
|
568
|
+
disabled: { type: Boolean, default: !1 },
|
|
569
|
+
indeterminate: { type: Boolean, default: !1 },
|
|
570
|
+
checked: { type: Boolean, default: !1 },
|
|
571
|
+
allSelected: { type: Boolean, default: !1 }
|
|
572
|
+
},
|
|
573
|
+
setup(e) {
|
|
574
|
+
const t = e, i = v(() => ({
|
|
575
|
+
[`b-checkbox-input--${he.DISABLED}`]: t.disabled
|
|
576
|
+
})), s = v(() => ({
|
|
577
|
+
[`b-checkbox-input__outline--${he.UNCHECKED}`]: !t.checked && !t.indeterminate && !t.allSelected,
|
|
578
|
+
[`b-checkbox-input__outline--${he.CHECKED}`]: (t.checked || t.allSelected) && !t.indeterminate,
|
|
579
|
+
[`b-checkbox-input__outline--${he.INDETERMINATE}`]: t.indeterminate
|
|
580
|
+
}));
|
|
581
|
+
return (n, o) => (m(), E("div", {
|
|
582
|
+
class: ge(["b-checkbox-input", i.value]),
|
|
583
|
+
role: "presentation"
|
|
584
|
+
}, [
|
|
585
|
+
n.indeterminate ? (m(), $(M(yt), {
|
|
586
|
+
key: 0,
|
|
587
|
+
class: "b-checkbox-input__icon",
|
|
588
|
+
"svg-title": "",
|
|
589
|
+
"aria-hidden": "true"
|
|
590
|
+
})) : n.allSelected ? (m(), $(M(jt), {
|
|
591
|
+
key: 1,
|
|
592
|
+
class: "b-checkbox-input__icon",
|
|
593
|
+
"svg-title": "",
|
|
594
|
+
"aria-hidden": "true",
|
|
595
|
+
"data-testid": "decorative-checkbox-double-checkmark-icon"
|
|
596
|
+
})) : n.checked ? (m(), $(M(St), {
|
|
597
|
+
key: 2,
|
|
598
|
+
class: "b-checkbox-input__icon",
|
|
599
|
+
"svg-title": "",
|
|
600
|
+
"aria-hidden": "true"
|
|
601
|
+
})) : X("", !0),
|
|
602
|
+
U("div", {
|
|
603
|
+
class: ge(["b-checkbox-input__outline", s.value])
|
|
604
|
+
}, null, 2)
|
|
605
|
+
], 2));
|
|
606
|
+
}
|
|
607
|
+
}), ke = /* @__PURE__ */ q(Ht, [["__scopeId", "data-v-08d3142e"]]);
|
|
608
|
+
var je = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(je || {}), te = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(te || {});
|
|
609
|
+
const Ge = {
|
|
610
|
+
"en-US": {
|
|
611
|
+
categoryClosed: "{category} closed",
|
|
612
|
+
categoryOpened: "{category} opened"
|
|
613
|
+
}
|
|
614
|
+
}, Xt = J({
|
|
615
|
+
i18n: { messages: Ge },
|
|
616
|
+
name: "bento-listbox-multi-select-category",
|
|
617
|
+
components: {
|
|
618
|
+
BentoTypography: de,
|
|
619
|
+
BentoListboxOption: Ee,
|
|
620
|
+
ChevronDownIcon: Ct,
|
|
621
|
+
ChevronUpIcon: Et,
|
|
622
|
+
DecorativeCheckbox: ke
|
|
623
|
+
},
|
|
624
|
+
props: {
|
|
625
|
+
/**
|
|
626
|
+
* The option elements to populate the listbox with.
|
|
627
|
+
* It must be an array of {@see BentoListboxOptionItem }.
|
|
628
|
+
*
|
|
629
|
+
* @property {string} value.label - Text to be displayed in the option
|
|
630
|
+
* @property {string,number} value.value - Value of the option
|
|
631
|
+
* @property {BentoListboxOptionItem} value.items - Category items list
|
|
632
|
+
*/
|
|
633
|
+
category: {
|
|
634
|
+
type: Object,
|
|
635
|
+
required: !0
|
|
636
|
+
},
|
|
637
|
+
/**
|
|
638
|
+
* Function that allows the options to be disabled
|
|
639
|
+
*
|
|
640
|
+
* @type {BentoListboxIsOptionDisabled}
|
|
641
|
+
* @param {BentoListboxOptionItem} option - listbox option object
|
|
642
|
+
* @param {string} option.label - Option's label text
|
|
643
|
+
* @param {string|number} option.value - Option's value
|
|
644
|
+
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
645
|
+
*/
|
|
646
|
+
isOptionDisabled: {
|
|
647
|
+
type: [Function],
|
|
648
|
+
default: () => !1
|
|
649
|
+
},
|
|
650
|
+
/**
|
|
651
|
+
* The `input` value.
|
|
652
|
+
* Providing an empty array will select no options.
|
|
653
|
+
*/
|
|
654
|
+
selectedItemsList: {
|
|
655
|
+
type: Array,
|
|
656
|
+
default: () => []
|
|
657
|
+
},
|
|
658
|
+
/**
|
|
659
|
+
* If enabled, dropdown will display non-selectable, static categories
|
|
660
|
+
*/
|
|
661
|
+
staticCategories: { type: Boolean, default: !1 },
|
|
662
|
+
/**
|
|
663
|
+
* Category's tabindex
|
|
664
|
+
*/
|
|
665
|
+
tabindex: { type: Number, default: -1 }
|
|
666
|
+
},
|
|
667
|
+
emits: [
|
|
668
|
+
te.SELECT_CATEGORY,
|
|
669
|
+
te.UNSELECT_CATEGORY,
|
|
670
|
+
te.TOGGLE_CATEGORY_VISIBILITY
|
|
671
|
+
],
|
|
672
|
+
setup(e, { emit: t }) {
|
|
673
|
+
const i = L(!1), { t: s } = Ie({ messages: Ge }), n = Ne("category-group"), o = Ne("category-name"), a = (N) => e.isOptionDisabled ? e.isOptionDisabled(N) : !1, p = v(
|
|
674
|
+
() => e.category.items.every((N) => a(N))
|
|
675
|
+
), y = fe(e, "staticCategories"), r = v(() => i.value || e.staticCategories), u = v(() => ({
|
|
676
|
+
[`b-listbox-multi-select-category--${je.DISABLED}`]: p.value
|
|
677
|
+
})), l = (N, z) => {
|
|
678
|
+
N.preventDefault(), i.value = z !== void 0 ? z : !i.value, t(te.TOGGLE_CATEGORY_VISIBILITY, e.category.value);
|
|
679
|
+
}, f = (N) => {
|
|
680
|
+
var oe;
|
|
681
|
+
const z = a(N), W = ((oe = e.selectedItemsList) == null ? void 0 : oe.includes(N.value)) || !1;
|
|
682
|
+
return { isDisabled: z, isPreSelected: W };
|
|
683
|
+
}, O = v(
|
|
684
|
+
() => e.category.items.filter((N) => {
|
|
685
|
+
const { isDisabled: z, isPreSelected: W } = f(N);
|
|
686
|
+
return z && W || !z;
|
|
687
|
+
})
|
|
688
|
+
), T = v(
|
|
689
|
+
() => {
|
|
690
|
+
var N;
|
|
691
|
+
return (N = O.value) == null ? void 0 : N.filter(
|
|
692
|
+
({ value: z }) => {
|
|
693
|
+
var W;
|
|
694
|
+
return (W = e.selectedItemsList) == null ? void 0 : W.includes(z);
|
|
695
|
+
}
|
|
696
|
+
);
|
|
697
|
+
}
|
|
698
|
+
), D = v(() => {
|
|
699
|
+
const N = i.value ? "categoryOpened" : "categoryClosed";
|
|
700
|
+
return s(N, { category: e.category.label });
|
|
701
|
+
}), P = () => {
|
|
702
|
+
t(te.SELECT_CATEGORY);
|
|
703
|
+
}, B = () => {
|
|
704
|
+
t(te.UNSELECT_CATEGORY);
|
|
705
|
+
}, { isAllSelected: R, isIndeterminate: I, toggleSelectAll: S } = Fe(
|
|
706
|
+
T,
|
|
707
|
+
O,
|
|
708
|
+
P,
|
|
709
|
+
B
|
|
710
|
+
), _ = v(() => I.value ? "mixed" : `${R.value}`), Y = L(R.value), Q = () => {
|
|
711
|
+
Y.value = !Y.value, S(Y.value);
|
|
712
|
+
};
|
|
713
|
+
return ye(R, () => {
|
|
714
|
+
Y.value = R.value;
|
|
715
|
+
}), {
|
|
716
|
+
// Values
|
|
717
|
+
chevronTitle: D,
|
|
718
|
+
conditionalClass: u,
|
|
719
|
+
hasAllPropsDisabled: p,
|
|
720
|
+
isOpen: i,
|
|
721
|
+
isAllSelected: R,
|
|
722
|
+
isIndeterminate: I,
|
|
723
|
+
isStaticCategory: y,
|
|
724
|
+
categoryGroupId: n,
|
|
725
|
+
categoryNameId: o,
|
|
726
|
+
// Computed
|
|
727
|
+
showItemChildren: r,
|
|
728
|
+
ariaCheckedComputed: _,
|
|
729
|
+
// Methods
|
|
730
|
+
handleSelectAll: Q,
|
|
731
|
+
toggleOpen: l,
|
|
732
|
+
toggleSelectAll: S
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
}), Zt = { class: "b-listbox-multi-select-category__label" }, Jt = {
|
|
736
|
+
key: 1,
|
|
737
|
+
class: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category",
|
|
738
|
+
"aria-hidden": "true"
|
|
739
|
+
}, Qt = { class: "b-listbox-multi-select-category__label" }, es = ["id", "aria-label"];
|
|
740
|
+
function ts(e, t, i, s, n, o) {
|
|
741
|
+
const a = A("decorative-checkbox"), p = A("bento-typography"), y = A("chevron-up-icon"), r = A("chevron-down-icon"), u = A("bento-listbox-option");
|
|
742
|
+
return m(), E("div", null, [
|
|
743
|
+
e.isStaticCategory ? (m(), E("div", Jt, [
|
|
744
|
+
U("span", Qt, [
|
|
745
|
+
G(p, {
|
|
746
|
+
el: "span",
|
|
747
|
+
variant: "caption",
|
|
748
|
+
class: "b-listbox-multi-select-category__label-text"
|
|
749
|
+
}, {
|
|
750
|
+
default: k(() => [
|
|
751
|
+
K(V(e.category.label), 1)
|
|
752
|
+
]),
|
|
753
|
+
_: 1
|
|
754
|
+
})
|
|
755
|
+
])
|
|
756
|
+
])) : (m(), $(u, {
|
|
757
|
+
key: 0,
|
|
758
|
+
class: ge(["b-listbox-multi-select-category__option", e.conditionalClass]),
|
|
759
|
+
tabindex: e.tabindex,
|
|
760
|
+
"aria-selected": e.ariaCheckedComputed !== "false",
|
|
761
|
+
"aria-checked": e.ariaCheckedComputed,
|
|
762
|
+
"aria-disabled": e.hasAllPropsDisabled,
|
|
763
|
+
"aria-expanded": `${e.isOpen}`,
|
|
764
|
+
role: "treeitem",
|
|
765
|
+
"aria-owns": e.categoryGroupId,
|
|
766
|
+
"aria-labelledby": e.categoryNameId,
|
|
767
|
+
onClick: e.handleSelectAll,
|
|
768
|
+
onEnterPressed: e.handleSelectAll,
|
|
769
|
+
onSpacePressed: re(e.handleSelectAll, ["prevent"]),
|
|
770
|
+
onKeydown: [
|
|
771
|
+
t[1] || (t[1] = me((l) => e.toggleOpen(l, !1), ["arrow-left", "native"])),
|
|
772
|
+
t[2] || (t[2] = me((l) => e.toggleOpen(l, !0), ["arrow-right", "native"]))
|
|
773
|
+
]
|
|
774
|
+
}, {
|
|
775
|
+
default: k(() => [
|
|
776
|
+
G(a, {
|
|
777
|
+
indeterminate: e.isIndeterminate,
|
|
778
|
+
disabled: e.hasAllPropsDisabled,
|
|
779
|
+
checked: e.isAllSelected
|
|
780
|
+
}, null, 8, ["indeterminate", "disabled", "checked"]),
|
|
781
|
+
U("span", Zt, [
|
|
782
|
+
G(p, {
|
|
783
|
+
id: e.categoryNameId,
|
|
784
|
+
el: "span",
|
|
785
|
+
class: "b-listbox-multi-select-category__label-text"
|
|
786
|
+
}, {
|
|
787
|
+
default: k(() => [
|
|
788
|
+
K(V(e.category.label), 1)
|
|
789
|
+
]),
|
|
790
|
+
_: 1
|
|
791
|
+
}, 8, ["id"]),
|
|
792
|
+
U("div", {
|
|
793
|
+
"aria-hidden": "true",
|
|
794
|
+
class: "b-listbox-multi-select-category__label-chevron",
|
|
795
|
+
"data-testid": "toggle-listbox",
|
|
796
|
+
onClickCapture: t[0] || (t[0] = re((...l) => e.toggleOpen && e.toggleOpen(...l), ["stop"]))
|
|
797
|
+
}, [
|
|
798
|
+
e.isOpen ? (m(), $(y, {
|
|
799
|
+
key: 0,
|
|
800
|
+
"svg-title": e.chevronTitle
|
|
801
|
+
}, null, 8, ["svg-title"])) : (m(), $(r, {
|
|
802
|
+
key: 1,
|
|
803
|
+
"svg-title": e.chevronTitle
|
|
804
|
+
}, null, 8, ["svg-title"]))
|
|
805
|
+
], 32)
|
|
806
|
+
])
|
|
807
|
+
]),
|
|
808
|
+
_: 1
|
|
809
|
+
}, 8, ["class", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "aria-expanded", "aria-owns", "aria-labelledby", "onClick", "onEnterPressed", "onSpacePressed"])),
|
|
810
|
+
ce(U("div", {
|
|
811
|
+
id: e.categoryGroupId,
|
|
812
|
+
role: "group",
|
|
813
|
+
"aria-label": e.category.label
|
|
814
|
+
}, [
|
|
815
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
816
|
+
], 8, es), [
|
|
817
|
+
[Ue, e.showItemChildren]
|
|
818
|
+
])
|
|
819
|
+
]);
|
|
820
|
+
}
|
|
821
|
+
const ss = /* @__PURE__ */ q(Xt, [["render", ts], ["__scopeId", "data-v-60c04867"]]);
|
|
822
|
+
var Z = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(Z || {});
|
|
823
|
+
const ls = J({
|
|
824
|
+
name: "listbox-multi-select-options",
|
|
825
|
+
components: {
|
|
826
|
+
BentoListboxOption: Ee,
|
|
827
|
+
BentoTypography: de,
|
|
828
|
+
ListboxMultiSelectCategory: ss,
|
|
829
|
+
DecorativeCheckbox: ke
|
|
830
|
+
},
|
|
831
|
+
inheritAttrs: !1,
|
|
832
|
+
props: {
|
|
833
|
+
/**
|
|
834
|
+
* Indicates if the items listed are inside a category
|
|
835
|
+
* so they can be padded to right by one level in recursion.
|
|
836
|
+
* Items of categories are automatically defined as "categoryItems"
|
|
837
|
+
*/
|
|
838
|
+
categoryItems: { type: Boolean, default: !1 },
|
|
839
|
+
/**
|
|
840
|
+
* Current focused option index
|
|
841
|
+
*/
|
|
842
|
+
focusedIndex: { type: Number, default: 0 },
|
|
843
|
+
/**
|
|
844
|
+
* Function that allows the options to be disabled
|
|
845
|
+
*
|
|
846
|
+
* @type {BentoListboxIsOptionDisabled}
|
|
847
|
+
* @param {BentoListboxOptionItem} option - listbox option object
|
|
848
|
+
* @param {string} option.label - Option's label text
|
|
849
|
+
* @param {string|number} option.value - Option's value
|
|
850
|
+
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
851
|
+
*/
|
|
852
|
+
isOptionDisabled: {
|
|
853
|
+
type: Function,
|
|
854
|
+
default: () => !1
|
|
855
|
+
},
|
|
856
|
+
/**
|
|
857
|
+
* The option elements to populate the listbox with.
|
|
858
|
+
* It must be an array of {@see BentoListboxOptionItem }.
|
|
859
|
+
*
|
|
860
|
+
* @property {string} value.label - Text to be displayed in the option
|
|
861
|
+
* @property {string,number} value.value - Value of the option
|
|
862
|
+
*/
|
|
863
|
+
items: {
|
|
864
|
+
type: Array,
|
|
865
|
+
required: !0
|
|
866
|
+
},
|
|
867
|
+
/**
|
|
868
|
+
* Indicates if the elements options are inside a multi-level category
|
|
869
|
+
*/
|
|
870
|
+
isMultiLevel: { type: Boolean, default: !1 },
|
|
871
|
+
/**
|
|
872
|
+
* Flag that indicates that an external search it's being made
|
|
873
|
+
* to filter out the items inside the the multi-select listbox
|
|
874
|
+
*
|
|
875
|
+
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
876
|
+
*/
|
|
877
|
+
searching: { type: Boolean, default: !1 },
|
|
878
|
+
/**
|
|
879
|
+
* List of selected items.
|
|
880
|
+
* Providing an empty array will select no options.
|
|
881
|
+
*/
|
|
882
|
+
selectedItemsList: {
|
|
883
|
+
type: Array,
|
|
884
|
+
default: () => []
|
|
885
|
+
},
|
|
886
|
+
/**
|
|
887
|
+
* If enabled, dropdown will display non-selectable, static categories
|
|
888
|
+
*/
|
|
889
|
+
staticCategories: { type: Boolean, default: !1 },
|
|
890
|
+
/**
|
|
891
|
+
* Object with the index of each item.
|
|
892
|
+
*/
|
|
893
|
+
itemsIndex: {
|
|
894
|
+
type: Object,
|
|
895
|
+
default: () => ({})
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
emits: [
|
|
899
|
+
Z.TOGGLE_CHECKBOX_SELECTION,
|
|
900
|
+
Z.SELECT_CATEGORY,
|
|
901
|
+
Z.UNSELECT_CATEGORY,
|
|
902
|
+
Z.TOGGLE_CATEGORY_VISIBILITY
|
|
903
|
+
],
|
|
904
|
+
setup(e, { emit: t }) {
|
|
905
|
+
const i = (r) => {
|
|
906
|
+
e.isOptionDisabled(r) || t(Z.TOGGLE_CHECKBOX_SELECTION, r);
|
|
907
|
+
}, s = (r) => !!r.items, n = (r) => {
|
|
908
|
+
const u = e.isMultiLevel && e.searching;
|
|
909
|
+
return r.description && (!e.isMultiLevel || u);
|
|
910
|
+
}, o = (r) => r.items ? !!r.items.find((u) => e.selectedItemsList.includes(u.value)) : e.selectedItemsList.includes(r.value), a = (r) => {
|
|
911
|
+
if (s(r)) {
|
|
912
|
+
const u = o(r) ? Z.UNSELECT_CATEGORY : Z.SELECT_CATEGORY;
|
|
913
|
+
t(u, r);
|
|
914
|
+
} else
|
|
915
|
+
i(r);
|
|
916
|
+
};
|
|
917
|
+
return {
|
|
918
|
+
// Values
|
|
919
|
+
conditionalClasses: v(() => ({
|
|
920
|
+
"b-listbox-multi-select-options__static-category-option": e.staticCategories,
|
|
921
|
+
"b-listbox-multi-select-options__category-option": e.categoryItems
|
|
922
|
+
})),
|
|
923
|
+
// Methods
|
|
924
|
+
isOptionSelected: o,
|
|
925
|
+
shouldShowDescription: n,
|
|
926
|
+
toggleCheckboxSelection: i,
|
|
927
|
+
toggleSearchOption: a,
|
|
928
|
+
computedTabindex: (r) => e.itemsIndex[r] === e.focusedIndex ? 0 : -1,
|
|
929
|
+
// Enums
|
|
930
|
+
BentoListboxEvent: g,
|
|
931
|
+
ListboxMultiSelectOptionsEvent: Z
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
}), os = { class: "b-listbox-multi-select__option-text" }, is = { class: "b-listbox-multi-select__option-text" };
|
|
935
|
+
function ns(e, t, i, s, n, o) {
|
|
936
|
+
const a = A("decorative-checkbox"), p = A("bento-typography"), y = A("bento-listbox-option"), r = A("listbox-multi-select-options", !0), u = A("listbox-multi-select-category");
|
|
937
|
+
return m(), E("div", null, [
|
|
938
|
+
(m(!0), E(le, null, H(e.items, (l) => (m(), E("div", {
|
|
939
|
+
key: `selected-${l.value}`
|
|
940
|
+
}, [
|
|
941
|
+
e.searching && e.isMultiLevel ? (m(), $(y, {
|
|
942
|
+
key: 0,
|
|
943
|
+
class: ge(["b-listbox-multi-select-options", e.conditionalClasses]),
|
|
944
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
945
|
+
tabindex: e.computedTabindex(l.value),
|
|
946
|
+
"aria-selected": `${e.isOptionSelected(l)}`,
|
|
947
|
+
"aria-checked": `${e.isOptionSelected(l)}`,
|
|
948
|
+
"aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
949
|
+
role: e.$attrs.role,
|
|
950
|
+
onClick: (f) => e.toggleSearchOption(l),
|
|
951
|
+
onEnterPressed: (f) => e.toggleSearchOption(l),
|
|
952
|
+
onSpacePressed: re((f) => e.toggleSearchOption(l), ["prevent"])
|
|
953
|
+
}, {
|
|
954
|
+
default: k(() => [
|
|
955
|
+
G(a, {
|
|
956
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
957
|
+
checked: e.isOptionSelected(l)
|
|
958
|
+
}, null, 8, ["disabled", "checked"]),
|
|
959
|
+
j(e.$slots, "default", x({ ref_for: !0 }, l), () => [
|
|
960
|
+
U("span", os, [
|
|
961
|
+
G(p, { el: "span" }, {
|
|
962
|
+
default: k(() => [
|
|
963
|
+
K(V(l.label), 1)
|
|
964
|
+
]),
|
|
965
|
+
_: 2
|
|
966
|
+
}, 1024),
|
|
967
|
+
e.shouldShowDescription(l) ? (m(), $(p, {
|
|
968
|
+
key: 0,
|
|
969
|
+
class: "b-listbox-multi-select__option-description",
|
|
970
|
+
el: "span"
|
|
971
|
+
}, {
|
|
972
|
+
default: k(() => [
|
|
973
|
+
K(V(l.description), 1)
|
|
974
|
+
]),
|
|
975
|
+
_: 2
|
|
976
|
+
}, 1024)) : X("", !0)
|
|
977
|
+
])
|
|
978
|
+
], !0)
|
|
979
|
+
]),
|
|
980
|
+
_: 2
|
|
981
|
+
}, 1032, ["class", "disabled", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"])) : (m(), E(le, { key: 1 }, [
|
|
982
|
+
l.items ? (m(), $(u, {
|
|
983
|
+
key: 0,
|
|
984
|
+
category: l,
|
|
985
|
+
"static-categories": e.staticCategories,
|
|
986
|
+
"is-option-disabled": e.isOptionDisabled,
|
|
987
|
+
"selected-items-list": e.selectedItemsList,
|
|
988
|
+
tabindex: e.computedTabindex(l.value),
|
|
989
|
+
onSelectCategory: (f) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, l),
|
|
990
|
+
onUnselectCategory: (f) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, l),
|
|
991
|
+
onToggleCategoryVisibility: t[1] || (t[1] = (f) => e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, f))
|
|
992
|
+
}, {
|
|
993
|
+
default: k(() => [
|
|
994
|
+
G(r, {
|
|
995
|
+
"category-items": "",
|
|
996
|
+
items: l.items,
|
|
997
|
+
"is-option-disabled": e.isOptionDisabled,
|
|
998
|
+
"items-index": e.itemsIndex,
|
|
999
|
+
"focused-index": e.focusedIndex,
|
|
1000
|
+
"is-multi-level": e.isMultiLevel,
|
|
1001
|
+
"static-categories": e.staticCategories,
|
|
1002
|
+
"selected-items-list": e.selectedItemsList,
|
|
1003
|
+
searching: e.searching,
|
|
1004
|
+
role: e.$attrs.role,
|
|
1005
|
+
onToggleCheckboxSelection: t[0] || (t[0] = (f) => e.toggleCheckboxSelection(f))
|
|
1006
|
+
}, null, 8, ["items", "is-option-disabled", "items-index", "focused-index", "is-multi-level", "static-categories", "selected-items-list", "searching", "role"])
|
|
1007
|
+
]),
|
|
1008
|
+
_: 2
|
|
1009
|
+
}, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (m(), $(y, {
|
|
1010
|
+
key: 1,
|
|
1011
|
+
class: ge(["b-listbox-multi-select-options", e.conditionalClasses]),
|
|
1012
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
1013
|
+
tabindex: e.computedTabindex(l.value),
|
|
1014
|
+
"aria-selected": `${e.isOptionSelected(l)}`,
|
|
1015
|
+
"aria-checked": `${e.isOptionSelected(l)}`,
|
|
1016
|
+
"aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
1017
|
+
role: e.$attrs.role,
|
|
1018
|
+
onClick: (f) => e.toggleCheckboxSelection(l),
|
|
1019
|
+
onEnterPressed: (f) => e.toggleCheckboxSelection(l),
|
|
1020
|
+
onSpacePressed: re((f) => e.toggleCheckboxSelection(l), ["prevent"])
|
|
1021
|
+
}, {
|
|
1022
|
+
default: k(() => [
|
|
1023
|
+
G(a, {
|
|
1024
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
1025
|
+
checked: e.isOptionSelected(l)
|
|
1026
|
+
}, null, 8, ["disabled", "checked"]),
|
|
1027
|
+
j(e.$slots, "default", x({ ref_for: !0 }, l), () => [
|
|
1028
|
+
U("span", is, [
|
|
1029
|
+
G(p, { el: "span" }, {
|
|
1030
|
+
default: k(() => [
|
|
1031
|
+
K(V(l.label), 1)
|
|
1032
|
+
]),
|
|
1033
|
+
_: 2
|
|
1034
|
+
}, 1024),
|
|
1035
|
+
e.shouldShowDescription(l) ? (m(), $(p, {
|
|
1036
|
+
key: 0,
|
|
1037
|
+
class: "b-listbox-multi-select__option-description",
|
|
1038
|
+
el: "span"
|
|
1039
|
+
}, {
|
|
1040
|
+
default: k(() => [
|
|
1041
|
+
K(V(l.description), 1)
|
|
1042
|
+
]),
|
|
1043
|
+
_: 2
|
|
1044
|
+
}, 1024)) : X("", !0)
|
|
1045
|
+
])
|
|
1046
|
+
], !0)
|
|
1047
|
+
]),
|
|
1048
|
+
_: 2
|
|
1049
|
+
}, 1032, ["class", "disabled", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"]))
|
|
1050
|
+
], 64))
|
|
1051
|
+
]))), 128))
|
|
1052
|
+
]);
|
|
1053
|
+
}
|
|
1054
|
+
const as = /* @__PURE__ */ q(ls, [["render", ns], ["__scopeId", "data-v-0c9e6af6"]]), rs = (e) => {
|
|
1055
|
+
const t = v(() => {
|
|
1056
|
+
var s;
|
|
1057
|
+
return !!((s = e.value) != null && s.find(({ items: n }) => !!n));
|
|
1058
|
+
}), i = v(() => {
|
|
1059
|
+
var s;
|
|
1060
|
+
return t.value ? (s = e.value) == null ? void 0 : s.reduce((n, o) => (o.items ? n.push(...o.items.flat()) : n.push(o), n), []) : e.value;
|
|
1061
|
+
});
|
|
1062
|
+
return {
|
|
1063
|
+
isMultiLevelSelect: t,
|
|
1064
|
+
flattenedItemsList: i
|
|
1065
|
+
};
|
|
1066
|
+
}, qe = {
|
|
1067
|
+
"en-US": {
|
|
1068
|
+
allSelected: "All selected ({total})",
|
|
1069
|
+
numberOfTotalSelected: "{number} of {total} selected",
|
|
1070
|
+
numbersSelected: "{number} selected",
|
|
1071
|
+
selectAll: "Select all ({total})"
|
|
1072
|
+
},
|
|
1073
|
+
"ja-JP": {
|
|
1074
|
+
allSelected: "すべて選択済み ({total})",
|
|
1075
|
+
numberOfTotalSelected: "{total}件中{number}件を選択済み",
|
|
1076
|
+
numbersSelected: "{number}件を選択済み",
|
|
1077
|
+
selectAll: "すべて選択 ({total})"
|
|
1078
|
+
},
|
|
1079
|
+
"pt-BR": {
|
|
1080
|
+
allSelected: "Todos selecionados ({total})",
|
|
1081
|
+
numberOfTotalSelected: "{number} de {total} selecionados",
|
|
1082
|
+
numbersSelected: "{number} selecionados",
|
|
1083
|
+
selectAll: "Selecionar todos ({total})"
|
|
1084
|
+
}
|
|
1085
|
+
}, cs = { key: 0 }, ds = ["role"], us = {
|
|
1086
|
+
key: 1,
|
|
1087
|
+
class: "b-listbox-multi-select__divider",
|
|
1088
|
+
"aria-hidden": "true"
|
|
1089
|
+
}, bs = { i18n: { messages: qe } }, ms = /* @__PURE__ */ J({
|
|
1090
|
+
...bs,
|
|
1091
|
+
__name: "listbox-multi-select",
|
|
1092
|
+
props: {
|
|
1093
|
+
hasMoreItems: { type: Boolean, default: !1 },
|
|
1094
|
+
isOptionDisabled: { type: Function, default: () => !1 },
|
|
1095
|
+
items: {},
|
|
1096
|
+
lazyLoadType: { default: "none" },
|
|
1097
|
+
searching: { type: Boolean, default: !1 },
|
|
1098
|
+
selectedValues: {},
|
|
1099
|
+
staticCategories: { type: Boolean, default: !1 }
|
|
1100
|
+
},
|
|
1101
|
+
emits: ["select"],
|
|
1102
|
+
setup(e, { expose: t, emit: i }) {
|
|
1103
|
+
const s = e, n = i, { t: o, n: a } = Ie({ messages: qe }), p = mt(), y = vt(), r = v(
|
|
1104
|
+
() => {
|
|
1105
|
+
var c, b, d, h;
|
|
1106
|
+
return {
|
|
1107
|
+
"aria-label": (c = y["aria-label"]) == null ? void 0 : c.toString(),
|
|
1108
|
+
"aria-busy": (b = y["aria-busy"]) == null ? void 0 : b.toString(),
|
|
1109
|
+
"aria-atomic": (d = y["aria-atomic"]) == null ? void 0 : d.toString(),
|
|
1110
|
+
"aria-live": (h = y["aria-live"]) == null ? void 0 : h.toString(),
|
|
1111
|
+
"aria-multiselectable": !0
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
), u = L(null), l = L(null), f = L(null), O = L(null), T = v(() => s.selectedValues.map(({ value: c }) => c)), { isMultiLevelSelect: D, flattenedItemsList: P } = rs(fe(s, "items")), B = v(() => D.value && !s.staticCategories), R = v(() => B.value ? "tree" : "listbox"), I = v(() => B.value ? "treeitem" : "option"), S = (c) => {
|
|
1115
|
+
var h;
|
|
1116
|
+
const b = s.isOptionDisabled(c), d = ((h = T.value) == null ? void 0 : h.includes(c.value)) || !1;
|
|
1117
|
+
return { isDisabled: b, isPreSelected: d };
|
|
1118
|
+
}, _ = v(() => {
|
|
1119
|
+
if (s.searching && D)
|
|
1120
|
+
return s.items;
|
|
1121
|
+
const c = P.value.filter((b) => {
|
|
1122
|
+
const { isDisabled: d, isPreSelected: h } = S(b);
|
|
1123
|
+
return d && h || !d;
|
|
1124
|
+
});
|
|
1125
|
+
return s.selectedValues.forEach((b) => {
|
|
1126
|
+
c.find((d) => d.value === b.value) || c.push(b);
|
|
1127
|
+
}), c;
|
|
1128
|
+
}), Y = v(
|
|
1129
|
+
() => {
|
|
1130
|
+
var c;
|
|
1131
|
+
return (c = _.value) == null ? void 0 : c.filter((b) => {
|
|
1132
|
+
var d;
|
|
1133
|
+
return b.items && D.value && s.searching ? b.items.filter(
|
|
1134
|
+
(C) => (s.selectedValues ?? []).includes(C.value)
|
|
1135
|
+
).length === b.items.length : (d = T.value) == null ? void 0 : d.includes(b.value);
|
|
1136
|
+
});
|
|
1137
|
+
}
|
|
1138
|
+
), Q = () => D.value && !s.searching ? P.value.length : s.items.length, N = v(() => {
|
|
1139
|
+
var h;
|
|
1140
|
+
const c = _.value.length, b = Q(), d = ((h = Y.value) == null ? void 0 : h.length) || 0;
|
|
1141
|
+
return d === 0 ? o("selectAll", { total: a(c) }) : d === b ? o("allSelected", { total: a(b) }) : d <= b ? o("numberOfTotalSelected", { number: a(d), total: a(b) }) : o("numbersSelected", { number: a(d) });
|
|
1142
|
+
}), z = (c) => {
|
|
1143
|
+
const b = (h) => {
|
|
1144
|
+
const { isDisabled: C, isPreSelected: ee } = S(h);
|
|
1145
|
+
return C && ee || !C;
|
|
1146
|
+
}, d = c.filter(b).filter((h) => !T.value.includes(h.value));
|
|
1147
|
+
n("select", [...s.selectedValues, ...d]);
|
|
1148
|
+
}, W = (c) => {
|
|
1149
|
+
const b = (C) => {
|
|
1150
|
+
const { isDisabled: ee, isPreSelected: dt } = S(C);
|
|
1151
|
+
return !(ee && dt);
|
|
1152
|
+
}, d = c.filter(b).map(({ value: C }) => C), h = s.selectedValues.filter((C) => !(d != null && d.includes(C.value)));
|
|
1153
|
+
n("select", h);
|
|
1154
|
+
}, oe = () => {
|
|
1155
|
+
z(P.value);
|
|
1156
|
+
}, Oe = () => {
|
|
1157
|
+
W(P.value);
|
|
1158
|
+
}, { isAllSelected: w, isIndeterminate: ie, toggleSelectAll: He } = Fe(
|
|
1159
|
+
Y,
|
|
1160
|
+
_,
|
|
1161
|
+
oe,
|
|
1162
|
+
Oe
|
|
1163
|
+
), Le = v(() => ie.value ? "mixed" : `${w.value}`), Se = L(w.value), Te = () => {
|
|
1164
|
+
Se.value = !Se.value, He(Se.value);
|
|
1165
|
+
};
|
|
1166
|
+
ye(w, () => {
|
|
1167
|
+
Se.value = w.value;
|
|
1168
|
+
});
|
|
1169
|
+
const Xe = (c) => {
|
|
1170
|
+
z(c.items);
|
|
1171
|
+
}, Ae = (c) => {
|
|
1172
|
+
W(c.items);
|
|
1173
|
+
}, ue = (c, b) => {
|
|
1174
|
+
let d = !1;
|
|
1175
|
+
const h = s.selectedValues.filter(({ value: C }) => b.value === C ? (d = !0, !1) : !0);
|
|
1176
|
+
d || h.push(b), n(c, h);
|
|
1177
|
+
}, Ze = v(() => {
|
|
1178
|
+
if (!D.value)
|
|
1179
|
+
return s.selectedValues;
|
|
1180
|
+
const c = (C) => T.value.includes(C.value), b = (C) => !s.staticCategories && C.every((ee) => c(ee));
|
|
1181
|
+
return s.items.flatMap(
|
|
1182
|
+
(C) => C.items && !b(C.items) ? C.items : C
|
|
1183
|
+
).filter((C) => C.items ? !0 : c(C));
|
|
1184
|
+
}), Je = v(() => {
|
|
1185
|
+
var d, h, C, ee;
|
|
1186
|
+
const c = ["automatic", "button"].includes(s.lazyLoadType), b = ((d = s.selectedValues) == null ? void 0 : d.length) > 0 && ((h = Y.value) == null ? void 0 : h.length) !== ((C = P.value) == null ? void 0 : C.length);
|
|
1187
|
+
return c && s.hasMoreItems ? !!((ee = s.selectedValues) != null && ee.length) : b;
|
|
1188
|
+
}), $e = v(() => ["automatic", "button"].includes(s.lazyLoadType) ? !s.hasMoreItems : !0), be = L([]), { visibleDomOptions: De, updateVisibleDomOptions: Qe } = We(
|
|
1189
|
+
u,
|
|
1190
|
+
fe(s, "items"),
|
|
1191
|
+
I
|
|
1192
|
+
), et = (c) => {
|
|
1193
|
+
be.value.includes(c) ? be.value = be.value.filter((b) => b !== c) : be.value.push(c), ze(() => {
|
|
1194
|
+
Qe();
|
|
1195
|
+
});
|
|
1196
|
+
}, tt = (c) => {
|
|
1197
|
+
var b;
|
|
1198
|
+
(b = De.value[c]) == null || b.focus();
|
|
1199
|
+
}, {
|
|
1200
|
+
moveToNextElement: st,
|
|
1201
|
+
moveToPreviousElement: lt,
|
|
1202
|
+
moveToFirstElement: ot,
|
|
1203
|
+
moveToLastElement: it,
|
|
1204
|
+
preventDefault: Be,
|
|
1205
|
+
focusedIndex: Re,
|
|
1206
|
+
setListboxFocusedIndex: nt
|
|
1207
|
+
} = Ke(
|
|
1208
|
+
{
|
|
1209
|
+
items: De
|
|
1210
|
+
},
|
|
1211
|
+
tt
|
|
1212
|
+
), at = {
|
|
1213
|
+
[F.ARROW_UP]: (c) => lt(c),
|
|
1214
|
+
[F.ARROW_DOWN]: (c) => st(c),
|
|
1215
|
+
[F.HOME]: ot,
|
|
1216
|
+
[F.END]: it
|
|
1217
|
+
};
|
|
1218
|
+
t({
|
|
1219
|
+
/**
|
|
1220
|
+
* Method to set the index of the item to be focused on
|
|
1221
|
+
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
1222
|
+
*/
|
|
1223
|
+
setListboxFocusedIndex: nt
|
|
1224
|
+
});
|
|
1225
|
+
const rt = {
|
|
1226
|
+
[F.ARROW_UP]: Be,
|
|
1227
|
+
[F.ARROW_DOWN]: Be
|
|
1228
|
+
}, ct = v(() => {
|
|
1229
|
+
let c = 1;
|
|
1230
|
+
const b = {};
|
|
1231
|
+
return s.items.forEach((d) => {
|
|
1232
|
+
let h = be.value.includes(d.value);
|
|
1233
|
+
d.items ? (s.staticCategories ? h = !0 : b[d.value] = c++, h && d.items.forEach((C) => b[C.value] = c++)) : b[d.value] = c++;
|
|
1234
|
+
}), b;
|
|
1235
|
+
});
|
|
1236
|
+
return (c, b) => (m(), E("div", {
|
|
1237
|
+
ref_key: "listboxRef",
|
|
1238
|
+
ref: u,
|
|
1239
|
+
class: "b-listbox-multi-select"
|
|
1240
|
+
}, [
|
|
1241
|
+
Je.value ? (m(), E("div", cs, [
|
|
1242
|
+
ce((m(), E("ul", x({ class: "b-listbox-multi-select__chips" }, se(rt, !0)), [
|
|
1243
|
+
(m(!0), E(le, null, H(Ze.value, (d) => (m(), E("li", {
|
|
1244
|
+
key: d.value
|
|
1245
|
+
}, [
|
|
1246
|
+
G(M(ht), {
|
|
1247
|
+
ref_for: !0,
|
|
1248
|
+
ref_key: "selectedListboxItemsRef",
|
|
1249
|
+
ref: f,
|
|
1250
|
+
disabled: c.isOptionDisabled(d),
|
|
1251
|
+
label: d.label,
|
|
1252
|
+
condensed: "",
|
|
1253
|
+
onClick: (h) => d.items ? Ae(d) : ue("select", d)
|
|
1254
|
+
}, null, 8, ["disabled", "label", "onClick"])
|
|
1255
|
+
]))), 128))
|
|
1256
|
+
], 16)), [
|
|
1257
|
+
[M(Ce)]
|
|
1258
|
+
]),
|
|
1259
|
+
b[4] || (b[4] = U("hr", {
|
|
1260
|
+
class: "b-listbox-multi-select__divider",
|
|
1261
|
+
"aria-hidden": "true"
|
|
1262
|
+
}, null, -1))
|
|
1263
|
+
])) : X("", !0),
|
|
1264
|
+
ce((m(), E("div", x(r.value, { role: R.value }, se(at, !0)), [
|
|
1265
|
+
$e.value ? (m(), $(M(Ee), {
|
|
1266
|
+
key: 0,
|
|
1267
|
+
ref_key: "selectAllListboxItemsRef",
|
|
1268
|
+
ref: l,
|
|
1269
|
+
class: "b-listbox-multi-select__option",
|
|
1270
|
+
tabindex: M(Re) === 0 ? 0 : -1,
|
|
1271
|
+
"aria-selected": Le.value !== "false",
|
|
1272
|
+
"aria-checked": Le.value,
|
|
1273
|
+
role: I.value,
|
|
1274
|
+
onClick: Te,
|
|
1275
|
+
onEnterPressed: Te,
|
|
1276
|
+
onSpacePressed: re(Te, ["prevent"])
|
|
1277
|
+
}, {
|
|
1278
|
+
default: k(() => [
|
|
1279
|
+
G(M(ke), {
|
|
1280
|
+
checked: M(w),
|
|
1281
|
+
indeterminate: M(ie)
|
|
1282
|
+
}, null, 8, ["checked", "indeterminate"]),
|
|
1283
|
+
G(M(de), { el: "span" }, {
|
|
1284
|
+
default: k(() => [
|
|
1285
|
+
K(V(N.value), 1)
|
|
1286
|
+
]),
|
|
1287
|
+
_: 1
|
|
1288
|
+
})
|
|
1289
|
+
]),
|
|
1290
|
+
_: 1
|
|
1291
|
+
}, 8, ["tabindex", "aria-selected", "aria-checked", "role"])) : X("", !0),
|
|
1292
|
+
$e.value ? (m(), E("hr", us)) : X("", !0),
|
|
1293
|
+
G(M(as), {
|
|
1294
|
+
ref_key: "listboxItemsRef",
|
|
1295
|
+
ref: O,
|
|
1296
|
+
items: c.items,
|
|
1297
|
+
"is-option-disabled": c.isOptionDisabled,
|
|
1298
|
+
"is-multi-level": M(D),
|
|
1299
|
+
"static-categories": c.staticCategories,
|
|
1300
|
+
searching: c.searching,
|
|
1301
|
+
"selected-items-list": T.value,
|
|
1302
|
+
"focused-index": M(Re),
|
|
1303
|
+
"items-index": ct.value,
|
|
1304
|
+
role: I.value,
|
|
1305
|
+
onToggleCheckboxSelection: b[0] || (b[0] = (d) => ue("select", d)),
|
|
1306
|
+
onSelectCategory: Xe,
|
|
1307
|
+
onUnselectCategory: Ae,
|
|
1308
|
+
onToggleCategoryVisibility: et,
|
|
1309
|
+
onSpacePressed: b[1] || (b[1] = (d) => ue(M(g).SPACE, d)),
|
|
1310
|
+
onTabPressed: b[2] || (b[2] = (d) => ue(M(g).TAB, d)),
|
|
1311
|
+
onEnterPressed: b[3] || (b[3] = (d) => ue(M(g).ENTER, d))
|
|
1312
|
+
}, pe({ _: 2 }, [
|
|
1313
|
+
H(M(p), (d, h) => ({
|
|
1314
|
+
name: h,
|
|
1315
|
+
fn: k((C) => [
|
|
1316
|
+
j(c.$slots, h, ae(ve(C)), void 0, !0)
|
|
1317
|
+
])
|
|
1318
|
+
}))
|
|
1319
|
+
]), 1032, ["items", "is-option-disabled", "is-multi-level", "static-categories", "searching", "selected-items-list", "focused-index", "items-index", "role"])
|
|
1320
|
+
], 16, ds)), [
|
|
1321
|
+
[M(Ce)]
|
|
1322
|
+
])
|
|
1323
|
+
], 512));
|
|
1324
|
+
}
|
|
1325
|
+
}), xe = /* @__PURE__ */ q(ms, [["__scopeId", "data-v-d170602c"]]), Ye = {
|
|
1326
|
+
"en-US": {
|
|
1327
|
+
loading: "Loading",
|
|
1328
|
+
showMore: "Show more"
|
|
1329
|
+
},
|
|
1330
|
+
"ja-JP": {
|
|
1331
|
+
loading: "読み込み中",
|
|
1332
|
+
showMore: "表示内容を増やす"
|
|
1333
|
+
},
|
|
1334
|
+
"pt-BR": {
|
|
1335
|
+
loading: "Carregando",
|
|
1336
|
+
showMore: "Mostrar mais"
|
|
1337
|
+
}
|
|
1338
|
+
}, vs = 36, fs = J({
|
|
1339
|
+
name: "bento-listbox",
|
|
1340
|
+
components: {
|
|
1341
|
+
BentoEmptyState: pt,
|
|
1342
|
+
BentoListboxSingleSelect: Vt,
|
|
1343
|
+
BentoListboxMultiSelect: xe,
|
|
1344
|
+
BentoTypography: de,
|
|
1345
|
+
BentoLoadingIndicator: ft,
|
|
1346
|
+
BentoLoadingButton: Ot
|
|
1347
|
+
},
|
|
1348
|
+
directives: { BentoKeyboardNavigationDirective: Ce },
|
|
1349
|
+
i18n: { messages: Ye },
|
|
1350
|
+
props: {
|
|
1351
|
+
/**
|
|
1352
|
+
* Defines a string value that labels an interactive element.
|
|
1353
|
+
*/
|
|
1354
|
+
ariaLabel: { type: String, default: null },
|
|
1355
|
+
/**
|
|
1356
|
+
* Empty state props that will be used with the inner empty state component to be displayed when no search results are found.
|
|
1357
|
+
*/
|
|
1358
|
+
emptyState: {
|
|
1359
|
+
type: Object,
|
|
1360
|
+
default: void 0
|
|
1361
|
+
},
|
|
1362
|
+
/**
|
|
1363
|
+
* Indicates whether there are more items to load
|
|
1364
|
+
*/
|
|
1365
|
+
hasMoreItems: { type: Boolean, default: !1 },
|
|
1366
|
+
/**
|
|
1367
|
+
* Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.
|
|
1368
|
+
*/
|
|
1369
|
+
id: { type: String, required: !0 },
|
|
1370
|
+
/**
|
|
1371
|
+
* Function that allows the options to be disabled
|
|
1372
|
+
*
|
|
1373
|
+
* @type {BentoListboxIsOptionDisabled}
|
|
1374
|
+
* @param {BentoListboxOptionItem} option - Listbox option object
|
|
1375
|
+
* @param {string} option.label - Option's label text
|
|
1376
|
+
* @param {string|number} option.value - Option's value
|
|
1377
|
+
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
1378
|
+
*/
|
|
1379
|
+
isOptionDisabled: {
|
|
1380
|
+
type: Function,
|
|
1381
|
+
default: () => {
|
|
1382
|
+
}
|
|
1383
|
+
},
|
|
1384
|
+
/**
|
|
1385
|
+
* The option elements to populate the listbox with.
|
|
1386
|
+
* It must be an array of {@see BentoListboxOptionItem }
|
|
1387
|
+
* * @property {string} value.label - Text to be displayed in the option
|
|
1388
|
+
* * @property {string,number} value.value - Value of the option
|
|
1389
|
+
*/
|
|
1390
|
+
items: {
|
|
1391
|
+
type: Array,
|
|
1392
|
+
required: !0
|
|
1393
|
+
},
|
|
1394
|
+
/**
|
|
1395
|
+
* Indicates if new options are lazy loading.
|
|
1396
|
+
*/
|
|
1397
|
+
loading: { type: Boolean, default: !1 },
|
|
1398
|
+
/**
|
|
1399
|
+
* The type of `Lazy Load`.
|
|
1400
|
+
* Type "automatic" will enable infinite scrolling
|
|
1401
|
+
* Type "button" will enable lazy loading with "Show more" button
|
|
1402
|
+
*/
|
|
1403
|
+
lazyLoadType: {
|
|
1404
|
+
type: String,
|
|
1405
|
+
default: ne.NONE,
|
|
1406
|
+
validator: (e) => Object.values(ne).includes(e)
|
|
1407
|
+
},
|
|
1408
|
+
/**
|
|
1409
|
+
* Indicates the listbox is loading filtered items.
|
|
1410
|
+
*/
|
|
1411
|
+
componentLoading: { type: Boolean, default: !1 },
|
|
1412
|
+
/**
|
|
1413
|
+
* If enabled, the user will be able to select multiple items.
|
|
1414
|
+
*/
|
|
1415
|
+
multiple: { type: Boolean, default: !1 },
|
|
1416
|
+
/**
|
|
1417
|
+
* If enabled, dropdown will display non-selectable, static categories
|
|
1418
|
+
*/
|
|
1419
|
+
staticCategories: { type: Boolean, default: !1 },
|
|
1420
|
+
/**
|
|
1421
|
+
* Messaged displayed when no items are listed in the listbox
|
|
1422
|
+
*/
|
|
1423
|
+
noResultsMessage: { type: String, required: !0 },
|
|
1424
|
+
/**
|
|
1425
|
+
* Flag that indicates that an external search it's being made
|
|
1426
|
+
* to filter out the items inside the the multi-select listbox
|
|
1427
|
+
*
|
|
1428
|
+
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1429
|
+
*/
|
|
1430
|
+
searching: xe.props.searching,
|
|
1431
|
+
/**
|
|
1432
|
+
* The `input` value.
|
|
1433
|
+
* Providing an empty string or empty array will select no options.
|
|
1434
|
+
* Set to an empty string `''` if you don't want any of the available options to be selected for single select
|
|
1435
|
+
*/
|
|
1436
|
+
selectedValue: {
|
|
1437
|
+
type: Array,
|
|
1438
|
+
default: () => []
|
|
1439
|
+
},
|
|
1440
|
+
/**
|
|
1441
|
+
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
1442
|
+
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
1443
|
+
*/
|
|
1444
|
+
virtualScroll: {
|
|
1445
|
+
type: [Boolean, Object],
|
|
1446
|
+
default: !1
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
emits: [
|
|
1450
|
+
g.SELECT,
|
|
1451
|
+
g.SPACE,
|
|
1452
|
+
g.SHOW_MORE,
|
|
1453
|
+
g.ENTER,
|
|
1454
|
+
g.ESCAPE,
|
|
1455
|
+
g.TAB
|
|
1456
|
+
],
|
|
1457
|
+
setup(e, { emit: t, slots: i }) {
|
|
1458
|
+
const s = L([]), n = fe(e, "items"), { t: o } = Ie({ messages: Ye }), a = v(() => e.lazyLoadType !== ne.AUTOMATIC), p = v(() => e.lazyLoadType === ne.AUTOMATIC), y = () => {
|
|
1459
|
+
var w;
|
|
1460
|
+
return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((w = e == null ? void 0 : e.virtualScroll) != null && w.itemHeight) ? e.virtualScroll.itemHeight : vs;
|
|
1461
|
+
}, {
|
|
1462
|
+
containerRef: r,
|
|
1463
|
+
containerProps: u,
|
|
1464
|
+
onScroll: l,
|
|
1465
|
+
list: f,
|
|
1466
|
+
wrapperProps: O
|
|
1467
|
+
} = _t(n, {
|
|
1468
|
+
itemHeight: y(),
|
|
1469
|
+
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1470
|
+
disabled: (e == null ? void 0 : e.multiple) || (e == null ? void 0 : e.virtualScroll) === !1 || (e == null ? void 0 : e.lazyLoadType) !== "none"
|
|
1471
|
+
}), T = v(
|
|
1472
|
+
() => e.componentLoading !== void 0 || a.value ? "true" : void 0
|
|
1473
|
+
), D = v(
|
|
1474
|
+
() => a.value && e.loading || e.componentLoading ? "true" : "false"
|
|
1475
|
+
), P = v(
|
|
1476
|
+
() => a.value || e.componentLoading !== void 0 ? "polite" : void 0
|
|
1477
|
+
), B = v(
|
|
1478
|
+
() => ({
|
|
1479
|
+
"aria-label": e.ariaLabel,
|
|
1480
|
+
"aria-busy": D.value,
|
|
1481
|
+
"aria-atomic": T.value,
|
|
1482
|
+
"aria-live": P.value
|
|
1483
|
+
})
|
|
1484
|
+
), R = v(
|
|
1485
|
+
() => e.componentLoading ? {
|
|
1486
|
+
...B.value,
|
|
1487
|
+
role: "alert"
|
|
1488
|
+
} : {}
|
|
1489
|
+
), I = (w) => (ie) => {
|
|
1490
|
+
t(w, ie);
|
|
1491
|
+
}, S = () => {
|
|
1492
|
+
t(g.SHOW_MORE);
|
|
1493
|
+
}, _ = gt(() => {
|
|
1494
|
+
const w = r.value;
|
|
1495
|
+
if (!w)
|
|
1496
|
+
return;
|
|
1497
|
+
const ie = Math.round(w.scrollTop) + w.clientHeight >= w.scrollHeight;
|
|
1498
|
+
e.hasMoreItems && ie && !e.loading && S();
|
|
1499
|
+
}), Y = () => {
|
|
1500
|
+
p.value ? _() : l();
|
|
1501
|
+
}, Q = v(() => {
|
|
1502
|
+
var w;
|
|
1503
|
+
return ((w = e.items) == null ? void 0 : w.length) === 0;
|
|
1504
|
+
}), N = v(
|
|
1505
|
+
() => e.lazyLoadType === ne.BUTTON && e.hasMoreItems
|
|
1506
|
+
), z = v(
|
|
1507
|
+
() => e.loading ? Me.LOADING : Me.START
|
|
1508
|
+
), W = v(() => e.loading ? o("loading") : o("showMore")), oe = v(() => ({
|
|
1509
|
+
...e.emptyState,
|
|
1510
|
+
variant: "condensed"
|
|
1511
|
+
})), Oe = {
|
|
1512
|
+
[g.SELECT]: I(g.SELECT),
|
|
1513
|
+
[g.SPACE]: I(g.SPACE),
|
|
1514
|
+
[g.TAB]: I(g.TAB),
|
|
1515
|
+
[g.ENTER]: I(g.ENTER)
|
|
1516
|
+
};
|
|
1517
|
+
return {
|
|
1518
|
+
// Refs
|
|
1519
|
+
listboxRef: r,
|
|
1520
|
+
listboxItemRef: s,
|
|
1521
|
+
// a11y
|
|
1522
|
+
ariaAttributes: B,
|
|
1523
|
+
listboxContainerAttributes: R,
|
|
1524
|
+
// Values
|
|
1525
|
+
containerProps: u,
|
|
1526
|
+
isSearchResultEmpty: Q,
|
|
1527
|
+
limitedEmptyStateProps: oe,
|
|
1528
|
+
loadingButtonState: z,
|
|
1529
|
+
slots: i,
|
|
1530
|
+
shouldDisplayShowMoreButton: N,
|
|
1531
|
+
showMoreButtonText: W,
|
|
1532
|
+
virtualisedItems: f,
|
|
1533
|
+
wrapperProps: O,
|
|
1534
|
+
// Enums
|
|
1535
|
+
BentoKeyboardNavigationKeyDownEvent: F,
|
|
1536
|
+
BentoListboxEvent: g,
|
|
1537
|
+
// Methods
|
|
1538
|
+
onListboxContainerScroll: Y,
|
|
1539
|
+
onOptionSelected: I,
|
|
1540
|
+
emitShowMore: S,
|
|
1541
|
+
listboxListeners: Oe
|
|
1542
|
+
};
|
|
1543
|
+
}
|
|
1544
|
+
}), ps = ["id"], gs = {
|
|
1545
|
+
key: 0,
|
|
1546
|
+
class: "b-listbox__loading-filtered-items"
|
|
1547
|
+
}, ys = {
|
|
1548
|
+
key: 1,
|
|
1549
|
+
class: "b-listbox__empty-search-message"
|
|
1550
|
+
}, Ss = {
|
|
1551
|
+
key: 2,
|
|
1552
|
+
class: "b-listbox__lazy-load"
|
|
1553
|
+
}, hs = {
|
|
1554
|
+
key: 3,
|
|
1555
|
+
class: "b-listbox__lazy-load"
|
|
1556
|
+
};
|
|
1557
|
+
function Cs(e, t, i, s, n, o) {
|
|
1558
|
+
var O;
|
|
1559
|
+
const a = A("bento-loading-indicator"), p = A("bento-empty-state"), y = A("bento-typography"), r = A("bento-listbox-multi-select"), u = A("bento-listbox-single-select"), l = A("bento-loading-button"), f = Ve("bento-keyboard-navigation-directive");
|
|
1560
|
+
return ce((m(), E("div", x({
|
|
1561
|
+
id: e.id,
|
|
1562
|
+
ref: "listboxRef",
|
|
1563
|
+
class: "b-listbox",
|
|
1564
|
+
tabindex: "-1"
|
|
1565
|
+
}, e.listboxContainerAttributes, {
|
|
1566
|
+
style: (O = e.containerProps) == null ? void 0 : O.style,
|
|
1567
|
+
"data-testid": "listbox-container",
|
|
1568
|
+
onScroll: t[0] || (t[0] = (...T) => e.onListboxContainerScroll && e.onListboxContainerScroll(...T))
|
|
1569
|
+
}), [
|
|
1570
|
+
U("div", ae(ve(e.wrapperProps)), [
|
|
1571
|
+
e.componentLoading ? (m(), E("div", gs, [
|
|
1572
|
+
G(a)
|
|
1573
|
+
])) : e.isSearchResultEmpty ? (m(), E("div", ys, [
|
|
1574
|
+
e.emptyState ? (m(), $(p, ae(x({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (m(), $(y, {
|
|
1575
|
+
key: 1,
|
|
1576
|
+
el: "span"
|
|
1577
|
+
}, {
|
|
1578
|
+
default: k(() => [
|
|
1579
|
+
K(V(e.noResultsMessage), 1)
|
|
1580
|
+
]),
|
|
1581
|
+
_: 1
|
|
1582
|
+
}))
|
|
1583
|
+
])) : (m(), E(le, { key: 2 }, [
|
|
1584
|
+
e.multiple ? (m(), $(r, x({
|
|
1585
|
+
key: 0,
|
|
1586
|
+
ref: "listboxItemRef",
|
|
1587
|
+
"has-more-items": e.hasMoreItems
|
|
1588
|
+
}, e.ariaAttributes, {
|
|
1589
|
+
items: e.items,
|
|
1590
|
+
"lazy-load-type": e.lazyLoadType,
|
|
1591
|
+
"static-categories": e.staticCategories,
|
|
1592
|
+
"selected-values": e.selectedValue,
|
|
1593
|
+
searching: e.searching,
|
|
1594
|
+
"is-option-disabled": e.isOptionDisabled
|
|
1595
|
+
}, se(e.listboxListeners)), pe({ _: 2 }, [
|
|
1596
|
+
H(e.slots, (T, D) => ({
|
|
1597
|
+
name: D,
|
|
1598
|
+
fn: k((P) => [
|
|
1599
|
+
j(e.$slots, D, ae(ve(P)), void 0, !0)
|
|
1600
|
+
])
|
|
1601
|
+
}))
|
|
1602
|
+
]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (m(), $(u, x({
|
|
1603
|
+
key: 1,
|
|
1604
|
+
ref: "listboxItemRef",
|
|
1605
|
+
items: e.virtualisedItems
|
|
1606
|
+
}, e.ariaAttributes, {
|
|
1607
|
+
"selected-value": e.selectedValue,
|
|
1608
|
+
"static-categories": e.staticCategories,
|
|
1609
|
+
"is-option-disabled": e.isOptionDisabled
|
|
1610
|
+
}, se(e.listboxListeners)), pe({ _: 2 }, [
|
|
1611
|
+
H(e.slots, (T, D) => ({
|
|
1612
|
+
name: D,
|
|
1613
|
+
fn: k((P) => [
|
|
1614
|
+
j(e.$slots, D, ae(ve(P)), void 0, !0)
|
|
1615
|
+
])
|
|
1616
|
+
}))
|
|
1617
|
+
]), 1040, ["items", "selected-value", "static-categories", "is-option-disabled"])),
|
|
1618
|
+
e.shouldDisplayShowMoreButton ? (m(), E("div", Ss, [
|
|
1619
|
+
G(l, {
|
|
1620
|
+
state: e.loadingButtonState,
|
|
1621
|
+
variant: "secondary",
|
|
1622
|
+
onClickCapture: e.emitShowMore
|
|
1623
|
+
}, {
|
|
1624
|
+
default: k(() => [
|
|
1625
|
+
K(V(e.showMoreButtonText), 1)
|
|
1626
|
+
]),
|
|
1627
|
+
_: 1
|
|
1628
|
+
}, 8, ["state", "onClickCapture"])
|
|
1629
|
+
])) : e.loading ? (m(), E("div", hs, [
|
|
1630
|
+
G(a)
|
|
1631
|
+
])) : X("", !0)
|
|
1632
|
+
], 64))
|
|
1633
|
+
], 16)
|
|
1634
|
+
], 16, ps)), [
|
|
1635
|
+
[f]
|
|
1636
|
+
]);
|
|
1637
|
+
}
|
|
1638
|
+
const Ys = /* @__PURE__ */ q(fs, [["render", Cs], ["__scopeId", "data-v-ef1c27fa"]]), _e = (e, t) => {
|
|
1639
|
+
for (const i of e) {
|
|
1640
|
+
if (i.value === t)
|
|
1641
|
+
return i;
|
|
1642
|
+
if (i.items) {
|
|
1643
|
+
const s = _e(i.items, t);
|
|
1644
|
+
if (s)
|
|
1645
|
+
return s;
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
return null;
|
|
1649
|
+
}, Es = (e) => typeof e == "object" && e !== null && "value" in e && "label" in e, Us = (e, t, i, s) => {
|
|
1650
|
+
const n = L([]), o = L(), a = (u) => {
|
|
1651
|
+
i.value ? o.value = u.map(({ value: l }) => l) : o.value = u.length > 0 ? u[0].value : null;
|
|
1652
|
+
}, p = (u) => {
|
|
1653
|
+
i.value ? o.value = u.map(({ value: l, label: f }) => ({ value: l, label: f })) : o.value = u.length > 0 ? { value: u[0].value, label: u[0].label } : null;
|
|
1654
|
+
}, y = (u) => {
|
|
1655
|
+
n.value = u, s != null && s.value ? p(u) : a(u);
|
|
1656
|
+
}, r = () => {
|
|
1657
|
+
n.value = [], o.value = null;
|
|
1658
|
+
};
|
|
1659
|
+
return ye(
|
|
1660
|
+
() => t.value,
|
|
1661
|
+
() => {
|
|
1662
|
+
if (!t.value && t.value !== 0) {
|
|
1663
|
+
r();
|
|
1664
|
+
return;
|
|
1665
|
+
}
|
|
1666
|
+
const u = !Array.isArray(t.value), l = [...n.value];
|
|
1667
|
+
r();
|
|
1668
|
+
const f = (O) => {
|
|
1669
|
+
if (Es(O))
|
|
1670
|
+
n.value.push(O);
|
|
1671
|
+
else {
|
|
1672
|
+
let T = _e(e.value, O);
|
|
1673
|
+
T || (T = _e(l, O)), T || (T = { value: O, label: O.toString() }), n.value.push(T);
|
|
1674
|
+
}
|
|
1675
|
+
};
|
|
1676
|
+
if (u) {
|
|
1677
|
+
const O = t.value;
|
|
1678
|
+
f(O), s != null && s.value ? p(n.value) : a(n.value);
|
|
1679
|
+
return;
|
|
1680
|
+
}
|
|
1681
|
+
t.value.forEach(f), s != null && s.value ? p(n.value) : a(n.value);
|
|
1682
|
+
},
|
|
1683
|
+
{ immediate: !0 }
|
|
1684
|
+
), {
|
|
1685
|
+
// Values
|
|
1686
|
+
cachedSelectedListboxOptions: n,
|
|
1687
|
+
cachedListboxSelectedValues: o,
|
|
1688
|
+
// Methods
|
|
1689
|
+
resetCache: r,
|
|
1690
|
+
setCachedValues: y
|
|
1691
|
+
};
|
|
1692
|
+
};
|
|
1693
|
+
export {
|
|
1694
|
+
ne as B,
|
|
1695
|
+
ke as D,
|
|
1696
|
+
g as a,
|
|
1697
|
+
Ys as b,
|
|
1698
|
+
Us as c,
|
|
1699
|
+
We as d,
|
|
1700
|
+
rs as u
|
|
1701
|
+
};
|
|
1702
|
+
//# sourceMappingURL=use-cached-selected-values.DimYI3lv.js.map
|