@adyen/bento-vue2 1.68.2 → 1.69.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 +1 -0
- package/dist/@types/index.d.ts +625 -1274
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-button.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions-with-menu.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox-group.css +1 -1
- package/dist/assets/checkbox-input.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/chip.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/country.css +1 -1
- package/dist/assets/currency.css +1 -1
- package/dist/assets/dashed-underline.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/divider.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown-tag.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/empty-state.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/focus-trap.css +1 -1
- package/dist/assets/footer-actions.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/grid-layout.css +1 -1
- package/dist/assets/header-meta.css +1 -1
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/info-icon.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field-phone-number.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/layout-row.css +1 -1
- package/dist/assets/link.css +1 -1
- package/dist/assets/listbox-option-tag.css +1 -1
- package/dist/assets/loading-indicator.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/payment-method.css +1 -1
- package/dist/assets/popper-container.css +1 -1
- package/dist/assets/promo-banner.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/rich-text-editor.css +1 -1
- package/dist/assets/search-bar.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/segmented-control.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/status.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/structured-list-item.css +1 -1
- package/dist/assets/tab.css +1 -1
- package/dist/assets/tag.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/assets/toast.css +1 -1
- package/dist/assets/toggle-button.css +1 -1
- package/dist/assets/toggle.css +1 -1
- package/dist/assets/tooltip.css +1 -1
- package/dist/assets/tutorial.css +1 -1
- package/dist/assets/typography.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +9 -9
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/{accordion-item.BNtdoVto.js → accordion-item.NSQ50RyR.js} +3 -3
- package/dist/chunks/accordion-item.NSQ50RyR.js.map +1 -0
- package/dist/chunks/{action-bar.DQb7WVVd.js → action-bar.Dhi6k0CP.js} +18 -19
- package/dist/chunks/action-bar.Dhi6k0CP.js.map +1 -0
- package/dist/chunks/{alert.c1rhDDrU.js → alert.Dx9P_L2k.js} +3 -3
- package/dist/chunks/{alert.c1rhDDrU.js.map → alert.Dx9P_L2k.js.map} +1 -1
- package/dist/chunks/aria-label.CaUURpnB.js.map +1 -1
- package/dist/chunks/{avatar.BgwjpLQO.js → avatar.CWmZ2n1W.js} +2 -2
- package/dist/chunks/avatar.CWmZ2n1W.js.map +1 -0
- package/dist/chunks/{base-button.-gx_u8Bd.js → base-button.BPZ_qSAu.js} +6 -6
- package/dist/chunks/base-button.BPZ_qSAu.js.map +1 -0
- package/dist/chunks/{base-modal.CkkfT6r6.js → base-modal.Cehud1uW.js} +19 -19
- package/dist/chunks/base-modal.Cehud1uW.js.map +1 -0
- package/dist/chunks/button-actions-with-menu.DIpUg6BF.js +85 -0
- package/dist/chunks/button-actions-with-menu.DIpUg6BF.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.hF-nD1Og.js → button.B0hSQWOR.js} +4 -4
- package/dist/chunks/button.B0hSQWOR.js.map +1 -0
- package/dist/chunks/{calendar.DvIQEYwN.js → calendar.BuAVH2aU.js} +8 -8
- package/dist/chunks/calendar.BuAVH2aU.js.map +1 -0
- package/dist/chunks/{card.CASAAsuJ.js → card.DLRC9V0Q.js} +20 -19
- package/dist/chunks/card.DLRC9V0Q.js.map +1 -0
- package/dist/chunks/{checkbox-group.QdX-NrSG.js → checkbox-group.Cdt2Ik2_.js} +6 -6
- package/dist/chunks/checkbox-group.Cdt2Ik2_.js.map +1 -0
- package/dist/chunks/{checkbox-input.CNWigbX4.js → checkbox-input.C9vmlMZe.js} +7 -7
- package/dist/chunks/checkbox-input.C9vmlMZe.js.map +1 -0
- package/dist/chunks/{checkbox.DCD6SSXC.js → checkbox.JhfbjDfJ.js} +6 -6
- package/dist/chunks/checkbox.JhfbjDfJ.js.map +1 -0
- package/dist/chunks/{chip.OV0EWIP3.js → chip.Cn68PNxA.js} +10 -10
- package/dist/chunks/chip.Cn68PNxA.js.map +1 -0
- package/dist/chunks/{code-snippet.dIKi0D7d.js → code-snippet.hYghglvk.js} +8 -8
- package/dist/chunks/code-snippet.hYghglvk.js.map +1 -0
- package/dist/chunks/{controls-group.CccuLkgP.js → controls-group.B1cxRdIA.js} +3 -3
- package/dist/chunks/{controls-group.CccuLkgP.js.map → controls-group.B1cxRdIA.js.map} +1 -1
- package/dist/chunks/{copy.CF8Fzu2Y.js → copy.UbMV4m6b.js} +14 -14
- package/dist/chunks/copy.UbMV4m6b.js.map +1 -0
- package/dist/chunks/{country.melpzEsY.js → country.CZQYhKpE.js} +6 -6
- package/dist/chunks/country.CZQYhKpE.js.map +1 -0
- package/dist/chunks/country.types.C0Q_hhgJ.js.map +1 -1
- package/dist/chunks/{currency.BM9OXTqe.js → currency.Oq7zcRM5.js} +3 -3
- package/dist/chunks/currency.Oq7zcRM5.js.map +1 -0
- package/dist/chunks/{dashboard-section.BIe6eVHq.js → dashboard-section.BRnRO3AZ.js} +4 -4
- package/dist/chunks/{dashboard-section.BIe6eVHq.js.map → dashboard-section.BRnRO3AZ.js.map} +1 -1
- package/dist/chunks/{dashed-underline.BbH6Lnd2.js → dashed-underline.BN_whJrR.js} +12 -13
- package/dist/chunks/dashed-underline.BN_whJrR.js.map +1 -0
- package/dist/chunks/{data-grid-template.Co0Ecr79.js → data-grid-template.BlRKgkX6.js} +5 -5
- package/dist/chunks/data-grid-template.BlRKgkX6.js.map +1 -0
- package/dist/chunks/{data-grid.erxjh5TN.js → data-grid.B0bOXr4p.js} +1218 -1166
- package/dist/chunks/data-grid.B0bOXr4p.js.map +1 -0
- package/dist/chunks/{date-picker.DGIS6Pp-.js → date-picker.Dyf6HJwP.js} +11 -11
- package/dist/chunks/date-picker.Dyf6HJwP.js.map +1 -0
- package/dist/chunks/date-range-picker.-FSh7RLm.js +967 -0
- package/dist/chunks/date-range-picker.-FSh7RLm.js.map +1 -0
- package/dist/chunks/{date.BfyWX2PY.js → date.w2Ya6_lp.js} +2 -2
- package/dist/chunks/{date.BfyWX2PY.js.map → date.w2Ya6_lp.js.map} +1 -1
- package/dist/chunks/{dialog-page.CLHZqQeU.js → dialog-page.CdJloGXQ.js} +9 -9
- package/dist/chunks/dialog-page.CdJloGXQ.js.map +1 -0
- package/dist/chunks/{divider.Cc4JFWG_.js → divider.CFbtmKeQ.js} +6 -6
- package/dist/chunks/divider.CFbtmKeQ.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.94q6opSD.js → dropdown-default-textbox.DzpZoK-P.js} +81 -80
- package/dist/chunks/dropdown-default-textbox.DzpZoK-P.js.map +1 -0
- package/dist/chunks/dropdown-tag.CRbOHBPK.js +273 -0
- package/dist/chunks/dropdown-tag.CRbOHBPK.js.map +1 -0
- package/dist/chunks/{dropdown.DazYAy4B.js → dropdown.DB_MlO1F.js} +43 -43
- package/dist/chunks/dropdown.DB_MlO1F.js.map +1 -0
- package/dist/chunks/{empty-state.mtXfb1BB.js → empty-state.BqMgiQAu.js} +6 -6
- package/dist/chunks/empty-state.BqMgiQAu.js.map +1 -0
- package/dist/chunks/{error-message.BgxnwPLF.js → error-message.PWgUfpvo.js} +3 -3
- package/dist/chunks/{error-message.BgxnwPLF.js.map → error-message.PWgUfpvo.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js +12 -0
- package/dist/chunks/es6.MoTTyETW.js.map +1 -0
- package/dist/chunks/events.CMzGybJJ.js.map +1 -1
- package/dist/chunks/{file-uploader.BPslxGI8.js → file-uploader.llBOTc1s.js} +41 -41
- package/dist/chunks/file-uploader.llBOTc1s.js.map +1 -0
- package/dist/chunks/{filter-bar.DL19SXF1.js → filter-bar.8rNB7K2X.js} +189 -192
- package/dist/chunks/filter-bar.8rNB7K2X.js.map +1 -0
- package/dist/chunks/{fixed-scroller.XN-jvWqb.js → fixed-scroller.CRnBrXfk.js} +2 -2
- package/dist/chunks/{fixed-scroller.XN-jvWqb.js.map → fixed-scroller.CRnBrXfk.js.map} +1 -1
- package/dist/chunks/{focus-trap.C-wIQqpO.js → focus-trap.B4C5TXxl.js} +2 -2
- package/dist/chunks/focus-trap.B4C5TXxl.js.map +1 -0
- package/dist/chunks/{footer-actions.BE_zzX-e.js → footer-actions.C9ZYDWNU.js} +12 -12
- package/dist/chunks/footer-actions.C9ZYDWNU.js.map +1 -0
- package/dist/chunks/{form-layout-title.CIynHgCF.js → form-layout-title.CboZDCN9.js} +5 -5
- package/dist/chunks/form-layout-title.CboZDCN9.js.map +1 -0
- package/dist/chunks/{grid-layout.HvTAa4to.js → grid-layout.1aIiz2N_.js} +4 -4
- package/dist/chunks/grid-layout.1aIiz2N_.js.map +1 -0
- package/dist/chunks/{header-meta.CfloYa86.js → header-meta.C75OXHwb.js} +26 -27
- package/dist/chunks/{header-meta.CfloYa86.js.map → header-meta.C75OXHwb.js.map} +1 -1
- package/dist/chunks/{header-with-views.BUQ-MlAq.js → header-with-views.Dzifal09.js} +129 -133
- package/dist/chunks/header-with-views.Dzifal09.js.map +1 -0
- package/dist/chunks/{header.uyxNdQa3.js → header.DAcRpRch.js} +8 -8
- package/dist/chunks/header.DAcRpRch.js.map +1 -0
- package/dist/chunks/image.C2D2hKat.js.map +1 -1
- package/dist/chunks/{info-icon.CYOXx8CL.js → info-icon.B4P_Zi58.js} +10 -10
- package/dist/chunks/info-icon.B4P_Zi58.js.map +1 -0
- package/dist/chunks/{input-field-password.C1zTapiN.js → input-field-password.DsslmTb_.js} +29 -29
- package/dist/chunks/input-field-password.DsslmTb_.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.K8BYjWfa.js → input-field-phone-number.D2T8jzAr.js} +8 -7
- package/dist/chunks/{input-field-phone-number.K8BYjWfa.js.map → input-field-phone-number.D2T8jzAr.js.map} +1 -1
- package/dist/chunks/{input-field.5S-pUNxA.js → input-field.DnnXXill.js} +5 -5
- package/dist/chunks/input-field.DnnXXill.js.map +1 -0
- package/dist/chunks/{inspector.BI28vKQz.js → inspector.H05UI3LY.js} +6 -6
- package/dist/chunks/inspector.H05UI3LY.js.map +1 -0
- package/dist/chunks/keyboard-navigation.pB8weElW.js.map +1 -1
- package/dist/chunks/{layout-row.C_F2wX6d.js → layout-row.BWxn-eQ-.js} +12 -12
- package/dist/chunks/layout-row.BWxn-eQ-.js.map +1 -0
- package/dist/chunks/{link.CXy_LoFI.js → link.B3F22FTY.js} +3 -3
- package/dist/chunks/link.B3F22FTY.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.D0Cql_R3.js → listbox-option-tag.On3eD2RE.js} +4 -4
- package/dist/chunks/listbox-option-tag.On3eD2RE.js.map +1 -0
- package/dist/chunks/{loading-indicator.z8COalOc.js → loading-indicator.Iy1CVr_T.js} +2 -2
- package/dist/chunks/loading-indicator.Iy1CVr_T.js.map +1 -0
- package/dist/chunks/minus-small.DJacLGTw.js.map +1 -1
- package/dist/chunks/{modal-fullscreen.DHotw1RI.js → modal-fullscreen.BgmKDCl4.js} +31 -32
- package/dist/chunks/modal-fullscreen.BgmKDCl4.js.map +1 -0
- package/dist/chunks/{modal.eoNQ6E3U.js → modal.DMqbIDcX.js} +6 -6
- package/dist/chunks/modal.DMqbIDcX.js.map +1 -0
- package/dist/chunks/{pagination.4J7ZMyf5.js → pagination.38ahUAk8.js} +5 -5
- package/dist/chunks/pagination.38ahUAk8.js.map +1 -0
- package/dist/chunks/{payment-method.Cx4nPDtE.js → payment-method.CRluCp_L.js} +3 -3
- package/dist/chunks/payment-method.CRluCp_L.js.map +1 -0
- package/dist/chunks/popover.types.B1HUQoCG.js +6 -0
- package/dist/chunks/popover.types.B1HUQoCG.js.map +1 -0
- package/dist/chunks/{popper-container.DIFqmRsp.js → popper-container.Bu75g2nc.js} +3 -3
- package/dist/chunks/popper-container.Bu75g2nc.js.map +1 -0
- package/dist/chunks/{promo-banner.Bbc2U3S3.js → promo-banner.BGMV3nRn.js} +6 -6
- package/dist/chunks/promo-banner.BGMV3nRn.js.map +1 -0
- package/dist/chunks/{radio-group.4_KKjvAm.js → radio-group.BVLoYrgU.js} +8 -8
- package/dist/chunks/radio-group.BVLoYrgU.js.map +1 -0
- package/dist/chunks/{radio-input.uJAhxKRs.js → radio-input.BRceOAA4.js} +7 -7
- package/dist/chunks/radio-input.BRceOAA4.js.map +1 -0
- package/dist/chunks/{rich-text-editor.BUKLdRkN.js → rich-text-editor.BZ6CyBsK.js} +8 -8
- package/dist/chunks/rich-text-editor.BZ6CyBsK.js.map +1 -0
- package/dist/chunks/{search-bar.CuBj5FAE.js → search-bar.VfZoy5FX.js} +6 -5
- package/dist/chunks/search-bar.VfZoy5FX.js.map +1 -0
- package/dist/chunks/{secondary-nav.C6usurfD.js → secondary-nav.BXXKo5HE.js} +9 -9
- package/dist/chunks/secondary-nav.BXXKo5HE.js.map +1 -0
- package/dist/chunks/{segmented-control.DHZEfmT-.js → segmented-control.CGBrRBLL.js} +11 -11
- package/dist/chunks/segmented-control.CGBrRBLL.js.map +1 -0
- package/dist/chunks/{selection-card-group.0o5T4tab.js → selection-card-group.DgQLQ4Wo.js} +10 -10
- package/dist/chunks/selection-card-group.DgQLQ4Wo.js.map +1 -0
- package/dist/chunks/{sidepanel.DyThBUgV.js → sidepanel.BR0coAJl.js} +9 -9
- package/dist/chunks/sidepanel.BR0coAJl.js.map +1 -0
- package/dist/chunks/{status.types.p_TCvoo0.js → status.types.DBYsEsiT.js} +3 -3
- package/dist/chunks/status.types.DBYsEsiT.js.map +1 -0
- package/dist/chunks/{step.DMMofD4B.js → step.DJkLl2s4.js} +5 -5
- package/dist/chunks/step.DJkLl2s4.js.map +1 -0
- package/dist/chunks/{structured-list-item.Bnn6-Z3q.js → structured-list-item.CACpjdy4.js} +7 -7
- package/dist/chunks/structured-list-item.CACpjdy4.js.map +1 -0
- package/dist/chunks/{summary-grid.types.D_FU3sUq.js → summary-grid.types.CVuvqM3p.js} +7 -7
- package/dist/chunks/{summary-grid.types.D_FU3sUq.js.map → summary-grid.types.CVuvqM3p.js.map} +1 -1
- package/dist/chunks/{tab.BhWPBxcB.js → tab.D33__imf.js} +5 -5
- package/dist/chunks/tab.D33__imf.js.map +1 -0
- package/dist/chunks/{tag.CGkclKVL.js → tag.DfHE26ZN.js} +4 -4
- package/dist/chunks/tag.DfHE26ZN.js.map +1 -0
- package/dist/chunks/textarea.D7uQzuRr.js +214 -0
- package/dist/chunks/textarea.D7uQzuRr.js.map +1 -0
- package/dist/chunks/{timeline-item.DqLhj0Lb.js → timeline-item.QOBiWKEL.js} +11 -11
- package/dist/chunks/timeline-item.QOBiWKEL.js.map +1 -0
- package/dist/chunks/{toast.BOyeuS19.js → toast.CZxRRsPl.js} +5 -5
- package/dist/chunks/toast.CZxRRsPl.js.map +1 -0
- package/dist/chunks/toggle-button.DeECoGRn.js +1031 -0
- package/dist/chunks/toggle-button.DeECoGRn.js.map +1 -0
- package/dist/chunks/{toggle.DyXL09-x.js → toggle.hylSNOmz.js} +8 -8
- package/dist/chunks/toggle.hylSNOmz.js.map +1 -0
- package/dist/chunks/{tooltip.wQsyAwkC.js → tooltip.BYj8cc9F.js} +66 -62
- package/dist/chunks/tooltip.BYj8cc9F.js.map +1 -0
- package/dist/chunks/{tutorial.CxrGhLS7.js → tutorial.BkAXmyzV.js} +29 -31
- package/dist/chunks/tutorial.BkAXmyzV.js.map +1 -0
- package/dist/chunks/{typography.J1v_SPG3.js → typography.w3m-EY4E.js} +7 -7
- package/dist/chunks/typography.w3m-EY4E.js.map +1 -0
- package/dist/chunks/{use-bento-toast-controller.Cn_2Eogn.js → use-bento-toast-controller.uglKlMjv.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.Cn_2Eogn.js.map → use-bento-toast-controller.uglKlMjv.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.0EeyFfyF.js → use-cached-selected-values.CI9xi8dE.js} +12 -12
- package/dist/chunks/use-cached-selected-values.CI9xi8dE.js.map +1 -0
- package/dist/chunks/use-country-items.BllTb5MK.js.map +1 -1
- package/dist/chunks/use-country-phon-code.BOaJ9PDl.js.map +1 -1
- package/dist/chunks/use-has-slot.C9lQZ6nz.js.map +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +175 -177
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +3 -2
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +33 -32
- package/dist/internal.js.map +1 -1
- package/dist/layout.js +1 -1
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +2 -2
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +2 -2
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/status.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +17 -4
- package/dist/styles/bento-light.css +17 -4
- package/dist/styles/bento.css +17 -4
- package/dist/styles/legacy.css +17 -4
- package/dist/styles/styleguide.css +17 -4
- package/dist/styles/utility.css +3 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/typography.js +1 -1
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +934 -363
- package/package.json +7 -7
- package/dist/assets/button-actions.css +0 -1
- package/dist/assets/menu.css +0 -1
- package/dist/assets/popover.css +0 -1
- package/dist/assets/teleport.css +0 -1
- package/dist/chunks/accordion-item.BNtdoVto.js.map +0 -1
- package/dist/chunks/action-bar.DQb7WVVd.js.map +0 -1
- package/dist/chunks/avatar.BgwjpLQO.js.map +0 -1
- package/dist/chunks/base-button.-gx_u8Bd.js.map +0 -1
- package/dist/chunks/base-modal.CkkfT6r6.js.map +0 -1
- package/dist/chunks/base-modal.keys.C2PQXcE2.js +0 -5
- package/dist/chunks/base-modal.keys.C2PQXcE2.js.map +0 -1
- package/dist/chunks/button-actions-with-menu.nPj7sdGE.js +0 -83
- package/dist/chunks/button-actions-with-menu.nPj7sdGE.js.map +0 -1
- package/dist/chunks/button-actions.Ju27CRNG.js +0 -194
- package/dist/chunks/button-actions.Ju27CRNG.js.map +0 -1
- package/dist/chunks/button.hF-nD1Og.js.map +0 -1
- package/dist/chunks/calendar.DvIQEYwN.js.map +0 -1
- package/dist/chunks/card.CASAAsuJ.js.map +0 -1
- package/dist/chunks/checkbox-group.QdX-NrSG.js.map +0 -1
- package/dist/chunks/checkbox-input.CNWigbX4.js.map +0 -1
- package/dist/chunks/checkbox.DCD6SSXC.js.map +0 -1
- package/dist/chunks/chip.OV0EWIP3.js.map +0 -1
- package/dist/chunks/code-snippet.dIKi0D7d.js.map +0 -1
- package/dist/chunks/copy.CF8Fzu2Y.js.map +0 -1
- package/dist/chunks/country.melpzEsY.js.map +0 -1
- package/dist/chunks/currency.BM9OXTqe.js.map +0 -1
- package/dist/chunks/dashed-underline.BbH6Lnd2.js.map +0 -1
- package/dist/chunks/data-grid-template.Co0Ecr79.js.map +0 -1
- package/dist/chunks/data-grid.erxjh5TN.js.map +0 -1
- package/dist/chunks/date-picker.DGIS6Pp-.js.map +0 -1
- package/dist/chunks/date-range-picker.CIaKRXIQ.js +0 -1021
- package/dist/chunks/date-range-picker.CIaKRXIQ.js.map +0 -1
- package/dist/chunks/dialog-page.CLHZqQeU.js.map +0 -1
- package/dist/chunks/divider.Cc4JFWG_.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.94q6opSD.js.map +0 -1
- package/dist/chunks/dropdown-tag.BaosvGGZ.js +0 -240
- package/dist/chunks/dropdown-tag.BaosvGGZ.js.map +0 -1
- package/dist/chunks/dropdown.DazYAy4B.js.map +0 -1
- package/dist/chunks/empty-state.mtXfb1BB.js.map +0 -1
- package/dist/chunks/es6.n1ewaW31.js +0 -11
- package/dist/chunks/es6.n1ewaW31.js.map +0 -1
- package/dist/chunks/file-uploader.BPslxGI8.js.map +0 -1
- package/dist/chunks/filter-bar.DL19SXF1.js.map +0 -1
- package/dist/chunks/focus-trap.C-wIQqpO.js.map +0 -1
- package/dist/chunks/footer-actions.BE_zzX-e.js.map +0 -1
- package/dist/chunks/form-layout-title.CIynHgCF.js.map +0 -1
- package/dist/chunks/grid-layout.HvTAa4to.js.map +0 -1
- package/dist/chunks/header-with-views.BUQ-MlAq.js.map +0 -1
- package/dist/chunks/header.uyxNdQa3.js.map +0 -1
- package/dist/chunks/info-icon.CYOXx8CL.js.map +0 -1
- package/dist/chunks/input-field-password.C1zTapiN.js.map +0 -1
- package/dist/chunks/input-field.5S-pUNxA.js.map +0 -1
- package/dist/chunks/inspector.BI28vKQz.js.map +0 -1
- package/dist/chunks/layout-row.C_F2wX6d.js.map +0 -1
- package/dist/chunks/link.CXy_LoFI.js.map +0 -1
- package/dist/chunks/listbox-option-tag.D0Cql_R3.js.map +0 -1
- package/dist/chunks/loading-indicator.z8COalOc.js.map +0 -1
- package/dist/chunks/menu.D0OQgk40.js +0 -515
- package/dist/chunks/menu.D0OQgk40.js.map +0 -1
- package/dist/chunks/modal-fullscreen.DHotw1RI.js.map +0 -1
- package/dist/chunks/modal-fullscreen.keys.CMba3hYp.js +0 -5
- package/dist/chunks/modal-fullscreen.keys.CMba3hYp.js.map +0 -1
- package/dist/chunks/modal.eoNQ6E3U.js.map +0 -1
- package/dist/chunks/pagination.4J7ZMyf5.js.map +0 -1
- package/dist/chunks/payment-method.Cx4nPDtE.js.map +0 -1
- package/dist/chunks/popover.Bo4Bkudr.js +0 -145
- package/dist/chunks/popover.Bo4Bkudr.js.map +0 -1
- package/dist/chunks/popover.types.CBqyA4ly.js +0 -6
- package/dist/chunks/popover.types.CBqyA4ly.js.map +0 -1
- package/dist/chunks/popper-container.DIFqmRsp.js.map +0 -1
- package/dist/chunks/promo-banner.Bbc2U3S3.js.map +0 -1
- package/dist/chunks/radio-group.4_KKjvAm.js.map +0 -1
- package/dist/chunks/radio-input.uJAhxKRs.js.map +0 -1
- package/dist/chunks/rich-text-editor.BUKLdRkN.js.map +0 -1
- package/dist/chunks/search-bar.CuBj5FAE.js.map +0 -1
- package/dist/chunks/secondary-nav.C6usurfD.js.map +0 -1
- package/dist/chunks/segmented-control.DHZEfmT-.js.map +0 -1
- package/dist/chunks/selection-card-group.0o5T4tab.js.map +0 -1
- package/dist/chunks/sidepanel.DyThBUgV.js.map +0 -1
- package/dist/chunks/sidepanel.keys.R0DKQuYx.js +0 -5
- package/dist/chunks/sidepanel.keys.R0DKQuYx.js.map +0 -1
- package/dist/chunks/status.types.p_TCvoo0.js.map +0 -1
- package/dist/chunks/step.DMMofD4B.js.map +0 -1
- package/dist/chunks/structured-list-item.Bnn6-Z3q.js.map +0 -1
- package/dist/chunks/tab.BhWPBxcB.js.map +0 -1
- package/dist/chunks/tag.CGkclKVL.js.map +0 -1
- package/dist/chunks/teleport.BV6zrDjA.js +0 -128
- package/dist/chunks/teleport.BV6zrDjA.js.map +0 -1
- package/dist/chunks/textarea.UPM6N9V1.js +0 -203
- package/dist/chunks/textarea.UPM6N9V1.js.map +0 -1
- package/dist/chunks/timeline-item.DqLhj0Lb.js.map +0 -1
- package/dist/chunks/toast.BOyeuS19.js.map +0 -1
- package/dist/chunks/toggle-button.DEVVvpkw.js +0 -83
- package/dist/chunks/toggle-button.DEVVvpkw.js.map +0 -1
- package/dist/chunks/toggle.DyXL09-x.js.map +0 -1
- package/dist/chunks/tooltip.wQsyAwkC.js.map +0 -1
- package/dist/chunks/tutorial.CxrGhLS7.js.map +0 -1
- package/dist/chunks/typography.J1v_SPG3.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.0EeyFfyF.js.map +0 -1
- package/dist/chunks/use-click-outside.BnhTgpSt.js +0 -14
- package/dist/chunks/use-click-outside.BnhTgpSt.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-tag.CRbOHBPK.js","sources":["../../src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue"],"sourcesContent":["<template>\n <div>\n <bento-dropdown v-slot=\"{ label, data }\" v-bind=\"$props\" :items=\"dropdownItems\" @input=\"onInput\">\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types';\n import { type BentoDropdownCurrencyProps } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ariaLabel: null,\n condensed: { type: Boolean },\n emptyState: null,\n disabled: { type: Boolean },\n dynamicFiltering: { type: Boolean },\n error: { type: Boolean },\n errorMessage: null,\n description: null,\n hasMoreItems: { type: Boolean },\n isOptionDisabled: null,\n items: { default: () => [] },\n label: null,\n loading: { type: Boolean },\n componentLoading: { type: Boolean },\n lazyLoadType: null,\n multiple: { type: Boolean },\n optional: { type: Boolean },\n placeholder: null,\n readonly: { type: Boolean },\n required: { type: Boolean },\n search: null,\n showSlotContentInMultiple: { type: Boolean },\n size: null,\n staticCategories: { type: Boolean },\n tooltipText: null,\n value: null,\n virtualScroll: null,\n enableValueLabelPair: { type: Boolean }\n});\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Avatar Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownAvatar } from '@adyen/bento-vue2';\n * import type { BentoAvatarListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownAvatar },\n * template: `\n * <bento-dropdown-avatar\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('user-id-1') // Default value\n * const options: BentoAvatarListboxOptions = [\n * { label: 'User 1', value: 'user-id-1' },\n * { label: 'User 2', value: 'user-id-2', src: 'image-source.jpeg' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-avatar',\n });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ label }\" v-bind=\"$props\" :items=\"countryItems\" @input=\"onInput\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, toRefs } from 'vue';\n import { type BentoCountryListboxOptions } from './dropdown-country.types';\n import { type BentoListboxSelectedValue } from '@/types';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoCountryVariant } from '@/components/country';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCountryListboxOptions }\n * * @deprecated {string} value.label - Use BentoDropdown instead of custom labels\n * * @property {BentoCountryCode | string} value.value - Country code of the option\n */\n items: {\n type: Array as PropType<BentoCountryListboxOptions>,\n default: () => [],\n },\n\n /**\n * Which label variant to display.\n * @values iso, name, phone_code, capital\n */\n variant: {\n type: String as PropType<BentoCountryVariant | `${BentoCountryVariant}`>,\n default: BentoCountryVariant.CUSTOM,\n validator: (value: BentoCountryVariant) => Object.values(BentoCountryVariant).includes(value),\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const { variant, items } = toRefs(props);\n const countryItems = useCountryItems(variant, items);\n\n if (variant.value === 'custom' || items.value.some(item => item.label)) {\n deprecate(\n 'BentoDropdownCountry \"custom\" variant and \"items\" prop \"label\" key',\n 'Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels',\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Country Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-country\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-country',\n });\n</script>\n","<template>\n <bento-dropdown v-slot=\"slotProps\" v-bind=\"$props\" :search=\"search\" :items=\"filteredItems\" @input=\"onInput\">\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, ref, watch } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types';\n import { ListboxOptionTag } from '@/internal';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useSearchBarFilter } from '@/components/search-bar';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCurrencyListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option\n */\n items: {\n type: Array as PropType<BentoCurrencyListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n const filteredItems = ref<BentoCurrencyListboxOptions>([]);\n\n watch(\n () => props.items,\n () => (filteredItems.value = props.items),\n { immediate: true }\n );\n\n const search = props.search\n ? props.search\n : {\n debounceTime: 500,\n searchEvent: async (searchTerm: string) => {\n // Combine value and label to be able to search by the currency code\n const searchableItems = props.items.map(item => ({\n ...item,\n label: `${item.value} ${item.label}`,\n }));\n\n const searchResults = useSearchBarFilter(\n ref(searchTerm),\n ref<BentoCurrencyListboxOptions>(searchableItems),\n props?.search?.searchEvent,\n ref(false)\n ).value;\n\n // Restore original labels by removing the prepended value\n const normalizedResults = searchResults?.map(result => ({\n ...result,\n label: result.label.substring(result.value.length + 1),\n }));\n\n filteredItems.value = normalizedResults;\n },\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * A Currency Dropdown showing a selectable list of currencies.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-currency\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-currency',\n });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ value, label }\" v-bind=\"$props\" @input=\"onInput\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent } from 'vue';\n import { type BentoDropdownPaymentMethodProps } from './dropdown-payment-method.types';\n import { type BentoListboxSelectedValue } from '@/types';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n defineProps({\n ariaLabel: null,\n condensed: { type: Boolean },\n emptyState: null,\n disabled: { type: Boolean },\n dynamicFiltering: { type: Boolean },\n error: { type: Boolean },\n errorMessage: null,\n description: null,\n hasMoreItems: { type: Boolean },\n isOptionDisabled: null,\n items: { default: () => [] },\n label: null,\n loading: { type: Boolean },\n componentLoading: { type: Boolean },\n lazyLoadType: null,\n multiple: { type: Boolean },\n optional: { type: Boolean },\n placeholder: null,\n readonly: { type: Boolean },\n required: { type: Boolean },\n search: null,\n showSlotContentInMultiple: { type: Boolean },\n size: null,\n staticCategories: { type: Boolean },\n tooltipText: null,\n value: null,\n virtualScroll: null,\n enableValueLabelPair: { type: Boolean }\n});\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n</script>\n\n<script lang=\"ts\">\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod } from '@adyen/bento-vue2';\n * import type { BentoPaymentMethodListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownPaymentMethod },\n * template: `\n * <bento-dropdown-payment-method\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 'Visa'\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('ideal') // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: 'ideal' },\n * { label: 'Option 2', value: 'visa' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n class=\"b-dropdown-tag\"\n :items=\"tagItems\"\n show-slot-content-in-multiple\n @input=\"onInput\"\n >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '../../../../../types';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the tag dropdown with.\n * It must be an array of {@see BentoTagListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n * * @property {string} value.variant - The BentTag variant shown for the option.\n */\n items: {\n type: Array as PropType<BentoTagListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Tag Dropdown showing a selectable list of tags.\n *\n * @example\n * import { BentoDropdownTag } from '@adyen/bento-vue2';\n * import type { BentoTagListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownTag },\n * template: `\n * <bento-dropdown-tag\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('unique-id-1') // Default value\n * const options: BentoTagListboxOptions = [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-tag',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","onInput","selectedValue","emit","dropdownItems","computed","props","value","label","src","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","deprecate","__default__$2","filteredItems","ref","watch","search","searchTerm","searchableItems","searchResults","useSearchBarFilter","_a","normalizedResults","result","__default__$1","__default__","tagItems"],"mappings":";;;;;;;;;;AAkFI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBApCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEAE,IAAAC,EAAA,MAAAC,EAAA,MAAA,IAAA,CAAA,EAAA,OAAAC,GAAA,OAAAC,GAAA,KAAAC,EAAA,OAAA,EAAA,OAAAF,GAAA,OAAAC,GAAA,MAAAC,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;sBCqCAC,IAAAV,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;iBA7CAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEA,EAAA,SAAAS,GAAA,OAAAC,EAAA,IAAAC,EAAAP,CAAA,GACAQ,IAAAC,EAAAJ,GAAAC,CAAA;AAEA,YAAAD,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EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;iBAlCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEA8B,IAAA3B,EAAA,MAAA;;AAAA,cAAAsB,IAAArB,EAAA,UAAA,gBAAAqB,EAAA,IAAA,CAAA,EAAA,OAAAnB,GAAA,OAAAD,GAAA,SAAAI,EAAA,OAAA,EAAA,OAAAH,GAAA,OAAAD,GAAA,MAAAI,EAAA;AAAA,KAAA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { d as fe, B as Re } from "./typography.
|
|
3
|
-
import { a as Y, b as M, c as Ae, B as W, D as Me } from "./dropdown-default-textbox.
|
|
1
|
+
import { ref as C, watch as _e, computed as r, defineComponent as R, useSlots as ge, toRefs as he, nextTick as S, useAttrs as Te, toRef as w, inject as Ne } from "vue";
|
|
2
|
+
import { d as fe, B as Re } from "./typography.w3m-EY4E.js";
|
|
3
|
+
import { a as Y, b as M, c as Ae, B as W, D as Me } from "./dropdown-default-textbox.DzpZoK-P.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { n as $ } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
6
|
import { s as Z } from "./events.CMzGybJJ.js";
|
|
7
7
|
import { g as P } from "./generate-uid.NJ8tVoha.js";
|
|
8
8
|
import { u as Pe } from "./aria-label.CaUURpnB.js";
|
|
9
9
|
import { u as X } from "./i18n.BQkEbtPM.js";
|
|
10
|
-
import { a as p, b as Q, B as ve, c as $e, u as ke, d as Fe } from "./use-cached-selected-values.
|
|
10
|
+
import { a as p, b as Q, B as ve, c as $e, u as ke, d as Fe } from "./use-cached-selected-values.CI9xi8dE.js";
|
|
11
11
|
import { u as Ke } from "./use-form-layout-loading.D3lALhtC.js";
|
|
12
12
|
import { u as ze } from "./use-has-slot.C9lQZ6nz.js";
|
|
13
13
|
import { B as E, a as We } from "./keyboard-navigation.pB8weElW.js";
|
|
14
14
|
import { B as Ue } from "./directive.Cbdox5VL.js";
|
|
15
|
-
import { F as Ve, E as
|
|
16
|
-
import { P as me } from "./popper-container.
|
|
17
|
-
import {
|
|
15
|
+
import { F as Ve, E as qe } from "./error-message.PWgUfpvo.js";
|
|
16
|
+
import { P as me } from "./popper-container.Bu75g2nc.js";
|
|
17
|
+
import { h as je } from "./toggle-button.DeECoGRn.js";
|
|
18
18
|
import "../assets/dropdown.css";
|
|
19
19
|
const He = {
|
|
20
20
|
"en-US": {
|
|
@@ -31,7 +31,7 @@ const He = {
|
|
|
31
31
|
cancel: "Cancelar"
|
|
32
32
|
}
|
|
33
33
|
}, Je = (a, t, o, e) => {
|
|
34
|
-
const n =
|
|
34
|
+
const n = C(a.value), { t: l } = X();
|
|
35
35
|
_e(a, () => {
|
|
36
36
|
n.value = a.value;
|
|
37
37
|
});
|
|
@@ -196,11 +196,11 @@ const He = {
|
|
|
196
196
|
},
|
|
197
197
|
emits: [],
|
|
198
198
|
setup(a, { expose: t, emit: o }) {
|
|
199
|
-
const e = a, n = ge(), { selectedValue: l, multiple: s } =
|
|
199
|
+
const e = a, n = ge(), { selectedValue: l, multiple: s } = he(e), i = C(null), { t: c } = X(), m = r(() => e.open && !e.disabled), d = r(() => c("noOptionsMatchThisSearch")), u = r(() => ({
|
|
200
200
|
"b-dropdown-options-container--single": !(e != null && e.multiple)
|
|
201
201
|
})), _ = r(() => ({
|
|
202
202
|
"b-dropdown-options-container__listbox--single": !(e != null && e.multiple)
|
|
203
|
-
})), { actions: g, internalSelectedValue: f, listeners: O, onEscapeKey: L, onOutsideDropdownClick: x } = Je(l, s, m, o), y = r(() => e != null && e.multiple ?
|
|
203
|
+
})), { actions: g, internalSelectedValue: f, listeners: O, onEscapeKey: L, onOutsideDropdownClick: x } = Je(l, s, m, o), y = r(() => e != null && e.multiple ? je : me), I = r(() => {
|
|
204
204
|
var B;
|
|
205
205
|
const D = {
|
|
206
206
|
"min-width": `${(B = e == null ? void 0 : e.targetElement) == null ? void 0 : B.clientWidth}px`,
|
|
@@ -251,7 +251,7 @@ var Qe = function() {
|
|
|
251
251
|
Xe,
|
|
252
252
|
!1,
|
|
253
253
|
null,
|
|
254
|
-
"
|
|
254
|
+
"30d60112"
|
|
255
255
|
);
|
|
256
256
|
const et = Ge.exports;
|
|
257
257
|
let be = 0;
|
|
@@ -354,7 +354,7 @@ const ct = dt.exports, ut = R({
|
|
|
354
354
|
},
|
|
355
355
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
356
356
|
setup(a, { expose: t, emit: o }) {
|
|
357
|
-
const e = a, n =
|
|
357
|
+
const e = a, n = C(null), l = r(() => ({
|
|
358
358
|
[`b-dropdown-small-textbox--${Y.DISABLED}`]: e.disabled,
|
|
359
359
|
[`b-dropdown-small-textbox--${Y.READONLY}`]: e.readonly,
|
|
360
360
|
[`b-dropdown-small-textbox--${Y.OPENED}`]: e.open
|
|
@@ -393,7 +393,7 @@ var ft = function() {
|
|
|
393
393
|
vt,
|
|
394
394
|
!1,
|
|
395
395
|
null,
|
|
396
|
-
"
|
|
396
|
+
"5e83538c"
|
|
397
397
|
);
|
|
398
398
|
const bt = mt.exports, yt = (a, t) => t.value.reduce((o, e) => {
|
|
399
399
|
if (e.items) {
|
|
@@ -411,7 +411,7 @@ const bt = mt.exports, yt = (a, t) => t.value.reduce((o, e) => {
|
|
|
411
411
|
})
|
|
412
412
|
);
|
|
413
413
|
return r(() => o.value.length ? n.value ? yt(o, a) : o.value.map(({ label: s, displayValue: i }) => i ?? s).join(", ") : t.value || null);
|
|
414
|
-
},
|
|
414
|
+
}, Ce = (a) => {
|
|
415
415
|
var t;
|
|
416
416
|
(t = a.value.$children) == null || t[0].$refs.textbox.focus();
|
|
417
417
|
}, gt = ({
|
|
@@ -424,18 +424,18 @@ const bt = mt.exports, yt = (a, t) => t.value.reduce((o, e) => {
|
|
|
424
424
|
isMultiple: s
|
|
425
425
|
}, i, c, m) => {
|
|
426
426
|
const d = async (b) => {
|
|
427
|
-
var
|
|
428
|
-
n.value && await S(), (
|
|
427
|
+
var h;
|
|
428
|
+
n.value && await S(), (h = l.value[b]) == null || h.focus();
|
|
429
429
|
}, u = async (b) => {
|
|
430
430
|
var F, K;
|
|
431
431
|
n.value && await S();
|
|
432
|
-
const
|
|
432
|
+
const h = (F = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : F.$el.querySelectorAll(
|
|
433
433
|
"button"
|
|
434
434
|
);
|
|
435
|
-
|
|
435
|
+
h.length ? (K = h[b]) == null || K.focus() : d(b);
|
|
436
436
|
}, _ = (b) => {
|
|
437
|
-
var
|
|
438
|
-
return (
|
|
437
|
+
var h;
|
|
438
|
+
return (h = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : h.setListboxFocusedIndex(
|
|
439
439
|
b
|
|
440
440
|
);
|
|
441
441
|
}, g = () => {
|
|
@@ -465,7 +465,7 @@ const bt = mt.exports, yt = (a, t) => t.value.reduce((o, e) => {
|
|
|
465
465
|
}, B = () => {
|
|
466
466
|
e.value && m();
|
|
467
467
|
}, k = () => {
|
|
468
|
-
e.value && (m(),
|
|
468
|
+
e.value && (m(), Ce(a));
|
|
469
469
|
};
|
|
470
470
|
return r(() => ({
|
|
471
471
|
[E.ARROW_DOWN]: O,
|
|
@@ -477,10 +477,10 @@ const bt = mt.exports, yt = (a, t) => t.value.reduce((o, e) => {
|
|
|
477
477
|
[E.TAB]: B,
|
|
478
478
|
[E.ESCAPE]: k
|
|
479
479
|
}));
|
|
480
|
-
},
|
|
480
|
+
}, ht = ({ inputContainerRef: a, isDropdownOpen: t }, o) => {
|
|
481
481
|
const e = () => {
|
|
482
482
|
t.value && o(), S(() => {
|
|
483
|
-
|
|
483
|
+
Ce(a);
|
|
484
484
|
});
|
|
485
485
|
};
|
|
486
486
|
return {
|
|
@@ -490,8 +490,8 @@ const bt = mt.exports, yt = (a, t) => t.value.reduce((o, e) => {
|
|
|
490
490
|
[p.SPACE]: e
|
|
491
491
|
};
|
|
492
492
|
};
|
|
493
|
-
function
|
|
494
|
-
const n =
|
|
493
|
+
function Ct(a, t, o, e) {
|
|
494
|
+
const n = C(a), l = C(t), s = (c, m = []) => m.flatMap((d) => d.label.toLocaleLowerCase().includes(c) ? e != null && e.value && d.items ? [...s(c, d.items)] : [d, ...s(c, d.items)] : d.items ? [...s(c, d.items)] : []);
|
|
495
495
|
return _e(n, () => {
|
|
496
496
|
o !== void 0 && o(n.value);
|
|
497
497
|
}), r(() => {
|
|
@@ -515,7 +515,7 @@ const wt = {
|
|
|
515
515
|
all: "Todos",
|
|
516
516
|
clearFilter: "Limpar filtro"
|
|
517
517
|
}
|
|
518
|
-
}, Lt = Symbol("input field component injection key"),
|
|
518
|
+
}, Lt = Symbol("input field component injection key"), jt = Symbol("input field hint injection key"), Ht = Symbol("input field parent component injection key"), xt = R({
|
|
519
519
|
i18n: { messages: wt },
|
|
520
520
|
name: "b-dropdown",
|
|
521
521
|
components: {
|
|
@@ -557,21 +557,21 @@ const wt = {
|
|
|
557
557
|
emits: ["input", "show-more"],
|
|
558
558
|
setup(a, { expose: t, emit: o }) {
|
|
559
559
|
var pe;
|
|
560
|
-
const e = a, n = Te(), l = ge(), s = ze(l), { t: i } = X(), c =
|
|
560
|
+
const e = a, n = Te(), l = ge(), s = ze(l), { t: i } = X(), c = C(null), m = C(null), d = C(null), u = C(!1), _ = P("bento-dropdown-options-container"), g = P("dropdown-label"), f = P("dropdown-description"), O = P("dropdown-error"), { isReadOnly: L } = Ke(w(e, "readonly")), { cachedSelectedListboxOptions: x, cachedListboxSelectedValues: y, setCachedValues: I } = $e(
|
|
561
561
|
w(e, "items"),
|
|
562
562
|
w(e, "value"),
|
|
563
563
|
w(e, "multiple"),
|
|
564
564
|
w(e, "enableValueLabelPair")
|
|
565
|
-
), D =
|
|
565
|
+
), D = C(n["aria-label"]), { ariaLabel: B, label: k } = he(e), U = r(() => i("ariaLabelFallback")), b = Pe({
|
|
566
566
|
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
567
567
|
ariaLabel: B.value || D,
|
|
568
568
|
label: k,
|
|
569
569
|
defaultFallback: U
|
|
570
|
-
}),
|
|
570
|
+
}), h = e.size === W.SMALL || Ne(Lt, !1), F = r(() => h ? W.SMALL : W.DEFAULT), K = r(() => ({
|
|
571
571
|
"b-dropdown--condensed": e.condensed
|
|
572
572
|
})), we = r(() => ({
|
|
573
573
|
"b-dropdown__description--error": !!e.errorMessage
|
|
574
|
-
})), T =
|
|
574
|
+
})), T = C(""), A = w(e, "items"), G = w(e, "staticCategories"), V = Ct(T, A, (pe = e == null ? void 0 : e.search) == null ? void 0 : pe.searchEvent, G), q = r(() => e.dynamicFiltering && !!T.value), Le = _t({
|
|
575
575
|
items: A,
|
|
576
576
|
placeholder: w(e, "placeholder"),
|
|
577
577
|
isMultiSelect: w(e, "multiple"),
|
|
@@ -591,9 +591,9 @@ const wt = {
|
|
|
591
591
|
}), ee = r(() => {
|
|
592
592
|
const v = V.value.findIndex(({ value: N }) => e.enableValueLabelPair ? e.value.value === N : e.value === N);
|
|
593
593
|
return v > -1 ? v : 0;
|
|
594
|
-
}), { isMultiLevelSelect:
|
|
594
|
+
}), { isMultiLevelSelect: j, flattenedItemsList: te } = ke(A), oe = r(() => j.value && !e.staticCategories), ne = r(() => oe.value ? "treeitem" : "option"), Se = r(() => {
|
|
595
595
|
if (e.multiple) {
|
|
596
|
-
const v = Array.isArray(e.value) ? e.value.length : 0, N =
|
|
596
|
+
const v = Array.isArray(e.value) ? e.value.length : 0, N = j.value ? te.value.length : A.value.length;
|
|
597
597
|
return v === 0 ? null : !e.hasMoreItems && N > 0 && N === v ? i("all") : v;
|
|
598
598
|
}
|
|
599
599
|
return null;
|
|
@@ -615,9 +615,9 @@ const wt = {
|
|
|
615
615
|
}, ie = () => {
|
|
616
616
|
L.value || (u.value = !u.value, S(() => {
|
|
617
617
|
H();
|
|
618
|
-
}),
|
|
618
|
+
}), q.value && (T.value = ""));
|
|
619
619
|
}, Ee = () => {
|
|
620
|
-
|
|
620
|
+
q.value && (T.value = ""), u.value && (u.value = !1, d.value.onOutsideDropdownClick());
|
|
621
621
|
}, re = (v) => {
|
|
622
622
|
e.multiple || (T.value = "", u.value = !1), I(v), o("input", y.value);
|
|
623
623
|
}, de = () => {
|
|
@@ -635,7 +635,7 @@ const wt = {
|
|
|
635
635
|
ie,
|
|
636
636
|
le,
|
|
637
637
|
z
|
|
638
|
-
), ce =
|
|
638
|
+
), ce = ht(
|
|
639
639
|
{
|
|
640
640
|
inputContainerRef: c,
|
|
641
641
|
isDropdownOpen: u
|
|
@@ -650,8 +650,8 @@ const wt = {
|
|
|
650
650
|
e.error && fe(
|
|
651
651
|
'BentoDropdown "error" property',
|
|
652
652
|
`Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
|
|
653
|
-
|
|
654
|
-
|
|
653
|
+
Having the field as "undefined" will hide/remove the error.
|
|
654
|
+
<bento-dropdown errorMessage="Error message text" />`,
|
|
655
655
|
"2.0.0"
|
|
656
656
|
), e.size && fe('BentoDropdown "size" property', "Do not use. Only 'default' size should be used.", "2.0.0");
|
|
657
657
|
const ue = () => {
|
|
@@ -659,13 +659,13 @@ const wt = {
|
|
|
659
659
|
};
|
|
660
660
|
return t({
|
|
661
661
|
focus: ue
|
|
662
|
-
}), { __sfc: !0, attrs: n, slots: l, hasSlot: s, props: e, emit: o, t: i, inputContainerRef: c, inputContainerRefWrapper: m, optionsContainerRef: d, isDropdownOpen: u, dropdownOptionsContainerId: _, labelId: g, descriptionId: f, errorId: O, isReadOnly: L, cachedSelectedListboxOptions: x, cachedListboxSelectedValues: y, setCachedValues: I, ariaLabelAttribute: D, ariaLabel: B, label: k, computedAriaLabelFallbackMessage: U, computedAriaLabel: b, isInputComponent:
|
|
662
|
+
}), { __sfc: !0, attrs: n, slots: l, hasSlot: s, props: e, emit: o, t: i, inputContainerRef: c, inputContainerRefWrapper: m, optionsContainerRef: d, isDropdownOpen: u, dropdownOptionsContainerId: _, labelId: g, descriptionId: f, errorId: O, isReadOnly: L, cachedSelectedListboxOptions: x, cachedListboxSelectedValues: y, setCachedValues: I, ariaLabelAttribute: D, ariaLabel: B, label: k, computedAriaLabelFallbackMessage: U, computedAriaLabel: b, isInputComponent: h, computedSize: F, conditionalClasses: K, descriptionConditionalClasses: we, searchTerm: T, items: A, staticCategories: G, filteredItems: V, isSearching: q, displayValue: Le, selectedValueItem: xe, selectedValueIndex: ee, isMultiLevelSelect: j, flattenedItemsList: te, isTreePattern: oe, computedOptionRole: ne, additionalItemsSelected: Se, ariaDescribedBy: Oe, listboxRef: ae, visibleDomOptions: se, updateVisibleDomOptions: H, openDropdown: le, closeDropdown: z, toggleDropdown: ie, clickOutsideDropdown: Ee, onOptionSelected: re, emitShowMoreEvent: de, textboxKeyboardNavigationListeners: De, listboxKeyboardNavigationListeners: ce, listboxListeners: Be, focus: ue, BentoDropdownOptionsContainer: et, BentoTypography: Re, ErrorMessage: qe, FieldLabel: Ve, vBentoClickOutsideDirective: Ue, vBentoKeyboardNavigationDirective: We };
|
|
663
663
|
}
|
|
664
664
|
});
|
|
665
665
|
var Ot = function() {
|
|
666
666
|
var n;
|
|
667
667
|
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
668
|
-
return o("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.clickOutsideDropdown, expression: "clickOutsideDropdown" }], staticClass: "b-dropdown", class: e.conditionalClasses }, [e.label ? o(e.FieldLabel, { attrs: { id: e.labelId, condensed: t.condensed, label: e.label, "tooltip-text": t.tooltipText, optional: t.optional, required: t.required } }) : t._e(), o("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, e.textboxKeyboardNavigationListeners), [o(e.computedSize, { ref: "inputContainerRef", tag: "component", attrs: { condensed: t.condensed, value: e.searchTerm, "additional-items-selected": e.additionalItemsSelected, "aria-controls": e.dropdownOptionsContainerId, ariaExpanded: e.isDropdownOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, "aria-label": e.computedAriaLabel, "aria-readonly": e.isReadOnly, readonly: e.isReadOnly, disabled: t.disabled, "display-value": e.displayValue, "dynamic-filtering": t.dynamicFiltering, "is-invalid": !!t.errorMessage || t.error, multiple: t.multiple, open: e.isDropdownOpen, "selected-value-item": e.isInputComponent ? void 0 : e.selectedValueItem, "show-slot-content-in-multiple": t.showSlotContentInMultiple }, on: { input: function(l) {
|
|
668
|
+
return o("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.clickOutsideDropdown, expression: "clickOutsideDropdown" }], staticClass: "b-dropdown", class: e.conditionalClasses }, [e.label ? o(e.FieldLabel, { attrs: { id: e.labelId, condensed: t.condensed, label: e.label, "tooltip-text": t.tooltipText, optional: t.optional, required: t.required } }) : t._e(), o("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, e.textboxKeyboardNavigationListeners), [o(e.computedSize, { ref: "inputContainerRef", tag: "component", attrs: { condensed: t.condensed, value: e.searchTerm, "additional-items-selected": e.additionalItemsSelected, "aria-controls": e.dropdownOptionsContainerId, ariaExpanded: e.isDropdownOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, "aria-label": e.computedAriaLabel, "aria-readonly": e.isReadOnly, readonly: e.isReadOnly, required: t.required, disabled: t.disabled, "display-value": e.displayValue, "dynamic-filtering": t.dynamicFiltering, "is-invalid": !!t.errorMessage || t.error, multiple: t.multiple, open: e.isDropdownOpen, "selected-value-item": e.isInputComponent ? void 0 : e.selectedValueItem, "show-slot-content-in-multiple": t.showSlotContentInMultiple }, on: { input: function(l) {
|
|
669
669
|
e.searchTerm = l;
|
|
670
670
|
}, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: t._u([t._l(e.slots, function(l, s) {
|
|
671
671
|
return { key: s, fn: function(i) {
|
|
@@ -684,14 +684,14 @@ var Ot = function() {
|
|
|
684
684
|
Et,
|
|
685
685
|
!1,
|
|
686
686
|
null,
|
|
687
|
-
"
|
|
687
|
+
"1c4a9144"
|
|
688
688
|
);
|
|
689
689
|
const Jt = Dt.exports;
|
|
690
690
|
export {
|
|
691
691
|
Jt as B,
|
|
692
|
-
|
|
692
|
+
jt as I,
|
|
693
693
|
Lt as a,
|
|
694
694
|
Ht as b,
|
|
695
|
-
|
|
695
|
+
Ct as u
|
|
696
696
|
};
|
|
697
|
-
//# sourceMappingURL=dropdown.
|
|
697
|
+
//# sourceMappingURL=dropdown.DB_MlO1F.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown.DB_MlO1F.js","sources":["../../src/components/dropdown/components/dropdown-options-container/composables/use-dropdown-options-listbox.ts","../../src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue","../../../ui-assets/icons-16/dist/vue/chevron-down-small.vue","../../../ui-assets/icons-16/dist/vue/chevron-up-small.vue","../../src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue","../../src/components/dropdown/composables/use-display-value.ts","../../src/components/dropdown/composables/use-keyboard-navigation.ts","../../src/components/search-bar/useSearchBarDataFilter.ts","../../src/components/input-field/input-field.keys.ts","../../src/components/dropdown/dropdown.vue"],"sourcesContent":["import { computed, ref, type Ref, watch } from 'vue';\nimport { BentoListboxEvent, type BentoListboxOptions } from '@/types';\nimport { BentoDropdownEvent } from '../../../dropdown.types';\nimport { useI18n } from '@/utils/ts/i18n';\nimport messages from '../messages.json';\n\ntype MessageSchema = (typeof messages)['en-US'];\n\n/**\n * A composable that handles all dropdown options option selecting logic & listeners.\n * If single select dropdown then emits straight up to dropdown.\n * If multi select dropdown then stores selections in internal state and only emits when Apply button is pressed.\n *\n * @param selectedValue The selectedValue property passed into the dropdown options container component.\n * @param multiple The multiple property passed into the dropdown options container component.\n * @param isOpen The isOpen property passed into the dropdown options container component.\n * @param emit The emit function for the dropdown options container component.\n */\nexport const useDropdownOptionsListbox = (\n selectedValue: Ref<BentoListboxOptions>,\n multiple: Ref<boolean>,\n isOpen: Ref<boolean>,\n emit: (event: BentoListboxEvent | BentoDropdownEvent, selectedValue?: BentoListboxOptions) => void\n) => {\n const internalSelectedValue = ref(selectedValue.value);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n watch(selectedValue, () => {\n internalSelectedValue.value = selectedValue.value;\n });\n\n // Multi-select dropdown cancel and apply button logic\n const isApplyButtonDisabled = computed(\n () => JSON.stringify(internalSelectedValue.value) === JSON.stringify(selectedValue.value)\n );\n\n const onApplyClick = () => {\n emit(BentoListboxEvent.SELECT, internalSelectedValue.value);\n emit(BentoDropdownEvent.CLOSE_DROPDOWN);\n };\n\n const onCancelClick = () => {\n internalSelectedValue.value = selectedValue.value;\n emit(BentoDropdownEvent.CLOSE_DROPDOWN);\n };\n\n const onOutsideDropdownClick = () => {\n if (isOpen.value && multiple.value) {\n internalSelectedValue.value = selectedValue.value;\n }\n };\n\n const actions = computed(() => [\n {\n title: t('apply') as string,\n event: onApplyClick,\n disabled: isApplyButtonDisabled.value,\n },\n {\n title: t('cancel') as string,\n event: onCancelClick,\n },\n ]);\n\n // Click and keyboard navigation event listners\n const onOptionSelected = (newSelectedValue: BentoListboxOptions) => {\n internalSelectedValue.value = newSelectedValue;\n if (!multiple.value) {\n emit(BentoDropdownEvent.SELECT, newSelectedValue);\n }\n };\n\n const onTabKey = (newSelectedValue: BentoListboxOptions) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.TAB);\n };\n\n const onEnterKey = (newSelectedValue: BentoListboxOptions) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.ENTER);\n };\n\n const onSpaceKey = (newSelectedValue: BentoListboxOptions) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.SPACE);\n };\n\n const onEscapeKey = () => {\n onCancelClick();\n emit(BentoListboxEvent.ESCAPE);\n };\n\n const emitShowMoreEvent = () => {\n emit(BentoDropdownEvent.SHOW_MORE);\n };\n\n const listeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected,\n [BentoListboxEvent.SHOW_MORE]: emitShowMoreEvent,\n [BentoListboxEvent.TAB]: onTabKey,\n [BentoListboxEvent.SPACE]: onSpaceKey,\n [BentoListboxEvent.ENTER]: onEnterKey,\n };\n\n return {\n // Values\n actions,\n internalSelectedValue,\n\n // Methods\n listeners,\n onEscapeKey,\n onOutsideDropdownClick,\n };\n};\n","<template>\n <component\n :is=\"popperContainerOrPopoverComponent\"\n class=\"b-dropdown-options-container\"\n :class=\"conditionalClasses\"\n v-bind=\"popperContainerOrPopoverProps\"\n >\n <div @keydown.esc=\"onEscapeKey\">\n <bento-listbox\n :id=\"id\"\n ref=\"dropdownOptionsListboxRef\"\n :aria-label=\"ariaLabel\"\n class=\"b-dropdown-options-container__listbox\"\n :class=\"conditionalListboxClasses\"\n :component-loading=\"componentLoading\"\n :empty-state=\"emptyState\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"items\"\n :selected-value=\"internalSelectedValue\"\n :multiple=\"multiple\"\n :static-categories=\"staticCategories\"\n :no-results-message=\"noResultsMessage\"\n :searching=\"searching\"\n :loading=\"loading\"\n :lazy-load-type=\"lazyLoadType\"\n :has-more-items=\"hasMoreItems\"\n :virtual-scroll=\"virtualScroll\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox>\n </div>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType, ref, toRefs, useSlots } from 'vue';\n import { BentoListbox } from '@/internal';\n import { type BentoListboxEvent, type BentoListboxIsOptionDisabled, type BentoListboxOptions } from '@/types';\n import { PopperContainer } from '@/components/popper-container';\n import {\n type BentoDropdownEmptyStateProps,\n type BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n type BentoDropdownVirtulisationOptions,\n } from '../../dropdown.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoPopover } from '@/components/popover';\n import { useDropdownOptionsListbox } from './composables/use-dropdown-options-listbox';\n import { generateUid } from '@/core/utils/ts';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n\n const emit = defineEmits([]);\n\n const props = defineProps({\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Indicates that dropdown items are loading\n */\n componentLoading: { type: Boolean, default: false },\n\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoDropdownEmptyStateProps>,\n default: undefined,\n },\n\n /**\n * Disables dropdown functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.\n */\n id: { type: String, required: true },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoDropdownIsOptionDisabled}\n * @param {BentoDropdownOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: undefined,\n },\n\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoDropdownOptionItem }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType: {\n type: String as PropType<BentoDropdownLazyLoadType | `${BentoDropdownLazyLoadType}`>,\n default: BentoDropdownLazyLoadType.AUTOMATIC,\n validator: (value: BentoDropdownLazyLoadType) => Object.values(BentoDropdownLazyLoadType).includes(value),\n },\n\n /**\n * Indicates if new options are lazy loading.\n */\n loading: { type: Boolean, default: false },\n\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the container can be displayed.\n */\n open: { type: Boolean, required: true },\n\n /**\n * The `input` value.\n * Providing an empty string or empty array will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected for single select\n */\n selectedValue: {\n type: Array as PropType<BentoListboxOptions>,\n default: null,\n },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: BentoListbox.props.searching,\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Reference to the DOM element or Vue component for positioning\n * the Dropdown container.\n */\n targetElement: { type: PopperContainer.props.targetElement.type, required: true },\n\n /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll: {\n type: [Boolean, Object] as PropType<BentoDropdownVirtulisationOptions>,\n default: false,\n },\n });\n\n const { selectedValue, multiple } = toRefs(props);\n const dropdownOptionsListboxRef = ref(null);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isDropdownOpen = computed(() => props.open && !props.disabled);\n const noResultsMessage = computed(() => t('noOptionsMatchThisSearch') as string);\n\n const conditionalClasses = computed(() => ({\n 'b-dropdown-options-container--single': !props?.multiple,\n }));\n\n const conditionalListboxClasses = computed(() => ({\n 'b-dropdown-options-container__listbox--single': !props?.multiple,\n }));\n\n const { actions, internalSelectedValue, listeners, onEscapeKey, onOutsideDropdownClick } =\n useDropdownOptionsListbox(selectedValue, multiple, isDropdownOpen, emit);\n\n // Use different components depending on if the dropdown is a single or multi-select\n const popperContainerOrPopoverComponent = computed(() => (props?.multiple ? BentoPopover : PopperContainer));\n\n const popperContainerOrPopoverProps = computed(() => {\n const containerMinAndMaxWidth = {\n 'min-width': `${(props?.targetElement as HTMLElement)?.clientWidth}px`,\n 'max-width': 'min(500px, 95%)',\n };\n\n return props?.multiple\n ? ({\n actionsLayout: 'space-between',\n ariaLabel: props.ariaLabel,\n actions: actions.value,\n divider: true,\n fallbackPosition: ['top-start'],\n id: generateUid(`dropdown-options-${props.id}`),\n open: props.open,\n position: 'bottom-start',\n style: {\n width: 'auto',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof BentoPopover>['$props'])\n : ({\n fallbackPosition: ['top-start'],\n offset: [0, 8],\n position: 'bottom-start',\n style: {\n display: isDropdownOpen.value ? 'block' : 'none',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof PopperContainer>['$props']);\n });\n\n defineExpose({\n onOutsideDropdownClick,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dropdown options container.\n * It lists all the available options.\n *\n * @example\n * <bento-dropdown-options-container\n * v-if=\"inputContainerRef\" <!-- Ref to the input to match the width -->\n * :id=\"dropdownOptionsContainerId\"\n * :target-element=\"inputContainerRef\"\n * :aria-label=\"ariaLabel\"\n * :open=\"isDropdownOpen\"\n * :disabled=\"disabled\"\n * :multiple=\"multiple\"\n * :selected=\"value\"\n * :isOptionDisabled=\"option => option.value === 2\"\n * :items=\"[{\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * }]\"\n * @select=\"onOptionSelected\"\n * />\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-dropdown-options-container',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-options-container.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <div class=\"b-dropdown-small-textbox\" :class=\"conditionalClasses\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-small-textbox__textbox\"\n :size=\"BentoDropdownSize.SMALL\"\n v-on=\"listeners\"\n >\n <template #icon>\n <div class=\"b-dropdown-small-textbox__chevron\">\n <chevron-up-small-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-small-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType, ref } from 'vue';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n import { type Booleanish } from '@/types';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import ChevronDownSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-down-small';\n import ChevronUpSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-up-small';\n import { stopEventPropagation } from '@/utils/ts/events';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n });\n\n const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component in its small variant used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-small-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-small-textbox.scss\" />\n","import { computed, type Ref } from 'vue';\nimport { type UseDisplayValueOptions } from './use-display-value.types';\nimport { type BentoListboxOptions } from '@/types';\n\n/**\n * Generates the `displayValue` for the Category Multi Select based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * @param options Multi select options\n * @returns The text to be displayed by the dropdown\n */\nconst categoryMultiSelect = (selectedValues: Ref<BentoListboxOptions>, items: Ref<BentoListboxOptions>) =>\n items.value\n .reduce((acc, option) => {\n // Category items\n if (option.items) {\n const selectedCategoryOptions = option.items.filter(categoryOption =>\n selectedValues.value.find(selectedOption => selectedOption.value === categoryOption.value)\n );\n\n // If the category is fully selected add the category name\n const isCategoryFullySelected = selectedCategoryOptions.length === option.items.length;\n if (isCategoryFullySelected) {\n acc.push(option.displayValue ?? option.label);\n } else {\n // If category is partially selected add each selected option and category\n selectedCategoryOptions.forEach(({ label, displayValue }) => acc.push(displayValue ?? label));\n }\n }\n\n // Non-category option\n if (selectedValues.value.find(selectedOption => selectedOption.value === option.value)) {\n acc.push(option.displayValue ?? option.label);\n }\n\n return acc;\n }, [])\n .join(', ');\n\n/**\n * Generates the `displayValue` for the Dropdown based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * When there is a selected value but the value is not present in the list, the\n * value is then returned as there is no way to know what the text/label is.\n *\n * @param options Options needed to calculate the display value based on the type of Dropdown (single, multi, category)\n * @returns The text to be displayed by the dropdown\n */\nexport const useDisplayValue = ({ items, placeholder, selectedValues, isMultiSelect }: UseDisplayValueOptions) => {\n const isCategoryMultilevel = computed(\n () => isMultiSelect.value && items.value.find(option => option.items?.length)\n );\n\n const computedDisplayValue = computed(() => {\n // If no value selected, return placeholder or nothing\n if (!selectedValues.value.length) {\n return placeholder.value || null;\n }\n\n // Category multi select\n if (isCategoryMultilevel.value) {\n return categoryMultiSelect(selectedValues, items);\n }\n\n return selectedValues.value.map(({ label, displayValue }) => displayValue ?? label).join(', ');\n });\n\n return computedDisplayValue;\n};\n","import { BentoKeyboardNavigationKeyDownEvent } from '@/types';\nimport { BentoListboxEvent } from '@/types/listbox';\nimport { computed, nextTick, type Ref } from 'vue';\nimport {\n type UseListboxKeyboardNavigationOptions,\n type UseTextboxKeyboardNavigationOptions,\n} from './use-keyboard-navigation.types';\n\n/**\n * Returns the focus to the textbox of the dropdown if it exists\n * when the dropdown is being closed.\n * @param elementToFocusOn Reference to the input container\n */\nconst focusOnTextbox = (elementToFocusOn: Ref) => {\n elementToFocusOn.value.$children?.[0].$refs.textbox.focus();\n};\n\n/**\n * Controls the keyboard navigation inside the Dropdown's textbox for Single and Multi select.\n * Adds support for the keys:\n *\n * - Arrow Down\n * - Arrow Up\n * - Home key\n * - End key\n * - Space key\n * - Enter key\n * - Tab\n * - Escape key\n *\n * @param options Options from the Dropdown to handle the navigation\n * @param toggleDropdown Function to open/close the Dropdown\n * @param openDropdown Function to open the Dropdown\n * @param closeDropdown Function to close the Dropdown\n * @returns List of event listeners available to the Dropdown's textbox\n */\nexport const useTextboxKeyboardNavigation = (\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering,\n items,\n isMultiple,\n }: UseTextboxKeyboardNavigationOptions,\n toggleDropdown: () => void,\n openDropdown: () => void,\n closeDropdown: () => void\n) => {\n const focusOnOption = async (index: number) => {\n if (isDynamicFltering.value) {\n await nextTick();\n }\n items.value[index]?.focus();\n };\n\n const focusOnChip = async (index: number) => {\n if (isDynamicFltering.value) {\n await nextTick();\n }\n\n const chips =\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.$el.querySelectorAll(\n 'button'\n );\n\n if (chips.length) {\n chips[index]?.focus();\n } else {\n focusOnOption(index);\n }\n };\n\n const setListboxFocusedIndex = (selectedIndex: number) => {\n return optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.setListboxFocusedIndex(\n selectedIndex\n );\n };\n\n const skipToFirstOption = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n\n nextTick(() => {\n setListboxFocusedIndex(0);\n focusOnOption(0);\n });\n };\n\n const skipToLastOption = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n\n nextTick(() => {\n setListboxFocusedIndex(items.value.length - 1);\n focusOnOption(items.value.length - 1);\n });\n };\n\n const onArrowDown = ({ detail: event }) => {\n event.preventDefault();\n\n skipToFirstOption();\n };\n\n const onArrowUp = ({ detail: event }) => {\n event.preventDefault();\n\n skipToLastOption();\n };\n\n const onHomeKey = () => {\n skipToFirstOption();\n };\n\n const onEndKey = () => {\n skipToLastOption();\n };\n\n const onSpaceKey = ({ detail: event }) => {\n event.preventDefault();\n toggleDropdown();\n if (isDropdownOpen.value) {\n nextTick(() => {\n if (isMultiple) {\n focusOnChip(0);\n } else {\n setListboxFocusedIndex(selectedValueIndex.value);\n focusOnOption(selectedValueIndex.value);\n }\n });\n }\n };\n\n const onEnterKey = ({ detail: event }) => {\n event.preventDefault();\n toggleDropdown();\n if (isDropdownOpen.value) {\n nextTick(() => {\n if (isMultiple) {\n focusOnChip(0);\n } else {\n setListboxFocusedIndex(selectedValueIndex.value);\n focusOnOption(selectedValueIndex.value);\n }\n });\n }\n };\n\n const onTab = () => {\n // tab should not navigate through a combobox\n if (isDropdownOpen.value) {\n closeDropdown();\n }\n };\n\n const onEscapeKey = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n focusOnTextbox(inputContainerRef);\n }\n };\n\n const textboxKeyboardNavigationListeners = computed(() => ({\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: onArrowDown,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: onArrowUp,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: onHomeKey,\n [BentoKeyboardNavigationKeyDownEvent.END]: onEndKey,\n ...(!isDynamicFltering.value ? { [BentoKeyboardNavigationKeyDownEvent.SPACE]: onSpaceKey } : {}),\n [BentoKeyboardNavigationKeyDownEvent.ENTER]: onEnterKey,\n [BentoKeyboardNavigationKeyDownEvent.TAB]: onTab,\n [BentoKeyboardNavigationKeyDownEvent.ESCAPE]: onEscapeKey,\n }));\n\n return textboxKeyboardNavigationListeners;\n};\n\n/**\n * Controls the keyboard navigation inside the Dropdown's listbox container for Single and Multi select.\n * Adds support for the keys:\n *\n * - Escape key\n * - Enter Key\n * - Tab\n * - Space key\n *\n * @param options Options from the Dropdown to handle the navigation inside the listbox\n * @param closeDropdown Function to close the Dropdown\n * @returns List of event listeners available to the Dropdown's listbox container\n */\nexport const useListboxKeyboardNavigation = (\n { inputContainerRef, isDropdownOpen }: UseListboxKeyboardNavigationOptions,\n closeDropdown: () => void\n) => {\n const closeDropdownAndFocusOnTextbox = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n }\n nextTick(() => {\n focusOnTextbox(inputContainerRef);\n });\n };\n\n const listboxKeyboardNavigationListeners = {\n [BentoListboxEvent.ENTER]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.ESCAPE]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.TAB]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.SPACE]: closeDropdownAndFocusOnTextbox,\n };\n\n return listboxKeyboardNavigationListeners;\n};\n","import { computed, ref, type Ref, watch } from 'vue';\nimport { type BentoSearchBarItem } from './search-bar.types';\n\n/**\n * Filters an array {@see BentoSearchBarData} containing elements of type {@see BentoSearchBarItem}\n * by the {@param searchTerm}.\n *\n * @param {Ref<String>} searchTerm - Text that satisfies the search criteria.\n * @param {Ref<BentoSearchBarData>} data - Array to be filtered by {@param searchTerm}\n * @returns {Ref<BentoSearchBarData>} New instance of the array filtered by the {@param searchTerm} text\n * @param {Ref<Boolean>} ignoreGroups - Boolean that determines if search returns items with subitems\n */\nexport function useSearchBarFilter<T extends BentoSearchBarItem>(\n searchTerm: Ref<string>,\n data: Ref<T[]>,\n searchEvent?: (searchValue: string) => void,\n ignoreGroups?: Ref<boolean>\n) {\n const searchTermRef = ref(searchTerm);\n const dataRef = ref(data);\n\n const findHits = (searchTermLowerCased: string, options: Array<BentoSearchBarItem> = []) =>\n options.flatMap(option => {\n if (option.label.toLocaleLowerCase().includes(searchTermLowerCased)) {\n if (ignoreGroups?.value && option.items) {\n return [...findHits(searchTermLowerCased, option.items)];\n }\n return [option, ...findHits(searchTermLowerCased, option.items)];\n }\n\n if (option.items) {\n return [...findHits(searchTermLowerCased, option.items)];\n }\n\n return [];\n });\n\n // If search event exists trigger it on the search term changing\n watch(searchTermRef, () => {\n if (searchEvent !== undefined) {\n searchEvent(searchTermRef.value);\n }\n });\n\n const filterInputData = computed(() => {\n if (!searchTermRef.value) {\n return dataRef.value;\n }\n // If search event exists, emit the new search value into the event and do not manipulate data.\n if (searchEvent !== undefined) {\n return dataRef.value;\n }\n\n const searchTermLowerCased = searchTermRef.value.toLocaleLowerCase();\n const filtered = findHits(searchTermLowerCased, dataRef.value);\n return filtered;\n });\n\n return filterInputData;\n}\n","export const INPUT_FIELD_COMPONENT_INJECTION_KEY = Symbol('input field component injection key');\nexport const INPUT_FIELD_HINT_INJECTION_KEY = Symbol('input field hint injection key');\nexport const INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY = Symbol('input field parent component injection key');\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div v-bento-click-outside-directive=\"clickOutsideDropdown\" class=\"b-dropdown\" :class=\"conditionalClasses\">\n <field-label\n v-if=\"label\"\n :id=\"labelId\"\n :condensed=\"condensed\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n <div\n ref=\"inputContainerRefWrapper\"\n v-bento-keyboard-navigation-directive\n v-on=\"textboxKeyboardNavigationListeners\"\n >\n <component\n :is=\"computedSize\"\n ref=\"inputContainerRef\"\n :condensed=\"condensed\"\n :value=\"searchTerm\"\n :additional-items-selected=\"additionalItemsSelected\"\n :aria-controls=\"dropdownOptionsContainerId\"\n :ariaExpanded=\"isDropdownOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-label=\"computedAriaLabel\"\n :aria-readonly=\"isReadOnly\"\n :readonly=\"isReadOnly\"\n :required=\"required\"\n :disabled=\"disabled\"\n :display-value=\"displayValue\"\n :dynamic-filtering=\"dynamicFiltering\"\n :is-invalid=\"!!errorMessage || error\"\n :multiple=\"multiple\"\n :open=\"isDropdownOpen\"\n :selected-value-item=\"!isInputComponent ? selectedValueItem : undefined\"\n :show-slot-content-in-multiple=\"showSlotContentInMultiple\"\n @input=\"searchTerm = $event\"\n @open=\"toggleDropdown\"\n @close=\"toggleDropdown\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </component>\n </div>\n <bento-dropdown-options-container\n v-if=\"inputContainerRef\"\n :id=\"dropdownOptionsContainerId\"\n ref=\"optionsContainerRef\"\n :aria-label=\"computedAriaLabel\"\n :component-loading=\"componentLoading\"\n :empty-state=\"emptyState\"\n :debounce-time=\"search?.debounceTime\"\n :disabled=\"disabled\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"filteredItems\"\n :multiple=\"multiple\"\n :static-categories=\"staticCategories\"\n :open=\"isDropdownOpen\"\n :selected-value=\"cachedSelectedListboxOptions\"\n :searching=\"isSearching\"\n :target-element=\"inputContainerRefWrapper\"\n :loading=\"loading\"\n :has-more-items=\"hasMoreItems\"\n :lazy-load-type=\"lazyLoadType\"\n :virtual-scroll=\"virtualScroll\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-dropdown-options-container>\n <error-message\n v-if=\"!!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-dropdown__error-message\"\n />\n <bento-typography\n v-if=\"description || hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-dropdown__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n <slot name=\"description\">\n {{ description }}\n </slot>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, inject, nextTick, type Ref, ref, toRef, toRefs, useAttrs, useSlots } from 'vue';\n // Components\n import { BentoDropdownOptionsContainer } from './components/dropdown-options-container';\n import { BentoTypography } from '@/components/typography';\n import { DropdownInputDefault, DropdownInputSmall } from './components';\n import { BentoListbox, ErrorMessage, FieldLabel, useCachedSelectedValues, useMultiLevelItems } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/core/utils/ts';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n\n // Composables\n import { useDisplayValue, useListboxKeyboardNavigation, useTextboxKeyboardNavigation } from './composables';\n import { useVisibleDomOptions } from '@/internal/listbox/composables/use-visible-dom-options/use-visible-dom-options';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n\n // Directives\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n // Types\n import { BentoDropdownEvent, type BentoDropdownProps, BentoDropdownSize } from './dropdown.types';\n import {\n BentoListboxEvent,\n type BentoListboxItemRole,\n type BentoListboxMultiSelectValue,\n type BentoListboxOptions,\n type BentoListboxSelectedValue,\n type BentoListboxSelectedValueLabelPair,\n } from '@/types';\n\n import messages from './messages.json';\n import { useHasSlot } from '@/composables';\n import { INPUT_FIELD_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n ariaLabel: { default: null },\n condensed: { type: Boolean, default: false },\n emptyState: { default: undefined },\n disabled: { type: Boolean, default: false },\n dynamicFiltering: { type: Boolean, default: false },\n error: { type: Boolean, default: false },\n errorMessage: { default: null },\n description: { default: null },\n hasMoreItems: { type: Boolean, default: false },\n isOptionDisabled: { default: undefined },\n items: { default: () => [] },\n label: { default: null },\n loading: { type: Boolean, default: false },\n componentLoading: { type: Boolean, default: false },\n lazyLoadType: { default: BentoListbox.props.lazyLoadType.default },\n multiple: { type: Boolean, default: false },\n optional: { type: Boolean, default: false },\n placeholder: { default: null },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n search: { default: undefined },\n showSlotContentInMultiple: { type: Boolean, default: false },\n size: { default: null },\n staticCategories: { type: Boolean, default: false },\n tooltipText: { default: null },\n value: { default: null },\n virtualScroll: { default: false },\n enableValueLabelPair: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"input\", \"show-more\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const inputContainerRef = ref(null);\n const inputContainerRefWrapper = ref(null);\n const optionsContainerRef: Ref<InstanceType<typeof BentoDropdownOptionsContainer>> = ref(null);\n const isDropdownOpen = ref(false);\n const dropdownOptionsContainerId = generateUid('bento-dropdown-options-container');\n const labelId = generateUid('dropdown-label');\n const descriptionId = generateUid('dropdown-description');\n const errorId = generateUid('dropdown-error');\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const { cachedSelectedListboxOptions, cachedListboxSelectedValues, setCachedValues } = useCachedSelectedValues(\n toRef(props, 'items'),\n toRef(props, 'value'),\n toRef(props, 'multiple'),\n toRef(props, 'enableValueLabelPair')\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel, label } = toRefs(props);\n\n // vue-i18n issue with t() used in script - direct usage in template works\n // requires either createI18n({ legacy: false }) or to be wrapped in computed()\n const computedAriaLabelFallbackMessage = computed(() => t('ariaLabelFallback'));\n const computedAriaLabel = useAriaLabel({\n // TODO: take ariaLabel ref away when aria-label prop is removed\n ariaLabel: ariaLabel.value || (ariaLabelAttribute as Ref<string>),\n label,\n defaultFallback: computedAriaLabelFallbackMessage,\n });\n\n // Inject input field component key to change the dropdown size\n const isInputComponent =\n props.size === BentoDropdownSize.SMALL || inject(INPUT_FIELD_COMPONENT_INJECTION_KEY, false);\n const computedSize = computed(() => (isInputComponent ? BentoDropdownSize.SMALL : BentoDropdownSize.DEFAULT));\n\n const conditionalClasses = computed(() => ({\n 'b-dropdown--condensed': props.condensed,\n }));\n\n // Description styles\n const descriptionConditionalClasses = computed(() => ({\n 'b-dropdown__description--error': !!props.errorMessage,\n }));\n\n // Filtering\n const searchTerm = ref('');\n const items = toRef(props, 'items');\n const staticCategories = toRef(props, 'staticCategories');\n const filteredItems = useSearchBarFilter(searchTerm, items, props?.search?.searchEvent, staticCategories);\n const isSearching = computed(() => props.dynamicFiltering && !!searchTerm.value);\n\n const displayValue = useDisplayValue({\n items,\n placeholder: toRef(props, 'placeholder'),\n isMultiSelect: toRef(props, 'multiple'),\n selectedValues: cachedSelectedListboxOptions,\n });\n\n const selectedValueItem = computed(() => {\n if (props?.multiple && Array.isArray(props.value)) {\n return props.items.filter(\n ({ value }) => props?.value && (props?.value as BentoListboxMultiSelectValue).includes(value)\n );\n }\n if (!props.multiple && props.staticCategories) {\n // Find the category that holds the selected value\n const category = props.items.find(categoryItem =>\n categoryItem.items.some(item => item.value === props.value)\n );\n // Find the specific item within the category\n const selectedCategoryItem = category ? category.items.find(item => item.value === props.value) : null;\n\n return selectedCategoryItem;\n }\n\n return props.items.find(({ value }) => value === props?.value);\n });\n\n const selectedValueIndex = computed(() => {\n const index = filteredItems.value.findIndex(({ value }) => {\n return props.enableValueLabelPair\n ? (props.value as BentoListboxSelectedValueLabelPair).value === value\n : props.value === value;\n });\n return index > -1 ? index : 0;\n });\n\n const { isMultiLevelSelect, flattenedItemsList } = useMultiLevelItems(items);\n\n const isTreePattern = computed(() => isMultiLevelSelect.value && !props.staticCategories);\n\n const computedOptionRole = computed<BentoListboxItemRole>(() => (isTreePattern.value ? 'treeitem' : 'option'));\n\n const additionalItemsSelected = computed(() => {\n if (props.multiple) {\n const selectedItemsCount = Array.isArray(props.value) ? props.value.length : 0;\n const total = isMultiLevelSelect.value ? flattenedItemsList.value.length : items.value.length;\n\n if (selectedItemsCount === 0) {\n return null;\n }\n\n // Display count always - show \"all\" only when is not external filtering (hasMoreItems = true)\n if (!props.hasMoreItems && total > 0 && total === selectedItemsCount) {\n return t('all');\n }\n\n return selectedItemsCount;\n }\n\n return null;\n });\n\n // ARIA\n const ariaDescribedBy = computed(\n () => `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''}`.trim() || null\n );\n\n const listboxRef = computed(() => optionsContainerRef.value?.$el as HTMLDivElement);\n\n const { visibleDomOptions, updateVisibleDomOptions } = useVisibleDomOptions(\n listboxRef,\n filteredItems,\n computedOptionRole\n );\n\n const openDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = true;\n nextTick(() => {\n updateVisibleDomOptions();\n });\n };\n\n const closeDropdown = () => {\n isDropdownOpen.value = false;\n };\n\n const toggleDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = !isDropdownOpen.value;\n nextTick(() => {\n updateVisibleDomOptions();\n });\n\n // Clear search\n if (isSearching.value) {\n searchTerm.value = '';\n }\n };\n\n const clickOutsideDropdown = () => {\n if (isSearching.value) {\n searchTerm.value = '';\n }\n\n if (isDropdownOpen.value) {\n isDropdownOpen.value = false;\n // Reset the internal dropdown options state\n optionsContainerRef.value.onOutsideDropdownClick();\n }\n };\n\n const onOptionSelected = (selectedValue: BentoListboxOptions) => {\n // Clear and close the dropdown on single selection\n if (!props.multiple) {\n searchTerm.value = '';\n isDropdownOpen.value = false;\n }\n\n setCachedValues(selectedValue);\n\n /**\n * Emit the value/label pair objects if enableValueLabelPair is enabled,\n * otherwise just emit the list of selected values (number or string)\n */\n emit('input', cachedListboxSelectedValues.value);\n };\n\n const emitShowMoreEvent = () => {\n emit(BentoDropdownEvent.SHOW_MORE);\n };\n\n const textboxKeyboardNavigationListeners = useTextboxKeyboardNavigation(\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering: toRef(props, 'dynamicFiltering'),\n items: visibleDomOptions,\n isMultiple: props.multiple,\n },\n toggleDropdown,\n openDropdown,\n closeDropdown\n );\n\n const listboxKeyboardNavigationListeners = useListboxKeyboardNavigation(\n {\n inputContainerRef,\n isDropdownOpen,\n },\n closeDropdown\n );\n\n const listboxListeners = {\n [BentoListboxEvent.CLOSE_DROPDOWN]: closeDropdown,\n [BentoListboxEvent.SELECT]: onOptionSelected,\n [BentoListboxEvent.SHOW_MORE]: emitShowMoreEvent,\n ...listboxKeyboardNavigationListeners,\n };\n\n if (props.error) {\n deprecate(\n 'BentoDropdown \"error\" property',\n `Use the BentoDropdown \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n if (props.size) {\n deprecate('BentoDropdown \"size\" property', `Do not use. Only 'default' size should be used.`, '2.0.0');\n }\n\n const focus = () => {\n inputContainerRef.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * A Dropdown shows a selected option's.\n * Use a dropdown when you want users to select options\n * from a list of pre-defined options.\n *\n * @example\n * import { BentoDropdown } from '@adyen/bento-vue2';\n * import type { BentoDropdownOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(2) // Default value\n * const options: BentoDropdownOptions = [\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'b-dropdown',\n components: {\n DropdownInputDefault,\n DropdownInputSmall,\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown.scss\" />\n"],"names":["useDropdownOptionsListbox","selectedValue","multiple","isOpen","emit","internalSelectedValue","ref","t","useI18n","watch","isApplyButtonDisabled","computed","onApplyClick","BentoListboxEvent","onCancelClick","onOutsideDropdownClick","actions","onOptionSelected","newSelectedValue","onTabKey","onEnterKey","onSpaceKey","onEscapeKey","emitShowMoreEvent","listeners","__default__$2","defineComponent","messages$1","slots","useSlots","toRefs","props","dropdownOptionsListboxRef","isDropdownOpen","noResultsMessage","conditionalClasses","conditionalListboxClasses","popperContainerOrPopoverComponent","BentoPopover","PopperContainer","popperContainerOrPopoverProps","containerMinAndMaxWidth","_a","generateUid","expose","uuid$1","_sfc_main$3","uuid","_sfc_main$2","__default__$1","baseTextbox","DropdownBaseTextboxState","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","DropdownBaseTextboxEvent","focus","categoryMultiSelect","selectedValues","items","acc","option","selectedCategoryOptions","categoryOption","selectedOption","label","displayValue","useDisplayValue","placeholder","isMultiSelect","isCategoryMultilevel","focusOnTextbox","elementToFocusOn","useTextboxKeyboardNavigation","inputContainerRef","optionsContainerRef","selectedValueIndex","isDynamicFltering","isMultiple","toggleDropdown","focusOnOption","index","nextTick","focusOnChip","chips","_b","setListboxFocusedIndex","selectedIndex","skipToFirstOption","skipToLastOption","onArrowDown","event","onArrowUp","onHomeKey","onEndKey","onTab","BentoKeyboardNavigationKeyDownEvent","useListboxKeyboardNavigation","closeDropdownAndFocusOnTextbox","useSearchBarFilter","searchTerm","data","searchEvent","ignoreGroups","searchTermRef","dataRef","findHits","searchTermLowerCased","options","INPUT_FIELD_COMPONENT_INJECTION_KEY","INPUT_FIELD_HINT_INJECTION_KEY","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","__default__","messages","DropdownInputDefault","DropdownInputSmall","attrs","useAttrs","hasSlot","useHasSlot","inputContainerRefWrapper","dropdownOptionsContainerId","labelId","descriptionId","errorId","isReadOnly","useFormLayoutFieldLoading","toRef","cachedSelectedListboxOptions","cachedListboxSelectedValues","setCachedValues","useCachedSelectedValues","ariaLabelAttribute","ariaLabel","computedAriaLabelFallbackMessage","computedAriaLabel","useAriaLabel","isInputComponent","BentoDropdownSize","inject","computedSize","descriptionConditionalClasses","staticCategories","filteredItems","isSearching","selectedValueItem","value","category","categoryItem","item","isMultiLevelSelect","flattenedItemsList","useMultiLevelItems","isTreePattern","computedOptionRole","additionalItemsSelected","selectedItemsCount","total","ariaDescribedBy","listboxRef","visibleDomOptions","updateVisibleDomOptions","useVisibleDomOptions","clickOut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AAkB,EAAA,MAAA,MAAA;AAAA,IAA8B;AAGlC,WAAAnC,EAAA;AAAA,MAAa,OAAAiB;AAAA,IACT,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as D, ref as v, computed as l, watch as d } from "vue";
|
|
2
|
-
import { B as L } from "./button.
|
|
3
|
-
import { B as
|
|
2
|
+
import { B as L } from "./button.B0hSQWOR.js";
|
|
3
|
+
import { B as b, c as C } from "./typography.w3m-EY4E.js";
|
|
4
4
|
import { o as A } from "./resize.Bqks3WUm.js";
|
|
5
5
|
import { n as h } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
6
|
import "../assets/empty-state.css";
|
|
@@ -46,7 +46,7 @@ const O = {}, y = /* @__PURE__ */ D({
|
|
|
46
46
|
headingEl: {
|
|
47
47
|
type: String,
|
|
48
48
|
default: null,
|
|
49
|
-
validator: (s) => Object.values(
|
|
49
|
+
validator: (s) => Object.values(C).includes(s)
|
|
50
50
|
},
|
|
51
51
|
/**
|
|
52
52
|
* Name of the illustration for the empty state.
|
|
@@ -121,7 +121,7 @@ const O = {}, y = /* @__PURE__ */ D({
|
|
|
121
121
|
A(n.value, () => {
|
|
122
122
|
n.value && (o.value = n.value.offsetWidth);
|
|
123
123
|
});
|
|
124
|
-
}), { __sfc: !0, WIDTH_BREAKPOINT: r, HEADING_ELEMENT_MAP: t, props: e, rootRef: n, containerWidth: o, isBelowBreakpoint: u, imageVariant: i, imageSvg: g, imageConditionalClasses: f, headingElement: m, headingProps: E, actionVariant: N, BentoButton: L, BentoTypography:
|
|
124
|
+
}), { __sfc: !0, WIDTH_BREAKPOINT: r, HEADING_ELEMENT_MAP: t, props: e, rootRef: n, containerWidth: o, isBelowBreakpoint: u, imageVariant: i, imageSvg: g, imageConditionalClasses: f, headingElement: m, headingProps: E, actionVariant: N, BentoButton: L, BentoTypography: b };
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
127
|
var R = function() {
|
|
@@ -139,7 +139,7 @@ var R = function() {
|
|
|
139
139
|
T,
|
|
140
140
|
!1,
|
|
141
141
|
null,
|
|
142
|
-
"
|
|
142
|
+
"e46bd74d"
|
|
143
143
|
);
|
|
144
144
|
const F = G.exports;
|
|
145
145
|
export {
|
|
@@ -148,4 +148,4 @@ export {
|
|
|
148
148
|
_ as b,
|
|
149
149
|
c
|
|
150
150
|
};
|
|
151
|
-
//# sourceMappingURL=empty-state.
|
|
151
|
+
//# sourceMappingURL=empty-state.BqMgiQAu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-state.BqMgiQAu.js","sources":["../../src/components/empty-state/empty-state.types.ts","../../src/components/empty-state/empty-state.vue"],"sourcesContent":["export enum BentoEmptyStateVariant {\n FULL_PAGE = 'full-page',\n EMBEDDED = 'embedded',\n BASIC = 'basic',\n CONDENSED = 'condensed',\n}\n\nexport enum BentoEmptyStateImage {\n GENERIC_USE1 = '1-generic-use',\n GENERIC_USE2 = '2-generic-use',\n GENERIC_USE3 = '3-generic-use',\n GENERIC_USE4 = '4-generic-use',\n ADDING_PAYMENT_METHOD = 'adding-payment-methods',\n ADYEN_GIVING = 'adyen-giving',\n DELIGHT = 'delight',\n INTERNAL_ERROR = 'internal-error',\n NO_RESULTS_FOUND = 'no-results-found',\n NOTIFICATIONS_CLEARED = 'notifications-cleared',\n PAGE_NOT_FOUND = 'page-not-found',\n PLANNED_MAINTENANCE = 'planned-maintenance',\n REFERRALS = 'referrals',\n SUCCESS = 'success',\n UPLOAD_FILES = 'upload-files',\n WRONG_ENVIRONMENT = 'wrong-environment',\n}\n\nexport enum BentoEmptyStateImageVariant {\n SMALL = 'small',\n LARGE = 'large',\n NULL = null,\n}\n","<template>\n <div ref=\"rootRef\" class=\"b-empty-state\">\n <!-- illustration -->\n <img\n v-if=\"image && imageVariant\"\n alt=\"\"\n class=\"b-empty-state__image\"\n :class=\"imageConditionalClasses\"\n :src=\"imageSvg\"\n />\n\n <!-- heading -->\n <bento-typography v-bind=\"headingProps\" class=\"b-empty-state__title\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </bento-typography>\n\n <!-- details -->\n <bento-typography v-if=\"variant !== 'condensed'\" variant=\"body\" class=\"b-empty-state__details\">\n <slot>\n {{ description }}\n </slot>\n </bento-typography>\n\n <!-- action -->\n <bento-button v-if=\"action\" type=\"button\" :variant=\"actionVariant\" @click=\"action.event\">\n <template v-if=\"action.icon\" #iconLeft>\n <component :is=\"action.icon\" :svg-title=\"action.title\"></component>\n </template>\n {{ action.title }}\n </bento-button>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type PropType, ref, watch } from 'vue';\n\n import { BentoButton, type BentoButtonActionObject, type BentoButtonVariant } from '@/components/button';\n import { BentoTypography, BentoTypographyElement, type BentoTypographyVariant } from '@/components/typography';\n\n import { observeSizeOfElement } from '@/utils/ts/resize';\n\n import { BentoEmptyStateImage, BentoEmptyStateImageVariant, BentoEmptyStateVariant } from './empty-state.types';\n\n const WIDTH_BREAKPOINT = 740;\n\n const HEADING_ELEMENT_MAP = {\n [BentoEmptyStateVariant.FULL_PAGE]: 'h2',\n [BentoEmptyStateVariant.EMBEDDED]: 'h3',\n [BentoEmptyStateVariant.BASIC]: 'h3',\n [BentoEmptyStateVariant.CONDENSED]: 'div',\n };\n\n const props = defineProps({\n /**\n * Defines the button at the end of the component.\n */\n action: {\n type: Object as PropType<BentoButtonActionObject>,\n default: null,\n validator: (value: BentoButtonActionObject) => Boolean(value.title && value.event),\n },\n\n /**\n * The empty state description.\n * Gives additional details to the issue.\n * This can be used or the default slot\n */\n description: {\n type: String,\n default: null,\n },\n\n /**\n * Sets the heading HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n headingEl: {\n type: String as PropType<`${BentoTypographyElement}`>,\n default: null,\n validator: (value: BentoTypographyElement) => Object.values(BentoTypographyElement).includes(value),\n },\n\n /**\n * Name of the illustration for the empty state.\n */\n image: {\n type: String as PropType<`${BentoEmptyStateImage}`>,\n default: null,\n validator: (value: BentoEmptyStateImage) => Object.values(BentoEmptyStateImage).includes(value),\n },\n\n /**\n * The empty state heading.\n * Should clearly explain the issue.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Types of different empty states\n * @values full-page, embedded, basic, condensed\n */\n variant: {\n type: String as PropType<`${BentoEmptyStateVariant}`>,\n default: 'basic',\n validator: (value: BentoEmptyStateVariant) => Object.values(BentoEmptyStateVariant).includes(value),\n },\n });\n\n const rootRef = ref<HTMLDivElement>(null);\n const containerWidth = ref(0);\n\n const isBelowBreakpoint = computed(() => containerWidth.value < WIDTH_BREAKPOINT);\n\n const imageVariant = computed<BentoEmptyStateImageVariant>(() => {\n switch (props.variant) {\n case BentoEmptyStateVariant.FULL_PAGE:\n return isBelowBreakpoint.value ? BentoEmptyStateImageVariant.SMALL : BentoEmptyStateImageVariant.LARGE;\n case BentoEmptyStateVariant.EMBEDDED:\n return isBelowBreakpoint.value ? null : BentoEmptyStateImageVariant.SMALL;\n default:\n return null;\n }\n });\n\n const imageSvg = ref('');\n\n watch(\n [() => props.image, imageVariant],\n async () => {\n if (props.image && imageVariant.value) {\n // rollup only supports one variable in a dynamic path\n /* v8 ignore next 4 */\n if (imageVariant.value === 'small') {\n imageSvg.value = (await import(`./assets/small/${props.image}.svg`)).default;\n } else {\n imageSvg.value = (await import(`./assets/large/${props.image}.svg`)).default;\n }\n }\n },\n { immediate: true }\n );\n\n const imageConditionalClasses = computed(() => ({\n 'b-empty-state__image--small': imageVariant.value === 'small',\n 'b-empty-state__image--large': imageVariant.value === 'large',\n }));\n\n const headingElement = computed(\n () => (props.headingEl || HEADING_ELEMENT_MAP[props.variant]) as BentoTypographyElement\n );\n\n const headingProps = computed(() => ({\n el: headingElement.value,\n medium: props.variant !== BentoEmptyStateVariant.CONDENSED,\n strongest: props.variant === BentoEmptyStateVariant.CONDENSED,\n variant: (props.variant === BentoEmptyStateVariant.CONDENSED ? 'body' : 'title') as BentoTypographyVariant,\n }));\n\n const actionVariant = computed<`${BentoButtonVariant}`>(() => {\n switch (props.variant) {\n case BentoEmptyStateVariant.FULL_PAGE:\n return 'primary';\n case BentoEmptyStateVariant.CONDENSED:\n return 'tertiary';\n default:\n return 'secondary';\n }\n });\n\n // Lifecycle\n watch(rootRef, () => {\n // Use ResizeObserver so that image is only fetched if needed (visible).\n observeSizeOfElement(rootRef.value, () => {\n if (rootRef.value) {\n containerWidth.value = rootRef.value.offsetWidth;\n }\n });\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Empty states are moments in the user experience when there is nothing to display.\n * This component can be used to provide:\n * - Information about system status\n * - Contextual learning cues\n * - Direct pathways for key tasks\n *\n * @example\n * import { BentoEmptyState } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoEmptyState },\n * template: `\n * <bento-empty-state\n * title=\"No results were found\"\n * image=\"no-results-found\"\n * variant=\"full-page\"\n * :action=\"{ title: 'Reset filters', event: () => {} }\"\n * >\n * Try a different term or reset search filters\n * </bento-empty-state>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./empty-state.scss\" />\n"],"names":["BentoEmptyStateVariant","BentoEmptyStateVariant2","BentoEmptyStateImage","BentoEmptyStateImage2","BentoEmptyStateImageVariant","BentoEmptyStateImageVariant2","__default__","WIDTH_BREAKPOINT","HEADING_ELEMENT_MAP","rootRef","ref","containerWidth","isBelowBreakpoint","computed","imageVariant","props","imageSvg","watch","__variableDynamicImportRuntimeHelper","imageConditionalClasses","headingElement","headingProps","actionVariant","observeSizeOfElement"],"mappings":";;;;;;;;;;;;;;;;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,YAAA,aAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,eAAA,iBACAA,EAAA,eAAA,iBACAA,EAAA,eAAA,iBACAA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EAAA,WAAA,GAAA;AAAA,IACkB;AAGtB,UAAAI,IAAAN,EAAA,OAAA;AAAA,MAAgD,+BAAAC,EAAA,UAAA;AAAA,MACU,+BAAAA,EAAA,UAAA;AAAA,IACA,EAAA,GAG1DM,IAAAP;AAAA,MAAuB,MAAAE,EAAA,aAAAP,EAAAO,EAAA,OAAA;AAAA,IACwC,GAG/DM,IAAAR,EAAA,OAAA;AAAA,MAAqC,IAAAO,EAAA;AAAA,MACd,QAAAL,EAAA,YAAAf,EAAA;AAAA,MAC8B,WAAAe,EAAA,YAAAf,EAAA;AAAA,MACG,SAAAe,EAAA,YAAAf,EAAA,YAAA,SAAA;AAAA,IACoB,EAAA,GAG5EsB,IAAAT,EAAA,MAAA;AACI,cAAAE,EAAA,SAAA;AAAA,QAAuB,KAAAf,EAAA;AAEf,iBAAA;AAAA,QAAO,KAAAA,EAAA;AAEP,iBAAA;AAAA,QAAO;AAEP,iBAAA;AAAA,MAAO;AAAA,IACf,CAAA;AAIJ,WAAAiB,EAAAR,GAAA,MAAA;AAEI,MAAAc,EAAAd,EAAA,OAAA,MAAA;AACI,QAAAA,EAAA,UACIE,EAAA,QAAAF,EAAA,MAAA;AAAA,MACJ,CAAA;AAAA,IACH,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as o, computed as i } from "vue";
|
|
2
|
-
import { B as p } from "./info-icon.
|
|
3
|
-
import { B as a } from "./typography.
|
|
2
|
+
import { B as p } from "./info-icon.B4P_Zi58.js";
|
|
3
|
+
import { B as a } from "./typography.w3m-EY4E.js";
|
|
4
4
|
import { u as n } from "./i18n.BQkEbtPM.js";
|
|
5
5
|
import { n as l } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
6
|
import { C as _ } from "./cross-circle-fill.DTDtgLMf.js";
|
|
@@ -118,4 +118,4 @@ export {
|
|
|
118
118
|
E,
|
|
119
119
|
S as F
|
|
120
120
|
};
|
|
121
|
-
//# sourceMappingURL=error-message.
|
|
121
|
+
//# sourceMappingURL=error-message.PWgUfpvo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-message.
|
|
1
|
+
{"version":3,"file":"error-message.PWgUfpvo.js","sources":["../../src/components/internal/field-label/field-label.vue","../../src/components/internal/error-message/error-message.vue"],"sourcesContent":["<template>\n <label class=\"b-field-label\" :class=\"conditionalClasses\">\n <bento-typography el=\"span\" stronger>\n <template v-if=\"label\">{{ label }}</template>\n <template v-else><slot></slot></template>\n </bento-typography>\n <bento-typography v-if=\"!!tooltipText\" el=\"span\" class=\"b-field-label__tooltip-wrapper\">\n <bento-info-icon :tooltip-text=\"tooltipText\" class=\"b-field-label__tooltip\" />\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-field-label__requirement\" el=\"span\"\n >({{ t('required') }})</bento-typography\n >\n <bento-typography v-else-if=\"optional\" class=\"b-field-label__requirement\" el=\"span\"\n >({{ t('optional') }})</bento-typography\n >\n </label>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography } from '@/components/typography';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n import { computed } from 'vue';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n /**\n * Field label\n */\n label: {\n type: String,\n default: null,\n },\n /**\n * Sets the field as optional\n */\n optional: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets the field as required\n */\n required: {\n type: Boolean,\n default: false,\n },\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: {\n type: String,\n default: null,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const conditionalClasses = computed(() => ({ 'b-field-label--condensed': props.condensed }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to handle the labels for all field components\n\n * @example\n * import { FieldLabel } from '@/components/internal/field-label';\n *\n * export default {\n * components: { FieldLabel },\n * template: `\n * <field-label label=\"Label\" tooltip-text=\"Tooltip info\" required />\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/internal/field-label/field-label.scss\" />\n","<template>\n <bento-typography :id=\"$attrs.id\" class=\"b-error-message\" el=\"span\" aria-live=\"polite\">\n <div class=\"b-error-message__icon\">\n <cross-circle-icon :svg-title=\"t('error')\" />\n </div>\n {{ errorMessage }}\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import CrossCircleIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * An error message component should be used whenever it is necessary to add an error message to a component.\n * If adding to a form component, the proper accessibility measures should be taken when necessary\n * (ex. associating an element with this one using aria-describedby).\n\n * @example\n * import { ErrorMessage } from '@/components/internal/error-message';\n *\n * export default {\n * components: { ErrorMessage },\n * template: `\n * <error-message :error-message=\"errorMessage\" />\n * `\n * }\n */\n\n defineProps({\n /**\n * The rendered error message\n */\n errorMessage: {\n type: String,\n required: true,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n name: 'error-message',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/internal/error-message/error-message.scss\" />\n"],"names":["__default__$1","messages$1","t","useI18n","conditionalClasses","computed","props","__default__","messages"],"mappings":";;;;;;;;;;;;;;;;;;;;GAmFIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBArBA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,OAAA,EAAA,4BAAAC,EAAA,UAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;GCnBAC,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;AAPA,UAAA,EAAA,GAAAN,EAAA,IAAAC,EAAA;;;;;;;;;;;;;;;;"}
|