@adyen/bento-vue2 1.97.0 → 1.98.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 (229) hide show
  1. package/dist/@types/index.d.ts +66 -1
  2. package/dist/action-bar.js +1 -1
  3. package/dist/ai-tag.js +1 -1
  4. package/dist/anchor-scroller.js +1 -1
  5. package/dist/assets/accordion-item.css +1 -1
  6. package/dist/assets/action-bar.css +1 -1
  7. package/dist/assets/base-modal.css +1 -1
  8. package/dist/assets/button-actions.css +1 -1
  9. package/dist/assets/calendar.css +1 -1
  10. package/dist/assets/card.css +1 -1
  11. package/dist/assets/data-grid.css +1 -1
  12. package/dist/assets/date.css +1 -1
  13. package/dist/assets/dialog-page.css +1 -1
  14. package/dist/assets/draggable-handle.css +1 -1
  15. package/dist/assets/draggable.css +1 -0
  16. package/dist/assets/dropdown.css +1 -1
  17. package/dist/assets/file-uploader.css +1 -1
  18. package/dist/assets/filter-bar.css +1 -1
  19. package/dist/assets/header-meta.css +1 -1
  20. package/dist/assets/inspector.css +1 -1
  21. package/dist/assets/list-item.css +1 -1
  22. package/dist/assets/modal-fullscreen.css +1 -1
  23. package/dist/assets/navigation-menu-group.css +1 -1
  24. package/dist/assets/secondary-nav.css +1 -1
  25. package/dist/assets/sidepanel.css +1 -1
  26. package/dist/button.js +1 -1
  27. package/dist/card.js +1 -1
  28. package/dist/checkbox.js +2 -2
  29. package/dist/chunks/{action-bar.B890LCTe.js → action-bar.X-dXuOcv.js} +4 -4
  30. package/dist/chunks/{action-bar.B890LCTe.js.map → action-bar.X-dXuOcv.js.map} +1 -1
  31. package/dist/chunks/{ai-tag.C8RxACNj.js → ai-tag.Cdn4JK1m.js} +2 -2
  32. package/dist/chunks/{ai-tag.C8RxACNj.js.map → ai-tag.Cdn4JK1m.js.map} +1 -1
  33. package/dist/chunks/{anchor-scroller.B8VXotik.js → anchor-scroller.Bu7GtOqH.js} +5 -5
  34. package/dist/chunks/{anchor-scroller.B8VXotik.js.map → anchor-scroller.Bu7GtOqH.js.map} +1 -1
  35. package/dist/chunks/{base-modal.CDMoF3b_.js → base-modal.DgMSsQf3.js} +5 -5
  36. package/dist/chunks/{base-modal.CDMoF3b_.js.map → base-modal.DgMSsQf3.js.map} +1 -1
  37. package/dist/chunks/{button-actions-with-menu.DqDQ_gVX.js → button-actions-with-menu.BV5aDUCD.js} +3 -3
  38. package/dist/chunks/{button-actions-with-menu.DqDQ_gVX.js.map → button-actions-with-menu.BV5aDUCD.js.map} +1 -1
  39. package/dist/chunks/{button-actions.DKc63aCb.js → button-actions.BD4Dyp4U.js} +2 -2
  40. package/dist/chunks/{button-actions.DKc63aCb.js.map → button-actions.BD4Dyp4U.js.map} +1 -1
  41. package/dist/chunks/{calendar.BckAv9N_.js → calendar.B0GnBaAW.js} +154 -153
  42. package/dist/chunks/calendar.B0GnBaAW.js.map +1 -0
  43. package/dist/chunks/{card.ChBURa5R.js → card.Bm7JEsCC.js} +2 -2
  44. package/dist/chunks/{card.ChBURa5R.js.map → card.Bm7JEsCC.js.map} +1 -1
  45. package/dist/chunks/{checkbox-group.BAjvgXlc.js → checkbox-group.mgC7eJkE.js} +3 -3
  46. package/dist/chunks/{checkbox-group.BAjvgXlc.js.map → checkbox-group.mgC7eJkE.js.map} +1 -1
  47. package/dist/chunks/{checkbox.BAQDBNL6.js → checkbox.CBawZCc6.js} +2 -2
  48. package/dist/chunks/{checkbox.BAQDBNL6.js.map → checkbox.CBawZCc6.js.map} +1 -1
  49. package/dist/chunks/{code-snippet.nUo9bjhC.js → code-snippet.CpHbw0xj.js} +4 -4
  50. package/dist/chunks/{code-snippet.nUo9bjhC.js.map → code-snippet.CpHbw0xj.js.map} +1 -1
  51. package/dist/chunks/{controls-group.Bzpsrtcx.js → controls-group.BWzCb_GU.js} +2 -2
  52. package/dist/chunks/{controls-group.Bzpsrtcx.js.map → controls-group.BWzCb_GU.js.map} +1 -1
  53. package/dist/chunks/{copy.DVB6pQC8.js → copy.CWKdfVcd.js} +3 -3
  54. package/dist/chunks/{copy.DVB6pQC8.js.map → copy.CWKdfVcd.js.map} +1 -1
  55. package/dist/chunks/{dashboard-section.BDDVJpxY.js → dashboard-section.CRn7tlX_.js} +4 -4
  56. package/dist/chunks/{dashboard-section.BDDVJpxY.js.map → dashboard-section.CRn7tlX_.js.map} +1 -1
  57. package/dist/chunks/{dashed-underline.CfEmbgOv.js → dashed-underline.BoHt4iGu.js} +4 -4
  58. package/dist/chunks/{dashed-underline.CfEmbgOv.js.map → dashed-underline.BoHt4iGu.js.map} +1 -1
  59. package/dist/chunks/{data-grid-template.BUlLHTYe.js → data-grid-template.BYMLOzkm.js} +4 -4
  60. package/dist/chunks/{data-grid-template.BUlLHTYe.js.map → data-grid-template.BYMLOzkm.js.map} +1 -1
  61. package/dist/chunks/{data-grid.0OiCQjFc.js → data-grid.BRziyZ43.js} +19 -19
  62. package/dist/chunks/{data-grid.0OiCQjFc.js.map → data-grid.BRziyZ43.js.map} +1 -1
  63. package/dist/chunks/{date-picker.CsFSskqf.js → date-picker.CCJtLnE4.js} +7 -7
  64. package/dist/chunks/{date-picker.CsFSskqf.js.map → date-picker.CCJtLnE4.js.map} +1 -1
  65. package/dist/chunks/{date-range-picker.Bczgdu5X.js → date-range-picker.B2u5vm8m.js} +10 -10
  66. package/dist/chunks/{date-range-picker.Bczgdu5X.js.map → date-range-picker.B2u5vm8m.js.map} +1 -1
  67. package/dist/chunks/{date-time-picker.DT54TiG4.js → date-time-picker.CP-IrUwY.js} +5 -5
  68. package/dist/chunks/{date-time-picker.DT54TiG4.js.map → date-time-picker.CP-IrUwY.js.map} +1 -1
  69. package/dist/chunks/{date.B0m0sFP6.js → date.C1HnIyOv.js} +27 -25
  70. package/dist/chunks/date.C1HnIyOv.js.map +1 -0
  71. package/dist/chunks/{dialog-page.DYWnKdnP.js → dialog-page.BendBRv6.js} +10 -10
  72. package/dist/chunks/{dialog-page.DYWnKdnP.js.map → dialog-page.BendBRv6.js.map} +1 -1
  73. package/dist/chunks/draggable-handle.BnRkhlee.js +1611 -0
  74. package/dist/chunks/draggable-handle.BnRkhlee.js.map +1 -0
  75. package/dist/chunks/draggable.D5WFD5eX.js +193 -0
  76. package/dist/chunks/draggable.D5WFD5eX.js.map +1 -0
  77. package/dist/chunks/{drawer.WW7G9cSC.js → drawer.BuCNjIKQ.js} +2 -2
  78. package/dist/chunks/{drawer.WW7G9cSC.js.map → drawer.BuCNjIKQ.js.map} +1 -1
  79. package/dist/chunks/{dropdown-tag.BqSrkuwj.js → dropdown-tag.LIt7SdwS.js} +3 -3
  80. package/dist/chunks/{dropdown-tag.BqSrkuwj.js.map → dropdown-tag.LIt7SdwS.js.map} +1 -1
  81. package/dist/chunks/{dropdown.CIEm6MBB.js → dropdown.NTGSuWAw.js} +847 -822
  82. package/dist/chunks/dropdown.NTGSuWAw.js.map +1 -0
  83. package/dist/chunks/{field-label.CdVbAfK-.js → field-label.CkMM3cXO.js} +2 -2
  84. package/dist/chunks/{field-label.CdVbAfK-.js.map → field-label.CkMM3cXO.js.map} +1 -1
  85. package/dist/chunks/{file-uploader.DOvQMUHC.js → file-uploader.BLoJVqZQ.js} +3 -3
  86. package/dist/chunks/{file-uploader.DOvQMUHC.js.map → file-uploader.BLoJVqZQ.js.map} +1 -1
  87. package/dist/chunks/{filter-bar.DVRPM9tf.js → filter-bar.CftgpM7Z.js} +20 -20
  88. package/dist/chunks/filter-bar.CftgpM7Z.js.map +1 -0
  89. package/dist/chunks/{focus-trap.CBIb3SyN.js → focus-trap.CUZQ1kQD.js} +2 -2
  90. package/dist/chunks/{focus-trap.CBIb3SyN.js.map → focus-trap.CUZQ1kQD.js.map} +1 -1
  91. package/dist/chunks/{footer-actions.C1sXd7ti.js → footer-actions.C89dbDV4.js} +2 -2
  92. package/dist/chunks/{footer-actions.C1sXd7ti.js.map → footer-actions.C89dbDV4.js.map} +1 -1
  93. package/dist/chunks/generate-uid.NJ8tVoha.js.map +1 -1
  94. package/dist/chunks/{header-meta.D1eb37QJ.js → header-meta.Cpk3Z8c2.js} +56 -51
  95. package/dist/chunks/{header-meta.D1eb37QJ.js.map → header-meta.Cpk3Z8c2.js.map} +1 -1
  96. package/dist/chunks/{header-with-views.Bk6ly102.js → header-with-views.UmWf3dQd.js} +10 -10
  97. package/dist/chunks/{header-with-views.Bk6ly102.js.map → header-with-views.UmWf3dQd.js.map} +1 -1
  98. package/dist/chunks/{header.CszOmM16.js → header.BRBY9Ilh.js} +3 -3
  99. package/dist/chunks/{header.CszOmM16.js.map → header.BRBY9Ilh.js.map} +1 -1
  100. package/dist/chunks/{index.CJYgd0QI.js → index.BPUMyryR.js} +14 -14
  101. package/dist/chunks/{index.CJYgd0QI.js.map → index.BPUMyryR.js.map} +1 -1
  102. package/dist/chunks/{info-icon.9Nt7zg3D.js → info-icon.ZVQsMymB.js} +3 -3
  103. package/dist/chunks/{info-icon.9Nt7zg3D.js.map → info-icon.ZVQsMymB.js.map} +1 -1
  104. package/dist/chunks/{input-field-password.C4Wxsl16.js → input-field-password.bhLfqs6p.js} +5 -5
  105. package/dist/chunks/{input-field-password.C4Wxsl16.js.map → input-field-password.bhLfqs6p.js.map} +1 -1
  106. package/dist/chunks/{input-field-phone-number.BhYTU628.js → input-field-phone-number.cAROnxRW.js} +2 -2
  107. package/dist/chunks/{input-field-phone-number.BhYTU628.js.map → input-field-phone-number.cAROnxRW.js.map} +1 -1
  108. package/dist/chunks/{input-field.3tzX7t2y.js → input-field.BgVjWpiF.js} +3 -3
  109. package/dist/chunks/{input-field.3tzX7t2y.js.map → input-field.BgVjWpiF.js.map} +1 -1
  110. package/dist/chunks/{input-time.Bf-ZrCPX.js → input-time.C5qQ6S8d.js} +3 -3
  111. package/dist/chunks/{input-time.Bf-ZrCPX.js.map → input-time.C5qQ6S8d.js.map} +1 -1
  112. package/dist/chunks/{inspector.BY3SoX-l.js → inspector.8QKfd0HF.js} +3 -3
  113. package/dist/chunks/{inspector.BY3SoX-l.js.map → inspector.8QKfd0HF.js.map} +1 -1
  114. package/dist/chunks/{layout-row.BI9ZJa-9.js → layout-row.CTBhpBUq.js} +9 -9
  115. package/dist/chunks/{layout-row.BI9ZJa-9.js.map → layout-row.CTBhpBUq.js.map} +1 -1
  116. package/dist/chunks/list-item.BxQkbnLZ.js +193 -0
  117. package/dist/chunks/list-item.BxQkbnLZ.js.map +1 -0
  118. package/dist/chunks/{listbox-option-tag.Ddyl2vuc.js → listbox-option-tag.BFW39wpD.js} +2 -2
  119. package/dist/chunks/{listbox-option-tag.Ddyl2vuc.js.map → listbox-option-tag.BFW39wpD.js.map} +1 -1
  120. package/dist/chunks/{modal-fullscreen.Dg1Hi3jB.js → modal-fullscreen.CH2wwAtk.js} +4 -4
  121. package/dist/chunks/{modal-fullscreen.Dg1Hi3jB.js.map → modal-fullscreen.CH2wwAtk.js.map} +1 -1
  122. package/dist/chunks/{modal.DZTEFM_E.js → modal.e1Ym209E.js} +4 -4
  123. package/dist/chunks/{modal.DZTEFM_E.js.map → modal.e1Ym209E.js.map} +1 -1
  124. package/dist/chunks/{navigation-menu-group.Dv2_ZRRq.js → navigation-menu-group.E1Oam9-n.js} +3 -3
  125. package/dist/chunks/{navigation-menu-group.Dv2_ZRRq.js.map → navigation-menu-group.E1Oam9-n.js.map} +1 -1
  126. package/dist/chunks/{pagination.C6HIPq58.js → pagination.BzLKzijQ.js} +2 -2
  127. package/dist/chunks/{pagination.C6HIPq58.js.map → pagination.BzLKzijQ.js.map} +1 -1
  128. package/dist/chunks/popover.types.ZXsQ9bA6.js +6 -0
  129. package/dist/chunks/{popover.types.B9TXaqAt.js.map → popover.types.ZXsQ9bA6.js.map} +1 -1
  130. package/dist/chunks/{popper-container.CFYFCz6u.js → popper-container.dxpRn9a5.js} +2 -2
  131. package/dist/chunks/{popper-container.CFYFCz6u.js.map → popper-container.dxpRn9a5.js.map} +1 -1
  132. package/dist/chunks/{promo-banner.tljKS80K.js → promo-banner.BVBt9w4u.js} +2 -2
  133. package/dist/chunks/{promo-banner.tljKS80K.js.map → promo-banner.BVBt9w4u.js.map} +1 -1
  134. package/dist/chunks/{radio-group.cn4lZb8R.js → radio-group.D5fpHqkP.js} +3 -3
  135. package/dist/chunks/{radio-group.cn4lZb8R.js.map → radio-group.D5fpHqkP.js.map} +1 -1
  136. package/dist/chunks/{rich-text-editor.-B96ibAd.js → rich-text-editor.VWCBSRmM.js} +4 -4
  137. package/dist/chunks/{rich-text-editor.-B96ibAd.js.map → rich-text-editor.VWCBSRmM.js.map} +1 -1
  138. package/dist/chunks/{search-bar.DunTxVmZ.js → search-bar.Be3RlmLA.js} +3 -3
  139. package/dist/chunks/{search-bar.DunTxVmZ.js.map → search-bar.Be3RlmLA.js.map} +1 -1
  140. package/dist/chunks/{secondary-nav.CGGPkYpc.js → secondary-nav.Cy4ap53E.js} +4 -4
  141. package/dist/chunks/{secondary-nav.CGGPkYpc.js.map → secondary-nav.Cy4ap53E.js.map} +1 -1
  142. package/dist/chunks/{segmented-control.C0JtDa4q.js → segmented-control.BOyYIUEp.js} +2 -2
  143. package/dist/chunks/{segmented-control.C0JtDa4q.js.map → segmented-control.BOyYIUEp.js.map} +1 -1
  144. package/dist/chunks/{selection-card-group.ZZ_qF1L1.js → selection-card-group.lNZ8z318.js} +3 -3
  145. package/dist/chunks/{selection-card-group.ZZ_qF1L1.js.map → selection-card-group.lNZ8z318.js.map} +1 -1
  146. package/dist/chunks/{sidepanel.ChuW63J7.js → sidepanel.CN_u-b5X.js} +5 -5
  147. package/dist/chunks/{sidepanel.ChuW63J7.js.map → sidepanel.CN_u-b5X.js.map} +1 -1
  148. package/dist/chunks/{structured-list-item.DE0L0kvs.js → structured-list-item.CL1jhdTX.js} +4 -4
  149. package/dist/chunks/{structured-list-item.DE0L0kvs.js.map → structured-list-item.CL1jhdTX.js.map} +1 -1
  150. package/dist/chunks/{summary-grid.types.BnEhhDQz.js → summary-grid.types.Cjrwg4vd.js} +5 -5
  151. package/dist/chunks/{summary-grid.types.BnEhhDQz.js.map → summary-grid.types.Cjrwg4vd.js.map} +1 -1
  152. package/dist/chunks/{tab.QEKU5Udp.js → tab.B2qRfTqx.js} +2 -2
  153. package/dist/chunks/{tab.QEKU5Udp.js.map → tab.B2qRfTqx.js.map} +1 -1
  154. package/dist/chunks/{tag.CbNFG45Y.js → tag.XeZzHnx_.js} +2 -2
  155. package/dist/chunks/{tag.CbNFG45Y.js.map → tag.XeZzHnx_.js.map} +1 -1
  156. package/dist/chunks/{textarea.DJ7095b6.js → textarea.CbCrtcQ2.js} +2 -2
  157. package/dist/chunks/{textarea.DJ7095b6.js.map → textarea.CbCrtcQ2.js.map} +1 -1
  158. package/dist/chunks/{timeline-item.DzMh520x.js → timeline-item.BVOztUi9.js} +7 -7
  159. package/dist/chunks/{timeline-item.DzMh520x.js.map → timeline-item.BVOztUi9.js.map} +1 -1
  160. package/dist/chunks/{tooltip.CnkqMpOA.js → tooltip.CGeGVHyl.js} +3 -3
  161. package/dist/chunks/{tooltip.CnkqMpOA.js.map → tooltip.CGeGVHyl.js.map} +1 -1
  162. package/dist/chunks/{tutorial.CkeL_7Je.js → tutorial.WeP9PjhU.js} +4 -4
  163. package/dist/chunks/{tutorial.CkeL_7Je.js.map → tutorial.WeP9PjhU.js.map} +1 -1
  164. package/dist/chunks/{use-bento-delayed-hover.D4rfUUOr.js → use-bento-delayed-hover.CxJOLxok.js} +2 -2
  165. package/dist/chunks/{use-bento-delayed-hover.D4rfUUOr.js.map → use-bento-delayed-hover.CxJOLxok.js.map} +1 -1
  166. package/dist/chunks/{use-date-input-formatter.Dq9C0nc9.js → use-date-input-formatter.BMciZYTp.js} +2 -2
  167. package/dist/chunks/{use-date-input-formatter.Dq9C0nc9.js.map → use-date-input-formatter.BMciZYTp.js.map} +1 -1
  168. package/dist/code-snippet.js +1 -1
  169. package/dist/dashboard-template.js +1 -1
  170. package/dist/dashed-underline.js +1 -1
  171. package/dist/data-grid-template.js +1 -1
  172. package/dist/data-grid.js +1 -1
  173. package/dist/date-picker.js +2 -2
  174. package/dist/date-range-picker.js +2 -2
  175. package/dist/date-time-picker.js +1 -1
  176. package/dist/date.js +1 -1
  177. package/dist/draggable.js +4 -3
  178. package/dist/draggable.js.map +1 -1
  179. package/dist/drawer.js +1 -1
  180. package/dist/dropdown.js +2 -2
  181. package/dist/file-uploader.js +1 -1
  182. package/dist/filter-bar.js +1 -1
  183. package/dist/focus-trap.js +1 -1
  184. package/dist/header-with-views.js +1 -1
  185. package/dist/header.js +1 -1
  186. package/dist/index.js +264 -263
  187. package/dist/index.js.map +1 -1
  188. package/dist/info-icon.js +1 -1
  189. package/dist/input-field-password.js +1 -1
  190. package/dist/input-field-phone-number.js +1 -1
  191. package/dist/input-field.js +1 -1
  192. package/dist/input-time.js +1 -1
  193. package/dist/inspector.js +1 -1
  194. package/dist/internal.js +11 -11
  195. package/dist/layout.js +1 -1
  196. package/dist/list.js +1 -1
  197. package/dist/menu.js +1 -1
  198. package/dist/modal-fullscreen.js +1 -1
  199. package/dist/modal.js +2 -2
  200. package/dist/navigation-menu.js +1 -1
  201. package/dist/pagination.js +1 -1
  202. package/dist/popover.js +2 -2
  203. package/dist/popper-container.js +1 -1
  204. package/dist/promo-banner.js +1 -1
  205. package/dist/radio-group.js +1 -1
  206. package/dist/rich-text-editor.js +1 -1
  207. package/dist/search-bar.js +2 -2
  208. package/dist/secondary-nav.js +1 -1
  209. package/dist/segmented-control.js +1 -1
  210. package/dist/selection-card.js +1 -1
  211. package/dist/sidepanel.js +1 -1
  212. package/dist/structured-list.js +1 -1
  213. package/dist/summary-grid.js +1 -1
  214. package/dist/tabs.js +1 -1
  215. package/dist/tag.js +1 -1
  216. package/dist/textarea.js +1 -1
  217. package/dist/timeline.js +1 -1
  218. package/dist/tutorial.js +1 -1
  219. package/dist/web-types.json +61 -1
  220. package/package.json +8 -8
  221. package/dist/chunks/calendar.BckAv9N_.js.map +0 -1
  222. package/dist/chunks/date.B0m0sFP6.js.map +0 -1
  223. package/dist/chunks/draggable-handle.DwJBaf5y.js +0 -1747
  224. package/dist/chunks/draggable-handle.DwJBaf5y.js.map +0 -1
  225. package/dist/chunks/dropdown.CIEm6MBB.js.map +0 -1
  226. package/dist/chunks/filter-bar.DVRPM9tf.js.map +0 -1
  227. package/dist/chunks/list-item.D2ZLiS_D.js +0 -76
  228. package/dist/chunks/list-item.D2ZLiS_D.js.map +0 -1
  229. package/dist/chunks/popover.types.B9TXaqAt.js +0 -6
@@ -1 +1 @@
1
- {"version":3,"file":"structured-list-item.DE0L0kvs.js","sources":["../../src/components/structured-list/structured-list.keys.ts","../../src/components/structured-list/structured-list.types.ts","../../src/components/structured-list/structured-list.vue","../../src/components/structured-list/components/structered-list-item/structured-list-item.vue"],"sourcesContent":["export const STRUCTURED_LIST_CONDENSED_INJECTION_KEY = Symbol('structured list condensed style injection key');\nexport const STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY = Symbol('structured list labels width injection key');\n","export type BentoStructuredListLayoutOptions = '25-75' | '33-66' | '42-58' | '50-50' | '75-25' | '66-33' | '58-42';\nexport const BentoStructuredListLayoutOptions = ['25-75', '33-66', '42-58', '50-50', '75-25', '66-33', '58-42'];\n","<template>\n <dl class=\"b-structured-list\">\n <slot />\n </dl>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide } from 'vue';\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '@/components/structured-list/structured-list.keys';\n import { BentoStructuredListLayoutOptions } from './structured-list.types';\n\n const props = defineProps({\n labelsWidth: { default: null },\n layout: { default: '33-66' }\n});\n\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n\n const computedLayout = computed(() =>\n BentoStructuredListLayoutOptions.includes(props.layout) ? props.layout : '33-66'\n );\n\n const computedLabelsWidth = computed(() => {\n if (isCondensed) {\n return '130px';\n }\n\n if (props.labelsWidth) {\n return `${props.labelsWidth}px`;\n }\n\n return `${computedLayout.value.split('-')[0]}%`;\n });\n\n provide(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, computedLabelsWidth);\n</script>\n\n<script lang=\"ts\">\n /**\n * This is a list used to display pairs of information in a clear and organized manner.\n * `BentoStructureListItem` should be used to pass the label/value pairs to the list.\n *\n * @example\n * import { BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredList, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Payment\">\n * <bento-payment-method label=\"Klarna\" type=\"Klarna\" />\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\">\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\" :value=\"123456\" />\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list.scss\" />\n","<template>\n <div class=\"b-structured-list-item\" :class=\"conditionalClasses\">\n <dt class=\"b-structured-list-item__label\" :style=\"computedLabelStyle\">\n <bento-typography :variant=\"labelTypographyVariant\">{{ label }}</bento-typography>\n <bento-info-icon v-if=\"labelInfo\" class=\"b-structured-list-item__icon\" :tooltip-text=\"labelInfo\" />\n </dt>\n <dd class=\"b-structured-list-item__value\" :class=\"valueConditionalClasses\">\n <slot />\n <copy v-if=\"copy\" class=\"b-structured-list-item__icon\" :text=\"copy\" @click=\"emitCopy\" />\n <bento-button\n v-if=\"search\"\n v-bento-tooltip-directive:top=\"searchTooltip ? searchTooltip : t('search')\"\n class=\"b-structured-list-item__icon\"\n variant=\"tertiary\"\n @click=\"search\"\n >\n <template #iconLeft>\n <search-icon :svg-title=\"t('search')\" />\n </template>\n </bento-button>\n </dd>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, type Ref } from 'vue';\n\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography } from '@/components/typography';\n import Copy from '@/components/internal/copy/copy.vue';\n import SearchIcon from '@adyen/ui-assets-icons-16/vue/search';\n\n // Utils\n import { useI18n } from '@/utils/ts/i18n';\n\n // Directives\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives';\n\n // Keys\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '../../structured-list.keys';\n\n import messages from '../../messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const DEFAULT_LABELS_WIDTH = '33%';\n\n const props = defineProps({\n label: null,\n labelInfo: null,\n copy: null,\n search: { type: Function },\n searchTooltip: null,\n truncate: { type: Boolean }\n});\n\n const emit = defineEmits([\"copy\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n const labelsWidth = inject<Ref<string>>(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, ref(DEFAULT_LABELS_WIDTH));\n const computedLabelStyle = computed(() => `flex-basis:${labelsWidth.value}`);\n const conditionalClasses = computed(() => ({\n 'b-structured-list-item--condensed': isCondensed,\n }));\n\n const valueConditionalClasses = computed(() => ({\n 'b-structured-list-item__value--truncate': props.truncate,\n }));\n\n const emitCopy = () => {\n emit('copy', props.copy);\n };\n\n const labelTypographyVariant = computed(() => (isCondensed ? 'caption' : 'body'));\n</script>\n\n<script lang=\"ts\">\n /**\n * This is an item of the `BentoStructuredList` meant to be used only with that component.\n * It consists of a label/value pair, and also the optional copy and search modifiers.\n *\n * @example\n * import { BentoCurrencyISOCode, BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredListItem, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Shopper\" search='searchShopper' search-tooltip='Find shopper'>\n * <bento-typography>\n * 143442642\n * </bento-status>\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\" copy='123456'>\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\" :value=\"123456\" />\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list-item.scss\" />\n"],"names":["STRUCTURED_LIST_CONDENSED_INJECTION_KEY","STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY","BentoStructuredListLayoutOptions","__default__$1","isCondensed","inject","computedLayout","computed","props","computedLabelsWidth","provide","__default__","messages","DEFAULT_LABELS_WIDTH","t","useI18n","labelsWidth","ref","computedLabelStyle","conditionalClasses","valueConditionalClasses","emitCopy","emit","labelTypographyVariant"],"mappings":";;;;;;;;;;AAAO,MAAAA,IAAA,uBAAA,+CAAA,GACAC,IAAA,uBAAA,4CAAA,GCAAC,IAAA,CAAA,SAAA,SAAA,SAAA,SAAA,SAAA,SAAA,OAAA,GC6DHC,IAAA,CAAA;;;;;;;;iBA3CAC,IAAAC,EAAAL,GAAA,EAAA,GAEAM,IAAAC;AAAA,MAAuB,MAAAL,EAAA,SAAAM,EAAA,MAAA,IAAAA,EAAA,SAAA;AAAA,IACsD,GAG7EC,IAAAF,EAAA,MACIH,IACI,UAGJI,EAAA,cACI,GAAAA,EAAA,WAAA,OAGJ,GAAAF,EAAA,MAAA,MAAA,GAAA,EAAA,CAAA,CAAA,GAA4C;AAGhD,WAAAI,EAAAT,GAAAQ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCqEAE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;iBA1DAC,IAAA,OAaA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAX,IAAAC,EAAAL,GAAA,EAAA,GACAgB,IAAAX,EAAAJ,GAAAgB,EAAAJ,CAAA,CAAA,GACAK,IAAAX,EAAA,MAAA,cAAAS,EAAA,KAAA,EAAA,GACAG,IAAAZ,EAAA,OAAA;AAAA,MAA2C,qCAAAH;AAAA,IACF,EAAA,GAGzCgB,IAAAb,EAAA,OAAA;AAAA,MAAgD,2CAAAC,EAAA;AAAA,IACK,EAAA,GAGrDa,IAAA,MAAA;AACI,MAAAC,EAAA,QAAAd,EAAA,IAAA;AAAA,IAAuB,GAG3Be,IAAAhB,EAAA,MAAAH,IAAA,YAAA,MAAA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"structured-list-item.CL1jhdTX.js","sources":["../../src/components/structured-list/structured-list.keys.ts","../../src/components/structured-list/structured-list.types.ts","../../src/components/structured-list/structured-list.vue","../../src/components/structured-list/components/structered-list-item/structured-list-item.vue"],"sourcesContent":["export const STRUCTURED_LIST_CONDENSED_INJECTION_KEY = Symbol('structured list condensed style injection key');\nexport const STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY = Symbol('structured list labels width injection key');\n","export type BentoStructuredListLayoutOptions = '25-75' | '33-66' | '42-58' | '50-50' | '75-25' | '66-33' | '58-42';\nexport const BentoStructuredListLayoutOptions = ['25-75', '33-66', '42-58', '50-50', '75-25', '66-33', '58-42'];\n","<template>\n <dl class=\"b-structured-list\">\n <slot />\n </dl>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide } from 'vue';\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '@/components/structured-list/structured-list.keys';\n import { BentoStructuredListLayoutOptions } from './structured-list.types';\n\n const props = defineProps({\n labelsWidth: { default: null },\n layout: { default: '33-66' }\n});\n\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n\n const computedLayout = computed(() =>\n BentoStructuredListLayoutOptions.includes(props.layout) ? props.layout : '33-66'\n );\n\n const computedLabelsWidth = computed(() => {\n if (isCondensed) {\n return '130px';\n }\n\n if (props.labelsWidth) {\n return `${props.labelsWidth}px`;\n }\n\n return `${computedLayout.value.split('-')[0]}%`;\n });\n\n provide(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, computedLabelsWidth);\n</script>\n\n<script lang=\"ts\">\n /**\n * This is a list used to display pairs of information in a clear and organized manner.\n * `BentoStructureListItem` should be used to pass the label/value pairs to the list.\n *\n * @example\n * import { BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredList, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Payment\">\n * <bento-payment-method label=\"Klarna\" type=\"Klarna\" />\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\">\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\" :value=\"123456\" />\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list.scss\" />\n","<template>\n <div class=\"b-structured-list-item\" :class=\"conditionalClasses\">\n <dt class=\"b-structured-list-item__label\" :style=\"computedLabelStyle\">\n <bento-typography :variant=\"labelTypographyVariant\">{{ label }}</bento-typography>\n <bento-info-icon v-if=\"labelInfo\" class=\"b-structured-list-item__icon\" :tooltip-text=\"labelInfo\" />\n </dt>\n <dd class=\"b-structured-list-item__value\" :class=\"valueConditionalClasses\">\n <slot />\n <copy v-if=\"copy\" class=\"b-structured-list-item__icon\" :text=\"copy\" @click=\"emitCopy\" />\n <bento-button\n v-if=\"search\"\n v-bento-tooltip-directive:top=\"searchTooltip ? searchTooltip : t('search')\"\n class=\"b-structured-list-item__icon\"\n variant=\"tertiary\"\n @click=\"search\"\n >\n <template #iconLeft>\n <search-icon :svg-title=\"t('search')\" />\n </template>\n </bento-button>\n </dd>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, type Ref } from 'vue';\n\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography } from '@/components/typography';\n import Copy from '@/components/internal/copy/copy.vue';\n import SearchIcon from '@adyen/ui-assets-icons-16/vue/search';\n\n // Utils\n import { useI18n } from '@/utils/ts/i18n';\n\n // Directives\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives';\n\n // Keys\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '../../structured-list.keys';\n\n import messages from '../../messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const DEFAULT_LABELS_WIDTH = '33%';\n\n const props = defineProps({\n label: null,\n labelInfo: null,\n copy: null,\n search: { type: Function },\n searchTooltip: null,\n truncate: { type: Boolean }\n});\n\n const emit = defineEmits([\"copy\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n const labelsWidth = inject<Ref<string>>(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, ref(DEFAULT_LABELS_WIDTH));\n const computedLabelStyle = computed(() => `flex-basis:${labelsWidth.value}`);\n const conditionalClasses = computed(() => ({\n 'b-structured-list-item--condensed': isCondensed,\n }));\n\n const valueConditionalClasses = computed(() => ({\n 'b-structured-list-item__value--truncate': props.truncate,\n }));\n\n const emitCopy = () => {\n emit('copy', props.copy);\n };\n\n const labelTypographyVariant = computed(() => (isCondensed ? 'caption' : 'body'));\n</script>\n\n<script lang=\"ts\">\n /**\n * This is an item of the `BentoStructuredList` meant to be used only with that component.\n * It consists of a label/value pair, and also the optional copy and search modifiers.\n *\n * @example\n * import { BentoCurrencyISOCode, BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredListItem, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Shopper\" search='searchShopper' search-tooltip='Find shopper'>\n * <bento-typography>\n * 143442642\n * </bento-status>\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\" copy='123456'>\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\" :value=\"123456\" />\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list-item.scss\" />\n"],"names":["STRUCTURED_LIST_CONDENSED_INJECTION_KEY","STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY","BentoStructuredListLayoutOptions","__default__$1","isCondensed","inject","computedLayout","computed","props","computedLabelsWidth","provide","__default__","messages","DEFAULT_LABELS_WIDTH","t","useI18n","labelsWidth","ref","computedLabelStyle","conditionalClasses","valueConditionalClasses","emitCopy","emit","labelTypographyVariant"],"mappings":";;;;;;;;;;AAAO,MAAAA,IAAA,uBAAA,+CAAA,GACAC,IAAA,uBAAA,4CAAA,GCAAC,IAAA,CAAA,SAAA,SAAA,SAAA,SAAA,SAAA,SAAA,OAAA,GC6DHC,IAAA,CAAA;;;;;;;;iBA3CAC,IAAAC,EAAAL,GAAA,EAAA,GAEAM,IAAAC;AAAA,MAAuB,MAAAL,EAAA,SAAAM,EAAA,MAAA,IAAAA,EAAA,SAAA;AAAA,IACsD,GAG7EC,IAAAF,EAAA,MACIH,IACI,UAGJI,EAAA,cACI,GAAAA,EAAA,WAAA,OAGJ,GAAAF,EAAA,MAAA,MAAA,GAAA,EAAA,CAAA,CAAA,GAA4C;AAGhD,WAAAI,EAAAT,GAAAQ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCqEAE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;iBA1DAC,IAAA,OAaA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAX,IAAAC,EAAAL,GAAA,EAAA,GACAgB,IAAAX,EAAAJ,GAAAgB,EAAAJ,CAAA,CAAA,GACAK,IAAAX,EAAA,MAAA,cAAAS,EAAA,KAAA,EAAA,GACAG,IAAAZ,EAAA,OAAA;AAAA,MAA2C,qCAAAH;AAAA,IACF,EAAA,GAGzCgB,IAAAb,EAAA,OAAA;AAAA,MAAgD,2CAAAC,EAAA;AAAA,IACK,EAAA,GAGrDa,IAAA,MAAA;AACI,MAAAC,EAAA,QAAAd,EAAA,IAAA;AAAA,IAAuB,GAG3Be,IAAAhB,EAAA,MAAAH,IAAA,YAAA,MAAA;;;;;;;;;;;;;;;;;;"}
@@ -5,10 +5,10 @@ import { G as R } from "./grid-layout.1aIiz2N_.js";
5
5
  import { n as f } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
6
6
  import { B as g } from "./typography.C8lPlsbD.js";
7
7
  import { u as G } from "./index.B6WW_F-J.js";
8
- import { B as w } from "./dashed-underline.CfEmbgOv.js";
9
- import { B as L } from "./info-icon.9Nt7zg3D.js";
10
- import { B as E } from "./tag.CbNFG45Y.js";
11
- import { C as N } from "./copy.DVB6pQC8.js";
8
+ import { B as w } from "./dashed-underline.BoHt4iGu.js";
9
+ import { B as L } from "./info-icon.ZVQsMymB.js";
10
+ import { B as E } from "./tag.XeZzHnx_.js";
11
+ import { C as N } from "./copy.CWKdfVcd.js";
12
12
  import "../assets/summary-grid.css";
13
13
  const A = {}, F = /* @__PURE__ */ d({
14
14
  ...A,
@@ -334,4 +334,4 @@ export {
334
334
  ge as f,
335
335
  Re as s
336
336
  };
337
- //# sourceMappingURL=summary-grid.types.BnEhhDQz.js.map
337
+ //# sourceMappingURL=summary-grid.types.Cjrwg4vd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"summary-grid.types.BnEhhDQz.js","sources":["../../src/components/summary-grid/summary-grid.vue","../../src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue","../../src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue","../../src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue","../../src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue","../../src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue","../../src/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue","../../src/components/summary-grid/summary-grid.types.ts"],"sourcesContent":["<template>\n <div class=\"b-summary-grid\">\n <grid-layout\n v-for=\"index in numberOfRows\"\n :key=\"`summary-grid-row-${index}`\"\n :data-testid=\"`summary-grid-row-${index}`\"\n :column-width=\"columnWidth?.[`row${index}`]\"\n >\n <template v-if=\"hasSlot(`cell-${index}-1`)\" #col-1>\n <slot :name=\"`cell-${index}-1`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-2`)\" #col-2>\n <slot :name=\"`cell-${index}-2`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-3`)\" #col-3>\n <slot :name=\"`cell-${index}-3`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-4`)\" #col-4>\n <slot :name=\"`cell-${index}-4`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-5`)\" #col-5>\n <slot :name=\"`cell-${index}-5`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-6`)\" #col-6>\n <slot :name=\"`cell-${index}-6`\" />\n </template>\n </grid-layout>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { onMounted, provide, toRef, useSlots } from 'vue';\n import type { BentoSummaryGridLayout, BentoSummaryGridProps } from './summary-grid.types';\n import { GridLayout } from '@/components/internal/grid-layout';\n import { useHasSlot } from '@/composables';\n import {\n SUMMARY_GRID_LAYOUT_INJECTION_KEY,\n SUMMARY_GRID_SLASHED_ZERO,\n } from '@/components/summary-grid/summary-grid.keys';\n\n const props = defineProps({\n columnWidth: { default: null },\n slashedZero: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n let numberOfRows = 1;\n if (slots) {\n const slotRows = Object.keys(slots)\n ?.filter(slotName => slotName.includes('cell-'))\n ?.map(slotName => parseInt(slotName.split('-')?.[1], 10));\n numberOfRows = Math.max(...slotRows);\n }\n\n onMounted(() => {\n if (numberOfRows > 3) {\n throw new Error(\n 'BentoSummaryGrid must only have a maximum of 3 rows. Read the documentation for more information.'\n );\n }\n });\n\n const registerComponentsInSummaryGrid: BentoSummaryGridLayout = () => {\n const isSummaryGridLayout = true;\n return { isSummaryGridLayout };\n };\n\n provide(SUMMARY_GRID_LAYOUT_INJECTION_KEY, registerComponentsInSummaryGrid);\n provide(SUMMARY_GRID_SLASHED_ZERO, toRef(props, 'slashedZero'));\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary grid component that displays a collection items.\n *\n * @example\n * import { BentoSummaryGrid, BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGrid, BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid>\n * <template #cell-2-2>\n * <bento-summary-grid-item-amount\n * title=\"Text Item\"\n * label=\"14\"\n * info-icon-tooltip-text=\"text for icon\"\n * copy=\"copy this to clipboard\"\n * />\n * </template>\n * </bento-summary-grid>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid.scss\" />\n","<template>\n <div class=\"b-summary-grid-item\" :class=\"conditionalClasses\" :style=\"computedStyles\">\n <div class=\"b-summary-grid-item__header\">\n <bento-typography class=\"b-summary-grid-item__title\" el=\"span\" variant=\"body\">\n <bento-dashed-underline\n v-if=\"withUnderline\"\n :tooltip-text=\"underlineTooltipText\"\n :popover-size=\"underlinePopoverSize\"\n >\n {{ title }}\n <template v-if=\"hasSlot('dashed-underline')\" #popover-content>\n <slot name=\"dashed-underline\"></slot>\n </template>\n </bento-dashed-underline>\n <template v-else>\n {{ title }}\n </template>\n </bento-typography>\n <div class=\"b-summary-grid-item__title-icons\">\n <copy v-if=\"copy\" class=\"b-structured-list__icon\" :text=\"copy\" @click=\"$emit('copy-click', $event)\" />\n\n <bento-info-icon\n v-if=\"infoIconTooltipText\"\n :tooltip-text=\"infoIconTooltipText\"\n tooltip-position=\"top\"\n class=\"b-summary-grid-item__title-tooltip\"\n @mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n />\n </div>\n </div>\n <bento-typography\n data-testid=\"summary-grid-item-content-typography\"\n class=\"b-summary-grid-item__title\"\n v-bind=\"typographyProps\"\n el=\"span\"\n >\n <slot />\n <bento-tag\n v-if=\"trend && itemType !== 'text'\"\n :variant=\"trendVariant\"\n :label=\"trend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('secondary')\"\n class=\"b-summary-grid-item__title\"\n data-testid=\"summary-grid-item-secondary-metric-typography\"\n el=\"span\"\n variant=\"caption\"\n stronger\n >\n <slot name=\"secondary\" />\n <bento-tag\n v-if=\"secondaryTrend\"\n :variant=\"secondaryTrendVariant\"\n :label=\"secondaryTrend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, toRefs, useSlots } from 'vue';\n\n // Components\n import { BentoDashedUnderline } from '@/components/dashed-underline';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography, type BentoTypographyVariant } from '@/components/typography';\n import { BentoTag, type BentoTagVariant } from '@/components/tag';\n import { Copy } from '@/internal';\n\n // Utils\n import { useHasSlot } from '@/composables';\n\n // Types\n import { SUMMARY_GRID_SLASHED_ZERO } from '@/components/summary-grid/summary-grid.keys';\n import type { BentoSummaryGridItemTrendDirection } from '@/components/summary-grid/summary-grid.types';\n import type { BentoSummaryGridItemProps } from './summary-grid-item.types';\n\n defineEmits([\"copy-click\", \"info-icon-mouseenter\"]);\n\n const props = defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null },\n itemType: { default: 'custom' }\n});\n\n const { trendDirection, secondaryTrendDirection, itemType, size } = toRefs(props);\n const hasSlashedZero = inject(SUMMARY_GRID_SLASHED_ZERO, ref(false));\n\n const tagVariantColor = (direction: `${BentoSummaryGridItemTrendDirection}`): `${BentoTagVariant}` => {\n switch (direction) {\n case 'positive':\n return 'green';\n case 'negative':\n return 'red';\n default:\n return 'blue';\n }\n };\n\n // TODO implement plus or minus symbol logic\n const trendVariant = computed(() => tagVariantColor(trendDirection.value));\n const secondaryTrendVariant = computed(() => tagVariantColor(secondaryTrendDirection.value));\n\n const typographyContentElement = computed<`${BentoTypographyVariant}`>(() => {\n if (size.value === 'small') {\n return 'body';\n }\n if (itemType.value !== 'text') {\n return 'title';\n }\n\n return null;\n });\n\n const typographyProps = computed(() => ({\n medium: size.value === 'large',\n strongest: size.value === 'small',\n wide: size.value === 'small',\n variant: typographyContentElement.value,\n }));\n\n const computedStyles = computed(() => (props.fitContent ? { width: 'fit-content' } : {}));\n\n const conditionalClasses = computed(() => ({ 'b-summary-grid-item--slashed-zero': hasSlashedZero.value }));\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const withUnderline = computed(() => props.underlineTooltipText || hasSlot('dashed-underline'));\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"amount\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-amount\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n <div class=\"b-summary-grid-item-amount__content\">\n <div>{{ label }}</div>\n <bento-typography\n v-if=\"secondaryLabel\"\n variant=\"caption\"\n class=\"b-summary-grid-item-amount__secondary-label\"\n >{{ secondaryLabel }}</bento-typography\n >\n </div>\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemAmountProps } from './summary-grid-item-amount.types';\n\n defineEmits([\"copy-click\", \"info-icon-mouseenter\"]);\n\n defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null },\n label: null,\n secondaryLabel: { default: null },\n secondaryMetric: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display financial data, such as currency values and monetary amounts\n *\n * @example\n * import { BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid-item-amount\n * title=\"Your title\"\n * label=\"200.00 EUR\"\n * secondary-label=\"/ day\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item-amount.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"numeric\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-numeric\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemNumericProps } from './summary-grid-item-numeric.types';\n\n defineEmits([\"copy-click\", \"info-icon-mouseenter\"]);\n\n defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null },\n label: null,\n secondaryMetric: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display any numeric information\n *\n * @example\n * import { BentoSummaryGridItemNumeric } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemNumeric },\n * template: `\n * <bento-summary-grid-item-numeric\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n item-type=\"percentage\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-percentage\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ computedLabelPercentage }}\n <template v-if=\"secondaryMetric\" #secondary> {{ computedSecondaryMetricPercentage }} </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import type { BentoSummaryGridItemPercentageProps } from './summary-grid-item-percentage.types';\n import type { NumberFormatOptions } from 'vue-i18n';\n\n const { locale } = useI18n();\n\n defineEmits([\"copy-click\", \"info-icon-mouseenter\"]);\n\n const props = defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null },\n label: null,\n secondaryMetric: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const percentageArgs: NumberFormatOptions = {\n style: 'percent',\n maximumFractionDigits: 2,\n };\n\n const isNumeric = (value: string | number) => value != null && value !== '' && !isNaN(Number(value));\n const convertToPercentIfNumber = (value: string | number) => {\n if (value && isNumeric(value)) {\n return new Intl.NumberFormat(locale.value, percentageArgs).format(Number(value) / 100);\n }\n return value;\n };\n\n const computedLabelPercentage = computed(() => convertToPercentIfNumber(props.label));\n const computedSecondaryMetricPercentage = computed(() => convertToPercentIfNumber(props.secondaryMetric));\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display any percentage information\n *\n * @example\n * import { BentoSummaryGridItemPercentage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemPercentage },\n * template: `\n * <bento-summary-grid-item-percentage\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {\n i18n: {},\n };\n</script>\n","<template>\n <summary-grid-item\n item-type=\"text\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-text\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n\n import type { BentoSummaryGridItemTextProps } from './summary-grid-item-text.types';\n\n defineEmits([\"copy-click\", \"info-icon-mouseenter\"]);\n\n defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n label: null,\n title: null,\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display text only. Can be used for references, IDs or any other text data.\n *\n * @example\n * import { BentoSummaryGridItemText } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemText },\n * template: `\n * <bento-summary-grid-item-text\n * title=\"Your title\"\n * label=\"Your text here\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n :title=\"title\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n <slot />\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemCustomProps } from './summary-grid-item-custom.types';\n\n defineEmits([\"copy-click\", \"info-icon-mouseenter\"]);\n\n defineProps({\n copy: { default: undefined },\n infoIconTooltipText: { default: null },\n title: null,\n fitContent: { type: Boolean, default: false },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default {};\n</script>\n","import { type GridLayoutColumnWidths } from '@/components/internal/grid-layout/grid-layout.types';\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoSummaryGridItemSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoSummaryGridItemTrendDirection {\n POSITIVE = 'positive',\n NEGATIVE = 'negative',\n NEUTRAL = 'neutral',\n}\n\nexport interface BentoSummaryGridColumnWidth {\n row1: GridLayoutColumnWidths;\n row2?: GridLayoutColumnWidths;\n row3?: GridLayoutColumnWidths;\n}\n\nexport type BentoSummaryGridLayout = () => {\n isSummaryGridLayout: boolean;\n};\n\nexport interface BentoSummaryGridProps {\n /**\n * Sets the responsive columns widths values for 1 of the 3 rows.\n */\n columnWidth?: BentoSummaryGridColumnWidth;\n\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero?: boolean;\n}\n"],"names":["__default__$6","slots","useSlots","hasSlot","useHasSlot","numberOfRows","slotRows","_b","_a","slotName","onMounted","registerComponentsInSummaryGrid","provide","SUMMARY_GRID_LAYOUT_INJECTION_KEY","SUMMARY_GRID_SLASHED_ZERO","toRef","props","__default__$5","trendDirection","secondaryTrendDirection","itemType","size","toRefs","hasSlashedZero","inject","ref","tagVariantColor","direction","trendVariant","computed","secondaryTrendVariant","typographyContentElement","typographyProps","computedStyles","conditionalClasses","withUnderline","__default__$4","__default__$3","__default__$2","locale","useI18n","percentageArgs","isNumeric","value","convertToPercentIfNumber","computedLabelPercentage","computedSecondaryMetricPercentage","__default__$1","__default__","BentoSummaryGridItemSize","BentoSummaryGridItemSize2","BentoSummaryGridItemTrendDirection","BentoSummaryGridItemTrendDirection2"],"mappings":";;;;;;;;;;;;AAgGI,MAAAA,IAAA,CAAA;;;;;;;;;iBAnDAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA;AAEA,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;;;;;;;;;;;;;;uBCeA+C,KAAA,CAAA;;;;;;;;;;;;;AApBA,UAAA/C,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA;;;;;;;;;;;;;;;;;;;;;;AC/BG,IAAAgD,KAAA,kBAAAC,OACHA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SAHQA,IAAAD,MAAA,CAAA,CAAA,GASLE,KAAA,kBAAAC,OACHA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,UAAA,WAHQA,IAAAD,MAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"summary-grid.types.Cjrwg4vd.js","sources":["../../src/components/summary-grid/summary-grid.vue","../../src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue","../../src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue","../../src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue","../../src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue","../../src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue","../../src/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue","../../src/components/summary-grid/summary-grid.types.ts"],"sourcesContent":["<template>\n <div class=\"b-summary-grid\">\n <grid-layout\n v-for=\"index in numberOfRows\"\n :key=\"`summary-grid-row-${index}`\"\n :data-testid=\"`summary-grid-row-${index}`\"\n :column-width=\"columnWidth?.[`row${index}`]\"\n >\n <template v-if=\"hasSlot(`cell-${index}-1`)\" #col-1>\n <slot :name=\"`cell-${index}-1`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-2`)\" #col-2>\n <slot :name=\"`cell-${index}-2`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-3`)\" #col-3>\n <slot :name=\"`cell-${index}-3`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-4`)\" #col-4>\n <slot :name=\"`cell-${index}-4`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-5`)\" #col-5>\n <slot :name=\"`cell-${index}-5`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-6`)\" #col-6>\n <slot :name=\"`cell-${index}-6`\" />\n </template>\n </grid-layout>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { onMounted, provide, toRef, useSlots } from 'vue';\n import type { BentoSummaryGridLayout, BentoSummaryGridProps } from './summary-grid.types';\n import { GridLayout } from '@/components/internal/grid-layout';\n import { useHasSlot } from '@/composables';\n import {\n SUMMARY_GRID_LAYOUT_INJECTION_KEY,\n SUMMARY_GRID_SLASHED_ZERO,\n } from '@/components/summary-grid/summary-grid.keys';\n\n const props = defineProps({\n columnWidth: { default: null },\n slashedZero: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n let numberOfRows = 1;\n if (slots) {\n const slotRows = Object.keys(slots)\n ?.filter(slotName => slotName.includes('cell-'))\n ?.map(slotName => parseInt(slotName.split('-')?.[1], 10));\n numberOfRows = Math.max(...slotRows);\n }\n\n onMounted(() => {\n if (numberOfRows > 3) {\n throw new Error(\n 'BentoSummaryGrid must only have a maximum of 3 rows. Read the documentation for more information.'\n );\n }\n });\n\n const registerComponentsInSummaryGrid: BentoSummaryGridLayout = () => {\n const isSummaryGridLayout = true;\n return { isSummaryGridLayout };\n };\n\n provide(SUMMARY_GRID_LAYOUT_INJECTION_KEY, registerComponentsInSummaryGrid);\n provide(SUMMARY_GRID_SLASHED_ZERO, toRef(props, 'slashedZero'));\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary grid component that displays a collection items.\n *\n * @example\n * import { BentoSummaryGrid, BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGrid, BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid>\n * <template #cell-2-2>\n * <bento-summary-grid-item-amount\n * title=\"Text Item\"\n * label=\"14\"\n * info-icon-tooltip-text=\"text for icon\"\n * copy=\"copy this to clipboard\"\n * />\n * </template>\n * </bento-summary-grid>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid.scss\" />\n","<template>\n <div class=\"b-summary-grid-item\" :class=\"conditionalClasses\" :style=\"computedStyles\">\n <div class=\"b-summary-grid-item__header\">\n <bento-typography class=\"b-summary-grid-item__title\" el=\"span\" variant=\"body\">\n <bento-dashed-underline\n v-if=\"withUnderline\"\n :tooltip-text=\"underlineTooltipText\"\n :popover-size=\"underlinePopoverSize\"\n >\n {{ title }}\n <template v-if=\"hasSlot('dashed-underline')\" #popover-content>\n <slot name=\"dashed-underline\"></slot>\n </template>\n </bento-dashed-underline>\n <template v-else>\n {{ title }}\n </template>\n </bento-typography>\n <div class=\"b-summary-grid-item__title-icons\">\n <copy v-if=\"copy\" class=\"b-structured-list__icon\" :text=\"copy\" @click=\"$emit('copy-click', $event)\" />\n\n <bento-info-icon\n v-if=\"infoIconTooltipText\"\n :tooltip-text=\"infoIconTooltipText\"\n tooltip-position=\"top\"\n class=\"b-summary-grid-item__title-tooltip\"\n @mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n />\n </div>\n </div>\n <bento-typography\n data-testid=\"summary-grid-item-content-typography\"\n class=\"b-summary-grid-item__title\"\n v-bind=\"typographyProps\"\n el=\"span\"\n >\n <slot />\n <bento-tag\n v-if=\"trend && itemType !== 'text'\"\n :variant=\"trendVariant\"\n :label=\"trend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('secondary')\"\n class=\"b-summary-grid-item__title\"\n data-testid=\"summary-grid-item-secondary-metric-typography\"\n el=\"span\"\n variant=\"caption\"\n stronger\n >\n <slot name=\"secondary\" />\n <bento-tag\n v-if=\"secondaryTrend\"\n :variant=\"secondaryTrendVariant\"\n :label=\"secondaryTrend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, toRefs, useSlots } from 'vue';\n\n // Components\n import { BentoDashedUnderline } from '@/components/dashed-underline';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography, type BentoTypographyVariant } from '@/components/typography';\n import { BentoTag, type BentoTagVariant } from '@/components/tag';\n import { Copy } from '@/internal';\n\n // Utils\n import { useHasSlot } from '@/composables';\n\n // Types\n import { SUMMARY_GRID_SLASHED_ZERO } from '@/components/summary-grid/summary-grid.keys';\n import type { BentoSummaryGridItemTrendDirection } from '@/components/summary-grid/summary-grid.types';\n import type { BentoSummaryGridItemProps } from './summary-grid-item.types';\n\n defineEmits([\"copy-click\", \"info-icon-mouseenter\"]);\n\n const props = defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null },\n itemType: { default: 'custom' }\n});\n\n const { trendDirection, secondaryTrendDirection, itemType, size } = toRefs(props);\n const hasSlashedZero = inject(SUMMARY_GRID_SLASHED_ZERO, ref(false));\n\n const tagVariantColor = (direction: `${BentoSummaryGridItemTrendDirection}`): `${BentoTagVariant}` => {\n switch (direction) {\n case 'positive':\n return 'green';\n case 'negative':\n return 'red';\n default:\n return 'blue';\n }\n };\n\n // TODO implement plus or minus symbol logic\n const trendVariant = computed(() => tagVariantColor(trendDirection.value));\n const secondaryTrendVariant = computed(() => tagVariantColor(secondaryTrendDirection.value));\n\n const typographyContentElement = computed<`${BentoTypographyVariant}`>(() => {\n if (size.value === 'small') {\n return 'body';\n }\n if (itemType.value !== 'text') {\n return 'title';\n }\n\n return null;\n });\n\n const typographyProps = computed(() => ({\n medium: size.value === 'large',\n strongest: size.value === 'small',\n wide: size.value === 'small',\n variant: typographyContentElement.value,\n }));\n\n const computedStyles = computed(() => (props.fitContent ? { width: 'fit-content' } : {}));\n\n const conditionalClasses = computed(() => ({ 'b-summary-grid-item--slashed-zero': hasSlashedZero.value }));\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const withUnderline = computed(() => props.underlineTooltipText || hasSlot('dashed-underline'));\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"amount\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-amount\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n <div class=\"b-summary-grid-item-amount__content\">\n <div>{{ label }}</div>\n <bento-typography\n v-if=\"secondaryLabel\"\n variant=\"caption\"\n class=\"b-summary-grid-item-amount__secondary-label\"\n >{{ secondaryLabel }}</bento-typography\n >\n </div>\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemAmountProps } from './summary-grid-item-amount.types';\n\n defineEmits([\"copy-click\", \"info-icon-mouseenter\"]);\n\n defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null },\n label: null,\n secondaryLabel: { default: null },\n secondaryMetric: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display financial data, such as currency values and monetary amounts\n *\n * @example\n * import { BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid-item-amount\n * title=\"Your title\"\n * label=\"200.00 EUR\"\n * secondary-label=\"/ day\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item-amount.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"numeric\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-numeric\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemNumericProps } from './summary-grid-item-numeric.types';\n\n defineEmits([\"copy-click\", \"info-icon-mouseenter\"]);\n\n defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null },\n label: null,\n secondaryMetric: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display any numeric information\n *\n * @example\n * import { BentoSummaryGridItemNumeric } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemNumeric },\n * template: `\n * <bento-summary-grid-item-numeric\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n item-type=\"percentage\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-percentage\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ computedLabelPercentage }}\n <template v-if=\"secondaryMetric\" #secondary> {{ computedSecondaryMetricPercentage }} </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import type { BentoSummaryGridItemPercentageProps } from './summary-grid-item-percentage.types';\n import type { NumberFormatOptions } from 'vue-i18n';\n\n const { locale } = useI18n();\n\n defineEmits([\"copy-click\", \"info-icon-mouseenter\"]);\n\n const props = defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null },\n label: null,\n secondaryMetric: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const percentageArgs: NumberFormatOptions = {\n style: 'percent',\n maximumFractionDigits: 2,\n };\n\n const isNumeric = (value: string | number) => value != null && value !== '' && !isNaN(Number(value));\n const convertToPercentIfNumber = (value: string | number) => {\n if (value && isNumeric(value)) {\n return new Intl.NumberFormat(locale.value, percentageArgs).format(Number(value) / 100);\n }\n return value;\n };\n\n const computedLabelPercentage = computed(() => convertToPercentIfNumber(props.label));\n const computedSecondaryMetricPercentage = computed(() => convertToPercentIfNumber(props.secondaryMetric));\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display any percentage information\n *\n * @example\n * import { BentoSummaryGridItemPercentage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemPercentage },\n * template: `\n * <bento-summary-grid-item-percentage\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {\n i18n: {},\n };\n</script>\n","<template>\n <summary-grid-item\n item-type=\"text\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-text\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n\n import type { BentoSummaryGridItemTextProps } from './summary-grid-item-text.types';\n\n defineEmits([\"copy-click\", \"info-icon-mouseenter\"]);\n\n defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n label: null,\n title: null,\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display text only. Can be used for references, IDs or any other text data.\n *\n * @example\n * import { BentoSummaryGridItemText } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemText },\n * template: `\n * <bento-summary-grid-item-text\n * title=\"Your title\"\n * label=\"Your text here\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n :title=\"title\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n <slot />\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemCustomProps } from './summary-grid-item-custom.types';\n\n defineEmits([\"copy-click\", \"info-icon-mouseenter\"]);\n\n defineProps({\n copy: { default: undefined },\n infoIconTooltipText: { default: null },\n title: null,\n fitContent: { type: Boolean, default: false },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default {};\n</script>\n","import { type GridLayoutColumnWidths } from '@/components/internal/grid-layout/grid-layout.types';\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoSummaryGridItemSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoSummaryGridItemTrendDirection {\n POSITIVE = 'positive',\n NEGATIVE = 'negative',\n NEUTRAL = 'neutral',\n}\n\nexport interface BentoSummaryGridColumnWidth {\n row1: GridLayoutColumnWidths;\n row2?: GridLayoutColumnWidths;\n row3?: GridLayoutColumnWidths;\n}\n\nexport type BentoSummaryGridLayout = () => {\n isSummaryGridLayout: boolean;\n};\n\nexport interface BentoSummaryGridProps {\n /**\n * Sets the responsive columns widths values for 1 of the 3 rows.\n */\n columnWidth?: BentoSummaryGridColumnWidth;\n\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero?: boolean;\n}\n"],"names":["__default__$6","slots","useSlots","hasSlot","useHasSlot","numberOfRows","slotRows","_b","_a","slotName","onMounted","registerComponentsInSummaryGrid","provide","SUMMARY_GRID_LAYOUT_INJECTION_KEY","SUMMARY_GRID_SLASHED_ZERO","toRef","props","__default__$5","trendDirection","secondaryTrendDirection","itemType","size","toRefs","hasSlashedZero","inject","ref","tagVariantColor","direction","trendVariant","computed","secondaryTrendVariant","typographyContentElement","typographyProps","computedStyles","conditionalClasses","withUnderline","__default__$4","__default__$3","__default__$2","locale","useI18n","percentageArgs","isNumeric","value","convertToPercentIfNumber","computedLabelPercentage","computedSecondaryMetricPercentage","__default__$1","__default__","BentoSummaryGridItemSize","BentoSummaryGridItemSize2","BentoSummaryGridItemTrendDirection","BentoSummaryGridItemTrendDirection2"],"mappings":";;;;;;;;;;;;AAgGI,MAAAA,IAAA,CAAA;;;;;;;;;iBAnDAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA;AAEA,QAAAI,IAAA;AACA,QAAAJ,GAAA;AACI,YAAAK,KAAAC,KAAAC,IAAA,OAAA,KAAAP,CAAA,MAAA,gBAAAO,EAAA,OAAA,CAAAC,MAAAA,EAAA,SAAA,OAAA,OAAA,gBAAAF,EAAA,IAAA,CAAAE,MAAA;;AAAA,yBAAAD,IAAAC,EAAA,MAAA,GAAA,MAAA,gBAAAD,EAAA,IAAA,EAAA;AAAA;AAGA,MAAAH,IAAA,KAAA,IAAA,GAAAC,CAAA;AAAA,IAAmC;AAGvC,IAAAI,EAAA,MAAA;AACI,UAAAL,IAAA;AACI,cAAA,IAAA;AAAA,UAAU;AAAA,QACN;AAAA,IAER,CAAA;AAGJ,UAAAM,IAAA,OAEI,EAAA,wBAAA;AAGJ,WAAAC,EAAAC,GAAAF,CAAA,GACAC,EAAAE,GAAAC,EAAAC,GAAA,aAAA,CAAA;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;;;;;;;uBC0CAqC,KAAA;AAAA,EAAe,MAAA,CAAA;AAEf;;;;;;;;;;;;;;;;;;;;iBA/DA,EAAA,QAAAC,EAAA,IAAAC,EAAA,GAoBAvC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAwC,IAAA;AAAA,MAA4C,OAAA;AAAA,MACjC,uBAAA;AAAA,IACgB,GAG3BC,IAAA,CAAAC,MAAAA,KAAA,QAAAA,MAAA,MAAA,CAAA,MAAA,OAAAA,CAAA,CAAA,GACAC,IAAA,CAAAD,MACIA,KAAAD,EAAAC,CAAA,IACI,IAAA,KAAA,aAAAJ,EAAA,OAAAE,CAAA,EAAA,OAAA,OAAAE,CAAA,IAAA,GAAA,IAEJA,GAGJE,IAAAhB,EAAA,MAAAe,EAAA5B,EAAA,KAAA,CAAA,GACA8B,IAAAjB,EAAA,MAAAe,EAAA5B,EAAA,eAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;uBCVA+B,KAAA,CAAA;;;;;;;;;;;;;;AAtBA,UAAA9C,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA;;;;;;;;;;;;;;;;;;;;;uBCeA+C,KAAA,CAAA;;;;;;;;;;;;;AApBA,UAAA/C,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA;;;;;;;;;;;;;;;;;;;;;;AC/BG,IAAAgD,KAAA,kBAAAC,OACHA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SAHQA,IAAAD,MAAA,CAAA,CAAA,GASLE,KAAA,kBAAAC,OACHA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,UAAA,WAHQA,IAAAD,MAAA,CAAA,CAAA;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as N, ref as p, provide as g, watch as x, nextTick as k, computed as m, unref as $, onUnmounted as A, toRefs as j, inject as B } from "vue";
2
2
  import { B as G } from "./typography.C8lPlsbD.js";
3
- import { B as J } from "./tag.CbNFG45Y.js";
3
+ import { B as J } from "./tag.XeZzHnx_.js";
4
4
  import { C as U } from "./cross-circle-fill.DTDtgLMf.js";
5
5
  import { u as z } from "./index.B6WW_F-J.js";
6
6
  import { g as M } from "./generate-uid.NJ8tVoha.js";
@@ -253,4 +253,4 @@ export {
253
253
  Te as B,
254
254
  ve as a
255
255
  };
256
- //# sourceMappingURL=tab.QEKU5Udp.js.map
256
+ //# sourceMappingURL=tab.B2qRfTqx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab.QEKU5Udp.js","sources":["../../src/components/tabs/utils/index.ts","../../src/components/tabs/tabs.types.ts","../../src/components/tabs/tabs.vue","../../src/components/tabs/components/tab.vue"],"sourcesContent":["import { type BentoTab } from '../components/tab.types';\n\n/**\n * Recursively gets the previous available tab index. It will loop through the tabs until it finds one\n * that is not disabled or hidden.\n * @param activeTabIndex The currently active tab index.\n * @param tabsValue An array of BentoTab objects.\n * @returns The index of the previous available tab.\n */\nexport const getPreviousTabIndex = (activeTabIndex: number, tabsValue: Array<BentoTab>) => {\n // Prevent overflow\n const newActiveTabIndex = activeTabIndex === 0 ? tabsValue.length - 1 : activeTabIndex - 1;\n const currentTab = tabsValue[newActiveTabIndex];\n if (currentTab.disabled || currentTab.hidden) {\n return getPreviousTabIndex(newActiveTabIndex, tabsValue);\n }\n return newActiveTabIndex;\n};\n\n/**\n * Recursively gets the next available tab index. It will loop through the tabs until it finds one\n * that is not disabled or hidden.\n * @param activeTabIndex The currently active tab index.\n * @param tabsValue An array of BentoTab objects.\n * @returns The index of the next available tab.\n */\nexport const getNextTabIndex = (activeTabIndex: number, tabsValue: Array<BentoTab>) => {\n // Prevent overflow\n const newActiveTabIndex = activeTabIndex === tabsValue.length - 1 ? 0 : activeTabIndex + 1;\n const currentTab = tabsValue[newActiveTabIndex];\n if (currentTab.disabled || currentTab.hidden) {\n return getNextTabIndex(newActiveTabIndex, tabsValue);\n }\n return newActiveTabIndex;\n};\n","import type { Ref } from 'vue';\n\n/**\n * Private\n */\nexport interface BentoStickyTabsOptions {\n top?: Ref<number>;\n}\n\nexport type BentoTabsRegisterTab = (props: {\n counter: Ref<number>;\n disabled: Ref<boolean>;\n errorCounter: Ref<number>;\n hidden: Ref<boolean>;\n title: Ref<string>;\n withNotificationIndicator: Ref<boolean>;\n setElementRef: (el: Element | null) => void;\n}) => { id: string; unregisterTab: () => void };\n\nexport enum BentoTabsEvent {\n ACTIVE_TAB_INDEX = 'update:active-tab-index',\n}\n","<template>\n <div class=\"b-tabs\">\n <div\n ref=\"tablistwrapper\"\n class=\"b-tabs__tab-list-wrapper\"\n :class=\"tablistWrapperConditionalClasses\"\n :style=\"tablistWrapperStyles\"\n >\n <fixed-scroller condensed :extra-padding-top=\"2\">\n <div ref=\"tablist\" class=\"b-tabs__tab-list\" role=\"tablist\" @keydown=\"onKeydownTabsNavigation\">\n <button\n v-for=\"{\n counter,\n disabled,\n errorCounter,\n hidden,\n id,\n title,\n withNotificationIndicator,\n setElementRef,\n } in tabs\"\n v-show=\"!hidden\"\n :id=\"id\"\n :ref=\"setElementRef\"\n :key=\"id\"\n role=\"tab\"\n type=\"button\"\n class=\"b-tabs__tab\"\n :class=\"{\n 'b-tabs__tab--active': activeTabId === id,\n 'b-tabs__tab--disabled': disabled,\n }\"\n :aria-controls=\"`${id}-tabpanel`\"\n :aria-hidden=\"hidden ? 'true' : 'false'\"\n :aria-selected=\"activeTabId === id ? 'true' : 'false'\"\n :tabindex=\"activeTabId === id && !disabled.value ? null : -1\"\n :disabled=\"isDisabled(disabled)\"\n @click=\"handleTabChange(id)\"\n @keydown.enter.space=\"handleTabChange(id)\"\n >\n <span class=\"b-tabs__tab-text\">\n <bento-typography class=\"b-tabs__tab-title\" el=\"span\" variant=\"body\" stronger>\n {{ title }}\n </bento-typography>\n <bento-typography\n v-if=\"counter != null\"\n class=\"b-tabs__tab-counter\"\n el=\"span\"\n variant=\"body\"\n stronger\n :class=\"{\n 'b-tabs__tab-counter--active': activeTabId === id,\n }\"\n >\n {{ counter }}\n </bento-typography>\n <bento-tag v-if=\"errorCounter != null\" class=\"b-tabs__tab-error-counter\" variant=\"red\">\n <template #icon>\n <cross-circle-fill-icon aria-hidden=\"true\" />\n </template>\n <span>{{ errorCounter }}</span>\n <span class=\"b-tabs__visually-hidden\">{{ tc('errorCount', errorCounter) }}</span>\n </bento-tag>\n <span\n v-if=\"withNotificationIndicator\"\n class=\"b-tabs__tab-notification-dot\"\n aria-hidden=\"true\"\n ></span>\n </span>\n <span v-show=\"activeTabId === id\" class=\"b-tabs__tab-underline\" aria-hidden=\"true\"></span>\n </button>\n </div>\n </fixed-scroller>\n </div>\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\n import {\n computed,\n defineComponent,\n nextTick,\n onUnmounted,\n type PropType,\n provide,\n ref,\n type Ref,\n unref,\n watch,\n } from 'vue';\n\n // components\n import { BentoTypography } from '@/components/typography';\n import { BentoTag } from '@/components/tag';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { FixedScroller } from '@/internal';\n\n // utils\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import { getNextTabIndex, getPreviousTabIndex } from './utils';\n import messages from './messages.json';\n\n // types\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoTab } from './components/tab.types';\n import { type BentoStickyTabsOptions, BentoTabsEvent, type BentoTabsRegisterTab } from './tabs.types';\n\n // keys\n import { TABS_ACTIVE_TAB_ID_KEY, TABS_REGISTER_TAB_INJECTION_KEY } from './tabs.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Tabs are used to navigate between different, but related content views within a page.\n * This component conforms to the official WAI-ARIA guidelines for tabs: https://www.w3.org/WAI/ARIA/apg/patterns/tabs/\n *\n * @example\n * import { BentoTabs, BentoTab } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTabs, BentoTab },\n * template: `\n * <bento-tabs v-bind=\"$props\">\n * <bento-tab title=\"Maria Ahlefeldt\">\n * (16 January 1755 - 20 December 1810) was a Danish, (originally German), composer. She is known as the first female composer in Denmark.\n * </bento-tab>\n * <bento-tab title=\"Carl Andersen\">\n * (29 April 1847 - 7 May 1909) was a Danish flutist, conductor and composer born in Copenhagen, son of the flutist Christian Joachim Andersen.\n * </bento-tab>\n * <bento-tab title=\"Karl Truffel\">\n * (1 March 1981 - 7 November 1992) was a Danish dog and commander born in Berlin, son of the machinist Tom Jahoor Truffel.\n * </bento-tab>\n * <bento-tab title=\"Maria Ahlefeldt\" :disabled=\"true\">\n * (16 January 1755 - 20 December 1810) was a Danish, (originally German), composer. She is known as the first female composer in Denmark.\n * </bento-tab>\n * </bento-tabs>\n * `\n * };\n */\n\n // component\n export default defineComponent({\n i18n: { messages },\n components: {\n BentoTag,\n BentoTypography,\n CrossCircleFillIcon,\n FixedScroller,\n },\n props: {\n /**\n * Sets the active tab by its index (0 being the first tab item).\n */\n activeTabIndex: { type: Number, default: 0 },\n\n /*\n * Renders the tab with a sticky positioning.\n */\n sticky: { type: Boolean, default: false },\n\n /**\n * Additional configurable options for tabs rendered with a sticky positioning.\n * It must be an object of type {@see BentoStickyTabsOption}\n * @property {Ref<number>} stickyOptions.top - Top position the tabs should take up when rendered as sticky.\n */\n stickyOptions: { type: Object as PropType<BentoStickyTabsOptions>, default: null },\n },\n emits: [BentoTabsEvent.ACTIVE_TAB_INDEX],\n setup(props, { emit }) {\n const { tc } = useI18n<{ message: MessageSchema }>({ messages });\n\n const tabs: Ref<Array<BentoTab>> = ref([]);\n const tablist = ref(null);\n const tablistwrapper = ref();\n const activeTabId = ref('');\n const isPinnedByObserver = ref(false);\n let observer;\n\n provide(TABS_ACTIVE_TAB_ID_KEY, activeTabId);\n\n // unregister tab if removed / destroyed\n const unregisterTab = (tabIdToRemove: string) => () => {\n tabs.value = tabs.value?.filter(({ id }) => id !== tabIdToRemove);\n };\n\n // register tab\n const registerTab: BentoTabsRegisterTab = ({\n title,\n disabled,\n errorCounter,\n withNotificationIndicator,\n counter,\n hidden,\n setElementRef,\n }) => {\n const id = generateUid('b-tab');\n\n // add tab to tabs\n tabs.value.push({\n counter,\n disabled,\n errorCounter,\n hidden,\n id,\n title,\n withNotificationIndicator,\n setElementRef,\n });\n\n // return values to the Tab component\n return { id, unregisterTab: unregisterTab(id) };\n };\n\n // provide activeTab and registerTab to tab items\n provide(TABS_REGISTER_TAB_INJECTION_KEY, registerTab);\n\n // keyboard navigation\n const onKeydownTabsNavigation = (e: KeyboardEvent) => {\n if (e.code === 'ArrowLeft' || e.code === 'ArrowRight') {\n // find tab that is focussed\n const activeTab = tabs.value.find(tab => document.activeElement.id === tab.id);\n let activeTabIndex = tabs.value.indexOf(activeTab);\n\n // conditionally increase or decrease the\n if (e.code === 'ArrowLeft') {\n activeTabIndex = getPreviousTabIndex(activeTabIndex, tabs.value);\n } else if (e.code === 'ArrowRight') {\n activeTabIndex = getNextTabIndex(activeTabIndex, tabs.value);\n }\n\n // focus new active tab\n tablist.value.children[activeTabIndex].focus();\n }\n };\n\n watch(\n [() => props.activeTabIndex, tabs],\n ([index, currentTabs]) => {\n nextTick(() => {\n const tab = currentTabs[index];\n activeTabId.value =\n tab && !tab.disabled ? tab.id : tabs.value.find(({ disabled }) => !disabled)?.id;\n });\n },\n { immediate: true }\n );\n\n const handleTabChange = (tabId: string) => {\n activeTabId.value = tabId;\n const activeIndex = tabs.value.findIndex(({ id }) => id === activeTabId.value);\n emit(BentoTabsEvent.ACTIVE_TAB_INDEX, activeIndex);\n };\n\n const isDisabled = (isDisabledTab: Ref<boolean>): Booleanish =>\n (isDisabledTab ? 'disabled' : false) as Booleanish;\n\n /* == Sticky tabs logic == */\n const topOffset = computed(() => (props.stickyOptions?.top ? unref(props.stickyOptions.top) : 0));\n\n const isPinned = computed(() => {\n if (props.sticky && topOffset.value > 0) {\n return true;\n }\n return isPinnedByObserver.value;\n });\n\n const disconnectObserver = () => {\n if (observer) {\n observer.disconnect();\n observer = null;\n }\n isPinnedByObserver.value = false;\n };\n\n const setupObserver = (element: HTMLDivElement) => {\n // The observer is only needed when the tabs are sticky at the top of the screen (no top offset).\n if (props.sticky && topOffset.value === 0) {\n observer = new IntersectionObserver(\n ([e]) => {\n isPinnedByObserver.value = e.intersectionRatio < 1;\n },\n { threshold: [1] }\n );\n observer.observe(element);\n }\n };\n\n // This watcher manages the entire lifecycle of the observer.\n watch(\n [() => props.sticky, tablistwrapper, topOffset],\n ([isSticky, element]) => {\n disconnectObserver();\n if (isSticky && element) {\n nextTick(() => setupObserver(element));\n }\n },\n { immediate: true }\n );\n\n onUnmounted(() => {\n disconnectObserver();\n });\n\n const tablistWrapperConditionalClasses = computed(() => ({\n 'b-tabs__tab-list-wrapper--sticky': props.sticky,\n 'b-tabs__tab-list-wrapper--pinned': isPinned.value,\n }));\n\n const tablistWrapperStyles = computed(() =>\n // This helps us detect when the tabs are pinned without calculations on the tabs positions because it makes the tabs intersect by 1 pixel with the element on top of it, which is getting aught by the intersection observer.\n // Followed this example: https://css-tricks.com/how-to-detect-when-a-sticky-element-gets-pinned/\n props.sticky\n ? {\n top: `${(props.stickyOptions?.top ?? 0) - 1}px`,\n }\n : {}\n );\n\n return {\n tc,\n tabs,\n tablist,\n tablistwrapper,\n activeTabId,\n tablistWrapperConditionalClasses,\n tablistWrapperStyles,\n onKeydownTabsNavigation,\n handleTabChange,\n isDisabled,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./tabs.scss\" />\n","<template>\n <div v-show=\"activeTabId === id\" :id=\"`${id}-tabpanel`\" class=\"b-tab\" role=\"tabpanel\" :aria-labelledby=\"id\">\n <template v-if=\"activeTabId === id\">\n <slot />\n </template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, onUnmounted, provide, ref, toRefs } from 'vue';\n import {\n EXTERNAL_TITLE_REGISTER_ENTRY_INJECTION_KEY,\n TABS_ACTIVE_TAB_ID_KEY,\n TABS_REGISTER_TAB_INJECTION_KEY,\n } from '../tabs.keys';\n import { type BentoTabsRegisterTab } from '../tabs.types';\n import { type BentoTabProps, type BentoTabProvidedTitle } from './tab.types';\n\n const props = defineProps({\n counter: { default: null },\n disabled: { type: Boolean, default: false },\n errorCounter: { default: null },\n hidden: { type: Boolean, default: false },\n title: null,\n withNotificationIndicator: { type: Boolean, default: false },\n setElementRef: { type: Function, default: undefined }\n});\n\n // External title injection\n const { counter, disabled, errorCounter, hidden, withNotificationIndicator } = toRefs(props);\n const componentTitle = ref<BentoTabProps['title']>();\n const setTitle: BentoTabProvidedTitle = (value: string) => {\n componentTitle.value = value;\n };\n provide(EXTERNAL_TITLE_REGISTER_ENTRY_INJECTION_KEY, setTitle);\n\n const computedTitle = computed<BentoTabProps['title']>(() => componentTitle.value ?? props.title);\n\n const registerTab: BentoTabsRegisterTab = inject(TABS_REGISTER_TAB_INJECTION_KEY);\n const activeTabId = inject(TABS_ACTIVE_TAB_ID_KEY);\n\n const { id, unregisterTab } = registerTab({\n counter,\n disabled,\n errorCounter,\n hidden,\n title: computedTitle,\n withNotificationIndicator,\n setElementRef: props.setElementRef,\n });\n\n onUnmounted(() => unregisterTab());\n</script>\n\n<script lang=\"ts\">\n /**\n * Tab content which attaches a tab to the `bento-tabs` component\n * and renders is content when it becomes active.\n *\n * @example\n * import { BentoTab, BentoTabs } from '@adyen/bento-vue2';\n *\n * <template>\n * <bento-tabs>\n * <bento-tab\n * :counter=\"1\"\n * :disabled=\"false\"\n * :hidden=\"false\"\n * title=\"Tab's title\"\n * with-notification-indicator\n * >\n * Tab content\n * </bento-tab>\n * </bento-tabs>\n * </template>\n */\n export default {\n name: 'bento-tab',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./tab.scss\" />\n"],"names":["getPreviousTabIndex","activeTabIndex","tabsValue","newActiveTabIndex","currentTab","getNextTabIndex","BentoTabsEvent","BentoTabsEvent2","_sfc_main$1","defineComponent","messages","BentoTag","BentoTypography","CrossCircleFillIcon","FixedScroller","props","emit","tc","useI18n","tabs","ref","tablist","tablistwrapper","activeTabId","isPinnedByObserver","observer","provide","TABS_ACTIVE_TAB_ID_KEY","unregisterTab","tabIdToRemove","_a","id","TABS_REGISTER_TAB_INJECTION_KEY","title","disabled","errorCounter","withNotificationIndicator","counter","hidden","setElementRef","generateUid","onKeydownTabsNavigation","e","activeTab","tab","watch","index","currentTabs","nextTick","handleTabChange","tabId","activeIndex","isDisabled","isDisabledTab","topOffset","computed","unref","isPinned","disconnectObserver","setupObserver","element","isSticky","onUnmounted","tablistWrapperConditionalClasses","tablistWrapperStyles","__default__","toRefs","componentTitle","setTitle","value","EXTERNAL_TITLE_REGISTER_ENTRY_INJECTION_KEY","computedTitle","registerTab","inject"],"mappings":";;;;;;;;;;AASO,MAAAA,IAAA,CAAAC,GAAAC,MAAA;AAEH,QAAAC,IAAAF,MAAA,IAAAC,EAAA,SAAA,IAAAD,IAAA,GACAG,IAAAF,EAAAC,CAAA;AACA,SAAAC,EAAA,YAAAA,EAAA,SACIJ,EAAAG,GAAAD,CAAA,IAEJC;AACJ,GASOE,IAAA,CAAAJ,GAAAC,MAAA;AAEH,QAAAC,IAAAF,MAAAC,EAAA,SAAA,IAAA,IAAAD,IAAA,GACAG,IAAAF,EAAAC,CAAA;AACA,SAAAC,EAAA,YAAAA,EAAA,SACIC,EAAAF,GAAAD,CAAA,IAEJC;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACfO,IAAAG,IAAA,kBAAAC,OACHA,EAAA,mBAAA,2BADQA,IAAAD,KAAA,CAAA,CAAA;AC4HZ,MAAAE,IAAAC,EAAA;AAAA,EAAA,MAAA,EAAA,UAAAC,EAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,eAAAC;AAAA,EACA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,gBAAA,EAAA,MAAA,QAAA,SAAA,EAAA;AAAA;AAAA;AAAA;AAAA,IAIA,QAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AA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oD,IAAA/C,EAAA,GACAgD,IAAA,CAAAC,MAAA;AACI,MAAAF,EAAA,QAAAE;AAAA,IAAuB;AAE3B,IAAA3C,EAAA4C,GAAAF,CAAA;AAEA,UAAAG,IAAAhB,EAAA,MAAAY,EAAA,SAAApD,EAAA,KAAA,GAEAyD,IAAAC,EAAAzC,CAAA,GACAT,IAAAkD,EAAA9C,CAAA,GAEA,EAAA,IAAAI,GAAA,eAAAH,EAAA,IAAA4C,EAAA;AAAA,MAA0C,SAAAnC;AAAA,MACtC,UAAAH;AAAA,MACA,cAAAC;AAAA,MACA,QAAAG;AAAA,MACA,OAAAiC;AAAA,MACO,2BAAAnC;AAAA,MACP,eAAArB,EAAA;AAAA,IACqB,CAAA;AAGzB,WAAA+C,EAAA,MAAAlC,EAAA,CAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"tab.B2qRfTqx.js","sources":["../../src/components/tabs/utils/index.ts","../../src/components/tabs/tabs.types.ts","../../src/components/tabs/tabs.vue","../../src/components/tabs/components/tab.vue"],"sourcesContent":["import { type BentoTab } from '../components/tab.types';\n\n/**\n * Recursively gets the previous available tab index. It will loop through the tabs until it finds one\n * that is not disabled or hidden.\n * @param activeTabIndex The currently active tab index.\n * @param tabsValue An array of BentoTab objects.\n * @returns The index of the previous available tab.\n */\nexport const getPreviousTabIndex = (activeTabIndex: number, tabsValue: Array<BentoTab>) => {\n // Prevent overflow\n const newActiveTabIndex = activeTabIndex === 0 ? tabsValue.length - 1 : activeTabIndex - 1;\n const currentTab = tabsValue[newActiveTabIndex];\n if (currentTab.disabled || currentTab.hidden) {\n return getPreviousTabIndex(newActiveTabIndex, tabsValue);\n }\n return newActiveTabIndex;\n};\n\n/**\n * Recursively gets the next available tab index. It will loop through the tabs until it finds one\n * that is not disabled or hidden.\n * @param activeTabIndex The currently active tab index.\n * @param tabsValue An array of BentoTab objects.\n * @returns The index of the next available tab.\n */\nexport const getNextTabIndex = (activeTabIndex: number, tabsValue: Array<BentoTab>) => {\n // Prevent overflow\n const newActiveTabIndex = activeTabIndex === tabsValue.length - 1 ? 0 : activeTabIndex + 1;\n const currentTab = tabsValue[newActiveTabIndex];\n if (currentTab.disabled || currentTab.hidden) {\n return getNextTabIndex(newActiveTabIndex, tabsValue);\n }\n return newActiveTabIndex;\n};\n","import type { Ref } from 'vue';\n\n/**\n * Private\n */\nexport interface BentoStickyTabsOptions {\n top?: Ref<number>;\n}\n\nexport type BentoTabsRegisterTab = (props: {\n counter: Ref<number>;\n disabled: Ref<boolean>;\n errorCounter: Ref<number>;\n hidden: Ref<boolean>;\n title: Ref<string>;\n withNotificationIndicator: Ref<boolean>;\n setElementRef: (el: Element | null) => void;\n}) => { id: string; unregisterTab: () => void };\n\nexport enum BentoTabsEvent {\n ACTIVE_TAB_INDEX = 'update:active-tab-index',\n}\n","<template>\n <div class=\"b-tabs\">\n <div\n ref=\"tablistwrapper\"\n class=\"b-tabs__tab-list-wrapper\"\n :class=\"tablistWrapperConditionalClasses\"\n :style=\"tablistWrapperStyles\"\n >\n <fixed-scroller condensed :extra-padding-top=\"2\">\n <div ref=\"tablist\" class=\"b-tabs__tab-list\" role=\"tablist\" @keydown=\"onKeydownTabsNavigation\">\n <button\n v-for=\"{\n counter,\n disabled,\n errorCounter,\n hidden,\n id,\n title,\n withNotificationIndicator,\n setElementRef,\n } in tabs\"\n v-show=\"!hidden\"\n :id=\"id\"\n :ref=\"setElementRef\"\n :key=\"id\"\n role=\"tab\"\n type=\"button\"\n class=\"b-tabs__tab\"\n :class=\"{\n 'b-tabs__tab--active': activeTabId === id,\n 'b-tabs__tab--disabled': disabled,\n }\"\n :aria-controls=\"`${id}-tabpanel`\"\n :aria-hidden=\"hidden ? 'true' : 'false'\"\n :aria-selected=\"activeTabId === id ? 'true' : 'false'\"\n :tabindex=\"activeTabId === id && !disabled.value ? null : -1\"\n :disabled=\"isDisabled(disabled)\"\n @click=\"handleTabChange(id)\"\n @keydown.enter.space=\"handleTabChange(id)\"\n >\n <span class=\"b-tabs__tab-text\">\n <bento-typography class=\"b-tabs__tab-title\" el=\"span\" variant=\"body\" stronger>\n {{ title }}\n </bento-typography>\n <bento-typography\n v-if=\"counter != null\"\n class=\"b-tabs__tab-counter\"\n el=\"span\"\n variant=\"body\"\n stronger\n :class=\"{\n 'b-tabs__tab-counter--active': activeTabId === id,\n }\"\n >\n {{ counter }}\n </bento-typography>\n <bento-tag v-if=\"errorCounter != null\" class=\"b-tabs__tab-error-counter\" variant=\"red\">\n <template #icon>\n <cross-circle-fill-icon aria-hidden=\"true\" />\n </template>\n <span>{{ errorCounter }}</span>\n <span class=\"b-tabs__visually-hidden\">{{ tc('errorCount', errorCounter) }}</span>\n </bento-tag>\n <span\n v-if=\"withNotificationIndicator\"\n class=\"b-tabs__tab-notification-dot\"\n aria-hidden=\"true\"\n ></span>\n </span>\n <span v-show=\"activeTabId === id\" class=\"b-tabs__tab-underline\" aria-hidden=\"true\"></span>\n </button>\n </div>\n </fixed-scroller>\n </div>\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\n import {\n computed,\n defineComponent,\n nextTick,\n onUnmounted,\n type PropType,\n provide,\n ref,\n type Ref,\n unref,\n watch,\n } from 'vue';\n\n // components\n import { BentoTypography } from '@/components/typography';\n import { BentoTag } from '@/components/tag';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { FixedScroller } from '@/internal';\n\n // utils\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import { getNextTabIndex, getPreviousTabIndex } from './utils';\n import messages from './messages.json';\n\n // types\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoTab } from './components/tab.types';\n import { type BentoStickyTabsOptions, BentoTabsEvent, type BentoTabsRegisterTab } from './tabs.types';\n\n // keys\n import { TABS_ACTIVE_TAB_ID_KEY, TABS_REGISTER_TAB_INJECTION_KEY } from './tabs.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Tabs are used to navigate between different, but related content views within a page.\n * This component conforms to the official WAI-ARIA guidelines for tabs: https://www.w3.org/WAI/ARIA/apg/patterns/tabs/\n *\n * @example\n * import { BentoTabs, BentoTab } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTabs, BentoTab },\n * template: `\n * <bento-tabs v-bind=\"$props\">\n * <bento-tab title=\"Maria Ahlefeldt\">\n * (16 January 1755 - 20 December 1810) was a Danish, (originally German), composer. She is known as the first female composer in Denmark.\n * </bento-tab>\n * <bento-tab title=\"Carl Andersen\">\n * (29 April 1847 - 7 May 1909) was a Danish flutist, conductor and composer born in Copenhagen, son of the flutist Christian Joachim Andersen.\n * </bento-tab>\n * <bento-tab title=\"Karl Truffel\">\n * (1 March 1981 - 7 November 1992) was a Danish dog and commander born in Berlin, son of the machinist Tom Jahoor Truffel.\n * </bento-tab>\n * <bento-tab title=\"Maria Ahlefeldt\" :disabled=\"true\">\n * (16 January 1755 - 20 December 1810) was a Danish, (originally German), composer. She is known as the first female composer in Denmark.\n * </bento-tab>\n * </bento-tabs>\n * `\n * };\n */\n\n // component\n export default defineComponent({\n i18n: { messages },\n components: {\n BentoTag,\n BentoTypography,\n CrossCircleFillIcon,\n FixedScroller,\n },\n props: {\n /**\n * Sets the active tab by its index (0 being the first tab item).\n */\n activeTabIndex: { type: Number, default: 0 },\n\n /*\n * Renders the tab with a sticky positioning.\n */\n sticky: { type: Boolean, default: false },\n\n /**\n * Additional configurable options for tabs rendered with a sticky positioning.\n * It must be an object of type {@see BentoStickyTabsOption}\n * @property {Ref<number>} stickyOptions.top - Top position the tabs should take up when rendered as sticky.\n */\n stickyOptions: { type: Object as PropType<BentoStickyTabsOptions>, default: null },\n },\n emits: [BentoTabsEvent.ACTIVE_TAB_INDEX],\n setup(props, { emit }) {\n const { tc } = useI18n<{ message: MessageSchema }>({ messages });\n\n const tabs: Ref<Array<BentoTab>> = ref([]);\n const tablist = ref(null);\n const tablistwrapper = ref();\n const activeTabId = ref('');\n const isPinnedByObserver = ref(false);\n let observer;\n\n provide(TABS_ACTIVE_TAB_ID_KEY, activeTabId);\n\n // unregister tab if removed / destroyed\n const unregisterTab = (tabIdToRemove: string) => () => {\n tabs.value = tabs.value?.filter(({ id }) => id !== tabIdToRemove);\n };\n\n // register tab\n const registerTab: BentoTabsRegisterTab = ({\n title,\n disabled,\n errorCounter,\n withNotificationIndicator,\n counter,\n hidden,\n setElementRef,\n }) => {\n const id = generateUid('b-tab');\n\n // add tab to tabs\n tabs.value.push({\n counter,\n disabled,\n errorCounter,\n hidden,\n id,\n title,\n withNotificationIndicator,\n setElementRef,\n });\n\n // return values to the Tab component\n return { id, unregisterTab: unregisterTab(id) };\n };\n\n // provide activeTab and registerTab to tab items\n provide(TABS_REGISTER_TAB_INJECTION_KEY, registerTab);\n\n // keyboard navigation\n const onKeydownTabsNavigation = (e: KeyboardEvent) => {\n if (e.code === 'ArrowLeft' || e.code === 'ArrowRight') {\n // find tab that is focussed\n const activeTab = tabs.value.find(tab => document.activeElement.id === tab.id);\n let activeTabIndex = tabs.value.indexOf(activeTab);\n\n // conditionally increase or decrease the\n if (e.code === 'ArrowLeft') {\n activeTabIndex = getPreviousTabIndex(activeTabIndex, tabs.value);\n } else if (e.code === 'ArrowRight') {\n activeTabIndex = getNextTabIndex(activeTabIndex, tabs.value);\n }\n\n // focus new active tab\n tablist.value.children[activeTabIndex].focus();\n }\n };\n\n watch(\n [() => props.activeTabIndex, tabs],\n ([index, currentTabs]) => {\n nextTick(() => {\n const tab = currentTabs[index];\n activeTabId.value =\n tab && !tab.disabled ? tab.id : tabs.value.find(({ disabled }) => !disabled)?.id;\n });\n },\n { immediate: true }\n );\n\n const handleTabChange = (tabId: string) => {\n activeTabId.value = tabId;\n const activeIndex = tabs.value.findIndex(({ id }) => id === activeTabId.value);\n emit(BentoTabsEvent.ACTIVE_TAB_INDEX, activeIndex);\n };\n\n const isDisabled = (isDisabledTab: Ref<boolean>): Booleanish =>\n (isDisabledTab ? 'disabled' : false) as Booleanish;\n\n /* == Sticky tabs logic == */\n const topOffset = computed(() => (props.stickyOptions?.top ? unref(props.stickyOptions.top) : 0));\n\n const isPinned = computed(() => {\n if (props.sticky && topOffset.value > 0) {\n return true;\n }\n return isPinnedByObserver.value;\n });\n\n const disconnectObserver = () => {\n if (observer) {\n observer.disconnect();\n observer = null;\n }\n isPinnedByObserver.value = false;\n };\n\n const setupObserver = (element: HTMLDivElement) => {\n // The observer is only needed when the tabs are sticky at the top of the screen (no top offset).\n if (props.sticky && topOffset.value === 0) {\n observer = new IntersectionObserver(\n ([e]) => {\n isPinnedByObserver.value = e.intersectionRatio < 1;\n },\n { threshold: [1] }\n );\n observer.observe(element);\n }\n };\n\n // This watcher manages the entire lifecycle of the observer.\n watch(\n [() => props.sticky, tablistwrapper, topOffset],\n ([isSticky, element]) => {\n disconnectObserver();\n if (isSticky && element) {\n nextTick(() => setupObserver(element));\n }\n },\n { immediate: true }\n );\n\n onUnmounted(() => {\n disconnectObserver();\n });\n\n const tablistWrapperConditionalClasses = computed(() => ({\n 'b-tabs__tab-list-wrapper--sticky': props.sticky,\n 'b-tabs__tab-list-wrapper--pinned': isPinned.value,\n }));\n\n const tablistWrapperStyles = computed(() =>\n // This helps us detect when the tabs are pinned without calculations on the tabs positions because it makes the tabs intersect by 1 pixel with the element on top of it, which is getting aught by the intersection observer.\n // Followed this example: https://css-tricks.com/how-to-detect-when-a-sticky-element-gets-pinned/\n props.sticky\n ? {\n top: `${(props.stickyOptions?.top ?? 0) - 1}px`,\n }\n : {}\n );\n\n return {\n tc,\n tabs,\n tablist,\n tablistwrapper,\n activeTabId,\n tablistWrapperConditionalClasses,\n tablistWrapperStyles,\n onKeydownTabsNavigation,\n handleTabChange,\n isDisabled,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./tabs.scss\" />\n","<template>\n <div v-show=\"activeTabId === id\" :id=\"`${id}-tabpanel`\" class=\"b-tab\" role=\"tabpanel\" :aria-labelledby=\"id\">\n <template v-if=\"activeTabId === id\">\n <slot />\n </template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, onUnmounted, provide, ref, toRefs } from 'vue';\n import {\n EXTERNAL_TITLE_REGISTER_ENTRY_INJECTION_KEY,\n TABS_ACTIVE_TAB_ID_KEY,\n TABS_REGISTER_TAB_INJECTION_KEY,\n } from '../tabs.keys';\n import { type BentoTabsRegisterTab } from '../tabs.types';\n import { type BentoTabProps, type BentoTabProvidedTitle } from './tab.types';\n\n const props = defineProps({\n counter: { default: null },\n disabled: { type: Boolean, default: false },\n errorCounter: { default: null },\n hidden: { type: Boolean, default: false },\n title: null,\n withNotificationIndicator: { type: Boolean, default: false },\n setElementRef: { type: Function, default: undefined }\n});\n\n // External title injection\n const { counter, disabled, errorCounter, hidden, withNotificationIndicator } = toRefs(props);\n const componentTitle = ref<BentoTabProps['title']>();\n const setTitle: BentoTabProvidedTitle = (value: string) => {\n componentTitle.value = value;\n };\n provide(EXTERNAL_TITLE_REGISTER_ENTRY_INJECTION_KEY, setTitle);\n\n const computedTitle = computed<BentoTabProps['title']>(() => componentTitle.value ?? props.title);\n\n const registerTab: BentoTabsRegisterTab = inject(TABS_REGISTER_TAB_INJECTION_KEY);\n const activeTabId = inject(TABS_ACTIVE_TAB_ID_KEY);\n\n const { id, unregisterTab } = registerTab({\n counter,\n disabled,\n errorCounter,\n hidden,\n title: computedTitle,\n withNotificationIndicator,\n setElementRef: props.setElementRef,\n });\n\n onUnmounted(() => unregisterTab());\n</script>\n\n<script lang=\"ts\">\n /**\n * Tab content which attaches a tab to the `bento-tabs` component\n * and renders is content when it becomes active.\n *\n * @example\n * import { BentoTab, BentoTabs } from '@adyen/bento-vue2';\n *\n * <template>\n * <bento-tabs>\n * <bento-tab\n * :counter=\"1\"\n * :disabled=\"false\"\n * :hidden=\"false\"\n * title=\"Tab's title\"\n * with-notification-indicator\n * >\n * Tab content\n * </bento-tab>\n * </bento-tabs>\n * </template>\n */\n export default {\n name: 'bento-tab',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./tab.scss\" />\n"],"names":["getPreviousTabIndex","activeTabIndex","tabsValue","newActiveTabIndex","currentTab","getNextTabIndex","BentoTabsEvent","BentoTabsEvent2","_sfc_main$1","defineComponent","messages","BentoTag","BentoTypography","CrossCircleFillIcon","FixedScroller","props","emit","tc","useI18n","tabs","ref","tablist","tablistwrapper","activeTabId","isPinnedByObserver","observer","provide","TABS_ACTIVE_TAB_ID_KEY","unregisterTab","tabIdToRemove","_a","id","TABS_REGISTER_TAB_INJECTION_KEY","title","disabled","errorCounter","withNotificationIndicator","counter","hidden","setElementRef","generateUid","onKeydownTabsNavigation","e","activeTab","tab","watch","index","currentTabs","nextTick","handleTabChange","tabId","activeIndex","isDisabled","isDisabledTab","topOffset","computed","unref","isPinned","disconnectObserver","setupObserver","element","isSticky","onUnmounted","tablistWrapperConditionalClasses","tablistWrapperStyles","__default__","toRefs","componentTitle","setTitle","value","EXTERNAL_TITLE_REGISTER_ENTRY_INJECTION_KEY","computedTitle","registerTab","inject"],"mappings":";;;;;;;;;;AASO,MAAAA,IAAA,CAAAC,GAAAC,MAAA;AAEH,QAAAC,IAAAF,MAAA,IAAAC,EAAA,SAAA,IAAAD,IAAA,GACAG,IAAAF,EAAAC,CAAA;AACA,SAAAC,EAAA,YAAAA,EAAA,SACIJ,EAAAG,GAAAD,CAAA,IAEJC;AACJ,GASOE,IAAA,CAAAJ,GAAAC,MAAA;AAEH,QAAAC,IAAAF,MAAAC,EAAA,SAAA,IAAA,IAAAD,IAAA,GACAG,IAAAF,EAAAC,CAAA;AACA,SAAAC,EAAA,YAAAA,EAAA,SACIC,EAAAF,GAAAD,CAAA,IAEJC;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACfO,IAAAG,IAAA,kBAAAC,OACHA,EAAA,mBAAA,2BADQA,IAAAD,KAAA,CAAA,CAAA;AC4HZ,MAAAE,IAAAC,EAAA;AAAA,EAAA,MAAA,EAAA,UAAAC,EAAA;AAAA,EACA,YAAA;AAAA,IAC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ACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBCjQIa,KAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;iBAjDA,EAAA,SAAA5B,GAAA,UAAAH,GAAA,cAAAC,GAAA,QAAAG,GAAA,2BAAAF,EAAA,IAAA8B,EAAAnD,CAAA,GACAoD,IAAA/C,EAAA,GACAgD,IAAA,CAAAC,MAAA;AACI,MAAAF,EAAA,QAAAE;AAAA,IAAuB;AAE3B,IAAA3C,EAAA4C,GAAAF,CAAA;AAEA,UAAAG,IAAAhB,EAAA,MAAAY,EAAA,SAAApD,EAAA,KAAA,GAEAyD,IAAAC,EAAAzC,CAAA,GACAT,IAAAkD,EAAA9C,CAAA,GAEA,EAAA,IAAAI,GAAA,eAAAH,EAAA,IAAA4C,EAAA;AAAA,MAA0C,SAAAnC;AAAA,MACtC,UAAAH;AAAA,MACA,cAAAC;AAAA,MACA,QAAAG;AAAA,MACA,OAAAiC;AAAA,MACO,2BAAAnC;AAAA,MACP,eAAArB,EAAA;AAAA,IACqB,CAAA;AAGzB,WAAA+C,EAAA,MAAAlC,EAAA,CAAA;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import { defineComponent as m, useSlots as f, computed as s } from "vue";
2
2
  import { B as v } from "./typography.C8lPlsbD.js";
3
3
  import { u as b } from "./aria-label.CaUURpnB.js";
4
4
  import { g as r } from "./get-slot-text.Bjb9dTSV.js";
5
- import { b as g } from "./tooltip.CnkqMpOA.js";
5
+ import { b as g } from "./tooltip.CGeGVHyl.js";
6
6
  import { n as h } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
7
7
  import "../assets/tag.css";
8
8
  var i = /* @__PURE__ */ ((e) => (e.GREY = "grey", e.BLUE = "blue", e.GREEN = "green", e.ORANGE = "orange", e.RED = "red", e.WHITE = "white", e))(i || {});
@@ -41,4 +41,4 @@ export {
41
41
  L as B,
42
42
  i as a
43
43
  };
44
- //# sourceMappingURL=tag.CbNFG45Y.js.map
44
+ //# sourceMappingURL=tag.XeZzHnx_.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tag.CbNFG45Y.js","sources":["../../src/components/tag/tag.types.ts","../../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 Since v2.0.0. Use 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 = defineProps({\n label: { default: null },\n truncate: { default: null },\n variant: { default: 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__","slots","useSlots","hasSlot","name","hasTextContent","computed","props","getSlotText","computedAriaLabel","useAriaLabel","tagConditionalClasses","textFromSlot","shouldShowTooltip","formattedText"],"mappings":";;;;;;;AAoBO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,OAAA,QACAA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,MAAA,OACAA,EAAA,QAAA,SANQA,IAAAD,KAAA,CAAA,CAAA;AC2CR,MAAAE,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;iBAhCAC,IAAAC,EAAA,GAIAC,IAAA,CAAAC,MAAA,CAAA,CAAAH,EAAAG,CAAA,GAEAC,IAAAC,EAAA,MAAA,CAAA,EAAAC,EAAA,SAAAC,EAAAP,CAAA,EAAA,SAAA,EAAA,GAEAQ,IAAAC,EAAA;AAAA,MAAuC,OAAAH,EAAA,SAAAC,EAAAP,CAAA,EAAA,SAAA;AAAA,MACe,iBAAA;AAAA,IACjC,CAAA,GAGrBU,IAAAL,EAAA,OAAA;AAAA,MAA8C,CAAA,UAAAC,EAAA,OAAA,EAAA,GAAAA,EAAA;AAAA,IACP,EAAA,GAGvCK,IAAAN,EAAA,MAAAC,EAAA,SAAAC,EAAAP,CAAA,EAAA,SAAA,KAAA,KAAA,GACAY,IAAAP,EAAA,MAAAC,EAAA,YAAAK,EAAA,MAAA,SAAAL,EAAA,QAAA,GAEAO,IAAAR,EAAA,MACIC,EAAA,YAIAM,EAAA,QAAA,GAAAD,EAAA,MAAA,MAAA,GAAAL,EAAA,QAAA,CAAA,QAHIK,EAAA,KAGgG;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"tag.XeZzHnx_.js","sources":["../../src/components/tag/tag.types.ts","../../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 Since v2.0.0. Use 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 = defineProps({\n label: { default: null },\n truncate: { default: null },\n variant: { default: 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__","slots","useSlots","hasSlot","name","hasTextContent","computed","props","getSlotText","computedAriaLabel","useAriaLabel","tagConditionalClasses","textFromSlot","shouldShowTooltip","formattedText"],"mappings":";;;;;;;AAoBO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,OAAA,QACAA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,MAAA,OACAA,EAAA,QAAA,SANQA,IAAAD,KAAA,CAAA,CAAA;AC2CR,MAAAE,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;iBAhCAC,IAAAC,EAAA,GAIAC,IAAA,CAAAC,MAAA,CAAA,CAAAH,EAAAG,CAAA,GAEAC,IAAAC,EAAA,MAAA,CAAA,EAAAC,EAAA,SAAAC,EAAAP,CAAA,EAAA,SAAA,EAAA,GAEAQ,IAAAC,EAAA;AAAA,MAAuC,OAAAH,EAAA,SAAAC,EAAAP,CAAA,EAAA,SAAA;AAAA,MACe,iBAAA;AAAA,IACjC,CAAA,GAGrBU,IAAAL,EAAA,OAAA;AAAA,MAA8C,CAAA,UAAAC,EAAA,OAAA,EAAA,GAAAA,EAAA;AAAA,IACP,EAAA,GAGvCK,IAAAN,EAAA,MAAAC,EAAA,SAAAC,EAAAP,CAAA,EAAA,SAAA,KAAA,KAAA,GACAY,IAAAP,EAAA,MAAAC,EAAA,YAAAK,EAAA,MAAA,SAAAL,EAAA,QAAA,GAEAO,IAAAR,EAAA,MACIC,EAAA,YAIAM,EAAA,QAAA,GAAAD,EAAA,MAAA,MAAA,GAAAL,EAAA,QAAA,CAAA,QAHIK,EAAA,KAGgG;;;;;;;;;;;;;;;;"}
@@ -9,7 +9,7 @@ import { u as ye } from "./index.B6WW_F-J.js";
9
9
  import { u as _e } from "./form-field.D_2g7vaP.js";
10
10
  import { u as ve } from "./use-form-layout-loading.CWbjZiwP.js";
11
11
  import { b as Ce } from "./es6.Cu3DYUPA.js";
12
- import { F as ge } from "./field-label.CdVbAfK-.js";
12
+ import { F as ge } from "./field-label.CkMM3cXO.js";
13
13
  import { E as Le } from "./error-message.CyERcfdt.js";
14
14
  import { n as Ee } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
15
15
  import "../assets/textarea.css";
@@ -216,4 +216,4 @@ const Ve = Ie.exports;
216
216
  export {
217
217
  Ve as B
218
218
  };
219
- //# sourceMappingURL=textarea.DJ7095b6.js.map
219
+ //# sourceMappingURL=textarea.CbCrtcQ2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.DJ7095b6.js","sources":["../../src/components/textarea/textarea.types.ts","../../src/components/textarea/textarea.vue"],"sourcesContent":["import type { FormField } from '../../types/form-field';\n\n/**\n * @deprecated Since v2.0.0. Use 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 Since v2.0.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 :aria-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 { BBorderWidthAttention } 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 = defineProps({\n description: { default: '' },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: '' },\n label: { default: '' },\n optional: { type: Boolean, default: false },\n placeholder: { default: '' },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n ariaLabel: { default: undefined },\n characterLimit: { default: undefined },\n clearable: { type: Boolean, default: false },\n height: { default: null },\n resizable: { default: 'both' },\n value: { default: '' },\n modelValue: { default: '' }\n});\n\n const emit = defineEmits([]);\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(BBorderWidthAttention);\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","BBorderWidthAttention","__default__","messages","attrs","useAttrs","height","toRefs","props","textareaId","generateUid","textareaElement","ref","textareaComponent","textareaValue","defaultTextareaHeight","textareaHeight","userSetHeight","textareaWrapperWidth","isUserResizing","textareaElementObserver","textareaComponentObserver","t","n","useI18n","isReadOnly","useFormLayoutFieldLoading","toRef","emitValue","useFormFieldEmits","emit","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","focus","expose","onMounted","observeSizeOfElement","deprecate","onUnmounted"],"mappings":";;;;;;;;;;;;;;;AAYO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOLE,IAAA,kBAAAC,OACHA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCqWRE,IAAA,WAAAC,EAAA,GAEAC,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAAA,EACM,MAAA;AAAA,EACX,OAAA,EAAA,MAAA,aAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;iBAtRAC,IAAAC,GAAA,GAuBA,EAAA,QAAAC,EAAA,IAAAC,EAAAC,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AAAL,EAAA,MAAA,MAAA,SAKJqD,KAAA,CAAAC;AACI;AAIJ,YAAAC,MAAAjC,IAAApB,KAAA,gBAAAA,EAAA,UAAA,gBAAAoB,EAAA;AAGA,MAAA,CAAAgC,KAAA,SAAAA,GAAA,EAAA,IAAAC,KACIhD,EAAA,QAAA,SAGAA,EAAA,QAAA+C;AAAA,IACJ,GAGJE,IAAA,MAAA;AACI,MAAAxD,EAAA,MAAA,MAAA;AAAA,IAA4B;AAGhC,WAAAyD,EAAA;AAAA,MAAa,OAAAD;AAAA,IACT,CAAA,GAGJE,GAAA,MAAA;AACI,MAAAjD,IAAAkD,EAAA3D,EAAA,OAAA,MAAA;AACI,QAAAoD,EAAA,EAAA;AAAA,MAA0B,CAAA,GAG9B1C,IAAAiD,EAAAzD,EAAA,OAAA,MAAA;AACI,QAAAkD,EAAA;AAAA,MAAsB,CAAA,GAG1B7B,EAAA,SACIE,EAAA,GAGJ5B,EAAA,SACI+D;AAAA,QAAA;AAAA,QACI;AAAA;AAAA,QACA;AAAA,MAEA;AAAA,IAER,CAAA,GAGJC,GAAA,MAAA;AACI,MAAApD,KAAA,QAAAA,EAAA,cACAC,KAAA,QAAAA,EAAA;AAAA,IAAsC,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"textarea.CbCrtcQ2.js","sources":["../../src/components/textarea/textarea.types.ts","../../src/components/textarea/textarea.vue"],"sourcesContent":["import type { FormField } from '../../types/form-field';\n\n/**\n * @deprecated Since v2.0.0. Use 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 Since v2.0.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 :aria-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 { BBorderWidthAttention } 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 = defineProps({\n description: { default: '' },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: '' },\n label: { default: '' },\n optional: { type: Boolean, default: false },\n placeholder: { default: '' },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n ariaLabel: { default: undefined },\n characterLimit: { default: undefined },\n clearable: { type: Boolean, default: false },\n height: { default: null },\n resizable: { default: 'both' },\n value: { default: '' },\n modelValue: { default: '' }\n});\n\n const emit = defineEmits([]);\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(BBorderWidthAttention);\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","BBorderWidthAttention","__default__","messages","attrs","useAttrs","height","toRefs","props","textareaId","generateUid","textareaElement","ref","textareaComponent","textareaValue","defaultTextareaHeight","textareaHeight","userSetHeight","textareaWrapperWidth","isUserResizing","textareaElementObserver","textareaComponentObserver","t","n","useI18n","isReadOnly","useFormLayoutFieldLoading","toRef","emitValue","useFormFieldEmits","emit","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","focus","expose","onMounted","observeSizeOfElement","deprecate","onUnmounted"],"mappings":";;;;;;;;;;;;;;;AAYO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOLE,IAAA,kBAAAC,OACHA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCqWRE,IAAA,WAAAC,EAAA,GAEAC,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAAA,EACM,MAAA;AAAA,EACX,OAAA,EAAA,MAAA,aAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;iBAtRAC,IAAAC,GAAA,GAuBA,EAAA,QAAAC,EAAA,IAAAC,EAAAC,CAAA,GAEAC,IAAAC,GAAA,UAAA,GACAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAAJ,EAAA,cAAAA,EAAA,KAAA,GACAO,IAAA,IACAC,IAAAJ,EAAAJ,EAAA,UAAA,GAAAO,CAAA,IAAA,GACAE,IAAAL,EAAA,CAAA,GACAM,IAAAN,EAAA,MAAA,GACAO,IAA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AxD,EAAA,MAAA,MAAA;AAAA,IAA4B;AAGhC,WAAAyD,EAAA;AAAA,MAAa,OAAAD;AAAA,IACT,CAAA,GAGJE,GAAA,MAAA;AACI,MAAAjD,IAAAkD,EAAA3D,EAAA,OAAA,MAAA;AACI,QAAAoD,EAAA,EAAA;AAAA,MAA0B,CAAA,GAG9B1C,IAAAiD,EAAAzD,EAAA,OAAA,MAAA;AACI,QAAAkD,EAAA;AAAA,MAAsB,CAAA,GAG1B7B,EAAA,SACIE,EAAA,GAGJ5B,EAAA,SACI+D;AAAA,QAAA;AAAA,QACI;AAAA;AAAA,QACA;AAAA,MAEA;AAAA,IAER,CAAA,GAGJC,GAAA,MAAA;AACI,MAAApD,KAAA,QAAAA,EAAA,cACAC,KAAA,QAAAA,EAAA;AAAA,IAAsC,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as S, computed as o, ref as N, toRefs as X, watch as Z, provide as A, nextTick as Q, useSlots as ee, inject as k, onUnmounted as te } from "vue";
2
2
  import { B as H } from "./button.DITA6YtS.js";
3
- import { B as se } from "./textarea.DJ7095b6.js";
3
+ import { B as se } from "./textarea.CbCrtcQ2.js";
4
4
  import { u as J } from "./index.B6WW_F-J.js";
5
- import { B as ae } from "./button-actions.DKc63aCb.js";
5
+ import { B as ae } from "./button-actions.BD4Dyp4U.js";
6
6
  import { n as R } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
7
- import { B as ie } from "./dashed-underline.CfEmbgOv.js";
8
- import { B as ne } from "./date.B0m0sFP6.js";
7
+ import { B as ie } from "./dashed-underline.BoHt4iGu.js";
8
+ import { B as ne } from "./date.C1HnIyOv.js";
9
9
  import { B as oe } from "./link.BpuCRgok.js";
10
- import { B as re } from "./tag.CbNFG45Y.js";
10
+ import { B as re } from "./tag.XeZzHnx_.js";
11
11
  import { d as le, B as me } from "./typography.C8lPlsbD.js";
12
- import { S as de, a as ce, B as ue } from "./structured-list-item.DE0L0kvs.js";
12
+ import { S as de, a as ce, B as ue } from "./structured-list-item.CL1jhdTX.js";
13
13
  /* empty css */
14
14
  import { g as _e } from "./generate-uid.NJ8tVoha.js";
15
15
  import { u as pe } from "./use-has-slot.C9lQZ6nz.js";
@@ -319,4 +319,4 @@ export {
319
319
  Ce as d,
320
320
  st as t
321
321
  };
322
- //# sourceMappingURL=timeline-item.DzMh520x.js.map
322
+ //# sourceMappingURL=timeline-item.BVOztUi9.js.map