@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,299 @@
|
|
|
1
|
+
import { defineComponent as G, useSlots as O, computed as n, inject as z, ref as m, watch as P, provide as W, onMounted as Y } from "vue";
|
|
2
|
+
import { b as F } from "./index.BdrLbvtJ.js";
|
|
3
|
+
import { B as Q, a as U } from "./es6.n1ewaW31.js";
|
|
4
|
+
import { B as H } from "./typography.J1v_SPG3.js";
|
|
5
|
+
import { a as J } from "./checkbox-input.Dr1GS2BZ.js";
|
|
6
|
+
import { u as K } from "./aria-label.CaUURpnB.js";
|
|
7
|
+
import { g as M } from "./generate-uid.NJ8tVoha.js";
|
|
8
|
+
import { u as X } from "./use-has-slot.C9lQZ6nz.js";
|
|
9
|
+
import { a as Z } from "./radio-input.uJAhxKRs.js";
|
|
10
|
+
import { n as D } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
11
|
+
import { G as ee } from "./grid-layout.HvTAa4to.js";
|
|
12
|
+
import { E as te } from "./error-message.BAE9B9-N.js";
|
|
13
|
+
import { C as oe } from "./controls-group.C4CHrb6Y.js";
|
|
14
|
+
import "../assets/selection-card-group.css";
|
|
15
|
+
var B = /* @__PURE__ */ ((c) => (c.DISABLED = "disabled", c.READONLY = "readonly", c.ERROR = "error", c))(B || {});
|
|
16
|
+
const N = Symbol("selection card radio input injection key"), ae = {
|
|
17
|
+
name: "bento-selection-card"
|
|
18
|
+
}, ne = /* @__PURE__ */ G({
|
|
19
|
+
...ae,
|
|
20
|
+
props: {
|
|
21
|
+
/**
|
|
22
|
+
* The description of the selection card
|
|
23
|
+
*/
|
|
24
|
+
description: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: void 0
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* Disables the selection card
|
|
30
|
+
*/
|
|
31
|
+
disabled: { type: Boolean, default: !1 },
|
|
32
|
+
/**
|
|
33
|
+
* Makes the entire selection card clickable. Clicking over interactive elements inside the card with this prop enabled will not be possible.
|
|
34
|
+
*/
|
|
35
|
+
fullyClickable: { type: Boolean, default: !1 },
|
|
36
|
+
/**
|
|
37
|
+
* Shows the selection card in error state
|
|
38
|
+
*/
|
|
39
|
+
hasError: { type: Boolean, default: !1 },
|
|
40
|
+
/**
|
|
41
|
+
* This property should not be used directly.
|
|
42
|
+
* It will be used by v-model directive on selection card component.
|
|
43
|
+
*
|
|
44
|
+
* When handling a single input, use a string or a number.
|
|
45
|
+
*
|
|
46
|
+
* When handling multiple inputs, use an array of keys.
|
|
47
|
+
* These keys exist as a set "value" prop for each input.
|
|
48
|
+
*/
|
|
49
|
+
modelValue: {
|
|
50
|
+
type: [Boolean, String, Array],
|
|
51
|
+
default: null
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* Sets the selection card to readonly
|
|
55
|
+
*/
|
|
56
|
+
readonly: { type: Boolean, default: !1 },
|
|
57
|
+
/**
|
|
58
|
+
* The subtitle of the selection card
|
|
59
|
+
*/
|
|
60
|
+
subtitle: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: void 0
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* The title of the selection card
|
|
66
|
+
*/
|
|
67
|
+
title: {
|
|
68
|
+
type: String,
|
|
69
|
+
required: !0
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* Indicates the value of the input that will be returned when it's checked.
|
|
73
|
+
*/
|
|
74
|
+
value: {
|
|
75
|
+
type: [String, Number],
|
|
76
|
+
required: !0
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
emits: ["input", "update:model-value"],
|
|
80
|
+
setup(c, { emit: e }) {
|
|
81
|
+
const t = c, o = O(), a = X(o), v = M("selection-card-input-id"), s = M("selection-card-description"), C = n(
|
|
82
|
+
() => t.modelValue
|
|
83
|
+
), E = n(
|
|
84
|
+
() => t.modelValue
|
|
85
|
+
), x = n(() => ({
|
|
86
|
+
"b-selection-card--checked": p.value,
|
|
87
|
+
"b-selection-card--fully-clickable": t.fullyClickable
|
|
88
|
+
})), _ = n(() => ({
|
|
89
|
+
[`b-selection-card--${B.DISABLED}`]: t.disabled,
|
|
90
|
+
[`b-selection-card--${B.ERROR}`]: t.hasError,
|
|
91
|
+
[`b-selection-card--${B.READONLY}`]: t.readonly,
|
|
92
|
+
"b-selection-card--center-aligned": b.value
|
|
93
|
+
})), h = n(() => ({
|
|
94
|
+
"b-selection-card__checkbox-container--center-aligned": b.value
|
|
95
|
+
})), R = n(() => ({
|
|
96
|
+
"b-selection-card__checkbox-container-text--center-aligned": b.value
|
|
97
|
+
})), y = n(() => ({
|
|
98
|
+
"b-selection-card__slot--with-icon": a("icon")
|
|
99
|
+
})), r = K({
|
|
100
|
+
ariaLabel: t.title,
|
|
101
|
+
label: t.value
|
|
102
|
+
}), g = n(() => Array.isArray(t.modelValue)), p = n(() => k.value ? t.value === t.modelValue : g.value ? t.modelValue.some((i) => i === t.value) : t.modelValue), k = z(N, m(!1)), b = n(() => !t.subtitle && !t.description), u = m(null), l = m(null), d = m(null), q = (i) => {
|
|
103
|
+
var f, S, $, L, T, A;
|
|
104
|
+
if (u.value.$refs.inputRef === i.target) {
|
|
105
|
+
const j = V();
|
|
106
|
+
w(j);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (t.disabled && t.readonly || !t.fullyClickable && (l.value && ((S = (f = l.value) == null ? void 0 : f.$el) != null && S.contains(i.target)) || d.value && ((L = ($ = d.value) == null ? void 0 : $.$el) != null && L.contains(i.target)) || u.value && ((A = (T = u.value) == null ? void 0 : T.$el) != null && A.contains(i.target))))
|
|
110
|
+
return;
|
|
111
|
+
const I = V();
|
|
112
|
+
w(I);
|
|
113
|
+
}, V = () => {
|
|
114
|
+
var I;
|
|
115
|
+
const i = ((I = u.value) == null ? void 0 : I.$refs.inputRef).checked;
|
|
116
|
+
if (g.value) {
|
|
117
|
+
const f = [...t.modelValue], S = f.indexOf(t.value);
|
|
118
|
+
return S === -1 ? f.push(t.value) : f.splice(S, 1), f;
|
|
119
|
+
}
|
|
120
|
+
return k.value ? t.value : i;
|
|
121
|
+
}, w = (i) => {
|
|
122
|
+
!t.disabled && !t.readonly && (e("update:model-value", i), e("input", i));
|
|
123
|
+
};
|
|
124
|
+
return { __sfc: !0, props: t, emit: e, slots: o, hasSlot: a, inputId: v, descriptionId: s, computedRadioInputModelValue: C, computedCheckboxInputModelValue: E, conditionalClasses: x, containerConditionalClasses: _, checkboxContainerConditionalClasses: h, checkboxContainerTextConditionalClasses: R, slotConditionalClasses: y, ariaLabel: r, isCheckboxGroup: g, isChecked: p, isRadioInput: k, isTitleOnly: b, inputRef: u, slotRef: l, dynamicSlotRef: d, handleCardClick: q, toggleInput: V, onChange: w, BentoTypography: H, CheckboxInput: J, RadioInput: Z };
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
var le = function() {
|
|
128
|
+
var e = this, t = e._self._c, o = e._self._setupProxy;
|
|
129
|
+
return t("div", { staticClass: "b-selection-card", class: o.conditionalClasses, on: { click: o.handleCardClick } }, [t("div", { staticClass: "b-selection-card__container", class: o.containerConditionalClasses }, [t("div", { staticClass: "b-selection-card__checkbox-container", class: o.checkboxContainerConditionalClasses }, [t("div", { staticClass: "b-selection-card__checkbox-container-text", class: o.checkboxContainerTextConditionalClasses }, [o.hasSlot("icon") ? t("div", { staticClass: "b-selection-card__icon", attrs: { role: "presentation" } }, [e._t("icon")], 2) : e._e(), t("label", { staticClass: "b-selection-card__text", attrs: { for: o.inputId }, on: { click: function(a) {
|
|
130
|
+
return a.stopPropagation(), a.preventDefault(), o.handleCardClick.apply(null, arguments);
|
|
131
|
+
} } }, [e.subtitle ? t(o.BentoTypography, { staticClass: "b-selection-card__description", attrs: { el: "span", variant: "caption" } }, [e._v(" " + e._s(e.subtitle) + " ")]) : e._e(), t(o.BentoTypography, { attrs: { el: "span", variant: "title" } }, [e._v(e._s(e.title))]), e.description ? t(o.BentoTypography, { staticClass: "b-selection-card__description", attrs: { id: "descriptionId", el: "span", variant: "body" } }, [e._v(" " + e._s(e.description) + " ")]) : e._e()], 1)]), o.isRadioInput ? t(o.RadioInput, { ref: "inputRef", attrs: { id: o.inputId, "aria-label": o.ariaLabel, "aria-describedby": e.description ? o.descriptionId : void 0, disabled: e.disabled, "has-error": e.hasError, "aria-readonly": e.readonly ?? void 0, value: e.value, readonly: e.readonly, "model-value": o.computedRadioInputModelValue } }) : t(o.CheckboxInput, { ref: "inputRef", attrs: { id: o.inputId, "aria-label": o.ariaLabel, "aria-describedby": e.description ? o.descriptionId : void 0, disabled: e.disabled, "has-error": e.hasError, "aria-readonly": e.readonly ?? void 0, value: e.value, readonly: e.readonly, "model-value": o.computedCheckboxInputModelValue } })], 1), o.hasSlot("content") ? t(o.BentoTypography, { ref: "slotRef", staticClass: "b-selection-card__slot", class: o.slotConditionalClasses, attrs: { el: "div" } }, [e._t("content")], 2) : e._e(), o.hasSlot("dynamicContent") && o.isChecked ? t(o.BentoTypography, { ref: "dynamicSlotRef", staticClass: "b-selection-card__slot", class: o.slotConditionalClasses, attrs: { el: "div" } }, [e._t("dynamicContent")], 2) : e._e()], 1)]);
|
|
132
|
+
}, re = [], se = /* @__PURE__ */ D(
|
|
133
|
+
ne,
|
|
134
|
+
le,
|
|
135
|
+
re,
|
|
136
|
+
!1,
|
|
137
|
+
null,
|
|
138
|
+
"308f55e6"
|
|
139
|
+
);
|
|
140
|
+
const ie = se.exports, ce = {}, ue = /* @__PURE__ */ G({
|
|
141
|
+
...ce,
|
|
142
|
+
__name: "selection-card-group",
|
|
143
|
+
props: {
|
|
144
|
+
/**
|
|
145
|
+
* Descriptive supporting text visbile underneath the label.
|
|
146
|
+
*/
|
|
147
|
+
description: { type: String, default: null },
|
|
148
|
+
/**
|
|
149
|
+
* If set to true, renders all cards in the group in a disabled state.
|
|
150
|
+
*/
|
|
151
|
+
disabled: { type: Boolean, default: !1 },
|
|
152
|
+
/**
|
|
153
|
+
* Renders all cards in an error state with an error message.
|
|
154
|
+
*/
|
|
155
|
+
errorMessage: { type: String, default: null },
|
|
156
|
+
/**
|
|
157
|
+
* The form id the selection card group is associated with. Defaults to null, as a selection card group can also be used standalone.
|
|
158
|
+
*/
|
|
159
|
+
formId: { type: String, default: null },
|
|
160
|
+
/**
|
|
161
|
+
* Shows/hides the group label.
|
|
162
|
+
*/
|
|
163
|
+
hideLabel: { type: Boolean, default: null },
|
|
164
|
+
/**
|
|
165
|
+
* Label of the group. Required for accessibility purposes, even if it's not shown
|
|
166
|
+
*/
|
|
167
|
+
label: {
|
|
168
|
+
type: String,
|
|
169
|
+
required: !0
|
|
170
|
+
},
|
|
171
|
+
/**
|
|
172
|
+
* The selection card group's layout. It can be vertical or horizontal. Defaults to vertical.
|
|
173
|
+
* @values horizontal, vertical
|
|
174
|
+
*/
|
|
175
|
+
layout: {
|
|
176
|
+
type: String,
|
|
177
|
+
default: "vertical"
|
|
178
|
+
},
|
|
179
|
+
/**
|
|
180
|
+
* The selection card group's items.
|
|
181
|
+
*/
|
|
182
|
+
items: {
|
|
183
|
+
type: Array,
|
|
184
|
+
required: !0
|
|
185
|
+
},
|
|
186
|
+
/**
|
|
187
|
+
* Sets the responsive number of items rendered in each row.
|
|
188
|
+
*/
|
|
189
|
+
itemsPerRow: {
|
|
190
|
+
type: Object,
|
|
191
|
+
default: void 0
|
|
192
|
+
},
|
|
193
|
+
/**
|
|
194
|
+
* Determines the initially selected value of the group. Corresponds to the BentoSelectionCardItem's value.
|
|
195
|
+
* Defaults to no value selected.
|
|
196
|
+
*/
|
|
197
|
+
modelValue: {
|
|
198
|
+
type: [Array, String, Number],
|
|
199
|
+
default: null
|
|
200
|
+
},
|
|
201
|
+
/**
|
|
202
|
+
* Indicates the field is optional.
|
|
203
|
+
*/
|
|
204
|
+
optional: { type: Boolean, default: !1 },
|
|
205
|
+
/**
|
|
206
|
+
* Indicates the field is required.
|
|
207
|
+
*/
|
|
208
|
+
required: { type: Boolean, default: !1 },
|
|
209
|
+
/**
|
|
210
|
+
* Tooltip message.
|
|
211
|
+
*/
|
|
212
|
+
tooltipText: { type: String, default: null },
|
|
213
|
+
/**
|
|
214
|
+
* If set to true, renders all cards in the group in a readonly state.
|
|
215
|
+
*/
|
|
216
|
+
readonly: { type: Boolean, default: !1 },
|
|
217
|
+
/**
|
|
218
|
+
* Renders the cards with a checkbox or a radio input. Selection logic will also apply in accordance.
|
|
219
|
+
* @values checkbox, radio
|
|
220
|
+
*/
|
|
221
|
+
variant: { type: String, default: "checkbox" }
|
|
222
|
+
},
|
|
223
|
+
emits: ["input", "update:model-value"],
|
|
224
|
+
setup(c, { emit: e }) {
|
|
225
|
+
const t = c, o = O(), a = (l) => !!o[l], v = n(() => ({
|
|
226
|
+
"b-selection-card-group__items--horizontal": t.layout === "horizontal"
|
|
227
|
+
})), s = m(t.modelValue);
|
|
228
|
+
P(
|
|
229
|
+
() => t.modelValue,
|
|
230
|
+
() => {
|
|
231
|
+
s.value = t.modelValue;
|
|
232
|
+
}
|
|
233
|
+
);
|
|
234
|
+
const C = M("error"), E = n(() => !t.disabled && !t.readonly && !!t.errorMessage), x = m(null), { width: _ } = F(x), h = n(() => Q.split("px")[0]), R = n(() => U.split("px")[0]), y = n(() => _.value < h.value ? "small" : _.value >= h.value && _.value < R.value ? "medium" : "large"), r = n(() => {
|
|
235
|
+
var l;
|
|
236
|
+
return ((l = t.itemsPerRow) == null ? void 0 : l[y == null ? void 0 : y.value]) || t.items.length;
|
|
237
|
+
}), g = n(() => {
|
|
238
|
+
if (!t.itemsPerRow)
|
|
239
|
+
return [];
|
|
240
|
+
const l = [];
|
|
241
|
+
for (let d = 0; d < t.items.length; d += r == null ? void 0 : r.value)
|
|
242
|
+
l.push(t.items.slice(d, d + (r == null ? void 0 : r.value)));
|
|
243
|
+
return l;
|
|
244
|
+
}), p = n(() => 12 / (r == null ? void 0 : r.value)), k = n(() => r != null && r.value ? new Array(r == null ? void 0 : r.value).fill({
|
|
245
|
+
// Instead of passing the actual screen sizes values, passing the same values per each screen size and recomputing it makes sure visually the change is smoother and not laggy
|
|
246
|
+
small: p.value,
|
|
247
|
+
medium: p.value,
|
|
248
|
+
large: p.value
|
|
249
|
+
}) : []), b = (l) => {
|
|
250
|
+
s.value = l, e("update:model-value", l), e("input", l);
|
|
251
|
+
}, u = n(() => t.variant === "radio");
|
|
252
|
+
return W(N, u), Y(() => {
|
|
253
|
+
t.itemsPerRow && Object.values(t.itemsPerRow).forEach((l) => {
|
|
254
|
+
if (l && (l < 2 || l > 6))
|
|
255
|
+
throw new Error(
|
|
256
|
+
"itemsPerRow values must have a value between 2 and 6 items per row. Read the documentation for more information."
|
|
257
|
+
);
|
|
258
|
+
});
|
|
259
|
+
}), { __sfc: !0, props: t, emit: e, slots: o, hasSlot: a, conditionalItemsClasses: v, inputValue: s, errorMessageId: C, shouldShowGroupError: E, containerRef: x, width: _, smallBreakpoint: h, mediumBreakpoint: R, currentBreakpoint: y, computedItemsPerRow: r, computedRows: g, itemColumnWidth: p, computedColumnWidth: k, onInput: b, isRadioVariant: u, BentoSelectionCard: ie, ControlsGroup: oe, ErrorMessage: te, GridLayout: ee };
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
var de = function() {
|
|
263
|
+
var e = this, t = e._self._c, o = e._self._setupProxy;
|
|
264
|
+
return t(o.ControlsGroup, { ref: "containerRef", staticClass: "b-selection-card-group", attrs: { "aria-describedby": o.shouldShowGroupError ? o.errorMessageId : null, label: e.label, "hide-label": e.hideLabel, description: e.description, disabled: e.disabled, "tooltip-text": e.tooltipText, readonly: e.readonly, required: e.required, optional: e.optional, "component-name": "selection-card-group" } }, [!e.itemsPerRow || e.layout === "vertical" ? t("div", { staticClass: "b-selection-card-group__items", class: o.conditionalItemsClasses }, e._l(e.items, function(a) {
|
|
265
|
+
return t(o.BentoSelectionCard, e._b({ key: `selection-card-${a.value}`, staticClass: "b-selection-card-group__item", attrs: { "model-value": o.inputValue, readonly: e.readonly || a.readonly, "has-error": o.shouldShowGroupError, disabled: e.disabled || a.disabled }, on: { "update:model-value": o.onInput }, scopedSlots: e._u([o.hasSlot("icon") && a.icon ? { key: "icon", fn: function() {
|
|
266
|
+
return [e._t("icon", null, null, a)];
|
|
267
|
+
}, proxy: !0 } : null, o.hasSlot("content") && a.content ? { key: "content", fn: function() {
|
|
268
|
+
return [e._t("content", null, null, a)];
|
|
269
|
+
}, proxy: !0 } : null, o.hasSlot("dynamicContent") && a.dynamicContent ? { key: "dynamicContent", fn: function() {
|
|
270
|
+
return [e._t("dynamicContent", null, null, a)];
|
|
271
|
+
}, proxy: !0 } : null], null, !0) }, "bento-selection-card", a, !1));
|
|
272
|
+
}), 1) : [t("div", { key: `selection-card-group-layout-breakpoint-${o.currentBreakpoint}` }, e._l(o.computedRows, function(a, v) {
|
|
273
|
+
return t(o.GridLayout, { key: `selection-card-group-row-${v}-cols-${o.computedItemsPerRow}`, staticClass: "b-selection-card-group__items--wrap", attrs: { "column-width": o.computedColumnWidth }, scopedSlots: e._u([e._l(a, function(s, C) {
|
|
274
|
+
return { key: `col-${C + 1}`, fn: function() {
|
|
275
|
+
return [t(o.BentoSelectionCard, e._b({ key: `selection-card-${s.value}`, staticClass: "b-selection-card-group__item b-selection-card-group__item--full-height", attrs: { "model-value": o.inputValue, readonly: e.readonly || s.readonly, "has-error": o.shouldShowGroupError, disabled: e.disabled || s.disabled }, on: { "update:model-value": o.onInput }, scopedSlots: e._u([o.hasSlot("icon") && s.icon ? { key: "icon", fn: function() {
|
|
276
|
+
return [e._t("icon", null, null, s)];
|
|
277
|
+
}, proxy: !0 } : null, o.hasSlot("content") && s.content ? { key: "content", fn: function() {
|
|
278
|
+
return [e._t("content", null, null, s)];
|
|
279
|
+
}, proxy: !0 } : null, o.hasSlot("dynamicContent") && s.dynamicContent ? { key: "dynamicContent", fn: function() {
|
|
280
|
+
return [e._t("dynamicContent", null, null, s)];
|
|
281
|
+
}, proxy: !0 } : null], null, !0) }, "bento-selection-card", s, !1))];
|
|
282
|
+
}, proxy: !0 };
|
|
283
|
+
})], null, !0) });
|
|
284
|
+
}), 1)], o.shouldShowGroupError ? t(o.ErrorMessage, { staticClass: "b-selection-card-group__error-message", attrs: { id: o.errorMessageId, "error-message": e.errorMessage } }) : e._e()], 2);
|
|
285
|
+
}, pe = [], fe = /* @__PURE__ */ D(
|
|
286
|
+
ue,
|
|
287
|
+
de,
|
|
288
|
+
pe,
|
|
289
|
+
!1,
|
|
290
|
+
null,
|
|
291
|
+
"17b939ac"
|
|
292
|
+
);
|
|
293
|
+
const Be = fe.exports;
|
|
294
|
+
export {
|
|
295
|
+
ie as B,
|
|
296
|
+
B as a,
|
|
297
|
+
Be as s
|
|
298
|
+
};
|
|
299
|
+
//# sourceMappingURL=selection-card-group.CnvREAh5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-card-group.CnvREAh5.js","sources":["../../src/components/selection-card/selection-card.types.ts","../../src/components/selection-card/selection-card.keys.ts","../../src/components/selection-card/selection-card.vue","../../src/components/selection-card/components/selection-card-group/selection-card-group.vue"],"sourcesContent":["import { RadioInputValue } from '@/components/internal/radio-input';\nimport { BentoCheckboxType } from '@/core/components/checkbox/checkbox.types';\nimport { VueNodeElement } from '@/types';\n\nexport enum BentoSelectionCardState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n\nexport type BentoSelectionCardValue = string | number;\n\nexport type BentoSelectionCardModelValue = BentoCheckboxType | RadioInputValue;\n\nexport interface BentoSelectionCardItem {\n content?: string | object;\n description?: string;\n disabled?: boolean;\n dynamicContent?: string | object;\n fullyClickable?: boolean;\n hasError?: boolean;\n icon?: VueNodeElement;\n readonly?: boolean;\n subtitle?: string;\n title: string;\n value: BentoSelectionCardValue;\n}\n","export const SELECTION_CARD_RADIO_INPUT_INJECTION_KEY = Symbol('selection card radio input injection key');\n","<template>\n <div class=\"b-selection-card\" :class=\"conditionalClasses\" @click=\"handleCardClick\">\n <div class=\"b-selection-card__container\" :class=\"containerConditionalClasses\">\n <div class=\"b-selection-card__checkbox-container\" :class=\"checkboxContainerConditionalClasses\">\n <div class=\"b-selection-card__checkbox-container-text\" :class=\"checkboxContainerTextConditionalClasses\">\n <div v-if=\"hasSlot('icon')\" class=\"b-selection-card__icon\" role=\"presentation\">\n <slot name=\"icon\" />\n </div>\n <label :for=\"inputId\" class=\"b-selection-card__text\" @click.stop.prevent=\"handleCardClick\">\n <bento-typography\n v-if=\"subtitle\"\n class=\"b-selection-card__description\"\n el=\"span\"\n variant=\"caption\"\n >\n {{ subtitle }}\n </bento-typography>\n <bento-typography el=\"span\" variant=\"title\">{{ title }}</bento-typography>\n <bento-typography\n v-if=\"description\"\n id=\"descriptionId\"\n class=\"b-selection-card__description\"\n el=\"span\"\n variant=\"body\"\n >\n {{ description }}\n </bento-typography>\n </label>\n </div>\n <radio-input\n v-if=\"isRadioInput\"\n :id=\"inputId\"\n ref=\"inputRef\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"description ? descriptionId : undefined\"\n :disabled=\"disabled\"\n :has-error=\"hasError\"\n :aria-readonly=\"readonly ?? undefined\"\n :value=\"value\"\n :readonly=\"readonly\"\n :model-value=\"computedRadioInputModelValue\"\n />\n <checkbox-input\n v-else\n :id=\"inputId\"\n ref=\"inputRef\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"description ? descriptionId : undefined\"\n :disabled=\"disabled\"\n :has-error=\"hasError\"\n :aria-readonly=\"readonly ?? undefined\"\n :value=\"value\"\n :readonly=\"readonly\"\n :model-value=\"computedCheckboxInputModelValue\"\n />\n </div>\n <bento-typography\n v-if=\"hasSlot('content')\"\n ref=\"slotRef\"\n el=\"div\"\n class=\"b-selection-card__slot\"\n :class=\"slotConditionalClasses\"\n >\n <slot name=\"content\" />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('dynamicContent') && isChecked\"\n ref=\"dynamicSlotRef\"\n el=\"div\"\n class=\"b-selection-card__slot\"\n :class=\"slotConditionalClasses\"\n >\n <slot name=\"dynamicContent\" />\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import { BentoCheckboxType, BentoMultiCheckboxType, CheckboxInput } from '../internal/checkbox-input';\n import { RadioInput, RadioInputValue } from '../internal/radio-input';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { generateUid } from '@/core/utils/ts';\n import { computed, ComputedRef, inject, PropType, Ref, ref, useSlots } from 'vue';\n import { useHasSlot } from '@/composables';\n import type { BentoSelectionCardModelValue, BentoSelectionCardValue } from './selection-card.types';\n import { BentoSelectionCardState } from './selection-card.types';\n import { SELECTION_CARD_RADIO_INPUT_INJECTION_KEY } from './selection-card.keys';\n\n const props = defineProps({\n /**\n * The description of the selection card\n */\n description: {\n type: String,\n default: undefined,\n },\n\n /**\n * Disables the selection card\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Makes the entire selection card clickable. Clicking over interactive elements inside the card with this prop enabled will not be possible.\n */\n fullyClickable: { type: Boolean, default: false },\n\n /**\n * Shows the selection card in error state\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * This property should not be used directly.\n * It will be used by v-model directive on selection card component.\n *\n * When handling a single input, use a string or a number.\n *\n * When handling multiple inputs, use an array of keys.\n * These keys exist as a set \"value\" prop for each input.\n */\n modelValue: {\n type: [Boolean, String, Array] as PropType<BentoSelectionCardModelValue>,\n default: null,\n },\n\n /**\n * Sets the selection card to readonly\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The subtitle of the selection card\n */\n subtitle: {\n type: String,\n default: undefined,\n },\n\n /**\n * The title of the selection card\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates the value of the input that will be returned when it's checked.\n */\n value: {\n type: [String, Number] as PropType<BentoSelectionCardValue>,\n required: true,\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const inputId = generateUid('selection-card-input-id');\n const descriptionId = generateUid('selection-card-description');\n\n const computedRadioInputModelValue: ComputedRef<RadioInputValue> = computed(\n () => props.modelValue as RadioInputValue\n );\n const computedCheckboxInputModelValue: ComputedRef<BentoCheckboxType> = computed(\n () => props.modelValue as BentoCheckboxType\n );\n\n const conditionalClasses = computed(() => ({\n 'b-selection-card--checked': isChecked.value,\n 'b-selection-card--fully-clickable': props.fullyClickable,\n }));\n\n const containerConditionalClasses = computed(() => ({\n [`b-selection-card--${BentoSelectionCardState.DISABLED}`]: props.disabled,\n [`b-selection-card--${BentoSelectionCardState.ERROR}`]: props.hasError,\n [`b-selection-card--${BentoSelectionCardState.READONLY}`]: props.readonly,\n 'b-selection-card--center-aligned': isTitleOnly.value,\n }));\n\n const checkboxContainerConditionalClasses = computed(() => ({\n 'b-selection-card__checkbox-container--center-aligned': isTitleOnly.value,\n }));\n\n const checkboxContainerTextConditionalClasses = computed(() => ({\n 'b-selection-card__checkbox-container-text--center-aligned': isTitleOnly.value,\n }));\n\n const slotConditionalClasses = computed(() => ({\n 'b-selection-card__slot--with-icon': hasSlot('icon'),\n }));\n\n const ariaLabel = useAriaLabel({\n ariaLabel: props.title,\n label: props.value as string,\n });\n\n const isCheckboxGroup = computed(() => Array.isArray(props.modelValue));\n\n const isChecked: ComputedRef<boolean> = computed(() => {\n if (isRadioInput.value) {\n return props.value === props.modelValue;\n }\n if (!isCheckboxGroup.value) {\n return props.modelValue as boolean;\n }\n\n return (props.modelValue as BentoMultiCheckboxType).some(item => item === props.value);\n });\n\n const isRadioInput: Ref<boolean> = inject(SELECTION_CARD_RADIO_INPUT_INJECTION_KEY, ref(false));\n\n const isTitleOnly = computed(() => !props.subtitle && !props.description);\n\n const inputRef = ref<InstanceType<typeof RadioInput> | InstanceType<typeof CheckboxInput>>(null);\n const slotRef = ref(null);\n const dynamicSlotRef = ref(null);\n\n // Handle click on the whole card area\n const handleCardClick = (event: Event) => {\n if (inputRef.value.$refs.inputRef === event.target) {\n const newValue = toggleInput();\n onChange(newValue);\n return;\n }\n\n // Do nothing if disabled or readonly\n if (props.disabled && props.readonly) {\n return;\n }\n\n // If it's not fully clickable prevent selecting the card if the click\n // originated in a slot\n if (!props.fullyClickable) {\n // Check if the click originated from the slot - in that case, do nothng\n if (slotRef.value && slotRef.value?.$el?.contains(event.target)) {\n return;\n }\n // Check if the click originated from the dynamic slot - in that case, do nothng\n if (dynamicSlotRef.value && dynamicSlotRef.value?.$el?.contains(event.target)) {\n return;\n }\n // Check if the click originated from the input - in that case do nothing, as the input will emit the event already\n if (inputRef.value && inputRef.value?.$el?.contains(event.target as Node)) {\n return;\n }\n }\n\n // If the click originated outside of these two areas, emit the change event\n const newValue = toggleInput();\n\n onChange(newValue);\n };\n\n const toggleInput = (): BentoSelectionCardModelValue => {\n const currentValue: boolean = (inputRef.value?.$refs.inputRef as HTMLInputElement).checked;\n\n if (isCheckboxGroup.value) {\n const newCheckedList = [...(props.modelValue as BentoMultiCheckboxType)];\n const index = newCheckedList.indexOf(props.value);\n\n if (index === -1) {\n newCheckedList.push(props.value);\n } else {\n newCheckedList.splice(index, 1);\n }\n return newCheckedList;\n }\n\n if (isRadioInput.value) {\n return props.value;\n }\n return currentValue;\n };\n\n const onChange = newValue => {\n if (!props.disabled && !props.readonly) {\n emit('update:model-value', newValue);\n emit('input', newValue);\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Selection card component. If used standalone, only the checkbox variant can be used. If the checkbox variant is needed, please use the bento-selection-card-group component.\n *\n * @example\n * import { BentoSelectionCard } from '@adyen/bento-vue2';\n * import EmoticonHappyIcon from '@adyen/ui-assets-icons-16/vue/emoticon-happy';\n *\n * export default {\n * components: { BentoSelectionCard, EmoticonHappyIcon },\n * template: `\n * <bento-selection-card title=\"Card title\" :model-value.sync=\"yourModelValue\">\n * <template #icon>\n * <emoticon-happy-icon />\n * </template>\n * </bento-selection-card>\n * `\n * }\n */\n export default {\n name: 'bento-selection-card',\n };\n</script>\n<style lang=\"scss\" scoped src=\"./selection-card.scss\" />\n","<template>\n <controls-group\n ref=\"containerRef\"\n :aria-describedby=\"shouldShowGroupError ? errorMessageId : null\"\n :label=\"label\"\n :hide-label=\"hideLabel\"\n :description=\"description\"\n :disabled=\"disabled\"\n :tooltip-text=\"tooltipText\"\n :readonly=\"readonly\"\n :required=\"required\"\n :optional=\"optional\"\n class=\"b-selection-card-group\"\n component-name=\"selection-card-group\"\n >\n <div\n v-if=\"!itemsPerRow || layout === 'vertical'\"\n class=\"b-selection-card-group__items\"\n :class=\"conditionalItemsClasses\"\n >\n <bento-selection-card\n v-for=\"item in items\"\n :key=\"`selection-card-${item.value}`\"\n class=\"b-selection-card-group__item\"\n v-bind=\"item\"\n :model-value=\"inputValue\"\n :readonly=\"readonly || item.readonly\"\n :has-error=\"shouldShowGroupError\"\n :disabled=\"disabled || item.disabled\"\n @update:model-value=\"onInput\"\n >\n <template v-if=\"hasSlot('icon') && item.icon\" #icon>\n <slot name=\"icon\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('content') && item.content\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('dynamicContent') && item.dynamicContent\" #dynamicContent>\n <slot name=\"dynamicContent\" v-bind=\"item\"></slot>\n </template>\n </bento-selection-card>\n </div>\n <template v-else>\n <div :key=\"`selection-card-group-layout-breakpoint-${currentBreakpoint}`\">\n <grid-layout\n v-for=\"(row, rowIndex) in computedRows\"\n :key=\"`selection-card-group-row-${rowIndex}-cols-${computedItemsPerRow}`\"\n class=\"b-selection-card-group__items--wrap\"\n :column-width=\"computedColumnWidth\"\n >\n <template v-for=\"(item, columnIndex) in row\" #[`col-${columnIndex+1}`]>\n <bento-selection-card\n :key=\"`selection-card-${item.value}`\"\n class=\"b-selection-card-group__item b-selection-card-group__item--full-height\"\n v-bind=\"item\"\n :model-value=\"inputValue\"\n :readonly=\"readonly || item.readonly\"\n :has-error=\"shouldShowGroupError\"\n :disabled=\"disabled || item.disabled\"\n @update:model-value=\"onInput\"\n >\n <template v-if=\"hasSlot('icon') && item.icon\" #icon>\n <slot name=\"icon\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('content') && item.content\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('dynamicContent') && item.dynamicContent\" #dynamicContent>\n <slot name=\"dynamicContent\" v-bind=\"item\"></slot>\n </template>\n </bento-selection-card>\n </template>\n </grid-layout>\n </div>\n </template>\n <error-message\n v-if=\"shouldShowGroupError\"\n :id=\"errorMessageId\"\n :error-message=\"errorMessage\"\n class=\"b-selection-card-group__error-message\"\n />\n </controls-group>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, PropType, provide, ref, useSlots, watch } from 'vue';\n import { useElementSize } from '@vueuse/core';\n import { BMediaQueryMMax, BMediaQuerySMax } from '@adyen/bento-design-tokens/dist/js/bento/es6';\n import {\n BentoSelectionCardGroupItemsPerRow,\n BentoSelectionCardGroupLayout,\n BentoSelectionCardGroupVariant,\n } from './selection-card-group.types';\n import BentoSelectionCard from '../../selection-card.vue';\n import { ControlsGroup, ErrorMessage, GridLayout } from '../../../internal';\n import { BentoSelectionCardItem, BentoSelectionCardModelValue } from '../../selection-card.types';\n import { SELECTION_CARD_RADIO_INPUT_INJECTION_KEY } from '../../selection-card.keys';\n import { generateUid } from '@/core/utils/ts';\n\n const props = defineProps({\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all cards in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders all cards in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the selection card group is associated with. Defaults to null, as a selection card group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * Label of the group. Required for accessibility purposes, even if it's not shown\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * The selection card group's layout. It can be vertical or horizontal. Defaults to vertical.\n * @values horizontal, vertical\n */\n layout: {\n type: String as PropType<BentoSelectionCardGroupLayout>,\n default: 'vertical',\n },\n\n /**\n * The selection card group's items.\n */\n items: {\n type: Array as PropType<BentoSelectionCardItem[]>,\n required: true,\n },\n\n /**\n * Sets the responsive number of items rendered in each row.\n */\n itemsPerRow: {\n type: Object as PropType<BentoSelectionCardGroupItemsPerRow>,\n default: undefined,\n },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoSelectionCardItem's value.\n * Defaults to no value selected.\n */\n modelValue: {\n type: [Array, String, Number] as PropType<BentoSelectionCardModelValue>,\n default: null,\n },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * If set to true, renders all cards in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Renders the cards with a checkbox or a radio input. Selection logic will also apply in accordance.\n * @values checkbox, radio\n */\n variant: { type: String as PropType<BentoSelectionCardGroupVariant>, default: 'checkbox' },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\"]);\n const slots = useSlots();\n // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for vue3 named scoped slots\n // We do the same in bento-checkbox-group\n const hasSlot = name => !!slots[name];\n\n const conditionalItemsClasses = computed(() => ({\n 'b-selection-card-group__items--horizontal': props.layout === 'horizontal',\n }));\n\n const inputValue = ref(props.modelValue);\n watch(\n () => props.modelValue,\n () => {\n inputValue.value = props.modelValue;\n }\n );\n\n // Error message logic\n const errorMessageId = generateUid('error');\n const shouldShowGroupError = computed(() => !props.disabled && !props.readonly && !!props.errorMessage);\n\n // itemsPerRow logic\n const containerRef = ref<HTMLElement | null>(null);\n const { width } = useElementSize(containerRef);\n\n const smallBreakpoint = computed(() => BMediaQuerySMax.split('px')[0]);\n const mediumBreakpoint = computed(() => BMediaQueryMMax.split('px')[0]);\n\n const currentBreakpoint = computed(() => {\n if (width.value < smallBreakpoint.value) {\n return 'small';\n }\n if (width.value >= smallBreakpoint.value && width.value < mediumBreakpoint.value) {\n return 'medium';\n }\n return 'large';\n });\n\n const computedItemsPerRow = computed(() => {\n return (props.itemsPerRow?.[currentBreakpoint?.value] as number) || props.items.length;\n });\n\n const computedRows = computed(() => {\n if (!props.itemsPerRow) {\n return [];\n }\n const rows = [];\n for (let i = 0; i < props.items.length; i += computedItemsPerRow?.value) {\n rows.push(props.items.slice(i, i + computedItemsPerRow?.value));\n }\n return rows;\n });\n\n // We need to compute the column width on 12 because we're using a 12-column system for out grid-layout logic\n const itemColumnWidth = computed(() => 12 / computedItemsPerRow?.value);\n\n /**\n * Filling the columnWidth array with the same parameters per item to pass\n * to the `grid-layout` layout so the each card can have\n * the same width according to the screen size.\n */\n const computedColumnWidth = computed(() => {\n return computedItemsPerRow?.value\n ? new Array(computedItemsPerRow?.value).fill({\n // Instead of passing the actual screen sizes values, passing the same values per each screen size and recomputing it makes sure visually the change is smoother and not laggy\n small: itemColumnWidth.value,\n medium: itemColumnWidth.value,\n large: itemColumnWidth.value,\n })\n : [];\n });\n\n const onInput = value => {\n inputValue.value = value;\n emit('update:model-value', value);\n emit('input', value);\n };\n\n const isRadioVariant = computed(() => props.variant === 'radio');\n\n provide(SELECTION_CARD_RADIO_INPUT_INJECTION_KEY, isRadioVariant);\n\n onMounted(() => {\n if (props.itemsPerRow) {\n Object.values(props.itemsPerRow).forEach(el => {\n if (el && (el < 2 || el > 6)) {\n throw new Error(\n 'itemsPerRow values must have a value between 2 and 6 items per row. Read the documentation for more information.'\n );\n }\n });\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Group of bento-selection-cards.\n *\n * @example\n * import { BentoSelectionCardGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectionCardGroup },\n * template: `\n * <bento-selection-card-group\n * :items=\"[\n * {\n * title: 'Card 1',\n * value: 'card-1',\n * content: 'Slot content 1',\n * icon: RetailIcon,\n * },\n * {\n * title: 'Card 2',\n * value: 'card-2',\n * content: 'Slot content 2',\n * icon: LeafIcon,\n * },\n * ]\"\n * >\n * <template #icon=\"{ icon }\">\n * <component :is=\"icon\"/>\n * </template>\n * <template #content=\"{ content }\">\n * <div>{{ content }}</div>\n * </template>\n * </bento-selection-card-group>\n * `,\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./selection-card-group.scss\" />\n"],"names":["BentoSelectionCardState","BentoSelectionCardState2","SELECTION_CARD_RADIO_INPUT_INJECTION_KEY","__default__$1","slots","useSlots","hasSlot","useHasSlot","inputId","generateUid","descriptionId","computedRadioInputModelValue","computed","props","computedCheckboxInputModelValue","conditionalClasses","isChecked","containerConditionalClasses","isTitleOnly","checkboxContainerConditionalClasses","checkboxContainerTextConditionalClasses","slotConditionalClasses","ariaLabel","useAriaLabel","isCheckboxGroup","isRadioInput","item","inject","ref","inputRef","slotRef","dynamicSlotRef","handleCardClick","event","newValue2","toggleInput","onChange","_b","_a","_d","_c","_f","_e","newValue","currentValue","newCheckedList","index","emit","__default__","name","conditionalItemsClasses","inputValue","watch","errorMessageId","shouldShowGroupError","containerRef","width","useElementSize","smallBreakpoint","BMediaQuerySMax","mediumBreakpoint","BMediaQueryMMax","currentBreakpoint","computedItemsPerRow","computedRows","rows","i","itemColumnWidth","computedColumnWidth","onInput","value","isRadioVariant","provide","onMounted","el"],"mappings":"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"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { n as r } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
3
|
+
let C = 0;
|
|
4
|
+
const i = {
|
|
5
|
+
beforeCreate() {
|
|
6
|
+
this.uuid = C.toString(), C += 1;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
var n = function() {
|
|
10
|
+
var t = this, s = t._self._c;
|
|
11
|
+
return s("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? s("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), s("path", { attrs: { fill: "#00112C", d: "M2.99035 14.0608L14.051 3.00011L12.9903 1.93945L1.92969 13.0001L2.99035 14.0608Z" } }), s("path", { attrs: { fill: "#00112C", d: "M13.9404 5.23L12.8704 6.3C13.4704 6.97 13.9004 7.62 14.1304 8C13.4704 9.07 11.2504 12.25 8.00039 12.25C7.67039 12.25 7.34039 12.22 7.03039 12.14L5.80039 13.37C6.48039 13.61 7.21039 13.75 8.00039 13.75C12.7425 13.75 15.4838 8.69421 15.6649 8.36011C15.6671 8.35603 15.6689 8.35265 15.6704 8.35L15.8504 8L15.6704 7.65C15.6204 7.55 15.0204 6.43 13.9404 5.23Z" } }), s("path", { attrs: { fill: "#00112C", d: "M8.96039 3.85C8.65039 3.78 8.33039 3.75 8.00039 3.75C4.75039 3.75 2.53039 6.93 1.87039 8C2.10039 8.38 2.53039 9.02 3.12039 9.69L2.06039 10.75C0.98039 9.56 0.380391 8.45 0.330391 8.35L0.150391 8L0.330391 7.65C0.331838 7.64735 0.333668 7.64397 0.33588 7.63989C0.517034 7.30578 3.25829 2.25 8.00039 2.25C8.79039 2.25 9.52039 2.39 10.1904 2.62L8.96039 3.85Z" } })]);
|
|
12
|
+
}, l = [], _ = /* @__PURE__ */ r(
|
|
13
|
+
i,
|
|
14
|
+
n,
|
|
15
|
+
l,
|
|
16
|
+
!1,
|
|
17
|
+
null,
|
|
18
|
+
null
|
|
19
|
+
);
|
|
20
|
+
const g = _.exports;
|
|
21
|
+
let e = 0;
|
|
22
|
+
const o = {
|
|
23
|
+
beforeCreate() {
|
|
24
|
+
this.uuid = e.toString(), e += 1;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
var L = function() {
|
|
28
|
+
var t = this, s = t._self._c;
|
|
29
|
+
return s("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? s("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), s("path", { attrs: { fill: "#00112C", d: "M8 5.25C6.48122 5.25 5.25 6.48122 5.25 8C5.25 9.51878 6.48122 10.75 8 10.75C9.51878 10.75 10.75 9.51878 10.75 8C10.75 6.48122 9.51878 5.25 8 5.25ZM6.75 8C6.75 7.30964 7.30964 6.75 8 6.75C8.69036 6.75 9.25 7.30964 9.25 8C9.25 8.69036 8.69036 9.25 8 9.25C7.30964 9.25 6.75 8.69036 6.75 8Z" } }), s("path", { attrs: { fill: "#00112C", d: "M7.99964 2.25C5.50387 2.25 3.57073 3.66588 2.3086 4.9806C1.6704 5.64539 1.18078 6.30745 0.850599 6.80272C0.685043 7.05106 0.558349 7.2593 0.471981 7.40748C0.428769 7.48162 0.395568 7.54087 0.372564 7.58275C0.36106 7.60369 0.352097 7.6203 0.345701 7.63227L0.338032 7.64672L0.335646 7.65126L0.334488 7.65348L0.154297 8L0.334225 8.34601L0.999638 8C0.334225 8.34601 0.334814 8.34715 0.334814 8.34715L0.335646 8.34874L0.338032 8.35328L0.345701 8.36773C0.352097 8.3797 0.36106 8.39631 0.372564 8.41725C0.395568 8.45913 0.428769 8.51838 0.471981 8.59252C0.558349 8.7407 0.685043 8.94894 0.850599 9.19728C1.18078 9.69255 1.6704 10.3546 2.3086 11.0194C3.57073 12.3341 5.50387 13.75 7.99964 13.75C10.4954 13.75 12.4285 12.3341 13.6907 11.0194C14.3289 10.3546 14.8185 9.69255 15.1487 9.19728C15.3142 8.94894 15.4409 8.7407 15.5273 8.59252C15.5705 8.51838 15.6037 8.45913 15.6267 8.41725C15.6382 8.39631 15.6472 8.3797 15.6536 8.36773L15.6612 8.35328L15.6636 8.34874L15.6648 8.34652L15.845 8L15.6651 7.65399L14.9996 8C15.6651 7.65399 15.6645 7.65285 15.6645 7.65285L15.6636 7.65126L15.6612 7.64672L15.6536 7.63227C15.6472 7.6203 15.6382 7.60369 15.6267 7.58275C15.6037 7.54087 15.5705 7.48162 15.5273 7.40748C15.4409 7.2593 15.3142 7.05106 15.1487 6.80272C14.8185 6.30745 14.3289 5.64539 13.6907 4.9806C12.4285 3.66588 10.4954 2.25 7.99964 2.25ZM14.9996 8L15.6648 8.34652C15.6648 8.34652 15.6651 8.34601 14.9996 8ZM0.999638 8L0.334488 7.65348C0.334488 7.65348 0.334225 7.65399 0.999638 8ZM2.09867 8.36522C2.00649 8.22694 1.92852 8.10363 1.86519 8C1.92852 7.89637 2.00649 7.77306 2.09867 7.63478C2.39349 7.19255 2.82887 6.60461 3.39068 6.0194C4.52855 4.83412 6.09541 3.75 7.99964 3.75C9.90387 3.75 11.4707 4.83412 12.6086 6.0194C13.1704 6.60461 13.6058 7.19255 13.9006 7.63478C13.9928 7.77306 14.0708 7.89637 14.1341 8C14.0708 8.10363 13.9928 8.22694 13.9006 8.36522C13.6058 8.80745 13.1704 9.39539 12.6086 9.9806C11.4707 11.1659 9.90387 12.25 7.99964 12.25C6.09541 12.25 4.52855 11.1659 3.39068 9.9806C2.82887 9.39539 2.39349 8.80745 2.09867 8.36522Z" } })]);
|
|
30
|
+
}, c = [], f = /* @__PURE__ */ r(
|
|
31
|
+
o,
|
|
32
|
+
L,
|
|
33
|
+
c,
|
|
34
|
+
!1,
|
|
35
|
+
null,
|
|
36
|
+
null
|
|
37
|
+
);
|
|
38
|
+
const h = f.exports;
|
|
39
|
+
export {
|
|
40
|
+
g as H,
|
|
41
|
+
h as S
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=show.e4LEpZKG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.e4LEpZKG.js","sources":["../../../ui-assets/icons-16/dist/vue/hide.vue","../../../ui-assets/icons-16/dist/vue/show.vue"],"sourcesContent":["\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=\"#00112C\" d=\"M2.99035 14.0608L14.051 3.00011L12.9903 1.93945L1.92969 13.0001L2.99035 14.0608Z\"/><path fill=\"#00112C\" d=\"M13.9404 5.23L12.8704 6.3C13.4704 6.97 13.9004 7.62 14.1304 8C13.4704 9.07 11.2504 12.25 8.00039 12.25C7.67039 12.25 7.34039 12.22 7.03039 12.14L5.80039 13.37C6.48039 13.61 7.21039 13.75 8.00039 13.75C12.7425 13.75 15.4838 8.69421 15.6649 8.36011C15.6671 8.35603 15.6689 8.35265 15.6704 8.35L15.8504 8L15.6704 7.65C15.6204 7.55 15.0204 6.43 13.9404 5.23Z\"/><path fill=\"#00112C\" d=\"M8.96039 3.85C8.65039 3.78 8.33039 3.75 8.00039 3.75C4.75039 3.75 2.53039 6.93 1.87039 8C2.10039 8.38 2.53039 9.02 3.12039 9.69L2.06039 10.75C0.98039 9.56 0.380391 8.45 0.330391 8.35L0.150391 8L0.330391 7.65C0.331838 7.64735 0.333668 7.64397 0.33588 7.63989C0.517034 7.30578 3.25829 2.25 8.00039 2.25C8.79039 2.25 9.52039 2.39 10.1904 2.62L8.96039 3.85Z\"/></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=\"#00112C\" d=\"M8 5.25C6.48122 5.25 5.25 6.48122 5.25 8C5.25 9.51878 6.48122 10.75 8 10.75C9.51878 10.75 10.75 9.51878 10.75 8C10.75 6.48122 9.51878 5.25 8 5.25ZM6.75 8C6.75 7.30964 7.30964 6.75 8 6.75C8.69036 6.75 9.25 7.30964 9.25 8C9.25 8.69036 8.69036 9.25 8 9.25C7.30964 9.25 6.75 8.69036 6.75 8Z\"/><path fill=\"#00112C\" d=\"M7.99964 2.25C5.50387 2.25 3.57073 3.66588 2.3086 4.9806C1.6704 5.64539 1.18078 6.30745 0.850599 6.80272C0.685043 7.05106 0.558349 7.2593 0.471981 7.40748C0.428769 7.48162 0.395568 7.54087 0.372564 7.58275C0.36106 7.60369 0.352097 7.6203 0.345701 7.63227L0.338032 7.64672L0.335646 7.65126L0.334488 7.65348L0.154297 8L0.334225 8.34601L0.999638 8C0.334225 8.34601 0.334814 8.34715 0.334814 8.34715L0.335646 8.34874L0.338032 8.35328L0.345701 8.36773C0.352097 8.3797 0.36106 8.39631 0.372564 8.41725C0.395568 8.45913 0.428769 8.51838 0.471981 8.59252C0.558349 8.7407 0.685043 8.94894 0.850599 9.19728C1.18078 9.69255 1.6704 10.3546 2.3086 11.0194C3.57073 12.3341 5.50387 13.75 7.99964 13.75C10.4954 13.75 12.4285 12.3341 13.6907 11.0194C14.3289 10.3546 14.8185 9.69255 15.1487 9.19728C15.3142 8.94894 15.4409 8.7407 15.5273 8.59252C15.5705 8.51838 15.6037 8.45913 15.6267 8.41725C15.6382 8.39631 15.6472 8.3797 15.6536 8.36773L15.6612 8.35328L15.6636 8.34874L15.6648 8.34652L15.845 8L15.6651 7.65399L14.9996 8C15.6651 7.65399 15.6645 7.65285 15.6645 7.65285L15.6636 7.65126L15.6612 7.64672L15.6536 7.63227C15.6472 7.6203 15.6382 7.60369 15.6267 7.58275C15.6037 7.54087 15.5705 7.48162 15.5273 7.40748C15.4409 7.2593 15.3142 7.05106 15.1487 6.80272C14.8185 6.30745 14.3289 5.64539 13.6907 4.9806C12.4285 3.66588 10.4954 2.25 7.99964 2.25ZM14.9996 8L15.6648 8.34652C15.6648 8.34652 15.6651 8.34601 14.9996 8ZM0.999638 8L0.334488 7.65348C0.334488 7.65348 0.334225 7.65399 0.999638 8ZM2.09867 8.36522C2.00649 8.22694 1.92852 8.10363 1.86519 8C1.92852 7.89637 2.00649 7.77306 2.09867 7.63478C2.39349 7.19255 2.82887 6.60461 3.39068 6.0194C4.52855 4.83412 6.09541 3.75 7.99964 3.75C9.90387 3.75 11.4707 4.83412 12.6086 6.0194C13.1704 6.60461 13.6058 7.19255 13.9006 7.63478C13.9928 7.77306 14.0708 7.89637 14.1341 8C14.0708 8.10363 13.9928 8.22694 13.9006 8.36522C13.6058 8.80745 13.1704 9.39539 12.6086 9.9806C11.4707 11.1659 9.90387 12.25 7.99964 12.25C6.09541 12.25 4.52855 11.1659 3.39068 9.9806C2.82887 9.39539 2.39349 8.80745 2.09867 8.36522Z\"/></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"],"names":["uuid","_sfc_main"],"mappings":";;AAOA,IAAAA,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;ACPA,IAAAA,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { defineComponent as P, toRefs as k, ref as o, computed as B, watch as N, nextTick as x, provide as v } from "vue";
|
|
2
|
+
import { B as G, d as F } from "./typography.J1v_SPG3.js";
|
|
3
|
+
import { F as L } from "./footer-actions.BgpSnSSn.js";
|
|
4
|
+
import { D as R, B as U, b as w, a as J } from "./dialog-page.C5r6tM57.js";
|
|
5
|
+
import { n as b } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
|
+
import { B as V } from "./button.BuD-IsW5.js";
|
|
7
|
+
import { B as K } from "./focus-trap.C-wIQqpO.js";
|
|
8
|
+
import { C as Y } from "./cross.CJ5EEL2c.js";
|
|
9
|
+
import { S as H } from "./sidepanel.keys.R0DKQuYx.js";
|
|
10
|
+
import { u as $ } from "./i18n.BQkEbtPM.js";
|
|
11
|
+
import { g as j } from "./generate-uid.NJ8tVoha.js";
|
|
12
|
+
import { B as z } from "./directive.Cbdox5VL.js";
|
|
13
|
+
import "../assets/sidepanel.css";
|
|
14
|
+
const M = {}, q = /* @__PURE__ */ P({
|
|
15
|
+
...M,
|
|
16
|
+
__name: "sidepanel-page",
|
|
17
|
+
props: {
|
|
18
|
+
/**
|
|
19
|
+
* List of actions that will be used to render the buttons.
|
|
20
|
+
* First element in the list will be rendered as "primary".
|
|
21
|
+
* All elements after the first will be rendered as "secondary".
|
|
22
|
+
*
|
|
23
|
+
* ```
|
|
24
|
+
* [{
|
|
25
|
+
* title: 'Primary',
|
|
26
|
+
* event: () => { ... },
|
|
27
|
+
* icon: FourPeopleIcon
|
|
28
|
+
* }, {
|
|
29
|
+
* title: 'Secondary',
|
|
30
|
+
* event: () => { ... }
|
|
31
|
+
* }]
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
actions: {
|
|
35
|
+
type: Array,
|
|
36
|
+
default: null
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* Text label that is displayed left to the action buttons
|
|
40
|
+
*/
|
|
41
|
+
actionsLabel: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: null
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* If passed - sets first button color to red
|
|
47
|
+
*/
|
|
48
|
+
destructiveActions: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !1
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* Identifier of the page, used with activePage prop to handle sidepanel navigation
|
|
54
|
+
*/
|
|
55
|
+
pageId: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: void 0
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior
|
|
61
|
+
* Used when the back button should not take the user to the natural previous page
|
|
62
|
+
* Set to `null` to hide back button in the page
|
|
63
|
+
*/
|
|
64
|
+
previousPage: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: void 0
|
|
67
|
+
},
|
|
68
|
+
/**
|
|
69
|
+
* Title of the sidepanel page
|
|
70
|
+
*/
|
|
71
|
+
title: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: null
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
setup(a) {
|
|
77
|
+
return { __sfc: !0, BentoTypography: G, FooterActions: L, DialogPage: R };
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
var Q = function() {
|
|
81
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
82
|
+
return t(s.DialogPage, { staticClass: "b-sidepanel-page", attrs: { "page-id": e.pageId, "previous-page": e.previousPage }, scopedSlots: e._u([{ key: "header", fn: function() {
|
|
83
|
+
return [t("div", { staticClass: "b-sidepanel-page__header" }, [t(s.BentoTypography, { staticClass: "b-sidepanel-page__title", attrs: { el: "h2", variant: "title" } }, [e._v(" " + e._s(e.title) + " ")])], 1)];
|
|
84
|
+
}, proxy: !0 }, { key: "content", fn: function() {
|
|
85
|
+
return [t("div", { staticClass: "b-sidepanel-page__content" }, [t(s.BentoTypography, { attrs: { el: "div", variant: "body" } }, [e._t("default")], 2)], 1)];
|
|
86
|
+
}, proxy: !0 }, e.actions && e.actions.length > 0 ? { key: "footer", fn: function() {
|
|
87
|
+
return [t("div", { staticClass: "b-sidepanel-page__actions" }, [t(s.FooterActions, { attrs: { actions: e.actions, "actions-label": e.actionsLabel, "destructive-actions": e.destructiveActions } })], 1)];
|
|
88
|
+
}, proxy: !0 } : null], null, !0) });
|
|
89
|
+
}, W = [], X = /* @__PURE__ */ b(
|
|
90
|
+
q,
|
|
91
|
+
Q,
|
|
92
|
+
W,
|
|
93
|
+
!1,
|
|
94
|
+
null,
|
|
95
|
+
"4e6c994b"
|
|
96
|
+
);
|
|
97
|
+
const ge = X.exports;
|
|
98
|
+
var d = /* @__PURE__ */ ((a) => (a.UPDATE_ACTIVE_PAGE = "update:active-page", a.UPDATE_IS_OPEN = "update:is-open", a))(d || {});
|
|
99
|
+
const Z = {
|
|
100
|
+
"en-US": {
|
|
101
|
+
close: "Close"
|
|
102
|
+
},
|
|
103
|
+
"ja-JP": {
|
|
104
|
+
close: "閉じる"
|
|
105
|
+
},
|
|
106
|
+
"pt-BR": {
|
|
107
|
+
close: "Fechar"
|
|
108
|
+
}
|
|
109
|
+
}, ee = {
|
|
110
|
+
i18n: { messages: Z }
|
|
111
|
+
}, te = /* @__PURE__ */ P({
|
|
112
|
+
...ee,
|
|
113
|
+
__name: "sidepanel",
|
|
114
|
+
props: {
|
|
115
|
+
/**
|
|
116
|
+
* The id of the current active page
|
|
117
|
+
* Should be the same id as the BentoSidepanelPage to be displayed
|
|
118
|
+
* If the component only has one page, it can be left null/undefined.
|
|
119
|
+
*/
|
|
120
|
+
activePage: {
|
|
121
|
+
type: String,
|
|
122
|
+
default: null
|
|
123
|
+
},
|
|
124
|
+
/**
|
|
125
|
+
* If set to true, it allows the sidepanel to be closed.
|
|
126
|
+
* Shows close button when `true` and hides close button when `false`.
|
|
127
|
+
*
|
|
128
|
+
* _Note: This property will not set the visibility of the close button in v2.0.0_
|
|
129
|
+
*/
|
|
130
|
+
isDismissible: {
|
|
131
|
+
type: Boolean,
|
|
132
|
+
default: !1
|
|
133
|
+
},
|
|
134
|
+
/**
|
|
135
|
+
* Controls the sidepanel's state from the outside. Set it to true to open the sidepanel.
|
|
136
|
+
*/
|
|
137
|
+
isOpen: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
default: null
|
|
140
|
+
},
|
|
141
|
+
/**
|
|
142
|
+
* Controls the visibility of close button on the sidepanel.
|
|
143
|
+
* Defaults to `true` when `isDismissible=false`, and `true` when `isDimissible=true`.
|
|
144
|
+
*
|
|
145
|
+
* _Note: This property will be set to `false` by default, independent of `isDismissible` in v2.0.0_
|
|
146
|
+
*/
|
|
147
|
+
hideCloseButton: {
|
|
148
|
+
type: Boolean,
|
|
149
|
+
default: null
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
emits: [],
|
|
153
|
+
setup(a, { emit: e }) {
|
|
154
|
+
const t = a, { activePage: s, isOpen: i } = k(t), { t: I } = $(), l = o(null), u = o([]), n = o([]), m = o(U.TRANSITION_LEVEL_DEEPER), c = o(!1), g = j("sidepanel"), p = o(!1), _ = o(!1), D = B(() => ({
|
|
155
|
+
"b-sidepanel--hide": c.value,
|
|
156
|
+
"b-sidepanel--animation": _.value
|
|
157
|
+
})), h = () => {
|
|
158
|
+
c.value && (l.value.close(), n.value[0] && e(d.UPDATE_ACTIVE_PAGE, n.value[0]), n.value = [], c.value = !1, p.value = !1, e(d.UPDATE_IS_OPEN, !1));
|
|
159
|
+
}, f = () => {
|
|
160
|
+
l.value.open && (c.value = !0);
|
|
161
|
+
}, O = () => {
|
|
162
|
+
t.isDismissible && f();
|
|
163
|
+
}, S = B(() => t.hideCloseButton !== null ? t.hideCloseButton : !t.isDismissible);
|
|
164
|
+
N(
|
|
165
|
+
() => i.value,
|
|
166
|
+
async () => {
|
|
167
|
+
await x(), l.value && (i.value ? (p.value = !0, l.value.showModal(), n.value.length || n.value.push(s.value)) : l.value.open && f());
|
|
168
|
+
},
|
|
169
|
+
{ immediate: !0 }
|
|
170
|
+
);
|
|
171
|
+
const C = (r) => e(d.UPDATE_ACTIVE_PAGE, r), y = (r) => () => {
|
|
172
|
+
var E;
|
|
173
|
+
u.value = (E = u.value) == null ? void 0 : E.filter((T) => T !== r);
|
|
174
|
+
}, A = (r) => (u.value.push(r), { unregisterPage: y(r) });
|
|
175
|
+
return v(w, {
|
|
176
|
+
activePage: s,
|
|
177
|
+
animation: m,
|
|
178
|
+
isAnimationActive: _,
|
|
179
|
+
isOpen: p,
|
|
180
|
+
pages: u,
|
|
181
|
+
previousPages: n,
|
|
182
|
+
updatePage: C
|
|
183
|
+
}), v(J, A), v(H, g), !t.isDismissible && t.hideCloseButton === null && F(
|
|
184
|
+
'BentoSidepanel "isDismissible" property’s behavior',
|
|
185
|
+
'BentoSidepanel "isDismissible" will no longer hide the close button. Use "hideCloseButton=true" instead.',
|
|
186
|
+
"2.0.0"
|
|
187
|
+
), { __sfc: !0, props: t, emit: e, activePage: s, isOpen: i, t: I, sidepanel: l, pages: u, previousPages: n, animation: m, isClosing: c, sidepanelId: g, internalIsOpen: p, isAnimationActive: _, conditionalClasses: D, closeSidepanelAfterAnimation: h, startCloseSidepanelAnimation: f, closeSidepanelOnClickOutside: O, computedHideCloseButton: S, updatePage: C, unregisterPage: y, registerPage: A, BentoButton: V, BentoFocusTrap: K, CrossIcon: Y, vBentoClickOutsideDirective: z };
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
var se = function() {
|
|
191
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
192
|
+
return t("dialog", { ref: "sidepanel", staticClass: "b-sidepanel", class: s.conditionalClasses, on: { animationend: s.closeSidepanelAfterAnimation, keydown: function(i) {
|
|
193
|
+
if (!i.type.indexOf("key") && e._k(i.keyCode, "esc", 27, i.key, ["Esc", "Escape"])) return null;
|
|
194
|
+
i.preventDefault(), e.isDismissible && s.startCloseSidepanelAnimation;
|
|
195
|
+
} } }, [t(s.BentoFocusTrap, { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: s.closeSidepanelOnClickOutside, expression: "closeSidepanelOnClickOutside" }], attrs: { id: s.sidepanelId } }, [s.computedHideCloseButton ? e._e() : t("div", { staticClass: "b-sidepanel__close-button" }, [t(s.BentoButton, { attrs: { variant: "tertiary" }, on: { click: s.startCloseSidepanelAnimation } }, [t(s.CrossIcon, { attrs: { "svg-title": s.t("close") } })], 1)], 1), e._t("default")], 2)], 1);
|
|
196
|
+
}, ae = [], ie = /* @__PURE__ */ b(
|
|
197
|
+
te,
|
|
198
|
+
se,
|
|
199
|
+
ae,
|
|
200
|
+
!1,
|
|
201
|
+
null,
|
|
202
|
+
"732a38d4"
|
|
203
|
+
);
|
|
204
|
+
const Ce = ie.exports;
|
|
205
|
+
export {
|
|
206
|
+
d as B,
|
|
207
|
+
Ce as a,
|
|
208
|
+
ge as s
|
|
209
|
+
};
|
|
210
|
+
//# sourceMappingURL=sidepanel.3EBWM8JV.js.map
|