@adyen/bento-vue3 1.86.1 → 1.87.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 +12337 -12402
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/anchor-scroller.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/anchor-scroller.css +1 -1
- 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/checkbox-group.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/controls-group.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 -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/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/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/rich-text-editor.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.g7rM3wUc.js → action-bar.Ho_fXeXK.js} +4 -4
- package/dist/chunks/{action-bar.g7rM3wUc.js.map → action-bar.Ho_fXeXK.js.map} +1 -1
- package/dist/chunks/{ai-tag.UlRkq54l.js → ai-tag.DVCW-_vD.js} +2 -2
- package/dist/chunks/{ai-tag.UlRkq54l.js.map → ai-tag.DVCW-_vD.js.map} +1 -1
- package/dist/chunks/anchor-scroller.BctgW0se.js +214 -0
- package/dist/chunks/anchor-scroller.BctgW0se.js.map +1 -0
- package/dist/chunks/{base-modal.D5HrjwL1.js → base-modal.gZAtk-xP.js} +17 -17
- package/dist/chunks/{base-modal.D5HrjwL1.js.map → base-modal.gZAtk-xP.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.DBqA3Ws5.js → button-actions-with-menu.Tba1ME79.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.DBqA3Ws5.js.map → button-actions-with-menu.Tba1ME79.js.map} +1 -1
- package/dist/chunks/{button-actions.BH-J7dux.js → button-actions.BYBpjNqy.js} +182 -180
- package/dist/chunks/button-actions.BYBpjNqy.js.map +1 -0
- package/dist/chunks/{calendar.DzeJoNc2.js → calendar.vM3abC8y.js} +401 -410
- package/dist/chunks/calendar.vM3abC8y.js.map +1 -0
- package/dist/chunks/{card.DcXXdxWL.js → card.Cw63i7Ul.js} +2 -2
- package/dist/chunks/{card.DcXXdxWL.js.map → card.Cw63i7Ul.js.map} +1 -1
- package/dist/chunks/{checkbox-group.Bh_aqKoA.js → checkbox-group.ODQy-ICn.js} +42 -41
- package/dist/chunks/checkbox-group.ODQy-ICn.js.map +1 -0
- package/dist/chunks/{checkbox.7kpOXm-b.js → checkbox.C3Ewfygy.js} +79 -81
- package/dist/chunks/checkbox.C3Ewfygy.js.map +1 -0
- package/dist/chunks/{code-snippet.UIqVTv4U.js → code-snippet.Dl1MEedz.js} +4 -4
- package/dist/chunks/{code-snippet.UIqVTv4U.js.map → code-snippet.Dl1MEedz.js.map} +1 -1
- package/dist/chunks/constructNow.CIc7d13I.js +8 -0
- package/dist/chunks/{constructNow.B8T1ljs6.js.map → constructNow.CIc7d13I.js.map} +1 -1
- package/dist/chunks/{controls-group.Dip3WAKV.js → controls-group.Bu5lNTyH.js} +22 -28
- package/dist/chunks/controls-group.Bu5lNTyH.js.map +1 -0
- package/dist/chunks/{copy.ByyQlckP.js → copy.C_BCNHYQ.js} +3 -3
- package/dist/chunks/{copy.ByyQlckP.js.map → copy.C_BCNHYQ.js.map} +1 -1
- package/dist/chunks/{dashboard-section.CIHtXoeW.js → dashboard-section.CgoLquLP.js} +3 -3
- package/dist/chunks/{dashboard-section.CIHtXoeW.js.map → dashboard-section.CgoLquLP.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CLwPU-C2.js → dashed-underline.wbRHATeE.js} +3 -3
- package/dist/chunks/{dashed-underline.CLwPU-C2.js.map → dashed-underline.wbRHATeE.js.map} +1 -1
- package/dist/chunks/{data-grid-template.BTpSfkQt.js → data-grid-template.D40V1cmi.js} +3 -3
- package/dist/chunks/{data-grid-template.BTpSfkQt.js.map → data-grid-template.D40V1cmi.js.map} +1 -1
- package/dist/chunks/{data-grid.kEhur6r-.js → data-grid.KudN-TcY.js} +870 -867
- package/dist/chunks/{data-grid.kEhur6r-.js.map → data-grid.KudN-TcY.js.map} +1 -1
- package/dist/chunks/date-picker.D5B_SECc.js +251 -0
- package/dist/chunks/date-picker.D5B_SECc.js.map +1 -0
- package/dist/chunks/date-range-picker.CDDw_xl_.js +1104 -0
- package/dist/chunks/date-range-picker.CDDw_xl_.js.map +1 -0
- package/dist/chunks/{de.DvtL0g75.js → de.BJvo6njq.js} +2 -2
- package/dist/chunks/{de.DvtL0g75.js.map → de.BJvo6njq.js.map} +1 -1
- package/dist/chunks/{dialog-page.B3ptLXXP.js → dialog-page.C1KUI51V.js} +2 -2
- package/dist/chunks/{dialog-page.B3ptLXXP.js.map → dialog-page.C1KUI51V.js.map} +1 -1
- package/dist/chunks/{differenceInMonths.BR4Z2HIa.js → differenceInMonths.CIYECBxK.js} +7 -7
- package/dist/chunks/{differenceInMonths.BR4Z2HIa.js.map → differenceInMonths.CIYECBxK.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.B-_dTUVX.js → dropdown-default-textbox.CskseEho.js} +62 -60
- package/dist/chunks/dropdown-default-textbox.CskseEho.js.map +1 -0
- package/dist/chunks/{dropdown-tag.DDNOZhEG.js → dropdown-tag.CwSzUwa7.js} +3 -3
- package/dist/chunks/{dropdown-tag.DDNOZhEG.js.map → dropdown-tag.CwSzUwa7.js.map} +1 -1
- package/dist/chunks/{dropdown.CU6nfq3V.js → dropdown.Bdw2B-Cw.js} +9 -9
- package/dist/chunks/{dropdown.CU6nfq3V.js.map → dropdown.Bdw2B-Cw.js.map} +1 -1
- package/dist/chunks/{en-GB.DCGuCmAv.js → en-GB.C3-QUpva.js} +2 -2
- package/dist/chunks/{en-GB.DCGuCmAv.js.map → en-GB.C3-QUpva.js.map} +1 -1
- package/dist/chunks/{en-US.BZii9jNW.js → en-US.YeSsZuOc.js} +150 -100
- package/dist/chunks/en-US.YeSsZuOc.js.map +1 -0
- package/dist/chunks/error-message.oGiefI2-.js +155 -0
- package/dist/chunks/error-message.oGiefI2-.js.map +1 -0
- package/dist/chunks/{es.bz0mzkMq.js → es.DyUjjSL8.js} +2 -2
- package/dist/chunks/{es.bz0mzkMq.js.map → es.DyUjjSL8.js.map} +1 -1
- package/dist/chunks/{file-uploader.Q2ufNRTY.js → file-uploader.BnmNI1O7.js} +573 -548
- package/dist/chunks/file-uploader.BnmNI1O7.js.map +1 -0
- package/dist/chunks/{filter-bar.CkYOjRAa.js → filter-bar.xwfVuZw4.js} +1973 -2062
- package/dist/chunks/filter-bar.xwfVuZw4.js.map +1 -0
- package/dist/chunks/{focus-trap.CBvh2H_m.js → focus-trap.BxCwzLqN.js} +2 -2
- package/dist/chunks/{focus-trap.CBvh2H_m.js.map → focus-trap.BxCwzLqN.js.map} +1 -1
- package/dist/chunks/{footer-actions.DLzMOB7j.js → footer-actions.Ck6UztD8.js} +2 -2
- package/dist/chunks/{footer-actions.DLzMOB7j.js.map → footer-actions.Ck6UztD8.js.map} +1 -1
- package/dist/chunks/form-layout-title.CQfeGyVw.js +232 -0
- package/dist/chunks/{form-layout-title.DYmTc6M7.js.map → form-layout-title.CQfeGyVw.js.map} +1 -1
- package/dist/chunks/{match.CMBZxEs9.js → fr.JD_4GwS8.js} +98 -61
- package/dist/chunks/fr.JD_4GwS8.js.map +1 -0
- package/dist/chunks/{header-meta.Bw8ZGwJW.js → header-meta.lGt3HsyH.js} +108 -114
- package/dist/chunks/header-meta.lGt3HsyH.js.map +1 -0
- package/dist/chunks/{header-with-views.CJDoE4hw.js → header-with-views.BT6lbAby.js} +9 -9
- package/dist/chunks/{header-with-views.CJDoE4hw.js.map → header-with-views.BT6lbAby.js.map} +1 -1
- package/dist/chunks/{header.BeH8KH_l.js → header.oXqwf2xN.js} +3 -3
- package/dist/chunks/{header.BeH8KH_l.js.map → header.oXqwf2xN.js.map} +1 -1
- package/dist/chunks/{index.CbxHJr39.js → index.Dppy4qHk.js} +204 -197
- package/dist/chunks/{index.CbxHJr39.js.map → index.Dppy4qHk.js.map} +1 -1
- package/dist/chunks/{info-icon.BLtyJvY4.js → info-icon.DyPOv7Pi.js} +3 -3
- package/dist/chunks/{info-icon.BLtyJvY4.js.map → info-icon.DyPOv7Pi.js.map} +1 -1
- package/dist/chunks/{input-field-password.KeKQPIZv.js → input-field-password.CKhqGBVB.js} +6 -6
- package/dist/chunks/{input-field-password.KeKQPIZv.js.map → input-field-password.CKhqGBVB.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.eaU9p15A.js → input-field-phone-number.Cailj_71.js} +49 -49
- package/dist/chunks/{input-field-phone-number.eaU9p15A.js.map → input-field-phone-number.Cailj_71.js.map} +1 -1
- package/dist/chunks/{input-field.CNdqlGw6.js → input-field.DqXVoKpy.js} +15 -14
- package/dist/chunks/input-field.DqXVoKpy.js.map +1 -0
- package/dist/chunks/{inspector.Bnf0g7QE.js → inspector.BjLhY3bE.js} +3 -3
- package/dist/chunks/{inspector.Bnf0g7QE.js.map → inspector.BjLhY3bE.js.map} +1 -1
- package/dist/chunks/isSameWeek.CzBCmu7d.js +14 -0
- package/dist/chunks/{isSameWeek.DjeUtLwI.js.map → isSameWeek.CzBCmu7d.js.map} +1 -1
- package/dist/chunks/{it.DIafuXtH.js → it.BlUnV-yA.js} +3 -3
- package/dist/chunks/{it.DIafuXtH.js.map → it.BlUnV-yA.js.map} +1 -1
- package/dist/chunks/{ja.Cm9tJMi2.js → ja.nUwDmVf2.js} +8 -8
- package/dist/chunks/{ja.Cm9tJMi2.js.map → ja.nUwDmVf2.js.map} +1 -1
- package/dist/chunks/{layout-row.Bz-mRqAq.js → layout-row.Da8nkm9z.js} +2 -2
- package/dist/chunks/{layout-row.Bz-mRqAq.js.map → layout-row.Da8nkm9z.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.C3ihNg6_.js → listbox-option-tag.CoBUYwFG.js} +2 -2
- package/dist/chunks/{listbox-option-tag.C3ihNg6_.js.map → listbox-option-tag.CoBUYwFG.js.map} +1 -1
- package/dist/chunks/modal-fullscreen.9ZDR_S29.js +301 -0
- package/dist/chunks/modal-fullscreen.9ZDR_S29.js.map +1 -0
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BAwez0nB.js → modal.vue_vue_type_script_setup_true_lang.B0IdwV0R.js} +4 -4
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BAwez0nB.js.map → modal.vue_vue_type_script_setup_true_lang.B0IdwV0R.js.map} +1 -1
- package/dist/chunks/pagination.CqCd5JCe.js +488 -0
- package/dist/chunks/pagination.CqCd5JCe.js.map +1 -0
- package/dist/chunks/popover.types.DhALnOLQ.js +6 -0
- package/dist/chunks/{popover.types.C_Z2JeVK.js.map → popover.types.DhALnOLQ.js.map} +1 -1
- package/dist/chunks/{popper-container.BefZxTzP.js → popper-container.DAK7c9uS.js} +2 -2
- package/dist/chunks/{popper-container.BefZxTzP.js.map → popper-container.DAK7c9uS.js.map} +1 -1
- package/dist/chunks/{promo-banner.BLie64oS.js → promo-banner.aNwH6uQx.js} +2 -2
- package/dist/chunks/{promo-banner.BLie64oS.js.map → promo-banner.aNwH6uQx.js.map} +1 -1
- package/dist/chunks/{pt-BR.CiGdfP45.js → pt-BR.BCU2Hj36.js} +2 -2
- package/dist/chunks/{pt-BR.CiGdfP45.js.map → pt-BR.BCU2Hj36.js.map} +1 -1
- package/dist/chunks/{radio-group.C6nQRQDB.js → radio-group.v8mDVZ-o.js} +24 -23
- package/dist/chunks/{radio-group.C6nQRQDB.js.map → radio-group.v8mDVZ-o.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.C39NKgl0.js → rich-text-editor.DH1d5Zcp.js} +7 -6
- package/dist/chunks/{rich-text-editor.C39NKgl0.js.map → rich-text-editor.DH1d5Zcp.js.map} +1 -1
- package/dist/chunks/{search-bar.CbTrg2Sk.js → search-bar.DGpLNVng.js} +3 -3
- package/dist/chunks/{search-bar.CbTrg2Sk.js.map → search-bar.DGpLNVng.js.map} +1 -1
- package/dist/chunks/{secondary-nav.DTOZQewf.js → secondary-nav.l_60nnXA.js} +3 -3
- package/dist/chunks/{secondary-nav.DTOZQewf.js.map → secondary-nav.l_60nnXA.js.map} +1 -1
- package/dist/chunks/{segmented-control.D9rHBysM.js → segmented-control.Aqquod8g.js} +2 -2
- package/dist/chunks/{segmented-control.D9rHBysM.js.map → segmented-control.Aqquod8g.js.map} +1 -1
- package/dist/chunks/{selection-card-group.KEsG0D5V.js → selection-card-group.KBl4fVSH.js} +107 -106
- package/dist/chunks/selection-card-group.KBl4fVSH.js.map +1 -0
- package/dist/chunks/{sidepanel.DJCagqzl.js → sidepanel.DaXPcTHm.js} +5 -5
- package/dist/chunks/{sidepanel.DJCagqzl.js.map → sidepanel.DaXPcTHm.js.map} +1 -1
- package/dist/chunks/{startOfWeek.D8Yh4c0G.js → startOfWeek.CXhhX-R7.js} +2 -2
- package/dist/chunks/{startOfWeek.D8Yh4c0G.js.map → startOfWeek.CXhhX-R7.js.map} +1 -1
- package/dist/chunks/{structured-list-item.f1tmHSEN.js → structured-list-item.DAIaUMCY.js} +4 -4
- package/dist/chunks/{structured-list-item.f1tmHSEN.js.map → structured-list-item.DAIaUMCY.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.COcV-sOB.js → summary-grid.types.BZcZS_dW.js} +5 -5
- package/dist/chunks/{summary-grid.types.COcV-sOB.js.map → summary-grid.types.BZcZS_dW.js.map} +1 -1
- package/dist/chunks/{tag.Dr7MKe9q.js → tag.CqWg6C3H.js} +2 -2
- package/dist/chunks/{tag.Dr7MKe9q.js.map → tag.CqWg6C3H.js.map} +1 -1
- package/dist/chunks/{textarea.CtgbUCjH.js → textarea.CvI2InIB.js} +18 -17
- package/dist/chunks/textarea.CvI2InIB.js.map +1 -0
- package/dist/chunks/{timeline-item.D9nmCe6u.js → timeline-item.BooD99hL.js} +93 -95
- package/dist/chunks/timeline-item.BooD99hL.js.map +1 -0
- package/dist/chunks/{tooltip.DYpJZ-99.js → tooltip.Lwtlhv3u.js} +2 -2
- package/dist/chunks/{tooltip.DYpJZ-99.js.map → tooltip.Lwtlhv3u.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.B5hWgNSd.js → tutorial.vue_vue_type_script_setup_true_lang.BL2QTKmV.js} +4 -4
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.B5hWgNSd.js.map → tutorial.vue_vue_type_script_setup_true_lang.BL2QTKmV.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.BiSuG1eX.js → use-cached-selected-values.C4_X3vVj.js} +2 -2
- package/dist/chunks/{use-cached-selected-values.BiSuG1eX.js.map → use-cached-selected-values.C4_X3vVj.js.map} +1 -1
- package/dist/chunks/use-date-input-formatter.dtbK-CEy.js +1732 -0
- package/dist/chunks/use-date-input-formatter.dtbK-CEy.js.map +1 -0
- package/dist/chunks/{zh-CN.Bw_6j9Cd.js → zh-CN.ChYkuQAR.js} +3 -3
- package/dist/chunks/{zh-CN.Bw_6j9Cd.js.map → zh-CN.ChYkuQAR.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/draggable-handle.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/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 +50 -50
- 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 +11 -11
- 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/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/structured-list.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +10 -15
- package/dist/chunks/anchor-scroller.CKIQu3NK.js +0 -215
- package/dist/chunks/anchor-scroller.CKIQu3NK.js.map +0 -1
- package/dist/chunks/button-actions.BH-J7dux.js.map +0 -1
- package/dist/chunks/calendar.DzeJoNc2.js.map +0 -1
- package/dist/chunks/checkbox-group.Bh_aqKoA.js.map +0 -1
- package/dist/chunks/checkbox.7kpOXm-b.js.map +0 -1
- package/dist/chunks/constructNow.B8T1ljs6.js +0 -8
- package/dist/chunks/controls-group.Dip3WAKV.js.map +0 -1
- package/dist/chunks/date-input.XSJuuCHe.js +0 -20
- package/dist/chunks/date-input.XSJuuCHe.js.map +0 -1
- package/dist/chunks/date-picker.CvTSZhMI.js +0 -250
- package/dist/chunks/date-picker.CvTSZhMI.js.map +0 -1
- package/dist/chunks/date-range-picker.D0YqnZ86.js +0 -1080
- package/dist/chunks/date-range-picker.D0YqnZ86.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.B-_dTUVX.js.map +0 -1
- package/dist/chunks/en-US.BZii9jNW.js.map +0 -1
- package/dist/chunks/error-message.BYA2_fPV.js +0 -158
- package/dist/chunks/error-message.BYA2_fPV.js.map +0 -1
- package/dist/chunks/file-uploader.Q2ufNRTY.js.map +0 -1
- package/dist/chunks/filter-bar.CkYOjRAa.js.map +0 -1
- package/dist/chunks/form-layout-title.DYmTc6M7.js +0 -214
- package/dist/chunks/fr-CA.B1aPU8fp.js +0 -48
- package/dist/chunks/fr-CA.B1aPU8fp.js.map +0 -1
- package/dist/chunks/fr.Dj7wEToe.js +0 -47
- package/dist/chunks/fr.Dj7wEToe.js.map +0 -1
- package/dist/chunks/getTimezoneOffsetInMilliseconds.Tu2wlbTR.js +0 -51
- package/dist/chunks/getTimezoneOffsetInMilliseconds.Tu2wlbTR.js.map +0 -1
- package/dist/chunks/header-meta.Bw8ZGwJW.js.map +0 -1
- package/dist/chunks/input-field.CNdqlGw6.js.map +0 -1
- package/dist/chunks/isSameWeek.DjeUtLwI.js +0 -14
- package/dist/chunks/ko.Ceaof6EP.js +0 -348
- package/dist/chunks/ko.Ceaof6EP.js.map +0 -1
- package/dist/chunks/match.CMBZxEs9.js.map +0 -1
- package/dist/chunks/modal-fullscreen.B3AGUJgl.js +0 -289
- package/dist/chunks/modal-fullscreen.B3AGUJgl.js.map +0 -1
- package/dist/chunks/nl.B6vCf2B9.js +0 -327
- package/dist/chunks/nl.B6vCf2B9.js.map +0 -1
- package/dist/chunks/pagination.lu9nx8j8.js +0 -461
- package/dist/chunks/pagination.lu9nx8j8.js.map +0 -1
- package/dist/chunks/popover.types.C_Z2JeVK.js +0 -6
- package/dist/chunks/selection-card-group.KEsG0D5V.js.map +0 -1
- package/dist/chunks/sv.f8EfZjMZ.js +0 -377
- package/dist/chunks/sv.f8EfZjMZ.js.map +0 -1
- package/dist/chunks/textarea.CtgbUCjH.js.map +0 -1
- package/dist/chunks/timeline-item.D9nmCe6u.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as r, withDirectives as p, openBlock as a, createElementBlock as l, createVNode as m, unref as e } from "vue";
|
|
2
|
-
import { b as c } from "./popper-container.
|
|
3
|
-
import { b as f } from "./tooltip.
|
|
2
|
+
import { b as c } from "./popper-container.DAK7c9uS.js";
|
|
3
|
+
import { b as f } from "./tooltip.Lwtlhv3u.js";
|
|
4
4
|
import { I as _ } from "./info.6Z6NxUst.js";
|
|
5
5
|
import { _ as u } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
6
|
import "../assets/info-icon.css";
|
|
@@ -32,4 +32,4 @@ const b = ["aria-label"], d = {
|
|
|
32
32
|
export {
|
|
33
33
|
k as B
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=info-icon.
|
|
35
|
+
//# sourceMappingURL=info-icon.DyPOv7Pi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info-icon.
|
|
1
|
+
{"version":3,"file":"info-icon.DyPOv7Pi.js","sources":["../../../vue2/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 withDefaults(defineProps<BentoInfoIconProps>(), {\n tooltipPosition: PopperContainerPosition.AUTO,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the mouse pointer enters the component.\n */\n (e: 'mouseenter', event: MouseEvent): void;\n }>();\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__","emit","__emit"],"mappings":";;;;;;0BAwCIA,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;AArBA,UAAAC,IAAAC;;;;;;;;;;;;;;;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { defineComponent as we, useAttrs as Ee, ref as r, provide as Ce, computed as v, watch as D, openBlock as s, createElementBlock as R, createVNode as U, unref as i, mergeProps as Re, createSlots as Le, withCtx as c, Fragment as ae, createTextVNode as L, toDisplayString as _, renderSlot as te, createElementVNode as P, createBlock as f, normalizeClass as ie, createCommentVNode as h, renderList as Te } from "vue";
|
|
2
2
|
import { B as Ve } from "./button.C6t9_lzm.js";
|
|
3
3
|
import { _ as Ie } from "./image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js";
|
|
4
|
-
import { B as Oe } from "./input-field.
|
|
5
|
-
import { h as Se } from "./button-actions.
|
|
4
|
+
import { B as Oe } from "./input-field.DqXVoKpy.js";
|
|
5
|
+
import { h as Se } from "./button-actions.BYBpjNqy.js";
|
|
6
6
|
import { d as Ue, B as W } from "./typography.B3J6_tYk.js";
|
|
7
7
|
import { C as Pe } from "./checkmark-circle-fill.DugX5fbG.js";
|
|
8
8
|
import { D as Ae } from "./dot.DBmwmOUN.js";
|
|
9
9
|
import { S as Ne, H as qe } from "./show.BreRPkgL.js";
|
|
10
|
-
import { e as Me, w as Be } from "./index.
|
|
10
|
+
import { e as Me, w as Be } from "./index.Dppy4qHk.js";
|
|
11
11
|
import { u as He } from "./index.B875RXHM.js";
|
|
12
12
|
import { g as le } from "./generate-uid.NJ8tVoha.js";
|
|
13
13
|
import { u as Fe } from "./form-field.D_2g7vaP.js";
|
|
14
|
-
import { b as De } from "./dropdown.
|
|
15
|
-
import { T as We } from "./tooltip.
|
|
14
|
+
import { b as De } from "./dropdown.Bdw2B-Cw.js";
|
|
15
|
+
import { T as We } from "./tooltip.Lwtlhv3u.js";
|
|
16
16
|
import { _ as xe } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
17
17
|
import "../assets/input-field-password.css";
|
|
18
18
|
var T = /* @__PURE__ */ ((t) => (t.TEXT = "text", t.PASSWORD = "password", t))(T || {}), y = /* @__PURE__ */ ((t) => (t.MIN_LENGTH = "minLength", t.REQUIRE_LOWERCASE = "requireLowercase", t.REQUIRE_NUMERIC = "requireNumeric", t.REQUIRE_SPECIAL_CHARACTER = "requireSpecialCharacter", t.REQUIRE_UPPERCASE = "requireUppercase", t))(y || {});
|
|
@@ -399,4 +399,4 @@ export {
|
|
|
399
399
|
Ze as m,
|
|
400
400
|
ze as r
|
|
401
401
|
};
|
|
402
|
-
//# sourceMappingURL=input-field-password.
|
|
402
|
+
//# sourceMappingURL=input-field-password.CKhqGBVB.js.map
|
package/dist/chunks/{input-field-password.KeKQPIZv.js.map → input-field-password.CKhqGBVB.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-field-password.KeKQPIZv.js","sources":["../../../vue2/src/components/input-field-password/input-field-password.types.ts","../../../vue2/src/components/input-field-password/assets/capslock.svg","../../../vue2/src/components/input-field-password/utilities/input-field-password.validation.ts","../../../vue2/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 = withDefaults(defineProps<BentoInputFieldPasswordProps>(), {\n condensed: false,\n debounceTime: DEBOUNCE_DURATION,\n description: null,\n disabled: false,\n disableValidation: false,\n errorMessage: null,\n label: null,\n optional: false,\n placeholder: '',\n readonly: false,\n required: false,\n tooltipText: null,\n validation: undefined,\n value: undefined,\n modelValue: undefined,\n withHint: true,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the element has lost focus\n */\n (e: 'blur'): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: 'focus'): void;\n\n /**\n * Emits an `input:valid` event when the value is validated against the provided validations.\n * This emit has a debounce and is emitted after an `input` event.\n */\n (e: 'input:valid'): void;\n\n /**\n * Emits an `input:error` event when the value fails the validation.\n * This emit has a debounce and is emitted after an `input` event.\n */\n (e: 'input:error', errors: BentoInputFieldPasswordErrorsList): void;\n\n /**\n * Emits an `input` event whenever the value in the input is changed.\n * @deprecated from version 2.0.0. Use `v-model` or `update:model-value` instead.\n */\n (e: 'input', value: BentoInputFieldPasswordProps['value']): void;\n\n /**\n * Emits an `update:model-value` event whenever the value in the input is changed.\n */\n (e: 'update:model-value', value: BentoInputFieldPasswordProps['modelValue']): void;\n }>();\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","props","__props","emit","__emit","attrs","useAttrs","inputType","ref","inputValue","isHintDisplayed","isTouched","passwordValidity","errorsList","capsLockTooltipTimeoutID","isTooltipDisplayed","inputFieldPasswordRef","inputFieldPasswordInputRef","inputFieldPasswordCapsLockIconRef","isCapsLockOn","provide","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","focused","useFocusWithin","emitValue","useFormFieldEmits","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","toggleInputType","onUpdateModelValue","onFocus","onBlur","checkValidity","rulesValidityObj","validationItem","customRuleIndex","error","errorsObject","key","handleCapsLockMouseLeave","handleCapsLockMouseEnter","watch","focused2","isCapsLockOn2","watchDebounced","inputValue2","deprecate"],"mappings":";;;;;;;;;;;;;;;;;AA+FO,IAAAA,I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I,CAAA8D,MAAA;AAEI,QAAAb,EAAAa,CAAA,GAEApB,EAAA,QAGIhD,EAAA,eAAAU,EAAA,KAAA,IAFAV,EAAA,aAAA;AAAA,MAGJ;AAAA;AAAA,MACJ,EAAA,UAAAF,EAAA,cAAA,SAAAP,GAAA;AAAA,IAE2D,GAG/DO,EAAA,SACIuE;AAAA,MAAA;AAAA,MACI;AAAA;AAAA,MACA;AAAA,IAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"input-field-password.CKhqGBVB.js","sources":["../../../vue2/src/components/input-field-password/input-field-password.types.ts","../../../vue2/src/components/input-field-password/assets/capslock.svg","../../../vue2/src/components/input-field-password/utilities/input-field-password.validation.ts","../../../vue2/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 = withDefaults(defineProps<BentoInputFieldPasswordProps>(), {\n condensed: false,\n debounceTime: DEBOUNCE_DURATION,\n description: null,\n disabled: false,\n disableValidation: false,\n errorMessage: null,\n label: null,\n optional: false,\n placeholder: '',\n readonly: false,\n required: false,\n tooltipText: null,\n validation: undefined,\n value: undefined,\n modelValue: undefined,\n withHint: true,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the element has lost focus\n */\n (e: 'blur'): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: 'focus'): void;\n\n /**\n * Emits an `input:valid` event when the value is validated against the provided validations.\n * This emit has a debounce and is emitted after an `input` event.\n */\n (e: 'input:valid'): void;\n\n /**\n * Emits an `input:error` event when the value fails the validation.\n * This emit has a debounce and is emitted after an `input` event.\n */\n (e: 'input:error', errors: BentoInputFieldPasswordErrorsList): void;\n\n /**\n * Emits an `input` event whenever the value in the input is changed.\n * @deprecated from version 2.0.0. Use `v-model` or `update:model-value` instead.\n */\n (e: 'input', value: BentoInputFieldPasswordProps['value']): void;\n\n /**\n * Emits an `update:model-value` event whenever the value in the input is changed.\n */\n (e: 'update:model-value', value: BentoInputFieldPasswordProps['modelValue']): void;\n }>();\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","props","__props","emit","__emit","attrs","useAttrs","inputType","ref","inputValue","isHintDisplayed","isTouched","passwordValidity","errorsList","capsLockTooltipTimeoutID","isTooltipDisplayed","inputFieldPasswordRef","inputFieldPasswordInputRef","inputFieldPasswordCapsLockIconRef","isCapsLockOn","provide","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","focused","useFocusWithin","emitValue","useFormFieldEmits","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","toggleInputType","onUpdateModelValue","onFocus","onBlur","checkValidity","rulesValidityObj","validationItem","customRuleIndex","error","errorsObject","key","handleCapsLockMouseLeave","handleCapsLockMouseEnter","watch","focused2","isCapsLockOn2","watchDebounced","inputValue2","deprecate"],"mappings":";;;;;;;;;;;;;;;;;AA+FO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,OAAA,QACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA,GAKLE,IAAA,kBAAAC,OACHA,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,EAAA,eAAA;AACJ;AASO,SAAAC,GAAAD,GAAAE,IAAA,IAAA;AACH,SAAAH,EAAAC,CAAA,EAAA,UAAAE;AACJ;AAQO,SAAAC,GAAAH,GAAA;AACH,SAAA,QAAA,KAAAD,EAAAC,CAAA,CAAA;AACJ;AAQO,SAAAI,GAAAJ,GAAA;AACH,SAAA,QAAA,KAAA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
|
|
|
1
1
|
import { defineComponent as Me, computed as B, ref as z, provide as Le, watch as ke, openBlock as xt, createBlock as Ge, unref as Be, mergeProps as je, withCtx as _t, createElementBlock as Ue, Fragment as He, createTextVNode as wt, toDisplayString as Ot, renderSlot as Rt, nextTick as Ve } from "vue";
|
|
2
|
-
import { B as We } from "./input-field.
|
|
2
|
+
import { B as We } from "./input-field.DqXVoKpy.js";
|
|
3
3
|
import { u as Ke } from "./index.B875RXHM.js";
|
|
4
4
|
import { u as Ye } from "./form-field.D_2g7vaP.js";
|
|
5
5
|
import { p as Xe, d as Ze } from "./typography.B3J6_tYk.js";
|
|
6
|
-
import { b as Je } from "./dropdown.
|
|
6
|
+
import { b as Je } from "./dropdown.Bdw2B-Cw.js";
|
|
7
7
|
import { a as nt, u as ge } from "./use-country-phon-code.Bui3zD6W.js";
|
|
8
8
|
import { _ as Qe } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
9
9
|
import "../assets/input-field-phone-number.css";
|
|
@@ -593,7 +593,7 @@ function yr(t, e, r) {
|
|
|
593
593
|
var n = new g(r);
|
|
594
594
|
return n.selectNumberingPlan(e), n.numberingPlan.possibleLengths().indexOf(t.length) >= 0;
|
|
595
595
|
}
|
|
596
|
-
var Et = 2, pr = 17, vr = 3, p = "0-90-9٠-٩۰-۹", br = "-‐-―−ー-", Nr = "//", Cr = "..", Pr = " ", Sr = "()()[]\\[\\]", Er = "~⁓∼~",
|
|
596
|
+
var Et = 2, pr = 17, vr = 3, p = "0-90-9٠-٩۰-۹", br = "-‐-―−ー-", Nr = "//", Cr = "..", Pr = " ", Sr = "()()[]\\[\\]", Er = "~⁓∼~", S = "".concat(br).concat(Nr).concat(Cr).concat(Pr).concat(Sr).concat(Er), ot = "++", Tr = new RegExp("([" + p + "])");
|
|
597
597
|
function be(t, e, r, n) {
|
|
598
598
|
if (e) {
|
|
599
599
|
var d = new g(n);
|
|
@@ -771,7 +771,7 @@ function It(t, e, r, n, d) {
|
|
|
771
771
|
return {};
|
|
772
772
|
}
|
|
773
773
|
function Pe(t) {
|
|
774
|
-
return t.replace(new RegExp("[".concat(
|
|
774
|
+
return t.replace(new RegExp("[".concat(S, "]+"), "g"), " ").trim();
|
|
775
775
|
}
|
|
776
776
|
var Se = /(\$\d)/;
|
|
777
777
|
function Ee(t, e, r) {
|
|
@@ -807,10 +807,10 @@ var Or = ";ext=", D = function(e) {
|
|
|
807
807
|
return "([".concat(p, "]{1,").concat(e, "})");
|
|
808
808
|
};
|
|
809
809
|
function Te(t) {
|
|
810
|
-
var e = "20", r = "15", n = "9", d = "6", i = "[ \\t,]*", a = "[:\\..]?[ \\t,-]*", o = "#?", u = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", $ = "(?:[xx##~~]|int|int)", l = "[- ]+", f = "[ \\t]*", c = "(?:,{2}|;)", y = Or + D(e), v = i + u + a + D(e) + o,
|
|
811
|
-
return y + "|" + v + "|" +
|
|
810
|
+
var e = "20", r = "15", n = "9", d = "6", i = "[ \\t,]*", a = "[:\\..]?[ \\t,-]*", o = "#?", u = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", $ = "(?:[xx##~~]|int|int)", l = "[- ]+", f = "[ \\t]*", c = "(?:,{2}|;)", y = Or + D(e), v = i + u + a + D(e) + o, E = i + $ + a + D(n) + o, b = l + D(d) + "#", ut = f + c + a + D(r) + o, x = f + "(?:,)+" + a + D(n) + o;
|
|
811
|
+
return y + "|" + v + "|" + E + "|" + b + "|" + ut + "|" + x;
|
|
812
812
|
}
|
|
813
|
-
var Rr = "[" + p + "]{" + Et + "}", Dr = "[" + ot + "]{0,1}(?:[" +
|
|
813
|
+
var Rr = "[" + p + "]{" + Et + "}", Dr = "[" + ot + "]{0,1}(?:[" + S + "]*[" + p + "]){3,}[" + S + p + "]*", Mr = new RegExp("^[" + ot + "]{0,1}(?:[" + S + "]*[" + p + "]){1,2}$", "i"), Lr = Dr + // Phone number extensions
|
|
814
814
|
"(?:" + Te() + ")?", kr = new RegExp(
|
|
815
815
|
// Either a short two-digit-only phone number
|
|
816
816
|
"^" + Rr + "$|^" + Lr + "$",
|
|
@@ -1819,7 +1819,7 @@ function re(t, e) {
|
|
|
1819
1819
|
for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
|
|
1820
1820
|
return n;
|
|
1821
1821
|
}
|
|
1822
|
-
var
|
|
1822
|
+
var P = "x", st = new RegExp(P);
|
|
1823
1823
|
function tt(t, e) {
|
|
1824
1824
|
if (e < 1)
|
|
1825
1825
|
return "";
|
|
@@ -2196,8 +2196,8 @@ function bt(t, e, r) {
|
|
|
2196
2196
|
} : void 0;
|
|
2197
2197
|
case "[]":
|
|
2198
2198
|
for (var y = ie(e.args), v; !(v = y()).done; ) {
|
|
2199
|
-
var
|
|
2200
|
-
if (t[0] ===
|
|
2199
|
+
var E = v.value;
|
|
2200
|
+
if (t[0] === E)
|
|
2201
2201
|
return t.length === 1 ? {
|
|
2202
2202
|
match: !0,
|
|
2203
2203
|
matchedChars: t
|
|
@@ -2205,7 +2205,7 @@ function bt(t, e, r) {
|
|
|
2205
2205
|
overflow: !0
|
|
2206
2206
|
} : {
|
|
2207
2207
|
match: !0,
|
|
2208
|
-
matchedChars: [
|
|
2208
|
+
matchedChars: [E]
|
|
2209
2209
|
};
|
|
2210
2210
|
}
|
|
2211
2211
|
return;
|
|
@@ -2277,7 +2277,7 @@ var Nt = "9", kd = 15, Gd = tt(Nt, kd), Bd = /[- ]/, jd = function() {
|
|
|
2277
2277
|
return /\[([^\[\]])*\]/g;
|
|
2278
2278
|
}, Ud = function() {
|
|
2279
2279
|
return /\d(?=[^,}][^,}])/g;
|
|
2280
|
-
}, Hd = new RegExp("[" +
|
|
2280
|
+
}, Hd = new RegExp("[" + S + "]*\\$1[" + S + "]*(\\$\\d[" + S + "]*)*$"), $e = 3, Vd = /* @__PURE__ */ (function() {
|
|
2281
2281
|
function t(e) {
|
|
2282
2282
|
e.state;
|
|
2283
2283
|
var r = e.metadata;
|
|
@@ -2318,7 +2318,7 @@ var Nt = "9", kd = 15, Gd = tt(Nt, kd), Bd = /[- ]/, jd = function() {
|
|
|
2318
2318
|
}
|
|
2319
2319
|
});
|
|
2320
2320
|
if (u)
|
|
2321
|
-
return this.resetFormat(), this.chosenFormat = o, this.setNationalNumberTemplate(u.replace(/\d/g,
|
|
2321
|
+
return this.resetFormat(), this.chosenFormat = o, this.setNationalNumberTemplate(u.replace(/\d/g, P), n), this.populatedNationalNumberTemplate = u, this.populatedNationalNumberTemplatePosition = this.template.lastIndexOf(P), u;
|
|
2322
2322
|
}
|
|
2323
2323
|
return this.formatNationalNumberWithNextDigits(r, n);
|
|
2324
2324
|
}
|
|
@@ -2406,14 +2406,14 @@ var Nt = "9", kd = 15, Gd = tt(Nt, kd), Bd = /[- ]/, jd = function() {
|
|
|
2406
2406
|
for (var n = -1, d = 0, i = r.international ? this.getInternationalPrefixBeforeCountryCallingCode(r, {
|
|
2407
2407
|
spacing: !1
|
|
2408
2408
|
}) : ""; d < i.length + r.getDigitsWithoutInternationalPrefix().length; )
|
|
2409
|
-
n = this.template.indexOf(
|
|
2409
|
+
n = this.template.indexOf(P, n + 1), d++;
|
|
2410
2410
|
return ne(this.template, n + 1);
|
|
2411
2411
|
}
|
|
2412
2412
|
}
|
|
2413
2413
|
}, {
|
|
2414
2414
|
key: "setNationalNumberTemplate",
|
|
2415
2415
|
value: function(r, n) {
|
|
2416
|
-
this.nationalNumberTemplate = r, this.populatedNationalNumberTemplate = r, this.populatedNationalNumberTemplatePosition = -1, n.international ? this.template = this.getInternationalPrefixBeforeCountryCallingCode(n).replace(/[\d\+]/g,
|
|
2416
|
+
this.nationalNumberTemplate = r, this.populatedNationalNumberTemplate = r, this.populatedNationalNumberTemplatePosition = -1, n.international ? this.template = this.getInternationalPrefixBeforeCountryCallingCode(n).replace(/[\d\+]/g, P) + tt(P, n.callingCode.length) + " " + r : this.template = r;
|
|
2417
2417
|
}
|
|
2418
2418
|
/**
|
|
2419
2419
|
* Generates formatting template for a national phone number,
|
|
@@ -2438,11 +2438,11 @@ var Nt = "9", kd = 15, Gd = tt(Nt, kd), Bd = /[- ]/, jd = function() {
|
|
|
2438
2438
|
})) {
|
|
2439
2439
|
var v = c.replace(Se, r.nationalPrefixFormattingRule());
|
|
2440
2440
|
if (rt(r.nationalPrefixFormattingRule()) === (a || "") + rt("$1") && (c = v, y = !0, a))
|
|
2441
|
-
for (var
|
|
2442
|
-
c = c.replace(/\d/,
|
|
2441
|
+
for (var E = a.length; E > 0; )
|
|
2442
|
+
c = c.replace(/\d/, P), E--;
|
|
2443
2443
|
}
|
|
2444
|
-
var b = $.replace(new RegExp(u), c).replace(new RegExp(Nt, "g"),
|
|
2445
|
-
return y || (o ? b = tt(
|
|
2444
|
+
var b = $.replace(new RegExp(u), c).replace(new RegExp(Nt, "g"), P);
|
|
2445
|
+
return y || (o ? b = tt(P, o.length) + " " + b : a && (b = tt(P, a.length) + this.getSeparatorAfterNationalPrefix(r) + b)), i && (b = Pe(b)), b;
|
|
2446
2446
|
}
|
|
2447
2447
|
}
|
|
2448
2448
|
}, {
|
|
@@ -2541,7 +2541,7 @@ function zd(t, e) {
|
|
|
2541
2541
|
}
|
|
2542
2542
|
return String(t);
|
|
2543
2543
|
}
|
|
2544
|
-
var t1 = "[" +
|
|
2544
|
+
var t1 = "[" + S + p + "]+", e1 = new RegExp("^" + t1 + "$", "i"), r1 = "(?:[" + ot + "][" + S + p + "]*|[" + S + p + "]+)", n1 = new RegExp("[^" + S + p + "]+.*$"), d1 = /[^\d\[\]]/, i1 = /* @__PURE__ */ (function() {
|
|
2545
2545
|
function t(e) {
|
|
2546
2546
|
var r = e.defaultCountry, n = e.defaultCallingCode, d = e.metadata, i = e.onNationalSignificantNumberChange;
|
|
2547
2547
|
Zd(this, t), this.defaultCountry = r, this.defaultCallingCode = n, this.metadata = d, this.onNationalSignificantNumberChange = i;
|
|
@@ -2947,7 +2947,7 @@ var _e = /* @__PURE__ */ (function() {
|
|
|
2947
2947
|
value: function() {
|
|
2948
2948
|
var r = this.getNonFormattedNumber();
|
|
2949
2949
|
if (r)
|
|
2950
|
-
return r.replace(/[\+\d]/g,
|
|
2950
|
+
return r.replace(/[\+\d]/g, P);
|
|
2951
2951
|
}
|
|
2952
2952
|
}, {
|
|
2953
2953
|
key: "isCountryCallingCodeAmbiguous",
|
|
@@ -3218,50 +3218,50 @@ const P1 = ["-", "(", ")", "/", "[", "]", ".", "~"], S1 = (t, e, r) => {
|
|
|
3218
3218
|
emits: ["blur", "input", "update:model-value", "update:selected-country", "input:valid"],
|
|
3219
3219
|
setup(t, { emit: e }) {
|
|
3220
3220
|
const { t: r, locale: n } = Ke({ messages: we }), d = t, i = B(() => {
|
|
3221
|
-
const { value: s, ...
|
|
3222
|
-
return
|
|
3221
|
+
const { value: s, ...T } = d;
|
|
3222
|
+
return T;
|
|
3223
3223
|
}), a = e, o = z(null), u = z(""), $ = z(""), l = z(""), { emitValue: f } = Ye(a);
|
|
3224
3224
|
Le(Je, "bento-input-field-phone-number");
|
|
3225
3225
|
const c = B(() => d.placeholder ? d.placeholder : d.selectedCountry ? F1(d.selectedCountry) : ""), y = B(() => {
|
|
3226
3226
|
var s;
|
|
3227
3227
|
return (s = d.dropdown) == null ? void 0 : s.readonly;
|
|
3228
|
-
}), v = B(() => A1(d.countries, n.value)),
|
|
3228
|
+
}), v = B(() => A1(d.countries, n.value)), E = B(() => ({
|
|
3229
3229
|
items: v.value,
|
|
3230
3230
|
modelValue: d.selectedCountry,
|
|
3231
3231
|
readonly: y.value,
|
|
3232
3232
|
dynamicFiltering: d.dynamicFiltering,
|
|
3233
3233
|
"aria-label": r("countrySelectorDropdown")
|
|
3234
3234
|
})), b = () => a("blur"), ut = async (s) => {
|
|
3235
|
-
var
|
|
3236
|
-
const
|
|
3235
|
+
var I;
|
|
3236
|
+
const T = o.value.$refs.inputFieldElement;
|
|
3237
3237
|
let h;
|
|
3238
3238
|
if (s.startsWith("+") || s.startsWith("00")) {
|
|
3239
3239
|
u.value = "";
|
|
3240
3240
|
const N = s.startsWith("00") ? `+${s.slice(2)}` : s;
|
|
3241
3241
|
h = new O(), h.input(N);
|
|
3242
|
-
const m = h.getCountry(),
|
|
3243
|
-
y.value ? u.value = d.selectedCountry === m ? M(h.getNationalNumber(), m) : s : (a("update:selected-country",
|
|
3244
|
-
const _ = h.getNumberValue() ?? "", R = T1(m), De =
|
|
3242
|
+
const m = h.getCountry(), C = m && d.countries.includes(m);
|
|
3243
|
+
y.value ? u.value = d.selectedCountry === m ? M(h.getNationalNumber(), m) : s : (a("update:selected-country", C ? m : null), u.value = C ? M(h.getNationalNumber(), m) : s);
|
|
3244
|
+
const _ = h.getNumberValue() ?? "", R = T1(m), De = C && _.startsWith(R) && _.length <= R.length;
|
|
3245
3245
|
$.value = De ? "" : _, f($.value);
|
|
3246
3246
|
} else {
|
|
3247
3247
|
h = new O(d.selectedCountry);
|
|
3248
|
-
const N = h.input(ce(s, d.selectedCountry)), m =
|
|
3249
|
-
$.value =
|
|
3248
|
+
const N = h.input(ce(s, d.selectedCountry)), m = h.getNumberValue(), C = m ? he(s, m, d.selectedCountry) : s;
|
|
3249
|
+
$.value = C, f($.value), u.value = M(N, d.selectedCountry);
|
|
3250
3250
|
}
|
|
3251
3251
|
if (await Ve(), h.isValid() && d.selectedCountry && !k(d.selectedCountry)) {
|
|
3252
3252
|
const { displayNumber: N, isValid: m } = ct(
|
|
3253
|
-
(
|
|
3253
|
+
(I = u.value) == null ? void 0 : I.toString(),
|
|
3254
3254
|
d.selectedCountry,
|
|
3255
3255
|
d.countries
|
|
3256
3256
|
);
|
|
3257
3257
|
u.value = N, x(m);
|
|
3258
3258
|
} else
|
|
3259
3259
|
x(h.isValid());
|
|
3260
|
-
S1(
|
|
3260
|
+
S1(T, u.value.toString(), l.value);
|
|
3261
3261
|
}, x = (s) => {
|
|
3262
3262
|
var N, m;
|
|
3263
|
-
const
|
|
3264
|
-
a("input:valid",
|
|
3263
|
+
const I = (((m = (N = u.value) == null ? void 0 : N.toString().replace(/\D/g, "")) == null ? void 0 : m.length) ?? 0) >= 5;
|
|
3264
|
+
a("input:valid", I && s);
|
|
3265
3265
|
}, Oe = (s) => {
|
|
3266
3266
|
if (/^[a-zA-Z]$/.test(s.key) && !s.metaKey && !s.ctrlKey) {
|
|
3267
3267
|
s.preventDefault();
|
|
@@ -3269,20 +3269,20 @@ const P1 = ["-", "(", ")", "/", "[", "]", ".", "~"], S1 = (t, e, r) => {
|
|
|
3269
3269
|
}
|
|
3270
3270
|
l.value = s.key;
|
|
3271
3271
|
}, Re = (s) => {
|
|
3272
|
-
var h,
|
|
3272
|
+
var h, I, N, m;
|
|
3273
3273
|
a("update:selected-country", s);
|
|
3274
|
-
const
|
|
3275
|
-
if (k(s) && !
|
|
3276
|
-
let
|
|
3277
|
-
const _ =
|
|
3278
|
-
$.value = R, f($.value), u.value = M(_, s), x(
|
|
3274
|
+
const T = (h = u.value) == null ? void 0 : h.toString().startsWith("+");
|
|
3275
|
+
if (k(s) && !T) {
|
|
3276
|
+
let C = new O(s);
|
|
3277
|
+
const _ = C.input(ce((I = u.value) == null ? void 0 : I.toString(), s)), R = he((N = u.value) == null ? void 0 : N.toString(), C.getNumberValue(), s) ?? "";
|
|
3278
|
+
$.value = R, f($.value), u.value = M(_, s), x(C.isValid());
|
|
3279
3279
|
} else {
|
|
3280
|
-
const { displayNumber:
|
|
3280
|
+
const { displayNumber: C, unformattedNumber: _, isValid: R } = ct(
|
|
3281
3281
|
(m = u.value) == null ? void 0 : m.toString(),
|
|
3282
3282
|
s,
|
|
3283
3283
|
d.countries
|
|
3284
3284
|
);
|
|
3285
|
-
$.value = _ ?? "", f($.value), u.value =
|
|
3285
|
+
$.value = _ ?? "", f($.value), u.value = C, x(R);
|
|
3286
3286
|
}
|
|
3287
3287
|
};
|
|
3288
3288
|
return ke(
|
|
@@ -3291,12 +3291,12 @@ const P1 = ["-", "(", ")", "/", "[", "]", ".", "~"], S1 = (t, e, r) => {
|
|
|
3291
3291
|
const s = d.modelValue ?? d.value;
|
|
3292
3292
|
if (s === $.value)
|
|
3293
3293
|
return;
|
|
3294
|
-
const { displayNumber:
|
|
3294
|
+
const { displayNumber: T, country: h, isValid: I } = ct(
|
|
3295
3295
|
s == null ? void 0 : s.toString(),
|
|
3296
3296
|
d.selectedCountry,
|
|
3297
3297
|
d.countries
|
|
3298
3298
|
);
|
|
3299
|
-
h && h !== d.selectedCountry && !y.value && a("update:selected-country", h), u.value = M(
|
|
3299
|
+
h && h !== d.selectedCountry && !y.value && a("update:selected-country", h), u.value = M(T, h), x(I);
|
|
3300
3300
|
},
|
|
3301
3301
|
{ immediate: !0 }
|
|
3302
3302
|
), d.value && Ze(
|
|
@@ -3304,11 +3304,11 @@ const P1 = ["-", "(", ")", "/", "[", "]", ".", "~"], S1 = (t, e, r) => {
|
|
|
3304
3304
|
`The use of "value" prop in "BentoInputFieldPhoneNumber" is no longer supported.
|
|
3305
3305
|
Use the "v-model" or "model-value" property instead.`,
|
|
3306
3306
|
"2.0.0"
|
|
3307
|
-
), (s,
|
|
3307
|
+
), (s, T) => (xt(), Ge(Be(We), je(i.value, {
|
|
3308
3308
|
ref_key: "inputField",
|
|
3309
3309
|
ref: o,
|
|
3310
3310
|
variant: "dropdown",
|
|
3311
|
-
dropdown:
|
|
3311
|
+
dropdown: E.value,
|
|
3312
3312
|
class: "b-input-field-phone-number",
|
|
3313
3313
|
"model-value": u.value,
|
|
3314
3314
|
placeholder: c.value,
|
|
@@ -3331,9 +3331,9 @@ const P1 = ["-", "(", ")", "/", "[", "]", ".", "~"], S1 = (t, e, r) => {
|
|
|
3331
3331
|
_: 3
|
|
3332
3332
|
}, 16, ["dropdown", "model-value", "placeholder"]));
|
|
3333
3333
|
}
|
|
3334
|
-
}), B1 = /* @__PURE__ */ Qe(_1, [["__scopeId", "data-v-
|
|
3334
|
+
}), B1 = /* @__PURE__ */ Qe(_1, [["__scopeId", "data-v-0e0337f6"]]);
|
|
3335
3335
|
export {
|
|
3336
3336
|
I1 as B,
|
|
3337
3337
|
B1 as i
|
|
3338
3338
|
};
|
|
3339
|
-
//# sourceMappingURL=input-field-phone-number.
|
|
3339
|
+
//# sourceMappingURL=input-field-phone-number.Cailj_71.js.map
|