@adyen/bento-vue3 1.55.1 → 1.56.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 (227) hide show
  1. package/dist/@types/index.d.ts +844 -289
  2. package/dist/accordion.js +1 -1
  3. package/dist/action-bar.js +1 -1
  4. package/dist/alert.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.css +1 -1
  9. package/dist/assets/card.css +1 -1
  10. package/dist/assets/code-snippet.css +1 -1
  11. package/dist/assets/dashed-underline.css +1 -1
  12. package/dist/assets/data-grid-template.css +1 -1
  13. package/dist/assets/data-grid.css +1 -1
  14. package/dist/assets/dialog-page.css +1 -1
  15. package/dist/assets/file-uploader.css +1 -1
  16. package/dist/assets/filter-bar.css +1 -1
  17. package/dist/assets/input-field-password.css +1 -1
  18. package/dist/assets/inspector.css +1 -1
  19. package/dist/assets/menu.css +1 -1
  20. package/dist/assets/modal-fullscreen.css +1 -1
  21. package/dist/assets/popover.css +1 -1
  22. package/dist/assets/sidepanel.css +1 -1
  23. package/dist/assets/summary-grid.css +1 -1
  24. package/dist/assets/tabs.css +1 -1
  25. package/dist/assets/teleport.css +1 -1
  26. package/dist/assets/timeline-item.css +1 -1
  27. package/dist/button.js +3 -3
  28. package/dist/card.js +1 -1
  29. package/dist/checkbox.js +2 -2
  30. package/dist/chip.js +1 -1
  31. package/dist/chunks/{accordion-item.DLyCF015.js → accordion-item.CihL7JaZ.js} +2 -2
  32. package/dist/chunks/{accordion-item.DLyCF015.js.map → accordion-item.CihL7JaZ.js.map} +1 -1
  33. package/dist/chunks/{action-bar.CDOaDenE.js → action-bar.CD5FQjE9.js} +6 -6
  34. package/dist/chunks/{action-bar.CDOaDenE.js.map → action-bar.CD5FQjE9.js.map} +1 -1
  35. package/dist/chunks/{alert.4SefwHLO.js → alert.CFb4Sejw.js} +3 -3
  36. package/dist/chunks/{alert.4SefwHLO.js.map → alert.CFb4Sejw.js.map} +1 -1
  37. package/dist/chunks/{base-modal.DZy1WuJs.js → base-modal.qhldLovE.js} +5 -5
  38. package/dist/chunks/{base-modal.DZy1WuJs.js.map → base-modal.qhldLovE.js.map} +1 -1
  39. package/dist/chunks/{button-actions-with-menu.DQRTu42W.js → button-actions-with-menu.CxB1fVvx.js} +4 -4
  40. package/dist/chunks/{button-actions-with-menu.DQRTu42W.js.map → button-actions-with-menu.CxB1fVvx.js.map} +1 -1
  41. package/dist/chunks/{button-actions.N99QthUv.js → button-actions.ODJKaCW7.js} +3 -3
  42. package/dist/chunks/{button-actions.N99QthUv.js.map → button-actions.ODJKaCW7.js.map} +1 -1
  43. package/dist/chunks/{button.DEVuqLVT.js → button.BHZgsGkp.js} +43 -41
  44. package/dist/chunks/button.BHZgsGkp.js.map +1 -0
  45. package/dist/chunks/{calendar.CNt90BvO.js → calendar.Dymq4e0Y.js} +4 -4
  46. package/dist/chunks/{calendar.CNt90BvO.js.map → calendar.Dymq4e0Y.js.map} +1 -1
  47. package/dist/chunks/{card.E2xhS_6Z.js → card.DQ6g6hqK.js} +3 -3
  48. package/dist/chunks/{card.E2xhS_6Z.js.map → card.DQ6g6hqK.js.map} +1 -1
  49. package/dist/chunks/{checkbox-group.BMzsgOeI.js → checkbox-group.DFmUrvgx.js} +4 -4
  50. package/dist/chunks/{checkbox-group.BMzsgOeI.js.map → checkbox-group.DFmUrvgx.js.map} +1 -1
  51. package/dist/chunks/{checkbox.BIaD03Bg.js → checkbox.Bti_jnp2.js} +17 -17
  52. package/dist/chunks/{checkbox.BIaD03Bg.js.map → checkbox.Bti_jnp2.js.map} +1 -1
  53. package/dist/chunks/{chip.3T0x6FuI.js → chip.DbhxDQiT.js} +2 -2
  54. package/dist/chunks/{chip.3T0x6FuI.js.map → chip.DbhxDQiT.js.map} +1 -1
  55. package/dist/chunks/code-snippet.Df5XwyWD.js +334 -0
  56. package/dist/chunks/code-snippet.Df5XwyWD.js.map +1 -0
  57. package/dist/chunks/{controls-group.DJqvAWte.js → controls-group.DgrzEh4C.js} +2 -2
  58. package/dist/chunks/{controls-group.DJqvAWte.js.map → controls-group.DgrzEh4C.js.map} +1 -1
  59. package/dist/chunks/{copy.MId-I684.js → copy.CfFh4b_c.js} +3 -3
  60. package/dist/chunks/{copy.MId-I684.js.map → copy.CfFh4b_c.js.map} +1 -1
  61. package/dist/chunks/{country.D0WFfaql.js → country.BhAcCmRx.js} +2 -2
  62. package/dist/chunks/{country.D0WFfaql.js.map → country.BhAcCmRx.js.map} +1 -1
  63. package/dist/chunks/{dashboard-section.CrbSjoA8.js → dashboard-section.tza4iYcv.js} +3 -3
  64. package/dist/chunks/{dashboard-section.CrbSjoA8.js.map → dashboard-section.tza4iYcv.js.map} +1 -1
  65. package/dist/chunks/dashed-underline.B2cIJkg_.js +98 -0
  66. package/dist/chunks/dashed-underline.B2cIJkg_.js.map +1 -0
  67. package/dist/chunks/data-grid-template.PGPytWvk.js +111 -0
  68. package/dist/chunks/data-grid-template.PGPytWvk.js.map +1 -0
  69. package/dist/chunks/{data-grid.CsyayKK3.js → data-grid.DsZQ-F9m.js} +1328 -1299
  70. package/dist/chunks/data-grid.DsZQ-F9m.js.map +1 -0
  71. package/dist/chunks/{date-picker.CjwoOQ3B.js → date-picker.8jgg3MJm.js} +7 -7
  72. package/dist/chunks/{date-picker.CjwoOQ3B.js.map → date-picker.8jgg3MJm.js.map} +1 -1
  73. package/dist/chunks/{date-range-picker.DGY91Rwc.js → date-range-picker.uGwtO7SA.js} +10 -10
  74. package/dist/chunks/{date-range-picker.DGY91Rwc.js.map → date-range-picker.uGwtO7SA.js.map} +1 -1
  75. package/dist/chunks/{date.DoJuTLhO.js → date.CKXySBQv.js} +2 -2
  76. package/dist/chunks/{date.DoJuTLhO.js.map → date.CKXySBQv.js.map} +1 -1
  77. package/dist/chunks/{dialog-page.BRlAYf5w.js → dialog-page.MLFdqTcL.js} +3 -3
  78. package/dist/chunks/{dialog-page.BRlAYf5w.js.map → dialog-page.MLFdqTcL.js.map} +1 -1
  79. package/dist/chunks/{dropdown-default-textbox.CTyt2klK.js → dropdown-default-textbox.BNhy-QDH.js} +2 -2
  80. package/dist/chunks/{dropdown-default-textbox.CTyt2klK.js.map → dropdown-default-textbox.BNhy-QDH.js.map} +1 -1
  81. package/dist/chunks/{dropdown-tag.CJtSH5cZ.js → dropdown-tag.DEAOevYN.js} +3 -3
  82. package/dist/chunks/{dropdown-tag.CJtSH5cZ.js.map → dropdown-tag.DEAOevYN.js.map} +1 -1
  83. package/dist/chunks/{dropdown.CQvyjn6d.js → dropdown.CVa4_qCe.js} +6 -6
  84. package/dist/chunks/{dropdown.CQvyjn6d.js.map → dropdown.CVa4_qCe.js.map} +1 -1
  85. package/dist/chunks/{empty-state.m0U14LVw.js → empty-state.DiXLZmQJ.js} +2 -2
  86. package/dist/chunks/{empty-state.m0U14LVw.js.map → empty-state.DiXLZmQJ.js.map} +1 -1
  87. package/dist/chunks/{error-message.CMgsMDny.js → error-message.CPw3y44N.js} +2 -2
  88. package/dist/chunks/{error-message.CMgsMDny.js.map → error-message.CPw3y44N.js.map} +1 -1
  89. package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
  90. package/dist/chunks/{file-uploader.D3KUe-MO.js → file-uploader.Dv4sh1IO.js} +477 -452
  91. package/dist/chunks/file-uploader.Dv4sh1IO.js.map +1 -0
  92. package/dist/chunks/filter-bar.DfIcZ5dX.js +2886 -0
  93. package/dist/chunks/filter-bar.DfIcZ5dX.js.map +1 -0
  94. package/dist/chunks/{fixed-scroller.BNP4SR5J.js → fixed-scroller.DsTyshyt.js} +3 -3
  95. package/dist/chunks/{fixed-scroller.BNP4SR5J.js.map → fixed-scroller.DsTyshyt.js.map} +1 -1
  96. package/dist/chunks/{footer-actions.DmGDpPBW.js → footer-actions.C00o4tuW.js} +3 -3
  97. package/dist/chunks/{footer-actions.DmGDpPBW.js.map → footer-actions.C00o4tuW.js.map} +1 -1
  98. package/dist/chunks/{form-layout-title.P5ajTo4C.js → form-layout-title.dcT8eXwc.js} +2 -2
  99. package/dist/chunks/{form-layout-title.P5ajTo4C.js.map → form-layout-title.dcT8eXwc.js.map} +1 -1
  100. package/dist/chunks/{header-with-views.BJIQZVAq.js → header-with-views.DEn9HFkT.js} +14 -14
  101. package/dist/chunks/{header-with-views.BJIQZVAq.js.map → header-with-views.DEn9HFkT.js.map} +1 -1
  102. package/dist/chunks/{header.vHSsdURt.js → header.hDkWwQuQ.js} +5 -5
  103. package/dist/chunks/{header.vHSsdURt.js.map → header.hDkWwQuQ.js.map} +1 -1
  104. package/dist/chunks/{i18n.D9azDLPe.js → i18n.B6g5VX0q.js} +1050 -1020
  105. package/dist/chunks/i18n.B6g5VX0q.js.map +1 -0
  106. package/dist/chunks/{info-icon-with-popover.CXaaxjeT.js → info-icon-with-popover.COJrCw_o.js} +3 -3
  107. package/dist/chunks/{info-icon-with-popover.CXaaxjeT.js.map → info-icon-with-popover.COJrCw_o.js.map} +1 -1
  108. package/dist/chunks/{input-field-password.CWr26esx.js → input-field-password._CliYJ7N.js} +86 -81
  109. package/dist/chunks/{input-field-password.CWr26esx.js.map → input-field-password._CliYJ7N.js.map} +1 -1
  110. package/dist/chunks/{input-field-phone-number.zf8WxBCn.js → input-field-phone-number.WPcQbE3z.js} +4 -4
  111. package/dist/chunks/{input-field-phone-number.zf8WxBCn.js.map → input-field-phone-number.WPcQbE3z.js.map} +1 -1
  112. package/dist/chunks/{input-field.CR262X1w.js → input-field.Cr1r2STY.js} +4 -4
  113. package/dist/chunks/{input-field.CR262X1w.js.map → input-field.Cr1r2STY.js.map} +1 -1
  114. package/dist/chunks/{inspector.types.YK45k4D_.js → inspector.types.D5QBC3-G.js} +3 -3
  115. package/dist/chunks/{inspector.types.YK45k4D_.js.map → inspector.types.D5QBC3-G.js.map} +1 -1
  116. package/dist/chunks/{menu.CVMSGvtb.js → menu.B0q9q97N.js} +17 -16
  117. package/dist/chunks/{menu.CVMSGvtb.js.map → menu.B0q9q97N.js.map} +1 -1
  118. package/dist/chunks/{modal-fullscreen.Cqlf6PWo.js → modal-fullscreen.BgqNc9jE.js} +5 -5
  119. package/dist/chunks/{modal-fullscreen.Cqlf6PWo.js.map → modal-fullscreen.BgqNc9jE.js.map} +1 -1
  120. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.dXxru4S9.js → modal.vue_vue_type_script_setup_true_lang.Dr847POU.js} +6 -6
  121. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.dXxru4S9.js.map → modal.vue_vue_type_script_setup_true_lang.Dr847POU.js.map} +1 -1
  122. package/dist/chunks/{pagination.C65tc-nX.js → pagination.Bi5BwIWq.js} +4 -4
  123. package/dist/chunks/{pagination.C65tc-nX.js.map → pagination.Bi5BwIWq.js.map} +1 -1
  124. package/dist/chunks/{popover.DjbACET6.js → popover.R5OM_tFu.js} +3 -3
  125. package/dist/chunks/{popover.DjbACET6.js.map → popover.R5OM_tFu.js.map} +1 -1
  126. package/dist/chunks/{promo-banner.ZCfJQh-S.js → promo-banner.DFt2dVxk.js} +3 -3
  127. package/dist/chunks/{promo-banner.ZCfJQh-S.js.map → promo-banner.DFt2dVxk.js.map} +1 -1
  128. package/dist/chunks/{radio-group.Tgf3BF5X.js → radio-group.muZVaVEm.js} +3 -3
  129. package/dist/chunks/{radio-group.Tgf3BF5X.js.map → radio-group.muZVaVEm.js.map} +1 -1
  130. package/dist/chunks/{search-bar.CTn5DIQZ.js → search-bar.DlVK3bBQ.js} +4 -4
  131. package/dist/chunks/{search-bar.CTn5DIQZ.js.map → search-bar.DlVK3bBQ.js.map} +1 -1
  132. package/dist/chunks/{secondary-nav.CnE-aV2P.js → secondary-nav.CIEVFTYS.js} +3 -3
  133. package/dist/chunks/{secondary-nav.CnE-aV2P.js.map → secondary-nav.CIEVFTYS.js.map} +1 -1
  134. package/dist/chunks/{selection-card-group.C2OFZgKd.js → selection-card-group.BgANSy3b.js} +11 -11
  135. package/dist/chunks/{selection-card-group.C2OFZgKd.js.map → selection-card-group.BgANSy3b.js.map} +1 -1
  136. package/dist/chunks/{sidepanel.Drn-lKR3.js → sidepanel.BjR0Ab22.js} +5 -5
  137. package/dist/chunks/{sidepanel.Drn-lKR3.js.map → sidepanel.BjR0Ab22.js.map} +1 -1
  138. package/dist/chunks/{step.BGFaHGFO.js → step.7l-t-eN9.js} +2 -2
  139. package/dist/chunks/{step.BGFaHGFO.js.map → step.7l-t-eN9.js.map} +1 -1
  140. package/dist/chunks/{structured-list-item.CWiwoP5F.js → structured-list-item.BMsATRrU.js} +4 -4
  141. package/dist/chunks/{structured-list-item.CWiwoP5F.js.map → structured-list-item.BMsATRrU.js.map} +1 -1
  142. package/dist/chunks/{summary-grid.types.DOYW579A.js → summary-grid.types.lGX16F4w.js} +126 -114
  143. package/dist/chunks/summary-grid.types.lGX16F4w.js.map +1 -0
  144. package/dist/chunks/{tabs.DZk78MLK.js → tabs.BVuOvNxx.js} +17 -17
  145. package/dist/chunks/{tabs.DZk78MLK.js.map → tabs.BVuOvNxx.js.map} +1 -1
  146. package/dist/chunks/{teleport.zSiKZmRE.js → teleport.CfGWjxe2.js} +17 -26
  147. package/dist/chunks/teleport.CfGWjxe2.js.map +1 -0
  148. package/dist/chunks/{textarea.CR7su54i.js → textarea.CAc_VYFm.js} +4 -4
  149. package/dist/chunks/{textarea.CR7su54i.js.map → textarea.CAc_VYFm.js.map} +1 -1
  150. package/dist/chunks/timeline-item.BQ4qiBii.js +567 -0
  151. package/dist/chunks/timeline-item.BQ4qiBii.js.map +1 -0
  152. package/dist/chunks/{toast.DxVfamh-.js → toast.BOpWHAfu.js} +3 -3
  153. package/dist/chunks/{toast.DxVfamh-.js.map → toast.BOpWHAfu.js.map} +1 -1
  154. package/dist/chunks/{toggle-button.D-9TFTy8.js → toggle-button.E0VQtyEX.js} +2 -2
  155. package/dist/chunks/{toggle-button.D-9TFTy8.js.map → toggle-button.E0VQtyEX.js.map} +1 -1
  156. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.ENhKvQLv.js → tutorial.vue_vue_type_script_setup_true_lang.CTx9Z9xB.js} +5 -5
  157. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.ENhKvQLv.js.map → tutorial.vue_vue_type_script_setup_true_lang.CTx9Z9xB.js.map} +1 -1
  158. package/dist/chunks/{use-cached-selected-values.CQKeFUJd.js → use-cached-selected-values.DHUa2Emx.js} +6 -6
  159. package/dist/chunks/{use-cached-selected-values.CQKeFUJd.js.map → use-cached-selected-values.DHUa2Emx.js.map} +1 -1
  160. package/dist/chunks/use-click-outside.BnhTgpSt.js +14 -0
  161. package/dist/chunks/use-click-outside.BnhTgpSt.js.map +1 -0
  162. package/dist/chunks/{use-country-items.BMhCqIWd.js → use-country-items.4kZgVg_l.js} +2 -2
  163. package/dist/chunks/{use-country-items.BMhCqIWd.js.map → use-country-items.4kZgVg_l.js.map} +1 -1
  164. package/dist/code-snippet.js +1 -1
  165. package/dist/country.js +1 -1
  166. package/dist/dashboard-template.js +1 -1
  167. package/dist/dashed-underline.js +1 -1
  168. package/dist/data-grid-template.js +1 -1
  169. package/dist/data-grid.js +1 -1
  170. package/dist/date-picker.js +2 -2
  171. package/dist/date-range-picker.js +2 -2
  172. package/dist/date.js +1 -1
  173. package/dist/dropdown.js +4 -4
  174. package/dist/empty-state.js +1 -1
  175. package/dist/file-uploader.js +1 -1
  176. package/dist/filter-bar.js +1 -1
  177. package/dist/form-layout.js +1 -1
  178. package/dist/header-with-views.js +1 -1
  179. package/dist/header.js +1 -1
  180. package/dist/index.js +55 -55
  181. package/dist/input-field-password.js +1 -1
  182. package/dist/input-field-phone-number.js +1 -1
  183. package/dist/input-field.js +1 -1
  184. package/dist/inspector.js +1 -1
  185. package/dist/internal.js +11 -11
  186. package/dist/menu.js +1 -1
  187. package/dist/modal-fullscreen.js +1 -1
  188. package/dist/modal.js +2 -2
  189. package/dist/pagination.js +1 -1
  190. package/dist/popover.js +1 -1
  191. package/dist/promo-banner.js +1 -1
  192. package/dist/radio-group.js +1 -1
  193. package/dist/search-bar.js +2 -2
  194. package/dist/secondary-nav.js +1 -1
  195. package/dist/selection-card.js +1 -1
  196. package/dist/sidepanel.js +1 -1
  197. package/dist/stepper.js +1 -1
  198. package/dist/structured-list.js +1 -1
  199. package/dist/styles/bento-dark.css +13 -2
  200. package/dist/styles/bento-light.css +13 -2
  201. package/dist/styles/bento.css +13 -2
  202. package/dist/styles/legacy.css +14 -4
  203. package/dist/styles/styleguide.css +13 -2
  204. package/dist/summary-grid.js +1 -1
  205. package/dist/tabs.js +1 -1
  206. package/dist/textarea.js +1 -1
  207. package/dist/timeline.js +1 -1
  208. package/dist/toast.js +1 -1
  209. package/dist/tutorial.js +1 -1
  210. package/dist/web-types.json +1 -1
  211. package/package.json +5 -5
  212. package/dist/chunks/button.DEVuqLVT.js.map +0 -1
  213. package/dist/chunks/code-snippet.DJgiqDzZ.js +0 -422
  214. package/dist/chunks/code-snippet.DJgiqDzZ.js.map +0 -1
  215. package/dist/chunks/dashed-underline.DWhGZIhS.js +0 -80
  216. package/dist/chunks/dashed-underline.DWhGZIhS.js.map +0 -1
  217. package/dist/chunks/data-grid-template.LlK-7o84.js +0 -93
  218. package/dist/chunks/data-grid-template.LlK-7o84.js.map +0 -1
  219. package/dist/chunks/data-grid.CsyayKK3.js.map +0 -1
  220. package/dist/chunks/file-uploader.D3KUe-MO.js.map +0 -1
  221. package/dist/chunks/filter-bar.cRJmUX-v.js +0 -2771
  222. package/dist/chunks/filter-bar.cRJmUX-v.js.map +0 -1
  223. package/dist/chunks/i18n.D9azDLPe.js.map +0 -1
  224. package/dist/chunks/summary-grid.types.DOYW579A.js.map +0 -1
  225. package/dist/chunks/teleport.zSiKZmRE.js.map +0 -1
  226. package/dist/chunks/timeline-item.BhQp0ICP.js +0 -560
  227. package/dist/chunks/timeline-item.BhQp0ICP.js.map +0 -1
@@ -0,0 +1,567 @@
1
+ import { defineComponent as oe, computed as m, ref as $, toRefs as ce, provide as H, nextTick as fe, resolveComponent as T, createElementBlock as v, openBlock as n, createCommentVNode as u, createElementVNode as g, createBlock as S, withCtx as h, createTextVNode as I, toDisplayString as y, createVNode as C, renderSlot as V, mergeProps as q, inject as W, onUnmounted as ve, normalizeClass as Z, Fragment as z, renderList as pe } from "vue";
2
+ import { B as ae } from "./button.BHZgsGkp.js";
3
+ import { B as _e } from "./textarea.CAc_VYFm.js";
4
+ import { u as se } from "./i18n.B6g5VX0q.js";
5
+ import { B as be } from "./button-actions.ODJKaCW7.js";
6
+ import { _ as J } from "./_plugin-vue_export-helper.CHgC5LLL.js";
7
+ import { B as he } from "./date.CKXySBQv.js";
8
+ import { B as ge } from "./link.D3Fq5tt_.js";
9
+ import { B as ye } from "./tag.CmYkknFj.js";
10
+ import { B as Ne, d as Te } from "./typography.DN5eC5ch.js";
11
+ import { a as Ee, B as Ie, S as we } from "./structured-list-item.BMsATRrU.js";
12
+ /* empty css */
13
+ import { g as Se } from "./generate-uid.NJ8tVoha.js";
14
+ import { u as Ce } from "./use-has-slot.B7eQSabc.js";
15
+ import { r as Me, l as ke, t as U, a as G } from "./get-date-locale.BN8xEjY0.js";
16
+ import { c as Le } from "./index.DD7TppDb.js";
17
+ import { c as Ae } from "./index.BxBB1rsx.js";
18
+ import "../assets/timeline-item.css";
19
+ var Q = 1e3 * 60, Y = 60 * 24, X = Y * 30, x = Y * 365;
20
+ function ee(e, o) {
21
+ var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
22
+ Me(2, arguments);
23
+ var l = s.locale || ke;
24
+ if (!l.formatDistance)
25
+ throw new RangeError("locale must contain localize.formatDistance property");
26
+ var N = Le(e, o);
27
+ if (isNaN(N))
28
+ throw new RangeError("Invalid time value");
29
+ var r = Ae(s);
30
+ r.addSuffix = !!s.addSuffix, r.comparison = N;
31
+ var a, p;
32
+ N > 0 ? (a = U(o), p = U(e)) : (a = U(e), p = U(o));
33
+ var c = s.roundingMethod == null ? "round" : String(s.roundingMethod), t;
34
+ if (c === "floor")
35
+ t = Math.floor;
36
+ else if (c === "ceil")
37
+ t = Math.ceil;
38
+ else if (c === "round")
39
+ t = Math.round;
40
+ else
41
+ throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");
42
+ var E = p.getTime() - a.getTime(), _ = E / Q, f = G(p) - G(a), b = (E - f) / Q, i;
43
+ if (s.unit == null ? _ < 1 ? i = "second" : _ < 60 ? i = "minute" : _ < Y ? i = "hour" : b < X ? i = "day" : b < x ? i = "month" : i = "year" : i = String(s.unit), i === "second") {
44
+ var k = t(E / 1e3);
45
+ return l.formatDistance("xSeconds", k, r);
46
+ } else if (i === "minute") {
47
+ var A = t(_);
48
+ return l.formatDistance("xMinutes", A, r);
49
+ } else if (i === "hour") {
50
+ var B = t(_ / 60);
51
+ return l.formatDistance("xHours", B, r);
52
+ } else if (i === "day") {
53
+ var D = t(b / Y);
54
+ return l.formatDistance("xDays", D, r);
55
+ } else if (i === "month") {
56
+ var R = t(b / X);
57
+ return R === 12 && s.unit !== "month" ? l.formatDistance("xYears", 1, r) : l.formatDistance("xMonths", R, r);
58
+ } else if (i === "year") {
59
+ var L = t(b / x);
60
+ return l.formatDistance("xYears", L, r);
61
+ }
62
+ throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'");
63
+ }
64
+ var O = /* @__PURE__ */ ((e) => (e.BOTTOM = "bottom", e.AFTER_FIRST = "after-first", e.BEFORE_LAST = "before-last", e))(O || {}), Re = /* @__PURE__ */ ((e) => (e.SECOND = "second", e.MINUTE = "minute", e.HOUR = "hour", e.DAY = "day", e.MONTH = "month", e.YEAR = "year", e))(Re || {}), F = /* @__PURE__ */ ((e) => (e.DEFAULT = "SquareSmallIcon", e.SUCCESS = "CheckedCircleIcon", e.CRITICAL = "CrossCircleIcon", e))(F || {}), le = /* @__PURE__ */ ((e) => (e.BLACK = "black", e.BLUE = "blue", e.GREEN = "green", e.GREY = "grey", e.ORANGE = "orange", e.RED = "red", e.YELLOW = "yellow", e))(le || {});
65
+ const re = Symbol("timeline register entry injection key"), de = Symbol("timeline config obj injection key"), te = {
66
+ "en-US": {
67
+ addNote: "Add note",
68
+ cancel: "Cancel"
69
+ },
70
+ "ja-JP": {
71
+ addNote: "メモを追加",
72
+ cancel: "キャンセル"
73
+ },
74
+ "pt-BR": {
75
+ addNote: "Adicionar anotação",
76
+ cancel: "Cancelar"
77
+ }
78
+ }, $e = oe({
79
+ i18n: { messages: te },
80
+ name: "bento-timeline",
81
+ components: { BentoButton: ae, BentoButtonActions: be, BentoTextarea: _e },
82
+ props: {
83
+ /**
84
+ * If set to true, gives the possibility to manually add notes to the timeline via a textarea
85
+ */
86
+ addNote: {
87
+ type: Boolean,
88
+ default: !1
89
+ },
90
+ /**
91
+ * Object that determines the max number of items to show without clicking the show more button
92
+ * and where in the timeline is the show more button placed
93
+ */
94
+ showMore: {
95
+ type: Object,
96
+ default: null
97
+ },
98
+ /**
99
+ * Object that determines minimum amount of time for the automatic timegap indicator;
100
+ * Define a unit (hour, day, month) and an amount (e.g. { amount: 7, unit: 'days' }).
101
+ * If null, automatic timegap detection will be turned off
102
+ */
103
+ timegapLimit: {
104
+ type: Object,
105
+ default: null
106
+ }
107
+ },
108
+ emits: ["add-timeline-note"],
109
+ setup(e, { emit: o }) {
110
+ const { t: s } = se({ messages: te }), l = m(() => s("addNote")), N = m(() => s("cancel")), r = $(), a = (d) => {
111
+ r.value = d;
112
+ }, p = $(null), c = $(null), t = $(!1), E = async () => {
113
+ var d, w;
114
+ t.value = !t.value, await fe(), t.value ? (d = p.value.$refs.textareaElement) == null || d.focus() : (w = c.value.$el) == null || w.focus();
115
+ }, _ = () => {
116
+ o("add-timeline-note", {
117
+ description: r.value,
118
+ timestamp: { date: /* @__PURE__ */ new Date() },
119
+ type: "note"
120
+ }), E();
121
+ }, f = $([]), b = m(
122
+ () => e.showMore && f.value.length > e.showMore.limit ? f.value.length - e.showMore.limit : null
123
+ ), i = $(!1), { timegapLimit: k } = ce(e), A = m(() => {
124
+ if (!e.showMore)
125
+ return null;
126
+ const d = Array.from(f.value.keys());
127
+ return e.showMore.placement === O.BEFORE_LAST ? [
128
+ ...d.slice(0, e.showMore.limit - 1),
129
+ d[d.length - 1]
130
+ ] : e.showMore.placement === O.AFTER_FIRST ? [d[0], ...d.slice(-(e.showMore.limit - 1))] : d.slice(0, e.showMore.limit);
131
+ }), B = m(() => {
132
+ if (!e.showMore)
133
+ return null;
134
+ switch (e.showMore.placement) {
135
+ case O.BEFORE_LAST:
136
+ return e.showMore.limit - 2;
137
+ case O.AFTER_FIRST:
138
+ return 0;
139
+ case O.BOTTOM:
140
+ default:
141
+ return e.showMore.limit - 1;
142
+ }
143
+ }), D = (d) => () => {
144
+ var w;
145
+ f.value = (w = f.value) == null ? void 0 : w.filter((j, M) => M !== d);
146
+ }, R = ({ title: d, description: w, date: j }) => {
147
+ const M = f.value.length;
148
+ return f.value.push({ title: d, description: w, date: j }), { timelineEntries: f, index: M, unregisterTimelineEntry: D(M) };
149
+ }, L = {
150
+ showAll: i,
151
+ showMoreIndex: B,
152
+ hiddenItems: b,
153
+ visibleIndexes: A,
154
+ timegapLimit: k
155
+ };
156
+ return H(re, R), H(de, L), {
157
+ addNoteLabel: l,
158
+ cancelLabel: N,
159
+ toggleAddNote: E,
160
+ updateNoteContent: a,
161
+ addNoteToTimeline: _,
162
+ showAddNoteTextArea: t,
163
+ // refs
164
+ addNoteTextareaRef: p,
165
+ addNoteButtonRef: c
166
+ };
167
+ }
168
+ }), Oe = { class: "b-timeline" }, Be = {
169
+ key: 0,
170
+ class: "b-timeline__add-note-section"
171
+ }, De = { key: 1 }, je = { class: "b-timeline__items" };
172
+ function Ue(e, o, s, l, N, r) {
173
+ const a = T("bento-button"), p = T("bento-textarea"), c = T("bento-button-actions");
174
+ return n(), v("div", Oe, [
175
+ e.addNote ? (n(), v("div", Be, [
176
+ e.showAddNoteTextArea ? u("", !0) : (n(), S(a, {
177
+ key: 0,
178
+ ref: "addNoteButtonRef",
179
+ variant: "tertiary",
180
+ onClick: e.toggleAddNote
181
+ }, {
182
+ default: h(() => [
183
+ I(y(e.addNoteLabel), 1)
184
+ ]),
185
+ _: 1
186
+ }, 8, ["onClick"])),
187
+ e.showAddNoteTextArea ? (n(), v("div", De, [
188
+ C(p, {
189
+ ref: "addNoteTextareaRef",
190
+ label: e.addNoteLabel,
191
+ "character-limit": 150,
192
+ resizable: "vertical",
193
+ onInput: e.updateNoteContent
194
+ }, null, 8, ["label", "onInput"]),
195
+ C(c, {
196
+ actions: [
197
+ { title: e.addNoteLabel, event: e.addNoteToTimeline },
198
+ { title: e.cancelLabel, event: e.toggleAddNote }
199
+ ]
200
+ }, null, 8, ["actions"])
201
+ ])) : u("", !0)
202
+ ])) : u("", !0),
203
+ g("ol", je, [
204
+ V(e.$slots, "default", {}, void 0, !0)
205
+ ])
206
+ ]);
207
+ }
208
+ const ht = /* @__PURE__ */ J($e, [["render", Ue], ["__scopeId", "data-v-77b0b6c7"]]);
209
+ let ie = 0;
210
+ const Fe = {
211
+ beforeCreate() {
212
+ this.uuid = ie.toString(), ie += 1;
213
+ }
214
+ }, Ye = { key: 0 };
215
+ function ze(e, o, s, l, N, r) {
216
+ return n(), v("svg", q({ role: "img" }, e.$attrs, {
217
+ class: "ui-assets-icons-16",
218
+ xmlns: "http://www.w3.org/2000/svg",
219
+ width: "16",
220
+ height: "16",
221
+ fill: "none"
222
+ }), [
223
+ e.$attrs["svg-title"] ? (n(), v("title", Ye, y(e.$attrs["svg-title"]), 1)) : u("", !0),
224
+ o[0] || (o[0] = g("path", {
225
+ fill: "#00112C",
226
+ d: "M5.5 3.25C4.25736 3.25 3.25 4.25736 3.25 5.5V10.5C3.25 11.7426 4.25736 12.75 5.5 12.75H10.5C11.7426 12.75 12.75 11.7426 12.75 10.5V5.5C12.75 4.25736 11.7426 3.25 10.5 3.25H5.5Z"
227
+ }, null, -1))
228
+ ], 16);
229
+ }
230
+ const He = /* @__PURE__ */ J(Fe, [["render", ze]]), ne = {
231
+ "en-US": {
232
+ showLess: "Show less",
233
+ showMore: "Show {items} more",
234
+ timegap: "{timegap} passed between the timeline events"
235
+ },
236
+ "ja-JP": {
237
+ showLess: "表示内容を減らす"
238
+ },
239
+ "pt-BR": {
240
+ showLess: "Mostrar menos"
241
+ }
242
+ }, Ve = oe({
243
+ name: "bento-timeline-item",
244
+ components: {
245
+ BentoButton: ae,
246
+ BentoDate: he,
247
+ BentoLink: ge,
248
+ BentoTag: ye,
249
+ BentoTypography: Ne,
250
+ BentoStructuredList: Ie,
251
+ BentoStructuredListItem: Ee,
252
+ SquareSmallIcon: He
253
+ },
254
+ i18n: { messages: ne },
255
+ props: {
256
+ /**
257
+ * Additional timestamp of the event
258
+ */
259
+ additionalTimestamp: {
260
+ type: Object,
261
+ default: null
262
+ },
263
+ /**
264
+ * Relevant key-value pair data to display in the event
265
+ */
266
+ dataList: {
267
+ type: Array,
268
+ default: null
269
+ },
270
+ /**
271
+ * Description of the event
272
+ */
273
+ description: {
274
+ type: String,
275
+ default: null
276
+ },
277
+ /**
278
+ * Modifier that changes the color of the timeline icon
279
+ * @values blue, black, green, grey, orange, red, yellow
280
+ */
281
+ status: {
282
+ type: String,
283
+ default: "black",
284
+ validator: (e) => Object.values(le).includes(e)
285
+ },
286
+ /**
287
+ * Tag props that will be passed down to inner tag component
288
+ */
289
+ tag: {
290
+ type: Object,
291
+ default: void 0
292
+ },
293
+ /**
294
+ * Main timestamp of the event. Used for timegap detection.
295
+ */
296
+ timestamp: {
297
+ type: Object,
298
+ required: !0
299
+ },
300
+ /**
301
+ * Title of the event
302
+ */
303
+ title: {
304
+ type: [Object, String],
305
+ default: null
306
+ },
307
+ /**
308
+ * Type of the timeline item. If set to 'note', it renders a note item in the timeline. Defaults to 'milestone'.
309
+ * @values milestone, note
310
+ */
311
+ type: {
312
+ type: String,
313
+ default: "milestone",
314
+ validator: (e) => ["milestone", "note"].includes(e)
315
+ },
316
+ /**
317
+ * Variant for the timeline item
318
+ * @values DEFAULT, SUCCESS, CRITICAL
319
+ *
320
+ * @deprecated Use "status" prop instead
321
+ */
322
+ variant: {
323
+ type: String,
324
+ default: null,
325
+ validator: (e) => Object.values(F).includes(e)
326
+ }
327
+ },
328
+ setup(e, { slots: o }) {
329
+ const { t: s } = se({ messages: ne }), l = m(() => e.type === "note"), N = m(() => e.variant === F.CRITICAL ? "red" : e.variant === F.SUCCESS ? "green" : e.status);
330
+ e.variant && Te(
331
+ 'BentoTimelineItem "variant" property',
332
+ `Use the BentoTimelineItem "status" modifier instead to modify the color of the timeline icon.
333
+ <bento-timeline-item status="red" />`,
334
+ "2.0.0"
335
+ );
336
+ const r = m(() => ({
337
+ [`b-timeline-item__icon--${N.value}`]: N.value && !l.value
338
+ })), a = m(() => ({
339
+ "b-timeline-item--note": l.value
340
+ }));
341
+ H(we, !0);
342
+ const p = W(re), { timelineEntries: c, index: t, unregisterTimelineEntry: E } = p({
343
+ title: e.title,
344
+ date: e.timestamp.date
345
+ });
346
+ ve(() => E());
347
+ const { showAll: _, showMoreIndex: f, hiddenItems: b, visibleIndexes: i, timegapLimit: k } = W(de), A = m(() => _.value || !i.value), B = m(() => A.value ? !0 : i.value.includes(t)), D = m(() => typeof e.title == "object"), R = m(() => e.title), L = m(() => {
348
+ var K;
349
+ if (!k.value)
350
+ return null;
351
+ const M = (K = c.value[t - 1]) == null ? void 0 : K.date, me = A.value || i.value.includes(t - 1);
352
+ if (!M || !me)
353
+ return null;
354
+ const { date: P } = c.value[t], ue = parseInt(
355
+ ee(M, P, { unit: k.value.unit }),
356
+ 10
357
+ );
358
+ return k.value.amount < ue ? ee(M, P, { roundingMethod: "floor" }) : null;
359
+ }), d = m(() => L.value ? s("timegap", { timegap: L.value }) : ""), w = m(() => b.value && f.value === t), j = m(() => t === c.value.length - 1);
360
+ return {
361
+ // Values
362
+ isNoteType: l,
363
+ iconConditionalClasses: r,
364
+ conditionalClasses: a,
365
+ displayShowMoreButton: w,
366
+ showAll: _,
367
+ hiddenItems: b,
368
+ isVisible: B,
369
+ isLinkTitle: D,
370
+ linkTitleProps: R,
371
+ timegap: L,
372
+ timegapAriaLabel: d,
373
+ isLastItem: j,
374
+ // Methods
375
+ generateUid: Se,
376
+ hasSlot: Ce(o),
377
+ t: s
378
+ };
379
+ }
380
+ }), qe = {
381
+ key: 0,
382
+ class: "b-timeline-item__row"
383
+ }, Je = { class: "b-timeline-item__content" }, Pe = { class: "b-timeline-item__row" }, Ke = {
384
+ class: "b-timeline-item__marker",
385
+ "aria-hidden": "true"
386
+ }, We = {
387
+ key: 0,
388
+ class: "b-timeline-item__separator",
389
+ "data-testid": "last-timeline-item-separator"
390
+ }, Ze = { class: "b-timeline-item__content" }, Ge = { key: 1 }, Qe = {
391
+ key: 5,
392
+ class: "b-timeline-item__data-list"
393
+ }, Xe = {
394
+ key: 1,
395
+ class: "b-timeline-item__row"
396
+ }, xe = { class: "b-timeline-item__content" };
397
+ function et(e, o, s, l, N, r) {
398
+ const a = T("bento-typography"), p = T("square-small-icon"), c = T("bento-link"), t = T("bento-date"), E = T("bento-structured-list-item"), _ = T("bento-structured-list"), f = T("bento-tag"), b = T("bento-button");
399
+ return e.isVisible ? (n(), v("li", {
400
+ key: 0,
401
+ class: Z(["b-timeline-item", e.conditionalClasses])
402
+ }, [
403
+ e.timegap ? (n(), v("div", qe, [
404
+ o[1] || (o[1] = g("div", {
405
+ class: "b-timeline-item__marker",
406
+ "aria-hidden": "true"
407
+ }, [
408
+ g("div", { class: "b-timeline-item__icon b-timeline-item__icon--timegap" }),
409
+ g("div", { class: "b-timeline-item__separator" })
410
+ ], -1)),
411
+ g("div", Je, [
412
+ C(a, {
413
+ class: "b-timeline-item__timegap",
414
+ "aria-label": e.timegapAriaLabel
415
+ }, {
416
+ default: h(() => [
417
+ I(y(e.timegap), 1)
418
+ ]),
419
+ _: 1
420
+ }, 8, ["aria-label"])
421
+ ])
422
+ ])) : u("", !0),
423
+ g("div", Pe, [
424
+ g("div", Ke, [
425
+ C(p, {
426
+ class: Z(["b-timeline-item__icon", e.iconConditionalClasses])
427
+ }, null, 8, ["class"]),
428
+ e.isLastItem ? u("", !0) : (n(), v("div", We))
429
+ ]),
430
+ g("div", Ze, [
431
+ e.isNoteType ? u("", !0) : (n(), S(a, {
432
+ key: 0,
433
+ el: "div",
434
+ variant: "body",
435
+ strongest: "",
436
+ class: "b-timeline-item__title",
437
+ role: "heading",
438
+ "aria-level": "2"
439
+ }, {
440
+ default: h(() => [
441
+ e.isLinkTitle ? (n(), S(c, q({ key: 0 }, e.linkTitleProps, { "disable-typography": "" }), {
442
+ default: h(() => [
443
+ I(y(e.linkTitleProps.title), 1)
444
+ ]),
445
+ _: 1
446
+ }, 16)) : (n(), v("span", Ge, y(e.title), 1))
447
+ ]),
448
+ _: 1
449
+ })),
450
+ e.isNoteType && (e.description || e.hasSlot("default")) ? (n(), S(a, {
451
+ key: 1,
452
+ el: "div",
453
+ variant: "body",
454
+ class: "b-timeline-item__description"
455
+ }, {
456
+ default: h(() => [
457
+ V(e.$slots, "default", {}, () => [
458
+ I(y(e.description), 1)
459
+ ], !0)
460
+ ]),
461
+ _: 3
462
+ })) : u("", !0),
463
+ e.timestamp ? (n(), S(a, {
464
+ key: 2,
465
+ class: "b-timeline-item__timestamp",
466
+ el: "div",
467
+ variant: "caption"
468
+ }, {
469
+ default: h(() => [
470
+ C(t, {
471
+ date: e.timestamp.date,
472
+ format: e.timestamp.format,
473
+ "disable-typography": ""
474
+ }, null, 8, ["date", "format"]),
475
+ I(" " + y(e.timestamp.value), 1)
476
+ ]),
477
+ _: 1
478
+ })) : u("", !0),
479
+ !e.isNoteType && e.additionalTimestamp ? (n(), S(a, {
480
+ key: 3,
481
+ class: "b-timeline-item__timestamp",
482
+ el: "div",
483
+ variant: "caption"
484
+ }, {
485
+ default: h(() => [
486
+ C(t, {
487
+ date: e.additionalTimestamp.date,
488
+ format: e.additionalTimestamp.format,
489
+ "disable-typography": ""
490
+ }, null, 8, ["date", "format"]),
491
+ I(" " + y(e.additionalTimestamp.value), 1)
492
+ ]),
493
+ _: 1
494
+ })) : u("", !0),
495
+ !e.isNoteType && (e.description || e.hasSlot("default")) ? (n(), S(a, {
496
+ key: 4,
497
+ el: "div",
498
+ variant: "body",
499
+ class: "b-timeline-item__description"
500
+ }, {
501
+ default: h(() => [
502
+ V(e.$slots, "default", {}, () => [
503
+ I(y(e.description), 1)
504
+ ], !0)
505
+ ]),
506
+ _: 3
507
+ })) : u("", !0),
508
+ !e.isNoteType && e.dataList ? (n(), v("div", Qe, [
509
+ C(_, null, {
510
+ default: h(() => [
511
+ (n(!0), v(z, null, pe(e.dataList, (i) => (n(), S(E, {
512
+ key: e.generateUid(i.label),
513
+ label: i.label
514
+ }, {
515
+ default: h(() => [
516
+ C(a, { variant: "caption" }, {
517
+ default: h(() => [
518
+ I(y(i.value), 1)
519
+ ]),
520
+ _: 2
521
+ }, 1024)
522
+ ]),
523
+ _: 2
524
+ }, 1032, ["label"]))), 128))
525
+ ]),
526
+ _: 1
527
+ })
528
+ ])) : u("", !0),
529
+ !e.isNoteType && e.tag ? (n(), S(f, q({ key: 6 }, e.tag, { class: "b-timeline-item__tag" }), null, 16)) : u("", !0)
530
+ ])
531
+ ]),
532
+ e.displayShowMoreButton ? (n(), v("div", Xe, [
533
+ o[2] || (o[2] = g("div", {
534
+ class: "b-timeline-item__marker",
535
+ "aria-hidden": "true"
536
+ }, [
537
+ g("div", { class: "b-timeline-item__separator" })
538
+ ], -1)),
539
+ g("div", xe, [
540
+ C(b, {
541
+ class: "b-timeline__show-more",
542
+ variant: "tertiary",
543
+ onClick: o[0] || (o[0] = (i) => e.showAll = !e.showAll)
544
+ }, {
545
+ default: h(() => [
546
+ e.showAll ? (n(), v(z, { key: 1 }, [
547
+ I(y(e.t("showLess")), 1)
548
+ ], 64)) : (n(), v(z, { key: 0 }, [
549
+ I(y(e.t("showMore", { items: e.hiddenItems })), 1)
550
+ ], 64))
551
+ ]),
552
+ _: 1
553
+ })
554
+ ])
555
+ ])) : u("", !0)
556
+ ], 2)) : u("", !0);
557
+ }
558
+ const gt = /* @__PURE__ */ J(Ve, [["render", et], ["__scopeId", "data-v-6b29ce92"]]);
559
+ export {
560
+ O as B,
561
+ gt as a,
562
+ Re as b,
563
+ F as c,
564
+ le as d,
565
+ ht as t
566
+ };
567
+ //# sourceMappingURL=timeline-item.BQ4qiBii.js.map