@adyen/bento-vue3 1.78.2 → 1.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/index.d.ts +79 -30
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/ai-button.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox-group.css +1 -1
- package/dist/assets/dashboard-section.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field-phone-number.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/layout-row.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/search-bar.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/structured-list-item.css +1 -1
- package/dist/assets/summary-grid.css +1 -1
- package/dist/assets/tab.css +1 -1
- package/dist/assets/teleport.css +1 -0
- package/dist/assets/toast.css +1 -1
- package/dist/assets/tooltip.css +1 -1
- package/dist/assets/tutorial.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{accordion-item.Bd3v6erb.js → accordion-item.DHyAfeAu.js} +2 -2
- package/dist/chunks/{accordion-item.Bd3v6erb.js.map → accordion-item.DHyAfeAu.js.map} +1 -1
- package/dist/chunks/{action-bar.BZ04Y7Yi.js → action-bar.QX16Mu4L.js} +3 -3
- package/dist/chunks/{action-bar.BZ04Y7Yi.js.map → action-bar.QX16Mu4L.js.map} +1 -1
- package/dist/chunks/{base-modal.UA93s_8c.js → base-modal.CHYvJ_xU.js} +17 -17
- package/dist/chunks/{base-modal.UA93s_8c.js.map → base-modal.CHYvJ_xU.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BeQ-j1bv.js → button-actions-with-menu.B8qBBN82.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.BeQ-j1bv.js.map → button-actions-with-menu.B8qBBN82.js.map} +1 -1
- package/dist/chunks/button-actions.Bg38lywL.js +1234 -0
- package/dist/chunks/button-actions.Bg38lywL.js.map +1 -0
- package/dist/chunks/{calendar.Tm7Cvpwu.js → calendar.CyJXcMz2.js} +4 -43
- package/dist/chunks/{calendar.Tm7Cvpwu.js.map → calendar.CyJXcMz2.js.map} +1 -1
- package/dist/chunks/{card.GxkxfBoV.js → card.BqkufnQe.js} +2 -2
- package/dist/chunks/{card.GxkxfBoV.js.map → card.BqkufnQe.js.map} +1 -1
- package/dist/chunks/{checkbox-group.D56nUmre.js → checkbox-group.BRQiuU3y.js} +51 -50
- package/dist/chunks/checkbox-group.BRQiuU3y.js.map +1 -0
- package/dist/chunks/{checkbox.SffuKyNj.js → checkbox.BRTK_DHj.js} +3 -3
- package/dist/chunks/{checkbox.SffuKyNj.js.map → checkbox.BRTK_DHj.js.map} +1 -1
- package/dist/chunks/{code-snippet.B5NUDrZ-.js → code-snippet.YxZ3_4ye.js} +5 -5
- package/dist/chunks/{code-snippet.B5NUDrZ-.js.map → code-snippet.YxZ3_4ye.js.map} +1 -1
- package/dist/chunks/{codemirror.Zv80n3Z2.js → codemirror.Cy7iSLbd.js} +12 -12
- package/dist/chunks/{codemirror.Zv80n3Z2.js.map → codemirror.Cy7iSLbd.js.map} +1 -1
- package/dist/chunks/constructNow.BhymNmy5.js +8 -0
- package/dist/chunks/{constructNow.CHWWeLPc.js.map → constructNow.BhymNmy5.js.map} +1 -1
- package/dist/chunks/{controls-group.cbGiHr7n.js → controls-group.CJe5J84d.js} +2 -2
- package/dist/chunks/{controls-group.cbGiHr7n.js.map → controls-group.CJe5J84d.js.map} +1 -1
- package/dist/chunks/{copy.ClKnDjMI.js → copy.mq0o1Rag.js} +2 -2
- package/dist/chunks/{copy.ClKnDjMI.js.map → copy.mq0o1Rag.js.map} +1 -1
- package/dist/chunks/{country.DmnN9YIW.js → country.D484ezGU.js} +2 -2
- package/dist/chunks/{country.DmnN9YIW.js.map → country.D484ezGU.js.map} +1 -1
- package/dist/chunks/{dashboard-section.Cqi0PWeJ.js → dashboard-section.CNCqp74F.js} +4 -4
- package/dist/chunks/{dashboard-section.Cqi0PWeJ.js.map → dashboard-section.CNCqp74F.js.map} +1 -1
- package/dist/chunks/{dashed-underline.r62L_XBr.js → dashed-underline.CtTu1AOE.js} +26 -25
- package/dist/chunks/{dashed-underline.r62L_XBr.js.map → dashed-underline.CtTu1AOE.js.map} +1 -1
- package/dist/chunks/{data-grid-template.D7kB3S1u.js → data-grid-template.CLpaJvTj.js} +4 -4
- package/dist/chunks/{data-grid-template.D7kB3S1u.js.map → data-grid-template.CLpaJvTj.js.map} +1 -1
- package/dist/chunks/data-grid-template.keys.VezYtHtM.js +5 -0
- package/dist/chunks/{data-grid-template.keys.2_AkxuNT.js.map → data-grid-template.keys.VezYtHtM.js.map} +1 -1
- package/dist/chunks/{data-grid.jC1eKDzq.js → data-grid.CD3Nb4pg.js} +18 -18
- package/dist/chunks/{data-grid.jC1eKDzq.js.map → data-grid.CD3Nb4pg.js.map} +1 -1
- package/dist/chunks/{date-picker.x9GeC_UO.js → date-picker.C3BH0Bsr.js} +13 -13
- package/dist/chunks/{date-picker.x9GeC_UO.js.map → date-picker.C3BH0Bsr.js.map} +1 -1
- package/dist/chunks/date-range-picker.BPZE6r01.js +1108 -0
- package/dist/chunks/date-range-picker.BPZE6r01.js.map +1 -0
- package/dist/chunks/{dialog-page.zWrBSgBD.js → dialog-page.BY6T1jYZ.js} +2 -2
- package/dist/chunks/{dialog-page.zWrBSgBD.js.map → dialog-page.BY6T1jYZ.js.map} +1 -1
- package/dist/chunks/{differenceInMonths.C8FyCrav.js → differenceInMonths.Cab3nOsb.js} +2 -2
- package/dist/chunks/{differenceInMonths.C8FyCrav.js.map → differenceInMonths.Cab3nOsb.js.map} +1 -1
- package/dist/chunks/{divider.DnKNNyWB.js → divider.Dho4_hQ7.js} +2 -2
- package/dist/chunks/{divider.DnKNNyWB.js.map → divider.Dho4_hQ7.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox._KEBXjKT.js → dropdown-default-textbox.CNrsjXUU.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox._KEBXjKT.js.map → dropdown-default-textbox.CNrsjXUU.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.DIlF7mOi.js → dropdown-tag.B0LtUuUk.js} +4 -4
- package/dist/chunks/{dropdown-tag.DIlF7mOi.js.map → dropdown-tag.B0LtUuUk.js.map} +1 -1
- package/dist/chunks/{dropdown.CdsjtT9_.js → dropdown.B5tPWVxg.js} +9 -9
- package/dist/chunks/{dropdown.CdsjtT9_.js.map → dropdown.B5tPWVxg.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js.map +1 -1
- package/dist/chunks/{events.CMzGybJJ.js → events.BQOQSSb7.js} +2 -5
- package/dist/chunks/{events.CMzGybJJ.js.map → events.BQOQSSb7.js.map} +1 -1
- package/dist/chunks/{field-label.C97CrBI_.js → field-label.B1rMWIWY.js} +2 -2
- package/dist/chunks/{field-label.C97CrBI_.js.map → field-label.B1rMWIWY.js.map} +1 -1
- package/dist/chunks/{file-uploader.R0NZXIsS.js → file-uploader.BwmQdkmz.js} +367 -350
- package/dist/chunks/file-uploader.BwmQdkmz.js.map +1 -0
- package/dist/chunks/{filter-bar.DAYxD7wi.js → filter-bar.B9yGivxl.js} +118 -122
- package/dist/chunks/filter-bar.B9yGivxl.js.map +1 -0
- package/dist/chunks/{footer-actions.BO52wpv-.js → footer-actions.pC1mxLQm.js} +2 -2
- package/dist/chunks/{footer-actions.BO52wpv-.js.map → footer-actions.pC1mxLQm.js.map} +1 -1
- package/dist/chunks/{form-layout-title.61ESsGAY.js → form-layout-title.sxPU_lB_.js} +2 -2
- package/dist/chunks/{form-layout-title.61ESsGAY.js.map → form-layout-title.sxPU_lB_.js.map} +1 -1
- package/dist/chunks/form-layout.types.bZW9iR6_.js +5 -0
- package/dist/chunks/{form-layout.types.D3EKzbE7.js.map → form-layout.types.bZW9iR6_.js.map} +1 -1
- package/dist/chunks/get-slot-text.CQRAP2_q.js.map +1 -1
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.BW7U6PxE.js → getTimezoneOffsetInMilliseconds.B7sxiukN.js} +2 -2
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.BW7U6PxE.js.map → getTimezoneOffsetInMilliseconds.B7sxiukN.js.map} +1 -1
- package/dist/chunks/{header-meta.BE6QfUNi.js → header-meta.DZ8Gx4XE.js} +17 -17
- package/dist/chunks/{header-meta.BE6QfUNi.js.map → header-meta.DZ8Gx4XE.js.map} +1 -1
- package/dist/chunks/{header-with-views.CzLcYeW5.js → header-with-views.b1gt2wud.js} +109 -109
- package/dist/chunks/{header-with-views.CzLcYeW5.js.map → header-with-views.b1gt2wud.js.map} +1 -1
- package/dist/chunks/{header.3It50Clh.js → header.BQAAmjUF.js} +3 -3
- package/dist/chunks/{header.3It50Clh.js.map → header.BQAAmjUF.js.map} +1 -1
- package/dist/chunks/{info-icon.BhOm72U4.js → info-icon.DB0MI-dH.js} +2 -2
- package/dist/chunks/{info-icon.BhOm72U4.js.map → info-icon.DB0MI-dH.js.map} +1 -1
- package/dist/chunks/{input-field-password.-xEY2VB8.js → input-field-password.noxsH61p.js} +154 -146
- package/dist/chunks/input-field-password.noxsH61p.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.DcxhP_qK.js → input-field-phone-number.B_uFvUXP.js} +587 -585
- package/dist/chunks/{input-field-phone-number.DcxhP_qK.js.map → input-field-phone-number.B_uFvUXP.js.map} +1 -1
- package/dist/chunks/{input-field.B6nL7d8O.js → input-field.C9ABE4cI.js} +118 -110
- package/dist/chunks/input-field.C9ABE4cI.js.map +1 -0
- package/dist/chunks/{keyboard-navigation.pB8weElW.js → keyboard-navigation.DWmhelVv.js} +2 -2
- package/dist/chunks/{keyboard-navigation.pB8weElW.js.map → keyboard-navigation.DWmhelVv.js.map} +1 -1
- package/dist/chunks/{layout-row.DVf7wNSB.js → layout-row.BxP9SxrL.js} +2 -2
- package/dist/chunks/{layout-row.DVf7wNSB.js.map → layout-row.BxP9SxrL.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.Cwe9Bn-R.js → listbox-option-tag.C1cZs38g.js} +2 -2
- package/dist/chunks/{listbox-option-tag.Cwe9Bn-R.js.map → listbox-option-tag.C1cZs38g.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.DTT-5rQX.js → modal-fullscreen.B69QJ8D6.js} +23 -21
- package/dist/chunks/modal-fullscreen.B69QJ8D6.js.map +1 -0
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.c3Ma1oAL.js → modal.vue_vue_type_script_setup_true_lang.BYqbdsty.js} +4 -4
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.c3Ma1oAL.js.map → modal.vue_vue_type_script_setup_true_lang.BYqbdsty.js.map} +1 -1
- package/dist/chunks/{pagination.DCn_tenp.js → pagination.Dst8Y6DD.js} +2 -2
- package/dist/chunks/{pagination.DCn_tenp.js.map → pagination.Dst8Y6DD.js.map} +1 -1
- package/dist/chunks/{payment-method.D6PeTYWq.js → payment-method.CExDsirg.js} +2 -2
- package/dist/chunks/{payment-method.D6PeTYWq.js.map → payment-method.CExDsirg.js.map} +1 -1
- package/dist/chunks/promo-banner.B-TLTLEd.js.map +1 -1
- package/dist/chunks/{radio-group.Br-N309Y.js → radio-group.CVDDBCP4.js} +5 -5
- package/dist/chunks/{radio-group.Br-N309Y.js.map → radio-group.CVDDBCP4.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.B6Ftqv55.js → rich-text-editor.DyC-Nnc8.js} +12 -12
- package/dist/chunks/{rich-text-editor.B6Ftqv55.js.map → rich-text-editor.DyC-Nnc8.js.map} +1 -1
- package/dist/chunks/{search-bar.BmNEcy0L.js → search-bar.BwrFcw9L.js} +28 -28
- package/dist/chunks/search-bar.BwrFcw9L.js.map +1 -0
- package/dist/chunks/{secondary-nav.CPosCncv.js → secondary-nav.D7l9h0_t.js} +3 -3
- package/dist/chunks/{secondary-nav.CPosCncv.js.map → secondary-nav.D7l9h0_t.js.map} +1 -1
- package/dist/chunks/{segmented-control.BCHGDSrf.js → segmented-control.CwDOwDIu.js} +2 -2
- package/dist/chunks/{segmented-control.BCHGDSrf.js.map → segmented-control.CwDOwDIu.js.map} +1 -1
- package/dist/chunks/{selection-card-group.DBdwqWsH.js → selection-card-group.CZfusjo0.js} +4 -4
- package/dist/chunks/{selection-card-group.DBdwqWsH.js.map → selection-card-group.CZfusjo0.js.map} +1 -1
- package/dist/chunks/{sidepanel.CS9CfAWZ.js → sidepanel.BFz_7DKg.js} +4 -4
- package/dist/chunks/{sidepanel.CS9CfAWZ.js.map → sidepanel.BFz_7DKg.js.map} +1 -1
- package/dist/chunks/{step.CoSuGK16.js → step.CxnmaTMe.js} +3 -3
- package/dist/chunks/{step.CoSuGK16.js.map → step.CxnmaTMe.js.map} +1 -1
- package/dist/chunks/structured-list-item.DjbvVIwI.js +111 -0
- package/dist/chunks/{structured-list-item.BTPh7SPj.js.map → structured-list-item.DjbvVIwI.js.map} +1 -1
- package/dist/chunks/summary-grid.keys.Xx-W5a2w.js +6 -0
- package/dist/chunks/{summary-grid.keys.CxTf_FOc.js.map → summary-grid.keys.Xx-W5a2w.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.cE1fyLvC.js → summary-grid.types.KVqau_I-.js} +74 -68
- package/dist/chunks/summary-grid.types.KVqau_I-.js.map +1 -0
- package/dist/chunks/{tab.CD5Eu6ql.js → tab.BAwuVDsV.js} +2 -2
- package/dist/chunks/{tab.CD5Eu6ql.js.map → tab.BAwuVDsV.js.map} +1 -1
- package/dist/chunks/tabs.keys.B4qGhjp2.js +7 -0
- package/dist/chunks/{tabs.keys.Cb4Vw5Jh.js.map → tabs.keys.B4qGhjp2.js.map} +1 -1
- package/dist/chunks/{tag.CjaB9DxL.js → tag.BmMnGJMp.js} +2 -2
- package/dist/chunks/{tag.CjaB9DxL.js.map → tag.BmMnGJMp.js.map} +1 -1
- package/dist/chunks/teleport.CHhznja1.js +129 -0
- package/dist/chunks/teleport.CHhznja1.js.map +1 -0
- package/dist/chunks/{textarea.XRETLCSj.js → textarea.BZjnJf5q.js} +3 -3
- package/dist/chunks/{textarea.XRETLCSj.js.map → textarea.BZjnJf5q.js.map} +1 -1
- package/dist/chunks/{timeline-item.19zg_gBi.js → timeline-item.YjC_8BBB.js} +7 -7
- package/dist/chunks/{timeline-item.19zg_gBi.js.map → timeline-item.YjC_8BBB.js.map} +1 -1
- package/dist/chunks/toast.e1-BCZks.js +229 -0
- package/dist/chunks/toast.e1-BCZks.js.map +1 -0
- package/dist/chunks/{tooltip.Dp9_ESm_.js → tooltip.CeX5eGnw.js} +2 -2
- package/dist/chunks/{tooltip.Dp9_ESm_.js.map → tooltip.CeX5eGnw.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.KvlJ_dl9.js → tutorial.vue_vue_type_script_setup_true_lang.Cqimmacx.js} +2 -2
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.KvlJ_dl9.js.map → tutorial.vue_vue_type_script_setup_true_lang.Cqimmacx.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.Kri_h7jS.js → use-bento-toast-controller.DK1PV3YW.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.Kri_h7jS.js.map → use-bento-toast-controller.DK1PV3YW.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.8MdrR9wt.js → use-cached-selected-values.os3Yp7Tw.js} +3 -3
- package/dist/chunks/{use-cached-selected-values.8MdrR9wt.js.map → use-cached-selected-values.os3Yp7Tw.js.map} +1 -1
- package/dist/chunks/{use-form-layout-loading.D3lALhtC.js → use-form-layout-loading.CWbjZiwP.js} +2 -2
- package/dist/chunks/{use-form-layout-loading.D3lALhtC.js.map → use-form-layout-loading.CWbjZiwP.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +288 -287
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/internal.js +27 -26
- package/dist/internal.js.map +1 -1
- package/dist/layout.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +4 -1
- package/dist/styles/bento-light.css +4 -1
- package/dist/styles/bento.css +4 -1
- package/dist/styles/legacy.css +4 -1
- package/dist/styles/styleguide.css +4 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/use-form-v4.js +8 -8
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +11 -10
- package/dist/chunks/button-actions.BQ3AFQqt.js +0 -1355
- package/dist/chunks/button-actions.BQ3AFQqt.js.map +0 -1
- package/dist/chunks/checkbox-group.D56nUmre.js.map +0 -1
- package/dist/chunks/constructNow.CHWWeLPc.js +0 -8
- package/dist/chunks/data-grid-template.keys.2_AkxuNT.js +0 -5
- package/dist/chunks/date-range-picker.CXeFdxAA.js +0 -1100
- package/dist/chunks/date-range-picker.CXeFdxAA.js.map +0 -1
- package/dist/chunks/file-uploader.R0NZXIsS.js.map +0 -1
- package/dist/chunks/filter-bar.DAYxD7wi.js.map +0 -1
- package/dist/chunks/form-layout.types.D3EKzbE7.js +0 -5
- package/dist/chunks/input-field-password.-xEY2VB8.js.map +0 -1
- package/dist/chunks/input-field.B6nL7d8O.js.map +0 -1
- package/dist/chunks/modal-fullscreen.DTT-5rQX.js.map +0 -1
- package/dist/chunks/search-bar.BmNEcy0L.js.map +0 -1
- package/dist/chunks/structured-list-item.BTPh7SPj.js +0 -111
- package/dist/chunks/summary-grid.keys.CxTf_FOc.js +0 -6
- package/dist/chunks/summary-grid.types.cE1fyLvC.js.map +0 -1
- package/dist/chunks/tabs.keys.Cb4Vw5Jh.js +0 -7
- package/dist/chunks/toast.6oJx7SNq.js +0 -221
- package/dist/chunks/toast.6oJx7SNq.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.
|
|
1
|
+
{"version":3,"file":"tag.BmMnGJMp.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 <div v-if=\"hasTextContent && hasSlot('icon')\" class=\"b-tag__icon\" role=\"presentation\">\n <slot name=\"icon\"></slot>\n </div>\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 // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for vue3 named scoped slots\n // We do the same in bento-checkbox-group\n const hasSlot = name => !!slots[name];\n\n const hasTextContent = computed(() => !!(props.label || getSlotText(slots)('default')));\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","hasSlot","name","hasTextContent","computed","getSlotText","computedAriaLabel","useAriaLabel","tagConditionalClasses","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;;;;;GC2CRE,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;AAtCA,UAAAC,IAAAC,GAMAC,IAAAC,EAAA,GAIAC,IAAA,CAAAC,MAAA,CAAA,CAAAH,EAAAG,CAAA,GAEAC,IAAAC,EAAA,MAAA,CAAA,EAAAP,EAAA,SAAAQ,EAAAN,CAAA,EAAA,SAAA,EAAA,GAEAO,IAAAC,EAAA;AAAA,MAAuC,OAAAV,EAAA,SAAAQ,EAAAN,CAAA,EAAA,SAAA;AAAA,MACe,iBAAA;AAAA,IACjC,CAAA,GAGrBS,IAAAJ,EAAA,OAAA;AAAA,MAA8C,CAAA,UAAAP,EAAA,OAAA,EAAA,GAAAA,EAAA;AAAA,IACP,EAAA,GAGvCY,IAAAL,EAAA,MAAAP,EAAA,SAAAQ,EAAAN,CAAA,EAAA,SAAA,KAAA,KAAA,GACAW,IAAAN,EAAA,MAAAP,EAAA,YAAAY,EAAA,MAAA,SAAAZ,EAAA,QAAA,GAEAc,IAAAP,EAAA,MACIP,EAAA,YAIAa,EAAA,QAAA,GAAAD,EAAA,MAAA,MAAA,GAAAZ,EAAA,QAAA,CAAA,QAHIY,EAAA,KAGgG;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { defineComponent as l, createElementBlock as b, createBlock as u, unref as f, openBlock as o, normalizeClass as n, renderSlot as a, Teleport as m, inject as r } from "vue";
|
|
2
|
+
import { i as d } from "./index.CWuzEfiV.js";
|
|
3
|
+
import { _ as p } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
4
|
+
import "../assets/teleport.css";
|
|
5
|
+
const v = /* @__PURE__ */ Symbol("modal injection key"), g = /* @__PURE__ */ Symbol("sidepanel children element injection key"), y = /* @__PURE__ */ Symbol("modal fullscreen children element injection key"), O = l({
|
|
6
|
+
name: "teleport",
|
|
7
|
+
props: {
|
|
8
|
+
to: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: ""
|
|
11
|
+
},
|
|
12
|
+
where: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "after"
|
|
15
|
+
},
|
|
16
|
+
disabled: Boolean
|
|
17
|
+
},
|
|
18
|
+
data: () => ({
|
|
19
|
+
childObserver: null,
|
|
20
|
+
nodes: [],
|
|
21
|
+
waiting: !1,
|
|
22
|
+
observer: null,
|
|
23
|
+
parent: null,
|
|
24
|
+
isVue2: d
|
|
25
|
+
}),
|
|
26
|
+
computed: {
|
|
27
|
+
classes() {
|
|
28
|
+
return this.disabled ? ["b-teleport"] : ["b-teleport", "b-teleport--hidden"];
|
|
29
|
+
},
|
|
30
|
+
defaultTo() {
|
|
31
|
+
if (this.to)
|
|
32
|
+
return this.to;
|
|
33
|
+
const e = r(v, "") || r(y, "") || r(g, "");
|
|
34
|
+
return e ? `#${e}` : "body";
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
watch: {
|
|
38
|
+
to: "maybeMove",
|
|
39
|
+
where: "maybeMove",
|
|
40
|
+
disabled(e) {
|
|
41
|
+
e ? (this.disable(), this.$nextTick(() => {
|
|
42
|
+
this.teardownObserver();
|
|
43
|
+
})) : (this.bootObserver(), this.move());
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
mounted() {
|
|
47
|
+
this.nodes = Array.from(this.$el.childNodes), this.disabled || this.bootObserver(), this.maybeMove();
|
|
48
|
+
},
|
|
49
|
+
beforeDestroy() {
|
|
50
|
+
this.nodes = this.getComponentChildrenNode(), this.disable(), this.teardownObserver();
|
|
51
|
+
},
|
|
52
|
+
methods: {
|
|
53
|
+
// Using a fragment is faster because it'll trigger only a single reflow
|
|
54
|
+
// See https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment
|
|
55
|
+
getFragment() {
|
|
56
|
+
const e = document.createDocumentFragment();
|
|
57
|
+
return this.nodes.forEach((t) => e.appendChild(t)), e;
|
|
58
|
+
},
|
|
59
|
+
disable() {
|
|
60
|
+
this.$el.appendChild(this.getFragment()), this.parent = null;
|
|
61
|
+
},
|
|
62
|
+
move() {
|
|
63
|
+
if (this.waiting = !1, this.parent = document.querySelector(this.defaultTo), !this.parent) {
|
|
64
|
+
this.disable(), this.waiting = !0;
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this.where === "before" ? this.parent.prepend(this.getFragment()) : this.parent.appendChild(this.getFragment());
|
|
68
|
+
},
|
|
69
|
+
maybeMove() {
|
|
70
|
+
this.disabled || this.move();
|
|
71
|
+
},
|
|
72
|
+
onMutations(e) {
|
|
73
|
+
let t = !1;
|
|
74
|
+
for (let s = 0; s < e.length; s++) {
|
|
75
|
+
const i = e[s], h = Array.from(i.addedNodes).filter(
|
|
76
|
+
(c) => !this.nodes.includes(c)
|
|
77
|
+
);
|
|
78
|
+
Array.from(i.removedNodes).includes(this.parent) ? (this.disable(), this.waiting = !this.disabled) : this.waiting && h.length > 0 && (t = !0);
|
|
79
|
+
}
|
|
80
|
+
t && this.move();
|
|
81
|
+
},
|
|
82
|
+
bootObserver() {
|
|
83
|
+
this.observer || (this.observer = new MutationObserver((e) => this.onMutations(e)), this.observer.observe(document.body, {
|
|
84
|
+
childList: !0,
|
|
85
|
+
subtree: !0,
|
|
86
|
+
attributes: !1,
|
|
87
|
+
characterData: !1
|
|
88
|
+
}), !this.childObserver && (this.childObserver = new MutationObserver((e) => {
|
|
89
|
+
e.find((s) => s.target === this.$el) && (this.nodes.forEach((s) => s.parentNode && s.parentNode.removeChild(s)), this.nodes = this.getComponentChildrenNode(), this.maybeMove());
|
|
90
|
+
}), this.childObserver.observe(this.$el, {
|
|
91
|
+
childList: !0,
|
|
92
|
+
subtree: !1,
|
|
93
|
+
attributes: !1,
|
|
94
|
+
characterData: !1
|
|
95
|
+
})));
|
|
96
|
+
},
|
|
97
|
+
teardownObserver() {
|
|
98
|
+
this.observer && (this.observer.disconnect(), this.observer = null), this.childObserver && (this.childObserver.disconnect(), this.childObserver = null);
|
|
99
|
+
},
|
|
100
|
+
getComponentChildrenNode() {
|
|
101
|
+
return [];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}), _ = /* @__PURE__ */ l({
|
|
105
|
+
...O,
|
|
106
|
+
setup(e) {
|
|
107
|
+
return (t, s) => f(d) ? (o(), b("div", {
|
|
108
|
+
key: 0,
|
|
109
|
+
class: n(t.classes)
|
|
110
|
+
}, [
|
|
111
|
+
a(t.$slots, "default", {}, void 0, !0)
|
|
112
|
+
], 2)) : (o(), u(m, {
|
|
113
|
+
key: 1,
|
|
114
|
+
to: t.defaultTo,
|
|
115
|
+
where: t.where,
|
|
116
|
+
disabled: t.disabled,
|
|
117
|
+
class: n(t.classes)
|
|
118
|
+
}, [
|
|
119
|
+
a(t.$slots, "default", {}, void 0, !0)
|
|
120
|
+
], 8, ["to", "where", "disabled", "class"]));
|
|
121
|
+
}
|
|
122
|
+
}), E = /* @__PURE__ */ p(_, [["__scopeId", "data-v-acbda3aa"]]);
|
|
123
|
+
export {
|
|
124
|
+
E as B,
|
|
125
|
+
y as M,
|
|
126
|
+
g as S,
|
|
127
|
+
v as a
|
|
128
|
+
};
|
|
129
|
+
//# sourceMappingURL=teleport.CHhznja1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teleport.CHhznja1.js","sources":["../../../vue2/src/components/modal/components/base-modal/base-modal.keys.ts","../../../vue2/src/components/sidepanel/sidepanel.keys.ts","../../../vue2/src/components/modal-fullscreen/modal-fullscreen.keys.ts","../../../vue2/src/components/internal/teleport/teleport.vue"],"sourcesContent":["export const MODAL_DIALOG_ID_INJECTION_KEY = Symbol('modal injection key');\n","export const SIDEPANEL_DIALOG_ID_INJECTION_KEY = Symbol('sidepanel children element injection key');\n","export const MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY = Symbol('modal fullscreen children element injection key');\n","<!-- Taken from: https://github.com/Mechazawa/vue2-teleport/blob/master/src/Teleport.vue -->\n<template>\n <div v-if=\"isVue2\" :class=\"classes\">\n <slot />\n </div>\n <Teleport v-else :to=\"defaultTo\" :where=\"where\" :disabled=\"disabled\" :class=\"classes\">\n <slot />\n </Teleport>\n</template>\n\n<script setup lang=\"ts\">\n import { isVue2 } from 'vue-demi';\n import { defineComponent, inject, type PropType } from 'vue';\n import { MODAL_DIALOG_ID_INJECTION_KEY } from '@/components/modal/components/base-modal/base-modal.keys';\n import { SIDEPANEL_DIALOG_ID_INJECTION_KEY } from '@/components/sidepanel/sidepanel.keys';\n import { MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n import type { BentoTeleportProps } from './teleport.types';\n</script>\n\n<script lang=\"ts\">\n export default defineComponent({\n name: 'teleport',\n props: {\n to: {\n type: String as PropType<BentoTeleportProps['to']>,\n default: '',\n },\n where: {\n type: String,\n default: 'after',\n },\n disabled: Boolean as PropType<BentoTeleportProps['disabled']>,\n },\n data: () => ({\n childObserver: null,\n nodes: [],\n waiting: false,\n observer: null,\n parent: null,\n isVue2,\n }),\n computed: {\n classes() {\n if (this.disabled) {\n return ['b-teleport'];\n }\n\n return ['b-teleport', 'b-teleport--hidden'];\n },\n defaultTo() {\n if (this.to) {\n return this.to;\n }\n\n const injectionKey =\n inject<string>(MODAL_DIALOG_ID_INJECTION_KEY, '') ||\n inject<string>(MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY, '') ||\n inject<string>(SIDEPANEL_DIALOG_ID_INJECTION_KEY, '');\n\n const teleportElement = injectionKey ? `#${injectionKey}` : 'body';\n return teleportElement;\n },\n },\n watch: {\n to: 'maybeMove',\n where: 'maybeMove',\n disabled(value) {\n if (value) {\n this.disable();\n // Ensure all event done.\n this.$nextTick(() => {\n this.teardownObserver();\n });\n } else {\n this.bootObserver();\n this.move();\n }\n },\n },\n mounted() {\n // Store a reference to the nodes\n this.nodes = Array.from(this.$el.childNodes);\n\n if (!this.disabled) {\n this.bootObserver();\n }\n\n // Move slot content to target\n this.maybeMove();\n },\n beforeDestroy() {\n // Fix nodes reference\n this.nodes = this.getComponentChildrenNode();\n\n // Move back\n this.disable();\n\n // Stop observing\n this.teardownObserver();\n },\n methods: {\n // Using a fragment is faster because it'll trigger only a single reflow\n // See https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment\n getFragment(): DocumentFragment {\n const fragment = document.createDocumentFragment();\n\n this.nodes.forEach(node => fragment.appendChild(node));\n\n return fragment;\n },\n disable() {\n this.$el.appendChild(this.getFragment());\n this.parent = null;\n },\n move() {\n this.waiting = false;\n\n this.parent = document.querySelector(this.defaultTo);\n\n if (!this.parent) {\n this.disable();\n\n this.waiting = true;\n\n return;\n }\n\n if (this.where === 'before') {\n this.parent.prepend(this.getFragment());\n } else {\n this.parent.appendChild(this.getFragment());\n }\n },\n maybeMove() {\n if (!this.disabled) {\n this.move();\n }\n },\n onMutations(mutations) {\n // Makes sure the move operation is only done once\n let shouldMove = false;\n\n for (let i = 0; i < mutations.length; i++) {\n const mutation = mutations[i];\n const filteredAddedNodes = Array.from(mutation.addedNodes).filter(\n node => !this.nodes.includes(node)\n );\n\n if (Array.from(mutation.removedNodes).includes(this.parent)) {\n this.disable();\n this.waiting = !this.disabled;\n } else if (this.waiting && filteredAddedNodes.length > 0) {\n shouldMove = true;\n }\n }\n\n if (shouldMove) {\n this.move();\n }\n },\n bootObserver() {\n if (this.observer) {\n return;\n }\n\n this.observer = new MutationObserver(mutations => this.onMutations(mutations));\n\n this.observer.observe(document.body, {\n childList: true,\n subtree: true,\n attributes: false,\n characterData: false,\n });\n\n if (this.childObserver) {\n return;\n }\n // watch childNodes change\n this.childObserver = new MutationObserver(mutations => {\n const childChangeRecord = mutations.find(i => i.target === this.$el);\n if (childChangeRecord) {\n // Remove old nodes before update position.\n this.nodes.forEach(node => node.parentNode && node.parentNode.removeChild(node));\n this.nodes = this.getComponentChildrenNode();\n this.maybeMove();\n }\n });\n\n this.childObserver.observe(this.$el, {\n childList: true,\n subtree: false,\n attributes: false,\n characterData: false,\n });\n },\n teardownObserver() {\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n if (this.childObserver) {\n this.childObserver.disconnect();\n this.childObserver = null;\n }\n },\n getComponentChildrenNode() {\n // Vue3\n if (!isVue2) {\n return [];\n }\n\n // Trick for Vue3 type checking\n return (this as any).$vnode.componentOptions.children.map(i => i.elm).filter(i => i);\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./teleport.scss\" />\n"],"names":["MODAL_DIALOG_ID_INJECTION_KEY","SIDEPANEL_DIALOG_ID_INJECTION_KEY","MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY","__default__","defineComponent","isVue2","injectionKey","inject","value","fragment","node","mutations","shouldMove","i","mutation","filteredAddedNodes"],"mappings":";;;;AAAa,MAAAA,IAAA,uBAAA,qBAAA,GCAAC,IAAA,uBAAA,0CAA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AA,IAAA,iBAAA,CAAAA,MAAA;AAEI,QADAA,EAAA,KAAA,CAAAE,MAAAA,EAAA,WAAA,KAAA,GAAA,MAGI,KAAA,MAAA,QAAA,CAAAH,MAAAA,EAAA,cAAAA,EAAA,WAAA,YAAAA,CAAA,CAAA,GACA,KAAA,QAAA,KAAA,yBAAA,GACA,KAAA,UAAA;AAAA,MACJ,CAAA,GAGJ,KAAA,cAAA,QAAA,KAAA,KAAA;AAAA,QAAqC,WAAA;AAAA,QACtB,SAAA;AAAA,QACF,YAAA;AAAA,QACG,eAAA;AAAA,MACG,CAAA;AAAA,IAClB;AAAA,IACL,mBAAA;AAEI,MAAA,KAAA,aACI,KAAA,SAAA,WAAA,GACA,KAAA,WAAA,OAEJ,KAAA,kBACI,KAAA,cAAA,WAAA,GACA,KAAA,gBAAA;AAAA,IACJ;AAAA,IACJ,2BAAA;AAIQ,aAAA,CAAA;AAAA,IAI+E;AAAA,EACvF;AAER,CAAA;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -7,9 +7,9 @@ import { o as X } from "./resize.Bqks3WUm.js";
|
|
|
7
7
|
import { u as Ue } from "./aria-label.CaUURpnB.js";
|
|
8
8
|
import { u as Me } from "./index.pdBj0KQU.js";
|
|
9
9
|
import { u as Se } from "./form-field.D_2g7vaP.js";
|
|
10
|
-
import { u as we } from "./use-form-layout-loading.
|
|
10
|
+
import { u as we } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
11
11
|
import { B as Fe } from "./es6.MoTTyETW.js";
|
|
12
|
-
import { F as Oe, E as j } from "./field-label.
|
|
12
|
+
import { F as Oe, E as j } from "./field-label.B1rMWIWY.js";
|
|
13
13
|
import { _ as Pe } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
14
14
|
import "../assets/textarea.css";
|
|
15
15
|
var p = /* @__PURE__ */ ((t) => (t.CLEARABLE = "clearable", t.DISABLED = "disabled", t.ERROR = "error", t.READONLY = "readonly", t))(p || {}), n = /* @__PURE__ */ ((t) => (t.BLUR = "blur", t.CHANGE = "change", t.CLEAR = "clear", t.ESCAPE_PRESSED = "escape-pressed", t.FOCUS = "focus", t.INPUT = "input", t.UPDATE_MODEL_VALUE = "update:model-value", t.KEYDOWN = "keydown", t.KEYUP = "keyup", t))(n || {});
|
|
@@ -251,4 +251,4 @@ const J = {
|
|
|
251
251
|
export {
|
|
252
252
|
la as B
|
|
253
253
|
};
|
|
254
|
-
//# sourceMappingURL=textarea.
|
|
254
|
+
//# sourceMappingURL=textarea.BZjnJf5q.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.XRETLCSj.js","sources":["../../../vue2/src/components/textarea/textarea.types.ts","../../../vue2/src/components/textarea/textarea.vue"],"sourcesContent":["import 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 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 UPDATE_MODEL_VALUE = 'update:model-value',\n KEYDOWN = 'keydown',\n KEYUP = 'keyup',\n}\n\nexport interface BentoTextareaProps extends FormField {\n /**\n * Text that labels the input element\n * @default undefined\n */\n ariaLabel?: string;\n\n /**\n * Text that shows number of characters in textarea\n * @default undefined\n */\n characterLimit?: number;\n\n /**\n * If set to true, shows a button to clear all the text\n * @default false\n */\n clearable?: boolean;\n\n /**\n * Sets the height of the textarea, e.g 200px OR 20vh\n * @default null\n */\n height?: string | null;\n\n /**\n * Indicates the possibility of resize the textarea.\n * Accepts the Enum or the string literal version.\n * @default BentoTextareaResizeOption.BOTH\n */\n resizable?: BentoTextareaResizeOption | `${BentoTextareaResizeOption}`;\n\n /**\n * Text displayed as the value of the textarea\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n */\n value?: string;\n\n /**\n * Text displayed as the value of the textarea\n */\n modelValue?: string;\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, 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 import { deprecate } from '@/utils/ts/deprecate';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\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, type BentoTextareaProps, 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 = withDefaults(defineProps<BentoTextareaProps>(), {\n ariaLabel: undefined,\n characterLimit: undefined,\n description: '',\n disabled: false,\n clearable: false,\n errorMessage: '',\n height: null,\n label: '',\n optional: false,\n placeholder: '',\n readonly: false,\n resizable: 'both',\n required: false,\n tooltipText: null,\n value: '',\n modelValue: '',\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 * @deprecated since version 2.0. Use `v-model` or `update:model-value` instead.\n *\n */\n (e: BentoTextareaEvent.INPUT, value: string): void;\n\n /**\n * Emitted when the component's model changes\n */\n (e: BentoTextareaEvent.UPDATE_MODEL_VALUE, 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.modelValue || 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 { emitValue } = useFormFieldEmits<string>(emit);\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, props.modelValue],\n () => {\n textareaValue.value = props.modelValue || 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 emitValue('');\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 emitValue(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 if (props.value) {\n deprecate(\n 'BentoTextarea \"value\" property',\n `The use of \"value\" prop in \"BentoTextarea\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\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 model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./textarea.scss\" />\n"],"names":["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","emitValue","useFormFieldEmits","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","deprecate","onUnmounted"],"mappings":";;;;;;;;;;;;;;AAYY,IAAAA,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,qBAAA,sBACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SATQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;GCoZRE,KAAA,WAAAC,EAAA,GAEAC,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAAA,EACX,OAAA,EAAA,MAAA,aAAA;AAEV;;;;;;;;;;;;;;;;;;;;;AAtUA,UAAAC,KAAAC,GAAA,GAEAC,IAAAC,GAmBAC,IAAAC,GAkDA,EAAA,QAAAC,EAAA,IAAAC,EAAAL,CAAA,GAEAM,IAAAC,GAAA,UAAA,GACAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,I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AAAC,MAAAjC,IAAAnB,KAAA,gBAAAA,EAAA,UAAA,gBAAAmB,EAAA;AAGA,MAAA,CAAAgC,KAAA,SAAAA,GAAA,EAAA,IAAAC,KACI/C,EAAA,QAAA,SAGAA,EAAA,QAAA8C;AAAA,IACJ;AAOJ,WAAAE,EAAA;AAAA,MAAa,OAJb,MAAA;AACI,QAAAvD,EAAA,MAAA,MAAA;AAAA,MAA4B;AAAA,IAI5B,CAAA,GAGJwD,GAAA,MAAA;AACI,MAAA/C,IAAAgD,EAAAzD,EAAA,OAAA,MAAA;AACI,QAAAmD,EAAA,EAAA;AAAA,MAA0B,CAAA,GAG9BzC,IAAA+C,EAAAvD,EAAA,OAAA,MAAA;AACI,QAAAiD,EAAA;AAAA,MAAsB,CAAA,GAG1B7B,EAAA,SACIE,EAAA,GAGJhC,EAAA,SACIkE;AAAA,QAAA;AAAA,QACI;AAAA;AAAA,QACA;AAAA,MAEA;AAAA,IAER,CAAA,GAGJC,GAAA,MAAA;AACI,MAAAlD,KAAA,QAAAA,EAAA,cACAC,KAAA,QAAAA,EAAA;AAAA,IAAsC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"textarea.BZjnJf5q.js","sources":["../../../vue2/src/components/textarea/textarea.types.ts","../../../vue2/src/components/textarea/textarea.vue"],"sourcesContent":["import 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 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 UPDATE_MODEL_VALUE = 'update:model-value',\n KEYDOWN = 'keydown',\n KEYUP = 'keyup',\n}\n\nexport interface BentoTextareaProps extends FormField {\n /**\n * Text that labels the input element\n * @default undefined\n */\n ariaLabel?: string;\n\n /**\n * Text that shows number of characters in textarea\n * @default undefined\n */\n characterLimit?: number;\n\n /**\n * If set to true, shows a button to clear all the text\n * @default false\n */\n clearable?: boolean;\n\n /**\n * Sets the height of the textarea, e.g 200px OR 20vh\n * @default null\n */\n height?: string | null;\n\n /**\n * Indicates the possibility of resize the textarea.\n * Accepts the Enum or the string literal version.\n * @default BentoTextareaResizeOption.BOTH\n */\n resizable?: BentoTextareaResizeOption | `${BentoTextareaResizeOption}`;\n\n /**\n * Text displayed as the value of the textarea\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n */\n value?: string;\n\n /**\n * Text displayed as the value of the textarea\n */\n modelValue?: string;\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, 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 import { deprecate } from '@/utils/ts/deprecate';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\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, type BentoTextareaProps, 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 = withDefaults(defineProps<BentoTextareaProps>(), {\n ariaLabel: undefined,\n characterLimit: undefined,\n description: '',\n disabled: false,\n clearable: false,\n errorMessage: '',\n height: null,\n label: '',\n optional: false,\n placeholder: '',\n readonly: false,\n resizable: 'both',\n required: false,\n tooltipText: null,\n value: '',\n modelValue: '',\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 * @deprecated since version 2.0. Use `v-model` or `update:model-value` instead.\n *\n */\n (e: BentoTextareaEvent.INPUT, value: string): void;\n\n /**\n * Emitted when the component's model changes\n */\n (e: BentoTextareaEvent.UPDATE_MODEL_VALUE, 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.modelValue || 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 { emitValue } = useFormFieldEmits<string>(emit);\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, props.modelValue],\n () => {\n textareaValue.value = props.modelValue || 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 emitValue('');\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 emitValue(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 if (props.value) {\n deprecate(\n 'BentoTextarea \"value\" property',\n `The use of \"value\" prop in \"BentoTextarea\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\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 model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./textarea.scss\" />\n"],"names":["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","emitValue","useFormFieldEmits","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","deprecate","onUnmounted"],"mappings":";;;;;;;;;;;;;;AAYY,IAAAA,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,kB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { defineComponent as ae, computed as o, ref as M, toRefs as ce, watch as fe, provide as V, nextTick as ve, resolveComponent as w, createElementBlock as f, openBlock as i, createCommentVNode as u, createElementVNode as g, createBlock as S, withCtx as p, createTextVNode as k, toDisplayString as y, createVNode as L, renderSlot as z, mergeProps as H, inject as K, onUnmounted as _e, normalizeClass as W, Fragment as Y, renderList as be } from "vue";
|
|
2
2
|
import { B as se } from "./button.DhcxX2GJ.js";
|
|
3
|
-
import { B as he } from "./textarea.
|
|
3
|
+
import { B as he } from "./textarea.BZjnJf5q.js";
|
|
4
4
|
import { u as oe } from "./index.pdBj0KQU.js";
|
|
5
|
-
import { B as pe } from "./button-actions.
|
|
5
|
+
import { B as pe } from "./button-actions.Bg38lywL.js";
|
|
6
6
|
import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
7
7
|
import { B as ge } from "./date.DZvVL-uz.js";
|
|
8
8
|
import { B as ye } from "./link.cwPmWlsk.js";
|
|
9
|
-
import { B as Ne } from "./tag.
|
|
9
|
+
import { B as Ne } from "./tag.BmMnGJMp.js";
|
|
10
10
|
import { B as Te, d as we } from "./typography.yBEME_Gu.js";
|
|
11
|
-
import { a as Ee, B as Ie, S as ke } from "./structured-list-item.
|
|
11
|
+
import { a as Ee, B as Ie, S as ke } from "./structured-list-item.DjbvVIwI.js";
|
|
12
12
|
/* empty css */
|
|
13
13
|
import { g as Ce } from "./generate-uid.NJ8tVoha.js";
|
|
14
14
|
import { u as Se } from "./use-has-slot.B7eQSabc.js";
|
|
15
|
-
import { b as Le, e as Me, a as Ae, n as Oe, g as Z, m as G, d as Q, f as X, h as x } from "./getTimezoneOffsetInMilliseconds.
|
|
15
|
+
import { b as Le, e as Me, a as Ae, n as Oe, g as Z, m as G, d as Q, f as X, h as x } from "./getTimezoneOffsetInMilliseconds.B7sxiukN.js";
|
|
16
16
|
import { g as $e } from "./getRoundingMethod.C3eaeGLR.js";
|
|
17
17
|
import "../assets/timeline-item.css";
|
|
18
18
|
var A = /* @__PURE__ */ ((e) => (e.BOTTOM = "bottom", e.AFTER_FIRST = "after-first", e.BEFORE_LAST = "before-last", e))(A || {}), Re = /* @__PURE__ */ ((e) => (e.SECOND = "second", e.MINUTE = "minute", e.HOUR = "hour", e.DAY = "day", e.MONTH = "month", e.YEAR = "year", e))(Re || {}), R = /* @__PURE__ */ ((e) => (e.DEFAULT = "SquareSmallIcon", e.SUCCESS = "CheckedCircleIcon", e.CRITICAL = "CrossCircleIcon", e))(R || {}), le = /* @__PURE__ */ ((e) => (e.BLACK = "black", e.BLUE = "blue", e.GREEN = "green", e.GREY = "grey", e.ORANGE = "orange", e.RED = "red", e.YELLOW = "yellow", e))(le || {});
|
|
19
|
-
const re = Symbol("timeline register entry injection key"), de = Symbol("timeline config obj injection key"), ee = {
|
|
19
|
+
const re = /* @__PURE__ */ Symbol("timeline register entry injection key"), de = /* @__PURE__ */ Symbol("timeline config obj injection key"), ee = {
|
|
20
20
|
"en-US": {
|
|
21
21
|
addNote: "Add note",
|
|
22
22
|
cancel: "Cancel"
|
|
@@ -553,4 +553,4 @@ export {
|
|
|
553
553
|
le as d,
|
|
554
554
|
gt as t
|
|
555
555
|
};
|
|
556
|
-
//# sourceMappingURL=timeline-item.
|
|
556
|
+
//# sourceMappingURL=timeline-item.YjC_8BBB.js.map
|