@adyen/bento-vue3 1.79.1 → 1.80.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 (180) hide show
  1. package/dist/@types/index.d.ts +397 -918
  2. package/dist/action-bar.js +1 -1
  3. package/dist/assets/accordion-item.css +1 -1
  4. package/dist/assets/action-bar.css +1 -1
  5. package/dist/assets/base-modal.css +1 -1
  6. package/dist/assets/button-actions.css +1 -1
  7. package/dist/assets/card.css +1 -1
  8. package/dist/assets/data-grid.css +1 -1
  9. package/dist/assets/date-picker.css +1 -1
  10. package/dist/assets/dialog-page.css +1 -1
  11. package/dist/assets/file-uploader.css +1 -1
  12. package/dist/assets/filter-bar.css +1 -1
  13. package/dist/assets/focus-trap.css +1 -1
  14. package/dist/assets/inspector.css +1 -1
  15. package/dist/assets/modal-fullscreen.css +1 -1
  16. package/dist/assets/sidepanel.css +1 -1
  17. package/dist/assets/timeline-item.css +1 -1
  18. package/dist/button.js +1 -1
  19. package/dist/card.js +1 -1
  20. package/dist/checkbox.js +3 -3
  21. package/dist/chunks/{action-bar.QX16Mu4L.js → action-bar.C4v95Cp5.js} +3 -3
  22. package/dist/chunks/{action-bar.QX16Mu4L.js.map → action-bar.C4v95Cp5.js.map} +1 -1
  23. package/dist/chunks/{base-modal.CHYvJ_xU.js → base-modal.DoMod4Z4.js} +3 -3
  24. package/dist/chunks/{base-modal.CHYvJ_xU.js.map → base-modal.DoMod4Z4.js.map} +1 -1
  25. package/dist/chunks/{button-actions-with-menu.B8qBBN82.js → button-actions-with-menu.BZ1cNOvQ.js} +2 -2
  26. package/dist/chunks/{button-actions-with-menu.B8qBBN82.js.map → button-actions-with-menu.BZ1cNOvQ.js.map} +1 -1
  27. package/dist/chunks/{button-actions.Bg38lywL.js → button-actions.C-dLiuIO.js} +2 -2
  28. package/dist/chunks/{button-actions.Bg38lywL.js.map → button-actions.C-dLiuIO.js.map} +1 -1
  29. package/dist/chunks/{card.BqkufnQe.js → card.CvEtsRsw.js} +2 -2
  30. package/dist/chunks/{card.BqkufnQe.js.map → card.CvEtsRsw.js.map} +1 -1
  31. package/dist/chunks/{checkbox-group.BRQiuU3y.js → checkbox-group.DEvATYiK.js} +6 -6
  32. package/dist/chunks/{checkbox-group.BRQiuU3y.js.map → checkbox-group.DEvATYiK.js.map} +1 -1
  33. package/dist/chunks/{checkbox.BRTK_DHj.js → checkbox.BIT67SNO.js} +3 -3
  34. package/dist/chunks/{checkbox.BRTK_DHj.js.map → checkbox.BIT67SNO.js.map} +1 -1
  35. package/dist/chunks/{code-snippet.YxZ3_4ye.js → code-snippet.CnkSxC1n.js} +4 -4
  36. package/dist/chunks/{code-snippet.YxZ3_4ye.js.map → code-snippet.CnkSxC1n.js.map} +1 -1
  37. package/dist/chunks/{controls-group.CJe5J84d.js → controls-group.B2Qci77U.js} +2 -2
  38. package/dist/chunks/{controls-group.CJe5J84d.js.map → controls-group.B2Qci77U.js.map} +1 -1
  39. package/dist/chunks/{copy.mq0o1Rag.js → copy.D5CBHqUB.js} +3 -3
  40. package/dist/chunks/{copy.mq0o1Rag.js.map → copy.D5CBHqUB.js.map} +1 -1
  41. package/dist/chunks/{dashboard-section.CNCqp74F.js → dashboard-section.CJa7cm4o.js} +2 -2
  42. package/dist/chunks/{dashboard-section.CNCqp74F.js.map → dashboard-section.CJa7cm4o.js.map} +1 -1
  43. package/dist/chunks/{dashed-underline.CtTu1AOE.js → dashed-underline.BzWB6Q4E.js} +3 -3
  44. package/dist/chunks/{dashed-underline.CtTu1AOE.js.map → dashed-underline.BzWB6Q4E.js.map} +1 -1
  45. package/dist/chunks/{data-grid-template.CLpaJvTj.js → data-grid-template.CVPMnQcb.js} +3 -3
  46. package/dist/chunks/{data-grid-template.CLpaJvTj.js.map → data-grid-template.CVPMnQcb.js.map} +1 -1
  47. package/dist/chunks/{data-grid.CD3Nb4pg.js → data-grid.O3irn4sl.js} +518 -509
  48. package/dist/chunks/data-grid.O3irn4sl.js.map +1 -0
  49. package/dist/chunks/{date-picker.C3BH0Bsr.js → date-picker.9zM8Cx1u.js} +88 -87
  50. package/dist/chunks/date-picker.9zM8Cx1u.js.map +1 -0
  51. package/dist/chunks/{date-range-picker.BPZE6r01.js → date-range-picker.DI-2cYg5.js} +6 -6
  52. package/dist/chunks/{date-range-picker.BPZE6r01.js.map → date-range-picker.DI-2cYg5.js.map} +1 -1
  53. package/dist/chunks/{dropdown-tag.B0LtUuUk.js → dropdown-tag.moDZXXVR.js} +3 -3
  54. package/dist/chunks/{dropdown-tag.B0LtUuUk.js.map → dropdown-tag.moDZXXVR.js.map} +1 -1
  55. package/dist/chunks/{dropdown.B5tPWVxg.js → dropdown.DedOkb8I.js} +5 -5
  56. package/dist/chunks/{dropdown.B5tPWVxg.js.map → dropdown.DedOkb8I.js.map} +1 -1
  57. package/dist/chunks/es6.MoTTyETW.js.map +1 -1
  58. package/dist/chunks/{field-label.B1rMWIWY.js → field-label.Cu6X9V0_.js} +2 -2
  59. package/dist/chunks/{field-label.B1rMWIWY.js.map → field-label.Cu6X9V0_.js.map} +1 -1
  60. package/dist/chunks/{file-uploader.BwmQdkmz.js → file-uploader.B7Mbz48o.js} +3 -3
  61. package/dist/chunks/{file-uploader.BwmQdkmz.js.map → file-uploader.B7Mbz48o.js.map} +1 -1
  62. package/dist/chunks/filter-bar.CzMIJP2V.js +3199 -0
  63. package/dist/chunks/filter-bar.CzMIJP2V.js.map +1 -0
  64. package/dist/chunks/{focus-trap.CpNGD7PH.js → focus-trap.BaHvK7aT.js} +54 -51
  65. package/dist/chunks/focus-trap.BaHvK7aT.js.map +1 -0
  66. package/dist/chunks/{footer-actions.pC1mxLQm.js → footer-actions.DTbfJdED.js} +2 -2
  67. package/dist/chunks/{footer-actions.pC1mxLQm.js.map → footer-actions.DTbfJdED.js.map} +1 -1
  68. package/dist/chunks/{header-meta.DZ8Gx4XE.js → header-meta.D_ChP1El.js} +3 -3
  69. package/dist/chunks/{header-meta.DZ8Gx4XE.js.map → header-meta.D_ChP1El.js.map} +1 -1
  70. package/dist/chunks/{header-with-views.b1gt2wud.js → header-with-views.CjF-jtB0.js} +8 -8
  71. package/dist/chunks/{header-with-views.b1gt2wud.js.map → header-with-views.CjF-jtB0.js.map} +1 -1
  72. package/dist/chunks/{header.BQAAmjUF.js → header.DzaZc0dQ.js} +3 -3
  73. package/dist/chunks/{header.BQAAmjUF.js.map → header.DzaZc0dQ.js.map} +1 -1
  74. package/dist/chunks/{info-icon.DB0MI-dH.js → info-icon.C7RAAeQQ.js} +3 -3
  75. package/dist/chunks/{info-icon.DB0MI-dH.js.map → info-icon.C7RAAeQQ.js.map} +1 -1
  76. package/dist/chunks/{input-field-password.noxsH61p.js → input-field-password.Bu97g6Ot.js} +5 -5
  77. package/dist/chunks/{input-field-password.noxsH61p.js.map → input-field-password.Bu97g6Ot.js.map} +1 -1
  78. package/dist/chunks/{input-field-phone-number.B_uFvUXP.js → input-field-phone-number.Bold8Mln.js} +3 -3
  79. package/dist/chunks/{input-field-phone-number.B_uFvUXP.js.map → input-field-phone-number.Bold8Mln.js.map} +1 -1
  80. package/dist/chunks/{input-field.C9ABE4cI.js → input-field.BGwhh69z.js} +3 -3
  81. package/dist/chunks/{input-field.C9ABE4cI.js.map → input-field.BGwhh69z.js.map} +1 -1
  82. package/dist/chunks/{inspector.BKP15cx6.js → inspector.BBhrSgO6.js} +2 -2
  83. package/dist/chunks/{inspector.BKP15cx6.js.map → inspector.BBhrSgO6.js.map} +1 -1
  84. package/dist/chunks/{listbox-option-tag.C1cZs38g.js → listbox-option-tag.VRGb_04i.js} +2 -2
  85. package/dist/chunks/{listbox-option-tag.C1cZs38g.js.map → listbox-option-tag.VRGb_04i.js.map} +1 -1
  86. package/dist/chunks/{modal-fullscreen.B69QJ8D6.js → modal-fullscreen.B8SjtIoX.js} +3 -3
  87. package/dist/chunks/{modal-fullscreen.B69QJ8D6.js.map → modal-fullscreen.B8SjtIoX.js.map} +1 -1
  88. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BYqbdsty.js → modal.vue_vue_type_script_setup_true_lang.Jj1Lcx13.js} +4 -4
  89. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BYqbdsty.js.map → modal.vue_vue_type_script_setup_true_lang.Jj1Lcx13.js.map} +1 -1
  90. package/dist/chunks/{pagination.Dst8Y6DD.js → pagination.C8NKDQvi.js} +2 -2
  91. package/dist/chunks/{pagination.Dst8Y6DD.js.map → pagination.C8NKDQvi.js.map} +1 -1
  92. package/dist/chunks/popover.types.DgfeurkF.js +6 -0
  93. package/dist/chunks/{popover.types.BFFy1ChU.js.map → popover.types.DgfeurkF.js.map} +1 -1
  94. package/dist/chunks/{popper-container.Uod3yjsR.js → popper-container.I9gzp1NR.js} +2 -2
  95. package/dist/chunks/{popper-container.Uod3yjsR.js.map → popper-container.I9gzp1NR.js.map} +1 -1
  96. package/dist/chunks/{radio-group.CVDDBCP4.js → radio-group.C0qJThJ2.js} +4 -4
  97. package/dist/chunks/{radio-group.CVDDBCP4.js.map → radio-group.C0qJThJ2.js.map} +1 -1
  98. package/dist/chunks/{rich-text-editor.DyC-Nnc8.js → rich-text-editor.DYx5i67c.js} +4 -4
  99. package/dist/chunks/{rich-text-editor.DyC-Nnc8.js.map → rich-text-editor.DYx5i67c.js.map} +1 -1
  100. package/dist/chunks/{search-bar.BwrFcw9L.js → search-bar.DQ-9ejqq.js} +3 -3
  101. package/dist/chunks/{search-bar.BwrFcw9L.js.map → search-bar.DQ-9ejqq.js.map} +1 -1
  102. package/dist/chunks/{secondary-nav.D7l9h0_t.js → secondary-nav.C4_UkHBv.js} +2 -2
  103. package/dist/chunks/{secondary-nav.D7l9h0_t.js.map → secondary-nav.C4_UkHBv.js.map} +1 -1
  104. package/dist/chunks/{segmented-control.CwDOwDIu.js → segmented-control.PlGfqyxH.js} +2 -2
  105. package/dist/chunks/{segmented-control.CwDOwDIu.js.map → segmented-control.PlGfqyxH.js.map} +1 -1
  106. package/dist/chunks/{selection-card-group.CZfusjo0.js → selection-card-group.CudK75gJ.js} +3 -3
  107. package/dist/chunks/{selection-card-group.CZfusjo0.js.map → selection-card-group.CudK75gJ.js.map} +1 -1
  108. package/dist/chunks/{sidepanel.BFz_7DKg.js → sidepanel.BmlRQuWw.js} +3 -3
  109. package/dist/chunks/{sidepanel.BFz_7DKg.js.map → sidepanel.BmlRQuWw.js.map} +1 -1
  110. package/dist/chunks/{structured-list-item.DjbvVIwI.js → structured-list-item.CsUD3M_V.js} +4 -4
  111. package/dist/chunks/{structured-list-item.DjbvVIwI.js.map → structured-list-item.CsUD3M_V.js.map} +1 -1
  112. package/dist/chunks/{summary-grid.types.KVqau_I-.js → summary-grid.types.Bs4dbLqr.js} +5 -5
  113. package/dist/chunks/{summary-grid.types.KVqau_I-.js.map → summary-grid.types.Bs4dbLqr.js.map} +1 -1
  114. package/dist/chunks/{tag.BmMnGJMp.js → tag.EDED27n5.js} +2 -2
  115. package/dist/chunks/{tag.BmMnGJMp.js.map → tag.EDED27n5.js.map} +1 -1
  116. package/dist/chunks/{textarea.BZjnJf5q.js → textarea.7MePsezm.js} +2 -2
  117. package/dist/chunks/{textarea.BZjnJf5q.js.map → textarea.7MePsezm.js.map} +1 -1
  118. package/dist/chunks/timeline-item.BKS_D2Rm.js +428 -0
  119. package/dist/chunks/timeline-item.BKS_D2Rm.js.map +1 -0
  120. package/dist/chunks/{tooltip.CeX5eGnw.js → tooltip.B76ucISL.js} +2 -2
  121. package/dist/chunks/{tooltip.CeX5eGnw.js.map → tooltip.B76ucISL.js.map} +1 -1
  122. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.Cqimmacx.js → tutorial.vue_vue_type_script_setup_true_lang.DAFpeoOd.js} +4 -4
  123. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.Cqimmacx.js.map → tutorial.vue_vue_type_script_setup_true_lang.DAFpeoOd.js.map} +1 -1
  124. package/dist/chunks/{use-cached-selected-values.os3Yp7Tw.js → use-cached-selected-values.DCxMCy_n.js} +2 -2
  125. package/dist/chunks/{use-cached-selected-values.os3Yp7Tw.js.map → use-cached-selected-values.DCxMCy_n.js.map} +1 -1
  126. package/dist/code-snippet.js +1 -1
  127. package/dist/dashboard-template.js +1 -1
  128. package/dist/dashed-underline.js +1 -1
  129. package/dist/data-grid-template.js +1 -1
  130. package/dist/data-grid.js +1 -1
  131. package/dist/date-picker.js +1 -1
  132. package/dist/date-range-picker.js +1 -1
  133. package/dist/dropdown.js +3 -3
  134. package/dist/file-uploader.js +1 -1
  135. package/dist/filter-bar.js +1 -1
  136. package/dist/focus-trap.js +1 -1
  137. package/dist/header-with-views.js +1 -1
  138. package/dist/header.js +1 -1
  139. package/dist/index.js +358 -395
  140. package/dist/index.js.map +1 -1
  141. package/dist/info-icon.js +1 -1
  142. package/dist/input-field-password.js +1 -1
  143. package/dist/input-field-phone-number.js +1 -1
  144. package/dist/input-field.js +1 -1
  145. package/dist/inspector.js +1 -1
  146. package/dist/internal.js +9 -9
  147. package/dist/menu.js +1 -1
  148. package/dist/modal-fullscreen.js +1 -1
  149. package/dist/modal.js +2 -2
  150. package/dist/pagination.js +1 -1
  151. package/dist/popover.js +2 -2
  152. package/dist/popper-container.js +1 -1
  153. package/dist/radio-group.js +1 -1
  154. package/dist/rich-text-editor.js +1 -1
  155. package/dist/search-bar.js +2 -2
  156. package/dist/secondary-nav.js +1 -1
  157. package/dist/segmented-control.js +1 -1
  158. package/dist/selection-card.js +1 -1
  159. package/dist/sidepanel.js +1 -1
  160. package/dist/structured-list.js +1 -1
  161. package/dist/styles/bento-dark.css +4 -0
  162. package/dist/styles/bento-light.css +4 -0
  163. package/dist/styles/bento.css +4 -0
  164. package/dist/styles/legacy.css +4 -0
  165. package/dist/styles/styleguide.css +4 -0
  166. package/dist/summary-grid.js +1 -1
  167. package/dist/tag.js +1 -1
  168. package/dist/textarea.js +1 -1
  169. package/dist/timeline.js +1 -1
  170. package/dist/tutorial.js +1 -1
  171. package/dist/web-types.json +1 -1
  172. package/package.json +5 -5
  173. package/dist/chunks/data-grid.CD3Nb4pg.js.map +0 -1
  174. package/dist/chunks/date-picker.C3BH0Bsr.js.map +0 -1
  175. package/dist/chunks/filter-bar.B9yGivxl.js +0 -2986
  176. package/dist/chunks/filter-bar.B9yGivxl.js.map +0 -1
  177. package/dist/chunks/focus-trap.CpNGD7PH.js.map +0 -1
  178. package/dist/chunks/popover.types.BFFy1ChU.js +0 -6
  179. package/dist/chunks/timeline-item.YjC_8BBB.js +0 -556
  180. package/dist/chunks/timeline-item.YjC_8BBB.js.map +0 -1
@@ -1,556 +0,0 @@
1
- import { defineComponent as ae, computed as o, ref as M, toRefs as ce, watch as fe, provide as V, nextTick as ve, resolveComponent as w, createElementBlock as f, openBlock as i, createCommentVNode as u, createElementVNode as g, createBlock as S, withCtx as p, createTextVNode as k, toDisplayString as y, createVNode as L, renderSlot as z, mergeProps as H, inject as K, onUnmounted as _e, normalizeClass as W, Fragment as Y, renderList as be } from "vue";
2
- import { B as se } from "./button.DhcxX2GJ.js";
3
- import { B as he } from "./textarea.BZjnJf5q.js";
4
- import { u as oe } from "./index.pdBj0KQU.js";
5
- import { B as pe } from "./button-actions.Bg38lywL.js";
6
- import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
7
- import { B as ge } from "./date.DZvVL-uz.js";
8
- import { B as ye } from "./link.cwPmWlsk.js";
9
- import { B as Ne } from "./tag.BmMnGJMp.js";
10
- import { B as Te, d as we } from "./typography.yBEME_Gu.js";
11
- import { a as Ee, B as Ie, S as ke } from "./structured-list-item.DjbvVIwI.js";
12
- /* empty css */
13
- import { g as Ce } from "./generate-uid.NJ8tVoha.js";
14
- import { u as Se } from "./use-has-slot.B7eQSabc.js";
15
- import { b as Le, e as Me, a as Ae, n as Oe, g as Z, m as G, d as Q, f as X, h as x } from "./getTimezoneOffsetInMilliseconds.B7sxiukN.js";
16
- import { g as $e } from "./getRoundingMethod.C3eaeGLR.js";
17
- import "../assets/timeline-item.css";
18
- var A = /* @__PURE__ */ ((e) => (e.BOTTOM = "bottom", e.AFTER_FIRST = "after-first", e.BEFORE_LAST = "before-last", e))(A || {}), Re = /* @__PURE__ */ ((e) => (e.SECOND = "second", e.MINUTE = "minute", e.HOUR = "hour", e.DAY = "day", e.MONTH = "month", e.YEAR = "year", e))(Re || {}), R = /* @__PURE__ */ ((e) => (e.DEFAULT = "SquareSmallIcon", e.SUCCESS = "CheckedCircleIcon", e.CRITICAL = "CrossCircleIcon", e))(R || {}), le = /* @__PURE__ */ ((e) => (e.BLACK = "black", e.BLUE = "blue", e.GREEN = "green", e.GREY = "grey", e.ORANGE = "orange", e.RED = "red", e.YELLOW = "yellow", e))(le || {});
19
- const re = /* @__PURE__ */ Symbol("timeline register entry injection key"), de = /* @__PURE__ */ Symbol("timeline config obj injection key"), ee = {
20
- "en-US": {
21
- addNote: "Add note",
22
- cancel: "Cancel"
23
- },
24
- "ja-JP": {
25
- addNote: "メモを追加",
26
- cancel: "キャンセル"
27
- },
28
- "pt-BR": {
29
- addNote: "Adicionar anotação",
30
- cancel: "Cancelar"
31
- }
32
- }, Be = ae({
33
- i18n: { messages: ee },
34
- name: "bento-timeline",
35
- components: { BentoButton: se, BentoButtonActions: pe, BentoTextarea: he },
36
- props: {
37
- /**
38
- * If set to true, gives the possibility to manually add notes to the timeline via a textarea
39
- */
40
- addNote: {
41
- type: Boolean,
42
- default: !1
43
- },
44
- /**
45
- * Object that determines the max number of items to show without clicking the show more button
46
- * and where in the timeline is the show more button placed
47
- */
48
- showMore: {
49
- type: Object,
50
- default: null
51
- },
52
- /**
53
- * Object that determines minimum amount of time for the automatic timegap indicator;
54
- * Define a unit (hour, day, month) and an amount (e.g. { amount: 7, unit: 'days' }).
55
- * If null, automatic timegap detection will be turned off
56
- */
57
- timegapLimit: {
58
- type: Object,
59
- default: null
60
- }
61
- },
62
- emits: ["add-timeline-note"],
63
- setup(e, { emit: l }) {
64
- const { t: n } = oe({ messages: ee }), E = o(() => n("addNote")), m = o(() => n("cancel")), N = M(), a = (v) => {
65
- N.value = v;
66
- }, _ = M(null), T = M(null), s = M(!1), I = async () => {
67
- var v, C;
68
- s.value = !s.value, await ve(), s.value ? (v = _.value.$refs.textareaElement) == null || v.focus() : (C = T.value.$el) == null || C.focus();
69
- }, b = () => {
70
- l("add-timeline-note", {
71
- description: N.value,
72
- timestamp: { date: /* @__PURE__ */ new Date() },
73
- type: "note"
74
- }), I();
75
- }, d = M([]), h = o(
76
- () => e.showMore && d.value.length > e.showMore.limit ? d.value.length - e.showMore.limit : null
77
- ), c = M(!1), { timegapLimit: r } = ce(e), t = o(() => Array.from(d.value.keys())), $ = o(() => e.showMore ? e.showMore.placement === A.BEFORE_LAST ? [
78
- ...t.value.slice(0, e.showMore.limit - 1),
79
- t.value[t.value.length - 1]
80
- ] : e.showMore.placement === A.AFTER_FIRST ? [t.value[0], ...t.value.slice(-(e.showMore.limit - 1))] : t.value.slice(0, e.showMore.limit) : null), B = o(() => {
81
- if (!e.showMore)
82
- return null;
83
- switch (e.showMore.placement) {
84
- case A.BEFORE_LAST:
85
- return e.showMore.limit - 2;
86
- case A.AFTER_FIRST:
87
- return 0;
88
- case A.BOTTOM:
89
- default:
90
- return e.showMore.limit - 1;
91
- }
92
- }), D = () => {
93
- d.value.sort((v, C) => new Date(C.date).getTime() - new Date(v.date).getTime());
94
- }, j = (v) => () => {
95
- const C = d.value.indexOf(v);
96
- C > -1 && d.value.splice(C, 1);
97
- }, O = (v) => (d.value.push(v), { timelineEntries: d, unregisterTimelineEntry: j(v) });
98
- fe(
99
- () => d.value.length,
100
- () => D()
101
- );
102
- const U = {
103
- showAll: c,
104
- showMoreIndex: B,
105
- hiddenItems: h,
106
- visibleIndexes: $,
107
- timegapLimit: r,
108
- timelineEntries: d
109
- };
110
- return V(re, O), V(de, U), {
111
- addNoteLabel: E,
112
- cancelLabel: m,
113
- toggleAddNote: I,
114
- updateNoteContent: a,
115
- addNoteToTimeline: b,
116
- showAddNoteTextArea: s,
117
- // refs
118
- addNoteTextareaRef: _,
119
- addNoteButtonRef: T
120
- };
121
- }
122
- }), De = { class: "b-timeline" }, je = {
123
- key: 0,
124
- class: "b-timeline__add-note-section"
125
- }, Ue = { key: 1 }, Fe = { class: "b-timeline__items" };
126
- function Ye(e, l, n, E, m, N) {
127
- const a = w("bento-button"), _ = w("bento-textarea"), T = w("bento-button-actions");
128
- return i(), f("div", De, [
129
- e.addNote ? (i(), f("div", je, [
130
- e.showAddNoteTextArea ? u("", !0) : (i(), S(a, {
131
- key: 0,
132
- ref: "addNoteButtonRef",
133
- variant: "tertiary",
134
- onClick: e.toggleAddNote
135
- }, {
136
- default: p(() => [
137
- k(y(e.addNoteLabel), 1)
138
- ]),
139
- _: 1
140
- }, 8, ["onClick"])),
141
- e.showAddNoteTextArea ? (i(), f("div", Ue, [
142
- L(_, {
143
- ref: "addNoteTextareaRef",
144
- label: e.addNoteLabel,
145
- "character-limit": 150,
146
- resizable: "vertical",
147
- "onUpdate:modelValue": e.updateNoteContent
148
- }, null, 8, ["label", "onUpdate:modelValue"]),
149
- L(T, {
150
- actions: [
151
- { title: e.addNoteLabel, event: e.addNoteToTimeline },
152
- { title: e.cancelLabel, event: e.toggleAddNote }
153
- ]
154
- }, null, 8, ["actions"])
155
- ])) : u("", !0)
156
- ])) : u("", !0),
157
- g("ol", Fe, [
158
- z(e.$slots, "default", {}, void 0, !0)
159
- ])
160
- ]);
161
- }
162
- const gt = /* @__PURE__ */ q(Be, [["render", Ye], ["__scopeId", "data-v-a77a7332"]]);
163
- let te = 0;
164
- const Ve = {
165
- beforeCreate() {
166
- this.uuid = te.toString(), te += 1;
167
- }
168
- }, ze = { key: 0 };
169
- function He(e, l, n, E, m, N) {
170
- return i(), f("svg", H({ role: "img" }, e.$attrs, {
171
- class: "ui-assets-icons-16",
172
- xmlns: "http://www.w3.org/2000/svg",
173
- width: "16",
174
- height: "16",
175
- fill: "none"
176
- }), [
177
- e.$attrs["svg-title"] ? (i(), f("title", ze, y(e.$attrs["svg-title"]), 1)) : u("", !0),
178
- l[0] || (l[0] = g("path", {
179
- fill: "#001222",
180
- d: "M10 3.25C11.5188 3.25 12.75 4.48122 12.75 6V10C12.75 11.5188 11.5188 12.75 10 12.75H6C4.48122 12.75 3.25 11.5188 3.25 10V6C3.25 4.48122 4.48122 3.25 6 3.25H10Z"
181
- }, null, -1))
182
- ], 16);
183
- }
184
- const qe = /* @__PURE__ */ q(Ve, [["render", He]]);
185
- function ne(e, l, n) {
186
- const E = Le(), m = (n == null ? void 0 : n.locale) ?? E.locale ?? Me, N = Ae(e, l);
187
- if (isNaN(N))
188
- throw new RangeError("Invalid time value");
189
- const a = Object.assign({}, n, {
190
- addSuffix: n == null ? void 0 : n.addSuffix,
191
- comparison: N
192
- }), [_, T] = Oe(
193
- n == null ? void 0 : n.in,
194
- ...N > 0 ? [l, e] : [e, l]
195
- ), s = $e((n == null ? void 0 : n.roundingMethod) ?? "round"), I = T.getTime() - _.getTime(), b = I / x, d = Z(T) - Z(_), h = (I - d) / x, c = n == null ? void 0 : n.unit;
196
- let r;
197
- if (c ? r = c : b < 1 ? r = "second" : b < 60 ? r = "minute" : b < G ? r = "hour" : h < Q ? r = "day" : h < X ? r = "month" : r = "year", r === "second") {
198
- const t = s(I / 1e3);
199
- return m.formatDistance("xSeconds", t, a);
200
- } else if (r === "minute") {
201
- const t = s(b);
202
- return m.formatDistance("xMinutes", t, a);
203
- } else if (r === "hour") {
204
- const t = s(b / 60);
205
- return m.formatDistance("xHours", t, a);
206
- } else if (r === "day") {
207
- const t = s(h / G);
208
- return m.formatDistance("xDays", t, a);
209
- } else if (r === "month") {
210
- const t = s(h / Q);
211
- return t === 12 && c !== "month" ? m.formatDistance("xYears", 1, a) : m.formatDistance("xMonths", t, a);
212
- } else {
213
- const t = s(h / X);
214
- return m.formatDistance("xYears", t, a);
215
- }
216
- }
217
- const ie = {
218
- "en-US": {
219
- showLess: "Show less",
220
- showMore: "Show {items} more",
221
- timegap: "{timegap} passed between the timeline events"
222
- },
223
- "ja-JP": {
224
- showLess: "表示内容を減らす"
225
- },
226
- "pt-BR": {
227
- showLess: "Mostrar menos"
228
- }
229
- }, Je = ae({
230
- name: "bento-timeline-item",
231
- components: {
232
- BentoButton: se,
233
- BentoDate: ge,
234
- BentoLink: ye,
235
- BentoTag: Ne,
236
- BentoTypography: Te,
237
- BentoStructuredList: Ie,
238
- BentoStructuredListItem: Ee,
239
- SquareSmallIcon: qe
240
- },
241
- i18n: { messages: ie },
242
- props: {
243
- /**
244
- * Additional timestamp of the event
245
- */
246
- additionalTimestamp: {
247
- type: Object,
248
- default: null
249
- },
250
- /**
251
- * Relevant key-value pair data to display in the event
252
- */
253
- dataList: {
254
- type: Array,
255
- default: null
256
- },
257
- /**
258
- * Description of the event
259
- */
260
- description: {
261
- type: String,
262
- default: null
263
- },
264
- /**
265
- * Modifier that changes the color of the timeline icon
266
- * @values blue, black, green, grey, orange, red, yellow
267
- */
268
- status: {
269
- type: String,
270
- default: "black",
271
- validator: (e) => Object.values(le).includes(e)
272
- },
273
- /**
274
- * Tag props that will be passed down to inner tag component
275
- */
276
- tag: {
277
- type: Object,
278
- default: void 0
279
- },
280
- /**
281
- * Main timestamp of the event. Used for timegap detection.
282
- */
283
- timestamp: {
284
- type: Object,
285
- required: !0
286
- },
287
- /**
288
- * Title of the event
289
- */
290
- title: {
291
- type: [Object, String],
292
- default: null
293
- },
294
- /**
295
- * Type of the timeline item. If set to 'note', it renders a note item in the timeline. Defaults to 'milestone'.
296
- * @values milestone, note
297
- */
298
- type: {
299
- type: String,
300
- default: "milestone",
301
- validator: (e) => ["milestone", "note"].includes(e)
302
- },
303
- /**
304
- * Variant for the timeline item
305
- * @values DEFAULT, SUCCESS, CRITICAL
306
- *
307
- * @deprecated Use "status" prop instead
308
- */
309
- variant: {
310
- type: String,
311
- default: null,
312
- validator: (e) => Object.values(R).includes(e)
313
- }
314
- },
315
- setup(e, { slots: l }) {
316
- const { t: n } = oe({ messages: ie }), E = o(() => e.type === "note"), m = o(() => e.variant === R.CRITICAL ? "red" : e.variant === R.SUCCESS ? "green" : e.status);
317
- e.variant && we(
318
- 'BentoTimelineItem "variant" property',
319
- `Use the BentoTimelineItem "status" modifier instead to modify the color of the timeline icon.
320
- <bento-timeline-item status="red" />`,
321
- "2.0.0"
322
- );
323
- const N = o(() => ({
324
- [`b-timeline-item__icon--${m.value}`]: m.value && !E.value
325
- })), a = o(() => ({
326
- "b-timeline-item--note": E.value
327
- }));
328
- V(ke, !0);
329
- const _ = {
330
- title: e.title,
331
- date: e.timestamp.date
332
- }, T = K(re), { timelineEntries: s, unregisterTimelineEntry: I } = T(_);
333
- _e(() => I());
334
- const { showAll: b, showMoreIndex: d, hiddenItems: h, visibleIndexes: c, timegapLimit: r } = K(de), t = o(() => s.value.indexOf(_)), $ = o(() => b.value || !c.value), B = o(
335
- () => $.value ? !0 : c.value.includes(t.value)
336
- ), D = o(() => typeof e.title == "object"), j = o(() => e.title), O = o(() => {
337
- var P;
338
- if (!r.value)
339
- return null;
340
- const F = (P = s.value[t.value - 1]) == null ? void 0 : P.date, me = $.value || c.value.includes(t.value - 1);
341
- if (!F || !me)
342
- return null;
343
- const { date: J } = s.value[t.value], ue = parseInt(
344
- ne(F, J, { unit: r.value.unit }),
345
- 10
346
- );
347
- return r.value.amount < ue ? ne(F, J, { roundingMethod: "floor" }) : null;
348
- }), U = o(() => O.value ? n("timegap", { timegap: O.value }) : ""), v = o(() => h.value && d.value === t.value), C = o(() => t.value !== -1 && t.value === s.value.length - 1);
349
- return {
350
- // Values
351
- isNoteType: E,
352
- iconConditionalClasses: N,
353
- conditionalClasses: a,
354
- displayShowMoreButton: v,
355
- showAll: b,
356
- hiddenItems: h,
357
- isVisible: B,
358
- isLinkTitle: D,
359
- linkTitleProps: j,
360
- timegap: O,
361
- timegapAriaLabel: U,
362
- isLastItem: C,
363
- // Methods
364
- generateUid: Ce,
365
- hasSlot: Se(l),
366
- t: n
367
- };
368
- }
369
- }), Pe = {
370
- key: 0,
371
- class: "b-timeline-item__row"
372
- }, Ke = { class: "b-timeline-item__content" }, We = { class: "b-timeline-item__row" }, Ze = {
373
- class: "b-timeline-item__marker",
374
- "aria-hidden": "true"
375
- }, Ge = {
376
- key: 0,
377
- class: "b-timeline-item__separator",
378
- "data-testid": "last-timeline-item-separator"
379
- }, Qe = { class: "b-timeline-item__content" }, Xe = { key: 1 }, xe = {
380
- key: 5,
381
- class: "b-timeline-item__data-list"
382
- }, et = {
383
- key: 1,
384
- class: "b-timeline-item__row"
385
- }, tt = { class: "b-timeline-item__content" };
386
- function nt(e, l, n, E, m, N) {
387
- const a = w("bento-typography"), _ = w("square-small-icon"), T = w("bento-link"), s = w("bento-date"), I = w("bento-structured-list-item"), b = w("bento-structured-list"), d = w("bento-tag"), h = w("bento-button");
388
- return e.isVisible ? (i(), f("li", {
389
- key: 0,
390
- class: W(["b-timeline-item", e.conditionalClasses])
391
- }, [
392
- e.timegap ? (i(), f("div", Pe, [
393
- l[1] || (l[1] = g("div", {
394
- class: "b-timeline-item__marker",
395
- "aria-hidden": "true"
396
- }, [
397
- g("div", { class: "b-timeline-item__icon b-timeline-item__icon--timegap" }),
398
- g("div", { class: "b-timeline-item__separator" })
399
- ], -1)),
400
- g("div", Ke, [
401
- L(a, {
402
- class: "b-timeline-item__timegap",
403
- "aria-label": e.timegapAriaLabel
404
- }, {
405
- default: p(() => [
406
- k(y(e.timegap), 1)
407
- ]),
408
- _: 1
409
- }, 8, ["aria-label"])
410
- ])
411
- ])) : u("", !0),
412
- g("div", We, [
413
- g("div", Ze, [
414
- L(_, {
415
- class: W(["b-timeline-item__icon", e.iconConditionalClasses])
416
- }, null, 8, ["class"]),
417
- e.isLastItem ? u("", !0) : (i(), f("div", Ge))
418
- ]),
419
- g("div", Qe, [
420
- e.isNoteType ? u("", !0) : (i(), S(a, {
421
- key: 0,
422
- el: "div",
423
- variant: "body",
424
- strongest: "",
425
- class: "b-timeline-item__title",
426
- role: "heading",
427
- "aria-level": "2"
428
- }, {
429
- default: p(() => [
430
- e.isLinkTitle ? (i(), S(T, H({ key: 0 }, e.linkTitleProps, { "disable-typography": "" }), {
431
- default: p(() => [
432
- k(y(e.linkTitleProps.title), 1)
433
- ]),
434
- _: 1
435
- }, 16)) : (i(), f("span", Xe, y(e.title), 1))
436
- ]),
437
- _: 1
438
- })),
439
- e.isNoteType && (e.description || e.hasSlot("default")) ? (i(), S(a, {
440
- key: 1,
441
- el: "div",
442
- variant: "body",
443
- class: "b-timeline-item__description"
444
- }, {
445
- default: p(() => [
446
- z(e.$slots, "default", {}, () => [
447
- k(y(e.description), 1)
448
- ], !0)
449
- ]),
450
- _: 3
451
- })) : u("", !0),
452
- e.timestamp ? (i(), S(a, {
453
- key: 2,
454
- class: "b-timeline-item__timestamp",
455
- el: "div",
456
- variant: "caption"
457
- }, {
458
- default: p(() => [
459
- L(s, {
460
- date: e.timestamp.date,
461
- format: e.timestamp.format,
462
- "disable-typography": ""
463
- }, null, 8, ["date", "format"]),
464
- k(" " + y(e.timestamp.value), 1)
465
- ]),
466
- _: 1
467
- })) : u("", !0),
468
- !e.isNoteType && e.additionalTimestamp ? (i(), S(a, {
469
- key: 3,
470
- class: "b-timeline-item__timestamp",
471
- el: "div",
472
- variant: "caption"
473
- }, {
474
- default: p(() => [
475
- L(s, {
476
- date: e.additionalTimestamp.date,
477
- format: e.additionalTimestamp.format,
478
- "disable-typography": ""
479
- }, null, 8, ["date", "format"]),
480
- k(" " + y(e.additionalTimestamp.value), 1)
481
- ]),
482
- _: 1
483
- })) : u("", !0),
484
- !e.isNoteType && (e.description || e.hasSlot("default")) ? (i(), S(a, {
485
- key: 4,
486
- el: "div",
487
- variant: "body",
488
- class: "b-timeline-item__description"
489
- }, {
490
- default: p(() => [
491
- z(e.$slots, "default", {}, () => [
492
- k(y(e.description), 1)
493
- ], !0)
494
- ]),
495
- _: 3
496
- })) : u("", !0),
497
- !e.isNoteType && e.dataList ? (i(), f("div", xe, [
498
- L(b, null, {
499
- default: p(() => [
500
- (i(!0), f(Y, null, be(e.dataList, (c) => (i(), S(I, {
501
- key: e.generateUid(c.label),
502
- label: c.label
503
- }, {
504
- default: p(() => [
505
- L(a, { variant: "caption" }, {
506
- default: p(() => [
507
- k(y(c.value), 1)
508
- ]),
509
- _: 2
510
- }, 1024)
511
- ]),
512
- _: 2
513
- }, 1032, ["label"]))), 128))
514
- ]),
515
- _: 1
516
- })
517
- ])) : u("", !0),
518
- !e.isNoteType && e.tag ? (i(), S(d, H({ key: 6 }, e.tag, { class: "b-timeline-item__tag" }), null, 16)) : u("", !0)
519
- ])
520
- ]),
521
- e.displayShowMoreButton ? (i(), f("div", et, [
522
- l[2] || (l[2] = g("div", {
523
- class: "b-timeline-item__marker",
524
- "aria-hidden": "true"
525
- }, [
526
- g("div", { class: "b-timeline-item__separator" })
527
- ], -1)),
528
- g("div", tt, [
529
- L(h, {
530
- class: "b-timeline__show-more",
531
- variant: "tertiary",
532
- onClick: l[0] || (l[0] = (c) => e.showAll = !e.showAll)
533
- }, {
534
- default: p(() => [
535
- e.showAll ? (i(), f(Y, { key: 1 }, [
536
- k(y(e.t("showLess")), 1)
537
- ], 64)) : (i(), f(Y, { key: 0 }, [
538
- k(y(e.t("showMore", { items: e.hiddenItems })), 1)
539
- ], 64))
540
- ]),
541
- _: 1
542
- })
543
- ])
544
- ])) : u("", !0)
545
- ], 2)) : u("", !0);
546
- }
547
- const yt = /* @__PURE__ */ q(Je, [["render", nt], ["__scopeId", "data-v-78251ada"]]);
548
- export {
549
- A as B,
550
- yt as a,
551
- Re as b,
552
- R as c,
553
- le as d,
554
- gt as t
555
- };
556
- //# sourceMappingURL=timeline-item.YjC_8BBB.js.map