@adyen/bento-vue2 1.60.0 → 1.60.1
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 +201 -0
- package/dist/@types/index.d.ts +17710 -0
- package/dist/@types/use-form-v4.d.ts +86 -0
- package/dist/accordion.js +6 -0
- package/dist/accordion.js.map +1 -0
- package/dist/action-bar.js +5 -0
- package/dist/action-bar.js.map +1 -0
- package/dist/alert.js +8 -0
- package/dist/alert.js.map +1 -0
- package/dist/assets/accordion-item.css +1 -0
- package/dist/assets/action-bar.css +1 -0
- package/dist/assets/alert.css +1 -0
- package/dist/assets/avatar.css +1 -0
- package/dist/assets/base-button.css +1 -0
- package/dist/assets/base-modal.css +1 -0
- package/dist/assets/button-actions-with-menu.css +1 -0
- package/dist/assets/button-actions.css +1 -0
- package/dist/assets/button.css +1 -0
- package/dist/assets/calendar.css +1 -0
- package/dist/assets/card.css +1 -0
- package/dist/assets/checkbox-group.css +1 -0
- package/dist/assets/checkbox-input.css +1 -0
- package/dist/assets/checkbox.css +1 -0
- package/dist/assets/chip.css +1 -0
- package/dist/assets/code-snippet.css +1 -0
- package/dist/assets/controls-group.css +1 -0
- package/dist/assets/copy.css +1 -0
- package/dist/assets/country.css +1 -0
- package/dist/assets/currency.css +1 -0
- package/dist/assets/dashboard-section.css +1 -0
- package/dist/assets/dashed-underline.css +1 -0
- package/dist/assets/data-grid-template.css +1 -0
- package/dist/assets/data-grid.css +1 -0
- package/dist/assets/date-picker.css +1 -0
- package/dist/assets/date-range-picker.css +1 -0
- package/dist/assets/date.css +1 -0
- package/dist/assets/dialog-page.css +1 -0
- package/dist/assets/divider.css +1 -0
- package/dist/assets/dropdown-default-textbox.css +1 -0
- package/dist/assets/dropdown-tag.css +1 -0
- package/dist/assets/dropdown.css +1 -0
- package/dist/assets/empty-state.css +1 -0
- package/dist/assets/error-message.css +1 -0
- package/dist/assets/file-uploader.css +1 -0
- package/dist/assets/filter-bar.css +1 -0
- package/dist/assets/fixed-scroller.css +1 -0
- package/dist/assets/focus-trap.css +1 -0
- package/dist/assets/footer-actions.css +1 -0
- package/dist/assets/form-layout-title.css +1 -0
- package/dist/assets/grid-layout.css +1 -0
- package/dist/assets/header-with-views.css +1 -0
- package/dist/assets/header.css +1 -0
- package/dist/assets/info-icon-with-popover.css +1 -0
- package/dist/assets/info-icon.css +1 -0
- package/dist/assets/input-field-password.css +1 -0
- package/dist/assets/input-field-phone-number.css +1 -0
- package/dist/assets/input-field.css +1 -0
- package/dist/assets/inspector.css +1 -0
- package/dist/assets/layout-row.css +1 -0
- package/dist/assets/link.css +1 -0
- package/dist/assets/listbox-option-tag.css +1 -0
- package/dist/assets/loading-indicator.css +1 -0
- package/dist/assets/main.css +1 -0
- package/dist/assets/menu.css +1 -0
- package/dist/assets/modal-fullscreen.css +1 -0
- package/dist/assets/pagination.css +1 -0
- package/dist/assets/payment-method.css +1 -0
- package/dist/assets/popover.css +1 -0
- package/dist/assets/popper-container.css +1 -0
- package/dist/assets/promo-banner.css +1 -0
- package/dist/assets/radio-group.css +1 -0
- package/dist/assets/radio-input.css +1 -0
- package/dist/assets/rich-text-editor.css +1 -0
- package/dist/assets/search-bar.css +1 -0
- package/dist/assets/secondary-nav.css +1 -0
- package/dist/assets/segmented-control.css +1 -0
- package/dist/assets/selection-card-group.css +1 -0
- package/dist/assets/sidepanel.css +1 -0
- package/dist/assets/status.css +1 -0
- package/dist/assets/step.css +1 -0
- package/dist/assets/structured-list-item.css +1 -0
- package/dist/assets/summary-grid.css +1 -0
- package/dist/assets/tabs.css +1 -0
- package/dist/assets/tag.css +1 -0
- package/dist/assets/teleport.css +1 -0
- package/dist/assets/textarea.css +1 -0
- package/dist/assets/timeline-item.css +1 -0
- package/dist/assets/toast.css +1 -0
- package/dist/assets/toggle-button.css +1 -0
- package/dist/assets/toggle.css +1 -0
- package/dist/assets/tooltip.css +1 -0
- package/dist/assets/tutorial.css +1 -0
- package/dist/assets/typography.css +1 -0
- package/dist/assets/use-cached-selected-values.css +1 -0
- package/dist/avatar.js +5 -0
- package/dist/avatar.js.map +1 -0
- package/dist/button.js +16 -0
- package/dist/button.js.map +1 -0
- package/dist/card.js +7 -0
- package/dist/card.js.map +1 -0
- package/dist/checkbox.js +11 -0
- package/dist/checkbox.js.map +1 -0
- package/dist/chip.js +5 -0
- package/dist/chip.js.map +1 -0
- package/dist/chunks/1-generic-use.CZhwP2Yc.js +5 -0
- package/dist/chunks/1-generic-use.CZhwP2Yc.js.map +1 -0
- package/dist/chunks/1-generic-use.R6x8PEGA.js +5 -0
- package/dist/chunks/1-generic-use.R6x8PEGA.js.map +1 -0
- package/dist/chunks/2-generic-use.CNKjB4B7.js +5 -0
- package/dist/chunks/2-generic-use.CNKjB4B7.js.map +1 -0
- package/dist/chunks/2-generic-use.w0fUhovx.js +5 -0
- package/dist/chunks/2-generic-use.w0fUhovx.js.map +1 -0
- package/dist/chunks/3-generic-use.BLEzR04g.js +5 -0
- package/dist/chunks/3-generic-use.BLEzR04g.js.map +1 -0
- package/dist/chunks/3-generic-use.D3NFHgI4.js +5 -0
- package/dist/chunks/3-generic-use.D3NFHgI4.js.map +1 -0
- package/dist/chunks/4-generic-use.CULEpvgj.js +5 -0
- package/dist/chunks/4-generic-use.CULEpvgj.js.map +1 -0
- package/dist/chunks/4-generic-use.D82y3n39.js +5 -0
- package/dist/chunks/4-generic-use.D82y3n39.js.map +1 -0
- package/dist/chunks/_commonjsHelpers.C6fGbg64.js +7 -0
- package/dist/chunks/_commonjsHelpers.C6fGbg64.js.map +1 -0
- package/dist/chunks/_plugin-vue2_normalizer.CeySl7Fu.js +11 -0
- package/dist/chunks/_plugin-vue2_normalizer.CeySl7Fu.js.map +1 -0
- package/dist/chunks/accordion-item.C4tyRMCt.js +116 -0
- package/dist/chunks/accordion-item.C4tyRMCt.js.map +1 -0
- package/dist/chunks/action-bar.CMqiD6vc.js +161 -0
- package/dist/chunks/action-bar.CMqiD6vc.js.map +1 -0
- package/dist/chunks/adding-payment-methods.BJZLPxtM.js +5 -0
- package/dist/chunks/adding-payment-methods.BJZLPxtM.js.map +1 -0
- package/dist/chunks/adding-payment-methods.Dle8zt43.js +5 -0
- package/dist/chunks/adding-payment-methods.Dle8zt43.js.map +1 -0
- package/dist/chunks/adyen-giving.Ffw_DlJK.js +5 -0
- package/dist/chunks/adyen-giving.Ffw_DlJK.js.map +1 -0
- package/dist/chunks/adyen-giving.LiKHj_jY.js +5 -0
- package/dist/chunks/adyen-giving.LiKHj_jY.js.map +1 -0
- package/dist/chunks/alert.Du9NfW-V.js +103 -0
- package/dist/chunks/alert.Du9NfW-V.js.map +1 -0
- package/dist/chunks/aria-label.CaUURpnB.js +13 -0
- package/dist/chunks/aria-label.CaUURpnB.js.map +1 -0
- package/dist/chunks/avatar.BgwjpLQO.js +71 -0
- package/dist/chunks/avatar.BgwjpLQO.js.map +1 -0
- package/dist/chunks/base-button.-gx_u8Bd.js +86 -0
- package/dist/chunks/base-button.-gx_u8Bd.js.map +1 -0
- package/dist/chunks/base-modal.keys.C2PQXcE2.js +5 -0
- package/dist/chunks/base-modal.keys.C2PQXcE2.js.map +1 -0
- package/dist/chunks/base-modal.xA_DhHx9.js +373 -0
- package/dist/chunks/base-modal.xA_DhHx9.js.map +1 -0
- package/dist/chunks/bin.DuebwJYu.js +24 -0
- package/dist/chunks/bin.DuebwJYu.js.map +1 -0
- package/dist/chunks/button-actions-with-menu.S7i4V-8E.js +166 -0
- package/dist/chunks/button-actions-with-menu.S7i4V-8E.js.map +1 -0
- package/dist/chunks/button-actions.BFtzsfNe.js +194 -0
- package/dist/chunks/button-actions.BFtzsfNe.js.map +1 -0
- package/dist/chunks/button.BuD-IsW5.js +99 -0
- package/dist/chunks/button.BuD-IsW5.js.map +1 -0
- package/dist/chunks/calendar.DQiq_EoU.js +1167 -0
- package/dist/chunks/calendar.DQiq_EoU.js.map +1 -0
- package/dist/chunks/card.Bk7Lz1GS.js +123 -0
- package/dist/chunks/card.Bk7Lz1GS.js.map +1 -0
- package/dist/chunks/checkbox-group.CossCRls.js +152 -0
- package/dist/chunks/checkbox-group.CossCRls.js.map +1 -0
- package/dist/chunks/checkbox-input.Dr1GS2BZ.js +137 -0
- package/dist/chunks/checkbox-input.Dr1GS2BZ.js.map +1 -0
- package/dist/chunks/checkbox.DkDqMVeb.js +176 -0
- package/dist/chunks/checkbox.DkDqMVeb.js.map +1 -0
- package/dist/chunks/checkmark-circle-fill.DZBl7CeY.js +24 -0
- package/dist/chunks/checkmark-circle-fill.DZBl7CeY.js.map +1 -0
- package/dist/chunks/checkmark-small.C8T8ISN6.js +24 -0
- package/dist/chunks/checkmark-small.C8T8ISN6.js.map +1 -0
- package/dist/chunks/chevron-left.DOMTgGel.js +43 -0
- package/dist/chunks/chevron-left.DOMTgGel.js.map +1 -0
- package/dist/chunks/chevron-up.CSVyoaTy.js +43 -0
- package/dist/chunks/chevron-up.CSVyoaTy.js.map +1 -0
- package/dist/chunks/chip.bZEhHfIk.js +63 -0
- package/dist/chunks/chip.bZEhHfIk.js.map +1 -0
- package/dist/chunks/click-outside.C1Ud8AA2.js +23 -0
- package/dist/chunks/click-outside.C1Ud8AA2.js.map +1 -0
- package/dist/chunks/code-snippet.BlYhf-Dt.js +259 -0
- package/dist/chunks/code-snippet.BlYhf-Dt.js.map +1 -0
- package/dist/chunks/codemirror.Zv80n3Z2.js +14628 -0
- package/dist/chunks/codemirror.Zv80n3Z2.js.map +1 -0
- package/dist/chunks/controls-group.C4CHrb6Y.js +81 -0
- package/dist/chunks/controls-group.C4CHrb6Y.js.map +1 -0
- package/dist/chunks/copy.Bod4H2Dk.js +129 -0
- package/dist/chunks/copy.Bod4H2Dk.js.map +1 -0
- package/dist/chunks/country.Df7erZov.js +94 -0
- package/dist/chunks/country.Df7erZov.js.map +1 -0
- package/dist/chunks/country.types.C0Q_hhgJ.js +269 -0
- package/dist/chunks/country.types.C0Q_hhgJ.js.map +1 -0
- package/dist/chunks/cross-circle-fill-small.YhLgeipP.js +24 -0
- package/dist/chunks/cross-circle-fill-small.YhLgeipP.js.map +1 -0
- package/dist/chunks/cross-circle-fill.Ra0-PIUo.js +24 -0
- package/dist/chunks/cross-circle-fill.Ra0-PIUo.js.map +1 -0
- package/dist/chunks/cross-small.CZqsjZDz.js +24 -0
- package/dist/chunks/cross-small.CZqsjZDz.js.map +1 -0
- package/dist/chunks/cross.CJ5EEL2c.js +24 -0
- package/dist/chunks/cross.CJ5EEL2c.js.map +1 -0
- package/dist/chunks/currency.B1F9YOIx.js +106 -0
- package/dist/chunks/currency.B1F9YOIx.js.map +1 -0
- package/dist/chunks/dashboard-section.Dx6eYon4.js +102 -0
- package/dist/chunks/dashboard-section.Dx6eYon4.js.map +1 -0
- package/dist/chunks/dashed-underline.CY5J4pZp.js +65 -0
- package/dist/chunks/dashed-underline.CY5J4pZp.js.map +1 -0
- package/dist/chunks/data-grid-template.CVl3PU0v.js +109 -0
- package/dist/chunks/data-grid-template.CVl3PU0v.js.map +1 -0
- package/dist/chunks/data-grid-template.keys.2_AkxuNT.js +5 -0
- package/dist/chunks/data-grid-template.keys.2_AkxuNT.js.map +1 -0
- package/dist/chunks/data-grid.BZaXKTLk.js +2782 -0
- package/dist/chunks/data-grid.BZaXKTLk.js.map +1 -0
- package/dist/chunks/date-input.BqBdAO1E.js +17 -0
- package/dist/chunks/date-input.BqBdAO1E.js.map +1 -0
- package/dist/chunks/date-picker.lrT6LXe-.js +235 -0
- package/dist/chunks/date-picker.lrT6LXe-.js.map +1 -0
- package/dist/chunks/date-range-picker.Djt5mYvh.js +977 -0
- package/dist/chunks/date-range-picker.Djt5mYvh.js.map +1 -0
- package/dist/chunks/date.dYFFEunA.js +987 -0
- package/dist/chunks/date.dYFFEunA.js.map +1 -0
- package/dist/chunks/debounce.DUTu11PS.js +10 -0
- package/dist/chunks/debounce.DUTu11PS.js.map +1 -0
- package/dist/chunks/dialog-page.C5r6tM57.js +131 -0
- package/dist/chunks/dialog-page.C5r6tM57.js.map +1 -0
- package/dist/chunks/directive.Cbdox5VL.js +23 -0
- package/dist/chunks/directive.Cbdox5VL.js.map +1 -0
- package/dist/chunks/divider.Cc4JFWG_.js +35 -0
- package/dist/chunks/divider.Cc4JFWG_.js.map +1 -0
- package/dist/chunks/dot.CnkXzRn3.js +24 -0
- package/dist/chunks/dot.CnkXzRn3.js.map +1 -0
- package/dist/chunks/dropdown-default-textbox.AUsF-RIc.js +348 -0
- package/dist/chunks/dropdown-default-textbox.AUsF-RIc.js.map +1 -0
- package/dist/chunks/dropdown-tag.CY3nZ50z.js +215 -0
- package/dist/chunks/dropdown-tag.CY3nZ50z.js.map +1 -0
- package/dist/chunks/dropdown.Cx-3TGBk.js +818 -0
- package/dist/chunks/dropdown.Cx-3TGBk.js.map +1 -0
- package/dist/chunks/empty-state.IvvHHQ35.js +151 -0
- package/dist/chunks/empty-state.IvvHHQ35.js.map +1 -0
- package/dist/chunks/error-message.BAE9B9-N.js +121 -0
- package/dist/chunks/error-message.BAE9B9-N.js.map +1 -0
- package/dist/chunks/es6.n1ewaW31.js +11 -0
- package/dist/chunks/es6.n1ewaW31.js.map +1 -0
- package/dist/chunks/events.CMzGybJJ.js +47 -0
- package/dist/chunks/events.CMzGybJJ.js.map +1 -0
- package/dist/chunks/expand.C263WARj.js +24 -0
- package/dist/chunks/expand.C263WARj.js.map +1 -0
- package/dist/chunks/file-uploader.E18P6eyS.js +1913 -0
- package/dist/chunks/file-uploader.E18P6eyS.js.map +1 -0
- package/dist/chunks/filter-bar.D6IL1UDu.js +2288 -0
- package/dist/chunks/filter-bar.D6IL1UDu.js.map +1 -0
- package/dist/chunks/fixed-scroller.D0a6q8_i.js +106 -0
- package/dist/chunks/fixed-scroller.D0a6q8_i.js.map +1 -0
- package/dist/chunks/focus-trap.C-wIQqpO.js +499 -0
- package/dist/chunks/focus-trap.C-wIQqpO.js.map +1 -0
- package/dist/chunks/footer-actions.BgpSnSSn.js +96 -0
- package/dist/chunks/footer-actions.BgpSnSSn.js.map +1 -0
- package/dist/chunks/form-layout-title.DBCY18f8.js +190 -0
- package/dist/chunks/form-layout-title.DBCY18f8.js.map +1 -0
- package/dist/chunks/form-layout.types.D3EKzbE7.js +5 -0
- package/dist/chunks/form-layout.types.D3EKzbE7.js.map +1 -0
- package/dist/chunks/generate-uid.NJ8tVoha.js +32 -0
- package/dist/chunks/generate-uid.NJ8tVoha.js.map +1 -0
- package/dist/chunks/get-date-locale.BN8xEjY0.js +1735 -0
- package/dist/chunks/get-date-locale.BN8xEjY0.js.map +1 -0
- package/dist/chunks/get-slot-text.BQS5Olxm.js +12 -0
- package/dist/chunks/get-slot-text.BQS5Olxm.js.map +1 -0
- package/dist/chunks/grid-layout.HvTAa4to.js +76 -0
- package/dist/chunks/grid-layout.HvTAa4to.js.map +1 -0
- package/dist/chunks/header-with-views.DAdbhhG9.js +1549 -0
- package/dist/chunks/header-with-views.DAdbhhG9.js.map +1 -0
- package/dist/chunks/header.8SId1U5r.js +187 -0
- package/dist/chunks/header.8SId1U5r.js.map +1 -0
- package/dist/chunks/i18n.BQkEbtPM.js +31 -0
- package/dist/chunks/i18n.BQkEbtPM.js.map +1 -0
- package/dist/chunks/image.C2D2hKat.js +56 -0
- package/dist/chunks/image.C2D2hKat.js.map +1 -0
- package/dist/chunks/index.BDuTpjD8.js +40 -0
- package/dist/chunks/index.BDuTpjD8.js.map +1 -0
- package/dist/chunks/index.BdrLbvtJ.js +529 -0
- package/dist/chunks/index.BdrLbvtJ.js.map +1 -0
- package/dist/chunks/index.BxBB1rsx.js +15 -0
- package/dist/chunks/index.BxBB1rsx.js.map +1 -0
- package/dist/chunks/index.Cl4_42j5.js +8 -0
- package/dist/chunks/index.Cl4_42j5.js.map +1 -0
- package/dist/chunks/index.DD7TppDb.js +10 -0
- package/dist/chunks/index.DD7TppDb.js.map +1 -0
- package/dist/chunks/info-icon-with-popover.XZqkxPsB.js +71 -0
- package/dist/chunks/info-icon-with-popover.XZqkxPsB.js.map +1 -0
- package/dist/chunks/info-icon.C1xOlhYj.js +41 -0
- package/dist/chunks/info-icon.C1xOlhYj.js.map +1 -0
- package/dist/chunks/info.4d_mJHvT.js +24 -0
- package/dist/chunks/info.4d_mJHvT.js.map +1 -0
- package/dist/chunks/input-field-password.lK0Im1eg.js +251 -0
- package/dist/chunks/input-field-password.lK0Im1eg.js.map +1 -0
- package/dist/chunks/input-field-phone-number.BnjBqUKg.js +3097 -0
- package/dist/chunks/input-field-phone-number.BnjBqUKg.js.map +1 -0
- package/dist/chunks/input-field.B8HxtNIv.js +152 -0
- package/dist/chunks/input-field.B8HxtNIv.js.map +1 -0
- package/dist/chunks/inspector.CegHqvEW.js +117 -0
- package/dist/chunks/inspector.CegHqvEW.js.map +1 -0
- package/dist/chunks/inspector.types.DyHwE18g.js +5 -0
- package/dist/chunks/inspector.types.DyHwE18g.js.map +1 -0
- package/dist/chunks/internal-error.BLZodVBE.js +5 -0
- package/dist/chunks/internal-error.BLZodVBE.js.map +1 -0
- package/dist/chunks/internal-error.BmrwJFpR.js +5 -0
- package/dist/chunks/internal-error.BmrwJFpR.js.map +1 -0
- package/dist/chunks/keyboard-navigation.pB8weElW.js +66 -0
- package/dist/chunks/keyboard-navigation.pB8weElW.js.map +1 -0
- package/dist/chunks/layout-row.C_F2wX6d.js +87 -0
- package/dist/chunks/layout-row.C_F2wX6d.js.map +1 -0
- package/dist/chunks/link.D0P79Toh.js +95 -0
- package/dist/chunks/link.D0P79Toh.js.map +1 -0
- package/dist/chunks/listbox-option-tag.CczGPhWH.js +44 -0
- package/dist/chunks/listbox-option-tag.CczGPhWH.js.map +1 -0
- package/dist/chunks/loading-indicator.z8COalOc.js +48 -0
- package/dist/chunks/loading-indicator.z8COalOc.js.map +1 -0
- package/dist/chunks/menu.CT0SIn4v.js +601 -0
- package/dist/chunks/menu.CT0SIn4v.js.map +1 -0
- package/dist/chunks/modal-fullscreen.keys.CMba3hYp.js +5 -0
- package/dist/chunks/modal-fullscreen.keys.CMba3hYp.js.map +1 -0
- package/dist/chunks/modal-fullscreen.tofT1h0P.js +202 -0
- package/dist/chunks/modal-fullscreen.tofT1h0P.js.map +1 -0
- package/dist/chunks/modal.CiYtGu6u.js +445 -0
- package/dist/chunks/modal.CiYtGu6u.js.map +1 -0
- package/dist/chunks/no-results-found.Bg_ZcEid.js +5 -0
- package/dist/chunks/no-results-found.Bg_ZcEid.js.map +1 -0
- package/dist/chunks/no-results-found.BqvYsBR6.js +5 -0
- package/dist/chunks/no-results-found.BqvYsBR6.js.map +1 -0
- package/dist/chunks/notifications-cleared.BMZk37uf.js +5 -0
- package/dist/chunks/notifications-cleared.BMZk37uf.js.map +1 -0
- package/dist/chunks/notifications-cleared.C7W9ZXY7.js +5 -0
- package/dist/chunks/notifications-cleared.C7W9ZXY7.js.map +1 -0
- package/dist/chunks/on-click-outside.D9aY9g8G.js +101 -0
- package/dist/chunks/on-click-outside.D9aY9g8G.js.map +1 -0
- package/dist/chunks/page-not-found.COJLPVaU.js +5 -0
- package/dist/chunks/page-not-found.COJLPVaU.js.map +1 -0
- package/dist/chunks/page-not-found.DWW6W-PZ.js +5 -0
- package/dist/chunks/page-not-found.DWW6W-PZ.js.map +1 -0
- package/dist/chunks/pagination.B-EP9Lkq.js +338 -0
- package/dist/chunks/pagination.B-EP9Lkq.js.map +1 -0
- package/dist/chunks/payment-method.Cx4nPDtE.js +76 -0
- package/dist/chunks/payment-method.Cx4nPDtE.js.map +1 -0
- package/dist/chunks/payment-method.types.BqtH7RM2.js +5 -0
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -0
- package/dist/chunks/planned-maintenance.C61sWB9h.js +5 -0
- package/dist/chunks/planned-maintenance.C61sWB9h.js.map +1 -0
- package/dist/chunks/planned-maintenance.jmWYTdet.js +5 -0
- package/dist/chunks/planned-maintenance.jmWYTdet.js.map +1 -0
- package/dist/chunks/popover.COaHa4ES.js +295 -0
- package/dist/chunks/popover.COaHa4ES.js.map +1 -0
- package/dist/chunks/popper-container.DIFqmRsp.js +1393 -0
- package/dist/chunks/popper-container.DIFqmRsp.js.map +1 -0
- package/dist/chunks/promo-banner.DJpA7Whg.js +70 -0
- package/dist/chunks/promo-banner.DJpA7Whg.js.map +1 -0
- package/dist/chunks/radio-group.CzsbH4_F.js +229 -0
- package/dist/chunks/radio-group.CzsbH4_F.js.map +1 -0
- package/dist/chunks/radio-input.uJAhxKRs.js +90 -0
- package/dist/chunks/radio-input.uJAhxKRs.js.map +1 -0
- package/dist/chunks/referrals.BvtT-kQS.js +5 -0
- package/dist/chunks/referrals.BvtT-kQS.js.map +1 -0
- package/dist/chunks/referrals.aX8WZigH.js +5 -0
- package/dist/chunks/referrals.aX8WZigH.js.map +1 -0
- package/dist/chunks/refresh.Bc9FzGjJ.js +24 -0
- package/dist/chunks/refresh.Bc9FzGjJ.js.map +1 -0
- package/dist/chunks/resize.Bqks3WUm.js +15 -0
- package/dist/chunks/resize.Bqks3WUm.js.map +1 -0
- package/dist/chunks/rich-text-editor.C4NdjtLA.js +6203 -0
- package/dist/chunks/rich-text-editor.C4NdjtLA.js.map +1 -0
- package/dist/chunks/search-bar.B4u_IgiI.js +97 -0
- package/dist/chunks/search-bar.B4u_IgiI.js.map +1 -0
- package/dist/chunks/search.DLtglc02.js +24 -0
- package/dist/chunks/search.DLtglc02.js.map +1 -0
- package/dist/chunks/secondary-nav.EROJ_sJQ.js +112 -0
- package/dist/chunks/secondary-nav.EROJ_sJQ.js.map +1 -0
- package/dist/chunks/segmented-control.B-uxKqMN.js +112 -0
- package/dist/chunks/segmented-control.B-uxKqMN.js.map +1 -0
- package/dist/chunks/segmented-control.types.BHRLV8KU.js +5 -0
- package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -0
- package/dist/chunks/selection-card-group.CnvREAh5.js +299 -0
- package/dist/chunks/selection-card-group.CnvREAh5.js.map +1 -0
- package/dist/chunks/show.e4LEpZKG.js +43 -0
- package/dist/chunks/show.e4LEpZKG.js.map +1 -0
- package/dist/chunks/sidepanel.3EBWM8JV.js +210 -0
- package/dist/chunks/sidepanel.3EBWM8JV.js.map +1 -0
- package/dist/chunks/sidepanel.keys.R0DKQuYx.js +5 -0
- package/dist/chunks/sidepanel.keys.R0DKQuYx.js.map +1 -0
- package/dist/chunks/status.types.p_TCvoo0.js +36 -0
- package/dist/chunks/status.types.p_TCvoo0.js.map +1 -0
- package/dist/chunks/step.CuOpi-Ye.js +217 -0
- package/dist/chunks/step.CuOpi-Ye.js.map +1 -0
- package/dist/chunks/structured-list-item.rOTJM0uc.js +87 -0
- package/dist/chunks/structured-list-item.rOTJM0uc.js.map +1 -0
- package/dist/chunks/success.DhioLvPD.js +5 -0
- package/dist/chunks/success.DhioLvPD.js.map +1 -0
- package/dist/chunks/success.nNwxJRBS.js +5 -0
- package/dist/chunks/success.nNwxJRBS.js.map +1 -0
- package/dist/chunks/summary-grid.keys.CxTf_FOc.js +6 -0
- package/dist/chunks/summary-grid.keys.CxTf_FOc.js.map +1 -0
- package/dist/chunks/summary-grid.types.Bg1Y7i-F.js +301 -0
- package/dist/chunks/summary-grid.types.Bg1Y7i-F.js.map +1 -0
- package/dist/chunks/tabs.DX_Gq12z.js +205 -0
- package/dist/chunks/tabs.DX_Gq12z.js.map +1 -0
- package/dist/chunks/tabs.keys.Bc2pSKRw.js +7 -0
- package/dist/chunks/tabs.keys.Bc2pSKRw.js.map +1 -0
- package/dist/chunks/tag.DDjyf2hd.js +44 -0
- package/dist/chunks/tag.DDjyf2hd.js.map +1 -0
- package/dist/chunks/teleport.BV6zrDjA.js +128 -0
- package/dist/chunks/teleport.BV6zrDjA.js.map +1 -0
- package/dist/chunks/textarea.0PapD8Nl.js +200 -0
- package/dist/chunks/textarea.0PapD8Nl.js.map +1 -0
- package/dist/chunks/timeline-item.IFw76Qeh.js +386 -0
- package/dist/chunks/timeline-item.IFw76Qeh.js.map +1 -0
- package/dist/chunks/toast.B2u2W_TQ.js +171 -0
- package/dist/chunks/toast.B2u2W_TQ.js.map +1 -0
- package/dist/chunks/toggle-button.ChDbeBZ8.js +83 -0
- package/dist/chunks/toggle-button.ChDbeBZ8.js.map +1 -0
- package/dist/chunks/toggle.Q52IIKfi.js +121 -0
- package/dist/chunks/toggle.Q52IIKfi.js.map +1 -0
- package/dist/chunks/tooltip.DyZIyMZN.js +189 -0
- package/dist/chunks/tooltip.DyZIyMZN.js.map +1 -0
- package/dist/chunks/truncate.BfIl_-71.js +8 -0
- package/dist/chunks/truncate.BfIl_-71.js.map +1 -0
- package/dist/chunks/tutorial.suIRmXta.js +348 -0
- package/dist/chunks/tutorial.suIRmXta.js.map +1 -0
- package/dist/chunks/typography.J1v_SPG3.js +87 -0
- package/dist/chunks/typography.J1v_SPG3.js.map +1 -0
- package/dist/chunks/upload-files.5wQwbfkp.js +5 -0
- package/dist/chunks/upload-files.5wQwbfkp.js.map +1 -0
- package/dist/chunks/upload-files.jTQY6y2X.js +5 -0
- package/dist/chunks/upload-files.jTQY6y2X.js.map +1 -0
- package/dist/chunks/use-bento-toast-controller.Cn_2Eogn.js +52 -0
- package/dist/chunks/use-bento-toast-controller.Cn_2Eogn.js.map +1 -0
- package/dist/chunks/use-cached-selected-values.9OnD_j5F.js +1177 -0
- package/dist/chunks/use-cached-selected-values.9OnD_j5F.js.map +1 -0
- package/dist/chunks/use-click-outside.BnhTgpSt.js +14 -0
- package/dist/chunks/use-click-outside.BnhTgpSt.js.map +1 -0
- package/dist/chunks/use-country-items.HFnjuDsG.js +30 -0
- package/dist/chunks/use-country-items.HFnjuDsG.js.map +1 -0
- package/dist/chunks/use-country-phon-code.DVgE19zT.js +5610 -0
- package/dist/chunks/use-country-phon-code.DVgE19zT.js.map +1 -0
- package/dist/chunks/use-default-slot-validator.BDn0wkYP.js +13 -0
- package/dist/chunks/use-default-slot-validator.BDn0wkYP.js.map +1 -0
- package/dist/chunks/use-expandable-content-height.GkjjbmPy.js +17 -0
- package/dist/chunks/use-expandable-content-height.GkjjbmPy.js.map +1 -0
- package/dist/chunks/use-form-layout-loading.D3lALhtC.js +12 -0
- package/dist/chunks/use-form-layout-loading.D3lALhtC.js.map +1 -0
- package/dist/chunks/use-has-slot.C9lQZ6nz.js +6 -0
- package/dist/chunks/use-has-slot.C9lQZ6nz.js.map +1 -0
- package/dist/chunks/warning-filled.Cd0kVWwa.js +24 -0
- package/dist/chunks/warning-filled.Cd0kVWwa.js.map +1 -0
- package/dist/chunks/wrong-environment.BOsyKdRI.js +5 -0
- package/dist/chunks/wrong-environment.BOsyKdRI.js.map +1 -0
- package/dist/chunks/wrong-environment.BiHTPtbJ.js +5 -0
- package/dist/chunks/wrong-environment.BiHTPtbJ.js.map +1 -0
- package/dist/click-outside.js +5 -0
- package/dist/click-outside.js.map +1 -0
- package/dist/code-snippet.js +8 -0
- package/dist/code-snippet.js.map +1 -0
- package/dist/country.js +12 -0
- package/dist/country.js.map +1 -0
- package/dist/currency.js +6 -0
- package/dist/currency.js.map +1 -0
- package/dist/dashboard-template.js +6 -0
- package/dist/dashboard-template.js.map +1 -0
- package/dist/dashed-underline.js +5 -0
- package/dist/dashed-underline.js.map +1 -0
- package/dist/data-grid-template.js +5 -0
- package/dist/data-grid-template.js.map +1 -0
- package/dist/data-grid.js +11 -0
- package/dist/data-grid.js.map +1 -0
- package/dist/date-picker.js +8 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/date-range-picker.js +8 -0
- package/dist/date-range-picker.js.map +1 -0
- package/dist/date.js +6 -0
- package/dist/date.js.map +1 -0
- package/dist/divider.js +5 -0
- package/dist/divider.js.map +1 -0
- package/dist/dropdown.js +16 -0
- package/dist/dropdown.js.map +1 -0
- package/dist/empty-state.js +8 -0
- package/dist/empty-state.js.map +1 -0
- package/dist/file-uploader.js +5 -0
- package/dist/file-uploader.js.map +1 -0
- package/dist/filter-bar.js +8 -0
- package/dist/filter-bar.js.map +1 -0
- package/dist/focus-trap.js +5 -0
- package/dist/focus-trap.js.map +1 -0
- package/dist/fonts/fonts.css +2 -0
- package/dist/form-layout.js +8 -0
- package/dist/form-layout.js.map +1 -0
- package/dist/header-with-views.js +5 -0
- package/dist/header-with-views.js.map +1 -0
- package/dist/header.js +5 -0
- package/dist/header.js.map +1 -0
- package/dist/image.js +7 -0
- package/dist/image.js.map +1 -0
- package/dist/index.js +372 -0
- package/dist/index.js.map +1 -0
- package/dist/info-icon.js +5 -0
- package/dist/info-icon.js.map +1 -0
- package/dist/input-field-password.js +10 -0
- package/dist/input-field-password.js.map +1 -0
- package/dist/input-field-phone-number.js +5 -0
- package/dist/input-field-phone-number.js.map +1 -0
- package/dist/input-field.js +10 -0
- package/dist/input-field.js.map +1 -0
- package/dist/inspector.js +7 -0
- package/dist/inspector.js.map +1 -0
- package/dist/internal.js +43 -0
- package/dist/internal.js.map +1 -0
- package/dist/layout.js +6 -0
- package/dist/layout.js.map +1 -0
- package/dist/link.js +6 -0
- package/dist/link.js.map +1 -0
- package/dist/loading-indicator.js +6 -0
- package/dist/loading-indicator.js.map +1 -0
- package/dist/menu.js +6 -0
- package/dist/menu.js.map +1 -0
- package/dist/modal-fullscreen.js +6 -0
- package/dist/modal-fullscreen.js.map +1 -0
- package/dist/modal.js +14 -0
- package/dist/modal.js.map +1 -0
- package/dist/pagination.js +5 -0
- package/dist/pagination.js.map +1 -0
- package/dist/payment-method.js +7 -0
- package/dist/payment-method.js.map +1 -0
- package/dist/popover.js +6 -0
- package/dist/popover.js.map +1 -0
- package/dist/popper-container.js +9 -0
- package/dist/popper-container.js.map +1 -0
- package/dist/promo-banner.js +7 -0
- package/dist/promo-banner.js.map +1 -0
- package/dist/radio-group.js +9 -0
- package/dist/radio-group.js.map +1 -0
- package/dist/rich-text-editor.js +5 -0
- package/dist/rich-text-editor.js.map +1 -0
- package/dist/search-bar.js +9 -0
- package/dist/search-bar.js.map +1 -0
- package/dist/secondary-nav.js +5 -0
- package/dist/secondary-nav.js.map +1 -0
- package/dist/segmented-control.js +7 -0
- package/dist/segmented-control.js.map +1 -0
- package/dist/selection-card.js +7 -0
- package/dist/selection-card.js.map +1 -0
- package/dist/sidepanel.js +7 -0
- package/dist/sidepanel.js.map +1 -0
- package/dist/status.js +6 -0
- package/dist/status.js.map +1 -0
- package/dist/stepper.js +8 -0
- package/dist/stepper.js.map +1 -0
- package/dist/structured-list.js +6 -0
- package/dist/structured-list.js.map +1 -0
- package/dist/styles/bento-dark.css +2055 -0
- package/dist/styles/bento-light.css +2054 -0
- package/dist/styles/bento.css +2054 -0
- package/dist/styles/legacy.css +2209 -0
- package/dist/styles/styleguide.css +2109 -0
- package/dist/styles/utility.css +987 -0
- package/dist/summary-grid.js +12 -0
- package/dist/summary-grid.js.map +1 -0
- package/dist/tabs.js +6 -0
- package/dist/tabs.js.map +1 -0
- package/dist/tag.js +6 -0
- package/dist/tag.js.map +1 -0
- package/dist/textarea.js +5 -0
- package/dist/textarea.js.map +1 -0
- package/dist/timeline.js +10 -0
- package/dist/timeline.js.map +1 -0
- package/dist/toast.js +5 -0
- package/dist/toast.js.map +1 -0
- package/dist/toggle.js +7 -0
- package/dist/toggle.js.map +1 -0
- package/dist/tutorial.js +5 -0
- package/dist/tutorial.js.map +1 -0
- package/dist/typography.js +8 -0
- package/dist/typography.js.map +1 -0
- package/dist/use-form-v4.js +8300 -0
- package/dist/use-form-v4.js.map +1 -0
- package/dist/web-types.json +15200 -0
- package/package.json +6 -6
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { ref as n, onMounted as R, computed as f, defineComponent as L } from "vue";
|
|
2
|
+
import { B as x } from "./button.BuD-IsW5.js";
|
|
3
|
+
import { u as C } from "./i18n.BQkEbtPM.js";
|
|
4
|
+
import { C as b, a as y } from "./chevron-left.DOMTgGel.js";
|
|
5
|
+
import { o as m } from "./resize.Bqks3WUm.js";
|
|
6
|
+
import { n as W } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
7
|
+
import "../assets/fixed-scroller.css";
|
|
8
|
+
const w = 1, g = 40, F = ({
|
|
9
|
+
contentRef: d,
|
|
10
|
+
containerRef: e,
|
|
11
|
+
leftButtonRef: o,
|
|
12
|
+
rightButtonRef: t
|
|
13
|
+
}) => {
|
|
14
|
+
const r = n(0), l = n(0), u = n(0), a = n(0);
|
|
15
|
+
R(() => {
|
|
16
|
+
m(e.value, () => {
|
|
17
|
+
e.value && (a.value = e.value.offsetWidth, l.value = 0, r.value = 0);
|
|
18
|
+
}), m(d.value, () => {
|
|
19
|
+
var s;
|
|
20
|
+
u.value = (s = d.value) == null ? void 0 : s.scrollWidth;
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
const _ = f(() => {
|
|
24
|
+
var c, h;
|
|
25
|
+
const s = (c = o.value) != null && c.scrollWidth ? o.value.scrollWidth + g : 0, p = (h = t.value) != null && h.scrollWidth ? t.value.scrollWidth + g : 0;
|
|
26
|
+
return s + p;
|
|
27
|
+
}), i = f(() => Math.ceil(u.value / a.value) ?? 0), v = f(() => {
|
|
28
|
+
const s = new Array(i.value).fill(0);
|
|
29
|
+
return s.forEach((p, c) => {
|
|
30
|
+
if (c === 0)
|
|
31
|
+
return;
|
|
32
|
+
if (c === i.value - 1) {
|
|
33
|
+
s[s.length - 1] = -(u.value - a.value + w);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const h = s[c - 1];
|
|
37
|
+
s[c] = -(a.value + Math.abs(h) - _.value);
|
|
38
|
+
}), s;
|
|
39
|
+
}), S = f(() => l.value !== 0), B = f(
|
|
40
|
+
() => r.value >= -(u.value - a.value - 1)
|
|
41
|
+
);
|
|
42
|
+
return {
|
|
43
|
+
offset: r,
|
|
44
|
+
shouldShowLeftButton: S,
|
|
45
|
+
shouldShowRightButton: B,
|
|
46
|
+
// Methods
|
|
47
|
+
scrollLeft: () => {
|
|
48
|
+
l.value !== 0 && (l.value -= 1, r.value = v.value[l.value]);
|
|
49
|
+
},
|
|
50
|
+
scrollRight: () => {
|
|
51
|
+
l.value !== i.value - 1 && (l.value += 1, r.value = v.value[l.value]);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}, I = {
|
|
55
|
+
"en-US": {
|
|
56
|
+
scrollLeft: "Scroll left",
|
|
57
|
+
scrollRight: "Scroll right"
|
|
58
|
+
}
|
|
59
|
+
}, O = {
|
|
60
|
+
i18n: { messages: I }
|
|
61
|
+
}, k = /* @__PURE__ */ L({
|
|
62
|
+
...O,
|
|
63
|
+
__name: "fixed-scroller",
|
|
64
|
+
props: {
|
|
65
|
+
/**
|
|
66
|
+
* Applies the condensed style to the buttons
|
|
67
|
+
*/
|
|
68
|
+
condensed: { type: Boolean, default: !1 },
|
|
69
|
+
/**
|
|
70
|
+
* Padding to be applied to the top of the scroller container
|
|
71
|
+
*/
|
|
72
|
+
extraPaddingTop: { type: Number, default: 0 }
|
|
73
|
+
},
|
|
74
|
+
setup(d) {
|
|
75
|
+
const { t: e } = C(), o = n(null), t = n(null), r = n(null), l = n(null), { offset: u, shouldShowLeftButton: a, shouldShowRightButton: _, scrollLeft: i, scrollRight: v } = F({
|
|
76
|
+
contentRef: o,
|
|
77
|
+
containerRef: t,
|
|
78
|
+
leftButtonRef: r,
|
|
79
|
+
rightButtonRef: l
|
|
80
|
+
});
|
|
81
|
+
return { __sfc: !0, t: e, contentRef: o, fixedScrollerRef: t, leftButtonRef: r, rightButtonRef: l, offset: u, shouldShowLeftButton: a, shouldShowRightButton: _, scrollLeft: i, scrollRight: v, BentoButton: x, ChevronLeftIcon: y, ChevronRightIcon: b };
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
var E = function() {
|
|
85
|
+
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
86
|
+
return o("div", { ref: "fixedScrollerRef", staticClass: "b-fixed-scroller" }, [o("div", { staticClass: "b-fixed-scroller__container" }, [o("div", { ref: "contentRef", staticClass: "b-fixed-scroller__content", style: {
|
|
87
|
+
transform: `translateX(${t.offset}px)`,
|
|
88
|
+
paddingTop: t.shouldShowLeftButton || t.shouldShowRightButton ? `${e.extraPaddingTop}px` : null
|
|
89
|
+
} }, [e._t("default")], 2)]), t.shouldShowLeftButton ? o("div", { ref: "leftButtonRef", staticClass: "b-fixed-scroller__left" }, [o(t.BentoButton, { attrs: { variant: "secondary", "aria-label": t.t("scrollLeft"), condensed: e.condensed }, on: { click: t.scrollLeft }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
|
|
90
|
+
return [o(t.ChevronLeftIcon, { attrs: { "svg-title": "checked", "aria-hidden": "true" } })];
|
|
91
|
+
}, proxy: !0 }], null, !1, 1728943899) })], 1) : e._e(), t.shouldShowRightButton ? o("div", { ref: "rightButtonRef", staticClass: "b-fixed-scroller__right" }, [o(t.BentoButton, { attrs: { variant: "secondary", "aria-label": t.t("scrollRight"), condensed: e.condensed }, on: { click: t.scrollRight }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
|
|
92
|
+
return [o(t.ChevronRightIcon, { attrs: { "svg-title": "checked", "aria-hidden": "true" } })];
|
|
93
|
+
}, proxy: !0 }], null, !1, 29940896) })], 1) : e._e()]);
|
|
94
|
+
}, T = [], P = /* @__PURE__ */ W(
|
|
95
|
+
k,
|
|
96
|
+
E,
|
|
97
|
+
T,
|
|
98
|
+
!1,
|
|
99
|
+
null,
|
|
100
|
+
"0a2c2ec6"
|
|
101
|
+
);
|
|
102
|
+
const U = P.exports;
|
|
103
|
+
export {
|
|
104
|
+
U as F
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=fixed-scroller.D0a6q8_i.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixed-scroller.D0a6q8_i.js","sources":["../../src/components/internal/fixed-scroller/composables/useFixedScroller.ts","../../src/components/internal/fixed-scroller/fixed-scroller.vue"],"sourcesContent":["import { observeSizeOfElement } from '@/utils/ts/resize';\nimport { computed, onMounted, ref } from 'vue';\nimport type { Ref, UnwrapRef } from 'vue';\n\n// Adding an offset of \"1\" so that the border can be shown within the boundaries\nconst OVERFLOW_CLIP_OFFSET = 1;\n// Add the gradient offset to the calculations\nconst GRADIENT_OFFSET = 40;\n\ninterface useFixedScrollerProps {\n contentRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n containerRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n leftButtonRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n rightButtonRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n}\n\n/**\n * Function to calculate the offset of each view and change the \"view\" via offsets\n * through the functions `scrollLeft` and `scrollRight` whilst providing a way to\n * show and hide the buttons based on the current \"view\" via\n * `shouldShowLeftButton` and `shouldShowRightButton`.\n *\n * Each view is pre-calculated (offsetArray) and updated if the content changes as a computed ref:\n * First view: Always 0 (x axis beginning).\n * Last view: total content space - visible width\n * Intermediate views: Previous offset (to the left) plus the visible space taking\n * away the space the buttons take so that the whole view can be rendered\n *\n *\n * @param props - All the necessary references to calculate the scroll\n * @param props.containerRef - Reference to the container, this defines the visible space width\n * @param props.contentRef - Reference to the content itself, this defines the total content width\n * @param props.leftButtonRef - Reference to the left button, used to calculate total space in which the content will be rendered\n * @param props.rightButtonRef - Reference to the right button, used to calculate total space in which the content will be rendered\n * @returns response - Values used in the view to show the buttons and to change the view right or left\n * @returns response.offset - Offset value by which the view will move on the x axis. To be used in `styles`.\n * @returns response.shouldShowLeftButton - Indicates if the button on the left should be shown\n * @returns response.shouldShowRightButton - Indicates if the button on the right should be shown\n * @returns response.scrollLeft - Used to shift the view to the left\n * @returns response.scrollRight - Used to shift the view to the right\n */\nexport const useFixedScroller = ({\n contentRef,\n containerRef,\n leftButtonRef,\n rightButtonRef,\n}: useFixedScrollerProps) => {\n const offset = ref(0);\n const currentView = ref(0);\n\n // Calculated using 'scrollWidth' to get the full width of the content\n const totalContentWidth = ref(0);\n // Calculated using 'clientWidth' to get the rendered componen width\n const visibleSpaceWidth = ref(0);\n\n onMounted(() => {\n observeSizeOfElement(containerRef.value, () => {\n if (containerRef.value) {\n // Set new width when resized\n visibleSpaceWidth.value = containerRef.value.offsetWidth;\n // Reset the offset and view\n currentView.value = 0;\n offset.value = 0;\n }\n });\n\n observeSizeOfElement(contentRef.value, () => {\n totalContentWidth.value = contentRef.value?.scrollWidth;\n });\n });\n\n // Sum of the space used by the Left and Right buttons\n // Used to calculate how much space the \"actual\" visible space is\n const buttonsWidth = computed(() => {\n const leftButtonWidth = leftButtonRef.value?.scrollWidth\n ? leftButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n const rightButtonWidth = rightButtonRef.value?.scrollWidth\n ? rightButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n\n return leftButtonWidth + rightButtonWidth;\n });\n // Total number of pages/views available.\n // Calculated as \"ceil\" because if the space doesn't fit \"one view\" (irrational number) the content flows to the next view (integer).\n const totalViews = computed(() => Math.ceil(totalContentWidth.value / visibleSpaceWidth.value) ?? 0);\n\n // Calculation of offsets per view (index).\n // This allows to easily swap the offset without on-the-fly calculations\n const offsetArray = computed(() => {\n const calculatedOffsetList = new Array(totalViews.value).fill(0);\n\n calculatedOffsetList.forEach((_, index) => {\n // First offset will be 0\n if (index === 0) {\n return;\n }\n\n // Calculate last\n if (index === totalViews.value - 1) {\n calculatedOffsetList[calculatedOffsetList.length - 1] = -(\n totalContentWidth.value -\n visibleSpaceWidth.value +\n OVERFLOW_CLIP_OFFSET\n );\n\n return;\n }\n\n // Calculate each offset - Move 1 view\n const previousOffset = calculatedOffsetList[index - 1];\n calculatedOffsetList[index] = -(visibleSpaceWidth.value + Math.abs(previousOffset) - buttonsWidth.value);\n });\n\n return calculatedOffsetList;\n });\n\n // Hide left button when it's the first view\n const shouldShowLeftButton = computed(() => currentView.value !== 0);\n // Hide right button if it's the last view\n const shouldShowRightButton = computed(\n () => offset.value >= -(totalContentWidth.value - visibleSpaceWidth.value - 1)\n );\n\n /**\n * Shifts the current offset by one view to the left.\n */\n const scrollLeft = () => {\n // Do nothing if it is already in page 0\n if (currentView.value === 0) {\n return;\n }\n\n currentView.value -= 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n /**\n * Shifts the current offset by one view to the right.\n */\n const scrollRight = () => {\n // Do nothing if it is already in last page\n if (currentView.value === totalViews.value - 1) {\n return;\n }\n\n currentView.value += 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n return {\n offset,\n shouldShowLeftButton,\n shouldShowRightButton,\n\n // Methods\n scrollLeft,\n scrollRight,\n };\n};\n","<template>\n <div ref=\"fixedScrollerRef\" class=\"b-fixed-scroller\">\n <div class=\"b-fixed-scroller__container\">\n <div\n ref=\"contentRef\"\n class=\"b-fixed-scroller__content\"\n :style=\"{\n transform: `translateX(${offset}px)`,\n paddingTop: shouldShowLeftButton || shouldShowRightButton ? `${extraPaddingTop}px` : null,\n }\"\n >\n <slot></slot>\n </div>\n </div>\n\n <div v-if=\"shouldShowLeftButton\" ref=\"leftButtonRef\" class=\"b-fixed-scroller__left\">\n <bento-button variant=\"secondary\" :aria-label=\"t('scrollLeft')\" :condensed=\"condensed\" @click=\"scrollLeft\">\n <template #iconLeft>\n <chevron-left-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n <div v-if=\"shouldShowRightButton\" ref=\"rightButtonRef\" class=\"b-fixed-scroller__right\">\n <bento-button\n variant=\"secondary\"\n :aria-label=\"t('scrollRight')\"\n :condensed=\"condensed\"\n @click=\"scrollRight\"\n >\n <template #iconLeft>\n <chevron-right-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { useFixedScroller } from './composables';\n import { useI18n } from '@/utils/ts/i18n';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const contentRef = ref(null);\n const fixedScrollerRef = ref(null);\n const leftButtonRef = ref(null);\n const rightButtonRef = ref(null);\n\n defineProps({\n /**\n * Applies the condensed style to the buttons\n */\n condensed: { type: Boolean, default: false },\n /**\n * Padding to be applied to the top of the scroller container\n */\n extraPaddingTop: { type: Number, default: 0 },\n });\n\n const { offset, shouldShowLeftButton, shouldShowRightButton, scrollLeft, scrollRight } = useFixedScroller({\n contentRef,\n containerRef: fixedScrollerRef,\n leftButtonRef,\n rightButtonRef,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Allows to horizontally scroll content by one view at a time.\n *\n * @example\n * import { FixedScroller } from '@/internal';\n *\n * export default {\n * components: { FixedScroller },\n * template: `\n * <fixed-scroller>\n * <div style=\"display: flex; gap: 8px;\">\n * {{ Content here }}\n * </div>\n * </fixed-scroller>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./fixed-scroller.scss\" />\n"],"names":["OVERFLOW_CLIP_OFFSET","GRADIENT_OFFSET","useFixedScroller","contentRef","containerRef","leftButtonRef","rightButtonRef","offset","ref","currentView","totalContentWidth","visibleSpaceWidth","onMounted","observeSizeOfElement","_a","buttonsWidth","computed","leftButtonWidth","rightButtonWidth","_b","totalViews","offsetArray","calculatedOffsetList","_","index","previousOffset","shouldShowLeftButton","shouldShowRightButton","__default__","messages","t","useI18n","fixedScrollerRef","scrollLeft","scrollRight"],"mappings":";;;;;;;AAKA,MAAAA,IAAA,GAEAC,IAAA,IAkCOC,IAAA,CAAA;AAAA,EAA0B,YAAAC;AAAA,EAC7B,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AAEJ,MAAA;AACI,QAAAC,IAAAC,EAAA,CAAA,GACAC,IAAAD,EAAA,CAAA,GAGAE,IAAAF,EAAA,CAAA,GAEAG,IAAAH,EAAA,CAAA;AAEA,EAAAI,EAAA,MAAA;AACI,IAAAC,EAAAT,EAAA,OAAA,MAAA;AACI,MAAAA,EAAA,UAEIO,EAAA,QAAAP,EAAA,MAAA,aAEAK,EAAA,QAAA,GACAF,EAAA,QAAA;AAAA,IACJ,CAAA,GAGJM,EAAAV,EAAA,OAAA,MAAA;;AACI,MAAAO,EAAA,SAAAI,IAAAX,EAAA,UAAA,gBAAAW,EAAA;AAAA,IAA4C,CAAA;AAAA,EAC/C,CAAA;AAKL,QAAAC,IAAAC,EAAA,MAAA;;AACI,UAAAC,KAAAH,IAAAT,EAAA,UAAA,QAAAS,EAAA,cAAAT,EAAA,MAAA,cAAAJ,IAAA,GAGAiB,KAAAC,IAAAb,EAAA,UAAA,QAAAa,EAAA,cAAAb,EAAA,MAAA,cAAAL,IAAA;AAIA,WAAAgB,IAAAC;AAAA,EAAyB,CAAA,GAI7BE,IAAAJ,EAAA,MAAA,KAAA,KAAAN,EAAA,QAAAC,EAAA,KAAA,KAAA,CAAA,GAIAU,IAAAL,EAAA,MAAA;AACI,UAAAM,IAAA,IAAA,MAAAF,EAAA,KAAA,EAAA,KAAA,CAAA;AAEA,WAAAE,EAAA,QAAA,CAAAC,GAAAC,MAAA;AAEI,UAAAA,MAAA;AACI;AAIJ,UAAAA,MAAAJ,EAAA,QAAA,GAAA;AACI,QAAAE,EAAAA,EAAA,SAAA,CAAA,IAAA,EAAAZ,EAAA,QAAAC,EAAA,QAAAX;AAMA;AAAA,MAAA;AAIJ,YAAAyB,IAAAH,EAAAE,IAAA,CAAA;AACA,MAAAF,EAAAE,CAAA,IAAA,EAAAb,EAAA,QAAA,KAAA,IAAAc,CAAA,IAAAV,EAAA;AAAA,IAAkG,CAAA,GAGtGO;AAAA,EAAO,CAAA,GAIXI,IAAAV,EAAA,MAAAP,EAAA,UAAA,CAAA,GAEAkB,IAAAX;AAAA,IAA8B,MAAAT,EAAA,SAAA,EAAAG,EAAA,QAAAC,EAAA,QAAA;AAAA,EACkD;AA6BhF,SAAA;AAAA,IAAO,QAAAJ;AAAA,IACH,sBAAAmB;AAAA,IACA,uBAAAC;AAAA;AAAA,IACA,YA1BJ,MAAA;AAEI,MAAAlB,EAAA,UAAA,MAIAA,EAAA,SAAA,GACAF,EAAA,QAAAc,EAAA,MAAAZ,EAAA,KAAA;AAAA,IAAkD;AAAA,IAsBlD,aAhBJ,MAAA;AAEI,MAAAA,EAAA,UAAAW,EAAA,QAAA,MAIAX,EAAA,SAAA,GACAF,EAAA,QAAAc,EAAA,MAAAZ,EAAA,KAAA;AAAA,IAAkD;AAAA,EAUlD;AAER;;;;;GClEImB,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;AA9CA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEA5B,IAAAK,EAAA,IAAA,GACAwB,IAAAxB,EAAA,IAAA,GACAH,IAAAG,EAAA,IAAA,GACAF,IAAAE,EAAA,IAAA,GAaA,EAAA,QAAAD,GAAA,sBAAAmB,GAAA,uBAAAC,GAAA,YAAAM,GAAA,aAAAC,EAAA,IAAAhC,EAAA;AAAA,MAA0G,YAAAC;AAAA,MACtG,cAAA6B;AAAA,MACc,eAAA3B;AAAA,MACd,gBAAAC;AAAA,IACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
import { ref as W, onUnmounted as ne, isRef as oe, defineComponent as ae } from "vue";
|
|
2
|
+
import { u as ie } from "./use-has-slot.C9lQZ6nz.js";
|
|
3
|
+
import { h as ue } from "./index.BdrLbvtJ.js";
|
|
4
|
+
import { n as se } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
5
|
+
import "../assets/focus-trap.css";
|
|
6
|
+
var R = "data-focus-lock", ce = "data-focus-lock-disabled", fe = "data-no-focus-lock", le = "data-autofocus-inside", de = "data-no-autofocus", b = function(e) {
|
|
7
|
+
for (var t = Array(e.length), r = 0; r < e.length; ++r)
|
|
8
|
+
t[r] = e[r];
|
|
9
|
+
return t;
|
|
10
|
+
}, I = function(e) {
|
|
11
|
+
return Array.isArray(e) ? e : [e];
|
|
12
|
+
}, ve = function(e) {
|
|
13
|
+
if (e.nodeType !== Node.ELEMENT_NODE)
|
|
14
|
+
return !1;
|
|
15
|
+
var t = window.getComputedStyle(e, null);
|
|
16
|
+
return !t || !t.getPropertyValue ? !1 : t.getPropertyValue("display") === "none" || t.getPropertyValue("visibility") === "hidden";
|
|
17
|
+
}, V = function(e) {
|
|
18
|
+
return e.parentNode && e.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? (
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
+
e.parentNode.host
|
|
21
|
+
) : e.parentNode;
|
|
22
|
+
}, G = function(e) {
|
|
23
|
+
return e === document || e && e.nodeType === Node.DOCUMENT_NODE;
|
|
24
|
+
}, me = function(e, t) {
|
|
25
|
+
return !e || G(e) || !ve(e) && t(V(e));
|
|
26
|
+
}, q = function(e, t) {
|
|
27
|
+
var r = e.get(t);
|
|
28
|
+
if (r !== void 0)
|
|
29
|
+
return r;
|
|
30
|
+
var n = me(t, q.bind(void 0, e));
|
|
31
|
+
return e.set(t, n), n;
|
|
32
|
+
}, be = function(e, t) {
|
|
33
|
+
return e && !G(e) ? ge(e) ? t(V(e)) : !1 : !0;
|
|
34
|
+
}, K = function(e, t) {
|
|
35
|
+
var r = e.get(t);
|
|
36
|
+
if (r !== void 0)
|
|
37
|
+
return r;
|
|
38
|
+
var n = be(t, K.bind(void 0, e));
|
|
39
|
+
return e.set(t, n), n;
|
|
40
|
+
}, z = function(e) {
|
|
41
|
+
return e.dataset;
|
|
42
|
+
}, pe = function(e) {
|
|
43
|
+
return e.tagName === "BUTTON";
|
|
44
|
+
}, $ = function(e) {
|
|
45
|
+
return e.tagName === "INPUT";
|
|
46
|
+
}, j = function(e) {
|
|
47
|
+
return $(e) && e.type === "radio";
|
|
48
|
+
}, he = function(e) {
|
|
49
|
+
return !(($(e) || pe(e)) && (e.type === "hidden" || e.disabled));
|
|
50
|
+
}, ge = function(e) {
|
|
51
|
+
var t = e.getAttribute(de);
|
|
52
|
+
return ![!0, "true", ""].includes(t);
|
|
53
|
+
}, T = function(e) {
|
|
54
|
+
var t;
|
|
55
|
+
return !!(e && (!((t = z(e)) === null || t === void 0) && t.focusGuard));
|
|
56
|
+
}, g = function(e) {
|
|
57
|
+
return !T(e);
|
|
58
|
+
}, Oe = function(e) {
|
|
59
|
+
return !!e;
|
|
60
|
+
}, Ee = function(e, t) {
|
|
61
|
+
var r = e.tabIndex - t.tabIndex, n = e.index - t.index;
|
|
62
|
+
if (r) {
|
|
63
|
+
if (!e.tabIndex)
|
|
64
|
+
return 1;
|
|
65
|
+
if (!t.tabIndex)
|
|
66
|
+
return -1;
|
|
67
|
+
}
|
|
68
|
+
return r || n;
|
|
69
|
+
}, Z = function(e, t, r) {
|
|
70
|
+
return b(e).map(function(n, o) {
|
|
71
|
+
return {
|
|
72
|
+
node: n,
|
|
73
|
+
index: o,
|
|
74
|
+
tabIndex: r && n.tabIndex === -1 ? (n.dataset || {}).focusGuard ? 0 : -1 : n.tabIndex
|
|
75
|
+
};
|
|
76
|
+
}).filter(function(n) {
|
|
77
|
+
return !t || n.tabIndex >= 0;
|
|
78
|
+
}).sort(Ee);
|
|
79
|
+
}, Ae = [
|
|
80
|
+
"button:enabled",
|
|
81
|
+
"select:enabled",
|
|
82
|
+
"textarea:enabled",
|
|
83
|
+
"input:enabled",
|
|
84
|
+
// elements with explicit roles will also use explicit tabindex
|
|
85
|
+
// '[role="button"]',
|
|
86
|
+
"a[href]",
|
|
87
|
+
"area[href]",
|
|
88
|
+
"summary",
|
|
89
|
+
"iframe",
|
|
90
|
+
"object",
|
|
91
|
+
"embed",
|
|
92
|
+
"audio[controls]",
|
|
93
|
+
"video[controls]",
|
|
94
|
+
"[tabindex]",
|
|
95
|
+
"[contenteditable]",
|
|
96
|
+
"[autofocus]"
|
|
97
|
+
], C = Ae.join(","), Ne = "".concat(C, ", [data-focus-guard]"), Y = function(e, t) {
|
|
98
|
+
var r;
|
|
99
|
+
return b(((r = e.shadowRoot) === null || r === void 0 ? void 0 : r.children) || e.children).reduce(function(n, o) {
|
|
100
|
+
return n.concat(o.matches(t ? Ne : C) ? [o] : [], Y(o));
|
|
101
|
+
}, []);
|
|
102
|
+
}, P = function(e, t) {
|
|
103
|
+
return e.reduce(function(r, n) {
|
|
104
|
+
return r.concat(
|
|
105
|
+
// add all tabbables inside and within shadow DOMs in DOM order
|
|
106
|
+
Y(n, t),
|
|
107
|
+
// add if node is tabbable itself
|
|
108
|
+
n.parentNode ? b(n.parentNode.querySelectorAll(C)).filter(function(o) {
|
|
109
|
+
return o === n;
|
|
110
|
+
}) : []
|
|
111
|
+
);
|
|
112
|
+
}, []);
|
|
113
|
+
}, xe = function(e) {
|
|
114
|
+
var t = e.querySelectorAll("[".concat(le, "]"));
|
|
115
|
+
return b(t).map(function(r) {
|
|
116
|
+
return P([r]);
|
|
117
|
+
}).reduce(function(r, n) {
|
|
118
|
+
return r.concat(n);
|
|
119
|
+
}, []);
|
|
120
|
+
}, S = function(e, t) {
|
|
121
|
+
return b(e).filter(function(r) {
|
|
122
|
+
return q(t, r);
|
|
123
|
+
}).filter(function(r) {
|
|
124
|
+
return he(r);
|
|
125
|
+
});
|
|
126
|
+
}, U = function(e, t) {
|
|
127
|
+
return t === void 0 && (t = /* @__PURE__ */ new Map()), b(e).filter(function(r) {
|
|
128
|
+
return K(t, r);
|
|
129
|
+
});
|
|
130
|
+
}, F = function(e, t, r) {
|
|
131
|
+
return Z(S(P(e, r), t), !0, r);
|
|
132
|
+
}, B = function(e, t) {
|
|
133
|
+
return Z(S(P(e), t), !1);
|
|
134
|
+
}, ye = function(e, t) {
|
|
135
|
+
return S(xe(e), t);
|
|
136
|
+
}, p = function(e, t) {
|
|
137
|
+
return (e.shadowRoot ? p(e.shadowRoot, t) : e.contains(t)) || Array.from(e.children).some(function(r) {
|
|
138
|
+
return p(r, t);
|
|
139
|
+
});
|
|
140
|
+
}, we = function(e) {
|
|
141
|
+
for (var t = /* @__PURE__ */ new Set(), r = e.length, n = 0; n < r; n += 1)
|
|
142
|
+
for (var o = n + 1; o < r; o += 1) {
|
|
143
|
+
var i = e[n].compareDocumentPosition(e[o]);
|
|
144
|
+
(i & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0 && t.add(o), (i & Node.DOCUMENT_POSITION_CONTAINS) > 0 && t.add(n);
|
|
145
|
+
}
|
|
146
|
+
return e.filter(function(a, u) {
|
|
147
|
+
return !t.has(u);
|
|
148
|
+
});
|
|
149
|
+
}, J = function(e) {
|
|
150
|
+
return e.parentNode ? J(e.parentNode) : e;
|
|
151
|
+
}, D = function(e) {
|
|
152
|
+
var t = I(e);
|
|
153
|
+
return t.filter(Boolean).reduce(function(r, n) {
|
|
154
|
+
var o = n.getAttribute(R);
|
|
155
|
+
return r.push.apply(r, o ? we(b(J(n).querySelectorAll("[".concat(R, '="').concat(o, '"]:not([').concat(ce, '="disabled"])')))) : [n]), r;
|
|
156
|
+
}, []);
|
|
157
|
+
}, Q = function(e) {
|
|
158
|
+
return e.activeElement ? e.activeElement.shadowRoot ? Q(e.activeElement.shadowRoot) : e.activeElement : void 0;
|
|
159
|
+
}, L = function() {
|
|
160
|
+
return document.activeElement ? document.activeElement.shadowRoot ? Q(document.activeElement.shadowRoot) : document.activeElement : void 0;
|
|
161
|
+
}, Ie = function(e) {
|
|
162
|
+
return e === document.activeElement;
|
|
163
|
+
}, Fe = function(e) {
|
|
164
|
+
return !!b(e.querySelectorAll("iframe")).some(function(t) {
|
|
165
|
+
return Ie(t);
|
|
166
|
+
});
|
|
167
|
+
}, _e = function(e) {
|
|
168
|
+
var t = document && L();
|
|
169
|
+
return !t || t.dataset && t.dataset.focusGuard ? !1 : D(e).some(function(r) {
|
|
170
|
+
return p(r, t) || Fe(r);
|
|
171
|
+
});
|
|
172
|
+
}, Te = function() {
|
|
173
|
+
var e = document && L();
|
|
174
|
+
return e ? b(document.querySelectorAll("[".concat(fe, "]"))).some(function(t) {
|
|
175
|
+
return p(t, e);
|
|
176
|
+
}) : !1;
|
|
177
|
+
}, Ce = function(e, t) {
|
|
178
|
+
return t.filter(j).filter(function(r) {
|
|
179
|
+
return r.name === e.name;
|
|
180
|
+
}).filter(function(r) {
|
|
181
|
+
return r.checked;
|
|
182
|
+
})[0] || e;
|
|
183
|
+
}, k = function(e, t) {
|
|
184
|
+
return j(e) && e.name ? Ce(e, t) : e;
|
|
185
|
+
}, Pe = function(e) {
|
|
186
|
+
var t = /* @__PURE__ */ new Set();
|
|
187
|
+
return e.forEach(function(r) {
|
|
188
|
+
return t.add(k(r, e));
|
|
189
|
+
}), e.filter(function(r) {
|
|
190
|
+
return t.has(r);
|
|
191
|
+
});
|
|
192
|
+
}, M = function(e) {
|
|
193
|
+
return e[0] && e.length > 1 ? k(e[0], e) : e[0];
|
|
194
|
+
}, H = function(e, t) {
|
|
195
|
+
return e.length > 1 ? e.indexOf(k(e[t], e)) : t;
|
|
196
|
+
}, X = "NEW_FOCUS", Se = function(e, t, r, n) {
|
|
197
|
+
var o = e.length, i = e[0], a = e[o - 1], u = T(r);
|
|
198
|
+
if (!(r && e.indexOf(r) >= 0)) {
|
|
199
|
+
var s = r !== void 0 ? t.indexOf(r) : -1, f = n ? t.indexOf(n) : s, l = n ? e.indexOf(n) : -1, c = s - f, m = t.indexOf(i), d = t.indexOf(a), v = Pe(t), O = r !== void 0 ? v.indexOf(r) : -1, E = O - (n ? v.indexOf(n) : s), A = H(e, 0), N = H(e, o - 1);
|
|
200
|
+
if (s === -1 || l === -1)
|
|
201
|
+
return X;
|
|
202
|
+
if (!c && l >= 0)
|
|
203
|
+
return l;
|
|
204
|
+
if (s <= m && u && Math.abs(c) > 1)
|
|
205
|
+
return N;
|
|
206
|
+
if (s >= d && u && Math.abs(c) > 1)
|
|
207
|
+
return A;
|
|
208
|
+
if (c && Math.abs(E) > 1)
|
|
209
|
+
return l;
|
|
210
|
+
if (s <= m)
|
|
211
|
+
return N;
|
|
212
|
+
if (s > d)
|
|
213
|
+
return A;
|
|
214
|
+
if (c)
|
|
215
|
+
return Math.abs(c) > 1 ? l : (o + l + c) % o;
|
|
216
|
+
}
|
|
217
|
+
}, _ = function(e, t) {
|
|
218
|
+
return t === void 0 && (t = []), t.push(e), e.parentNode && _(e.parentNode.host || e.parentNode, t), t;
|
|
219
|
+
}, x = function(e, t) {
|
|
220
|
+
for (var r = _(e), n = _(t), o = 0; o < r.length; o += 1) {
|
|
221
|
+
var i = r[o];
|
|
222
|
+
if (n.indexOf(i) >= 0)
|
|
223
|
+
return i;
|
|
224
|
+
}
|
|
225
|
+
return !1;
|
|
226
|
+
}, ee = function(e, t, r) {
|
|
227
|
+
var n = I(e), o = I(t), i = n[0], a = !1;
|
|
228
|
+
return o.filter(Boolean).forEach(function(u) {
|
|
229
|
+
a = x(a || u, u) || a, r.filter(Boolean).forEach(function(s) {
|
|
230
|
+
var f = x(i, s);
|
|
231
|
+
f && (!a || p(f, a) ? a = f : a = x(f, a));
|
|
232
|
+
});
|
|
233
|
+
}), a;
|
|
234
|
+
}, De = function(e, t) {
|
|
235
|
+
return e.reduce(function(r, n) {
|
|
236
|
+
return r.concat(ye(n, t));
|
|
237
|
+
}, []);
|
|
238
|
+
}, Le = function(e) {
|
|
239
|
+
return function(t) {
|
|
240
|
+
var r;
|
|
241
|
+
return t.autofocus || !!(!((r = z(t)) === null || r === void 0) && r.autofocus) || e.indexOf(t) >= 0;
|
|
242
|
+
};
|
|
243
|
+
}, ke = function(e, t) {
|
|
244
|
+
var r = /* @__PURE__ */ new Map();
|
|
245
|
+
return t.forEach(function(n) {
|
|
246
|
+
return r.set(n.node, n);
|
|
247
|
+
}), e.map(function(n) {
|
|
248
|
+
return r.get(n);
|
|
249
|
+
}).filter(Oe);
|
|
250
|
+
}, Re = function(e, t) {
|
|
251
|
+
var r = document && L(), n = D(e).filter(g), o = ee(r || e, e, n), i = /* @__PURE__ */ new Map(), a = B(n, i), u = F(n, i).filter(function(d) {
|
|
252
|
+
var v = d.node;
|
|
253
|
+
return g(v);
|
|
254
|
+
});
|
|
255
|
+
if (!(!u[0] && (u = a, !u[0]))) {
|
|
256
|
+
var s = B([o], i).map(function(d) {
|
|
257
|
+
var v = d.node;
|
|
258
|
+
return v;
|
|
259
|
+
}), f = ke(s, u), l = f.map(function(d) {
|
|
260
|
+
var v = d.node;
|
|
261
|
+
return v;
|
|
262
|
+
}), c = Se(l, s, r, t);
|
|
263
|
+
if (c === X) {
|
|
264
|
+
var m = U(a.map(function(d) {
|
|
265
|
+
var v = d.node;
|
|
266
|
+
return v;
|
|
267
|
+
})).filter(Le(De(n, i)));
|
|
268
|
+
return {
|
|
269
|
+
node: m && m.length ? M(m) : M(U(l))
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
return c === void 0 ? c : f[c];
|
|
273
|
+
}
|
|
274
|
+
}, Ue = function(e) {
|
|
275
|
+
var t = D(e).filter(g), r = ee(e, e, t), n = /* @__PURE__ */ new Map(), o = F([r], n, !0), i = F(t, n).filter(function(a) {
|
|
276
|
+
var u = a.node;
|
|
277
|
+
return g(u);
|
|
278
|
+
}).map(function(a) {
|
|
279
|
+
var u = a.node;
|
|
280
|
+
return u;
|
|
281
|
+
});
|
|
282
|
+
return o.map(function(a) {
|
|
283
|
+
var u = a.node, s = a.index;
|
|
284
|
+
return {
|
|
285
|
+
node: u,
|
|
286
|
+
index: s,
|
|
287
|
+
lockItem: i.indexOf(u) >= 0,
|
|
288
|
+
guard: T(u)
|
|
289
|
+
};
|
|
290
|
+
});
|
|
291
|
+
}, Be = Ue, Me = function(e, t) {
|
|
292
|
+
"focus" in e && e.focus(t), "contentWindow" in e && e.contentWindow && e.contentWindow.focus();
|
|
293
|
+
}, y = 0, w = !1, He = function(e, t, r) {
|
|
294
|
+
r === void 0 && (r = {});
|
|
295
|
+
var n = Re(e, t);
|
|
296
|
+
if (!w && n) {
|
|
297
|
+
if (y > 2) {
|
|
298
|
+
console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"), w = !0, setTimeout(function() {
|
|
299
|
+
w = !1;
|
|
300
|
+
}, 1);
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
y++, Me(n.node, r.focusOptions), y--;
|
|
304
|
+
}
|
|
305
|
+
}, h = /* @__PURE__ */ ((e) => (e.VERTICAL = "vertical", e.HORIZONTAL = "horizontal", e))(h || {}), te = /* @__PURE__ */ ((e) => (e.ARROW_UP = "arrowup", e.ARROW_DOWN = "arrowdown", e))(te || {}), re = /* @__PURE__ */ ((e) => (e.ARROW_LEFT = "arrowleft", e.ARROW_RIGHT = "arrowright", e))(re || {});
|
|
306
|
+
const We = (e) => requestAnimationFrame(e), Ve = (e, t) => {
|
|
307
|
+
const r = t.findIndex((n) => n.node === e);
|
|
308
|
+
return r === -1 ? 0 : r;
|
|
309
|
+
}, Ge = (e, t) => {
|
|
310
|
+
var i;
|
|
311
|
+
const r = document.activeElement, n = Be(t), o = Ve(r, n) + e;
|
|
312
|
+
return ((i = n[o]) == null ? void 0 : i.node) || r;
|
|
313
|
+
}, qe = (e, t) => {
|
|
314
|
+
const r = e.key.toLowerCase();
|
|
315
|
+
return {
|
|
316
|
+
isArrowNext: r === t[0],
|
|
317
|
+
isArrowPrev: r === t[1]
|
|
318
|
+
};
|
|
319
|
+
}, Ke = {
|
|
320
|
+
behavior: "smooth",
|
|
321
|
+
block: "center",
|
|
322
|
+
inline: "center"
|
|
323
|
+
}, ze = (e) => {
|
|
324
|
+
const t = W(null), { stop: r } = ue(
|
|
325
|
+
e,
|
|
326
|
+
(o) => {
|
|
327
|
+
let i = !1;
|
|
328
|
+
for (const a of o)
|
|
329
|
+
if (a.type === "childList" && a.addedNodes.length) {
|
|
330
|
+
const u = Array.from(a.addedNodes).find((s) => s instanceof HTMLElement ? s.getAttribute("aria-expanded") === "true" : !1);
|
|
331
|
+
u && (t.value = u, i = !0);
|
|
332
|
+
break;
|
|
333
|
+
} else if (a.type === "attributes" && a.oldValue === "false") {
|
|
334
|
+
t.value = o[0].target, i = !0;
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
i !== !0 && setTimeout(() => t.value = null);
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
attributeFilter: ["aria-expanded"],
|
|
341
|
+
attributeOldValue: !0,
|
|
342
|
+
childList: !0,
|
|
343
|
+
// check for added/removed nodes i.e. teleport
|
|
344
|
+
subtree: !0
|
|
345
|
+
// check all descendents
|
|
346
|
+
}
|
|
347
|
+
), n = (o) => {
|
|
348
|
+
const i = ["listbox", "tooltip", "menu"], a = ["combobox"], u = [
|
|
349
|
+
// input with autocomplete should only close the autocomplete dropdown when ESCAPE is pressed
|
|
350
|
+
// some autocomplete picks up "name=username" without the autocomplete attribute
|
|
351
|
+
"INPUT"
|
|
352
|
+
];
|
|
353
|
+
for (const s of o.composedPath()) {
|
|
354
|
+
if (!(s instanceof HTMLElement))
|
|
355
|
+
return;
|
|
356
|
+
const f = s, l = f.tagName, c = f.getAttribute("role"), m = l === "DIALOG", d = i.includes(c), v = a.includes(c), O = u.includes(l), E = oe(e) ? e.value === f : e === f;
|
|
357
|
+
if (m || E)
|
|
358
|
+
return;
|
|
359
|
+
if (v && t.value || (d || O) || !m && c === "dialog") {
|
|
360
|
+
o.stopPropagation(), o.preventDefault();
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
return ne(() => {
|
|
366
|
+
r();
|
|
367
|
+
}), { handleKeydownEscape: n };
|
|
368
|
+
}, $e = ae({
|
|
369
|
+
name: "bento-focus-trap",
|
|
370
|
+
props: {
|
|
371
|
+
/**
|
|
372
|
+
* Enables / Disables arrow navigation as well can determine the type of arrow navigation.
|
|
373
|
+
* The types of arrow navigation are horizontal and vertical.
|
|
374
|
+
*/
|
|
375
|
+
arrowNavigation: {
|
|
376
|
+
type: String,
|
|
377
|
+
default: void 0,
|
|
378
|
+
validator: (e) => Object.values(h).includes(
|
|
379
|
+
e
|
|
380
|
+
)
|
|
381
|
+
},
|
|
382
|
+
/**
|
|
383
|
+
* Enables / disables the focus trap.
|
|
384
|
+
*/
|
|
385
|
+
disabled: {
|
|
386
|
+
type: Boolean,
|
|
387
|
+
default: !1
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
setup() {
|
|
391
|
+
const e = W(null), { handleKeydownEscape: t } = ze(e);
|
|
392
|
+
return { root: e, handleKeydownEscape: t };
|
|
393
|
+
},
|
|
394
|
+
data: () => ({
|
|
395
|
+
lastFocusedElement: null
|
|
396
|
+
}),
|
|
397
|
+
computed: {
|
|
398
|
+
isHorizontalArrowNavigation() {
|
|
399
|
+
return this.arrowNavigation === h.HORIZONTAL;
|
|
400
|
+
},
|
|
401
|
+
isVerticalArrowNavigation() {
|
|
402
|
+
return this.arrowNavigation === h.VERTICAL;
|
|
403
|
+
},
|
|
404
|
+
arrowOrder() {
|
|
405
|
+
return this.isVerticalArrowNavigation ? Object.values(te) : Object.values(re);
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
watch: {
|
|
409
|
+
/**
|
|
410
|
+
* If the disabled prop changes, then enable / disable the focus trap.
|
|
411
|
+
*/
|
|
412
|
+
disabled() {
|
|
413
|
+
this.disabled ? this.disable() : this.setFocusInside();
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
mounted() {
|
|
417
|
+
this.disabled || this.setFocusInside();
|
|
418
|
+
},
|
|
419
|
+
beforeUnmount() {
|
|
420
|
+
this.disabled || this.disable();
|
|
421
|
+
},
|
|
422
|
+
methods: {
|
|
423
|
+
/**
|
|
424
|
+
* Set focus back inside the element area, giving the last focus element
|
|
425
|
+
* `focus-lock` can determine the next interable element to focus on.
|
|
426
|
+
*/
|
|
427
|
+
async setFocusInside() {
|
|
428
|
+
(document.activeElement === document.body || Te() || !this.lastFocusedElement) && (_e(this.$refs.root) || He(this.$refs.root, this.lastFocusedElement, {
|
|
429
|
+
focusOptions: { preventScroll: !0 }
|
|
430
|
+
}), this.lastFocusedElement = document.activeElement);
|
|
431
|
+
},
|
|
432
|
+
/**
|
|
433
|
+
* On blur, trap the focus inside!
|
|
434
|
+
*/
|
|
435
|
+
onBlur() {
|
|
436
|
+
this.disabled || We(this.setFocusInside);
|
|
437
|
+
},
|
|
438
|
+
/**
|
|
439
|
+
* If the no arrow navigation is enabled
|
|
440
|
+
* or if the currently focus element is a textarea or an input then prevent navigation.
|
|
441
|
+
*/
|
|
442
|
+
shouldPreventNavigation() {
|
|
443
|
+
if (!this.isVerticalArrowNavigation && !this.isHorizontalArrowNavigation)
|
|
444
|
+
return !1;
|
|
445
|
+
const e = document.activeElement.tagName.toLowerCase();
|
|
446
|
+
return (this.isVerticalArrowNavigation ? ["textarea", "select"] : ["input", "textarea"]).includes(e);
|
|
447
|
+
},
|
|
448
|
+
/**
|
|
449
|
+
* When an arrow key is pressed then navigate to the next focusable element.
|
|
450
|
+
* If trap is disabled or is content editable then prevent arrow navigation.
|
|
451
|
+
*
|
|
452
|
+
* @param event on keyboard press event
|
|
453
|
+
*/
|
|
454
|
+
onKeyDown(e) {
|
|
455
|
+
if (this.disabled || document.activeElement.isContentEditable || this.shouldPreventNavigation())
|
|
456
|
+
return;
|
|
457
|
+
const { isArrowNext: t, isArrowPrev: r } = qe(e, this.arrowOrder);
|
|
458
|
+
if (r || t) {
|
|
459
|
+
e.preventDefault(), e.stopPropagation();
|
|
460
|
+
const n = Ge(r ? 1 : -1, this.$el);
|
|
461
|
+
if (n.focus(), "scrollIntoView" in n) {
|
|
462
|
+
const o = "scrollBehavior" in document.documentElement.style ? Ke : !1;
|
|
463
|
+
n.scrollIntoView(o);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
/**
|
|
468
|
+
* If focus trap is disabled then return focus to last focus element, parent node or simply the document body.
|
|
469
|
+
*/
|
|
470
|
+
disable() {
|
|
471
|
+
const e = this.lastFocusedElement || this.$el.parentNode || document.body;
|
|
472
|
+
e && e.focus();
|
|
473
|
+
},
|
|
474
|
+
useHasSlot: ie
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
var je = function() {
|
|
478
|
+
var t = this, r = t._self._c;
|
|
479
|
+
return t._self._setupProxy, t.useHasSlot(t.$slots)("default") ? r("div", t._g({ ref: "root", staticClass: "b-focus-trap", attrs: { "data-testid": "focus-trap", tabindex: "-1" }, on: { focusout: t.onBlur, keydown: function(n) {
|
|
480
|
+
return !n.type.indexOf("key") && t._k(n.keyCode, "esc", 27, n.key, ["Esc", "Escape"]) ? null : t.handleKeydownEscape.apply(null, arguments);
|
|
481
|
+
} } }, t.arrowNavigation ? { keydown: t.onKeyDown } : {}), [t._t("default")], 2) : t._e();
|
|
482
|
+
}, Ze = [], Ye = /* @__PURE__ */ se(
|
|
483
|
+
$e,
|
|
484
|
+
je,
|
|
485
|
+
Ze,
|
|
486
|
+
!1,
|
|
487
|
+
null,
|
|
488
|
+
"0da3b03d"
|
|
489
|
+
);
|
|
490
|
+
const rt = Ye.exports;
|
|
491
|
+
export {
|
|
492
|
+
rt as B,
|
|
493
|
+
L as a,
|
|
494
|
+
Be as b,
|
|
495
|
+
_e as f,
|
|
496
|
+
Ge as g,
|
|
497
|
+
He as s
|
|
498
|
+
};
|
|
499
|
+
//# sourceMappingURL=focus-trap.C-wIQqpO.js.map
|