@adyen/bento-vue3 1.54.2 → 1.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/index.d.ts +20 -2
- package/dist/action-bar.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/dashboard-section.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/focus-trap.css +1 -1
- package/dist/assets/input-field-phone-number.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/link.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/popper-container.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/tabs.css +1 -1
- package/dist/assets/teleport.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.CUDi5Po7.js → action-bar.CDOaDenE.js} +5 -5
- package/dist/chunks/{action-bar.CUDi5Po7.js.map → action-bar.CDOaDenE.js.map} +1 -1
- package/dist/chunks/{alert.DEf0borp.js → alert.4SefwHLO.js} +2 -2
- package/dist/chunks/{alert.DEf0borp.js.map → alert.4SefwHLO.js.map} +1 -1
- package/dist/chunks/{base-modal.BegK8cPb.js → base-modal.DZy1WuJs.js} +5 -5
- package/dist/chunks/{base-modal.BegK8cPb.js.map → base-modal.DZy1WuJs.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.CcoKss9T.js → button-actions-with-menu.DQRTu42W.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.CcoKss9T.js.map → button-actions-with-menu.DQRTu42W.js.map} +1 -1
- package/dist/chunks/{button-actions.CdlXZ29B.js → button-actions.N99QthUv.js} +2 -2
- package/dist/chunks/{button-actions.CdlXZ29B.js.map → button-actions.N99QthUv.js.map} +1 -1
- package/dist/chunks/{button.6HMG0xEY.js → button.DEVuqLVT.js} +2 -2
- package/dist/chunks/button.DEVuqLVT.js.map +1 -0
- package/dist/chunks/{calendar.BRsV4rkQ.js → calendar.CNt90BvO.js} +2 -2
- package/dist/chunks/calendar.CNt90BvO.js.map +1 -0
- package/dist/chunks/{card.C5bSqYsB.js → card.E2xhS_6Z.js} +2 -2
- package/dist/chunks/{card.C5bSqYsB.js.map → card.E2xhS_6Z.js.map} +1 -1
- package/dist/chunks/{checkbox-group.D235-2lq.js → checkbox-group.BMzsgOeI.js} +4 -4
- package/dist/chunks/{checkbox-group.D235-2lq.js.map → checkbox-group.BMzsgOeI.js.map} +1 -1
- package/dist/chunks/{checkbox.Dts62P-X.js → checkbox.BIaD03Bg.js} +17 -17
- package/dist/chunks/{checkbox.Dts62P-X.js.map → checkbox.BIaD03Bg.js.map} +1 -1
- package/dist/chunks/{code-snippet.BPZLkv_Z.js → code-snippet.DJgiqDzZ.js} +6 -6
- package/dist/chunks/{code-snippet.BPZLkv_Z.js.map → code-snippet.DJgiqDzZ.js.map} +1 -1
- package/dist/chunks/{controls-group.DcbOWqxA.js → controls-group.DJqvAWte.js} +2 -2
- package/dist/chunks/{controls-group.DcbOWqxA.js.map → controls-group.DJqvAWte.js.map} +1 -1
- package/dist/chunks/{copy.CFhrpASp.js → copy.MId-I684.js} +11 -11
- package/dist/chunks/{copy.CFhrpASp.js.map → copy.MId-I684.js.map} +1 -1
- package/dist/chunks/dashboard-section.CrbSjoA8.js +165 -0
- package/dist/chunks/dashboard-section.CrbSjoA8.js.map +1 -0
- package/dist/chunks/{dashed-underline.BYAXhfnX.js → dashed-underline.DWhGZIhS.js} +3 -3
- package/dist/chunks/{dashed-underline.BYAXhfnX.js.map → dashed-underline.DWhGZIhS.js.map} +1 -1
- package/dist/chunks/data-grid-template.LlK-7o84.js +93 -0
- package/dist/chunks/data-grid-template.LlK-7o84.js.map +1 -0
- package/dist/chunks/data-grid.CsyayKK3.js +3490 -0
- package/dist/chunks/data-grid.CsyayKK3.js.map +1 -0
- package/dist/chunks/{date-picker.DU9L_7lU.js → date-picker.CjwoOQ3B.js} +5 -5
- package/dist/chunks/{date-picker.DU9L_7lU.js.map → date-picker.CjwoOQ3B.js.map} +1 -1
- package/dist/chunks/{date-range-picker.LJJE3q1u.js → date-range-picker.DGY91Rwc.js} +27 -24
- package/dist/chunks/date-range-picker.DGY91Rwc.js.map +1 -0
- package/dist/chunks/{dialog-page.CXQafL9G.js → dialog-page.BRlAYf5w.js} +2 -2
- package/dist/chunks/{dialog-page.CXQafL9G.js.map → dialog-page.BRlAYf5w.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.CwsgzDpx.js → dropdown-default-textbox.CTyt2klK.js} +30 -30
- package/dist/chunks/{dropdown-default-textbox.CwsgzDpx.js.map → dropdown-default-textbox.CTyt2klK.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.Deu1Ekpp.js → dropdown-tag.CJtSH5cZ.js} +3 -3
- package/dist/chunks/{dropdown-tag.Deu1Ekpp.js.map → dropdown-tag.CJtSH5cZ.js.map} +1 -1
- package/dist/chunks/{dropdown.BAwhx8jI.js → dropdown.CQvyjn6d.js} +8 -8
- package/dist/chunks/{dropdown.BAwhx8jI.js.map → dropdown.CQvyjn6d.js.map} +1 -1
- package/dist/chunks/{empty-state.BffIZp3a.js → empty-state.m0U14LVw.js} +2 -2
- package/dist/chunks/{empty-state.BffIZp3a.js.map → empty-state.m0U14LVw.js.map} +1 -1
- package/dist/chunks/{error-message.DH8Er2JS.js → error-message.CMgsMDny.js} +2 -2
- package/dist/chunks/{error-message.DH8Er2JS.js.map → error-message.CMgsMDny.js.map} +1 -1
- package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
- package/dist/chunks/{file-uploader.DkQDzuzC.js → file-uploader.D3KUe-MO.js} +5 -5
- package/dist/chunks/{file-uploader.DkQDzuzC.js.map → file-uploader.D3KUe-MO.js.map} +1 -1
- package/dist/chunks/{filter-bar.CqO88Dv2.js → filter-bar.cRJmUX-v.js} +30 -27
- package/dist/chunks/filter-bar.cRJmUX-v.js.map +1 -0
- package/dist/chunks/{fixed-scroller.Bfk75Nei.js → fixed-scroller.BNP4SR5J.js} +2 -2
- package/dist/chunks/{fixed-scroller.Bfk75Nei.js.map → fixed-scroller.BNP4SR5J.js.map} +1 -1
- package/dist/chunks/{focus-trap.BFCzfiI_.js → focus-trap.D9cfQpl7.js} +6 -6
- package/dist/chunks/{focus-trap.BFCzfiI_.js.map → focus-trap.D9cfQpl7.js.map} +1 -1
- package/dist/chunks/{footer-actions.A9H5F5D-.js → footer-actions.DmGDpPBW.js} +3 -3
- package/dist/chunks/{footer-actions.A9H5F5D-.js.map → footer-actions.DmGDpPBW.js.map} +1 -1
- package/dist/chunks/{form-layout-title.BWCOZyay.js → form-layout-title.P5ajTo4C.js} +2 -2
- package/dist/chunks/{form-layout-title.BWCOZyay.js.map → form-layout-title.P5ajTo4C.js.map} +1 -1
- package/dist/chunks/{header-with-views.f5wHqHsF.js → header-with-views.BJIQZVAq.js} +13 -13
- package/dist/chunks/{header-with-views.f5wHqHsF.js.map → header-with-views.BJIQZVAq.js.map} +1 -1
- package/dist/chunks/{header.CoyUQXFL.js → header.vHSsdURt.js} +4 -4
- package/dist/chunks/{header.CoyUQXFL.js.map → header.vHSsdURt.js.map} +1 -1
- package/dist/chunks/i18n.D9azDLPe.js.map +1 -1
- package/dist/chunks/{info-icon-with-popover.CBi7CmUZ.js → info-icon-with-popover.CXaaxjeT.js} +2 -2
- package/dist/chunks/{info-icon-with-popover.CBi7CmUZ.js.map → info-icon-with-popover.CXaaxjeT.js.map} +1 -1
- package/dist/chunks/{info-icon.Bomzzcc5.js → info-icon.7uhGVIn5.js} +2 -2
- package/dist/chunks/{info-icon.Bomzzcc5.js.map → info-icon.7uhGVIn5.js.map} +1 -1
- package/dist/chunks/{input-field-password.DXIJ0Z3R.js → input-field-password.CWr26esx.js} +6 -6
- package/dist/chunks/{input-field-password.DXIJ0Z3R.js.map → input-field-password.CWr26esx.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.KS95qk92.js → input-field-phone-number.zf8WxBCn.js} +8 -12
- package/dist/chunks/{input-field-phone-number.KS95qk92.js.map → input-field-phone-number.zf8WxBCn.js.map} +1 -1
- package/dist/chunks/{input-field.DcudjNKs.js → input-field.CR262X1w.js} +3 -3
- package/dist/chunks/{input-field.DcudjNKs.js.map → input-field.CR262X1w.js.map} +1 -1
- package/dist/chunks/{inspector.types.Fs9URmPq.js → inspector.types.YK45k4D_.js} +3 -3
- package/dist/chunks/{inspector.types.Fs9URmPq.js.map → inspector.types.YK45k4D_.js.map} +1 -1
- package/dist/chunks/keyboard-navigation.CqgGzfZQ.js.map +1 -1
- package/dist/chunks/{listbox-option-tag.CqnkZr9x.js → listbox-option-tag.BJh2kEN1.js} +2 -2
- package/dist/chunks/{listbox-option-tag.CqnkZr9x.js.map → listbox-option-tag.BJh2kEN1.js.map} +1 -1
- package/dist/chunks/{menu.P_KG1J8b.js → menu.CVMSGvtb.js} +5 -6
- package/dist/chunks/menu.CVMSGvtb.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.DxuMKagz.js → modal-fullscreen.Cqlf6PWo.js} +5 -5
- package/dist/chunks/{modal-fullscreen.DxuMKagz.js.map → modal-fullscreen.Cqlf6PWo.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DfzxXSwn.js → modal.vue_vue_type_script_setup_true_lang.dXxru4S9.js} +5 -5
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DfzxXSwn.js.map → modal.vue_vue_type_script_setup_true_lang.dXxru4S9.js.map} +1 -1
- package/dist/chunks/{pagination.DzwiWHUO.js → pagination.C65tc-nX.js} +3 -3
- package/dist/chunks/{pagination.DzwiWHUO.js.map → pagination.C65tc-nX.js.map} +1 -1
- package/dist/chunks/{popover.Csq1gQ6T.js → popover.DjbACET6.js} +4 -4
- package/dist/chunks/{popover.Csq1gQ6T.js.map → popover.DjbACET6.js.map} +1 -1
- package/dist/chunks/{popper-container.DnlxQ9eS.js → popper-container.CDsbQiOS.js} +3 -3
- package/dist/chunks/{popper-container.DnlxQ9eS.js.map → popper-container.CDsbQiOS.js.map} +1 -1
- package/dist/chunks/{promo-banner.CN-TTSov.js → promo-banner.ZCfJQh-S.js} +2 -2
- package/dist/chunks/{promo-banner.CN-TTSov.js.map → promo-banner.ZCfJQh-S.js.map} +1 -1
- package/dist/chunks/{radio-group.Vm-hmL1q.js → radio-group.Tgf3BF5X.js} +4 -4
- package/dist/chunks/{radio-group.Vm-hmL1q.js.map → radio-group.Tgf3BF5X.js.map} +1 -1
- package/dist/chunks/{search-bar.SNqRBGY7.js → search-bar.CTn5DIQZ.js} +3 -3
- package/dist/chunks/{search-bar.SNqRBGY7.js.map → search-bar.CTn5DIQZ.js.map} +1 -1
- package/dist/chunks/{secondary-nav.DKXHuspN.js → secondary-nav.CnE-aV2P.js} +2 -2
- package/dist/chunks/{secondary-nav.DKXHuspN.js.map → secondary-nav.CnE-aV2P.js.map} +1 -1
- package/dist/chunks/{segmented-control.DBy-nbYM.js → segmented-control.Dg_ktsiS.js} +2 -2
- package/dist/chunks/{segmented-control.DBy-nbYM.js.map → segmented-control.Dg_ktsiS.js.map} +1 -1
- package/dist/chunks/{selection-card-group.D9dyC6Z_.js → selection-card-group.C2OFZgKd.js} +11 -11
- package/dist/chunks/{selection-card-group.D9dyC6Z_.js.map → selection-card-group.C2OFZgKd.js.map} +1 -1
- package/dist/chunks/{sidepanel.Ds2CCG9L.js → sidepanel.Drn-lKR3.js} +5 -5
- package/dist/chunks/{sidepanel.Ds2CCG9L.js.map → sidepanel.Drn-lKR3.js.map} +1 -1
- package/dist/chunks/{structured-list-item.CygGTBVl.js → structured-list-item.CWiwoP5F.js} +5 -5
- package/dist/chunks/{structured-list-item.CygGTBVl.js.map → structured-list-item.CWiwoP5F.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.DzvuP-NU.js → summary-grid.types.DOYW579A.js} +5 -5
- package/dist/chunks/{summary-grid.types.DzvuP-NU.js.map → summary-grid.types.DOYW579A.js.map} +1 -1
- package/dist/chunks/tabs.DZk78MLK.js +266 -0
- package/dist/chunks/tabs.DZk78MLK.js.map +1 -0
- package/dist/chunks/{tag.C4SGN5Eb.js → tag.CmYkknFj.js} +2 -2
- package/dist/chunks/{tag.C4SGN5Eb.js.map → tag.CmYkknFj.js.map} +1 -1
- package/dist/chunks/{teleport.DfTpEQBR.js → teleport.zSiKZmRE.js} +5 -5
- package/dist/chunks/teleport.zSiKZmRE.js.map +1 -0
- package/dist/chunks/{textarea.bQwvvIkq.js → textarea.CR7su54i.js} +3 -3
- package/dist/chunks/{textarea.bQwvvIkq.js.map → textarea.CR7su54i.js.map} +1 -1
- package/dist/chunks/{timeline-item.Bxt_pNII.js → timeline-item.BhQp0ICP.js} +6 -6
- package/dist/chunks/{timeline-item.Bxt_pNII.js.map → timeline-item.BhQp0ICP.js.map} +1 -1
- package/dist/chunks/{toast.7D23cICy.js → toast.DxVfamh-.js} +2 -2
- package/dist/chunks/{toast.7D23cICy.js.map → toast.DxVfamh-.js.map} +1 -1
- package/dist/chunks/{toggle-button.7iAfO6Xx.js → toggle-button.D-9TFTy8.js} +2 -2
- package/dist/chunks/{toggle-button.7iAfO6Xx.js.map → toggle-button.D-9TFTy8.js.map} +1 -1
- package/dist/chunks/{tooltip.CyQxprBQ.js → tooltip.BkBDReK0.js} +2 -2
- package/dist/chunks/{tooltip.CyQxprBQ.js.map → tooltip.BkBDReK0.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BtVT3Ltg.js → tutorial.vue_vue_type_script_setup_true_lang.ENhKvQLv.js} +5 -5
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BtVT3Ltg.js.map → tutorial.vue_vue_type_script_setup_true_lang.ENhKvQLv.js.map} +1 -1
- package/dist/chunks/use-cached-selected-values.CQKeFUJd.js +1475 -0
- package/dist/chunks/use-cached-selected-values.CQKeFUJd.js.map +1 -0
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +54 -54
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +13 -13
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +8 -4
- package/dist/styles/bento-light.css +8 -4
- package/dist/styles/bento.css +8 -4
- package/dist/styles/legacy.css +8 -5
- package/dist/styles/styleguide.css +8 -4
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +4 -4
- package/dist/chunks/button.6HMG0xEY.js.map +0 -1
- package/dist/chunks/calendar.BRsV4rkQ.js.map +0 -1
- package/dist/chunks/dashboard-section.DpL72ax7.js +0 -167
- package/dist/chunks/dashboard-section.DpL72ax7.js.map +0 -1
- package/dist/chunks/data-grid-template.CJxPIu3E.js +0 -93
- package/dist/chunks/data-grid-template.CJxPIu3E.js.map +0 -1
- package/dist/chunks/data-grid.jRydtYyG.js +0 -3380
- package/dist/chunks/data-grid.jRydtYyG.js.map +0 -1
- package/dist/chunks/date-range-picker.LJJE3q1u.js.map +0 -1
- package/dist/chunks/filter-bar.CqO88Dv2.js.map +0 -1
- package/dist/chunks/menu.P_KG1J8b.js.map +0 -1
- package/dist/chunks/tabs.B8BRqQpv.js +0 -272
- package/dist/chunks/tabs.B8BRqQpv.js.map +0 -1
- package/dist/chunks/teleport.DfTpEQBR.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.DGfnlqdi.js +0 -1455
- package/dist/chunks/use-cached-selected-values.DGfnlqdi.js.map +0 -1
package/dist/chunks/{info-icon-with-popover.CBi7CmUZ.js → info-icon-with-popover.CXaaxjeT.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as P, ref as n, createElementBlock as u, openBlock as c, createVNode as m, createBlock as b, createCommentVNode as d, unref as e, withCtx as v, renderSlot as h, toDisplayString as x } from "vue";
|
|
2
|
-
import { B as r } from "./popover.
|
|
2
|
+
import { B as r } from "./popover.DjbACET6.js";
|
|
3
3
|
import { B as T } from "./typography.DN5eC5ch.js";
|
|
4
4
|
import { u as B } from "./i18n.D9azDLPe.js";
|
|
5
5
|
import { g as E } from "./generate-uid.NJ8tVoha.js";
|
|
@@ -94,4 +94,4 @@ const _ = {
|
|
|
94
94
|
export {
|
|
95
95
|
Y as I
|
|
96
96
|
};
|
|
97
|
-
//# sourceMappingURL=info-icon-with-popover.
|
|
97
|
+
//# sourceMappingURL=info-icon-with-popover.CXaaxjeT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info-icon-with-popover.
|
|
1
|
+
{"version":3,"file":"info-icon-with-popover.CXaaxjeT.js","sources":["../../../vue2/src/components/internal/info-icon-with-popover/info-icon-with-popover.vue"],"sourcesContent":["<template>\n <div\n ref=\"infoIconRef\"\n class=\"b-info-icon-with-popover\"\n tabindex=\"0\"\n data-testid=\"info-icon-with-popover\"\n @mouseenter=\"openPopover\"\n @mouseleave=\"closePopover\"\n @focus=\"infoIconOnFocus\"\n @focusout=\"infoIconOnFocusOut\"\n >\n <info-icon\n ref=\"targetElement\"\n class=\"b-info-icon-with-popover__svg\"\n :aria-expanded=\"isOpen\"\n :aria-describedby=\"popoverId\"\n :svg-title=\"t('moreInformation')\"\n />\n <bento-popover\n v-if=\"targetElement\"\n :open=\"isOpen\"\n :target-element=\"targetElement\"\n :position=\"popoverPosition\"\n role=\"tooltip\"\n fit-content\n disable-focus-trap\n >\n <bento-typography>\n <slot>\n <div v-if=\"popoverText\">\n {{ popoverText }}\n </div>\n </slot>\n </bento-typography>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '@/components/typography';\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import InfoIcon from '@adyen/ui-assets-icons-16/vue/info';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const CLOSING_POPOVER_DELAY_MS = 200;\n\n defineProps({\n /**\n * Text showed in the popover on hover\n */\n popoverText: { type: String, default: null },\n\n /**\n * Position the popover should take if space is available\n */\n popoverPosition: {\n type: BentoPopover.props.position.type,\n default: BentoPopover.props.position.default,\n validator: BentoPopover.props.position.validator,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const infoIconRef = ref<HTMLDivElement>();\n const targetElement = ref(null);\n const popoverId = generateUid('bento-info-icon-with-popover');\n const isOpen = ref();\n const closingTimeOutId = ref();\n\n const openPopover = () => {\n isOpen.value = true;\n if (closingTimeOutId.value) {\n clearTimeout(closingTimeOutId.value);\n }\n };\n const closePopover = () => {\n // We want to delay closing for a couple of seconds so\n // it doesn't flicker if a user hovers over the icon and then inside the popover.\n const timeOutId = setTimeout(() => {\n isOpen.value = false;\n }, CLOSING_POPOVER_DELAY_MS);\n closingTimeOutId.value = timeOutId;\n };\n\n const infoIconOnFocus = () => {\n openPopover();\n };\n\n /**\n * Only close popover on blur if the newly focus element is not a child of this element\n * @param e - the event that contains the newly focused element\n */\n const infoIconOnFocusOut = (e: FocusEvent) => {\n if (\n !infoIconRef.value ||\n !(e?.relatedTarget instanceof Element) ||\n !infoIconRef.value.contains(e.relatedTarget)\n ) {\n closePopover();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to be used whenever an info icon needs to be rendered with a popover instead of a tooltip.\n *\n * @example\n * import { BentoInfoIconWithPopover } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoInfoIconWithPopover },\n * template: `\n * <info-icon-with-popover popover-text=\"Content can be passed as a string like\" :popover-position=\"position\">\n * Content can also be rendered as a slot\n * </info-icon-with-popover>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./info-icon-with-popover.scss\" />\n"],"names":["__default__","messages","t","useI18n","infoIconRef","ref","targetElement","popoverId","generateUid","isOpen","closingTimeOutId","openPopover","closePopover","timeOutId","infoIconOnFocus","infoIconOnFocusOut","e"],"mappings":";;;;;;;;;;;;;;;;;;mBA6HIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;AA5DA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,IAAAC,EAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAC,EAAA,8BAAA,GACAC,IAAAJ,EAAA,GACAK,IAAAL,EAAA,GAEAM,IAAA,MAAA;AACI,MAAAF,EAAA,QAAA,IACAC,EAAA,SACI,aAAAA,EAAA,KAAA;AAAA,IACJ,GAEJE,IAAA,MAAA;AAGI,YAAAC,IAAA,WAAA,MAAA;AACI,QAAAJ,EAAA,QAAA;AAAA,MAAe,GAAA,GAAA;AAEnB,MAAAC,EAAA,QAAAG;AAAA,IAAyB,GAG7BC,IAAA,MAAA;AACI,MAAAH,EAAA;AAAA,IAAY,GAOhBI,IAAA,CAAAC,MAAA;AACI,OAAA,CAAAZ,EAAA,SAAA,GAAAY,KAAA,gBAAAA,EAAA,0BAAA,YAAA,CAAAZ,EAAA,MAAA,SAAAY,EAAA,aAAA,MAKIJ,EAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as n, resolveComponent as r, resolveDirective as s, withDirectives as p, createElementBlock as c, openBlock as a, createVNode as l } from "vue";
|
|
2
2
|
import { c as t } from "./popper-container.types.BCZMbVFD.js";
|
|
3
3
|
import "./events.FNmSWp_P.js";
|
|
4
|
-
import { B as m } from "./tooltip.
|
|
4
|
+
import { B as m } from "./tooltip.BkBDReK0.js";
|
|
5
5
|
import { I as f } from "./info.HK3R7Drc.js";
|
|
6
6
|
import { _ } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
7
7
|
import "../assets/info-icon.css";
|
|
@@ -42,4 +42,4 @@ const k = /* @__PURE__ */ _(d, [["render", u], ["__scopeId", "data-v-b474d243"]]
|
|
|
42
42
|
export {
|
|
43
43
|
k as B
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=info-icon.
|
|
45
|
+
//# sourceMappingURL=info-icon.7uhGVIn5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info-icon.
|
|
1
|
+
{"version":3,"file":"info-icon.7uhGVIn5.js","sources":["../../../vue2/src/components/info-icon/info-icon.vue"],"sourcesContent":["<template>\n <span v-bento-tooltip-directive:[tooltipPosition]=\"tooltipText\" :aria-label=\"tooltipText\" class=\"b-info-icon\">\n <info-icon :svg-title=\"tooltipText\" class=\"b-info-icon__svg\" />\n </span>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { PopperContainerPosition } from '@/components/popper-container';\n import { BentoTooltipDirective } from '@/directives';\n import InfoIcon from '@adyen/ui-assets-icons-16/vue/info';\n\n /**\n * @example\n * import { BentoInfoIcon } from '@adyen/adl-vue-components';\n *\n * export default {\n * components: { BentoInfoIcon },\n * template: `\n * <bento-info-icon tooltip-text=\"Text on hover\" />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-info-icon',\n components: { InfoIcon },\n directives: { BentoTooltipDirective },\n props: {\n /**\n * Text showed in the info-icon tooltip on hover\n */\n tooltipText: { type: String, required: true },\n\n /**\n * Position the tooltip should take if space is available. Defaults to 'auto'\n */\n tooltipPosition: {\n type: String as PropType<PopperContainerPosition | `${PopperContainerPosition}`>,\n default: PopperContainerPosition.AUTO,\n validator: (value: PopperContainerPosition) => Object.values(PopperContainerPosition).includes(value),\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/info-icon/info-icon.scss\" />\n"],"names":["_sfc_main","defineComponent","InfoIcon","BentoTooltipDirective","PopperContainerPosition","value","_ctx"],"mappings":";;;;;;;AAuBI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,UAAAC,EAAA;AAAA,EACiB,YAAA,EAAA,uBAAAC,EAAA;AAAA,EACa,OAAA;AAAA;AAAA;AAAA;AAAA,IAC7B,aAAA,EAAA,MAAA,QAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAIyC,iBAAA;AAAA,MAK3B,MAAA;AAAA,MACP,SAAAC,EAAA;AAAA,MAC2B,WAAA,CAAAC,MAAA,OAAA,OAAAD,CAAA,EAAA,SAAAC,CAAA;AAAA,IACmE;AAAA,EACxG;AAER,CAAA;;;;IAzC6G,cAAAC,EAAA;AAAA,IACzG,OAAA;AAAA,EAAA,GAAA;AAAA;MAA4D,aAAAA,EAAA;AAAA,MAFpE,OAAA;AAAA,IAAA,GAAA,MAAA,GAAA,CAAA,WAAA,CAAA;AAAA;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as de, useAttrs as ce, ref as o, provide as ue, computed as c, watch as K, createElementBlock as C, openBlock as s, createVNode as R, createBlock as u, createCommentVNode as v, unref as i, mergeProps as pe, createSlots as ve, withCtx as p, createTextVNode as L, toDisplayString as h, createElementVNode as T, normalizeClass as j, Fragment as fe, renderList as me } from "vue";
|
|
2
|
-
import { B as _e } from "./button.
|
|
2
|
+
import { B as _e } from "./button.DEVuqLVT.js";
|
|
3
3
|
import { _ as ge } from "./image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js";
|
|
4
|
-
import { B as he } from "./input-field.
|
|
5
|
-
import { B as Ee } from "./popover.
|
|
4
|
+
import { B as he } from "./input-field.CR262X1w.js";
|
|
5
|
+
import { B as Ee } from "./popover.DjbACET6.js";
|
|
6
6
|
import { B as O } from "./typography.DN5eC5ch.js";
|
|
7
7
|
import { C as be } from "./checkmark-circle-fill.jicbqe7k.js";
|
|
8
8
|
import { D as ke } from "./dot.BW-xtyjC.js";
|
|
@@ -10,8 +10,8 @@ import { S as we, H as ye } from "./show.ByWWaogc.js";
|
|
|
10
10
|
import { d as Ce, w as Re } from "./index.BzJQl-2M.js";
|
|
11
11
|
import { u as Le } from "./i18n.D9azDLPe.js";
|
|
12
12
|
import { g as G } from "./generate-uid.NJ8tVoha.js";
|
|
13
|
-
import { b as Te } from "./dropdown.
|
|
14
|
-
import { T as Ie } from "./tooltip.
|
|
13
|
+
import { b as Te } from "./dropdown.CQvyjn6d.js";
|
|
14
|
+
import { T as Ie } from "./tooltip.BkBDReK0.js";
|
|
15
15
|
import { _ as Ue } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
16
16
|
import "../assets/input-field-password.css";
|
|
17
17
|
var E = /* @__PURE__ */ ((e) => (e.TEXT = "text", e.PASSWORD = "password", e))(E || {}), b = /* @__PURE__ */ ((e) => (e.MIN_LENGTH = "minLength", e.REQUIRE_LOWERCASE = "requireLowercase", e.REQUIRE_NUMERIC = "requireNumeric", e.REQUIRE_SPECIAL_CHARACTER = "requireSpecialCharacter", e.REQUIRE_UPPERCASE = "requireUppercase", e))(b || {});
|
|
@@ -340,4 +340,4 @@ export {
|
|
|
340
340
|
Pe as m,
|
|
341
341
|
Ve as r
|
|
342
342
|
};
|
|
343
|
-
//# sourceMappingURL=input-field-password.
|
|
343
|
+
//# sourceMappingURL=input-field-password.CWr26esx.js.map
|
package/dist/chunks/{input-field-password.DXIJ0Z3R.js.map → input-field-password.CWr26esx.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-field-password.DXIJ0Z3R.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';\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: any[]) => boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n additionalArgs?: any[];\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 list: BentoInputFieldPasswordValidationListItem[];\n}\n\nexport interface BentoInputFieldPasswordProps {\n /**\n * Reduces height of the input\n */\n condensed?: BentoInputFieldProps['condensed'];\n\n /**\n * Disables the possibility of changing value in the input-field\n */\n disabled?: BentoInputFieldProps['disabled'];\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 * Renders input-field with an error state and the error message beneath the input box\n */\n errorMessage?: BentoInputFieldProps['errorMessage'];\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder?: BentoInputFieldProps['placeholder'];\n\n /**\n * Setting this property to true will set the input field to read only state.\n */\n readonly?: BentoInputFieldProps['readonly'];\n\n /**\n * Text displayed as the value of the input-field\n */\n value?: BentoInputFieldProps['value'];\n\n /**\n * Label to be shown with the input field\n */\n label?: string;\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 * - `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 { 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 @input=\"onInput\"\n @keydown=\"checkCapsLock\"\n @keyup=\"checkCapsLock\"\n >\n <template #default>{{ label }}</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 ></bento-image>\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 ></tooltip>\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\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=\"(validation, index) in computedValidations.list\"\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 {{ validation.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 BentoInputFieldPasswordErrorsList,\n type BentoInputFieldPasswordProps,\n BentoInputFieldPasswordType,\n BentoInputFieldPasswordValidation,\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, 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 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 DEBOUNCE_DURATION = 500;\n const DEBOUNCE_MAX_WAIT = 2000;\n const TOOLTIP_TIMEOUT = 2000;\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = withDefaults(defineProps<BentoInputFieldPasswordProps>(), {\n condensed: false,\n disabled: false,\n disableValidation: false,\n label: null,\n errorMessage: null,\n placeholder: '',\n readonly: false,\n validation: undefined,\n value: undefined,\n withHint: true,\n });\n\n const emit = defineEmits<{\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 */\n (e: 'input', value: BentoInputFieldPasswordProps['value']): void;\n }>();\n\n const attrs = useAttrs();\n\n const inputType = ref(BentoInputFieldPasswordType.PASSWORD);\n const inputValue = ref(props.value);\n const isHintDisplayed = ref(false);\n const isTouched = ref(false);\n const passwordValidity = ref<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 validationListId = generateUid('validationListId');\n const validationPopoverId = generateUid('validationPopoverId');\n\n const isPasswordReadable = computed(() => inputType.value === BentoInputFieldPasswordType.TEXT);\n const computedErrorMessage = computed(() => {\n const hasRealTimeValidationErrors = isTouched.value && hasErrors.value;\n const hasAsyncValidationErrors = props.disableValidation && props.errorMessage;\n\n return hasRealTimeValidationErrors || hasAsyncValidationErrors ? props.errorMessage : '';\n });\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: computedErrorMessage.value,\n placeholder: props.placeholder,\n readonly: props.readonly,\n type: inputType.value,\n value: 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 props.validation === undefined\n ? {\n title: t('validationTitle'),\n suggestion: t('validationSuggestion'),\n list: [\n {\n label: t('validationMinLength'),\n key: BentoInputFieldPasswordDefaultRule.MIN_LENGTH,\n validate: minLength,\n },\n {\n label: t('validationRequireLowercase'),\n key: BentoInputFieldPasswordDefaultRule.REQUIRE_LOWERCASE,\n validate: requireLowercase,\n },\n {\n label: t('validationRequireUppercase'),\n key: BentoInputFieldPasswordDefaultRule.REQUIRE_UPPERCASE,\n validate: requireUppercase,\n },\n {\n label: t('validationRequireNumeric'),\n key: BentoInputFieldPasswordDefaultRule.REQUIRE_NUMERIC,\n validate: requireNumeric,\n },\n {\n label: t('validationRequireSpecialCharacter'),\n key: 'requireSpecialCharacter',\n validate: requireSpecialCharacter,\n },\n ],\n }\n : props.validation\n );\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 onInput = (value: string) => {\n if (props.disabled) {\n return;\n }\n\n inputValue.value = value;\n\n emit('input', inputValue.value);\n };\n\n const checkValidity = (value: BentoInputFieldPasswordProps['value']) => {\n const rulesValidityObj = computedValidations.value?.list?.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(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: DEBOUNCE_DURATION, maxWait: DEBOUNCE_MAX_WAIT }\n );\n</script>\n\n<script lang=\"ts\">\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 * title: 'Password must contain at least:',\n * suggestion: 'Avoid using currency symbols or accented letters.',\n * list: [\n * { label: '12 characters', key: 'minLength', validate: minLength, additionalArgs: [12] },\n * { label: '1 lowercase (a-z)', key: 'requireLowercase', validate: requireLowercase },\n * { label: '1 uppercase (A-Z)', key: 'requireUppercase', validate: requireUppercase },\n * { label: '1 numerical (0-9)', key: 'requireNumeric', validate: requireNumeric },\n * { label: '1 special character', key: 'requireSpecialCharacter', validate: requireSpecialCharacter },\n * {\n * label: 'Always true',\n * key: 'alwaysTrue',\n * validate: () => {\n * const example = 'Example';\n *\n * return () => example.length > 1;\n * },\n * },\n * ],\n * }\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-input-field-password',\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","__default__","messages","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","validationListId","generateUid","validationPopoverId","isPasswordReadable","computed","computedErrorMessage","hasRealTimeValidationErrors","hasErrors","hasAsyncValidationErrors","passwordValidityConditionalClass","validity","tooltipConditionalClass","inputFieldArgs","hasValidations","computedValidations","validation","_b","_a","checkCapsLock","e","toggleInputType","onInput","checkValidity","rulesValidityObj","validationItem","customRuleIndex","error","rule","errorsObject","key","handleCapsLockMouseLeave","handleCapsLockMouseEnter","watch","focused2","isCapsLockOn2","watchDebounced","inputValue2"],"mappings":";;;;;;;;;;;;;;;;AAwGY,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;AC7GZ,MAAAE,KAAA;ACEA,SAAAC,EAAAC,GAAA;AACI,UAAAA,KAAA,gBAAAA,EAAA,eAAA;AACJ;AASgB,SAAAC,GAAAD,GAAAE,IAAA,IAAA;AACZ,SAAAH,EAAAC,CAAA,EAAA,UAAAE;AACJ;AAQO,SAAAC,GAAAH,GA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AAxC,EAAA,QAAA;AAAA,IAA2B;AAG/B,WAAAyC,EAAAlC,GAAA,CAAAmC,MAAA;AAEI,MAAAA,MACI9C,EAAA,QAAA,KAIJV,EAAA,sBACIA,EAAA,aACIS,EAAA,QAAA+C,IAEJX,EAAArC,EAAA,KAAA;AAAA,IACJ,CAAA,GAGJ+C,EAAArC,GAAA,CAAAuC,MAAA;AACI,MAAAA,KAMI3C,EAAA,QAAA,IAEAD,EAAA,QAAA,WAAA,MAAA;AACI,QAAAA,EAAA,QAAA,MACAC,EAAA,QAAA;AAAA,MAA2B,GAAA,GAAA,MAT/B,aAAAD,EAAA,KAAA,GAEAA,EAAA,QAAA,MACAC,EAAA,QAAA;AAAA,IAQJ,CAAA,GAGJ4C;AAAA,MAAAlD;AAAA,MACI,CAAAmD,MAAA;AAEI,QAAAd,EAAAc,CAAA,GAEA7B,EAAA,QAGI5B,EAAA,eAAAU,EAAA,KAAA,IAFAV,EAAA,aAAA;AAAA,MAGJ;AAAA;AAAA,MACJ,EAAA,UAAA,KAAA,SAAA,IAAA;AAAA,IAE0D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"input-field-password.CWr26esx.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';\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: any[]) => boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n additionalArgs?: any[];\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 list: BentoInputFieldPasswordValidationListItem[];\n}\n\nexport interface BentoInputFieldPasswordProps {\n /**\n * Reduces height of the input\n */\n condensed?: BentoInputFieldProps['condensed'];\n\n /**\n * Disables the possibility of changing value in the input-field\n */\n disabled?: BentoInputFieldProps['disabled'];\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 * Renders input-field with an error state and the error message beneath the input box\n */\n errorMessage?: BentoInputFieldProps['errorMessage'];\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder?: BentoInputFieldProps['placeholder'];\n\n /**\n * Setting this property to true will set the input field to read only state.\n */\n readonly?: BentoInputFieldProps['readonly'];\n\n /**\n * Text displayed as the value of the input-field\n */\n value?: BentoInputFieldProps['value'];\n\n /**\n * Label to be shown with the input field\n */\n label?: string;\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 * - `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 { 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 @input=\"onInput\"\n @keydown=\"checkCapsLock\"\n @keyup=\"checkCapsLock\"\n >\n <template #default>{{ label }}</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 ></bento-image>\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 ></tooltip>\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\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=\"(validation, index) in computedValidations.list\"\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 {{ validation.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 BentoInputFieldPasswordErrorsList,\n type BentoInputFieldPasswordProps,\n BentoInputFieldPasswordType,\n BentoInputFieldPasswordValidation,\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, 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 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 DEBOUNCE_DURATION = 500;\n const DEBOUNCE_MAX_WAIT = 2000;\n const TOOLTIP_TIMEOUT = 2000;\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = withDefaults(defineProps<BentoInputFieldPasswordProps>(), {\n condensed: false,\n disabled: false,\n disableValidation: false,\n label: null,\n errorMessage: null,\n placeholder: '',\n readonly: false,\n validation: undefined,\n value: undefined,\n withHint: true,\n });\n\n const emit = defineEmits<{\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 */\n (e: 'input', value: BentoInputFieldPasswordProps['value']): void;\n }>();\n\n const attrs = useAttrs();\n\n const inputType = ref(BentoInputFieldPasswordType.PASSWORD);\n const inputValue = ref(props.value);\n const isHintDisplayed = ref(false);\n const isTouched = ref(false);\n const passwordValidity = ref<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 validationListId = generateUid('validationListId');\n const validationPopoverId = generateUid('validationPopoverId');\n\n const isPasswordReadable = computed(() => inputType.value === BentoInputFieldPasswordType.TEXT);\n const computedErrorMessage = computed(() => {\n const hasRealTimeValidationErrors = isTouched.value && hasErrors.value;\n const hasAsyncValidationErrors = props.disableValidation && props.errorMessage;\n\n return hasRealTimeValidationErrors || hasAsyncValidationErrors ? props.errorMessage : '';\n });\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: computedErrorMessage.value,\n placeholder: props.placeholder,\n readonly: props.readonly,\n type: inputType.value,\n value: 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 props.validation === undefined\n ? {\n title: t('validationTitle'),\n suggestion: t('validationSuggestion'),\n list: [\n {\n label: t('validationMinLength'),\n key: BentoInputFieldPasswordDefaultRule.MIN_LENGTH,\n validate: minLength,\n },\n {\n label: t('validationRequireLowercase'),\n key: BentoInputFieldPasswordDefaultRule.REQUIRE_LOWERCASE,\n validate: requireLowercase,\n },\n {\n label: t('validationRequireUppercase'),\n key: BentoInputFieldPasswordDefaultRule.REQUIRE_UPPERCASE,\n validate: requireUppercase,\n },\n {\n label: t('validationRequireNumeric'),\n key: BentoInputFieldPasswordDefaultRule.REQUIRE_NUMERIC,\n validate: requireNumeric,\n },\n {\n label: t('validationRequireSpecialCharacter'),\n key: 'requireSpecialCharacter',\n validate: requireSpecialCharacter,\n },\n ],\n }\n : props.validation\n );\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 onInput = (value: string) => {\n if (props.disabled) {\n return;\n }\n\n inputValue.value = value;\n\n emit('input', inputValue.value);\n };\n\n const checkValidity = (value: BentoInputFieldPasswordProps['value']) => {\n const rulesValidityObj = computedValidations.value?.list?.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(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: DEBOUNCE_DURATION, maxWait: DEBOUNCE_MAX_WAIT }\n );\n</script>\n\n<script lang=\"ts\">\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 * title: 'Password must contain at least:',\n * suggestion: 'Avoid using currency symbols or accented letters.',\n * list: [\n * { label: '12 characters', key: 'minLength', validate: minLength, additionalArgs: [12] },\n * { label: '1 lowercase (a-z)', key: 'requireLowercase', validate: requireLowercase },\n * { label: '1 uppercase (A-Z)', key: 'requireUppercase', validate: requireUppercase },\n * { label: '1 numerical (0-9)', key: 'requireNumeric', validate: requireNumeric },\n * { label: '1 special character', key: 'requireSpecialCharacter', validate: requireSpecialCharacter },\n * {\n * label: 'Always true',\n * key: 'alwaysTrue',\n * validate: () => {\n * const example = 'Example';\n *\n * return () => example.length > 1;\n * },\n * },\n * ],\n * }\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-input-field-password',\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","__default__","messages","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","validationListId","generateUid","validationPopoverId","isPasswordReadable","computed","computedErrorMessage","hasRealTimeValidationErrors","hasErrors","hasAsyncValidationErrors","passwordValidityConditionalClass","validity","tooltipConditionalClass","inputFieldArgs","hasValidations","computedValidations","validation","_b","_a","checkCapsLock","e","toggleInputType","onInput","checkValidity","rulesValidityObj","validationItem","customRuleIndex","error","rule","errorsObject","key","handleCapsLockMouseLeave","handleCapsLockMouseEnter","watch","focused2","isCapsLockOn2","watchDebounced","inputValue2"],"mappings":";;;;;;;;;;;;;;;;AAwGY,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;AC7GZ,MAAAE,KAAA;ACEA,SAAAC,EAAAC,GAAA;AACI,UAAAA,KAAA,gBAAAA,EAAA,eAAA;AACJ;AASgB,SAA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,KAAA,MAAA;AACI,MAAAvC,EAAA,QAAA,IACAD,EAAA,QAAA;AAAA,IAAiC,GAGrCyC,KAAA,MAAA;AACI,MAAAxC,EAAA,QAAA;AAAA,IAA2B;AAG/B,WAAAyC,EAAAlC,GAAA,CAAAmC,MAAA;AAEI,MAAAA,MACI9C,EAAA,QAAA,KAIJV,EAAA,sBACIA,EAAA,aACIS,EAAA,QAAA+C,IAEJX,EAAArC,EAAA,KAAA;AAAA,IACJ,CAAA,GAGJ+C,EAAArC,GAAA,CAAAuC,MAAA;AACI,MAAAA,KAMI3C,EAAA,QAAA,IAEAD,EAAA,QAAA,WAAA,MAAA;AACI,QAAAA,EAAA,QAAA,MACAC,EAAA,QAAA;AAAA,MAA2B,GAAA,GAAA,MAT/B,aAAAD,EAAA,KAAA,GAEAA,EAAA,QAAA,MACAC,EAAA,QAAA;AAAA,IAQJ,CAAA,GAGJ4C;AAAA,MAAAlD;AAAA,MACI,CAAAmD,MAAA;AAEI,QAAAd,EAAAc,CAAA,GAEA7B,EAAA,QAGI5B,EAAA,eAAAU,EAAA,KAAA,IAFAV,EAAA,aAAA;AAAA,MAGJ;AAAA;AAAA,MACJ,EAAA,UAAA,KAAA,SAAA,IAAA;AAAA,IAE0D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/chunks/{input-field-phone-number.KS95qk92.js → input-field-phone-number.zf8WxBCn.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as fe, ref as B, provide as ce, computed as U, onMounted as he, createBlock as ge, openBlock as $t, unref as me, mergeProps as ye, withCtx as ut, createElementBlock as ve, renderSlot as lt, Fragment as Ne, createTextVNode as pe, toDisplayString as Ce, nextTick as be } from "vue";
|
|
2
|
-
import { B as Pe } from "./input-field.
|
|
2
|
+
import { B as Pe } from "./input-field.CR262X1w.js";
|
|
3
3
|
import { u as Se } from "./i18n.D9azDLPe.js";
|
|
4
|
-
import { b as Ee } from "./dropdown.
|
|
4
|
+
import { b as Ee } from "./dropdown.CQvyjn6d.js";
|
|
5
5
|
import { p as Ae } from "./typography.DN5eC5ch.js";
|
|
6
6
|
import { a as Kt, u as xe } from "./use-country-phon-code.DVgE19zT.js";
|
|
7
7
|
import { _ as Ie } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
@@ -2964,13 +2964,9 @@ const Od = ["-", "(", ")", "/", "[", "]", ".", "~"], wd = (e, r, t) => {
|
|
|
2964
2964
|
}, Rd = { AC: "40123", AD: "312345", AE: "501234567", AF: "701234567", AG: "2684641234", AI: "2642351234", AL: "672123456", AM: "77123456", AO: "923123456", AR: "91123456789", AS: "6847331234", AT: "664123456", AU: "412345678", AW: "5601234", AX: "412345678", AZ: "401234567", BA: "61123456", BB: "2462501234", BD: "1812345678", BE: "470123456", BF: "70123456", BG: "43012345", BH: "36001234", BI: "79561234", BJ: "90011234", BL: "690001234", BM: "4413701234", BN: "7123456", BO: "71234567", BQ: "3181234", BR: "11961234567", BS: "2423591234", BT: "17123456", BW: "71123456", BY: "294911911", BZ: "6221234", CA: "5062345678", CC: "412345678", CD: "991234567", CF: "70012345", CG: "061234567", CH: "781234567", CI: "0123456789", CK: "71234", CL: "221234567", CM: "671234567", CN: "13123456789", CO: "3211234567", CR: "83123456", CU: "51234567", CV: "9911234", CW: "95181234", CX: "412345678", CY: "96123456", CZ: "601123456", DE: "15123456789", DJ: "77831001", DK: "34412345", DM: "7672251234", DO: "8092345678", DZ: "551234567", EC: "991234567", EE: "51234567", EG: "1001234567", EH: "650123456", ER: "7123456", ES: "612345678", ET: "911234567", FI: "412345678", FJ: "7012345", FK: "51234", FM: "3501234", FO: "211234", FR: "612345678", GA: "06031234", GB: "7400123456", GD: "4734031234", GE: "555123456", GF: "694201234", GG: "7781123456", GH: "231234567", GI: "57123456", GL: "221234", GM: "3012345", GN: "601123456", GP: "690001234", GQ: "222123456", GR: "6912345678", GT: "51234567", GU: "6713001234", GW: "955012345", GY: "6091234", HK: "51234567", HN: "91234567", HR: "921234567", HT: "34101234", HU: "201234567", ID: "812345678", IE: "850123456", IL: "502345678", IM: "7924123456", IN: "8123456789", IO: "3801234", IQ: "7912345678", IR: "9123456789", IS: "6111234", IT: "3123456789", JE: "7797712345", JM: "8762101234", JO: "790123456", JP: "9012345678", KE: "712123456", KG: "700123456", KH: "91234567", KI: "72001234", KM: "3212345", KN: "8697652917", KP: "1921234567", KR: "1020000000", KW: "50012345", KY: "3453231234", KZ: "7710009998", LA: "2023123456", LB: "71123456", LC: "7582845678", LI: "660234567", LK: "712345678", LR: "770123456", LS: "50123456", LT: "61234567", LU: "628123456", LV: "21234567", LY: "912345678", MA: "650123456", MC: "612345678", MD: "62112345", ME: "67622901", MF: "690001234", MG: "321234567", MH: "2351234", MK: "72345678", ML: "65012345", MM: "92123456", MN: "88123456", MO: "66123456", MP: "6702345678", MQ: "696201234", MR: "22123456", MS: "6644923456", MT: "96961234", MU: "52512345", MV: "7712345", MW: "991234567", MX: "2221234567", MY: "123456789", MZ: "821234567", NA: "811234567", NC: "751234", NE: "93123456", NF: "381234", NG: "8021234567", NI: "81234567", NL: "612345678", NO: "40612345", NP: "9841234567", NR: "5551234", NU: "8884012", NZ: "211234567", OM: "92123456", PA: "61234567", PE: "912345678", PF: "87123456", PG: "70123456", PH: "9051234567", PK: "3012345678", PL: "512345678", PM: "551234", PR: "7872345678", PS: "599123456", PT: "912345678", PW: "6201234", PY: "961456789", QA: "33123456", RE: "692123456", RO: "712034567", RS: "601234567", RU: "9123456789", RW: "720123456", SA: "512345678", SB: "7421234", SC: "2510123", SD: "911231234", SE: "701234567", SG: "81234567", SH: "51234", SI: "31234567", SJ: "41234567", SK: "912123456", SL: "25123456", SM: "66661212", SN: "701234567", SO: "71123456", SR: "7412345", SS: "977123456", ST: "9812345", SV: "70123456", SX: "7215205678", SY: "944567890", SZ: "76123456", TA: "8999", TC: "6492311234", TD: "63012345", TG: "90112345", TH: "812345678", TJ: "917123456", TK: "7290", TL: "77212345", TM: "66123456", TN: "20123456", TO: "7715123", TR: "5012345678", TT: "8682911234", TV: "901234", TW: "912345678", TZ: "621234567", UA: "501234567", UG: "712345678", US: "2015550123", UY: "94231234", UZ: "912345678", VA: "3123456789", VC: "7844301234", VE: "4121234567", VG: "2843001234", VI: "3406421234", VN: "912345678", VU: "5912345", WF: "821234", WS: "7212345", XK: "43201234", YE: "712345678", YT: "639012345", ZA: "711234567", ZM: "955123456", ZW: "712345678" }, rt = (e) => {
|
|
2965
2965
|
var r, t;
|
|
2966
2966
|
return ((t = (r = Kt(e)) == null ? void 0 : r.value) == null ? void 0 : t.split("-")[0]) ?? "";
|
|
2967
|
-
}, Dd = (e) => e.filter((t) =>
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
Ae(
|
|
2971
|
-
`ISO code ${t} is not supported. Please contact the Bento team if this country needs to be added.`
|
|
2972
|
-
);
|
|
2973
|
-
}).map((t) => ({
|
|
2967
|
+
}, Dd = (e) => e.filter((t) => Kt(t).value ? !0 : (Ae(
|
|
2968
|
+
`ISO code ${t} is not supported. Please contact the Bento team if this country needs to be added.`
|
|
2969
|
+
), !1)).map((t) => ({
|
|
2974
2970
|
label: `${xe(t, "en-US").value} ${rt(t)}`,
|
|
2975
2971
|
value: t,
|
|
2976
2972
|
displayValue: `${t} (${rt(t)})`
|
|
@@ -3077,7 +3073,7 @@ const Od = ["-", "(", ")", "/", "[", "]", ".", "~"], wd = (e, r, t) => {
|
|
|
3077
3073
|
n.selectedCountry,
|
|
3078
3074
|
n.countries
|
|
3079
3075
|
);
|
|
3080
|
-
g
|
|
3076
|
+
g !== n.selectedCountry && d("update:selected-country", g), i.value = s;
|
|
3081
3077
|
}), (s, g) => ($t(), ge(me(Pe), ye(n, {
|
|
3082
3078
|
ref_key: "inputField",
|
|
3083
3079
|
ref: a,
|
|
@@ -3103,8 +3099,8 @@ const Od = ["-", "(", ")", "/", "[", "]", ".", "~"], wd = (e, r, t) => {
|
|
|
3103
3099
|
_: 3
|
|
3104
3100
|
}, 16, ["dropdown", "value", "placeholder"]));
|
|
3105
3101
|
}
|
|
3106
|
-
}), Kd = /* @__PURE__ */ Ie(kd, [["__scopeId", "data-v-
|
|
3102
|
+
}), Kd = /* @__PURE__ */ Ie(kd, [["__scopeId", "data-v-aee3ca87"]]);
|
|
3107
3103
|
export {
|
|
3108
3104
|
Kd as i
|
|
3109
3105
|
};
|
|
3110
|
-
//# sourceMappingURL=input-field-phone-number.
|
|
3106
|
+
//# sourceMappingURL=input-field-phone-number.zf8WxBCn.js.map
|