@adyen/bento-vue2 1.27.0 → 1.28.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 +4 -0
- package/dist/@types/index.d.ts +403 -187
- package/dist/accordion.js +3 -101
- package/dist/accordion.js.map +1 -1
- package/dist/action-bar.js +2 -146
- package/dist/action-bar.js.map +1 -1
- package/dist/alert.js +5 -116
- package/dist/alert.js.map +1 -1
- package/dist/assets/{index9.css → accordion-item.css} +1 -1
- package/dist/assets/{index11.css → action-bar.css} +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/{index4.css → card.css} +1 -1
- package/dist/assets/checkbox-input.css +1 -1
- package/dist/assets/{index47.css → dashboard-section.css} +1 -1
- package/dist/assets/dashed-underline.css +1 -0
- package/dist/assets/{index49.css → data-grid-template.css} +1 -1
- package/dist/assets/data-grid.css +1 -0
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/filter-bar.css +1 -0
- package/dist/assets/listbox-option-tag.css +1 -1
- package/dist/assets/{index38.css → menu.css} +1 -1
- package/dist/assets/{index24.css → modal-fullscreen.css} +1 -1
- package/dist/assets/{index33.css → popover.css} +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/segmented-control.css +1 -0
- package/dist/assets/selection-card-group.css +1 -0
- package/dist/assets/{index36.css → sidepanel.css} +1 -1
- package/dist/assets/status.css +1 -0
- package/dist/assets/toggle.css +1 -0
- package/dist/assets/tutorial.css +1 -0
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +22 -24
- package/dist/badge.js.map +1 -1
- package/dist/button.js +14 -94
- package/dist/button.js.map +1 -1
- package/dist/card.js +4 -114
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +8 -155
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/1-generic-use.CZhwP2Yc.js +5 -0
- package/dist/chunks/1-generic-use.CZhwP2Yc.js.map +1 -0
- package/dist/chunks/1-generic-use.R6x8PEGA.js +5 -0
- package/dist/chunks/1-generic-use.R6x8PEGA.js.map +1 -0
- package/dist/chunks/2-generic-use.CNKjB4B7.js +5 -0
- package/dist/chunks/2-generic-use.CNKjB4B7.js.map +1 -0
- package/dist/chunks/2-generic-use.w0fUhovx.js +5 -0
- package/dist/chunks/2-generic-use.w0fUhovx.js.map +1 -0
- package/dist/chunks/3-generic-use.BLEzR04g.js +5 -0
- package/dist/chunks/3-generic-use.BLEzR04g.js.map +1 -0
- package/dist/chunks/3-generic-use.D3NFHgI4.js +5 -0
- package/dist/chunks/3-generic-use.D3NFHgI4.js.map +1 -0
- package/dist/chunks/4-generic-use.CULEpvgj.js +5 -0
- package/dist/chunks/4-generic-use.CULEpvgj.js.map +1 -0
- package/dist/chunks/4-generic-use.D82y3n39.js +5 -0
- package/dist/chunks/4-generic-use.D82y3n39.js.map +1 -0
- package/dist/chunks/_plugin-vue2_normalizer.CeySl7Fu.js +11 -0
- package/dist/chunks/_plugin-vue2_normalizer.CeySl7Fu.js.map +1 -0
- package/dist/chunks/accordion-item.DmnrjNzw.js +100 -0
- package/dist/chunks/accordion-item.DmnrjNzw.js.map +1 -0
- package/dist/chunks/action-bar.Bebh6PHI.js +147 -0
- package/dist/chunks/action-bar.Bebh6PHI.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.CJyTM4Az.js +96 -0
- package/dist/chunks/alert.CJyTM4Az.js.map +1 -0
- package/dist/chunks/{aria-label.ac9651a5.js → aria-label.CaUURpnB.js} +1 -1
- package/dist/chunks/{aria-label.ac9651a5.js.map → aria-label.CaUURpnB.js.map} +1 -1
- package/dist/chunks/{index.ccc7e8d7.js → avatar-image.DhlR-7Yg.js} +22 -24
- package/dist/chunks/avatar-image.DhlR-7Yg.js.map +1 -0
- package/dist/chunks/base-button.DER7_IsF.js +86 -0
- package/dist/chunks/{base-button.852204dc.js.map → base-button.DER7_IsF.js.map} +1 -1
- package/dist/chunks/{base-modal.4fb7528b.js → base-modal.C5I7bR0d.js} +42 -46
- package/dist/chunks/{base-modal.4fb7528b.js.map → base-modal.C5I7bR0d.js.map} +1 -1
- package/dist/chunks/{base-modal.keys.b08a6bdf.js → base-modal.keys.C2PQXcE2.js} +1 -1
- package/dist/chunks/{base-modal.keys.b08a6bdf.js.map → base-modal.keys.C2PQXcE2.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.bf968959.js → button-actions-with-menu.f3yuLK-L.js} +25 -27
- package/dist/chunks/{button-actions-with-menu.bf968959.js.map → button-actions-with-menu.f3yuLK-L.js.map} +1 -1
- package/dist/chunks/{button-actions.87e589e3.js → button-actions.Bg9ey0p6.js} +29 -31
- package/dist/chunks/{button-actions.87e589e3.js.map → button-actions.Bg9ey0p6.js.map} +1 -1
- package/dist/chunks/{button.cb90b55c.js → button.DhAUh5JA.js} +22 -24
- package/dist/chunks/{button.cb90b55c.js.map → button.DhAUh5JA.js.map} +1 -1
- package/dist/chunks/{calendar.f02e0a5a.js → calendar.B69z8gjb.js} +287 -332
- package/dist/chunks/{calendar.f02e0a5a.js.map → calendar.B69z8gjb.js.map} +1 -1
- package/dist/chunks/card.70Xvba2C.js +115 -0
- package/dist/chunks/card.70Xvba2C.js.map +1 -0
- package/dist/chunks/checkbox-group.B-KdeRXC.js +152 -0
- package/dist/chunks/checkbox-group.B-KdeRXC.js.map +1 -0
- package/dist/chunks/{checkbox-input.1c3cc8ed.js → checkbox-input.DwDwI2BD.js} +27 -30
- package/dist/chunks/{checkbox-input.1c3cc8ed.js.map → checkbox-input.DwDwI2BD.js.map} +1 -1
- package/dist/chunks/{checkbox.9f9c978a.js → checkbox.Bi2RDBEZ.js} +21 -23
- package/dist/chunks/{checkbox.9f9c978a.js.map → checkbox.Bi2RDBEZ.js.map} +1 -1
- package/dist/chunks/checkmark-circle-fill.DVl6QSwm.js +24 -0
- package/dist/chunks/{checkmark-circle-fill.345311d2.js.map → checkmark-circle-fill.DVl6QSwm.js.map} +1 -1
- package/dist/chunks/{checkmark-small.520f01b1.js → checkmark-small.BtF8b2gE.js} +6 -8
- package/dist/chunks/{checkmark-small.520f01b1.js.map → checkmark-small.BtF8b2gE.js.map} +1 -1
- package/dist/chunks/{chevron-left.5edf02ac.js → chevron-left.CtnrsqUy.js} +13 -17
- package/dist/chunks/{chevron-left.5edf02ac.js.map → chevron-left.CtnrsqUy.js.map} +1 -1
- package/dist/chunks/{chevron-up.81185563.js → chevron-up.B2uWhZf7.js} +14 -18
- package/dist/chunks/{chevron-up.81185563.js.map → chevron-up.B2uWhZf7.js.map} +1 -1
- package/dist/chunks/click-outside.DABh6NLr.js +23 -0
- package/dist/chunks/click-outside.DABh6NLr.js.map +1 -0
- package/dist/chunks/code-snippet.C4IbjAhH.js +968 -0
- package/dist/chunks/code-snippet.C4IbjAhH.js.map +1 -0
- package/dist/chunks/{controls-group.121a307d.js → controls-group.cSRFiEVO.js} +17 -19
- package/dist/chunks/{controls-group.121a307d.js.map → controls-group.cSRFiEVO.js.map} +1 -1
- package/dist/chunks/{copy.6808b2dc.js → copy.BtFWFG3q.js} +15 -19
- package/dist/chunks/{copy.6808b2dc.js.map → copy.BtFWFG3q.js.map} +1 -1
- package/dist/chunks/country.KayLT0zy.js +93 -0
- package/dist/chunks/country.KayLT0zy.js.map +1 -0
- package/dist/chunks/{country.types.002caff2.js → country.types.Br0AjxGy.js} +5 -5
- package/dist/chunks/{country.types.002caff2.js.map → country.types.Br0AjxGy.js.map} +1 -1
- package/dist/chunks/{cross-circle-fill.27580c4b.js → cross-circle-fill.CnYH4R_h.js} +7 -9
- package/dist/chunks/{cross-circle-fill.27580c4b.js.map → cross-circle-fill.CnYH4R_h.js.map} +1 -1
- package/dist/chunks/{cross-small.e851e0de.js → cross-small.BLUwtRB-.js} +9 -11
- package/dist/chunks/{cross-small.e851e0de.js.map → cross-small.BLUwtRB-.js.map} +1 -1
- package/dist/chunks/{cross.04678d81.js → cross.CsUPDmaA.js} +9 -11
- package/dist/chunks/{cross.04678d81.js.map → cross.CsUPDmaA.js.map} +1 -1
- package/dist/chunks/currency.H7n7RQiX.js +113 -0
- package/dist/chunks/currency.H7n7RQiX.js.map +1 -0
- package/dist/chunks/dashboard-section.BcH-_en7.js +105 -0
- package/dist/chunks/dashboard-section.BcH-_en7.js.map +1 -0
- package/dist/chunks/dashed-underline.ChUlcFJR.js +59 -0
- package/dist/chunks/dashed-underline.ChUlcFJR.js.map +1 -0
- package/dist/chunks/data-grid-template.DqG5bNeD.js +66 -0
- package/dist/chunks/data-grid-template.DqG5bNeD.js.map +1 -0
- package/dist/chunks/{data-grid-template.keys.a819a991.js → data-grid-template.keys.2_AkxuNT.js} +1 -1
- package/dist/chunks/{data-grid-template.keys.a819a991.js.map → data-grid-template.keys.2_AkxuNT.js.map} +1 -1
- package/dist/chunks/data-grid.XsiB40Po.js +2022 -0
- package/dist/chunks/data-grid.XsiB40Po.js.map +1 -0
- package/dist/chunks/{date-input.9186a0bf.js → date-input.BqBdAO1E.js} +1 -1
- package/dist/chunks/{date-input.9186a0bf.js.map → date-input.BqBdAO1E.js.map} +1 -1
- package/dist/chunks/date-picker.ByP2Wpo0.js +196 -0
- package/dist/chunks/date-picker.ByP2Wpo0.js.map +1 -0
- package/dist/chunks/{index.854d6498.js → date-range-picker.DJPZi8ql.js} +113 -117
- package/dist/chunks/date-range-picker.DJPZi8ql.js.map +1 -0
- package/dist/chunks/{index.614a5138.js → date.DKjxxR6P.js} +44 -51
- package/dist/chunks/date.DKjxxR6P.js.map +1 -0
- package/dist/chunks/{debounce.b5ef6acf.js → debounce.DUTu11PS.js} +1 -1
- package/dist/chunks/{debounce.b5ef6acf.js.map → debounce.DUTu11PS.js.map} +1 -1
- package/dist/chunks/{dialog-page.7fd7d006.js → dialog-page.DAh0M4mT.js} +20 -24
- package/dist/chunks/{dialog-page.7fd7d006.js.map → dialog-page.DAh0M4mT.js.map} +1 -1
- package/dist/chunks/divider.BZfeYmB9.js +30 -0
- package/dist/chunks/divider.BZfeYmB9.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.d0f17d96.js → dropdown-default-textbox.CKOkl_Qa.js} +30 -34
- package/dist/chunks/{dropdown-default-textbox.d0f17d96.js.map → dropdown-default-textbox.CKOkl_Qa.js.map} +1 -1
- package/dist/chunks/dropdown-tag.DCMKQy-E.js +214 -0
- package/dist/chunks/dropdown-tag.DCMKQy-E.js.map +1 -0
- package/dist/chunks/{dropdown.a8037bca.js → dropdown.yhhQCKve.js} +230 -240
- package/dist/chunks/dropdown.yhhQCKve.js.map +1 -0
- package/dist/chunks/empty-state.BqVOj4v1.js +151 -0
- package/dist/chunks/empty-state.BqVOj4v1.js.map +1 -0
- package/dist/chunks/error-message.BSxUoE3_.js +107 -0
- package/dist/chunks/{error-message.bdcc1020.js.map → error-message.BSxUoE3_.js.map} +1 -1
- package/dist/chunks/events.CMzGybJJ.js +47 -0
- package/dist/chunks/{events.f14a214b.js.map → events.CMzGybJJ.js.map} +1 -1
- package/dist/chunks/filter-bar.Cpimgf_J.js +2119 -0
- package/dist/chunks/filter-bar.Cpimgf_J.js.map +1 -0
- package/dist/chunks/{fixed-scroller.82ef6187.js → fixed-scroller.Bq1AgPnw.js} +18 -20
- package/dist/chunks/{fixed-scroller.82ef6187.js.map → fixed-scroller.Bq1AgPnw.js.map} +1 -1
- package/dist/chunks/{index.1deef79e.js → focus-trap.DSkLNO_i.js} +35 -37
- package/dist/chunks/focus-trap.DSkLNO_i.js.map +1 -0
- package/dist/chunks/{footer-actions.58d14a16.js → footer-actions.DqMRmlV_.js} +11 -13
- package/dist/chunks/{footer-actions.58d14a16.js.map → footer-actions.DqMRmlV_.js.map} +1 -1
- package/dist/chunks/form-layout-title.BzNU0B72.js +187 -0
- package/dist/chunks/form-layout-title.BzNU0B72.js.map +1 -0
- package/dist/chunks/{form-layout.types.a7a1438d.js → form-layout.types.D3EKzbE7.js} +1 -1
- package/dist/chunks/{form-layout.types.a7a1438d.js.map → form-layout.types.D3EKzbE7.js.map} +1 -1
- package/dist/chunks/{get-slot-text.99c3d860.js → get-slot-text.Cgn-E48s.js} +2 -2
- package/dist/chunks/{get-slot-text.99c3d860.js.map → get-slot-text.Cgn-E48s.js.map} +1 -1
- package/dist/chunks/{grid-layout.e0025286.js → grid-layout.HvTAa4to.js} +11 -13
- package/dist/chunks/{grid-layout.e0025286.js.map → grid-layout.HvTAa4to.js.map} +1 -1
- package/dist/chunks/header.DmKHCmXh.js +245 -0
- package/dist/chunks/header.DmKHCmXh.js.map +1 -0
- package/dist/chunks/{i18n.eb5b985b.js → i18n.BQkEbtPM.js} +2 -2
- package/dist/chunks/{i18n.eb5b985b.js.map → i18n.BQkEbtPM.js.map} +1 -1
- package/dist/chunks/image.B3uqhFjl.js +82 -0
- package/dist/chunks/image.B3uqhFjl.js.map +1 -0
- package/dist/chunks/{index.fdf12170.js → index.B_EJflcs.js} +2 -2
- package/dist/chunks/{index.fdf12170.js.map → index.B_EJflcs.js.map} +1 -1
- package/dist/chunks/{index.f55fdc32.js → index.B_UZQ6qF.js} +209 -243
- package/dist/chunks/{index.f55fdc32.js.map → index.B_UZQ6qF.js.map} +1 -1
- package/dist/chunks/{index.4c062058.js → index.Cl4_42j5.js} +1 -1
- package/dist/chunks/{index.4c062058.js.map → index.Cl4_42j5.js.map} +1 -1
- package/dist/chunks/{index.561786f6.js → index.OCPp3NST.js} +3 -3
- package/dist/chunks/{index.561786f6.js.map → index.OCPp3NST.js.map} +1 -1
- package/dist/chunks/{index.d80206ed.js → index.Z84QE0E2.js} +2 -2
- package/dist/chunks/{index.d80206ed.js.map → index.Z84QE0E2.js.map} +1 -1
- package/dist/chunks/{index.86453263.js → index.xqFSZOAb.js} +2 -2
- package/dist/chunks/{index.86453263.js.map → index.xqFSZOAb.js.map} +1 -1
- package/dist/chunks/info-icon.CLguYHRt.js +41 -0
- package/dist/chunks/info-icon.CLguYHRt.js.map +1 -0
- package/dist/chunks/{info.8b6328aa.js → info.CyeBsLgt.js} +9 -11
- package/dist/chunks/{info.8b6328aa.js.map → info.CyeBsLgt.js.map} +1 -1
- package/dist/chunks/input-field.BnlEPPYr.js +218 -0
- package/dist/chunks/input-field.BnlEPPYr.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.bbc3d15c.js → keyboard-navigation.Clz1jOaA.js} +2 -2
- package/dist/chunks/{keyboard-navigation.bbc3d15c.js.map → keyboard-navigation.Clz1jOaA.js.map} +1 -1
- package/dist/chunks/{index.bd1d28d0.js → link.DJ1A53gF.js} +20 -24
- package/dist/chunks/link.DJ1A53gF.js.map +1 -0
- package/dist/chunks/listbox-option-tag.BDjsYOE1.js +75 -0
- package/dist/chunks/listbox-option-tag.BDjsYOE1.js.map +1 -0
- package/dist/chunks/{loading-button.692dbdc8.js → loading-button.CoF1IhEU.js} +32 -34
- package/dist/chunks/{loading-button.692dbdc8.js.map → loading-button.CoF1IhEU.js.map} +1 -1
- package/dist/chunks/loading-indicator.DXc7I1Lm.js +48 -0
- package/dist/chunks/loading-indicator.DXc7I1Lm.js.map +1 -0
- package/dist/chunks/{index.a48e7f99.js → menu.2TwUMlA9.js} +82 -94
- package/dist/chunks/menu.2TwUMlA9.js.map +1 -0
- package/dist/chunks/modal-fullscreen.BB_8EMNo.js +196 -0
- package/dist/chunks/modal-fullscreen.BB_8EMNo.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.keys.b9f31632.js → modal-fullscreen.keys.CMba3hYp.js} +1 -1
- package/dist/chunks/{modal-fullscreen.keys.b9f31632.js.map → modal-fullscreen.keys.CMba3hYp.js.map} +1 -1
- package/dist/chunks/modal.DLwvcaRx.js +439 -0
- package/dist/chunks/modal.DLwvcaRx.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.3e0c3e2a.js → on-click-outside.CcNG5w7_.js} +1 -1
- package/dist/chunks/{on-click-outside.3e0c3e2a.js.map → on-click-outside.CcNG5w7_.js.map} +1 -1
- 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.BXjbVe4Z.js +494 -0
- package/dist/chunks/pagination.BXjbVe4Z.js.map +1 -0
- package/dist/chunks/{payment-method.c55dd352.js → payment-method.D9Qx-s4V.js} +19 -21
- package/dist/chunks/{payment-method.c55dd352.js.map → payment-method.D9Qx-s4V.js.map} +1 -1
- package/dist/chunks/payment-method.types.CJKfZQN5.js +5 -0
- package/dist/chunks/payment-method.types.CJKfZQN5.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/{index.0a30d358.js → popover.B8YH92W8.js} +31 -37
- package/dist/chunks/popover.B8YH92W8.js.map +1 -0
- package/dist/chunks/{index.c8621e8e.js → popper-container.Bt02N3o1.js} +12 -15
- package/dist/chunks/popper-container.Bt02N3o1.js.map +1 -0
- package/dist/chunks/radio-group.CPbBFTzB.js +211 -0
- package/dist/chunks/radio-group.CPbBFTzB.js.map +1 -0
- package/dist/chunks/{radio-input.c6550a9c.js → radio-input.BQcC0INR.js} +17 -19
- package/dist/chunks/radio-input.BQcC0INR.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.71a03998.js → refresh.BKI9WwKh.js} +7 -9
- package/dist/chunks/{refresh.71a03998.js.map → refresh.BKI9WwKh.js.map} +1 -1
- package/dist/chunks/{resize.a041304d.js → resize.Bqks3WUm.js} +1 -1
- package/dist/chunks/{resize.a041304d.js.map → resize.Bqks3WUm.js.map} +1 -1
- package/dist/chunks/search-bar.CsAgO-t5.js +89 -0
- package/dist/chunks/search-bar.CsAgO-t5.js.map +1 -0
- package/dist/chunks/{search.471270fe.js → search.CBKhp7zB.js} +10 -12
- package/dist/chunks/{search.471270fe.js.map → search.CBKhp7zB.js.map} +1 -1
- package/dist/chunks/secondary-nav.CNgpPxUU.js +97 -0
- package/dist/chunks/secondary-nav.CNgpPxUU.js.map +1 -0
- package/dist/chunks/segmented-control.B49WbyTl.js +111 -0
- package/dist/chunks/segmented-control.B49WbyTl.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.DlOs8BkR.js +247 -0
- package/dist/chunks/selection-card-group.DlOs8BkR.js.map +1 -0
- package/dist/chunks/sidepanel.BBjm2QvZ.js +187 -0
- package/dist/chunks/sidepanel.BBjm2QvZ.js.map +1 -0
- package/dist/chunks/{sidepanel.keys.1ed8a57c.js → sidepanel.keys.R0DKQuYx.js} +1 -1
- package/dist/chunks/{sidepanel.keys.1ed8a57c.js.map → sidepanel.keys.R0DKQuYx.js.map} +1 -1
- package/dist/chunks/status.types.BhbOYpZx.js +36 -0
- package/dist/chunks/status.types.BhbOYpZx.js.map +1 -0
- package/dist/chunks/step.DY8Txb6a.js +234 -0
- package/dist/chunks/step.DY8Txb6a.js.map +1 -0
- package/dist/chunks/{index.3c69be27.js → structured-list-item.C9NTVDvT.js} +18 -22
- package/dist/chunks/structured-list-item.C9NTVDvT.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-item-custom.CJpDnoPw.js +573 -0
- package/dist/chunks/summary-grid-item-custom.CJpDnoPw.js.map +1 -0
- package/dist/chunks/{summary-grid.keys.1d1028c2.js → summary-grid.keys.BBbFrFGF.js} +1 -1
- package/dist/chunks/{summary-grid.keys.1d1028c2.js.map → summary-grid.keys.BBbFrFGF.js.map} +1 -1
- package/dist/chunks/tabs.CE65f3E_.js +140 -0
- package/dist/chunks/tabs.CE65f3E_.js.map +1 -0
- package/dist/chunks/{tabs.keys.358742f2.js → tabs.keys.Bc2pSKRw.js} +1 -1
- package/dist/chunks/{tabs.keys.358742f2.js.map → tabs.keys.Bc2pSKRw.js.map} +1 -1
- package/dist/chunks/tag.bhKrZHTU.js +64 -0
- package/dist/chunks/tag.bhKrZHTU.js.map +1 -0
- package/dist/chunks/{teleport.84b0f20b.js → teleport.CQKBJZU5.js} +14 -16
- package/dist/chunks/{teleport.84b0f20b.js.map → teleport.CQKBJZU5.js.map} +1 -1
- package/dist/chunks/textarea.CcKbtQBs.js +208 -0
- package/dist/chunks/textarea.CcKbtQBs.js.map +1 -0
- package/dist/chunks/timeline-item.ScTrUBKC.js +364 -0
- package/dist/chunks/timeline-item.ScTrUBKC.js.map +1 -0
- package/dist/chunks/toast.0EYDj8o-.js +165 -0
- package/dist/chunks/toast.0EYDj8o-.js.map +1 -0
- package/dist/chunks/toggle-button.2U-vbQhk.js +83 -0
- package/dist/chunks/toggle-button.2U-vbQhk.js.map +1 -0
- package/dist/chunks/toggle.CiOVTWlk.js +121 -0
- package/dist/chunks/toggle.CiOVTWlk.js.map +1 -0
- package/dist/chunks/{tooltip.efddb5f3.js → tooltip.DR8rbIYw.js} +29 -32
- package/dist/chunks/tooltip.DR8rbIYw.js.map +1 -0
- package/dist/chunks/tutorial.DMm12L0S.js +335 -0
- package/dist/chunks/tutorial.DMm12L0S.js.map +1 -0
- package/dist/chunks/{index.e29a6907.js → typography.Bjtu3Gca.js} +30 -32
- package/dist/chunks/typography.Bjtu3Gca.js.map +1 -0
- package/dist/chunks/{unique-id.a2a2b458.js → unique-id.XFfoKuc2.js} +14 -20
- package/dist/chunks/{unique-id.a2a2b458.js.map → unique-id.XFfoKuc2.js.map} +1 -1
- 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.5dac1f3c.js → use-bento-toast-controller.BifdE4ak.js} +4 -4
- package/dist/chunks/{use-bento-toast-controller.5dac1f3c.js.map → use-bento-toast-controller.BifdE4ak.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.98a9ed01.js → use-cached-selected-values.CVLzxvTi.js} +217 -237
- package/dist/chunks/{use-cached-selected-values.98a9ed01.js.map → use-cached-selected-values.CVLzxvTi.js.map} +1 -1
- package/dist/chunks/{use-click-outside.941d1600.js → use-click-outside.DbjR7Lh4.js} +2 -2
- package/dist/chunks/{use-click-outside.941d1600.js.map → use-click-outside.DbjR7Lh4.js.map} +1 -1
- package/dist/chunks/{use-country-items.6b7985bf.js → use-country-items.C25TI6tp.js} +4 -4
- package/dist/chunks/{use-country-items.6b7985bf.js.map → use-country-items.C25TI6tp.js.map} +1 -1
- package/dist/chunks/{use-default-slot-validator.b9bff4c6.js → use-default-slot-validator.BDn0wkYP.js} +2 -2
- package/dist/chunks/{use-default-slot-validator.b9bff4c6.js.map → use-default-slot-validator.BDn0wkYP.js.map} +1 -1
- package/dist/chunks/{use-expandable-content-height.62fc84e5.js → use-expandable-content-height.GkjjbmPy.js} +1 -1
- package/dist/chunks/{use-expandable-content-height.62fc84e5.js.map → use-expandable-content-height.GkjjbmPy.js.map} +1 -1
- package/dist/chunks/{use-form-layout-loading.d03e5d48.js → use-form-layout-loading.D3lALhtC.js} +2 -2
- package/dist/chunks/{use-form-layout-loading.d03e5d48.js.map → use-form-layout-loading.D3lALhtC.js.map} +1 -1
- package/dist/chunks/use-has-slot.C9lQZ6nz.js +6 -0
- package/dist/chunks/{use-has-slot.fbeb19ec.js.map → use-has-slot.C9lQZ6nz.js.map} +1 -1
- package/dist/chunks/warning-filled.CLKRzGMT.js +24 -0
- package/dist/chunks/warning-filled.CLKRzGMT.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 +2 -20
- package/dist/click-outside.js.map +1 -1
- package/dist/code-snippet.js +5 -2052
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +8 -97
- package/dist/country.js.map +1 -1
- package/dist/currency.js +3 -112
- package/dist/currency.js.map +1 -1
- package/dist/dashboard-template.js +3 -106
- package/dist/dashboard-template.js.map +1 -1
- package/dist/dashed-underline.js +5 -0
- package/dist/dashed-underline.js.map +1 -0
- package/dist/data-grid-template.js +2 -65
- package/dist/data-grid-template.js.map +1 -1
- package/dist/data-grid.js +8 -1986
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +5 -197
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +12 -227
- package/dist/dropdown.js.map +1 -1
- package/dist/empty-state.js +5 -143
- package/dist/empty-state.js.map +1 -1
- package/dist/filter-bar.js +5 -2156
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +5 -192
- package/dist/form-layout.js.map +1 -1
- package/dist/header.js +2 -246
- package/dist/header.js.map +1 -1
- package/dist/image.js +4 -81
- package/dist/image.js.map +1 -1
- package/dist/index.js +270 -266
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +2 -40
- package/dist/info-icon.js.map +1 -1
- package/dist/input-field.js +7 -217
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +15 -15
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +3 -47
- package/dist/loading-indicator.js.map +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +3 -197
- package/dist/modal-fullscreen.js.map +1 -1
- package/dist/modal.js +11 -451
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +2 -507
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +4 -4
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +6 -213
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +6 -90
- package/dist/search-bar.js.map +1 -1
- package/dist/secondary-nav.js +2 -100
- package/dist/secondary-nav.js.map +1 -1
- package/dist/segmented-control.js +4 -214
- package/dist/segmented-control.js.map +1 -1
- package/dist/selection-card.js +4 -248
- package/dist/selection-card.js.map +1 -1
- package/dist/sidepanel.js +4 -189
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +3 -40
- package/dist/status.js.map +1 -1
- package/dist/stepper.js +5 -237
- package/dist/stepper.js.map +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +9 -584
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +3 -141
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -63
- package/dist/tag.js.map +1 -1
- package/dist/textarea.js +2 -209
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +7 -367
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +2 -168
- package/dist/toast.js.map +1 -1
- package/dist/toggle.js +4 -120
- package/dist/toggle.js.map +1 -1
- package/dist/tutorial.js +2 -340
- package/dist/tutorial.js.map +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +308 -194
- package/package.json +5 -7
- package/dist/assets/index15.css +0 -1
- package/dist/assets/index32.css +0 -1
- package/dist/assets/index34.css +0 -1
- package/dist/assets/index35.css +0 -1
- package/dist/assets/index45.css +0 -1
- package/dist/assets/index48.css +0 -1
- package/dist/assets/index6.css +0 -1
- package/dist/chunks/1-generic-use.3ea646cd.js +0 -5
- package/dist/chunks/1-generic-use.3ea646cd.js.map +0 -1
- package/dist/chunks/1-generic-use.ccca5813.js +0 -5
- package/dist/chunks/1-generic-use.ccca5813.js.map +0 -1
- package/dist/chunks/2-generic-use.443db127.js +0 -5
- package/dist/chunks/2-generic-use.443db127.js.map +0 -1
- package/dist/chunks/2-generic-use.d69d7c08.js +0 -5
- package/dist/chunks/2-generic-use.d69d7c08.js.map +0 -1
- package/dist/chunks/3-generic-use.9f74667f.js +0 -5
- package/dist/chunks/3-generic-use.9f74667f.js.map +0 -1
- package/dist/chunks/3-generic-use.fe7ae2ce.js +0 -5
- package/dist/chunks/3-generic-use.fe7ae2ce.js.map +0 -1
- package/dist/chunks/4-generic-use.0356f4a1.js +0 -5
- package/dist/chunks/4-generic-use.0356f4a1.js.map +0 -1
- package/dist/chunks/4-generic-use.cd04bad0.js +0 -5
- package/dist/chunks/4-generic-use.cd04bad0.js.map +0 -1
- package/dist/chunks/_plugin-vue2_normalizer.71e2aa87.js +0 -33
- package/dist/chunks/_plugin-vue2_normalizer.71e2aa87.js.map +0 -1
- package/dist/chunks/adding-payment-methods.d570e03e.js +0 -5
- package/dist/chunks/adding-payment-methods.d570e03e.js.map +0 -1
- package/dist/chunks/adding-payment-methods.e419d6c0.js +0 -5
- package/dist/chunks/adding-payment-methods.e419d6c0.js.map +0 -1
- package/dist/chunks/adyen-giving.480913b5.js +0 -5
- package/dist/chunks/adyen-giving.480913b5.js.map +0 -1
- package/dist/chunks/adyen-giving.54ed984c.js +0 -5
- package/dist/chunks/adyen-giving.54ed984c.js.map +0 -1
- package/dist/chunks/base-button.852204dc.js +0 -88
- package/dist/chunks/checkmark-circle-fill.345311d2.js +0 -26
- package/dist/chunks/dropdown.a8037bca.js.map +0 -1
- package/dist/chunks/error-message.bdcc1020.js +0 -111
- package/dist/chunks/events.f14a214b.js +0 -50
- package/dist/chunks/index.0a30d358.js.map +0 -1
- package/dist/chunks/index.1deef79e.js.map +0 -1
- package/dist/chunks/index.3c69be27.js.map +0 -1
- package/dist/chunks/index.614a5138.js.map +0 -1
- package/dist/chunks/index.854d6498.js.map +0 -1
- package/dist/chunks/index.939dd5cf.js +0 -32
- package/dist/chunks/index.939dd5cf.js.map +0 -1
- package/dist/chunks/index.a48e7f99.js.map +0 -1
- package/dist/chunks/index.bd1d28d0.js.map +0 -1
- package/dist/chunks/index.c8621e8e.js.map +0 -1
- package/dist/chunks/index.ccc7e8d7.js.map +0 -1
- package/dist/chunks/index.e29a6907.js.map +0 -1
- package/dist/chunks/internal-error.35cbb071.js +0 -5
- package/dist/chunks/internal-error.35cbb071.js.map +0 -1
- package/dist/chunks/internal-error.9a4823ed.js +0 -5
- package/dist/chunks/internal-error.9a4823ed.js.map +0 -1
- package/dist/chunks/listbox-option-tag.8708be60.js +0 -107
- package/dist/chunks/listbox-option-tag.8708be60.js.map +0 -1
- package/dist/chunks/no-results-found.58856d70.js +0 -5
- package/dist/chunks/no-results-found.58856d70.js.map +0 -1
- package/dist/chunks/no-results-found.cbb12f78.js +0 -5
- package/dist/chunks/no-results-found.cbb12f78.js.map +0 -1
- package/dist/chunks/notifications-cleared.71025c22.js +0 -5
- package/dist/chunks/notifications-cleared.71025c22.js.map +0 -1
- package/dist/chunks/notifications-cleared.c4f4bed4.js +0 -5
- package/dist/chunks/notifications-cleared.c4f4bed4.js.map +0 -1
- package/dist/chunks/page-not-found.a500440d.js +0 -5
- package/dist/chunks/page-not-found.a500440d.js.map +0 -1
- package/dist/chunks/page-not-found.d1a84ba7.js +0 -5
- package/dist/chunks/page-not-found.d1a84ba7.js.map +0 -1
- package/dist/chunks/planned-maintenance.7fa5ac16.js +0 -5
- package/dist/chunks/planned-maintenance.7fa5ac16.js.map +0 -1
- package/dist/chunks/planned-maintenance.cff01aed.js +0 -5
- package/dist/chunks/planned-maintenance.cff01aed.js.map +0 -1
- package/dist/chunks/radio-input.c6550a9c.js.map +0 -1
- package/dist/chunks/referrals.178ce0eb.js +0 -5
- package/dist/chunks/referrals.178ce0eb.js.map +0 -1
- package/dist/chunks/referrals.599047da.js +0 -5
- package/dist/chunks/referrals.599047da.js.map +0 -1
- package/dist/chunks/success.41981fe8.js +0 -5
- package/dist/chunks/success.41981fe8.js.map +0 -1
- package/dist/chunks/success.77fac78b.js +0 -5
- package/dist/chunks/success.77fac78b.js.map +0 -1
- package/dist/chunks/tooltip.efddb5f3.js.map +0 -1
- package/dist/chunks/upload-files.2708eca7.js +0 -5
- package/dist/chunks/upload-files.2708eca7.js.map +0 -1
- package/dist/chunks/upload-files.b4cd9f8b.js +0 -5
- package/dist/chunks/upload-files.b4cd9f8b.js.map +0 -1
- package/dist/chunks/use-has-slot.fbeb19ec.js +0 -6
- package/dist/chunks/wrong-environment.c73b0bc0.js +0 -5
- package/dist/chunks/wrong-environment.c73b0bc0.js.map +0 -1
- package/dist/chunks/wrong-environment.f890a237.js +0 -5
- package/dist/chunks/wrong-environment.f890a237.js.map +0 -1
- /package/dist/assets/{index.css → alert.css} +0 -0
- /package/dist/assets/{index2.css → avatar-image.css} +0 -0
- /package/dist/assets/{index8.css → badge.css} +0 -0
- /package/dist/assets/{index5.css → checkbox-group.css} +0 -0
- /package/dist/assets/{index10.css → code-snippet.css} +0 -0
- /package/dist/assets/{index7.css → country.css} +0 -0
- /package/dist/assets/{index13.css → date-picker.css} +0 -0
- /package/dist/assets/{index23.css → date-range-picker.css} +0 -0
- /package/dist/assets/{index16.css → divider.css} +0 -0
- /package/dist/assets/{index17.css → dropdown-tag.css} +0 -0
- /package/dist/assets/{index18.css → empty-state.css} +0 -0
- /package/dist/assets/{index27.css → focus-trap.css} +0 -0
- /package/dist/assets/{index19.css → form-layout-title.css} +0 -0
- /package/dist/assets/{index26.css → header.css} +0 -0
- /package/dist/assets/{index28.css → info-icon.css} +0 -0
- /package/dist/assets/{index44.css → input-field.css} +0 -0
- /package/dist/assets/{index29.css → link.css} +0 -0
- /package/dist/assets/{index30.css → loading-indicator.css} +0 -0
- /package/dist/assets/{index25.css → pagination.css} +0 -0
- /package/dist/assets/{index37.css → popper-container.css} +0 -0
- /package/dist/assets/{index40.css → radio-group.css} +0 -0
- /package/dist/assets/{index31.css → search-bar.css} +0 -0
- /package/dist/assets/{index39.css → secondary-nav.css} +0 -0
- /package/dist/assets/{index12.css → step.css} +0 -0
- /package/dist/assets/{index20.css → structured-list-item.css} +0 -0
- /package/dist/assets/{index21.css → summary-grid-item-custom.css} +0 -0
- /package/dist/assets/{index22.css → tabs.css} +0 -0
- /package/dist/assets/{index14.css → tag.css} +0 -0
- /package/dist/assets/{index41.css → textarea.css} +0 -0
- /package/dist/assets/{index42.css → timeline-item.css} +0 -0
- /package/dist/assets/{index43.css → toast.css} +0 -0
- /package/dist/assets/{index3.css → toggle-button.css} +0 -0
- /package/dist/assets/{index46.css → typography.css} +0 -0
package/dist/selection-card.js
CHANGED
|
@@ -1,251 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { B as j } from "./chunks/index.e29a6907.js";
|
|
3
|
-
import { u as F } from "./chunks/aria-label.ac9651a5.js";
|
|
4
|
-
import { g as k } from "./chunks/unique-id.a2a2b458.js";
|
|
5
|
-
import { u as U } from "./chunks/use-has-slot.fbeb19ec.js";
|
|
6
|
-
import { a as H } from "./chunks/checkbox-input.1c3cc8ed.js";
|
|
7
|
-
import { a as J } from "./chunks/radio-input.c6550a9c.js";
|
|
8
|
-
import { n as $ } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
9
|
-
import { C as K } from "./chunks/controls-group.121a307d.js";
|
|
10
|
-
import { E as Q } from "./chunks/error-message.bdcc1020.js";
|
|
11
|
-
import "./assets/index35.css";
|
|
12
|
-
var b = /* @__PURE__ */ ((l) => (l.DISABLED = "disabled", l.READONLY = "readonly", l.ERROR = "error", l))(b || {});
|
|
13
|
-
const G = Symbol("selection card radio input injection key"), W = {
|
|
14
|
-
name: "bento-selection-card"
|
|
15
|
-
}, X = /* @__PURE__ */ A({
|
|
16
|
-
...W,
|
|
17
|
-
props: {
|
|
18
|
-
/**
|
|
19
|
-
* The description of the selection card
|
|
20
|
-
*/
|
|
21
|
-
description: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: void 0
|
|
24
|
-
},
|
|
25
|
-
/**
|
|
26
|
-
* Disables the selection card
|
|
27
|
-
*/
|
|
28
|
-
disabled: { type: Boolean, default: !1 },
|
|
29
|
-
/**
|
|
30
|
-
* Shows the selection card in error state
|
|
31
|
-
*/
|
|
32
|
-
hasError: { type: Boolean, default: !1 },
|
|
33
|
-
/**
|
|
34
|
-
* This property should not be used directly.
|
|
35
|
-
* It will be used by v-model directive on selection card component.
|
|
36
|
-
*
|
|
37
|
-
* When handling a single input, use a string or a number.
|
|
38
|
-
*
|
|
39
|
-
* When handling multiple inputs, use an array of keys.
|
|
40
|
-
* These keys exist as a set "value" prop for each input.
|
|
41
|
-
*/
|
|
42
|
-
modelValue: {
|
|
43
|
-
type: [Boolean, String, Array],
|
|
44
|
-
default: null
|
|
45
|
-
},
|
|
46
|
-
/**
|
|
47
|
-
* Sets the selection card to readonly
|
|
48
|
-
*/
|
|
49
|
-
readonly: { type: Boolean, default: !1 },
|
|
50
|
-
/**
|
|
51
|
-
* The subtitle of the selection card
|
|
52
|
-
*/
|
|
53
|
-
subtitle: {
|
|
54
|
-
type: String,
|
|
55
|
-
default: void 0
|
|
56
|
-
},
|
|
57
|
-
/**
|
|
58
|
-
* The title of the selection card
|
|
59
|
-
*/
|
|
60
|
-
title: {
|
|
61
|
-
type: String,
|
|
62
|
-
required: !0
|
|
63
|
-
},
|
|
64
|
-
/**
|
|
65
|
-
* Indicates the value of the input that will be returned when it's checked.
|
|
66
|
-
*/
|
|
67
|
-
value: {
|
|
68
|
-
type: [String, Number],
|
|
69
|
-
required: !0
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
emits: ["input", "update:model-value"],
|
|
73
|
-
setup(l, { emit: e }) {
|
|
74
|
-
const t = l, o = M(), a = U(o), C = k("selection-card-input-id"), d = k("selection-card-description"), m = n(
|
|
75
|
-
() => t.modelValue
|
|
76
|
-
), v = n(
|
|
77
|
-
() => t.modelValue
|
|
78
|
-
), h = n(() => ({
|
|
79
|
-
"b-selection-card--checked": R.value
|
|
80
|
-
})), _ = n(() => ({
|
|
81
|
-
[`b-selection-card--${b.DISABLED}`]: t.disabled,
|
|
82
|
-
[`b-selection-card--${b.ERROR}`]: t.hasError,
|
|
83
|
-
[`b-selection-card--${b.READONLY}`]: t.readonly,
|
|
84
|
-
"b-selection-card--center-aligned": f.value
|
|
85
|
-
})), s = n(() => ({
|
|
86
|
-
"b-selection-card__checkbox-container--center-aligned": f.value
|
|
87
|
-
})), D = n(() => ({
|
|
88
|
-
"b-selection-card__checkbox-container-text--center-aligned": f.value
|
|
89
|
-
})), O = n(() => ({
|
|
90
|
-
"b-selection-card__slot--with-icon": a("icon")
|
|
91
|
-
})), N = F({
|
|
92
|
-
ariaLabel: t.title,
|
|
93
|
-
label: t.value
|
|
94
|
-
}), g = n(() => Array.isArray(t.modelValue)), R = n(() => x.value ? t.value === t.modelValue : g.value ? t.modelValue.some((r) => r === t.value) : t.modelValue), x = P(G, p(!1)), f = n(() => !t.subtitle && !t.description), y = p(null), I = p(null), S = p(null), q = (r) => {
|
|
95
|
-
var c, i, u, B, T, L;
|
|
96
|
-
if (!t.disabled && !t.readonly) {
|
|
97
|
-
if (I.value && ((i = (c = I.value) == null ? void 0 : c.$el) != null && i.contains(r.target)) || S.value && ((B = (u = S.value) == null ? void 0 : u.$el) != null && B.contains(r.target)) || y.value && ((L = (T = y.value) == null ? void 0 : T.$el) != null && L.contains(r.target)))
|
|
98
|
-
return;
|
|
99
|
-
const w = E();
|
|
100
|
-
V(w);
|
|
101
|
-
}
|
|
102
|
-
}, E = () => {
|
|
103
|
-
var c;
|
|
104
|
-
const r = ((c = y.value) == null ? void 0 : c.$refs.inputRef).checked;
|
|
105
|
-
if (g.value) {
|
|
106
|
-
const i = [...t.modelValue], u = i.indexOf(t.value);
|
|
107
|
-
return u === -1 ? i.push(t.value) : i.splice(u, 1), i;
|
|
108
|
-
}
|
|
109
|
-
return x.value ? t.value : !r;
|
|
110
|
-
}, V = (r) => {
|
|
111
|
-
!t.disabled && !t.readonly && (e("update:model-value", r), e("input", r));
|
|
112
|
-
};
|
|
113
|
-
return { __sfc: !0, props: t, emit: e, slots: o, hasSlot: a, inputId: C, descriptionId: d, computedRadioInputModelValue: m, computedCheckboxInputModelValue: v, conditionalClasses: h, containerConditionalClasses: _, checkboxContainerConditionalClasses: s, checkboxContainerTextConditionalClasses: D, slotConditionalClasses: O, ariaLabel: N, isCheckboxGroup: g, isChecked: R, isRadioInput: x, isTitleOnly: f, inputRef: y, slotRef: I, dynamicSlotRef: S, handleCardClick: q, toggleInput: E, onChange: V, BentoTypography: j, CheckboxInput: H, RadioInput: J };
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
var Z = function() {
|
|
117
|
-
var e = this, t = e._self._c, o = e._self._setupProxy;
|
|
118
|
-
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) {
|
|
119
|
-
return a.stopPropagation(), a.preventDefault(), o.handleCardClick.apply(null, arguments);
|
|
120
|
-
} } }, [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 }, on: { "update:model-value": o.onChange } }) : 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 }, on: { "update:model-value": o.onChange } })], 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)]);
|
|
121
|
-
}, ee = [], te = /* @__PURE__ */ $(
|
|
122
|
-
X,
|
|
123
|
-
Z,
|
|
124
|
-
ee,
|
|
125
|
-
!1,
|
|
126
|
-
null,
|
|
127
|
-
"ab05c459",
|
|
128
|
-
null,
|
|
129
|
-
null
|
|
130
|
-
);
|
|
131
|
-
const oe = te.exports, ae = {}, ne = /* @__PURE__ */ A({
|
|
132
|
-
...ae,
|
|
133
|
-
__name: "selection-card-group",
|
|
134
|
-
props: {
|
|
135
|
-
/**
|
|
136
|
-
* Descriptive supporting text visbile underneath the label.
|
|
137
|
-
*/
|
|
138
|
-
description: { type: String, default: null },
|
|
139
|
-
/**
|
|
140
|
-
* If set to true, renders all cards in the group in a disabled state.
|
|
141
|
-
*/
|
|
142
|
-
disabled: { type: Boolean, default: !1 },
|
|
143
|
-
/**
|
|
144
|
-
* Renders all cards in an error state with an error message.
|
|
145
|
-
*/
|
|
146
|
-
errorMessage: { type: String, default: null },
|
|
147
|
-
/**
|
|
148
|
-
* The form id the selection card group is associated with. Defaults to null, as a selection card group can also be used standalone.
|
|
149
|
-
*/
|
|
150
|
-
formId: { type: String, default: null },
|
|
151
|
-
/**
|
|
152
|
-
* Shows/hides the group label.
|
|
153
|
-
*/
|
|
154
|
-
hideLabel: { type: Boolean, default: null },
|
|
155
|
-
/**
|
|
156
|
-
* Label of the group. Required for accessibility purposes, even if it's not shown
|
|
157
|
-
*/
|
|
158
|
-
label: {
|
|
159
|
-
type: String,
|
|
160
|
-
required: !0
|
|
161
|
-
},
|
|
162
|
-
/**
|
|
163
|
-
* The selection card group's layout. It can be vertical or horizontal. Defaults to vertical.
|
|
164
|
-
* @values horizontal, vertical
|
|
165
|
-
*/
|
|
166
|
-
layout: {
|
|
167
|
-
type: String,
|
|
168
|
-
default: "vertical"
|
|
169
|
-
},
|
|
170
|
-
/**
|
|
171
|
-
* The selection card group's items.
|
|
172
|
-
*/
|
|
173
|
-
items: {
|
|
174
|
-
type: Array,
|
|
175
|
-
required: !0
|
|
176
|
-
},
|
|
177
|
-
/**
|
|
178
|
-
* Determines the initially selected value of the group. Corresponds to the BentoSelectionCardItem's value.
|
|
179
|
-
* Defaults to no value selected.
|
|
180
|
-
*/
|
|
181
|
-
modelValue: {
|
|
182
|
-
type: [Array, String, Number],
|
|
183
|
-
default: null
|
|
184
|
-
},
|
|
185
|
-
/**
|
|
186
|
-
* Indicates the field is optional.
|
|
187
|
-
*/
|
|
188
|
-
optional: { type: Boolean, default: !1 },
|
|
189
|
-
/**
|
|
190
|
-
* Indicates the field is required.
|
|
191
|
-
*/
|
|
192
|
-
required: { type: Boolean, default: !1 },
|
|
193
|
-
/**
|
|
194
|
-
* Tooltip message.
|
|
195
|
-
*/
|
|
196
|
-
tooltipText: { type: String, default: null },
|
|
197
|
-
/**
|
|
198
|
-
* If set to true, renders all cards in the group in a readonly state.
|
|
199
|
-
*/
|
|
200
|
-
readonly: { type: Boolean, default: !1 },
|
|
201
|
-
/**
|
|
202
|
-
* Renders the cards with a checkbox or a radio input. Selection logic will also apply in accordance.
|
|
203
|
-
* @values checkbox, radio
|
|
204
|
-
*/
|
|
205
|
-
variant: { type: String, default: "checkbox" }
|
|
206
|
-
},
|
|
207
|
-
emits: ["input", "update:model-value"],
|
|
208
|
-
setup(l, { emit: e }) {
|
|
209
|
-
const t = l, o = M(), a = (s) => !!o[s], C = n(() => ({
|
|
210
|
-
"b-selection-card-group__items--horizontal": t.layout === "horizontal"
|
|
211
|
-
})), d = p(t.modelValue);
|
|
212
|
-
z(
|
|
213
|
-
() => t.modelValue,
|
|
214
|
-
() => {
|
|
215
|
-
d.value = t.modelValue;
|
|
216
|
-
}
|
|
217
|
-
);
|
|
218
|
-
const m = k("error"), v = n(() => !t.disabled && !t.readonly && !!t.errorMessage), h = (s) => {
|
|
219
|
-
d.value = s, e("update:model-value", s), e("input", s);
|
|
220
|
-
}, _ = n(() => t.variant === "radio");
|
|
221
|
-
return Y(G, _), { __sfc: !0, props: t, emit: e, slots: o, hasSlot: a, conditionalItemsClasses: C, inputValue: d, errorMessageId: m, shouldShowGroupError: v, onInput: h, isRadioVariant: _, BentoSelectionCard: oe, ControlsGroup: K, ErrorMessage: Q };
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
var le = function() {
|
|
225
|
-
var e = this, t = e._self._c, o = e._self._setupProxy;
|
|
226
|
-
return t(o.ControlsGroup, { 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" } }, [t("div", { staticClass: "b-selection-card-group__items", class: o.conditionalItemsClasses }, e._l(e.items, function(a) {
|
|
227
|
-
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() {
|
|
228
|
-
return [e._t("icon", null, null, a)];
|
|
229
|
-
}, proxy: !0 } : null, o.hasSlot("content") && a.content ? { key: "content", fn: function() {
|
|
230
|
-
return [e._t("content", null, null, a)];
|
|
231
|
-
}, proxy: !0 } : null, o.hasSlot("dynamicContent") && a.dynamicContent ? { key: "dynamicContent", fn: function() {
|
|
232
|
-
return [e._t("dynamicContent", null, null, a)];
|
|
233
|
-
}, proxy: !0 } : null], null, !0) }, "bento-selection-card", a, !1));
|
|
234
|
-
}), 1), o.shouldShowGroupError ? t(o.ErrorMessage, { staticClass: "b-selection-card-group__error-message", attrs: { id: o.errorMessageId, "error-message": e.errorMessage } }) : e._e()], 1);
|
|
235
|
-
}, re = [], se = /* @__PURE__ */ $(
|
|
236
|
-
ne,
|
|
237
|
-
le,
|
|
238
|
-
re,
|
|
239
|
-
!1,
|
|
240
|
-
null,
|
|
241
|
-
"eda15615",
|
|
242
|
-
null,
|
|
243
|
-
null
|
|
244
|
-
);
|
|
245
|
-
const me = se.exports;
|
|
1
|
+
import { B as t, s as a, a as n } from "./chunks/selection-card-group.DlOs8BkR.js";
|
|
246
2
|
export {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
3
|
+
t as BentoSelectionCard,
|
|
4
|
+
a as BentoSelectionCardGroup,
|
|
5
|
+
n as BentoSelectionCardState
|
|
250
6
|
};
|
|
251
7
|
//# sourceMappingURL=selection-card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection-card.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 '../internal/radio-input';\nimport { BentoCheckboxType } from '../checkbox';\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 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 >{{ subtitle }}</bento-typography\n >\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 @update:model-value=\"onChange\"\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 @update:model-value=\"onChange\"\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 '@/utils/ts/unique-id';\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 * 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<{\n /**\n * Emitted when the selection card is clicked. Enables Vue2 \"v-model\"\n */\n (e: 'input', value: BentoSelectionCardValue);\n /**\n * Emitted when the selection card is clicked. Enables Vue3 \"v-model\"\n */\n (e: 'update:model-value', value: BentoSelectionCardValue);\n }>();\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 }));\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 // Handle click on the whole card area\n const handleCardClick = event => {\n if (!props.disabled && !props.readonly) {\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)) {\n return;\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\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 :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 class=\"b-selection-card-group__items\" :class=\"conditionalItemsClasses\">\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 <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, PropType, provide, ref, useSlots, watch } from 'vue';\n import { BentoSelectionCardGroupLayout, BentoSelectionCardGroupVariant } from './selection-card-group.types';\n import BentoSelectionCard from '../../selection-card.vue';\n import { ControlsGroup, ErrorMessage } 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 '@/utils/ts/unique-id';\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 * 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<{\n /**\n * Emitted when the selection card is clicked. Enables Vue2 \"v-model\"\n */\n (e: 'input', value: BentoSelectionCardModelValue);\n /**\n * Emitted when the selection card is clicked. Enables Vue3 \"v-model\"\n */\n (e: 'update:model-value', value: BentoSelectionCardModelValue);\n }>();\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 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</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","_b","_a","_d","_c","_f","_e","newValue","toggleInput","onChange","currentValue","newCheckedList","index","emit","__default__","name","conditionalItemsClasses","inputValue","watch","errorMessageId","shouldShowGroupError","onInput","value","isRadioVariant","provide"],"mappings":";;;;;;;;;;;AAIY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA;ACJC,MAAAE,IAAA,OAAA,0CAAA,GCySTC,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAtIAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,yBAAA,GACAC,IAAAD,EAAA,4BAAA,GAEAE,IAAAC;AAAA,MAAmE,MAAAC,EAAA;AAAA,IACnD,GAEhBC,IAAAF;AAAA,MAAwE,MAAAC,EAAA;AAAA,IACxD,GAGhBE,IAAAH,EAAA,OAAA;AAAA,MAA2C,6BAAAI,EAAA;AAAA,IACA,EAAA,GAG3CC,IAAAL,EAAA,OAAA;AAAA,MAAoD,CAAA,qBAAAZ,EAAA,UAAA,GAAAa,EAAA;AAAA,MACiB,CAAA,qBAAAb,EAAA,OAAA,GAAAa,EAAA;AAAA,MACH,CAAA,qBAAAb,EAAA,UAAA,GAAAa,EAAA;AAAA,MACG,oCAAAK,EAAA;AAAA,IACjB,EAAA,GAGpDC,IAAAP,EAAA,OAAA;AAAA,MAA4D,wDAAAM,EAAA;AAAA,IACY,EAAA,GAGxEE,IAAAR,EAAA,OAAA;AAAA,MAAgE,6DAAAM,EAAA;AAAA,IACa,EAAA,GAG7EG,IAAAT,EAAA,OAAA;AAAA,MAA+C,qCAAAN,EAAA,MAAA;AAAA,IACQ,EAAA,GAGvDgB,IAAAC,EAAA;AAAA,MAA+B,WAAAV,EAAA;AAAA,MACV,OAAAA,EAAA;AAAA,IACJ,CAAA,GAGjBW,IAAAZ,EAAA,MAAA,MAAA,QAAAC,EAAA,UAAA,CAAA,GAEAG,IAAAJ,EAAA,MACIa,EAAA,QACIZ,EAAA,UAAAA,EAAA,aAEJW,EAAA,QAIAX,EAAA,WAAA,KAAA,CAAAa,MAAAA,MAAAb,EAAA,KAAA,IAHIA,EAAA,UAGiF,GAGzFY,IAAAE,EAAAzB,GAAA0B,EAAA,EAAA,CAAA,GAEAV,IAAAN,EAAA,MAAA,CAAAC,EAAA,YAAA,CAAAA,EAAA,WAAA,GAEAgB,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,IAAA,GACAG,IAAAH,EAAA,IAAA,GAEAI,IAAA,CAAAC,MAAA;;AACI,UAAA,CAAApB,EAAA,YAAA,CAAAA,EAAA,UAAA;AAUI,YARAiB,EAAA,WAAAI,KAAAC,IAAAL,EAAA,UAAA,gBAAAK,EAAA,QAAA,QAAAD,EAAA,SAAAD,EAAA,YAIAF,EAAA,WAAAK,KAAAC,IAAAN,EAAA,UAAA,gBAAAM,EAAA,QAAA,QAAAD,EAAA,SAAAH,EAAA,YAIAJ,EAAA,WAAAS,KAAAC,IAAAV,EAAA,UAAA,gBAAAU,EAAA,QAAA,QAAAD,EAAA,SAAAL,EAAA;AACI;AAIJ,cAAAO,IAAAC,EAAA;AAEA,QAAAC,EAAAF,CAAA;AAAA;AAAA,IACJ,GAGJC,IAAA,MAAA;;AACI,YAAAE,MAAAR,IAAAN,EAAA,UAAA,gBAAAM,EAAA,MAAA,UAAA;AAEA,UAAAX,EAAA,OAAA;AACI,cAAAoB,IAAA,CAAA,GAAA/B,EAAA,UAAA,GACAgC,IAAAD,EAAA,QAAA/B,EAAA,KAAA;AAEA,eAAAgC,MAAA,KACID,EAAA,KAAA/B,EAAA,KAAA,IAEA+B,EAAA,OAAAC,GAAA,CAAA,GAEJD;AAAA;AAGJ,aAAAnB,EAAA,QACIZ,EAAA,QAEJ,CAAA8B;AAAA,IAAQ,GAGZD,IAAA,CAAAF,MAAA;AACI,MAAA,CAAA3B,EAAA,YAAA,CAAAA,EAAA,aACIiC,EAAA,sBAAAN,CAAA,GACAM,EAAA,SAAAN,CAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;;;uBCtDJO,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBArEA3C,IAAAC,EAAA,GAIAC,IAAA,CAAA0C,MAAA,CAAA,CAAA5C,EAAA4C,CAAA,GAEAC,IAAArC,EAAA,OAAA;AAAA,MAAgD,6CAAAC,EAAA,WAAA;AAAA,IACkB,EAAA,GAGlEqC,IAAAtB,EAAAf,EAAA,UAAA;AACA,IAAAsC;AAAA,MAAA,MAAAtC,EAAA;AAAA,MACgB,MAAA;AAER,QAAAqC,EAAA,QAAArC,EAAA;AAAA,MAAyB;AAAA,IAC7B;AAIJ,UAAAuC,IAAA3C,EAAA,OAAA,GACA4C,IAAAzC,EAAA,MAAA,CAAAC,EAAA,YAAA,CAAAA,EAAA,YAAA,CAAA,CAAAA,EAAA,YAAA,GAEAyC,IAAA,CAAAC,MAAA;AACI,MAAAL,EAAA,QAAAK,GACAT,EAAA,sBAAAS,CAAA,GACAT,EAAA,SAAAS,CAAA;AAAA,IAAmB,GAGvBC,IAAA5C,EAAA,MAAAC,EAAA,YAAA,OAAA;AAEA,WAAA4C,EAAAvD,GAAAsD,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"selection-card.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/sidepanel.js
CHANGED
|
@@ -1,192 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { B as x } from "./chunks/index.e29a6907.js";
|
|
3
|
-
import { F as G } from "./chunks/footer-actions.58d14a16.js";
|
|
4
|
-
import { D as L, B as F, b as R, a as U } from "./chunks/dialog-page.7fd7d006.js";
|
|
5
|
-
import { n as I } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
6
|
-
import { a as w } from "./chunks/button.cb90b55c.js";
|
|
7
|
-
import { B as V } from "./chunks/index.1deef79e.js";
|
|
8
|
-
import { C as J } from "./chunks/cross.04678d81.js";
|
|
9
|
-
import { S as K } from "./chunks/sidepanel.keys.1ed8a57c.js";
|
|
10
|
-
import { u as Y } from "./chunks/i18n.eb5b985b.js";
|
|
11
|
-
import { g as $ } from "./chunks/unique-id.a2a2b458.js";
|
|
12
|
-
import "./assets/index36.css";
|
|
13
|
-
const z = {}, M = /* @__PURE__ */ C({
|
|
14
|
-
...z,
|
|
15
|
-
__name: "sidepanel-page",
|
|
16
|
-
props: {
|
|
17
|
-
/**
|
|
18
|
-
* List of actions that will be used to render the buttons.
|
|
19
|
-
* First element in the list will be rendered as "primary".
|
|
20
|
-
* All elements after the first will be rendered as "secondary".
|
|
21
|
-
*
|
|
22
|
-
* ```
|
|
23
|
-
* [{
|
|
24
|
-
* title: 'Primary',
|
|
25
|
-
* event: () => { ... },
|
|
26
|
-
* icon: FourPeopleIcon
|
|
27
|
-
* }, {
|
|
28
|
-
* title: 'Secondary',
|
|
29
|
-
* event: () => { ... }
|
|
30
|
-
* }]
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
actions: {
|
|
34
|
-
type: Array,
|
|
35
|
-
default: null
|
|
36
|
-
},
|
|
37
|
-
/**
|
|
38
|
-
* Text label that is displayed left to the action buttons
|
|
39
|
-
*/
|
|
40
|
-
actionsLabel: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: null
|
|
43
|
-
},
|
|
44
|
-
/**
|
|
45
|
-
* If passed - sets first button color to red
|
|
46
|
-
*/
|
|
47
|
-
destructiveActions: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
default: !1
|
|
50
|
-
},
|
|
51
|
-
/**
|
|
52
|
-
* Identifier of the page, used with activePage prop to handle sidepanel navigation
|
|
53
|
-
*/
|
|
54
|
-
pageId: {
|
|
55
|
-
type: String,
|
|
56
|
-
default: void 0
|
|
57
|
-
},
|
|
58
|
-
/**
|
|
59
|
-
* ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior
|
|
60
|
-
* Used when the back button should not take the user to the natural previous page
|
|
61
|
-
* Set to `null` to hide back button in the page
|
|
62
|
-
*/
|
|
63
|
-
previousPage: {
|
|
64
|
-
type: String,
|
|
65
|
-
default: void 0
|
|
66
|
-
},
|
|
67
|
-
/**
|
|
68
|
-
* Title of the sidepanel page
|
|
69
|
-
*/
|
|
70
|
-
title: {
|
|
71
|
-
type: String,
|
|
72
|
-
default: null
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
setup(i) {
|
|
76
|
-
return { __sfc: !0, BentoTypography: x, FooterActions: G, DialogPage: L };
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
var j = function() {
|
|
80
|
-
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
81
|
-
return s(t.DialogPage, { staticClass: "b-sidepanel-page", attrs: { "page-id": e.pageId, "previous-page": e.previousPage }, scopedSlots: e._u([{ key: "header", fn: function() {
|
|
82
|
-
return [s("div", { staticClass: "b-sidepanel-page__header" }, [s(t.BentoTypography, { staticClass: "b-sidepanel-page__title", attrs: { el: "h2", variant: "title" } }, [e._v(" " + e._s(e.title) + " ")])], 1)];
|
|
83
|
-
}, proxy: !0 }, { key: "content", fn: function() {
|
|
84
|
-
return [s("div", { staticClass: "b-sidepanel-page__content" }, [s(t.BentoTypography, { attrs: { el: "div", variant: "body" } }, [e._t("default")], 2)], 1)];
|
|
85
|
-
}, proxy: !0 }, e.actions && e.actions.length > 0 ? { key: "footer", fn: function() {
|
|
86
|
-
return [s("div", { staticClass: "b-sidepanel-page__actions" }, [s(t.FooterActions, { attrs: { actions: e.actions, "actions-label": e.actionsLabel, "destructive-actions": e.destructiveActions } })], 1)];
|
|
87
|
-
}, proxy: !0 } : null], null, !0) });
|
|
88
|
-
}, q = [], H = /* @__PURE__ */ I(
|
|
89
|
-
M,
|
|
90
|
-
j,
|
|
91
|
-
q,
|
|
92
|
-
!1,
|
|
93
|
-
null,
|
|
94
|
-
"4e6c994b",
|
|
95
|
-
null,
|
|
96
|
-
null
|
|
97
|
-
);
|
|
98
|
-
const de = H.exports;
|
|
99
|
-
var u = /* @__PURE__ */ ((i) => (i.UPDATE_ACTIVE_PAGE = "update:active-page", i.UPDATE_IS_OPEN = "update:is-open", i))(u || {});
|
|
100
|
-
const Q = {
|
|
101
|
-
"en-US": {
|
|
102
|
-
close: "Close"
|
|
103
|
-
}
|
|
104
|
-
}, W = {
|
|
105
|
-
i18n: { messages: Q }
|
|
106
|
-
}, X = /* @__PURE__ */ C({
|
|
107
|
-
...W,
|
|
108
|
-
__name: "sidepanel",
|
|
109
|
-
props: {
|
|
110
|
-
/**
|
|
111
|
-
* The id of the current active page
|
|
112
|
-
* Should be the same id as the BentoSidepanelPage to be displayed
|
|
113
|
-
* If the component only has one page, it can be left null/undefined.
|
|
114
|
-
*/
|
|
115
|
-
activePage: {
|
|
116
|
-
type: String,
|
|
117
|
-
default: null
|
|
118
|
-
},
|
|
119
|
-
/**
|
|
120
|
-
* If set to true, it allows the sidepanel to be closed
|
|
121
|
-
*/
|
|
122
|
-
isDismissible: {
|
|
123
|
-
type: Boolean,
|
|
124
|
-
default: !1
|
|
125
|
-
},
|
|
126
|
-
/**
|
|
127
|
-
* Controls the sidepanel's state from the outside. Set it to true to open the sidepanel
|
|
128
|
-
*/
|
|
129
|
-
isOpen: {
|
|
130
|
-
type: Boolean,
|
|
131
|
-
default: null
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
setup(i, { emit: e }) {
|
|
135
|
-
const s = i, { activePage: t, isOpen: a } = B(s), { t: b } = Y(), r = l(null), c = l([]), o = l([]), g = l(F.TRANSITION_LEVEL_DEEPER), p = l(!1), m = $("sidepanel"), _ = l(!1), d = l(!1), D = h(() => ({
|
|
136
|
-
"b-sidepanel--hide": p.value,
|
|
137
|
-
"b-sidepanel--animation": d.value
|
|
138
|
-
})), S = () => {
|
|
139
|
-
p.value && (r.value.close(), o.value[0] && e(u.UPDATE_ACTIVE_PAGE, o.value[0]), o.value = [], p.value = !1, _.value = !1, e(u.UPDATE_IS_OPEN, !1));
|
|
140
|
-
}, f = () => {
|
|
141
|
-
r.value.open && (p.value = !0);
|
|
142
|
-
}, O = ({ target: n }) => {
|
|
143
|
-
n && n.tagName === "DIALOG" && f();
|
|
144
|
-
};
|
|
145
|
-
k(
|
|
146
|
-
() => a.value,
|
|
147
|
-
async () => {
|
|
148
|
-
await N(), r.value && (a.value ? (_.value = !0, r.value.showModal(), o.value.length || o.value.push(t.value)) : r.value.open && f());
|
|
149
|
-
},
|
|
150
|
-
{ immediate: !0 }
|
|
151
|
-
);
|
|
152
|
-
const y = (n) => e(u.UPDATE_ACTIVE_PAGE, n), A = (n) => () => {
|
|
153
|
-
var P;
|
|
154
|
-
c.value = (P = c.value) == null ? void 0 : P.filter((T) => T !== n);
|
|
155
|
-
}, E = (n) => (c.value.push(n), { unregisterPage: A(n) });
|
|
156
|
-
return v(R, {
|
|
157
|
-
activePage: t,
|
|
158
|
-
animation: g,
|
|
159
|
-
isAnimationActive: d,
|
|
160
|
-
isOpen: _,
|
|
161
|
-
pages: c,
|
|
162
|
-
previousPages: o,
|
|
163
|
-
updatePage: y
|
|
164
|
-
}), v(U, E), v(K, m), { __sfc: !0, props: s, emit: e, activePage: t, isOpen: a, t: b, sidepanel: r, pages: c, previousPages: o, animation: g, isClosing: p, sidepanelId: m, internalIsOpen: _, isAnimationActive: d, conditionalClasses: D, closeSidepanelAfterAnimation: S, startCloseSidepanelAnimation: f, closeSidepanelOnClickOutside: O, updatePage: y, unregisterPage: A, registerPage: E, BentoButton: w, BentoFocusTrap: V, CrossIcon: J };
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
var Z = function() {
|
|
168
|
-
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
169
|
-
return s("dialog", { ref: "sidepanel", staticClass: "b-sidepanel", class: t.conditionalClasses, attrs: { id: t.sidepanelId }, on: { animationend: t.closeSidepanelAfterAnimation, click: function(a) {
|
|
170
|
-
e.isDismissible && t.closeSidepanelOnClickOutside(a);
|
|
171
|
-
}, keydown: function(a) {
|
|
172
|
-
if (!a.type.indexOf("key") && e._k(a.keyCode, "esc", 27, a.key, ["Esc", "Escape"]))
|
|
173
|
-
return null;
|
|
174
|
-
a.preventDefault(), e.isDismissible && t.startCloseSidepanelAnimation;
|
|
175
|
-
} } }, [s(t.BentoFocusTrap, [e.isDismissible ? s("div", { staticClass: "b-sidepanel__close-button" }, [s(t.BentoButton, { attrs: { variant: "tertiary" }, on: { click: t.startCloseSidepanelAnimation } }, [s(t.CrossIcon, { attrs: { "svg-title": t.t("close") } })], 1)], 1) : e._e(), e._t("default")], 2)], 1);
|
|
176
|
-
}, ee = [], te = /* @__PURE__ */ I(
|
|
177
|
-
X,
|
|
178
|
-
Z,
|
|
179
|
-
ee,
|
|
180
|
-
!1,
|
|
181
|
-
null,
|
|
182
|
-
"11e634f1",
|
|
183
|
-
null,
|
|
184
|
-
null
|
|
185
|
-
);
|
|
186
|
-
const fe = te.exports;
|
|
1
|
+
import { a as n, B as o, s as t } from "./chunks/sidepanel.BBjm2QvZ.js";
|
|
187
2
|
export {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
3
|
+
n as BentoSidepanel,
|
|
4
|
+
o as BentoSidepanelEvent,
|
|
5
|
+
t as BentoSidepanelPage
|
|
191
6
|
};
|
|
192
7
|
//# sourceMappingURL=sidepanel.js.map
|
package/dist/sidepanel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidepanel.js","sources":["../src/components/sidepanel/components/sidepanel-page.vue","../src/components/sidepanel/sidepanel.types.ts","../src/components/sidepanel/sidepanel.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-sidepanel-page\" :page-id=\"pageId\" :previous-page=\"previousPage\">\n <template #header>\n <div class=\"b-sidepanel-page__header\">\n <bento-typography class=\"b-sidepanel-page__title\" el=\"h2\" variant=\"title\">\n {{ title }}\n </bento-typography>\n </div>\n </template>\n <template #content>\n <div class=\"b-sidepanel-page__content\">\n <bento-typography el=\"div\" variant=\"body\">\n <slot />\n </bento-typography>\n </div>\n </template>\n <template v-if=\"actions && actions.length > 0\" #footer>\n <div class=\"b-sidepanel-page__actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType } from 'vue';\n\n import { BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { FooterActions } from '@/components/internal/footer-actions';\n import { DialogPage } from '@/internal';\n\n defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the sidepanel page\n */\n title: {\n type: String,\n default: null,\n },\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * SidepanelPage is used to render different pages of Sidepanel component\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./sidepanel-page.scss\" />\n","export enum BentoSidepanelEvent {\n UPDATE_ACTIVE_PAGE = 'update:active-page',\n UPDATE_IS_OPEN = 'update:is-open',\n}\n","<template>\n <dialog\n :id=\"sidepanelId\"\n ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @click=\"isDismissible && closeSidepanelOnClickOutside($event)\"\n @keydown.esc.prevent=\"isDismissible && startCloseSidepanelAnimation\"\n >\n <bento-focus-trap>\n <div v-if=\"isDismissible\" class=\"b-sidepanel__close-button\">\n <bento-button variant=\"tertiary\" @click=\"startCloseSidepanelAnimation\">\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n <slot />\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, provide, ref, toRefs, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { BentoSidepanelEvent } from './sidepanel.types';\n import {\n BentoDialogPageAnimation,\n BentoDialogPageConfigData,\n BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n import { SIDEPANEL_DIALOG_ID_INJECTION_KEY } from './sidepanel.keys';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n import { generateUid } from '@/utils/ts/unique-id';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * The id of the current active page\n * Should be the same id as the BentoSidepanelPage to be displayed\n * If the component only has one page, it can be left null/undefined.\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If set to true, it allows the sidepanel to be closed\n */\n isDismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the sidepanel's state from the outside. Set it to true to open the sidepanel\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when page is changed internally\n */\n (e: BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page: string): void;\n /**\n * Emits close-sidepanel event when the sidepanel is closed\n */\n (e: BentoSidepanelEvent.UPDATE_IS_OPEN, isOpen: boolean): void;\n }>();\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const sidepanel = ref(null);\n const pages = ref<string[]>([]);\n const previousPages = ref([]);\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const isClosing = ref(false);\n const sidepanelId = generateUid('sidepanel');\n const internalIsOpen = ref(false);\n const isAnimationActive = ref(false);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-sidepanel--hide': isClosing.value,\n 'b-sidepanel--animation': isAnimationActive.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeSidepanelAfterAnimation = () => {\n if (isClosing.value) {\n sidepanel.value.close();\n if (previousPages.value[0]) {\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit(BentoSidepanelEvent.UPDATE_IS_OPEN, false);\n }\n };\n\n const startCloseSidepanelAnimation = () => {\n if (!sidepanel.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n /**\n * Since the dialog HTML element doesn't automatically close when clicking outside, a check on when the user is clicking is needed.\n * If the click doesn't happen in the dialog box itself, the modal closes\n */\n const closeSidepanelOnClickOutside = ({ target }: Event): void => {\n if (target && (target as HTMLElement).tagName === 'DIALOG') {\n startCloseSidepanelAnimation();\n }\n };\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n () => isOpen.value,\n async () => {\n // Wait for sidepanel ref to be created\n await nextTick();\n\n if (!sidepanel.value) {\n return;\n }\n\n if (isOpen.value) {\n internalIsOpen.value = true;\n sidepanel.value.showModal();\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (sidepanel.value.open) {\n startCloseSidepanelAnimation();\n }\n },\n { immediate: true }\n );\n\n // Pages\n const updatePage = page => emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page);\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n pages.value.push(pageId);\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isAnimationActive,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n\n // Let's Children components know they are inside a SidePanel (dialog element)\n provide(SIDEPANEL_DIALOG_ID_INJECTION_KEY, sidepanelId);\n</script>\n\n<script lang=\"ts\">\n /**\n * Sidepanel component is a slide-in panel that should be used for presenting actions, settings or features that are directly associated with a specific task or interaction on the main screen.\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n<style lang=\"scss\" scoped src=\"./sidepanel.scss\" />\n"],"names":["__default__$1","BentoSidepanelEvent","BentoSidepanelEvent2","__default__","messages","activePage","isOpen","toRefs","props","t","useI18n","sidepanel","ref","pages","previousPages","animation","BentoDialogPageAnimation","isClosing","sidepanelId","generateUid","internalIsOpen","isAnimationActive","conditionalClasses","computed","closeSidepanelAfterAnimation","emit","startCloseSidepanelAnimation","closeSidepanelOnClickOutside","target","watch","nextTick","updatePage","page","unregisterPage","pageIdToRemove","_a","pageId","registerPage","provide","DIALOG_PAGE_CONFIG_INJECTION_KEY","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_DIALOG_ID_INJECTION_KEY"],"mappings":";;;;;;;;;;;;AA2II,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3IQ,IAAAC,IAAA,kBAAAC,OACRA,EAAA,qBAAA,sBACAA,EAAA,iBAAA,kBAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;GCiORE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA7IA,EAAA,YAAAC,GAAA,QAAAC,EAAA,IAAAC,EAAAC,CAAA,GACA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,CAAA,CAAA,GACAE,IAAAF,EAAA,CAAA,CAAA,GACAG,IAAAH,EAAAI,EAAA,uBAAA,GACAC,IAAAL,EAAA,EAAA,GACAM,IAAAC,EAAA,WAAA,GACAC,IAAAR,EAAA,EAAA,GACAS,IAAAT,EAAA,EAAA,GAGAU,IAAAC,EAAA,OAAA;AAAA,MAA2C,qBAAAN,EAAA;AAAA,MACR,0BAAAI,EAAA;AAAA,IACa,EAAA,GAIhDG,IAAA,MAAA;AACI,MAAAP,EAAA,UACIN,EAAA,MAAA,MAAA,GACAG,EAAA,MAAA,CAAA,KACIW,EAAAxB,EAAA,oBAAAa,EAAA,MAAA,CAAA,CAAA,GAEJA,EAAA,QAAA,CAAA,GACAG,EAAA,QAAA,IACAG,EAAA,QAAA,IACAK,EAAAxB,EAAA,gBAAA,EAAA;AAAA,IACJ,GAGJyB,IAAA,MAAA;AACI,MAAAf,EAAA,MAAA,SAGAM,EAAA,QAAA;AAAA,IAAkB,GAOtBU,IAAA,CAAA,EAAA,QAAAC,EAAA,MAAA;AACI,MAAAA,KAAAA,EAAA,YAAA,YACIF,EAAA;AAAA,IACJ;AAIJ,IAAAG;AAAA,MAAA,MAAAvB,EAAA;AAAA,MACiB,YAAA;AAKT,QAFA,MAAAwB,EAAA,GAEAnB,EAAA,UAIAL,EAAA,SACIc,EAAA,QAAA,IACAT,EAAA,MAAA,UAAA,GACAG,EAAA,MAAA,UACIA,EAAA,MAAA,KAAAT,EAAA,KAAA,KACJM,EAAA,MAAA,QAEAe,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAAK,IAAA,CAAAC,MAAAP,EAAAxB,EAAA,oBAAA+B,CAAA,GAGAC,IAAA,CAAAC,MAAA,MAAA;;AACI,MAAArB,EAAA,SAAAsB,IAAAtB,EAAA,UAAA,gBAAAsB,EAAA,OAAA,CAAAC,MAAAA,MAAAF;AAAA,IAAqE,GAIzEG,IAAA,CAAAD,OACIvB,EAAA,MAAA,KAAAuB,CAAA,GAEA,EAAA,gBAAAH,EAAAG,CAAA,EAAA;AAGJ,WAAAE,EAAAC,GAAA;AAAA,MAAqE,YAAAlC;AAAA,MACjE,WAAAU;AAAA,MACA,mBAAAM;AAAA,MACA,QAAAD;AAAA,MACQ,OAAAP;AAAA,MACR,eAAAC;AAAA,MACA,YAAAiB;AAAA,IACA,CAAA,GAEJO,EAAAE,GAAAH,CAAA,GAGAC,EAAAG,GAAAvB,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"sidepanel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/status.js
CHANGED
|
@@ -1,43 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { B as o } from "./chunks/index.e29a6907.js";
|
|
3
|
-
import { n as l } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
4
|
-
import "./assets/index15.css";
|
|
5
|
-
var r = /* @__PURE__ */ ((s) => (s.BLUE = "blue", s.GREEN = "green", s.GREY = "grey", s.ORANGE = "orange", s.RED = "red", s.YELLOW = "yellow", s))(r || {});
|
|
6
|
-
const _ = n({
|
|
7
|
-
name: "bento-status",
|
|
8
|
-
components: { BentoTypography: o },
|
|
9
|
-
props: {
|
|
10
|
-
variant: {
|
|
11
|
-
type: String,
|
|
12
|
-
required: !0,
|
|
13
|
-
validator: (s) => Object.values(r).includes(s)
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
setup(s) {
|
|
17
|
-
return {
|
|
18
|
-
// Values
|
|
19
|
-
conditionalClass: a(() => ({
|
|
20
|
-
[`b-status__indicator--${s.variant}`]: !0
|
|
21
|
-
}))
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
var c = function() {
|
|
26
|
-
var t = this, e = t._self._c;
|
|
27
|
-
return t._self._setupProxy, e("div", { staticClass: "b-status", attrs: { role: "status" } }, [e("span", { staticClass: "b-status__indicator", class: t.conditionalClass, attrs: { role: "presentation" } }), e("bento-typography", { staticClass: "b-status__label", attrs: { el: "span", variant: "body" } }, [t._t("default")], 2)], 1);
|
|
28
|
-
}, i = [], p = /* @__PURE__ */ l(
|
|
29
|
-
_,
|
|
30
|
-
c,
|
|
31
|
-
i,
|
|
32
|
-
!1,
|
|
33
|
-
null,
|
|
34
|
-
"4eb7001b",
|
|
35
|
-
null,
|
|
36
|
-
null
|
|
37
|
-
);
|
|
38
|
-
const m = p.exports;
|
|
1
|
+
import { s, B as o } from "./chunks/status.types.BhbOYpZx.js";
|
|
39
2
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
3
|
+
s as BentoStatus,
|
|
4
|
+
o as BentoStatusVariant
|
|
42
5
|
};
|
|
43
6
|
//# sourceMappingURL=status.js.map
|
package/dist/status.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sources":[
|
|
1
|
+
{"version":3,"file":"status.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|