@adyen/bento-vue3 1.75.0 → 1.76.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 (120) hide show
  1. package/dist/assets/accordion-item.css +1 -1
  2. package/dist/assets/action-bar.css +1 -1
  3. package/dist/assets/base-modal.css +1 -1
  4. package/dist/assets/button-actions.css +1 -1
  5. package/dist/assets/calendar.css +1 -1
  6. package/dist/assets/card.css +1 -1
  7. package/dist/assets/data-grid-template.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/date-range-picker.css +1 -1
  11. package/dist/assets/dialog-page.css +1 -1
  12. package/dist/assets/file-uploader.css +1 -1
  13. package/dist/assets/filter-bar.css +1 -1
  14. package/dist/assets/header-meta.css +1 -1
  15. package/dist/assets/inspector.css +1 -1
  16. package/dist/assets/modal-fullscreen.css +1 -1
  17. package/dist/assets/sidepanel.css +1 -1
  18. package/dist/assets/timeline-item.css +1 -1
  19. package/dist/checkbox.js +2 -2
  20. package/dist/chunks/calendar.Tm7Cvpwu.js +2001 -0
  21. package/dist/chunks/calendar.Tm7Cvpwu.js.map +1 -0
  22. package/dist/chunks/{checkbox-group.8ebmaHsA.js → checkbox-group.8J29fVna.js} +2 -2
  23. package/dist/chunks/{checkbox-group.8ebmaHsA.js.map → checkbox-group.8J29fVna.js.map} +1 -1
  24. package/dist/chunks/{checkbox.BI0dqARY.js → checkbox.CfNYUty6.js} +18 -18
  25. package/dist/chunks/{checkbox.BI0dqARY.js.map → checkbox.CfNYUty6.js.map} +1 -1
  26. package/dist/chunks/{code-snippet.Bjf1ma1L.js → code-snippet.EeIcRV20.js} +2 -2
  27. package/dist/chunks/{code-snippet.Bjf1ma1L.js.map → code-snippet.EeIcRV20.js.map} +1 -1
  28. package/dist/chunks/constructNow.CHWWeLPc.js +8 -0
  29. package/dist/chunks/constructNow.CHWWeLPc.js.map +1 -0
  30. package/dist/chunks/{dashboard-section.CVttsom5.js → dashboard-section.Cqi0PWeJ.js} +2 -2
  31. package/dist/chunks/{dashboard-section.CVttsom5.js.map → dashboard-section.Cqi0PWeJ.js.map} +1 -1
  32. package/dist/chunks/{data-grid-template.CFt1NV_4.js → data-grid-template.D7kB3S1u.js} +2 -2
  33. package/dist/chunks/{data-grid-template.CFt1NV_4.js.map → data-grid-template.D7kB3S1u.js.map} +1 -1
  34. package/dist/chunks/{data-grid.8Neri_45.js → data-grid.DJIxBwCa.js} +19 -22
  35. package/dist/chunks/{data-grid.8Neri_45.js.map → data-grid.DJIxBwCa.js.map} +1 -1
  36. package/dist/chunks/{date-picker.DSkvT_CA.js → date-picker.CobmiKaJ.js} +16 -16
  37. package/dist/chunks/date-picker.CobmiKaJ.js.map +1 -0
  38. package/dist/chunks/date-range-picker.B6UKl1_N.js +1114 -0
  39. package/dist/chunks/date-range-picker.B6UKl1_N.js.map +1 -0
  40. package/dist/chunks/{get-date-locale.CAyOIbcp.js → differenceInMonths.C8FyCrav.js} +580 -364
  41. package/dist/chunks/differenceInMonths.C8FyCrav.js.map +1 -0
  42. package/dist/chunks/{dropdown-tag.DFeoXIgH.js → dropdown-tag.CMjilUQb.js} +2 -2
  43. package/dist/chunks/{dropdown-tag.DFeoXIgH.js.map → dropdown-tag.CMjilUQb.js.map} +1 -1
  44. package/dist/chunks/{dropdown.KStrJVoP.js → dropdown.DG_EnV8g.js} +18 -18
  45. package/dist/chunks/{dropdown.KStrJVoP.js.map → dropdown.DG_EnV8g.js.map} +1 -1
  46. package/dist/chunks/es6.MoTTyETW.js.map +1 -1
  47. package/dist/chunks/{filter-bar.C6A0MJ8m.js → filter-bar.dmC284Po.js} +735 -709
  48. package/dist/chunks/filter-bar.dmC284Po.js.map +1 -0
  49. package/dist/chunks/getRoundingMethod.C3eaeGLR.js +10 -0
  50. package/dist/chunks/getRoundingMethod.C3eaeGLR.js.map +1 -0
  51. package/dist/chunks/{index.BrH1t1iu.js → getTimezoneOffsetInMilliseconds.BW7U6PxE.js} +254 -177
  52. package/dist/chunks/getTimezoneOffsetInMilliseconds.BW7U6PxE.js.map +1 -0
  53. package/dist/chunks/header-meta.BE6QfUNi.js +221 -0
  54. package/dist/chunks/header-meta.BE6QfUNi.js.map +1 -0
  55. package/dist/chunks/{header-with-views.f5BlTD7U.js → header-with-views.BZ16v5-m.js} +4 -4
  56. package/dist/chunks/{header-with-views.f5BlTD7U.js.map → header-with-views.BZ16v5-m.js.map} +1 -1
  57. package/dist/chunks/{header.DARVAeE9.js → header.3It50Clh.js} +2 -2
  58. package/dist/chunks/{header.DARVAeE9.js.map → header.3It50Clh.js.map} +1 -1
  59. package/dist/chunks/{input-field-password.BGyFeRu0.js → input-field-password.BVnZWBAV.js} +3 -3
  60. package/dist/chunks/{input-field-password.BGyFeRu0.js.map → input-field-password.BVnZWBAV.js.map} +1 -1
  61. package/dist/chunks/{input-field-phone-number.DSvCOtqX.js → input-field-phone-number.CWhPGQ1U.js} +3 -3
  62. package/dist/chunks/{input-field-phone-number.DSvCOtqX.js.map → input-field-phone-number.CWhPGQ1U.js.map} +1 -1
  63. package/dist/chunks/{input-field.Dm47icwU.js → input-field.A-dEZZfC.js} +2 -2
  64. package/dist/chunks/{input-field.Dm47icwU.js.map → input-field.A-dEZZfC.js.map} +1 -1
  65. package/dist/chunks/{pagination.BaBWNlIF.js → pagination.B4qBK4pM.js} +2 -2
  66. package/dist/chunks/{pagination.BaBWNlIF.js.map → pagination.B4qBK4pM.js.map} +1 -1
  67. package/dist/chunks/{rich-text-editor.BK9AivIm.js → rich-text-editor.BA6_k4Vv.js} +354 -352
  68. package/dist/chunks/{rich-text-editor.BK9AivIm.js.map → rich-text-editor.BA6_k4Vv.js.map} +1 -1
  69. package/dist/chunks/{search-bar.CbNBCQnM.js → search-bar.dZ7UCMxb.js} +3 -3
  70. package/dist/chunks/{search-bar.CbNBCQnM.js.map → search-bar.dZ7UCMxb.js.map} +1 -1
  71. package/dist/chunks/{secondary-nav.DXsgUTqk.js → secondary-nav.CE082cQ_.js} +2 -2
  72. package/dist/chunks/{secondary-nav.DXsgUTqk.js.map → secondary-nav.CE082cQ_.js.map} +1 -1
  73. package/dist/chunks/{selection-card-group.F8alOPtl.js → selection-card-group.NnTbPQjj.js} +9 -9
  74. package/dist/chunks/{selection-card-group.F8alOPtl.js.map → selection-card-group.NnTbPQjj.js.map} +1 -1
  75. package/dist/chunks/timeline-item.DNjubXL2.js +556 -0
  76. package/dist/chunks/timeline-item.DNjubXL2.js.map +1 -0
  77. package/dist/code-snippet.js +1 -1
  78. package/dist/dashboard-template.js +1 -1
  79. package/dist/data-grid-template.js +1 -1
  80. package/dist/data-grid.js +1 -1
  81. package/dist/date-picker.js +2 -2
  82. package/dist/date-range-picker.js +2 -2
  83. package/dist/dropdown.js +2 -2
  84. package/dist/filter-bar.js +1 -1
  85. package/dist/header-with-views.js +1 -1
  86. package/dist/header.js +1 -1
  87. package/dist/index.js +23 -23
  88. package/dist/input-field-password.js +1 -1
  89. package/dist/input-field-phone-number.js +1 -1
  90. package/dist/input-field.js +1 -1
  91. package/dist/internal.js +2 -2
  92. package/dist/pagination.js +1 -1
  93. package/dist/rich-text-editor.js +1 -1
  94. package/dist/search-bar.js +2 -2
  95. package/dist/secondary-nav.js +1 -1
  96. package/dist/selection-card.js +1 -1
  97. package/dist/styles/bento-dark.css +7 -5
  98. package/dist/styles/bento-light.css +7 -5
  99. package/dist/styles/bento.css +7 -5
  100. package/dist/styles/legacy.css +7 -5
  101. package/dist/styles/styleguide.css +7 -5
  102. package/dist/timeline.js +1 -1
  103. package/dist/web-types.json +1 -1
  104. package/package.json +8 -23
  105. package/dist/chunks/_commonjsHelpers.C6fGbg64.js +0 -7
  106. package/dist/chunks/_commonjsHelpers.C6fGbg64.js.map +0 -1
  107. package/dist/chunks/calendar.Cqjyxc69.js +0 -2223
  108. package/dist/chunks/calendar.Cqjyxc69.js.map +0 -1
  109. package/dist/chunks/date-picker.DSkvT_CA.js.map +0 -1
  110. package/dist/chunks/date-range-picker.DSMt6XMF.js +0 -1117
  111. package/dist/chunks/date-range-picker.DSMt6XMF.js.map +0 -1
  112. package/dist/chunks/filter-bar.C6A0MJ8m.js.map +0 -1
  113. package/dist/chunks/get-date-locale.CAyOIbcp.js.map +0 -1
  114. package/dist/chunks/header-meta.C4iaUsfq.js +0 -236
  115. package/dist/chunks/header-meta.C4iaUsfq.js.map +0 -1
  116. package/dist/chunks/index.BrH1t1iu.js.map +0 -1
  117. package/dist/chunks/index.BxBB1rsx.js +0 -15
  118. package/dist/chunks/index.BxBB1rsx.js.map +0 -1
  119. package/dist/chunks/timeline-item.C8PA_w7m.js +0 -568
  120. package/dist/chunks/timeline-item.C8PA_w7m.js.map +0 -1
@@ -0,0 +1,556 @@
1
+ import { defineComponent as ae, computed as o, ref as M, toRefs as ce, watch as fe, provide as z, 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 V, 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.C1jkfowf.js";
4
+ import { u as oe } from "./index.pdBj0KQU.js";
5
+ import { B as pe } from "./button-actions.BQ3AFQqt.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.CEmpyuYX.js";
10
+ import { B as Te, d as we } from "./typography.yBEME_Gu.js";
11
+ import { a as Ie, B as Ee, S as ke } from "./structured-list-item.BTPh7SPj.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.BW7U6PxE.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 = Symbol("timeline register entry injection key"), de = 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 }), I = o(() => n("addNote")), m = o(() => n("cancel")), N = M(), a = (v) => {
65
+ N.value = v;
66
+ }, _ = M(null), T = M(null), s = M(!1), E = 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
+ }), E();
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 F = {
103
+ showAll: c,
104
+ showMoreIndex: B,
105
+ hiddenItems: h,
106
+ visibleIndexes: $,
107
+ timegapLimit: r,
108
+ timelineEntries: d
109
+ };
110
+ return z(re, O), z(de, F), {
111
+ addNoteLabel: I,
112
+ cancelLabel: m,
113
+ toggleAddNote: E,
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
+ }, Fe = { key: 1 }, Ue = { class: "b-timeline__items" };
126
+ function Ye(e, l, n, I, 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", Fe, [
142
+ L(_, {
143
+ ref: "addNoteTextareaRef",
144
+ label: e.addNoteLabel,
145
+ "character-limit": 150,
146
+ resizable: "vertical",
147
+ onInput: e.updateNoteContent
148
+ }, null, 8, ["label", "onInput"]),
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", Ue, [
158
+ V(e.$slots, "default", {}, void 0, !0)
159
+ ])
160
+ ]);
161
+ }
162
+ const gt = /* @__PURE__ */ q(Be, [["render", Ye], ["__scopeId", "data-v-8dcc5ff3"]]);
163
+ let te = 0;
164
+ const ze = {
165
+ beforeCreate() {
166
+ this.uuid = te.toString(), te += 1;
167
+ }
168
+ }, Ve = { key: 0 };
169
+ function He(e, l, n, I, 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", Ve, 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(ze, [["render", He]]);
185
+ function ne(e, l, n) {
186
+ const I = Le(), m = (n == null ? void 0 : n.locale) ?? I.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"), E = T.getTime() - _.getTime(), b = E / x, d = Z(T) - Z(_), h = (E - 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(E / 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: Ee,
238
+ BentoStructuredListItem: Ie,
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 }), I = 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 && !I.value
325
+ })), a = o(() => ({
326
+ "b-timeline-item--note": I.value
327
+ }));
328
+ z(ke, !0);
329
+ const _ = {
330
+ title: e.title,
331
+ date: e.timestamp.date
332
+ }, T = K(re), { timelineEntries: s, unregisterTimelineEntry: E } = T(_);
333
+ _e(() => E());
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 U = (P = s.value[t.value - 1]) == null ? void 0 : P.date, me = $.value || c.value.includes(t.value - 1);
341
+ if (!U || !me)
342
+ return null;
343
+ const { date: J } = s.value[t.value], ue = parseInt(
344
+ ne(U, J, { unit: r.value.unit }),
345
+ 10
346
+ );
347
+ return r.value.amount < ue ? ne(U, J, { roundingMethod: "floor" }) : null;
348
+ }), F = 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: I,
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: F,
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, I, m, N) {
387
+ const a = w("bento-typography"), _ = w("square-small-icon"), T = w("bento-link"), s = w("bento-date"), E = 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
+ V(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
+ V(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(E, {
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.DNjubXL2.js.map