@adyen/bento-vue3 1.54.2 → 1.55.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/index.d.ts +20 -2
- 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/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/dashboard-section.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.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/input-field-phone-number.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/link.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/popper-container.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/tabs.css +1 -1
- package/dist/assets/teleport.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.CUDi5Po7.js → action-bar.CDOaDenE.js} +5 -5
- package/dist/chunks/{action-bar.CUDi5Po7.js.map → action-bar.CDOaDenE.js.map} +1 -1
- package/dist/chunks/{alert.DEf0borp.js → alert.4SefwHLO.js} +2 -2
- package/dist/chunks/{alert.DEf0borp.js.map → alert.4SefwHLO.js.map} +1 -1
- package/dist/chunks/{base-modal.BegK8cPb.js → base-modal.DZy1WuJs.js} +5 -5
- package/dist/chunks/{base-modal.BegK8cPb.js.map → base-modal.DZy1WuJs.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.CcoKss9T.js → button-actions-with-menu.DQRTu42W.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.CcoKss9T.js.map → button-actions-with-menu.DQRTu42W.js.map} +1 -1
- package/dist/chunks/{button-actions.CdlXZ29B.js → button-actions.N99QthUv.js} +2 -2
- package/dist/chunks/{button-actions.CdlXZ29B.js.map → button-actions.N99QthUv.js.map} +1 -1
- package/dist/chunks/{button.6HMG0xEY.js → button.DEVuqLVT.js} +2 -2
- package/dist/chunks/button.DEVuqLVT.js.map +1 -0
- package/dist/chunks/{calendar.BRsV4rkQ.js → calendar.CNt90BvO.js} +2 -2
- package/dist/chunks/calendar.CNt90BvO.js.map +1 -0
- package/dist/chunks/{card.C5bSqYsB.js → card.E2xhS_6Z.js} +2 -2
- package/dist/chunks/{card.C5bSqYsB.js.map → card.E2xhS_6Z.js.map} +1 -1
- package/dist/chunks/{checkbox-group.D235-2lq.js → checkbox-group.BMzsgOeI.js} +4 -4
- package/dist/chunks/{checkbox-group.D235-2lq.js.map → checkbox-group.BMzsgOeI.js.map} +1 -1
- package/dist/chunks/{checkbox.Dts62P-X.js → checkbox.BIaD03Bg.js} +17 -17
- package/dist/chunks/{checkbox.Dts62P-X.js.map → checkbox.BIaD03Bg.js.map} +1 -1
- package/dist/chunks/{code-snippet.BPZLkv_Z.js → code-snippet.DJgiqDzZ.js} +6 -6
- package/dist/chunks/{code-snippet.BPZLkv_Z.js.map → code-snippet.DJgiqDzZ.js.map} +1 -1
- package/dist/chunks/{controls-group.DcbOWqxA.js → controls-group.DJqvAWte.js} +2 -2
- package/dist/chunks/{controls-group.DcbOWqxA.js.map → controls-group.DJqvAWte.js.map} +1 -1
- package/dist/chunks/{copy.CFhrpASp.js → copy.MId-I684.js} +11 -11
- package/dist/chunks/{copy.CFhrpASp.js.map → copy.MId-I684.js.map} +1 -1
- package/dist/chunks/dashboard-section.CrbSjoA8.js +165 -0
- package/dist/chunks/dashboard-section.CrbSjoA8.js.map +1 -0
- package/dist/chunks/{dashed-underline.BYAXhfnX.js → dashed-underline.DWhGZIhS.js} +3 -3
- package/dist/chunks/{dashed-underline.BYAXhfnX.js.map → dashed-underline.DWhGZIhS.js.map} +1 -1
- package/dist/chunks/data-grid-template.LlK-7o84.js +93 -0
- package/dist/chunks/data-grid-template.LlK-7o84.js.map +1 -0
- package/dist/chunks/data-grid.CsyayKK3.js +3490 -0
- package/dist/chunks/data-grid.CsyayKK3.js.map +1 -0
- package/dist/chunks/{date-picker.DU9L_7lU.js → date-picker.CjwoOQ3B.js} +5 -5
- package/dist/chunks/{date-picker.DU9L_7lU.js.map → date-picker.CjwoOQ3B.js.map} +1 -1
- package/dist/chunks/{date-range-picker.LJJE3q1u.js → date-range-picker.DGY91Rwc.js} +27 -24
- package/dist/chunks/date-range-picker.DGY91Rwc.js.map +1 -0
- package/dist/chunks/{dialog-page.CXQafL9G.js → dialog-page.BRlAYf5w.js} +2 -2
- package/dist/chunks/{dialog-page.CXQafL9G.js.map → dialog-page.BRlAYf5w.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.CwsgzDpx.js → dropdown-default-textbox.CTyt2klK.js} +30 -30
- package/dist/chunks/{dropdown-default-textbox.CwsgzDpx.js.map → dropdown-default-textbox.CTyt2klK.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.Deu1Ekpp.js → dropdown-tag.CJtSH5cZ.js} +3 -3
- package/dist/chunks/{dropdown-tag.Deu1Ekpp.js.map → dropdown-tag.CJtSH5cZ.js.map} +1 -1
- package/dist/chunks/{dropdown.BAwhx8jI.js → dropdown.CQvyjn6d.js} +8 -8
- package/dist/chunks/{dropdown.BAwhx8jI.js.map → dropdown.CQvyjn6d.js.map} +1 -1
- package/dist/chunks/{empty-state.BffIZp3a.js → empty-state.m0U14LVw.js} +2 -2
- package/dist/chunks/{empty-state.BffIZp3a.js.map → empty-state.m0U14LVw.js.map} +1 -1
- package/dist/chunks/{error-message.DH8Er2JS.js → error-message.CMgsMDny.js} +2 -2
- package/dist/chunks/{error-message.DH8Er2JS.js.map → error-message.CMgsMDny.js.map} +1 -1
- package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
- package/dist/chunks/{file-uploader.DkQDzuzC.js → file-uploader.D3KUe-MO.js} +5 -5
- package/dist/chunks/{file-uploader.DkQDzuzC.js.map → file-uploader.D3KUe-MO.js.map} +1 -1
- package/dist/chunks/{filter-bar.CqO88Dv2.js → filter-bar.cRJmUX-v.js} +30 -27
- package/dist/chunks/filter-bar.cRJmUX-v.js.map +1 -0
- package/dist/chunks/{fixed-scroller.Bfk75Nei.js → fixed-scroller.BNP4SR5J.js} +2 -2
- package/dist/chunks/{fixed-scroller.Bfk75Nei.js.map → fixed-scroller.BNP4SR5J.js.map} +1 -1
- package/dist/chunks/{focus-trap.BFCzfiI_.js → focus-trap.D9cfQpl7.js} +6 -6
- package/dist/chunks/{focus-trap.BFCzfiI_.js.map → focus-trap.D9cfQpl7.js.map} +1 -1
- package/dist/chunks/{footer-actions.A9H5F5D-.js → footer-actions.DmGDpPBW.js} +3 -3
- package/dist/chunks/{footer-actions.A9H5F5D-.js.map → footer-actions.DmGDpPBW.js.map} +1 -1
- package/dist/chunks/{form-layout-title.BWCOZyay.js → form-layout-title.P5ajTo4C.js} +2 -2
- package/dist/chunks/{form-layout-title.BWCOZyay.js.map → form-layout-title.P5ajTo4C.js.map} +1 -1
- package/dist/chunks/{header-with-views.f5wHqHsF.js → header-with-views.BJIQZVAq.js} +13 -13
- package/dist/chunks/{header-with-views.f5wHqHsF.js.map → header-with-views.BJIQZVAq.js.map} +1 -1
- package/dist/chunks/{header.CoyUQXFL.js → header.vHSsdURt.js} +4 -4
- package/dist/chunks/{header.CoyUQXFL.js.map → header.vHSsdURt.js.map} +1 -1
- package/dist/chunks/i18n.D9azDLPe.js.map +1 -1
- package/dist/chunks/{info-icon-with-popover.CBi7CmUZ.js → info-icon-with-popover.CXaaxjeT.js} +2 -2
- package/dist/chunks/{info-icon-with-popover.CBi7CmUZ.js.map → info-icon-with-popover.CXaaxjeT.js.map} +1 -1
- package/dist/chunks/{info-icon.Bomzzcc5.js → info-icon.7uhGVIn5.js} +2 -2
- package/dist/chunks/{info-icon.Bomzzcc5.js.map → info-icon.7uhGVIn5.js.map} +1 -1
- package/dist/chunks/{input-field-password.DXIJ0Z3R.js → input-field-password.CWr26esx.js} +6 -6
- package/dist/chunks/{input-field-password.DXIJ0Z3R.js.map → input-field-password.CWr26esx.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.KS95qk92.js → input-field-phone-number.zf8WxBCn.js} +8 -12
- package/dist/chunks/{input-field-phone-number.KS95qk92.js.map → input-field-phone-number.zf8WxBCn.js.map} +1 -1
- package/dist/chunks/{input-field.DcudjNKs.js → input-field.CR262X1w.js} +3 -3
- package/dist/chunks/{input-field.DcudjNKs.js.map → input-field.CR262X1w.js.map} +1 -1
- package/dist/chunks/{inspector.types.Fs9URmPq.js → inspector.types.YK45k4D_.js} +3 -3
- package/dist/chunks/{inspector.types.Fs9URmPq.js.map → inspector.types.YK45k4D_.js.map} +1 -1
- package/dist/chunks/keyboard-navigation.CqgGzfZQ.js.map +1 -1
- package/dist/chunks/{listbox-option-tag.CqnkZr9x.js → listbox-option-tag.BJh2kEN1.js} +2 -2
- package/dist/chunks/{listbox-option-tag.CqnkZr9x.js.map → listbox-option-tag.BJh2kEN1.js.map} +1 -1
- package/dist/chunks/{menu.P_KG1J8b.js → menu.CVMSGvtb.js} +5 -6
- package/dist/chunks/menu.CVMSGvtb.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.DxuMKagz.js → modal-fullscreen.Cqlf6PWo.js} +5 -5
- package/dist/chunks/{modal-fullscreen.DxuMKagz.js.map → modal-fullscreen.Cqlf6PWo.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DfzxXSwn.js → modal.vue_vue_type_script_setup_true_lang.dXxru4S9.js} +5 -5
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DfzxXSwn.js.map → modal.vue_vue_type_script_setup_true_lang.dXxru4S9.js.map} +1 -1
- package/dist/chunks/{pagination.DzwiWHUO.js → pagination.C65tc-nX.js} +3 -3
- package/dist/chunks/{pagination.DzwiWHUO.js.map → pagination.C65tc-nX.js.map} +1 -1
- package/dist/chunks/{popover.Csq1gQ6T.js → popover.DjbACET6.js} +4 -4
- package/dist/chunks/{popover.Csq1gQ6T.js.map → popover.DjbACET6.js.map} +1 -1
- package/dist/chunks/{popper-container.DnlxQ9eS.js → popper-container.CDsbQiOS.js} +3 -3
- package/dist/chunks/{popper-container.DnlxQ9eS.js.map → popper-container.CDsbQiOS.js.map} +1 -1
- package/dist/chunks/{promo-banner.CN-TTSov.js → promo-banner.ZCfJQh-S.js} +2 -2
- package/dist/chunks/{promo-banner.CN-TTSov.js.map → promo-banner.ZCfJQh-S.js.map} +1 -1
- package/dist/chunks/{radio-group.Vm-hmL1q.js → radio-group.Tgf3BF5X.js} +4 -4
- package/dist/chunks/{radio-group.Vm-hmL1q.js.map → radio-group.Tgf3BF5X.js.map} +1 -1
- package/dist/chunks/{search-bar.SNqRBGY7.js → search-bar.CTn5DIQZ.js} +3 -3
- package/dist/chunks/{search-bar.SNqRBGY7.js.map → search-bar.CTn5DIQZ.js.map} +1 -1
- package/dist/chunks/{secondary-nav.DKXHuspN.js → secondary-nav.CnE-aV2P.js} +2 -2
- package/dist/chunks/{secondary-nav.DKXHuspN.js.map → secondary-nav.CnE-aV2P.js.map} +1 -1
- package/dist/chunks/{segmented-control.DBy-nbYM.js → segmented-control.Dg_ktsiS.js} +2 -2
- package/dist/chunks/{segmented-control.DBy-nbYM.js.map → segmented-control.Dg_ktsiS.js.map} +1 -1
- package/dist/chunks/{selection-card-group.D9dyC6Z_.js → selection-card-group.C2OFZgKd.js} +11 -11
- package/dist/chunks/{selection-card-group.D9dyC6Z_.js.map → selection-card-group.C2OFZgKd.js.map} +1 -1
- package/dist/chunks/{sidepanel.Ds2CCG9L.js → sidepanel.Drn-lKR3.js} +5 -5
- package/dist/chunks/{sidepanel.Ds2CCG9L.js.map → sidepanel.Drn-lKR3.js.map} +1 -1
- package/dist/chunks/{structured-list-item.CygGTBVl.js → structured-list-item.CWiwoP5F.js} +5 -5
- package/dist/chunks/{structured-list-item.CygGTBVl.js.map → structured-list-item.CWiwoP5F.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.DzvuP-NU.js → summary-grid.types.DOYW579A.js} +5 -5
- package/dist/chunks/{summary-grid.types.DzvuP-NU.js.map → summary-grid.types.DOYW579A.js.map} +1 -1
- package/dist/chunks/tabs.DZk78MLK.js +266 -0
- package/dist/chunks/tabs.DZk78MLK.js.map +1 -0
- package/dist/chunks/{tag.C4SGN5Eb.js → tag.CmYkknFj.js} +2 -2
- package/dist/chunks/{tag.C4SGN5Eb.js.map → tag.CmYkknFj.js.map} +1 -1
- package/dist/chunks/{teleport.DfTpEQBR.js → teleport.zSiKZmRE.js} +5 -5
- package/dist/chunks/teleport.zSiKZmRE.js.map +1 -0
- package/dist/chunks/{textarea.bQwvvIkq.js → textarea.CR7su54i.js} +3 -3
- package/dist/chunks/{textarea.bQwvvIkq.js.map → textarea.CR7su54i.js.map} +1 -1
- package/dist/chunks/{timeline-item.Bxt_pNII.js → timeline-item.BhQp0ICP.js} +6 -6
- package/dist/chunks/{timeline-item.Bxt_pNII.js.map → timeline-item.BhQp0ICP.js.map} +1 -1
- package/dist/chunks/{toast.7D23cICy.js → toast.DxVfamh-.js} +2 -2
- package/dist/chunks/{toast.7D23cICy.js.map → toast.DxVfamh-.js.map} +1 -1
- package/dist/chunks/{toggle-button.7iAfO6Xx.js → toggle-button.D-9TFTy8.js} +2 -2
- package/dist/chunks/{toggle-button.7iAfO6Xx.js.map → toggle-button.D-9TFTy8.js.map} +1 -1
- package/dist/chunks/{tooltip.CyQxprBQ.js → tooltip.BkBDReK0.js} +2 -2
- package/dist/chunks/{tooltip.CyQxprBQ.js.map → tooltip.BkBDReK0.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BtVT3Ltg.js → tutorial.vue_vue_type_script_setup_true_lang.ENhKvQLv.js} +5 -5
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BtVT3Ltg.js.map → tutorial.vue_vue_type_script_setup_true_lang.ENhKvQLv.js.map} +1 -1
- package/dist/chunks/use-cached-selected-values.CQKeFUJd.js +1475 -0
- package/dist/chunks/use-cached-selected-values.CQKeFUJd.js.map +1 -0
- package/dist/code-snippet.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/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 +54 -54
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +13 -13
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.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/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +8 -4
- package/dist/styles/bento-light.css +8 -4
- package/dist/styles/bento.css +8 -4
- package/dist/styles/legacy.css +8 -5
- package/dist/styles/styleguide.css +8 -4
- 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/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +4 -4
- package/dist/chunks/button.6HMG0xEY.js.map +0 -1
- package/dist/chunks/calendar.BRsV4rkQ.js.map +0 -1
- package/dist/chunks/dashboard-section.DpL72ax7.js +0 -167
- package/dist/chunks/dashboard-section.DpL72ax7.js.map +0 -1
- package/dist/chunks/data-grid-template.CJxPIu3E.js +0 -93
- package/dist/chunks/data-grid-template.CJxPIu3E.js.map +0 -1
- package/dist/chunks/data-grid.jRydtYyG.js +0 -3380
- package/dist/chunks/data-grid.jRydtYyG.js.map +0 -1
- package/dist/chunks/date-range-picker.LJJE3q1u.js.map +0 -1
- package/dist/chunks/filter-bar.CqO88Dv2.js.map +0 -1
- package/dist/chunks/menu.P_KG1J8b.js.map +0 -1
- package/dist/chunks/tabs.B8BRqQpv.js +0 -272
- package/dist/chunks/tabs.B8BRqQpv.js.map +0 -1
- package/dist/chunks/teleport.DfTpEQBR.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.DGfnlqdi.js +0 -1455
- package/dist/chunks/use-cached-selected-values.DGfnlqdi.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy.
|
|
1
|
+
{"version":3,"file":"copy.MId-I684.js","sources":["../../../vue2/src/components/internal/copy/copy.types.ts","../../../ui-assets/icons-16/dist/vue/copy.vue","../../../vue2/src/components/internal/copy/copy.vue"],"sourcesContent":["import type { BentoButton } from '../../button';\n\nexport enum CopyTooltipState {\n DEFAULT = 'default',\n COPYING = 'copying',\n ERROR = 'error',\n}\n\ntype ButtonProps = InstanceType<typeof BentoButton>['$props'];\nexport type BentoCopyButtonProps = {\n variant?: ButtonProps['variant'];\n condensed?: ButtonProps['condensed'];\n disabled?: ButtonProps['disabled'];\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><path fill=\"#00112C\" d=\"M3.5 1.25C2.25736 1.25 1.25 2.25736 1.25 3.5V8.5C1.25 9.74264 2.25736 10.75 3.5 10.75H5.25V12.5C5.25 13.7426 6.25736 14.75 7.5 14.75H12.5C13.7426 14.75 14.75 13.7426 14.75 12.5V7.5C14.75 6.25736 13.7426 5.25 12.5 5.25H10.75V3.5C10.75 2.25736 9.74264 1.25 8.5 1.25H3.5ZM9.25 5.25H7.5C6.25736 5.25 5.25 6.25736 5.25 7.5V9.25H3.5C3.08579 9.25 2.75 8.91421 2.75 8.5V3.5C2.75 3.08579 3.08579 2.75 3.5 2.75H8.5C8.91421 2.75 9.25 3.08579 9.25 3.5V5.25ZM6.75 12.5V7.5C6.75 7.08579 7.08579 6.75 7.5 6.75H12.5C12.9142 6.75 13.25 7.08579 13.25 7.5V12.5C13.25 12.9142 12.9142 13.25 12.5 13.25H7.5C7.08579 13.25 6.75 12.9142 6.75 12.5Z\"/></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-copy\" @mouseleave=\"resetText\" @focusout=\"resetText\">\n <span v-if=\"$slots.default\" v-bento-tooltip-directive:[tooltipPosition]=\"copyText\" @click=\"onClickCopy\">\n <slot />\n </span>\n <bento-button\n v-else\n v-bento-tooltip-directive:[tooltipPosition]=\"copyText\"\n v-bind=\"button\"\n @click=\"onClickCopy\"\n >\n <template #iconLeft>\n <copy-icon :svg-title=\"svgTitle\" />\n </template>\n <template v-if=\"buttonText\" #default>\n {{ buttonText }}\n </template>\n </bento-button>\n <div v-if=\"showScreenReaderAlert\" role=\"alert\" class=\"b-copy__screen-reader-alert\">{{ t('copied') }}</div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { PopperContainerPosition } from '@/components/popper-container';\n import { BentoTooltipDirective } from '@/directives';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoCopyButtonProps, CopyTooltipState } from './copy.types';\n import CopyIcon from '@adyen/ui-assets-icons-16/vue/copy';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * An internal button component that copies text to the user's clipboard.\n *\n * @example\n * import { Copy } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { Copy },\n * template: `\n * <copy :text=\"textToCopy\" />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'copy',\n components: { BentoButton, CopyIcon },\n directives: { BentoTooltipDirective },\n props: {\n /**\n * Object containing props to change the menu button appearance. Accepts the same props present in BentoButton.\n */\n button: {\n type: Object as PropType<BentoCopyButtonProps>,\n default: () =>\n ({\n variant: 'tertiary',\n } as BentoCopyButtonProps),\n },\n\n /**\n * Sets the button text of the copy button.\n */\n buttonText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Defines the string that will get copied to the clipboard\n */\n text: {\n type: String,\n required: true,\n },\n\n /**\n * Position the tooltip should take if space is available. Defaults to 'top'\n */\n tooltipPosition: {\n type: String as PropType<PopperContainerPosition>,\n default: PopperContainerPosition.TOP,\n },\n },\n setup(props) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const copyState = ref<CopyTooltipState>(CopyTooltipState.DEFAULT);\n\n const showScreenReaderAlert = ref(false);\n const onClickCopy = async () => {\n try {\n await navigator.clipboard.writeText(props.text);\n copyState.value = CopyTooltipState.COPYING;\n showScreenReaderAlert.value = true;\n } catch {\n copyState.value = CopyTooltipState.ERROR;\n }\n };\n\n const resetText = () => {\n copyState.value = CopyTooltipState.DEFAULT;\n showScreenReaderAlert.value = false;\n };\n\n const copyText = computed(() => {\n switch (copyState.value) {\n case CopyTooltipState.COPYING:\n return t('copied');\n case CopyTooltipState.ERROR:\n return t('copyFailed');\n case CopyTooltipState.DEFAULT:\n default:\n return t('copy');\n }\n });\n\n const svgTitle = computed(() => (props?.buttonText ? undefined : t('copy')));\n\n return {\n copyText,\n onClickCopy,\n resetText,\n showScreenReaderAlert,\n svgTitle,\n\n // Translations\n t,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./copy.scss\" />\n"],"names":["CopyTooltipState","CopyTooltipState2","uuid","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","_sfc_main","defineComponent","messages","BentoButton","CopyIcon","BentoTooltipDirective","PopperContainerPosition","props","useI18n","copyState","ref","showScreenReaderAlert","onClickCopy","resetText","copyText","computed","svgTitle","_directive_bento_tooltip_directive","resolveDirective","_cache","args","withDirectives","tooltipPosition","createBlock","_component_bento_button","createSlots","withCtx","createVNode","_component_copy_icon","buttonText","createTextVNode","toDisplayString","_hoisted_1"],"mappings":"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"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { defineComponent as I, useSlots as F, ref as u, computed as d, watch as g, onUnmounted as L, createElementBlock as l, openBlock as a, createVNode as $, createElementVNode as f, unref as s, mergeProps as R, createSlots as H, withCtx as _, renderSlot as i, normalizeClass as C, createCommentVNode as W, createBlock as w, Fragment as M, renderList as U, onMounted as q } from "vue";
|
|
2
|
+
import { B as E } from "./header.vHSsdURt.js";
|
|
3
|
+
import { a as A, B as G } from "./tabs.DZk78MLK.js";
|
|
4
|
+
import { c as J } from "./index.BzJQl-2M.js";
|
|
5
|
+
import { o as K } from "./resize.Bqks3WUm.js";
|
|
6
|
+
import { u as N } from "./use-has-slot.B7eQSabc.js";
|
|
7
|
+
import { _ as P } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
8
|
+
import { B as Q } from "./divider.qUOSAbU6.js";
|
|
9
|
+
import "../assets/dashboard-section.css";
|
|
10
|
+
const X = { class: "b-dashboard-template" }, Y = { class: "b-dashboard-template__container b-dashboard-template__container--tabs" }, Z = {
|
|
11
|
+
key: 2,
|
|
12
|
+
class: "b-dashboard-template__container"
|
|
13
|
+
}, x = {}, tt = /* @__PURE__ */ I({
|
|
14
|
+
...x,
|
|
15
|
+
__name: "dashboard-template",
|
|
16
|
+
props: {
|
|
17
|
+
header: {},
|
|
18
|
+
tabs: { default: void 0 },
|
|
19
|
+
stickyTabs: { type: Boolean, default: !1 },
|
|
20
|
+
stickyFilters: { type: Boolean, default: !1 }
|
|
21
|
+
},
|
|
22
|
+
setup(h) {
|
|
23
|
+
const o = h, r = F(), n = N(r), b = u(), e = u(null), p = u(!1);
|
|
24
|
+
let c = null;
|
|
25
|
+
const v = u(0), m = d(() => e.value && o.stickyFilters), B = d(() => b.value && o.stickyTabs), V = d(() => ({
|
|
26
|
+
"b-dashboard-template__filters--sticky": o.stickyFilters,
|
|
27
|
+
"b-dashboard-template__filters--show-border": m.value && !B.value && p.value
|
|
28
|
+
})), z = d(() => ({
|
|
29
|
+
"b-dashboard-template__top-section--sticky": o.stickyTabs || o.stickyFilters
|
|
30
|
+
})), S = d(() => Object.keys(r).filter((t) => t == null ? void 0 : t.includes("tab-"))), O = (t) => {
|
|
31
|
+
var y, k;
|
|
32
|
+
return ((k = (y = o == null ? void 0 : o.tabs.tabs) == null ? void 0 : y[t]) == null ? void 0 : k.title) ?? `Tab ${t + 1}`;
|
|
33
|
+
}, j = d(() => v.value ? { top: v.value } : void 0), { y: D } = J();
|
|
34
|
+
return g(
|
|
35
|
+
() => e.value,
|
|
36
|
+
() => {
|
|
37
|
+
!c && e.value && (c = K(e.value, () => {
|
|
38
|
+
if (e.value && B.value) {
|
|
39
|
+
const t = e.value.offsetHeight;
|
|
40
|
+
v.value = m.value ? t : 0;
|
|
41
|
+
}
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
), g(
|
|
45
|
+
() => D.value,
|
|
46
|
+
() => {
|
|
47
|
+
var t;
|
|
48
|
+
m.value && (p.value = ((t = e.value) == null ? void 0 : t.getBoundingClientRect().top) === 0);
|
|
49
|
+
}
|
|
50
|
+
), L(() => {
|
|
51
|
+
c == null || c.disconnect();
|
|
52
|
+
}), (t, y) => (a(), l("main", X, [
|
|
53
|
+
$(s(E), R(t.header, {
|
|
54
|
+
variant: "page",
|
|
55
|
+
class: "b-dashboard-template__header"
|
|
56
|
+
}), H({ _: 2 }, [
|
|
57
|
+
s(n)("infoIconTooltipContent") ? {
|
|
58
|
+
name: "infoIconTooltipContent",
|
|
59
|
+
fn: _(() => [
|
|
60
|
+
i(t.$slots, "infoIconTooltipContent", {}, void 0, !0)
|
|
61
|
+
]),
|
|
62
|
+
key: "0"
|
|
63
|
+
} : void 0
|
|
64
|
+
]), 1040),
|
|
65
|
+
f("div", {
|
|
66
|
+
class: C(["b-dashboard-template__top-section", z.value])
|
|
67
|
+
}, [
|
|
68
|
+
s(n)("filters") ? (a(), l("div", {
|
|
69
|
+
key: 0,
|
|
70
|
+
ref_key: "filtersRef",
|
|
71
|
+
ref: e,
|
|
72
|
+
class: C(["b-dashboard-template__filters", V.value]),
|
|
73
|
+
"data-testid": "filters"
|
|
74
|
+
}, [
|
|
75
|
+
i(t.$slots, "filters", {}, void 0, !0)
|
|
76
|
+
], 2)) : W("", !0),
|
|
77
|
+
S.value.length > 1 ? (a(), w(s(A), {
|
|
78
|
+
key: 1,
|
|
79
|
+
ref_key: "tabsRef",
|
|
80
|
+
ref: b,
|
|
81
|
+
"active-tab-index": t.tabs.activeTabIndex,
|
|
82
|
+
sticky: t.stickyTabs,
|
|
83
|
+
"sticky-options": j.value,
|
|
84
|
+
"data-testid": "tabs"
|
|
85
|
+
}, {
|
|
86
|
+
default: _(() => [
|
|
87
|
+
(a(!0), l(M, null, U(S.value, (k, T) => (a(), w(s(G), {
|
|
88
|
+
key: `tab-${T}`,
|
|
89
|
+
title: O(T)
|
|
90
|
+
}, {
|
|
91
|
+
default: _(() => [
|
|
92
|
+
f("div", Y, [
|
|
93
|
+
i(t.$slots, `tab-${T + 1}`, {}, void 0, !0)
|
|
94
|
+
])
|
|
95
|
+
]),
|
|
96
|
+
_: 2
|
|
97
|
+
}, 1032, ["title"]))), 128))
|
|
98
|
+
]),
|
|
99
|
+
_: 3
|
|
100
|
+
}, 8, ["active-tab-index", "sticky", "sticky-options"])) : (a(), l("div", Z, [
|
|
101
|
+
i(t.$slots, "default", {}, void 0, !0)
|
|
102
|
+
]))
|
|
103
|
+
], 2)
|
|
104
|
+
]));
|
|
105
|
+
}
|
|
106
|
+
}), pt = /* @__PURE__ */ P(tt, [["__scopeId", "data-v-20c70d44"]]), et = {
|
|
107
|
+
key: 0,
|
|
108
|
+
class: "b-dashboard-section__controls"
|
|
109
|
+
}, ot = {
|
|
110
|
+
key: 1,
|
|
111
|
+
class: "b-dashboard-section__content"
|
|
112
|
+
}, st = {
|
|
113
|
+
key: 2,
|
|
114
|
+
class: "b-dashboard-section__columns"
|
|
115
|
+
}, at = { class: "b-dashboard-section__content" }, nt = { class: "b-dashboard-section__content" }, it = {}, lt = /* @__PURE__ */ I({
|
|
116
|
+
...it,
|
|
117
|
+
__name: "dashboard-section",
|
|
118
|
+
props: {
|
|
119
|
+
header: {},
|
|
120
|
+
halfWidth: { type: Boolean, default: !1 }
|
|
121
|
+
},
|
|
122
|
+
setup(h) {
|
|
123
|
+
const o = h, r = F(), n = N(r), b = d(() => ({
|
|
124
|
+
"b-dashboard-section--half-width": o.halfWidth
|
|
125
|
+
}));
|
|
126
|
+
return q(() => {
|
|
127
|
+
if ((n("content-col-1") || n("content-col-2")) && o.halfWidth)
|
|
128
|
+
throw new Error("`content-col-1` and `content-col-2` cannot be used with half-width prop");
|
|
129
|
+
}), (e, p) => (a(), l("div", {
|
|
130
|
+
class: C(["b-dashboard-section", b.value])
|
|
131
|
+
}, [
|
|
132
|
+
$(s(E), R(e.header, {
|
|
133
|
+
variant: "component",
|
|
134
|
+
class: "b-dashboard-template__header"
|
|
135
|
+
}), H({ _: 2 }, [
|
|
136
|
+
s(n)("infoIconTooltipContent") ? {
|
|
137
|
+
name: "infoIconTooltipContent",
|
|
138
|
+
fn: _(() => [
|
|
139
|
+
i(e.$slots, "infoIconTooltipContent", {}, void 0, !0)
|
|
140
|
+
]),
|
|
141
|
+
key: "0"
|
|
142
|
+
} : void 0
|
|
143
|
+
]), 1040),
|
|
144
|
+
s(n)("controls") ? (a(), l("div", et, [
|
|
145
|
+
i(e.$slots, "controls", {}, void 0, !0)
|
|
146
|
+
])) : W("", !0),
|
|
147
|
+
!s(n)("content-col-1") && !s(n)("content-col-2") ? (a(), l("div", ot, [
|
|
148
|
+
i(e.$slots, "default", {}, void 0, !0)
|
|
149
|
+
])) : (a(), l("div", st, [
|
|
150
|
+
f("div", at, [
|
|
151
|
+
i(e.$slots, "content-col-1", {}, void 0, !0)
|
|
152
|
+
]),
|
|
153
|
+
f("div", nt, [
|
|
154
|
+
i(e.$slots, "content-col-2", {}, void 0, !0)
|
|
155
|
+
])
|
|
156
|
+
])),
|
|
157
|
+
$(s(Q), { class: "b-dashboard-section__divider" })
|
|
158
|
+
], 2));
|
|
159
|
+
}
|
|
160
|
+
}), vt = /* @__PURE__ */ P(lt, [["__scopeId", "data-v-55110156"]]);
|
|
161
|
+
export {
|
|
162
|
+
vt as a,
|
|
163
|
+
pt as d
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=dashboard-section.CrbSjoA8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-section.CrbSjoA8.js","sources":["../../../vue2/src/templates/dashboard-template/dashboard-template.vue","../../../vue2/src/templates/dashboard-template/components/dashboard-section/dashboard-section.vue"],"sourcesContent":["<template>\n <main class=\"b-dashboard-template\">\n <bento-header v-bind=\"header\" variant=\"page\" class=\"b-dashboard-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div class=\"b-dashboard-template__top-section\" :class=\"dashboardTopSectionConditionalClasses\">\n <div\n v-if=\"hasSlot('filters')\"\n ref=\"filtersRef\"\n class=\"b-dashboard-template__filters\"\n :class=\"dashboardFiltersConditionalClasses\"\n data-testid=\"filters\"\n >\n <slot name=\"filters\" />\n </div>\n\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n :sticky=\"stickyTabs\"\n :sticky-options=\"computedTabsOptions\"\n data-testid=\"tabs\"\n >\n <bento-tab v-for=\"(_item, index) in tabsSlots\" :key=\"`tab-${index}`\" :title=\"getTabTitle(index)\">\n <div class=\"b-dashboard-template__container b-dashboard-template__container--tabs\">\n <slot :name=\"`tab-${index + 1}`\" />\n </div>\n </bento-tab>\n </bento-tabs>\n <div v-else class=\"b-dashboard-template__container\">\n <slot />\n </div>\n </div>\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onUnmounted, ref, useSlots, watch } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useWindowScroll } from '@vueuse/core';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useHasSlot } from '@/composables';\n import type { BentoDashboardTemplateHeader, BentoDashboardTemplateTabs } from './dashboard-template.types';\n\n const props = withDefaults(\n defineProps<{\n /**\n * The header that goes to the top of the template\n */\n header: BentoDashboardTemplateHeader;\n\n /**\n * All the tab properties that can be set on the inner tab components.\n * - tabs.activeTabIndex: the currently active tab index.\n * - tabs.tabs: an array of BentoTab props, the first item in the array will affect the `tab-1` slot and so on.\n */\n tabs?: BentoDashboardTemplateTabs;\n\n /**\n * Renders the tabs with a sticky positioning\n */\n stickyTabs?: boolean;\n\n /**\n * Renders the tabs with a sticky positioning\n */\n stickyFilters?: boolean;\n }>(),\n {\n tabs: undefined,\n stickyTabs: false,\n stickyFilters: false,\n }\n );\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const tabsRef = ref<InstanceType<typeof BentoTabs>>();\n const filtersRef = ref<HTMLDivElement>(null);\n const isFiltersPinned = ref(false);\n let filtersElementObserver: ResizeObserver | null = null;\n const tabsPosition = ref(0);\n\n const hasStickyFilters = computed(() => filtersRef.value && props.stickyFilters);\n const hasStickyTabs = computed(() => tabsRef.value && props.stickyTabs);\n\n const dashboardFiltersConditionalClasses = computed(() => ({\n 'b-dashboard-template__filters--sticky': props.stickyFilters,\n 'b-dashboard-template__filters--show-border':\n hasStickyFilters.value && !hasStickyTabs.value && isFiltersPinned.value,\n }));\n\n const dashboardTopSectionConditionalClasses = computed(() => ({\n 'b-dashboard-template__top-section--sticky': props.stickyTabs || props.stickyFilters,\n }));\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const getTabTitle = (index: number) => props?.tabs.tabs?.[index]?.title ?? `Tab ${index + 1}`;\n\n const computedTabsOptions = computed(() => (tabsPosition.value ? { top: tabsPosition.value } : undefined));\n\n const { y } = useWindowScroll();\n\n watch(\n () => filtersRef.value,\n () => {\n if (!filtersElementObserver && filtersRef.value) {\n filtersElementObserver = observeSizeOfElement(filtersRef.value, () => {\n if (filtersRef.value && hasStickyTabs.value) {\n const filtersHeight = filtersRef.value.offsetHeight;\n tabsPosition.value = hasStickyFilters.value ? filtersHeight : 0;\n }\n });\n }\n }\n );\n\n watch(\n () => y.value,\n () => {\n if (hasStickyFilters.value) {\n isFiltersPinned.value = filtersRef.value?.getBoundingClientRect().top === 0;\n }\n }\n );\n\n onUnmounted(() => {\n filtersElementObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dashboard template is a full page template used to visualize data on pages such as data dashboards and reports.\n *\n * @example\n * import { BentoDashboardTemplate, BentoDashboardSection } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashboardTemplate, BentoDashboardSection },\n * template: `\n * <bento-dashboard-template :header=\"{ title: 'Dashboard'}\" :tabs=\"tabs: [{ title: 'Tab 1' }, { title: 'Tab 2' }]\" sticky-tabs sticky-filters>\n * <template #tab-1>\n * <bento-dashboard-section :header=\"{ title: 'Section'}\">\n * <template #controls>\n * // Add your controls here\n * </template>\n * // Add your content here\n * </bento-dashboard-section>\n * </template>\n * <template #tab-2>\n * <bento-dashboard-section :header=\"{ title: 'Section'}\">\n * // Add your content here\n * </bento-dashboard-section>\n * </template>\n * </bento-dashboard-template>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashboard-template.scss\" />\n","<template>\n <div class=\"b-dashboard-section\" :class=\"conditionalClasses\">\n <bento-header v-bind=\"header\" variant=\"component\" class=\"b-dashboard-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div v-if=\"hasSlot('controls')\" class=\"b-dashboard-section__controls\">\n <slot name=\"controls\"></slot>\n </div>\n <div v-if=\"!hasSlot('content-col-1') && !hasSlot('content-col-2')\" class=\"b-dashboard-section__content\">\n <slot name=\"default\"></slot>\n </div>\n <div v-else class=\"b-dashboard-section__columns\">\n <div class=\"b-dashboard-section__content\"><slot name=\"content-col-1\"></slot></div>\n <div class=\"b-dashboard-section__content\"><slot name=\"content-col-2\"></slot></div>\n </div>\n <bento-divider class=\"b-dashboard-section__divider\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoDivider } from '@/components/divider';\n import { useHasSlot } from '@/composables';\n import type { BentoDashboardTemplateHeader } from '../../dashboard-template.types';\n\n const props = withDefaults(\n defineProps<{\n /**\n * The header of the section\n */\n header: BentoDashboardTemplateHeader;\n\n /**\n * Renders the section to take only half of the page\n */\n halfWidth?: boolean;\n }>(),\n {\n halfWidth: false,\n }\n );\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const conditionalClasses = computed(() => ({\n 'b-dashboard-section--half-width': props.halfWidth,\n }));\n\n onMounted(() => {\n if ((hasSlot('content-col-1') || hasSlot('content-col-2')) && props.halfWidth) {\n throw new Error('`content-col-1` and `content-col-2` cannot be used with half-width prop');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dashboard section is subcomponent of Dashboard template meant to be used to create the different sections within the page.\n *\n * @example\n * import { BentoDashboardSection } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashboardSection },\n * template: `\n * <bento-dashboard-section :header=\"{ title: 'Section' }\" half-width>\n * <template #controls>\n * // Add your controls here\n * </template>\n * // You can render content with two cols\n * <template #content-col-1>\n * // Add your content here\n * </template>\n * <template #content-col-2>\n * // Add your content here\n * </template>\n * // Or you can render full width content by using default slot\n * // Add your content here\n * </bento-dashboard-section>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashboard-section.scss\" />\n"],"names":["__default__$1","props","__props","slots","useSlots","hasSlot","useHasSlot","tabsRef","ref","filtersRef","isFiltersPinned","filtersElementObserver","tabsPosition","hasStickyFilters","computed","hasStickyTabs","dashboardFiltersConditionalClasses","dashboardTopSectionConditionalClasses","tabsSlots","el","getTabTitle","index","_b","_a","computedTabsOptions","y","useWindowScroll","watch","observeSizeOfElement","filtersHeight","onUnmounted","__default__","conditionalClasses","onMounted"],"mappings":";;;;;;;;;;;;GAqKIA,IAAA,CAAA;;;;;;;;;;AArHA,UAAAC,IAAAC,GA+BAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,EAAA;AACA,QAAAG,IAAA;AACA,UAAAC,IAAAJ,EAAA,CAAA,GAEAK,IAAAC,EAAA,MAAAL,EAAA,SAAAR,EAAA,aAAA,GACAc,IAAAD,EAAA,MAAAP,EAAA,SAAAN,EAAA,UAAA,GAEAe,IAAAF,EAAA,OAAA;AAAA,MAA2D,yCAAAb,EAAA;AAAA,MACR,8CAAAY,EAAA,SAAA,CAAAE,EAAA,SAAAL,EAAA;AAAA,IAEuB,EAAA,GAG1EO,IAAAH,EAAA,OAAA;AAAA,MAA8D,6CAAAb,EAAA,cAAAA,EAAA;AAAA,IACa,EAAA,GAG3EiB,IAAAJ,EAAA,MAAA,OAAA,KAAAX,CAAA,EAAA,OAAA,CAAAgB,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAA,CAAAC,MAAA;;AAAA,eAAAC,KAAAC,IAAAtB,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAsB,EAAAF,OAAA,gBAAAC,EAAA,UAAA,OAAAD,IAAA,CAAA;AAAA,OAEAG,IAAAV,EAAA,MAAAF,EAAA,QAAA,EAAA,KAAAA,EAAA,MAAA,IAAA,MAAA,GAEA,EAAA,GAAAa,EAAA,IAAAC,EAAA;AAEA,WAAAC;AAAA,MAAA,MAAAlB,EAAA;AAAA,MACqB,MAAA;AAEb,QAAA,CAAAE,KAAAF,EAAA,UACIE,IAAAiB,EAAAnB,EAAA,OAAA,MAAA;AACI,cAAAA,EAAA,SAAAM,EAAA,OAAA;AACI,kBAAAc,IAAApB,EAAA,MAAA;AACA,YAAAG,EAAA,QAAAC,EAAA,QAAAgB,IAAA;AAAA,UAA8D;AAAA,QAClE,CAAA;AAAA,MAER;AAAA,IACJ,GAGJF;AAAA,MAAA,MAAAF,EAAA;AAAA,MACY,MAAA;;AAEJ,QAAAZ,EAAA,UACIH,EAAA,UAAAa,IAAAd,EAAA,UAAA,gBAAAc,EAAA,wBAAA,SAAA;AAAA,MACJ;AAAA,IACJ,GAGJO,EAAA,MAAA;AACI,MAAAnB,KAAA,QAAAA,EAAA;AAAA,IAAmC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mGC/CvCoB,KAAA,CAAA;;;;;;;;AA1DA,UAAA9B,IAAAC,GAiBAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEA6B,IAAAlB,EAAA,OAAA;AAAA,MAA2C,mCAAAb,EAAA;AAAA,IACE,EAAA;AAG7C,WAAAgC,EAAA,MAAA;AACI,WAAA5B,EAAA,eAAA,KAAAA,EAAA,eAAA,MAAAJ,EAAA;AACI,cAAA,IAAA,MAAA,yEAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as B, useSlots as O, ref as r, computed as u, watch as S, withDirectives as g, createElementBlock as E, openBlock as c, renderSlot as d, createBlock as D, createCommentVNode as I, unref as s, withCtx as f, createVNode as k, createTextVNode as w, toDisplayString as x } from "vue";
|
|
2
|
-
import { B as C } from "./popover.
|
|
2
|
+
import { B as C } from "./popover.DjbACET6.js";
|
|
3
3
|
import "./events.FNmSWp_P.js";
|
|
4
|
-
import { B as b } from "./tooltip.
|
|
4
|
+
import { B as b } from "./tooltip.BkBDReK0.js";
|
|
5
5
|
import { B as y } from "./typography.DN5eC5ch.js";
|
|
6
6
|
import { u as N } from "./use-has-slot.B7eQSabc.js";
|
|
7
7
|
import { _ as V } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
@@ -77,4 +77,4 @@ const F = {}, L = /* @__PURE__ */ B({
|
|
|
77
77
|
export {
|
|
78
78
|
j as B
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=dashed-underline.
|
|
80
|
+
//# sourceMappingURL=dashed-underline.DWhGZIhS.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashed-underline.
|
|
1
|
+
{"version":3,"file":"dashed-underline.DWhGZIhS.js","sources":["../../../vue2/src/components/dashed-underline/dashed-underline.vue"],"sourcesContent":["<template>\n <span\n ref=\"element\"\n v-bento-tooltip-directive:[tooltipPosition]=\"tooltipText\"\n class=\"b-dashed-underline\"\n tabindex=\"0\"\n @mouseenter=\"openPopover\"\n @mouseleave=\"closePopover\"\n @focus=\"infoIconOnFocus\"\n @focusout=\"infoIconOnFocusOut\"\n >\n <slot></slot>\n <bento-popover\n v-if=\"element && hasPopover\"\n :open=\"isOpen\"\n :target-element=\"element\"\n :position=\"popoverPosition\"\n role=\"tooltip\"\n fit-content\n disable-focus-trap\n >\n <slot name=\"popover-content\">\n <bento-typography>\n {{ popoverText }}\n </bento-typography>\n </slot>\n </bento-popover>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, ref, useSlots, watch } from 'vue';\n import { BentoPopover, type BentoPopoverPositions } from '@/components/popover';\n import {\n type BentoTooltipPosition,\n BentoTooltipDirective as vBentoTooltipDirective,\n } from '@/directives/tooltip/index';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n\n const CLOSING_POPOVER_DELAY_MS = 200;\n\n const props = withDefaults(\n defineProps<{\n /**\n * Text showed in the popover on hover\n */\n popoverText?: string;\n\n /**\n * Position the popover should take if space is available\n */\n popoverPosition?: BentoPopoverPositions | `${BentoPopoverPositions}`;\n\n /**\n * Attaches a `BentoTooltip` if present. Text showed in the tooltip on hover.\n */\n tooltipText?: string;\n\n /**\n * Position the tooltip should take if space is available.\n */\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n }>(),\n {\n popoverText: null,\n popoverPosition: 'top',\n tooltipText: null,\n tooltipPosition: 'top',\n }\n );\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const element = ref<HTMLSpanElement>(null);\n const isOpen = ref(false);\n\n const closingTimeOutId = ref();\n\n const openPopover = () => {\n isOpen.value = true;\n if (closingTimeOutId.value) {\n clearTimeout(closingTimeOutId.value);\n }\n };\n\n const closePopover = () => {\n // We want to delay closing for a couple of seconds so\n // it doesn't flicker if a user hovers over the icon and then inside the popover.\n const timeOutId = setTimeout(() => {\n isOpen.value = false;\n }, CLOSING_POPOVER_DELAY_MS);\n closingTimeOutId.value = timeOutId;\n };\n\n const infoIconOnFocus = () => {\n openPopover();\n };\n\n /**\n * Only close popover on blur if the newly focus element is not a child of this element\n * @param e - the event that contains the newly focused element\n */\n const infoIconOnFocusOut = (e: FocusEvent) => {\n if (!element.value || !(e?.relatedTarget instanceof Element) || !element.value.contains(e.relatedTarget)) {\n closePopover();\n }\n };\n\n const hasPopover = computed(() => props.popoverText || hasSlot('popover-content'));\n\n const shouldShowTooltipPopoverError = computed(() => !props.tooltipText && !hasPopover.value);\n\n watch(\n shouldShowTooltipPopoverError,\n value => {\n if (value) {\n throw new Error(\n 'BentoDashedUnderline requires either a tooltip or a popover to be configured. Check the docs for more info.'\n );\n }\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * The dashed underline serves as a visual cue to indicate that additional information is available for\n * a specific word or phrase without adding an icon.\n *\n * @example\n * import { BentoDashedUnderline } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashedUnderline },\n * template: `\n * <bento-dashed-underline>\n * annotated text\n * </bento-dashed-underline>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashed-underline.scss\" />\n"],"names":["__default__","props","__props","slots","useSlots","hasSlot","useHasSlot","element","ref","isOpen","closingTimeOutId","openPopover","closePopover","timeOutId","infoIconOnFocus","infoIconOnFocusOut","e","hasPopover","computed","shouldShowTooltipPopoverError","watch","value"],"mappings":";;;;;;;;AAgJI,MAAAA,IAAA,CAAA;;;;;;;;;;AAtGA,UAAAC,IAAAC,GA8BAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,EAAA,GAEAE,IAAAF,EAAA,GAEAG,IAAA,MAAA;AACI,MAAAF,EAAA,QAAA,IACAC,EAAA,SACI,aAAAA,EAAA,KAAA;AAAA,IACJ,GAGJE,IAAA,MAAA;AAGI,YAAAC,IAAA,WAAA,MAAA;AACI,QAAAJ,EAAA,QAAA;AAAA,MAAe,GAAA,GAAA;AAEnB,MAAAC,EAAA,QAAAG;AAAA,IAAyB,GAG7BC,IAAA,MAAA;AACI,MAAAH,EAAA;AAAA,IAAY,GAOhBI,IAAA,CAAAC,MAAA;AACI,OAAA,CAAAT,EAAA,SAAA,GAAAS,KAAA,gBAAAA,EAAA,0BAAA,YAAA,CAAAT,EAAA,MAAA,SAAAS,EAAA,aAAA,MACIJ,EAAA;AAAA,IACJ,GAGJK,IAAAC,EAAA,MAAAjB,EAAA,eAAAI,EAAA,iBAAA,CAAA,GAEAc,IAAAD,EAAA,MAAA,CAAAjB,EAAA,eAAA,CAAAgB,EAAA,KAAA;AAEA,WAAAG;AAAA,MAAAD;AAAA,MACI,CAAAE,MAAA;AAEI,YAAAA;AACI,gBAAA,IAAA;AAAA,YAAU;AAAA,UACN;AAAA,MAER;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { defineComponent as g, useSlots as R, ref as h, computed as p, provide as B, createElementBlock as c, openBlock as o, createVNode as C, createCommentVNode as D, createBlock as T, renderSlot as r, unref as s, mergeProps as $, createSlots as E, withCtx as l, Fragment as G, renderList as S, toRef as N } from "vue";
|
|
2
|
+
import { B as O } from "./header.vHSsdURt.js";
|
|
3
|
+
import { a as j, B as A } from "./tabs.DZk78MLK.js";
|
|
4
|
+
import { u as w } from "./use-has-slot.B7eQSabc.js";
|
|
5
|
+
import { D as x } from "./data-grid-template.keys.2_AkxuNT.js";
|
|
6
|
+
import { _ as H } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
7
|
+
import "../assets/data-grid-template.css";
|
|
8
|
+
const L = { class: "b-data-grid-template" }, P = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "b-data-grid-template__additional-content"
|
|
11
|
+
}, V = {}, q = /* @__PURE__ */ g({
|
|
12
|
+
...V,
|
|
13
|
+
__name: "data-grid-template",
|
|
14
|
+
props: {
|
|
15
|
+
/**
|
|
16
|
+
* The header that goes to the top of the template
|
|
17
|
+
*/
|
|
18
|
+
header: {
|
|
19
|
+
type: Object,
|
|
20
|
+
required: !0
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* All the tab properties that can be set on the inner tab components.
|
|
24
|
+
* - tabs.activeTabIndex: the currently active tab index.
|
|
25
|
+
* - tabs.tabs: an array of BentoTab props, the first item in the array will affect the `tab-1` slot and so on.
|
|
26
|
+
*/
|
|
27
|
+
tabs: {
|
|
28
|
+
type: Object,
|
|
29
|
+
default: void 0
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* Renders the tabs with a sticky positioning
|
|
33
|
+
*/
|
|
34
|
+
stickyTabs: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
emits: ["update:tabs"],
|
|
40
|
+
setup(i, { emit: _ }) {
|
|
41
|
+
const a = i, b = R(), m = w(b), v = _, f = h(null), k = p(() => {
|
|
42
|
+
var t, e;
|
|
43
|
+
return (e = (t = f.value) == null ? void 0 : t.$refs) == null ? void 0 : e.tablistwrapper;
|
|
44
|
+
}), u = p(() => Object.keys(b).filter((t) => t == null ? void 0 : t.includes("tab-"))), y = (t) => {
|
|
45
|
+
v("update:tabs", { ...a.tabs, activeTabIndex: t });
|
|
46
|
+
}, I = (t) => {
|
|
47
|
+
var e, n;
|
|
48
|
+
return ((n = (e = a == null ? void 0 : a.tabs.tabs) == null ? void 0 : e[t]) == null ? void 0 : n.title) ?? `Tab ${t + 1}`;
|
|
49
|
+
};
|
|
50
|
+
return B(x, () => ({ isDataGridTemplate: !0, stickyTabs: N(a, "stickyTabs"), tabsRef: k })), (t, e) => (o(), c("main", L, [
|
|
51
|
+
C(s(O), $(i.header, {
|
|
52
|
+
variant: "component",
|
|
53
|
+
class: "b-data-grid-template__header"
|
|
54
|
+
}), E({ _: 2 }, [
|
|
55
|
+
s(m)("infoIconTooltipContent") ? {
|
|
56
|
+
name: "infoIconTooltipContent",
|
|
57
|
+
fn: l(() => [
|
|
58
|
+
r(t.$slots, "infoIconTooltipContent", {}, void 0, !0)
|
|
59
|
+
]),
|
|
60
|
+
key: "0"
|
|
61
|
+
} : void 0
|
|
62
|
+
]), 1040),
|
|
63
|
+
s(m)("additionalContent") ? (o(), c("div", P, [
|
|
64
|
+
r(t.$slots, "additionalContent", {}, void 0, !0)
|
|
65
|
+
])) : D("", !0),
|
|
66
|
+
u.value.length > 1 ? (o(), T(s(j), {
|
|
67
|
+
key: 1,
|
|
68
|
+
ref_key: "tabsRef",
|
|
69
|
+
ref: f,
|
|
70
|
+
"active-tab-index": i.tabs.activeTabIndex,
|
|
71
|
+
sticky: i.stickyTabs,
|
|
72
|
+
"onUpdate:activeTabIndex": y
|
|
73
|
+
}, {
|
|
74
|
+
default: l(() => [
|
|
75
|
+
(o(!0), c(G, null, S(u.value, (n, d) => (o(), T(s(A), {
|
|
76
|
+
key: `tab-${d}`,
|
|
77
|
+
title: I(d)
|
|
78
|
+
}, {
|
|
79
|
+
default: l(() => [
|
|
80
|
+
r(t.$slots, `tab-${d + 1}`, {}, void 0, !0)
|
|
81
|
+
]),
|
|
82
|
+
_: 2
|
|
83
|
+
}, 1032, ["title"]))), 128))
|
|
84
|
+
]),
|
|
85
|
+
_: 3
|
|
86
|
+
}, 8, ["active-tab-index", "sticky"])) : r(t.$slots, "default", { key: 2 }, void 0, !0)
|
|
87
|
+
]));
|
|
88
|
+
}
|
|
89
|
+
}), Q = /* @__PURE__ */ H(q, [["__scopeId", "data-v-966b36ff"]]);
|
|
90
|
+
export {
|
|
91
|
+
Q as d
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=data-grid-template.LlK-7o84.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-grid-template.LlK-7o84.js","sources":["../../../vue2/src/templates/data-grid-template/data-grid-template.vue"],"sourcesContent":["<template>\n <main class=\"b-data-grid-template\">\n <bento-header v-bind=\"header\" variant=\"component\" class=\"b-data-grid-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div v-if=\"hasSlot('additionalContent')\" class=\"b-data-grid-template__additional-content\">\n <slot name=\"additionalContent\" />\n </div>\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n :sticky=\"stickyTabs\"\n @update:active-tab-index=\"emitTabs\"\n >\n <bento-tab v-for=\"(_item, index) in tabsSlots\" :key=\"`tab-${index}`\" :title=\"getTabTitle(index)\">\n <slot :name=\"`tab-${index + 1}`\" />\n </bento-tab>\n </bento-tabs>\n <slot v-else />\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, provide, Ref, ref, toRef, UnwrapRef, useSlots } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useHasSlot } from '@/composables';\n import { DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY } from './data-grid-template.keys';\n import type {\n BentoDataGridTemplateDataGrid,\n BentoDataGridTemplateHeader,\n BentoDataGridTemplateTabs,\n } from './data-grid-template.types';\n\n const props = defineProps({\n /**\n * The header that goes to the top of the template\n */\n header: {\n type: Object as PropType<BentoDataGridTemplateHeader>,\n required: true,\n },\n\n /**\n * All the tab properties that can be set on the inner tab components.\n * - tabs.activeTabIndex: the currently active tab index.\n * - tabs.tabs: an array of BentoTab props, the first item in the array will affect the `tab-1` slot and so on.\n */\n tabs: {\n type: Object as PropType<BentoDataGridTemplateTabs>,\n default: undefined,\n },\n\n /**\n * Renders the tabs with a sticky positioning\n */\n stickyTabs: {\n type: Boolean,\n default: false,\n },\n });\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits<{\n /**\n * Emits update event when activeTabIndex changes internally\n */\n (e: 'update:tabs', value: BentoDataGridTemplateTabs): void;\n }>();\n\n const tabsRef = ref(null);\n\n const computedTabsRef = computed(() => tabsRef.value?.$refs?.tablistwrapper);\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const emitTabs = (newActiveTabIndex: number) => {\n emit('update:tabs', { ...props.tabs, activeTabIndex: newActiveTabIndex });\n };\n\n const getTabTitle = (index: number) => props?.tabs.tabs?.[index]?.title ?? `Tab ${index + 1}`;\n\n const registerDatagridInDataGridTemplate: BentoDataGridTemplateDataGrid = () => {\n const isDataGridTemplate = true;\n const stickyTabs: Ref<boolean> = toRef(props, 'stickyTabs');\n const tabsRef: Ref<UnwrapRef<HTMLDivElement>> | null = computedTabsRef;\n\n // return values to the Tab component\n return { isDataGridTemplate, stickyTabs, tabsRef };\n };\n\n provide(DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY, registerDatagridInDataGridTemplate);\n</script>\n\n<script lang=\"ts\">\n /**\n * The data grid template is a restrictive, full-page data grid used to display information from a data set.\n * You can use this data grid template when your user needs a clear overview of data or a way of organizing and analyzing the data in their own way.\n * This data grid template shouldn’t be confused with the data grid.\n *\n * @example\n * import { BentoDataGridTemplate } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDataGridTemplate },\n * template: `\n * // If you want to display multiple data grids in the same page (they will be rendered in different tabs)\n * <bento-data-grid-template>\n * <template #tab-1><bento-data-grid v-bind=\"your-data-grid-args\" title=\"Title for tab 1\"/></template>\n * <template #tab-2><bento-data-grid v-bind=\"your-data-grid-args\" title=\"Title for tab 2\"/></template>\n * </bento-data-grid-template>\n * // Alternatively, if you only want to pass one data grid to your template:\n * <bento-data-grid-template>\n * <template #default><bento-data-grid v-bind=\"your-data-grid-args\"/></template>\n * </bento-data-grid-template>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./data-grid-template.scss\" />\n"],"names":["__default__","props","__props","slots","useSlots","hasSlot","useHasSlot","emit","__emit","tabsRef","ref","computedTabsRef","computed","_b","_a","tabsSlots","el","emitTabs","newActiveTabIndex","getTabTitle","index","provide","DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY","toRef"],"mappings":";;;;;;;;;;GA0HIA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AArFA,UAAAC,IAAAC,GA2BAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,GAOAC,IAAAC,EAAA,IAAA,GAEAC,IAAAC,EAAA,MAAA;;AAAA,cAAAC,KAAAC,IAAAL,EAAA,UAAA,gBAAAK,EAAA,UAAA,gBAAAD,EAAA;AAAA,KAAA,GAEAE,IAAAH,EAAA,MAAA,OAAA,KAAAT,CAAA,EAAA,OAAA,CAAAa,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAA,CAAAC,MAAA;AACI,MAAAX,EAAA,eAAA,EAAA,GAAAN,EAAA,MAAA,gBAAAiB,EAAA,CAAA;AAAA,IAAwE,GAG5EC,IAAA,CAAAC,MAAA;;AAAA,eAAAP,KAAAC,IAAAb,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAa,EAAAM,OAAA,gBAAAP,EAAA,UAAA,OAAAO,IAAA,CAAA;AAAA;AAWA,WAAAC,EAAAC,GATA,OAMI,EAAA,wBAAA,YAJAC,EAAAtB,GAAA,YAAA,GAIA,SAHAU,EAGA,EAGJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|