@adyen/bento-vue2 1.44.0 → 1.45.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 +17 -90
- 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/base-button.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/checkbox.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/focus-trap.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/info-icon-with-popover.css +1 -0
- 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/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/radio-input.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/tabs.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{accordion-item.BjXzREaK.js → accordion-item.CzKttO4w.js} +5 -5
- package/dist/chunks/{accordion-item.BjXzREaK.js.map → accordion-item.CzKttO4w.js.map} +1 -1
- package/dist/chunks/{action-bar.Dx12xlEW.js → action-bar.BXemSuq4.js} +7 -7
- package/dist/chunks/{action-bar.Dx12xlEW.js.map → action-bar.BXemSuq4.js.map} +1 -1
- package/dist/chunks/{alert.D2Z_aiFC.js → alert.CAIp-87f.js} +3 -3
- package/dist/chunks/{alert.D2Z_aiFC.js.map → alert.CAIp-87f.js.map} +1 -1
- package/dist/chunks/{avatar.DXzyWKsI.js → avatar.BgwjpLQO.js} +2 -2
- package/dist/chunks/{avatar.DXzyWKsI.js.map → avatar.BgwjpLQO.js.map} +1 -1
- package/dist/chunks/{base-button.4UYC3kp2.js → base-button.-gx_u8Bd.js} +3 -3
- package/dist/chunks/base-button.-gx_u8Bd.js.map +1 -0
- package/dist/chunks/{base-modal.BrqNR-ah.js → base-modal.4JSNBM4T.js} +12 -12
- package/dist/chunks/{base-modal.BrqNR-ah.js.map → base-modal.4JSNBM4T.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.ptKgeQEb.js → button-actions-with-menu.ieopdfI7.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.ptKgeQEb.js.map → button-actions-with-menu.ieopdfI7.js.map} +1 -1
- package/dist/chunks/{button-actions.BIQ3qA8q.js → button-actions.CtFB6iRj.js} +3 -3
- package/dist/chunks/{button-actions.BIQ3qA8q.js.map → button-actions.CtFB6iRj.js.map} +1 -1
- package/dist/chunks/{button.CufUNBkv.js → button.BX6ZJxF7.js} +13 -13
- package/dist/chunks/button.BX6ZJxF7.js.map +1 -0
- package/dist/chunks/{calendar.B9WZ8ub3.js → calendar.BouORZfb.js} +9 -9
- package/dist/chunks/{calendar.B9WZ8ub3.js.map → calendar.BouORZfb.js.map} +1 -1
- package/dist/chunks/{card.D9g7fZDX.js → card.BabmUkTG.js} +6 -6
- package/dist/chunks/{card.D9g7fZDX.js.map → card.BabmUkTG.js.map} +1 -1
- package/dist/chunks/{checkbox-group.Bcqac3y8.js → checkbox-group.DbLznnsa.js} +7 -7
- package/dist/chunks/{checkbox-group.Bcqac3y8.js.map → checkbox-group.DbLznnsa.js.map} +1 -1
- package/dist/chunks/{checkbox.B1qjI4R_.js → checkbox.fhQLs-NN.js} +6 -6
- package/dist/chunks/checkbox.fhQLs-NN.js.map +1 -0
- package/dist/chunks/{chevron-left.CtnrsqUy.js → chevron-left.PIu6yPqe.js} +3 -3
- package/dist/chunks/{chevron-left.CtnrsqUy.js.map → chevron-left.PIu6yPqe.js.map} +1 -1
- package/dist/chunks/{chevron-up.B2uWhZf7.js → chevron-up.DVfo78kV.js} +3 -3
- package/dist/chunks/{chevron-up.B2uWhZf7.js.map → chevron-up.DVfo78kV.js.map} +1 -1
- package/dist/chunks/{code-snippet.rmKiWrIv.js → code-snippet.5iJcUZSo.js} +20 -20
- package/dist/chunks/{code-snippet.rmKiWrIv.js.map → code-snippet.5iJcUZSo.js.map} +1 -1
- package/dist/chunks/{codemirror.BlV6WO5w.js → codemirror.CXFEqvAi.js} +2047 -2053
- package/dist/chunks/{codemirror.BlV6WO5w.js.map → codemirror.CXFEqvAi.js.map} +1 -1
- package/dist/chunks/{controls-group.J8shO_JL.js → controls-group.CnXzOQkX.js} +3 -3
- package/dist/chunks/{controls-group.J8shO_JL.js.map → controls-group.CnXzOQkX.js.map} +1 -1
- package/dist/chunks/{copy.DgzxvExj.js → copy.DN0tClPm.js} +4 -4
- package/dist/chunks/{copy.DgzxvExj.js.map → copy.DN0tClPm.js.map} +1 -1
- package/dist/chunks/{country.CM5oZOyZ.js → country.Bft91V1L.js} +3 -3
- package/dist/chunks/{country.CM5oZOyZ.js.map → country.Bft91V1L.js.map} +1 -1
- package/dist/chunks/{country.types.Br0AjxGy.js → country.types.pilf5B3F.js} +483 -480
- package/dist/chunks/{country.types.Br0AjxGy.js.map → country.types.pilf5B3F.js.map} +1 -1
- package/dist/chunks/{currency.P7Psn_SK.js → currency.BmI4Sqy5.js} +2 -2
- package/dist/chunks/{currency.P7Psn_SK.js.map → currency.BmI4Sqy5.js.map} +1 -1
- package/dist/chunks/{dashboard-section._KVy37B0.js → dashboard-section.DYXZhtop.js} +5 -5
- package/dist/chunks/{dashboard-section._KVy37B0.js.map → dashboard-section.DYXZhtop.js.map} +1 -1
- package/dist/chunks/{dashed-underline.DX5QlK14.js → dashed-underline.BvSZS1-m.js} +4 -4
- package/dist/chunks/{dashed-underline.DX5QlK14.js.map → dashed-underline.BvSZS1-m.js.map} +1 -1
- package/dist/chunks/{data-grid-template.BgTUIoak.js → data-grid-template.Du92TEFY.js} +4 -4
- package/dist/chunks/{data-grid-template.BgTUIoak.js.map → data-grid-template.Du92TEFY.js.map} +1 -1
- package/dist/chunks/{data-grid.sAbzCVND.js → data-grid.Kwtf1DMq.js} +46 -46
- package/dist/chunks/{data-grid.sAbzCVND.js.map → data-grid.Kwtf1DMq.js.map} +1 -1
- package/dist/chunks/{date-picker.DrSWxADA.js → date-picker.B7mTNghB.js} +11 -11
- package/dist/chunks/{date-picker.DrSWxADA.js.map → date-picker.B7mTNghB.js.map} +1 -1
- package/dist/chunks/{date-range-picker.CFIOD59O.js → date-range-picker.DPLri9D-.js} +241 -241
- package/dist/chunks/{date-range-picker.CFIOD59O.js.map → date-range-picker.DPLri9D-.js.map} +1 -1
- package/dist/chunks/{date.BQ29-2L1.js → date.1zs9CRhw.js} +2 -4
- package/dist/chunks/{date.BQ29-2L1.js.map → date.1zs9CRhw.js.map} +1 -1
- package/dist/chunks/{dialog-page.CplkzZGZ.js → dialog-page.DcJ7LaOE.js} +33 -32
- package/dist/chunks/dialog-page.DcJ7LaOE.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.ZAFh7KqG.js → dropdown-default-textbox.DBoSso4J.js} +88 -76
- package/dist/chunks/dropdown-default-textbox.DBoSso4J.js.map +1 -0
- package/dist/chunks/{dropdown-tag.Ntdp7P7W.js → dropdown-tag.XIlES6IT.js} +8 -8
- package/dist/chunks/{dropdown-tag.Ntdp7P7W.js.map → dropdown-tag.XIlES6IT.js.map} +1 -1
- package/dist/chunks/{dropdown.DC9un4VJ.js → dropdown.BqsoncJr.js} +60 -60
- package/dist/chunks/dropdown.BqsoncJr.js.map +1 -0
- package/dist/chunks/{empty-state.B8ZeRgDi.js → empty-state.1TyzB5ju.js} +5 -5
- package/dist/chunks/{empty-state.B8ZeRgDi.js.map → empty-state.1TyzB5ju.js.map} +1 -1
- package/dist/chunks/{error-message.B7uoqQpq.js → error-message.Ccc1sTTp.js} +3 -3
- package/dist/chunks/{error-message.B7uoqQpq.js.map → error-message.Ccc1sTTp.js.map} +1 -1
- package/dist/chunks/{es6.C-HLzYPA.js → es6.jIyAPBgt.js} +4 -4
- package/dist/chunks/{es6.C-HLzYPA.js.map → es6.jIyAPBgt.js.map} +1 -1
- package/dist/chunks/{file-uploader.ItCr8Ezn.js → file-uploader.C6kcnhqp.js} +9 -9
- package/dist/chunks/{file-uploader.ItCr8Ezn.js.map → file-uploader.C6kcnhqp.js.map} +1 -1
- package/dist/chunks/{filter-bar.Dowrph-Z.js → filter-bar.DT_-lVmf.js} +48 -48
- package/dist/chunks/{filter-bar.Dowrph-Z.js.map → filter-bar.DT_-lVmf.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.B880PL1J.js → fixed-scroller.IPM3AzHS.js} +4 -4
- package/dist/chunks/{fixed-scroller.B880PL1J.js.map → fixed-scroller.IPM3AzHS.js.map} +1 -1
- package/dist/chunks/focus-trap.CGypVwG6.js +495 -0
- package/dist/chunks/focus-trap.CGypVwG6.js.map +1 -0
- package/dist/chunks/{footer-actions.B3GJ1wNP.js → footer-actions.D0uH9JWq.js} +4 -4
- package/dist/chunks/{footer-actions.B3GJ1wNP.js.map → footer-actions.D0uH9JWq.js.map} +1 -1
- package/dist/chunks/{form-layout-title.BarHgyjC.js → form-layout-title.DN0jonFa.js} +3 -3
- package/dist/chunks/{form-layout-title.BarHgyjC.js.map → form-layout-title.DN0jonFa.js.map} +1 -1
- package/dist/chunks/{generate-uid.D-HFI38h.js → generate-uid.NJ8tVoha.js} +2 -2
- package/dist/chunks/{generate-uid.D-HFI38h.js.map → generate-uid.NJ8tVoha.js.map} +1 -1
- package/dist/chunks/header.BvZxtIOD.js +205 -0
- package/dist/chunks/header.BvZxtIOD.js.map +1 -0
- package/dist/chunks/{index.Gcw_BUVh.js → index.D8ivUe7P.js} +6 -5
- package/dist/chunks/{index.Gcw_BUVh.js.map → index.D8ivUe7P.js.map} +1 -1
- package/dist/chunks/info-icon-with-popover.DEjsASNU.js +71 -0
- package/dist/chunks/info-icon-with-popover.DEjsASNU.js.map +1 -0
- package/dist/chunks/{info-icon.p-28zHUJ.js → info-icon.0d0GzDe2.js} +3 -3
- package/dist/chunks/{info-icon.p-28zHUJ.js.map → info-icon.0d0GzDe2.js.map} +1 -1
- package/dist/chunks/{input-field-password.CgxF9jhq.js → input-field-password.HRDEb0jL.js} +10 -10
- package/dist/chunks/{input-field-password.CgxF9jhq.js.map → input-field-password.HRDEb0jL.js.map} +1 -1
- package/dist/chunks/{input-field.CcjqGkLs.js → input-field.D6N2kt7s.js} +6 -6
- package/dist/chunks/input-field.D6N2kt7s.js.map +1 -0
- package/dist/chunks/{inspector.types.DaY6OOzz.js → inspector.types.2YEArjPi.js} +5 -5
- package/dist/chunks/{inspector.types.DaY6OOzz.js.map → inspector.types.2YEArjPi.js.map} +1 -1
- package/dist/chunks/{layout-row.DzS_XyyF.js → layout-row.BfS-cPky.js} +5 -5
- package/dist/chunks/layout-row.BfS-cPky.js.map +1 -0
- package/dist/chunks/{link.v-y0fKjn.js → link.UOEUR35A.js} +7 -7
- package/dist/chunks/{link.v-y0fKjn.js.map → link.UOEUR35A.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.BnX0H4HE.js → listbox-option-tag.Co0ycEdQ.js} +3 -3
- package/dist/chunks/{listbox-option-tag.BnX0H4HE.js.map → listbox-option-tag.Co0ycEdQ.js.map} +1 -1
- package/dist/chunks/{menu.B78fzH_k.js → menu.CLaN9Eys.js} +9 -9
- package/dist/chunks/{menu.B78fzH_k.js.map → menu.CLaN9Eys.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.DgftXCJe.js → modal-fullscreen.B-qr1Szh.js} +7 -7
- package/dist/chunks/{modal-fullscreen.DgftXCJe.js.map → modal-fullscreen.B-qr1Szh.js.map} +1 -1
- package/dist/chunks/{modal.BA745pfv.js → modal.wU3uUJKq.js} +6 -6
- package/dist/chunks/{modal.BA745pfv.js.map → modal.wU3uUJKq.js.map} +1 -1
- package/dist/chunks/{pagination.CfwtuZ7R.js → pagination.BM3FhtxJ.js} +5 -5
- package/dist/chunks/{pagination.CfwtuZ7R.js.map → pagination.BM3FhtxJ.js.map} +1 -1
- package/dist/chunks/{payment-method.CoXB0ZAW.js → payment-method.UaERFtej.js} +2 -2
- package/dist/chunks/{payment-method.CoXB0ZAW.js.map → payment-method.UaERFtej.js.map} +1 -1
- package/dist/chunks/{popover.ZlmaSYms.js → popover.DsUymZWJ.js} +5 -5
- package/dist/chunks/{popover.ZlmaSYms.js.map → popover.DsUymZWJ.js.map} +1 -1
- package/dist/chunks/{popper-container.CnWphJTN.js → popper-container.B1iB2ovW.js} +5 -5
- package/dist/chunks/popper-container.B1iB2ovW.js.map +1 -0
- package/dist/chunks/{promo-banner.cTUF9seG.js → promo-banner.BXtIM4C9.js} +7 -7
- package/dist/chunks/{promo-banner.cTUF9seG.js.map → promo-banner.BXtIM4C9.js.map} +1 -1
- package/dist/chunks/{radio-group.EnMXbuly.js → radio-group.DMob8x2J.js} +15 -15
- package/dist/chunks/{radio-group.EnMXbuly.js.map → radio-group.DMob8x2J.js.map} +1 -1
- package/dist/chunks/{radio-input.q980f8Uf.js → radio-input.C1DZbkcT.js} +5 -5
- package/dist/chunks/radio-input.C1DZbkcT.js.map +1 -0
- package/dist/chunks/{search-bar.lYuXPzBX.js → search-bar.rubkdbcD.js} +3 -3
- package/dist/chunks/{search-bar.lYuXPzBX.js.map → search-bar.rubkdbcD.js.map} +1 -1
- package/dist/chunks/{secondary-nav.CF6WPYn4.js → secondary-nav.DKSjc5bn.js} +5 -5
- package/dist/chunks/{secondary-nav.CF6WPYn4.js.map → secondary-nav.DKSjc5bn.js.map} +1 -1
- package/dist/chunks/{segmented-control.CVeUROYR.js → segmented-control.DL0W7lJ_.js} +4 -4
- package/dist/chunks/{segmented-control.CVeUROYR.js.map → segmented-control.DL0W7lJ_.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CjuBQ2UA.js → selection-card-group.iYyZ9yX4.js} +10 -10
- package/dist/chunks/{selection-card-group.CjuBQ2UA.js.map → selection-card-group.iYyZ9yX4.js.map} +1 -1
- package/dist/chunks/{sidepanel.NUx7L5f1.js → sidepanel.CQnLpV8A.js} +7 -7
- package/dist/chunks/{sidepanel.NUx7L5f1.js.map → sidepanel.CQnLpV8A.js.map} +1 -1
- package/dist/chunks/{status.types.B0jtv0c7.js → status.types.Cv6hHRMu.js} +2 -2
- package/dist/chunks/{status.types.B0jtv0c7.js.map → status.types.Cv6hHRMu.js.map} +1 -1
- package/dist/chunks/{step.5g9BIi15.js → step.BsIdWhaZ.js} +3 -3
- package/dist/chunks/{step.5g9BIi15.js.map → step.BsIdWhaZ.js.map} +1 -1
- package/dist/chunks/{structured-list-item.BEhWyaVP.js → structured-list-item.BhBbmkbw.js} +6 -6
- package/dist/chunks/{structured-list-item.BEhWyaVP.js.map → structured-list-item.BhBbmkbw.js.map} +1 -1
- package/dist/chunks/{summary-grid-item-custom.CSXo4NjY.js → summary-grid-item-custom.CicAOBVQ.js} +5 -5
- package/dist/chunks/{summary-grid-item-custom.CSXo4NjY.js.map → summary-grid-item-custom.CicAOBVQ.js.map} +1 -1
- package/dist/chunks/{tabs.Casntai-.js → tabs.9kObZry9.js} +5 -5
- package/dist/chunks/{tabs.Casntai-.js.map → tabs.9kObZry9.js.map} +1 -1
- package/dist/chunks/{tag.wTXg-O7i.js → tag.-YNhsBv7.js} +3 -3
- package/dist/chunks/{tag.wTXg-O7i.js.map → tag.-YNhsBv7.js.map} +1 -1
- package/dist/chunks/{textarea.F-JyRtIw.js → textarea.Cf21WMwL.js} +6 -6
- package/dist/chunks/{textarea.F-JyRtIw.js.map → textarea.Cf21WMwL.js.map} +1 -1
- package/dist/chunks/{timeline-item.BJyB8-Wv.js → timeline-item.Cu5b-Mqj.js} +12 -12
- package/dist/chunks/timeline-item.Cu5b-Mqj.js.map +1 -0
- package/dist/chunks/{toast.BEipTIrz.js → toast.DgJbW9CL.js} +4 -4
- package/dist/chunks/{toast.BEipTIrz.js.map → toast.DgJbW9CL.js.map} +1 -1
- package/dist/chunks/{toggle-button.CYplDIO-.js → toggle-button.Cf8C7p6e.js} +2 -2
- package/dist/chunks/{toggle-button.CYplDIO-.js.map → toggle-button.Cf8C7p6e.js.map} +1 -1
- package/dist/chunks/{toggle.INRYdQzz.js → toggle.CnS7qszG.js} +3 -3
- package/dist/chunks/{toggle.INRYdQzz.js.map → toggle.CnS7qszG.js.map} +1 -1
- package/dist/chunks/{tooltip.DH8TqpYV.js → tooltip.R2sqydIE.js} +4 -4
- package/dist/chunks/{tooltip.DH8TqpYV.js.map → tooltip.R2sqydIE.js.map} +1 -1
- package/dist/chunks/{tutorial.DFvMZAN5.js → tutorial.w2ZqeOh1.js} +9 -9
- package/dist/chunks/{tutorial.DFvMZAN5.js.map → tutorial.w2ZqeOh1.js.map} +1 -1
- package/dist/chunks/{typography.Bu_WAKdf.js → typography.J1v_SPG3.js} +2 -1
- package/dist/chunks/{typography.Bu_WAKdf.js.map → typography.J1v_SPG3.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.BVVMh0wc.js → use-bento-toast-controller.Cn_2Eogn.js} +3 -3
- package/dist/chunks/{use-bento-toast-controller.BVVMh0wc.js.map → use-bento-toast-controller.Cn_2Eogn.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.BiqVX5O7.js → use-cached-selected-values.impKjAIS.js} +22 -22
- package/dist/chunks/use-cached-selected-values.impKjAIS.js.map +1 -0
- package/dist/chunks/{use-country-items.C25TI6tp.js → use-country-items.DPBbl1KK.js} +2 -2
- package/dist/chunks/{use-country-items.C25TI6tp.js.map → use-country-items.DPBbl1KK.js.map} +1 -1
- 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/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.js +1 -1
- package/dist/index.js +69 -69
- 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.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +27 -25
- package/dist/internal.js.map +1 -1
- package/dist/layout.js +1 -1
- package/dist/link.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 +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +2 -2
- 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/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/web-types.json +2 -2
- package/package.json +7 -6
- package/dist/chunks/base-button.4UYC3kp2.js.map +0 -1
- package/dist/chunks/button.CufUNBkv.js.map +0 -1
- package/dist/chunks/checkbox.B1qjI4R_.js.map +0 -1
- package/dist/chunks/dialog-page.CplkzZGZ.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.ZAFh7KqG.js.map +0 -1
- package/dist/chunks/dropdown.DC9un4VJ.js.map +0 -1
- package/dist/chunks/focus-trap.DSkLNO_i.js +0 -443
- package/dist/chunks/focus-trap.DSkLNO_i.js.map +0 -1
- package/dist/chunks/header.BLjdXtYJ.js +0 -266
- package/dist/chunks/header.BLjdXtYJ.js.map +0 -1
- package/dist/chunks/input-field.CcjqGkLs.js.map +0 -1
- package/dist/chunks/layout-row.DzS_XyyF.js.map +0 -1
- package/dist/chunks/popper-container.CnWphJTN.js.map +0 -1
- package/dist/chunks/radio-input.q980f8Uf.js.map +0 -1
- package/dist/chunks/timeline-item.BJyB8-Wv.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.BiqVX5O7.js.map +0 -1
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
import { defineComponent as x, ref as h, computed as T } from "vue";
|
|
2
|
-
import { R as A } from "./refresh.BKI9WwKh.js";
|
|
3
|
-
import { u as w } from "./use-has-slot.C9lQZ6nz.js";
|
|
4
|
-
import { B as E, c as b, a as U } from "./typography.Bu_WAKdf.js";
|
|
5
|
-
import { u as C } from "./i18n.BQkEbtPM.js";
|
|
6
|
-
import { r as m, t as c, l as L, a as D, g as X } from "./get-date-locale.BN8xEjY0.js";
|
|
7
|
-
import { B as F } from "./button-actions-with-menu.ptKgeQEb.js";
|
|
8
|
-
import { c as I, a as Y } from "./index.DDnf1O9p.js";
|
|
9
|
-
import { e as G } from "./index.DPafeRJa.js";
|
|
10
|
-
import { e as H } from "./index.CrhTVr5J.js";
|
|
11
|
-
import { B as g } from "./popover.ZlmaSYms.js";
|
|
12
|
-
import { g as $ } from "./generate-uid.D-HFI38h.js";
|
|
13
|
-
import { I as j } from "./info.CyeBsLgt.js";
|
|
14
|
-
import { n as N } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
15
|
-
import { d as W } from "./button-actions.BIQ3qA8q.js";
|
|
16
|
-
import "../assets/header.css";
|
|
17
|
-
function k(o, t) {
|
|
18
|
-
m(2, arguments);
|
|
19
|
-
var n = c(o), e = c(t), l = n.getFullYear() - e.getFullYear(), a = n.getMonth() - e.getMonth();
|
|
20
|
-
return l * 12 + a;
|
|
21
|
-
}
|
|
22
|
-
function z(o, t) {
|
|
23
|
-
return m(2, arguments), c(o).getTime() - c(t).getTime();
|
|
24
|
-
}
|
|
25
|
-
var S = {
|
|
26
|
-
ceil: Math.ceil,
|
|
27
|
-
round: Math.round,
|
|
28
|
-
floor: Math.floor,
|
|
29
|
-
trunc: function(o) {
|
|
30
|
-
return o < 0 ? Math.ceil(o) : Math.floor(o);
|
|
31
|
-
}
|
|
32
|
-
// Math.trunc is not supported by IE
|
|
33
|
-
}, V = "trunc";
|
|
34
|
-
function q(o) {
|
|
35
|
-
return o ? S[o] : S[V];
|
|
36
|
-
}
|
|
37
|
-
function J(o) {
|
|
38
|
-
m(1, arguments);
|
|
39
|
-
var t = c(o);
|
|
40
|
-
return G(t).getTime() === H(t).getTime();
|
|
41
|
-
}
|
|
42
|
-
function K(o, t) {
|
|
43
|
-
m(2, arguments);
|
|
44
|
-
var n = c(o), e = c(t), l = I(n, e), a = Math.abs(k(n, e)), r;
|
|
45
|
-
if (a < 1)
|
|
46
|
-
r = 0;
|
|
47
|
-
else {
|
|
48
|
-
n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - l * a);
|
|
49
|
-
var s = I(n, e) === -l;
|
|
50
|
-
J(c(o)) && a === 1 && I(o, e) === 1 && (s = !1), r = l * (a - Number(s));
|
|
51
|
-
}
|
|
52
|
-
return r === 0 ? 0 : r;
|
|
53
|
-
}
|
|
54
|
-
function Q(o, t, n) {
|
|
55
|
-
m(2, arguments);
|
|
56
|
-
var e = z(o, t) / 1e3;
|
|
57
|
-
return q(void 0)(e);
|
|
58
|
-
}
|
|
59
|
-
var P = 1440, Z = 2520, O = 43200, tt = 86400;
|
|
60
|
-
function et(o, t) {
|
|
61
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
62
|
-
m(2, arguments);
|
|
63
|
-
var e = n.locale || L;
|
|
64
|
-
if (!e.formatDistance)
|
|
65
|
-
throw new RangeError("locale must contain formatDistance property");
|
|
66
|
-
var l = I(o, t);
|
|
67
|
-
if (isNaN(l))
|
|
68
|
-
throw new RangeError("Invalid time value");
|
|
69
|
-
var a = Y(n);
|
|
70
|
-
a.addSuffix = !!n.addSuffix, a.comparison = l;
|
|
71
|
-
var r, s;
|
|
72
|
-
l > 0 ? (r = c(t), s = c(o)) : (r = c(o), s = c(t));
|
|
73
|
-
var f = Q(s, r), _ = (D(s) - D(r)) / 1e3, i = Math.round((f - _) / 60), p;
|
|
74
|
-
if (i < 2)
|
|
75
|
-
return n.includeSeconds ? f < 5 ? e.formatDistance("lessThanXSeconds", 5, a) : f < 10 ? e.formatDistance("lessThanXSeconds", 10, a) : f < 20 ? e.formatDistance("lessThanXSeconds", 20, a) : f < 40 ? e.formatDistance("halfAMinute", null, a) : f < 60 ? e.formatDistance("lessThanXMinutes", 1, a) : e.formatDistance("xMinutes", 1, a) : i === 0 ? e.formatDistance("lessThanXMinutes", 1, a) : e.formatDistance("xMinutes", i, a);
|
|
76
|
-
if (i < 45)
|
|
77
|
-
return e.formatDistance("xMinutes", i, a);
|
|
78
|
-
if (i < 90)
|
|
79
|
-
return e.formatDistance("aboutXHours", 1, a);
|
|
80
|
-
if (i < P) {
|
|
81
|
-
var u = Math.round(i / 60);
|
|
82
|
-
return e.formatDistance("aboutXHours", u, a);
|
|
83
|
-
} else {
|
|
84
|
-
if (i < Z)
|
|
85
|
-
return e.formatDistance("xDays", 1, a);
|
|
86
|
-
if (i < O) {
|
|
87
|
-
var B = Math.round(i / P);
|
|
88
|
-
return e.formatDistance("xDays", B, a);
|
|
89
|
-
} else if (i < tt)
|
|
90
|
-
return p = Math.round(i / O), e.formatDistance("aboutXMonths", p, a);
|
|
91
|
-
}
|
|
92
|
-
if (p = K(s, r), p < 12) {
|
|
93
|
-
var R = Math.round(i / O);
|
|
94
|
-
return e.formatDistance("xMonths", R, a);
|
|
95
|
-
} else {
|
|
96
|
-
var y = p % 12, M = Math.floor(p / 12);
|
|
97
|
-
return y < 3 ? e.formatDistance("aboutXYears", M, a) : y < 9 ? e.formatDistance("overXYears", M, a) : e.formatDistance("almostXYears", M + 1, a);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
function ot(o, t) {
|
|
101
|
-
return m(1, arguments), et(o, Date.now(), t);
|
|
102
|
-
}
|
|
103
|
-
const nt = {
|
|
104
|
-
"en-US": {
|
|
105
|
-
moreInformation: "More information"
|
|
106
|
-
},
|
|
107
|
-
"pt-BR": {
|
|
108
|
-
moreInformation: "Mais informações"
|
|
109
|
-
},
|
|
110
|
-
"ja-JP": {
|
|
111
|
-
moreInformation: "詳細情報"
|
|
112
|
-
}
|
|
113
|
-
}, at = {
|
|
114
|
-
i18n: { messages: nt }
|
|
115
|
-
}, rt = /* @__PURE__ */ x({
|
|
116
|
-
...at,
|
|
117
|
-
__name: "info-icon-with-popover",
|
|
118
|
-
props: {
|
|
119
|
-
/**
|
|
120
|
-
* Text showed in the popover on hover
|
|
121
|
-
*/
|
|
122
|
-
popoverText: { type: String, default: null },
|
|
123
|
-
/**
|
|
124
|
-
* Position the popover should take if space is available
|
|
125
|
-
*/
|
|
126
|
-
popoverPosition: {
|
|
127
|
-
type: g.props.position.type,
|
|
128
|
-
default: g.props.position.default,
|
|
129
|
-
validator: g.props.position.validator
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
setup(o) {
|
|
133
|
-
const { t: n } = C(), e = h(), l = h(null), a = $("bento-info-icon-with-popover"), r = h(), s = h(), f = () => {
|
|
134
|
-
r.value = !0, s.value && clearTimeout(s.value);
|
|
135
|
-
}, _ = () => {
|
|
136
|
-
const u = setTimeout(() => {
|
|
137
|
-
r.value = !1;
|
|
138
|
-
}, 200);
|
|
139
|
-
s.value = u;
|
|
140
|
-
};
|
|
141
|
-
return { __sfc: !0, CLOSING_POPOVER_DELAY_MS: 200, t: n, infoIconRef: e, targetElement: l, popoverId: a, isOpen: r, closingTimeOutId: s, openPopover: f, closePopover: _, infoIconOnFocus: () => {
|
|
142
|
-
f();
|
|
143
|
-
}, infoIconOnFocusOut: (u) => {
|
|
144
|
-
(!e.value || !((u == null ? void 0 : u.relatedTarget) instanceof Element) || !e.value.contains(u.relatedTarget)) && _();
|
|
145
|
-
}, BentoPopover: g, BentoTypography: E, InfoIcon: j };
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
var st = function() {
|
|
149
|
-
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
150
|
-
return n("div", { ref: "infoIconRef", staticClass: "b-info-icon-with-popover", attrs: { tabindex: "0", "data-testid": "info-icon-with-popover" }, on: { mouseenter: e.openPopover, mouseleave: e.closePopover, focus: e.infoIconOnFocus, focusout: e.infoIconOnFocusOut } }, [n(e.InfoIcon, { ref: "targetElement", staticClass: "b-info-icon-with-popover__svg", attrs: { "aria-expanded": e.isOpen, "aria-describedby": e.popoverId, "svg-title": e.t("moreInformation") } }), e.targetElement ? n(e.BentoPopover, { attrs: { open: e.isOpen, "target-element": e.targetElement, position: t.popoverPosition, role: "tooltip", "fit-content": "", "disable-focus-trap": "" } }, [n(e.BentoTypography, [t._t("default", function() {
|
|
151
|
-
return [t.popoverText ? n("div", [t._v(" " + t._s(t.popoverText) + " ")]) : t._e()];
|
|
152
|
-
})], 2)], 1) : t._e()], 1);
|
|
153
|
-
}, it = [], lt = /* @__PURE__ */ N(
|
|
154
|
-
rt,
|
|
155
|
-
st,
|
|
156
|
-
it,
|
|
157
|
-
!1,
|
|
158
|
-
null,
|
|
159
|
-
"72f661e3"
|
|
160
|
-
);
|
|
161
|
-
const v = lt.exports;
|
|
162
|
-
var d = /* @__PURE__ */ ((o) => (o.PAGE = "page", o.COMPONENT = "component", o))(d || {});
|
|
163
|
-
const ct = {
|
|
164
|
-
"en-US": {
|
|
165
|
-
lastUpdated: "Last updated: {date} ago"
|
|
166
|
-
}
|
|
167
|
-
}, ft = x({
|
|
168
|
-
i18n: { messages: ct },
|
|
169
|
-
name: "bento-header",
|
|
170
|
-
components: {
|
|
171
|
-
BentoTypography: E,
|
|
172
|
-
ButtonActionsWithMenu: F,
|
|
173
|
-
BentoLoadingButton: W,
|
|
174
|
-
InfoIconWithPopover: v,
|
|
175
|
-
ReloadIcon: A
|
|
176
|
-
},
|
|
177
|
-
props: {
|
|
178
|
-
/**
|
|
179
|
-
* Array of BentoButtonActionsList to show to the right of the title
|
|
180
|
-
*/
|
|
181
|
-
actions: {
|
|
182
|
-
type: Array,
|
|
183
|
-
default: null
|
|
184
|
-
},
|
|
185
|
-
/**
|
|
186
|
-
* Text showed in the info-icon tooltip on hover
|
|
187
|
-
*/
|
|
188
|
-
infoIconTooltipText: { type: v.props.popoverText.type, default: null },
|
|
189
|
-
/**
|
|
190
|
-
* Popover position of the info icon text.
|
|
191
|
-
*/
|
|
192
|
-
infoIconPopoverPosition: {
|
|
193
|
-
type: v.props.popoverPosition.type,
|
|
194
|
-
default: v.props.popoverPosition.default,
|
|
195
|
-
validator: v.props.popoverPosition.validator
|
|
196
|
-
},
|
|
197
|
-
/**
|
|
198
|
-
* JavaScript "Date" object for when the content was last updated
|
|
199
|
-
*/
|
|
200
|
-
lastUpdated: { type: [Date, Number], default: null },
|
|
201
|
-
/**
|
|
202
|
-
* Variant represents type of Header
|
|
203
|
-
* @values page, component
|
|
204
|
-
*/
|
|
205
|
-
variant: {
|
|
206
|
-
type: String,
|
|
207
|
-
default: d.PAGE,
|
|
208
|
-
validator: (o) => Object.values(d).includes(o)
|
|
209
|
-
},
|
|
210
|
-
/**
|
|
211
|
-
* Text used as a title
|
|
212
|
-
*/
|
|
213
|
-
title: { type: String, required: !0 },
|
|
214
|
-
/**
|
|
215
|
-
* Reload button which shows next to the header's timestamp
|
|
216
|
-
* {@see BentoHeaderReloadButton}
|
|
217
|
-
*/
|
|
218
|
-
reloadButton: {
|
|
219
|
-
type: Object,
|
|
220
|
-
default: null
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
emits: ["reload"],
|
|
224
|
-
setup(o, { slots: t }) {
|
|
225
|
-
const { t: n, locale: e } = C(), l = X(), a = T(() => ({
|
|
226
|
-
"b-header--component": o.variant === d.COMPONENT
|
|
227
|
-
})), r = T(() => ({
|
|
228
|
-
el: o.variant === d.PAGE ? b.H1 : b.H2,
|
|
229
|
-
variant: U.TITLE,
|
|
230
|
-
medium: o.variant === d.COMPONENT,
|
|
231
|
-
large: o.variant === d.PAGE
|
|
232
|
-
})), s = T(
|
|
233
|
-
() => o.lastUpdated ? n("lastUpdated", {
|
|
234
|
-
date: ot(o.lastUpdated, {
|
|
235
|
-
locale: l[e.value.substring(0, 2)] || l.enUS
|
|
236
|
-
})
|
|
237
|
-
}) : null
|
|
238
|
-
);
|
|
239
|
-
return {
|
|
240
|
-
hasSlot: w(t),
|
|
241
|
-
conditionalClasses: a,
|
|
242
|
-
timestamp: s,
|
|
243
|
-
typography: r
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
var ut = function() {
|
|
248
|
-
var t = this, n = t._self._c;
|
|
249
|
-
return t._self._setupProxy, n("div", { staticClass: "b-header", class: t.conditionalClasses }, [n("div", { staticClass: "b-header__wrapper" }, [n("div", { staticClass: "b-header__title" }, [n("div", [n("bento-typography", t._b({ staticClass: "b-header__text" }, "bento-typography", t.typography, !1), [t._v(t._s(t.title))]), t.infoIconTooltipText || t.hasSlot("infoIconTooltipContent") ? n("info-icon-with-popover", { staticClass: "b-header__tooltip", attrs: { "popover-text": t.infoIconTooltipText }, scopedSlots: t._u([t.hasSlot("infoIconTooltipContent") ? { key: "default", fn: function() {
|
|
250
|
-
return [t._t("infoIconTooltipContent")];
|
|
251
|
-
}, proxy: !0 } : null], null, !0) }) : t._e()], 1), t.lastUpdated ? n("div", { staticClass: "b-header__timestamp-section" }, [n("bento-typography", { staticClass: "b-header__timestamp", attrs: { el: "div" } }, [t._v(" " + t._s(t.timestamp) + " ")]), t.reloadButton ? n("bento-loading-button", { attrs: { variant: "tertiary", state: t.reloadButton.state }, on: { click: t.reloadButton.event }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
|
|
252
|
-
return [n("reload-icon")];
|
|
253
|
-
}, proxy: !0 }], null, !1, 3087161615) }, [t._v(t._s(t.reloadButton.title))]) : t._e()], 1) : t._e()]), t.actions ? n("button-actions-with-menu", { staticClass: "b-header__actions", attrs: { actions: t.actions, "displayed-actions": 2 } }) : t._e()], 1)]);
|
|
254
|
-
}, pt = [], dt = /* @__PURE__ */ N(
|
|
255
|
-
ft,
|
|
256
|
-
ut,
|
|
257
|
-
pt,
|
|
258
|
-
!1,
|
|
259
|
-
null,
|
|
260
|
-
"13431e64"
|
|
261
|
-
);
|
|
262
|
-
const Et = dt.exports;
|
|
263
|
-
export {
|
|
264
|
-
Et as B
|
|
265
|
-
};
|
|
266
|
-
//# sourceMappingURL=header.BLjdXtYJ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header.BLjdXtYJ.js","sources":["../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInCalendarMonths/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInMilliseconds/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/roundingMethods/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isLastDayOfMonth/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInMonths/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInSeconds/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/formatDistance/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/formatDistanceToNow/index.js","../../src/components/header/components/info-icon-with-popover/info-icon-with-popover.vue","../../src/components/header/header.types.ts","../../src/components/header/header.vue"],"sourcesContent":["import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * var result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\n\nexport default function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();\n var monthDiff = dateLeft.getMonth() - dateRight.getMonth();\n return yearDiff * 12 + monthDiff;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\n\nexport default function differenceInMilliseconds(dateLeft, dateRight) {\n requiredArgs(2, arguments);\n return toDate(dateLeft).getTime() - toDate(dateRight).getTime();\n}","var roundingMap = {\n ceil: Math.ceil,\n round: Math.round,\n floor: Math.floor,\n trunc: function (value) {\n return value < 0 ? Math.ceil(value) : Math.floor(value);\n } // Math.trunc is not supported by IE\n\n};\nvar defaultRoundingMethod = 'trunc';\nexport function getRoundingMethod(method) {\n return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];\n}","import toDate from \"../toDate/index.js\";\nimport endOfDay from \"../endOfDay/index.js\";\nimport endOfMonth from \"../endOfMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is the last day of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * var result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\n\nexport default function isLastDayOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n return endOfDay(date).getTime() === endOfMonth(date).getTime();\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarMonths from \"../differenceInCalendarMonths/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport isLastDayOfMonth from \"../isLastDayOfMonth/index.js\";\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates using trunc as a default rounding method.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\n\nexport default function differenceInMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var sign = compareAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight));\n var result; // Check for the difference of less than month\n\n if (difference < 1) {\n result = 0;\n } else {\n if (dateLeft.getMonth() === 1 && dateLeft.getDate() > 27) {\n // This will check if the date is end of Feb and assign a higher end of month date\n // to compare it with Jan\n dateLeft.setDate(30);\n }\n\n dateLeft.setMonth(dateLeft.getMonth() - sign * difference); // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign; // Check for cases of one full calendar month\n\n if (isLastDayOfMonth(toDate(dirtyDateLeft)) && difference === 1 && compareAsc(dirtyDateLeft, dateRight) === 1) {\n isLastMonthNotFull = false;\n }\n\n result = sign * (difference - Number(isLastMonthNotFull));\n } // Prevent negative zero\n\n\n return result === 0 ? 0 : result;\n}","import differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of seconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\n\nexport default function differenceInSeconds(dateLeft, dateRight, options) {\n requiredArgs(2, arguments);\n var diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;\n return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import compareAsc from \"../compareAsc/index.js\";\nimport differenceInMonths from \"../differenceInMonths/index.js\";\nimport differenceInSeconds from \"../differenceInSeconds/index.js\";\nimport defaultLocale from \"../locale/en-US/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport cloneObject from \"../_lib/cloneObject/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MINUTES_IN_DAY = 1440;\nvar MINUTES_IN_ALMOST_TWO_DAYS = 2520;\nvar MINUTES_IN_MONTH = 43200;\nvar MINUTES_IN_TWO_MONTHS = 86400;\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `distanceInWords ` to `formatDistance`\n * to make its name consistent with `format` and `formatRelative`.\n *\n * - The order of arguments is swapped to make the function\n * consistent with `differenceIn...` functions.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWords(\n * new Date(1986, 3, 4, 10, 32, 0),\n * new Date(1986, 3, 4, 11, 32, 0),\n * { addSuffix: true }\n * ) //=> 'in about 1 hour'\n *\n * // v2.0.0 onward\n *\n * formatDistance(\n * new Date(1986, 3, 4, 11, 32, 0),\n * new Date(1986, 3, 4, 10, 32, 0),\n * { addSuffix: true }\n * ) //=> 'in about 1 hour'\n * ```\n *\n * @param {Date|Number} date - the date\n * @param {Date|Number} baseDate - the date to compare with\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `baseDate` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport default function formatDistance(dirtyDate, dirtyBaseDate) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n requiredArgs(2, arguments);\n var locale = options.locale || defaultLocale;\n\n if (!locale.formatDistance) {\n throw new RangeError('locale must contain formatDistance property');\n }\n\n var comparison = compareAsc(dirtyDate, dirtyBaseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError('Invalid time value');\n }\n\n var localizeOptions = cloneObject(options);\n localizeOptions.addSuffix = Boolean(options.addSuffix);\n localizeOptions.comparison = comparison;\n var dateLeft;\n var dateRight;\n\n if (comparison > 0) {\n dateLeft = toDate(dirtyBaseDate);\n dateRight = toDate(dirtyDate);\n } else {\n dateLeft = toDate(dirtyDate);\n dateRight = toDate(dirtyBaseDate);\n }\n\n var seconds = differenceInSeconds(dateRight, dateLeft);\n var offsetInSeconds = (getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft)) / 1000;\n var minutes = Math.round((seconds - offsetInSeconds) / 60);\n var months; // 0 up to 2 mins\n\n if (minutes < 2) {\n if (options.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance('lessThanXSeconds', 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance('lessThanXSeconds', 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance('lessThanXSeconds', 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance('halfAMinute', null, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', minutes, localizeOptions);\n }\n } // 2 mins up to 0.75 hrs\n\n } else if (minutes < 45) {\n return locale.formatDistance('xMinutes', minutes, localizeOptions); // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance('aboutXHours', 1, localizeOptions); // 1.5 hrs up to 24 hrs\n } else if (minutes < MINUTES_IN_DAY) {\n var hours = Math.round(minutes / 60);\n return locale.formatDistance('aboutXHours', hours, localizeOptions); // 1 day up to 1.75 days\n } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {\n return locale.formatDistance('xDays', 1, localizeOptions); // 1.75 days up to 30 days\n } else if (minutes < MINUTES_IN_MONTH) {\n var days = Math.round(minutes / MINUTES_IN_DAY);\n return locale.formatDistance('xDays', days, localizeOptions); // 1 month up to 2 months\n } else if (minutes < MINUTES_IN_TWO_MONTHS) {\n months = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('aboutXMonths', months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft); // 2 months up to 12 months\n\n if (months < 12) {\n var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('xMonths', nearestMonth, localizeOptions); // 1 year up to max Date\n } else {\n var monthsSinceStartOfYear = months % 12;\n var years = Math.floor(months / 12); // N years up to 1 years 3 months\n\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance('aboutXYears', years, localizeOptions); // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance('overXYears', years, localizeOptions); // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance('almostXYears', years + 1, localizeOptions);\n }\n }\n}","import distanceInWords from \"../formatDistance/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name formatDistanceToNow\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given date and now in words.\n *\n * | Distance to now | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance to now | Result |\n * |---------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `distanceInWordsToNow ` to `formatDistanceToNow`\n * to make its name consistent with `format` and `formatRelative`.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWordsToNow(new Date(2014, 6, 2), { addSuffix: true })\n * //=> 'in 6 months'\n *\n * // v2.0.0 onward\n *\n * formatDistanceToNow(new Date(2014, 6, 2), { addSuffix: true })\n * //=> 'in 6 months'\n * ```\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result specifies if now is earlier or later than the passed date\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * var result = formatDistanceToNow(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * var result = formatDistanceToNow(\n * new Date(2015, 0, 1, 0, 0, 15),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * var result = formatDistanceToNow(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in about 1 year'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = formatDistanceToNow(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\n\nexport default function formatDistanceToNow(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n return distanceInWords(dirtyDate, Date.now(), dirtyOptions);\n}","<template>\n <div\n ref=\"infoIconRef\"\n class=\"b-info-icon-with-popover\"\n tabindex=\"0\"\n data-testid=\"info-icon-with-popover\"\n @mouseenter=\"openPopover\"\n @mouseleave=\"closePopover\"\n @focus=\"infoIconOnFocus\"\n @focusout=\"infoIconOnFocusOut\"\n >\n <info-icon\n ref=\"targetElement\"\n class=\"b-info-icon-with-popover__svg\"\n :aria-expanded=\"isOpen\"\n :aria-describedby=\"popoverId\"\n :svg-title=\"t('moreInformation')\"\n />\n <bento-popover\n v-if=\"targetElement\"\n :open=\"isOpen\"\n :target-element=\"targetElement\"\n :position=\"popoverPosition\"\n role=\"tooltip\"\n fit-content\n disable-focus-trap\n >\n <bento-typography>\n <slot>\n <div v-if=\"popoverText\">\n {{ popoverText }}\n </div>\n </slot>\n </bento-typography>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '@/components/typography';\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import InfoIcon from '@adyen/ui-assets-icons-16/vue/info';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const CLOSING_POPOVER_DELAY_MS = 200;\n\n defineProps({\n /**\n * Text showed in the popover on hover\n */\n popoverText: { type: String, default: null },\n\n /**\n * Position the popover should take if space is available\n */\n popoverPosition: {\n type: BentoPopover.props.position.type,\n default: BentoPopover.props.position.default,\n validator: BentoPopover.props.position.validator,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const infoIconRef = ref<HTMLDivElement>();\n const targetElement = ref(null);\n const popoverId = generateUid('bento-info-icon-with-popover');\n const isOpen = ref();\n const closingTimeOutId = ref();\n\n const openPopover = () => {\n isOpen.value = true;\n if (closingTimeOutId.value) {\n clearTimeout(closingTimeOutId.value);\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 (\n !infoIconRef.value ||\n !(e?.relatedTarget instanceof Element) ||\n !infoIconRef.value.contains(e.relatedTarget)\n ) {\n closePopover();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to be used whenever an info icon needs to be rendered with a popover instead of a tooltip.\n *\n * @example\n * import { BentoInfoIconWithPopover } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoInfoIconWithPopover },\n * template: `\n * <info-icon-with-popover popover-text=\"Content can be passed as a string like\" :popover-position=\"position\">\n * Content can also be rendered as a slot\n * </info-icon-with-popover>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./info-icon-with-popover.scss\" />\n","import { BentoLoadingButtonState } from '@/core/components/loading-button/loading-button.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoHeaderVariant {\n PAGE = 'page',\n COMPONENT = 'component',\n}\n\nexport interface BentoHeaderReloadButton {\n title: string;\n event?: (event: Event) => void;\n state?: `${BentoLoadingButtonState}`;\n}\n","<template>\n <div class=\"b-header\" :class=\"conditionalClasses\">\n <div class=\"b-header__wrapper\">\n <div class=\"b-header__title\">\n <div>\n <bento-typography v-bind=\"typography\" class=\"b-header__text\">{{ title }}</bento-typography>\n <info-icon-with-popover\n v-if=\"infoIconTooltipText || hasSlot('infoIconTooltipContent')\"\n class=\"b-header__tooltip\"\n :popover-text=\"infoIconTooltipText\"\n >\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #default\n ><slot name=\"infoIconTooltipContent\"\n /></template>\n </info-icon-with-popover>\n </div>\n <div v-if=\"lastUpdated\" class=\"b-header__timestamp-section\">\n <bento-typography class=\"b-header__timestamp\" el=\"div\">\n {{ timestamp }}\n </bento-typography>\n <bento-loading-button\n v-if=\"reloadButton\"\n variant=\"tertiary\"\n :state=\"reloadButton.state\"\n @click=\"reloadButton.event\"\n ><template #iconLeft><reload-icon /></template>{{ reloadButton.title }}</bento-loading-button\n >\n </div>\n </div>\n <button-actions-with-menu\n v-if=\"actions\"\n :actions=\"actions\"\n :displayed-actions=\"2\"\n class=\"b-header__actions\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import ReloadIcon from '@adyen/ui-assets-icons-16/vue/refresh';\n import { InfoIconWithPopover } from './components/info-icon-with-popover';\n import { BentoButtonActionsList, BentoLoadingButton } from '@/components/button';\n import { useHasSlot } from '@/composables';\n import { BentoHeaderReloadButton, BentoHeaderVariant } from './header.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { useI18n } from '@/utils/ts/i18n';\n import { getDateLocale } from '@/utils/ts/get-date-locale/get-date-locale';\n import ButtonActionsWithMenu from '../internal/button-actions-with-menu/button-actions-with-menu.vue';\n\n import formatDistanceToNow from 'date-fns/formatDistanceToNow';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n export default defineComponent({\n i18n: { messages },\n name: 'bento-header',\n components: {\n BentoTypography,\n ButtonActionsWithMenu,\n BentoLoadingButton,\n InfoIconWithPopover,\n ReloadIcon,\n },\n props: {\n /**\n * Array of BentoButtonActionsList to show to the right of the title\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: { type: InfoIconWithPopover.props.popoverText.type, default: null },\n\n /**\n * Popover position of the info icon text.\n */\n infoIconPopoverPosition: {\n type: InfoIconWithPopover.props.popoverPosition.type,\n default: InfoIconWithPopover.props.popoverPosition.default,\n validator: InfoIconWithPopover.props.popoverPosition.validator,\n },\n\n /**\n * JavaScript \"Date\" object for when the content was last updated\n */\n lastUpdated: { type: [Date, Number], default: null },\n\n /**\n * Variant represents type of Header\n * @values page, component\n */\n variant: {\n type: String as PropType<BentoHeaderVariant | `${BentoHeaderVariant}`>,\n default: BentoHeaderVariant.PAGE,\n validator: (value: BentoHeaderVariant) => Object.values(BentoHeaderVariant).includes(value),\n },\n\n /**\n * Text used as a title\n */\n title: { type: String, required: true },\n\n /**\n * Reload button which shows next to the header's timestamp\n * {@see BentoHeaderReloadButton}\n */\n reloadButton: {\n type: Object as PropType<BentoHeaderReloadButton>,\n default: null,\n },\n },\n emits: ['reload'],\n setup(props, { slots }) {\n const { t, locale } = useI18n<{ message: MessageSchema }>({ messages });\n // TODO to replace with dynamic import\n const locales = getDateLocale();\n\n const conditionalClasses = computed(() => ({\n 'b-header--component': props.variant === BentoHeaderVariant.COMPONENT,\n }));\n\n const typography = computed(() => ({\n el: props.variant === BentoHeaderVariant.PAGE ? BentoTypographyElement.H1 : BentoTypographyElement.H2,\n variant: BentoTypographyVariant.TITLE,\n medium: props.variant === BentoHeaderVariant.COMPONENT,\n large: props.variant === BentoHeaderVariant.PAGE,\n }));\n\n const timestamp = computed(() =>\n props.lastUpdated\n ? t('lastUpdated', {\n date: formatDistanceToNow(props.lastUpdated, {\n locale: locales[locale.value.substring(0, 2)] || locales.enUS,\n }),\n })\n : null\n );\n return {\n hasSlot: useHasSlot(slots),\n conditionalClasses,\n timestamp,\n typography,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./header.scss\" />\n"],"names":["differenceInCalendarMonths","dirtyDateLeft","dirtyDateRight","requiredArgs","dateLeft","toDate","dateRight","yearDiff","monthDiff","differenceInMilliseconds","roundingMap","value","defaultRoundingMethod","getRoundingMethod","method","isLastDayOfMonth","dirtyDate","date","endOfDay","endOfMonth","differenceInMonths","sign","compareAsc","difference","result","isLastMonthNotFull","differenceInSeconds","options","diff","MINUTES_IN_DAY","MINUTES_IN_ALMOST_TWO_DAYS","MINUTES_IN_MONTH","MINUTES_IN_TWO_MONTHS","formatDistance","dirtyBaseDate","locale$1","locale","comparison","localizeOptions","cloneObject","seconds","offsetInSeconds","getTimezoneOffsetInMilliseconds","minutes","months","hours","days","nearestMonth","monthsSinceStartOfYear","years","formatDistanceToNow","dirtyOptions","__default__","messages$1","t","useI18n","infoIconRef","ref","targetElement","popoverId","generateUid","isOpen","closingTimeOutId","openPopover","closePopover","timeOutId","e","BentoHeaderVariant","BentoHeaderVariant2","_sfc_main","defineComponent","messages","BentoTypography","ButtonActionsWithMenu","BentoLoadingButton","InfoIconWithPopover","RefreshIcon","props","slots","locales","getDateLocale","conditionalClasses","computed","typography","BentoTypographyElement","BentoTypographyVariant","timestamp","useHasSlot"],"mappings":";;;;;;;;;;;;;;;;AA4Be,SAAAA,EAAAC,GAAAC,GAAA;AACf,EAAAC,EAAA,GAAA,SAAA;AACA,MAAAC,IAAAC,EAAAJ,CAAA,GACAK,IAAAD,EAA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;AAAA,UACA,QAAAE,EAAA3C,EAAA,MAAA,UAAA,GAAA,CAAA,CAAA,KAAA2C,EAAA;AAAA,QACA,CAAA;AAAA,MACA,CAAA,IAAA;AAAA,IAEA;AAEA,WAAA;AAAA,MAAA,SAAAQ,EAAAT,CAAA;AAAA,MACA,oBAAAG;AAAA,MACA,WAAAK;AAAA,MACA,YAAAH;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-field.CcjqGkLs.js","sources":["../../src/components/input-field/input-field.types.ts","../../src/components/input-field/input-field.vue"],"sourcesContent":["import { BentoDropdown } from '@/components/dropdown/';\nimport type { HTMLAttributes } from 'vue/types/jsx';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldVariant {\n DEFAULT = 'default',\n PAYMENT_METHOD = 'payment-method',\n STATIC_VALUE = 'static-value',\n DROPDOWN = 'dropdown',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldElementPosition {\n START = 'start',\n END = 'end',\n}\n\nexport enum BentoInputFieldStateClass {\n CONDENSED = 'condensed',\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldType {\n SEARCH = 'search',\n TEXT = 'text',\n NUMBER = 'number',\n}\n\nexport type BentoInputFieldValue = string | number;\n\ntype DropdownProps = InstanceType<typeof BentoDropdown>['$props'];\nexport type BentoInputDropdownProps = {\n items: DropdownProps['items'];\n value: DropdownProps['value'];\n dynamicFiltering?: DropdownProps['dynamicFiltering'];\n 'aria-label'?: HTMLAttributes['aria-label'];\n};\n\n/**\n * @deprecated The use of these enums is no longer supported.\n * Use `v-on:` or `@` to listen to the events being emitted.\n * This enum will be removed in 2.0.\n */\nexport enum BentoInputFieldEvent {\n INPUT = 'input',\n ESCAPE_PRESSED = 'escape-pressed',\n UPDATE_DROPDOWN = 'update:dropdown',\n DROPDOWN_INPUT = 'dropdown-input',\n FOCUS = 'focus',\n CHANGE = 'change',\n BLUR = 'blur',\n KEYDOWN = 'keydown',\n}\n","<template>\n <bento-typography\n class=\"b-input-field\"\n data-testid=\"input-text-container\"\n :class=\"inputFieldConditionalClasses\"\n el=\"div\"\n variant=\"body\"\n >\n <field-label\n v-if=\"hasSlot('default')\"\n :for=\"inputFieldId\"\n data-testid=\"input-field-label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n @click=\"focusInput\"\n >\n <slot></slot>\n </field-label>\n\n <div class=\"b-input-field__input-box\" data-testid=\"input-box\" :aria-disabled=\"disabled\" @click=\"focusInput\">\n <!-- Optional Icon for Default text variant -->\n <span\n v-if=\"isDefaultVariant && (hasSlot('defaultIconBefore') || hasSlot('iconBefore'))\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-before\"\n >\n <slot v-if=\"hasSlot('iconBefore')\" name=\"iconBefore\" />\n <slot v-if=\"hasSlot('defaultIconBefore') && !hasSlot('iconBefore')\" name=\"defaultIconBefore\" />\n </span>\n\n <!-- Mandatory Icon for Payment Method variant -->\n <span\n v-if=\"isPaymentMethodVariant && hasSlot('paymentMethod')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__payment-method\"\n >\n <slot name=\"paymentMethod\" />\n </span>\n\n <!-- Dropdown at start -->\n <div\n v-if=\"shouldDisplayDropdownAtStart\"\n :id=\"dropdownId\"\n class=\"b-input-field__dropdown b-input-field__dropdown--start\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onDropdownInput\"\n />\n </div>\n\n <!-- Static Value at start -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtStart\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--start\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n <div class=\"b-input-field__input-container\">\n <input\n :id=\"inputFieldId\"\n v-bind=\"attrs\"\n ref=\"inputFieldElement\"\n class=\"b-input-field__input\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"computedAriaDescribedBy\"\n :aria-owns=\"computedAriaOwns\"\n :aria-invalid=\"shouldShowError\"\n :placeholder=\"placeholder\"\n :type=\"type\"\n :value=\"value\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n @change=\"emit('change')\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @keydown=\"emit('keydown', $event)\"\n @keyup=\"emit('keyup', $event)\"\n @keydown.esc=\"emit('escape-pressed')\"\n />\n\n <!-- Hint at the end -->\n <bento-typography v-if=\"hint && isFocused && value\" el=\"span\" class=\"b-input-field__hint\">\n {{ hint }}\n </bento-typography>\n </div>\n\n <span\n v-if=\"hasSlot('iconAfter')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-after\"\n data-testid=\"input-text__icon-after\"\n >\n <slot name=\"iconAfter\" />\n </span>\n\n <!-- Static Value at the end -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtEnd\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--end\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n\n <!-- Dropdown at end -->\n <div\n v-if=\"shouldDisplayDropdownAtEnd\"\n :id=\"dropdownId\"\n data-testid=\"input-field-dropdown-container-end\"\n class=\"b-input-field__dropdown b-input-field__dropdown--end\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n :id=\"dropdownId\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onDropdownInput\"\n />\n </div>\n </div>\n\n <error-message\n v-if=\"shouldShowError && !!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-input-field__error-message\"\n />\n\n <span v-if=\"hasSlot('description')\" :id=\"descriptionId\" class=\"b-input-field__description\" @click=\"focusInput\">\n <bento-typography el=\"span\" variant=\"body\">\n <slot id=\"description\" name=\"description\" />\n </bento-typography>\n </span>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, PropType, provide, Ref, ref, toRef, toRefs, useAttrs, useSlots } from 'vue';\n\n // Components\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/core/utils/ts';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import {\n INPUT_FIELD_COMPONENT_INJECTION_KEY,\n INPUT_FIELD_HINT_INJECTION_KEY,\n } from '@/components/input-field/input-field.keys';\n\n // Composables\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n\n // Types\n import {\n BentoInputDropdownProps,\n BentoInputFieldElementPosition,\n BentoInputFieldStateClass,\n BentoInputFieldType,\n BentoInputFieldValue,\n BentoInputFieldVariant,\n } from './input-field.types';\n import { BentoListboxSelectedValue } from '@/types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n ariaHidden: { type: Boolean, default: true },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Text that labels an the input element\n */\n ariaLabel: { type: String, default: undefined },\n\n /**\n * Reduces height of the input\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Disables the possibility of changing value in the input-field\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Dropdown props for the small selectable dropdown menu.\n * Properties supported:\n *\n * - `value`: Selected value of the dropdown\n * - `items`: List of available items\n * - `aria-label`: Text that labels the dropdown element\n *\n */\n dropdown: {\n type: Object as PropType<BentoInputDropdownProps>,\n default: undefined,\n },\n\n /**\n * Position of the dropdown before or after input value\n */\n dropdownPosition: {\n type: String as PropType<BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`>,\n default: BentoInputFieldElementPosition.START,\n validator: (value: BentoInputFieldElementPosition) =>\n Object.values(BentoInputFieldElementPosition).includes(value),\n },\n\n /**\n * Adds error validation class for outlining input-field.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error: { type: Boolean, default: false },\n\n /**\n * Renders input-field with an error state and the error message beneath the input box\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder: { type: String, default: '' },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will set the input field to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Static text that displayed before or after input value\n * Applicable to the Static Value variant\n */\n staticValue: { type: String, default: '' },\n\n /**\n * Position of Static Value before or after input value\n */\n staticValuePosition: {\n type: String as PropType<BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`>,\n default: BentoInputFieldElementPosition.START,\n validator: (value: BentoInputFieldElementPosition) =>\n Object.values(BentoInputFieldElementPosition).includes(value),\n },\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * A string specifying the type of control to render.\n * All `input` types are available but only `search`, `text` and `number` are fully supported.\n *\n * If `type` is `search`, use `bento-search-bar` instead.\n */\n type: {\n type: String as PropType<BentoInputFieldType | `${BentoInputFieldType}` | HTMLInputElement['type']>,\n default: BentoInputFieldType.TEXT,\n },\n\n /**\n * Text displayed as the value of the input-field\n */\n value: { type: [String, Number] as PropType<BentoInputFieldValue>, default: undefined },\n\n /**\n * Describes the different variants for the input element\n */\n variant: {\n type: String as PropType<BentoInputFieldVariant | `${BentoInputFieldVariant}`>,\n default: BentoInputFieldVariant.DEFAULT,\n validator: (value: BentoInputFieldVariant) => Object.values(BentoInputFieldVariant).includes(value),\n },\n });\n\n const emit = defineEmits([\"update:dropdown\", \"blur\", \"change\", \"dropdown-input\", \"escape-pressed\", \"focus\", \"keydown\", \"keyup\", \"input\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const inputFieldElement = ref(null);\n const inputFieldId = generateUid('input');\n const dropdownId = generateUid('input-dropdown');\n const staticValueId = generateUid('input-static-value');\n const descriptionId = generateUid('input-description');\n const errorId = generateUid('input-error');\n const isFocused = ref(false);\n\n // Provide INPUT_FIELD_COMPONENT_INJECTION_KEY as true, to set the input only dropdown size variant in the BentoDropdown comp\n provide(INPUT_FIELD_COMPONENT_INJECTION_KEY, true);\n // Renders the input with a hint if a string is provided\n const hint = inject<Ref<string | undefined>>(INPUT_FIELD_HINT_INJECTION_KEY, ref(undefined));\n\n const onFocus = () => {\n isFocused.value = true;\n emit('focus');\n };\n\n const onBlur = () => {\n isFocused.value = false;\n emit('blur');\n };\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const shouldShowStaticValue = computed(\n () => props.variant === BentoInputFieldVariant.STATIC_VALUE && !!slots.staticValue\n );\n\n const isDefaultVariant = computed(() => props.variant === BentoInputFieldVariant.DEFAULT);\n\n const isPaymentMethodVariant = computed(() => props.variant === BentoInputFieldVariant.PAYMENT_METHOD);\n\n const shouldDisplayStaticValueAtStart = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayStaticValueAtEnd = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowDropdown = computed(() => props.variant === BentoInputFieldVariant.DROPDOWN && !!props.dropdown);\n const shouldDisplayDropdownAtStart = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayDropdownAtEnd = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.error)\n );\n\n const computedAriaOwns = computed(() => {\n if (shouldShowDropdown.value === true && shouldShowStaticValue.value === true) {\n return `${staticValueId} ${dropdownId}`;\n }\n if (shouldShowDropdown.value === true) {\n return `${dropdownId}`;\n }\n if (shouldShowStaticValue.value === true) {\n return `${staticValueId}`;\n }\n return null;\n });\n\n // vue-i18n issue with t() used in script - direct usage in template works\n // requires either createI18n({ legacy: false }) or to be wrapped in computed()\n const computedAriaLabelFallbackMessage = computed(() => t('ariaLabelFallback'));\n const computedAriaLabelDropdowFallback = computed(() =>\n t('ariaLabelDropdownFallback', { inputLabel: computedAriaLabel.value })\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: hasSlot('default')\n ? (getSlotText(slots)('default') as string)\n : computedAriaLabelFallbackMessage,\n });\n\n const computedAriaDescribedBy = computed(\n () =>\n `${hasSlot('description') ? descriptionId : ''} ${\n shouldShowError.value && !!props.errorMessage ? errorId : ''\n }`\n );\n\n const inputFieldConditionalClasses = computed(() => ({\n [`b-input-field--${BentoInputFieldStateClass.CONDENSED}`]: props.condensed,\n [`b-input-field--${BentoInputFieldStateClass.DISABLED}`]: props.disabled,\n [`b-input-field--${BentoInputFieldStateClass.READONLY}`]: isReadOnly.value,\n [`b-input-field--${BentoInputFieldStateClass.ERROR}`]: shouldShowError.value,\n }));\n\n const inputFieldDropdownProps = computed(() => ({\n 'aria-label': computedAriaLabelDropdowFallback.value,\n ...props.dropdown,\n }));\n\n const onInput = (event: Event) => {\n const inputValue = (event.target as HTMLInputElement).value;\n if (!props.disabled && !isReadOnly.value) {\n emit('input', inputValue);\n }\n };\n\n const onDropdownInput = (selectedValue: BentoListboxSelectedValue) => {\n emit('dropdown-input', selectedValue);\n emit('update:dropdown', { ...props?.dropdown, value: selectedValue });\n };\n\n const focusInput = () => {\n inputFieldElement.value.focus();\n };\n\n // Expose method so that other components can focus on it in Vue3\n defineExpose({\n focusInput,\n });\n\n if (!Object.values(BentoInputFieldType).includes(props.type as BentoInputFieldType)) {\n printDevelopmentWarning(`\"bento-input-field\" dropdown does not support the type ${props.type}`);\n }\n\n /**\n * Deprecations\n */\n if (props.error) {\n deprecate(\n 'BentoInputField \"error\" property',\n `Use the BentoInputField \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n if (hasSlot('defaultIconBefore')) {\n deprecate(\n 'BentoInputField \"defaultIconBefore\" slot',\n `Use the BentoInputField \"iconBefore\" slot instead to add an icon at the left side of the input field\n <bento-input-field>\n \\t<template #iconBefore>\n \\t\\t<my-icon-goes-here />\n \\t</template>\n </bento-input-field>`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Input field component is used to create interactive controls for web-based\n * forms in order to accept data from the user.\n *\n * @example\n * import { BentoInputField } from '@adyen/bento-vue2'\n *\n * const inputValue = ref('');\n *\n * export default {\n * components: { BentoInputField },\n * tempate: `\n * <bento-input-field\n * :value=\"inputValue\"\n * :input=\"newValue => inputValue.value = newValue\"\n * >\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-field.scss\" />\n"],"names":["BentoInputFieldVariant","BentoInputFieldVariant2","BentoInputFieldElementPosition","BentoInputFieldElementPosition2","BentoInputFieldStateClass","BentoInputFieldStateClass2","BentoInputFieldType","BentoInputFieldType2","BentoInputFieldEvent","BentoInputFieldEvent2","__default__","messages","attrs","useAttrs","slots","useSlots","t","useI18n","hasSlot","useHasSlot","inputFieldElement","ref","inputFieldId","generateUid","dropdownId","staticValueId","descriptionId","errorId","isFocused","provide","INPUT_FIELD_COMPONENT_INJECTION_KEY","hint","inject","INPUT_FIELD_HINT_INJECTION_KEY","onFocus","emit","onBlur","isReadOnly","useFormLayoutFieldLoading","toRef","props","shouldShowStaticValue","computed","isDefaultVariant","isPaymentMethodVariant","shouldDisplayStaticValueAtStart","shouldDisplayStaticValueAtEnd","shouldShowDropdown","shouldDisplayDropdownAtStart","shouldDisplayDropdownAtEnd","shouldShowError","computedAriaOwns","computedAriaLabelFallbackMessage","computedAriaLabelDropdowFallback","computedAriaLabel","ariaLabelAttribute","ariaLabel","toRefs","useAriaLabel","getSlotText","computedAriaDescribedBy","inputFieldConditionalClasses","inputFieldDropdownProps","onInput","event","inputValue","onDropdownInput","selectedValue","focusInput","expose","printDevelopmentWarning","deprecate"],"mappings":";;;;;;;;;;;;AAMY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,iBAAA,kBACAA,EAAA,eAAA,gBACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,OAAA,QACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA,CAAA,CAAA,GAqBAE,KAAA,kBAAAC,OACRA,E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,MAAqD,CAAA,kBAAAtC,EAAA,SAAA,EAAA,GAAAoC,EAAA;AAAA,MACgB,CAAA,kBAAApC,EAAA,QAAA,EAAA,GAAAoC,EAAA;AAAA,MACD,CAAA,kBAAApC,EAAA,QAAA,EAAA,GAAAiC,EAAA;AAAA,MACK,CAAA,kBAAAjC,EAAA,KAAA,EAAA,GAAA8C,EAAA;AAAA,IACE,EAAA,GAG3EY,IAAApB,EAAA,OAAA;AAAA,MAAgD,cAAAW,EAAA;AAAA,MACG,GAAAb,EAAA;AAAA,IACtC,EAAA,GAGbuB,IAAA,CAAAC,MAAA;AACI,YAAAC,IAAAD,EAAA,OAAA;AACA,MAAA,CAAAxB,EAAA,YAAA,CAAAH,EAAA,SACIF,EAAA,SAAA8B,CAAA;AAAA,IACJ,GAGJC,IAAA,CAAAC,MAAA;AACI,MAAAhC,EAAA,kBAAAgC,CAAA,GACAhC,EAAA,mBAAA,EAAA,GAAAK,KAAA,gBAAAA,EAAA,UAAA,OAAA2B,EAAA,CAAA;AAAA,IAAoE,GAGxEC,IAAA,MAAA;AACI,MAAAhD,EAAA,MAAA,MAAA;AAAA,IAA8B;AAIlC,WAAAiD,EAAA;AAAA,MAAa,YAAAD;AAAA,IACT,CAAA,GAGJ,OAAA,OAAA9D,CAAA,EAAA,SAAAkC,EAAA,IAAA,KACI8B,GAAA,0DAAA9B,EAAA,IAAA,EAAA,GAMJA,EAAA,SACI+B;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIRrD,EAAA,mBAAA,KACIqD;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MACA;AAAA,IAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout-row.DzS_XyyF.js","sources":["../../src/components/layout/layout.keys.ts","../../src/components/layout/layout.vue","../../src/components/layout/layout.types.ts","../../src/components/layout/components/layout-row/layout-row.vue"],"sourcesContent":["export const LAYOUT_SIZE_INJECTION_KEY = Symbol('Layout size inject key');\n","<template>\n <component :is=\"wrapperElement\" class=\"b-layout\" :class=\"conditionalClasses\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, toRef } from 'vue';\n import { BentoLayoutProps } from './layout.types';\n import { LAYOUT_SIZE_INJECTION_KEY } from '@/components/layout/layout.keys';\n\n const props = defineProps({\n variant: { default: 'page' },\n size: { default: 'full-width' }\n});\n\n provide(LAYOUT_SIZE_INJECTION_KEY, toRef(props, 'size'));\n\n const conditionalClasses = computed(() => ({\n 'b-layout--component': props.variant === 'component',\n }));\n\n const wrapperElement = props.variant === 'page' ? 'main' : 'div';\n</script>\n\n<script lang=\"ts\">\n /**\n * Layout is a basic scaffolding of a page that defines spacing, some functionality and responsive behaviour of its top level sections.\n *\n * @example\n * import { BentoLayout, BentoLayoutRow } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoLayout, BentoLayoutRow },\n * template: `\n * <bento-layout size=\"narrow\">\n * <bento-layout-row>\n * Row 1\n * </bento-layout-row>\n * <bento-layout-row>\n * Row 2\n * </bento-layout-row>\n * </bento-layout>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./layout.scss\" />\n","/**\n * @private\n */\nexport const BentoLayoutVariantOptions = ['page', 'component'] as const;\nexport const BentoLayoutSizeOptions = ['full-width', 'narrow', 'half-width'] as const;\nexport const BentoLayoutRowColumnLayoutOptions = ['3-9', '9-3', '4-8', '8-4', '6-6'] as const;\n\n// Public\nexport type BentoLayoutVariant = (typeof BentoLayoutVariantOptions)[number];\nexport type BentoLayoutSize = (typeof BentoLayoutSizeOptions)[number];\nexport type BentoLayoutRowColumnLayout = (typeof BentoLayoutRowColumnLayoutOptions)[number];\n\nexport interface BentoLayoutProps {\n /** Defines if the layout is used in a page or only a section */\n variant?: BentoLayoutVariant;\n /** Defines the size of the page */\n size?: BentoLayoutSize;\n}\n\nexport interface BentoLayoutRowProps {\n /** Sets the layout of the columns when multiple columns are used */\n columnsLayout?: BentoLayoutRowColumnLayout;\n}\n","<template>\n <bento-typography el=\"div\" rich-text class=\"b-layout-row\" :class=\"conditionalRowClass\">\n <div v-if=\"hasSlot('default')\">\n <slot />\n </div>\n <div v-else-if=\"hasSlot('col-1') && hasSlot('col-2')\" ref=\"row\" :class=\"conditionalRowWithColumnsClass\">\n <div ref=\"col1\" :class=\"conditionalColumnClass.col1\">\n <slot name=\"col-1\"></slot>\n </div>\n <div ref=\"col2\" :class=\"conditionalColumnClass.col2\">\n <slot name=\"col-2\"></slot>\n </div>\n </div>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onMounted, ref, Ref, useSlots, watch } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import {\n BentoLayoutRowColumnLayoutOptions,\n type BentoLayoutRowProps,\n type BentoLayoutSize,\n } from '../../layout.types';\n import { useMediaQuery } from '@vueuse/core';\n\n import { LAYOUT_SIZE_INJECTION_KEY } from '@/components/layout/layout.keys';\n\n const props = defineProps({\n columnsLayout: { default: '6-6' }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const size = inject<Ref<BentoLayoutSize>>(LAYOUT_SIZE_INJECTION_KEY, ref('full-width'));\n\n const row = ref<HTMLElement>(null);\n const col1 = ref<HTMLElement>(null);\n const col2 = ref<HTMLElement>(null);\n\n const isFullWidth = computed(() => size.value === 'full-width');\n const isValidColumnLayout = computed(() => BentoLayoutRowColumnLayoutOptions.includes(props.columnsLayout));\n\n const conditionalRowClass = computed(() => `b-layout-row--${size.value}`);\n\n const conditionalRowWithColumnsClass = computed(() => ({\n 'b-layout-row__column-wrapper': isFullWidth.value,\n }));\n\n const conditionalColumnClass = computed(() => {\n const columns = isValidColumnLayout.value ? props.columnsLayout.split('-') : [6, 6];\n const getColumnModifier = index => (isFullWidth.value ? columns[index] : size.value);\n\n return {\n col1: `b-layout-row__column--${getColumnModifier(0)}`,\n col2: `b-layout-row__column--${getColumnModifier(1)}`,\n };\n });\n\n watch(\n useMediaQuery('(min-width: 768px)'),\n async isLargeScreen => {\n await nextTick();\n const areColumnsInTheRightOrder = row.value?.firstChild === col1.value;\n if (isLargeScreen && !areColumnsInTheRightOrder) {\n row.value?.prepend(col1.value);\n } else if (!isLargeScreen && (props.columnsLayout === '3-9' || props.columnsLayout === '4-8')) {\n row.value?.prepend(col2.value);\n }\n },\n { immediate: true }\n );\n\n onMounted(() => {\n if (!isFullWidth.value && (hasSlot('col-1') || hasSlot('col-2'))) {\n throw new Error(\n 'Column slots can only be used with the `full-width` size. Please check documentation for more info.'\n );\n }\n\n if (!isValidColumnLayout.value) {\n throw new Error(\n `${props.columnsLayout} is not a valid column layout. Please refer to the documentation for the list of available column layouts.`\n );\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Page row is subcomponent of Layout meant to be used to generate the row layout.\n *\n * @example\n * import { BentoLayout, BentoLayoutRow } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoLayout, BentoLayoutRow },\n * template: `\n * <bento-layout>\n * <bento-layout-row columns-layout=\"3-9\">\n * <template #col-1>Narrow 3-9</template>\n * <template #col-2>Wide 3-9</template>\n * </bento-layout-row>\n * <bento-layout-row>\n * <template #col-1>6-6</template>\n * <template #col-2>6-6</template>\n * </bento-layout-row>\n * </bento-layout>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./layout-row.scss\" />\n"],"names":["LAYOUT_SIZE_INJECTION_KEY","__default__$1","provide","toRef","props","conditionalClasses","computed","wrapperElement","BentoLayoutRowColumnLayoutOptions","__default__","slots","useSlots","hasSlot","useHasSlot","size","inject","ref","row","col1","col2","isFullWidth","isValidColumnLayout","conditionalRowClass","conditionalRowWithColumnsClass","conditionalColumnClass","columns","getColumnModifier","index","watch","useMediaQuery","isLargeScreen","nextTick","areColumnsInTheRightOrder","_a","_b","_c","onMounted"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