@adyen/bento-vue2 1.4.1 → 1.5.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 (201) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
  3. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-lazy-load/data-grid-lazy-load.vue.d.ts +17 -0
  4. package/dist/@types/packages/vue2/src/components/data-grid/components/index.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/data-grid/composables/index.d.ts +1 -0
  6. package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnHeadersTopPosition/useCalculateColumnHeadersTopPosition.d.ts +2 -0
  7. package/dist/@types/packages/vue2/src/components/data-grid/composables/useLazyLoading/useLazyLoading.d.ts +8 -0
  8. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +3 -1
  9. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +27 -2
  10. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +522 -114
  11. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +3 -3
  12. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +3 -3
  13. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +3 -3
  14. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +3 -3
  15. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +3 -3
  16. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +3 -3
  17. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +13 -13
  18. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue.d.ts +4 -4
  19. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +12 -3
  20. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +3 -3
  21. package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +5 -1
  22. package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +12 -3
  23. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +1 -1
  24. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +1 -1
  25. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.types.d.ts +2 -1
  26. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.vue.d.ts +2 -0
  27. package/dist/@types/packages/vue2/src/components/image/index.d.ts +1 -0
  28. package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +2 -0
  29. package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +24 -0
  30. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -3
  31. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +3 -1
  32. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +13 -3
  33. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.types.d.ts +1 -9
  34. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.utils.d.ts +5 -21
  35. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +119 -71
  36. package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +3 -2
  37. package/dist/@types/packages/vue2/src/components/stepper/components/step/index.d.ts +1 -0
  38. package/dist/@types/packages/vue2/src/components/stepper/components/step/step.vue.d.ts +33 -0
  39. package/dist/@types/packages/vue2/src/components/stepper/composables/useKeyboardNavigation/useKeyboardNavigation.d.ts +15 -0
  40. package/dist/@types/packages/vue2/src/components/stepper/index.d.ts +3 -0
  41. package/dist/@types/packages/vue2/src/components/stepper/stepper.keys.d.ts +3 -0
  42. package/dist/@types/packages/vue2/src/components/stepper/stepper.types.d.ts +24 -0
  43. package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +42 -0
  44. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
  45. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +389 -50
  46. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  47. package/dist/@types/packages/vue2/src/types/index.d.ts +1 -0
  48. package/dist/@types/packages/vue2/src/types/lazy-load.d.ts +1 -0
  49. package/dist/accordion.js +1 -1
  50. package/dist/alert.js +1 -1
  51. package/dist/assets/base-button.css +1 -1
  52. package/dist/assets/base-modal.css +1 -1
  53. package/dist/assets/button.css +1 -1
  54. package/dist/assets/calendar.css +1 -1
  55. package/dist/assets/checkbox.css +1 -1
  56. package/dist/assets/dropdown-default-textbox.css +1 -1
  57. package/dist/assets/dropdown.css +1 -1
  58. package/dist/assets/index.css +1 -1
  59. package/dist/assets/index10.css +1 -1
  60. package/dist/assets/index11.css +1 -1
  61. package/dist/assets/index12.css +1 -1
  62. package/dist/assets/index13.css +1 -1
  63. package/dist/assets/index14.css +1 -1
  64. package/dist/assets/index15.css +1 -1
  65. package/dist/assets/index16.css +1 -1
  66. package/dist/assets/index17.css +1 -1
  67. package/dist/assets/index18.css +1 -1
  68. package/dist/assets/index19.css +1 -1
  69. package/dist/assets/index2.css +1 -1
  70. package/dist/assets/index20.css +1 -1
  71. package/dist/assets/index21.css +1 -1
  72. package/dist/assets/index22.css +1 -1
  73. package/dist/assets/index23.css +1 -1
  74. package/dist/assets/index24.css +1 -1
  75. package/dist/assets/index25.css +1 -1
  76. package/dist/assets/index26.css +1 -1
  77. package/dist/assets/index27.css +1 -1
  78. package/dist/assets/index28.css +1 -1
  79. package/dist/assets/index29.css +1 -1
  80. package/dist/assets/index3.css +1 -1
  81. package/dist/assets/index30.css +1 -1
  82. package/dist/assets/index31.css +1 -1
  83. package/dist/assets/index32.css +1 -1
  84. package/dist/assets/index34.css +1 -1
  85. package/dist/assets/index35.css +1 -1
  86. package/dist/assets/index36.css +1 -1
  87. package/dist/assets/index37.css +1 -1
  88. package/dist/assets/index38.css +1 -1
  89. package/dist/assets/index39.css +1 -1
  90. package/dist/assets/index4.css +1 -1
  91. package/dist/assets/index40.css +1 -1
  92. package/dist/assets/index41.css +1 -1
  93. package/dist/assets/index42.css +1 -1
  94. package/dist/assets/index43.css +1 -0
  95. package/dist/assets/index5.css +1 -1
  96. package/dist/assets/index6.css +1 -1
  97. package/dist/assets/index7.css +1 -1
  98. package/dist/assets/index8.css +1 -1
  99. package/dist/assets/index9.css +1 -1
  100. package/dist/assets/tooltip.css +1 -1
  101. package/dist/avatar-image.js +1 -1
  102. package/dist/badge.js +1 -1
  103. package/dist/button.js +1 -1
  104. package/dist/card.js +1 -1
  105. package/dist/checkbox.js +3 -3
  106. package/dist/chunks/base-button.89e9efbd.js +88 -0
  107. package/dist/chunks/base-button.89e9efbd.js.map +1 -0
  108. package/dist/chunks/base-modal.6eaa7e53.js +211 -0
  109. package/dist/chunks/base-modal.6eaa7e53.js.map +1 -0
  110. package/dist/chunks/{calendar.c20df708.js → calendar.44459d87.js} +2 -2
  111. package/dist/chunks/{calendar.c20df708.js.map → calendar.44459d87.js.map} +1 -1
  112. package/dist/chunks/{checkbox.5a69ce9d.js → checkbox.b69b8f22.js} +16 -16
  113. package/dist/chunks/{checkbox.5a69ce9d.js.map → checkbox.b69b8f22.js.map} +1 -1
  114. package/dist/chunks/{copy.982e1b19.js → copy.57f969d4.js} +2 -2
  115. package/dist/chunks/{copy.982e1b19.js.map → copy.57f969d4.js.map} +1 -1
  116. package/dist/chunks/debounce.b5ef6acf.js +10 -0
  117. package/dist/chunks/debounce.b5ef6acf.js.map +1 -0
  118. package/dist/chunks/{dropdown-default-textbox.9bef4138.js → dropdown-default-textbox.2d093874.js} +8 -7
  119. package/dist/chunks/{dropdown-default-textbox.9bef4138.js.map → dropdown-default-textbox.2d093874.js.map} +1 -1
  120. package/dist/chunks/{dropdown.15cc1c45.js → dropdown.10ea8304.js} +33 -31
  121. package/dist/chunks/dropdown.10ea8304.js.map +1 -0
  122. package/dist/chunks/{index.c39c64c9.js → index.0f8690c4.js} +2 -2
  123. package/dist/chunks/{index.c39c64c9.js.map → index.0f8690c4.js.map} +1 -1
  124. package/dist/chunks/{index.58ce168a.js → index.4a11da21.js} +179 -170
  125. package/dist/chunks/index.4a11da21.js.map +1 -0
  126. package/dist/chunks/{index.876ea5bf.js → index.660f2f2e.js} +2 -2
  127. package/dist/chunks/{index.876ea5bf.js.map → index.660f2f2e.js.map} +1 -1
  128. package/dist/chunks/{index.b9c8c99a.js → index.f607a3f1.js} +4 -4
  129. package/dist/chunks/{index.b9c8c99a.js.map → index.f607a3f1.js.map} +1 -1
  130. package/dist/chunks/{debounce.f8d92e44.js → keyboard-navigation.ca47dfa8.js} +11 -17
  131. package/dist/chunks/keyboard-navigation.ca47dfa8.js.map +1 -0
  132. package/dist/chunks/{listbox-option-tag.f8b467a7.js → listbox-option-tag.e2688e54.js} +2 -2
  133. package/dist/chunks/{listbox-option-tag.f8b467a7.js.map → listbox-option-tag.e2688e54.js.map} +1 -1
  134. package/dist/chunks/{listbox.cbf47484.js → listbox.201a8521.js} +6 -5
  135. package/dist/chunks/{listbox.cbf47484.js.map → listbox.201a8521.js.map} +1 -1
  136. package/dist/chunks/{tooltip.0297fd5d.js → tooltip.f89cb0cd.js} +18 -18
  137. package/dist/chunks/{tooltip.0297fd5d.js.map → tooltip.f89cb0cd.js.map} +1 -1
  138. package/dist/chunks/use-has-slot.6052d56a.js.map +1 -1
  139. package/dist/code-snippet.js +193 -191
  140. package/dist/code-snippet.js.map +1 -1
  141. package/dist/country.js +1 -1
  142. package/dist/data-grid.js +750 -640
  143. package/dist/data-grid.js.map +1 -1
  144. package/dist/date-picker.js +5 -5
  145. package/dist/date-range-picker.js +2 -2
  146. package/dist/divider.js +1 -1
  147. package/dist/dropdown.js +3 -3
  148. package/dist/empty-state.js +10 -10
  149. package/dist/empty-state.js.map +1 -1
  150. package/dist/filter-bar.js +533 -491
  151. package/dist/filter-bar.js.map +1 -1
  152. package/dist/focus-trap.js +1 -1
  153. package/dist/form-layout.js +71 -50
  154. package/dist/form-layout.js.map +1 -1
  155. package/dist/header.js +181 -102
  156. package/dist/header.js.map +1 -1
  157. package/dist/image.js +3 -1
  158. package/dist/index.js +200 -193
  159. package/dist/index.js.map +1 -1
  160. package/dist/info-icon.js +2 -2
  161. package/dist/input-field.js +2 -2
  162. package/dist/internal.js +4 -4
  163. package/dist/link.js +1 -1
  164. package/dist/loading-indicator.js +1 -1
  165. package/dist/menu.js +39 -30
  166. package/dist/menu.js.map +1 -1
  167. package/dist/modal.js +29 -26
  168. package/dist/modal.js.map +1 -1
  169. package/dist/pagination.js +2 -2
  170. package/dist/payment-method.js +1 -1
  171. package/dist/popover.js +43 -31
  172. package/dist/popover.js.map +1 -1
  173. package/dist/popper-container.js +1228 -180
  174. package/dist/popper-container.js.map +1 -1
  175. package/dist/radio-group.js +1 -1
  176. package/dist/search-bar.js +3 -3
  177. package/dist/segmented-control.js +9 -9
  178. package/dist/segmented-control.js.map +1 -1
  179. package/dist/sidepanel.js +13 -13
  180. package/dist/sidepanel.js.map +1 -1
  181. package/dist/status.js +1 -1
  182. package/dist/stepper.js +229 -0
  183. package/dist/stepper.js.map +1 -0
  184. package/dist/structured-list.js +1 -1
  185. package/dist/summary-grid.js +2 -2
  186. package/dist/tabs.js +1 -1
  187. package/dist/tag.js +2 -2
  188. package/dist/textarea.js +1 -1
  189. package/dist/timeline.js +2 -2
  190. package/dist/toast.js +1 -1
  191. package/dist/toggle.js +14 -14
  192. package/dist/toggle.js.map +1 -1
  193. package/dist/web-types.json +279 -60
  194. package/package.json +3 -3
  195. package/dist/chunks/base-button.7a676605.js +0 -82
  196. package/dist/chunks/base-button.7a676605.js.map +0 -1
  197. package/dist/chunks/base-modal.a51d2395.js +0 -207
  198. package/dist/chunks/base-modal.a51d2395.js.map +0 -1
  199. package/dist/chunks/debounce.f8d92e44.js.map +0 -1
  200. package/dist/chunks/dropdown.15cc1c45.js.map +0 -1
  201. package/dist/chunks/index.58ce168a.js.map +0 -1
package/dist/header.js CHANGED
@@ -1,117 +1,196 @@
1
- import { defineComponent as O, computed as M } from "vue";
2
- import { BentoInfoIcon as E } from "./info-icon.js";
3
- import { u as A } from "./chunks/use-has-slot.6052d56a.js";
4
- import { B as C, c as T, a as U } from "./chunks/index.1645ffcb.js";
5
- import { u as X } from "./chunks/i18n.155748d6.js";
6
- import { c as p, a as H } from "./chunks/index.86453263.js";
7
- import { r as u, t as s, e as _, g as D, d as R, f as Y } from "./chunks/index.f55fdc32.js";
8
- import { e as w } from "./chunks/index.fdf12170.js";
9
- import { BentoButtonActions as P } from "./button.js";
10
- import { n as B } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
11
- import "./assets/index20.css";
12
- function F(t, e) {
13
- u(2, arguments);
14
- var a = s(t), n = s(e), l = a.getFullYear() - n.getFullYear(), r = a.getMonth() - n.getMonth();
15
- return l * 12 + r;
1
+ import { defineComponent as A, computed as p } from "vue";
2
+ import { BentoMenu as C } from "./menu.js";
3
+ import { BentoButtonActions as E } from "./button.js";
4
+ import { n as I } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
5
+ import { BentoInfoIcon as w } from "./info-icon.js";
6
+ import { u as U } from "./chunks/use-has-slot.6052d56a.js";
7
+ import { B, c as b, a as X } from "./chunks/index.1645ffcb.js";
8
+ import { u as R } from "./chunks/i18n.155748d6.js";
9
+ import { c as _, a as H } from "./chunks/index.86453263.js";
10
+ import { r as l, t as i, e as g, g as y, d as P, f as Y } from "./chunks/index.f55fdc32.js";
11
+ import { e as F } from "./chunks/index.fdf12170.js";
12
+ import "./assets/index37.css";
13
+ function G(e, t) {
14
+ l(2, arguments);
15
+ var n = i(e), a = i(t), s = n.getFullYear() - a.getFullYear(), r = n.getMonth() - a.getMonth();
16
+ return s * 12 + r;
16
17
  }
17
- function G(t, e) {
18
- return u(2, arguments), s(t).getTime() - s(e).getTime();
18
+ function L(e, t) {
19
+ return l(2, arguments), i(e).getTime() - i(t).getTime();
19
20
  }
20
- var b = {
21
+ var T = {
21
22
  ceil: Math.ceil,
22
23
  round: Math.round,
23
24
  floor: Math.floor,
24
- trunc: function(t) {
25
- return t < 0 ? Math.ceil(t) : Math.floor(t);
25
+ trunc: function(e) {
26
+ return e < 0 ? Math.ceil(e) : Math.floor(e);
26
27
  }
27
28
  // Math.trunc is not supported by IE
28
- }, L = "trunc";
29
- function z(t) {
30
- return t ? b[t] : b[L];
29
+ }, W = "trunc";
30
+ function $(e) {
31
+ return e ? T[e] : T[W];
31
32
  }
32
- function j(t) {
33
- u(1, arguments);
34
- var e = s(t), a = e.getMonth();
35
- return e.setFullYear(e.getFullYear(), a + 1, 0), e.setHours(23, 59, 59, 999), e;
33
+ function q(e) {
34
+ l(1, arguments);
35
+ var t = i(e), n = t.getMonth();
36
+ return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
36
37
  }
37
- function q(t) {
38
- u(1, arguments);
39
- var e = s(t);
40
- return w(e).getTime() === j(e).getTime();
38
+ function z(e) {
39
+ l(1, arguments);
40
+ var t = i(e);
41
+ return F(t).getTime() === q(t).getTime();
41
42
  }
42
- function W(t, e) {
43
- u(2, arguments);
44
- var a = s(t), n = s(e), l = p(a, n), r = Math.abs(F(a, n)), i;
43
+ function j(e, t) {
44
+ l(2, arguments);
45
+ var n = i(e), a = i(t), s = _(n, a), r = Math.abs(G(n, a)), c;
45
46
  if (r < 1)
46
- i = 0;
47
+ c = 0;
47
48
  else {
48
- a.getMonth() === 1 && a.getDate() > 27 && a.setDate(30), a.setMonth(a.getMonth() - l * r);
49
- var f = p(a, n) === -l;
50
- q(s(t)) && r === 1 && p(t, n) === 1 && (f = !1), i = l * (r - Number(f));
49
+ n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - s * r);
50
+ var u = _(n, a) === -s;
51
+ z(i(e)) && r === 1 && _(e, a) === 1 && (u = !1), c = s * (r - Number(u));
51
52
  }
52
- return i === 0 ? 0 : i;
53
+ return c === 0 ? 0 : c;
53
54
  }
54
- function k(t, e, a) {
55
- u(2, arguments);
56
- var n = G(t, e) / 1e3;
57
- return z(a == null ? void 0 : a.roundingMethod)(n);
55
+ function k(e, t, n) {
56
+ l(2, arguments);
57
+ var a = L(e, t) / 1e3;
58
+ return $(n == null ? void 0 : n.roundingMethod)(a);
58
59
  }
59
- var y = 1440, J = 2520, h = 43200, K = 86400;
60
- function Q(t, e) {
61
- var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
62
- u(2, arguments);
63
- var n = a.locale || _;
64
- if (!n.formatDistance)
60
+ var D = 1440, J = 2520, h = 43200, K = 86400;
61
+ function Q(e, t) {
62
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
63
+ l(2, arguments);
64
+ var a = n.locale || g;
65
+ if (!a.formatDistance)
65
66
  throw new RangeError("locale must contain formatDistance property");
66
- var l = p(t, e);
67
- if (isNaN(l))
67
+ var s = _(e, t);
68
+ if (isNaN(s))
68
69
  throw new RangeError("Invalid time value");
69
- var r = H(a);
70
- r.addSuffix = !!a.addSuffix, r.comparison = l;
71
- var i, f;
72
- l > 0 ? (i = s(e), f = s(t)) : (i = s(t), f = s(e));
73
- var c = k(f, i), I = (D(f) - D(i)) / 1e3, o = Math.round((c - I) / 60), d;
70
+ var r = H(n);
71
+ r.addSuffix = !!n.addSuffix, r.comparison = s;
72
+ var c, u;
73
+ s > 0 ? (c = i(t), u = i(e)) : (c = i(e), u = i(t));
74
+ var f = k(u, c), x = (y(u) - y(c)) / 1e3, o = Math.round((f - x) / 60), d;
74
75
  if (o < 2)
75
- return a.includeSeconds ? c < 5 ? n.formatDistance("lessThanXSeconds", 5, r) : c < 10 ? n.formatDistance("lessThanXSeconds", 10, r) : c < 20 ? n.formatDistance("lessThanXSeconds", 20, r) : c < 40 ? n.formatDistance("halfAMinute", null, r) : c < 60 ? n.formatDistance("lessThanXMinutes", 1, r) : n.formatDistance("xMinutes", 1, r) : o === 0 ? n.formatDistance("lessThanXMinutes", 1, r) : n.formatDistance("xMinutes", o, r);
76
+ return n.includeSeconds ? f < 5 ? a.formatDistance("lessThanXSeconds", 5, r) : f < 10 ? a.formatDistance("lessThanXSeconds", 10, r) : f < 20 ? a.formatDistance("lessThanXSeconds", 20, r) : f < 40 ? a.formatDistance("halfAMinute", null, r) : f < 60 ? a.formatDistance("lessThanXMinutes", 1, r) : a.formatDistance("xMinutes", 1, r) : o === 0 ? a.formatDistance("lessThanXMinutes", 1, r) : a.formatDistance("xMinutes", o, r);
76
77
  if (o < 45)
77
- return n.formatDistance("xMinutes", o, r);
78
+ return a.formatDistance("xMinutes", o, r);
78
79
  if (o < 90)
79
- return n.formatDistance("aboutXHours", 1, r);
80
- if (o < y) {
80
+ return a.formatDistance("aboutXHours", 1, r);
81
+ if (o < D) {
81
82
  var S = Math.round(o / 60);
82
- return n.formatDistance("aboutXHours", S, r);
83
+ return a.formatDistance("aboutXHours", S, r);
83
84
  } else {
84
85
  if (o < J)
85
- return n.formatDistance("xDays", 1, r);
86
+ return a.formatDistance("xDays", 1, r);
86
87
  if (o < h) {
87
- var N = Math.round(o / y);
88
- return n.formatDistance("xDays", N, r);
88
+ var N = Math.round(o / D);
89
+ return a.formatDistance("xDays", N, r);
89
90
  } else if (o < K)
90
- return d = Math.round(o / h), n.formatDistance("aboutXMonths", d, r);
91
+ return d = Math.round(o / h), a.formatDistance("aboutXMonths", d, r);
91
92
  }
92
- if (d = W(f, i), d < 12) {
93
- var x = Math.round(o / h);
94
- return n.formatDistance("xMonths", x, r);
93
+ if (d = j(u, c), d < 12) {
94
+ var O = Math.round(o / h);
95
+ return a.formatDistance("xMonths", O, r);
95
96
  } else {
96
- var g = d % 12, v = Math.floor(d / 12);
97
- return g < 3 ? n.formatDistance("aboutXYears", v, r) : g < 9 ? n.formatDistance("overXYears", v, r) : n.formatDistance("almostXYears", v + 1, r);
97
+ var M = d % 12, v = Math.floor(d / 12);
98
+ return M < 3 ? a.formatDistance("aboutXYears", v, r) : M < 9 ? a.formatDistance("overXYears", v, r) : a.formatDistance("almostXYears", v + 1, r);
98
99
  }
99
100
  }
100
- function V(t, e) {
101
- return u(1, arguments), Q(t, Date.now(), e);
101
+ function V(e, t) {
102
+ return l(1, arguments), Q(e, Date.now(), t);
102
103
  }
103
- var m = /* @__PURE__ */ ((t) => (t.PAGE = "page", t.COMPONENT = "component", t))(m || {});
104
- const Z = {
104
+ const Z = {}, tt = /* @__PURE__ */ A({
105
+ ...Z,
106
+ __name: "button-actions-with-menu",
107
+ props: {
108
+ /**
109
+ * List of actions that will be used to render the buttons.
110
+ * First element in the list will be rendered as "primary".
111
+ * All elements after the first will be rendered as "secondary".
112
+ *
113
+ * Each object in the list should have a `title`, an `event` and
114
+ * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.
115
+ *
116
+ * `title`: Button's text.
117
+ *
118
+ * `event`: Event triggered when clicking the Button.
119
+ *
120
+ * `icon` (optional): Vue Icon from the library `@adyen/ui-assets-icons-16`.
121
+ *
122
+ * @see BentoButton for a list of all the other props supported by each button action.
123
+ *
124
+ * ```
125
+ * [{
126
+ * title: 'Primary',
127
+ * event: () => { ... },
128
+ * icon: FourPeopleIcon,
129
+ * link: {
130
+ variant: 'default',
131
+ external: true,
132
+ to: 'https://www.adyen.com/'
133
+ },
134
+ * }, {
135
+ * title: 'Secondary',
136
+ * event: () => { ... }
137
+ * disabled: true,
138
+ * variant: BentoButtonVariant.PRIMARY,
139
+ * critical: true
140
+ * }]
141
+ * ```
142
+ */
143
+ actions: {
144
+ type: Array,
145
+ required: !0
146
+ },
147
+ /**
148
+ * The number of actions to be displayed. The rest of the actions will be collapsed in a menu component.
149
+ */
150
+ displayedActions: {
151
+ type: Number,
152
+ default: void 0
153
+ }
154
+ },
155
+ setup(e) {
156
+ const t = e, n = p(() => t.actions.slice(0, t.displayedActions)), a = p(
157
+ () => t.displayedActions && t.displayedActions < t.actions.length ? t.actions.slice(t.displayedActions, t.actions.length).map((s) => ({
158
+ text: s.title,
159
+ handler: s.event,
160
+ icon: s.icon,
161
+ critical: s.critical,
162
+ disabled: s.disabled
163
+ })) : []
164
+ );
165
+ return { __sfc: !0, props: t, computedActions: n, computedMenuActions: a, BentoMenu: C, BentoButtonActions: E };
166
+ }
167
+ });
168
+ var et = function() {
169
+ var t = this, n = t._self._c, a = t._self._setupProxy;
170
+ return n("div", { staticClass: "b-button-actions-with-menu" }, [n("div", { staticClass: "b-button-actions-with-menu__container-wrapper", attrs: { role: "group" } }, [n(a.BentoButtonActions, { attrs: { actions: a.computedActions } }), a.computedMenuActions.length ? n(a.BentoMenu, { attrs: { data: a.computedMenuActions } }) : t._e()], 1)]);
171
+ }, nt = [], at = /* @__PURE__ */ I(
172
+ tt,
173
+ et,
174
+ nt,
175
+ !1,
176
+ null,
177
+ "33472030",
178
+ null,
179
+ null
180
+ );
181
+ const rt = at.exports;
182
+ var m = /* @__PURE__ */ ((e) => (e.PAGE = "page", e.COMPONENT = "component", e))(m || {});
183
+ const st = {
105
184
  "en-US": {
106
185
  lastUpdated: "Last updated: {date} ago"
107
186
  }
108
- }, $ = O({
109
- i18n: { messages: Z },
187
+ }, ot = A({
188
+ i18n: { messages: st },
110
189
  name: "bento-header",
111
190
  components: {
112
- BentoTypography: C,
113
- BentoButtonActions: P,
114
- BentoInfoIcon: E
191
+ BentoTypography: B,
192
+ ButtonActionsWithMenu: rt,
193
+ BentoInfoIcon: w
115
194
  },
116
195
  props: {
117
196
  /**
@@ -121,7 +200,7 @@ const Z = {
121
200
  variant: {
122
201
  type: String,
123
202
  default: m.PAGE,
124
- validator: (t) => Object.values(m).includes(t)
203
+ validator: (e) => Object.values(m).includes(e)
125
204
  },
126
205
  /**
127
206
  * Text used as a title
@@ -143,41 +222,41 @@ const Z = {
143
222
  */
144
223
  lastUpdated: { type: [Date, Number], default: null }
145
224
  },
146
- setup(t, { slots: e }) {
147
- const { t: a, locale: n } = X(), l = { de: R, enUS: _, fr: Y }, r = M(() => ({
148
- el: t.variant === m.PAGE ? T.H1 : T.H2,
149
- variant: U.TITLE,
150
- medium: t.variant === m.COMPONENT,
151
- large: t.variant === m.PAGE
152
- })), i = M(
153
- () => t.lastUpdated ? a("lastUpdated", {
154
- date: V(t.lastUpdated, {
155
- locale: l[n.value.substring(0, 2)] || _
225
+ setup(e, { slots: t }) {
226
+ const { t: n, locale: a } = R(), s = { de: P, enUS: g, fr: Y }, r = p(() => ({
227
+ el: e.variant === m.PAGE ? b.H1 : b.H2,
228
+ variant: X.TITLE,
229
+ medium: e.variant === m.COMPONENT,
230
+ large: e.variant === m.PAGE
231
+ })), c = p(
232
+ () => e.lastUpdated ? n("lastUpdated", {
233
+ date: V(e.lastUpdated, {
234
+ locale: s[a.value.substring(0, 2)] || g
156
235
  })
157
236
  }) : null
158
237
  );
159
238
  return {
160
- hasSlot: A(e),
161
- timestamp: i,
239
+ hasSlot: U(t),
240
+ timestamp: c,
162
241
  typography: r
163
242
  };
164
243
  }
165
244
  });
166
- var ee = function() {
167
- var e = this, a = e._self._c;
168
- return e._self._setupProxy, a("div", { staticClass: "b-header" }, [a("div", { staticClass: "b-header__wrapper" }, [a("div", { staticClass: "b-header__title" }, [a("div", [a("bento-typography", e._b({ staticClass: "b-header__text" }, "bento-typography", e.typography, !1), [e._v(e._s(e.title))]), e.infoIconTooltipText ? a("bento-info-icon", { staticClass: "b-header__tooltip", attrs: { "tooltip-text": e.infoIconTooltipText } }) : e._e()], 1), e.lastUpdated ? a("bento-typography", { staticClass: "b-header__timestamp", attrs: { el: "div", variant: "caption" } }, [e._v(" " + e._s(e.timestamp) + " ")]) : e._e()], 1), e.actions ? a("bento-button-actions", { staticClass: "b-header__actions", attrs: { actions: e.actions } }) : e._e()], 1)]);
169
- }, te = [], ae = /* @__PURE__ */ B(
170
- $,
171
- ee,
172
- te,
245
+ var it = function() {
246
+ var t = this, n = t._self._c;
247
+ return t._self._setupProxy, n("div", { staticClass: "b-header" }, [n("div", { staticClass: "b-header__wrapper" }, [n("div", { staticClass: "b-header__title" }, [n("div", [n("bento-typography", t._b({ staticClass: "b-header__text" }, "bento-typography", t.typography, !1), [t._v(t._s(t.title))]), t.infoIconTooltipText ? n("bento-info-icon", { staticClass: "b-header__tooltip", attrs: { "tooltip-text": t.infoIconTooltipText } }) : t._e()], 1), t.lastUpdated ? n("bento-typography", { staticClass: "b-header__timestamp", attrs: { el: "div", variant: "caption" } }, [t._v(" " + t._s(t.timestamp) + " ")]) : t._e()], 1), t.actions ? n("button-actions-with-menu", { staticClass: "b-header__actions", attrs: { actions: t.actions, "displayed-actions": 2 } }) : t._e()], 1)]);
248
+ }, ct = [], ut = /* @__PURE__ */ I(
249
+ ot,
250
+ it,
251
+ ct,
173
252
  !1,
174
253
  null,
175
- "5fa92771",
254
+ "2c272b7c",
176
255
  null,
177
256
  null
178
257
  );
179
- const me = ae.exports;
258
+ const yt = ut.exports;
180
259
  export {
181
- me as BentoHeader
260
+ yt as BentoHeader
182
261
  };
183
262
  //# sourceMappingURL=header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"header.js","sources":["../../../node_modules/date-fns/esm/differenceInCalendarMonths/index.js","../../../node_modules/date-fns/esm/differenceInMilliseconds/index.js","../../../node_modules/date-fns/esm/_lib/roundingMethods/index.js","../../../node_modules/date-fns/esm/endOfMonth/index.js","../../../node_modules/date-fns/esm/isLastDayOfMonth/index.js","../../../node_modules/date-fns/esm/differenceInMonths/index.js","../../../node_modules/date-fns/esm/differenceInSeconds/index.js","../../../node_modules/date-fns/esm/formatDistance/index.js","../../../node_modules/date-fns/esm/formatDistanceToNow/index.js","../src/components/header/header.types.ts","../src/components/header/header.vue"],"sourcesContent":["import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * var result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\n\nexport default function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();\n var monthDiff = dateLeft.getMonth() - dateRight.getMonth();\n return yearDiff * 12 + monthDiff;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\n\nexport default function differenceInMilliseconds(dateLeft, dateRight) {\n requiredArgs(2, arguments);\n return toDate(dateLeft).getTime() - toDate(dateRight).getTime();\n}","var roundingMap = {\n ceil: Math.ceil,\n round: Math.round,\n floor: Math.floor,\n trunc: function (value) {\n return value < 0 ? Math.ceil(value) : Math.floor(value);\n } // Math.trunc is not supported by IE\n\n};\nvar defaultRoundingMethod = 'trunc';\nexport function getRoundingMethod(method) {\n return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\n\nexport default function endOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport endOfDay from \"../endOfDay/index.js\";\nimport endOfMonth from \"../endOfMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is the last day of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * var result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\n\nexport default function isLastDayOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n return endOfDay(date).getTime() === endOfMonth(date).getTime();\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarMonths from \"../differenceInCalendarMonths/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport isLastDayOfMonth from \"../isLastDayOfMonth/index.js\";\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates using trunc as a default rounding method.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\n\nexport default function differenceInMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var sign = compareAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight));\n var result; // Check for the difference of less than month\n\n if (difference < 1) {\n result = 0;\n } else {\n if (dateLeft.getMonth() === 1 && dateLeft.getDate() > 27) {\n // This will check if the date is end of Feb and assign a higher end of month date\n // to compare it with Jan\n dateLeft.setDate(30);\n }\n\n dateLeft.setMonth(dateLeft.getMonth() - sign * difference); // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign; // Check for cases of one full calendar month\n\n if (isLastDayOfMonth(toDate(dirtyDateLeft)) && difference === 1 && compareAsc(dirtyDateLeft, dateRight) === 1) {\n isLastMonthNotFull = false;\n }\n\n result = sign * (difference - Number(isLastMonthNotFull));\n } // Prevent negative zero\n\n\n return result === 0 ? 0 : result;\n}","import differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of seconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\n\nexport default function differenceInSeconds(dateLeft, dateRight, options) {\n requiredArgs(2, arguments);\n var diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;\n return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import compareAsc from \"../compareAsc/index.js\";\nimport differenceInMonths from \"../differenceInMonths/index.js\";\nimport differenceInSeconds from \"../differenceInSeconds/index.js\";\nimport defaultLocale from \"../locale/en-US/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport cloneObject from \"../_lib/cloneObject/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MINUTES_IN_DAY = 1440;\nvar MINUTES_IN_ALMOST_TWO_DAYS = 2520;\nvar MINUTES_IN_MONTH = 43200;\nvar MINUTES_IN_TWO_MONTHS = 86400;\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `distanceInWords ` to `formatDistance`\n * to make its name consistent with `format` and `formatRelative`.\n *\n * - The order of arguments is swapped to make the function\n * consistent with `differenceIn...` functions.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWords(\n * new Date(1986, 3, 4, 10, 32, 0),\n * new Date(1986, 3, 4, 11, 32, 0),\n * { addSuffix: true }\n * ) //=> 'in about 1 hour'\n *\n * // v2.0.0 onward\n *\n * formatDistance(\n * new Date(1986, 3, 4, 11, 32, 0),\n * new Date(1986, 3, 4, 10, 32, 0),\n * { addSuffix: true }\n * ) //=> 'in about 1 hour'\n * ```\n *\n * @param {Date|Number} date - the date\n * @param {Date|Number} baseDate - the date to compare with\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `baseDate` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport default function formatDistance(dirtyDate, dirtyBaseDate) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n requiredArgs(2, arguments);\n var locale = options.locale || defaultLocale;\n\n if (!locale.formatDistance) {\n throw new RangeError('locale must contain formatDistance property');\n }\n\n var comparison = compareAsc(dirtyDate, dirtyBaseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError('Invalid time value');\n }\n\n var localizeOptions = cloneObject(options);\n localizeOptions.addSuffix = Boolean(options.addSuffix);\n localizeOptions.comparison = comparison;\n var dateLeft;\n var dateRight;\n\n if (comparison > 0) {\n dateLeft = toDate(dirtyBaseDate);\n dateRight = toDate(dirtyDate);\n } else {\n dateLeft = toDate(dirtyDate);\n dateRight = toDate(dirtyBaseDate);\n }\n\n var seconds = differenceInSeconds(dateRight, dateLeft);\n var offsetInSeconds = (getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft)) / 1000;\n var minutes = Math.round((seconds - offsetInSeconds) / 60);\n var months; // 0 up to 2 mins\n\n if (minutes < 2) {\n if (options.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance('lessThanXSeconds', 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance('lessThanXSeconds', 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance('lessThanXSeconds', 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance('halfAMinute', null, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', minutes, localizeOptions);\n }\n } // 2 mins up to 0.75 hrs\n\n } else if (minutes < 45) {\n return locale.formatDistance('xMinutes', minutes, localizeOptions); // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance('aboutXHours', 1, localizeOptions); // 1.5 hrs up to 24 hrs\n } else if (minutes < MINUTES_IN_DAY) {\n var hours = Math.round(minutes / 60);\n return locale.formatDistance('aboutXHours', hours, localizeOptions); // 1 day up to 1.75 days\n } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {\n return locale.formatDistance('xDays', 1, localizeOptions); // 1.75 days up to 30 days\n } else if (minutes < MINUTES_IN_MONTH) {\n var days = Math.round(minutes / MINUTES_IN_DAY);\n return locale.formatDistance('xDays', days, localizeOptions); // 1 month up to 2 months\n } else if (minutes < MINUTES_IN_TWO_MONTHS) {\n months = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('aboutXMonths', months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft); // 2 months up to 12 months\n\n if (months < 12) {\n var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('xMonths', nearestMonth, localizeOptions); // 1 year up to max Date\n } else {\n var monthsSinceStartOfYear = months % 12;\n var years = Math.floor(months / 12); // N years up to 1 years 3 months\n\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance('aboutXYears', years, localizeOptions); // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance('overXYears', years, localizeOptions); // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance('almostXYears', years + 1, localizeOptions);\n }\n }\n}","import distanceInWords from \"../formatDistance/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name formatDistanceToNow\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given date and now in words.\n *\n * | Distance to now | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance to now | Result |\n * |---------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `distanceInWordsToNow ` to `formatDistanceToNow`\n * to make its name consistent with `format` and `formatRelative`.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWordsToNow(new Date(2014, 6, 2), { addSuffix: true })\n * //=> 'in 6 months'\n *\n * // v2.0.0 onward\n *\n * formatDistanceToNow(new Date(2014, 6, 2), { addSuffix: true })\n * //=> 'in 6 months'\n * ```\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result specifies if now is earlier or later than the passed date\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * var result = formatDistanceToNow(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * var result = formatDistanceToNow(\n * new Date(2015, 0, 1, 0, 0, 15),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * var result = formatDistanceToNow(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in about 1 year'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = formatDistanceToNow(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\n\nexport default function formatDistanceToNow(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n return distanceInWords(dirtyDate, Date.now(), dirtyOptions);\n}","/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoHeaderVariant {\n PAGE = 'page',\n COMPONENT = 'component',\n}\n","<template>\n <div class=\"b-header\">\n <div class=\"b-header__wrapper\">\n <div class=\"b-header__title\">\n <div>\n <bento-typography v-bind=\"typography\" class=\"b-header__text\">{{ title }}</bento-typography>\n <bento-info-icon\n v-if=\"infoIconTooltipText\"\n :tooltip-text=\"infoIconTooltipText\"\n class=\"b-header__tooltip\"\n />\n </div>\n <bento-typography v-if=\"lastUpdated\" class=\"b-header__timestamp\" el=\"div\" variant=\"caption\">\n {{ timestamp }}\n </bento-typography>\n </div>\n <bento-button-actions v-if=\"actions\" :actions=\"actions\" class=\"b-header__actions\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoButtonActions, BentoButtonActionsList } from '@/components/button';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { useHasSlot } from '@/composables';\n import { BentoHeaderVariant } from './header.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { useI18n } from '@/utils/ts/i18n';\n import { de, enUS, fr } from 'date-fns/locale';\n import formatDistanceToNow from 'date-fns/formatDistanceToNow';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n export default defineComponent({\n i18n: { messages },\n name: 'bento-header',\n components: {\n BentoTypography,\n BentoButtonActions,\n BentoInfoIcon,\n },\n props: {\n /**\n * Variant represents type of Header\n * @values page, component\n */\n variant: {\n type: String as PropType<BentoHeaderVariant | `${BentoHeaderVariant}`>,\n default: BentoHeaderVariant.PAGE,\n validator: (value: BentoHeaderVariant) => Object.values(BentoHeaderVariant).includes(value),\n },\n /**\n * Text used as a title\n */\n title: { type: String, required: true },\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: { type: String, default: null },\n /**\n * Array of BentoButtonActionsList to show to the right of the title\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n /**\n * JavaScript \"Date\" object for when the content was last updated\n */\n lastUpdated: { type: [Date, Number], default: null },\n },\n setup(props, { slots }) {\n const { t, locale } = useI18n<{ message: MessageSchema }>({ messages });\n // TODO to replace with dynamic import\n const locales = { de, enUS, fr };\n\n const typography = computed(() => ({\n el: props.variant === BentoHeaderVariant.PAGE ? BentoTypographyElement.H1 : BentoTypographyElement.H2,\n variant: BentoTypographyVariant.TITLE,\n medium: props.variant === BentoHeaderVariant.COMPONENT,\n large: props.variant === BentoHeaderVariant.PAGE,\n }));\n\n const timestamp = computed(() =>\n props.lastUpdated\n ? t('lastUpdated', {\n date: formatDistanceToNow(props.lastUpdated, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n }),\n })\n : null\n );\n return {\n hasSlot: useHasSlot(slots),\n timestamp,\n typography,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./header.scss\" />\n"],"names":["differenceInCalendarMonths","dirtyDateLeft","dirtyDateRight","requiredArgs","dateLeft","toDate","dateRight","yearDiff","monthDiff","differenceInMilliseconds","roundingMap","value","defaultRoundingMethod","getRoundingMethod","method","endOfMonth","dirtyDate","date","month","isLastDayOfMonth","endOfDay","differenceInMonths","sign","compareAsc","difference","result","isLastMonthNotFull","differenceInSeconds","options","diff","MINUTES_IN_DAY","MINUTES_IN_ALMOST_TWO_DAYS","MINUTES_IN_MONTH","MINUTES_IN_TWO_MONTHS","formatDistance","dirtyBaseDate","locale","enUS","comparison","localizeOptions","cloneObject","seconds","offsetInSeconds","getTimezoneOffsetInMilliseconds","minutes","months","hours","days","nearestMonth","monthsSinceStartOfYear","years","formatDistanceToNow","dirtyOptions","BentoHeaderVariant","BentoHeaderVariant2","_sfc_main","defineComponent","messages","BentoTypography","BentoButtonActions","BentoInfoIcon","props","slots","t","useI18n","locales","de","fr","typography","computed","BentoTypographyElement","Bento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,EAAA,MAAA,CAAA,MAAA,MAAA,GAAA,SAAA,KAAA;AAAA,EAIA;AAAA,EACA,MAAAkD,GAAA,EAAA,OAAAC,EAAA,GAAA;AAEA,UAAA,EAAA,GAAAC,GAAA,QAAA3B,EAAA,IAAA4B,EAAA,GAEAC,IAAA,EAAA,IAAAC,GAAA,MAAA7B,GAAA,IAAA8B,EAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAAA,IAAAR,EAAA,YAAAR,EAAA,OAAAiB,EAAA,KAAAA,EAAA;AAAA,MACA,SAAAC,EAAA;AAAA,MACA,QAAAV,EAAA,YAAAR,EAAA;AAAA,MACA,OAAAQ,EAAA,YAAAR,EAAA;AAAA,IACA,EAAA,GAGAmB,IAAAH;AAAA,MAAA,MAAAR,EAAA,cAAAE,EAAA,eAAA;AAAA,QAEA,MAAAZ,EAAAU,EAAA,aAAA;AAAA,UACA,QAAAI,EAAA7B,EAAA,MAAA,UAAA,GAAA,CAAA,CAAA,KAAAC;AAAA,QACA,CAAA;AAAA,MACA,CAAA,IAAA;AAAA,IAEA;AAEA,WAAA;AAAA,MAAA,SAAAoC,EAAAX,CAAA;AAAA,MACA,WAAAU;AAAA,MACA,YAAAJ;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
1
+ {"version":3,"file":"header.js","sources":["../../../node_modules/date-fns/esm/differenceInCalendarMonths/index.js","../../../node_modules/date-fns/esm/differenceInMilliseconds/index.js","../../../node_modules/date-fns/esm/_lib/roundingMethods/index.js","../../../node_modules/date-fns/esm/endOfMonth/index.js","../../../node_modules/date-fns/esm/isLastDayOfMonth/index.js","../../../node_modules/date-fns/esm/differenceInMonths/index.js","../../../node_modules/date-fns/esm/differenceInSeconds/index.js","../../../node_modules/date-fns/esm/formatDistance/index.js","../../../node_modules/date-fns/esm/formatDistanceToNow/index.js","../src/components/internal/button-actions-with-menu/button-actions-with-menu.vue","../src/components/header/header.types.ts","../src/components/header/header.vue"],"sourcesContent":["import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * var result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\n\nexport default function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();\n var monthDiff = dateLeft.getMonth() - dateRight.getMonth();\n return yearDiff * 12 + monthDiff;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\n\nexport default function differenceInMilliseconds(dateLeft, dateRight) {\n requiredArgs(2, arguments);\n return toDate(dateLeft).getTime() - toDate(dateRight).getTime();\n}","var roundingMap = {\n ceil: Math.ceil,\n round: Math.round,\n floor: Math.floor,\n trunc: function (value) {\n return value < 0 ? Math.ceil(value) : Math.floor(value);\n } // Math.trunc is not supported by IE\n\n};\nvar defaultRoundingMethod = 'trunc';\nexport function getRoundingMethod(method) {\n return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\n\nexport default function endOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport endOfDay from \"../endOfDay/index.js\";\nimport endOfMonth from \"../endOfMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is the last day of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * var result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\n\nexport default function isLastDayOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n return endOfDay(date).getTime() === endOfMonth(date).getTime();\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarMonths from \"../differenceInCalendarMonths/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport isLastDayOfMonth from \"../isLastDayOfMonth/index.js\";\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates using trunc as a default rounding method.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\n\nexport default function differenceInMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var sign = compareAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight));\n var result; // Check for the difference of less than month\n\n if (difference < 1) {\n result = 0;\n } else {\n if (dateLeft.getMonth() === 1 && dateLeft.getDate() > 27) {\n // This will check if the date is end of Feb and assign a higher end of month date\n // to compare it with Jan\n dateLeft.setDate(30);\n }\n\n dateLeft.setMonth(dateLeft.getMonth() - sign * difference); // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign; // Check for cases of one full calendar month\n\n if (isLastDayOfMonth(toDate(dirtyDateLeft)) && difference === 1 && compareAsc(dirtyDateLeft, dateRight) === 1) {\n isLastMonthNotFull = false;\n }\n\n result = sign * (difference - Number(isLastMonthNotFull));\n } // Prevent negative zero\n\n\n return result === 0 ? 0 : result;\n}","import differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of seconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\n\nexport default function differenceInSeconds(dateLeft, dateRight, options) {\n requiredArgs(2, arguments);\n var diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;\n return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import compareAsc from \"../compareAsc/index.js\";\nimport differenceInMonths from \"../differenceInMonths/index.js\";\nimport differenceInSeconds from \"../differenceInSeconds/index.js\";\nimport defaultLocale from \"../locale/en-US/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport cloneObject from \"../_lib/cloneObject/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MINUTES_IN_DAY = 1440;\nvar MINUTES_IN_ALMOST_TWO_DAYS = 2520;\nvar MINUTES_IN_MONTH = 43200;\nvar MINUTES_IN_TWO_MONTHS = 86400;\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `distanceInWords ` to `formatDistance`\n * to make its name consistent with `format` and `formatRelative`.\n *\n * - The order of arguments is swapped to make the function\n * consistent with `differenceIn...` functions.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWords(\n * new Date(1986, 3, 4, 10, 32, 0),\n * new Date(1986, 3, 4, 11, 32, 0),\n * { addSuffix: true }\n * ) //=> 'in about 1 hour'\n *\n * // v2.0.0 onward\n *\n * formatDistance(\n * new Date(1986, 3, 4, 11, 32, 0),\n * new Date(1986, 3, 4, 10, 32, 0),\n * { addSuffix: true }\n * ) //=> 'in about 1 hour'\n * ```\n *\n * @param {Date|Number} date - the date\n * @param {Date|Number} baseDate - the date to compare with\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `baseDate` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport default function formatDistance(dirtyDate, dirtyBaseDate) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n requiredArgs(2, arguments);\n var locale = options.locale || defaultLocale;\n\n if (!locale.formatDistance) {\n throw new RangeError('locale must contain formatDistance property');\n }\n\n var comparison = compareAsc(dirtyDate, dirtyBaseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError('Invalid time value');\n }\n\n var localizeOptions = cloneObject(options);\n localizeOptions.addSuffix = Boolean(options.addSuffix);\n localizeOptions.comparison = comparison;\n var dateLeft;\n var dateRight;\n\n if (comparison > 0) {\n dateLeft = toDate(dirtyBaseDate);\n dateRight = toDate(dirtyDate);\n } else {\n dateLeft = toDate(dirtyDate);\n dateRight = toDate(dirtyBaseDate);\n }\n\n var seconds = differenceInSeconds(dateRight, dateLeft);\n var offsetInSeconds = (getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft)) / 1000;\n var minutes = Math.round((seconds - offsetInSeconds) / 60);\n var months; // 0 up to 2 mins\n\n if (minutes < 2) {\n if (options.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance('lessThanXSeconds', 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance('lessThanXSeconds', 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance('lessThanXSeconds', 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance('halfAMinute', null, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', minutes, localizeOptions);\n }\n } // 2 mins up to 0.75 hrs\n\n } else if (minutes < 45) {\n return locale.formatDistance('xMinutes', minutes, localizeOptions); // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance('aboutXHours', 1, localizeOptions); // 1.5 hrs up to 24 hrs\n } else if (minutes < MINUTES_IN_DAY) {\n var hours = Math.round(minutes / 60);\n return locale.formatDistance('aboutXHours', hours, localizeOptions); // 1 day up to 1.75 days\n } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {\n return locale.formatDistance('xDays', 1, localizeOptions); // 1.75 days up to 30 days\n } else if (minutes < MINUTES_IN_MONTH) {\n var days = Math.round(minutes / MINUTES_IN_DAY);\n return locale.formatDistance('xDays', days, localizeOptions); // 1 month up to 2 months\n } else if (minutes < MINUTES_IN_TWO_MONTHS) {\n months = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('aboutXMonths', months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft); // 2 months up to 12 months\n\n if (months < 12) {\n var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('xMonths', nearestMonth, localizeOptions); // 1 year up to max Date\n } else {\n var monthsSinceStartOfYear = months % 12;\n var years = Math.floor(months / 12); // N years up to 1 years 3 months\n\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance('aboutXYears', years, localizeOptions); // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance('overXYears', years, localizeOptions); // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance('almostXYears', years + 1, localizeOptions);\n }\n }\n}","import distanceInWords from \"../formatDistance/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name formatDistanceToNow\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given date and now in words.\n *\n * | Distance to now | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance to now | Result |\n * |---------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `distanceInWordsToNow ` to `formatDistanceToNow`\n * to make its name consistent with `format` and `formatRelative`.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWordsToNow(new Date(2014, 6, 2), { addSuffix: true })\n * //=> 'in 6 months'\n *\n * // v2.0.0 onward\n *\n * formatDistanceToNow(new Date(2014, 6, 2), { addSuffix: true })\n * //=> 'in 6 months'\n * ```\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result specifies if now is earlier or later than the passed date\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * var result = formatDistanceToNow(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * var result = formatDistanceToNow(\n * new Date(2015, 0, 1, 0, 0, 15),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * var result = formatDistanceToNow(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in about 1 year'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = formatDistanceToNow(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\n\nexport default function formatDistanceToNow(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n return distanceInWords(dirtyDate, Date.now(), dirtyOptions);\n}","<template>\n <div class=\"b-button-actions-with-menu\">\n <div role=\"group\" class=\"b-button-actions-with-menu__container-wrapper\">\n <bento-button-actions :actions=\"computedActions\" />\n <bento-menu v-if=\"computedMenuActions.length\" :data=\"computedMenuActions\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType } from 'vue';\n import BentoMenu from '@/components/menu/menu.vue';\n import { BentoMenuItem } from '@/components/menu/components/menu-item/menu-item.types';\n import { BentoButtonActions, BentoButtonActionsList } from '@/components/button';\n\n /**\n * An internal button actions component with the option to display some of the actions in a menu.\n *\n * @example\n * <button-actions-with-menu\n * :actions=\"[\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon,\n * link: {\n * variant: 'default',\n * external: true,\n * to: 'https://www.adyen.com/'\n * },\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * disabled: true,\n * variant: BentoButtonVariant.PRIMARY,\n * critical: true\n * }]\n * :displayedActions=\"2\"\n * />\n */\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon` (optional): Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * @see BentoButton for a list of all the other props supported by each button action.\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon,\n * link: {\n variant: 'default',\n external: true,\n to: 'https://www.adyen.com/'\n },\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * disabled: true,\n * variant: BentoButtonVariant.PRIMARY,\n * critical: true\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n required: true,\n },\n\n /**\n * The number of actions to be displayed. The rest of the actions will be collapsed in a menu component.\n */\n displayedActions: {\n type: Number,\n default: undefined,\n },\n });\n\n const computedActions = computed(() => props.actions.slice(0, props.displayedActions));\n\n const computedMenuActions = computed(() =>\n props.displayedActions && props.displayedActions < props.actions.length\n ? (props.actions.slice(props.displayedActions, props.actions.length).map(el => ({\n text: el.title,\n handler: el.event,\n icon: el.icon,\n critical: el.critical,\n disabled: el.disabled,\n })) as BentoMenuItem[])\n : []\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * An internal button actions component with the option to display some of the actions in a menu.\n *\n * @example\n * <button-actions-with-menu\n * :actions=\"[\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon,\n * link: {\n * variant: 'default',\n * external: true,\n * to: 'https://www.adyen.com/'\n * },\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * disabled: true,\n * variant: BentoButtonVariant.PRIMARY,\n * critical: true\n * }]\n * :displayedActions=\"2\"\n * />\n */\n\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./button-actions-with-menu.scss\" />\n","/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoHeaderVariant {\n PAGE = 'page',\n COMPONENT = 'component',\n}\n","<template>\n <div class=\"b-header\">\n <div class=\"b-header__wrapper\">\n <div class=\"b-header__title\">\n <div>\n <bento-typography v-bind=\"typography\" class=\"b-header__text\">{{ title }}</bento-typography>\n <bento-info-icon\n v-if=\"infoIconTooltipText\"\n :tooltip-text=\"infoIconTooltipText\"\n class=\"b-header__tooltip\"\n />\n </div>\n <bento-typography v-if=\"lastUpdated\" class=\"b-header__timestamp\" el=\"div\" variant=\"caption\">\n {{ timestamp }}\n </bento-typography>\n </div>\n <button-actions-with-menu\n v-if=\"actions\"\n :actions=\"actions\"\n :displayed-actions=\"2\"\n class=\"b-header__actions\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import ButtonActionsWithMenu from '../internal/button-actions-with-menu/button-actions-with-menu.vue';\n import { BentoButtonActionsList } from '@/components/button';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { useHasSlot } from '@/composables';\n import { BentoHeaderVariant } from './header.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { useI18n } from '@/utils/ts/i18n';\n import { de, enUS, fr } from 'date-fns/locale';\n import formatDistanceToNow from 'date-fns/formatDistanceToNow';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n export default defineComponent({\n i18n: { messages },\n name: 'bento-header',\n components: {\n BentoTypography,\n ButtonActionsWithMenu,\n BentoInfoIcon,\n },\n props: {\n /**\n * Variant represents type of Header\n * @values page, component\n */\n variant: {\n type: String as PropType<BentoHeaderVariant | `${BentoHeaderVariant}`>,\n default: BentoHeaderVariant.PAGE,\n validator: (value: BentoHeaderVariant) => Object.values(BentoHeaderVariant).includes(value),\n },\n /**\n * Text used as a title\n */\n title: { type: String, required: true },\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: { type: String, default: null },\n /**\n * Array of BentoButtonActionsList to show to the right of the title\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n /**\n * JavaScript \"Date\" object for when the content was last updated\n */\n lastUpdated: { type: [Date, Number], default: null },\n },\n setup(props, { slots }) {\n const { t, locale } = useI18n<{ message: MessageSchema }>({ messages });\n // TODO to replace with dynamic import\n const locales = { de, enUS, fr };\n\n const typography = computed(() => ({\n el: props.variant === BentoHeaderVariant.PAGE ? BentoTypographyElement.H1 : BentoTypographyElement.H2,\n variant: BentoTypographyVariant.TITLE,\n medium: props.variant === BentoHeaderVariant.COMPONENT,\n large: props.variant === BentoHeaderVariant.PAGE,\n }));\n\n const timestamp = computed(() =>\n props.lastUpdated\n ? t('lastUpdated', {\n date: formatDistanceToNow(props.lastUpdated, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n }),\n })\n : null\n );\n return {\n hasSlot: useHasSlot(slots),\n timestamp,\n typography,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./header.scss\" />\n"],"names":["differenceInCalendarMonths","dirtyDateLeft","dirtyDateRight","requiredArgs","dateLeft","toDate","dateRight","yearDiff","monthDiff","differenceInMilliseconds","roundingMap","value","defaultRoundingMethod","getRoundingMethod","method","endOfMonth","dirtyDate","date","month","isLastDayOfMonth","endOfDay","differenceInMonths","sign","compareAsc","difference","result","isLastMonthNotFull","differenceInSeconds","options","diff","MINUTES_IN_DAY","MINUTES_IN_ALMOST_TWO_DAYS","MINUTES_IN_MONTH","MINUTES_IN_TWO_MONTHS","formatDistance","dirtyBaseDate","locale","enUS","comparison","localizeOptions","cloneObject","seconds","offsetInSeconds","getTimezoneOffsetInMilliseconds","minutes","months","hours","days","nearestMonth","monthsSinceStartOfYear","years","formatDistanceToNow","dirtyOptions","__default__","computedActions","computed","props","computedMenuActions","el","BentoHeaderVariant","BentoHeaderVariant2","_sfc_main","defineComponent","messages","BentoTypography","ButtonActionsWithMenu","BentoInfoIcon","slots","t","useI18n","locales","de","fr","typography","BentoTypographyElement","BentoTypographyVariant","timestamp","useHasSlot"],"mappings":";;;;;;;;;;;;AA4Be,SAAAA,EAAAC,GAAAC,GAAA;AACf,EAAAC,EAAA,GAAA,SAAA;AACA,MAAAC,IAAAC,EAAAJ,CAAA,GACAK,IAAAD,EAAAH,CAAA,GACAK,IAAAH,EAAA,YAAA,IAAAE,EAAA,YAAA,GACAE,IAAAJ,EAAA,SAAA,IAAAE,EAAA,SAAA;AACA,SAAAC,IAAA,KAAAC;AACA;ACNe,SAAAC,EAAAL,GAAAE,GAAA;AACf,SAAAH,EAAA,GAAA,SAAA,GACAE,EAAAD,CAAA,EAAA,QAAA,IAAAC,EAAAC,CAAA,EAAA,QAAA;AACA;AChCA,IAAAI,IAAA;AAAA,EACA,MAAA,KAAA;AAAA,EACA,OAAA,KAAA;AAAA,EACA,OAAA,KAAA;AAAA,EACA,OAAA,SAAAC,GAAA;AACA,WAAAA,IAAA,IAAA,KAAA,KAAAA,CAAA,IAAA,KAAA,MAAAA,CAAA;AAAA,EACA;AAAA;AAEA,GACAC,IAAA;AACO,SAAAC,EAAA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EAAA,IAAAiC,EAAA,GAEAC,IAAA,EAAA,IAAAC,GAAA,MAAAlC,GAAA,IAAAmC,EAAA,GAEAC,IAAAlB,EAAA,OAAA;AAAA,MAAA,IAAAC,EAAA,YAAAG,EAAA,OAAAe,EAAA,KAAAA,EAAA;AAAA,MACA,SAAAC,EAAA;AAAA,MACA,QAAAnB,EAAA,YAAAG,EAAA;AAAA,MACA,OAAAH,EAAA,YAAAG,EAAA;AAAA,IACA,EAAA,GAGAiB,IAAArB;AAAA,MAAA,MAAAC,EAAA,cAAAY,EAAA,eAAA;AAAA,QAEA,MAAAjB,EAAAK,EAAA,aAAA;AAAA,UACA,QAAAc,EAAAlC,EAAA,MAAA,UAAA,GAAA,CAAA,CAAA,KAAAC;AAAA,QACA,CAAA;AAAA,MACA,CAAA,IAAA;AAAA,IAEA;AAEA,WAAA;AAAA,MAAA,SAAAwC,EAAAV,CAAA;AAAA,MACA,WAAAS;AAAA,MACA,YAAAH;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
package/dist/image.js CHANGED
@@ -77,6 +77,8 @@ var P = function() {
77
77
  );
78
78
  const p = f.exports;
79
79
  export {
80
- p as BentoImage
80
+ p as BentoImage,
81
+ e as BentoImageAspectRatio,
82
+ _ as BentoImageObjectFit
81
83
  };
82
84
  //# sourceMappingURL=image.js.map