@adyen/bento-vue2 1.78.2 → 1.79.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 +77 -28
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/ai-button.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox-group.css +1 -1
- package/dist/assets/dashboard-section.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field-phone-number.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/layout-row.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/search-bar.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/structured-list-item.css +1 -1
- package/dist/assets/summary-grid.css +1 -1
- package/dist/assets/tab.css +1 -1
- package/dist/assets/teleport.css +1 -0
- package/dist/assets/toast.css +1 -1
- package/dist/assets/tooltip.css +1 -1
- package/dist/assets/tutorial.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{accordion-item.nQhXD2tV.js → accordion-item.G1q4zgBG.js} +2 -2
- package/dist/chunks/{accordion-item.nQhXD2tV.js.map → accordion-item.G1q4zgBG.js.map} +1 -1
- package/dist/chunks/{action-bar.MXZTIUNk.js → action-bar.DOaFj-A2.js} +3 -3
- package/dist/chunks/{action-bar.MXZTIUNk.js.map → action-bar.DOaFj-A2.js.map} +1 -1
- package/dist/chunks/{base-modal.BMdlCSd0.js → base-modal.BJ6315kP.js} +13 -13
- package/dist/chunks/{base-modal.BMdlCSd0.js.map → base-modal.BJ6315kP.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BFRkPi6g.js → button-actions-with-menu.DPKvfKJY.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.BFRkPi6g.js.map → button-actions-with-menu.DPKvfKJY.js.map} +1 -1
- package/dist/chunks/{button-actions.B81vY51z.js → button-actions.C3cP-anb.js} +228 -347
- package/dist/chunks/button-actions.C3cP-anb.js.map +1 -0
- package/dist/chunks/{calendar.Fm_dfQC5.js → calendar.Bhj58zR3.js} +4 -43
- package/dist/chunks/{calendar.Fm_dfQC5.js.map → calendar.Bhj58zR3.js.map} +1 -1
- package/dist/chunks/{card.VOCKI7Ad.js → card.XfRuWGfC.js} +2 -2
- package/dist/chunks/{card.VOCKI7Ad.js.map → card.XfRuWGfC.js.map} +1 -1
- package/dist/chunks/{checkbox-group.tm9zLXkK.js → checkbox-group.CGxWh-no.js} +35 -34
- package/dist/chunks/checkbox-group.CGxWh-no.js.map +1 -0
- package/dist/chunks/{checkbox.itbBlXev.js → checkbox.C6NSiW_I.js} +18 -18
- package/dist/chunks/{checkbox.itbBlXev.js.map → checkbox.C6NSiW_I.js.map} +1 -1
- package/dist/chunks/{code-snippet.trioWquF.js → code-snippet.bzFOFUj4.js} +5 -5
- package/dist/chunks/{code-snippet.trioWquF.js.map → code-snippet.bzFOFUj4.js.map} +1 -1
- package/dist/chunks/{codemirror.Zv80n3Z2.js → codemirror.Cy7iSLbd.js} +12 -12
- package/dist/chunks/{codemirror.Zv80n3Z2.js.map → codemirror.Cy7iSLbd.js.map} +1 -1
- package/dist/chunks/constructNow.BhymNmy5.js +8 -0
- package/dist/chunks/{constructNow.CHWWeLPc.js.map → constructNow.BhymNmy5.js.map} +1 -1
- package/dist/chunks/{controls-group.82mB_GDw.js → controls-group.D62vSDSk.js} +2 -2
- package/dist/chunks/{controls-group.82mB_GDw.js.map → controls-group.D62vSDSk.js.map} +1 -1
- package/dist/chunks/{copy.WQDLcs_T.js → copy.Hu3DFJwv.js} +2 -2
- package/dist/chunks/{copy.WQDLcs_T.js.map → copy.Hu3DFJwv.js.map} +1 -1
- package/dist/chunks/{country.CGn5WjFx.js → country.B3z3-QRY.js} +2 -2
- package/dist/chunks/{country.CGn5WjFx.js.map → country.B3z3-QRY.js.map} +1 -1
- package/dist/chunks/{dashboard-section.D1l7wDX3.js → dashboard-section.BvGMr9Vl.js} +4 -4
- package/dist/chunks/{dashboard-section.D1l7wDX3.js.map → dashboard-section.BvGMr9Vl.js.map} +1 -1
- package/dist/chunks/{dashed-underline.K-l-7bDq.js → dashed-underline.D107w00E.js} +13 -12
- package/dist/chunks/{dashed-underline.K-l-7bDq.js.map → dashed-underline.D107w00E.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DGUDqzjj.js → data-grid-template.DShJunDa.js} +4 -4
- package/dist/chunks/{data-grid-template.DGUDqzjj.js.map → data-grid-template.DShJunDa.js.map} +1 -1
- package/dist/chunks/data-grid-template.keys.VezYtHtM.js +5 -0
- package/dist/chunks/{data-grid-template.keys.2_AkxuNT.js.map → data-grid-template.keys.VezYtHtM.js.map} +1 -1
- package/dist/chunks/{data-grid.CS7Q8EWs.js → data-grid.BzHb4GUA.js} +18 -18
- package/dist/chunks/{data-grid.CS7Q8EWs.js.map → data-grid.BzHb4GUA.js.map} +1 -1
- package/dist/chunks/{date-picker.DK-ndVN9.js → date-picker.Dvx50znw.js} +7 -7
- package/dist/chunks/{date-picker.DK-ndVN9.js.map → date-picker.Dvx50znw.js.map} +1 -1
- package/dist/chunks/{date-range-picker.BkZBhOfu.js → date-range-picker.DYYyE_e2.js} +313 -305
- package/dist/chunks/date-range-picker.DYYyE_e2.js.map +1 -0
- package/dist/chunks/{dialog-page.D23qNwKW.js → dialog-page.krM2wQpm.js} +2 -2
- package/dist/chunks/{dialog-page.D23qNwKW.js.map → dialog-page.krM2wQpm.js.map} +1 -1
- package/dist/chunks/{differenceInMonths.C8FyCrav.js → differenceInMonths.Cab3nOsb.js} +2 -2
- package/dist/chunks/{differenceInMonths.C8FyCrav.js.map → differenceInMonths.Cab3nOsb.js.map} +1 -1
- package/dist/chunks/{divider.CFbtmKeQ.js → divider.DX5gwN7p.js} +2 -2
- package/dist/chunks/{divider.CFbtmKeQ.js.map → divider.DX5gwN7p.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.BCOVaw-a.js → dropdown-default-textbox.uWZMxeI7.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.BCOVaw-a.js.map → dropdown-default-textbox.uWZMxeI7.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.DUP4wYAW.js → dropdown-tag.Ctn5KMFU.js} +4 -4
- package/dist/chunks/{dropdown-tag.DUP4wYAW.js.map → dropdown-tag.Ctn5KMFU.js.map} +1 -1
- package/dist/chunks/{dropdown.BiA1YOYJ.js → dropdown.BpT6ct8O.js} +28 -28
- package/dist/chunks/{dropdown.BiA1YOYJ.js.map → dropdown.BpT6ct8O.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js.map +1 -1
- package/dist/chunks/{events.CMzGybJJ.js → events.BQOQSSb7.js} +2 -5
- package/dist/chunks/{events.CMzGybJJ.js.map → events.BQOQSSb7.js.map} +1 -1
- package/dist/chunks/{field-label.Auq-Pzho.js → field-label.C3h8Q8Xd.js} +2 -2
- package/dist/chunks/{field-label.Auq-Pzho.js.map → field-label.C3h8Q8Xd.js.map} +1 -1
- package/dist/chunks/{file-uploader.DsvADlNb.js → file-uploader.CK6dhx8T.js} +109 -106
- package/dist/chunks/file-uploader.CK6dhx8T.js.map +1 -0
- package/dist/chunks/{filter-bar.F5drAPol.js → filter-bar.DpjD5bZe.js} +111 -115
- package/dist/chunks/filter-bar.DpjD5bZe.js.map +1 -0
- package/dist/chunks/{footer-actions.CLq_kBwY.js → footer-actions.DPjWGWhJ.js} +2 -2
- package/dist/chunks/{footer-actions.CLq_kBwY.js.map → footer-actions.DPjWGWhJ.js.map} +1 -1
- package/dist/chunks/{form-layout-title.DoF6ovPB.js → form-layout-title.B_oVSX5b.js} +2 -2
- package/dist/chunks/{form-layout-title.DoF6ovPB.js.map → form-layout-title.B_oVSX5b.js.map} +1 -1
- package/dist/chunks/form-layout.types.bZW9iR6_.js +5 -0
- package/dist/chunks/{form-layout.types.D3EKzbE7.js.map → form-layout.types.bZW9iR6_.js.map} +1 -1
- package/dist/chunks/get-slot-text.Bjb9dTSV.js.map +1 -1
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.BW7U6PxE.js → getTimezoneOffsetInMilliseconds.B7sxiukN.js} +2 -2
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.BW7U6PxE.js.map → getTimezoneOffsetInMilliseconds.B7sxiukN.js.map} +1 -1
- package/dist/chunks/{header-meta.D-6dL1Vg.js → header-meta.qT3_T35I.js} +5 -5
- package/dist/chunks/{header-meta.D-6dL1Vg.js.map → header-meta.qT3_T35I.js.map} +1 -1
- package/dist/chunks/{header-with-views.CG5FKoC1.js → header-with-views.BSYbvDyP.js} +13 -13
- package/dist/chunks/{header-with-views.CG5FKoC1.js.map → header-with-views.BSYbvDyP.js.map} +1 -1
- package/dist/chunks/{header.DoWKsA15.js → header.CLDtv3Ir.js} +3 -3
- package/dist/chunks/{header.DoWKsA15.js.map → header.CLDtv3Ir.js.map} +1 -1
- package/dist/chunks/{info-icon.Bhka3oGh.js → info-icon.DGrrXpIY.js} +2 -2
- package/dist/chunks/{info-icon.Bhka3oGh.js.map → info-icon.DGrrXpIY.js.map} +1 -1
- package/dist/chunks/{input-field-password.FvLueqmb.js → input-field-password.uhQuUzyj.js} +103 -95
- package/dist/chunks/input-field-password.uhQuUzyj.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.B-dlJc27.js → input-field-phone-number.BdbaTJwH.js} +1170 -1168
- package/dist/chunks/{input-field-phone-number.B-dlJc27.js.map → input-field-phone-number.BdbaTJwH.js.map} +1 -1
- package/dist/chunks/{input-field.B1MHu987.js → input-field.C4XJ53Cn.js} +87 -79
- package/dist/chunks/input-field.C4XJ53Cn.js.map +1 -0
- package/dist/chunks/{keyboard-navigation.pB8weElW.js → keyboard-navigation.DWmhelVv.js} +2 -2
- package/dist/chunks/{keyboard-navigation.pB8weElW.js.map → keyboard-navigation.DWmhelVv.js.map} +1 -1
- package/dist/chunks/{layout-row.BP3lZAOh.js → layout-row.DwdZbpVG.js} +2 -2
- package/dist/chunks/{layout-row.BP3lZAOh.js.map → layout-row.DwdZbpVG.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.DkPz3wPc.js → listbox-option-tag.B94BtpSU.js} +2 -2
- package/dist/chunks/{listbox-option-tag.DkPz3wPc.js.map → listbox-option-tag.B94BtpSU.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.BSKm6yn_.js → modal-fullscreen.B3Xx-Hoc.js} +33 -32
- package/dist/chunks/modal-fullscreen.B3Xx-Hoc.js.map +1 -0
- package/dist/chunks/{modal.Bp5twyjz.js → modal.D3OSxMF6.js} +4 -4
- package/dist/chunks/{modal.Bp5twyjz.js.map → modal.D3OSxMF6.js.map} +1 -1
- package/dist/chunks/{pagination.D1C0cURM.js → pagination.Bvhpu21H.js} +2 -2
- package/dist/chunks/{pagination.D1C0cURM.js.map → pagination.Bvhpu21H.js.map} +1 -1
- package/dist/chunks/{payment-method.CcASYR3B.js → payment-method.C8Ie97qE.js} +2 -2
- package/dist/chunks/{payment-method.CcASYR3B.js.map → payment-method.C8Ie97qE.js.map} +1 -1
- package/dist/chunks/promo-banner.DikQcQU2.js.map +1 -1
- package/dist/chunks/{radio-group.DmKiTjS8.js → radio-group.BTu23ZgN.js} +5 -5
- package/dist/chunks/{radio-group.DmKiTjS8.js.map → radio-group.BTu23ZgN.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.DzH-Z5oi.js → rich-text-editor.BtcSjFpF.js} +12 -12
- package/dist/chunks/{rich-text-editor.DzH-Z5oi.js.map → rich-text-editor.BtcSjFpF.js.map} +1 -1
- package/dist/chunks/{search-bar.Cvw_nY5M.js → search-bar.BcHoTrjP.js} +11 -11
- package/dist/chunks/search-bar.BcHoTrjP.js.map +1 -0
- package/dist/chunks/{secondary-nav.CUF6QWjI.js → secondary-nav.DEThy9WH.js} +3 -3
- package/dist/chunks/{secondary-nav.CUF6QWjI.js.map → secondary-nav.DEThy9WH.js.map} +1 -1
- package/dist/chunks/{segmented-control.Cma_nu0G.js → segmented-control.Dj_ZKhmU.js} +2 -2
- package/dist/chunks/{segmented-control.Cma_nu0G.js.map → segmented-control.Dj_ZKhmU.js.map} +1 -1
- package/dist/chunks/{selection-card-group.Ddli4Llk.js → selection-card-group.Rz_rTBRp.js} +11 -11
- package/dist/chunks/{selection-card-group.Ddli4Llk.js.map → selection-card-group.Rz_rTBRp.js.map} +1 -1
- package/dist/chunks/{sidepanel.A9yG4FP_.js → sidepanel.ClG3dhHf.js} +4 -4
- package/dist/chunks/{sidepanel.A9yG4FP_.js.map → sidepanel.ClG3dhHf.js.map} +1 -1
- package/dist/chunks/{step.TzzZSA9f.js → step.Cnqr8i4V.js} +3 -3
- package/dist/chunks/{step.TzzZSA9f.js.map → step.Cnqr8i4V.js.map} +1 -1
- package/dist/chunks/{structured-list-item.CMsVwwA6.js → structured-list-item.zoY-ATTu.js} +5 -5
- package/dist/chunks/{structured-list-item.CMsVwwA6.js.map → structured-list-item.zoY-ATTu.js.map} +1 -1
- package/dist/chunks/summary-grid.keys.Xx-W5a2w.js +6 -0
- package/dist/chunks/{summary-grid.keys.CxTf_FOc.js.map → summary-grid.keys.Xx-W5a2w.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.CaYrtyVO.js → summary-grid.types.BA0XCVKK.js} +21 -21
- package/dist/chunks/summary-grid.types.BA0XCVKK.js.map +1 -0
- package/dist/chunks/{tab.CTui3j3e.js → tab.DXE68qVf.js} +2 -2
- package/dist/chunks/{tab.CTui3j3e.js.map → tab.DXE68qVf.js.map} +1 -1
- package/dist/chunks/tabs.keys.B4qGhjp2.js +7 -0
- package/dist/chunks/{tabs.keys.Cb4Vw5Jh.js.map → tabs.keys.B4qGhjp2.js.map} +1 -1
- package/dist/chunks/{tag.BltIbSh3.js → tag.BdCP2CN_.js} +2 -2
- package/dist/chunks/{tag.BltIbSh3.js.map → tag.BdCP2CN_.js.map} +1 -1
- package/dist/chunks/teleport.dQFcCuAw.js +128 -0
- package/dist/chunks/teleport.dQFcCuAw.js.map +1 -0
- package/dist/chunks/{textarea.CLWZRnAt.js → textarea.DaNiOOJ7.js} +3 -3
- package/dist/chunks/{textarea.CLWZRnAt.js.map → textarea.DaNiOOJ7.js.map} +1 -1
- package/dist/chunks/{timeline-item.HbtUj1j_.js → timeline-item.D2HsuNh-.js} +7 -7
- package/dist/chunks/{timeline-item.HbtUj1j_.js.map → timeline-item.D2HsuNh-.js.map} +1 -1
- package/dist/chunks/toast.CA5H8vr9.js +174 -0
- package/dist/chunks/toast.CA5H8vr9.js.map +1 -0
- package/dist/chunks/{tooltip.D3SDcRef.js → tooltip.Dt87KVh2.js} +2 -2
- package/dist/chunks/{tooltip.D3SDcRef.js.map → tooltip.Dt87KVh2.js.map} +1 -1
- package/dist/chunks/{tutorial.B32GMtIj.js → tutorial.C-q4mxUb.js} +4 -4
- package/dist/chunks/{tutorial.B32GMtIj.js.map → tutorial.C-q4mxUb.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.BKHU1qBv.js → use-bento-toast-controller.BhtohoS1.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.BKHU1qBv.js.map → use-bento-toast-controller.BhtohoS1.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.BZd3CTeP.js → use-cached-selected-values.FoXcm49J.js} +3 -3
- package/dist/chunks/{use-cached-selected-values.BZd3CTeP.js.map → use-cached-selected-values.FoXcm49J.js.map} +1 -1
- package/dist/chunks/{use-form-layout-loading.D3lALhtC.js → use-form-layout-loading.CWbjZiwP.js} +2 -2
- package/dist/chunks/{use-form-layout-loading.D3lALhtC.js.map → use-form-layout-loading.CWbjZiwP.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.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/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.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 +289 -288
- 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/internal.js +27 -26
- package/dist/internal.js.map +1 -1
- package/dist/layout.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/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/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +4 -1
- package/dist/styles/bento-light.css +4 -1
- package/dist/styles/bento.css +4 -1
- package/dist/styles/legacy.css +4 -1
- package/dist/styles/styleguide.css +4 -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/tutorial.js +1 -1
- package/dist/use-form-v4.js +8 -8
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +105 -5
- package/package.json +8 -7
- package/dist/chunks/button-actions.B81vY51z.js.map +0 -1
- package/dist/chunks/checkbox-group.tm9zLXkK.js.map +0 -1
- package/dist/chunks/constructNow.CHWWeLPc.js +0 -8
- package/dist/chunks/data-grid-template.keys.2_AkxuNT.js +0 -5
- package/dist/chunks/date-range-picker.BkZBhOfu.js.map +0 -1
- package/dist/chunks/file-uploader.DsvADlNb.js.map +0 -1
- package/dist/chunks/filter-bar.F5drAPol.js.map +0 -1
- package/dist/chunks/form-layout.types.D3EKzbE7.js +0 -5
- package/dist/chunks/input-field-password.FvLueqmb.js.map +0 -1
- package/dist/chunks/input-field.B1MHu987.js.map +0 -1
- package/dist/chunks/modal-fullscreen.BSKm6yn_.js.map +0 -1
- package/dist/chunks/search-bar.Cvw_nY5M.js.map +0 -1
- package/dist/chunks/summary-grid.keys.CxTf_FOc.js +0 -6
- package/dist/chunks/summary-grid.types.CaYrtyVO.js.map +0 -1
- package/dist/chunks/tabs.keys.Cb4Vw5Jh.js +0 -7
- package/dist/chunks/toast.B4J4V6n-.js +0 -171
- package/dist/chunks/toast.B4J4V6n-.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as p, computed as r } from "vue";
|
|
2
2
|
import { u as l } from "./use-has-slot.C9lQZ6nz.js";
|
|
3
3
|
import { B as d, a as c, c as i } from "./typography.hlOAxsEn.js";
|
|
4
|
-
import { B as u } from "./button-actions-with-menu.
|
|
5
|
-
import { I as n, H as f } from "./header-meta.
|
|
4
|
+
import { B as u } from "./button-actions-with-menu.DPKvfKJY.js";
|
|
5
|
+
import { I as n, H as f } from "./header-meta.qT3_T35I.js";
|
|
6
6
|
import { n as _ } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
7
7
|
import "../assets/header.css";
|
|
8
8
|
var a = /* @__PURE__ */ ((o) => (o.PAGE = "page", o.COMPONENT = "component", o))(a || {});
|
|
@@ -100,4 +100,4 @@ const I = v.exports;
|
|
|
100
100
|
export {
|
|
101
101
|
I as B
|
|
102
102
|
};
|
|
103
|
-
//# sourceMappingURL=header.
|
|
103
|
+
//# sourceMappingURL=header.CLDtv3Ir.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.
|
|
1
|
+
{"version":3,"file":"header.CLDtv3Ir.js","sources":["../../src/components/header/header.types.ts","../../src/components/header/header.vue"],"sourcesContent":["import { type BentoLoadingButtonState } from '../button/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 <header 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>\n <header-meta\n v-if=\"description || hasSlot('description') || lastUpdated\"\n class=\"b-header__meta-container\"\n :description=\"description\"\n :last-updated=\"lastUpdated\"\n :reload-button=\"reloadButton\"\n >\n <template v-if=\"hasSlot('description')\" #description><slot name=\"description\" /></template>\n </header-meta>\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 </header>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { InfoIconWithPopover } from '@/internal';\n import { type BentoButtonActionsList } from '@/components/button';\n import { useHasSlot } from '@/composables';\n import { type BentoHeaderReloadButton, BentoHeaderVariant } from './header.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { HeaderMeta } from '@/internal/header-meta';\n import ButtonActionsWithMenu from '../internal/button-actions-with-menu/button-actions-with-menu.vue';\n\n export default defineComponent({\n name: 'bento-header',\n components: {\n BentoTypography,\n ButtonActionsWithMenu,\n InfoIconWithPopover,\n HeaderMeta,\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 under the title\n */\n description: { type: String, default: null },\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 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 return {\n hasSlot: useHasSlot(slots),\n conditionalClasses,\n typography,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./header.scss\" />\n"],"names":["BentoHeaderVariant","BentoHeaderVariant2","_sfc_main","defineComponent","BentoTypography","ButtonActionsWithMenu","InfoIconWithPopover","HeaderMeta","value","props","slots","conditionalClasses","computed","typography","BentoTypographyElement","BentoTypographyVariant","useHasSlot"],"mappings":";;;;;;;AAKY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA;ACyCZ,MAAAE,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,iBAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,YAAAC;AAAA,EACA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,SAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,aAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKA,qBAAA,EAAA,MAAAD,EAAA,MAAA,YAAA,MAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKA,yBAAA;AAAA,MAKA,MAAAA,EAAA,MAAA,gBAAA;AAAA,MACA,SAAAA,EAAA,MAAA,gBAAA;AAAA,MACA,WAAAA,EAAA,MAAA,gBAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,aAAA,EAAA,MAAA,CAAA,MAAA,MAAA,GAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,SAAA;AAAA,MAMA,MAAA;AAAA,MACA,SAAAN,EAAA;AAAA,MACA,WAAA,CAAAQ,MAAA,OAAA,OAAAR,CAAA,EAAA,SAAAQ,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,OAAA,EAAA,MAAA,QAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MAMA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA,CAAA,QAAA;AAAA,EACA,MAAAC,GAAA,EAAA,OAAAC,EAAA,GAAA;AAEA,UAAAC,IAAAC,EAAA,OAAA;AAAA,MAAA,uBAAAH,EAAA,YAAAT,EAAA;AAAA,IACA,EAAA,GAGAa,IAAAD,EAAA,OAAA;AAAA,MAAA,IAAAH,EAAA,YAAAT,EAAA,OAAAc,EAAA,KAAAA,EAAA;AAAA,MACA,SAAAC,EAAA;AAAA,MACA,QAAAN,EAAA,YAAAT,EAAA;AAAA,MACA,OAAAS,EAAA,YAAAT,EAAA;AAAA,IACA,EAAA;AAEA,WAAA;AAAA,MAAA,SAAAgB,EAAAN,CAAA;AAAA,MACA,oBAAAC;AAAA,MACA,YAAAE;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as r } from "vue";
|
|
2
2
|
import { d as s } from "./popper-container.agLYtGwv.js";
|
|
3
3
|
import { I as p } from "./info.CcMZ4aGg.js";
|
|
4
|
-
import { b as a } from "./tooltip.
|
|
4
|
+
import { b as a } from "./tooltip.Dt87KVh2.js";
|
|
5
5
|
import { n as l } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
6
|
import "../assets/info-icon.css";
|
|
7
7
|
const _ = {
|
|
@@ -34,4 +34,4 @@ const I = u.exports;
|
|
|
34
34
|
export {
|
|
35
35
|
I as B
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=info-icon.
|
|
37
|
+
//# sourceMappingURL=info-icon.DGrrXpIY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info-icon.
|
|
1
|
+
{"version":3,"file":"info-icon.DGrrXpIY.js","sources":["../../src/components/info-icon/info-icon.vue"],"sourcesContent":["<template>\n <span\n v-bento-tooltip-directive:[tooltipPosition]=\"tooltipText\"\n :aria-label=\"tooltipText\"\n class=\"b-info-icon\"\n @mouseenter=\"emit('mouseenter', $event)\"\n >\n <info-icon :svg-title=\"tooltipText\" class=\"b-info-icon__svg\" />\n </span>\n</template>\n\n<script setup lang=\"ts\">\n import { PopperContainerPosition } from '@/components/popper-container';\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives';\n import { type BentoInfoIconProps } from './info-icon.types';\n import InfoIcon from '@adyen/ui-assets-icons-16/vue/info';\n\n defineProps({\n tooltipText: null,\n tooltipPosition: { default: PopperContainerPosition.AUTO }\n});\n\n const emit = defineEmits([\"mouseenter\"]);\n</script>\n\n<script lang=\"ts\">\n /**\n * @example\n * <template>\n * <bento-info-icon tooltip-text=\"Text on hover\" />\n * </template>\n *\n * <script setup lang=\"ts\">\n * import { BentoInfoIcon } from '@adyen/bento-vue2';\n * </scrip>\n */\n export default {\n name: 'bento-info-icon',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./info-icon.scss\" />\n"],"names":["__default__"],"mappings":";;;;;;AAoCI,MAAAA,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { B as
|
|
3
|
-
import { B as
|
|
4
|
-
import { B as
|
|
5
|
-
import {
|
|
6
|
-
import { B as
|
|
7
|
-
import { C as
|
|
8
|
-
import { D as
|
|
9
|
-
import { S as
|
|
10
|
-
import { e as
|
|
11
|
-
import { u as
|
|
12
|
-
import { g as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
1
|
+
import { defineComponent as ue, useAttrs as ce, ref as n, provide as pe, computed as u, watch as P } from "vue";
|
|
2
|
+
import { B as ve } from "./button.CS_kdxYh.js";
|
|
3
|
+
import { B as fe } from "./image.C2D2hKat.js";
|
|
4
|
+
import { B as me } from "./input-field.C4XJ53Cn.js";
|
|
5
|
+
import { g as _e } from "./button-actions.C3cP-anb.js";
|
|
6
|
+
import { d as be, B as he } from "./typography.hlOAxsEn.js";
|
|
7
|
+
import { C as Ce } from "./checkmark-circle-fill.BttTCjrM.js";
|
|
8
|
+
import { D as ge } from "./dot.BW9SneIk.js";
|
|
9
|
+
import { S as ke, H as we } from "./show.B_mKPF6I.js";
|
|
10
|
+
import { e as ye, w as Le } from "./index.BDK4hwK_.js";
|
|
11
|
+
import { u as Re } from "./index.B6WW_F-J.js";
|
|
12
|
+
import { g as Q } from "./generate-uid.NJ8tVoha.js";
|
|
13
|
+
import { u as Ee } from "./form-field.D_2g7vaP.js";
|
|
14
|
+
import { b as Ie } from "./dropdown.BpT6ct8O.js";
|
|
15
|
+
import { T as Te } from "./tooltip.Dt87KVh2.js";
|
|
16
|
+
import { n as Ve } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
16
17
|
import "../assets/input-field-password.css";
|
|
17
18
|
var g = /* @__PURE__ */ ((o) => (o.TEXT = "text", o.PASSWORD = "password", o))(g || {}), _ = /* @__PURE__ */ ((o) => (o.MIN_LENGTH = "minLength", o.REQUIRE_LOWERCASE = "requireLowercase", o.REQUIRE_NUMERIC = "requireNumeric", o.REQUIRE_SPECIAL_CHARACTER = "requireSpecialCharacter", o.REQUIRE_UPPERCASE = "requireUppercase", o))(_ || {});
|
|
18
|
-
const
|
|
19
|
+
const Pe = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='capslock'%3e%3cg%20id='Union'%3e%3cpath%20d='M13.75%205.63952L8%201.03952L2.25%205.63952V7.74999H4.75V11.75H11.25V7.74999H13.75V5.63952ZM6.25%206.24999H3.88809L8%202.96046L12.1119%206.24999H9.75V10.25H6.25V6.24999Z'%20fill='%2300112C'/%3e%3cpath%20d='M11.25%2014.75V13.25H4.75V14.75H11.25Z'%20fill='%2300112C'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
|
|
19
20
|
function k(o) {
|
|
20
21
|
return (o == null ? void 0 : o.toString()) ?? "";
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function Oe(o, t = 12) {
|
|
23
24
|
return k(o).length >= t;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function Se(o) {
|
|
26
27
|
return /[a-z]/.test(k(o));
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
+
function Ue(o) {
|
|
29
30
|
return /[A-Z]/.test(k(o));
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
+
function Ae(o) {
|
|
32
33
|
return /\d/.test(k(o));
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
+
function Be(o) {
|
|
35
36
|
return /[^a-zA-Z0-9]/.test(k(o));
|
|
36
37
|
}
|
|
37
|
-
const
|
|
38
|
+
const qe = {
|
|
38
39
|
"en-US": {
|
|
39
40
|
capsLockEnabled: "Caps lock on",
|
|
40
41
|
hidePassword: "Hide",
|
|
@@ -74,11 +75,12 @@ const Ae = {
|
|
|
74
75
|
validationSuggestion: "Evite símbolos de moeda ou letras acentuadas.",
|
|
75
76
|
validationTitle: "A senha deve conter pelo menos:"
|
|
76
77
|
}
|
|
77
|
-
},
|
|
78
|
-
i18n: { messages:
|
|
79
|
-
name: "bento-input-field-password"
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
}, Z = 12, z = 500, X = 2e3, G = 2e3, Me = {
|
|
79
|
+
i18n: { messages: qe },
|
|
80
|
+
name: "bento-input-field-password",
|
|
81
|
+
model: { prop: "modelValue" }
|
|
82
|
+
}, Ne = /* @__PURE__ */ ue({
|
|
83
|
+
...Me,
|
|
82
84
|
props: {
|
|
83
85
|
description: { default: null },
|
|
84
86
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -90,23 +92,24 @@ const Ae = {
|
|
|
90
92
|
required: { type: Boolean, default: !1 },
|
|
91
93
|
tooltipText: { default: null },
|
|
92
94
|
condensed: { default: !1 },
|
|
93
|
-
debounceTime: { default:
|
|
95
|
+
debounceTime: { default: z },
|
|
94
96
|
disableValidation: { type: Boolean, default: !1 },
|
|
95
97
|
value: { default: void 0 },
|
|
98
|
+
modelValue: { default: void 0 },
|
|
96
99
|
validation: { default: void 0 },
|
|
97
100
|
withHint: { type: Boolean, default: !0 }
|
|
98
101
|
},
|
|
99
|
-
emits: ["blur", "focus", "input:valid", "input:error", "input"],
|
|
102
|
+
emits: ["blur", "focus", "input:valid", "input:error", "input", "update:model-value"],
|
|
100
103
|
setup(o, { emit: t }) {
|
|
101
|
-
const a = o, { t: e, n: d } =
|
|
102
|
-
|
|
103
|
-
const { focused: q } =
|
|
104
|
+
const a = o, { t: e, n: d } = Re(), v = ce(), b = n(g.PASSWORD), c = n(a.modelValue ?? a.value), O = n(!1), S = n(!1), w = n([]), L = n({}), p = n(null), f = n(!1), U = n(null), A = n(null), J = n(null), R = n(!1);
|
|
105
|
+
pe(Ie, "bento-input-field-password");
|
|
106
|
+
const { focused: B } = ye(U), { emitValue: q } = Ee(t), K = Q("validationListId"), M = Q("validationPopoverId"), N = u(() => b.value === g.TEXT), Y = u(
|
|
104
107
|
() => w.value.map(
|
|
105
108
|
(i) => i ? "b-input-field-password__validation-list--valid" : "b-input-field-password__validation-list--invalid"
|
|
106
109
|
)
|
|
107
|
-
),
|
|
110
|
+
), $ = u(
|
|
108
111
|
() => p.value ? "b-input-field-password__input-tooltip--timed" : ""
|
|
109
|
-
),
|
|
112
|
+
), j = u(() => ({
|
|
110
113
|
ariaHidden: !1,
|
|
111
114
|
condensed: a.condensed,
|
|
112
115
|
disabled: a.disabled,
|
|
@@ -117,119 +120,124 @@ const Ae = {
|
|
|
117
120
|
required: a.required,
|
|
118
121
|
tooltipText: a.tooltipText,
|
|
119
122
|
type: b.value,
|
|
120
|
-
|
|
123
|
+
modelValue: c.value,
|
|
121
124
|
"aria-haspopup": I.value ? "dialog" : !1,
|
|
122
|
-
"aria-describedby": I.value ?
|
|
125
|
+
"aria-describedby": I.value ? M : "",
|
|
123
126
|
...v
|
|
124
127
|
})), E = u(() => {
|
|
125
|
-
var m, h,
|
|
128
|
+
var m, h, l, C, y, x;
|
|
126
129
|
if (a.validation && !a.validation.extendDefaultValidation)
|
|
127
130
|
return a.validation;
|
|
128
131
|
const i = [
|
|
129
132
|
{
|
|
130
|
-
label: e("validationMinLength", { numberOfCharacters: d(
|
|
133
|
+
label: e("validationMinLength", { numberOfCharacters: d(Z) }),
|
|
131
134
|
key: _.MIN_LENGTH,
|
|
132
|
-
validate:
|
|
135
|
+
validate: Oe
|
|
133
136
|
},
|
|
134
137
|
{
|
|
135
138
|
label: e("validationRequireLowercase", { numberOne: d(1) }),
|
|
136
139
|
key: _.REQUIRE_LOWERCASE,
|
|
137
|
-
validate:
|
|
140
|
+
validate: Se
|
|
138
141
|
},
|
|
139
142
|
{
|
|
140
143
|
label: e("validationRequireUppercase", { numberOne: d(1) }),
|
|
141
144
|
key: _.REQUIRE_UPPERCASE,
|
|
142
|
-
validate:
|
|
145
|
+
validate: Ue
|
|
143
146
|
},
|
|
144
147
|
{
|
|
145
148
|
label: e("validationRequireNumeric", { numberOne: d(1) }),
|
|
146
149
|
key: _.REQUIRE_NUMERIC,
|
|
147
|
-
validate:
|
|
150
|
+
validate: Ae
|
|
148
151
|
},
|
|
149
152
|
{
|
|
150
153
|
label: e("validationRequireSpecialCharacter", { numberOne: d(1) }),
|
|
151
154
|
key: _.REQUIRE_SPECIAL_CHARACTER,
|
|
152
|
-
validate:
|
|
155
|
+
validate: Be
|
|
153
156
|
}
|
|
154
157
|
];
|
|
155
158
|
let s = i;
|
|
156
159
|
if (a.validation) {
|
|
157
|
-
const ne = i.map((r) => r.key),
|
|
160
|
+
const ne = i.map((r) => r.key), V = (h = (m = a.validation) == null ? void 0 : m.list) == null ? void 0 : h.map((r) => r.key), re = ((C = (l = a.validation) == null ? void 0 : l.list) == null ? void 0 : C.filter((r) => !ne.includes(r.key))) ?? [];
|
|
158
161
|
s = [...i.map((r) => {
|
|
159
|
-
var
|
|
160
|
-
return
|
|
161
|
-
}), ...
|
|
162
|
+
var D, W;
|
|
163
|
+
return V != null && V.includes(r.key) ? (W = (D = a.validation) == null ? void 0 : D.list) == null ? void 0 : W.find((de) => de.key === r.key) : r;
|
|
164
|
+
}), ...re];
|
|
162
165
|
}
|
|
163
166
|
return {
|
|
164
|
-
title: ((
|
|
167
|
+
title: ((y = a.validation) == null ? void 0 : y.title) ?? e("validationTitle"),
|
|
165
168
|
suggestion: ((x = a.validation) == null ? void 0 : x.suggestion) ?? e("validationSuggestion"),
|
|
166
169
|
list: s
|
|
167
170
|
};
|
|
168
|
-
}),
|
|
171
|
+
}), H = u(() => {
|
|
169
172
|
var i, s;
|
|
170
173
|
return (s = (i = E.value) == null ? void 0 : i.list) == null ? void 0 : s.filter((m) => !m.disabled);
|
|
171
|
-
}),
|
|
174
|
+
}), F = u(() => {
|
|
172
175
|
var i;
|
|
173
176
|
return (i = w.value) == null ? void 0 : i.some((s) => !s);
|
|
174
177
|
}), I = u(
|
|
175
178
|
() => {
|
|
176
179
|
var i, s;
|
|
177
|
-
return
|
|
180
|
+
return A.value && ((s = (i = E.value) == null ? void 0 : i.list) == null ? void 0 : s.length) > 0;
|
|
178
181
|
}
|
|
179
|
-
),
|
|
182
|
+
), ee = (i) => {
|
|
180
183
|
typeof i.getModifierState == "function" && (R.value = i.getModifierState("CapsLock"));
|
|
181
|
-
},
|
|
182
|
-
|
|
183
|
-
},
|
|
184
|
-
a.disabled || (c.value = i,
|
|
185
|
-
}, te = () => {
|
|
186
|
-
t("focus");
|
|
184
|
+
}, ae = () => {
|
|
185
|
+
N.value ? b.value = g.PASSWORD : b.value = g.TEXT;
|
|
186
|
+
}, te = (i) => {
|
|
187
|
+
a.disabled || (c.value = i, q(c.value));
|
|
187
188
|
}, ie = () => {
|
|
189
|
+
t("focus");
|
|
190
|
+
}, oe = () => {
|
|
188
191
|
t("blur");
|
|
189
192
|
}, T = (i) => {
|
|
190
193
|
var h;
|
|
191
|
-
const s = (h =
|
|
192
|
-
key:
|
|
193
|
-
label:
|
|
194
|
-
isValid:
|
|
194
|
+
const s = (h = H.value) == null ? void 0 : h.map((l) => ({
|
|
195
|
+
key: l.key,
|
|
196
|
+
label: l.label,
|
|
197
|
+
isValid: l.validate(i, ...l.additionalArgs ?? [])
|
|
195
198
|
}));
|
|
196
199
|
let m = 1;
|
|
197
|
-
w.value = s == null ? void 0 : s.map((
|
|
198
|
-
const
|
|
200
|
+
w.value = s == null ? void 0 : s.map((l) => l.isValid), L.value = s == null ? void 0 : s.filter((l) => !l.isValid).reduce((l, C) => {
|
|
201
|
+
const y = C.key ?? `custom-rule-${m++}`;
|
|
199
202
|
return {
|
|
200
|
-
...
|
|
201
|
-
[
|
|
203
|
+
...l,
|
|
204
|
+
[y]: C.label
|
|
202
205
|
};
|
|
203
206
|
}, {});
|
|
204
|
-
}, oe = () => {
|
|
205
|
-
f.value = !1, p.value = null;
|
|
206
207
|
}, se = () => {
|
|
208
|
+
f.value = !1, p.value = null;
|
|
209
|
+
}, le = () => {
|
|
207
210
|
f.value = !0;
|
|
208
211
|
};
|
|
209
|
-
return
|
|
210
|
-
() => a.value,
|
|
211
|
-
(
|
|
212
|
-
c.value =
|
|
212
|
+
return P(
|
|
213
|
+
() => [a.value, a.modelValue],
|
|
214
|
+
() => {
|
|
215
|
+
c.value = a.modelValue ?? a.value;
|
|
213
216
|
}
|
|
214
|
-
),
|
|
215
|
-
i || (
|
|
216
|
-
}),
|
|
217
|
+
), P(B, (i) => {
|
|
218
|
+
i || (S.value = !0), a.disableValidation || (a.withHint && (O.value = i), T(c.value));
|
|
219
|
+
}), P(R, (i) => {
|
|
217
220
|
i ? (f.value = !0, p.value = setTimeout(() => {
|
|
218
221
|
p.value = null, f.value = !1;
|
|
219
|
-
},
|
|
220
|
-
}),
|
|
222
|
+
}, G)) : (clearTimeout(p.value), p.value = null, f.value = !1);
|
|
223
|
+
}), Le(
|
|
221
224
|
c,
|
|
222
225
|
(i) => {
|
|
223
|
-
T(i),
|
|
226
|
+
T(i), F.value ? t("input:error", L.value) : t("input:valid");
|
|
224
227
|
},
|
|
225
228
|
// wait for 0.5s before checking validity OR 2s of continuous typing
|
|
226
|
-
{ debounce: a.debounceTime, maxWait:
|
|
227
|
-
),
|
|
229
|
+
{ debounce: a.debounceTime, maxWait: X }
|
|
230
|
+
), a.value && be(
|
|
231
|
+
'BentoInputFieldPassword "value" property',
|
|
232
|
+
`The use of "value" prop in "BentoInputFieldPassword" is no longer supported.
|
|
233
|
+
Use the "v-model" or "model-value" property instead.`,
|
|
234
|
+
"2.0.0"
|
|
235
|
+
), { __sfc: !0, MIN_PASSWORD_LENGTH: Z, DEBOUNCE_DURATION: z, DEBOUNCE_MAX_WAIT: X, TOOLTIP_TIMEOUT: G, t: e, n: d, props: a, emit: t, attrs: v, inputType: b, inputValue: c, isHintDisplayed: O, isTouched: S, passwordValidity: w, errorsList: L, capsLockTooltipTimeoutID: p, isTooltipDisplayed: f, inputFieldPasswordRef: U, inputFieldPasswordInputRef: A, inputFieldPasswordCapsLockIconRef: J, isCapsLockOn: R, focused: B, emitValue: q, validationListId: K, validationPopoverId: M, isPasswordReadable: N, passwordValidityConditionalClass: Y, tooltipConditionalClass: $, inputFieldArgs: j, computedValidations: E, computedValidationList: H, hasErrors: F, hasValidations: I, checkCapsLock: ee, toggleInputType: ae, onUpdateModelValue: te, onFocus: ie, onBlur: oe, checkValidity: T, handleCapsLockMouseLeave: se, handleCapsLockMouseEnter: le, BentoButton: ve, BentoImage: fe, BentoInputField: me, BentoPopover: _e, BentoTypography: he, Tooltip: Te, CheckmarkCircleFillIcon: Ce, DotIcon: ge, HideIcon: we, ShowIcon: ke, CapsLockIcon: Pe };
|
|
228
236
|
}
|
|
229
237
|
});
|
|
230
|
-
var
|
|
238
|
+
var He = function() {
|
|
231
239
|
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
232
|
-
return a("div", { ref: "inputFieldPasswordRef" }, [a(e.BentoInputField, t._b({ ref: "inputFieldPasswordInputRef", staticClass: "b-input-field-password__input", attrs: { spellcheck: "false" }, on: { blur: e.onBlur, focus: e.onFocus,
|
|
240
|
+
return a("div", { ref: "inputFieldPasswordRef" }, [a(e.BentoInputField, t._b({ ref: "inputFieldPasswordInputRef", staticClass: "b-input-field-password__input", attrs: { spellcheck: "false" }, on: { blur: e.onBlur, focus: e.onFocus, "update:model-value": e.onUpdateModelValue, keydown: e.checkCapsLock, keyup: e.checkCapsLock }, scopedSlots: t._u([t.description ? { key: "description", fn: function() {
|
|
233
241
|
return [t._t("description", function() {
|
|
234
242
|
return [t._v(t._s(t.description))];
|
|
235
243
|
})];
|
|
@@ -242,21 +250,21 @@ var Be = function() {
|
|
|
242
250
|
}, proxy: !0 }], null, !0) }, "bento-input-field", e.inputFieldArgs, !1), [t.label ? [t._v(t._s(t.label))] : [t._t("default")]], 2), e.hasValidations ? a(e.BentoPopover, { attrs: { open: e.isHintDisplayed, "target-element": e.inputFieldPasswordInputRef, "disable-focus-trap": !0, "aria-label": e.computedValidations.title, "aria-describedby": e.validationListId, position: "right-start" } }, [a("div", { attrs: { id: e.validationPopoverId } }, [e.computedValidations.title ? a(e.BentoTypography, { staticClass: "b-input-field-password__validation-title" }, [t._v(" " + t._s(e.computedValidations.title) + " ")]) : t._e(), e.hasErrors ? t._e() : a("p", { staticClass: "b-input-field-password__validation-status--valid", attrs: { role: "alert" } }, [t._v(" " + t._s(e.t("validationValid")) + " ")]), a("ul", { staticClass: "b-input-field-password__validation-list", attrs: { id: e.validationListId } }, t._l(e.computedValidationList, function(d, v) {
|
|
243
251
|
return a("li", { key: v, class: e.passwordValidityConditionalClass[v], attrs: { "aria-live": "polite", "aria-atomic": "true" } }, [a("span", { staticClass: "b-input-field-password__validation-list-icon" }, [e.passwordValidity[v] ? a(e.CheckmarkCircleFillIcon, { attrs: { "svg-title": e.t("validationChecked") } }) : a(e.DotIcon, { attrs: { "svg-title": e.t("validationUnchecked") } })], 1), a(e.BentoTypography, { staticClass: "b-input-field-password__validation-list-text", attrs: { el: "span" } }, [t._v(" " + t._s(d.label) + " ")])], 1);
|
|
244
252
|
}), 0), e.computedValidations.suggestion ? a(e.BentoTypography, { staticClass: "b-input-field-password__validation-suggestion" }, [t._v(" " + t._s(e.computedValidations.suggestion) + " ")]) : t._e()], 1)]) : t._e()], 1);
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
253
|
+
}, Fe = [], xe = /* @__PURE__ */ Ve(
|
|
254
|
+
Ne,
|
|
255
|
+
He,
|
|
256
|
+
Fe,
|
|
249
257
|
!1,
|
|
250
258
|
null,
|
|
251
|
-
"
|
|
259
|
+
"57349ba0"
|
|
252
260
|
);
|
|
253
|
-
const
|
|
261
|
+
const la = xe.exports;
|
|
254
262
|
export {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
263
|
+
Ue as a,
|
|
264
|
+
Ae as b,
|
|
265
|
+
Be as c,
|
|
266
|
+
la as i,
|
|
267
|
+
Oe as m,
|
|
268
|
+
Se as r
|
|
261
269
|
};
|
|
262
|
-
//# sourceMappingURL=input-field-password.
|
|
270
|
+
//# sourceMappingURL=input-field-password.uhQuUzyj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-field-password.uhQuUzyj.js","sources":["../../src/components/input-field-password/input-field-password.types.ts","../../src/components/input-field-password/assets/capslock.svg","../../src/components/input-field-password/utilities/input-field-password.validation.ts","../../src/components/input-field-password/input-field-password.vue"],"sourcesContent":["import type { BentoInputFieldProps, BentoInputFieldValue } from '@/components/input-field/input-field.types';\nimport { type FormField } from '../../types/form-field';\n\n/**\n * Public\n */\n\nexport interface BentoInputFieldPasswordValidationListItem {\n label?: string;\n key?: BentoInputFieldPasswordDefaultRuleKeys | string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n validate?: (value: BentoInputFieldValue, ...args: Array<any>) => boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n additionalArgs?: Array<any>;\n disabled?: boolean;\n}\n\nexport type BentoInputFieldPasswordDefaultRuleKeys =\n | 'minLength'\n | 'requireLowercase'\n | 'requireNumeric'\n | 'requireSpecialCharacter'\n | 'requireUppercase';\n\nexport type BentoInputFieldPasswordErrorsList = Record<BentoInputFieldPasswordDefaultRuleKeys | string, string>;\n\nexport interface BentoInputFieldPasswordValidation {\n title?: string;\n suggestion?: string;\n extendDefaultValidation?: boolean;\n list: Array<BentoInputFieldPasswordValidationListItem>;\n}\n\nexport interface BentoInputFieldPasswordProps extends FormField {\n /**\n * Reduces height of the input\n */\n condensed?: BentoInputFieldProps['condensed'];\n\n /**\n * The debounce time in milliseconds for running validation and emitting the `input` event after the user has stopped typing.\n * This helps to avoid excessive validation checks on every keystroke. Defaults to `500`.\n */\n debounceTime?: number;\n\n /**\n * Performs real-time validations over the input value. Default: `false`.\n * Disabling the option (set to `true`) will not run pre-defined validations or custom validations defined in the `validation` field.\n */\n disableValidation?: boolean;\n\n /**\n * Text displayed as the value of the input-field\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n */\n value?: BentoInputFieldProps['value'];\n\n /**\n * Text displayed as the value of the input-field\n */\n modelValue?: BentoInputFieldProps['modelValue'];\n\n /**\n * Configuration object for password field validation.\n *\n * This object defines the validation criteria and associated messages for a password field.\n * It includes the following properties:\n *\n * - `title`: The title displayed at the top of the validation hint.\n * - `suggestion`: The message displayed at the bottom of the validation hint, providing additional guidance.\n * - `extendDefaultValidation`: Set to true if you want to add your custom rules to the default validation instead of overriding the list.\n * - `list`: An array of callback functions to be executed on the value after each user input, validating the password against the specified rules.\n *\n * By default, the validation checks that:\n *\n * - The value has a minimum length of 12 characters.\n * - The value contains at least one lowercase letter.\n * - The value contains at least one uppercase letter.\n * - The value contains at least one numeric digit.\n * - The value contains at least one special character.\n *\n *\n */\n validation?: BentoInputFieldPasswordValidation;\n\n /**\n * Whether the password validation hint is displayed when the input field is activated via focus or input\n */\n withHint?: boolean;\n}\n\n/**\n * Private\n */\n\nexport enum BentoInputFieldPasswordType {\n TEXT = 'text',\n PASSWORD = 'password',\n}\n\nexport enum BentoInputFieldPasswordDefaultRule {\n MIN_LENGTH = 'minLength',\n REQUIRE_LOWERCASE = 'requireLowercase',\n REQUIRE_NUMERIC = 'requireNumeric',\n REQUIRE_SPECIAL_CHARACTER = 'requireSpecialCharacter',\n REQUIRE_UPPERCASE = 'requireUppercase',\n}\n","export default \"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='capslock'%3e%3cg%20id='Union'%3e%3cpath%20d='M13.75%205.63952L8%201.03952L2.25%205.63952V7.74999H4.75V11.75H11.25V7.74999H13.75V5.63952ZM6.25%206.24999H3.88809L8%202.96046L12.1119%206.24999H9.75V10.25H6.25V6.24999Z'%20fill='%2300112C'/%3e%3cpath%20d='M11.25%2014.75V13.25H4.75V14.75H11.25Z'%20fill='%2300112C'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e\"","import { type BentoInputFieldValue } from '@/components/input-field';\n\nfunction stringifyValue(value: BentoInputFieldValue): string {\n return value?.toString() ?? '';\n}\n\n/**\n * Validates if the length of the provided value is greater than or equal to the specified length.\n *\n * @param value - The input value to check.\n * @param length - The minimum required length of the value. Defaults to 12.\n * @returns `true` if the length of the value is greater than or equal to the specified length, `false` otherwise.\n */\nexport function minLength(value: BentoInputFieldValue, length = 12): boolean {\n return stringifyValue(value).length >= length;\n}\n\n/**\n * Validates if the provided value contains at least one lowercase letter.\n *\n * @param value - The input value to check.\n * @returns `true` if the value contains at least one lowercase letter, `false` otherwise.\n */\nexport function requireLowercase(value: BentoInputFieldValue): boolean {\n return /[a-z]/.test(stringifyValue(value));\n}\n\n/**\n * Validates if the provided value contains at least one uppercase letter.\n *\n * @param value - The input value to check.\n * @returns `true` if the value contains at least one uppercase letter, `false` otherwise.\n */\nexport function requireUppercase(value: BentoInputFieldValue): boolean {\n return /[A-Z]/.test(stringifyValue(value));\n}\n\n/**\n * Validates if the provided value contains at least one numerical digit.\n *\n * @param value - The input value to check.\n * @returns `true` if the value contains at least one numerical digit, `false` otherwise.\n */\nexport function requireNumeric(value: BentoInputFieldValue): boolean {\n return /\\d/.test(stringifyValue(value));\n}\n\n/**\n * Validates if the provided value contains at least one special character (non-alphanumeric).\n *\n * @param value - The input value to check.\n * @returns `true` if the value contains at least one special character, `false` otherwise.\n */\nexport function requireSpecialCharacter(value: BentoInputFieldValue): boolean {\n return /[^a-zA-Z0-9]/.test(stringifyValue(value));\n}\n","<template>\n <div ref=\"inputFieldPasswordRef\">\n <bento-input-field\n ref=\"inputFieldPasswordInputRef\"\n v-bind=\"inputFieldArgs\"\n class=\"b-input-field-password__input\"\n spellcheck=\"false\"\n @blur=\"onBlur\"\n @focus=\"onFocus\"\n @update:model-value=\"onUpdateModelValue\"\n @keydown=\"checkCapsLock\"\n @keyup=\"checkCapsLock\"\n >\n <template v-if=\"label\">{{ label }}</template>\n <template v-else><slot /></template>\n <template v-if=\"description\" #description>\n <slot name=\"description\">{{ description }}</slot>\n </template>\n\n <template v-if=\"isCapsLockOn\" #iconBefore>\n <div\n class=\"b-input-field-password__caps-lock-indicator\"\n @mouseenter=\"handleCapsLockMouseEnter\"\n @mouseleave=\"handleCapsLockMouseLeave\"\n >\n <bento-image\n ref=\"inputFieldPasswordCapsLockIconRef\"\n :src=\"CapsLockIcon\"\n :alt=\"t('capsLockEnabled')\"\n />\n </div>\n\n <tooltip\n v-if=\"inputFieldPasswordCapsLockIconRef\"\n :class=\"tooltipConditionalClass\"\n :content=\"t('capsLockEnabled')\"\n :disabled-focus-trap=\"true\"\n :fallback-position=\"['top', 'bottom']\"\n :is-shown=\"isTooltipDisplayed\"\n :target-element=\"inputFieldPasswordCapsLockIconRef\"\n />\n </template>\n\n <template v-if=\"!disabled\" #iconAfter>\n <bento-button variant=\"tertiary\" @click=\"toggleInputType\">\n <template #iconLeft>\n <show-icon v-if=\"!isPasswordReadable\" :svg-title=\"t('showPassword')\" />\n <hide-icon v-if=\"isPasswordReadable\" :svg-title=\"t('hidePassword')\" />\n </template>\n </bento-button>\n </template>\n </bento-input-field>\n\n <bento-popover\n v-if=\"hasValidations\"\n :open=\"isHintDisplayed\"\n :target-element=\"inputFieldPasswordInputRef\"\n :disable-focus-trap=\"true\"\n :aria-label=\"computedValidations.title\"\n :aria-describedby=\"validationListId\"\n position=\"right-start\"\n >\n <div :id=\"validationPopoverId\">\n <bento-typography v-if=\"computedValidations.title\" class=\"b-input-field-password__validation-title\">\n {{ computedValidations.title }}\n </bento-typography>\n\n <p v-if=\"!hasErrors\" class=\"b-input-field-password__validation-status--valid\" role=\"alert\">\n {{ t('validationValid') }}\n </p>\n\n <ul :id=\"validationListId\" class=\"b-input-field-password__validation-list\">\n <li\n v-for=\"(rule, index) in computedValidationList\"\n :key=\"index\"\n :class=\"passwordValidityConditionalClass[index]\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n <span class=\"b-input-field-password__validation-list-icon\">\n <checkmark-circle-fill-icon\n v-if=\"passwordValidity[index]\"\n :svg-title=\"t('validationChecked')\"\n />\n\n <dot-icon v-else :svg-title=\"t('validationUnchecked')\" />\n </span>\n\n <bento-typography class=\"b-input-field-password__validation-list-text\" el=\"span\">\n {{ rule.label }}\n </bento-typography>\n </li>\n </ul>\n\n <bento-typography\n v-if=\"computedValidations.suggestion\"\n class=\"b-input-field-password__validation-suggestion\"\n >\n {{ computedValidations.suggestion }}\n </bento-typography>\n </div>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoButton } from '@/components/button';\n import { BentoImage } from '@/components/image';\n import { BentoInputField } from '@/components/input-field';\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '@/components/typography';\n import { Tooltip } from '@/internal';\n import type { BentoInputFieldProps } from '@/components/input-field/input-field.types';\n import {\n BentoInputFieldPasswordDefaultRule,\n type BentoInputFieldPasswordErrorsList,\n type BentoInputFieldPasswordProps,\n BentoInputFieldPasswordType,\n type BentoInputFieldPasswordValidation,\n type BentoInputFieldPasswordValidationListItem,\n } from './input-field-password.types';\n import CheckmarkCircleFillIcon from '@adyen/ui-assets-icons-16/vue/checkmark-circle-fill';\n import DotIcon from '@adyen/ui-assets-icons-16/vue/dot';\n import HideIcon from '@adyen/ui-assets-icons-16/vue/hide';\n import ShowIcon from '@adyen/ui-assets-icons-16/vue/show';\n import CapsLockIcon from './assets/capslock.svg';\n\n import { useFocusWithin, watchDebounced } from '@vueuse/core';\n import { computed, provide, ref, type SetupContext, useAttrs, watch } from 'vue';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import {\n minLength,\n requireLowercase,\n requireNumeric,\n requireSpecialCharacter,\n requireUppercase,\n } from '@/components/input-field-password/utilities/input-field-password.validation';\n import { generateUid } from '@/core/utils/ts';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n import messages from './messages.json';\n import { INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n description: { default: null },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n label: { default: null },\n optional: { type: Boolean, default: false },\n placeholder: { default: '' },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n condensed: { default: false },\n debounceTime: { default: DEBOUNCE_DURATION },\n disableValidation: { type: Boolean, default: false },\n value: { default: undefined },\n modelValue: { default: undefined },\n validation: { default: undefined },\n withHint: { type: Boolean, default: true }\n});\n\n const emit = defineEmits([\"blur\", \"focus\", \"input:valid\", \"input:error\", \"input\", \"update:model-value\"]);\n\n const attrs = useAttrs();\n\n const inputType = ref(BentoInputFieldPasswordType.PASSWORD);\n const inputValue = ref(props.modelValue ?? props.value);\n const isHintDisplayed = ref(false);\n const isTouched = ref(false);\n const passwordValidity = ref<Array<boolean>>([]);\n const errorsList = ref<BentoInputFieldPasswordErrorsList>({});\n const capsLockTooltipTimeoutID = ref<ReturnType<typeof setTimeout>>(null);\n const isTooltipDisplayed = ref(false);\n const inputFieldPasswordRef = ref(null);\n const inputFieldPasswordInputRef = ref(null);\n const inputFieldPasswordCapsLockIconRef = ref(null);\n const isCapsLockOn = ref(false);\n\n provide(INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY, 'bento-input-field-password');\n\n const { focused } = useFocusWithin(inputFieldPasswordRef);\n\n const { emitValue } = useFormFieldEmits<BentoInputFieldPasswordProps['modelValue']>(emit);\n\n const validationListId = generateUid('validationListId');\n const validationPopoverId = generateUid('validationPopoverId');\n\n const isPasswordReadable = computed(() => inputType.value === BentoInputFieldPasswordType.TEXT);\n\n const passwordValidityConditionalClass = computed(() =>\n passwordValidity.value.map(validity =>\n validity\n ? 'b-input-field-password__validation-list--valid'\n : 'b-input-field-password__validation-list--invalid'\n )\n );\n\n const tooltipConditionalClass = computed(() =>\n capsLockTooltipTimeoutID.value ? 'b-input-field-password__input-tooltip--timed' : ''\n );\n\n const inputFieldArgs = computed<BentoInputFieldProps & SetupContext['attrs']>(() => ({\n ariaHidden: false,\n condensed: props.condensed,\n disabled: props.disabled,\n errorMessage: props.errorMessage,\n optional: props.optional,\n placeholder: props.placeholder,\n readonly: props.readonly,\n required: props.required,\n tooltipText: props.tooltipText,\n type: inputType.value,\n modelValue: inputValue.value,\n\n 'aria-haspopup': hasValidations.value ? 'dialog' : false,\n 'aria-describedby': hasValidations.value ? validationPopoverId : '',\n\n ...attrs,\n }));\n\n const computedValidations = computed<BentoInputFieldPasswordValidation>(() => {\n if (props.validation && !props.validation.extendDefaultValidation) {\n return props.validation;\n }\n\n const defaultValidationList = [\n {\n label: t('validationMinLength', { numberOfCharacters: n(MIN_PASSWORD_LENGTH) }),\n key: BentoInputFieldPasswordDefaultRule.MIN_LENGTH,\n validate: minLength,\n },\n {\n label: t('validationRequireLowercase', { numberOne: n(1) }),\n key: BentoInputFieldPasswordDefaultRule.REQUIRE_LOWERCASE,\n validate: requireLowercase,\n },\n {\n label: t('validationRequireUppercase', { numberOne: n(1) }),\n key: BentoInputFieldPasswordDefaultRule.REQUIRE_UPPERCASE,\n validate: requireUppercase,\n },\n {\n label: t('validationRequireNumeric', { numberOne: n(1) }),\n key: BentoInputFieldPasswordDefaultRule.REQUIRE_NUMERIC,\n validate: requireNumeric,\n },\n {\n label: t('validationRequireSpecialCharacter', { numberOne: n(1) }),\n key: BentoInputFieldPasswordDefaultRule.REQUIRE_SPECIAL_CHARACTER,\n validate: requireSpecialCharacter,\n },\n ];\n\n let validationList: Array<BentoInputFieldPasswordValidationListItem> = defaultValidationList;\n\n if (props.validation) {\n const defaultValidationKeys: Array<string> = defaultValidationList.map(rule => rule.key);\n const customRuleKeys = props.validation?.list?.map(rule => rule.key);\n // remove from the custom list any rules with default keys (rules that are overriding existent rules)\n const customValidationList =\n props.validation?.list?.filter(rule => !defaultValidationKeys.includes(rule.key)) ?? [];\n\n // loop through the default list and replace default rule with the custom rule if it exists\n const validationListWithOverrides = defaultValidationList.map(rule => {\n if (customRuleKeys?.includes(rule.key)) {\n const customRule = props.validation?.list?.find(customRule => customRule.key === rule.key);\n return customRule;\n } else {\n return rule;\n }\n });\n validationList = [...validationListWithOverrides, ...customValidationList];\n }\n\n return {\n title: props.validation?.title ?? t('validationTitle'),\n suggestion: props.validation?.suggestion ?? t('validationSuggestion'),\n list: validationList,\n };\n });\n\n const computedValidationList = computed(() => computedValidations.value?.list?.filter(rule => !rule.disabled));\n\n const hasErrors = computed(() => passwordValidity.value?.some(validation => !validation));\n const hasValidations = computed(\n () => inputFieldPasswordInputRef.value && computedValidations.value?.list?.length > 0\n );\n\n const checkCapsLock = (e: KeyboardEvent) => {\n // Check if getModifierState exists and is a function in case the user's browser is autofilling\n if (typeof e.getModifierState === 'function') {\n isCapsLockOn.value = e.getModifierState('CapsLock');\n }\n };\n\n const toggleInputType = () => {\n if (isPasswordReadable.value) {\n inputType.value = BentoInputFieldPasswordType.PASSWORD;\n } else {\n inputType.value = BentoInputFieldPasswordType.TEXT;\n }\n };\n\n const onUpdateModelValue = (value: string) => {\n if (props.disabled) {\n return;\n }\n\n inputValue.value = value;\n\n emitValue(inputValue.value);\n };\n\n const onFocus = () => {\n emit('focus');\n };\n\n const onBlur = () => {\n emit('blur');\n };\n\n const checkValidity = (value: BentoInputFieldPasswordProps['value']) => {\n const rulesValidityObj = computedValidationList.value?.map(validationItem => ({\n key: validationItem.key,\n label: validationItem.label,\n isValid: validationItem.validate(value, ...(validationItem.additionalArgs ?? [])),\n }));\n let customRuleIndex = 1;\n\n passwordValidity.value = rulesValidityObj?.map(error => error.isValid);\n\n errorsList.value = rulesValidityObj\n ?.filter(rule => !rule.isValid)\n .reduce((errorsObject, error) => {\n const key = error.key ?? `custom-rule-${customRuleIndex++}`;\n return {\n ...errorsObject,\n [key]: error.label,\n };\n }, {});\n };\n\n const handleCapsLockMouseLeave = () => {\n isTooltipDisplayed.value = false;\n capsLockTooltipTimeoutID.value = null;\n };\n\n const handleCapsLockMouseEnter = () => {\n isTooltipDisplayed.value = true;\n };\n\n watch(\n () => [props.value, props.modelValue],\n () => {\n inputValue.value = props.modelValue ?? props.value;\n }\n );\n\n watch(focused, focused => {\n // Always set dirty to true when blur occurs\n if (!focused) {\n isTouched.value = true;\n }\n\n // Disable validations & hint if \"disableValidation\" is \"true\"\n if (!props.disableValidation) {\n if (props.withHint) {\n isHintDisplayed.value = focused;\n }\n checkValidity(inputValue.value);\n }\n });\n\n watch(isCapsLockOn, isCapsLockOn => {\n if (!isCapsLockOn) {\n clearTimeout(capsLockTooltipTimeoutID.value);\n\n capsLockTooltipTimeoutID.value = null;\n isTooltipDisplayed.value = false;\n } else {\n isTooltipDisplayed.value = true;\n\n capsLockTooltipTimeoutID.value = setTimeout(() => {\n capsLockTooltipTimeoutID.value = null;\n isTooltipDisplayed.value = false;\n }, TOOLTIP_TIMEOUT);\n }\n });\n\n watchDebounced(\n inputValue,\n inputValue => {\n checkValidity(inputValue);\n\n if (!hasErrors.value) {\n emit('input:valid');\n } else {\n emit('input:error', errorsList.value);\n }\n },\n // wait for 0.5s before checking validity OR 2s of continuous typing\n { debounce: props.debounceTime, maxWait: DEBOUNCE_MAX_WAIT }\n );\n\n if (props.value) {\n deprecate(\n 'BentoInputFieldPassword \"value\" property',\n `The use of \"value\" prop in \"BentoInputFieldPassword\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n const MIN_PASSWORD_LENGTH = 12;\n const DEBOUNCE_DURATION = 500;\n const DEBOUNCE_MAX_WAIT = 2000;\n const TOOLTIP_TIMEOUT = 2000;\n\n /**\n * The input field password is a component designed to support users' preference for entering values securely.\n * This is an extension of the `bento-input-field` component.\n *\n * @example\n * import { BentoInputFieldPassword } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoInputFieldPassword },\n * template: `\n * <bento-input-field-password\n * label=\"Label\"\n * error-message=\"Error\"\n * :validation=\"{\n * extendDefaultValidation: true,\n * list: [\n * { label: '18 characters', key: 'minLength', validate: minLength, additionalArgs: [18] },\n * { label: 'Always true', key: 'alwaysTrue', validate: () => true },\n * { key: 'requireSpecialCharacter', disabled: true }\n * ],\n * }\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-input-field-password',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-field-password.scss\" />\n"],"names":["BentoInputFieldPasswordType","BentoInputFieldPasswordType2","BentoInputFieldPasswordDefaultRule","BentoInputFieldPasswordDefaultRule2","CapsLockIcon","stringifyValue","value","minLength","length","requireLowercase","requireUppercase","requireNumeric","requireSpecialCharacter","MIN_PASSWORD_LENGTH","DEBOUNCE_DURATION","DEBOUNCE_MAX_WAIT","TOOLTIP_TIMEOUT","__default__","messages","t","n","useI18n","attrs","useAttrs","inputType","ref","inputValue","props","isHintDisplayed","isTouched","passwordValidity","errorsList","capsLockTooltipTimeoutID","isTooltipDisplayed","inputFieldPasswordRef","inputFieldPasswordInputRef","inputFieldPasswordCapsLockIconRef","isCapsLockOn","provide","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","focused","useFocusWithin","emitValue","useFormFieldEmits","emit","validationListId","generateUid","validationPopoverId","isPasswordReadable","computed","passwordValidityConditionalClass","validity","tooltipConditionalClass","inputFieldArgs","hasValidations","computedValidations","defaultValidationList","validationList","defaultValidationKeys","rule","customRuleKeys","_b","_a","customValidationList","_d","_c","customRule2","_e","_f","computedValidationList","hasErrors","validation","checkCapsLock","e","toggleInputType","onUpdateModelValue","onFocus","onBlur","checkValidity","rulesValidityObj","validationItem","customRuleIndex","error","errorsObject","key","handleCapsLockMouseLeave","handleCapsLockMouseEnter","watch","focused2","isCapsLockOn2","watchDebounced","inputValue2","deprecate"],"mappings":";;;;;;;;;;;;;;;;;AA+FY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,aAAA,aACAA,EAAA,oBAAA,oBACAA,EAAA,kBAAA,kBACAA,EAAA,4BAAA,2BACAA,EAAA,oBAAA,oBALQA,IAAAD,KAAA,CAAA,CAAA;ACpGZ,MAAAE,KAAA;ACEA,SAAAC,EAAAC,GAAA;AACI,UAAAA,KAAA,gBAAAA,EA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