@adyen/bento-vue2 1.26.0 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +8 -0
- package/dist/@types/index.d.ts +967 -374
- package/dist/accordion.js +3 -101
- package/dist/accordion.js.map +1 -1
- package/dist/action-bar.js +2 -231
- package/dist/action-bar.js.map +1 -1
- package/dist/alert.js +5 -116
- package/dist/alert.js.map +1 -1
- package/dist/assets/{index2.css → accordion-item.css} +1 -1
- package/dist/assets/{index3.css → action-bar.css} +1 -1
- package/dist/assets/alert.css +1 -0
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/{index7.css → card.css} +1 -1
- package/dist/assets/checkbox-input.css +1 -1
- package/dist/assets/{index9.css → code-snippet.css} +1 -1
- 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/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/{index15.css → form-layout-title.css} +1 -1
- package/dist/assets/{index25.css → input-field.css} +1 -1
- package/dist/assets/listbox-option-tag.css +1 -1
- package/dist/assets/{index26.css → menu.css} +1 -1
- package/dist/assets/{index22.css → modal-fullscreen.css} +1 -1
- package/dist/assets/{index28.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/{index37.css → sidepanel.css} +1 -1
- package/dist/assets/status.css +1 -0
- package/dist/assets/structured-list-item.css +1 -0
- package/dist/assets/{index43.css → tabs.css} +1 -1
- package/dist/assets/toggle.css +1 -0
- package/dist/assets/tutorial.css +1 -0
- package/dist/assets/use-cached-selected-values.css +1 -1
- 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.7eefc59c.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.ad74b6f8.js.map → base-button.DER7_IsF.js.map} +1 -1
- package/dist/chunks/{base-modal.1fff7abe.js → base-modal.C5I7bR0d.js} +42 -46
- package/dist/chunks/{base-modal.1fff7abe.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.e845d77a.js → button-actions-with-menu.f3yuLK-L.js} +25 -27
- package/dist/chunks/{button-actions-with-menu.e845d77a.js.map → button-actions-with-menu.f3yuLK-L.js.map} +1 -1
- package/dist/chunks/button-actions.Bg9ey0p6.js +111 -0
- package/dist/chunks/button-actions.Bg9ey0p6.js.map +1 -0
- package/dist/chunks/button.DhAUh5JA.js +99 -0
- package/dist/chunks/button.DhAUh5JA.js.map +1 -0
- package/dist/chunks/{calendar.640b8d25.js → calendar.B69z8gjb.js} +287 -332
- package/dist/chunks/{calendar.640b8d25.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.bfed007c.js → checkbox.Bi2RDBEZ.js} +21 -23
- package/dist/chunks/{checkbox.bfed007c.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.4fb50009.js → controls-group.cSRFiEVO.js} +17 -19
- package/dist/chunks/{controls-group.4fb50009.js.map → controls-group.cSRFiEVO.js.map} +1 -1
- package/dist/chunks/{copy.f85700c6.js → copy.BtFWFG3q.js} +15 -19
- package/dist/chunks/{copy.f85700c6.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.CvHAdmvs.js +2022 -0
- package/dist/chunks/data-grid.CvHAdmvs.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.8b8c3b16.js → date-range-picker.DrnklTJ-.js} +113 -117
- package/dist/chunks/date-range-picker.DrnklTJ-.js.map +1 -0
- package/dist/chunks/{index.b21197ca.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.73da22cf.js → dialog-page.DAh0M4mT.js} +20 -24
- package/dist/chunks/{dialog-page.73da22cf.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.54ca1b18.js → dropdown-default-textbox.CKOkl_Qa.js} +30 -34
- package/dist/chunks/{dropdown-default-textbox.54ca1b18.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.10c034aa.js → dropdown.yhhQCKve.js} +195 -214
- 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.31ec12b7.js.map → error-message.BSxUoE3_.js.map} +1 -1
- package/dist/chunks/events.CMzGybJJ.js +47 -0
- package/dist/chunks/events.CMzGybJJ.js.map +1 -0
- package/dist/chunks/filter-bar.AhsOPMZ1.js +2119 -0
- package/dist/chunks/filter-bar.AhsOPMZ1.js.map +1 -0
- package/dist/chunks/{fixed-scroller.4eb9a9ac.js → fixed-scroller.Bq1AgPnw.js} +18 -20
- package/dist/chunks/{fixed-scroller.4eb9a9ac.js.map → fixed-scroller.Bq1AgPnw.js.map} +1 -1
- package/dist/chunks/{index.d553d3d1.js → focus-trap.DSkLNO_i.js} +35 -37
- package/dist/chunks/focus-trap.DSkLNO_i.js.map +1 -0
- package/dist/chunks/{footer-actions.a1e09b4f.js → footer-actions.DqMRmlV_.js} +11 -13
- package/dist/chunks/{footer-actions.a1e09b4f.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.OCPp3NST.js +126 -0
- package/dist/chunks/index.OCPp3NST.js.map +1 -0
- 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.ca47dfa8.js → keyboard-navigation.Clz1jOaA.js} +2 -2
- package/dist/chunks/{keyboard-navigation.ca47dfa8.js.map → keyboard-navigation.Clz1jOaA.js.map} +1 -1
- package/dist/chunks/{index.317fca12.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.eafc9e1b.js → loading-button.CoF1IhEU.js} +32 -34
- package/dist/chunks/{loading-button.eafc9e1b.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.1ea85d4a.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.6c1ce07c.js → payment-method.D9Qx-s4V.js} +19 -21
- package/dist/chunks/{payment-method.6c1ce07c.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.15b088b9.js → popover.B8YH92W8.js} +31 -37
- package/dist/chunks/popover.B8YH92W8.js.map +1 -0
- package/dist/chunks/{index.671768a1.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.DGjIC7Ab.js +111 -0
- package/dist/chunks/segmented-control.DGjIC7Ab.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/structured-list-item.C9NTVDvT.js +81 -0
- 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.58ef3f4a.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.dd30e538.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.c3277f73.js → use-bento-toast-controller.BifdE4ak.js} +4 -4
- package/dist/chunks/{use-bento-toast-controller.c3277f73.js.map → use-bento-toast-controller.BifdE4ak.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.69297473.js → use-cached-selected-values.CVLzxvTi.js} +345 -346
- package/dist/chunks/use-cached-selected-values.CVLzxvTi.js.map +1 -0
- 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 -2050
- 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 +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 +2 -65
- package/dist/data-grid-template.js.map +1 -1
- package/dist/data-grid.js +8 -1978
- 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 -2154
- 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 +276 -269
- 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 -215
- 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 -140
- 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 -325
- package/dist/tutorial.js.map +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +482 -305
- package/package.json +11 -10
- package/dist/assets/index11.css +0 -1
- package/dist/assets/index18.css +0 -1
- package/dist/assets/index33.css +0 -1
- package/dist/assets/index34.css +0 -1
- package/dist/assets/index35.css +0 -1
- package/dist/assets/index38.css +0 -1
- package/dist/assets/index4.css +0 -1
- package/dist/assets/index40.css +0 -1
- package/dist/assets/index44.css +0 -1
- package/dist/assets/index46.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.ad74b6f8.js +0 -88
- package/dist/chunks/button-actions.81db18e8.js +0 -111
- package/dist/chunks/button-actions.81db18e8.js.map +0 -1
- package/dist/chunks/button.9d6435ae.js +0 -100
- package/dist/chunks/button.9d6435ae.js.map +0 -1
- package/dist/chunks/checkmark-circle-fill.345311d2.js +0 -26
- package/dist/chunks/checkmark.a6ed8f47.js +0 -26
- package/dist/chunks/checkmark.a6ed8f47.js.map +0 -1
- package/dist/chunks/dropdown.10c034aa.js.map +0 -1
- package/dist/chunks/error-message.31ec12b7.js +0 -111
- package/dist/chunks/events.58c00e6d.js +0 -50
- package/dist/chunks/events.58c00e6d.js.map +0 -1
- package/dist/chunks/index.15b088b9.js.map +0 -1
- package/dist/chunks/index.1ea85d4a.js.map +0 -1
- package/dist/chunks/index.317fca12.js.map +0 -1
- package/dist/chunks/index.671768a1.js.map +0 -1
- package/dist/chunks/index.7eefc59c.js.map +0 -1
- package/dist/chunks/index.885d05a9.js +0 -32
- package/dist/chunks/index.885d05a9.js.map +0 -1
- package/dist/chunks/index.8b8c3b16.js.map +0 -1
- package/dist/chunks/index.aaf965f8.js +0 -147
- package/dist/chunks/index.aaf965f8.js.map +0 -1
- package/dist/chunks/index.b21197ca.js.map +0 -1
- package/dist/chunks/index.d553d3d1.js.map +0 -1
- package/dist/chunks/index.dd30e538.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.6bbb6bbe.js +0 -107
- package/dist/chunks/listbox-option-tag.6bbb6bbe.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.58ef3f4a.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-cached-selected-values.69297473.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/{index5.css → avatar-image.css} +0 -0
- /package/dist/assets/{index.css → badge.css} +0 -0
- /package/dist/assets/{index8.css → checkbox-group.css} +0 -0
- /package/dist/assets/{index10.css → country.css} +0 -0
- /package/dist/assets/{index12.css → date-picker.css} +0 -0
- /package/dist/assets/{index13.css → date-range-picker.css} +0 -0
- /package/dist/assets/{index14.css → divider.css} +0 -0
- /package/dist/assets/{index16.css → dropdown-tag.css} +0 -0
- /package/dist/assets/{index17.css → empty-state.css} +0 -0
- /package/dist/assets/{index19.css → focus-trap.css} +0 -0
- /package/dist/assets/{index21.css → header.css} +0 -0
- /package/dist/assets/{index27.css → info-icon.css} +0 -0
- /package/dist/assets/{index42.css → link.css} +0 -0
- /package/dist/assets/{index23.css → loading-indicator.css} +0 -0
- /package/dist/assets/{index24.css → pagination.css} +0 -0
- /package/dist/assets/{index45.css → popper-container.css} +0 -0
- /package/dist/assets/{index20.css → radio-group.css} +0 -0
- /package/dist/assets/{index47.css → search-bar.css} +0 -0
- /package/dist/assets/{index48.css → secondary-nav.css} +0 -0
- /package/dist/assets/{index39.css → step.css} +0 -0
- /package/dist/assets/{index41.css → summary-grid-item-custom.css} +0 -0
- /package/dist/assets/{index36.css → tag.css} +0 -0
- /package/dist/assets/{index30.css → textarea.css} +0 -0
- /package/dist/assets/{index31.css → timeline-item.css} +0 -0
- /package/dist/assets/{index32.css → toast.css} +0 -0
- /package/dist/assets/{index6.css → toggle-button.css} +0 -0
- /package/dist/assets/{index29.css → typography.css} +0 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { defineComponent as p, ref as i, computed as d, toRef as g, watch as C, onMounted as h } from "vue";
|
|
2
|
+
import { B, p as y } from "./typography.Bjtu3Gca.js";
|
|
3
|
+
import { g as w } from "./unique-id.XFfoKuc2.js";
|
|
4
|
+
import { n as f } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
5
|
+
import { o as $ } from "./resize.Bqks3WUm.js";
|
|
6
|
+
import { B as W } from "./tooltip.DR8rbIYw.js";
|
|
7
|
+
import "../assets/segmented-control.css";
|
|
8
|
+
const k = {
|
|
9
|
+
name: "bento-segmented-control-button"
|
|
10
|
+
}, x = /* @__PURE__ */ p({
|
|
11
|
+
...k,
|
|
12
|
+
props: {
|
|
13
|
+
disabled: { type: Boolean, default: !1 },
|
|
14
|
+
fullWidth: { type: Boolean, default: !1 },
|
|
15
|
+
label: null,
|
|
16
|
+
modelValue: { default: null },
|
|
17
|
+
truncate: { type: Boolean, default: !1 },
|
|
18
|
+
value: null,
|
|
19
|
+
wrap: { type: Boolean, default: !1 }
|
|
20
|
+
},
|
|
21
|
+
emits: ["update:model-value"],
|
|
22
|
+
setup(r, { emit: t }) {
|
|
23
|
+
const e = r, o = i(), n = w("segmented-control-button"), l = d(() => e.value === e.modelValue), a = d(() => ({
|
|
24
|
+
"b-segmented-control-button--hug-content": !e.fullWidth,
|
|
25
|
+
"b-segmented-control-button--full-width": e.fullWidth,
|
|
26
|
+
"b-segmented-control-button--truncate": e.truncate,
|
|
27
|
+
"b-segmented-control-button--wrap": e.wrap && !e.truncate
|
|
28
|
+
}));
|
|
29
|
+
return { __sfc: !0, props: e, emit: t, segmentedControlButtonLabel: o, segmentedControlButtonId: n, isChecked: l, conditionalClasses: a, onClick: () => {
|
|
30
|
+
e.disabled || t("update:model-value", e.value);
|
|
31
|
+
}, BentoTypography: B };
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
var I = function() {
|
|
35
|
+
var t = this, e = t._self._c, o = t._self._setupProxy;
|
|
36
|
+
return e("div", { staticClass: "b-segmented-control-button", class: o.conditionalClasses }, [e("input", { staticClass: "b-segmented-control-button__input", attrs: { id: o.segmentedControlButtonId, "aria-checked": o.isChecked, "aria-label": t.label, disabled: t.disabled, type: "radio", role: "radio" }, domProps: { checked: o.isChecked, value: t.value }, on: { change: o.onClick } }), t.label ? e("label", { staticClass: "b-segmented-control-button__label-container", attrs: { for: o.segmentedControlButtonId } }, [e(o.BentoTypography, { ref: "segmentedControlButtonLabel", staticClass: "b-segmented-control-button__label", attrs: { el: "span", variant: "body", stronger: "" } }, [t._v(" " + t._s(t.label) + " ")])], 1) : t._e()]);
|
|
37
|
+
}, T = [], V = /* @__PURE__ */ f(
|
|
38
|
+
x,
|
|
39
|
+
I,
|
|
40
|
+
T,
|
|
41
|
+
!1,
|
|
42
|
+
null,
|
|
43
|
+
"bef754d8"
|
|
44
|
+
);
|
|
45
|
+
const L = V.exports, R = {
|
|
46
|
+
name: "bento-segmented-control"
|
|
47
|
+
}, D = /* @__PURE__ */ p({
|
|
48
|
+
...R,
|
|
49
|
+
props: {
|
|
50
|
+
ariaLabel: { default: null },
|
|
51
|
+
fullWidth: { type: Boolean, default: !1 },
|
|
52
|
+
items: null,
|
|
53
|
+
modelValue: null,
|
|
54
|
+
wrap: { type: Boolean, default: !1 }
|
|
55
|
+
},
|
|
56
|
+
emits: ["update:model-value"],
|
|
57
|
+
setup(r, { emit: t }) {
|
|
58
|
+
const e = r, o = g(e, "modelValue"), n = i(), l = i(), a = i(), u = d(() => !e.wrap);
|
|
59
|
+
C(
|
|
60
|
+
() => e.items,
|
|
61
|
+
() => {
|
|
62
|
+
e.items.length > 5 && y(
|
|
63
|
+
"Do not use when you need to provide more than 5 segments at a time. If you need to provide more options, use a dropdown component."
|
|
64
|
+
);
|
|
65
|
+
},
|
|
66
|
+
{ immediate: !0 }
|
|
67
|
+
), h(() => {
|
|
68
|
+
$(n.value, () => {
|
|
69
|
+
var s;
|
|
70
|
+
n.value && (a.value = (s = l == null ? void 0 : l.value) == null ? void 0 : s.map(
|
|
71
|
+
(c) => c.$refs.segmentedControlButtonLabel.$el.offsetWidth < c.$refs.segmentedControlButtonLabel.$el.scrollWidth
|
|
72
|
+
));
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
const _ = d(
|
|
76
|
+
() => e.items.map((s, c) => {
|
|
77
|
+
var m;
|
|
78
|
+
return {
|
|
79
|
+
...s,
|
|
80
|
+
tooltipText: u.value && ((m = a == null ? void 0 : a.value) != null && m[c]) ? s.label : void 0
|
|
81
|
+
};
|
|
82
|
+
})
|
|
83
|
+
), b = (s) => {
|
|
84
|
+
t("update:model-value", s);
|
|
85
|
+
}, v = d(() => ({
|
|
86
|
+
"b-segmented-control--hug": !e.fullWidth,
|
|
87
|
+
"b-segmented-control--full-width": e.fullWidth,
|
|
88
|
+
"b-segmented-control--truncate": u.value,
|
|
89
|
+
"b-segmented-control--wrap": e.wrap
|
|
90
|
+
}));
|
|
91
|
+
return { __sfc: !0, emit: t, props: e, inputValue: o, segmentedControlRef: n, segmentedControlButtonRef: l, hasEllipsis: a, truncate: u, computedItems: _, onInput: b, conditionalClasses: v, SegmentedControlButton: L, vBentoTooltipDirective: W };
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
var S = function() {
|
|
95
|
+
var t = this, e = t._self._c, o = t._self._setupProxy;
|
|
96
|
+
return e("div", { ref: "segmentedControlRef", staticClass: "b-segmented-control", class: o.conditionalClasses, attrs: { role: "group" } }, t._l(o.computedItems, function(n, l) {
|
|
97
|
+
return e(o.SegmentedControlButton, { directives: [{ name: "bento-tooltip-directive", rawName: "v-bento-tooltip-directive", value: n.tooltipText, expression: "item.tooltipText" }], key: `segmented-control-item-${l}-${n.label}`, ref: "segmentedControlButtonRef", refInFor: !0, staticClass: "b-segmented-control__item", attrs: { label: n.label, value: n.value, disabled: n.disabled, truncate: o.truncate, wrap: t.wrap, "full-width": t.fullWidth, "model-value": o.inputValue }, on: { "update:model-value": o.onInput } });
|
|
98
|
+
}), 1);
|
|
99
|
+
}, F = [], P = /* @__PURE__ */ f(
|
|
100
|
+
D,
|
|
101
|
+
S,
|
|
102
|
+
F,
|
|
103
|
+
!1,
|
|
104
|
+
null,
|
|
105
|
+
"c074d9c3"
|
|
106
|
+
);
|
|
107
|
+
const q = P.exports;
|
|
108
|
+
export {
|
|
109
|
+
q as B
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=segmented-control.DGjIC7Ab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-control.DGjIC7Ab.js","sources":["../../src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue","../../src/components/segmented-control/segmented-control.vue"],"sourcesContent":["<template>\n <div class=\"b-segmented-control-button\" :class=\"conditionalClasses\">\n <input\n :id=\"segmentedControlButtonId\"\n :aria-checked=\"isChecked\"\n :aria-label=\"label\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :value=\"value\"\n type=\"radio\"\n class=\"b-segmented-control-button__input\"\n role=\"radio\"\n @change=\"onClick\"\n />\n <label v-if=\"label\" :for=\"segmentedControlButtonId\" class=\"b-segmented-control-button__label-container\">\n <bento-typography\n ref=\"segmentedControlButtonLabel\"\n class=\"b-segmented-control-button__label\"\n el=\"span\"\n variant=\"body\"\n stronger\n >\n {{ label }}\n </bento-typography>\n </label>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import { generateUid } from '@/utils/ts/unique-id';\n import { computed, ComputedRef, ref } from 'vue';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Disable the radio button (optional)\n */\n disabled?: boolean;\n\n /**\n * Renders the button with a 100% width\n */\n fullWidth?: boolean;\n\n /**\n * The string the button will showcase\n */\n label: string;\n\n /**\n * This property should not be used directly.\n * It will be used by v-model directive on the segmented control component\n */\n modelValue?: string | number;\n\n /**\n * Renders the button with a truncated text if the space is not enough to render the whole content\n */\n truncate?: boolean;\n\n /**\n * Indicates the value of the input that will be returned when it's selected\n */\n value: string | number;\n\n /**\n * Renders the button with centered text in case the text has to wrap multiple lines\n */\n wrap?: boolean;\n }>(),\n {\n disabled: false,\n fullWidth: false,\n modelValue: null,\n truncate: false,\n wrap: false,\n }\n );\n\n const emit = defineEmits<{\n /**\n * Emitted every time the segmented control internal value is changed\n */\n (e: 'update:model-value', value: string | number);\n }>();\n\n const segmentedControlButtonLabel = ref();\n const segmentedControlButtonId = generateUid('segmented-control-button');\n const isChecked: ComputedRef<boolean> = computed(() => props.value === props.modelValue);\n const conditionalClasses = computed(() => ({\n 'b-segmented-control-button--hug-content': !props.fullWidth,\n 'b-segmented-control-button--full-width': props.fullWidth,\n 'b-segmented-control-button--truncate': props.truncate,\n 'b-segmented-control-button--wrap': props.wrap && !props.truncate,\n }));\n const onClick = () => {\n if (!props.disabled) {\n emit('update:model-value', props.value);\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to be used within the BentoSegmentedControl component only\n */\n export default {\n name: 'bento-segmented-control-button',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./segmented-control-button.scss\" />\n","<template>\n <div ref=\"segmentedControlRef\" role=\"group\" class=\"b-segmented-control\" :class=\"conditionalClasses\">\n <segmented-control-button\n v-for=\"(item, index) in computedItems\"\n ref=\"segmentedControlButtonRef\"\n :key=\"`segmented-control-item-${index}-${item.label}`\"\n v-bento-tooltip-directive=\"item.tooltipText\"\n class=\"b-segmented-control__item\"\n :label=\"item.label\"\n :value=\"item.value\"\n :disabled=\"item.disabled\"\n :truncate=\"truncate\"\n :wrap=\"wrap\"\n :full-width=\"fullWidth\"\n :model-value=\"inputValue\"\n @update:model-value=\"onInput\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, ref, toRef, watch } from 'vue';\n import SegmentedControlButton from './components/segmented-control-button/segmented-control-button.vue';\n import { BentoSegmentedControlItem } from './segmented-control.types';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives';\n\n const emit = defineEmits<{\n /**\n * Emitted every time the segmented control internal value is changed\n */\n (e: 'update:model-value', value: string | number);\n }>();\n\n const props = withDefaults(\n defineProps<{\n /**\n * Accessible name describing the segmented control.\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n ariaLabel?: string;\n\n /**\n * If set to true, renders the component full width.\n */\n fullWidth?: boolean;\n\n /**\n * Items that will populate the segmented control.\n */\n items: BentoSegmentedControlItem[];\n\n /**\n * Determines the selected value of the group. Corresponds to the BentoSegmentedControlItem's value.\n */\n modelValue: string | number;\n\n /**\n * If set to true, wraps the items in the segmented control to show their content whenever these don't fit in the available space anymore.\n */\n wrap?: boolean;\n }>(),\n {\n ariaLabel: null,\n fullWidth: false,\n wrap: false,\n }\n );\n\n const inputValue = toRef(props, 'modelValue');\n\n const segmentedControlRef = ref();\n const segmentedControlButtonRef = ref();\n const hasEllipsis = ref();\n\n const truncate = computed(() => !props.wrap);\n\n watch(\n () => props.items,\n () => {\n if (props.items.length > 5) {\n printDevelopmentWarning(\n 'Do not use when you need to provide more than 5 segments at a time. If you need to provide more options, use a dropdown component.'\n );\n }\n },\n { immediate: true }\n );\n\n onMounted(() => {\n observeSizeOfElement(segmentedControlRef.value, () => {\n if (segmentedControlRef.value) {\n hasEllipsis.value = segmentedControlButtonRef?.value?.map(\n el =>\n el.$refs.segmentedControlButtonLabel.$el.offsetWidth <\n el.$refs.segmentedControlButtonLabel.$el.scrollWidth\n );\n }\n });\n });\n\n const computedItems = computed(() =>\n props.items.map((el, index) => ({\n ...el,\n tooltipText: truncate.value && hasEllipsis?.value?.[index] ? el.label : undefined,\n }))\n );\n\n const onInput = value => {\n emit('update:model-value', value);\n };\n\n const conditionalClasses = computed(() => ({\n 'b-segmented-control--hug': !props.fullWidth,\n 'b-segmented-control--full-width': props.fullWidth,\n 'b-segmented-control--truncate': truncate.value,\n 'b-segmented-control--wrap': props.wrap,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * @example\n * import { BentoSegmentedControl } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSegmentedControl },\n * template: `\n * <bento-segmented-control\n * :items=\"[{ label: 'Segment 1', value: 1 }, { label: 'Segment 2', value: 2 }, { label: 'Segment 3', value: 3, disabled: true }]\"\n * :model-value=\"1\"\n * @update:model-value=\"yourUpdateHandler\"\n * />\n * `\n * }\n */\n export default {\n name: 'bento-segmented-control',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./segmented-control.scss\" />\n"],"names":["__default__$1","segmentedControlButtonLabel","ref","segmentedControlButtonId","generateUid","isChecked","computed","props","conditionalClasses","emit","__default__","inputValue","toRef","segmentedControlRef","segmentedControlButtonRef","hasEllipsis","truncate","watch","printDevelopmentWarning","onMounted","observeSizeOfElement","_a","el","computedItems","index","onInput","value"],"mappings":";;;;;;;AA2GI,MAAAA,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;;iBAtBAC,IAAAC,EAAA,GACAC,IAAAC,EAAA,0BAAA,GACAC,IAAAC,EAAA,MAAAC,EAAA,UAAAA,EAAA,UAAA,GACAC,IAAAF,EAAA,OAAA;AAAA,MAA2C,2CAAA,CAAAC,EAAA;AAAA,MACW,0CAAAA,EAAA;AAAA,MACF,wCAAAA,EAAA;AAAA,MACF,oCAAAA,EAAA,QAAA,CAAAA,EAAA;AAAA,IACW,EAAA;sJAE7D,MAAA;AACI,MAAAA,EAAA,YACIE,EAAA,sBAAAF,EAAA,KAAA;AAAA,IACJ;;;;;;;;;;;;;;qBCsCJG,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;iBArEAC,IAAAC,EAAAL,GAAA,YAAA,GAEAM,IAAAX,EAAA,GACAY,IAAAZ,EAAA,GACAa,IAAAb,EAAA,GAEAc,IAAAV,EAAA,MAAA,CAAAC,EAAA,IAAA;AAEA,IAAAU;AAAA,MAAA,MAAAV,EAAA;AAAA,MACgB,MAAA;AAER,QAAAA,EAAA,MAAA,SAAA,KACIW;AAAA,UAAA;AAAA,QACI;AAAA,MAER;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB,GAGtBC,EAAA,MAAA;AACI,MAAAC,EAAAP,EAAA,OAAA,MAAA;;AACI,QAAAA,EAAA,UACIE,EAAA,SAAAM,IAAAP,KAAA,gBAAAA,EAAA,UAAA,gBAAAO,EAAA;AAAA,UAAsD,CAAAC,MAAAA,EAAA,MAAA,4BAAA,IAAA,cAAAA,EAAA,MAAA,4BAAA,IAAA;AAAA;AAAA,MAK1D,CAAA;AAAA,IACH,CAAA;AAGL,UAAAC,IAAAjB;AAAA,MAAsB,MAAAC,EAAA,MAAA,IAAA,CAAAe,GAAAE,MAAA;;AAAA;AAAA,UACc,GAAAF;AAAA,UACzB,aAAAN,EAAA,WAAAK,IAAAN,KAAA,gBAAAA,EAAA,UAAA,QAAAM,EAAAG,MAAAF,EAAA,QAAA;AAAA,QACqE;AAAA,OAAA;AAAA,IAC1E,GAGNG,IAAA,CAAAC,MAAA;AACI,MAAAjB,EAAA,sBAAAiB,CAAA;AAAA,IAAgC,GAGpClB,IAAAF,EAAA,OAAA;AAAA,MAA2C,4BAAA,CAAAC,EAAA;AAAA,MACJ,mCAAAA,EAAA;AAAA,MACM,iCAAAS,EAAA;AAAA,MACC,6BAAAT,EAAA;AAAA,IACP,EAAA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-control.types.BHRLV8KU.js","sources":["../../src/components/segmented-control/segmented-control.types.ts"],"sourcesContent":["export interface BentoSegmentedControlItem {\n label: string;\n value: string | number;\n disabled?: boolean;\n}\n\n/**\n * @deprecated from version 2.0.0. Use \"@update:model-value\" or \"v-model\" instead\n */\nexport enum BentoSegmentedControlEvent {\n UPDATE = 'update:model-value',\n}\n"],"names":["BentoSegmentedControlEvent"],"mappings":"AASY,IAAAA,sBAAAA,OACRA,EAAA,SAAS,sBADDA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { defineComponent as A, useSlots as M, computed as n, inject as P, ref as p, watch as z, provide as Y } from "vue";
|
|
2
|
+
import { B as j } from "./typography.Bjtu3Gca.js";
|
|
3
|
+
import { u as F } from "./aria-label.CaUURpnB.js";
|
|
4
|
+
import { g as k } from "./unique-id.XFfoKuc2.js";
|
|
5
|
+
import { u as U } from "./use-has-slot.C9lQZ6nz.js";
|
|
6
|
+
import { a as H } from "./checkbox-input.DwDwI2BD.js";
|
|
7
|
+
import { a as J } from "./radio-input.BQcC0INR.js";
|
|
8
|
+
import { n as $ } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
9
|
+
import { C as K } from "./controls-group.cSRFiEVO.js";
|
|
10
|
+
import { E as Q } from "./error-message.BSxUoE3_.js";
|
|
11
|
+
import "../assets/selection-card-group.css";
|
|
12
|
+
var y = /* @__PURE__ */ ((l) => (l.DISABLED = "disabled", l.READONLY = "readonly", l.ERROR = "error", l))(y || {});
|
|
13
|
+
const D = 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), m = k("selection-card-input-id"), d = k("selection-card-description"), C = 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--${y.DISABLED}`]: t.disabled,
|
|
82
|
+
[`b-selection-card--${y.ERROR}`]: t.hasError,
|
|
83
|
+
[`b-selection-card--${y.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
|
+
})), O = n(() => ({
|
|
88
|
+
"b-selection-card__checkbox-container-text--center-aligned": f.value
|
|
89
|
+
})), G = 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(() => I.value ? t.value === t.modelValue : g.value ? t.modelValue.some((r) => r === t.value) : t.modelValue), I = P(D, p(!1)), f = n(() => !t.subtitle && !t.description), b = p(null), x = p(null), S = p(null), q = (r) => {
|
|
95
|
+
var c, i, u, B, T, L;
|
|
96
|
+
if (!t.disabled && !t.readonly) {
|
|
97
|
+
if (x.value && ((i = (c = x.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)) || b.value && ((L = (T = b.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 = b.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 I.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: m, descriptionId: d, computedRadioInputModelValue: C, computedCheckboxInputModelValue: v, conditionalClasses: h, containerConditionalClasses: _, checkboxContainerConditionalClasses: s, checkboxContainerTextConditionalClasses: O, slotConditionalClasses: G, ariaLabel: N, isCheckboxGroup: g, isChecked: R, isRadioInput: I, isTitleOnly: f, inputRef: b, slotRef: x, 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
|
+
);
|
|
129
|
+
const oe = te.exports, ae = {}, ne = /* @__PURE__ */ A({
|
|
130
|
+
...ae,
|
|
131
|
+
__name: "selection-card-group",
|
|
132
|
+
props: {
|
|
133
|
+
/**
|
|
134
|
+
* Descriptive supporting text visbile underneath the label.
|
|
135
|
+
*/
|
|
136
|
+
description: { type: String, default: null },
|
|
137
|
+
/**
|
|
138
|
+
* If set to true, renders all cards in the group in a disabled state.
|
|
139
|
+
*/
|
|
140
|
+
disabled: { type: Boolean, default: !1 },
|
|
141
|
+
/**
|
|
142
|
+
* Renders all cards in an error state with an error message.
|
|
143
|
+
*/
|
|
144
|
+
errorMessage: { type: String, default: null },
|
|
145
|
+
/**
|
|
146
|
+
* The form id the selection card group is associated with. Defaults to null, as a selection card group can also be used standalone.
|
|
147
|
+
*/
|
|
148
|
+
formId: { type: String, default: null },
|
|
149
|
+
/**
|
|
150
|
+
* Shows/hides the group label.
|
|
151
|
+
*/
|
|
152
|
+
hideLabel: { type: Boolean, default: null },
|
|
153
|
+
/**
|
|
154
|
+
* Label of the group. Required for accessibility purposes, even if it's not shown
|
|
155
|
+
*/
|
|
156
|
+
label: {
|
|
157
|
+
type: String,
|
|
158
|
+
required: !0
|
|
159
|
+
},
|
|
160
|
+
/**
|
|
161
|
+
* The selection card group's layout. It can be vertical or horizontal. Defaults to vertical.
|
|
162
|
+
* @values horizontal, vertical
|
|
163
|
+
*/
|
|
164
|
+
layout: {
|
|
165
|
+
type: String,
|
|
166
|
+
default: "vertical"
|
|
167
|
+
},
|
|
168
|
+
/**
|
|
169
|
+
* The selection card group's items.
|
|
170
|
+
*/
|
|
171
|
+
items: {
|
|
172
|
+
type: Array,
|
|
173
|
+
required: !0
|
|
174
|
+
},
|
|
175
|
+
/**
|
|
176
|
+
* Determines the initially selected value of the group. Corresponds to the BentoSelectionCardItem's value.
|
|
177
|
+
* Defaults to no value selected.
|
|
178
|
+
*/
|
|
179
|
+
modelValue: {
|
|
180
|
+
type: [Array, String, Number],
|
|
181
|
+
default: null
|
|
182
|
+
},
|
|
183
|
+
/**
|
|
184
|
+
* Indicates the field is optional.
|
|
185
|
+
*/
|
|
186
|
+
optional: { type: Boolean, default: !1 },
|
|
187
|
+
/**
|
|
188
|
+
* Indicates the field is required.
|
|
189
|
+
*/
|
|
190
|
+
required: { type: Boolean, default: !1 },
|
|
191
|
+
/**
|
|
192
|
+
* Tooltip message.
|
|
193
|
+
*/
|
|
194
|
+
tooltipText: { type: String, default: null },
|
|
195
|
+
/**
|
|
196
|
+
* If set to true, renders all cards in the group in a readonly state.
|
|
197
|
+
*/
|
|
198
|
+
readonly: { type: Boolean, default: !1 },
|
|
199
|
+
/**
|
|
200
|
+
* Renders the cards with a checkbox or a radio input. Selection logic will also apply in accordance.
|
|
201
|
+
* @values checkbox, radio
|
|
202
|
+
*/
|
|
203
|
+
variant: { type: String, default: "checkbox" }
|
|
204
|
+
},
|
|
205
|
+
emits: ["input", "update:model-value"],
|
|
206
|
+
setup(l, { emit: e }) {
|
|
207
|
+
const t = l, o = M(), a = (s) => !!o[s], m = n(() => ({
|
|
208
|
+
"b-selection-card-group__items--horizontal": t.layout === "horizontal"
|
|
209
|
+
})), d = p(t.modelValue);
|
|
210
|
+
z(
|
|
211
|
+
() => t.modelValue,
|
|
212
|
+
() => {
|
|
213
|
+
d.value = t.modelValue;
|
|
214
|
+
}
|
|
215
|
+
);
|
|
216
|
+
const C = k("error"), v = n(() => !t.disabled && !t.readonly && !!t.errorMessage), h = (s) => {
|
|
217
|
+
d.value = s, e("update:model-value", s), e("input", s);
|
|
218
|
+
}, _ = n(() => t.variant === "radio");
|
|
219
|
+
return Y(D, _), { __sfc: !0, props: t, emit: e, slots: o, hasSlot: a, conditionalItemsClasses: m, inputValue: d, errorMessageId: C, shouldShowGroupError: v, onInput: h, isRadioVariant: _, BentoSelectionCard: oe, ControlsGroup: K, ErrorMessage: Q };
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
var le = function() {
|
|
223
|
+
var e = this, t = e._self._c, o = e._self._setupProxy;
|
|
224
|
+
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) {
|
|
225
|
+
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() {
|
|
226
|
+
return [e._t("icon", null, null, a)];
|
|
227
|
+
}, proxy: !0 } : null, o.hasSlot("content") && a.content ? { key: "content", fn: function() {
|
|
228
|
+
return [e._t("content", null, null, a)];
|
|
229
|
+
}, proxy: !0 } : null, o.hasSlot("dynamicContent") && a.dynamicContent ? { key: "dynamicContent", fn: function() {
|
|
230
|
+
return [e._t("dynamicContent", null, null, a)];
|
|
231
|
+
}, proxy: !0 } : null], null, !0) }, "bento-selection-card", a, !1));
|
|
232
|
+
}), 1), o.shouldShowGroupError ? t(o.ErrorMessage, { staticClass: "b-selection-card-group__error-message", attrs: { id: o.errorMessageId, "error-message": e.errorMessage } }) : e._e()], 1);
|
|
233
|
+
}, re = [], se = /* @__PURE__ */ $(
|
|
234
|
+
ne,
|
|
235
|
+
le,
|
|
236
|
+
re,
|
|
237
|
+
!1,
|
|
238
|
+
null,
|
|
239
|
+
"eda15615"
|
|
240
|
+
);
|
|
241
|
+
const Ce = se.exports;
|
|
242
|
+
export {
|
|
243
|
+
oe as B,
|
|
244
|
+
y as a,
|
|
245
|
+
Ce as s
|
|
246
|
+
};
|
|
247
|
+
//# sourceMappingURL=selection-card-group.DlOs8BkR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-card-group.DlOs8BkR.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,QAAA,EAAA,GAAAa,EAAA;AAAA,MACiB,CAAA,qBAAAb,EAAA,KAAA,EAAA,GAAAa,EAAA;AAAA,MACH,CAAA,qBAAAb,EAAA,QAAA,EAAA,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,MAAiB;AAAA,IACrB,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,MAAO;AAGX,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;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { defineComponent as C, toRefs as B, ref as l, computed as h, watch as k, nextTick as N, provide as v } from "vue";
|
|
2
|
+
import { B as G } from "./typography.Bjtu3Gca.js";
|
|
3
|
+
import { F as x } from "./footer-actions.DqMRmlV_.js";
|
|
4
|
+
import { D as L, B as F, b as R, a as U } from "./dialog-page.DAh0M4mT.js";
|
|
5
|
+
import { n as I } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
|
+
import { B as w } from "./button.DhAUh5JA.js";
|
|
7
|
+
import { B as V } from "./focus-trap.DSkLNO_i.js";
|
|
8
|
+
import { C as J } from "./cross.CsUPDmaA.js";
|
|
9
|
+
import { S as K } from "./sidepanel.keys.R0DKQuYx.js";
|
|
10
|
+
import { u as Y } from "./i18n.BQkEbtPM.js";
|
|
11
|
+
import { g as $ } from "./unique-id.XFfoKuc2.js";
|
|
12
|
+
import "../assets/sidepanel.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: G, FooterActions: x, 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
|
+
);
|
|
96
|
+
const de = H.exports;
|
|
97
|
+
var _ = /* @__PURE__ */ ((i) => (i.UPDATE_ACTIVE_PAGE = "update:active-page", i.UPDATE_IS_OPEN = "update:is-open", i))(_ || {});
|
|
98
|
+
const Q = {
|
|
99
|
+
"en-US": {
|
|
100
|
+
close: "Close"
|
|
101
|
+
}
|
|
102
|
+
}, W = {
|
|
103
|
+
i18n: { messages: Q }
|
|
104
|
+
}, X = /* @__PURE__ */ C({
|
|
105
|
+
...W,
|
|
106
|
+
__name: "sidepanel",
|
|
107
|
+
props: {
|
|
108
|
+
/**
|
|
109
|
+
* The id of the current active page
|
|
110
|
+
* Should be the same id as the BentoSidepanelPage to be displayed
|
|
111
|
+
* If the component only has one page, it can be left null/undefined.
|
|
112
|
+
*/
|
|
113
|
+
activePage: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: null
|
|
116
|
+
},
|
|
117
|
+
/**
|
|
118
|
+
* If set to true, it allows the sidepanel to be closed
|
|
119
|
+
*/
|
|
120
|
+
isDismissible: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: !1
|
|
123
|
+
},
|
|
124
|
+
/**
|
|
125
|
+
* Controls the sidepanel's state from the outside. Set it to true to open the sidepanel
|
|
126
|
+
*/
|
|
127
|
+
isOpen: {
|
|
128
|
+
type: Boolean,
|
|
129
|
+
default: null
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
setup(i, { emit: e }) {
|
|
133
|
+
const s = i, { activePage: t, isOpen: a } = B(s), { t: D } = Y(), r = l(null), p = l([]), o = l([]), m = l(F.TRANSITION_LEVEL_DEEPER), c = l(!1), g = $("sidepanel"), u = l(!1), d = l(!1), b = h(() => ({
|
|
134
|
+
"b-sidepanel--hide": c.value,
|
|
135
|
+
"b-sidepanel--animation": d.value
|
|
136
|
+
})), O = () => {
|
|
137
|
+
c.value && (r.value.close(), o.value[0] && e(_.UPDATE_ACTIVE_PAGE, o.value[0]), o.value = [], c.value = !1, u.value = !1, e(_.UPDATE_IS_OPEN, !1));
|
|
138
|
+
}, f = () => {
|
|
139
|
+
r.value.open && (c.value = !0);
|
|
140
|
+
}, T = ({ target: n }) => {
|
|
141
|
+
n && n.tagName === "DIALOG" && f();
|
|
142
|
+
};
|
|
143
|
+
k(
|
|
144
|
+
() => a.value,
|
|
145
|
+
async () => {
|
|
146
|
+
await N(), r.value && (a.value ? (u.value = !0, r.value.showModal(), o.value.length || o.value.push(t.value)) : r.value.open && f());
|
|
147
|
+
},
|
|
148
|
+
{ immediate: !0 }
|
|
149
|
+
);
|
|
150
|
+
const A = (n) => e(_.UPDATE_ACTIVE_PAGE, n), y = (n) => () => {
|
|
151
|
+
var P;
|
|
152
|
+
p.value = (P = p.value) == null ? void 0 : P.filter((S) => S !== n);
|
|
153
|
+
}, E = (n) => (p.value.push(n), { unregisterPage: y(n) });
|
|
154
|
+
return v(R, {
|
|
155
|
+
activePage: t,
|
|
156
|
+
animation: m,
|
|
157
|
+
isAnimationActive: d,
|
|
158
|
+
isOpen: u,
|
|
159
|
+
pages: p,
|
|
160
|
+
previousPages: o,
|
|
161
|
+
updatePage: A
|
|
162
|
+
}), v(U, E), v(K, g), { __sfc: !0, props: s, emit: e, activePage: t, isOpen: a, t: D, sidepanel: r, pages: p, previousPages: o, animation: m, isClosing: c, sidepanelId: g, internalIsOpen: u, isAnimationActive: d, conditionalClasses: b, closeSidepanelAfterAnimation: O, startCloseSidepanelAnimation: f, closeSidepanelOnClickOutside: T, updatePage: A, unregisterPage: y, registerPage: E, BentoButton: w, BentoFocusTrap: V, CrossIcon: J };
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
var Z = function() {
|
|
166
|
+
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
167
|
+
return s("dialog", { ref: "sidepanel", staticClass: "b-sidepanel", class: t.conditionalClasses, attrs: { id: t.sidepanelId }, on: { animationend: t.closeSidepanelAfterAnimation, click: function(a) {
|
|
168
|
+
e.isDismissible && t.closeSidepanelOnClickOutside(a);
|
|
169
|
+
}, keydown: function(a) {
|
|
170
|
+
if (!a.type.indexOf("key") && e._k(a.keyCode, "esc", 27, a.key, ["Esc", "Escape"])) return null;
|
|
171
|
+
a.preventDefault(), e.isDismissible && t.startCloseSidepanelAnimation;
|
|
172
|
+
} } }, [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);
|
|
173
|
+
}, ee = [], te = /* @__PURE__ */ I(
|
|
174
|
+
X,
|
|
175
|
+
Z,
|
|
176
|
+
ee,
|
|
177
|
+
!1,
|
|
178
|
+
null,
|
|
179
|
+
"11e634f1"
|
|
180
|
+
);
|
|
181
|
+
const fe = te.exports;
|
|
182
|
+
export {
|
|
183
|
+
_ as B,
|
|
184
|
+
fe as a,
|
|
185
|
+
de as s
|
|
186
|
+
};
|
|
187
|
+
//# sourceMappingURL=sidepanel.BBjm2QvZ.js.map
|