@adyen/bento-vue3 1.72.0 → 1.74.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 +2 -10
- package/dist/@types/index.d.ts +1543 -1703
- package/dist/@types/use-form-v4.d.ts +1 -1
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/avatar.css +1 -1
- 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/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/country.css +1 -1
- package/dist/assets/currency.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown-tag.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/header-meta.css +1 -1
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field-phone-number.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/listbox-option-tag.css +1 -1
- package/dist/assets/loading-indicator.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/popper-container.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/segmented-control.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/tab.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/assets/toggle.css +1 -1
- package/dist/assets/tooltip.css +1 -1
- package/dist/assets/tutorial.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/{accordion-item.6etqAJV9.js → accordion-item.Bd3v6erb.js} +2 -2
- package/dist/chunks/{accordion-item.6etqAJV9.js.map → accordion-item.Bd3v6erb.js.map} +1 -1
- package/dist/chunks/{action-bar.DDLTN9TB.js → action-bar.BZ04Y7Yi.js} +5 -5
- package/dist/chunks/{action-bar.DDLTN9TB.js.map → action-bar.BZ04Y7Yi.js.map} +1 -1
- package/dist/chunks/{ai-button.DsNrcgpK.js → ai-button.DaRuea3x.js} +2 -2
- package/dist/chunks/{ai-button.DsNrcgpK.js.map → ai-button.DaRuea3x.js.map} +1 -1
- package/dist/chunks/{alert.Dzx5MzgE.js → alert.C2pusd-_.js} +3 -3
- package/dist/chunks/{alert.Dzx5MzgE.js.map → alert.C2pusd-_.js.map} +1 -1
- package/dist/chunks/{avatar.Dq59yj6m.js → avatar.P2Fkz2I6.js} +27 -26
- package/dist/chunks/avatar.P2Fkz2I6.js.map +1 -0
- package/dist/chunks/{base-modal.Djw4pVal.js → base-modal.UA93s_8c.js} +7 -7
- package/dist/chunks/base-modal.UA93s_8c.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.DaKPEgPd.js → button-actions-with-menu.BeQ-j1bv.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.DaKPEgPd.js.map → button-actions-with-menu.BeQ-j1bv.js.map} +1 -1
- package/dist/chunks/{button-actions.D1eBtYgZ.js → button-actions.BQ3AFQqt.js} +13 -16
- package/dist/chunks/button-actions.BQ3AFQqt.js.map +1 -0
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
- package/dist/chunks/{button.C-MAa6ut.js → button.DhcxX2GJ.js} +2 -2
- package/dist/chunks/button.DhcxX2GJ.js.map +1 -0
- package/dist/chunks/{calendar.B1a_mV-Q.js → calendar.Cqjyxc69.js} +314 -310
- package/dist/chunks/calendar.Cqjyxc69.js.map +1 -0
- package/dist/chunks/{card.B9lWURmF.js → card.GxkxfBoV.js} +23 -23
- package/dist/chunks/card.GxkxfBoV.js.map +1 -0
- package/dist/chunks/{checkbox-group.CcgOK4yt.js → checkbox-group.8ebmaHsA.js} +4 -4
- package/dist/chunks/{checkbox-group.CcgOK4yt.js.map → checkbox-group.8ebmaHsA.js.map} +1 -1
- package/dist/chunks/{checkbox.73QYC0y8.js → checkbox.BI0dqARY.js} +4 -4
- package/dist/chunks/{checkbox.73QYC0y8.js.map → checkbox.BI0dqARY.js.map} +1 -1
- package/dist/chunks/{chip.CUwVpPVo.js → chip.DuLyhNCy.js} +2 -2
- package/dist/chunks/{chip.CUwVpPVo.js.map → chip.DuLyhNCy.js.map} +1 -1
- package/dist/chunks/{code-snippet.DL_1HNKV.js → code-snippet.CO78Nfj0.js} +7 -7
- package/dist/chunks/{code-snippet.DL_1HNKV.js.map → code-snippet.CO78Nfj0.js.map} +1 -1
- package/dist/chunks/{controls-group.CdTg-WDi.js → controls-group.cbGiHr7n.js} +2 -2
- package/dist/chunks/{controls-group.CdTg-WDi.js.map → controls-group.cbGiHr7n.js.map} +1 -1
- package/dist/chunks/{copy.Da1OGFTr.js → copy.ClKnDjMI.js} +5 -5
- package/dist/chunks/{copy.Da1OGFTr.js.map → copy.ClKnDjMI.js.map} +1 -1
- package/dist/chunks/country.DmnN9YIW.js +69 -0
- package/dist/chunks/country.DmnN9YIW.js.map +1 -0
- package/dist/chunks/country.types.C0Q_hhgJ.js.map +1 -1
- package/dist/chunks/{currency.CN4UnCx8.js → currency.CBZMwm21.js} +55 -38
- package/dist/chunks/currency.CBZMwm21.js.map +1 -0
- package/dist/chunks/{dashboard-section.BXE7_Y9R.js → dashboard-section.CVttsom5.js} +3 -3
- package/dist/chunks/{dashboard-section.BXE7_Y9R.js.map → dashboard-section.CVttsom5.js.map} +1 -1
- package/dist/chunks/{dashed-underline.28J-9i5D.js → dashed-underline.r62L_XBr.js} +3 -3
- package/dist/chunks/{dashed-underline.28J-9i5D.js.map → dashed-underline.r62L_XBr.js.map} +1 -1
- package/dist/chunks/{data-grid-template.B13OrA1T.js → data-grid-template.CFt1NV_4.js} +4 -4
- package/dist/chunks/{data-grid-template.B13OrA1T.js.map → data-grid-template.CFt1NV_4.js.map} +1 -1
- package/dist/chunks/data-grid.BjPdbx50.js +4071 -0
- package/dist/chunks/data-grid.BjPdbx50.js.map +1 -0
- package/dist/chunks/{date-input.BqBdAO1E.js → date-format.B8RU7D42.js} +6 -6
- package/dist/chunks/date-format.B8RU7D42.js.map +1 -0
- package/dist/chunks/date-picker.DSkvT_CA.js +234 -0
- package/dist/chunks/date-picker.DSkvT_CA.js.map +1 -0
- package/dist/chunks/date-range-picker.cmg75lC-.js +1117 -0
- package/dist/chunks/date-range-picker.cmg75lC-.js.map +1 -0
- package/dist/chunks/{date.4GAXrgy5.js → date.DZvVL-uz.js} +3 -3
- package/dist/chunks/{date.4GAXrgy5.js.map → date.DZvVL-uz.js.map} +1 -1
- package/dist/chunks/debounce.DUTu11PS.js.map +1 -1
- package/dist/chunks/{dialog-page.1ZVnUqpT.js → dialog-page.zWrBSgBD.js} +3 -3
- package/dist/chunks/dialog-page.zWrBSgBD.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.CGsOngY1.js → dropdown-default-textbox.MkU0tMf1.js} +29 -29
- package/dist/chunks/dropdown-default-textbox.MkU0tMf1.js.map +1 -0
- package/dist/chunks/{dropdown-tag.hIiGmmBD.js → dropdown-tag.DvQQIJsw.js} +134 -122
- package/dist/chunks/dropdown-tag.DvQQIJsw.js.map +1 -0
- package/dist/chunks/{dropdown.GyDAswAO.js → dropdown.bLsoTZbw.js} +350 -339
- package/dist/chunks/dropdown.bLsoTZbw.js.map +1 -0
- package/dist/chunks/{empty-state.BsKJ-1pT.js → empty-state.Be6M8ivH.js} +2 -2
- package/dist/chunks/{empty-state.BsKJ-1pT.js.map → empty-state.Be6M8ivH.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js.map +1 -1
- package/dist/chunks/{field-label.DSeawpYh.js → field-label.C97CrBI_.js} +3 -3
- package/dist/chunks/{field-label.DSeawpYh.js.map → field-label.C97CrBI_.js.map} +1 -1
- package/dist/chunks/{file-uploader.DELe6_NM.js → file-uploader.By0MTfKk.js} +87 -88
- package/dist/chunks/file-uploader.By0MTfKk.js.map +1 -0
- package/dist/chunks/filter-bar.nX73NKNC.js +2948 -0
- package/dist/chunks/filter-bar.nX73NKNC.js.map +1 -0
- package/dist/chunks/{fixed-scroller.BASYH576.js → fixed-scroller.Dmg8r9QP.js} +3 -3
- package/dist/chunks/{fixed-scroller.BASYH576.js.map → fixed-scroller.Dmg8r9QP.js.map} +1 -1
- package/dist/chunks/focus-trap.CpNGD7PH.js.map +1 -1
- package/dist/chunks/{footer-actions.Bqn-Jp0p.js → footer-actions.BO52wpv-.js} +3 -3
- package/dist/chunks/{footer-actions.Bqn-Jp0p.js.map → footer-actions.BO52wpv-.js.map} +1 -1
- package/dist/chunks/{form-layout-title.DdRqnXXi.js → form-layout-title.61ESsGAY.js} +20 -12
- package/dist/chunks/form-layout-title.61ESsGAY.js.map +1 -0
- package/dist/chunks/get-slot-text.DQlZEsId.js.map +1 -1
- package/dist/chunks/{header-meta.BXOpbsSR.js → header-meta.C4iaUsfq.js} +13 -10
- package/dist/chunks/{header-meta.BXOpbsSR.js.map → header-meta.C4iaUsfq.js.map} +1 -1
- package/dist/chunks/{header-with-views.afPw_Czi.js → header-with-views.BLW817ZC.js} +207 -207
- package/dist/chunks/header-with-views.BLW817ZC.js.map +1 -0
- package/dist/chunks/{header.9kRuPR3K.js → header.DARVAeE9.js} +3 -3
- package/dist/chunks/{header.9kRuPR3K.js.map → header.DARVAeE9.js.map} +1 -1
- package/dist/chunks/index.pdBj0KQU.js +15 -0
- package/dist/chunks/index.pdBj0KQU.js.map +1 -0
- package/dist/chunks/{info-icon.CRnO5lpq.js → info-icon.BhOm72U4.js} +3 -3
- package/dist/chunks/{info-icon.CRnO5lpq.js.map → info-icon.BhOm72U4.js.map} +1 -1
- package/dist/chunks/{input-field-password.JZkGOiMd.js → input-field-password.BtM3-txc.js} +8 -8
- package/dist/chunks/input-field-password.BtM3-txc.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.CF5P0_yu.js → input-field-phone-number.oaNB69nM.js} +631 -631
- package/dist/chunks/{input-field-phone-number.CF5P0_yu.js.map → input-field-phone-number.oaNB69nM.js.map} +1 -1
- package/dist/chunks/{input-field.2S8zBviE.js → input-field.D_tADgPG.js} +5 -5
- package/dist/chunks/input-field.D_tADgPG.js.map +1 -0
- package/dist/chunks/{inspector.C-yVhM15.js → inspector.BKP15cx6.js} +4 -4
- package/dist/chunks/inspector.BKP15cx6.js.map +1 -0
- package/dist/chunks/keyboard-navigation.pB8weElW.js.map +1 -1
- package/dist/chunks/{listbox-option-tag.CtJUykfB.js → listbox-option-tag.uHSB7MO6.js} +9 -9
- package/dist/chunks/listbox-option-tag.uHSB7MO6.js.map +1 -0
- package/dist/chunks/loading-indicator.Db794TT5.js +33 -0
- package/dist/chunks/loading-indicator.Db794TT5.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.CIxazX33.js → modal-fullscreen.DTT-5rQX.js} +6 -6
- package/dist/chunks/{modal-fullscreen.CIxazX33.js.map → modal-fullscreen.DTT-5rQX.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.D4TJY7o_.js → modal.vue_vue_type_script_setup_true_lang.c3Ma1oAL.js} +6 -6
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.D4TJY7o_.js.map → modal.vue_vue_type_script_setup_true_lang.c3Ma1oAL.js.map} +1 -1
- package/dist/chunks/on-click-outside.D9aY9g8G.js.map +1 -1
- package/dist/chunks/{pagination.NDwXq6fh.js → pagination.D1Gdo5to.js} +5 -5
- package/dist/chunks/pagination.D1Gdo5to.js.map +1 -0
- package/dist/chunks/popover.types.BFFy1ChU.js +6 -0
- package/dist/chunks/{popover.types.Bp97CGc4.js.map → popover.types.BFFy1ChU.js.map} +1 -1
- package/dist/chunks/{popper-container.5cq-eu41.js → popper-container.Uod3yjsR.js} +2 -2
- package/dist/chunks/{popper-container.5cq-eu41.js.map → popper-container.Uod3yjsR.js.map} +1 -1
- package/dist/chunks/{promo-banner.ChT2zKkO.js → promo-banner.B-TLTLEd.js} +3 -3
- package/dist/chunks/promo-banner.B-TLTLEd.js.map +1 -0
- package/dist/chunks/radio-group.DWNqrkZ3.js +277 -0
- package/dist/chunks/radio-group.DWNqrkZ3.js.map +1 -0
- package/dist/chunks/{radio-input.odN9FOyr.js → radio-input.CBNE-AkM.js} +13 -14
- package/dist/chunks/radio-input.CBNE-AkM.js.map +1 -0
- package/dist/chunks/{rich-text-editor.D770fUpS.js → rich-text-editor.BK9AivIm.js} +6 -6
- package/dist/chunks/{rich-text-editor.D770fUpS.js.map → rich-text-editor.BK9AivIm.js.map} +1 -1
- package/dist/chunks/{search-bar.rZ_38y4j.js → search-bar.BD_R-vgA.js} +4 -4
- package/dist/chunks/{search-bar.rZ_38y4j.js.map → search-bar.BD_R-vgA.js.map} +1 -1
- package/dist/chunks/{secondary-nav.BBE8HyDR.js → secondary-nav.Du2PL7Ok.js} +5 -5
- package/dist/chunks/secondary-nav.Du2PL7Ok.js.map +1 -0
- package/dist/chunks/{segmented-control.D0SoqGlC.js → segmented-control.BCHGDSrf.js} +47 -45
- package/dist/chunks/segmented-control.BCHGDSrf.js.map +1 -0
- package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
- package/dist/chunks/{selection-card-group.KK9ZPqiU.js → selection-card-group._RgLiMyQ.js} +5 -5
- package/dist/chunks/selection-card-group._RgLiMyQ.js.map +1 -0
- package/dist/chunks/{sidepanel.CyPW8jxA.js → sidepanel.CS9CfAWZ.js} +19 -19
- package/dist/chunks/{sidepanel.CyPW8jxA.js.map → sidepanel.CS9CfAWZ.js.map} +1 -1
- package/dist/chunks/{step.Ci-e1V9E.js → step.CoSuGK16.js} +4 -4
- package/dist/chunks/step.CoSuGK16.js.map +1 -0
- package/dist/chunks/{structured-list-item.CSkcduKn.js → structured-list-item.BTPh7SPj.js} +6 -6
- package/dist/chunks/{structured-list-item.CSkcduKn.js.map → structured-list-item.BTPh7SPj.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.C-gcwqwB.js → summary-grid.types.ByQ4u19J.js} +6 -6
- package/dist/chunks/{summary-grid.types.C-gcwqwB.js.map → summary-grid.types.ByQ4u19J.js.map} +1 -1
- package/dist/chunks/{tab.8bEkiAkk.js → tab.CD5Eu6ql.js} +3 -3
- package/dist/chunks/tab.CD5Eu6ql.js.map +1 -0
- package/dist/chunks/{tag.BFYNxO6t.js → tag.CEmpyuYX.js} +2 -2
- package/dist/chunks/{tag.BFYNxO6t.js.map → tag.CEmpyuYX.js.map} +1 -1
- package/dist/chunks/textarea.C1jkfowf.js +246 -0
- package/dist/chunks/textarea.C1jkfowf.js.map +1 -0
- package/dist/chunks/{timeline-item.BiivSMPD.js → timeline-item.C8PA_w7m.js} +9 -9
- package/dist/chunks/timeline-item.C8PA_w7m.js.map +1 -0
- package/dist/chunks/{toast.DIhABAW8.js → toast.6oJx7SNq.js} +3 -3
- package/dist/chunks/{toast.DIhABAW8.js.map → toast.6oJx7SNq.js.map} +1 -1
- package/dist/chunks/toggle.Dd_NA8eH.js +143 -0
- package/dist/chunks/toggle.Dd_NA8eH.js.map +1 -0
- package/dist/chunks/tooltip.Dp9_ESm_.js +202 -0
- package/dist/chunks/tooltip.Dp9_ESm_.js.map +1 -0
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BDCDB169.js → tutorial.vue_vue_type_script_setup_true_lang.KvlJ_dl9.js} +6 -6
- package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.KvlJ_dl9.js.map +1 -0
- package/dist/chunks/{use-cached-selected-values.CBOWMI4O.js → use-cached-selected-values.C32tjNKy.js} +114 -114
- package/dist/chunks/use-cached-selected-values.C32tjNKy.js.map +1 -0
- package/dist/chunks/{use-country-items.D_kamcYy.js → use-country-items.Dzbl2UsO.js} +7 -7
- package/dist/chunks/use-country-items.Dzbl2UsO.js.map +1 -0
- package/dist/chunks/use-country-phon-code.Bui3zD6W.js.map +1 -1
- package/dist/chunks/use-default-slot-validator.O02rzsob.js.map +1 -1
- package/dist/chunks/use-has-slot.B7eQSabc.js.map +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +5 -4
- package/dist/date-range-picker.js +5 -4
- package/dist/date.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +5 -4
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +405 -329
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +12 -12
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +2 -2
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +2 -2
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +25 -15
- package/dist/styles/bento-light.css +9 -3
- package/dist/styles/bento.css +9 -3
- package/dist/styles/legacy.css +9 -3
- package/dist/styles/styleguide.css +9 -3
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +14 -12
- package/dist/chunks/avatar.Dq59yj6m.js.map +0 -1
- package/dist/chunks/base-modal.Djw4pVal.js.map +0 -1
- package/dist/chunks/button-actions.D1eBtYgZ.js.map +0 -1
- package/dist/chunks/button.C-MAa6ut.js.map +0 -1
- package/dist/chunks/calendar.B1a_mV-Q.js.map +0 -1
- package/dist/chunks/card.B9lWURmF.js.map +0 -1
- package/dist/chunks/country.RVvsGwuV.js +0 -99
- package/dist/chunks/country.RVvsGwuV.js.map +0 -1
- package/dist/chunks/currency.CN4UnCx8.js.map +0 -1
- package/dist/chunks/data-grid._xo6LEB-.js +0 -4010
- package/dist/chunks/data-grid._xo6LEB-.js.map +0 -1
- package/dist/chunks/date-input.BqBdAO1E.js.map +0 -1
- package/dist/chunks/date-picker.Bkz4GmyC.js +0 -319
- package/dist/chunks/date-picker.Bkz4GmyC.js.map +0 -1
- package/dist/chunks/date-range-picker.9Zlg9xnH.js +0 -1171
- package/dist/chunks/date-range-picker.9Zlg9xnH.js.map +0 -1
- package/dist/chunks/dialog-page.1ZVnUqpT.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.CGsOngY1.js.map +0 -1
- package/dist/chunks/dropdown-tag.hIiGmmBD.js.map +0 -1
- package/dist/chunks/dropdown.GyDAswAO.js.map +0 -1
- package/dist/chunks/file-uploader.DELe6_NM.js.map +0 -1
- package/dist/chunks/filter-bar.BLhRZzJa.js +0 -3005
- package/dist/chunks/filter-bar.BLhRZzJa.js.map +0 -1
- package/dist/chunks/form-layout-title.DdRqnXXi.js.map +0 -1
- package/dist/chunks/header-with-views.afPw_Czi.js.map +0 -1
- package/dist/chunks/i18n.B6g5VX0q.js +0 -3131
- package/dist/chunks/i18n.B6g5VX0q.js.map +0 -1
- package/dist/chunks/input-field-password.JZkGOiMd.js.map +0 -1
- package/dist/chunks/input-field.2S8zBviE.js.map +0 -1
- package/dist/chunks/inspector.C-yVhM15.js.map +0 -1
- package/dist/chunks/listbox-option-tag.CtJUykfB.js.map +0 -1
- package/dist/chunks/loading-indicator.VHi5tbZa.js +0 -44
- package/dist/chunks/loading-indicator.VHi5tbZa.js.map +0 -1
- package/dist/chunks/pagination.NDwXq6fh.js.map +0 -1
- package/dist/chunks/popover.types.Bp97CGc4.js +0 -6
- package/dist/chunks/promo-banner.ChT2zKkO.js.map +0 -1
- package/dist/chunks/radio-group.BNiif4On.js +0 -329
- package/dist/chunks/radio-group.BNiif4On.js.map +0 -1
- package/dist/chunks/radio-input.odN9FOyr.js.map +0 -1
- package/dist/chunks/secondary-nav.BBE8HyDR.js.map +0 -1
- package/dist/chunks/segmented-control.D0SoqGlC.js.map +0 -1
- package/dist/chunks/selection-card-group.KK9ZPqiU.js.map +0 -1
- package/dist/chunks/step.Ci-e1V9E.js.map +0 -1
- package/dist/chunks/tab.8bEkiAkk.js.map +0 -1
- package/dist/chunks/textarea.C7RmLKEx.js +0 -295
- package/dist/chunks/textarea.C7RmLKEx.js.map +0 -1
- package/dist/chunks/timeline-item.BiivSMPD.js.map +0 -1
- package/dist/chunks/toggle.C8k7NQ7y.js +0 -161
- package/dist/chunks/toggle.C8k7NQ7y.js.map +0 -1
- package/dist/chunks/tooltip.CEHc6lzU.js +0 -211
- package/dist/chunks/tooltip.CEHc6lzU.js.map +0 -1
- package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.BDCDB169.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.CBOWMI4O.js.map +0 -1
- package/dist/chunks/use-country-items.D_kamcYy.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as V, ref as j, computed as r, createElementBlock as g, openBlock as n, unref as s, normalizeClass as z, createElementVNode as l, createVNode as y, renderSlot as $, withCtx as o, createTextVNode as d, toDisplayString as p, createCommentVNode as R, createBlock as c, Fragment as G, renderList as H, createSlots as U, resolveDynamicComponent as B } from "vue";
|
|
2
2
|
import { b as Z } from "./index.E60QniEu.js";
|
|
3
|
-
import { B as k } from "./button.
|
|
3
|
+
import { B as k } from "./button.DhcxX2GJ.js";
|
|
4
4
|
import { B as f, _ as w, a as F } from "./image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js";
|
|
5
5
|
import { B as Y } from "./typography.yBEME_Gu.js";
|
|
6
|
-
import { u as J } from "./
|
|
6
|
+
import { u as J } from "./index.pdBj0KQU.js";
|
|
7
7
|
import { g as P } from "./generate-uid.NJ8tVoha.js";
|
|
8
8
|
import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
9
9
|
import "../assets/promo-banner.css";
|
|
@@ -123,4 +123,4 @@ export {
|
|
|
123
123
|
m as a,
|
|
124
124
|
ce as p
|
|
125
125
|
};
|
|
126
|
-
//# sourceMappingURL=promo-banner.
|
|
126
|
+
//# sourceMappingURL=promo-banner.B-TLTLEd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promo-banner.B-TLTLEd.js","sources":["../../../vue2/src/components/promo-banner/promo-banner.types.ts","../../../vue2/src/components/promo-banner/promo-banner.vue"],"sourcesContent":["import { type BentoButtonActionObject } from '@/components/button';\nimport { type BentoButtonVariant } from '../button';\nimport { type BentoImageAspectRatio, type BentoImageProps } from '../image';\n\nexport interface BentoPromoBannerProps {\n /**\n * List of actions that will be used to render the buttons.\n *\n * Each object in the list should have a `title`, an `event` and a `variant`.\n *\n * `title`: Button's text.\n * `event`: Event triggered when clicking the Button.\n * `variant`: Button's style.\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * variant: 'primary'\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * variant: 'secondary'\n * }]\n * ```\n */\n actions?: Array<BentoPromoBannerAction>;\n\n /**\n * Defines the color of banner's background\n */\n color?: `${BentoPromoBannerColor}`;\n\n /**\n * Defines whether the banner has a `Dismiss` button\n */\n isDismissible?: boolean;\n\n /**\n * Defines whether the banner has a `Dismiss` button\n */\n dismissButtonText?: string;\n\n /**\n * Defines the image used in the banner.\n *\n * The promotional banner adapts to different container sizes based on the image's `aspect-ratio`.\n * Only the following `aspect-ratio` values are supported: `16:9`, `2:1`, and `1:1`.\n *\n * In Storybook, to verify the image display, update `image.src` and `image.aspectRatio` as follows:\n * - `./1-1.png` with an aspect ratio of `1:1`\n * - `./2-1.png` with an aspect ratio of `2:1`\n * - `./16-9.png` with an aspect ratio of `16:9`\n */\n image: BentoPromoBannerImage;\n\n /**\n * Defines style of the banner.\n *\n * The horizontal layout is responsive to the container size and\n * changes depending on the image aspect ratio.\n *\n * The vertical layout remains the same regardless of container size.\n */\n layout?: `${BentoPromoBannerLayout}`;\n\n /**\n * Defines the title text to be shown on the banner\n */\n title: string;\n}\n\nexport type BentoPromoBannerImageAspectRatio = `${\n | BentoImageAspectRatio.P16_9\n | BentoImageAspectRatio.P2_1\n | BentoImageAspectRatio.P1_1}`;\n\nexport type BentoPromoBannerButtonVariant = `${BentoButtonVariant.PRIMARY | BentoButtonVariant.SECONDARY}`;\n\n/**\n * @deprecated for usage with generic. Remove the generic and use it as `BentoPromoBannerAction`.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type BentoPromoBannerAction<IconType = object> = BentoButtonActionObject & {\n variant: BentoPromoBannerButtonVariant;\n};\n\nexport type BentoPromoBannerImage = {\n src: BentoImageProps['src'];\n alt?: BentoImageProps['alt'];\n aspectRatio: BentoPromoBannerImageAspectRatio;\n};\n\nexport enum BentoPromoBannerColor {\n BLUE = 'blue',\n GREY = 'grey',\n GREEN = 'green',\n}\n\nexport enum BentoPromoBannerLayout {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n","<template>\n <section\n ref=\"promoBannerRef\"\n class=\"b-promo-banner\"\n :class=\"bannerConditionalClass\"\n :aria-labelledby=\"promoBannerTitleId\"\n >\n <div class=\"b-promo-banner__content\">\n <div class=\"b-promo-banner__content-header\">\n <bento-typography :id=\"promoBannerTitleId\" variant=\"title\" large>\n {{ title }}\n </bento-typography>\n\n <slot name=\"description\" />\n </div>\n\n <div class=\"b-promo-banner__content-actions\">\n <template v-if=\"actions\">\n <bento-button\n v-for=\"(button, index) in actions\"\n :key=\"index\"\n :variant=\"button.variant\"\n :critical=\"button.critical\"\n :disabled=\"button.disabled\"\n :inverse=\"button.inverse\"\n :icon-only=\"button.iconOnly\"\n :link=\"button.link\"\n @click=\"button.event\"\n >\n <template v-if=\"button.icon || button.iconLeft\" #iconLeft>\n <component :is=\"button.icon || button.iconLeft\" :svg-title=\"button.title\"></component>\n </template>\n\n <template v-if=\"!isIconOnly(button)\" #default>\n {{ button.title }}\n </template>\n\n <template v-if=\"button.iconRight\" #iconRight>\n <component :is=\"button.iconRight\" :svg-title=\"button.title\"></component>\n </template>\n </bento-button>\n </template>\n\n <bento-button v-if=\"isDismissible\" variant=\"secondary\" @click=\"emit('dismiss')\">\n {{ computedDismissButtonText }}\n </bento-button>\n </div>\n </div>\n\n <div class=\"b-promo-banner__image\">\n <bento-image\n class=\"b-promo-banner__image-item\"\n :src=\"image.src\"\n :alt=\"image.alt ?? ''\"\n :aspect-ratio=\"image.aspectRatio\"\n :object-fit=\"BentoImageObjectFit.CONTAIN\"\n ></bento-image>\n </div>\n </section>\n</template>\n\n<script setup lang=\"ts\">\n import { useElementSize } from '@vueuse/core';\n import { computed, ref } from 'vue';\n\n // Components\n import { BentoButton, type BentoButtonActionObject } from '@/components/button';\n import { BentoImage, BentoImageAspectRatio, BentoImageObjectFit } from '@/components/image';\n import { BentoTypography } from '@/components/typography';\n import { BentoPromoBannerColor, BentoPromoBannerLayout, type BentoPromoBannerProps } from './promo-banner.types';\n\n // Utils\n import { useI18n } from '@/utils/ts/i18n';\n\n import { generateUid } from '@/core/utils/ts';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = withDefaults(defineProps<BentoPromoBannerProps>(), {\n actions: null,\n color: BentoPromoBannerColor.GREY,\n isDismissible: true,\n dismissButtonText: null,\n layout: BentoPromoBannerLayout.HORIZONTAL,\n });\n\n const emit = defineEmits<{\n /**\n * Emits a dismiss event when dismiss button on the promotional banner is pressed\n */\n (e: 'dismiss');\n }>();\n\n const promoBannerRef = ref(null);\n const promoBannerSize = useElementSize(promoBannerRef);\n const promoBannerTitleId = generateUid('promoBannerTitle');\n\n const horizontalLayoutBreakpoint = computed(() => {\n if (props.image.aspectRatio === BentoImageAspectRatio.P16_9) {\n return 800;\n } else if (props.image.aspectRatio === BentoImageAspectRatio.P2_1) {\n return 850;\n } else if (props.image.aspectRatio === BentoImageAspectRatio.P1_1) {\n return 623;\n }\n\n return 0;\n });\n\n const bannerLayoutClass = computed(() => {\n // only horizontal layout is responsive and, by design, follows the container size\n if (\n props.layout === BentoPromoBannerLayout.HORIZONTAL &&\n promoBannerSize.width.value <= horizontalLayoutBreakpoint.value\n ) {\n return BentoPromoBannerLayout.VERTICAL;\n }\n\n return props.layout;\n });\n\n const bannerConditionalClass = computed(() =>\n [`b-promo-banner--${bannerLayoutClass.value}`, `b-promo-banner--${props.color}`].join(' ')\n );\n\n const isIconOnly = (button: BentoButtonActionObject) =>\n button.iconOnly && (button.iconLeft || button.iconRight || button.icon);\n\n const computedDismissButtonText = computed(() => props.dismissButtonText || t('dismiss'));\n</script>\n\n<script lang=\"ts\">\n /**\n * Promotional Banner highlights important information, announcements, or promotions.\n *\n * @example\n * import { BentoPromoBanner } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoPromoBanner },\n * template: `\n * <bento-promo-banner\n * title=\"Title\"\n * description=\"Brief description explaining and giving more information about the title\"\n * :image=\"{ src: '16-1.png', aspectRatio: '16:9' }\"\n * :actions=\"[{ title: 'Primary', event: () => {} }]\"\n * >\n * </bento-promo-banner>\n * `\n * };\n */\n export default {\n i18n: { messages },\n name: 'bento-promo-banner',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./promo-banner.scss\" />\n"],"names":["BentoPromoBannerColor","BentoPromoBannerColor2","BentoPromoBannerLayout","BentoPromoBannerLayout2","__default__","messages","t","useI18n","props","__props","emit","__emit","promoBannerRef","ref","promoBannerSize","useElementSize","promoBannerTitleId","generateUid","horizontalLayoutBreakpoint","computed","BentoImageAspectRatio","bannerLayoutClass","bannerConditionalClass","isIconOnly","button","computedDismissButtonText"],"mappings":";;;;;;;;;AA6FY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,OAAA,QACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA,GAMAE,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;iNCuDRE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;;AA9EA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,IAAAC,GAQAC,IAAAC,GAOAC,IAAAC,EAAA,IAAA,GACAC,IAAAC,EAAAH,CAAA,GACAI,IAAAC,EAAA,kBAAA,GAEAC,IAAAC,EAAA,MACIX,EAAA,MAAA,gBAAAY,EAAA,QACI,MAAOZ,EAAA,MAAA,gBAAAY,EAAA,OAEP,MAAOZ,EAAA,MAAA,gBAAAY,EAAA,OAEP,MAGJ,CAAO,GAGXC,IAAAF,EAAA,MAEIX,EAAA,WAAAN,EAAA,cAAAY,EAAA,MAAA,SAAAI,EAAA,QAIIhB,EAAA,WAGJM,EAAA,MAAa,GAGjBc,IAAAH;AAAA,MAA+B,MAAA,CAAA,mBAAAE,EAAA,KAAA,IAAA,mBAAAb,EAAA,KAAA,EAAA,EAAA,KAAA,GAAA;AAAA,IAC8D,GAG7Fe,IAAA,CAAAC,MAAAA,EAAA,aAAAA,EAAA,YAAAA,EAAA,aAAAA,EAAA,OAGAC,IAAAN,EAAA,MAAAX,EAAA,qBAAAF,EAAA,SAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { defineComponent as q, useSlots as D, toRefs as G, ref as H, computed as u, createElementBlock as h, openBlock as l, normalizeClass as U, createVNode as V, createElementVNode as P, unref as e, createCommentVNode as p, createBlock as g, withCtx as n, renderSlot as B, mergeProps as Z, toRef as M, watch as j, createSlots as $, Fragment as Y, renderList as J, createTextVNode as O, toDisplayString as w } from "vue";
|
|
2
|
+
import { u as K } from "./use-form-layout-loading.D3lALhtC.js";
|
|
3
|
+
import { u as z } from "./use-has-slot.B7eQSabc.js";
|
|
4
|
+
import { g as L } from "./generate-uid.NJ8tVoha.js";
|
|
5
|
+
import { B as C, d as Q } from "./typography.yBEME_Gu.js";
|
|
6
|
+
import { C as W } from "./controls-group.cbGiHr7n.js";
|
|
7
|
+
import { B as X } from "./tag.CEmpyuYX.js";
|
|
8
|
+
import { u as x } from "./aria-label.CaUURpnB.js";
|
|
9
|
+
import { u as ee } from "./use-default-slot-validator.O02rzsob.js";
|
|
10
|
+
import { g as oe } from "./get-slot-text.DQlZEsId.js";
|
|
11
|
+
import { R as A, a as ae } from "./radio-input.CBNE-AkM.js";
|
|
12
|
+
import { _ as F } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
13
|
+
import { E as te } from "./field-label.C97CrBI_.js";
|
|
14
|
+
import "../assets/radio-group.css";
|
|
15
|
+
const re = ["for"], le = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "b-radio-button__primary-label"
|
|
18
|
+
}, de = {
|
|
19
|
+
name: "bento-radio-button",
|
|
20
|
+
model: { prop: "modelValue" }
|
|
21
|
+
}, se = /* @__PURE__ */ q({
|
|
22
|
+
...de,
|
|
23
|
+
props: {
|
|
24
|
+
/**
|
|
25
|
+
* Disable the radio button (optional)
|
|
26
|
+
*/
|
|
27
|
+
disabled: { type: Boolean, default: !1 },
|
|
28
|
+
/**
|
|
29
|
+
* Shows bento-radio-button in error state (optional)
|
|
30
|
+
*/
|
|
31
|
+
hasError: { type: Boolean, default: !1 },
|
|
32
|
+
/**
|
|
33
|
+
* This property should not be used directly.
|
|
34
|
+
* It will be used by v-model directive on radio component.
|
|
35
|
+
*/
|
|
36
|
+
modelValue: {
|
|
37
|
+
type: [String, Number],
|
|
38
|
+
default: null
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* Sets the radio button to readonly (optional)
|
|
42
|
+
*/
|
|
43
|
+
readonly: { type: Boolean, default: !1 },
|
|
44
|
+
/**
|
|
45
|
+
* Sets the properties of the BentoTag component that is placed next to the label.
|
|
46
|
+
* {@see BentoTag}
|
|
47
|
+
*/
|
|
48
|
+
tag: { type: Object, default: void 0 },
|
|
49
|
+
/**
|
|
50
|
+
* Indicates the value of the input that will be returned when it's checked
|
|
51
|
+
*/
|
|
52
|
+
value: {
|
|
53
|
+
type: [String, Number],
|
|
54
|
+
required: !0
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* Sets the name of the radio input.
|
|
58
|
+
* Used for differentiating radio groups or accessing input via form submission.
|
|
59
|
+
*/
|
|
60
|
+
name: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: null
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
emits: ["input", "update:model-value"],
|
|
66
|
+
setup(a, { expose: k, emit: I }) {
|
|
67
|
+
const c = D(), s = z(c), t = a, f = I, { value: r } = G(t), _ = L("bento-radio-button"), b = L("description"), i = H(null);
|
|
68
|
+
ee("bento-radio-button", c.default, c.description);
|
|
69
|
+
const E = u(() => ({
|
|
70
|
+
[`b-radio-button--${A.DISABLED}`]: t.disabled,
|
|
71
|
+
[`b-radio-button--${A.READONLY}`]: t.readonly
|
|
72
|
+
})), S = x({
|
|
73
|
+
ariaLabel: oe(c)("default"),
|
|
74
|
+
label: r.value
|
|
75
|
+
}), m = u(() => t.value === t.modelValue), R = () => {
|
|
76
|
+
!t.disabled && !t.readonly && (f("update:model-value", t.value), f("input", t.value));
|
|
77
|
+
};
|
|
78
|
+
return k({
|
|
79
|
+
focus: () => {
|
|
80
|
+
i.value.focus();
|
|
81
|
+
}
|
|
82
|
+
}), (y, T) => (l(), h("div", {
|
|
83
|
+
class: U(["b-radio-button", E.value]),
|
|
84
|
+
"data-testid": "radio-button-container"
|
|
85
|
+
}, [
|
|
86
|
+
V(e(ae), {
|
|
87
|
+
id: e(_),
|
|
88
|
+
ref_key: "radioInputRef",
|
|
89
|
+
ref: i,
|
|
90
|
+
"aria-label": e(S),
|
|
91
|
+
"aria-describedby": e(s)("description") ? e(b) : "",
|
|
92
|
+
checked: m.value,
|
|
93
|
+
disabled: a.disabled,
|
|
94
|
+
readonly: a.readonly,
|
|
95
|
+
"has-error": a.hasError,
|
|
96
|
+
value: e(r),
|
|
97
|
+
"model-value": a.modelValue,
|
|
98
|
+
name: a.name,
|
|
99
|
+
"onUpdate:modelValue": R
|
|
100
|
+
}, null, 8, ["id", "aria-label", "aria-describedby", "checked", "disabled", "readonly", "has-error", "value", "model-value", "name"]),
|
|
101
|
+
P("div", null, [
|
|
102
|
+
e(s)("default") ? (l(), h("label", {
|
|
103
|
+
key: 0,
|
|
104
|
+
for: e(_),
|
|
105
|
+
class: "b-radio-button__label-container"
|
|
106
|
+
}, [
|
|
107
|
+
e(s)("default") ? (l(), h("span", le, [
|
|
108
|
+
V(e(C), {
|
|
109
|
+
class: "b-radio-button__label",
|
|
110
|
+
el: "span",
|
|
111
|
+
variant: "body"
|
|
112
|
+
}, {
|
|
113
|
+
default: n(() => [
|
|
114
|
+
B(y.$slots, "default", {}, void 0, !0)
|
|
115
|
+
]),
|
|
116
|
+
_: 3
|
|
117
|
+
}),
|
|
118
|
+
a.tag ? (l(), g(e(X), Z({
|
|
119
|
+
key: 0,
|
|
120
|
+
class: "b-radio-button__label-tag"
|
|
121
|
+
}, a.tag), null, 16)) : p("", !0)
|
|
122
|
+
])) : p("", !0),
|
|
123
|
+
e(s)("default") && e(s)("description") ? (l(), g(e(C), {
|
|
124
|
+
key: 1,
|
|
125
|
+
id: e(b),
|
|
126
|
+
class: "b-radio-button__description",
|
|
127
|
+
el: "span",
|
|
128
|
+
variant: "body"
|
|
129
|
+
}, {
|
|
130
|
+
default: n(() => [
|
|
131
|
+
B(y.$slots, "description", {}, void 0, !0)
|
|
132
|
+
]),
|
|
133
|
+
_: 3
|
|
134
|
+
}, 8, ["id"])) : p("", !0)
|
|
135
|
+
], 8, re)) : p("", !0),
|
|
136
|
+
e(s)("content") && m.value ? (l(), g(e(C), {
|
|
137
|
+
key: 1,
|
|
138
|
+
class: "b-radio-button__content",
|
|
139
|
+
el: "div"
|
|
140
|
+
}, {
|
|
141
|
+
default: n(() => [
|
|
142
|
+
B(y.$slots, "content", {}, void 0, !0)
|
|
143
|
+
]),
|
|
144
|
+
_: 3
|
|
145
|
+
})) : p("", !0)
|
|
146
|
+
])
|
|
147
|
+
], 2));
|
|
148
|
+
}
|
|
149
|
+
}), ne = /* @__PURE__ */ F(se, [["__scopeId", "data-v-db65f460"]]);
|
|
150
|
+
var N = /* @__PURE__ */ ((a) => (a.HORIZONTAL = "horizontal", a.VERTICAL = "vertical", a))(N || {});
|
|
151
|
+
const ie = { class: "b-radio-group" }, ue = {
|
|
152
|
+
name: "bento-radio-group",
|
|
153
|
+
model: { prop: "modelValue" }
|
|
154
|
+
}, ce = /* @__PURE__ */ q({
|
|
155
|
+
...ue,
|
|
156
|
+
props: {
|
|
157
|
+
formId: { default: null },
|
|
158
|
+
hasError: { type: Boolean, default: !1 },
|
|
159
|
+
hideLabel: { type: [Boolean, null], default: null },
|
|
160
|
+
items: {},
|
|
161
|
+
label: {},
|
|
162
|
+
modelValue: { default: null },
|
|
163
|
+
variant: { default: N.VERTICAL },
|
|
164
|
+
description: { default: null },
|
|
165
|
+
disabled: { type: Boolean, default: !1 },
|
|
166
|
+
errorMessage: { default: null },
|
|
167
|
+
optional: { type: Boolean, default: !1 },
|
|
168
|
+
placeholder: {},
|
|
169
|
+
readonly: { type: Boolean, default: !1 },
|
|
170
|
+
required: { type: Boolean, default: !1 },
|
|
171
|
+
tooltipText: { default: null }
|
|
172
|
+
},
|
|
173
|
+
emits: ["input", "update:model-value"],
|
|
174
|
+
setup(a, { expose: k, emit: I }) {
|
|
175
|
+
const c = "bento-radio-group", s = D(), t = z(s), f = I, r = a, _ = M(r, "modelValue"), b = L("error"), { isReadOnly: i } = K(M(r, "readonly")), E = H(null), S = u(
|
|
176
|
+
() => !r.disabled && !i.value && (!!r.errorMessage || r.hasError)
|
|
177
|
+
), m = u(() => !r.disabled && !i.value && !!r.errorMessage), R = u(() => ({
|
|
178
|
+
"b-radio-group__buttons--horizontal": r.variant === N.HORIZONTAL
|
|
179
|
+
})), v = u(() => r.variant === "vertical"), y = u(() => t("content") && !(v != null && v.value)), T = (o) => {
|
|
180
|
+
f("update:model-value", o), f("input", o);
|
|
181
|
+
};
|
|
182
|
+
return r.hasError && Q(
|
|
183
|
+
'BentoRadioGroup "hasError" property',
|
|
184
|
+
`Use the BentoRadioGroup "errorMessage" property instead to indicate that there is a modifier error.
|
|
185
|
+
Having the field as "undefined" will hide/remove the error.
|
|
186
|
+
<bento-radio-group errorMessage="Error message text" />`,
|
|
187
|
+
"2.0.0"
|
|
188
|
+
), j(
|
|
189
|
+
y,
|
|
190
|
+
(o) => {
|
|
191
|
+
if (o)
|
|
192
|
+
throw new Error("The content slot is only available for the vertical radio group layout");
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
immediate: !0
|
|
196
|
+
}
|
|
197
|
+
), k({
|
|
198
|
+
focus: () => {
|
|
199
|
+
E.value[0].focus();
|
|
200
|
+
}
|
|
201
|
+
}), (o, fe) => (l(), h("div", ie, [
|
|
202
|
+
V(e(W), {
|
|
203
|
+
class: U(["b-radio-group__buttons", R.value]),
|
|
204
|
+
"aria-describedby": m.value ? e(b) : "",
|
|
205
|
+
"component-name": c,
|
|
206
|
+
description: o.description,
|
|
207
|
+
disabled: o.disabled,
|
|
208
|
+
form: o.formId,
|
|
209
|
+
label: o.label,
|
|
210
|
+
optional: o.optional,
|
|
211
|
+
required: o.required,
|
|
212
|
+
"hide-label": o.hideLabel,
|
|
213
|
+
"tooltip-text": o.tooltipText,
|
|
214
|
+
role: "radiogroup",
|
|
215
|
+
"aria-readonly": e(i)
|
|
216
|
+
}, $({
|
|
217
|
+
default: n(() => [
|
|
218
|
+
(l(!0), h(Y, null, J(o.items, (d) => (l(), g(e(ne), {
|
|
219
|
+
ref_for: !0,
|
|
220
|
+
ref_key: "radioButton",
|
|
221
|
+
ref: E,
|
|
222
|
+
key: d.value,
|
|
223
|
+
"model-value": _.value,
|
|
224
|
+
value: d.value,
|
|
225
|
+
disabled: o.disabled || d.disabled,
|
|
226
|
+
readonly: e(i) || d.readonly,
|
|
227
|
+
"has-error": S.value || d.hasError,
|
|
228
|
+
tag: d.tag,
|
|
229
|
+
name: o.formId || o.label,
|
|
230
|
+
"onUpdate:modelValue": T
|
|
231
|
+
}, $({
|
|
232
|
+
default: n(() => [
|
|
233
|
+
O(w(d.label), 1)
|
|
234
|
+
]),
|
|
235
|
+
_: 2
|
|
236
|
+
}, [
|
|
237
|
+
d.description ? {
|
|
238
|
+
name: "description",
|
|
239
|
+
fn: n(() => [
|
|
240
|
+
O(w(d.description), 1)
|
|
241
|
+
]),
|
|
242
|
+
key: "0"
|
|
243
|
+
} : void 0,
|
|
244
|
+
e(t)("content") && v.value ? {
|
|
245
|
+
name: "content",
|
|
246
|
+
fn: n(() => [
|
|
247
|
+
B(o.$slots, "content", {}, void 0, !0)
|
|
248
|
+
]),
|
|
249
|
+
key: "1"
|
|
250
|
+
} : void 0
|
|
251
|
+
]), 1032, ["model-value", "value", "disabled", "readonly", "has-error", "tag", "name"]))), 128))
|
|
252
|
+
]),
|
|
253
|
+
_: 2
|
|
254
|
+
}, [
|
|
255
|
+
e(t)("description") ? {
|
|
256
|
+
name: "description",
|
|
257
|
+
fn: n(() => [
|
|
258
|
+
B(o.$slots, "description", {}, void 0, !0)
|
|
259
|
+
]),
|
|
260
|
+
key: "0"
|
|
261
|
+
} : void 0
|
|
262
|
+
]), 1032, ["aria-describedby", "class", "description", "disabled", "form", "label", "optional", "required", "hide-label", "tooltip-text", "aria-readonly"]),
|
|
263
|
+
m.value ? (l(), g(e(te), {
|
|
264
|
+
key: 0,
|
|
265
|
+
id: e(b),
|
|
266
|
+
"error-message": o.errorMessage,
|
|
267
|
+
class: "b-radio-group__error-message"
|
|
268
|
+
}, null, 8, ["id", "error-message"])) : p("", !0)
|
|
269
|
+
]));
|
|
270
|
+
}
|
|
271
|
+
}), Ce = /* @__PURE__ */ F(ce, [["__scopeId", "data-v-1b005c71"]]);
|
|
272
|
+
export {
|
|
273
|
+
Ce as B,
|
|
274
|
+
N as a,
|
|
275
|
+
ne as b
|
|
276
|
+
};
|
|
277
|
+
//# sourceMappingURL=radio-group.DWNqrkZ3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.DWNqrkZ3.js","sources":["../../../vue2/src/components/radio-group/components/radio-button/radio-button.vue","../../../vue2/src/components/radio-group/radio-group.types.ts","../../../vue2/src/components/radio-group/radio-group.vue"],"sourcesContent":["<template>\n <div class=\"b-radio-button\" data-testid=\"radio-button-container\" :class=\"conditionalClassContainer\">\n <radio-input\n :id=\"radioButtonId\"\n ref=\"radioInputRef\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"hasSlot('description') ? descriptionId : ''\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :has-error=\"hasError\"\n :value=\"value\"\n :model-value=\"modelValue\"\n :name=\"name\"\n @update:model-value=\"onChange\"\n />\n <div>\n <label v-if=\"hasSlot('default')\" :for=\"radioButtonId\" class=\"b-radio-button__label-container\">\n <span v-if=\"hasSlot('default')\" class=\"b-radio-button__primary-label\">\n <bento-typography class=\"b-radio-button__label\" el=\"span\" variant=\"body\"><slot /></bento-typography>\n <bento-tag v-if=\"tag\" class=\"b-radio-button__label-tag\" v-bind=\"tag\" />\n </span>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-radio-button__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n </label>\n <bento-typography v-if=\"hasSlot('content') && isChecked\" class=\"b-radio-button__content\" el=\"div\">\n <slot name=\"content\"></slot>\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTag } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n import { RadioInput } from '../../../internal/radio-input';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { generateUid } from '@/core/utils/ts';\n import { computed, type ComputedRef, type PropType, ref, toRefs, useSlots } from 'vue';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { BentoRadioButtonStateClass, type BentoRadioButtonTag, type BentoRadioButtonValue } from './radio-button.types';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * Disable the radio button (optional)\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Shows bento-radio-button in error state (optional)\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 radio component.\n */\n modelValue: {\n type: [String, Number] as PropType<BentoRadioButtonValue>,\n default: null,\n },\n\n /**\n * Sets the radio button to readonly (optional)\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Sets the properties of the BentoTag component that is placed next to the label.\n * {@see BentoTag}\n */\n tag: { type: Object as PropType<BentoRadioButtonTag>, default: undefined },\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<BentoRadioButtonValue>,\n required: true,\n },\n\n /**\n * Sets the name of the radio input.\n * Used for differentiating radio groups or accessing input via form submission.\n */\n name: {\n type: String,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the radio button is clicked. Enables Vue2 \"v-model\"\n */\n (e: 'input', value: BentoRadioButtonValue);\n\n /**\n * Emitted when the radio button is clicked. Enables Vue3 \"v-model\"\n */\n (e: 'update:model-value', value: BentoRadioButtonValue);\n }>();\n\n const { value } = toRefs(props);\n const radioButtonId = generateUid('bento-radio-button');\n const descriptionId = generateUid('description');\n const radioInputRef = ref(null);\n\n useDefaultSlotValidator('bento-radio-button', slots.default, slots.description);\n\n const conditionalClassContainer = computed(() => ({\n [`b-radio-button--${BentoRadioButtonStateClass.DISABLED}`]: props.disabled,\n [`b-radio-button--${BentoRadioButtonStateClass.READONLY}`]: props.readonly,\n }));\n\n const ariaLabel = useAriaLabel({\n ariaLabel: getSlotText(slots)('default'),\n label: value.value as string,\n });\n\n const isChecked: ComputedRef<boolean> = computed(() => props.value === props.modelValue);\n\n const onChange = () => {\n if (!props.disabled && !props.readonly) {\n emit('update:model-value', props.value);\n emit('input', props.value);\n }\n };\n\n const focus = () => {\n radioInputRef.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Radio buttons are used when two or more options are mutually exclusive,\n * the user can only select a single option from a list of pre-defined options.\n * The label tag area is also clickable.\n * Only to be used internally.\n *\n * @example\n * import { BentoRadioButton } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoRadioButton },\n * template: `\n * <bento-radio-button\n * disabled\n * value=\"inputRadio\"\n * model-value.sync=\"modelValue\"\n * >\n * Label text\n * <template #description>Description text below label</template>\n * <template #content>Content shown when checked</template>\n * </bento-radio-button>\n * `,\n * setup() {\n * const modelValue = ref('anyValue')\n * const value = 'option-value'\n *\n * return {\n * modelValue,\n * value,\n * }\n * }\n * }\n */\n export default {\n name: 'bento-radio-button',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-button.scss\" />\n","import type { FormField } from '../../types';\nimport type { BentoRadioButtonTag, BentoRadioButtonValue } from './components/radio-button';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoRadioGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport type BentoRadioGroupValue = BentoRadioButtonValue;\n\nexport interface BentoRadioGroupItem {\n value: BentoRadioGroupValue;\n label: string;\n description?: string;\n disabled?: boolean;\n readonly?: boolean;\n hasError?: boolean;\n tag?: BentoRadioButtonTag;\n}\n\nexport type BentoRadioGroupItems = Array<BentoRadioGroupItem>;\n\nexport interface BentoRadioGroupProps extends FormField {\n /**\n * The form id the radio group is associated with. Defaults to null, as a radio group can also be used standalone.\n * @default null\n */\n formId?: string | null;\n\n /**\n * If set to true, renders all bento-radio-buttons in the group in an error state.\n * @deprecated Use \"errorMessage\" prop instead\n * @default false\n */\n hasError?: boolean;\n\n /**\n * Shows/hides the group label.\n * @default null\n */\n hideLabel?: boolean | null;\n\n /**\n * The radio group's items.\n * Required.\n */\n items: BentoRadioGroupItems;\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n * Required.\n */\n label: string;\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoRadioButtonItem's value.\n * Defaults to no value selected.\n * @default null\n */\n modelValue?: BentoRadioGroupValue | null;\n\n /**\n * The radio group's layout. It can be vertical or horizontal. Defaults to vertical.\n * @default BentoRadioGroupVariant.VERTICAL\n */\n variant?: BentoRadioGroupVariant | `${BentoRadioGroupVariant}`;\n}\n","<template>\n <div class=\"b-radio-group\">\n <controls-group\n class=\"b-radio-group__buttons\"\n :aria-describedby=\"shouldShowErrorMessage ? errorId : ''\"\n :component-name=\"COMPONENT_NAME\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :hide-label=\"hideLabel\"\n :tooltip-text=\"tooltipText\"\n role=\"radiogroup\"\n :aria-readonly=\"isReadOnly\"\n >\n <bento-radio-button\n v-for=\"item in items\"\n ref=\"radioButton\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :readonly=\"isReadOnly || item.readonly\"\n :has-error=\"shouldShowError || item.hasError\"\n :tag=\"item.tag\"\n :name=\"formId || label\"\n @update:model-value=\"onInput\"\n >\n <template #default>{{ item.label }}</template>\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"hasSlot('content') && isVertical\" #content>\n <slot name=\"content\"></slot>\n </template>\n </bento-radio-button>\n <template v-if=\"hasSlot('description')\" #description>\n <slot name=\"description\" />\n </template>\n </controls-group>\n <error-message\n v-if=\"shouldShowErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-radio-group__error-message\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRef, useSlots, watch } from 'vue';\n import { ControlsGroup, ErrorMessage } from '@/components/internal';\n import { BentoRadioButton } from './components/radio-button';\n import { useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n import { type BentoRadioGroupProps, type BentoRadioGroupValue, BentoRadioGroupVariant } from './radio-group.types';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n /**\n * The name of the component to be used in the Vue devtools and console warnings.\n */\n const COMPONENT_NAME = 'bento-radio-group';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits<{\n /**\n * Emitted when an option inside the group is selected. Enables Vue2 \"v-model\"\n */\n (e: 'input', value: BentoRadioGroupValue);\n\n /**\n * Emitted when an option inside the group is selected. Enables Vue3 \"v-model\"\n */\n (e: 'update:model-value', value: BentoRadioGroupValue);\n }>();\n\n const props = withDefaults(defineProps<BentoRadioGroupProps>(), {\n description: null,\n disabled: false,\n errorMessage: null,\n formId: null,\n hasError: false,\n hideLabel: null,\n modelValue: null,\n optional: false,\n readonly: false,\n required: false,\n tooltipText: null,\n variant: BentoRadioGroupVariant.VERTICAL,\n });\n\n const inputValue = toRef(props, 'modelValue');\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const radioButton = ref(null);\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !isReadOnly.value && !!props.errorMessage);\n\n const conditionalClasses = computed(() => ({\n 'b-radio-group__buttons--horizontal': props.variant === BentoRadioGroupVariant.HORIZONTAL,\n }));\n\n // Content slot logic\n const isVertical = computed(() => props.variant === 'vertical');\n const shouldShowSlotError = computed(() => hasSlot('content') && !isVertical?.value);\n\n const onInput = value => {\n emit('update:model-value', value);\n emit('input', value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoRadioGroup \"hasError\" property',\n `Use the BentoRadioGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-radio-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n watch(\n shouldShowSlotError,\n newVal => {\n if (newVal) {\n throw new Error('The content slot is only available for the vertical radio group layout');\n }\n },\n {\n immediate: true,\n }\n );\n\n const focus = () => {\n radioButton.value[0].focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * A radio group component should be used whenever it is necessary to use a set of radio buttons\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoRadioGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoRadioGroup },\n * template: `\n * <bento-radio-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your descriptive sub label' },\n * ]\"\n * variant=\"horizontal\"\n * />\n * `\n * };\n */\n export default {\n name: 'bento-radio-group',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-group.scss\" />\n"],"names":["__default__$1","slots","useSlots","hasSlot","useHasSlot","props","__props","emit","__emit","value","toRefs","radioButtonId","generateUid","descriptionId","radioInputRef","ref","useDefaultSlotValidator","conditionalClassContainer","computed","RadioInputStateClass","ariaLabel","useAriaLabel","getSlotText","isChecked","onChange","__expose","BentoRadioGroupVariant","BentoRadioGroupVariant2","__default__","COMPONENT_NAME","inputValue","toRef","errorId","isReadOnly","useFormLayoutFieldLoading","radioButton","shouldShowError","shouldShowErrorMessage","conditionalClasses","isVertical","shouldShowSlotError","onInput","deprecate","watch","newVal"],"mappings":";;;;;;;;;;;;;;;;;GAsLIA,KAAA;AAAA,EAAe,MAAA;AAAA,EACL,OAAA,EAAA,MAAA,aAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAvIA,UAAAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GACAI,IAAAC,GAiDAC,IAAAC,GAYA,EAAA,OAAAC,EAAA,IAAAC,EAAAL,CAAA,GACAM,IAAAC,EAAA,oBAAA,GACAC,IAAAD,EAAA,aAAA,GACAE,IAAAC,EAAA,IAAA;AAEA,IAAAC,GAAA,sBAAAf,EAAA,SAAAA,EAAA,WAAA;AAEA,UAAAgB,IAAAC,EAAA,OAAA;AAAA,MAAkD,CAAA,mBAAAC,EAAA,QAAA,EAAA,GAAAd,EAAA;AAAA,MACoB,CAAA,mBAAAc,EAAA,QAAA,EAAA,GAAAd,EAAA;AAAA,IACA,EAAA,GAGtEe,IAAAC,EAAA;AAAA,MAA+B,WAAAC,GAAArB,CAAA,EAAA,SAAA;AAAA,MACY,OAAAQ,EAAA;AAAA,IAC1B,CAAA,GAGjBc,IAAAL,EAAA,MAAAb,EAAA,UAAAA,EAAA,UAAA,GAEAmB,IAAA,MAAA;AACI,MAAA,CAAAnB,EAAA,YAAA,CAAAA,EAAA,aACIE,EAAA,sBAAAF,EAAA,KAAA,GACAE,EAAA,SAAAF,EAAA,KAAA;AAAA,IACJ;AAOJ,WAAAoB,EAAA;AAAA,MAAa,OAJb,MAAA;AACI,QAAAX,EAAA,MAAA,MAAA;AAAA,MAA0B;AAAA,IAI1B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1II,IAAAY,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;uCCoKRE,KAAA;AAAA,EAAe,MAAA;AAAA,EACL,OAAA,EAAA,MAAA,aAAA;AAEV;;;;;;;;;;;;;;;;;;;;;AA9GA,UAAAC,IAAA,qBAEA5B,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAM,IAAAC,GAYAH,IAAAC,GAeAwB,IAAAC,EAAA1B,GAAA,YAAA,GACA2B,IAAApB,EAAA,OAAA,GACA,EAAA,YAAAqB,EAAA,IAAAC,EAAAH,EAAA1B,GAAA,UAAA,CAAA,GACA8B,IAAApB,EAAA,IAAA,GAEAqB,IAAAlB;AAAA,MAAwB,MAAA,CAAAb,EAAA,YAAA,CAAA4B,EAAA,UAAA,CAAA,CAAA5B,EAAA,gBAAAA,EAAA;AAAA,IACyD,GAEjFgC,IAAAnB,EAAA,MAAA,CAAAb,EAAA,YAAA,CAAA4B,EAAA,SAAA,CAAA,CAAA5B,EAAA,YAAA,GAEAiC,IAAApB,EAAA,OAAA;AAAA,MAA2C,sCAAAb,EAAA,YAAAqB,EAAA;AAAA,IACwC,EAAA,GAInFa,IAAArB,EAAA,MAAAb,EAAA,YAAA,UAAA,GACAmC,IAAAtB,EAAA,MAAAf,EAAA,SAAA,KAAA,EAAAoC,KAAA,QAAAA,EAAA,MAAA,GAEAE,IAAA,CAAAhC,MAAA;AACI,MAAAF,EAAA,sBAAAE,CAAA,GACAF,EAAA,SAAAE,CAAA;AAAA,IAAmB;AAGvB,WAAAJ,EAAA,YACIqC;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIRC;AAAA,MAAAH;AAAA,MACI,CAAAI,MAAA;AAEI,YAAAA;AACI,gBAAA,IAAA,MAAA,wEAAA;AAAA,MACJ;AAAA,MACJ;AAAA,QACA,WAAA;AAAA,MACe;AAAA,IACf,GAOJnB,EAAA;AAAA,MAAa,OAJb,MAAA;AACI,QAAAU,EAAA,MAAA,CAAA,EAAA,MAAA;AAAA,MAA2B;AAAA,IAI3B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as m, toRefs as y, ref as v, computed as r, createElementBlock as h, openBlock as R, normalizeClass as E, unref as k } from "vue";
|
|
2
2
|
import { _ as D } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
3
3
|
import "../assets/radio-input.css";
|
|
4
4
|
var l = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.READONLY = "readonly", e.ERROR = "error", e))(l || {});
|
|
5
|
-
const g = ["id", "aria-checked", "aria-label", "aria-invalid", "aria-describedby", "checked", "disabled", "
|
|
5
|
+
const g = ["id", "aria-checked", "aria-label", "aria-invalid", "aria-describedby", "checked", "disabled", "value", "name"], B = {
|
|
6
6
|
name: "radio-input",
|
|
7
7
|
inheritAttrs: !1
|
|
8
|
-
}, L = /* @__PURE__ */
|
|
8
|
+
}, L = /* @__PURE__ */ m({
|
|
9
9
|
...B,
|
|
10
10
|
props: {
|
|
11
11
|
/**
|
|
@@ -54,21 +54,21 @@ const g = ["id", "aria-checked", "aria-label", "aria-invalid", "aria-describedby
|
|
|
54
54
|
name: { type: String, default: null }
|
|
55
55
|
},
|
|
56
56
|
emits: ["update:model-value"],
|
|
57
|
-
setup(e, { expose:
|
|
58
|
-
const a = e, u = o, { value: s } =
|
|
57
|
+
setup(e, { expose: d, emit: o }) {
|
|
58
|
+
const a = e, u = o, { value: s } = y(a), i = v(null), c = r(() => ({
|
|
59
59
|
[`b-radio-input--${l.DISABLED}`]: a.disabled,
|
|
60
60
|
[`b-radio-input--${l.ERROR}`]: a.hasError,
|
|
61
61
|
[`b-radio-input--${l.READONLY}`]: a.readonly
|
|
62
62
|
})), f = r(() => a.hasError), t = r(() => a.value === a.modelValue), b = () => {
|
|
63
63
|
!a.disabled && !a.readonly && u("update:model-value", a.value);
|
|
64
|
-
},
|
|
65
|
-
a.readonly &&
|
|
64
|
+
}, p = (n) => {
|
|
65
|
+
a.readonly && n.preventDefault();
|
|
66
66
|
};
|
|
67
|
-
return
|
|
67
|
+
return d({
|
|
68
68
|
focus: () => {
|
|
69
69
|
i.value.focus();
|
|
70
70
|
}
|
|
71
|
-
}), (
|
|
71
|
+
}), (n, _) => (R(), h("input", {
|
|
72
72
|
id: e.id,
|
|
73
73
|
ref_key: "inputRef",
|
|
74
74
|
ref: i,
|
|
@@ -78,19 +78,18 @@ const g = ["id", "aria-checked", "aria-label", "aria-invalid", "aria-describedby
|
|
|
78
78
|
"aria-describedby": e.ariaDescribedby,
|
|
79
79
|
checked: t.value,
|
|
80
80
|
disabled: e.disabled,
|
|
81
|
-
"aria-readonly": e.readonly ? e.readonly : void 0,
|
|
82
81
|
value: k(s),
|
|
83
82
|
name: e.name,
|
|
84
83
|
type: "radio",
|
|
85
84
|
class: E(["b-radio-input", c.value]),
|
|
86
85
|
role: "radio",
|
|
87
|
-
onClick:
|
|
86
|
+
onClick: p,
|
|
88
87
|
onChange: b
|
|
89
88
|
}, null, 42, g));
|
|
90
89
|
}
|
|
91
|
-
}),
|
|
90
|
+
}), C = /* @__PURE__ */ D(L, [["__scopeId", "data-v-83888415"]]);
|
|
92
91
|
export {
|
|
93
92
|
l as R,
|
|
94
|
-
|
|
93
|
+
C as a
|
|
95
94
|
};
|
|
96
|
-
//# sourceMappingURL=radio-input.
|
|
95
|
+
//# sourceMappingURL=radio-input.CBNE-AkM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-input.CBNE-AkM.js","sources":["../../../vue2/src/components/internal/radio-input/radio-input.types.ts","../../../vue2/src/components/internal/radio-input/radio-input.vue"],"sourcesContent":["export type RadioInputValue = string | number;\n\nexport enum RadioInputStateClass {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n","<template>\n <input\n :id=\"id\"\n ref=\"inputRef\"\n :aria-checked=\"isChecked\"\n :aria-label=\"ariaLabel\"\n :aria-invalid=\"ariaInvalid\"\n :aria-describedby=\"ariaDescribedby\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :value=\"value\"\n :name=\"name\"\n type=\"radio\"\n class=\"b-radio-input\"\n :class=\"conditionalClasses\"\n role=\"radio\"\n @click=\"onClick\"\n @change=\"onChange\"\n />\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type ComputedRef, type PropType, ref, toRefs } from 'vue';\n import { RadioInputStateClass, type RadioInputValue } from './radio-input.types';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n\n const props = defineProps({\n /**\n * The aria label associated to the input checkbox.\n */\n ariaLabel: { type: String, default: '' },\n\n /**\n * An additional string that serves as description for the input checkbox (useful if the component shows a description).\n */\n ariaDescribedby: { type: String, default: '' },\n\n /**\n * Disable the radio button (optional)\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Shows bento-radio-button in error state (optional)\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Sets the id of the radio input. Required for accessibility purposes\n */\n id: { type: String, default: null },\n\n /**\n * This property should not be used directly.\n * It will be used by v-model directive on radio component.\n */\n modelValue: {\n type: [String, Number] as PropType<RadioInputValue>,\n default: null,\n },\n\n /**\n * Sets the radio button to readonly (optional)\n */\n readonly: { type: Boolean, default: false },\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<RadioInputValue>,\n required: true,\n },\n\n /**\n * Sets the name of the radio input.\n * Used for differentiating radio groups or accessing input via form submission.\n */\n name: { type: String, default: null },\n });\n\n const emit = defineEmits<{\n /**\n * Emit that emits the input value\n */\n (e: 'update:model-value', value: RadioInputValue): void;\n }>();\n\n const { value } = toRefs(props);\n\n const inputRef = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-radio-input--${RadioInputStateClass.DISABLED}`]: props.disabled,\n [`b-radio-input--${RadioInputStateClass.ERROR}`]: props.hasError,\n [`b-radio-input--${RadioInputStateClass.READONLY}`]: props.readonly,\n }));\n\n const ariaInvalid = computed<HTMLAttributes['aria-invalid']>(() => props.hasError);\n\n const isChecked: ComputedRef<boolean> = computed(() => props.value === props.modelValue);\n\n const onChange = () => {\n if (!props.disabled && !props.readonly) {\n emit('update:model-value', props.value);\n }\n };\n\n // readonly attr doesn't work with radio button, so we need to manually ignore the click instead\n const onClick = event => {\n if (props.readonly) {\n event.preventDefault();\n }\n };\n\n const focus = () => {\n inputRef.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component that renders a radio input (without label)\n *\n * @example\n * import { RadioInput } from '@/internal/radio-input';\n *\n * export default {\n * components: { BentoCheckboxInput },\n * template: `\n * <label for=\"checkbox-id\">Your label</label>\n * <span id=\"description-id\">Description</span>\n * <radio-input id=\"checkbox-id\" aria=label=\"Your label\" aria-describedby=\"description-id\" />\n * `\n * }\n */\n export default {\n name: 'radio-input',\n inheritAttrs: false,\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-input.scss\" />\n"],"names":["RadioInputStateClass","RadioInputStateClass2","__default__","props","__props","emit","__emit","value","toRefs","inputRef","ref","conditionalClasses","computed","ariaInvalid","isChecked","onChange","onClick","event","__expose"],"mappings":";;;AAEY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA;4HC0IRE,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,cAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AArHA,UAAAC,IAAAC,GAuDAC,IAAAC,GAOA,EAAA,OAAAC,EAAA,IAAAC,EAAAL,CAAA,GAEAM,IAAAC,EAAA,IAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,CAAA,kBAAAZ,EAAA,QAAA,EAAA,GAAAG,EAAA;AAAA,MACoB,CAAA,kBAAAH,EAAA,KAAA,EAAA,GAAAG,EAAA;AAAA,MACH,CAAA,kBAAAH,EAAA,QAAA,EAAA,GAAAG,EAAA;AAAA,IACG,EAAA,GAG/DU,IAAAD,EAAA,MAAAT,EAAA,QAAA,GAEAW,IAAAF,EAAA,MAAAT,EAAA,UAAAA,EAAA,UAAA,GAEAY,IAAA,MAAA;AACI,MAAA,CAAAZ,EAAA,YAAA,CAAAA,EAAA,YACIE,EAAA,sBAAAF,EAAA,KAAA;AAAA,IACJ,GAIJa,IAAA,CAAAC,MAAA;AACI,MAAAd,EAAA,YACIc,EAAA,eAAA;AAAA,IACJ;AAOJ,WAAAC,EAAA;AAAA,MAAa,OAJb,MAAA;AACI,QAAAT,EAAA,MAAA,MAAA;AAAA,MAAqB;AAAA,IAIrB,CAAA;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as Dt, ref as wt, onMounted as sr, watch as me, createElementBlock as Ft, openBlock as Z, toDisplayString as $t, createBlock as pt, unref as ht, withCtx as Pt, renderSlot as Tt, createElementVNode as Ut, computed as xt, normalizeStyle as cr, h as Q, useAttrs as fr, createCommentVNode as te, mergeProps as hr, createVNode as Pe, KeepAlive as pr, createTextVNode as Me, normalizeClass as mr } from "vue";
|
|
2
2
|
import { B as Oe } from "./typography.yBEME_Gu.js";
|
|
3
|
-
import { B as gr } from "./segmented-control.
|
|
4
|
-
import { B as dr } from "./alert.
|
|
3
|
+
import { B as gr } from "./segmented-control.BCHGDSrf.js";
|
|
4
|
+
import { B as dr } from "./alert.C2pusd-_.js";
|
|
5
5
|
import { _ as Fe } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
6
|
import { B as kr } from "./link.cwPmWlsk.js";
|
|
7
|
-
import { B as xr } from "./checkbox.
|
|
8
|
-
import { u as br } from "./
|
|
7
|
+
import { B as xr } from "./checkbox.BI0dqARY.js";
|
|
8
|
+
import { u as br } from "./index.pdBj0KQU.js";
|
|
9
9
|
import { u as yr } from "./aria-label.CaUURpnB.js";
|
|
10
10
|
import { g as Re } from "./generate-uid.NJ8tVoha.js";
|
|
11
11
|
import { g as wr } from "./_commonjsHelpers.C6fGbg64.js";
|
|
12
|
-
import { F as Fr, E as Sr } from "./field-label.
|
|
12
|
+
import { F as Fr, E as Sr } from "./field-label.C97CrBI_.js";
|
|
13
13
|
import "../assets/rich-text-editor.css";
|
|
14
14
|
const Cr = ["disabled"], Ar = /* @__PURE__ */ Dt({
|
|
15
15
|
__name: "rich-text-editor-content-area",
|
|
@@ -6219,4 +6219,4 @@ const ao = {
|
|
|
6219
6219
|
export {
|
|
6220
6220
|
Eo as r
|
|
6221
6221
|
};
|
|
6222
|
-
//# sourceMappingURL=rich-text-editor.
|
|
6222
|
+
//# sourceMappingURL=rich-text-editor.BK9AivIm.js.map
|