@adyen/bento-vue3 1.69.0 → 1.70.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 +250 -823
- package/dist/accordion.js +1 -1
- 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/alert.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox-group.css +1 -1
- package/dist/assets/checkbox-input.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/code-snippet.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-tag.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/info-icon.css +1 -1
- package/dist/assets/input-field-phone-number.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/loading-indicator.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/popper-container.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/tab.css +1 -1
- package/dist/assets/tag.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/assets/toggle-button.css +1 -1
- package/dist/assets/toggle.css +1 -1
- package/dist/assets/tooltip.css +1 -1
- package/dist/assets/typography.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +2 -2
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/{accordion-item.H062lKz1.js → accordion-item.6etqAJV9.js} +2 -2
- package/dist/chunks/{accordion-item.H062lKz1.js.map → accordion-item.6etqAJV9.js.map} +1 -1
- package/dist/chunks/{action-bar.CbO7oNER.js → action-bar.CweA2FeY.js} +5 -5
- package/dist/chunks/{action-bar.CbO7oNER.js.map → action-bar.CweA2FeY.js.map} +1 -1
- package/dist/chunks/alert.Dzx5MzgE.js +171 -0
- package/dist/chunks/alert.Dzx5MzgE.js.map +1 -0
- package/dist/chunks/{avatar.BtxoYBvq.js → avatar.Dq59yj6m.js} +2 -2
- package/dist/chunks/{avatar.BtxoYBvq.js.map → avatar.Dq59yj6m.js.map} +1 -1
- package/dist/chunks/{base-button.Bcwm87OM.js → base-button.CjYb5Y8k.js} +2 -2
- package/dist/chunks/{base-button.Bcwm87OM.js.map → base-button.CjYb5Y8k.js.map} +1 -1
- package/dist/chunks/{base-modal.7vdoT8zp.js → base-modal.BrBcILSe.js} +6 -6
- package/dist/chunks/{base-modal.7vdoT8zp.js.map → base-modal.BrBcILSe.js.map} +1 -1
- package/dist/chunks/bin.DuHlEQBO.js +37 -0
- package/dist/chunks/bin.DuHlEQBO.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.zdsGh7un.js → button-actions-with-menu.CBuoSd3w.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.zdsGh7un.js.map → button-actions-with-menu.CBuoSd3w.js.map} +1 -1
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
- package/dist/chunks/{button.wMNce6wZ.js → button.C-MAa6ut.js} +4 -4
- package/dist/chunks/{button.wMNce6wZ.js.map → button.C-MAa6ut.js.map} +1 -1
- package/dist/chunks/{calendar.CYrrR8wd.js → calendar.DFHiga9k.js} +32 -32
- package/dist/chunks/{calendar.CYrrR8wd.js.map → calendar.DFHiga9k.js.map} +1 -1
- package/dist/chunks/{card.CNYYIpQW.js → card.BspLDcas.js} +4 -4
- package/dist/chunks/{card.CNYYIpQW.js.map → card.BspLDcas.js.map} +1 -1
- package/dist/chunks/{checkbox-group.fX5_d3XZ.js → checkbox-group.DIXgr1WQ.js} +6 -6
- package/dist/chunks/{checkbox-group.fX5_d3XZ.js.map → checkbox-group.DIXgr1WQ.js.map} +1 -1
- package/dist/chunks/{checkbox-input.B1hV3DU-.js → checkbox-input.BXNGT9U0.js} +2 -2
- package/dist/chunks/{checkbox-input.B1hV3DU-.js.map → checkbox-input.BXNGT9U0.js.map} +1 -1
- package/dist/chunks/{checkbox.C62ek8A8.js → checkbox.M6lKj2hQ.js} +6 -6
- package/dist/chunks/{checkbox.C62ek8A8.js.map → checkbox.M6lKj2hQ.js.map} +1 -1
- package/dist/chunks/{chip.CoBGGkn7.js → chip.DcpP3zb6.js} +3 -3
- package/dist/chunks/{chip.CoBGGkn7.js.map → chip.DcpP3zb6.js.map} +1 -1
- package/dist/chunks/{code-snippet.CrKl93Wq.js → code-snippet.CKrxKjkQ.js} +7 -7
- package/dist/chunks/{code-snippet.CrKl93Wq.js.map → code-snippet.CKrxKjkQ.js.map} +1 -1
- package/dist/chunks/{controls-group.2xftPPd7.js → controls-group.CXVHTaYp.js} +32 -29
- package/dist/chunks/controls-group.CXVHTaYp.js.map +1 -0
- package/dist/chunks/{copy.-8xjj6Hr.js → copy.C4DAAiPw.js} +5 -5
- package/dist/chunks/{copy.-8xjj6Hr.js.map → copy.C4DAAiPw.js.map} +1 -1
- package/dist/chunks/{country.BdqTkF7A.js → country.RVvsGwuV.js} +3 -3
- package/dist/chunks/{country.BdqTkF7A.js.map → country.RVvsGwuV.js.map} +1 -1
- package/dist/chunks/{currency.XiEfa4LT.js → currency.CN4UnCx8.js} +2 -2
- package/dist/chunks/{currency.XiEfa4LT.js.map → currency.CN4UnCx8.js.map} +1 -1
- package/dist/chunks/{dashboard-section.Di16gWGI.js → dashboard-section.Cll3tn0q.js} +3 -3
- package/dist/chunks/{dashboard-section.Di16gWGI.js.map → dashboard-section.Cll3tn0q.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CyZEW1LZ.js → dashed-underline.2OYxO-Rh.js} +4 -4
- package/dist/chunks/{dashed-underline.CyZEW1LZ.js.map → dashed-underline.2OYxO-Rh.js.map} +1 -1
- package/dist/chunks/{data-grid-template.CnYNEhPR.js → data-grid-template.CTRHofoW.js} +4 -4
- package/dist/chunks/{data-grid-template.CnYNEhPR.js.map → data-grid-template.CTRHofoW.js.map} +1 -1
- package/dist/chunks/{data-grid.aEQt05d9.js → data-grid.DMOTTywp.js} +185 -185
- package/dist/chunks/data-grid.DMOTTywp.js.map +1 -0
- package/dist/chunks/{date-picker.Bk0A3rha.js → date-picker.CBlQ0ql7.js} +18 -18
- package/dist/chunks/{date-picker.Bk0A3rha.js.map → date-picker.CBlQ0ql7.js.map} +1 -1
- package/dist/chunks/{date-range-picker.l-CSmXBk.js → date-range-picker.D-gGqpFB.js} +25 -25
- package/dist/chunks/{date-range-picker.l-CSmXBk.js.map → date-range-picker.D-gGqpFB.js.map} +1 -1
- package/dist/chunks/{date.BZENjOb6.js → date.4GAXrgy5.js} +2 -2
- package/dist/chunks/{date.BZENjOb6.js.map → date.4GAXrgy5.js.map} +1 -1
- package/dist/chunks/{dialog-page.BJaRwRhF.js → dialog-page.VSJgHY3C.js} +3 -3
- package/dist/chunks/{dialog-page.BJaRwRhF.js.map → dialog-page.VSJgHY3C.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.DWgL31p1.js → dropdown-default-textbox.CGsOngY1.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.DWgL31p1.js.map → dropdown-default-textbox.CGsOngY1.js.map} +1 -1
- package/dist/chunks/dropdown-tag.DlFpUeXa.js +296 -0
- package/dist/chunks/dropdown-tag.DlFpUeXa.js.map +1 -0
- package/dist/chunks/{dropdown.Co86azLK.js → dropdown.agfzvJZE.js} +22 -22
- package/dist/chunks/{dropdown.Co86azLK.js.map → dropdown.agfzvJZE.js.map} +1 -1
- package/dist/chunks/{empty-state.YNNEDsnK.js → empty-state.BTaeZdQu.js} +3 -3
- package/dist/chunks/{empty-state.YNNEDsnK.js.map → empty-state.BTaeZdQu.js.map} +1 -1
- package/dist/chunks/{error-message.Cu4cIfdg.js → error-message.B1P5ictH.js} +5 -5
- package/dist/chunks/{error-message.Cu4cIfdg.js.map → error-message.B1P5ictH.js.map} +1 -1
- package/dist/chunks/{file-uploader.09149Fx8.js → file-uploader.Vac1Cu0i.js} +21 -19
- package/dist/chunks/file-uploader.Vac1Cu0i.js.map +1 -0
- package/dist/chunks/{filter-bar.D6n7Srr5.js → filter-bar.uUpoP-XZ.js} +233 -236
- package/dist/chunks/filter-bar.uUpoP-XZ.js.map +1 -0
- package/dist/chunks/{fixed-scroller.QlDKOD7y.js → fixed-scroller.DSGxXiAH.js} +2 -2
- package/dist/chunks/{fixed-scroller.QlDKOD7y.js.map → fixed-scroller.DSGxXiAH.js.map} +1 -1
- package/dist/chunks/{footer-actions.0cBTJ1kw.js → footer-actions.gRKTKGts.js} +4 -4
- package/dist/chunks/{footer-actions.0cBTJ1kw.js.map → footer-actions.gRKTKGts.js.map} +1 -1
- package/dist/chunks/{form-layout-title.Cq_xVPUq.js → form-layout-title.DdRqnXXi.js} +3 -3
- package/dist/chunks/{form-layout-title.Cq_xVPUq.js.map → form-layout-title.DdRqnXXi.js.map} +1 -1
- package/dist/chunks/{header-meta.BJGF0E3r.js → header-meta.Ct79L1O8.js} +5 -5
- package/dist/chunks/{header-meta.BJGF0E3r.js.map → header-meta.Ct79L1O8.js.map} +1 -1
- package/dist/chunks/{header-with-views.Drzq84zs.js → header-with-views.BVHdSAKp.js} +211 -207
- package/dist/chunks/header-with-views.BVHdSAKp.js.map +1 -0
- package/dist/chunks/{header.B6DzOioR.js → header.Cd1P8lYK.js} +4 -4
- package/dist/chunks/{header.B6DzOioR.js.map → header.Cd1P8lYK.js.map} +1 -1
- package/dist/chunks/{info-icon.DKnzFXy1.js → info-icon.Bl0iKUfC.js} +7 -7
- package/dist/chunks/{info-icon.DKnzFXy1.js.map → info-icon.Bl0iKUfC.js.map} +1 -1
- package/dist/chunks/info.BKwey1HA.js +44 -0
- package/dist/chunks/info.BKwey1HA.js.map +1 -0
- package/dist/chunks/{input-field-password.DC8lJFsr.js → input-field-password.DkIWrrxy.js} +7 -7
- package/dist/chunks/{input-field-password.DC8lJFsr.js.map → input-field-password.DkIWrrxy.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.BbMEzDiR.js → input-field-phone-number.EXlRu8qq.js} +9 -9
- package/dist/chunks/{input-field-phone-number.BbMEzDiR.js.map → input-field-phone-number.EXlRu8qq.js.map} +1 -1
- package/dist/chunks/{input-field.6bH4yGb2.js → input-field.CgbiOju9.js} +4 -4
- package/dist/chunks/{input-field.6bH4yGb2.js.map → input-field.CgbiOju9.js.map} +1 -1
- package/dist/chunks/{inspector.Bsv68G-e.js → inspector.BGtTMtE0.js} +4 -4
- package/dist/chunks/{inspector.Bsv68G-e.js.map → inspector.BGtTMtE0.js.map} +1 -1
- package/dist/chunks/{layout-row.CIg1pwOd.js → layout-row.BPfOPn4x.js} +2 -2
- package/dist/chunks/{layout-row.CIg1pwOd.js.map → layout-row.BPfOPn4x.js.map} +1 -1
- package/dist/chunks/{link.Di0rtpOj.js → link.cwPmWlsk.js} +2 -2
- package/dist/chunks/{link.Di0rtpOj.js.map → link.cwPmWlsk.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.C6WHiASI.js → listbox-option-tag.CDIkX7nh.js} +3 -3
- package/dist/chunks/{listbox-option-tag.C6WHiASI.js.map → listbox-option-tag.CDIkX7nh.js.map} +1 -1
- package/dist/chunks/{loading-indicator.BmAQqPP2.js → loading-indicator.VHi5tbZa.js} +2 -2
- package/dist/chunks/{loading-indicator.BmAQqPP2.js.map → loading-indicator.VHi5tbZa.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.BHzyS4y7.js → modal-fullscreen.-Q-7GMyT.js} +5 -5
- package/dist/chunks/{modal-fullscreen.BHzyS4y7.js.map → modal-fullscreen.-Q-7GMyT.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CqDhzFJ9.js → modal.vue_vue_type_script_setup_true_lang.TFh7p51f.js} +6 -6
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CqDhzFJ9.js.map → modal.vue_vue_type_script_setup_true_lang.TFh7p51f.js.map} +1 -1
- package/dist/chunks/{pagination.BuYH2_62.js → pagination.DW_HPEIu.js} +4 -4
- package/dist/chunks/{pagination.BuYH2_62.js.map → pagination.DW_HPEIu.js.map} +1 -1
- package/dist/chunks/{payment-method.4cnK2M5b.js → payment-method.CDnn1bjo.js} +2 -2
- package/dist/chunks/{payment-method.4cnK2M5b.js.map → payment-method.CDnn1bjo.js.map} +1 -1
- package/dist/chunks/popover.types.COM6oQgq.js +6 -0
- package/dist/chunks/{popover.types.BQILgzhs.js.map → popover.types.COM6oQgq.js.map} +1 -1
- package/dist/chunks/{popper-container.idDrquM6.js → popper-container.CgJzEQ7N.js} +2 -2
- package/dist/chunks/{popper-container.idDrquM6.js.map → popper-container.CgJzEQ7N.js.map} +1 -1
- package/dist/chunks/{promo-banner.il4_mdEk.js → promo-banner.BbqIA4Ce.js} +3 -3
- package/dist/chunks/{promo-banner.il4_mdEk.js.map → promo-banner.BbqIA4Ce.js.map} +1 -1
- package/dist/chunks/{radio-group.BG8W9epW.js → radio-group.CbLIPi7h.js} +77 -69
- package/dist/chunks/radio-group.CbLIPi7h.js.map +1 -0
- package/dist/chunks/{radio-input.DvPjlvPm.js → radio-input.odN9FOyr.js} +2 -2
- package/dist/chunks/{radio-input.DvPjlvPm.js.map → radio-input.odN9FOyr.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.vqti0Ls0.js → rich-text-editor.C0hJeV4H.js} +7 -7
- package/dist/chunks/{rich-text-editor.vqti0Ls0.js.map → rich-text-editor.C0hJeV4H.js.map} +1 -1
- package/dist/chunks/{search-bar.RGL70u_Y.js → search-bar.CvAi2t3-.js} +3 -3
- package/dist/chunks/{search-bar.RGL70u_Y.js.map → search-bar.CvAi2t3-.js.map} +1 -1
- package/dist/chunks/{secondary-nav.Dtw_Dm_X.js → secondary-nav.yntS8-u5.js} +3 -3
- package/dist/chunks/{secondary-nav.Dtw_Dm_X.js.map → secondary-nav.yntS8-u5.js.map} +1 -1
- package/dist/chunks/{segmented-control.C6QyN2jS.js → segmented-control.CRSdIvha.js} +3 -3
- package/dist/chunks/{segmented-control.C6QyN2jS.js.map → segmented-control.CRSdIvha.js.map} +1 -1
- package/dist/chunks/{selection-card-group.DpogJSo0.js → selection-card-group.Cu3V8h4R.js} +6 -6
- package/dist/chunks/{selection-card-group.DpogJSo0.js.map → selection-card-group.Cu3V8h4R.js.map} +1 -1
- package/dist/chunks/{sidepanel.BqRWoCd3.js → sidepanel.z18XSO3M.js} +6 -6
- package/dist/chunks/{sidepanel.BqRWoCd3.js.map → sidepanel.z18XSO3M.js.map} +1 -1
- package/dist/chunks/{status.types.B7vJ-_oJ.js → status.types.-l2qJxLn.js} +2 -2
- package/dist/chunks/{status.types.B7vJ-_oJ.js.map → status.types.-l2qJxLn.js.map} +1 -1
- package/dist/chunks/{step.BdZrreHU.js → step.BMSjltwl.js} +3 -3
- package/dist/chunks/{step.BdZrreHU.js.map → step.BMSjltwl.js.map} +1 -1
- package/dist/chunks/{structured-list-item.DIwkcIMT.js → structured-list-item.CD1nMqzH.js} +6 -6
- package/dist/chunks/{structured-list-item.DIwkcIMT.js.map → structured-list-item.CD1nMqzH.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.DHUnTXI-.js → summary-grid.types.BHuDlPDw.js} +6 -6
- package/dist/chunks/{summary-grid.types.DHUnTXI-.js.map → summary-grid.types.BHuDlPDw.js.map} +1 -1
- package/dist/chunks/{tab.jIG8-7-Q.js → tab.C3R_VoJL.js} +3 -3
- package/dist/chunks/{tab.jIG8-7-Q.js.map → tab.C3R_VoJL.js.map} +1 -1
- package/dist/chunks/{tag.BP8fBCx-.js → tag.B6AmSws9.js} +7 -7
- package/dist/chunks/{tag.BP8fBCx-.js.map → tag.B6AmSws9.js.map} +1 -1
- package/dist/chunks/{textarea.CtfRoIUw.js → textarea.DfQLxj_w.js} +4 -4
- package/dist/chunks/{textarea.CtfRoIUw.js.map → textarea.DfQLxj_w.js.map} +1 -1
- package/dist/chunks/timeline-item.25y9USE-.js +568 -0
- package/dist/chunks/timeline-item.25y9USE-.js.map +1 -0
- package/dist/chunks/{toast.w_FD0zQA.js → toast.DIhABAW8.js} +4 -4
- package/dist/chunks/{toast.w_FD0zQA.js.map → toast.DIhABAW8.js.map} +1 -1
- package/dist/chunks/{toggle-button.ByyLw0Yf.js → toggle-button.CQl9HneO.js} +194 -188
- package/dist/chunks/toggle-button.CQl9HneO.js.map +1 -0
- package/dist/chunks/{toggle.CjEL1ko8.js → toggle.C8k7NQ7y.js} +2 -2
- package/dist/chunks/{toggle.CjEL1ko8.js.map → toggle.C8k7NQ7y.js.map} +1 -1
- package/dist/chunks/{tooltip.Dww8NiUR.js → tooltip.lBnko9QV.js} +4 -4
- package/dist/chunks/tooltip.lBnko9QV.js.map +1 -0
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.rY33hqQQ.js → tutorial.vue_vue_type_script_setup_true_lang.BProZFmI.js} +5 -5
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.rY33hqQQ.js.map → tutorial.vue_vue_type_script_setup_true_lang.BProZFmI.js.map} +1 -1
- package/dist/chunks/{typography.CFHvBR7L.js → typography.yBEME_Gu.js} +2 -2
- package/dist/chunks/{typography.CFHvBR7L.js.map → typography.yBEME_Gu.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.BzKbXZPO.js → use-bento-toast-controller.Kri_h7jS.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.BzKbXZPO.js.map → use-bento-toast-controller.Kri_h7jS.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.BcNRo4mZ.js → use-cached-selected-values.CELe-MsT.js} +7 -7
- package/dist/chunks/use-cached-selected-values.CELe-MsT.js.map +1 -0
- package/dist/chunks/{use-country-items.Duh4bMqW.js → use-country-items.D_kamcYy.js} +2 -2
- package/dist/chunks/{use-country-items.Duh4bMqW.js.map → use-country-items.D_kamcYy.js.map} +1 -1
- package/dist/chunks/{use-country-phon-code.BOaJ9PDl.js → use-country-phon-code.Bui3zD6W.js} +5 -3
- package/dist/chunks/{use-country-phon-code.BOaJ9PDl.js.map → use-country-phon-code.Bui3zD6W.js.map} +1 -1
- package/dist/chunks/warning-filled.BMGD0G-_.js +29 -0
- package/dist/chunks/warning-filled.BMGD0G-_.js.map +1 -0
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/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/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +136 -136
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +12 -12
- package/dist/layout.js +1 -1
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +2 -2
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +2 -2
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/status.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +5 -5
- package/dist/chunks/alert.DFSdD4jX.js +0 -169
- package/dist/chunks/alert.DFSdD4jX.js.map +0 -1
- package/dist/chunks/bin.CiGG2V4b.js +0 -37
- package/dist/chunks/bin.CiGG2V4b.js.map +0 -1
- package/dist/chunks/controls-group.2xftPPd7.js.map +0 -1
- package/dist/chunks/data-grid.aEQt05d9.js.map +0 -1
- package/dist/chunks/dropdown-tag.CnqIUH1X.js +0 -263
- package/dist/chunks/dropdown-tag.CnqIUH1X.js.map +0 -1
- package/dist/chunks/file-uploader.09149Fx8.js.map +0 -1
- package/dist/chunks/filter-bar.D6n7Srr5.js.map +0 -1
- package/dist/chunks/header-with-views.Drzq84zs.js.map +0 -1
- package/dist/chunks/info.DcTs-Bzp.js +0 -44
- package/dist/chunks/info.DcTs-Bzp.js.map +0 -1
- package/dist/chunks/popover.types.BQILgzhs.js +0 -6
- package/dist/chunks/radio-group.BG8W9epW.js.map +0 -1
- package/dist/chunks/timeline-item.DthjD14m.js +0 -566
- package/dist/chunks/timeline-item.DthjD14m.js.map +0 -1
- package/dist/chunks/toggle-button.ByyLw0Yf.js.map +0 -1
- package/dist/chunks/tooltip.Dww8NiUR.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.BcNRo4mZ.js.map +0 -1
- package/dist/chunks/warning-filled.AiUbXzzg.js +0 -29
- package/dist/chunks/warning-filled.AiUbXzzg.js.map +0 -1
- package/dist/styles/legacy.css +0 -2239
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.
|
|
1
|
+
{"version":3,"file":"tag.B6AmSws9.js","sources":["../../../vue2/src/components/tag/tag.types.ts","../../../vue2/src/components/tag/tag.vue"],"sourcesContent":["export interface BentoTagProps {\n /**\n * The label text content of the Tag.\n */\n label?: string;\n\n /**\n * The number of characters to limit the number of displayed characters for the tag text, truncating it with an ellipsis of three dots \"...\".\n */\n truncate?: number;\n\n /**\n * The variant variant of tag\n */\n variant?: BentoTagVariant | `${BentoTagVariant}`;\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTagVariant {\n GREY = 'grey',\n BLUE = 'blue',\n GREEN = 'green',\n ORANGE = 'orange',\n RED = 'red',\n WHITE = 'white',\n}\n","<template>\n <span\n v-bento-tooltip-directive=\"shouldShowTooltip ? textFromSlot : null\"\n data-testid=\"tag\"\n class=\"b-tag\"\n :class=\"tagConditionalClasses\"\n :aria-label=\"computedAriaLabel\"\n >\n <bento-typography class=\"b-tag__label\" el=\"span\" variant=\"caption\" stronger>\n {{ formattedText }}\n </bento-typography>\n </span>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n // Use relative paths otherwise the interface won't be correctly detected\n // TODO: Use alias once the support is added to work with the betterDefine macro\n import { type BentoTagProps, BentoTagVariant } from './tag.types';\n import { BentoTypography } from '@/components/typography';\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n\n const props = withDefaults(defineProps<BentoTagProps>(), {\n label: null,\n truncate: null,\n variant: BentoTagVariant.GREY,\n });\n\n const slots = useSlots();\n\n const computedAriaLabel = useAriaLabel({\n label: props.label || getSlotText(slots)('default'),\n defaultFallback: 'tag',\n });\n\n const tagConditionalClasses = computed(() => ({\n [`b-tag--${props.variant}`]: props.variant,\n }));\n\n const textFromSlot = computed(() => props.label ?? getSlotText(slots)('default') ?? 'tag');\n const shouldShowTooltip = computed(() => props.truncate && textFromSlot.value.length > props.truncate);\n\n const formattedText = computed(() => {\n if (!props.truncate) {\n return textFromSlot.value;\n }\n\n return shouldShowTooltip.value ? `${textFromSlot.value.slice(0, props.truncate)}...` : textFromSlot.value;\n });\n</script>\n\n<script lang=\"ts\">\n export default {\n name: 'bento-tag',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./tag.scss\" />\n"],"names":["BentoTagVariant","BentoTagVariant2","__default__","props","__props","slots","useSlots","computedAriaLabel","useAriaLabel","getSlotText","tagConditionalClasses","computed","textFromSlot","shouldShowTooltip","formattedText"],"mappings":";;;;;;;AAoBY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,MAAA,OACAA,EAAA,QAAA,SANQA,IAAAD,KAAA,CAAA,CAAA;0BCkCRE,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;AAhCA,UAAAC,IAAAC,GAMAC,IAAAC,EAAA,GAEAC,IAAAC,EAAA;AAAA,MAAuC,OAAAL,EAAA,SAAAM,EAAAJ,CAAA,EAAA,SAAA;AAAA,MACe,iBAAA;AAAA,IACjC,CAAA,GAGrBK,IAAAC,EAAA,OAAA;AAAA,MAA8C,CAAA,UAAAR,EAAA,OAAA,EAAA,GAAAA,EAAA;AAAA,IACP,EAAA,GAGvCS,IAAAD,EAAA,MAAAR,EAAA,SAAAM,EAAAJ,CAAA,EAAA,SAAA,KAAA,KAAA,GACAQ,IAAAF,EAAA,MAAAR,EAAA,YAAAS,EAAA,MAAA,SAAAT,EAAA,QAAA,GAEAW,IAAAH,EAAA,MACIR,EAAA,YAIAU,EAAA,QAAA,GAAAD,EAAA,MAAA,MAAA,GAAAT,EAAA,QAAA,CAAA,QAHIS,EAAA,KAGgG;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as Le, useAttrs as Ee, toRefs as q, ref as u, toRef as Ce, computed as i, watch as k, nextTick as Re, onMounted as Ae, onUnmounted as Se, createElementBlock as Y, openBlock as c, normalizeClass as E, createElementVNode as D, normalizeStyle as z, createVNode as U, createBlock as h, createCommentVNode as d, unref as l, withCtx as C, createTextVNode as V, toDisplayString as G, withKeys as H } from "vue";
|
|
2
|
-
import { B as _e } from "./button.
|
|
3
|
-
import { B as O } from "./typography.
|
|
2
|
+
import { B as _e } from "./button.C-MAa6ut.js";
|
|
3
|
+
import { B as O } from "./typography.yBEME_Gu.js";
|
|
4
4
|
import { C as Ie } from "./cross-circle-fill-small.Dv5-PxwF.js";
|
|
5
5
|
import { g as Be } from "./generate-uid.NJ8tVoha.js";
|
|
6
6
|
import { o as j } from "./resize.Bqks3WUm.js";
|
|
@@ -8,7 +8,7 @@ import { u as Ne } from "./aria-label.CaUURpnB.js";
|
|
|
8
8
|
import { u as ke } from "./i18n.B6g5VX0q.js";
|
|
9
9
|
import { u as De } from "./use-form-layout-loading.D3lALhtC.js";
|
|
10
10
|
import { B as Ue } from "./es6.MoTTyETW.js";
|
|
11
|
-
import { F as He, E as X } from "./error-message.
|
|
11
|
+
import { F as He, E as X } from "./error-message.B1P5ictH.js";
|
|
12
12
|
import { _ as Oe } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
13
13
|
import "../assets/textarea.css";
|
|
14
14
|
var w = /* @__PURE__ */ ((e) => (e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e.BOTH = "both", e.NONE = "none", e))(w || {}), v = /* @__PURE__ */ ((e) => (e.CLEARABLE = "clearable", e.DISABLED = "disabled", e.ERROR = "error", e.READONLY = "readonly", e))(v || {}), s = /* @__PURE__ */ ((e) => (e.BLUR = "blur", e.CHANGE = "change", e.CLEAR = "clear", e.ESCAPE_PRESSED = "escape-pressed", e.FOCUS = "focus", e.INPUT = "input", e.KEYDOWN = "keydown", e.KEYUP = "keyup", e))(s || {});
|
|
@@ -292,4 +292,4 @@ const Z = {
|
|
|
292
292
|
export {
|
|
293
293
|
ea as B
|
|
294
294
|
};
|
|
295
|
-
//# sourceMappingURL=textarea.
|
|
295
|
+
//# sourceMappingURL=textarea.DfQLxj_w.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.CtfRoIUw.js","sources":["../../../vue2/src/components/textarea/textarea.types.ts","../../../vue2/src/components/textarea/textarea.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTextareaResizeOption {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n BOTH = 'both',\n NONE = 'none',\n}\n\nexport enum BentoTextareaStateClass {\n CLEARABLE = 'clearable',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum BentoTextareaEvent {\n BLUR = 'blur',\n CHANGE = 'change',\n CLEAR = 'clear',\n ESCAPE_PRESSED = 'escape-pressed',\n FOCUS = 'focus',\n INPUT = 'input',\n KEYDOWN = 'keydown',\n KEYUP = 'keyup',\n}\n","<template>\n <div ref=\"textareaComponent\" class=\"b-textarea\" :class=\"conditionalClasses\">\n <div :style=\"{ width: textareaWrapperWidth }\">\n <div class=\"b-textarea__label-box\" :class=\"conditionalClassesLabelBox\">\n <field-label\n v-if=\"label\"\n :for=\"textareaId\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n <bento-typography\n v-if=\"characterLimit\"\n el=\"span\"\n class=\"b-textarea__label-item\"\n :class=\"conditionalClassesLabelItem\"\n >\n {{ counter }}\n </bento-typography>\n </div>\n <bento-typography el=\"div\" class=\"b-textarea__input-box\" :aria-disabled=\"disabled\">\n <textarea\n :id=\"textareaId\"\n ref=\"textareaElement\"\n :value=\"textareaValue\"\n class=\"b-textarea__input\"\n :class=\"conditionalClassesInput\"\n :aria-label=\"computedAriaLabel\"\n :aria-invalid=\"invalidInput\"\n :readonly=\"isReadOnly\"\n :required=\"required\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n :style=\"{ resize: resizable, height: textareaHeight }\"\n @blur=\"onBlur\"\n @change=\"onChange\"\n @focus=\"onFocus\"\n @input=\"onInput\"\n @keydown.esc=\"onPressEscape\"\n @keydown=\"onKeyDown\"\n @keyup=\"onKeyUp\"\n @mousedown=\"onMouseDown\"\n @mouseup=\"onMouseUp\"\n >\n </textarea>\n\n <div v-if=\"showClearButton\" class=\"b-textarea__clear-button\">\n <bento-button\n variant=\"tertiary\"\n :disabled=\"disabled\"\n @click=\"onClear\"\n @keypress.enter=\"onClear\"\n @keyup.space=\"onClear\"\n >\n <template #iconLeft>\n <cross-circle-fill-small-icon :svg-title=\"t('clearText')\" />\n </template>\n </bento-button>\n </div>\n </bento-typography>\n\n <error-message v-if=\"isOverCharacterLimit\" :error-message=\"counterErrorText\" />\n\n <error-message v-if=\"errorMessage\" :error-message=\"errorMessage\" />\n\n <bento-typography v-if=\"description\" class=\"b-textarea__description\" el=\"span\">\n {{ description }}\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, onMounted, onUnmounted, type PropType, ref, toRef, toRefs, useAttrs, watch } from 'vue';\n\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n\n // Utils\n import { generateUid } from '@/core/utils/ts';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n\n // Composables\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n // Constants\n import { BTextareaInputFocusBorderWidth } from '@adyen/bento-design-tokens/dist/js/bento/es6';\n\n // Types\n import { BentoTextareaEvent, BentoTextareaResizeOption, BentoTextareaStateClass } from './textarea.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n\n const props = defineProps({\n /**\n * Text that labels an the input element\n */\n ariaLabel: { type: String, default: undefined },\n\n /**\n * Text that shows number of characters in textarea\n */\n characterLimit: { type: Number, default: undefined },\n\n /**\n * Text displayed as the help text of the textarea\n */\n description: { type: String, default: '' },\n\n /**\n * Disables the possibility of changing value in the textarea\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * If set to true, shows a button to clear all the text\n */\n clearable: { type: Boolean, default: false },\n\n /**\n * Adds error text\n */\n errorMessage: { type: String, default: '' },\n\n /**\n * Sets the height of the textarea, e.g 200px OR 20vh\n */\n height: { type: String, default: null },\n\n /**\n * Text displayed as the label of the textarea\n */\n label: { type: String, default: '' },\n\n /**\n * Highlights the textarea is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Text displayed as the placeholder of the textarea\n */\n placeholder: { type: String, default: '' },\n\n /**\n * Set the textarea to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the possibility of resize the textarea\n */\n resizable: {\n type: String as PropType<BentoTextareaResizeOption | `${BentoTextareaResizeOption}`>,\n default: BentoTextareaResizeOption.BOTH,\n validator: (value: BentoTextareaResizeOption) => Object.values(BentoTextareaResizeOption).includes(value),\n },\n\n /**\n * Highlights the textarea is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * Text displayed as the value of the textarea\n */\n value: { type: String, default: '' },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the element has lost focus\n */\n (e: BentoTextareaEvent.BLUR): void;\n\n /**\n * Emitted when the user modifies the element's value. Unlike the 'input' event, the change event is not necessarily fired for each alteration to an element's value\n */\n (e: BentoTextareaEvent.CHANGE): void;\n\n /**\n * Emitted when the \"Clear\" button was clicked\n */\n (e: BentoTextareaEvent.CLEAR): void;\n\n /**\n * Emitted when the \"ESC\" key is pressed\n */\n (e: BentoTextareaEvent.ESCAPE_PRESSED): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: BentoTextareaEvent.FOCUS): void;\n\n /**\n * Emitted when the component's model changes\n */\n (e: BentoTextareaEvent.INPUT, value: string): void;\n\n /**\n * Emitted when the text area keydown event is fired\n */\n (e: BentoTextareaEvent.KEYDOWN, event: KeyboardEvent): void;\n\n /**\n * Emitted when the text area keyup event is fired\n */\n (e: BentoTextareaEvent.KEYUP, event: KeyboardEvent): void;\n }>();\n\n const { height } = toRefs(props);\n\n const textareaId = generateUid('textarea');\n const textareaElement = ref<HTMLTextAreaElement>(null);\n const textareaComponent = ref<HTMLDivElement>(null);\n const textareaValue = ref(props.value);\n const defaultTextareaHeight = 44;\n const textareaHeight = ref(props.height || `${defaultTextareaHeight}px`);\n const userSetHeight = ref<number>(0);\n const textareaWrapperWidth = ref('100%'); // The width set to the wrapper of the label, textarea and description\n const isUserResizing = ref(false);\n let textareaElementObserver: ResizeObserver | null = null;\n let textareaComponentObserver: ResizeObserver | null = null;\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const counter = computed(() => `${n(textareaValue?.value?.length ?? 0)} / ${n(props.characterLimit)}`);\n const isDynamicHeight = computed(() => !height.value);\n const isOverCharacterLimit = computed(\n () => props.characterLimit && textareaValue.value.length > props.characterLimit\n );\n\n /**\n * Calculates and sets the height of the textarea.\n * The height is determined by the maximum of the following values:\n *\n * 1. The content's scroll height (with a minimum of `defaultTextareaHeight`) + the border width.\n * 2. The height set by the user manually resizing the textarea (`userSetHeight`).\n * 3. The default minimum height (`defaultTextareaHeight`).\n *\n * This ensures the textarea grows with content, shrinks when content is removed,\n * but never goes below the manually set height or the default height.\n */\n const calculateHeight = () => {\n if (textareaElement.value) {\n const newHeight = Math.max(\n textareaElement.value.scrollHeight <= defaultTextareaHeight\n ? defaultTextareaHeight\n : textareaElement.value.scrollHeight + TEXTAREA_BORDER_WIDTH * 2,\n userSetHeight.value,\n defaultTextareaHeight\n );\n textareaHeight.value = `${newHeight}px`;\n }\n };\n\n watch(height, () => {\n if (isDynamicHeight.value) {\n calculateHeight();\n } else {\n textareaHeight.value = height.value;\n }\n });\n\n watch(\n () => props.value,\n () => {\n textareaValue.value = props.value;\n },\n { immediate: true }\n );\n\n watch(\n () => textareaValue.value,\n async () => {\n if (isDynamicHeight.value) {\n // Hack to make the textarea calculate its height properly\n // Set the textarea back to the original value before calculating the height\n textareaHeight.value = `${defaultTextareaHeight}px`;\n if (!textareaValue.value) {\n return;\n }\n\n await nextTick();\n calculateHeight();\n }\n },\n { immediate: true }\n );\n\n const invalidInput = computed(() => !!props.errorMessage || isOverCharacterLimit.value);\n\n const conditionalClasses = computed(() => ({\n [`b-textarea--${BentoTextareaStateClass.DISABLED}`]: props.disabled,\n }));\n\n const conditionalClassesInput = computed(() => ({\n [`b-textarea__input--${BentoTextareaStateClass.CLEARABLE}`]: props.clearable,\n [`b-textarea__input--${BentoTextareaStateClass.READONLY}`]: isReadOnly.value,\n [`b-textarea__input--${BentoTextareaStateClass.ERROR}`]: invalidInput.value,\n [`b-textarea__input--dynamic-height`]: isDynamicHeight.value,\n }));\n\n const conditionalClassesLabelBox = computed(() => ({\n [`b-textarea__label-box--no-label`]: !props.label,\n }));\n\n const conditionalClassesLabelItem = computed(() => ({\n [`b-textarea__label-item--${BentoTextareaStateClass.ERROR}`]: isOverCharacterLimit.value,\n }));\n\n const counterErrorText = computed(() => t('yourTextCanBenAtMost', { characterLimit: props.characterLimit }));\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel, label } = 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: label,\n });\n\n const showClearButton = computed(\n () => props.clearable && textareaValue.value && !props.disabled && !isReadOnly.value\n );\n\n const onClear = () => {\n textareaValue.value = '';\n emit(BentoTextareaEvent.CLEAR);\n emit(BentoTextareaEvent.INPUT, '');\n };\n\n const onInput = (event: InputEvent) => {\n event.stopImmediatePropagation();\n\n if (!props.disabled && !isReadOnly.value) {\n textareaValue.value = (event.target as HTMLInputElement).value;\n /**\n * Triggered when input value is changed\n *\n * @event input\n * @property {String} inputValue - the updated textarea value\n */\n emit(BentoTextareaEvent.INPUT, textareaValue.value);\n }\n };\n\n const onBlur = () => {\n textareaElement.value.scrollTop = 0;\n emit(BentoTextareaEvent.BLUR);\n };\n\n const onFocus = () => {\n textareaElement.value.focus();\n emit(BentoTextareaEvent.FOCUS);\n };\n\n const onChange = () => {\n emit(BentoTextareaEvent.CHANGE);\n };\n\n const onPressEscape = () => {\n emit(BentoTextareaEvent.ESCAPE_PRESSED);\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n event.stopPropagation();\n emit(BentoTextareaEvent.KEYDOWN, event);\n };\n\n const onKeyUp = (event: KeyboardEvent) => {\n event.stopPropagation();\n emit(BentoTextareaEvent.KEYUP, event);\n };\n\n const onMouseDown = () => {\n isUserResizing.value = true;\n };\n\n const onMouseUp = () => {\n isUserResizing.value = false;\n };\n\n /**\n * Updates the textarea width depending if the container or the user update its size.\n * @param isTextareaElement - sets to true if the element being observed is the textarea HTML element.\n */\n const resizeTextareaWrapper = (isTextareaElement = false) => {\n // Width assigned by the browser whenever the textarea is manually resized. String of the format `<value>px`.\n const textareaStyleWidth = textareaElement.value.style.width;\n\n // Make sure the tracked textareaHeight is always in sync with the height size in case we manually resize the textarea\n if (textareaElement.value.style.height) {\n if (isUserResizing.value) {\n userSetHeight.value = parseInt(textareaElement.value.style.height, 10);\n }\n textareaHeight.value = textareaElement.value.style.height;\n }\n\n // If the textarea element observer is being triggered, but there's no textareaStyleWidth, we want to ignore it, as no manual resize as happened yet\n // The component wrapper will handle the resizing logic instead\n if (isTextareaElement && !textareaStyleWidth) {\n return;\n }\n\n // Width of the whole bento-textarea component\n const textareaComponentWidth = textareaComponent?.value?.offsetWidth;\n\n // If there is no textareaStyleWidth or the textareaStyleWidth is larger than the component container, the wrapper should be 100% of the container\n if (!textareaStyleWidth || parseInt(textareaStyleWidth, 10) > textareaComponentWidth) {\n textareaWrapperWidth.value = '100%';\n } else {\n // Else the wrapper should always be as wide as the textarea element itself\n textareaWrapperWidth.value = textareaStyleWidth;\n }\n };\n\n const focus = () => {\n textareaElement.value.focus();\n };\n\n defineExpose({\n focus,\n });\n\n onMounted(() => {\n textareaElementObserver = observeSizeOfElement(textareaElement.value, () => {\n resizeTextareaWrapper(true);\n });\n\n textareaComponentObserver = observeSizeOfElement(textareaComponent.value, () => {\n resizeTextareaWrapper();\n });\n\n if (isDynamicHeight.value) {\n calculateHeight();\n }\n });\n\n onUnmounted(() => {\n textareaElementObserver?.disconnect();\n textareaComponentObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\n const TEXTAREA_BORDER_WIDTH = parseFloat(BTextareaInputFocusBorderWidth);\n\n export default {\n i18n: { messages },\n name: 'bento-textarea',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./textarea.scss\" />\n"],"names":["BentoTextareaResizeOption","BentoTextareaResizeOption2","BentoTextareaStateClass","BentoTextareaStateClass2","BentoTextareaEvent","BentoTextareaEvent2","TEXTAREA_BORDER_WIDTH","BTextareaInputFocusBorderWidth","__default__","messages","attrs","useAttrs","props","__props","emit","__emit","height","toRefs","textareaId","generateUid","textareaElement","ref","textareaComponent","textareaValue","defaultTextareaHeight","textareaHeight","userSetHeight","textareaWrapperWidth","isUserResizing","textareaElementObserver","textareaComponentObserver","t","n","useI18n","isReadOnly","useFormLayoutFieldLoading","toRef","counter","computed","_a","isDynamicHeight","isOverCharacterLimit","calculateHeight","newHeight","watch","nextTick","invalidInput","conditionalClasses","conditionalClassesInput","conditionalClassesLabelBox","conditionalClassesLabelItem","counterErrorText","ariaLabelAttribute","ariaLabel","label","computedAriaLabel","useAriaLabel","showClearButton","onClear","onInput","event","onBlur","onFocus","onChange","onPressEscape","onKeyDown","onKeyUp","onMouseDown","onMouseUp","resizeTextareaWrapper","isTextareaElement","textareaStyleWidth","textareaComponentWidth","__expose","onMounted","observeSizeOfElement","onUnmounted"],"mappings":";;;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YACAA,EAAA,OAAA,QACAA,EAAA,OAAA,QAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SACAA,EAAA,iBAAA,kBACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SARQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;GC+bRE,KAAA,WAAAC,EAAA,GAEAC,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhXA,UAAAC,KAAAC,GAAA,GAEAC,IAAAC,GAiFAC,IAAAC,GA0CA,EAAA,QAAAC,EAAA,IAAAC,EAAAL,CAAA,GAEAM,IAAAC,GAAA,UAAA,GACAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAAT,EAAA,KAAA,GACAY,IAAA,IACAC,IAAAJ,EAAAT,EAAA,UAAA,GAAAY,CAAA,IAAA,GACAE,IAAAL,EAAA,CAAA,GACAM,IAA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AACI,QAAArD,EAAA,MAAA,MAAA;AAAA,MAA4B;AAAA,IAI5B,CAAA,GAGJsD,GAAA,MAAA;AACI,MAAA7C,IAAA8C,EAAAvD,EAAA,OAAA,MAAA;AACI,QAAAiD,EAAA,EAAA;AAAA,MAA0B,CAAA,GAG9BvC,IAAA6C,EAAArD,EAAA,OAAA,MAAA;AACI,QAAA+C,EAAA;AAAA,MAAsB,CAAA,GAG1B7B,EAAA,SACIE,EAAA;AAAA,IACJ,CAAA,GAGJkC,GAAA,MAAA;AACI,MAAA/C,KAAA,QAAAA,EAAA,cACAC,KAAA,QAAAA,EAAA;AAAA,IAAsC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"textarea.DfQLxj_w.js","sources":["../../../vue2/src/components/textarea/textarea.types.ts","../../../vue2/src/components/textarea/textarea.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTextareaResizeOption {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n BOTH = 'both',\n NONE = 'none',\n}\n\nexport enum BentoTextareaStateClass {\n CLEARABLE = 'clearable',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum BentoTextareaEvent {\n BLUR = 'blur',\n CHANGE = 'change',\n CLEAR = 'clear',\n ESCAPE_PRESSED = 'escape-pressed',\n FOCUS = 'focus',\n INPUT = 'input',\n KEYDOWN = 'keydown',\n KEYUP = 'keyup',\n}\n","<template>\n <div ref=\"textareaComponent\" class=\"b-textarea\" :class=\"conditionalClasses\">\n <div :style=\"{ width: textareaWrapperWidth }\">\n <div class=\"b-textarea__label-box\" :class=\"conditionalClassesLabelBox\">\n <field-label\n v-if=\"label\"\n :for=\"textareaId\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n <bento-typography\n v-if=\"characterLimit\"\n el=\"span\"\n class=\"b-textarea__label-item\"\n :class=\"conditionalClassesLabelItem\"\n >\n {{ counter }}\n </bento-typography>\n </div>\n <bento-typography el=\"div\" class=\"b-textarea__input-box\" :aria-disabled=\"disabled\">\n <textarea\n :id=\"textareaId\"\n ref=\"textareaElement\"\n :value=\"textareaValue\"\n class=\"b-textarea__input\"\n :class=\"conditionalClassesInput\"\n :aria-label=\"computedAriaLabel\"\n :aria-invalid=\"invalidInput\"\n :readonly=\"isReadOnly\"\n :required=\"required\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n :style=\"{ resize: resizable, height: textareaHeight }\"\n @blur=\"onBlur\"\n @change=\"onChange\"\n @focus=\"onFocus\"\n @input=\"onInput\"\n @keydown.esc=\"onPressEscape\"\n @keydown=\"onKeyDown\"\n @keyup=\"onKeyUp\"\n @mousedown=\"onMouseDown\"\n @mouseup=\"onMouseUp\"\n >\n </textarea>\n\n <div v-if=\"showClearButton\" class=\"b-textarea__clear-button\">\n <bento-button\n variant=\"tertiary\"\n :disabled=\"disabled\"\n @click=\"onClear\"\n @keypress.enter=\"onClear\"\n @keyup.space=\"onClear\"\n >\n <template #iconLeft>\n <cross-circle-fill-small-icon :svg-title=\"t('clearText')\" />\n </template>\n </bento-button>\n </div>\n </bento-typography>\n\n <error-message v-if=\"isOverCharacterLimit\" :error-message=\"counterErrorText\" />\n\n <error-message v-if=\"errorMessage\" :error-message=\"errorMessage\" />\n\n <bento-typography v-if=\"description\" class=\"b-textarea__description\" el=\"span\">\n {{ description }}\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, onMounted, onUnmounted, type PropType, ref, toRef, toRefs, useAttrs, watch } from 'vue';\n\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n\n // Utils\n import { generateUid } from '@/core/utils/ts';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n\n // Composables\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n // Constants\n import { BTextareaInputFocusBorderWidth } from '@adyen/bento-design-tokens/dist/js/bento/es6';\n\n // Types\n import { BentoTextareaEvent, BentoTextareaResizeOption, BentoTextareaStateClass } from './textarea.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n\n const props = defineProps({\n /**\n * Text that labels an the input element\n */\n ariaLabel: { type: String, default: undefined },\n\n /**\n * Text that shows number of characters in textarea\n */\n characterLimit: { type: Number, default: undefined },\n\n /**\n * Text displayed as the help text of the textarea\n */\n description: { type: String, default: '' },\n\n /**\n * Disables the possibility of changing value in the textarea\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * If set to true, shows a button to clear all the text\n */\n clearable: { type: Boolean, default: false },\n\n /**\n * Adds error text\n */\n errorMessage: { type: String, default: '' },\n\n /**\n * Sets the height of the textarea, e.g 200px OR 20vh\n */\n height: { type: String, default: null },\n\n /**\n * Text displayed as the label of the textarea\n */\n label: { type: String, default: '' },\n\n /**\n * Highlights the textarea is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Text displayed as the placeholder of the textarea\n */\n placeholder: { type: String, default: '' },\n\n /**\n * Set the textarea to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the possibility of resize the textarea\n */\n resizable: {\n type: String as PropType<BentoTextareaResizeOption | `${BentoTextareaResizeOption}`>,\n default: BentoTextareaResizeOption.BOTH,\n validator: (value: BentoTextareaResizeOption) => Object.values(BentoTextareaResizeOption).includes(value),\n },\n\n /**\n * Highlights the textarea is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * Text displayed as the value of the textarea\n */\n value: { type: String, default: '' },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the element has lost focus\n */\n (e: BentoTextareaEvent.BLUR): void;\n\n /**\n * Emitted when the user modifies the element's value. Unlike the 'input' event, the change event is not necessarily fired for each alteration to an element's value\n */\n (e: BentoTextareaEvent.CHANGE): void;\n\n /**\n * Emitted when the \"Clear\" button was clicked\n */\n (e: BentoTextareaEvent.CLEAR): void;\n\n /**\n * Emitted when the \"ESC\" key is pressed\n */\n (e: BentoTextareaEvent.ESCAPE_PRESSED): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: BentoTextareaEvent.FOCUS): void;\n\n /**\n * Emitted when the component's model changes\n */\n (e: BentoTextareaEvent.INPUT, value: string): void;\n\n /**\n * Emitted when the text area keydown event is fired\n */\n (e: BentoTextareaEvent.KEYDOWN, event: KeyboardEvent): void;\n\n /**\n * Emitted when the text area keyup event is fired\n */\n (e: BentoTextareaEvent.KEYUP, event: KeyboardEvent): void;\n }>();\n\n const { height } = toRefs(props);\n\n const textareaId = generateUid('textarea');\n const textareaElement = ref<HTMLTextAreaElement>(null);\n const textareaComponent = ref<HTMLDivElement>(null);\n const textareaValue = ref(props.value);\n const defaultTextareaHeight = 44;\n const textareaHeight = ref(props.height || `${defaultTextareaHeight}px`);\n const userSetHeight = ref<number>(0);\n const textareaWrapperWidth = ref('100%'); // The width set to the wrapper of the label, textarea and description\n const isUserResizing = ref(false);\n let textareaElementObserver: ResizeObserver | null = null;\n let textareaComponentObserver: ResizeObserver | null = null;\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const counter = computed(() => `${n(textareaValue?.value?.length ?? 0)} / ${n(props.characterLimit)}`);\n const isDynamicHeight = computed(() => !height.value);\n const isOverCharacterLimit = computed(\n () => props.characterLimit && textareaValue.value.length > props.characterLimit\n );\n\n /**\n * Calculates and sets the height of the textarea.\n * The height is determined by the maximum of the following values:\n *\n * 1. The content's scroll height (with a minimum of `defaultTextareaHeight`) + the border width.\n * 2. The height set by the user manually resizing the textarea (`userSetHeight`).\n * 3. The default minimum height (`defaultTextareaHeight`).\n *\n * This ensures the textarea grows with content, shrinks when content is removed,\n * but never goes below the manually set height or the default height.\n */\n const calculateHeight = () => {\n if (textareaElement.value) {\n const newHeight = Math.max(\n textareaElement.value.scrollHeight <= defaultTextareaHeight\n ? defaultTextareaHeight\n : textareaElement.value.scrollHeight + TEXTAREA_BORDER_WIDTH * 2,\n userSetHeight.value,\n defaultTextareaHeight\n );\n textareaHeight.value = `${newHeight}px`;\n }\n };\n\n watch(height, () => {\n if (isDynamicHeight.value) {\n calculateHeight();\n } else {\n textareaHeight.value = height.value;\n }\n });\n\n watch(\n () => props.value,\n () => {\n textareaValue.value = props.value;\n },\n { immediate: true }\n );\n\n watch(\n () => textareaValue.value,\n async () => {\n if (isDynamicHeight.value) {\n // Hack to make the textarea calculate its height properly\n // Set the textarea back to the original value before calculating the height\n textareaHeight.value = `${defaultTextareaHeight}px`;\n if (!textareaValue.value) {\n return;\n }\n\n await nextTick();\n calculateHeight();\n }\n },\n { immediate: true }\n );\n\n const invalidInput = computed(() => !!props.errorMessage || isOverCharacterLimit.value);\n\n const conditionalClasses = computed(() => ({\n [`b-textarea--${BentoTextareaStateClass.DISABLED}`]: props.disabled,\n }));\n\n const conditionalClassesInput = computed(() => ({\n [`b-textarea__input--${BentoTextareaStateClass.CLEARABLE}`]: props.clearable,\n [`b-textarea__input--${BentoTextareaStateClass.READONLY}`]: isReadOnly.value,\n [`b-textarea__input--${BentoTextareaStateClass.ERROR}`]: invalidInput.value,\n [`b-textarea__input--dynamic-height`]: isDynamicHeight.value,\n }));\n\n const conditionalClassesLabelBox = computed(() => ({\n [`b-textarea__label-box--no-label`]: !props.label,\n }));\n\n const conditionalClassesLabelItem = computed(() => ({\n [`b-textarea__label-item--${BentoTextareaStateClass.ERROR}`]: isOverCharacterLimit.value,\n }));\n\n const counterErrorText = computed(() => t('yourTextCanBenAtMost', { characterLimit: props.characterLimit }));\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel, label } = 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: label,\n });\n\n const showClearButton = computed(\n () => props.clearable && textareaValue.value && !props.disabled && !isReadOnly.value\n );\n\n const onClear = () => {\n textareaValue.value = '';\n emit(BentoTextareaEvent.CLEAR);\n emit(BentoTextareaEvent.INPUT, '');\n };\n\n const onInput = (event: InputEvent) => {\n event.stopImmediatePropagation();\n\n if (!props.disabled && !isReadOnly.value) {\n textareaValue.value = (event.target as HTMLInputElement).value;\n /**\n * Triggered when input value is changed\n *\n * @event input\n * @property {String} inputValue - the updated textarea value\n */\n emit(BentoTextareaEvent.INPUT, textareaValue.value);\n }\n };\n\n const onBlur = () => {\n textareaElement.value.scrollTop = 0;\n emit(BentoTextareaEvent.BLUR);\n };\n\n const onFocus = () => {\n textareaElement.value.focus();\n emit(BentoTextareaEvent.FOCUS);\n };\n\n const onChange = () => {\n emit(BentoTextareaEvent.CHANGE);\n };\n\n const onPressEscape = () => {\n emit(BentoTextareaEvent.ESCAPE_PRESSED);\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n event.stopPropagation();\n emit(BentoTextareaEvent.KEYDOWN, event);\n };\n\n const onKeyUp = (event: KeyboardEvent) => {\n event.stopPropagation();\n emit(BentoTextareaEvent.KEYUP, event);\n };\n\n const onMouseDown = () => {\n isUserResizing.value = true;\n };\n\n const onMouseUp = () => {\n isUserResizing.value = false;\n };\n\n /**\n * Updates the textarea width depending if the container or the user update its size.\n * @param isTextareaElement - sets to true if the element being observed is the textarea HTML element.\n */\n const resizeTextareaWrapper = (isTextareaElement = false) => {\n // Width assigned by the browser whenever the textarea is manually resized. String of the format `<value>px`.\n const textareaStyleWidth = textareaElement.value.style.width;\n\n // Make sure the tracked textareaHeight is always in sync with the height size in case we manually resize the textarea\n if (textareaElement.value.style.height) {\n if (isUserResizing.value) {\n userSetHeight.value = parseInt(textareaElement.value.style.height, 10);\n }\n textareaHeight.value = textareaElement.value.style.height;\n }\n\n // If the textarea element observer is being triggered, but there's no textareaStyleWidth, we want to ignore it, as no manual resize as happened yet\n // The component wrapper will handle the resizing logic instead\n if (isTextareaElement && !textareaStyleWidth) {\n return;\n }\n\n // Width of the whole bento-textarea component\n const textareaComponentWidth = textareaComponent?.value?.offsetWidth;\n\n // If there is no textareaStyleWidth or the textareaStyleWidth is larger than the component container, the wrapper should be 100% of the container\n if (!textareaStyleWidth || parseInt(textareaStyleWidth, 10) > textareaComponentWidth) {\n textareaWrapperWidth.value = '100%';\n } else {\n // Else the wrapper should always be as wide as the textarea element itself\n textareaWrapperWidth.value = textareaStyleWidth;\n }\n };\n\n const focus = () => {\n textareaElement.value.focus();\n };\n\n defineExpose({\n focus,\n });\n\n onMounted(() => {\n textareaElementObserver = observeSizeOfElement(textareaElement.value, () => {\n resizeTextareaWrapper(true);\n });\n\n textareaComponentObserver = observeSizeOfElement(textareaComponent.value, () => {\n resizeTextareaWrapper();\n });\n\n if (isDynamicHeight.value) {\n calculateHeight();\n }\n });\n\n onUnmounted(() => {\n textareaElementObserver?.disconnect();\n textareaComponentObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\n const TEXTAREA_BORDER_WIDTH = parseFloat(BTextareaInputFocusBorderWidth);\n\n export default {\n i18n: { messages },\n name: 'bento-textarea',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./textarea.scss\" />\n"],"names":["BentoTextareaResizeOption","BentoTextareaResizeOption2","BentoTextareaStateClass","BentoTextareaStateClass2","BentoTextareaEvent","BentoTextareaEvent2","TEXTAREA_BORDER_WIDTH","BTextareaInputFocusBorderWidth","__default__","messages","attrs","useAttrs","props","__props","emit","__emit","height","toRefs","textareaId","generateUid","textareaElement","ref","textareaComponent","textareaValue","defaultTextareaHeight","textareaHeight","userSetHeight","textareaWrapperWidth","isUserResizing","textareaElementObserver","textareaComponentObserver","t","n","useI18n","isReadOnly","useFormLayoutFieldLoading","toRef","counter","computed","_a","isDynamicHeight","isOverCharacterLimit","calculateHeight","newHeight","watch","nextTick","invalidInput","conditionalClasses","conditionalClassesInput","conditionalClassesLabelBox","conditionalClassesLabelItem","counterErrorText","ariaLabelAttribute","ariaLabel","label","computedAriaLabel","useAriaLabel","showClearButton","onClear","onInput","event","onBlur","onFocus","onChange","onPressEscape","onKeyDown","onKeyUp","onMouseDown","onMouseUp","resizeTextareaWrapper","isTextareaElement","textareaStyleWidth","textareaComponentWidth","__expose","onMounted","observeSizeOfElement","onUnmounted"],"mappings":";;;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YACAA,EAAA,OAAA,QACAA,EAAA,OAAA,QAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SACAA,EAAA,iBAAA,kBACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SARQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;GC+bRE,KAAA,WAAAC,EAAA,GAEAC,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhXA,UAAAC,KAAAC,GAAA,GAEAC,IAAAC,GAiFAC,IAAAC,GA0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