@adyen/bento-vue3 1.68.2 → 1.70.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 +1 -0
- package/dist/@types/index.d.ts +978 -1976
- 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/alert.css +1 -1
- package/dist/assets/base-button.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions-with-menu.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/checkbox-group.css +1 -1
- package/dist/assets/checkbox-input.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/chip.css +1 -1
- package/dist/assets/code-snippet.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/country.css +1 -1
- package/dist/assets/currency.css +1 -1
- package/dist/assets/dashed-underline.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/divider.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/empty-state.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/focus-trap.css +1 -1
- package/dist/assets/footer-actions.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/grid-layout.css +1 -1
- package/dist/assets/header-meta.css +1 -1
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/info-icon.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/layout-row.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/payment-method.css +1 -1
- package/dist/assets/popper-container.css +1 -1
- package/dist/assets/promo-banner.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/rich-text-editor.css +1 -1
- package/dist/assets/search-bar.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/status.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/structured-list-item.css +1 -1
- package/dist/assets/tab.css +1 -1
- package/dist/assets/tag.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/assets/toast.css +1 -1
- package/dist/assets/toggle-button.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/typography.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +9 -9
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/{accordion-item.DOnW0OnU.js → accordion-item.6etqAJV9.js} +3 -3
- package/dist/chunks/accordion-item.6etqAJV9.js.map +1 -0
- package/dist/chunks/{action-bar.CflF49oL.js → action-bar.CweA2FeY.js} +7 -8
- package/dist/chunks/action-bar.CweA2FeY.js.map +1 -0
- package/dist/chunks/alert.Dzx5MzgE.js +171 -0
- package/dist/chunks/alert.Dzx5MzgE.js.map +1 -0
- package/dist/chunks/aria-label.CaUURpnB.js.map +1 -1
- package/dist/chunks/{avatar.B0-9jC6H.js → avatar.Dq59yj6m.js} +2 -2
- package/dist/chunks/avatar.Dq59yj6m.js.map +1 -0
- package/dist/chunks/{base-button.DdNFlbgH.js → base-button.CjYb5Y8k.js} +19 -19
- package/dist/chunks/base-button.CjYb5Y8k.js.map +1 -0
- package/dist/chunks/{base-modal.C3_r3rmc.js → base-modal.BrBcILSe.js} +21 -21
- package/dist/chunks/base-modal.BrBcILSe.js.map +1 -0
- package/dist/chunks/bin.DuHlEQBO.js +37 -0
- package/dist/chunks/bin.DuHlEQBO.js.map +1 -0
- package/dist/chunks/button-actions-with-menu.CBuoSd3w.js +93 -0
- package/dist/chunks/button-actions-with-menu.CBuoSd3w.js.map +1 -0
- package/dist/chunks/button-actions.types.BptAXjD8.js +8 -0
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -0
- package/dist/chunks/{button.AB0SOQMn.js → button.C-MAa6ut.js} +4 -4
- package/dist/chunks/button.C-MAa6ut.js.map +1 -0
- package/dist/chunks/{calendar._oPk_A1C.js → calendar.DFHiga9k.js} +36 -37
- package/dist/chunks/calendar.DFHiga9k.js.map +1 -0
- package/dist/chunks/{card.CS34Mi_G.js → card.BspLDcas.js} +6 -5
- package/dist/chunks/card.BspLDcas.js.map +1 -0
- package/dist/chunks/{checkbox-group.JRo6xNpe.js → checkbox-group.DIXgr1WQ.js} +6 -6
- package/dist/chunks/checkbox-group.DIXgr1WQ.js.map +1 -0
- package/dist/chunks/{checkbox-input.DFkwZ4GM.js → checkbox-input.BXNGT9U0.js} +2 -2
- package/dist/chunks/checkbox-input.BXNGT9U0.js.map +1 -0
- package/dist/chunks/{checkbox.DGrG3GN1.js → checkbox.M6lKj2hQ.js} +27 -27
- package/dist/chunks/checkbox.M6lKj2hQ.js.map +1 -0
- package/dist/chunks/{chip.CneNX2_j.js → chip.DcpP3zb6.js} +11 -11
- package/dist/chunks/chip.DcpP3zb6.js.map +1 -0
- package/dist/chunks/{code-snippet.D5M76Qy6.js → code-snippet.CKrxKjkQ.js} +8 -8
- package/dist/chunks/code-snippet.CKrxKjkQ.js.map +1 -0
- package/dist/chunks/{controls-group.CrzkSu0U.js → controls-group.CXVHTaYp.js} +32 -29
- package/dist/chunks/controls-group.CXVHTaYp.js.map +1 -0
- package/dist/chunks/{copy.RUoQOydT.js → copy.C4DAAiPw.js} +18 -19
- package/dist/chunks/copy.C4DAAiPw.js.map +1 -0
- package/dist/chunks/{country.Q95voxeL.js → country.RVvsGwuV.js} +9 -9
- package/dist/chunks/country.RVvsGwuV.js.map +1 -0
- package/dist/chunks/country.types.C0Q_hhgJ.js.map +1 -1
- package/dist/chunks/{currency.CZVdyZUH.js → currency.CN4UnCx8.js} +3 -3
- package/dist/chunks/currency.CN4UnCx8.js.map +1 -0
- package/dist/chunks/{dashboard-section.Bhd5Lsy2.js → dashboard-section.Cll3tn0q.js} +4 -4
- package/dist/chunks/{dashboard-section.Bhd5Lsy2.js.map → dashboard-section.Cll3tn0q.js.map} +1 -1
- package/dist/chunks/{dashed-underline.DkzQkpaf.js → dashed-underline.2OYxO-Rh.js} +30 -32
- package/dist/chunks/dashed-underline.2OYxO-Rh.js.map +1 -0
- package/dist/chunks/{data-grid-template.DSwj7e1E.js → data-grid-template.CTRHofoW.js} +5 -5
- package/dist/chunks/data-grid-template.CTRHofoW.js.map +1 -0
- package/dist/chunks/data-grid.DMOTTywp.js +3932 -0
- package/dist/chunks/data-grid.DMOTTywp.js.map +1 -0
- package/dist/chunks/{date-picker.CAoXTiZR.js → date-picker.CBlQ0ql7.js} +13 -14
- package/dist/chunks/date-picker.CBlQ0ql7.js.map +1 -0
- package/dist/chunks/date-range-picker.D-gGqpFB.js +1168 -0
- package/dist/chunks/date-range-picker.D-gGqpFB.js.map +1 -0
- package/dist/chunks/{date.DSjCnSgL.js → date.4GAXrgy5.js} +2 -2
- package/dist/chunks/{date.DSjCnSgL.js.map → date.4GAXrgy5.js.map} +1 -1
- package/dist/chunks/{dialog-page.C80HOigq.js → dialog-page.VSJgHY3C.js} +15 -15
- package/dist/chunks/dialog-page.VSJgHY3C.js.map +1 -0
- package/dist/chunks/{divider.qUOSAbU6.js → divider.DnKNNyWB.js} +2 -2
- package/dist/chunks/divider.DnKNNyWB.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.Ce5D3ipi.js → dropdown-default-textbox.CGsOngY1.js} +111 -109
- package/dist/chunks/dropdown-default-textbox.CGsOngY1.js.map +1 -0
- package/dist/chunks/dropdown-tag.DlFpUeXa.js +296 -0
- package/dist/chunks/dropdown-tag.DlFpUeXa.js.map +1 -0
- package/dist/chunks/{dropdown.CMOYmQLB.js → dropdown.agfzvJZE.js} +59 -59
- package/dist/chunks/dropdown.agfzvJZE.js.map +1 -0
- package/dist/chunks/{empty-state.D7llINgF.js → empty-state.BTaeZdQu.js} +4 -4
- package/dist/chunks/empty-state.BTaeZdQu.js.map +1 -0
- package/dist/chunks/{error-message.DHMHq9bR.js → error-message.B1P5ictH.js} +5 -5
- package/dist/chunks/{error-message.DHMHq9bR.js.map → error-message.B1P5ictH.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js +12 -0
- package/dist/chunks/es6.MoTTyETW.js.map +1 -0
- package/dist/chunks/events.CMzGybJJ.js +47 -0
- package/dist/chunks/events.CMzGybJJ.js.map +1 -0
- package/dist/chunks/{file-uploader.B_EI2fAc.js → file-uploader.Vac1Cu0i.js} +165 -164
- package/dist/chunks/file-uploader.Vac1Cu0i.js.map +1 -0
- package/dist/chunks/{filter-bar.DoHMLZ4O.js → filter-bar.uUpoP-XZ.js} +361 -368
- package/dist/chunks/filter-bar.uUpoP-XZ.js.map +1 -0
- package/dist/chunks/{fixed-scroller.D5nAPPbo.js → fixed-scroller.DSGxXiAH.js} +2 -2
- package/dist/chunks/{fixed-scroller.D5nAPPbo.js.map → fixed-scroller.DSGxXiAH.js.map} +1 -1
- package/dist/chunks/{focus-trap.CljZgv9i.js → focus-trap.rjp24a37.js} +2 -2
- package/dist/chunks/focus-trap.rjp24a37.js.map +1 -0
- package/dist/chunks/{footer-actions.Bje-DDqw.js → footer-actions.gRKTKGts.js} +5 -5
- package/dist/chunks/footer-actions.gRKTKGts.js.map +1 -0
- package/dist/chunks/{form-layout-title.rpIO-I9A.js → form-layout-title.DdRqnXXi.js} +5 -5
- package/dist/chunks/form-layout-title.DdRqnXXi.js.map +1 -0
- package/dist/chunks/{grid-layout.BTLE3rac.js → grid-layout.DDaRNz4-.js} +2 -2
- package/dist/chunks/grid-layout.DDaRNz4-.js.map +1 -0
- package/dist/chunks/{header-meta.Yt43-cUI.js → header-meta.Ct79L1O8.js} +26 -27
- package/dist/chunks/{header-meta.Yt43-cUI.js.map → header-meta.Ct79L1O8.js.map} +1 -1
- package/dist/chunks/{header-with-views.BUed3ocZ.js → header-with-views.BVHdSAKp.js} +281 -281
- package/dist/chunks/header-with-views.BVHdSAKp.js.map +1 -0
- package/dist/chunks/{header.CwKjDgKv.js → header.Cd1P8lYK.js} +32 -32
- package/dist/chunks/header.Cd1P8lYK.js.map +1 -0
- package/dist/chunks/image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js.map +1 -1
- package/dist/chunks/{info-icon.DprUQ9fj.js → info-icon.Bl0iKUfC.js} +7 -8
- package/dist/chunks/info-icon.Bl0iKUfC.js.map +1 -0
- package/dist/chunks/info.BKwey1HA.js +44 -0
- package/dist/chunks/info.BKwey1HA.js.map +1 -0
- package/dist/chunks/{input-field-password.DN0Jro1V.js → input-field-password.DkIWrrxy.js} +8 -8
- package/dist/chunks/input-field-password.DkIWrrxy.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.BhPsrafR.js → input-field-phone-number.EXlRu8qq.js} +46 -45
- package/dist/chunks/{input-field-phone-number.BhPsrafR.js.map → input-field-phone-number.EXlRu8qq.js.map} +1 -1
- package/dist/chunks/{input-field.su5Cq8Dt.js → input-field.CgbiOju9.js} +5 -5
- package/dist/chunks/input-field.CgbiOju9.js.map +1 -0
- package/dist/chunks/{inspector.CoZCPfHC.js → inspector.BGtTMtE0.js} +13 -13
- package/dist/chunks/inspector.BGtTMtE0.js.map +1 -0
- package/dist/chunks/{keyboard-navigation.CqgGzfZQ.js → keyboard-navigation.pB8weElW.js} +2 -2
- package/dist/chunks/keyboard-navigation.pB8weElW.js.map +1 -0
- package/dist/chunks/{layout-row.CZNtHaXd.js → layout-row.BPfOPn4x.js} +9 -9
- package/dist/chunks/layout-row.BPfOPn4x.js.map +1 -0
- package/dist/chunks/{link.BBpxiclu.js → link.cwPmWlsk.js} +2 -2
- package/dist/chunks/{link.BBpxiclu.js.map → link.cwPmWlsk.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.0BK6jWO9.js → listbox-option-tag.CDIkX7nh.js} +7 -7
- package/dist/chunks/listbox-option-tag.CDIkX7nh.js.map +1 -0
- package/dist/chunks/{loading-indicator.DEepb9Wl.js → loading-indicator.VHi5tbZa.js} +3 -3
- package/dist/chunks/loading-indicator.VHi5tbZa.js.map +1 -0
- package/dist/chunks/minus-small.DYIyF5XW.js.map +1 -1
- package/dist/chunks/{modal-fullscreen.DBTnoSX9.js → modal-fullscreen.-Q-7GMyT.js} +18 -19
- package/dist/chunks/modal-fullscreen.-Q-7GMyT.js.map +1 -0
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.Cd-mQUJ8.js → modal.vue_vue_type_script_setup_true_lang.TFh7p51f.js} +6 -6
- package/dist/chunks/modal.vue_vue_type_script_setup_true_lang.TFh7p51f.js.map +1 -0
- package/dist/chunks/{pagination.fYQak4C8.js → pagination.DW_HPEIu.js} +5 -5
- package/dist/chunks/pagination.DW_HPEIu.js.map +1 -0
- package/dist/chunks/{payment-method.eazefwm6.js → payment-method.CDnn1bjo.js} +3 -3
- package/dist/chunks/payment-method.CDnn1bjo.js.map +1 -0
- package/dist/chunks/popover.types.COM6oQgq.js +6 -0
- package/dist/chunks/popover.types.COM6oQgq.js.map +1 -0
- package/dist/chunks/{popper-container.b5h4zYgT.js → popper-container.CgJzEQ7N.js} +285 -281
- package/dist/chunks/popper-container.CgJzEQ7N.js.map +1 -0
- package/dist/chunks/{promo-banner.CQp3z2CP.js → promo-banner.BbqIA4Ce.js} +4 -4
- package/dist/chunks/promo-banner.BbqIA4Ce.js.map +1 -0
- package/dist/chunks/{radio-group.H9A5QcNu.js → radio-group.CbLIPi7h.js} +77 -69
- package/dist/chunks/radio-group.CbLIPi7h.js.map +1 -0
- package/dist/chunks/{radio-input.DKfQGxtp.js → radio-input.odN9FOyr.js} +2 -2
- package/dist/chunks/radio-input.odN9FOyr.js.map +1 -0
- package/dist/chunks/{rich-text-editor.Dx78coVL.js → rich-text-editor.C0hJeV4H.js} +8 -8
- package/dist/chunks/rich-text-editor.C0hJeV4H.js.map +1 -0
- package/dist/chunks/{search-bar.CUrcP_wf.js → search-bar.CvAi2t3-.js} +46 -44
- package/dist/chunks/search-bar.CvAi2t3-.js.map +1 -0
- package/dist/chunks/{secondary-nav.j3ddtYoZ.js → secondary-nav.yntS8-u5.js} +28 -28
- package/dist/chunks/secondary-nav.yntS8-u5.js.map +1 -0
- package/dist/chunks/{segmented-control.5-vlm8Gt.js → segmented-control.CRSdIvha.js} +6 -7
- package/dist/chunks/segmented-control.CRSdIvha.js.map +1 -0
- package/dist/chunks/{selection-card-group.B4xpnd-z.js → selection-card-group.Cu3V8h4R.js} +16 -16
- package/dist/chunks/selection-card-group.Cu3V8h4R.js.map +1 -0
- package/dist/chunks/{sidepanel.DPN__L3Q.js → sidepanel.z18XSO3M.js} +14 -14
- package/dist/chunks/sidepanel.z18XSO3M.js.map +1 -0
- package/dist/chunks/{status.types.Bdv2zuuh.js → status.types.-l2qJxLn.js} +9 -9
- package/dist/chunks/status.types.-l2qJxLn.js.map +1 -0
- package/dist/chunks/{step.BtNhPZAf.js → step.BMSjltwl.js} +8 -9
- package/dist/chunks/step.BMSjltwl.js.map +1 -0
- package/dist/chunks/{structured-list-item.BQbEDKhg.js → structured-list-item.CD1nMqzH.js} +18 -19
- package/dist/chunks/structured-list-item.CD1nMqzH.js.map +1 -0
- package/dist/chunks/{summary-grid.types.CjbbSZBJ.js → summary-grid.types.BHuDlPDw.js} +7 -7
- package/dist/chunks/{summary-grid.types.CjbbSZBJ.js.map → summary-grid.types.BHuDlPDw.js.map} +1 -1
- package/dist/chunks/{tab.CAt51ksU.js → tab.C3R_VoJL.js} +5 -5
- package/dist/chunks/tab.C3R_VoJL.js.map +1 -0
- package/dist/chunks/{tag.D3in0-Bp.js → tag.B6AmSws9.js} +11 -12
- package/dist/chunks/tag.B6AmSws9.js.map +1 -0
- package/dist/chunks/textarea.DfQLxj_w.js +295 -0
- package/dist/chunks/textarea.DfQLxj_w.js.map +1 -0
- package/dist/chunks/timeline-item.25y9USE-.js +568 -0
- package/dist/chunks/timeline-item.25y9USE-.js.map +1 -0
- package/dist/chunks/{toast.CSoCPteL.js → toast.DIhABAW8.js} +18 -18
- package/dist/chunks/toast.DIhABAW8.js.map +1 -0
- package/dist/chunks/toggle-button.CQl9HneO.js +1353 -0
- package/dist/chunks/toggle-button.CQl9HneO.js.map +1 -0
- package/dist/chunks/{toggle.BuKXexA6.js → toggle.C8k7NQ7y.js} +3 -3
- package/dist/chunks/toggle.C8k7NQ7y.js.map +1 -0
- package/dist/chunks/{tooltip.VYPUHERk.js → tooltip.lBnko9QV.js} +70 -64
- package/dist/chunks/tooltip.lBnko9QV.js.map +1 -0
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.Dmf8fGaM.js → tutorial.vue_vue_type_script_setup_true_lang.BProZFmI.js} +48 -51
- package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.BProZFmI.js.map +1 -0
- package/dist/chunks/{typography.DN5eC5ch.js → typography.yBEME_Gu.js} +25 -25
- package/dist/chunks/typography.yBEME_Gu.js.map +1 -0
- package/dist/chunks/{use-bento-toast-controller.D3LA1FCd.js → use-bento-toast-controller.Kri_h7jS.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.D3LA1FCd.js.map → use-bento-toast-controller.Kri_h7jS.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.Dyoz6cUK.js → use-cached-selected-values.CELe-MsT.js} +16 -17
- package/dist/chunks/use-cached-selected-values.CELe-MsT.js.map +1 -0
- package/dist/chunks/{use-country-items.Duh4bMqW.js → use-country-items.D_kamcYy.js} +2 -2
- package/dist/chunks/use-country-items.D_kamcYy.js.map +1 -0
- package/dist/chunks/{use-country-phon-code.BOaJ9PDl.js → use-country-phon-code.Bui3zD6W.js} +5 -3
- package/dist/chunks/{use-country-phon-code.BOaJ9PDl.js.map → use-country-phon-code.Bui3zD6W.js.map} +1 -1
- package/dist/chunks/use-has-slot.B7eQSabc.js.map +1 -1
- package/dist/chunks/warning-filled.BMGD0G-_.js +29 -0
- package/dist/chunks/warning-filled.BMGD0G-_.js.map +1 -0
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +2 -2
- 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 +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.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 +1 -1
- package/dist/focus-trap.js +1 -1
- 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 +241 -244
- 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 +3 -2
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +33 -32
- package/dist/internal.js.map +1 -1
- package/dist/layout.js +1 -1
- package/dist/link.js +1 -1
- 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/payment-method.js +1 -1
- package/dist/popover.js +2 -2
- package/dist/popper-container.js +4 -5
- package/dist/popper-container.js.map +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/status.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +17 -4
- package/dist/styles/bento-light.css +17 -4
- package/dist/styles/bento.css +17 -4
- package/dist/styles/styleguide.css +17 -4
- package/dist/styles/utility.css +3 -0
- 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/typography.js +1 -1
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +6 -6
- package/dist/assets/button-actions.css +0 -1
- package/dist/assets/menu.css +0 -1
- package/dist/assets/popover.css +0 -1
- package/dist/assets/teleport.css +0 -1
- package/dist/chunks/accordion-item.DOnW0OnU.js.map +0 -1
- package/dist/chunks/action-bar.CflF49oL.js.map +0 -1
- package/dist/chunks/alert.DvleqX0i.js +0 -169
- package/dist/chunks/alert.DvleqX0i.js.map +0 -1
- package/dist/chunks/avatar.B0-9jC6H.js.map +0 -1
- package/dist/chunks/base-button.DdNFlbgH.js.map +0 -1
- package/dist/chunks/base-modal.C3_r3rmc.js.map +0 -1
- package/dist/chunks/base-modal.keys.C2PQXcE2.js +0 -5
- package/dist/chunks/base-modal.keys.C2PQXcE2.js.map +0 -1
- package/dist/chunks/bin.CiGG2V4b.js +0 -37
- package/dist/chunks/bin.CiGG2V4b.js.map +0 -1
- package/dist/chunks/button-actions-with-menu.8ZYh7-9s.js +0 -91
- package/dist/chunks/button-actions-with-menu.8ZYh7-9s.js.map +0 -1
- package/dist/chunks/button-actions.CZdO9YOk.js +0 -264
- package/dist/chunks/button-actions.CZdO9YOk.js.map +0 -1
- package/dist/chunks/button.AB0SOQMn.js.map +0 -1
- package/dist/chunks/calendar._oPk_A1C.js.map +0 -1
- package/dist/chunks/card.CS34Mi_G.js.map +0 -1
- package/dist/chunks/checkbox-group.JRo6xNpe.js.map +0 -1
- package/dist/chunks/checkbox-input.DFkwZ4GM.js.map +0 -1
- package/dist/chunks/checkbox.DGrG3GN1.js.map +0 -1
- package/dist/chunks/chip.CneNX2_j.js.map +0 -1
- package/dist/chunks/code-snippet.D5M76Qy6.js.map +0 -1
- package/dist/chunks/controls-group.CrzkSu0U.js.map +0 -1
- package/dist/chunks/copy.RUoQOydT.js.map +0 -1
- package/dist/chunks/country.Q95voxeL.js.map +0 -1
- package/dist/chunks/currency.CZVdyZUH.js.map +0 -1
- package/dist/chunks/dashed-underline.DkzQkpaf.js.map +0 -1
- package/dist/chunks/data-grid-template.DSwj7e1E.js.map +0 -1
- package/dist/chunks/data-grid.BEdELRNZ.js +0 -3860
- package/dist/chunks/data-grid.BEdELRNZ.js.map +0 -1
- package/dist/chunks/date-picker.CAoXTiZR.js.map +0 -1
- package/dist/chunks/date-range-picker.DtV4L3L6.js +0 -1225
- package/dist/chunks/date-range-picker.DtV4L3L6.js.map +0 -1
- package/dist/chunks/dialog-page.C80HOigq.js.map +0 -1
- package/dist/chunks/divider.qUOSAbU6.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.Ce5D3ipi.js.map +0 -1
- package/dist/chunks/dropdown-tag.B3fptORX.js +0 -230
- package/dist/chunks/dropdown-tag.B3fptORX.js.map +0 -1
- package/dist/chunks/dropdown.CMOYmQLB.js.map +0 -1
- package/dist/chunks/empty-state.D7llINgF.js.map +0 -1
- package/dist/chunks/es6.n1ewaW31.js +0 -11
- package/dist/chunks/es6.n1ewaW31.js.map +0 -1
- package/dist/chunks/events.FNmSWp_P.js +0 -52
- package/dist/chunks/events.FNmSWp_P.js.map +0 -1
- package/dist/chunks/file-uploader.B_EI2fAc.js.map +0 -1
- package/dist/chunks/filter-bar.DoHMLZ4O.js.map +0 -1
- package/dist/chunks/focus-trap.CljZgv9i.js.map +0 -1
- package/dist/chunks/footer-actions.Bje-DDqw.js.map +0 -1
- package/dist/chunks/form-layout-title.rpIO-I9A.js.map +0 -1
- package/dist/chunks/grid-layout.BTLE3rac.js.map +0 -1
- package/dist/chunks/header-with-views.BUed3ocZ.js.map +0 -1
- package/dist/chunks/header.CwKjDgKv.js.map +0 -1
- package/dist/chunks/info-icon.DprUQ9fj.js.map +0 -1
- package/dist/chunks/info.DcTs-Bzp.js +0 -44
- package/dist/chunks/info.DcTs-Bzp.js.map +0 -1
- package/dist/chunks/input-field-password.DN0Jro1V.js.map +0 -1
- package/dist/chunks/input-field.su5Cq8Dt.js.map +0 -1
- package/dist/chunks/inspector.CoZCPfHC.js.map +0 -1
- package/dist/chunks/keyboard-navigation.CqgGzfZQ.js.map +0 -1
- package/dist/chunks/layout-row.CZNtHaXd.js.map +0 -1
- package/dist/chunks/listbox-option-tag.0BK6jWO9.js.map +0 -1
- package/dist/chunks/loading-indicator.DEepb9Wl.js.map +0 -1
- package/dist/chunks/menu.EtjeOPXX.js +0 -680
- package/dist/chunks/menu.EtjeOPXX.js.map +0 -1
- package/dist/chunks/modal-fullscreen.DBTnoSX9.js.map +0 -1
- package/dist/chunks/modal-fullscreen.keys.CMba3hYp.js +0 -5
- package/dist/chunks/modal-fullscreen.keys.CMba3hYp.js.map +0 -1
- package/dist/chunks/modal.vue_vue_type_script_setup_true_lang.Cd-mQUJ8.js.map +0 -1
- package/dist/chunks/pagination.fYQak4C8.js.map +0 -1
- package/dist/chunks/payment-method.eazefwm6.js.map +0 -1
- package/dist/chunks/popover.DYgCCUCJ.js +0 -200
- package/dist/chunks/popover.DYgCCUCJ.js.map +0 -1
- package/dist/chunks/popover.types.V8old-GW.js +0 -6
- package/dist/chunks/popover.types.V8old-GW.js.map +0 -1
- package/dist/chunks/popper-container.b5h4zYgT.js.map +0 -1
- package/dist/chunks/popper-container.types.BCZMbVFD.js +0 -9
- package/dist/chunks/popper-container.types.BCZMbVFD.js.map +0 -1
- package/dist/chunks/promo-banner.CQp3z2CP.js.map +0 -1
- package/dist/chunks/radio-group.H9A5QcNu.js.map +0 -1
- package/dist/chunks/radio-input.DKfQGxtp.js.map +0 -1
- package/dist/chunks/rich-text-editor.Dx78coVL.js.map +0 -1
- package/dist/chunks/search-bar.CUrcP_wf.js.map +0 -1
- package/dist/chunks/secondary-nav.j3ddtYoZ.js.map +0 -1
- package/dist/chunks/segmented-control.5-vlm8Gt.js.map +0 -1
- package/dist/chunks/selection-card-group.B4xpnd-z.js.map +0 -1
- package/dist/chunks/sidepanel.DPN__L3Q.js.map +0 -1
- package/dist/chunks/sidepanel.keys.R0DKQuYx.js +0 -5
- package/dist/chunks/sidepanel.keys.R0DKQuYx.js.map +0 -1
- package/dist/chunks/status.types.Bdv2zuuh.js.map +0 -1
- package/dist/chunks/step.BtNhPZAf.js.map +0 -1
- package/dist/chunks/structured-list-item.BQbEDKhg.js.map +0 -1
- package/dist/chunks/tab.CAt51ksU.js.map +0 -1
- package/dist/chunks/tag.D3in0-Bp.js.map +0 -1
- package/dist/chunks/teleport.CfGWjxe2.js +0 -129
- package/dist/chunks/teleport.CfGWjxe2.js.map +0 -1
- package/dist/chunks/textarea.BBhN67-I.js +0 -282
- package/dist/chunks/textarea.BBhN67-I.js.map +0 -1
- package/dist/chunks/timeline-item.CuCII37W.js +0 -566
- package/dist/chunks/timeline-item.CuCII37W.js.map +0 -1
- package/dist/chunks/toast.CSoCPteL.js.map +0 -1
- package/dist/chunks/toggle-button.NQwrfSr1.js +0 -80
- package/dist/chunks/toggle-button.NQwrfSr1.js.map +0 -1
- package/dist/chunks/toggle.BuKXexA6.js.map +0 -1
- package/dist/chunks/tooltip.VYPUHERk.js.map +0 -1
- package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.Dmf8fGaM.js.map +0 -1
- package/dist/chunks/typography.DN5eC5ch.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.Dyoz6cUK.js.map +0 -1
- package/dist/chunks/use-click-outside.BnhTgpSt.js +0 -14
- package/dist/chunks/use-click-outside.BnhTgpSt.js.map +0 -1
- package/dist/chunks/use-country-items.Duh4bMqW.js.map +0 -1
- package/dist/chunks/warning-filled.AiUbXzzg.js +0 -29
- package/dist/chunks/warning-filled.AiUbXzzg.js.map +0 -1
- package/dist/styles/legacy.css +0 -2226
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-item.6etqAJV9.js","sources":["../../../vue2/src/components/accordion/accordion.keys.ts","../../../vue2/src/components/accordion/accordion.vue","../../../vue2/src/components/accordion/components/accordion-item.vue"],"sourcesContent":["export const ACCORDION_TITLE_SIZE_INJECTION_KEY = Symbol('accordion title size injection key');\n","<template>\n <div class=\"b-accordion\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { type PropType, provide, toRef } from 'vue';\n\n import { ACCORDION_TITLE_SIZE_INJECTION_KEY } from './accordion.keys';\n\n import type { BentoAccordionTitleSize } from './accordion.types';\n\n const props = defineProps({\n /**\n * Controls accordion title size.\n * @values default, small\n */\n titleSize: {\n type: String as PropType<BentoAccordionTitleSize>,\n default: 'default',\n },\n });\n\n provide(ACCORDION_TITLE_SIZE_INJECTION_KEY, toRef(props, 'titleSize'));\n</script>\n\n<script lang=\"ts\">\n /**\n * An accordion is a vertical stack of interactive headers used to reveal or hide\n * sections of content associated with these headers.\n *\n * This component must only have `BentoAccordionItem` components in its default slot.\n *\n * Accordion items should be collapsed by default.\n *\n * @example\n * import { BentoAccordion, BentoAccordionItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAccordion, BentoAccordionItem },\n * template: `\n * <bento-accordion>\n * <bento-accordion-item title=\"Item 1\">\n * Content for item 1\n * </bento-accordion-item>\n * <bento-accordion-item title=\"Item 2\">\n * Content for item 2\n * </bento-accordion-item>\n * </bento-accordion>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./accordion.scss\" />\n","<template>\n <div class=\"b-accordion-item\">\n <bento-typography\n el=\"h3\"\n :variant=\"titleSize === 'small' ? 'body' : 'title'\"\n :strongest=\"titleSize === 'small'\"\n >\n <button\n :id=\"buttonId\"\n :aria-controls=\"contentId\"\n :aria-expanded=\"`${isOpen}`\"\n type=\"button\"\n class=\"b-accordion-item__button\"\n @click=\"isOpen = !isOpen\"\n >\n <chevron-up-icon\n v-if=\"isOpen\"\n class=\"b-accordion-item__icon\"\n :svg-title=\"t('collapse')\"\n aria-hidden=\"true\"\n />\n <chevron-down-icon v-else class=\"b-accordion-item__icon\" :svg-title=\"t('expand')\" aria-hidden=\"true\" />\n {{ title }}\n </button>\n </bento-typography>\n\n <Transition :name=\"CONTENT_TRANSITION_NAME\">\n <div v-if=\"isOpen\" :id=\"contentId\" :aria-labelledby=\"buttonId\" role=\"region\" :style=\"contentMaxHeight\">\n <div ref=\"contentDiv\" class=\"b-accordion-item__content\">\n <slot />\n </div>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, watch } from 'vue';\n\n import { BentoTypography } from '@/components/typography';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n import { generateUid } from '@/core/utils/ts';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useI18n } from '@/utils/ts/i18n';\n\n import { ACCORDION_TITLE_SIZE_INJECTION_KEY } from '../accordion.keys';\n\n import type { BentoAccordionTitleSize } from '../accordion.types';\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const CONTENT_TRANSITION_NAME = 'b-accordion-item__animation--content';\n\n const props = defineProps({\n /**\n * Sets the title of the accordion item.\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Controls if the content is visible or hidden.\n */\n isExpanded: {\n type: Boolean,\n default: false,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when content is toggled\n */\n (e: 'update:is-expanded', value: boolean): void;\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // Refs\n const contentDiv = ref<HTMLDivElement>(null);\n const isOpen = ref(props.isExpanded);\n\n // Generating IDs\n const buttonId = generateUid('accordionItemButton');\n const contentId = generateUid('accordionItemContent');\n\n // Injecting prop from parent\n const titleSize = inject<`${BentoAccordionTitleSize}`>(ACCORDION_TITLE_SIZE_INJECTION_KEY, 'default');\n\n // Getting and setting the item height to be able to handle height animation\n const { updateContentHeight, contentHeight } = useExpandableContentHeight(contentDiv, isOpen);\n\n const contentMaxHeight = computed(() => (contentHeight.value ? { 'max-height': contentHeight.value } : {}));\n\n watch(\n () => props.isExpanded,\n value => {\n isOpen.value = value;\n }\n );\n\n watch(\n () => contentDiv.value,\n () => {\n let observer: ResizeObserver | null = null;\n if (!observer && contentDiv.value) {\n observer = observeSizeOfElement(contentDiv.value, () => {\n if (contentDiv.value) {\n updateContentHeight();\n }\n });\n }\n }\n );\n\n watch(\n isOpen,\n value => {\n // Enable two-way data binding for `isExpanded`\n emit('update:is-expanded', value);\n\n updateContentHeight();\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * An accordion item is an interactive header used to reveal or hide a\n * section of content associated with this header.\n *\n * This component must always be wrapped by a `BentoAccordion` component.\n *\n * @example\n * import { BentoAccordion, BentoAccordionItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAccordion, BentoAccordionItem },\n * template: `\n * <bento-accordion>\n * <bento-accordion-item title=\"Item 1\">\n * Content for item 1\n * </bento-accordion-item>\n * <bento-accordion-item title=\"Item 2\">\n * Content for item 2\n * </bento-accordion-item>\n * </bento-accordion>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./accordion-item.scss\" />\n"],"names":["ACCORDION_TITLE_SIZE_INJECTION_KEY","__default__$1","provide","toRef","__props","__default__","messages","CONTENT_TRANSITION_NAME","props","emit","__emit","t","useI18n","contentDiv","ref","isOpen","buttonId","generateUid","contentId","titleSize","inject","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","computed","watch","value","observer","observeSizeOfElement"],"mappings":";;;;;;;;;;AAAa,MAAAA,IAAA,OAAA,oCAAA,iCCqDTC,IAAA,CAAA;;;;;;;;;;;;;;AA7BA,WAAAC,EAAAF,GAAAG,EAXAC,GAWA,WAAA,CAAA;;;;;;;;;;;;;;;;;mHCqIAC,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;AAvGA,UAAAC,IAAA,wCAEAC,IAAAJ,GAiBAK,IAAAC,GAOA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAN,EAAA,CAAA,GAGAO,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAAN,EAAA,UAAA,GAGAQ,IAAAC,EAAA,qBAAA,GACAC,IAAAD,EAAA,sBAAA,GAGAE,IAAAC,EAAApB,GAAA,SAAA,GAGA,EAAA,qBAAAqB,GAAA,eAAAC,EAAA,IAAAC,EAAAV,GAAAE,CAAA,GAEAS,IAAAC,EAAA,MAAAH,EAAA,QAAA,EAAA,cAAAA,EAAA,MAAA,IAAA,CAAA,CAAA;AAEA,WAAAI;AAAA,MAAA,MAAAlB,EAAA;AAAA,MACgB,CAAAmB,MAAA;AAER,QAAAZ,EAAA,QAAAY;AAAA,MAAe;AAAA,IACnB,GAGJD;AAAA,MAAA,MAAAb,EAAA;AAAA,MACqB,MAAA;AAEb,YAAAe,IAAA;AACA,QAAA,CAAAA,KAAAf,EAAA,UACIe,IAAAC,EAAAhB,EAAA,OAAA,MAAA;AACI,UAAAA,EAAA,SACIQ,EAAA;AAAA,QACJ,CAAA;AAAA,MAER;AAAA,IACJ,GAGJK;AAAA,MAAAX;AAAA,MACI,CAAAY,MAAA;AAGI,QAAAlB,EAAA,sBAAAkB,CAAA,GAEAN,EAAA;AAAA,MAAoB;AAAA,MACxB,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { defineComponent as F, computed as c, ref as _, toRefs as G, watch as E, provide as U, nextTick as f, createBlock as b, openBlock as d, Transition as L, withCtx as B, createElementVNode as h, unref as t, normalizeClass as W, createElementBlock as K, createCommentVNode as M, createVNode as y, createTextVNode as z, toDisplayString as S } from "vue";
|
|
2
|
-
import { B as D } from "./button.
|
|
3
|
-
import { B as J } from "./typography.
|
|
4
|
-
import { B as Z } from "./button-actions-with-menu.
|
|
2
|
+
import { B as D } from "./button.C-MAa6ut.js";
|
|
3
|
+
import { B as J } from "./typography.yBEME_Gu.js";
|
|
4
|
+
import { B as Z } from "./button-actions-with-menu.CBuoSd3w.js";
|
|
5
5
|
import { C as j } from "./cross.B92GxFTY.js";
|
|
6
6
|
import { u as q } from "./i18n.B6g5VX0q.js";
|
|
7
7
|
import { u as Y } from "./index.FNUaPG4G.js";
|
|
8
|
-
import { P as
|
|
9
|
-
import { B as H } from "./button-actions.CZdO9YOk.js";
|
|
8
|
+
import { P as $, B as H } from "./toggle-button.CQl9HneO.js";
|
|
10
9
|
import { _ as Q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
11
10
|
import "../assets/action-bar.css";
|
|
12
11
|
const N = {
|
|
@@ -196,8 +195,8 @@ const N = {
|
|
|
196
195
|
_: 1
|
|
197
196
|
}));
|
|
198
197
|
}
|
|
199
|
-
}),
|
|
198
|
+
}), fe = /* @__PURE__ */ Q(te, [["__scopeId", "data-v-46e6e5aa"]]);
|
|
200
199
|
export {
|
|
201
|
-
|
|
200
|
+
fe as B
|
|
202
201
|
};
|
|
203
|
-
//# sourceMappingURL=action-bar.
|
|
202
|
+
//# sourceMappingURL=action-bar.CweA2FeY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-bar.CweA2FeY.js","sources":["../../../vue2/src/components/action-bar/action-bar.vue"],"sourcesContent":["<template>\n <Transition name=\"b-action-bar__animation\" appear>\n <section class=\"b-action-bar\" :class=\"conditionalClasses\" :aria-label=\"t('actionBar')\">\n <div ref=\"actionBar\" class=\"b-action-bar__container\">\n <div v-if=\"!isConfirmationVariant\" class=\"b-action-bar__close-button\">\n <bento-button variant=\"tertiary\" inverse :aria-label=\"t('close')\" @click=\"emit('close')\">\n <template #iconLeft><cross-icon :aria-hidden=\"true\" /></template>\n </bento-button>\n </div>\n <bento-typography el=\"span\" stronger class=\"b-action-bar__selection\">\n {{ n(itemCounter) }}\n {{ isConfirmationVariant ? tc('unsavedChanges', itemCounter) : label }}\n </bento-typography>\n <bento-button-actions\n v-if=\"isConfirmationVariant\"\n :actions=\"confirmationActions\"\n class=\"b-action-bar__actions\"\n inverse\n />\n <button-actions-with-menu\n v-else\n :actions=\"actionsInternal\"\n class=\"b-action-bar__actions\"\n :displayed-actions=\"internalDisplayedActions\"\n menu-position=\"top-end\"\n disable-responsive-behavior\n inverse\n />\n </div>\n </section>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, type PropType, provide, ref, toRefs, watch } from 'vue';\n import { BentoButton, BentoButtonActions, type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n\n import { type BentoActionBarVariant } from '@/components/action-bar/action-bar.types';\n import ButtonActionsWithMenu from '@/components/internal/button-actions-with-menu/button-actions-with-menu.vue';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { useI18n } from '@/utils/ts/i18n';\n import { useWindowSize } from '@vueuse/core';\n\n import messages from './messages.json';\n import { POPOVER_OFFSET_INJECTION_KEY } from '@/components/popover/popover.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n // Constants\n const AVERAGE_BUTTON_SIZE = 100;\n const MENU_OFFSET = 7;\n const RESPONSIVE_BREAKPOINT = 500;\n const SPACING = 32;\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * Required and used for the `default` variant.\n *\n * Each object in the list should have a `title`, an `event` and,\n * optionally, an `icon`.\n *\n * The component will display 4 actions and the hide the rest inside a menu.\n *\n * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: () => [],\n },\n /**\n * How many actions should be visible outside the menu, cannot be more than 4\n */\n visibleActions: {\n type: Number,\n default: 4,\n validator: (value: number) => value > 0 && value <= 4,\n },\n /**\n * Use when there are sticky elements at the bottom, like sticky pagination\n */\n extraBottomSpacing: {\n type: Boolean,\n default: false,\n },\n /**\n * Show how many items are selected\n */\n itemCounter: {\n type: Number,\n required: true,\n },\n /**\n * Label for the selection, e.g. 'selected'/'changed'\n */\n selectionLabel: {\n type: String,\n default: null,\n },\n /**\n * Variant for the action bar\n * @values default, confirmation\n */\n variant: {\n type: String as PropType<BentoActionBarVariant>,\n default: 'default',\n },\n });\n\n const emit = defineEmits<{\n /**\n * Event emitted when the user click the close button\n */\n (e: 'close'): void;\n (e: 'cancel'): void;\n (e: 'save'): void;\n }>();\n\n const { t, tc, n } = useI18n<{ message: MessageSchema }>({ messages });\n const label = computed(() => (props.selectionLabel ? props.selectionLabel : t('selected')));\n\n // Refs\n const actionBar = ref<HTMLDivElement>(null);\n const { extraBottomSpacing, visibleActions } = toRefs(props);\n const { width } = useWindowSize();\n const internalDisplayedActions = ref(null);\n const internalVisibleActions = ref(null);\n\n const isConfirmationVariant = computed(() => props.variant === 'confirmation');\n\n watch(\n () => visibleActions.value,\n value => {\n internalVisibleActions.value = value <= 4 ? value : 4;\n internalDisplayedActions.value = internalVisibleActions.value;\n },\n { immediate: true }\n );\n\n // Styling\n const conditionalClasses = computed(() => ({\n 'b-action-bar--extra-spacing': extraBottomSpacing.value,\n 'b-action-bar--confirmation': isConfirmationVariant.value,\n }));\n\n // Provide POPOVER_OFFSET_INJECTION_KEY to change the value of the popover offset\n provide(POPOVER_OFFSET_INJECTION_KEY, MENU_OFFSET);\n\n // Manipulate actions array to display as intended\n const actionsInternal = computed(() => {\n // All buttons should be of type secondary in the action bar\n const actions = props.actions.map(action => ({\n ...action,\n variant: 'secondary',\n })) as BentoButtonActionsList;\n // Shown actions should display from left to right in action bar, instead of right to left which is the button actions default\n const shownActions = actions.slice(0, internalDisplayedActions.value).reverse();\n const hiddenActions = actions.slice(internalDisplayedActions.value);\n\n return [...shownActions, ...hiddenActions];\n });\n\n const confirmationActions = computed<BentoButtonActionsList>(() => [\n {\n title: t('save'),\n event: () => emit('save'),\n },\n {\n title: t('cancel'),\n variant: 'secondary',\n event: () => emit('cancel'),\n },\n ]);\n\n // Recursive functions to determine how many actions should be visible/hidden based on the screens width\n const showActions = async () => {\n await nextTick();\n if (\n width.value > actionBar.value.clientWidth + SPACING + AVERAGE_BUTTON_SIZE &&\n internalDisplayedActions.value < internalVisibleActions.value\n ) {\n internalDisplayedActions.value += 1;\n showActions();\n }\n };\n\n const hideActions = async () => {\n await nextTick();\n if (width.value < actionBar.value.clientWidth + SPACING && internalDisplayedActions.value > 0) {\n internalDisplayedActions.value -= 1;\n hideActions();\n }\n };\n\n // Screen width watcher to toggle hidden/visible actions\n watch(\n () => width.value,\n async (newValue, oldValue) => {\n await nextTick();\n if (!actionBar.value) {\n return;\n }\n const isIncreasing = newValue > oldValue;\n if (width.value < RESPONSIVE_BREAKPOINT) {\n internalDisplayedActions.value = 0;\n } else if (isIncreasing) {\n showActions();\n } else {\n hideActions();\n }\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * Action bar is a floating bar that provides users with quick access to key actions that can be applied to one or multiple items.\n *\n * @example\n * import { BentoActionBar } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoActionBar },\n * template: `\n * <bento-action-bar\n * :actions='[\n * {\n * title: 'Delete',\n * critical: true,\n * icon: BinIcon,\n * event: () => true,\n * },\n * {\n * title: 'Edit',\n * icon: EditIcon,\n * event: () => true,\n * }\n * ]'\n * @close=\"closeAction\"\n * :item-counter=\"5\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./action-bar.scss\" />\n"],"names":["__default__","messages","props","__props","emit","__emit","t","tc","n","useI18n","label","computed","actionBar","ref","extraBottomSpacing","visibleActions","toRefs","width","useWindowSize","internalDisplayedActions","internalVisibleActions","isConfirmationVariant","watch","value","conditionalClasses","provide","POPOVER_OFFSET_INJECTION_KEY","actionsInternal","actions","action","shownActions","hiddenActions","confirmationActions","showActions","nextTick","hideActions","newValue","oldValue","isIncreasing"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuPIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAjMA,UAAAC,IAAAC,GAuDAC,IAAAC,GASA,EAAA,GAAAC,GAAA,IAAAC,GAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAR,EAAA,CAAA,GACAS,IAAAC,EAAA,MAAAT,EAAA,iBAAAA,EAAA,iBAAAI,EAAA,UAAA,CAAA,GAGAM,IAAAC,EAAA,IAAA,GACA,EAAA,oBAAAC,GAAA,gBAAAC,EAAA,IAAAC,EAAAd,CAAA,GACA,EAAA,OAAAe,EAAA,IAAAC,EAAA,GACAC,IAAAN,EAAA,IAAA,GACAO,IAAAP,EAAA,IAAA,GAEAQ,IAAAV,EAAA,MAAAT,EAAA,YAAA,cAAA;AAEA,IAAAoB;AAAA,MAAA,MAAAP,EAAA;AAAA,MACyB,CAAAQ,MAAA;AAEjB,QAAAH,EAAA,QAAAG,KAAA,IAAAA,IAAA,GACAJ,EAAA,QAAAC,EAAA;AAAA,MAAwD;AAAA,MAC5D,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAAI,IAAAb,EAAA,OAAA;AAAA,MAA2C,+BAAAG,EAAA;AAAA,MACW,8BAAAO,EAAA;AAAA,IACE,EAAA;AAIxD,IAAAI,EAAAC,GAAA,CAAA;AAGA,UAAAC,IAAAhB,EAAA,MAAA;AAEI,YAAAiB,IAAA1B,EAAA,QAAA,IAAA,CAAA2B,OAAA;AAAA,QAA6C,GAAAA;AAAA,QACtC,SAAA;AAAA,MACM,EAAA,GAGbC,IAAAF,EAAA,MAAA,GAAAT,EAAA,KAAA,EAAA,QAAA,GACAY,IAAAH,EAAA,MAAAT,EAAA,KAAA;AAEA,aAAA,CAAA,GAAAW,GAAA,GAAAC,CAAA;AAAA,IAAyC,CAAA,GAG7CC,IAAArB,EAAA,MAAA;AAAA,MAAmE;AAAA,QAC/D,OAAAL,EAAA,MAAA;AAAA,QACmB,OAAA,MAAAF,EAAA,MAAA;AAAA,MACS;AAAA,MAC5B;AAAA,QACA,OAAAE,EAAA,QAAA;AAAA,QACqB,SAAA;AAAA,QACR,OAAA,MAAAF,EAAA,QAAA;AAAA,MACiB;AAAA,IAC9B,CAAA,GAIJ6B,IAAA,YAAA;AACI,YAAAC,EAAA,GACAjB,EAAA,QAAAL,EAAA,MAAA,cAAA,KAAA,OAAAO,EAAA,QAAAC,EAAA,UAIID,EAAA,SAAA,GACAc,EAAA;AAAA,IACJ,GAGJE,IAAA,YAAA;AACI,YAAAD,EAAA,GACAjB,EAAA,QAAAL,EAAA,MAAA,cAAA,MAAAO,EAAA,QAAA,MACIA,EAAA,SAAA,GACAgB,EAAA;AAAA,IACJ;AAIJ,WAAAb;AAAA,MAAA,MAAAL,EAAA;AAAA,MACgB,OAAAmB,GAAAC,MAAA;AAGR,YADA,MAAAH,EAAA,GACA,CAAAtB,EAAA;AACI;AAEJ,cAAA0B,IAAAF,IAAAC;AACA,QAAApB,EAAA,QAAA,MACIE,EAAA,QAAA,IAAiCmB,IAEjCL,EAAA,IAEAE,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { createElementBlock as f, openBlock as o, mergeProps as L, createCommentVNode as c, createElementVNode as s, toDisplayString as V, defineComponent as N, useSlots as R, computed as n, onMounted as A, normalizeClass as P, createBlock as p, resolveDynamicComponent as D, unref as e, withCtx as _, renderSlot as v, createVNode as F } from "vue";
|
|
2
|
+
import { a as I, c as U, B as y } from "./typography.yBEME_Gu.js";
|
|
3
|
+
import { B as W } from "./button.C-MAa6ut.js";
|
|
4
|
+
import { C as M } from "./cross-small.n1UO5wNB.js";
|
|
5
|
+
import { W as Z } from "./warning-filled.BMGD0G-_.js";
|
|
6
|
+
import { C as j } from "./cross-circle-fill.CYLL7jfC.js";
|
|
7
|
+
import { C as q } from "./checkmark-circle-fill._6-d40ru.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import { _ as b } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
10
|
+
import { u as z } from "./use-has-slot.B7eQSabc.js";
|
|
11
|
+
import { u as J } from "./i18n.B6g5VX0q.js";
|
|
12
|
+
import "../assets/alert.css";
|
|
13
|
+
var m = /* @__PURE__ */ ((t) => (t.DEFAULT = "default", t.TIP = "tip", t))(m || {}), a = /* @__PURE__ */ ((t) => (t.WARNING = "warning", t.CRITICAL = "critical", t.HIGHLIGHT = "highlight", t.SUCCESS = "success", t))(a || {}), S = /* @__PURE__ */ ((t) => (t.CLOSE_ALERT = "close-alert", t))(S || {});
|
|
14
|
+
let H = 0;
|
|
15
|
+
const O = {
|
|
16
|
+
beforeCreate() {
|
|
17
|
+
this.uuid = H.toString(), H += 1;
|
|
18
|
+
}
|
|
19
|
+
}, Y = { key: 0 }, K = ["clip-path"], Q = ["id"];
|
|
20
|
+
function X(t, r, u, C, h, i) {
|
|
21
|
+
return o(), f("svg", L({ role: "img" }, t.$attrs, {
|
|
22
|
+
class: "ui-assets-icons-16",
|
|
23
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24
|
+
width: "16",
|
|
25
|
+
height: "16",
|
|
26
|
+
fill: "none"
|
|
27
|
+
}), [
|
|
28
|
+
t.$attrs["svg-title"] ? (o(), f("title", Y, V(t.$attrs["svg-title"]), 1)) : c("", !0),
|
|
29
|
+
s("g", {
|
|
30
|
+
"clip-path": "url(#uia-ui-assets/icons-16-info_filled__a" + t.uuid + ")"
|
|
31
|
+
}, r[0] || (r[0] = [
|
|
32
|
+
s("path", {
|
|
33
|
+
fill: "#001222",
|
|
34
|
+
"fill-rule": "evenodd",
|
|
35
|
+
d: "M5.03418 0.839544C6.45015 0.253058 8.00853 0.0992122 9.51172 0.398138C11.015 0.697159 12.3966 1.43547 13.4805 2.51923C14.5642 3.60301 15.3025 4.98476 15.6016 6.48798C15.9005 7.99113 15.7466 9.54958 15.1602 10.9655C14.5736 12.3816 13.5801 13.5925 12.3057 14.444C11.1109 15.2423 9.71924 15.6917 8.28711 15.7448L8 15.7497C5.94458 15.7497 3.97294 14.9336 2.51953 13.4802C1.06623 12.0268 0.250005 10.055 0.25 7.9997C0.250066 6.4671 0.70424 4.96838 1.55566 3.69404C2.40724 2.41967 3.61814 1.42609 5.03418 0.839544ZM6.25 6.2497V7.7497H7.25V10.2497H6.25V11.7497H9.75V10.2497H8.75V6.2497H6.25ZM7.75 3.4997C7.58674 3.4997 7.42763 3.54211 7.28418 3.61786C7.25386 3.63389 7.22303 3.64949 7.19434 3.66865L7.07812 3.75947C7.04744 3.78732 7.01817 3.817 6.99121 3.84833C6.97917 3.86236 6.96827 3.8776 6.95703 3.89228C6.93942 3.91522 6.9228 3.93915 6.90723 3.96357C6.90005 3.97485 6.89248 3.98618 6.88574 3.99775C6.86351 4.03594 6.84324 4.07574 6.82617 4.11689L6.78027 4.25751C6.77017 4.29795 6.7628 4.33927 6.75781 4.38056C6.75552 4.39961 6.75411 4.41902 6.75293 4.43818C6.75166 4.45856 6.75196 4.47926 6.75195 4.4997C6.75195 4.52207 6.75144 4.54472 6.75293 4.56708C6.75579 4.60979 6.76114 4.65273 6.76953 4.69501L6.80859 4.83661C6.82299 4.87685 6.84098 4.91584 6.86035 4.9538C6.86847 4.96971 6.87775 4.98522 6.88672 5.00068C6.89748 5.01922 6.90895 5.03753 6.9209 5.05536C6.93323 5.07376 6.94544 5.09248 6.95898 5.11005C6.98495 5.14371 7.01269 5.17643 7.04297 5.20673L7.1543 5.30341C7.19021 5.33003 7.2285 5.35325 7.26758 5.3747C7.27775 5.38031 7.28847 5.38508 7.29883 5.39033C7.32903 5.40554 7.35995 5.41924 7.3916 5.43134C7.40264 5.43559 7.41361 5.44018 7.4248 5.44404C7.46721 5.45855 7.51041 5.47134 7.55469 5.48017C7.59672 5.48853 7.63919 5.49291 7.68164 5.49579C7.70021 5.49707 7.71872 5.49751 7.7373 5.49775C7.76179 5.49804 7.78614 5.49729 7.81055 5.49579C7.82982 5.49462 7.84899 5.4932 7.86816 5.49091C7.90982 5.48592 7.95139 5.47962 7.99219 5.46943L8.13281 5.42353C8.1739 5.40649 8.21283 5.38517 8.25098 5.36298C8.2626 5.35623 8.27383 5.3487 8.28516 5.3415C8.30964 5.32589 8.33345 5.30934 8.35645 5.29169C8.37116 5.28043 8.38633 5.26958 8.40039 5.25751C8.43176 5.23053 8.46235 5.20229 8.49023 5.17158L8.58105 5.05536C8.69084 4.89096 8.75 4.6974 8.75 4.4997C8.74992 4.2346 8.64449 3.98013 8.45703 3.79267C8.26951 3.60523 8.01514 3.4997 7.75 3.4997Z",
|
|
36
|
+
"clip-rule": "evenodd"
|
|
37
|
+
}, null, -1)
|
|
38
|
+
]), 8, K),
|
|
39
|
+
s("defs", null, [
|
|
40
|
+
s("clipPath", {
|
|
41
|
+
id: "uia-ui-assets/icons-16-info_filled__a" + t.uuid
|
|
42
|
+
}, r[1] || (r[1] = [
|
|
43
|
+
s("rect", {
|
|
44
|
+
width: "16",
|
|
45
|
+
height: "16",
|
|
46
|
+
fill: "#fff"
|
|
47
|
+
}, null, -1)
|
|
48
|
+
]), 8, Q)
|
|
49
|
+
])
|
|
50
|
+
], 16);
|
|
51
|
+
}
|
|
52
|
+
const x = /* @__PURE__ */ b(O, [["render", X]]), T = {
|
|
53
|
+
"en-US": {
|
|
54
|
+
close: "Close",
|
|
55
|
+
criticalIcon: "Critical icon",
|
|
56
|
+
highlightIcon: "Highlight icon",
|
|
57
|
+
successIcon: "Success icon",
|
|
58
|
+
warningIcon: "Warning icon"
|
|
59
|
+
},
|
|
60
|
+
"ja-JP": {
|
|
61
|
+
close: "閉じる"
|
|
62
|
+
},
|
|
63
|
+
"pt-BR": {
|
|
64
|
+
close: "Fechar"
|
|
65
|
+
}
|
|
66
|
+
}, t5 = ["role"], e5 = { class: "b-alert__icon" }, o5 = { class: "b-alert__content" }, s5 = {
|
|
67
|
+
key: 2,
|
|
68
|
+
class: "b-alert__actions",
|
|
69
|
+
"data-testid": "alert-actions"
|
|
70
|
+
}, i5 = {
|
|
71
|
+
i18n: { messages: T },
|
|
72
|
+
name: "bento-alert"
|
|
73
|
+
}, a5 = /* @__PURE__ */ N({
|
|
74
|
+
...i5,
|
|
75
|
+
props: {
|
|
76
|
+
closeButton: { type: Boolean, default: !1 },
|
|
77
|
+
type: { default: a.HIGHLIGHT },
|
|
78
|
+
variant: { default: m.DEFAULT }
|
|
79
|
+
},
|
|
80
|
+
emits: ["close-alert"],
|
|
81
|
+
setup(t, { emit: r }) {
|
|
82
|
+
const u = R(), C = z(u), h = r, i = t, { t: g } = J({ messages: T }), l = n(() => i.variant === m.TIP), $ = n(() => ({
|
|
83
|
+
[`b-alert--${i.type}`]: i.type,
|
|
84
|
+
[`b-alert--${m.TIP}`]: l.value
|
|
85
|
+
})), w = n(() => g(`${i.type}Icon`)), B = n(() => {
|
|
86
|
+
switch (i.type) {
|
|
87
|
+
case a.CRITICAL:
|
|
88
|
+
return j;
|
|
89
|
+
case a.SUCCESS:
|
|
90
|
+
return q;
|
|
91
|
+
case a.WARNING:
|
|
92
|
+
return Z;
|
|
93
|
+
case a.HIGHLIGHT:
|
|
94
|
+
default:
|
|
95
|
+
return x;
|
|
96
|
+
}
|
|
97
|
+
}), k = n(() => ({
|
|
98
|
+
el: U.DIV,
|
|
99
|
+
variant: l.value ? I.CAPTION : I.BODY,
|
|
100
|
+
wide: !0
|
|
101
|
+
})), E = n(() => i.type === a.HIGHLIGHT ? "status" : "alert"), G = () => {
|
|
102
|
+
h(S.CLOSE_ALERT);
|
|
103
|
+
};
|
|
104
|
+
return A(() => {
|
|
105
|
+
if (!u.default && !u.description)
|
|
106
|
+
throw new Error("Alert Component requires a title or a description");
|
|
107
|
+
}), (d, r5) => (o(), f("div", {
|
|
108
|
+
class: "b-alert",
|
|
109
|
+
role: E.value
|
|
110
|
+
}, [
|
|
111
|
+
s("div", {
|
|
112
|
+
class: P(["b-alert__inner-container", $.value])
|
|
113
|
+
}, [
|
|
114
|
+
s("div", e5, [
|
|
115
|
+
(o(), p(D(B.value), {
|
|
116
|
+
"aria-hidden": "true",
|
|
117
|
+
"svg-title": w.value
|
|
118
|
+
}, null, 8, ["svg-title"]))
|
|
119
|
+
]),
|
|
120
|
+
s("div", o5, [
|
|
121
|
+
e(C)("default") && !l.value ? (o(), p(e(y), {
|
|
122
|
+
key: 0,
|
|
123
|
+
class: "b-alert__title",
|
|
124
|
+
el: "div",
|
|
125
|
+
variant: "body",
|
|
126
|
+
strongest: "",
|
|
127
|
+
wide: ""
|
|
128
|
+
}, {
|
|
129
|
+
default: _(() => [
|
|
130
|
+
v(d.$slots, "default", {}, void 0, !0)
|
|
131
|
+
]),
|
|
132
|
+
_: 3
|
|
133
|
+
})) : c("", !0),
|
|
134
|
+
e(C)("description") ? (o(), p(e(y), L({
|
|
135
|
+
key: 1,
|
|
136
|
+
class: "b-alert__description"
|
|
137
|
+
}, k.value, { "data-testid": "alert-description" }), {
|
|
138
|
+
default: _(() => [
|
|
139
|
+
v(d.$slots, "description", {}, void 0, !0)
|
|
140
|
+
]),
|
|
141
|
+
_: 3
|
|
142
|
+
}, 16)) : c("", !0),
|
|
143
|
+
e(C)("actions") && !l.value ? (o(), f("div", s5, [
|
|
144
|
+
v(d.$slots, "actions", {}, void 0, !0)
|
|
145
|
+
])) : c("", !0)
|
|
146
|
+
]),
|
|
147
|
+
d.closeButton && !l.value ? (o(), p(e(W), {
|
|
148
|
+
key: 0,
|
|
149
|
+
class: "b-alert__close-button",
|
|
150
|
+
variant: "tertiary",
|
|
151
|
+
type: "button",
|
|
152
|
+
onClick: G
|
|
153
|
+
}, {
|
|
154
|
+
default: _(() => [
|
|
155
|
+
F(e(M), {
|
|
156
|
+
"svg-title": e(g)("close")
|
|
157
|
+
}, null, 8, ["svg-title"])
|
|
158
|
+
]),
|
|
159
|
+
_: 1
|
|
160
|
+
})) : c("", !0)
|
|
161
|
+
], 2)
|
|
162
|
+
], 8, t5));
|
|
163
|
+
}
|
|
164
|
+
}), h5 = /* @__PURE__ */ b(a5, [["__scopeId", "data-v-5c5a81b8"]]);
|
|
165
|
+
export {
|
|
166
|
+
h5 as B,
|
|
167
|
+
m as a,
|
|
168
|
+
a as b,
|
|
169
|
+
S as c
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=alert.Dzx5MzgE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.Dzx5MzgE.js","sources":["../../../vue2/src/components/alert/alert.types.ts","../../../ui-assets/icons-16/dist/vue/info-filled.vue","../../../vue2/src/components/alert/alert.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertVariant {\n DEFAULT = 'default',\n TIP = 'tip',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertTypeOption {\n WARNING = 'warning',\n CRITICAL = 'critical',\n HIGHLIGHT = 'highlight',\n SUCCESS = 'success',\n}\n\n/**\n * @deprecated from version 2.0.0. Use \"@close-alert\" instead.\n */\nexport enum BentoAlertEvent {\n CLOSE_ALERT = 'close-alert',\n}\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><g :clip-path=\"'url(#uia-ui-assets/icons-16-info_filled__a' + uuid + ')'\"><path fill=\"#001222\" fill-rule=\"evenodd\" d=\"M5.03418 0.839544C6.45015 0.253058 8.00853 0.0992122 9.51172 0.398138C11.015 0.697159 12.3966 1.43547 13.4805 2.51923C14.5642 3.60301 15.3025 4.98476 15.6016 6.48798C15.9005 7.99113 15.7466 9.54958 15.1602 10.9655C14.5736 12.3816 13.5801 13.5925 12.3057 14.444C11.1109 15.2423 9.71924 15.6917 8.28711 15.7448L8 15.7497C5.94458 15.7497 3.97294 14.9336 2.51953 13.4802C1.06623 12.0268 0.250005 10.055 0.25 7.9997C0.250066 6.4671 0.70424 4.96838 1.55566 3.69404C2.40724 2.41967 3.61814 1.42609 5.03418 0.839544ZM6.25 6.2497V7.7497H7.25V10.2497H6.25V11.7497H9.75V10.2497H8.75V6.2497H6.25ZM7.75 3.4997C7.58674 3.4997 7.42763 3.54211 7.28418 3.61786C7.25386 3.63389 7.22303 3.64949 7.19434 3.66865L7.07812 3.75947C7.04744 3.78732 7.01817 3.817 6.99121 3.84833C6.97917 3.86236 6.96827 3.8776 6.95703 3.89228C6.93942 3.91522 6.9228 3.93915 6.90723 3.96357C6.90005 3.97485 6.89248 3.98618 6.88574 3.99775C6.86351 4.03594 6.84324 4.07574 6.82617 4.11689L6.78027 4.25751C6.77017 4.29795 6.7628 4.33927 6.75781 4.38056C6.75552 4.39961 6.75411 4.41902 6.75293 4.43818C6.75166 4.45856 6.75196 4.47926 6.75195 4.4997C6.75195 4.52207 6.75144 4.54472 6.75293 4.56708C6.75579 4.60979 6.76114 4.65273 6.76953 4.69501L6.80859 4.83661C6.82299 4.87685 6.84098 4.91584 6.86035 4.9538C6.86847 4.96971 6.87775 4.98522 6.88672 5.00068C6.89748 5.01922 6.90895 5.03753 6.9209 5.05536C6.93323 5.07376 6.94544 5.09248 6.95898 5.11005C6.98495 5.14371 7.01269 5.17643 7.04297 5.20673L7.1543 5.30341C7.19021 5.33003 7.2285 5.35325 7.26758 5.3747C7.27775 5.38031 7.28847 5.38508 7.29883 5.39033C7.32903 5.40554 7.35995 5.41924 7.3916 5.43134C7.40264 5.43559 7.41361 5.44018 7.4248 5.44404C7.46721 5.45855 7.51041 5.47134 7.55469 5.48017C7.59672 5.48853 7.63919 5.49291 7.68164 5.49579C7.70021 5.49707 7.71872 5.49751 7.7373 5.49775C7.76179 5.49804 7.78614 5.49729 7.81055 5.49579C7.82982 5.49462 7.84899 5.4932 7.86816 5.49091C7.90982 5.48592 7.95139 5.47962 7.99219 5.46943L8.13281 5.42353C8.1739 5.40649 8.21283 5.38517 8.25098 5.36298C8.2626 5.35623 8.27383 5.3487 8.28516 5.3415C8.30964 5.32589 8.33345 5.30934 8.35645 5.29169C8.37116 5.28043 8.38633 5.26958 8.40039 5.25751C8.43176 5.23053 8.46235 5.20229 8.49023 5.17158L8.58105 5.05536C8.69084 4.89096 8.75 4.6974 8.75 4.4997C8.74992 4.2346 8.64449 3.98013 8.45703 3.79267C8.26951 3.60523 8.01514 3.4997 7.75 3.4997Z\" clip-rule=\"evenodd\"/></g><defs><clipPath :id=\"'uia-ui-assets/icons-16-info_filled__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <div class=\"b-alert\" :role=\"computedRole\">\n <div class=\"b-alert__inner-container\" :class=\"alertConditionalClasses\">\n <div class=\"b-alert__icon\">\n <component :is=\"iconComponent\" aria-hidden=\"true\" :svg-title=\"iconSvgTitle\" />\n </div>\n\n <div class=\"b-alert__content\">\n <bento-typography\n v-if=\"hasSlot('default') && !isTipVariant\"\n class=\"b-alert__title\"\n el=\"div\"\n variant=\"body\"\n strongest\n wide\n >\n <slot />\n </bento-typography>\n\n <bento-typography\n v-if=\"hasSlot('description')\"\n class=\"b-alert__description\"\n v-bind=\"descriptionTypography\"\n data-testid=\"alert-description\"\n >\n <slot name=\"description\" />\n </bento-typography>\n\n <div v-if=\"hasSlot('actions') && !isTipVariant\" class=\"b-alert__actions\" data-testid=\"alert-actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n\n <bento-button\n v-if=\"closeButton && !isTipVariant\"\n class=\"b-alert__close-button\"\n variant=\"tertiary\"\n type=\"button\"\n @click=\"onCloseButtonClick\"\n >\n <cross-small :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n\n // Component\n import { BentoAlertEvent, BentoAlertTypeOption, BentoAlertVariant } from '@/components/alert/alert.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n\n import CrossSmall from '@adyen/ui-assets-icons-16/vue/cross-small';\n import Warning from '@adyen/ui-assets-icons-16/vue/warning-filled';\n import CrossCircle from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CheckedCircle from '@adyen/ui-assets-icons-16/vue/checkmark-circle-fill';\n import Info from '@adyen/ui-assets-icons-16/vue/info-filled';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits<{\n /**\n * Emits event when the alert is closed. `closeButton` must be `true`\n */\n (e: 'close-alert');\n }>();\n\n const props = withDefaults(\n defineProps<{\n /**\n * Adds a close button on the right side of the alert\n */\n closeButton?: boolean;\n\n /**\n * Type of a alert; set a distinctive icon and color. Defaults to highlight.\n * @values HIGHLIGHT, SUCCESS, CRITICAL, WARNING\n */\n type?: BentoAlertTypeOption | `${BentoAlertTypeOption}`;\n\n /**\n * Variant for the alert\n * @values DEFAULT, TIP\n */\n variant?: BentoAlertVariant | `${BentoAlertVariant}`;\n }>(),\n {\n closeButton: false,\n type: BentoAlertTypeOption.HIGHLIGHT,\n variant: BentoAlertVariant.DEFAULT,\n }\n );\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isTipVariant = computed(() => props.variant === BentoAlertVariant.TIP);\n\n const alertConditionalClasses = computed(() => ({\n [`b-alert--${props.type}`]: props.type,\n [`b-alert--${BentoAlertVariant.TIP}`]: isTipVariant.value,\n }));\n\n const iconSvgTitle = computed(() => t(`${props.type}Icon`));\n\n const iconComponent = computed(() => {\n switch (props.type) {\n case BentoAlertTypeOption.CRITICAL:\n return CrossCircle;\n case BentoAlertTypeOption.SUCCESS:\n return CheckedCircle;\n case BentoAlertTypeOption.WARNING:\n return Warning;\n case BentoAlertTypeOption.HIGHLIGHT:\n default:\n return Info;\n }\n });\n\n const descriptionTypography = computed(() => ({\n el: BentoTypographyElement.DIV,\n variant: isTipVariant.value ? BentoTypographyVariant.CAPTION : BentoTypographyVariant.BODY,\n wide: true,\n }));\n\n const computedRole = computed(() => (props.type === BentoAlertTypeOption.HIGHLIGHT ? 'status' : 'alert'));\n\n const onCloseButtonClick = () => {\n emit(BentoAlertEvent.CLOSE_ALERT);\n };\n\n onMounted(() => {\n if (!slots.default && !slots.description) {\n throw new Error('Alert Component requires a title or a description');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * An Alert component is used to display a persistent\n * notification containing information important to the user\n *\n * @example\n * import { BentoAlert, BentoAlertTypeOption } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAlert },\n * template: `\n * <bento-alert type=\"highlight\">\n * Title of the Alert\n * </bento-alert>\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-alert',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./alert.scss\" />\n"],"names":["BentoAlertVariant","BentoAlertVariant2","BentoAlertTypeOption","BentoAlertTypeOption2","BentoAlertEvent","BentoAlertEvent2","uuid","_hoisted_2$1","_hoisted_3$1","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","__default__","messages","slots","useSlots","hasSlot","useHasSlot","emit","__emit","props","__props","t","useI18n","isTipVariant","computed","alertConditionalClasses","iconSvgTitle","iconComponent","CrossCircleFillIcon","CheckmarkCircleFillIcon","WarningFilledIcon","Info","descriptionTypography","BentoTypographyElement","BentoTypographyVariant","computedRole","onCloseButtonClick","onMounted"],"mappings":";;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,UAAA,WAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,cAAA,eADQA,IAAAD,KAAA,CAAA,CAAA;ACdR,IAAAE,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;mBAZZC,IAAA,CAAA,WAAA,GAAAC,IAAA,CAAA,IAAA;;AAEI,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAA2B,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;gFAFzHC,EAAA,IAAA,EAAA;AAAA;MAE4M,aAAA,+CAAAD,EAAA,OAAA;AAAA;;QAA4E,MAAA;AAAA,QAAe,aAAA;AAAA,QAAoB,GAAA;AAAA,QAAwyE,aAAA;AAAA;IAFnmF,IAAA,GAAAL,CAAA;AAAA;;QAE6oF,IAAA,0CAAAK,EAAA;AAAA;;UAA0D,OAAA;AAAA,UAAW,QAAA;AAAA,UAAY,MAAA;AAAA;MAF9tF,IAAA,GAAAJ,CAAA;AAAA;;;;;;;;;;;;;;;;;;;;;GCqKIM,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;AApGA,UAAAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,GAOAC,IAAAC,GA0BA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAV,EAAA,CAAA,GAEAW,IAAAC,EAAA,MAAAL,EAAA,YAAAtB,EAAA,GAAA,GAEA4B,IAAAD,EAAA,OAAA;AAAA,MAAgD,CAAA,YAAAL,EAAA,IAAA,EAAA,GAAAA,EAAA;AAAA,MACV,CAAA,YAAAtB,EAAA,GAAA,EAAA,GAAA0B,EAAA;AAAA,IACkB,EAAA,GAGxDG,IAAAF,EAAA,MAAAH,EAAA,GAAAF,EAAA,IAAA,MAAA,CAAA,GAEAQ,IAAAH,EAAA,MAAA;AACI,cAAAL,EAAA,MAAA;AAAA,QAAoB,KAAApB,EAAA;AAEZ,iBAAA6B;AAAA,QAAO,KAAA7B,EAAA;AAEP,iBAAA8B;AAAA,QAAO,KAAA9B,EAAA;AAEP,iBAAA+B;AAAA,QAAO,KAAA/B,EAAA;AAAA,QACe;AAEtB,iBAAAgC;AAAA,MAAO;AAAA,IACf,CAAA,GAGJC,IAAAR,EAAA,OAAA;AAAA,MAA8C,IAAAS,EAAA;AAAA,MACf,SAAAV,EAAA,QAAAW,EAAA,UAAAA,EAAA;AAAA,MAC2D,MAAA;AAAA,IAChF,EAAA,GAGVC,IAAAX,EAAA,MAAAL,EAAA,SAAApB,EAAA,YAAA,WAAA,OAAA,GAEAqC,IAAA,MAAA;AACI,MAAAnB,EAAAhB,EAAA,WAAA;AAAA,IAAgC;AAGpC,WAAAoC,EAAA,MAAA;AACI,UAAA,CAAAxB,EAAA,WAAA,CAAAA,EAAA;AACI,cAAA,IAAA,MAAA,mDAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aria-label.CaUURpnB.js","sources":["../../../vue2/src/utils/ts/aria-label.ts"],"sourcesContent":["import { computed, ComputedRef, ref } from 'vue';\nimport { MaybeRef } from '@/types/maybe-ref';\n\ninterface ariaLabelOptions {\n ariaLabel?: MaybeRef<string | null>;\n label?: MaybeRef<string | null>;\n defaultFallback?: MaybeRef<string | null>;\n}\n\n/**\n * Returns a valid aria-label for the element it's invoked for\n * @param ariaLabel - The aria label, which has to be set manually through the homonymous prop\n * @param label - Any other label provided, usually the component's main text\n * @param defaultFallback - The default fallback if no other value is provided\n * @returns {string | null} - A string corresponding to the aria label or null if no value is provided\n */\nexport const useAriaLabel = ({\n ariaLabel = null,\n label = null,\n defaultFallback = null,\n}: ariaLabelOptions): ComputedRef<string> => {\n const computedAriaLabel = ref(ariaLabel);\n const computedLabel = ref(label);\n const computedDefaultFallback = ref(defaultFallback);\n\n return computed(() => computedAriaLabel.value ?? computedLabel.value ?? computedDefaultFallback.value);\n};\n"],"names":["useAriaLabel","ariaLabel","label","defaultFallback","computedAriaLabel","ref","computedLabel","computedDefaultFallback","computed"],"mappings":";AAgBO,MAAMA,IAAe,CAAC;AAAA,EACzB,WAAAC,IAAY;AAAA,EACZ,OAAAC,IAAQ;AAAA,EACR,iBAAAC,IAAkB;AACtB,MAA6C;AACnC,QAAAC,IAAoBC,EAAIJ,CAAS,GACjCK,IAAgBD,EAAIH,CAAK,GACzBK,IAA0BF,EAAIF,CAAe;AAEnD,SAAOK,EAAS,MAAMJ,EAAkB,SAASE,EAAc,SAASC,EAAwB,KAAK;AACzG;"}
|
|
1
|
+
{"version":3,"file":"aria-label.CaUURpnB.js","sources":["../../../vue2/src/utils/ts/aria-label.ts"],"sourcesContent":["import { computed, type ComputedRef, ref } from 'vue';\nimport { type MaybeRef } from '@/types/maybe-ref';\n\ninterface ariaLabelOptions {\n ariaLabel?: MaybeRef<string | null>;\n label?: MaybeRef<string | null>;\n defaultFallback?: MaybeRef<string | null>;\n}\n\n/**\n * Returns a valid aria-label for the element it's invoked for\n * @param ariaLabel - The aria label, which has to be set manually through the homonymous prop\n * @param label - Any other label provided, usually the component's main text\n * @param defaultFallback - The default fallback if no other value is provided\n * @returns {string | null} - A string corresponding to the aria label or null if no value is provided\n */\nexport const useAriaLabel = ({\n ariaLabel = null,\n label = null,\n defaultFallback = null,\n}: ariaLabelOptions): ComputedRef<string> => {\n const computedAriaLabel = ref(ariaLabel);\n const computedLabel = ref(label);\n const computedDefaultFallback = ref(defaultFallback);\n\n return computed(() => computedAriaLabel.value ?? computedLabel.value ?? computedDefaultFallback.value);\n};\n"],"names":["useAriaLabel","ariaLabel","label","defaultFallback","computedAriaLabel","ref","computedLabel","computedDefaultFallback","computed"],"mappings":";AAgBO,MAAMA,IAAe,CAAC;AAAA,EACzB,WAAAC,IAAY;AAAA,EACZ,OAAAC,IAAQ;AAAA,EACR,iBAAAC,IAAkB;AACtB,MAA6C;AACnC,QAAAC,IAAoBC,EAAIJ,CAAS,GACjCK,IAAgBD,EAAIH,CAAK,GACzBK,IAA0BF,EAAIF,CAAe;AAEnD,SAAOK,EAAS,MAAMJ,EAAkB,SAASE,EAAc,SAASC,EAAwB,KAAK;AACzG;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as k, computed as r, defineComponent as _, toRefs as f, createElementBlock as i, openBlock as l, normalizeClass as R, createVNode as b, unref as n, withCtx as L, createTextVNode as h, toDisplayString as y, createBlock as B, createCommentVNode as S } from "vue";
|
|
2
|
-
import { B as E } from "./typography.
|
|
2
|
+
import { B as E } from "./typography.yBEME_Gu.js";
|
|
3
3
|
import { _ as g } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
4
4
|
import "../assets/avatar.css";
|
|
5
5
|
const O = (a) => {
|
|
@@ -91,4 +91,4 @@ const N = ["src"], U = {
|
|
|
91
91
|
export {
|
|
92
92
|
V as B
|
|
93
93
|
};
|
|
94
|
-
//# sourceMappingURL=avatar.
|
|
94
|
+
//# sourceMappingURL=avatar.Dq59yj6m.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.Dq59yj6m.js","sources":["../../../vue2/src/composables/initials.ts","../../../vue2/src/components/avatar/components/avatar-image/avatar-image.types.ts","../../../vue2/src/components/avatar/components/avatar-image/avatar-image.vue","../../../vue2/src/components/avatar/avatar.vue"],"sourcesContent":["import { computed, type ComputedRef, ref } from 'vue';\nimport { type MaybeRef } from '@/types';\n\n/** Extracts the first letter of a username\n * @param username - The name to return the initials of\n * Common patterns:\n * 1. John => J\n * 2. John Smith => J\n * John Smith Doe Holly => J\n */\nexport const useInitials = (username: MaybeRef<string | null>): ComputedRef<string | null> => {\n const computedUsername = ref(username);\n return computed(() => (computedUsername.value ? computedUsername.value.trim().charAt(0).toUpperCase() : null));\n};\n","export enum BentoAvatarImageVariant {\n LARGE = 'large',\n SMALL = 'small',\n}\n\nexport enum BentoAvatarImageColor {\n BLUE = 'blue',\n GREEN = 'green',\n RED = 'red',\n YELLOW = 'yellow',\n}\n","<template>\n <div class=\"b-avatar-image\" :class=\"conditionalClasses\" aria-hidden=\"true\" data-testid=\"avatar\">\n <img v-if=\"src\" :src=\"src\" class=\"b-avatar-image__image\" alt=\"\" data-testid=\"avatar-content\" />\n <div v-else class=\"b-avatar-image__default\" data-testid=\"avatar-content\">\n <bento-typography el=\"span\" variant=\"body\" strongest>\n {{ initials }}\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, toRefs } from 'vue';\n import { BentoAvatarImageColor, BentoAvatarImageVariant } from './avatar-image.types';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Avatar color. Defaults to yellow.\n */\n color?: BentoAvatarImageColor;\n\n /**\n * Image src to load the profile picture.\n */\n src?: string;\n\n /**\n * Name of the user that will be used to extract initials to display default value.\n * John => J\n * John Smith => JS\n * John Smith Doe => JD\n * John Smith Doe Holly => JH\n */\n username?: string;\n\n /**\n * Variants supported for small and large.\n * Default - large\n */\n variant?: BentoAvatarImageVariant;\n }>(),\n {\n color: BentoAvatarImageColor.YELLOW,\n src: null,\n username: null,\n variant: BentoAvatarImageVariant.LARGE,\n }\n );\n\n const { username } = toRefs(props);\n const initials = useInitials(username);\n\n const conditionalClasses = computed(() => ({\n [`b-avatar-image--${BentoAvatarImageVariant.SMALL}`]: props.variant === BentoAvatarImageVariant.SMALL,\n [`b-avatar-image--${props.color}`]: props.color,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Image used as user profile inside bento-avatar.\n *\n * @example\n * import { AvatarImage } from './components/avatar-image';\n *\n * export default {\n * components: { AvatarImage },\n * template: `<avatar-image :src=\"userAvatarSrc\" username=\"Jane\" />`\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar-image.scss\" />\n","<template>\n <div class=\"b-avatar\" :aria-label=\"computedAriaLabel\">\n <avatar-image\n :src=\"src\"\n :username=\"computedUsername\"\n :variant=\"BentoAvatarImageVariant.SMALL\"\n :color=\"avatarColor\"\n />\n <bento-typography v-if=\"!iconOnly\" class=\"b-avatar__label\" el=\"span\" variant=\"body\">\n {{ username }}\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, toRefs } from 'vue';\n import { AvatarImage, BentoAvatarImageColor, BentoAvatarImageVariant } from './components/avatar-image';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Displays the user profile without the label.\n */\n iconOnly?: boolean;\n\n /**\n * Image src to load the profile picture.\n */\n src?: string;\n\n /**\n * Name of the user that will be used both in the label and to extract initials to display default value.\n * John => J\n * John Smith => JS\n * John Smith Doe => JD\n * John Smith Doe Holly => JH\n */\n username: string;\n }>(),\n {\n iconOnly: false,\n src: null,\n }\n );\n\n const { username } = toRefs(props);\n\n const computedAriaLabel = computed(() => (props.iconOnly ? props.username : null));\n const computedUsername = computed(() => (!props.src ? props.username : null));\n const initials = useInitials(username);\n\n // Returns the UTF-16 char code\n const charCode = computed(() => (initials.value ? initials.value.charCodeAt(0) - 65 : null));\n\n // Returns a computed color based on the letter passed\n const avatarColor = computed(() => {\n const numberOfAlphabetLetters = 26;\n const numberOfColors = Object.keys(BentoAvatarImageColor).length;\n const rangeStep = numberOfAlphabetLetters / numberOfColors;\n\n if (charCode.value <= rangeStep) {\n return BentoAvatarImageColor.YELLOW;\n }\n if (charCode.value <= rangeStep * 2) {\n return BentoAvatarImageColor.BLUE;\n }\n if (charCode.value <= rangeStep * 3) {\n return BentoAvatarImageColor.GREEN;\n }\n return BentoAvatarImageColor.RED;\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Displays an user profile including an avatar and optionally a label.\n *\n * @example\n * import { BentoAvatar } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAvatar },\n * template: `<bento-avatar :src=\"userAvatarSrc\" username=\"Jane\" />`\n * }\n */\n export default {\n name: 'bento-avatar',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar.scss\" />\n"],"names":["useInitials","username","computedUsername","ref","computed","BentoAvatarImageVariant","BentoAvatarImageVariant2","BentoAvatarImageColor","BentoAvatarImageColor2","__default__$1","props","__props","toRefs","initials","conditionalClasses","__default__","computedAriaLabel","charCode","avatarColor","rangeStep"],"mappings":";;;;AAUa,MAAAA,IAAA,CAAAC,MAAA;AACT,QAAAC,IAAAC,EAAAF,CAAA;AACA,SAAAG,EAAA,MAAAF,EAAA,QAAAA,EAAA,MAAA,KAAA,EAAA,OAAA,CAAA,EAAA,YAAA,IAAA,IAAA;AACJ;ACbY,IAAAG,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,MAAA,OACAA,EAAA,SAAA,UAJQA,IAAAD,KAAA,CAAA,CAAA;;;;;GCoERE,IAAA,CAAA;;;;;;;;;;AAxDA,UAAAC,IAAAC,GAmCA,EAAA,UAAAV,EAAA,IAAAW,EAAAF,CAAA,GACAG,IAAAb,EAAAC,CAAA,GAEAa,IAAAV,EAAA,OAAA;AAAA,MAA2C,CAAA,mBAAAC,EAAA,KAAA,EAAA,GAAAK,EAAA,YAAAL,EAAA;AAAA,MACyD,CAAA,mBAAAK,EAAA,KAAA,EAAA,GAAAA,EAAA;AAAA,IACtD,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;sFC8B9CK,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;AArEA,UAAAL,IAAAC,GA2BA,EAAA,UAAAV,EAAA,IAAAW,EAAAF,CAAA,GAEAM,IAAAZ,EAAA,MAAAM,EAAA,WAAAA,EAAA,WAAA,IAAA,GACAR,IAAAE,EAAA,MAAAM,EAAA,MAAA,OAAAA,EAAA,QAAA,GACAG,IAAAb,EAAAC,CAAA,GAGAgB,IAAAb,EAAA,MAAAS,EAAA,QAAAA,EAAA,MAAA,WAAA,CAAA,IAAA,KAAA,IAAA,GAGAK,IAAAd,EAAA,MAAA;AAGI,YAAAe,IAAA,KADA,OAAA,KAAAZ,CAAA,EAAA;AAGA,aAAAU,EAAA,SAAAE,IACIZ,EAAA,SAEJU,EAAA,SAAAE,IAAA,IACIZ,EAAA,OAEJU,EAAA,SAAAE,IAAA,IACIZ,EAAA,QAEJA,EAAA;AAAA,IAA6B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as B, computed as C, ref as m, resolveComponent as y, createElementBlock as l, openBlock as r, normalizeClass as S, createCommentVNode as u, createBlock as k, renderSlot as d, withCtx as g } from "vue";
|
|
2
|
-
import { B as h } from "./typography.
|
|
2
|
+
import { B as h } from "./typography.yBEME_Gu.js";
|
|
3
3
|
import { u as L } from "./use-has-slot.B7eQSabc.js";
|
|
4
4
|
import { _ as O } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
5
5
|
import "../assets/base-button.css";
|
|
6
|
-
var p = /* @__PURE__ */ ((t) => (t.DESTRUCTIVE = "critical", t.ICON_ONLY = "icon-only", t))(p || {}),
|
|
6
|
+
var p = /* @__PURE__ */ ((t) => (t.DESTRUCTIVE = "critical", t.ICON_ONLY = "icon-only", t))(p || {}), n = /* @__PURE__ */ ((t) => (t.BLUR = "blur", t.CLICK = "click", t.FOCUS = "focus", t.KEYDOWN_ESC = "keydown.esc", t))(n || {});
|
|
7
7
|
const R = B({
|
|
8
8
|
name: "base-button",
|
|
9
9
|
components: { BentoTypography: h },
|
|
@@ -32,12 +32,12 @@ const R = B({
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
emits: [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
n.CLICK,
|
|
36
|
+
n.FOCUS,
|
|
37
|
+
n.BLUR,
|
|
38
|
+
n.KEYDOWN_ESC
|
|
39
39
|
],
|
|
40
|
-
setup(t, { slots:
|
|
40
|
+
setup(t, { slots: e, emit: s, attrs: b }) {
|
|
41
41
|
const c = C(() => {
|
|
42
42
|
var o;
|
|
43
43
|
return {
|
|
@@ -45,7 +45,7 @@ const R = B({
|
|
|
45
45
|
};
|
|
46
46
|
}), f = m(null), i = C(() => ({
|
|
47
47
|
[`b-base-button--${p.DESTRUCTIVE}`]: t.critical,
|
|
48
|
-
[`b-base-button--${p.ICON_ONLY}`]: !
|
|
48
|
+
[`b-base-button--${p.ICON_ONLY}`]: !e.default
|
|
49
49
|
}));
|
|
50
50
|
return {
|
|
51
51
|
// Values
|
|
@@ -53,15 +53,15 @@ const R = B({
|
|
|
53
53
|
conditionalClasses: i,
|
|
54
54
|
// Methods
|
|
55
55
|
onClickButton: (o) => {
|
|
56
|
-
t.disabled ? (o.preventDefault(), o.stopPropagation()) : s(
|
|
56
|
+
t.disabled ? (o.preventDefault(), o.stopPropagation()) : s(n.CLICK, o);
|
|
57
57
|
},
|
|
58
58
|
onFocusButton: (o) => {
|
|
59
|
-
s(
|
|
59
|
+
s(n.FOCUS, o);
|
|
60
60
|
},
|
|
61
61
|
onBlurButton: (o) => {
|
|
62
|
-
s(
|
|
62
|
+
s(n.BLUR, o);
|
|
63
63
|
},
|
|
64
|
-
hasSlot: L(
|
|
64
|
+
hasSlot: L(e),
|
|
65
65
|
// Refs
|
|
66
66
|
bentoBaseButtonRef: f
|
|
67
67
|
};
|
|
@@ -75,7 +75,7 @@ const R = B({
|
|
|
75
75
|
class: "b-base-button__icon-right",
|
|
76
76
|
"data-testid": "icon-button-right"
|
|
77
77
|
};
|
|
78
|
-
function I(t,
|
|
78
|
+
function I(t, e, s, b, c, f) {
|
|
79
79
|
const i = y("bento-typography");
|
|
80
80
|
return r(), l("button", {
|
|
81
81
|
ref: "bentoBaseButtonRef",
|
|
@@ -83,9 +83,9 @@ function I(t, n, s, b, c, f) {
|
|
|
83
83
|
disabled: t.disabled,
|
|
84
84
|
type: t.type,
|
|
85
85
|
"aria-expanded": t.ariaAttributes["aria-expanded"],
|
|
86
|
-
onClick:
|
|
87
|
-
onFocus:
|
|
88
|
-
onBlur:
|
|
86
|
+
onClick: e[0] || (e[0] = (...a) => t.onClickButton && t.onClickButton(...a)),
|
|
87
|
+
onFocus: e[1] || (e[1] = (...a) => t.onFocusButton && t.onFocusButton(...a)),
|
|
88
|
+
onBlur: e[2] || (e[2] = (...a) => t.onBlurButton && t.onBlurButton(...a))
|
|
89
89
|
}, [
|
|
90
90
|
t.hasSlot("iconLeft") ? (r(), l("span", $, [
|
|
91
91
|
d(t.$slots, "iconLeft", {}, void 0, !0)
|
|
@@ -107,9 +107,9 @@ function I(t, n, s, b, c, f) {
|
|
|
107
107
|
])) : u("", !0)
|
|
108
108
|
], 42, _);
|
|
109
109
|
}
|
|
110
|
-
const T = /* @__PURE__ */ O(R, [["render", I], ["__scopeId", "data-v-
|
|
110
|
+
const T = /* @__PURE__ */ O(R, [["render", I], ["__scopeId", "data-v-2e257cc2"]]);
|
|
111
111
|
export {
|
|
112
112
|
T as B,
|
|
113
|
-
|
|
113
|
+
n as a
|
|
114
114
|
};
|
|
115
|
-
//# sourceMappingURL=base-button.
|
|
115
|
+
//# sourceMappingURL=base-button.CjYb5Y8k.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-button.CjYb5Y8k.js","sources":["../../../vue2/src/components/internal/base-button/base-button.types.ts","../../../vue2/src/components/internal/base-button/base-button.vue"],"sourcesContent":["export enum BentoBaseButtonPropClass {\n DESTRUCTIVE = 'critical',\n ICON_ONLY = 'icon-only',\n}\n\nexport enum BentoBaseButtonEvent {\n BLUR = 'blur',\n CLICK = 'click',\n FOCUS = 'focus',\n KEYDOWN_ESC = 'keydown.esc',\n}\n\nexport enum BaseButtonType {\n BUTTON = 'button',\n RESET = 'reset',\n SUBMIT = 'submit',\n}\n","<template>\n <button\n ref=\"bentoBaseButtonRef\"\n class=\"b-base-button\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n :type=\"type\"\n :aria-expanded=\"ariaAttributes['aria-expanded']\"\n @click=\"onClickButton\"\n @focus=\"onFocusButton\"\n @blur=\"onBlurButton\"\n >\n <span v-if=\"hasSlot('iconLeft')\" class=\"b-base-button__icon-left\" data-testid=\"icon-button-left\">\n <slot name=\"iconLeft\" />\n </span>\n <bento-typography v-if=\"hasSlot('default')\" el=\"span\" variant=\"body\" stronger class=\"b-base-button__label\">\n <slot />\n </bento-typography>\n <span v-if=\"hasSlot('iconRight')\" class=\"b-base-button__icon-right\" data-testid=\"icon-button-right\">\n <slot name=\"iconRight\" />\n </span>\n </button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, ref } from 'vue';\n import { BentoBaseButtonEvent, BentoBaseButtonPropClass } from './base-button.types';\n import type { ButtonHTMLAttributes } from 'vue/types/jsx.d.ts';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { type Booleanish } from '@/types';\n\n /**\n * Base button component to use as a base for all the various types of bento buttons. For internal use only.\n *\n * * @example\n * import { BaseButton, BaseButtonEvent } from '@/components/internal/base-button';\n * import YourImportedIcon from @adyen/ui-assets-icons-16/example-icon';\n *\n * export default {\n * components: { BaseButton, YourImportedIcon },\n * props: {\n * text:\n * },\n * template: `\n * <base-button class=\"your-custom-button-styles\" @click=\"onClick\">\n * <template #iconLeft><your-imported-icon></template>\n * Button text\n * <template #iconRight><your-imported-icon></template>\n * </base-button>\n * `,\n * emits: [BentoButtonEvent.CLICK],\n * setup: (prps, { emit }) => {\n * const onClick = value => emit(BaseButtonEvent.CLICK, value);\n *\n * return {\n * onClick,\n * };\n * }\n * }\n */\n export default defineComponent({\n name: 'base-button',\n components: { BentoTypography },\n props: {\n /**\n * Disables button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays button as critical\n */\n critical: {\n type: Boolean,\n default: false,\n },\n /**\n * The default behavior of the button.\n * Possible values are: 'button', 'reset', 'submit'\n */\n type: {\n type: String as PropType<ButtonHTMLAttributes['type']>,\n default: 'button',\n },\n },\n emits: [\n BentoBaseButtonEvent.CLICK,\n BentoBaseButtonEvent.FOCUS,\n BentoBaseButtonEvent.BLUR,\n BentoBaseButtonEvent.KEYDOWN_ESC,\n ],\n setup(props, { slots, emit, attrs }) {\n const ariaAttributes = computed(() => ({\n 'aria-expanded': attrs['aria-expanded']?.toString() as Booleanish,\n }));\n\n const bentoBaseButtonRef = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-base-button--${BentoBaseButtonPropClass.DESTRUCTIVE}`]: props.critical,\n [`b-base-button--${BentoBaseButtonPropClass.ICON_ONLY}`]: !slots.default,\n }));\n\n const onClickButton = (e: MouseEvent) => {\n if (!props.disabled) {\n emit(BentoBaseButtonEvent.CLICK, e);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n const onFocusButton = (e: FocusEvent) => {\n emit(BentoBaseButtonEvent.FOCUS, e);\n };\n\n const onBlurButton = (e: FocusEvent) => {\n emit(BentoBaseButtonEvent.BLUR, e);\n };\n\n return {\n // Values\n ariaAttributes,\n conditionalClasses,\n\n // Methods\n onClickButton,\n onFocusButton,\n onBlurButton,\n hasSlot: useHasSlot(slots),\n\n // Refs\n bentoBaseButtonRef,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-button.scss\" />\n"],"names":["BentoBaseButtonPropClass","BentoBaseButtonPropClass2","BentoBaseButtonEvent","BentoBaseButtonEvent2","_sfc_main","defineComponent","BentoTypography","props","slots","emit","attrs","ariaAttributes","computed","_a","bentoBaseButtonRef","ref","conditionalClasses","e","useHasSlot","_hoisted_1","openBlock","createElementBlock","normalizeClass","_ctx","_cache","args","renderSlot","createCommentVNode","createBlock","_component_bento_typography","_hoisted_3"],"mappings":";;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,cAAA,YACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,cAAA,eAJQA,IAAAD,KAAA,CAAA,CAAA;ACwDR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACwB,OAAA;AAAA;AAAA;AAAA;AAAA,IACvB,UAAA;AAAA,MAIO,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAIU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA;AAAA,IACb,MAAA;AAAA,MAKM,MAAA;AAAA,MACI,SAAA;AAAA,IACG;AAAA,EACb;AAAA,EACJ,OAAA;AAAA,IACOJ,EAAA;AAAA,IACkBA,EAAA;AAAA,IACAA,EAAA;AAAA,IACAA,EAAA;AAAA,EACA;AAAA,EACzB,MAAAK,GAAA,EAAA,OAAAC,GAAA,MAAAC,GAAA,OAAAC,EAAA,GAAA;AAEI,UAAAC,IAAAC,EAAA,MAAA;;AAAA;AAAA,QAAuC,kBAAAC,IAAAH,EAAA,eAAA,MAAA,gBAAAG,EAAA;AAAA,MACe;AAAA,KAAA,GAGtDC,IAAAC,EAAA,IAAA,GAEAC,IAAAJ,EAAA,OAAA;AAAA,MAA2C,CAAA,kBAAAZ,EAAA,WAAA,EAAA,GAAAO,EAAA;AAAA,MAC2B,CAAA,kBAAAP,EAAA,SAAA,EAAA,GAAA,CAAAQ,EAAA;AAAA,IACD,EAAA;AAoBrE,WAAA;AAAA;AAAA,MAAO,gBAAAG;AAAA,MAEH,oBAAAK;AAAA;AAAA,MACA,eApBJ,CAAAC,MAAA;AACI,QAAAV,EAAA,YAGIU,EAAA,eAAA,GACAA,EAAA,gBAAA,KAHAR,EAAAP,EAAA,OAAAe,CAAA;AAAA,MAIJ;AAAA,MAiBA,eAdJ,CAAAA,MAAA;AACI,QAAAR,EAAAP,EAAA,OAAAe,CAAA;AAAA,MAAkC;AAAA,MAclC,cAXJ,CAAAA,MAAA;AACI,QAAAR,EAAAP,EAAA,MAAAe,CAAA;AAAA,MAAiC;AAAA,MAWjC,SAAAC,EAAAV,CAAA;AAAA;AAAA,MACyB,oBAAAM;AAAA,IAGzB;AAAA,EACJ;AAER,CAAA,GA1IJK,IAAA,CAAA,YAAA,QAAA,eAAA;EAY+C,KAAA;AAAA,EAA2B,OAAA;AAAA;;EAM1B,KAAA;AAAA,EAA4B,OAAA;AAAA;;;;AAf/D,SAAAC,EAAA,GAAAC,EAAA,UAAA;AAAA,IACGL,KAAAA;AAAAA,IACP,OAAAM,EAAA,CAAA,iBAAAC,EAAA,kBAAA,CAAA;AAAA,IACU,UAAAA,EAAA;AAAA,IACG,MAAAA,EAAA;AAAA,IACR,iBAAAA,EAAA,eAAA,eAAA;AAAA,IACE,SAAAC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAF,EAAA,iBAAAA,EAAA,cAAA,GAAAE,CAAA;AAAA,IACW,SAAAD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAF,EAAA,iBAAAA,EAAA,cAAA,GAAAE,CAAA;AAAA;EAEA,GAAA;AAAA;MAZ3BC,EAAAH,EAAA,QAAA,YAAA,CAAA,GAAA,QAAA,EAAA;AAAA,IAAA,CAAA,KAAAI,EAAA,IAAA,EAAA;AAAA,IAiB2BJ,EAAA,QAAA,SAAA,KAAAH,EAAA,GAAAQ,EAAAC,GAAA;AAAA,MAFkC,KAAA;AAAA,MAAC,IAAA;AAAA,MAAe,SAAA;AAAA,MAAe,UAAA;AAAA,MAf5F,OAAA;AAAA,IAAA,GAAA;AAAA;QAAAH,EAAAH,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,MAAA,CAAA;AAAA,MAAA,GAAA;AAAA,IAAA,CAAA,KAAAI,EAAA,IAAA,EAAA;AAAA,IAkBQJ,EAAA,QAAA,WAAA,KAAAH,EAAA,GAAAC,EAAA,QAAAS,GAAA;AAAA,MAlBRJ,EAAAH,EAAA,QAAA,aAAA,CAAA,GAAA,QAAA,EAAA;AAAA,IAAA,CAAA,KAAAI,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as $, useSlots as ee, ref as g, computed as d, inject as ce, watch as Y, nextTick as re, onUnmounted as me, createBlock as P, openBlock as A, normalizeClass as J, createSlots as te, withCtx as l, createElementVNode as L, normalizeStyle as O, createCommentVNode as w, unref as t, renderSlot as c, createVNode as
|
|
2
|
-
import { B as be } from "./button.
|
|
3
|
-
import { B as he } from "./focus-trap.
|
|
1
|
+
import { defineComponent as $, useSlots as ee, ref as g, computed as d, inject as ce, watch as Y, nextTick as re, onUnmounted as me, createBlock as P, openBlock as A, normalizeClass as J, createSlots as te, withCtx as l, createElementVNode as L, normalizeStyle as O, createCommentVNode as w, unref as t, renderSlot as c, createVNode as j, useAttrs as ge, toRefs as ve, onMounted as pe, provide as G, createElementBlock as fe, withKeys as _e, withDirectives as ye } from "vue";
|
|
2
|
+
import { B as be } from "./button.C-MAa6ut.js";
|
|
3
|
+
import { B as he } from "./focus-trap.rjp24a37.js";
|
|
4
4
|
import { u as ae } from "./use-has-slot.B7eQSabc.js";
|
|
5
5
|
import { u as Le } from "./i18n.B6g5VX0q.js";
|
|
6
|
-
import {
|
|
6
|
+
import { j as Ae } from "./toggle-button.CQl9HneO.js";
|
|
7
7
|
import { g as Ce } from "./generate-uid.NJ8tVoha.js";
|
|
8
8
|
import { B as Ee } from "./directive.Cbdox5VL.js";
|
|
9
9
|
import { C as Ie } from "./cross.B92GxFTY.js";
|
|
10
|
-
import { D as Oe, B as Pe, b as Se, a as De } from "./dialog-page.
|
|
11
|
-
import { B as x } from "./typography.
|
|
12
|
-
import { F as ke } from "./footer-actions.
|
|
10
|
+
import { D as Oe, B as Pe, b as Se, a as De } from "./dialog-page.VSJgHY3C.js";
|
|
11
|
+
import { B as x } from "./typography.yBEME_Gu.js";
|
|
12
|
+
import { F as ke } from "./footer-actions.gRKTKGts.js";
|
|
13
13
|
import { o as Be } from "./resize.Bqks3WUm.js";
|
|
14
|
-
import { G as Te, a as Ne } from "./grid-layout.
|
|
14
|
+
import { G as Te, a as Ne } from "./grid-layout.DDaRNz4-.js";
|
|
15
15
|
import { _ as oe } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
16
16
|
import "../assets/base-modal.css";
|
|
17
|
-
var Ge = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.DIALOG = "dialog", e))(Ge || {}), we = /* @__PURE__ */ ((e) => (e.DEFAULT = "BentoModalDefault", e.DIALOG = "BentoModalDialog", e))(we || {}), R = /* @__PURE__ */ ((e) => (e.SMALL = "small", e.MEDIUM = "medium", e.LARGE = "large", e))(R || {}), k = /* @__PURE__ */ ((e) => (e.SMALLER = "smaller", e.EQUAL = "equal", e.BIGGER = "bigger", e))(k || {}),
|
|
17
|
+
var Ge = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.DIALOG = "dialog", e))(Ge || {}), we = /* @__PURE__ */ ((e) => (e.DEFAULT = "BentoModalDefault", e.DIALOG = "BentoModalDialog", e))(we || {}), R = /* @__PURE__ */ ((e) => (e.SMALL = "small", e.MEDIUM = "medium", e.LARGE = "large", e))(R || {}), k = /* @__PURE__ */ ((e) => (e.SMALLER = "smaller", e.EQUAL = "equal", e.BIGGER = "bigger", e))(k || {}), q = /* @__PURE__ */ ((e) => (e.DIALOG = "dialog", e.ALERT_DIALOG = "alertdialog", e))(q || {}), Re = /* @__PURE__ */ ((e) => (e.CONFIRMATION = "confirmation", e.DESTRUCTIVE = "destructive", e.INFO = "info", e.ACKNOWLEDGEMENT = "acknowledgement", e))(Re || {}), $e = /* @__PURE__ */ ((e) => (e.CLOSE_MODAL = "close-modal", e))($e || {});
|
|
18
18
|
const ne = {
|
|
19
19
|
"en-US": {
|
|
20
20
|
ariaLabelFallback: "modal",
|
|
@@ -145,7 +145,7 @@ const ne = {
|
|
|
145
145
|
style: O(i.value.header)
|
|
146
146
|
}, [
|
|
147
147
|
L("div", Me, [
|
|
148
|
-
|
|
148
|
+
j(t(x), {
|
|
149
149
|
class: "b-modal-page__title",
|
|
150
150
|
el: "span",
|
|
151
151
|
variant: "title",
|
|
@@ -181,7 +181,7 @@ const ne = {
|
|
|
181
181
|
class: "b-modal-page__actions-container",
|
|
182
182
|
style: O(i.value.actions)
|
|
183
183
|
}, [
|
|
184
|
-
|
|
184
|
+
j(t(ke), {
|
|
185
185
|
actions: a.actions,
|
|
186
186
|
"actions-label": a.actionsLabel,
|
|
187
187
|
"destructive-actions": a.destructiveActions
|
|
@@ -193,10 +193,10 @@ const ne = {
|
|
|
193
193
|
]), 1032, ["class", "page-id", "always-show-border", "back-button-styling", "previous-page"]);
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
|
-
}), Ke = /* @__PURE__ */ oe(Ue, [["__scopeId", "data-v-
|
|
196
|
+
}), Ke = /* @__PURE__ */ oe(Ue, [["__scopeId", "data-v-1e6a91c3"]]), He = { class: "b-modal-base" }, Ye = ["role", "aria-label", "open"], Je = $({
|
|
197
197
|
i18n: { messages: ne },
|
|
198
198
|
name: "base-modal"
|
|
199
|
-
}),
|
|
199
|
+
}), je = /* @__PURE__ */ $({
|
|
200
200
|
...Je,
|
|
201
201
|
props: {
|
|
202
202
|
/**
|
|
@@ -273,7 +273,7 @@ const ne = {
|
|
|
273
273
|
/**
|
|
274
274
|
* Defines whether the modal will be an alert modal
|
|
275
275
|
*/
|
|
276
|
-
modalRole: { type: String, default:
|
|
276
|
+
modalRole: { type: String, default: q.DIALOG },
|
|
277
277
|
/**
|
|
278
278
|
* Sets the width of the modal
|
|
279
279
|
*/
|
|
@@ -287,7 +287,7 @@ const ne = {
|
|
|
287
287
|
withColumnLayout: { type: Boolean, default: !1 }
|
|
288
288
|
},
|
|
289
289
|
emits: ["update:active-page", "close-modal"],
|
|
290
|
-
setup(e, { expose:
|
|
290
|
+
setup(e, { expose: W, emit: M }) {
|
|
291
291
|
const { t: f } = Le({ messages: ne }), s = ee(), z = ge(), _ = ae(s), i = g(null), y = g(!1), B = Ce("modal"), b = M, n = e, S = d(() => n.isDismissible && !n.hideCloseButton), C = g(n.customPadding), F = d(() => C.value ? { top: C.value, right: C.value } : {}), U = d(() => z["aria-label"] ?? f("ariaLabelFallback")), K = d(() => n.withColumnLayout && n.size === R.LARGE), h = () => {
|
|
292
292
|
i.value.showModal();
|
|
293
293
|
}, a = () => {
|
|
@@ -297,7 +297,7 @@ const ne = {
|
|
|
297
297
|
}, m = () => {
|
|
298
298
|
i.value.open && (y.value = !0);
|
|
299
299
|
}, v = (o) => {
|
|
300
|
-
o && o.preventDefault(), !(!n.isDismissible && n.modalRole ===
|
|
300
|
+
o && o.preventDefault(), !(!n.isDismissible && n.modalRole === q.DIALOG) && m();
|
|
301
301
|
}, D = () => {
|
|
302
302
|
n.isDismissible && v();
|
|
303
303
|
}, T = d(() => ({
|
|
@@ -322,7 +322,7 @@ const ne = {
|
|
|
322
322
|
{ deep: !0 }
|
|
323
323
|
), pe(() => {
|
|
324
324
|
n.isOpen && i.value && h();
|
|
325
|
-
}),
|
|
325
|
+
}), W({
|
|
326
326
|
internalModalActionClose: v
|
|
327
327
|
}), G(Ae, B);
|
|
328
328
|
const { activePage: E, isOpen: Q, size: V } = ve(n), le = g(Pe.TRANSITION_LEVEL_DEEPER), N = g([]), I = g([]), ie = (o) => b("update:active-page", o), ue = (o) => () => {
|
|
@@ -369,7 +369,7 @@ const ne = {
|
|
|
369
369
|
onClick: v
|
|
370
370
|
}, {
|
|
371
371
|
default: l(() => [
|
|
372
|
-
|
|
372
|
+
j(t(Ie), {
|
|
373
373
|
"svg-title": t(f)("close")
|
|
374
374
|
}, null, 8, ["svg-title"])
|
|
375
375
|
]),
|
|
@@ -426,16 +426,16 @@ const ne = {
|
|
|
426
426
|
], 46, Ye)
|
|
427
427
|
]));
|
|
428
428
|
}
|
|
429
|
-
}), dt = /* @__PURE__ */ oe(
|
|
429
|
+
}), dt = /* @__PURE__ */ oe(je, [["__scopeId", "data-v-6a816307"]]);
|
|
430
430
|
export {
|
|
431
431
|
Ge as B,
|
|
432
432
|
we as a,
|
|
433
433
|
R as b,
|
|
434
434
|
k as c,
|
|
435
|
-
|
|
435
|
+
q as d,
|
|
436
436
|
Re as e,
|
|
437
437
|
$e as f,
|
|
438
438
|
Ke as g,
|
|
439
439
|
dt as h
|
|
440
440
|
};
|
|
441
|
-
//# sourceMappingURL=base-modal.
|
|
441
|
+
//# sourceMappingURL=base-modal.BrBcILSe.js.map
|