@adyen/bento-vue3 1.52.0 → 1.54.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.
Files changed (236) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/index.d.ts +2123 -2028
  3. package/dist/action-bar.js +1 -1
  4. package/dist/assets/accordion-item.css +1 -1
  5. package/dist/assets/action-bar.css +1 -1
  6. package/dist/assets/base-modal.css +1 -1
  7. package/dist/assets/button-actions.css +1 -1
  8. package/dist/assets/calendar.css +1 -1
  9. package/dist/assets/card.css +1 -1
  10. package/dist/assets/checkbox.css +1 -1
  11. package/dist/assets/dashed-underline.css +1 -1
  12. package/dist/assets/data-grid.css +1 -1
  13. package/dist/assets/dialog-page.css +1 -1
  14. package/dist/assets/dropdown.css +1 -1
  15. package/dist/assets/file-uploader.css +1 -1
  16. package/dist/assets/filter-bar.css +1 -1
  17. package/dist/assets/header-with-views.css +1 -0
  18. package/dist/assets/input-field-password.css +1 -1
  19. package/dist/assets/inspector.css +1 -1
  20. package/dist/assets/link.css +1 -1
  21. package/dist/assets/menu.css +1 -1
  22. package/dist/assets/modal-fullscreen.css +1 -1
  23. package/dist/assets/pagination.css +1 -1
  24. package/dist/assets/payment-method.css +1 -1
  25. package/dist/assets/popover.css +1 -1
  26. package/dist/assets/sidepanel.css +1 -1
  27. package/dist/assets/summary-grid.css +1 -0
  28. package/dist/assets/tabs.css +1 -1
  29. package/dist/assets/textarea.css +1 -1
  30. package/dist/assets/use-cached-selected-values.css +1 -1
  31. package/dist/button.js +1 -1
  32. package/dist/card.js +1 -1
  33. package/dist/checkbox.js +2 -2
  34. package/dist/chunks/{action-bar.eo5EXYmg.js → action-bar.CUDi5Po7.js} +5 -5
  35. package/dist/chunks/{action-bar.eo5EXYmg.js.map → action-bar.CUDi5Po7.js.map} +1 -1
  36. package/dist/chunks/{base-modal.BlC6TZNz.js → base-modal.BegK8cPb.js} +4 -4
  37. package/dist/chunks/{base-modal.BlC6TZNz.js.map → base-modal.BegK8cPb.js.map} +1 -1
  38. package/dist/chunks/bin.CA6UQCNZ.js +37 -0
  39. package/dist/chunks/bin.CA6UQCNZ.js.map +1 -0
  40. package/dist/chunks/{button-actions-with-menu.DQaq1bkf.js → button-actions-with-menu.CcoKss9T.js} +5 -5
  41. package/dist/chunks/{button-actions-with-menu.DQaq1bkf.js.map → button-actions-with-menu.CcoKss9T.js.map} +1 -1
  42. package/dist/chunks/{button-actions.BvGAE7sw.js → button-actions.CdlXZ29B.js} +59 -117
  43. package/dist/chunks/{button-actions.BvGAE7sw.js.map → button-actions.CdlXZ29B.js.map} +1 -1
  44. package/dist/chunks/{calendar.D2X834TU.js → calendar.BRsV4rkQ.js} +72 -72
  45. package/dist/chunks/{calendar.D2X834TU.js.map → calendar.BRsV4rkQ.js.map} +1 -1
  46. package/dist/chunks/{card.IrL_Fw-f.js → card.C5bSqYsB.js} +2 -2
  47. package/dist/chunks/{card.IrL_Fw-f.js.map → card.C5bSqYsB.js.map} +1 -1
  48. package/dist/chunks/{checkbox-group.BVJfN48k.js → checkbox-group.EPDS2n3a.js} +4 -4
  49. package/dist/chunks/{checkbox-group.BVJfN48k.js.map → checkbox-group.EPDS2n3a.js.map} +1 -1
  50. package/dist/chunks/{checkbox.erdZ58Kk.js → checkbox.Z2Jeglk-.js} +75 -68
  51. package/dist/chunks/checkbox.Z2Jeglk-.js.map +1 -0
  52. package/dist/chunks/{click-outside.DSszkIvs.js → click-outside.C1Ud8AA2.js} +2 -2
  53. package/dist/chunks/{click-outside.DSszkIvs.js.map → click-outside.C1Ud8AA2.js.map} +1 -1
  54. package/dist/chunks/{code-snippet.Bb4_r0C8.js → code-snippet.zdidL9RT.js} +5 -5
  55. package/dist/chunks/{code-snippet.Bb4_r0C8.js.map → code-snippet.zdidL9RT.js.map} +1 -1
  56. package/dist/chunks/{controls-group.BaDhGB9H.js → controls-group.DcbOWqxA.js} +2 -2
  57. package/dist/chunks/{controls-group.BaDhGB9H.js.map → controls-group.DcbOWqxA.js.map} +1 -1
  58. package/dist/chunks/{copy.gmSTAqHY.js → copy.CFhrpASp.js} +2 -2
  59. package/dist/chunks/{copy.gmSTAqHY.js.map → copy.CFhrpASp.js.map} +1 -1
  60. package/dist/chunks/{dashboard-section.MAHmbUDG.js → dashboard-section.DpL72ax7.js} +4 -4
  61. package/dist/chunks/{dashboard-section.MAHmbUDG.js.map → dashboard-section.DpL72ax7.js.map} +1 -1
  62. package/dist/chunks/{dashed-underline.DY8xR9GH.js → dashed-underline.BYAXhfnX.js} +11 -11
  63. package/dist/chunks/{dashed-underline.DY8xR9GH.js.map → dashed-underline.BYAXhfnX.js.map} +1 -1
  64. package/dist/chunks/{data-grid-template.Dievz913.js → data-grid-template.CJxPIu3E.js} +3 -3
  65. package/dist/chunks/{data-grid-template.Dievz913.js.map → data-grid-template.CJxPIu3E.js.map} +1 -1
  66. package/dist/chunks/{data-grid.KZqjmRvk.js → data-grid.i-NPmpso.js} +32 -20
  67. package/dist/chunks/data-grid.i-NPmpso.js.map +1 -0
  68. package/dist/chunks/{date-picker.BWJYkSmo.js → date-picker.wesQox8h.js} +5 -5
  69. package/dist/chunks/{date-picker.BWJYkSmo.js.map → date-picker.wesQox8h.js.map} +1 -1
  70. package/dist/chunks/{date-range-picker.1Vbf9Zk8.js → date-range-picker.V6QCtfnc.js} +9 -9
  71. package/dist/chunks/{date-range-picker.1Vbf9Zk8.js.map → date-range-picker.V6QCtfnc.js.map} +1 -1
  72. package/dist/chunks/{directive.O3yEdalv.js → directive.Cbdox5VL.js} +2 -2
  73. package/dist/chunks/{directive.O3yEdalv.js.map → directive.Cbdox5VL.js.map} +1 -1
  74. package/dist/chunks/{dropdown-tag.C9nM0YHC.js → dropdown-tag.D8wU10wx.js} +4 -4
  75. package/dist/chunks/{dropdown-tag.C9nM0YHC.js.map → dropdown-tag.D8wU10wx.js.map} +1 -1
  76. package/dist/chunks/{dropdown.qw5oXFYs.js → dropdown.DQunMieR.js} +203 -194
  77. package/dist/chunks/dropdown.DQunMieR.js.map +1 -0
  78. package/dist/chunks/{error-message.DAjisbU1.js → error-message.DH8Er2JS.js} +2 -2
  79. package/dist/chunks/{error-message.DAjisbU1.js.map → error-message.DH8Er2JS.js.map} +1 -1
  80. package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
  81. package/dist/chunks/{file-uploader.BLJpDgAZ.js → file-uploader.Rtt1Uz2U.js} +627 -586
  82. package/dist/chunks/file-uploader.Rtt1Uz2U.js.map +1 -0
  83. package/dist/chunks/{filter-bar.DYrXBQDF.js → filter-bar.DW7lAAtF.js} +867 -853
  84. package/dist/chunks/filter-bar.DW7lAAtF.js.map +1 -0
  85. package/dist/chunks/{focus-trap.DMgm-9f7.js → focus-trap.BFCzfiI_.js} +2 -2
  86. package/dist/chunks/{focus-trap.DMgm-9f7.js.map → focus-trap.BFCzfiI_.js.map} +1 -1
  87. package/dist/chunks/{footer-actions.DK3pMfDY.js → footer-actions.A9H5F5D-.js} +2 -2
  88. package/dist/chunks/{footer-actions.DK3pMfDY.js.map → footer-actions.A9H5F5D-.js.map} +1 -1
  89. package/dist/chunks/header-with-views.D2B-20ZR.js +2354 -0
  90. package/dist/chunks/header-with-views.D2B-20ZR.js.map +1 -0
  91. package/dist/chunks/{header.BASKzNwu.js → header.CoyUQXFL.js} +4 -4
  92. package/dist/chunks/{header.BASKzNwu.js.map → header.CoyUQXFL.js.map} +1 -1
  93. package/dist/chunks/index.BzJQl-2M.js +386 -0
  94. package/dist/chunks/{index.CMGT-6mh.js.map → index.BzJQl-2M.js.map} +1 -1
  95. package/dist/chunks/{info-icon-with-popover.BJccyOFx.js → info-icon-with-popover.CBi7CmUZ.js} +2 -2
  96. package/dist/chunks/{info-icon-with-popover.BJccyOFx.js.map → info-icon-with-popover.CBi7CmUZ.js.map} +1 -1
  97. package/dist/chunks/{info-icon.L8AexnZg.js → info-icon.Bomzzcc5.js} +2 -2
  98. package/dist/chunks/{info-icon.L8AexnZg.js.map → info-icon.Bomzzcc5.js.map} +1 -1
  99. package/dist/chunks/input-field-password.DMEjy243.js +343 -0
  100. package/dist/chunks/input-field-password.DMEjy243.js.map +1 -0
  101. package/dist/chunks/{input-field-phone-number.D1zlBh3R.js → input-field-phone-number.DhJznFQP.js} +3 -3
  102. package/dist/chunks/{input-field-phone-number.D1zlBh3R.js.map → input-field-phone-number.DhJznFQP.js.map} +1 -1
  103. package/dist/chunks/{input-field.DqMdqM2u.js → input-field.B9AU1IsG.js} +3 -3
  104. package/dist/chunks/{input-field.DqMdqM2u.js.map → input-field.B9AU1IsG.js.map} +1 -1
  105. package/dist/chunks/inspector.types.Fs9URmPq.js +188 -0
  106. package/dist/chunks/inspector.types.Fs9URmPq.js.map +1 -0
  107. package/dist/chunks/{layout-row.Drm_y8e3.js → layout-row.BC3Z1mQx.js} +2 -2
  108. package/dist/chunks/{layout-row.Drm_y8e3.js.map → layout-row.BC3Z1mQx.js.map} +1 -1
  109. package/dist/chunks/{listbox-option-tag.YSvtcy4P.js → listbox-option-tag.CqnkZr9x.js} +2 -2
  110. package/dist/chunks/{listbox-option-tag.YSvtcy4P.js.map → listbox-option-tag.CqnkZr9x.js.map} +1 -1
  111. package/dist/chunks/{menu.DfzP2nRU.js → menu.P_KG1J8b.js} +106 -105
  112. package/dist/chunks/menu.P_KG1J8b.js.map +1 -0
  113. package/dist/chunks/{modal-fullscreen.T1x_vroe.js → modal-fullscreen.DxuMKagz.js} +3 -3
  114. package/dist/chunks/{modal-fullscreen.T1x_vroe.js.map → modal-fullscreen.DxuMKagz.js.map} +1 -1
  115. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BAuxqA66.js → modal.vue_vue_type_script_setup_true_lang.DfzxXSwn.js} +4 -4
  116. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BAuxqA66.js.map → modal.vue_vue_type_script_setup_true_lang.DfzxXSwn.js.map} +1 -1
  117. package/dist/chunks/{on-click-outside.MUWbmGDn.js → on-click-outside.D9aY9g8G.js} +3 -2
  118. package/dist/chunks/{on-click-outside.MUWbmGDn.js.map → on-click-outside.D9aY9g8G.js.map} +1 -1
  119. package/dist/chunks/{pagination.Bt8DNme-.js → pagination.DsEd-vpq.js} +3 -3
  120. package/dist/chunks/{pagination.Bt8DNme-.js.map → pagination.DsEd-vpq.js.map} +1 -1
  121. package/dist/chunks/{payment-method.CLUppDo_.js → payment-method.eazefwm6.js} +9 -9
  122. package/dist/chunks/payment-method.eazefwm6.js.map +1 -0
  123. package/dist/chunks/payment-method.types.BqtH7RM2.js +5 -0
  124. package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -0
  125. package/dist/chunks/{popover.COzLcAET.js → popover.Csq1gQ6T.js} +3 -3
  126. package/dist/chunks/{popover.COzLcAET.js.map → popover.Csq1gQ6T.js.map} +1 -1
  127. package/dist/chunks/{popper-container.CEtaux25.js → popper-container.DnlxQ9eS.js} +2 -2
  128. package/dist/chunks/{popper-container.CEtaux25.js.map → popper-container.DnlxQ9eS.js.map} +1 -1
  129. package/dist/chunks/{promo-banner.BCpw2tDD.js → promo-banner.CN-TTSov.js} +2 -2
  130. package/dist/chunks/{promo-banner.BCpw2tDD.js.map → promo-banner.CN-TTSov.js.map} +1 -1
  131. package/dist/chunks/{radio-group.rxg-4rF_.js → radio-group.Vm-hmL1q.js} +4 -4
  132. package/dist/chunks/{radio-group.rxg-4rF_.js.map → radio-group.Vm-hmL1q.js.map} +1 -1
  133. package/dist/chunks/{search-bar.DlihXfPt.js → search-bar.BBV1KNdd.js} +3 -3
  134. package/dist/chunks/{search-bar.DlihXfPt.js.map → search-bar.BBV1KNdd.js.map} +1 -1
  135. package/dist/chunks/{secondary-nav.D2loVonk.js → secondary-nav.O2R1ltD9.js} +3 -3
  136. package/dist/chunks/{secondary-nav.D2loVonk.js.map → secondary-nav.O2R1ltD9.js.map} +1 -1
  137. package/dist/chunks/{segmented-control.Wn-miTIl.js → segmented-control.DBy-nbYM.js} +2 -2
  138. package/dist/chunks/{segmented-control.Wn-miTIl.js.map → segmented-control.DBy-nbYM.js.map} +1 -1
  139. package/dist/chunks/{selection-card-group.CtQaeZFM.js → selection-card-group.Bt4jBqjc.js} +4 -4
  140. package/dist/chunks/{selection-card-group.CtQaeZFM.js.map → selection-card-group.Bt4jBqjc.js.map} +1 -1
  141. package/dist/chunks/{sidepanel.CjaHQEin.js → sidepanel.Ds2CCG9L.js} +4 -4
  142. package/dist/chunks/{sidepanel.CjaHQEin.js.map → sidepanel.Ds2CCG9L.js.map} +1 -1
  143. package/dist/chunks/{structured-list-item.DAwADFpI.js → structured-list-item.CygGTBVl.js} +4 -4
  144. package/dist/chunks/{structured-list-item.DAwADFpI.js.map → structured-list-item.CygGTBVl.js.map} +1 -1
  145. package/dist/chunks/summary-grid.types.DzvuP-NU.js +454 -0
  146. package/dist/chunks/summary-grid.types.DzvuP-NU.js.map +1 -0
  147. package/dist/chunks/tabs.B8BRqQpv.js +272 -0
  148. package/dist/chunks/tabs.B8BRqQpv.js.map +1 -0
  149. package/dist/chunks/{tag.B1hW92hG.js → tag.C4SGN5Eb.js} +2 -2
  150. package/dist/chunks/{tag.B1hW92hG.js.map → tag.C4SGN5Eb.js.map} +1 -1
  151. package/dist/chunks/{teleport.B1NhF5-O.js → teleport.DfTpEQBR.js} +2 -2
  152. package/dist/chunks/{teleport.B1NhF5-O.js.map → teleport.DfTpEQBR.js.map} +1 -1
  153. package/dist/chunks/{textarea.DMA29yQA.js → textarea.bQwvvIkq.js} +103 -95
  154. package/dist/chunks/textarea.bQwvvIkq.js.map +1 -0
  155. package/dist/chunks/{timeline-item.kWg3dTy1.js → timeline-item.Bxt_pNII.js} +5 -5
  156. package/dist/chunks/{timeline-item.kWg3dTy1.js.map → timeline-item.Bxt_pNII.js.map} +1 -1
  157. package/dist/chunks/{tooltip.Y730-n-n.js → tooltip.CyQxprBQ.js} +2 -2
  158. package/dist/chunks/{tooltip.Y730-n-n.js.map → tooltip.CyQxprBQ.js.map} +1 -1
  159. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CUmJbMsw.js → tutorial.vue_vue_type_script_setup_true_lang.BtVT3Ltg.js} +5 -5
  160. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CUmJbMsw.js.map → tutorial.vue_vue_type_script_setup_true_lang.BtVT3Ltg.js.map} +1 -1
  161. package/dist/chunks/{use-cached-selected-values.DDP7LJoI.js → use-cached-selected-values.DmW8XRgJ.js} +234 -225
  162. package/dist/chunks/{use-cached-selected-values.DDP7LJoI.js.map → use-cached-selected-values.DmW8XRgJ.js.map} +1 -1
  163. package/dist/click-outside.js +1 -1
  164. package/dist/code-snippet.js +1 -1
  165. package/dist/dashboard-template.js +1 -1
  166. package/dist/dashed-underline.js +2 -2
  167. package/dist/data-grid-template.js +1 -1
  168. package/dist/data-grid.js +1 -1
  169. package/dist/date-picker.js +2 -2
  170. package/dist/date-range-picker.js +2 -2
  171. package/dist/dropdown.js +3 -3
  172. package/dist/file-uploader.js +1 -1
  173. package/dist/filter-bar.js +1 -1
  174. package/dist/focus-trap.js +1 -1
  175. package/dist/header-with-views.js +5 -0
  176. package/dist/header-with-views.js.map +1 -0
  177. package/dist/header.js +1 -1
  178. package/dist/index.js +201 -199
  179. package/dist/index.js.map +1 -1
  180. package/dist/info-icon.js +1 -1
  181. package/dist/input-field-password.js +1 -1
  182. package/dist/input-field-phone-number.js +1 -1
  183. package/dist/input-field.js +1 -1
  184. package/dist/inspector.js +1 -1
  185. package/dist/internal.js +11 -11
  186. package/dist/layout.js +1 -1
  187. package/dist/menu.js +1 -1
  188. package/dist/modal-fullscreen.js +1 -1
  189. package/dist/modal.js +2 -2
  190. package/dist/pagination.js +1 -1
  191. package/dist/payment-method.js +2 -2
  192. package/dist/popover.js +1 -1
  193. package/dist/popper-container.js +1 -1
  194. package/dist/promo-banner.js +1 -1
  195. package/dist/radio-group.js +1 -1
  196. package/dist/search-bar.js +2 -2
  197. package/dist/secondary-nav.js +1 -1
  198. package/dist/segmented-control.js +1 -1
  199. package/dist/selection-card.js +1 -1
  200. package/dist/sidepanel.js +1 -1
  201. package/dist/structured-list.js +1 -1
  202. package/dist/styles/bento-dark.css +89 -17
  203. package/dist/styles/bento-light.css +89 -17
  204. package/dist/styles/bento.css +89 -17
  205. package/dist/styles/legacy.css +77 -5
  206. package/dist/styles/styleguide.css +89 -17
  207. package/dist/summary-grid.js +1 -1
  208. package/dist/tabs.js +1 -1
  209. package/dist/tag.js +1 -1
  210. package/dist/textarea.js +1 -1
  211. package/dist/timeline.js +1 -1
  212. package/dist/tutorial.js +1 -1
  213. package/dist/use-form-v4.js +8300 -0
  214. package/dist/use-form-v4.js.map +1 -0
  215. package/dist/web-types.json +1 -1
  216. package/package.json +8 -7
  217. package/dist/assets/summary-grid-item-custom.css +0 -1
  218. package/dist/chunks/checkbox.erdZ58Kk.js.map +0 -1
  219. package/dist/chunks/data-grid.KZqjmRvk.js.map +0 -1
  220. package/dist/chunks/dropdown.qw5oXFYs.js.map +0 -1
  221. package/dist/chunks/file-uploader.BLJpDgAZ.js.map +0 -1
  222. package/dist/chunks/filter-bar.DYrXBQDF.js.map +0 -1
  223. package/dist/chunks/index.CMGT-6mh.js +0 -369
  224. package/dist/chunks/input-field-password.CZNUHo6s.js +0 -309
  225. package/dist/chunks/input-field-password.CZNUHo6s.js.map +0 -1
  226. package/dist/chunks/inspector.types.Dwt3V80X.js +0 -184
  227. package/dist/chunks/inspector.types.Dwt3V80X.js.map +0 -1
  228. package/dist/chunks/menu.DfzP2nRU.js.map +0 -1
  229. package/dist/chunks/payment-method.CLUppDo_.js.map +0 -1
  230. package/dist/chunks/payment-method.types.CJKfZQN5.js +0 -5
  231. package/dist/chunks/payment-method.types.CJKfZQN5.js.map +0 -1
  232. package/dist/chunks/summary-grid-item-custom.DTCzOBBy.js +0 -725
  233. package/dist/chunks/summary-grid-item-custom.DTCzOBBy.js.map +0 -1
  234. package/dist/chunks/tabs.hp52NnXH.js +0 -211
  235. package/dist/chunks/tabs.hp52NnXH.js.map +0 -1
  236. package/dist/chunks/textarea.DMA29yQA.js.map +0 -1
@@ -1,30 +1,30 @@
1
- import { defineComponent as be, useAttrs as fe, toRefs as w, ref as v, toRef as me, computed as i, watch as I, nextTick as pe, onMounted as he, onUnmounted as ye, createElementBlock as M, openBlock as c, normalizeClass as L, createElementVNode as N, normalizeStyle as W, createVNode as k, createBlock as h, createCommentVNode as b, unref as t, withCtx as E, createTextVNode as V, toDisplayString as z, withKeys as H } from "vue";
2
- import { B as ge } from "./button.6HMG0xEY.js";
3
- import { B as O } from "./typography.DN5eC5ch.js";
4
- import { C as xe } from "./cross-circle-fill-small.mY6ihJcA.js";
5
- import { g as Le } from "./generate-uid.NJ8tVoha.js";
6
- import { o as q } from "./resize.Bqks3WUm.js";
7
- import { u as Ee } from "./aria-label.CaUURpnB.js";
8
- import { u as Ce } from "./i18n.D9azDLPe.js";
9
- import { u as _e } from "./use-form-layout-loading.D3lALhtC.js";
10
- import { F as Ae, E as K } from "./error-message.DAjisbU1.js";
11
- import { _ as Se } from "./_plugin-vue_export-helper.CHgC5LLL.js";
1
+ import { defineComponent as me, useAttrs as pe, toRefs as $, ref as v, toRef as he, computed as n, watch as N, nextTick as ye, onMounted as ge, onUnmounted as xe, createElementBlock as F, openBlock as c, normalizeClass as L, createElementVNode as k, normalizeStyle as M, createVNode as B, createBlock as h, createCommentVNode as b, unref as l, withCtx as E, createTextVNode as T, toDisplayString as Y, withKeys as O } from "vue";
2
+ import { B as Le } from "./button.6HMG0xEY.js";
3
+ import { B as P } from "./typography.DN5eC5ch.js";
4
+ import { C as Ee } from "./cross-circle-fill-small.mY6ihJcA.js";
5
+ import { g as Ce } from "./generate-uid.NJ8tVoha.js";
6
+ import { o as V } from "./resize.Bqks3WUm.js";
7
+ import { u as _e } from "./aria-label.CaUURpnB.js";
8
+ import { u as Ae } from "./i18n.D9azDLPe.js";
9
+ import { u as Se } from "./use-form-layout-loading.D3lALhtC.js";
10
+ import { F as Re, E as z } from "./error-message.DH8Er2JS.js";
11
+ import { _ as Ie } from "./_plugin-vue_export-helper.CHgC5LLL.js";
12
12
  import "../assets/textarea.css";
13
- var T = /* @__PURE__ */ ((e) => (e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e.BOTH = "both", e.NONE = "none", e))(T || {}), f = /* @__PURE__ */ ((e) => (e.CLEARABLE = "clearable", e.DISABLED = "disabled", e.ERROR = "error", e.READONLY = "readonly", e))(f || {}), n = /* @__PURE__ */ ((e) => (e.BLUR = "blur", e.CHANGE = "change", e.CLEAR = "clear", e.ESCAPE_PRESSED = "escape-pressed", e.FOCUS = "focus", e.INPUT = "input", e))(n || {});
14
- const Y = {
13
+ var U = /* @__PURE__ */ ((e) => (e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e.BOTH = "both", e.NONE = "none", e))(U || {}), f = /* @__PURE__ */ ((e) => (e.CLEARABLE = "clearable", e.DISABLED = "disabled", e.ERROR = "error", e.READONLY = "readonly", e))(f || {}), i = /* @__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))(i || {});
14
+ const q = {
15
15
  "en-US": {
16
16
  clearText: "Clear text",
17
17
  textarea: "textarea",
18
18
  yourTextCanBenAtMost: "Your text can be at most {characterLimit} characters"
19
19
  }
20
- }, Re = ["id", "value", "aria-label", "aria-invalid", "readonly", "disabled", "placeholder"], Be = {
20
+ }, Ne = ["id", "value", "aria-label", "aria-invalid", "readonly", "disabled", "placeholder"], ke = {
21
21
  key: 0,
22
22
  class: "b-textarea__clear-button"
23
- }, Ie = {
24
- i18n: { messages: Y },
23
+ }, Be = {
24
+ i18n: { messages: q },
25
25
  name: "bento-textarea"
26
- }, Ne = /* @__PURE__ */ be({
27
- ...Ie,
26
+ }, Oe = /* @__PURE__ */ me({
27
+ ...Be,
28
28
  props: {
29
29
  /**
30
30
  * Text that labels an the input element
@@ -75,8 +75,8 @@ const Y = {
75
75
  */
76
76
  resizable: {
77
77
  type: String,
78
- default: T.BOTH,
79
- validator: (e) => Object.values(T).includes(e)
78
+ default: U.BOTH,
79
+ validator: (e) => Object.values(U).includes(e)
80
80
  },
81
81
  /**
82
82
  * Highlights the textarea is required.
@@ -92,148 +92,156 @@ const Y = {
92
92
  value: { type: String, default: "" }
93
93
  },
94
94
  setup(e, { expose: G, emit: j }) {
95
- const Z = fe(), a = e, u = j, { height: d } = w(a), U = Le("textarea"), l = v(null), m = v(null), r = v(a.value), C = 44, p = v(a.height || `${C}px`), _ = v("100%");
95
+ const Z = pe(), a = e, s = j, { height: d } = $(a), D = Ce("textarea"), r = v(null), m = v(null), o = v(a.value), C = 44, p = v(a.height || `${C}px`), _ = v("100%");
96
96
  let y = null, g = null;
97
- const { t: $ } = Ce({ messages: Y }), { isReadOnly: x } = _e(me(a, "readonly")), J = i(() => `${r.value.length} / ${a.characterLimit}`), A = i(
98
- () => a.characterLimit && r.value.length > a.characterLimit
97
+ const { t: H } = Ae({ messages: q }), { isReadOnly: x } = Se(he(a, "readonly")), J = n(() => `${o.value.length} / ${a.characterLimit}`), A = n(
98
+ () => a.characterLimit && o.value.length > a.characterLimit
99
99
  ), S = () => {
100
- l.value && l.value.scrollHeight > C && (p.value = `${l.value.scrollHeight + 3}px`);
100
+ r.value && r.value.scrollHeight > C && (p.value = `${r.value.scrollHeight + 3}px`);
101
101
  };
102
- I(d, () => {
102
+ N(d, () => {
103
103
  d.value ? p.value = d.value : S();
104
- }), I(
104
+ }), N(
105
105
  () => a.value,
106
106
  () => {
107
- r.value = a.value;
107
+ o.value = a.value;
108
108
  },
109
109
  { immediate: !0 }
110
- ), I(
111
- () => r.value,
110
+ ), N(
111
+ () => o.value,
112
112
  async () => {
113
- var o, s;
114
- if (!d.value && (!l.value || ((o = l.value) == null ? void 0 : o.scrollHeight) > ((s = l.value) == null ? void 0 : s.clientHeight))) {
115
- if (p.value = `${C}px`, !r.value)
113
+ var t, u;
114
+ if (!d.value && (!r.value || ((t = r.value) == null ? void 0 : t.scrollHeight) > ((u = r.value) == null ? void 0 : u.clientHeight))) {
115
+ if (p.value = `${C}px`, !o.value)
116
116
  return;
117
- await pe(), S();
117
+ await ye(), S();
118
118
  }
119
119
  },
120
120
  { immediate: !0 }
121
121
  );
122
- const D = i(() => !!a.errorMessage || A.value), Q = i(() => ({
122
+ const K = n(() => !!a.errorMessage || A.value), Q = n(() => ({
123
123
  [`b-textarea--${f.DISABLED}`]: a.disabled
124
- })), X = i(() => ({
124
+ })), X = n(() => ({
125
125
  [`b-textarea__input--${f.CLEARABLE}`]: a.clearable,
126
126
  [`b-textarea__input--${f.READONLY}`]: x.value,
127
- [`b-textarea__input--${f.ERROR}`]: D.value,
127
+ [`b-textarea__input--${f.ERROR}`]: K.value,
128
128
  "b-textarea__input--dynamic-height": !d.value
129
- })), ee = i(() => ({
129
+ })), ee = n(() => ({
130
130
  "b-textarea__label-box--no-label": !a.label
131
- })), ae = i(() => ({
131
+ })), ae = n(() => ({
132
132
  [`b-textarea__label-item--${f.ERROR}`]: A.value
133
- })), te = i(() => $("yourTextCanBenAtMost", { characterLimit: a.characterLimit })), le = v(Z["aria-label"]), { ariaLabel: re, label: R } = w(a), oe = Ee({
133
+ })), te = n(() => H("yourTextCanBenAtMost", { characterLimit: a.characterLimit })), le = v(Z["aria-label"]), { ariaLabel: re, label: R } = $(a), oe = _e({
134
134
  ariaLabel: le.value,
135
135
  // TODO: take this line away when the aria-label props is removed
136
136
  label: re,
137
137
  defaultFallback: R
138
- }), ie = i(
139
- () => a.clearable && r.value && !a.disabled && !x.value
140
- ), B = () => {
141
- r.value = "", u(n.CLEAR), u(n.INPUT, "");
142
- }, se = (o) => {
143
- o.stopImmediatePropagation(), !a.disabled && !x.value && (r.value = o.target.value, u(n.INPUT, r.value));
138
+ }), ie = n(
139
+ () => a.clearable && o.value && !a.disabled && !x.value
140
+ ), I = () => {
141
+ o.value = "", s(i.CLEAR), s(i.INPUT, "");
142
+ }, se = (t) => {
143
+ t.stopImmediatePropagation(), !a.disabled && !x.value && (o.value = t.target.value, s(i.INPUT, o.value));
144
144
  }, ne = () => {
145
- l.value.scrollTop = 0, u(n.BLUR);
145
+ r.value.scrollTop = 0, s(i.BLUR);
146
146
  }, ue = () => {
147
- l.value.focus(), u(n.FOCUS);
147
+ r.value.focus(), s(i.FOCUS);
148
148
  }, ce = () => {
149
- u(n.CHANGE);
149
+ s(i.CHANGE);
150
150
  }, de = () => {
151
- u(n.ESCAPE_PRESSED);
152
- }, F = (o = !1) => {
153
- var P;
154
- const s = l.value.style.width;
155
- if (l.value.style.height && (p.value = l.value.style.height), o && !s)
151
+ s(i.ESCAPE_PRESSED);
152
+ }, ve = (t) => {
153
+ t.stopPropagation(), s(i.KEYDOWN, t);
154
+ }, be = (t) => {
155
+ t.stopPropagation(), s(i.KEYUP, t);
156
+ }, w = (t = !1) => {
157
+ var W;
158
+ const u = r.value.style.width;
159
+ if (r.value.style.height && (p.value = r.value.style.height), t && !u)
156
160
  return;
157
- const ve = (P = m == null ? void 0 : m.value) == null ? void 0 : P.offsetWidth;
158
- !s || parseInt(s, 10) > ve ? _.value = "100%" : _.value = s;
161
+ const fe = (W = m == null ? void 0 : m.value) == null ? void 0 : W.offsetWidth;
162
+ !u || parseInt(u, 10) > fe ? _.value = "100%" : _.value = u;
159
163
  };
160
164
  return G({
161
165
  focus: () => {
162
- l.value.focus();
166
+ r.value.focus();
163
167
  }
164
- }), he(() => {
165
- y = q(l.value, () => {
166
- F(!0);
167
- }), g = q(m.value, () => {
168
- F();
168
+ }), ge(() => {
169
+ y = V(r.value, () => {
170
+ w(!0);
171
+ }), g = V(m.value, () => {
172
+ w();
169
173
  }), d.value || S();
170
- }), ye(() => {
174
+ }), xe(() => {
171
175
  y == null || y.disconnect(), g == null || g.disconnect();
172
- }), (o, s) => (c(), M("div", {
176
+ }), (t, u) => (c(), F("div", {
173
177
  ref_key: "textareaComponent",
174
178
  ref: m,
175
179
  class: L(["b-textarea", Q.value])
176
180
  }, [
177
- N("div", {
178
- style: W({ width: _.value })
181
+ k("div", {
182
+ style: M({ width: _.value })
179
183
  }, [
180
- N("div", {
184
+ k("div", {
181
185
  class: L(["b-textarea__label-box", ee.value])
182
186
  }, [
183
- t(R) ? (c(), h(t(Ae), {
187
+ l(R) ? (c(), h(l(Re), {
184
188
  key: 0,
185
- for: t(U),
186
- label: t(R),
189
+ for: l(D),
190
+ label: l(R),
187
191
  "tooltip-text": e.tooltipText,
188
192
  optional: e.optional,
189
193
  required: e.required
190
194
  }, null, 8, ["for", "label", "tooltip-text", "optional", "required"])) : b("", !0),
191
- e.characterLimit ? (c(), h(t(O), {
195
+ e.characterLimit ? (c(), h(l(P), {
192
196
  key: 1,
193
197
  el: "span",
194
198
  class: L(["b-textarea__label-item", ae.value])
195
199
  }, {
196
200
  default: E(() => [
197
- V(z(J.value), 1)
201
+ T(Y(J.value), 1)
198
202
  ]),
199
203
  _: 1
200
204
  }, 8, ["class"])) : b("", !0)
201
205
  ], 2),
202
- k(t(O), {
206
+ B(l(P), {
203
207
  el: "div",
204
208
  class: "b-textarea__input-box",
205
209
  "aria-disabled": e.disabled
206
210
  }, {
207
211
  default: E(() => [
208
- N("textarea", {
209
- id: t(U),
212
+ k("textarea", {
213
+ id: l(D),
210
214
  ref_key: "textareaElement",
211
- ref: l,
212
- value: r.value,
215
+ ref: r,
216
+ value: o.value,
213
217
  class: L(["b-textarea__input", X.value]),
214
- "aria-label": t(oe),
215
- "aria-invalid": D.value,
216
- readonly: t(x),
218
+ "aria-label": l(oe),
219
+ "aria-invalid": K.value,
220
+ readonly: l(x),
217
221
  disabled: e.disabled,
218
222
  placeholder: e.placeholder,
219
- style: W({ resize: e.resizable, height: p.value }),
223
+ style: M({ resize: e.resizable, height: p.value }),
220
224
  onBlur: ne,
221
225
  onChange: ce,
222
226
  onFocus: ue,
223
227
  onInput: se,
224
- onKeydown: H(de, ["esc"])
225
- }, " ", 46, Re),
226
- ie.value ? (c(), M("div", Be, [
227
- k(t(ge), {
228
+ onKeydown: [
229
+ O(de, ["esc"]),
230
+ ve
231
+ ],
232
+ onKeyup: be
233
+ }, " ", 46, Ne),
234
+ ie.value ? (c(), F("div", ke, [
235
+ B(l(Le), {
228
236
  variant: "tertiary",
229
237
  disabled: e.disabled,
230
- onClick: B,
231
- onKeypress: H(B, ["enter"]),
232
- onKeyup: H(B, ["space"])
238
+ onClick: I,
239
+ onKeypress: O(I, ["enter"]),
240
+ onKeyup: O(I, ["space"])
233
241
  }, {
234
242
  iconLeft: E(() => [
235
- k(t(xe), {
236
- "svg-title": t($)("clearText")
243
+ B(l(Ee), {
244
+ "svg-title": l(H)("clearText")
237
245
  }, null, 8, ["svg-title"])
238
246
  ]),
239
247
  _: 1
@@ -242,29 +250,29 @@ const Y = {
242
250
  ]),
243
251
  _: 1
244
252
  }, 8, ["aria-disabled"]),
245
- A.value ? (c(), h(t(K), {
253
+ A.value ? (c(), h(l(z), {
246
254
  key: 0,
247
255
  "error-message": te.value
248
256
  }, null, 8, ["error-message"])) : b("", !0),
249
- e.errorMessage ? (c(), h(t(K), {
257
+ e.errorMessage ? (c(), h(l(z), {
250
258
  key: 1,
251
259
  "error-message": e.errorMessage
252
260
  }, null, 8, ["error-message"])) : b("", !0),
253
- e.description ? (c(), h(t(O), {
261
+ e.description ? (c(), h(l(P), {
254
262
  key: 2,
255
263
  class: "b-textarea__description",
256
264
  el: "span"
257
265
  }, {
258
266
  default: E(() => [
259
- V(z(e.description), 1)
267
+ T(Y(e.description), 1)
260
268
  ]),
261
269
  _: 1
262
270
  })) : b("", !0)
263
271
  ], 4)
264
272
  ], 2));
265
273
  }
266
- }), Ve = /* @__PURE__ */ Se(Ne, [["__scopeId", "data-v-8d67afab"]]);
274
+ }), Ve = /* @__PURE__ */ Ie(Oe, [["__scopeId", "data-v-6a20fc43"]]);
267
275
  export {
268
276
  Ve as B
269
277
  };
270
- //# sourceMappingURL=textarea.DMA29yQA.js.map
278
+ //# sourceMappingURL=textarea.bQwvvIkq.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.bQwvvIkq.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 :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 >\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, 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 // 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 textareaWrapperWidth = ref('100%'); // The width set to the wrapper of the label, textarea and description\n let textareaElementObserver: ResizeObserver | null = null;\n let textareaComponentObserver: ResizeObserver | null = null;\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const counter = computed(() => `${textareaValue.value.length} / ${props.characterLimit}`);\n const isOverCharacterLimit = computed(\n () => props.characterLimit && textareaValue.value.length > props.characterLimit\n );\n\n const calculateHeight = () => {\n const borderWidth = 3;\n if (textareaElement.value && textareaElement.value.scrollHeight > defaultTextareaHeight) {\n textareaHeight.value = `${textareaElement.value.scrollHeight + borderWidth}px`;\n }\n };\n\n watch(height, () => {\n if (!height.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 // Auto-adjust height if the text area is overflowing\n if (\n !height.value &&\n (!textareaElement.value || textareaElement.value?.scrollHeight > textareaElement.value?.clientHeight)\n ) {\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`]: !height.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 /**\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 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 (!height.value) {\n calculateHeight();\n }\n });\n\n onUnmounted(() => {\n textareaElementObserver?.disconnect();\n textareaComponentObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\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","__default__","messages","attrs","useAttrs","props","__props","emit","__emit","height","toRefs","textareaId","generateUid","textareaElement","ref","textareaComponent","textareaValue","defaultTextareaHeight","textareaHeight","textareaWrapperWidth","textareaElementObserver","textareaComponentObserver","t","useI18n","isReadOnly","useFormLayoutFieldLoading","toRef","counter","computed","isOverCharacterLimit","calculateHeight","watch","_a","_b","nextTick","invalidInput","conditionalClasses","conditionalClassesInput","conditionalClassesLabelBox","conditionalClassesLabelItem","counterErrorText","ariaLabelAttribute","ariaLabel","label","computedAriaLabel","useAriaLabel","showClearButton","onClear","onInput","event","onBlur","onFocus","onChange","onPressEscape","onKeyDown","onKeyUp","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;;;;;;;;;;GC8ZRE,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAnVA,UAAAC,IAAAC,GAAA,GAEAC,IAAAC,GAiFAC,IAAAC,GA0CA,EAAA,QAAAC,EAAA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A;AAAA,MAA0B,CAAA,GAG9BnC,IAAAyC,EAAA/C,EAAA,OAAA,MAAA;AACI,QAAAyC,EAAA;AAAA,MAAsB,CAAA,GAG1B/C,EAAA,SACIqB,EAAA;AAAA,IACJ,CAAA,GAGJiC,GAAA,MAAA;AACI,MAAA3C,KAAA,QAAAA,EAAA,cACAC,KAAA,QAAAA,EAAA;AAAA,IAAsC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as ne, computed as m, ref as D, toRefs as ce, provide as z, resolveComponent as I, createElementBlock as v, openBlock as i, createCommentVNode as c, createElementVNode as g, createBlock as T, withCtx as h, createTextVNode as w, toDisplayString as y, createVNode as S, renderSlot as H, mergeProps as V, inject as K, onUnmounted as fe, normalizeClass as W, Fragment as Y, renderList as pe } from "vue";
2
2
  import { B as oe } from "./button.6HMG0xEY.js";
3
- import { B as ve } from "./textarea.DMA29yQA.js";
3
+ import { B as ve } from "./textarea.bQwvvIkq.js";
4
4
  import { u as ae } from "./i18n.D9azDLPe.js";
5
- import { B as _e } from "./button-actions.BvGAE7sw.js";
5
+ import { B as _e } from "./button-actions.CdlXZ29B.js";
6
6
  import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
7
7
  import { B as be } from "./date.DoJuTLhO.js";
8
8
  import { B as he } from "./link.D3Fq5tt_.js";
9
- import { B as ge } from "./tag.B1hW92hG.js";
9
+ import { B as ge } from "./tag.C4SGN5Eb.js";
10
10
  import { B as ye, d as Ne } from "./typography.DN5eC5ch.js";
11
- import { a as Ie, B as Ee, S as we } from "./structured-list-item.DAwADFpI.js";
11
+ import { a as Ie, B as Ee, S as we } from "./structured-list-item.CygGTBVl.js";
12
12
  /* empty css */
13
13
  import { g as Te } from "./generate-uid.NJ8tVoha.js";
14
14
  import { u as Se } from "./use-has-slot.B7eQSabc.js";
@@ -557,4 +557,4 @@ export {
557
557
  se as d,
558
558
  bt as t
559
559
  };
560
- //# sourceMappingURL=timeline-item.kWg3dTy1.js.map
560
+ //# sourceMappingURL=timeline-item.Bxt_pNII.js.map