@adyen/bento-vue2 1.89.2 → 1.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +4 -0
- package/dist/@types/index.d.ts +381 -118
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-scroller.js +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-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/draggable-handle.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/field-label.css +1 -0
- 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.css +1 -1
- package/dist/assets/input-time.css +1 -0
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/accordion-item.D0WVCLec.js +145 -0
- package/dist/chunks/{accordion-item.BZDSJamR.js.map → accordion-item.D0WVCLec.js.map} +1 -1
- package/dist/chunks/action-bar.Dj830k6L.js +334 -0
- package/dist/chunks/{action-bar.CYGUYI0V.js.map → action-bar.Dj830k6L.js.map} +1 -1
- package/dist/chunks/{ai-button.CR_ePQRR.js → ai-button.7L9bANlk.js} +2 -2
- package/dist/chunks/{ai-button.CR_ePQRR.js.map → ai-button.7L9bANlk.js.map} +1 -1
- package/dist/chunks/ai-tag.AyG2UWCB.js +110 -0
- package/dist/chunks/{ai-tag.Cjf38mjR.js.map → ai-tag.AyG2UWCB.js.map} +1 -1
- package/dist/chunks/alert.CXRb-Smf.js +160 -0
- package/dist/chunks/{alert.QVQ6Zjbm.js.map → alert.CXRb-Smf.js.map} +1 -1
- package/dist/chunks/{anchor-scroller.CjJ26PJS.js → anchor-scroller.DWaykZQj.js} +66 -39
- package/dist/chunks/{anchor-scroller.CjJ26PJS.js.map → anchor-scroller.DWaykZQj.js.map} +1 -1
- package/dist/chunks/{base-modal.DmWkavtf.js → base-modal.C52VMtnd.js} +104 -67
- package/dist/chunks/{base-modal.DmWkavtf.js.map → base-modal.C52VMtnd.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js → button-actions-with-menu.OsPQ-POD.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js.map → button-actions-with-menu.OsPQ-POD.js.map} +1 -1
- package/dist/chunks/{button-actions.BLk114As.js → button-actions.Bdbu0bvt.js} +222 -148
- package/dist/chunks/{button-actions.BLk114As.js.map → button-actions.Bdbu0bvt.js.map} +1 -1
- package/dist/chunks/{button.DxhJNOtr.js → button.C9b2AC9w.js} +2 -2
- package/dist/chunks/{button.DxhJNOtr.js.map → button.C9b2AC9w.js.map} +1 -1
- package/dist/chunks/{calendar.CXKhBF2f.js → calendar.CqsfThnC.js} +438 -346
- package/dist/chunks/calendar.CqsfThnC.js.map +1 -0
- package/dist/chunks/card.8z7UQeVK.js +165 -0
- package/dist/chunks/{card.GjhsXOT0.js.map → card.8z7UQeVK.js.map} +1 -1
- package/dist/chunks/{checkbox-group.B2BjU3ZN.js → checkbox-group.Dur2Edtw.js} +4 -4
- package/dist/chunks/{checkbox-group.B2BjU3ZN.js.map → checkbox-group.Dur2Edtw.js.map} +1 -1
- package/dist/chunks/{checkbox.CIv8WgGp.js → checkbox.vNjt6QDJ.js} +93 -56
- package/dist/chunks/{checkbox.CIv8WgGp.js.map → checkbox.vNjt6QDJ.js.map} +1 -1
- package/dist/chunks/chip.BFY_-VCz.js +84 -0
- package/dist/chunks/{chip.DTpENaGC.js.map → chip.BFY_-VCz.js.map} +1 -1
- package/dist/chunks/{click-outside.CDz_x8mN.js → click-outside.BG01Sm0A.js} +2 -2
- package/dist/chunks/{click-outside.CDz_x8mN.js.map → click-outside.BG01Sm0A.js.map} +1 -1
- package/dist/chunks/{code-snippet.YIm2oO_o.js → code-snippet.BVpFBhKq.js} +133 -76
- package/dist/chunks/{code-snippet.YIm2oO_o.js.map → code-snippet.BVpFBhKq.js.map} +1 -1
- package/dist/chunks/{controls-group.CqotnNEF.js → controls-group.DSm2Ujwt.js} +2 -2
- package/dist/chunks/{controls-group.CqotnNEF.js.map → controls-group.DSm2Ujwt.js.map} +1 -1
- package/dist/chunks/copy.qqGYFbKJ.js +133 -0
- package/dist/chunks/{copy.BVGQcf22.js.map → copy.qqGYFbKJ.js.map} +1 -1
- package/dist/chunks/{country.D20NCLLG.js → country.BEwW8TQo.js} +3 -3
- package/dist/chunks/{country.D20NCLLG.js.map → country.BEwW8TQo.js.map} +1 -1
- package/dist/chunks/country.types.jjXwaoMl.js +2537 -0
- package/dist/chunks/country.types.jjXwaoMl.js.map +1 -0
- package/dist/chunks/{dashboard-section.BubZyu8i.js → dashboard-section.DNxNVV44.js} +3 -3
- package/dist/chunks/{dashboard-section.BubZyu8i.js.map → dashboard-section.DNxNVV44.js.map} +1 -1
- package/dist/chunks/{dashed-underline.pjYTS0m1.js → dashed-underline.DL2_sik5.js} +3 -3
- package/dist/chunks/{dashed-underline.pjYTS0m1.js.map → dashed-underline.DL2_sik5.js.map} +1 -1
- package/dist/chunks/{data-grid-template.D8RhngPj.js → data-grid-template.BFv1zr6g.js} +4 -4
- package/dist/chunks/{data-grid-template.D8RhngPj.js.map → data-grid-template.BFv1zr6g.js.map} +1 -1
- package/dist/chunks/data-grid.ZHY5EzP3.js +4071 -0
- package/dist/chunks/data-grid.ZHY5EzP3.js.map +1 -0
- package/dist/chunks/date-picker.kl6aFlr1.js +237 -0
- package/dist/chunks/date-picker.kl6aFlr1.js.map +1 -0
- package/dist/chunks/date-range-picker.LCWVAa5R.js +1089 -0
- package/dist/chunks/date-range-picker.LCWVAa5R.js.map +1 -0
- package/dist/chunks/dialog-page.EdejG53a.js +143 -0
- package/dist/chunks/{dialog-page.oyG153fC.js.map → dialog-page.EdejG53a.js.map} +1 -1
- package/dist/chunks/{directive.rXUeDb8p.js → directive.Bfr4fuOy.js} +2 -2
- package/dist/chunks/{directive.rXUeDb8p.js.map → directive.Bfr4fuOy.js.map} +1 -1
- package/dist/chunks/draggable-handle.Ba28eM8o.js +245 -0
- package/dist/chunks/draggable-handle.Ba28eM8o.js.map +1 -0
- package/dist/chunks/{dropdown-tag.BRB-emd1.js → dropdown-tag.B61hPq5n.js} +5 -5
- package/dist/chunks/{dropdown-tag.BRB-emd1.js.map → dropdown-tag.B61hPq5n.js.map} +1 -1
- package/dist/chunks/dropdown.Ca-f8tdX.js +1140 -0
- package/dist/chunks/dropdown.Ca-f8tdX.js.map +1 -0
- package/dist/chunks/{empty-state.D_Ac-XXH.js → empty-state.DMV23IZy.js} +2 -2
- package/dist/chunks/{empty-state.D_Ac-XXH.js.map → empty-state.DMV23IZy.js.map} +1 -1
- package/dist/chunks/error-message.CyERcfdt.js +72 -0
- package/dist/chunks/error-message.CyERcfdt.js.map +1 -0
- package/dist/chunks/field-label.DjjjkcO6.js +97 -0
- package/dist/chunks/field-label.DjjjkcO6.js.map +1 -0
- package/dist/chunks/{file-uploader.D5Rjsx4k.js → file-uploader.DeWmLpfp.js} +751 -469
- package/dist/chunks/{file-uploader.D5Rjsx4k.js.map → file-uploader.DeWmLpfp.js.map} +1 -1
- package/dist/chunks/{filter-bar.zD_ctViU.js → filter-bar.Bd4ghW_B.js} +1596 -1039
- package/dist/chunks/filter-bar.Bd4ghW_B.js.map +1 -0
- package/dist/chunks/fixed-scroller.DR2E_No4.js +148 -0
- package/dist/chunks/{fixed-scroller.MerESbd_.js.map → fixed-scroller.DR2E_No4.js.map} +1 -1
- package/dist/chunks/{footer-actions.CiPj7hZG.js → footer-actions.CvUaoMzj.js} +3 -3
- package/dist/chunks/{footer-actions.CiPj7hZG.js.map → footer-actions.CvUaoMzj.js.map} +1 -1
- package/dist/chunks/form-layout-title.DzGajv4U.js +248 -0
- package/dist/chunks/form-layout-title.DzGajv4U.js.map +1 -0
- package/dist/chunks/{header-meta.Dq6TlNPw.js → header-meta.AXUGoqDd.js} +127 -73
- package/dist/chunks/{header-meta.Dq6TlNPw.js.map → header-meta.AXUGoqDd.js.map} +1 -1
- package/dist/chunks/{header-with-views.DaEhkSS8.js → header-with-views.Ba4dswJF.js} +1121 -680
- package/dist/chunks/{header-with-views.DaEhkSS8.js.map → header-with-views.Ba4dswJF.js.map} +1 -1
- package/dist/chunks/{header.DkC-KKWa.js → header.C7B7RBib.js} +3 -3
- package/dist/chunks/{header.DkC-KKWa.js.map → header.C7B7RBib.js.map} +1 -1
- package/dist/chunks/{info-icon.BF8KxU-k.js → info-icon.DCR42Kvm.js} +2 -2
- package/dist/chunks/{info-icon.BF8KxU-k.js.map → info-icon.DCR42Kvm.js.map} +1 -1
- package/dist/chunks/input-field-password.BNAtIn_D.js +381 -0
- package/dist/chunks/{input-field-password.BKT1mYUw.js.map → input-field-password.BNAtIn_D.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js → input-field-phone-number.CEYx1s4b.js} +98 -71
- package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js.map → input-field-phone-number.CEYx1s4b.js.map} +1 -1
- package/dist/chunks/input-field.Dh5W0Az-.js +211 -0
- package/dist/chunks/input-field.Dh5W0Az-.js.map +1 -0
- package/dist/chunks/input-time.BLuMfakv.js +135 -0
- package/dist/chunks/input-time.BLuMfakv.js.map +1 -0
- package/dist/chunks/inspector.BzBPlz-5.js +172 -0
- package/dist/chunks/{inspector.Bnm0hl_D.js.map → inspector.BzBPlz-5.js.map} +1 -1
- package/dist/chunks/{link.MhoM3zQj.js → link.DB5g6d48.js} +56 -29
- package/dist/chunks/{link.MhoM3zQj.js.map → link.DB5g6d48.js.map} +1 -1
- package/dist/chunks/{list-item.BnzU1LIu.js → list-item.DqTHh8-Z.js} +2 -2
- package/dist/chunks/{list-item.BnzU1LIu.js.map → list-item.DqTHh8-Z.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js → listbox-option-tag.CvbE-EuG.js} +2 -2
- package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js.map → listbox-option-tag.CvbE-EuG.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js → modal-fullscreen.DTvg2NLk.js} +63 -36
- package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js.map → modal-fullscreen.DTvg2NLk.js.map} +1 -1
- package/dist/chunks/{modal.o0KddMiG.js → modal.D_TcWTkf.js} +63 -36
- package/dist/chunks/{modal.o0KddMiG.js.map → modal.D_TcWTkf.js.map} +1 -1
- package/dist/chunks/on-click-outside.Cy1eFULD.js +109 -0
- package/dist/chunks/on-click-outside.Cy1eFULD.js.map +1 -0
- package/dist/chunks/{pagination.ZISqB4M_.js → pagination.D6BxMw5L.js} +221 -99
- package/dist/chunks/{pagination.ZISqB4M_.js.map → pagination.D6BxMw5L.js.map} +1 -1
- package/dist/chunks/promo-banner.Dc_kK1x9.js +91 -0
- package/dist/chunks/{promo-banner.Db2kh2qK.js.map → promo-banner.Dc_kK1x9.js.map} +1 -1
- package/dist/chunks/{radio-group.DnMy7brs.js → radio-group.Bb-L-0io.js} +4 -4
- package/dist/chunks/{radio-group.DnMy7brs.js.map → radio-group.Bb-L-0io.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.Cbv1DxXn.js → rich-text-editor.Dtdfh-0V.js} +1782 -1731
- package/dist/chunks/{rich-text-editor.Cbv1DxXn.js.map → rich-text-editor.Dtdfh-0V.js.map} +1 -1
- package/dist/chunks/search-bar.MVJS9-Mh.js +126 -0
- package/dist/chunks/{search-bar.DPjYDhja.js.map → search-bar.MVJS9-Mh.js.map} +1 -1
- package/dist/chunks/secondary-nav.C-nPZR-2.js +226 -0
- package/dist/chunks/secondary-nav.C-nPZR-2.js.map +1 -0
- package/dist/chunks/{segmented-control.BqIiX9hv.js → segmented-control.DDtjX-V5.js} +2 -2
- package/dist/chunks/{segmented-control.BqIiX9hv.js.map → segmented-control.DDtjX-V5.js.map} +1 -1
- package/dist/chunks/{selection-card-group.IPiouuot.js → selection-card-group.CLJPaknG.js} +3 -3
- package/dist/chunks/{selection-card-group.IPiouuot.js.map → selection-card-group.CLJPaknG.js.map} +1 -1
- package/dist/chunks/{sidepanel.BGMjjB3F.js → sidepanel.BTRfwGiS.js} +66 -39
- package/dist/chunks/{sidepanel.BGMjjB3F.js.map → sidepanel.BTRfwGiS.js.map} +1 -1
- package/dist/chunks/{step.QFER3tSj.js → step.TDm_ts1S.js} +92 -63
- package/dist/chunks/{step.QFER3tSj.js.map → step.TDm_ts1S.js.map} +1 -1
- package/dist/chunks/{structured-list-item.BDJKRC_8.js → structured-list-item.BBBtie1s.js} +58 -31
- package/dist/chunks/{structured-list-item.BDJKRC_8.js.map → structured-list-item.BBBtie1s.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.CIkArZf5.js → summary-grid.types.DUIqCmwg.js} +5 -5
- package/dist/chunks/{summary-grid.types.CIkArZf5.js.map → summary-grid.types.DUIqCmwg.js.map} +1 -1
- package/dist/chunks/{tab.CaXF0dho.js → tab.CNIZyfZt.js} +2 -2
- package/dist/chunks/{tab.CaXF0dho.js.map → tab.CNIZyfZt.js.map} +1 -1
- package/dist/chunks/{tag.CocLKztJ.js → tag.D2xagTJv.js} +2 -2
- package/dist/chunks/{tag.CocLKztJ.js.map → tag.D2xagTJv.js.map} +1 -1
- package/dist/chunks/textarea.CJS-1I41.js +219 -0
- package/dist/chunks/{textarea.D4X6Ss9q.js.map → textarea.CJS-1I41.js.map} +1 -1
- package/dist/chunks/timeline-item.BOUWkLi1.js +322 -0
- package/dist/chunks/{timeline-item.C8BxWdy1.js.map → timeline-item.BOUWkLi1.js.map} +1 -1
- package/dist/chunks/{toast.BRI3G7TL.js → toast.d8vg71CB.js} +81 -54
- package/dist/chunks/{toast.BRI3G7TL.js.map → toast.d8vg71CB.js.map} +1 -1
- package/dist/chunks/{tooltip.CbsNGnhw.js → tooltip.BxtnF3is.js} +38 -36
- package/dist/chunks/tooltip.BxtnF3is.js.map +1 -0
- package/dist/chunks/{tutorial.BzV6bHQJ.js → tutorial.CZt_mcuT.js} +190 -103
- package/dist/chunks/{tutorial.BzV6bHQJ.js.map → tutorial.CZt_mcuT.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.DqX2qsMC.js → use-cached-selected-values.BJbWbkEQ.js} +553 -417
- package/dist/chunks/use-cached-selected-values.BJbWbkEQ.js.map +1 -0
- package/dist/chunks/{use-country-items.CI8C7MLU.js → use-country-items.B4j8pAvW.js} +3 -3
- package/dist/chunks/{use-country-items.CI8C7MLU.js.map → use-country-items.B4j8pAvW.js.map} +1 -1
- package/dist/chunks/use-country-phon-code.ByqnuIni.js +6386 -0
- package/dist/chunks/use-country-phon-code.ByqnuIni.js.map +1 -0
- package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js → use-date-input-formatter.Djf8AoLr.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js.map → use-date-input-formatter.Djf8AoLr.js.map} +1 -1
- package/dist/chunks/use-touch-device.DTqFAbXh.js +11 -0
- package/dist/chunks/use-touch-device.DTqFAbXh.js.map +1 -0
- package/dist/click-outside.js +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +3 -3
- 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.js +1396 -0
- package/dist/draggable.js.map +1 -0
- package/dist/dropdown.js +11 -12
- package/dist/dropdown.js.map +1 -1
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +280 -275
- 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/input-time.js +5 -0
- package/dist/input-time.js.map +1 -0
- package/dist/inspector.js +1 -1
- package/dist/internal.js +26 -25
- package/dist/internal.js.map +1 -1
- package/dist/link.js +1 -1
- package/dist/list.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 +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/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +297 -4
- package/package.json +10 -15
- package/dist/assets/dropdown-default-textbox.css +0 -1
- package/dist/chunks/accordion-item.BZDSJamR.js +0 -108
- package/dist/chunks/action-bar.CYGUYI0V.js +0 -207
- package/dist/chunks/ai-tag.Cjf38mjR.js +0 -73
- package/dist/chunks/alert.QVQ6Zjbm.js +0 -93
- package/dist/chunks/calendar.CXKhBF2f.js.map +0 -1
- package/dist/chunks/card.GjhsXOT0.js +0 -128
- package/dist/chunks/chip.DTpENaGC.js +0 -57
- package/dist/chunks/copy.BVGQcf22.js +0 -86
- package/dist/chunks/country.types.DxKjyd0S.js +0 -20
- package/dist/chunks/country.types.DxKjyd0S.js.map +0 -1
- package/dist/chunks/data-grid.DJG8Ty0A.js +0 -3194
- package/dist/chunks/data-grid.DJG8Ty0A.js.map +0 -1
- package/dist/chunks/date-picker.CnazYcSX.js +0 -155
- package/dist/chunks/date-picker.CnazYcSX.js.map +0 -1
- package/dist/chunks/date-range-picker.Bf9pRNL7.js +0 -811
- package/dist/chunks/date-range-picker.Bf9pRNL7.js.map +0 -1
- package/dist/chunks/debounce.DUTu11PS.js +0 -10
- package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
- package/dist/chunks/dialog-page.oyG153fC.js +0 -116
- package/dist/chunks/dropdown-default-textbox.Dvzg0StF.js +0 -337
- package/dist/chunks/dropdown-default-textbox.Dvzg0StF.js.map +0 -1
- package/dist/chunks/dropdown.Ct7uhPr6.js +0 -696
- package/dist/chunks/dropdown.Ct7uhPr6.js.map +0 -1
- package/dist/chunks/error-message.RxdStT3S.js +0 -106
- package/dist/chunks/error-message.RxdStT3S.js.map +0 -1
- package/dist/chunks/filter-bar.zD_ctViU.js.map +0 -1
- package/dist/chunks/fixed-scroller.MerESbd_.js +0 -111
- package/dist/chunks/form-layout-title.Bw7VgOO5.js +0 -210
- package/dist/chunks/form-layout-title.Bw7VgOO5.js.map +0 -1
- package/dist/chunks/input-field-password.BKT1mYUw.js +0 -234
- package/dist/chunks/input-field.m1PMwa4C.js +0 -170
- package/dist/chunks/input-field.m1PMwa4C.js.map +0 -1
- package/dist/chunks/inspector.Bnm0hl_D.js +0 -105
- package/dist/chunks/on-click-outside.BW4rkhzG.js +0 -91
- package/dist/chunks/on-click-outside.BW4rkhzG.js.map +0 -1
- package/dist/chunks/promo-banner.Db2kh2qK.js +0 -64
- package/dist/chunks/search-bar.DPjYDhja.js +0 -89
- package/dist/chunks/secondary-nav.CwJjkJkj.js +0 -112
- package/dist/chunks/secondary-nav.CwJjkJkj.js.map +0 -1
- package/dist/chunks/textarea.D4X6Ss9q.js +0 -169
- package/dist/chunks/timeline-item.C8BxWdy1.js +0 -238
- package/dist/chunks/tooltip.CbsNGnhw.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.DqX2qsMC.js.map +0 -1
- package/dist/chunks/use-country-phon-code.C6orQNnM.js +0 -291
- package/dist/chunks/use-country-phon-code.C6orQNnM.js.map +0 -1
- package/dist/draggable-handle.js +0 -149
- package/dist/draggable-handle.js.map +0 -1
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { defineComponent as le, useAttrs as de, useSlots as se, computed as r, ref as f, provide as pe, inject as x, toRef as ue, toRefs as ce } from "vue";
|
|
2
|
+
import { b as fe, I as be, c as _e, B as me } from "./dropdown.Ca-f8tdX.js";
|
|
3
|
+
import { p as E, d as L, B as we } from "./typography.C8lPlsbD.js";
|
|
4
|
+
import { u as ye } from "./form-field.D_2g7vaP.js";
|
|
5
|
+
import { g as b } from "./generate-uid.NJ8tVoha.js";
|
|
6
|
+
import { g as $ } from "./get-slot-text.Bjb9dTSV.js";
|
|
7
|
+
import { u as De } from "./aria-label.CaUURpnB.js";
|
|
8
|
+
import { u as he } from "./index.B6WW_F-J.js";
|
|
9
|
+
import { u as ve } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
10
|
+
import { u as Ee } from "./use-has-slot.C9lQZ6nz.js";
|
|
11
|
+
import { F as Le } from "./field-label.DjjjkcO6.js";
|
|
12
|
+
import { E as Ae } from "./error-message.CyERcfdt.js";
|
|
13
|
+
import { n as Fe } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
14
|
+
import "../assets/input-field.css";
|
|
15
|
+
var d = /* @__PURE__ */ ((t) => (t.DEFAULT = "default", t.PAYMENT_METHOD = "payment-method", t.STATIC_VALUE = "static-value", t.DROPDOWN = "dropdown", t))(d || {}), l = /* @__PURE__ */ ((t) => (t.START = "start", t.END = "end", t))(l || {}), _ = /* @__PURE__ */ ((t) => (t.CONDENSED = "condensed", t.DISABLED = "disabled", t.READONLY = "readonly", t.ERROR = "error", t))(_ || {}), A = /* @__PURE__ */ ((t) => (t.SEARCH = "search", t.TEXT = "text", t.NUMBER = "number", t))(A || {}), Te = /* @__PURE__ */ ((t) => (t.INPUT = "input", t.ESCAPE_PRESSED = "escape-pressed", t.UPDATE_DROPDOWN = "update:dropdown", t.DROPDOWN_INPUT = "dropdown-input", t.FOCUS = "focus", t.CHANGE = "change", t.BLUR = "blur", t.KEYDOWN = "keydown", t))(Te || {});
|
|
16
|
+
const ke = {
|
|
17
|
+
"de-DE": {
|
|
18
|
+
ariaLabelDropdownFallback: "{inputLabel} Dropdown",
|
|
19
|
+
ariaLabelFallback: "Eingabefeld"
|
|
20
|
+
},
|
|
21
|
+
"en-GB": {
|
|
22
|
+
ariaLabelDropdownFallback: "{inputLabel} Drop-down",
|
|
23
|
+
ariaLabelFallback: "Input field"
|
|
24
|
+
},
|
|
25
|
+
"en-US": {
|
|
26
|
+
ariaLabelDropdownFallback: "{inputLabel} Dropdown",
|
|
27
|
+
ariaLabelFallback: "Input field"
|
|
28
|
+
},
|
|
29
|
+
"es-ES": {
|
|
30
|
+
ariaLabelDropdownFallback: "{inputLabel} desplegable",
|
|
31
|
+
ariaLabelFallback: "Campo de entrada"
|
|
32
|
+
},
|
|
33
|
+
"es-MX": {
|
|
34
|
+
ariaLabelDropdownFallback: "{inputLabel} desplegable",
|
|
35
|
+
ariaLabelFallback: "Campo de entrada"
|
|
36
|
+
},
|
|
37
|
+
"fr-FR": {
|
|
38
|
+
ariaLabelDropdownFallback: "Menu déroulant {inputLabel}",
|
|
39
|
+
ariaLabelFallback: "Champ de saisie"
|
|
40
|
+
},
|
|
41
|
+
"it-IT": {
|
|
42
|
+
ariaLabelDropdownFallback: "Menu a discesa {inputLabel}",
|
|
43
|
+
ariaLabelFallback: "Campo di immissione"
|
|
44
|
+
},
|
|
45
|
+
"ja-JP": {
|
|
46
|
+
ariaLabelDropdownFallback: "{inputLabel}ドロップダウン",
|
|
47
|
+
ariaLabelFallback: "入力フィールド"
|
|
48
|
+
},
|
|
49
|
+
"pt-BR": {
|
|
50
|
+
ariaLabelDropdownFallback: "Menu suspenso {inputLabel}",
|
|
51
|
+
ariaLabelFallback: "Campo de entrada"
|
|
52
|
+
},
|
|
53
|
+
"zh-CN": {
|
|
54
|
+
ariaLabelDropdownFallback: "{inputLabel} 下拉菜单",
|
|
55
|
+
ariaLabelFallback: "输入字段"
|
|
56
|
+
}
|
|
57
|
+
}, Ie = {
|
|
58
|
+
name: "bento-input-field",
|
|
59
|
+
inheritAttrs: !1,
|
|
60
|
+
model: { prop: "modelValue" },
|
|
61
|
+
i18n: { messages: ke }
|
|
62
|
+
}, Se = /* @__PURE__ */ le({
|
|
63
|
+
...Ie,
|
|
64
|
+
props: {
|
|
65
|
+
description: { default: "" },
|
|
66
|
+
disabled: { type: Boolean, default: !1 },
|
|
67
|
+
errorMessage: { default: null },
|
|
68
|
+
label: { default: "" },
|
|
69
|
+
optional: { type: Boolean, default: !1 },
|
|
70
|
+
placeholder: { default: "" },
|
|
71
|
+
readonly: { type: Boolean, default: !1 },
|
|
72
|
+
required: { type: Boolean, default: !1 },
|
|
73
|
+
tooltipText: { default: null },
|
|
74
|
+
ariaHidden: { type: Boolean, default: !0 },
|
|
75
|
+
ariaLabel: { default: void 0 },
|
|
76
|
+
condensed: { type: Boolean, default: !1 },
|
|
77
|
+
dropdown: { default: void 0 },
|
|
78
|
+
dropdownPosition: { default: l.START },
|
|
79
|
+
error: { type: Boolean, default: !1 },
|
|
80
|
+
modelValue: { default: void 0 },
|
|
81
|
+
slashedZero: { type: Boolean, default: !1 },
|
|
82
|
+
staticValue: { default: "" },
|
|
83
|
+
staticValuePosition: { default: l.START },
|
|
84
|
+
type: { default: A.TEXT },
|
|
85
|
+
value: { default: void 0 },
|
|
86
|
+
variant: { default: d.DEFAULT }
|
|
87
|
+
},
|
|
88
|
+
emits: ["blur", "click", "change", "dropdown-input", "escape-pressed", "focus", "keydown", "keyup", "input", "update:dropdown", "update:model-value"],
|
|
89
|
+
setup(t, { expose: a, emit: o }) {
|
|
90
|
+
const e = t, n = de(), s = se(), { emitValue: F } = ye(o), H = r(() => Object.fromEntries(Object.entries(n).filter(([i]) => !i.startsWith("aria-")))), { t: m } = he(), T = Ee(s), k = f(null), I = f(null), Y = b("input"), w = b("input-dropdown"), y = b("input-static-value"), S = b("input-description"), g = b("input-error"), D = f(!1);
|
|
91
|
+
pe(fe, !0);
|
|
92
|
+
const q = x(be, f(void 0)), W = () => {
|
|
93
|
+
D.value = !0, o("focus");
|
|
94
|
+
}, j = () => {
|
|
95
|
+
D.value = !1, o("blur");
|
|
96
|
+
}, { isReadOnly: p } = ve(ue(e, "readonly")), J = r(
|
|
97
|
+
() => {
|
|
98
|
+
var i;
|
|
99
|
+
return p.value || ((i = e.dropdown) == null ? void 0 : i.readonly);
|
|
100
|
+
}
|
|
101
|
+
), u = r(
|
|
102
|
+
() => e.variant === d.STATIC_VALUE && !!s.staticValue
|
|
103
|
+
), K = r(() => e.variant === d.DEFAULT), z = r(() => e.variant === d.PAYMENT_METHOD), X = r(
|
|
104
|
+
() => u.value && e.staticValuePosition === l.START
|
|
105
|
+
), G = r(
|
|
106
|
+
() => u.value && e.staticValuePosition === l.END
|
|
107
|
+
), c = r(() => e.variant === d.DROPDOWN && !!e.dropdown), Z = r(
|
|
108
|
+
() => c.value && e.dropdownPosition === l.START
|
|
109
|
+
), Q = r(
|
|
110
|
+
() => c.value && e.dropdownPosition === l.END
|
|
111
|
+
), h = r(
|
|
112
|
+
() => !e.disabled && !p.value && (!!e.errorMessage || e.error)
|
|
113
|
+
), C = r(() => $(s)("default") || e.label), N = r(() => $(s)("description") || e.description), ee = r(() => c.value === !0 && u.value === !0 ? `${y} ${w}` : c.value === !0 ? `${w}` : u.value === !0 ? `${y}` : null), O = r(
|
|
114
|
+
() => n != null && n["aria-labelledby"] ? void 0 : m("ariaLabelFallback")
|
|
115
|
+
), R = r(
|
|
116
|
+
() => m("ariaLabelDropdownFallback", { inputLabel: M.value })
|
|
117
|
+
), P = f(n["aria-label"]), { ariaLabel: B } = ce(e), M = De({
|
|
118
|
+
ariaLabel: P.value,
|
|
119
|
+
// TODO: take this line away when the aria-label props is removed
|
|
120
|
+
label: B,
|
|
121
|
+
defaultFallback: C.value || O
|
|
122
|
+
}), ae = r(
|
|
123
|
+
() => `${N.value ? S : ""} ${h.value && e.errorMessage ? g : ""}`
|
|
124
|
+
), te = r(() => ({
|
|
125
|
+
[`b-input-field--${_.CONDENSED}`]: e.condensed,
|
|
126
|
+
[`b-input-field--${_.DISABLED}`]: e.disabled,
|
|
127
|
+
[`b-input-field--${_.READONLY}`]: p.value,
|
|
128
|
+
[`b-input-field--${_.ERROR}`]: h.value,
|
|
129
|
+
"b-input-field--slashed-zero": e.slashedZero
|
|
130
|
+
})), oe = r(() => ({
|
|
131
|
+
"aria-label": R.value,
|
|
132
|
+
...e.dropdown
|
|
133
|
+
})), ne = (i) => {
|
|
134
|
+
const ie = i.target.value;
|
|
135
|
+
!e.disabled && !p.value && F(ie);
|
|
136
|
+
}, re = (i) => {
|
|
137
|
+
o("dropdown-input", i), o("update:dropdown", { ...e == null ? void 0 : e.dropdown, value: i });
|
|
138
|
+
}, v = () => {
|
|
139
|
+
k.value.focus();
|
|
140
|
+
}, V = () => {
|
|
141
|
+
e.variant === "dropdown" ? I.value.focus() : v();
|
|
142
|
+
};
|
|
143
|
+
a({
|
|
144
|
+
focusInput: v,
|
|
145
|
+
focus: V
|
|
146
|
+
});
|
|
147
|
+
const U = x(_e, "");
|
|
148
|
+
return !Object.values(A).includes(e.type) && !U && (e.type === "tel" ? E(
|
|
149
|
+
`"bento-input-field" dropdown does not support the type '${e.type}', use "bento-input-field-phone-number" instead.`
|
|
150
|
+
) : e.type === "password" ? E(
|
|
151
|
+
`"bento-input-field" dropdown does not support the type '${e.type}', use "bento-input-field-password" instead.`
|
|
152
|
+
) : E(`"bento-input-field" dropdown does not support the type '${e.type}'`)), e.error && L(
|
|
153
|
+
'BentoInputField "error" property',
|
|
154
|
+
`Use the BentoInputField "errorMessage" property instead to indicate that there is a modifier error.
|
|
155
|
+
Having the field as "undefined" will hide/remove the error.
|
|
156
|
+
<bento-dropdown errorMessage="Error message text" />`,
|
|
157
|
+
"2.0.0"
|
|
158
|
+
), T("defaultIconBefore") && L(
|
|
159
|
+
'BentoInputField "defaultIconBefore" slot',
|
|
160
|
+
`Use the BentoInputField "iconBefore" slot instead to add an icon at the left side of the input field
|
|
161
|
+
<bento-input-field>
|
|
162
|
+
<template #iconBefore>
|
|
163
|
+
<my-icon-goes-here />
|
|
164
|
+
</template>
|
|
165
|
+
</bento-input-field>`,
|
|
166
|
+
"2.0.0"
|
|
167
|
+
), e.value && L(
|
|
168
|
+
'BentoInputField "value" property',
|
|
169
|
+
`The use of "value" prop in "BentoInputField" is no longer supported.
|
|
170
|
+
Use the "v-model" or "model-value" property instead.`,
|
|
171
|
+
"2.0.0"
|
|
172
|
+
), { __sfc: !0, attrs: n, slots: s, props: e, emit: o, emitValue: F, computedRootAttributes: H, t: m, hasSlot: T, inputFieldElement: k, inputDropdownElement: I, inputFieldId: Y, dropdownId: w, staticValueId: y, descriptionId: S, errorId: g, isFocused: D, hint: q, onFocus: W, onBlur: j, isReadOnly: p, isDropdownReadOnly: J, shouldShowStaticValue: u, isDefaultVariant: K, isPaymentMethodVariant: z, shouldDisplayStaticValueAtStart: X, shouldDisplayStaticValueAtEnd: G, shouldShowDropdown: c, shouldDisplayDropdownAtStart: Z, shouldDisplayDropdownAtEnd: Q, shouldShowError: h, computedLabel: C, computedDescription: N, computedAriaOwns: ee, computedAriaLabelFallbackMessage: O, computedAriaLabelDropdowFallback: R, ariaLabelAttribute: P, ariaLabel: B, computedAriaLabel: M, computedAriaDescribedBy: ae, inputFieldConditionalClasses: te, inputFieldDropdownProps: oe, onInput: ne, onDropdownInput: re, focusInput: v, focus: V, inputFieldParentComponent: U, BentoDropdown: me, BentoTypography: we, ErrorMessage: Ae, FieldLabel: Le };
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
var ge = function() {
|
|
176
|
+
var a = this, o = a._self._c, e = a._self._setupProxy;
|
|
177
|
+
return o(e.BentoTypography, a._b({ staticClass: "b-input-field", class: e.inputFieldConditionalClasses, attrs: { "data-testid": "input-text-container", el: "div", variant: "body" } }, "bento-typography", e.computedRootAttributes, !1), [e.hasSlot("default") || a.label ? o(e.FieldLabel, { attrs: { for: e.inputFieldId, "data-testid": "input-field-label", "tooltip-text": a.tooltipText, optional: a.optional, required: a.required, label: a.label }, on: { click: e.focusInput } }, [a._t("default")], 2) : a._e(), o("div", { staticClass: "b-input-field__input-box", attrs: { "data-testid": "input-box", "aria-disabled": a.disabled }, on: { click: e.focusInput } }, [e.isDefaultVariant && (e.hasSlot("defaultIconBefore") || e.hasSlot("iconBefore")) ? o("span", { staticClass: "b-input-field__icon-before", attrs: { "aria-hidden": a.ariaHidden ? "true" : void 0 } }, [e.hasSlot("iconBefore") ? a._t("iconBefore") : a._e(), e.hasSlot("defaultIconBefore") && !e.hasSlot("iconBefore") ? a._t("defaultIconBefore") : a._e()], 2) : a._e(), e.isPaymentMethodVariant && e.hasSlot("paymentMethod") ? o("span", { staticClass: "b-input-field__payment-method", attrs: { "aria-hidden": a.ariaHidden ? "true" : void 0 } }, [a._t("paymentMethod")], 2) : a._e(), e.shouldDisplayDropdownAtStart ? o("div", { staticClass: "b-input-field__dropdown b-input-field__dropdown--start", attrs: { id: e.dropdownId }, on: { click: function(n) {
|
|
178
|
+
n.stopPropagation();
|
|
179
|
+
} } }, [a.dropdown ? o(e.BentoDropdown, a._b({ ref: "inputDropdownElement", attrs: { disabled: a.disabled, readonly: e.isDropdownReadOnly }, on: { "update:model-value": e.onDropdownInput } }, "bento-dropdown", e.inputFieldDropdownProps, !1)) : a._e()], 1) : a._e(), e.shouldDisplayStaticValueAtStart ? o(e.BentoTypography, { staticClass: "b-input-field__static-value b-input-field__static-value--start", attrs: { id: e.staticValueId, el: "span", variant: "body" } }, [a._t("staticValue")], 2) : a._e(), o("div", { staticClass: "b-input-field__input-container" }, [o("input", a._b({ ref: "inputFieldElement", staticClass: "b-input-field__input", attrs: { id: e.inputFieldId, "aria-label": e.computedAriaLabel, "aria-describedby": e.computedAriaDescribedBy, "aria-owns": e.computedAriaOwns, "aria-invalid": e.shouldShowError, placeholder: a.placeholder, required: a.required, "aria-required": a.required, type: a.type, disabled: a.disabled, readonly: e.isReadOnly }, domProps: { value: a.modelValue ?? a.value }, on: { input: e.onInput, change: function(n) {
|
|
180
|
+
return e.emit("change");
|
|
181
|
+
}, focus: e.onFocus, blur: e.onBlur, keydown: [function(n) {
|
|
182
|
+
return e.emit("keydown", n);
|
|
183
|
+
}, function(n) {
|
|
184
|
+
return !n.type.indexOf("key") && a._k(n.keyCode, "esc", 27, n.key, ["Esc", "Escape"]) ? null : e.emit("escape-pressed");
|
|
185
|
+
}], keyup: function(n) {
|
|
186
|
+
return e.emit("keyup", n);
|
|
187
|
+
}, click: function(n) {
|
|
188
|
+
return e.emit("click", n);
|
|
189
|
+
} } }, "input", e.attrs, !1)), e.hint && e.isFocused && (a.modelValue || a.value) ? o(e.BentoTypography, { staticClass: "b-input-field__hint", attrs: { el: "span" } }, [a._v(" " + a._s(e.hint) + " ")]) : a._e()], 1), e.hasSlot("iconAfter") ? o("span", { staticClass: "b-input-field__icon-after", attrs: { "aria-hidden": a.ariaHidden ? "true" : void 0, "data-testid": "input-text__icon-after" } }, [a._t("iconAfter")], 2) : a._e(), e.shouldDisplayStaticValueAtEnd ? o(e.BentoTypography, { staticClass: "b-input-field__static-value b-input-field__static-value--end", attrs: { id: e.staticValueId, el: "span", variant: "body" } }, [a._t("staticValue")], 2) : a._e(), e.shouldDisplayDropdownAtEnd ? o("div", { staticClass: "b-input-field__dropdown b-input-field__dropdown--end", attrs: { id: e.dropdownId, "data-testid": "input-field-dropdown-container-end" }, on: { click: function(n) {
|
|
190
|
+
n.stopPropagation();
|
|
191
|
+
} } }, [a.dropdown ? o(e.BentoDropdown, a._b({ ref: "inputDropdownElement", attrs: { id: e.dropdownId, disabled: a.disabled, readonly: e.isDropdownReadOnly }, on: { "update:model-value": e.onDropdownInput } }, "bento-dropdown", e.inputFieldDropdownProps, !1)) : a._e()], 1) : a._e()], 1), e.shouldShowError && a.errorMessage ? o(e.ErrorMessage, { staticClass: "b-input-field__error-message", attrs: { id: e.errorId, "error-message": a.errorMessage } }) : a._e(), e.hasSlot("description") || a.description ? o("span", { staticClass: "b-input-field__description", attrs: { id: e.descriptionId }, on: { click: e.focusInput } }, [o(e.BentoTypography, { attrs: { el: "span", variant: "body" } }, [a._t("description", function() {
|
|
192
|
+
return [a._v(" " + a._s(a.description) + " ")];
|
|
193
|
+
}, { id: "description" })], 2)], 1) : a._e()], 1);
|
|
194
|
+
}, Ce = [], Ne = /* @__PURE__ */ Fe(
|
|
195
|
+
Se,
|
|
196
|
+
ge,
|
|
197
|
+
Ce,
|
|
198
|
+
!1,
|
|
199
|
+
null,
|
|
200
|
+
"1c73f87e"
|
|
201
|
+
);
|
|
202
|
+
const je = Ne.exports;
|
|
203
|
+
export {
|
|
204
|
+
je as B,
|
|
205
|
+
l as a,
|
|
206
|
+
Te as b,
|
|
207
|
+
_ as c,
|
|
208
|
+
A as d,
|
|
209
|
+
d as e
|
|
210
|
+
};
|
|
211
|
+
//# sourceMappingURL=input-field.Dh5W0Az-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-field.Dh5W0Az-.js","sources":["../../src/components/input-field/input-field.types.ts","../../src/components/input-field/input-field.vue"],"sourcesContent":["import { type BentoDropdownProps } from '../dropdown/dropdown.types';\nimport { type FormField } from '../../types/form-field';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldVariant {\n DEFAULT = 'default',\n PAYMENT_METHOD = 'payment-method',\n STATIC_VALUE = 'static-value',\n DROPDOWN = 'dropdown',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldElementPosition {\n START = 'start',\n END = 'end',\n}\n\nexport enum BentoInputFieldStateClass {\n CONDENSED = 'condensed',\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldType {\n SEARCH = 'search',\n TEXT = 'text',\n NUMBER = 'number',\n}\n\nexport type BentoInputFieldValue = string | number;\n\ntype DropdownProps = BentoDropdownProps;\nexport interface BentoInputDropdownProps {\n /**\n * Text that labels the dropdown element\n */\n 'aria-label'?: string;\n /**\n * Enables dynamic filtering\n */\n dynamicFiltering?: DropdownProps['dynamicFiltering'];\n /**\n * List of available items\n */\n items: DropdownProps['items'];\n /**\n * Sets the dropdown in read-only mode\n */\n readonly?: DropdownProps['readonly'];\n /**\n * Selected value of the dropdown\n * @deprecated Use `model-value` instead.\n */\n value?: DropdownProps['value'];\n /**\n * Selected value of the dropdown\n */\n modelValue?: DropdownProps['modelValue'];\n}\n\n/**\n * @deprecated The use of these enums is no longer supported.\n * Use `v-on:` or `@` to listen to the events being emitted.\n * This enum will be removed in 2.0.\n */\nexport enum BentoInputFieldEvent {\n INPUT = 'input',\n ESCAPE_PRESSED = 'escape-pressed',\n UPDATE_DROPDOWN = 'update:dropdown',\n DROPDOWN_INPUT = 'dropdown-input',\n FOCUS = 'focus',\n CHANGE = 'change',\n BLUR = 'blur',\n KEYDOWN = 'keydown',\n}\n\nexport interface BentoInputFieldProps extends FormField {\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n ariaHidden?: boolean;\n\n /**\n * Text that labels an the input element\n *\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n ariaLabel?: string;\n\n /**\n * Reduces height of the input\n */\n condensed?: boolean;\n\n /**\n * Dropdown props for the small selectable dropdown menu.\n * Properties supported:\n *\n * - `aria-label`: Text that labels the dropdown element\n * - `dynamicFiltering`: Enables dynamic filtering\n * - `items`: List of available items\n * - `readonly`: Sets the dropdown in read-only mode\n * - `value`: Selected value of the dropdown\n */\n dropdown?: BentoInputDropdownProps;\n\n /**\n * Position of the dropdown before or after input value\n */\n dropdownPosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n\n /**\n * Adds error validation class for outlining input-field.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error?: boolean;\n\n /**\n * Text displayed as the value of the input-field\n */\n modelValue?: BentoInputFieldValue;\n\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero?: boolean;\n\n /**\n * Static text that displayed before or after input value\n * Applicable to the Static Value variant\n */\n staticValue?: string;\n\n /**\n * Position of Static Value before or after input value\n */\n staticValuePosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n\n /**\n * A string specifying the type of control to render.\n * All `input` types are available but only `search`, `text` and `number` are fully supported.\n *\n * If `type` is `search`, use `bento-search-bar` instead.\n */\n type?: BentoInputFieldType | `${BentoInputFieldType}` | HTMLInputElement['type'];\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?: BentoInputFieldValue;\n\n /**\n * Describes the different variants for the input element\n */\n variant?: BentoInputFieldVariant | `${BentoInputFieldVariant}`;\n}\n","<template>\n <bento-typography\n class=\"b-input-field\"\n v-bind=\"computedRootAttributes\"\n data-testid=\"input-text-container\"\n :class=\"inputFieldConditionalClasses\"\n el=\"div\"\n variant=\"body\"\n >\n <field-label\n v-if=\"hasSlot('default') || label\"\n :for=\"inputFieldId\"\n data-testid=\"input-field-label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n :label=\"label\"\n @click=\"focusInput\"\n >\n <slot></slot>\n </field-label>\n\n <div class=\"b-input-field__input-box\" data-testid=\"input-box\" :aria-disabled=\"disabled\" @click=\"focusInput\">\n <!-- Optional Icon for Default text variant -->\n <span\n v-if=\"isDefaultVariant && (hasSlot('defaultIconBefore') || hasSlot('iconBefore'))\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-before\"\n >\n <slot v-if=\"hasSlot('iconBefore')\" name=\"iconBefore\" />\n <slot v-if=\"hasSlot('defaultIconBefore') && !hasSlot('iconBefore')\" name=\"defaultIconBefore\" />\n </span>\n\n <!-- Mandatory Icon for Payment Method variant -->\n <span\n v-if=\"isPaymentMethodVariant && hasSlot('paymentMethod')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__payment-method\"\n >\n <slot name=\"paymentMethod\" />\n </span>\n\n <!-- Dropdown at start -->\n <div\n v-if=\"shouldDisplayDropdownAtStart\"\n :id=\"dropdownId\"\n class=\"b-input-field__dropdown b-input-field__dropdown--start\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n ref=\"inputDropdownElement\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isDropdownReadOnly\"\n @update:model-value=\"onDropdownInput\"\n />\n </div>\n\n <!-- Static Value at start -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtStart\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--start\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n <div class=\"b-input-field__input-container\">\n <input\n :id=\"inputFieldId\"\n v-bind=\"attrs\"\n ref=\"inputFieldElement\"\n class=\"b-input-field__input\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"computedAriaDescribedBy\"\n :aria-owns=\"computedAriaOwns\"\n :aria-invalid=\"shouldShowError\"\n :placeholder=\"placeholder\"\n :required=\"required\"\n :aria-required=\"required\"\n :type=\"type\"\n :value=\"modelValue ?? value\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n @change=\"emit('change')\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @keydown=\"emit('keydown', $event)\"\n @keyup=\"emit('keyup', $event)\"\n @keydown.esc=\"emit('escape-pressed')\"\n @click=\"emit('click', $event)\"\n />\n\n <!-- Hint at the end -->\n <bento-typography\n v-if=\"hint && isFocused && (modelValue || value)\"\n el=\"span\"\n class=\"b-input-field__hint\"\n >\n {{ hint }}\n </bento-typography>\n </div>\n\n <span\n v-if=\"hasSlot('iconAfter')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-after\"\n data-testid=\"input-text__icon-after\"\n >\n <slot name=\"iconAfter\" />\n </span>\n\n <!-- Static Value at the end -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtEnd\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--end\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n\n <!-- Dropdown at end -->\n <div\n v-if=\"shouldDisplayDropdownAtEnd\"\n :id=\"dropdownId\"\n data-testid=\"input-field-dropdown-container-end\"\n class=\"b-input-field__dropdown b-input-field__dropdown--end\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n :id=\"dropdownId\"\n ref=\"inputDropdownElement\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isDropdownReadOnly\"\n @update:model-value=\"onDropdownInput\"\n />\n </div>\n </div>\n\n <error-message\n v-if=\"shouldShowError && !!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-input-field__error-message\"\n />\n\n <span\n v-if=\"hasSlot('description') || description\"\n :id=\"descriptionId\"\n class=\"b-input-field__description\"\n @click=\"focusInput\"\n >\n <bento-typography el=\"span\" variant=\"body\">\n <slot id=\"description\" name=\"description\">\n {{ description }}\n </slot>\n </bento-typography>\n </span>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide, type Ref, ref, toRef, toRefs, useAttrs, useSlots } from 'vue';\n\n // Components\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { generateUid } from '@/core/utils/ts';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import {\n INPUT_FIELD_COMPONENT_INJECTION_KEY,\n INPUT_FIELD_HINT_INJECTION_KEY,\n INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY,\n } from '@/components/input-field/input-field.keys';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n\n // Composables\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n\n // Types\n import {\n type BentoInputDropdownProps,\n BentoInputFieldElementPosition,\n type BentoInputFieldProps,\n BentoInputFieldStateClass,\n BentoInputFieldType,\n type BentoInputFieldValue,\n BentoInputFieldVariant,\n } from './input-field.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n\n const props = defineProps({\n description: { default: '' },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n label: { default: '' },\n optional: { type: Boolean, default: false },\n placeholder: { default: '' },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n ariaHidden: { type: Boolean, default: true },\n ariaLabel: { default: undefined },\n condensed: { type: Boolean, default: false },\n dropdown: { default: undefined },\n dropdownPosition: { default: BentoInputFieldElementPosition.START },\n error: { type: Boolean, default: false },\n modelValue: { default: undefined },\n slashedZero: { type: Boolean, default: false },\n staticValue: { default: '' },\n staticValuePosition: { default: BentoInputFieldElementPosition.START },\n type: { default: BentoInputFieldType.TEXT },\n value: { default: undefined },\n variant: { default: BentoInputFieldVariant.DEFAULT }\n});\n\n const emit = defineEmits([\"blur\", \"click\", \"change\", \"dropdown-input\", \"escape-pressed\", \"focus\", \"keydown\", \"keyup\", \"input\", \"update:dropdown\", \"update:model-value\"]);\n\n const { emitValue } = useFormFieldEmits<BentoInputFieldValue>(emit);\n const computedRootAttributes = computed(() => {\n return Object.fromEntries(Object.entries(attrs).filter(([key]) => !key.startsWith('aria-')));\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const inputFieldElement = ref(null);\n const inputDropdownElement = ref(null);\n const inputFieldId = generateUid('input');\n const dropdownId = generateUid('input-dropdown');\n const staticValueId = generateUid('input-static-value');\n const descriptionId = generateUid('input-description');\n const errorId = generateUid('input-error');\n const isFocused = ref(false);\n\n // Provide INPUT_FIELD_COMPONENT_INJECTION_KEY as true, to set the input only dropdown size variant in the BentoDropdown comp\n provide(INPUT_FIELD_COMPONENT_INJECTION_KEY, true);\n // Renders the input with a hint if a string is provided\n const hint = inject<Ref<string | undefined>>(INPUT_FIELD_HINT_INJECTION_KEY, ref(undefined));\n\n const onFocus = () => {\n isFocused.value = true;\n emit('focus');\n };\n\n const onBlur = () => {\n isFocused.value = false;\n emit('blur');\n };\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const isDropdownReadOnly = computed<BentoInputDropdownProps['readonly']>(\n () => isReadOnly.value || props.dropdown?.readonly\n );\n\n const shouldShowStaticValue = computed(\n () => props.variant === BentoInputFieldVariant.STATIC_VALUE && !!slots.staticValue\n );\n\n const isDefaultVariant = computed(() => props.variant === BentoInputFieldVariant.DEFAULT);\n\n const isPaymentMethodVariant = computed(() => props.variant === BentoInputFieldVariant.PAYMENT_METHOD);\n\n const shouldDisplayStaticValueAtStart = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayStaticValueAtEnd = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowDropdown = computed(() => props.variant === BentoInputFieldVariant.DROPDOWN && !!props.dropdown);\n const shouldDisplayDropdownAtStart = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayDropdownAtEnd = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.error)\n );\n\n const computedLabel = computed(() => (getSlotText(slots)('default') as string) || props.label);\n const computedDescription = computed(() => (getSlotText(slots)('description') as string) || props.description);\n\n const computedAriaOwns = computed(() => {\n if (shouldShowDropdown.value === true && shouldShowStaticValue.value === true) {\n return `${staticValueId} ${dropdownId}`;\n }\n if (shouldShowDropdown.value === true) {\n return `${dropdownId}`;\n }\n if (shouldShowStaticValue.value === true) {\n return `${staticValueId}`;\n }\n return null;\n });\n\n // vue-i18n issue with t() used in script - direct usage in template works\n // requires either createI18n({ legacy: false }) or to be wrapped in computed()\n const computedAriaLabelFallbackMessage = computed(() =>\n attrs?.['aria-labelledby'] ? undefined : t('ariaLabelFallback')\n );\n const computedAriaLabelDropdowFallback = computed(() =>\n t('ariaLabelDropdownFallback', { inputLabel: computedAriaLabel.value })\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: computedLabel.value || computedAriaLabelFallbackMessage,\n });\n\n const computedAriaDescribedBy = computed(\n () =>\n `${computedDescription.value ? descriptionId : ''} ${\n shouldShowError.value && !!props.errorMessage ? errorId : ''\n }`\n );\n\n const inputFieldConditionalClasses = computed(() => ({\n [`b-input-field--${BentoInputFieldStateClass.CONDENSED}`]: props.condensed,\n [`b-input-field--${BentoInputFieldStateClass.DISABLED}`]: props.disabled,\n [`b-input-field--${BentoInputFieldStateClass.READONLY}`]: isReadOnly.value,\n [`b-input-field--${BentoInputFieldStateClass.ERROR}`]: shouldShowError.value,\n [`b-input-field--slashed-zero`]: props.slashedZero,\n }));\n\n const inputFieldDropdownProps = computed(() => ({\n 'aria-label': computedAriaLabelDropdowFallback.value,\n ...props.dropdown,\n }));\n\n const onInput = (event: Event) => {\n const inputValue = (event.target as HTMLInputElement).value;\n if (!props.disabled && !isReadOnly.value) {\n emitValue(inputValue);\n }\n };\n\n const onDropdownInput = (selectedValue: BentoListboxSelectedValue) => {\n emit('dropdown-input', selectedValue);\n emit('update:dropdown', { ...props?.dropdown, value: selectedValue });\n };\n\n const focusInput = () => {\n inputFieldElement.value.focus();\n };\n\n const focus = () => {\n if (props.variant === 'dropdown') {\n inputDropdownElement.value.focus();\n } else {\n focusInput();\n }\n };\n\n // Expose method so that other components can focus on it in Vue3\n defineExpose({\n focusInput,\n focus,\n });\n\n const inputFieldParentComponent = inject(INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY, '');\n\n if (!Object.values(BentoInputFieldType).includes(props.type as BentoInputFieldType) && !inputFieldParentComponent) {\n if (props.type === 'tel') {\n printDevelopmentWarning(\n `\"bento-input-field\" dropdown does not support the type '${props.type}', use \"bento-input-field-phone-number\" instead.`\n );\n } else if (props.type === 'password') {\n printDevelopmentWarning(\n `\"bento-input-field\" dropdown does not support the type '${props.type}', use \"bento-input-field-password\" instead.`\n );\n } else {\n printDevelopmentWarning(`\"bento-input-field\" dropdown does not support the type '${props.type}'`);\n }\n }\n\n /**\n * Deprecations\n */\n if (props.error) {\n deprecate(\n 'BentoInputField \"error\" property',\n `Use the BentoInputField \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n if (hasSlot('defaultIconBefore')) {\n deprecate(\n 'BentoInputField \"defaultIconBefore\" slot',\n `Use the BentoInputField \"iconBefore\" slot instead to add an icon at the left side of the input field\n <bento-input-field>\n \\t<template #iconBefore>\n \\t\\t<my-icon-goes-here />\n \\t</template>\n </bento-input-field>`,\n '2.0.0'\n );\n }\n\n if (props.value) {\n deprecate(\n 'BentoInputField \"value\" property',\n `The use of \"value\" prop in \"BentoInputField\" 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 /**\n * Input field component is used to create interactive controls for web-based\n * forms in order to accept data from the user.\n *\n * @example\n * import { BentoInputField } from '@adyen/bento-vue2'\n *\n * const inputValue = ref('');\n *\n * export default {\n * components: { BentoInputField },\n * tempate: `\n * <bento-input-field\n * :model-value=\"inputValue\"\n * :@update:model-value=\"newValue => inputValue.value = newValue\"\n * >\n * }\n */\n export default {\n name: 'bento-input-field',\n inheritAttrs: false,\n model: { prop: 'modelValue' },\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-field.scss\" />\n"],"names":["BentoInputFieldVariant","BentoInputFieldVariant2","BentoInputFieldElementPosition","BentoInputFieldElementPosition2","BentoInputFieldStateClass","BentoInputFieldStateClass2","BentoInputFieldType","BentoInputFieldType2","BentoInputFieldEvent","BentoInputFieldEvent2","__default__","messages","attrs","useAttrs","slots","useSlots","emitValue","useFormFieldEmits","emit","computedRootAttributes","computed","key","t","useI18n","hasSlot","useHasSlot","inputFieldElement","ref","inputDropdownElement","inputFieldId","generateUid","dropdownId","staticValueId","descriptionId","errorId","isFocused","provide","INPUT_FIELD_COMPONENT_INJECTION_KEY","hint","inject","INPUT_FIELD_HINT_INJECTION_KEY","onFocus","onBlur","isReadOnly","useFormLayoutFieldLoading","toRef","props","isDropdownReadOnly","_a","shouldShowStaticValue","isDefaultVariant","isPaymentMethodVariant","shouldDisplayStaticValueAtStart","shouldDisplayStaticValueAtEnd","shouldShowDropdown","shouldDisplayDropdownAtStart","shouldDisplayDropdownAtEnd","shouldShowError","computedLabel","getSlotText","computedDescription","computedAriaOwns","computedAriaLabelFallbackMessage","computedAriaLabelDropdowFallback","computedAriaLabel","ariaLabelAttribute","ariaLabel","toRefs","useAriaLabel","computedAriaDescribedBy","inputFieldConditionalClasses","inputFieldDropdownProps","onInput","event","inputValue","onDropdownInput","selectedValue","focusInput","focus","expose","inputFieldParentComponent","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","printDevelopmentWarning","deprecate"],"mappings":"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"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { defineComponent as S, provide as y, useSlots as D, ref as g, computed as l, watch as h } from "vue";
|
|
2
|
+
import { B as H } from "./input-field.Dh5W0Az-.js";
|
|
3
|
+
import { c as I } from "./dropdown.Ca-f8tdX.js";
|
|
4
|
+
import { d as b } from "./use-cached-selected-values.BJbWbkEQ.js";
|
|
5
|
+
import { u as B } from "./index.B6WW_F-J.js";
|
|
6
|
+
import { u as E } from "./use-has-slot.C9lQZ6nz.js";
|
|
7
|
+
import { u as V } from "./use-touch-device.DTqFAbXh.js";
|
|
8
|
+
import { n as x } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
9
|
+
import "../assets/input-time.css";
|
|
10
|
+
const w = /[\d]/, k = /^\d{2}$/, N = /^\d{2}:\d{2}$/, f = (o) => /^(?:[01]\d|2[0-4]):(?:[0-5]\d):(?:[0-5]\d)$/.test(o), $ = (o) => {
|
|
11
|
+
const { selectionStart: e } = o.target, i = ["Backspace", "Tab", "ArrowLeft", "ArrowRight"], t = w.test(o.key) || i.includes(o.key), d = [1, 2, 4, 5].includes(e) && o.key === ":";
|
|
12
|
+
!t && !d && o.preventDefault();
|
|
13
|
+
}, C = (o) => {
|
|
14
|
+
if (!o)
|
|
15
|
+
return o;
|
|
16
|
+
let e = o;
|
|
17
|
+
if (e.length === 1 && parseInt(o, 10) > 2)
|
|
18
|
+
return `0${e}:`;
|
|
19
|
+
const [i, t] = e.slice(-2);
|
|
20
|
+
return [2, 5].includes(e.length) && t === ":" && (e = `${e.slice(0, e.length - 2)}0${i}`), (k.test(e) || N.test(e)) && (e += ":"), e;
|
|
21
|
+
}, R = {
|
|
22
|
+
"de-DE": {
|
|
23
|
+
invalidTimeFormat: "Ungültiges Zeitformat",
|
|
24
|
+
timeFormatDescription: "HH:MM:SS"
|
|
25
|
+
},
|
|
26
|
+
"en-GB": {
|
|
27
|
+
invalidTimeFormat: "Invalid time format",
|
|
28
|
+
timeFormatDescription: "HH:MM:SS"
|
|
29
|
+
},
|
|
30
|
+
"en-US": {
|
|
31
|
+
invalidTimeFormat: "Invalid time format",
|
|
32
|
+
timeFormatDescription: "HH:MM:SS"
|
|
33
|
+
},
|
|
34
|
+
"es-ES": {
|
|
35
|
+
invalidTimeFormat: "Formato de hora no válido",
|
|
36
|
+
timeFormatDescription: "HH:MM:SS"
|
|
37
|
+
},
|
|
38
|
+
"es-MX": {
|
|
39
|
+
invalidTimeFormat: "Formato de hora no válido",
|
|
40
|
+
timeFormatDescription: "HH:MM:SS"
|
|
41
|
+
},
|
|
42
|
+
"fr-FR": {
|
|
43
|
+
invalidTimeFormat: "Format d’heure non valide",
|
|
44
|
+
timeFormatDescription: "HH:MM:SS"
|
|
45
|
+
},
|
|
46
|
+
"it-IT": {
|
|
47
|
+
invalidTimeFormat: "Formato orario non valido",
|
|
48
|
+
timeFormatDescription: "HH:MM:SS"
|
|
49
|
+
},
|
|
50
|
+
"ja-JP": {
|
|
51
|
+
invalidTimeFormat: "無効な時刻形式",
|
|
52
|
+
timeFormatDescription: "HH時MM分SS秒"
|
|
53
|
+
},
|
|
54
|
+
"pt-BR": {
|
|
55
|
+
invalidTimeFormat: "Formato de tempo inválido",
|
|
56
|
+
timeFormatDescription: "HH:MM:SS"
|
|
57
|
+
},
|
|
58
|
+
"zh-CN": {
|
|
59
|
+
invalidTimeFormat: "时间格式无效",
|
|
60
|
+
timeFormatDescription: "HH:MM:SS"
|
|
61
|
+
}
|
|
62
|
+
}, P = {
|
|
63
|
+
i18n: { messages: R },
|
|
64
|
+
name: "bento-input-time",
|
|
65
|
+
inheritAttrs: !1,
|
|
66
|
+
model: { prop: "modelValue" }
|
|
67
|
+
}, A = /* @__PURE__ */ S({
|
|
68
|
+
...P,
|
|
69
|
+
props: {
|
|
70
|
+
description: { default: void 0 },
|
|
71
|
+
disabled: { type: Boolean, default: !1 },
|
|
72
|
+
errorMessage: { default: null },
|
|
73
|
+
label: { default: "" },
|
|
74
|
+
optional: { type: Boolean, default: !1 },
|
|
75
|
+
placeholder: { default: "" },
|
|
76
|
+
readonly: { type: Boolean, default: !1 },
|
|
77
|
+
required: { type: Boolean, default: !1 },
|
|
78
|
+
tooltipText: { default: null },
|
|
79
|
+
condensed: { type: Boolean, default: !1 },
|
|
80
|
+
modelValue: { default: void 0 }
|
|
81
|
+
},
|
|
82
|
+
emits: ["update:model-value", "keydown", "input:valid", "input:error"],
|
|
83
|
+
setup(o, { emit: e }) {
|
|
84
|
+
const i = o, t = 300;
|
|
85
|
+
y(I, "bento-input-time");
|
|
86
|
+
const d = D(), v = E(d), { isTouchDevice: a } = V(), { t: u } = B(), s = g(!1), p = l(() => i.errorMessage ? i.errorMessage : s.value ? u("invalidTimeFormat") : null), _ = l(() => a.value ? i.errorMessage : p.value), T = l(() => a.value ? "time" : void 0), F = l(() => i.modelValue), M = l(() => a ? void 0 : i.placeholder), m = (n) => {
|
|
87
|
+
if (!n) {
|
|
88
|
+
s.value = !1;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const r = f(n);
|
|
92
|
+
s.value = !r, e(r ? "input:valid" : "input:error");
|
|
93
|
+
}, c = b(m, t);
|
|
94
|
+
return h(
|
|
95
|
+
() => i.modelValue,
|
|
96
|
+
(n) => {
|
|
97
|
+
const r = String(n ?? "");
|
|
98
|
+
r.length === 8 && f(r) && (s.value = !1);
|
|
99
|
+
}
|
|
100
|
+
), { __sfc: !0, VALIDATION_DEBOUNCE_TIME: t, slots: d, hasSlot: v, isTouchDevice: a, t: u, props: i, emit: e, internalError: s, computedErrorMessage: p, inputErrorMessage: _, inputType: T, inputModelValue: F, computedPlaceholder: M, validateTime: m, validateTimeWithDebounce: c, onInput: (n) => {
|
|
101
|
+
if (!(i.disabled || i.readonly))
|
|
102
|
+
if (a.value)
|
|
103
|
+
e("update:model-value", String(n ?? "")), e("input:valid");
|
|
104
|
+
else {
|
|
105
|
+
const r = C(String(n ?? ""));
|
|
106
|
+
e("update:model-value", r), c(r);
|
|
107
|
+
}
|
|
108
|
+
}, onKeyDown: (n) => {
|
|
109
|
+
a.value || $(n), e("keydown", n);
|
|
110
|
+
}, BentoInputField: H };
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
var K = function() {
|
|
114
|
+
var e = this, i = e._self._c, t = e._self._setupProxy;
|
|
115
|
+
return i(t.BentoInputField, e._b({ staticClass: "b-input-time", attrs: { type: t.inputType, step: t.isTouchDevice ? 1 : void 0, condensed: t.props.condensed, disabled: t.props.disabled, "error-message": t.inputErrorMessage, label: t.props.label, "model-value": t.inputModelValue, optional: t.props.optional, placeholder: t.computedPlaceholder, readonly: t.props.readonly, required: t.props.required, "tooltip-text": t.props.tooltipText }, on: { "update:model-value": t.onInput, keydown: t.onKeyDown }, scopedSlots: e._u([t.hasSlot("default") ? { key: "default", fn: function() {
|
|
116
|
+
return [e._t("default")];
|
|
117
|
+
}, proxy: !0 } : null, t.isTouchDevice ? null : { key: "description", fn: function() {
|
|
118
|
+
return [e._t("description", function() {
|
|
119
|
+
return [e._v(e._s(t.props.description ? `${t.props.description} ${t.t("timeFormatDescription")}` : t.t("timeFormatDescription")))];
|
|
120
|
+
})];
|
|
121
|
+
}, proxy: !0 }], null, !0) }, "bento-input-field", e.$attrs, !1));
|
|
122
|
+
}, O = [], L = /* @__PURE__ */ x(
|
|
123
|
+
A,
|
|
124
|
+
K,
|
|
125
|
+
O,
|
|
126
|
+
!1,
|
|
127
|
+
null,
|
|
128
|
+
"a2b489fa"
|
|
129
|
+
);
|
|
130
|
+
const Q = L.exports;
|
|
131
|
+
export {
|
|
132
|
+
Q as B,
|
|
133
|
+
f as i
|
|
134
|
+
};
|
|
135
|
+
//# sourceMappingURL=input-time.BLuMfakv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-time.BLuMfakv.js","sources":["../../src/utils/ts/time-input.ts","../../src/components/input-time/input-time.vue"],"sourcesContent":["const validDigitRegex = /[\\d]/;\n\nconst hourRegex = /^\\d{2}$/;\nconst minuteRegex = /^\\d{2}:\\d{2}$/;\n\n/**\n * Validates a complete time string in HH:MM:SS format.\n * Hours: 00-24, Minutes: 00-59, Seconds: 00-59\n * @param timeText The time string to validate\n * @returns True if the time string is valid, false otherwise\n */\nexport const isValidTimeString = (timeText: string): boolean =>\n /^(?:[01]\\d|2[0-4]):(?:[0-5]\\d):(?:[0-5]\\d)$/.test(timeText);\n\nexport const validateTimeInput = (event: KeyboardEvent) => {\n const { selectionStart } = event.target as HTMLInputElement;\n\n const allowedKeys = ['Backspace', 'Tab', 'ArrowLeft', 'ArrowRight'];\n const isValidKey = validDigitRegex.test(event.key) || allowedKeys.includes(event.key);\n const isValidColon = [1, 2, 4, 5].includes(selectionStart) && event.key === ':';\n\n if (!isValidKey && !isValidColon) {\n event.preventDefault();\n }\n};\n\nexport const formatTimeInputValue = (value: string) => {\n if (!value) {\n return value;\n }\n\n let formattedValue = value;\n\n // Format if the first value is bigger than 2, because it can't be bigger than 24 hours\n if (formattedValue.length === 1 && parseInt(value, 10) > 2) {\n return `0${formattedValue}:`;\n }\n\n const [secondToLastDigit, lastDigit] = formattedValue.slice(-2);\n if ([2, 5].includes(formattedValue.length) && lastDigit === ':') {\n formattedValue = `${formattedValue.slice(0, formattedValue.length - 2)}0${secondToLastDigit}`;\n }\n\n // Add `:` after hour/minute\n if (hourRegex.test(formattedValue) || minuteRegex.test(formattedValue)) {\n formattedValue += ':';\n }\n return formattedValue;\n};\n","<template>\n <bento-input-field\n class=\"b-input-time\"\n :type=\"inputType\"\n :step=\"isTouchDevice ? 1 : undefined\"\n :condensed=\"props.condensed\"\n :disabled=\"props.disabled\"\n :error-message=\"inputErrorMessage\"\n :label=\"props.label\"\n :model-value=\"inputModelValue\"\n :optional=\"props.optional\"\n :placeholder=\"computedPlaceholder\"\n :readonly=\"props.readonly\"\n :required=\"props.required\"\n :tooltip-text=\"props.tooltipText\"\n v-bind=\"$attrs\"\n @update:model-value=\"onInput\"\n @keydown=\"onKeyDown\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot name=\"default\"></slot>\n </template>\n <template v-if=\"!isTouchDevice\" #description>\n <slot name=\"description\">{{\n props.description ? `${props.description} ${t('timeFormatDescription')}` : t('timeFormatDescription')\n }}</slot>\n </template>\n </bento-input-field>\n</template>\n\n<script setup lang=\"ts\">\n // Components\n import { BentoInputField } from '@/components/input-field';\n import { INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n // Utils\n import { debounce } from '@/utils/ts/debounce';\n import { useI18n } from '@/utils/ts/i18n';\n import { formatTimeInputValue, isValidTimeString, validateTimeInput } from '@/utils/ts/time-input';\n\n // Types\n import type { BentoInputFieldValue } from '@/components/input-field/input-field.types';\n import { type BentoInputTimeProps } from './input-time.types';\n\n // Localization\n import messages from './messages.json';\n\n import { computed, provide, ref, useSlots, watch } from 'vue';\n import { useHasSlot, useTouchDevice } from '@/composables';\n\n const VALIDATION_DEBOUNCE_TIME = 300;\n\n provide(INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY, 'bento-input-time');\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { isTouchDevice } = useTouchDevice();\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n description: { default: undefined },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n label: { default: '' },\n optional: { type: Boolean, default: false },\n placeholder: { default: '' },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n condensed: { type: Boolean, default: false },\n modelValue: { default: undefined }\n});\n\n const emit = defineEmits([\"update:model-value\", \"keydown\", \"input:valid\", \"input:error\"]);\n\n const internalError = ref(false);\n const computedErrorMessage = computed(() => {\n if (props.errorMessage) {\n return props.errorMessage;\n }\n return internalError.value ? t('invalidTimeFormat') : null;\n });\n const inputErrorMessage = computed(() => (isTouchDevice.value ? props.errorMessage : computedErrorMessage.value));\n const inputType = computed(() => (isTouchDevice.value ? 'time' : undefined));\n const inputModelValue = computed(() => props.modelValue);\n const computedPlaceholder = computed(() => (isTouchDevice ? undefined : props.placeholder));\n\n const validateTime = (timeText: string) => {\n if (!timeText) {\n internalError.value = false;\n return;\n }\n\n const isValid = isValidTimeString(timeText);\n internalError.value = !isValid;\n\n if (isValid) {\n emit('input:valid');\n } else {\n emit('input:error');\n }\n };\n const validateTimeWithDebounce = debounce(validateTime, VALIDATION_DEBOUNCE_TIME);\n\n // Watch for external modelValue changes (e.g., when parent resets the value)\n watch(\n () => props.modelValue,\n newValue => {\n const timeText = String(newValue ?? '');\n // Clear the error only when the new value is a complete, valid time string\n if (timeText.length === 8 && isValidTimeString(timeText)) {\n internalError.value = false;\n }\n }\n );\n\n const onInput = (value: BentoInputFieldValue) => {\n if (props.disabled || props.readonly) {\n return;\n }\n\n if (isTouchDevice.value) {\n emit('update:model-value', String(value ?? ''));\n emit('input:valid');\n } else {\n const formatted = formatTimeInputValue(String(value ?? ''));\n emit('update:model-value', formatted);\n validateTimeWithDebounce(formatted);\n }\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (!isTouchDevice.value) {\n validateTimeInput(event);\n }\n emit('keydown', event);\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Input time component for entering time values in HH:MM:SS format.\n * This is an extension of the `bento-input-field` component with built-in\n * time formatting and validation logic.\n *\n * @usage\n * import { BentoInputTime } from '@adyen/bento-vue2';\n *\n * const timeValue = ref('');\n *\n * export default {\n * components: { BentoInputTime },\n * template: `\n * <bento-input-time\n * label=\"Start time\"\n * :model-value=\"timeValue\"\n * @update:model-value=\"newValue => timeValue.value = newValue\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-input-time',\n inheritAttrs: false,\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-time.scss\" />\n"],"names":["validDigitRegex","hourRegex","minuteRegex","isValidTimeString","timeText","validateTimeInput","event","selectionStart","allowedKeys","isValidKey","isValidColon","formatTimeInputValue","value","formattedValue","secondToLastDigit","lastDigit","__default__","messages","VALIDATION_DEBOUNCE_TIME","provide","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","slots","useSlots","hasSlot","useHasSlot","isTouchDevice","useTouchDevice","t","useI18n","internalError","ref","computedErrorMessage","computed","props","inputErrorMessage","inputType","inputModelValue","computedPlaceholder","validateTime","isValid","emit","validateTimeWithDebounce","debounce","watch","newValue","formatted"],"mappings":"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"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { ref as p, watch as T, defineComponent as B, computed as v, nextTick as E } from "vue";
|
|
2
|
+
import { d as F, B as I } from "./typography.C8lPlsbD.js";
|
|
3
|
+
import { B as k } from "./button.C9b2AC9w.js";
|
|
4
|
+
import { B as D } from "./loading-indicator.PxbRzshH.js";
|
|
5
|
+
import { B as L, s as A, g as w, a as H, f as O } from "./focus-trap.DRqjHzt6.js";
|
|
6
|
+
import { E as P } from "./expand.Bbielaja.js";
|
|
7
|
+
import { C as R } from "./cross.CC_B-vG-.js";
|
|
8
|
+
import { g as z } from "./generate-uid.NJ8tVoha.js";
|
|
9
|
+
import { u as V } from "./index.B6WW_F-J.js";
|
|
10
|
+
import { a as N, b as G } from "./index.CwzYJHw2.js";
|
|
11
|
+
import { n as $ } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
12
|
+
import "../assets/inspector.css";
|
|
13
|
+
function Y(s) {
|
|
14
|
+
const e = p([]), t = N();
|
|
15
|
+
return T(t, (a) => {
|
|
16
|
+
!s.value || !a || !s.value.contains(a) || (e.value.unshift(a), e.value.length > 3 && e.value.pop());
|
|
17
|
+
}), {
|
|
18
|
+
findValidFocusFallback: () => {
|
|
19
|
+
for (const a of e.value)
|
|
20
|
+
if (a && document.body.contains(a))
|
|
21
|
+
return a;
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const K = {
|
|
27
|
+
"de-DE": {
|
|
28
|
+
close: "Schließen",
|
|
29
|
+
expand: "Anzeigen",
|
|
30
|
+
inspector: "Inspektor",
|
|
31
|
+
returnToMainContent: "Zurück zum Hauptinhalt (Strg+Shift+S)",
|
|
32
|
+
returnToMainContentDescription: "Mit der Tastenkombination Strg + Umschalt + S können Sie zwischen dem Inspektor und den Seitenbereichen navigieren."
|
|
33
|
+
},
|
|
34
|
+
"en-GB": {
|
|
35
|
+
close: "Close",
|
|
36
|
+
expand: "Expand",
|
|
37
|
+
inspector: "Inspector",
|
|
38
|
+
returnToMainContent: "Return to main content (Ctrl+Shift+S)",
|
|
39
|
+
returnToMainContentDescription: "You can use Ctrl + Shift + S to navigate between the inspector and page sections."
|
|
40
|
+
},
|
|
41
|
+
"en-US": {
|
|
42
|
+
close: "Close",
|
|
43
|
+
expand: "Expand",
|
|
44
|
+
inspector: "Inspector",
|
|
45
|
+
returnToMainContent: "Return to main content (Ctrl+Shift+S)",
|
|
46
|
+
returnToMainContentDescription: "You can use Ctrl + Shift + S to navigate between the inspector and page sections."
|
|
47
|
+
},
|
|
48
|
+
"es-ES": {
|
|
49
|
+
close: "Cerrar",
|
|
50
|
+
expand: "Ampliar",
|
|
51
|
+
inspector: "Inspector",
|
|
52
|
+
returnToMainContent: "Volver al contenido principal (Ctrl+Shift+S)",
|
|
53
|
+
returnToMainContentDescription: "Puedes usar Ctrl + Shift + S para navegar entre las secciones del inspector y de la página."
|
|
54
|
+
},
|
|
55
|
+
"es-MX": {
|
|
56
|
+
close: "Cerrar",
|
|
57
|
+
expand: "Ampliar",
|
|
58
|
+
inspector: "Inspector",
|
|
59
|
+
returnToMainContent: "Volver al contenido principal (Ctrl+Shift+S)",
|
|
60
|
+
returnToMainContentDescription: "Puedes usar Ctrl + Shift + S para navegar entre las secciones del inspector y de la página."
|
|
61
|
+
},
|
|
62
|
+
"fr-FR": {
|
|
63
|
+
close: "Fermer",
|
|
64
|
+
expand: "Développer",
|
|
65
|
+
inspector: "Inspecteur",
|
|
66
|
+
returnToMainContent: "Retour au contenu principal (Ctrl+Maj+S)",
|
|
67
|
+
returnToMainContentDescription: "Vous pouvez utiliser Ctrl + Shift + S pour naviguer entre les sections de l'inspecteur et de la page."
|
|
68
|
+
},
|
|
69
|
+
"it-IT": {
|
|
70
|
+
close: "Chiudi",
|
|
71
|
+
expand: "Espandi",
|
|
72
|
+
inspector: "Ispettore",
|
|
73
|
+
returnToMainContent: "Torna al contenuto principale (Ctrl+Shift+S)",
|
|
74
|
+
returnToMainContentDescription: "Puoi usare Ctrl + Shift + S per navigare tra le sezioni ispettore e pagina."
|
|
75
|
+
},
|
|
76
|
+
"ja-JP": {
|
|
77
|
+
close: "閉じる",
|
|
78
|
+
expand: "展開",
|
|
79
|
+
inspector: "インスペクター",
|
|
80
|
+
returnToMainContent: "メインコンテンツに戻る(Ctrl+Shift+S)",
|
|
81
|
+
returnToMainContentDescription: "Ctrl + Shift + S を使用して、インスペクターとページセクション間を移動できます。"
|
|
82
|
+
},
|
|
83
|
+
"pt-BR": {
|
|
84
|
+
close: "Fechar",
|
|
85
|
+
expand: "Expandir",
|
|
86
|
+
inspector: "Inspetor",
|
|
87
|
+
returnToMainContent: "Voltar ao conteúdo principal (Ctrl+Shift+S)",
|
|
88
|
+
returnToMainContentDescription: "Você pode usar Ctrl + Shift + S para navegar entre as seções do inspetor e da página."
|
|
89
|
+
},
|
|
90
|
+
"zh-CN": {
|
|
91
|
+
close: "关闭",
|
|
92
|
+
expand: "展开",
|
|
93
|
+
inspector: "检查器",
|
|
94
|
+
returnToMainContent: "返回主内容(Ctrl+Shift+S)",
|
|
95
|
+
returnToMainContentDescription: "您可以使用 Ctrl + Shift + S 在检查器和页面分区之间导航。"
|
|
96
|
+
}
|
|
97
|
+
}, U = { i18n: { messages: K } }, X = /* @__PURE__ */ B({
|
|
98
|
+
...U,
|
|
99
|
+
__name: "inspector",
|
|
100
|
+
props: {
|
|
101
|
+
activePage: { default: "" },
|
|
102
|
+
expandable: { type: Boolean, default: !1 },
|
|
103
|
+
isOpen: { type: Boolean, default: !1 },
|
|
104
|
+
loading: { type: Boolean, default: !1 },
|
|
105
|
+
size: { default: "small" },
|
|
106
|
+
title: null,
|
|
107
|
+
relativeLayout: { default: "push-content" },
|
|
108
|
+
pageFocusAnchor: { default: null }
|
|
109
|
+
},
|
|
110
|
+
emits: ["update:is-open", "update:active-page", "expand"],
|
|
111
|
+
setup(s, { emit: n }) {
|
|
112
|
+
const e = s, { t } = V(), r = z("returnToMainContentDescription"), a = p(null), l = p(null), S = p(null), u = p(null), { width: _ } = G(a), d = v(() => {
|
|
113
|
+
const m = e.size === "small" ? 740 : 915;
|
|
114
|
+
return _.value > 0 && _.value < m;
|
|
115
|
+
}), c = v(() => e.pageFocusAnchor), b = v(() => ({
|
|
116
|
+
[`b-inspector--${e.size}`]: !0,
|
|
117
|
+
[`b-inspector--${e.relativeLayout}`]: !0,
|
|
118
|
+
"b-inspector--is-compact": d.value
|
|
119
|
+
})), M = v(() => `${t("inspector")}, ${e.title}`), { findValidFocusFallback: f } = Y(S), g = async () => {
|
|
120
|
+
e.isOpen ? (await E(), A(l.value, c.value)) : i(c.value ?? f());
|
|
121
|
+
}, y = (o) => {
|
|
122
|
+
if (d.value)
|
|
123
|
+
return;
|
|
124
|
+
const C = o.shiftKey ? -1 : 1, m = w(C, l.value);
|
|
125
|
+
H() === m && (o.preventDefault(), u.value = document.activeElement, i(c.value ?? f()), n("update:active-page", void 0));
|
|
126
|
+
}, x = (o) => {
|
|
127
|
+
const C = o.shiftKey && o.ctrlKey && o.key === "S";
|
|
128
|
+
e.isOpen && !d.value && C && h();
|
|
129
|
+
}, h = () => {
|
|
130
|
+
O(l.value) ? (u.value = document.activeElement, i(c.value ?? f()), n("update:active-page", void 0)) : i(u.value);
|
|
131
|
+
}, i = (o) => {
|
|
132
|
+
o && (o == null || o.focus(), document.activeElement !== o && i(o.parentElement));
|
|
133
|
+
};
|
|
134
|
+
return T(
|
|
135
|
+
() => e.activePage,
|
|
136
|
+
() => {
|
|
137
|
+
e.activePage && g();
|
|
138
|
+
}
|
|
139
|
+
), e.activePage || F(
|
|
140
|
+
'BentoInspector "active-page" as optional',
|
|
141
|
+
`Make sure to set the "active-page" prop and keep it in sync with "update:active-page".
|
|
142
|
+
"active-page" prop will be required in the next version`,
|
|
143
|
+
"2.0.0"
|
|
144
|
+
), { __sfc: !0, props: e, emit: n, t, returnToMainContentDescriptionId: r, wrapper: a, inspector: l, page: S, inspectorLastFocusedElement: u, wrapperWidth: _, isCompact: d, computedPageLastFocusedElement: c, conditionalClass: b, inspectorAriaLabel: M, findValidFocusFallback: f, setFocus: g, handleTabNavigation: y, handleSectionFocus: x, moveFocusBetweenSections: h, focusElement: i, BentoTypography: I, BentoButton: k, BentoLoadingIndicator: D, BentoFocusTrap: L, ExpandIcon: P, CrossIcon: R };
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
var j = function() {
|
|
148
|
+
var n = this, e = n._self._c, t = n._self._setupProxy;
|
|
149
|
+
return e("div", { ref: "wrapper", staticClass: "b-inspector", class: t.conditionalClass, on: { keydown: t.handleSectionFocus } }, [e("div", { ref: "page", staticClass: "b-inspector__page-wrapper" }, [e("div", { staticClass: "b-inspector__page" }, [n._t("page")], 2)]), e("Transition", { attrs: { name: "b-inspector__animation", mode: "out-in" }, on: { "before-enter": t.setFocus, "after-leave": t.setFocus } }, [n.isOpen ? e("aside", { ref: "inspector", staticClass: "b-inspector__container-wrapper", attrs: { "aria-label": t.inspectorAriaLabel }, on: { keydown: function(r) {
|
|
150
|
+
return !r.type.indexOf("key") && n._k(r.keyCode, "tab", 9, r.key, "Tab") ? null : t.handleTabNavigation.apply(null, arguments);
|
|
151
|
+
} } }, [e(t.BentoFocusTrap, { attrs: { disabled: !t.isCompact } }, [e("div", { staticClass: "b-inspector__container" }, [e("div", { staticClass: "b-inspector__header" }, [t.isCompact ? n._e() : [e(t.BentoButton, { staticClass: "b-inspector__return-content", attrs: { variant: "secondary", condensed: "", "aria-describedby": t.returnToMainContentDescriptionId }, on: { click: t.moveFocusBetweenSections } }, [n._v(" " + n._s(t.t("returnToMainContent")) + " ")]), e("span", { staticClass: "b-inspector__return-content-description", attrs: { id: t.returnToMainContentDescriptionId } }, [n._v(n._s(t.t("returnToMainContentDescription")))])], e(t.BentoTypography, { staticClass: "b-inspector__title", attrs: { el: "h2", variant: "title" } }, [n._v(" " + n._s(n.title) + " ")]), e("div", { staticClass: "b-inspector__icons" }, [n.expandable ? e(t.BentoButton, { attrs: { variant: "tertiary" }, on: { click: function(r) {
|
|
152
|
+
return t.emit("expand");
|
|
153
|
+
} }, scopedSlots: n._u([{ key: "iconLeft", fn: function() {
|
|
154
|
+
return [e(t.ExpandIcon, { attrs: { "svg-title": t.t("expand") } })];
|
|
155
|
+
}, proxy: !0 }], null, !1, 1210869445) }) : n._e(), e(t.BentoButton, { attrs: { variant: "tertiary" }, on: { click: function(r) {
|
|
156
|
+
return t.emit("update:is-open", !1);
|
|
157
|
+
} }, scopedSlots: n._u([{ key: "iconLeft", fn: function() {
|
|
158
|
+
return [e(t.CrossIcon, { attrs: { "svg-title": t.t("close") } })];
|
|
159
|
+
}, proxy: !0 }], null, !1, 858730413) })], 1)], 2), e("div", { staticClass: "b-inspector__content" }, [n.loading ? e(t.BentoLoadingIndicator, { staticClass: "b-inspector__loading-indicator", attrs: { large: "" } }) : n._t("content")], 2)])])], 1) : n._e()])], 1);
|
|
160
|
+
}, q = [], J = /* @__PURE__ */ $(
|
|
161
|
+
X,
|
|
162
|
+
j,
|
|
163
|
+
q,
|
|
164
|
+
!1,
|
|
165
|
+
null,
|
|
166
|
+
"62a28c4d"
|
|
167
|
+
);
|
|
168
|
+
const ce = J.exports;
|
|
169
|
+
export {
|
|
170
|
+
ce as B
|
|
171
|
+
};
|
|
172
|
+
//# sourceMappingURL=inspector.BzBPlz-5.js.map
|