@adyen/bento-vue2 1.85.0 → 1.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +2 -0
- package/dist/@types/index.d.ts +358 -260
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-scroller.js +5 -0
- package/dist/anchor-scroller.js.map +1 -0
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/anchor-scroller.css +1 -0
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -0
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/fixed-scroller.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.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 +6 -6
- package/dist/chip.js +1 -1
- package/dist/chunks/{accordion-item.DeV8s0oW.js → accordion-item.Cv6kG2N3.js} +2 -2
- package/dist/chunks/{accordion-item.DeV8s0oW.js.map → accordion-item.Cv6kG2N3.js.map} +1 -1
- package/dist/chunks/{action-bar.rgLdy6Bu.js → action-bar.Dnkt4yn7.js} +9 -9
- package/dist/chunks/{action-bar.rgLdy6Bu.js.map → action-bar.Dnkt4yn7.js.map} +1 -1
- package/dist/chunks/{ai-button.ggEcDV08.js → ai-button.BTi18ipD.js} +3 -3
- package/dist/chunks/{ai-button.ggEcDV08.js.map → ai-button.BTi18ipD.js.map} +1 -1
- package/dist/chunks/{ai-tag.DKMGiQcJ.js → ai-tag.s8TECgn_.js} +27 -19
- package/dist/chunks/{ai-tag.DKMGiQcJ.js.map → ai-tag.s8TECgn_.js.map} +1 -1
- package/dist/chunks/{alert.B3Pdp02a.js → alert.BESCd8iS.js} +5 -5
- package/dist/chunks/{alert.B3Pdp02a.js.map → alert.BESCd8iS.js.map} +1 -1
- package/dist/chunks/anchor-scroller.3_idPubO.js +178 -0
- package/dist/chunks/anchor-scroller.3_idPubO.js.map +1 -0
- package/dist/chunks/{avatar.CUCH3CTc.js → avatar.rwWPYJnt.js} +2 -2
- package/dist/chunks/{avatar.CUCH3CTc.js.map → avatar.rwWPYJnt.js.map} +1 -1
- package/dist/chunks/{base-button.IN4bpcds.js → base-button.BPRPrO0p.js} +2 -2
- package/dist/chunks/{base-button.IN4bpcds.js.map → base-button.BPRPrO0p.js.map} +1 -1
- package/dist/chunks/{base-modal.QsjzGei_.js → base-modal.09nAcnF_.js} +41 -41
- package/dist/chunks/{base-modal.QsjzGei_.js.map → base-modal.09nAcnF_.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.PL45aAcI.js → button-actions-with-menu.C8tSTxrm.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.PL45aAcI.js.map → button-actions-with-menu.C8tSTxrm.js.map} +1 -1
- package/dist/chunks/{button-actions.JRDi9PFT.js → button-actions.VSc47LLH.js} +8 -8
- package/dist/chunks/{button-actions.JRDi9PFT.js.map → button-actions.VSc47LLH.js.map} +1 -1
- package/dist/chunks/{button.DIU6m9wD.js → button.Ctj3rkxw.js} +5 -5
- package/dist/chunks/{button.DIU6m9wD.js.map → button.Ctj3rkxw.js.map} +1 -1
- package/dist/chunks/{calendar.B0SmuooF.js → calendar.DiXkjQDP.js} +8 -8
- package/dist/chunks/{calendar.B0SmuooF.js.map → calendar.DiXkjQDP.js.map} +1 -1
- package/dist/chunks/{card.CVkEg8m1.js → card.BdjdBN36.js} +3 -3
- package/dist/chunks/{card.CVkEg8m1.js.map → card.BdjdBN36.js.map} +1 -1
- package/dist/chunks/{checkbox-group.DPZJjcdT.js → checkbox-group.d6VQvZL7.js} +5 -5
- package/dist/chunks/{checkbox-group.DPZJjcdT.js.map → checkbox-group.d6VQvZL7.js.map} +1 -1
- package/dist/chunks/{checkbox.D3D1I22O.js → checkbox.ClFNfhNh.js} +4 -4
- package/dist/chunks/{checkbox.D3D1I22O.js.map → checkbox.ClFNfhNh.js.map} +1 -1
- package/dist/chunks/{chip.C6DRfdJ8.js → chip.D_XQ8ReC.js} +3 -3
- package/dist/chunks/{chip.C6DRfdJ8.js.map → chip.D_XQ8ReC.js.map} +1 -1
- package/dist/chunks/{click-outside.C1Ud8AA2.js → click-outside.CDz_x8mN.js} +2 -2
- package/dist/chunks/{click-outside.C1Ud8AA2.js.map → click-outside.CDz_x8mN.js.map} +1 -1
- package/dist/chunks/{code-snippet.BN5P-KQo.js → code-snippet.DBNJgt1j.js} +11 -11
- package/dist/chunks/{code-snippet.BN5P-KQo.js.map → code-snippet.DBNJgt1j.js.map} +1 -1
- package/dist/chunks/{codemirror.Cy7iSLbd.js → codemirror.D2BAltnu.js} +3688 -3673
- package/dist/chunks/codemirror.D2BAltnu.js.map +1 -0
- package/dist/chunks/{controls-group.BwXz0UYr.js → controls-group.HUWlAOhG.js} +3 -3
- package/dist/chunks/{controls-group.BwXz0UYr.js.map → controls-group.HUWlAOhG.js.map} +1 -1
- package/dist/chunks/{copy.BIh04KTY.js → copy.BXykYfg0.js} +7 -7
- package/dist/chunks/{copy.BIh04KTY.js.map → copy.BXykYfg0.js.map} +1 -1
- package/dist/chunks/{country.DyrDj95W.js → country.BywHth0L.js} +3 -3
- package/dist/chunks/{country.DyrDj95W.js.map → country.BywHth0L.js.map} +1 -1
- package/dist/chunks/{country.types.DaVCMxk-.js → country.types.BBQbWkTY.js} +3 -3
- package/dist/chunks/{country.types.DaVCMxk-.js.map → country.types.BBQbWkTY.js.map} +1 -1
- package/dist/chunks/{currency.DYZr_RDk.js → currency.Ciyxfmg1.js} +2 -2
- package/dist/chunks/{currency.DYZr_RDk.js.map → currency.Ciyxfmg1.js.map} +1 -1
- package/dist/chunks/{dashboard-section.BvFMd9CQ.js → dashboard-section.Cw2Ima3U.js} +6 -6
- package/dist/chunks/{dashboard-section.BvFMd9CQ.js.map → dashboard-section.Cw2Ima3U.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CXyMT-cF.js → dashed-underline.Dfw7cJ-9.js} +9 -9
- package/dist/chunks/{dashed-underline.CXyMT-cF.js.map → dashed-underline.Dfw7cJ-9.js.map} +1 -1
- package/dist/chunks/{data-grid-template.wWWI3FE3.js → data-grid-template.6LR2Jqka.js} +4 -4
- package/dist/chunks/{data-grid-template.wWWI3FE3.js.map → data-grid-template.6LR2Jqka.js.map} +1 -1
- package/dist/chunks/{data-grid.Dcj_tU8q.js → data-grid.B_uZEPDW.js} +177 -177
- package/dist/chunks/data-grid.B_uZEPDW.js.map +1 -0
- package/dist/chunks/date-input.etw_pFpA.js +20 -0
- package/dist/chunks/date-input.etw_pFpA.js.map +1 -0
- package/dist/chunks/{date-picker.Dh3-TgPT.js → date-picker.CITeN8WH.js} +56 -56
- package/dist/chunks/date-picker.CITeN8WH.js.map +1 -0
- package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/{date-range-picker.BOn_Xjkr.js → date-range-picker.DxVjXxap.js} +343 -343
- package/dist/chunks/{date-range-picker.BOn_Xjkr.js.map → date-range-picker.DxVjXxap.js.map} +1 -1
- package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/{date.DBWzp0So.js → date.B0m0sFP6.js} +2 -2
- package/dist/chunks/{date.DBWzp0So.js.map → date.B0m0sFP6.js.map} +1 -1
- package/dist/chunks/dialog-page.DA6E6qma.js +122 -0
- package/dist/chunks/dialog-page.DA6E6qma.js.map +1 -0
- package/dist/chunks/{directive.Cbdox5VL.js → directive.rXUeDb8p.js} +2 -2
- package/dist/chunks/{directive.Cbdox5VL.js.map → directive.rXUeDb8p.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.Cq68tN9F.js → dropdown-default-textbox.5WjhJWdh.js} +71 -80
- package/dist/chunks/dropdown-default-textbox.5WjhJWdh.js.map +1 -0
- package/dist/chunks/{dropdown-tag.C7Buz72U.js → dropdown-tag.BnMuMIDk.js} +8 -8
- package/dist/chunks/{dropdown-tag.C7Buz72U.js.map → dropdown-tag.BnMuMIDk.js.map} +1 -1
- package/dist/chunks/{dropdown.ByH2zHxF.js → dropdown.DDPfKc74.js} +227 -225
- package/dist/chunks/dropdown.DDPfKc74.js.map +1 -0
- package/dist/chunks/{empty-state.DpBnqAxu.js → empty-state.IiG1LXa2.js} +6 -6
- package/dist/chunks/{empty-state.DpBnqAxu.js.map → empty-state.IiG1LXa2.js.map} +1 -1
- package/dist/chunks/{field-label.BKxm8ehO.js → error-message.VenUl2OK.js} +54 -54
- package/dist/chunks/error-message.VenUl2OK.js.map +1 -0
- package/dist/chunks/{file-uploader.U7YUrGoM.js → file-uploader.BU1V40qK.js} +9 -9
- package/dist/chunks/{file-uploader.U7YUrGoM.js.map → file-uploader.BU1V40qK.js.map} +1 -1
- package/dist/chunks/{filter-bar.BRE0djRy.js → filter-bar.UdXQf_RN.js} +104 -96
- package/dist/chunks/{filter-bar.BRE0djRy.js.map → filter-bar.UdXQf_RN.js.map} +1 -1
- package/dist/chunks/fixed-scroller.BueAsyGk.js +120 -0
- package/dist/chunks/{fixed-scroller.Bp4-iO80.js.map → fixed-scroller.BueAsyGk.js.map} +1 -1
- package/dist/chunks/{focus-trap.Ed8RY9cJ.js → focus-trap.DMc1wL3A.js} +312 -295
- package/dist/chunks/focus-trap.DMc1wL3A.js.map +1 -0
- package/dist/chunks/{footer-actions.mS3IiJg7.js → footer-actions.z-api8J_.js} +4 -4
- package/dist/chunks/{footer-actions.mS3IiJg7.js.map → footer-actions.z-api8J_.js.map} +1 -1
- package/dist/chunks/{form-layout-title.C3uKS3GA.js → form-layout-title.Bbq05nMT.js} +5 -5
- package/dist/chunks/{form-layout-title.C3uKS3GA.js.map → form-layout-title.Bbq05nMT.js.map} +1 -1
- package/dist/chunks/{header-meta.CQTfyEJR.js → header-meta.CuMQSsOm.js} +9 -9
- package/dist/chunks/{header-meta.CQTfyEJR.js.map → header-meta.CuMQSsOm.js.map} +1 -1
- package/dist/chunks/{header-with-views.-PRI2W3p.js → header-with-views.DX8EXLMJ.js} +13 -13
- package/dist/chunks/{header-with-views.-PRI2W3p.js.map → header-with-views.DX8EXLMJ.js.map} +1 -1
- package/dist/chunks/{header.DDwoZ8fF.js → header.YECm2GAh.js} +4 -4
- package/dist/chunks/{header.DDwoZ8fF.js.map → header.YECm2GAh.js.map} +1 -1
- package/dist/chunks/index.BkJqgYF1.js +692 -0
- package/dist/chunks/{index.Zfd79j1_.js.map → index.BkJqgYF1.js.map} +1 -1
- package/dist/chunks/{info-icon.gUcRjEyG.js → info-icon.DS9ax8ZD.js} +3 -3
- package/dist/chunks/{info-icon.gUcRjEyG.js.map → info-icon.DS9ax8ZD.js.map} +1 -1
- package/dist/chunks/{input-field-password.BO3EMjVD.js → input-field-password.DrI6eF5u.js} +11 -11
- package/dist/chunks/{input-field-password.BO3EMjVD.js.map → input-field-password.DrI6eF5u.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.DDQIkRdm.js → input-field-phone-number.Buh4x3pJ.js} +4 -4
- package/dist/chunks/{input-field-phone-number.DDQIkRdm.js.map → input-field-phone-number.Buh4x3pJ.js.map} +1 -1
- package/dist/chunks/{input-field.BRIDLPBn.js → input-field.NEKXqT4R.js} +7 -7
- package/dist/chunks/{input-field.BRIDLPBn.js.map → input-field.NEKXqT4R.js.map} +1 -1
- package/dist/chunks/{inspector.DCda4tku.js → inspector.BomNgVb-.js} +5 -5
- package/dist/chunks/{inspector.DCda4tku.js.map → inspector.BomNgVb-.js.map} +1 -1
- package/dist/chunks/{isSameWeek.5sjhTHiU.js → isSameWeek.DjeUtLwI.js} +2 -2
- package/dist/chunks/{isSameWeek.5sjhTHiU.js.map → isSameWeek.DjeUtLwI.js.map} +1 -1
- package/dist/chunks/{it.DEniTaO2.js → it.DIafuXtH.js} +2 -2
- package/dist/chunks/{it.DEniTaO2.js.map → it.DIafuXtH.js.map} +1 -1
- package/dist/chunks/{layout-row.BtCzzLTz.js → layout-row.BxuMJU4E.js} +3 -3
- package/dist/chunks/{layout-row.BtCzzLTz.js.map → layout-row.BxuMJU4E.js.map} +1 -1
- package/dist/chunks/{link.PsTSQjK3.js → link.DKimL08z.js} +2 -2
- package/dist/chunks/{link.PsTSQjK3.js.map → link.DKimL08z.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.B63aT5Sq.js → listbox-option-tag.Cv3y0TvQ.js} +3 -3
- package/dist/chunks/{listbox-option-tag.B63aT5Sq.js.map → listbox-option-tag.Cv3y0TvQ.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.CRLZX72M.js → modal-fullscreen.6bAjPENL.js} +73 -69
- package/dist/chunks/modal-fullscreen.6bAjPENL.js.map +1 -0
- package/dist/chunks/{modal.BnAZ8Nj1.js → modal.DOR8c0gy.js} +6 -6
- package/dist/chunks/{modal.BnAZ8Nj1.js.map → modal.DOR8c0gy.js.map} +1 -1
- package/dist/chunks/on-click-outside.BW4rkhzG.js +91 -0
- package/dist/chunks/on-click-outside.BW4rkhzG.js.map +1 -0
- package/dist/chunks/{pagination.spAA5CX0.js → pagination.wuEIlDcq.js} +4 -4
- package/dist/chunks/{pagination.spAA5CX0.js.map → pagination.wuEIlDcq.js.map} +1 -1
- package/dist/chunks/{payment-method.BKXLPDC9.js → payment-method.B3CkgsAY.js} +2 -2
- package/dist/chunks/{payment-method.BKXLPDC9.js.map → payment-method.B3CkgsAY.js.map} +1 -1
- package/dist/chunks/popover.types.DkiRUQ4Z.js +6 -0
- package/dist/chunks/{popover.types.Zm8nugBw.js.map → popover.types.DkiRUQ4Z.js.map} +1 -1
- package/dist/chunks/popper-container.D4dworD4.js +1423 -0
- package/dist/chunks/popper-container.D4dworD4.js.map +1 -0
- package/dist/chunks/{promo-banner.BkLMZH66.js → promo-banner.bjMDm76T.js} +4 -4
- package/dist/chunks/{promo-banner.BkLMZH66.js.map → promo-banner.bjMDm76T.js.map} +1 -1
- package/dist/chunks/{radio-group.B6-Fd_kH.js → radio-group.DKRxfGtE.js} +8 -8
- package/dist/chunks/{radio-group.B6-Fd_kH.js.map → radio-group.DKRxfGtE.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.DeywBxSb.js → rich-text-editor.DiuS9alD.js} +9 -13
- package/dist/chunks/rich-text-editor.DiuS9alD.js.map +1 -0
- package/dist/chunks/{search-bar.BKRppqyI.js → search-bar.UVSaoX0h.js} +5 -5
- package/dist/chunks/{search-bar.BKRppqyI.js.map → search-bar.UVSaoX0h.js.map} +1 -1
- package/dist/chunks/{secondary-nav.RQ5eRpPH.js → secondary-nav.C6ldQMZ2.js} +18 -18
- package/dist/chunks/secondary-nav.C6ldQMZ2.js.map +1 -0
- package/dist/chunks/{segmented-control.BomURsCq.js → segmented-control.BLnuxgnJ.js} +3 -3
- package/dist/chunks/{segmented-control.BomURsCq.js.map → segmented-control.BLnuxgnJ.js.map} +1 -1
- package/dist/chunks/{selection-card-group.gh-fMA9T.js → selection-card-group.CqGYskmS.js} +5 -5
- package/dist/chunks/{selection-card-group.gh-fMA9T.js.map → selection-card-group.CqGYskmS.js.map} +1 -1
- package/dist/chunks/{sidepanel.B80Mujpk.js → sidepanel.BKE87Uef.js} +71 -67
- package/dist/chunks/sidepanel.BKE87Uef.js.map +1 -0
- package/dist/chunks/{startOfWeek.CM1KIrNi.js → startOfWeek.D8Yh4c0G.js} +3 -3
- package/dist/chunks/{startOfWeek.CM1KIrNi.js.map → startOfWeek.D8Yh4c0G.js.map} +1 -1
- package/dist/chunks/{status.types.Cv5XN4zL.js → status.types.BTsaLHQ6.js} +2 -2
- package/dist/chunks/{status.types.Cv5XN4zL.js.map → status.types.BTsaLHQ6.js.map} +1 -1
- package/dist/chunks/{step.BLFXvHL6.js → step.BEbWkprZ.js} +5 -5
- package/dist/chunks/{step.BLFXvHL6.js.map → step.BEbWkprZ.js.map} +1 -1
- package/dist/chunks/{structured-list-item.DCEKBtbT.js → structured-list-item.DRFRap_S.js} +6 -6
- package/dist/chunks/{structured-list-item.DCEKBtbT.js.map → structured-list-item.DRFRap_S.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.BV8FDXGv.js → summary-grid.types.OldkhD7S.js} +10 -10
- package/dist/chunks/{summary-grid.types.BV8FDXGv.js.map → summary-grid.types.OldkhD7S.js.map} +1 -1
- package/dist/chunks/{tab.FUMpPsBP.js → tab.BqSNoefU.js} +5 -5
- package/dist/chunks/{tab.FUMpPsBP.js.map → tab.BqSNoefU.js.map} +1 -1
- package/dist/chunks/{tag.CroNYKsL.js → tag.Cy3XkSDQ.js} +3 -3
- package/dist/chunks/{tag.CroNYKsL.js.map → tag.Cy3XkSDQ.js.map} +1 -1
- package/dist/chunks/{textarea.CtTdhV_G.js → textarea.Bm9MZb_W.js} +4 -4
- package/dist/chunks/{textarea.CtTdhV_G.js.map → textarea.Bm9MZb_W.js.map} +1 -1
- package/dist/chunks/{timeline-item.DCWllef8.js → timeline-item.Cpbm8IUw.js} +15 -15
- package/dist/chunks/{timeline-item.DCWllef8.js.map → timeline-item.Cpbm8IUw.js.map} +1 -1
- package/dist/chunks/{toast.Csv6tMyT.js → toast.Wuy6VuOT.js} +4 -4
- package/dist/chunks/{toast.Csv6tMyT.js.map → toast.Wuy6VuOT.js.map} +1 -1
- package/dist/chunks/{toggle.227XgEc7.js → toggle.B1z1YPe_.js} +4 -4
- package/dist/chunks/{toggle.227XgEc7.js.map → toggle.B1z1YPe_.js.map} +1 -1
- package/dist/chunks/{tooltip.DxJQHsuI.js → tooltip.DF11J3k3.js} +50 -50
- package/dist/chunks/{tooltip.DxJQHsuI.js.map → tooltip.DF11J3k3.js.map} +1 -1
- package/dist/chunks/{tutorial.O_vT6Q2b.js → tutorial.D5xtZ1Pt.js} +5 -5
- package/dist/chunks/{tutorial.O_vT6Q2b.js.map → tutorial.D5xtZ1Pt.js.map} +1 -1
- package/dist/chunks/{typography.Bq-EGj9y.js → typography.C8lPlsbD.js} +3 -3
- package/dist/chunks/{typography.Bq-EGj9y.js.map → typography.C8lPlsbD.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.MmyZXtME.js → use-bento-toast-controller.CB6Qbf3R.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.MmyZXtME.js.map → use-bento-toast-controller.CB6Qbf3R.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.3YqO69wz.js → use-cached-selected-values.wn2xnwYG.js} +12 -12
- package/dist/chunks/use-cached-selected-values.wn2xnwYG.js.map +1 -0
- package/dist/chunks/{use-country-items.ClS_So5N.js → use-country-items.CQnldpqM.js} +11 -11
- package/dist/chunks/{use-country-items.ClS_So5N.js.map → use-country-items.CQnldpqM.js.map} +1 -1
- package/dist/chunks/utils.BzUwtTXc.js +21 -0
- package/dist/chunks/utils.BzUwtTXc.js.map +1 -0
- package/dist/chunks/{zh-CN.CgIooHto.js → zh-CN.Bw_6j9Cd.js} +2 -2
- package/dist/chunks/{zh-CN.CgIooHto.js.map → zh-CN.Bw_6j9Cd.js.map} +1 -1
- package/dist/click-outside.js +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/draggable-handle.js +47 -31
- package/dist/draggable-handle.js.map +1 -1
- package/dist/dropdown.js +11 -11
- 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 +281 -279
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +42 -42
- 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 +2 -2
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/status.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/typography.js +1 -1
- package/dist/use-form-v4.js +756 -7787
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +128 -30
- package/package.json +6 -6
- package/dist/assets/field-label.css +0 -1
- package/dist/chunks/codemirror.Cy7iSLbd.js.map +0 -1
- package/dist/chunks/data-grid.Dcj_tU8q.js.map +0 -1
- package/dist/chunks/date-input.BbZqj10S.js +0 -15
- package/dist/chunks/date-input.BbZqj10S.js.map +0 -1
- package/dist/chunks/date-picker.Dh3-TgPT.js.map +0 -1
- package/dist/chunks/dialog-page.BegXhP0L.js +0 -118
- package/dist/chunks/dialog-page.BegXhP0L.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.Cq68tN9F.js.map +0 -1
- package/dist/chunks/dropdown.ByH2zHxF.js.map +0 -1
- package/dist/chunks/field-label.BKxm8ehO.js.map +0 -1
- package/dist/chunks/fixed-scroller.Bp4-iO80.js +0 -114
- package/dist/chunks/focus-trap.Ed8RY9cJ.js.map +0 -1
- package/dist/chunks/index.Zfd79j1_.js +0 -593
- package/dist/chunks/modal-fullscreen.CRLZX72M.js.map +0 -1
- package/dist/chunks/on-click-outside.D9aY9g8G.js +0 -101
- package/dist/chunks/on-click-outside.D9aY9g8G.js.map +0 -1
- package/dist/chunks/popover.types.Zm8nugBw.js +0 -6
- package/dist/chunks/popper-container.CXUG6v_U.js +0 -1404
- package/dist/chunks/popper-container.CXUG6v_U.js.map +0 -1
- package/dist/chunks/rich-text-editor.DeywBxSb.js.map +0 -1
- package/dist/chunks/secondary-nav.RQ5eRpPH.js.map +0 -1
- package/dist/chunks/sidepanel.B80Mujpk.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.3YqO69wz.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-range-picker.types.Ckt7zxGy.js","sources":["../../src/components/date-range-picker/date-range-picker.types.ts"],"sourcesContent":["import type { FormField, FormFieldEmits } from '../../types/form-field';\n\nimport {\n CalendarFirstDayOfWeek as BentoDateRangePickerFirstDayOfWeek,\n type CalendarGranularityConfig as BentoDateRangePickerGranularityConfig,\n type CalendarIsDateDisabled as BentoDateRangePickerIsDateDisabled,\n type CalendarRangeDateValue as BentoDateRangePickerValue,\n CalendarVariant as BentoDateRangePickerVariant,\n} from '@/internal/calendar/calendar.types';\nimport type { DateRangePickerCalendarRangeSelectorItems as BentoDateRangePickerQuickSelectRanges } from './components/date-range-picker-calendar/date-range-picker-calendar.types';\n\nexport {\n BentoDateRangePickerFirstDayOfWeek,\n type BentoDateRangePickerIsDateDisabled,\n type BentoDateRangePickerValue,\n type BentoDateRangePickerGranularityConfig,\n type BentoDateRangePickerQuickSelectRanges,\n BentoDateRangePickerVariant,\n};\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoDateRangePickerEvent {\n INPUT = 'input',\n}\n\nexport type BentoDateRangePickerEmits = FormFieldEmits<any>;\n\nexport interface BentoDateRangePickerProps extends FormField {\n /**\n * Allows user to enter time values in the form\n * @default false\n */\n allowTimeInput?: boolean;\n\n /**\n * Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n * @default
|
|
1
|
+
{"version":3,"file":"date-range-picker.types.Ckt7zxGy.js","sources":["../../src/components/date-range-picker/date-range-picker.types.ts"],"sourcesContent":["import type { FormField, FormFieldEmits } from '../../types/form-field';\n\nimport {\n CalendarFirstDayOfWeek as BentoDateRangePickerFirstDayOfWeek,\n type CalendarGranularityConfig as BentoDateRangePickerGranularityConfig,\n type CalendarIsDateDisabled as BentoDateRangePickerIsDateDisabled,\n type CalendarRangeDateValue as BentoDateRangePickerValue,\n CalendarVariant as BentoDateRangePickerVariant,\n} from '@/internal/calendar/calendar.types';\nimport type { DateRangePickerCalendarRangeSelectorItems as BentoDateRangePickerQuickSelectRanges } from './components/date-range-picker-calendar/date-range-picker-calendar.types';\n\nexport {\n BentoDateRangePickerFirstDayOfWeek,\n type BentoDateRangePickerIsDateDisabled,\n type BentoDateRangePickerValue,\n type BentoDateRangePickerGranularityConfig,\n type BentoDateRangePickerQuickSelectRanges,\n BentoDateRangePickerVariant,\n};\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoDateRangePickerEvent {\n INPUT = 'input',\n}\n\nexport type BentoDateRangePickerEmits = FormFieldEmits<any>;\n\nexport interface BentoDateRangePickerProps extends FormField {\n /**\n * Allows user to enter time values in the form\n * @default false\n */\n allowTimeInput?: boolean;\n\n /**\n * Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n * @default undefined\n */\n firstDayOfWeek?: BentoDateRangePickerFirstDayOfWeek | number;\n\n /**\n * A list of available granularities.\n * If present, the date picker will display a segmented control to change granularity.\n */\n granularities?: Array<BentoDateRangePickerGranularityConfig>;\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled?: BentoDateRangePickerIsDateDisabled;\n\n /**\n * Upon opening date range picker, end date's month will be pre-selected.\n * @default false\n */\n showEndDateOnOpen?: boolean;\n\n /**\n * Enables the range selector.\n * If provided, must be an array that sets the custom range dropdown items.\n */\n quickSelectRanges?: BentoDateRangePickerQuickSelectRanges;\n\n /**\n * Set a maximum number of dates to be selectable by the range.\n */\n maxRange?: number;\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min?: Date;\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max?: Date;\n\n /**\n * Number of months rendered on pane\n */\n numberOfMonths?: number;\n\n /**\n * Selected date\n */\n modelValue?: BentoDateRangePickerValue | null;\n\n /**\n * Selected date\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n */\n value?: BentoDateRangePickerValue | null;\n\n /**\n * The type of calendar to display. Defaults to showing days.\n */\n variant?: `${BentoDateRangePickerVariant}`;\n\n /**\n * Enables the date picker selection to persist until it is explicitly applied.\n * Displays a set of buttons: Apply and Cancel.\n * @deprecated This will be the default behavior in v2.0.0.\n * @default false\n */\n hasActions?: boolean;\n}\n"],"names":["BentoDateRangePickerEvent"],"mappings":"AAuBO,IAAKA,sBAAAA,OACRA,EAAA,QAAQ,SADAA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as o, computed as s } from "vue";
|
|
2
2
|
import { u as t } from "./index.B6WW_F-J.js";
|
|
3
|
-
import { B as c } from "./typography.
|
|
3
|
+
import { B as c } from "./typography.C8lPlsbD.js";
|
|
4
4
|
import { n as y } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
5
5
|
import "../assets/date.css";
|
|
6
6
|
var i = /* @__PURE__ */ ((_) => (_.SHORT_MONTH = "LLL", _.DAY_OF_MONTH = "d", _.LONG_WEEKDAY = "EEEE", _.SHORT_TIME_WITH_PERIOD = "h:mm aa", _.SHORT_TIME_WITHOUT_PERIOD = "H:mm", _.EXACT_TIME_WITH_PERIOD = "h:mm:ss aa", _.EXACT_TIME_WITHOUT_PERIOD = "H:mm:ss", _.LONG_DATE = "LLLL dd, yyyy", _.SHORT_DATE = "LLL dd, yyyy", _.FULL_DATE_EXACT_TIME_WITH_PERIOD = "LLL dd, yyyy, h:mm:ss aa", _.FULL_DATE_EXACT_TIME_WITHOUT_PERIOD = "LLL dd, yyyy, H:mm:ss", _.FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_PERIOD = "LLL dd, yyyy, h:mm:ss aa O", _.FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = "LLL dd, yyyy, H:mm:ss O", _.FULL_DATE_TIME_WITH_PERIOD = "LLL dd, yyyy, h:mm aa", _.FULL_DATE_TIME_WITH_TIMEZONE_AND_PERIOD = "LLL dd, yyyy, h:mm aa O", _.FULL_DATE_TIME_WITHOUT_PERIOD = "LLL dd, yyyy, H:mm", _.FULL_DATE_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = "LLL dd, yyyy, H:mm O", _))(i || {});
|
|
@@ -157,4 +157,4 @@ export {
|
|
|
157
157
|
f as B,
|
|
158
158
|
i as a
|
|
159
159
|
};
|
|
160
|
-
//# sourceMappingURL=date.
|
|
160
|
+
//# sourceMappingURL=date.B0m0sFP6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.DBWzp0So.js","sources":["../../src/components/date/date.types.ts","../../src/components/date/date.vue"],"sourcesContent":["export enum BentoDateFormat {\n // MONTH\n SHORT_MONTH = 'LLL', // Jun\n\n // DAY\n DAY_OF_MONTH = 'd', // 1, 2, ..., 31,\n LONG_WEEKDAY = 'EEEE', // Friday\n\n // TIME\n SHORT_TIME_WITH_PERIOD = `h:mm aa`, // 2:44 PM\n SHORT_TIME_WITHOUT_PERIOD = 'H:mm', // 14:45\n EXACT_TIME_WITH_PERIOD = 'h:mm:ss aa', // 2:05:11 PM\n EXACT_TIME_WITHOUT_PERIOD = 'H:mm:ss', // 14:05:11\n\n // DATE\n LONG_DATE = 'LLLL dd, yyyy', // June 30, 2023\n SHORT_DATE = 'LLL dd, yyyy', // Jun 30, 2023\n FULL_DATE_EXACT_TIME_WITH_PERIOD = `${SHORT_DATE}, h:mm:ss aa`, // June 30, 2023, 2:54:10 PM\n FULL_DATE_EXACT_TIME_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm:ss`, // June 30, 2023, 14:54:42\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_PERIOD = `${SHORT_DATE}, h:mm:ss aa O`, // June 30, 2023, 2:56:07 PM GMT+2\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm:ss O`, // June 30, 2023, 14:56:28 GMT+2\n FULL_DATE_TIME_WITH_PERIOD = `${SHORT_DATE}, h:mm aa`, // Jun 30, 2023, 2:48 PM\n FULL_DATE_TIME_WITH_TIMEZONE_AND_PERIOD = `${SHORT_DATE}, h:mm aa O`, // Jun 30, 2023, 2:44 PM GMT+2\n FULL_DATE_TIME_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm`, // Jun 30, 2023, 14:48\n FULL_DATE_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm O`, // Jun 30, 2023, 14:43 GMT+2\n}\n\nexport interface BentoDateProps {\n /**\n * The date to format. The data can be supplied as:\n * - a Date object.\n * - a number of milliseconds elapsed since the epoch.\n * - a date string e.g. '2023-07-31T10:55:22+02:00'.\n */\n date?: Date | number | string | null;\n /**\n * The string format of the date to be displayed\n */\n format?: BentoDateFormat | `${BentoDateFormat}`;\n /**\n * Disable the default typography for the component. Only use this when the component is inside another typography\n */\n disableTypography?: boolean;\n}\n","<template>\n <div class=\"b-date\">\n <bento-typography v-if=\"!disableTypography\" class=\"b-date__label\" el=\"span\" variant=\"body\" strong>\n {{ formattedDate }}\n </bento-typography>\n <template v-else>{{ formattedDate }}</template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoDateFormat, type BentoDateProps } from './date.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoTypography } from '@/components/typography';\n\n const props = defineProps({\n date: { default: null },\n format: { default: BentoDateFormat.FULL_DATE_EXACT_TIME_WITHOUT_PERIOD },\n disableTypography: { type: Boolean, default: false }\n});\n\n const { locale } = useI18n(undefined, true);\n\n /**\n * This is a reverse mapping of the BentoDateFormat enum.\n * It allows us to get the key of the enum by its value, which is then used to look up the\n * corresponding formatting options in `BentoDateFormatPresets`.\n */\n const bentoDateFormatKeyValuePairs = Object.entries(BentoDateFormat).reduce<\n Record<BentoDateFormat, keyof typeof BentoDateFormat>\n >(\n (acc, [key, value]) => {\n acc[value.toString()] = key;\n return acc;\n },\n {} as Record<BentoDateFormat, keyof typeof BentoDateFormat>\n );\n\n const formattedDate = computed(() => {\n // If null, return empty string\n if (!props.date) {\n return '';\n }\n const datePropAsDateObject = typeof props.date === 'string' ? new Date(props.date) : props.date;\n\n const formatKeyEntry = bentoDateFormatKeyValuePairs?.[props.format];\n\n let dateFormat: Intl.DateTimeFormatOptions | undefined = undefined;\n // Translate the key of the enum to the Intl.DateTimeFormatOptions configuration object\n if (formatKeyEntry && BentoDateFormatPresets?.[formatKeyEntry]) {\n dateFormat = BentoDateFormatPresets?.[formatKeyEntry];\n }\n return new Intl.DateTimeFormat(locale.value, dateFormat).format(datePropAsDateObject);\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * The format presets to use when being supplied with a key name in BentoDateFormat.\n * They translate to configuration options that are used in the Intl.DateTimeFormat function\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n const BentoDateFormatPresets: { [key in keyof typeof BentoDateFormat]: Intl.DateTimeFormatOptions } = {\n SHORT_MONTH: {\n month: 'short',\n },\n DAY_OF_MONTH: {\n day: 'numeric',\n },\n LONG_WEEKDAY: {\n weekday: 'long',\n },\n SHORT_TIME_WITH_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n },\n SHORT_TIME_WITHOUT_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n },\n EXACT_TIME_WITH_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n },\n EXACT_TIME_WITHOUT_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: false,\n },\n LONG_DATE: {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n SHORT_DATE: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n },\n FULL_DATE_TIME_WITH_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n },\n FULL_DATE_TIME_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n },\n FULL_DATE_EXACT_TIME_WITH_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n },\n FULL_DATE_EXACT_TIME_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false,\n },\n FULL_DATE_TIME_WITH_TIMEZONE_AND_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n timeZoneName: 'short',\n },\n FULL_DATE_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n timeZoneName: 'short',\n },\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n timeZoneName: 'short',\n },\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: false,\n timeZoneName: 'short',\n },\n };\n\n /**\n * A Date component is used to display a formatted date value.\n *\n * @example\n * import { BentoDate } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDate },\n * template: `\n * <bento-date :date=\"dateObject\" :format=\"BentoDateFormat.LONG_DATE\"/>\n * `\n * }\n */\n export default {\n name: 'bento-date',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./date.scss\" />\n"],"names":["BentoDateFormat","BentoDateFormat2","BentoDateFormatPresets","__default__","locale","useI18n","bentoDateFormatKeyValuePairs","acc","key","value","formattedDate","computed","props","datePropAsDateObject","formatKeyEntry","dateFormat"],"mappings":";;;;;AAAO,IAAAA,IAAA,kBAAAC,OAEHA,EAAA,cAAA,OAGAA,EAAA,eAAA,KACAA,EAAA,eAAA,QAGAA,EAAA,yBAAA,WACAA,EAAA,4BAAA,QACAA,EAAA,yBAAA,cACAA,EAAA,4BAAA,WAGAA,EAAA,YAAA,iBACAA,EAAA,aAAA,gBACAA,EAAA,mCAAA,4BACAA,EAAA,sCAAA,yBACAA,EAAA,gDAAA,8BACAA,EAAA,wDAAA,2BACAA,EAAA,6BAAA,yBACAA,EAAA,0CAAA,2BACAA,EAAA,gCAAA,sBACAA,EAAA,kDAAA,wBAxBQA,IAAAD,KAAA,CAAA,CAAA;AC+DR,MAAAE,IAAA;AAAA,EAAsG,aA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AAAA,IAAoF,CAAA;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"date.B0m0sFP6.js","sources":["../../src/components/date/date.types.ts","../../src/components/date/date.vue"],"sourcesContent":["export enum BentoDateFormat {\n // MONTH\n SHORT_MONTH = 'LLL', // Jun\n\n // DAY\n DAY_OF_MONTH = 'd', // 1, 2, ..., 31,\n LONG_WEEKDAY = 'EEEE', // Friday\n\n // TIME\n SHORT_TIME_WITH_PERIOD = `h:mm aa`, // 2:44 PM\n SHORT_TIME_WITHOUT_PERIOD = 'H:mm', // 14:45\n EXACT_TIME_WITH_PERIOD = 'h:mm:ss aa', // 2:05:11 PM\n EXACT_TIME_WITHOUT_PERIOD = 'H:mm:ss', // 14:05:11\n\n // DATE\n LONG_DATE = 'LLLL dd, yyyy', // June 30, 2023\n SHORT_DATE = 'LLL dd, yyyy', // Jun 30, 2023\n FULL_DATE_EXACT_TIME_WITH_PERIOD = `${SHORT_DATE}, h:mm:ss aa`, // June 30, 2023, 2:54:10 PM\n FULL_DATE_EXACT_TIME_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm:ss`, // June 30, 2023, 14:54:42\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_PERIOD = `${SHORT_DATE}, h:mm:ss aa O`, // June 30, 2023, 2:56:07 PM GMT+2\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm:ss O`, // June 30, 2023, 14:56:28 GMT+2\n FULL_DATE_TIME_WITH_PERIOD = `${SHORT_DATE}, h:mm aa`, // Jun 30, 2023, 2:48 PM\n FULL_DATE_TIME_WITH_TIMEZONE_AND_PERIOD = `${SHORT_DATE}, h:mm aa O`, // Jun 30, 2023, 2:44 PM GMT+2\n FULL_DATE_TIME_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm`, // Jun 30, 2023, 14:48\n FULL_DATE_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm O`, // Jun 30, 2023, 14:43 GMT+2\n}\n\nexport interface BentoDateProps {\n /**\n * The date to format. The data can be supplied as:\n * - a Date object.\n * - a number of milliseconds elapsed since the epoch.\n * - a date string e.g. '2023-07-31T10:55:22+02:00'.\n */\n date?: Date | number | string | null;\n /**\n * The string format of the date to be displayed\n */\n format?: BentoDateFormat | `${BentoDateFormat}`;\n /**\n * Disable the default typography for the component. Only use this when the component is inside another typography\n */\n disableTypography?: boolean;\n}\n","<template>\n <div class=\"b-date\">\n <bento-typography v-if=\"!disableTypography\" class=\"b-date__label\" el=\"span\" variant=\"body\" strong>\n {{ formattedDate }}\n </bento-typography>\n <template v-else>{{ formattedDate }}</template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoDateFormat, type BentoDateProps } from './date.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoTypography } from '@/components/typography';\n\n const props = defineProps({\n date: { default: null },\n format: { default: BentoDateFormat.FULL_DATE_EXACT_TIME_WITHOUT_PERIOD },\n disableTypography: { type: Boolean, default: false }\n});\n\n const { locale } = useI18n(undefined, true);\n\n /**\n * This is a reverse mapping of the BentoDateFormat enum.\n * It allows us to get the key of the enum by its value, which is then used to look up the\n * corresponding formatting options in `BentoDateFormatPresets`.\n */\n const bentoDateFormatKeyValuePairs = Object.entries(BentoDateFormat).reduce<\n Record<BentoDateFormat, keyof typeof BentoDateFormat>\n >(\n (acc, [key, value]) => {\n acc[value.toString()] = key;\n return acc;\n },\n {} as Record<BentoDateFormat, keyof typeof BentoDateFormat>\n );\n\n const formattedDate = computed(() => {\n // If null, return empty string\n if (!props.date) {\n return '';\n }\n const datePropAsDateObject = typeof props.date === 'string' ? new Date(props.date) : props.date;\n\n const formatKeyEntry = bentoDateFormatKeyValuePairs?.[props.format];\n\n let dateFormat: Intl.DateTimeFormatOptions | undefined = undefined;\n // Translate the key of the enum to the Intl.DateTimeFormatOptions configuration object\n if (formatKeyEntry && BentoDateFormatPresets?.[formatKeyEntry]) {\n dateFormat = BentoDateFormatPresets?.[formatKeyEntry];\n }\n return new Intl.DateTimeFormat(locale.value, dateFormat).format(datePropAsDateObject);\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * The format presets to use when being supplied with a key name in BentoDateFormat.\n * They translate to configuration options that are used in the Intl.DateTimeFormat function\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n const BentoDateFormatPresets: { [key in keyof typeof BentoDateFormat]: Intl.DateTimeFormatOptions } = {\n SHORT_MONTH: {\n month: 'short',\n },\n DAY_OF_MONTH: {\n day: 'numeric',\n },\n LONG_WEEKDAY: {\n weekday: 'long',\n },\n SHORT_TIME_WITH_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n },\n SHORT_TIME_WITHOUT_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n },\n EXACT_TIME_WITH_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n },\n EXACT_TIME_WITHOUT_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: false,\n },\n LONG_DATE: {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n SHORT_DATE: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n },\n FULL_DATE_TIME_WITH_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n },\n FULL_DATE_TIME_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n },\n FULL_DATE_EXACT_TIME_WITH_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n },\n FULL_DATE_EXACT_TIME_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false,\n },\n FULL_DATE_TIME_WITH_TIMEZONE_AND_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n timeZoneName: 'short',\n },\n FULL_DATE_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n timeZoneName: 'short',\n },\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n timeZoneName: 'short',\n },\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: false,\n timeZoneName: 'short',\n },\n };\n\n /**\n * A Date component is used to display a formatted date value.\n *\n * @example\n * import { BentoDate } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDate },\n * template: `\n * <bento-date :date=\"dateObject\" :format=\"BentoDateFormat.LONG_DATE\"/>\n * `\n * }\n */\n export default {\n name: 'bento-date',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./date.scss\" />\n"],"names":["BentoDateFormat","BentoDateFormat2","BentoDateFormatPresets","__default__","locale","useI18n","bentoDateFormatKeyValuePairs","acc","key","value","formattedDate","computed","props","datePropAsDateObject","formatKeyEntry","dateFormat"],"mappings":";;;;;AAAO,IAAAA,IAAA,kBAAAC,OAEHA,EAAA,cAAA,OAGAA,EAAA,eAAA,KACAA,EAAA,eAAA,QAGAA,EAAA,yBAAA,WACAA,EAAA,4BAAA,QACAA,EAAA,yBAAA,cACAA,EAAA,4BAAA,WAGAA,EAAA,YAAA,iBACAA,EAAA,aAAA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IAAA,KAAAA,EAAA,IAAA,IAAAA,EAAA,MAEAE,IAAAR,KAAA,gBAAAA,EAAAM,EAAA;AAEA,UAAAG;AAEA,aAAAD,MAAAZ,KAAA,QAAAA,EAAAY,QACIC,IAAAb,KAAA,gBAAAA,EAAAY,KAEJ,IAAA,KAAA,eAAAV,EAAA,OAAAW,CAAA,EAAA,OAAAF,CAAA;AAAA,IAAoF,CAAA;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { defineComponent as U, useSlots as H, ref as P, computed as n, inject as N, watch as h, nextTick as S, onMounted as J, onUnmounted as F } from "vue";
|
|
2
|
+
import { B as K } from "./button.Ctj3rkxw.js";
|
|
3
|
+
import { A as M } from "./arrow-left.CRREfabP.js";
|
|
4
|
+
import { u as Y } from "./use-has-slot.C9lQZ6nz.js";
|
|
5
|
+
import { u as $ } from "./index.B6WW_F-J.js";
|
|
6
|
+
import { i as z } from "./typography.C8lPlsbD.js";
|
|
7
|
+
import { c as q } from "./index.BkJqgYF1.js";
|
|
8
|
+
import { n as Q } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
9
|
+
import "../assets/dialog-page.css";
|
|
10
|
+
var E = /* @__PURE__ */ ((l) => (l.TRANSITION_LEVEL_DEEPER = "b-dialog-page__animation--level-deeper", l.TRANSITION_LEVEL_UPPER = "b-dialog-page__animation--level-upper", l))(E || {});
|
|
11
|
+
const W = /* @__PURE__ */ Symbol("dialog registerPage injection key"), X = /* @__PURE__ */ Symbol("dialog page config data injection key"), Z = {
|
|
12
|
+
"en-US": {
|
|
13
|
+
goToPreviousPage: "Go to previous page"
|
|
14
|
+
},
|
|
15
|
+
"ja-JP": {
|
|
16
|
+
goToPreviousPage: "前のページに移動"
|
|
17
|
+
},
|
|
18
|
+
"pt-BR": {
|
|
19
|
+
goToPreviousPage: "Ir para a página anterior"
|
|
20
|
+
}
|
|
21
|
+
}, ee = {
|
|
22
|
+
i18n: { messages: Z }
|
|
23
|
+
}, ae = /* @__PURE__ */ U({
|
|
24
|
+
...ee,
|
|
25
|
+
__name: "dialog-page",
|
|
26
|
+
props: {
|
|
27
|
+
/**
|
|
28
|
+
* Identifier of the page, used with activePage prop to handle navigation
|
|
29
|
+
*/
|
|
30
|
+
pageId: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: void 0
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* Show header and actions border
|
|
36
|
+
*/
|
|
37
|
+
alwaysShowBorder: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !1
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* Pass custom styling to the back button to position it correctly with the header slot
|
|
43
|
+
*/
|
|
44
|
+
backButtonStyling: { type: Object, default: null },
|
|
45
|
+
/**
|
|
46
|
+
* ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior
|
|
47
|
+
* Used when the back button should not take the user to the natural previous page
|
|
48
|
+
* Set to `null` to hide back button in the page
|
|
49
|
+
*/
|
|
50
|
+
previousPage: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: void 0
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
emits: ["animationend"],
|
|
56
|
+
setup(l, { emit: t }) {
|
|
57
|
+
const a = l, e = H(), b = Y(e), { t: O } = $(), r = P(null), d = P(!1), u = P(!1), { arrivedState: c } = q(r), g = n(() => s.value ? s.value === a.pageId : !0), L = n(() => ({
|
|
58
|
+
"b-dialog-page__header--with-border": a.alwaysShowBorder || d.value && !c.top
|
|
59
|
+
})), R = n(() => ({
|
|
60
|
+
"b-dialog-page__footer--with-border": a.alwaysShowBorder || d.value && !c.bottom
|
|
61
|
+
})), k = n(() => !(c.bottom && c.top)), G = () => {
|
|
62
|
+
r.value;
|
|
63
|
+
}, _ = async (i) => {
|
|
64
|
+
i && (await S(), u.value && (d.value = r.value && r.value.scrollHeight > r.value.clientHeight));
|
|
65
|
+
}, { activePage: s, animation: p, isAnimationActive: v, isOpen: f, pages: I, previousPages: o, updatePage: y } = N(X);
|
|
66
|
+
h(() => f.value, _, { immediate: !0 }), h(() => g.value, _, { immediate: !0 });
|
|
67
|
+
const x = n(() => a.previousPage ? !0 : a.previousPage === null ? !1 : T.value && g.value), D = () => {
|
|
68
|
+
p.value = E.TRANSITION_LEVEL_DEEPER, v && (v.value = !1), t("animationend");
|
|
69
|
+
}, j = () => {
|
|
70
|
+
v && (v.value = !0);
|
|
71
|
+
}, T = n(() => o.value.length > 1), m = n(() => o.value[o.value.length - 1]), w = n(() => I.value.some((i) => i === s.value)), V = async (i) => {
|
|
72
|
+
if (i) {
|
|
73
|
+
const B = o.value.indexOf(i);
|
|
74
|
+
B !== -1 ? o.value = o.value.slice(0, B + 1) : o.value = [i];
|
|
75
|
+
} else
|
|
76
|
+
o.value.pop();
|
|
77
|
+
p.value = E.TRANSITION_LEVEL_UPPER, await S(), u.value && y(m.value);
|
|
78
|
+
};
|
|
79
|
+
h(
|
|
80
|
+
() => s.value,
|
|
81
|
+
async () => {
|
|
82
|
+
if (await S(), !(!u.value || !f.value)) {
|
|
83
|
+
if (s.value && !w.value && z) {
|
|
84
|
+
console.error(
|
|
85
|
+
`The activePage passed "${s.value}" does not match the id of any of the pages`
|
|
86
|
+
);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
s.value !== m.value && o.value.push(s.value);
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{ immediate: !0 }
|
|
93
|
+
);
|
|
94
|
+
const A = N(W), { unregisterPage: C } = A(a.pageId);
|
|
95
|
+
return J(() => {
|
|
96
|
+
u.value = !0;
|
|
97
|
+
}), F(() => {
|
|
98
|
+
u.value = !1, C();
|
|
99
|
+
}), { __sfc: !0, props: a, emit: t, slots: e, hasSlot: b, t: O, contentElement: r, hasScroll: d, isMounted: u, arrivedState: c, showPage: g, headerConditionalClasses: L, footerConditionalClasses: R, isScrollable: k, onScroll: G, calculateScroll: _, activePage: s, animation: p, isAnimationActive: v, isOpen: f, pages: I, previousPages: o, updatePage: y, showBackButton: x, updateAnimation: D, startAnimation: j, hasPreviousPages: T, lastPage: m, isActivePageValid: w, goToPreviousPage: V, registerPage: A, unregisterPage: C, BentoButton: K, ArrowLeftIcon: M };
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
var te = function() {
|
|
103
|
+
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
104
|
+
return a("Transition", { attrs: { name: e.animation, mode: "out-in" }, on: { "after-leave": e.updateAnimation, leave: e.startAnimation } }, [e.isOpen && e.showPage ? a("div", { staticClass: "b-dialog-page" }, [e.hasSlot("header") ? a("div", { staticClass: "b-dialog-page__header", class: e.headerConditionalClasses }, [e.showBackButton ? a("div", { staticClass: "b-dialog-page__back-button", style: t.backButtonStyling, attrs: { "data-testid": "back-button" } }, [a(e.BentoButton, { attrs: { variant: "tertiary" }, on: { click: function(b) {
|
|
105
|
+
return e.goToPreviousPage(t.previousPage);
|
|
106
|
+
} } }, [a(e.ArrowLeftIcon, { attrs: { "svg-title": e.t("goToPreviousPage") } })], 1)], 1) : t._e(), t._t("header")], 2) : t._e(), e.hasSlot("content") ? a("div", { ref: "contentElement", staticClass: "b-dialog-page__content", attrs: { tabindex: e.isScrollable ? 0 : null }, on: { scroll: e.onScroll } }, [t._t("content")], 2) : t._e(), e.hasSlot("footer") ? a("div", { staticClass: "b-dialog-page__footer", class: e.footerConditionalClasses }, [t._t("footer")], 2) : t._e()]) : t._e()]);
|
|
107
|
+
}, oe = [], se = /* @__PURE__ */ Q(
|
|
108
|
+
ae,
|
|
109
|
+
te,
|
|
110
|
+
oe,
|
|
111
|
+
!1,
|
|
112
|
+
null,
|
|
113
|
+
"5bc2711d"
|
|
114
|
+
);
|
|
115
|
+
const ge = se.exports;
|
|
116
|
+
export {
|
|
117
|
+
E as B,
|
|
118
|
+
X as D,
|
|
119
|
+
W as a,
|
|
120
|
+
ge as b
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=dialog-page.DA6E6qma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog-page.DA6E6qma.js","sources":["../../src/components/internal/dialog-page/dialog-page.types.ts","../../src/components/internal/dialog-page/dialog-page.keys.ts","../../src/components/internal/dialog-page/dialog-page.vue"],"sourcesContent":["import { type Ref } from 'vue';\n\nexport enum BentoDialogPageAnimation {\n TRANSITION_LEVEL_DEEPER = 'b-dialog-page__animation--level-deeper',\n TRANSITION_LEVEL_UPPER = 'b-dialog-page__animation--level-upper',\n}\n\nexport interface BentoDialogPageConfigData {\n activePage: Ref<string>;\n animation: Ref<string>;\n isAnimationActive?: Ref<boolean>;\n isOpen: Ref<boolean>;\n pages: Ref<Array<string>>;\n previousPages: Ref<Array<string>>;\n updatePage: (page: string) => void;\n}\n\nexport type BentoDialogPageRegisterPage = (pageId: string) => { unregisterPage: () => void };\n","export const DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY = Symbol('dialog registerPage injection key');\nexport const DIALOG_PAGE_CONFIG_INJECTION_KEY = Symbol('dialog page config data injection key');\n","<template>\n <Transition :name=\"animation\" mode=\"out-in\" @after-leave=\"updateAnimation\" @leave=\"startAnimation\">\n <div v-if=\"isOpen && showPage\" class=\"b-dialog-page\">\n <div v-if=\"hasSlot('header')\" class=\"b-dialog-page__header\" :class=\"headerConditionalClasses\">\n <div\n v-if=\"showBackButton\"\n class=\"b-dialog-page__back-button\"\n :style=\"backButtonStyling\"\n data-testid=\"back-button\"\n >\n <bento-button variant=\"tertiary\" @click=\"goToPreviousPage(previousPage)\">\n <arrow-left-icon :svg-title=\"t('goToPreviousPage')\" />\n </bento-button>\n </div>\n <slot name=\"header\"></slot>\n </div>\n <div\n v-if=\"hasSlot('content')\"\n ref=\"contentElement\"\n class=\"b-dialog-page__content\"\n :tabindex=\"isScrollable ? 0 : null\"\n @scroll=\"onScroll\"\n >\n <slot name=\"content\" />\n </div>\n <div v-if=\"hasSlot('footer')\" class=\"b-dialog-page__footer\" :class=\"footerConditionalClasses\">\n <slot name=\"footer\" />\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onMounted, onUnmounted, type PropType, ref, useSlots, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import ArrowLeftIcon from '@adyen/ui-assets-icons-16/vue/arrow-left';\n\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n import { useI18n } from '@/utils/ts/i18n';\n import { isDevelopmentEnviroment } from '@/utils/ts/dev-environment';\n\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n } from './dialog-page.types';\n import type { CSSProperties } from 'vue/types/jsx.d.ts';\n\n import { DIALOG_PAGE_CONFIG_INJECTION_KEY, DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY } from './dialog-page.keys';\n\n import messages from './messages.json';\n import { useScroll } from '@vueuse/core';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * Identifier of the page, used with activePage prop to handle navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Show header and actions border\n */\n alwaysShowBorder: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Pass custom styling to the back button to position it correctly with the header slot\n */\n backButtonStyling: { type: Object as PropType<CSSProperties>, default: null },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n });\n\n const emit = defineEmits([\"animationend\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // Refs\n const contentElement = ref<HTMLDivElement>(null);\n const hasScroll = ref(false);\n const isMounted = ref(false);\n\n const { arrivedState } = useScroll(contentElement);\n\n // Logic to choose which page is active/shown\n const showPage = computed(() => (activePage.value ? activePage.value === props.pageId : true));\n\n // Scrolling styling logic\n const headerConditionalClasses = computed(() => ({\n 'b-dialog-page__header--with-border': props.alwaysShowBorder || (hasScroll.value && !arrivedState.top),\n }));\n\n const footerConditionalClasses = computed(() => ({\n 'b-dialog-page__footer--with-border': props.alwaysShowBorder || (hasScroll.value && !arrivedState.bottom),\n }));\n\n const isScrollable = computed(() => !(arrivedState.bottom && arrivedState.top));\n\n const onScroll = () => {\n if (!contentElement.value) {\n return;\n }\n };\n\n const calculateScroll = async watchedValue => {\n if (!watchedValue) {\n return;\n }\n // Wait for content to be rendered to be able to calculate the height\n await nextTick();\n if (!isMounted.value) {\n return;\n }\n hasScroll.value = contentElement.value && contentElement.value.scrollHeight > contentElement.value.clientHeight;\n };\n\n const { activePage, animation, isAnimationActive, isOpen, pages, previousPages, updatePage } =\n inject<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY);\n\n watch(() => isOpen.value, calculateScroll, { immediate: true });\n watch(() => showPage.value, calculateScroll, { immediate: true });\n\n // Logic to determine whether the back button should be shown on the page\n const showBackButton = computed(() => {\n if (props.previousPage) {\n return true;\n }\n if (props.previousPage === null) {\n return false;\n }\n return hasPreviousPages.value && showPage.value;\n });\n\n // Animation\n const updateAnimation = () => {\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER;\n if (isAnimationActive) {\n isAnimationActive.value = false;\n }\n\n emit('animationend');\n };\n\n const startAnimation = () => {\n if (isAnimationActive) {\n isAnimationActive.value = true;\n }\n };\n\n // Previous page logic\n const hasPreviousPages = computed(() => previousPages.value.length > 1);\n const lastPage = computed(() => previousPages.value[previousPages.value.length - 1]);\n const isActivePageValid = computed(() => pages.value.some(page => page === activePage.value));\n\n const goToPreviousPage = async (page: string) => {\n if (page) {\n const index = previousPages.value.indexOf(page);\n if (index !== -1) {\n previousPages.value = previousPages.value.slice(0, index + 1);\n } else {\n previousPages.value = [page];\n }\n } else {\n previousPages.value.pop();\n }\n\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_UPPER;\n await nextTick();\n if (!isMounted.value) {\n return;\n }\n updatePage(lastPage.value);\n };\n\n // Add new page to the previousPage array to keep track of user navigation\n watch(\n () => activePage.value,\n async () => {\n await nextTick();\n if (!isMounted.value || !isOpen.value) {\n return;\n }\n\n if (!!activePage.value && !isActivePageValid.value) {\n if (isDevelopmentEnviroment) {\n // eslint-disable-next-line no-console\n console.error(\n `The activePage passed \"${activePage.value}\" does not match the id of any of the pages`\n );\n return;\n }\n }\n\n if (activePage.value !== lastPage.value) {\n previousPages.value.push(activePage.value);\n }\n },\n { immediate: true }\n );\n\n // Register page to parent component and inject data from parent component\n const registerPage = inject<BentoDialogPageRegisterPage>(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY);\n const { unregisterPage } = registerPage(props.pageId);\n\n onMounted(() => {\n isMounted.value = true;\n });\n\n // Unregister page on unmounting the page\n onUnmounted(() => {\n isMounted.value = false;\n unregisterPage();\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * DialogPage is an internal component used to render different pages of dialog components (Modal, ModalFullscreen and Sidepanel)\n *\n * @example\n * import { DialogPage } from '@/internal';\n *\n * export default {\n * components: { DialogPage },\n * template: `\n * <dialog-page pageId='step1' always-show-border>\n * <template #header>Header</template>\n * <template #content>Content</template>\n * <template #footer>Footer</template>\n * </dialog-page>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./dialog-page.scss\" />\n"],"names":["BentoDialogPageAnimation","BentoDialogPageAnimation2","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","DIALOG_PAGE_CONFIG_INJECTION_KEY","__default__","messages","slots","useSlots","hasSlot","useHasSlot","t","useI18n","contentElement","ref","hasScroll","isMounted","arrivedState","useScroll","showPage","computed","activePage","props","headerConditionalClasses","footerConditionalClasses","isScrollable","onScroll","calculateScroll","watchedValue","nextTick","animation","isAnimationActive","isOpen","pages","previousPages","updatePage","inject","watch","showBackButton","hasPreviousPages","updateAnimation","emit","startAnimation","lastPage","isActivePageValid","page","goToPrevi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IR,UAAAA,EAAA,UAAAsB,EAAA,SACIT,EAAA,MAAA,KAAAb,EAAA,KAAA;AAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAA4B,IAAAb,EAAAjC,CAAA,GACA,EAAA,gBAAA+C,EAAA,IAAAD,EAAA3B,EAAA,MAAA;AAEA,WAAA6B,EAAA,MAAA;AACI,MAAAnC,EAAA,QAAA;AAAA,IAAkB,CAAA,GAItBoC,EAAA,MAAA;AACI,MAAApC,EAAA,QAAA,IACAkC,EAAA;AAAA,IAAe,CAAA;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as s } from "./on-click-outside.
|
|
1
|
+
import { o as s } from "./on-click-outside.BW4rkhzG.js";
|
|
2
2
|
const t = (o, i) => {
|
|
3
3
|
const e = !i.modifiers.bubble;
|
|
4
4
|
if (typeof i.value == "function")
|
|
@@ -20,4 +20,4 @@ const t = (o, i) => {
|
|
|
20
20
|
export {
|
|
21
21
|
_ as B
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=directive.
|
|
23
|
+
//# sourceMappingURL=directive.rXUeDb8p.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directive.
|
|
1
|
+
{"version":3,"file":"directive.rXUeDb8p.js","sources":["../../src/directives/click-outside/directive.ts"],"sourcesContent":["import { onClickOutside } from './on-click-outside';\nimport type { DirectiveHook } from 'vue';\n\ntype Element = HTMLElement & { __onClickOutside_stop?: () => void };\n\n/**\n * Attaches the click outside listener to target element to register clicks outside the element.\n * @param targetElement Element to attach listener to.\n * @param binding\n */\nconst bindDirective: DirectiveHook<Element> = (targetElement, binding) => {\n const capture = !binding.modifiers.bubble;\n if (typeof binding.value === 'function') {\n // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n targetElement.__onClickOutside_stop = onClickOutside(targetElement, binding.value, { capture });\n } else {\n const [handler, options] = binding.value;\n // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n targetElement.__onClickOutside_stop = onClickOutside(targetElement, handler, { capture, ...options });\n }\n};\n\n/**\n * Removes click outside listener from the target element.\n * @param targetElement Element to detach listener from.\n */\nconst unbindDirective: DirectiveHook<Element> = targetElement => {\n // eslint-disable-next-line no-underscore-dangle\n targetElement.__onClickOutside_stop();\n};\n\nexport const BentoClickOutsideDirective = {\n // Vue 2 Directive hooks\n inserted: bindDirective,\n unbind: unbindDirective,\n\n // Vue 3 Directive hooks\n beforeMount: bindDirective,\n unmounted: unbindDirective,\n};\n"],"names":["bindDirective","targetElement","binding","capture","onClickOutside","handler","options","unbindDirective","BentoClickOutsideDirective"],"mappings":";AAUA,MAAMA,IAAwC,CAACC,GAAeC,MAAY;AACtE,QAAMC,IAAU,CAACD,EAAQ,UAAU;AACnC,MAAI,OAAOA,EAAQ,SAAU;AAEzB,IAAAD,EAAc,wBAAwBG,EAAeH,GAAeC,EAAQ,OAAO,EAAE,SAAAC,GAAS;AAAA,OAC3F;AACH,UAAM,CAACE,GAASC,CAAO,IAAIJ,EAAQ;AAEnC,IAAAD,EAAc,wBAAwBG,EAAeH,GAAeI,GAAS,EAAE,SAAAF,GAAS,GAAGG,GAAS;AAAA,EACxG;AACJ,GAMMC,IAA0C,CAAAN,MAAiB;AAE7D,EAAAA,EAAc,sBAAA;AAClB,GAEaO,IAA6B;AAAA;AAAA,EAEtC,UAAUR;AAAA,EACV,QAAQO;AAAA;AAAA,EAGR,aAAaP;AAAA,EACb,WAAWO;AACf;"}
|
package/dist/chunks/{dropdown-default-textbox.Cq68tN9F.js → dropdown-default-textbox.5WjhJWdh.js}
RENAMED
|
@@ -2,17 +2,16 @@ import { defineComponent as w, useAttrs as R, useSlots as E, ref as k, computed
|
|
|
2
2
|
import { g as T } from "./generate-uid.NJ8tVoha.js";
|
|
3
3
|
import { u as U } from "./index.B6WW_F-J.js";
|
|
4
4
|
import { u as q } from "./use-has-slot.C9lQZ6nz.js";
|
|
5
|
-
import { B as M } from "./typography.
|
|
6
|
-
import {
|
|
7
|
-
import { C as Y } from "./cross-circle-fill.
|
|
8
|
-
import { C as z } from "./cross-circle-fill-small.DfxDedRr.js";
|
|
5
|
+
import { B as M } from "./typography.C8lPlsbD.js";
|
|
6
|
+
import { C as $ } from "./cross-circle-fill.DTDtgLMf.js";
|
|
7
|
+
import { C as Y } from "./cross-circle-fill-small.DfxDedRr.js";
|
|
9
8
|
import { n as O } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
10
9
|
import { s as v } from "./events.BQOQSSb7.js";
|
|
11
|
-
import { C as
|
|
12
|
-
import { C as
|
|
10
|
+
import { C as z } from "./chevron-down.eYtgv5ly.js";
|
|
11
|
+
import { C as K } from "./chevron-up.d8cwIlA_.js";
|
|
13
12
|
import "../assets/dropdown-default-textbox.css";
|
|
14
13
|
var L = /* @__PURE__ */ ((l) => (l.DEFAULT = "DropdownInputDefault", l.SMALL = "DropdownInputSmall", l))(L || {}), p = /* @__PURE__ */ ((l) => (l.DISABLED = "disabled", l.READONLY = "readonly", l.HAS_ITEMS = "has-items", l.OPENED = "opened", l.ERROR = "error", l))(p || {}), s = /* @__PURE__ */ ((l) => (l.OPEN = "dropdown-base-open", l.KEYDOWN = "dropdown-base-keydown", l.CLOSE = "dropdown-base-close", l.INPUT = "dropdown-base-input", l.CLEAR = "dropdown-base-clear", l))(s || {});
|
|
15
|
-
const
|
|
14
|
+
const j = {
|
|
16
15
|
"en-US": {
|
|
17
16
|
clearSearch: "Clear search"
|
|
18
17
|
},
|
|
@@ -22,12 +21,12 @@ const H = {
|
|
|
22
21
|
"pt-BR": {
|
|
23
22
|
clearSearch: "Limpar busca"
|
|
24
23
|
}
|
|
25
|
-
},
|
|
26
|
-
i18n: { messages:
|
|
24
|
+
}, H = w({
|
|
25
|
+
i18n: { messages: j },
|
|
27
26
|
name: "dropdown-base-textbox",
|
|
28
27
|
inheritAttrs: !1
|
|
29
|
-
}),
|
|
30
|
-
...
|
|
28
|
+
}), W = /* @__PURE__ */ w({
|
|
29
|
+
...H,
|
|
31
30
|
props: {
|
|
32
31
|
/**
|
|
33
32
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -59,10 +58,6 @@ const H = {
|
|
|
59
58
|
* Corresponds to the label's id that labels the textbox element.
|
|
60
59
|
*/
|
|
61
60
|
ariaLabelledby: { type: String, default: null },
|
|
62
|
-
/**
|
|
63
|
-
* Custom debounce time for the user type event.
|
|
64
|
-
*/
|
|
65
|
-
debounceTime: { type: Number, default: 300 },
|
|
66
61
|
/**
|
|
67
62
|
* Disables any textbox functionality
|
|
68
63
|
*/
|
|
@@ -116,14 +111,14 @@ const H = {
|
|
|
116
111
|
}
|
|
117
112
|
},
|
|
118
113
|
emits: [],
|
|
119
|
-
setup(l, { expose: t, emit:
|
|
120
|
-
const e = l, { t:
|
|
114
|
+
setup(l, { expose: t, emit: a }) {
|
|
115
|
+
const e = l, { t: o } = U(), d = R(), c = E(), C = q(c), i = k(null), f = T("textbox"), y = r(() => ({
|
|
121
116
|
[`b-dropdown-base-textbox--${p.DISABLED}`]: e.disabled,
|
|
122
117
|
[`b-dropdown-base-textbox--${p.READONLY}`]: e.readonly,
|
|
123
118
|
[`b-dropdown-base-textbox--${p.HAS_ITEMS}`]: !!e.additionalItemsSelected
|
|
124
119
|
})), b = r(() => d.required), _ = r(() => ({
|
|
125
120
|
"b-dropdown-base-textbox__input--dynamic-filtering": e.dynamicFiltering
|
|
126
|
-
})), S = r(() => e.dynamicFiltering && !!e.value && e.open),
|
|
121
|
+
})), S = r(() => e.dynamicFiltering && !!e.value && e.open), x = r(
|
|
127
122
|
() => {
|
|
128
123
|
var u;
|
|
129
124
|
return {
|
|
@@ -135,72 +130,72 @@ const H = {
|
|
|
135
130
|
"aria-label": e.ariaLabelledby ? null : e.ariaLabel,
|
|
136
131
|
"aria-invalid": e.isInvalid,
|
|
137
132
|
"aria-disabled": e.disabled ? !0 : null,
|
|
138
|
-
"aria-required":
|
|
133
|
+
"aria-required": m.value ? null : b.value
|
|
139
134
|
};
|
|
140
135
|
}
|
|
141
136
|
), n = r(
|
|
142
137
|
() => e.multiple ? e.selectedValueItem : []
|
|
143
|
-
),
|
|
138
|
+
), m = r(() => e.dynamicFiltering && (e.open || e.alwaysComboboxIsInput)), A = r(() => e.selectedValueItem && !e.multiple), B = r(
|
|
144
139
|
() => e.multiple && e.selectedValueItem && n.value.length > 0 && e.showSlotContentInMultiple
|
|
145
140
|
);
|
|
146
141
|
V(
|
|
147
|
-
() =>
|
|
142
|
+
() => m.value,
|
|
148
143
|
() => {
|
|
149
|
-
|
|
144
|
+
m.value && !e.alwaysComboboxIsInput && D(() => {
|
|
150
145
|
i.value.focus();
|
|
151
146
|
});
|
|
152
147
|
}
|
|
153
148
|
);
|
|
154
149
|
const I = async () => {
|
|
155
|
-
!e.disabled && !e.readonly && (
|
|
150
|
+
!e.disabled && !e.readonly && (a(s.OPEN), await D(), i.value.focus());
|
|
156
151
|
}, g = () => {
|
|
157
|
-
e.open && (i.value.focus(),
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
}, F =
|
|
161
|
-
!e.readonly && !e.disabled ?
|
|
162
|
-
},
|
|
152
|
+
e.open && (i.value.focus(), a(s.CLOSE));
|
|
153
|
+
}, N = (u) => e.open && u.target.tagName === "INPUT" ? null : e.open ? g() : I(), P = () => {
|
|
154
|
+
a(s.CLEAR), a(s.INPUT, ""), i.value.focus();
|
|
155
|
+
}, F = (u) => {
|
|
156
|
+
!e.readonly && !e.disabled ? a(s.INPUT, u.target.value) : (u.preventDefault(), u.stopPropagation());
|
|
157
|
+
}, h = () => {
|
|
163
158
|
i.value.focus();
|
|
164
159
|
};
|
|
165
160
|
return t({
|
|
166
161
|
focus: h
|
|
167
|
-
}), { __sfc: !0, t:
|
|
162
|
+
}), { __sfc: !0, t: o, attrs: d, slots: c, hasSlot: C, props: e, emit: a, textbox: i, textboxId: f, conditionalClasses: y, isRequired: b, comboboxConditionalClasses: _, isFiltering: S, ariaAttributes: x, selectedValueItems: n, shouldShowInput: m, shouldShowSingleSelectSlot: A, shouldShowMultipleSlot: B, onOpenDropdown: I, onCloseDropdown: g, onToggleDropdown: N, onClearSearch: P, onInputEvent: F, focus: h, BentoTypography: M, DropdownBaseTextboxEvent: s, CrossCircleFillIcon: $, CrossCircleFillSmallIcon: Y, BentoDropdownSize: L };
|
|
168
163
|
}
|
|
169
164
|
});
|
|
170
|
-
var
|
|
171
|
-
var t = this,
|
|
172
|
-
return
|
|
173
|
-
return !
|
|
174
|
-
} } }, [
|
|
175
|
-
return t.$emit(e.DropdownBaseTextboxEvent.KEYDOWN,
|
|
176
|
-
}, function(
|
|
177
|
-
return !
|
|
178
|
-
}], input: e.onInputEvent } }, "input", e.ariaAttributes, !1)) :
|
|
165
|
+
var J = function() {
|
|
166
|
+
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
167
|
+
return a("div", { class: t.$attrs.class, attrs: { "data-testid": "textbox-wrapper" }, on: { click: e.onToggleDropdown, keydown: function(o) {
|
|
168
|
+
return !o.type.indexOf("key") && t._k(o.keyCode, "escape", void 0, o.key, void 0) ? null : e.onCloseDropdown.apply(null, arguments);
|
|
169
|
+
} } }, [a(e.BentoTypography, { staticClass: "b-dropdown-base-textbox", class: e.conditionalClasses, attrs: { el: "div", "data-testid": "base-textbox" } }, [e.shouldShowInput ? a("input", t._b({ ref: "textbox", staticClass: "b-dropdown-base-textbox__input", attrs: { id: e.textboxId, role: "combobox", type: "text", "aria-autocomplete": "list", size: "1", disabled: t.disabled ? !0 : null, readonly: t.readonly, required: e.isRequired }, domProps: { value: t.open ? t.value : t.displayValue }, on: { keydown: [function(o) {
|
|
170
|
+
return t.$emit(e.DropdownBaseTextboxEvent.KEYDOWN, o);
|
|
171
|
+
}, function(o) {
|
|
172
|
+
return !o.type.indexOf("key") && t._k(o.keyCode, "enter", 13, o.key, "Enter") ? null : e.onToggleDropdown.apply(null, arguments);
|
|
173
|
+
}], input: e.onInputEvent } }, "input", e.ariaAttributes, !1)) : a("div", t._b({ ref: "textbox", staticClass: "b-dropdown-base-textbox__input", class: e.comboboxConditionalClasses, attrs: { id: e.textboxId, "aria-readonly": t.readonly ? "true" : null, role: "combobox", tabindex: t.disabled ? -1 : 0 } }, "div", e.ariaAttributes, !1), [e.shouldShowSingleSelectSlot ? [e.hasSlot("display-value") ? t._t("display-value", null, null, t.selectedValueItem) : t._t("default", function() {
|
|
179
174
|
return [t._v(" " + t._s(t.displayValue) + " ")];
|
|
180
|
-
}, null, t.selectedValueItem)] : e.shouldShowMultipleSlot ? [
|
|
181
|
-
return
|
|
175
|
+
}, null, t.selectedValueItem)] : e.shouldShowMultipleSlot ? [a("div", { staticClass: "b-dropdown-base-textbox__input-multiple-selected" }, t._l(e.selectedValueItems, function(o) {
|
|
176
|
+
return a("div", { key: o.value }, [a("div", { staticClass: "b-dropdown-base-textbox__input-selected-element" }, [t._t("default", function() {
|
|
182
177
|
return [t._v(" " + t._s(t.displayValue) + " ")];
|
|
183
|
-
}, null,
|
|
184
|
-
}), 0)] : [t._v(t._s(t.displayValue))]], 2), t.additionalItemsSelected ?
|
|
185
|
-
return
|
|
186
|
-
}, keydown: function(
|
|
187
|
-
return !
|
|
188
|
-
}, keyup: function(
|
|
189
|
-
return !
|
|
190
|
-
} } }, [t.size === e.BentoDropdownSize.SMALL ?
|
|
191
|
-
},
|
|
178
|
+
}, null, o)], 2)]);
|
|
179
|
+
}), 0)] : [t._v(t._s(t.displayValue))]], 2), t.additionalItemsSelected ? a("span", { staticClass: "b-dropdown-base-textbox__additional-items" }, [t._v(" " + t._s(t.additionalItemsSelected) + " ")]) : t._e(), e.hasSlot("icon") && !e.isFiltering ? a("span", { staticClass: "b-dropdown-base-textbox__icon", attrs: { "aria-hidden": "true" } }, [t._t("icon")], 2) : t._e(), e.isFiltering ? a("span", { staticClass: "b-dropdown-base-textbox__clear-search", attrs: { tabindex: t.disabled ? -1 : 0, "data-testid": "clear-search-button" }, on: { click: function(o) {
|
|
180
|
+
return o.stopPropagation(), e.onClearSearch.apply(null, arguments);
|
|
181
|
+
}, keydown: function(o) {
|
|
182
|
+
return !o.type.indexOf("key") && t._k(o.keyCode, "enter", 13, o.key, "Enter") ? null : (o.stopPropagation(), e.onClearSearch.apply(null, arguments));
|
|
183
|
+
}, keyup: function(o) {
|
|
184
|
+
return !o.type.indexOf("key") && t._k(o.keyCode, "space", 32, o.key, [" ", "Spacebar"]) ? null : e.onClearSearch.apply(null, arguments);
|
|
185
|
+
} } }, [t.size === e.BentoDropdownSize.SMALL ? a(e.CrossCircleFillSmallIcon, { attrs: { "svg-title": e.t("clearSearch") } }) : a(e.CrossCircleFillIcon, { attrs: { "svg-title": e.t("clearSearch") } })], 1) : t._e()])], 1);
|
|
186
|
+
}, G = [], Q = /* @__PURE__ */ O(
|
|
187
|
+
W,
|
|
192
188
|
J,
|
|
193
189
|
G,
|
|
194
|
-
Q,
|
|
195
190
|
!1,
|
|
196
191
|
null,
|
|
197
|
-
"
|
|
192
|
+
"213214b2"
|
|
198
193
|
);
|
|
199
|
-
const
|
|
194
|
+
const X = Q.exports, Z = w({
|
|
200
195
|
name: "dropdown-default-textbox",
|
|
201
196
|
inheritAttrs: !1
|
|
202
|
-
}),
|
|
203
|
-
...
|
|
197
|
+
}), ee = /* @__PURE__ */ w({
|
|
198
|
+
...Z,
|
|
204
199
|
props: {
|
|
205
200
|
/**
|
|
206
201
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -238,10 +233,6 @@ const Z = X.exports, ee = w({
|
|
|
238
233
|
* Renders the dropdown with a condensed style.
|
|
239
234
|
*/
|
|
240
235
|
condensed: { type: Boolean, default: !1 },
|
|
241
|
-
/**
|
|
242
|
-
* Custom debounce time. Default: 300
|
|
243
|
-
*/
|
|
244
|
-
debounceTime: { type: Number, default: 300 },
|
|
245
236
|
/**
|
|
246
237
|
* Disables any textbox functionality
|
|
247
238
|
*/
|
|
@@ -291,60 +282,60 @@ const Z = X.exports, ee = w({
|
|
|
291
282
|
multiple: { type: Boolean, default: !1 }
|
|
292
283
|
},
|
|
293
284
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
294
|
-
setup(l, { expose: t, emit:
|
|
295
|
-
const e = l,
|
|
285
|
+
setup(l, { expose: t, emit: a }) {
|
|
286
|
+
const e = l, o = E(), d = k(null), c = r(() => ({
|
|
296
287
|
[`b-dropdown-default-textbox--${p.ERROR}`]: !e.disabled && !e.readonly && e.isInvalid,
|
|
297
288
|
[`b-dropdown-default-textbox--${p.DISABLED}`]: e.disabled,
|
|
298
289
|
[`b-dropdown-default-textbox--${p.READONLY}`]: e.readonly,
|
|
299
290
|
[`b-dropdown-default-textbox--${p.OPENED}`]: e.open,
|
|
300
291
|
"b-dropdown-default-textbox--condensed": e.condensed
|
|
301
292
|
})), C = r(() => e.open && !e.disabled && !e.readonly), i = (n) => {
|
|
302
|
-
|
|
293
|
+
a("input", n);
|
|
303
294
|
}, f = (n) => {
|
|
304
|
-
|
|
295
|
+
a("keydown", n);
|
|
305
296
|
}, y = (n) => {
|
|
306
|
-
v(n),
|
|
297
|
+
v(n), a("open");
|
|
307
298
|
}, b = (n) => {
|
|
308
|
-
v(n),
|
|
299
|
+
v(n), a("close");
|
|
309
300
|
}, _ = (n) => {
|
|
310
|
-
v(n),
|
|
301
|
+
v(n), a("clear");
|
|
311
302
|
}, S = {
|
|
312
303
|
[s.INPUT]: i,
|
|
313
304
|
[s.OPEN]: y,
|
|
314
305
|
[s.CLOSE]: b,
|
|
315
306
|
[s.CLEAR]: _,
|
|
316
307
|
[s.KEYDOWN]: f
|
|
317
|
-
},
|
|
308
|
+
}, x = () => {
|
|
318
309
|
d.value.focus();
|
|
319
310
|
};
|
|
320
311
|
return t({
|
|
321
|
-
focus:
|
|
322
|
-
}), { __sfc: !0, emit:
|
|
312
|
+
focus: x
|
|
313
|
+
}), { __sfc: !0, emit: a, slots: o, props: e, baseTextbox: d, conditionalClasses: c, isDropdownOpen: C, onInput: i, onKeyDown: f, openDropdown: y, closeDropdown: b, clearValue: _, listeners: S, focus: x, DropdownBaseTextbox: X, ChevronDownIcon: z, ChevronUpIcon: K };
|
|
323
314
|
}
|
|
324
315
|
});
|
|
325
|
-
var
|
|
326
|
-
var t = this,
|
|
327
|
-
return
|
|
316
|
+
var te = function() {
|
|
317
|
+
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
318
|
+
return a("div", { staticClass: "b-dropdown-default-textbox", class: e.conditionalClasses, attrs: { "data-testid": "default-textbox" } }, [a(e.DropdownBaseTextbox, t._g(t._b({ ref: "baseTextbox", staticClass: "b-dropdown-default-textbox__textbox", attrs: { value: t.value }, scopedSlots: t._u([t._l(e.slots, function(o, d) {
|
|
328
319
|
return { key: d, fn: function(c) {
|
|
329
320
|
return [t._t(d, null, null, c ?? {})];
|
|
330
321
|
} };
|
|
331
322
|
}), { key: "icon", fn: function() {
|
|
332
|
-
return [
|
|
323
|
+
return [a("div", { staticClass: "b-dropdown-default-textbox__chevron" }, [a(e.ChevronUpIcon, { directives: [{ name: "show", rawName: "v-show", value: e.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), a(e.ChevronDownIcon, { directives: [{ name: "show", rawName: "v-show", value: !e.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
333
324
|
}, proxy: !0 }], null, !0) }, "dropdown-base-textbox", { ...t.$attrs, ...t.$props }, !1), e.listeners))], 1);
|
|
334
|
-
}, ae = [],
|
|
325
|
+
}, ae = [], oe = /* @__PURE__ */ O(
|
|
326
|
+
ee,
|
|
335
327
|
te,
|
|
336
|
-
oe,
|
|
337
328
|
ae,
|
|
338
329
|
!1,
|
|
339
330
|
null,
|
|
340
|
-
"
|
|
331
|
+
"bf2d43b0"
|
|
341
332
|
);
|
|
342
|
-
const
|
|
333
|
+
const _e = oe.exports;
|
|
343
334
|
export {
|
|
344
335
|
L as B,
|
|
345
|
-
|
|
336
|
+
_e as D,
|
|
346
337
|
p as a,
|
|
347
338
|
s as b,
|
|
348
|
-
|
|
339
|
+
X as c
|
|
349
340
|
};
|
|
350
|
-
//# sourceMappingURL=dropdown-default-textbox.
|
|
341
|
+
//# sourceMappingURL=dropdown-default-textbox.5WjhJWdh.js.map
|