@adyen/bento-vue2 1.7.1 → 1.8.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.
- package/dist/@types/components.d.ts +2 -0
- package/dist/@types/packages/core/src/components/button/button.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +11 -0
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +7 -2
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +28 -18
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +25 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +13 -1
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +153 -12
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +18 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +320 -21
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +12 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +30 -24
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.types.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +11 -1
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.types.d.ts +13 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.types.d.ts +14 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.types.d.ts +22 -0
- package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/field-label/field-label.vue.d.ts +48 -0
- package/dist/@types/packages/vue2/src/components/internal/field-label/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/grid-layout/grid-layout.vue.d.ts +11 -0
- package/dist/@types/packages/vue2/src/components/internal/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/popover/popover.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +16 -22
- package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.vue.d.ts +20 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +19 -2
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +4 -2
- package/dist/@types/packages/vue2/src/components/timeline/timeline.vue.d.ts +18 -2
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +112 -93
- package/dist/action-bar.js.map +1 -1
- package/dist/alert.js +3 -3
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/field-label.css +1 -0
- package/dist/assets/grid-layout.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/loading-button.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +38 -35
- package/dist/button.js.map +1 -1
- package/dist/card.js +2 -2
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.9ec79f68.js → base-button.7886a7e6.js} +2 -2
- package/dist/chunks/{base-button.9ec79f68.js.map → base-button.7886a7e6.js.map} +1 -1
- package/dist/chunks/{base-modal.ab0f82b2.js → base-modal.31634fe8.js} +62 -51
- package/dist/chunks/base-modal.31634fe8.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.9d1365e9.js → button-actions-with-menu.5faea13e.js} +5 -5
- package/dist/chunks/{button-actions-with-menu.9d1365e9.js.map → button-actions-with-menu.5faea13e.js.map} +1 -1
- package/dist/chunks/{button.1dfed6fa.js → button.e09d5980.js} +2 -2
- package/dist/chunks/button.e09d5980.js.map +1 -0
- package/dist/chunks/calendar.47e9e755.js +959 -0
- package/dist/chunks/calendar.47e9e755.js.map +1 -0
- package/dist/chunks/{checkbox.65480106.js → checkbox.2277450e.js} +67 -56
- package/dist/chunks/checkbox.2277450e.js.map +1 -0
- package/dist/chunks/controls-group.6c5bfccd.js +79 -0
- package/dist/chunks/controls-group.6c5bfccd.js.map +1 -0
- package/dist/chunks/{copy.c41143ac.js → copy.a85c2e9f.js} +4 -4
- package/dist/chunks/{copy.c41143ac.js.map → copy.a85c2e9f.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.62feef5c.js → dropdown-default-textbox.25134789.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.62feef5c.js.map → dropdown-default-textbox.25134789.js.map} +1 -1
- package/dist/chunks/{dropdown.805b5c7d.js → dropdown.ce937989.js} +200 -196
- package/dist/chunks/dropdown.ce937989.js.map +1 -0
- package/dist/chunks/field-label.330edb60.js +107 -0
- package/dist/chunks/field-label.330edb60.js.map +1 -0
- package/dist/chunks/{fixed-scroller.92574ff8.js → fixed-scroller.8994e30a.js} +2 -2
- package/dist/chunks/{fixed-scroller.92574ff8.js.map → fixed-scroller.8994e30a.js.map} +1 -1
- package/dist/chunks/{footer-actions.55ce06ef.js → footer-actions.c9b2cb74.js} +3 -3
- package/dist/chunks/{footer-actions.55ce06ef.js.map → footer-actions.c9b2cb74.js.map} +1 -1
- package/dist/chunks/{grid-layout.b7e0d964.js → grid-layout.a806acb2.js} +36 -27
- package/dist/chunks/grid-layout.a806acb2.js.map +1 -0
- package/dist/chunks/index.210d2169.js +290 -0
- package/dist/chunks/index.210d2169.js.map +1 -0
- package/dist/chunks/{index.eec7f750.js → index.66503760.js} +3 -3
- package/dist/chunks/{index.eec7f750.js.map → index.66503760.js.map} +1 -1
- package/dist/chunks/{index.77d9d16d.js → index.86fc63ca.js} +30 -28
- package/dist/chunks/{index.77d9d16d.js.map → index.86fc63ca.js.map} +1 -1
- package/dist/chunks/{index.e1602f79.js → index.89942d3a.js} +5 -6
- package/dist/chunks/{index.e1602f79.js.map → index.89942d3a.js.map} +1 -1
- package/dist/chunks/{index.4de86bd4.js → index.965ac1af.js} +2 -2
- package/dist/chunks/{index.4de86bd4.js.map → index.965ac1af.js.map} +1 -1
- package/dist/chunks/index.a5de5242.js +130 -0
- package/dist/chunks/index.a5de5242.js.map +1 -0
- package/dist/chunks/index.a99ffd48.js +634 -0
- package/dist/chunks/index.a99ffd48.js.map +1 -0
- package/dist/chunks/{index.c2dde601.js → index.b83f8b7e.js} +2 -2
- package/dist/chunks/{index.c2dde601.js.map → index.b83f8b7e.js.map} +1 -1
- package/dist/chunks/index.d80206ed.js +10 -0
- package/dist/chunks/index.d80206ed.js.map +1 -0
- package/dist/chunks/{index.9da73645.js → index.d8bd7596.js} +96 -99
- package/dist/chunks/{index.9da73645.js.map → index.d8bd7596.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.9ddbbdad.js → listbox-option-tag.97af47fc.js} +7 -8
- package/dist/chunks/{listbox-option-tag.9ddbbdad.js.map → listbox-option-tag.97af47fc.js.map} +1 -1
- package/dist/chunks/{listbox.a144a5c8.js → listbox.d039b178.js} +6 -7
- package/dist/chunks/{listbox.a144a5c8.js.map → listbox.d039b178.js.map} +1 -1
- package/dist/chunks/loading-button.9a9cbbad.js +89 -0
- package/dist/chunks/loading-button.9a9cbbad.js.map +1 -0
- package/dist/chunks/{tooltip.57d6cc22.js → tooltip.ecd0f707.js} +3 -3
- package/dist/chunks/{tooltip.57d6cc22.js.map → tooltip.ecd0f707.js.map} +1 -1
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +563 -541
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +83 -80
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +17 -16
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +64 -68
- package/dist/header.js.map +1 -1
- package/dist/index.js +211 -209
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +57 -55
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +14 -13
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +4 -4
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +3 -305
- package/dist/popover.js.map +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +4 -4
- package/dist/search-bar.js +2 -2
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +5 -5
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +4 -4
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +3 -3
- package/dist/tag.js +3 -3
- package/dist/textarea.js +59 -56
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +226 -173
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +3 -3
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +8 -8
- package/dist/typography.js +1 -1
- package/dist/web-types.json +517 -391
- package/package.json +2 -2
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +0 -118
- package/dist/assets/error-message.css +0 -1
- package/dist/chunks/base-modal.ab0f82b2.js.map +0 -1
- package/dist/chunks/button.1dfed6fa.js.map +0 -1
- package/dist/chunks/calendar.10c1c697.js +0 -821
- package/dist/chunks/calendar.10c1c697.js.map +0 -1
- package/dist/chunks/checkbox.65480106.js.map +0 -1
- package/dist/chunks/controls-group.066adff1.js +0 -87
- package/dist/chunks/controls-group.066adff1.js.map +0 -1
- package/dist/chunks/dropdown.805b5c7d.js.map +0 -1
- package/dist/chunks/error-message.a7c6edb2.js +0 -47
- package/dist/chunks/error-message.a7c6edb2.js.map +0 -1
- package/dist/chunks/grid-layout.b7e0d964.js.map +0 -1
- package/dist/chunks/index.e350b173.js +0 -532
- package/dist/chunks/index.e350b173.js.map +0 -1
- package/dist/chunks/index.f649c9af.js +0 -112
- package/dist/chunks/index.f649c9af.js.map +0 -1
- package/dist/chunks/loading-button.70de254a.js +0 -86
- package/dist/chunks/loading-button.70de254a.js.map +0 -1
package/dist/timeline.js
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { B as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import "./
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { defineComponent as Y, computed as o, ref as E, toRefs as Q, provide as L, inject as D, onUnmounted as W } from "vue";
|
|
2
|
+
import { a as z } from "./chunks/button.e09d5980.js";
|
|
3
|
+
import { BentoTextarea as X } from "./textarea.js";
|
|
4
|
+
import { u as H } from "./chunks/i18n.155748d6.js";
|
|
5
|
+
import { BentoButtonActions as G } from "./button.js";
|
|
6
|
+
import { n as x } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
7
|
+
import { B as ee } from "./chunks/index.b83f8b7e.js";
|
|
8
|
+
import { BentoLink as te } from "./link.js";
|
|
9
|
+
import { BentoTag as ie } from "./tag.js";
|
|
10
|
+
import { B as ae } from "./chunks/index.965ac1af.js";
|
|
11
|
+
import { B as ne, a as se, S as oe } from "./chunks/index.a5de5242.js";
|
|
12
|
+
import { C as le } from "./chunks/checkmark-circle-fill.2cfbb81b.js";
|
|
13
|
+
import { C as re } from "./chunks/cross-circle-fill.d5e9ae44.js";
|
|
14
|
+
import { r as me, e as ce, t as N, g as F } from "./chunks/index.f55fdc32.js";
|
|
15
|
+
import { c as de, a as ue } from "./chunks/index.86453263.js";
|
|
16
|
+
import { g as _e } from "./chunks/unique-id.a2a2b458.js";
|
|
17
|
+
import { u as ve } from "./chunks/use-has-slot.6052d56a.js";
|
|
18
|
+
import "./assets/index27.css";
|
|
19
|
+
var k = 1e3 * 60, M = 60 * 24, U = M * 30, B = M * 365;
|
|
20
|
+
function j(t, e) {
|
|
19
21
|
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
if (!
|
|
22
|
+
me(2, arguments);
|
|
23
|
+
var a = i.locale || ce;
|
|
24
|
+
if (!a.formatDistance)
|
|
23
25
|
throw new RangeError("locale must contain localize.formatDistance property");
|
|
24
|
-
var
|
|
25
|
-
if (isNaN(
|
|
26
|
+
var b = de(t, e);
|
|
27
|
+
if (isNaN(b))
|
|
26
28
|
throw new RangeError("Invalid time value");
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
var
|
|
30
|
-
|
|
29
|
+
var m = ue(i);
|
|
30
|
+
m.addSuffix = !!i.addSuffix, m.comparison = b;
|
|
31
|
+
var _, c;
|
|
32
|
+
b > 0 ? (_ = N(e), c = N(t)) : (_ = N(t), c = N(e));
|
|
31
33
|
var v = i.roundingMethod == null ? "round" : String(i.roundingMethod), r;
|
|
32
34
|
if (v === "floor")
|
|
33
35
|
r = Math.floor;
|
|
@@ -37,32 +39,46 @@ function U(e, t) {
|
|
|
37
39
|
r = Math.round;
|
|
38
40
|
else
|
|
39
41
|
throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");
|
|
40
|
-
var
|
|
41
|
-
if (i.unit == null ?
|
|
42
|
-
var
|
|
43
|
-
return
|
|
44
|
-
} else if (
|
|
45
|
-
var
|
|
46
|
-
return
|
|
47
|
-
} else if (
|
|
48
|
-
var
|
|
49
|
-
return
|
|
50
|
-
} else if (
|
|
51
|
-
var
|
|
52
|
-
return
|
|
53
|
-
} else if (
|
|
54
|
-
var
|
|
55
|
-
return
|
|
56
|
-
} else if (
|
|
57
|
-
var
|
|
58
|
-
return
|
|
42
|
+
var n = c.getTime() - _.getTime(), d = n / k, y = F(c) - F(_), u = (n - y) / k, s;
|
|
43
|
+
if (i.unit == null ? d < 1 ? s = "second" : d < 60 ? s = "minute" : d < M ? s = "hour" : u < U ? s = "day" : u < B ? s = "month" : s = "year" : s = String(i.unit), s === "second") {
|
|
44
|
+
var g = r(n / 1e3);
|
|
45
|
+
return a.formatDistance("xSeconds", g, m);
|
|
46
|
+
} else if (s === "minute") {
|
|
47
|
+
var h = r(d);
|
|
48
|
+
return a.formatDistance("xMinutes", h, m);
|
|
49
|
+
} else if (s === "hour") {
|
|
50
|
+
var C = r(d / 60);
|
|
51
|
+
return a.formatDistance("xHours", C, m);
|
|
52
|
+
} else if (s === "day") {
|
|
53
|
+
var w = r(u / M);
|
|
54
|
+
return a.formatDistance("xDays", w, m);
|
|
55
|
+
} else if (s === "month") {
|
|
56
|
+
var l = r(u / U);
|
|
57
|
+
return l === 12 && i.unit !== "month" ? a.formatDistance("xYears", 1, m) : a.formatDistance("xMonths", l, m);
|
|
58
|
+
} else if (s === "year") {
|
|
59
|
+
var f = r(u / B);
|
|
60
|
+
return a.formatDistance("xYears", f, m);
|
|
59
61
|
}
|
|
60
62
|
throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'");
|
|
61
63
|
}
|
|
62
|
-
var
|
|
63
|
-
const
|
|
64
|
+
var S = /* @__PURE__ */ ((t) => (t.BOTTOM = "bottom", t.AFTER_FIRST = "after-first", t.BEFORE_LAST = "before-last", t))(S || {}), fe = /* @__PURE__ */ ((t) => (t.SECOND = "second", t.MINUTE = "minute", t.HOUR = "hour", t.DAY = "day", t.MONTH = "month", t.YEAR = "year", t))(fe || {}), p = /* @__PURE__ */ ((t) => (t.DEFAULT = "SquareSmallIcon", t.SUCCESS = "CheckedCircleIcon", t.CRITICAL = "CrossCircleIcon", t))(p || {});
|
|
65
|
+
const P = Symbol("timeline register entry injection key"), q = Symbol("timeline config obj injection key"), pe = {
|
|
66
|
+
"en-US": {
|
|
67
|
+
addNote: "Add note",
|
|
68
|
+
cancel: "Cancel"
|
|
69
|
+
}
|
|
70
|
+
}, be = Y({
|
|
71
|
+
i18n: { messages: pe },
|
|
64
72
|
name: "bento-timeline",
|
|
73
|
+
components: { BentoButton: z, BentoButtonActions: G, BentoTextarea: X },
|
|
65
74
|
props: {
|
|
75
|
+
/**
|
|
76
|
+
* If set to true, gives the possibility to manually add notes to the timeline via a textarea
|
|
77
|
+
*/
|
|
78
|
+
addNote: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: !1
|
|
81
|
+
},
|
|
66
82
|
/**
|
|
67
83
|
* Object that determines the max number of items to show without clicking the show more button
|
|
68
84
|
* and where in the timeline is the show more button placed
|
|
@@ -81,99 +97,120 @@ const B = Symbol("timeline register entry injection key"), Y = Symbol("timeline
|
|
|
81
97
|
default: null
|
|
82
98
|
}
|
|
83
99
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
100
|
+
emits: ["add-timeline-note"],
|
|
101
|
+
setup(t, { emit: e }) {
|
|
102
|
+
const { t: i } = H(), a = o(() => i("addNote")), b = o(() => i("cancel")), m = E(), _ = (l) => {
|
|
103
|
+
m.value = l;
|
|
104
|
+
}, c = E(!1), v = () => {
|
|
105
|
+
c.value = !c.value;
|
|
106
|
+
}, r = () => {
|
|
107
|
+
e("add-timeline-note", {
|
|
108
|
+
description: m.value,
|
|
109
|
+
timestamp: { date: /* @__PURE__ */ new Date() },
|
|
110
|
+
type: "note"
|
|
111
|
+
}), v();
|
|
112
|
+
}, n = E([]), d = o(
|
|
113
|
+
() => t.showMore && n.value.length > t.showMore.limit ? n.value.length - t.showMore.limit : null
|
|
114
|
+
), y = E(!1), { timegapLimit: u } = Q(t), s = o(() => {
|
|
115
|
+
if (!t.showMore)
|
|
89
116
|
return null;
|
|
90
|
-
const
|
|
91
|
-
return
|
|
92
|
-
...
|
|
93
|
-
|
|
94
|
-
] :
|
|
95
|
-
}),
|
|
96
|
-
if (!
|
|
117
|
+
const l = Array.from(n.value.keys());
|
|
118
|
+
return t.showMore.placement === S.BEFORE_LAST ? [
|
|
119
|
+
...l.slice(0, t.showMore.limit - 1),
|
|
120
|
+
l[l.length - 1]
|
|
121
|
+
] : t.showMore.placement === S.AFTER_FIRST ? [l[0], ...l.slice(-(t.showMore.limit - 1))] : l.slice(0, t.showMore.limit);
|
|
122
|
+
}), g = o(() => {
|
|
123
|
+
if (!t.showMore)
|
|
97
124
|
return null;
|
|
98
|
-
switch (
|
|
99
|
-
case
|
|
100
|
-
return
|
|
101
|
-
case
|
|
125
|
+
switch (t.showMore.placement) {
|
|
126
|
+
case S.BEFORE_LAST:
|
|
127
|
+
return t.showMore.limit - 2;
|
|
128
|
+
case S.AFTER_FIRST:
|
|
102
129
|
return 0;
|
|
103
|
-
case
|
|
130
|
+
case S.BOTTOM:
|
|
104
131
|
default:
|
|
105
|
-
return
|
|
132
|
+
return t.showMore.limit - 1;
|
|
106
133
|
}
|
|
107
|
-
}),
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
const
|
|
112
|
-
return
|
|
113
|
-
},
|
|
114
|
-
showAll:
|
|
115
|
-
showMoreIndex:
|
|
116
|
-
hiddenItems:
|
|
117
|
-
visibleIndexes:
|
|
118
|
-
timegapLimit:
|
|
134
|
+
}), h = (l) => () => {
|
|
135
|
+
var f;
|
|
136
|
+
n.value = (f = n.value) == null ? void 0 : f.filter((T, I) => I !== l);
|
|
137
|
+
}, C = ({ title: l, description: f, date: T }) => {
|
|
138
|
+
const I = n.value.length;
|
|
139
|
+
return n.value.push({ title: l, description: f, date: T }), { timelineEntries: n, index: I, unregisterTimelineEntry: h(I) };
|
|
140
|
+
}, w = {
|
|
141
|
+
showAll: y,
|
|
142
|
+
showMoreIndex: g,
|
|
143
|
+
hiddenItems: d,
|
|
144
|
+
visibleIndexes: s,
|
|
145
|
+
timegapLimit: u
|
|
146
|
+
};
|
|
147
|
+
return L(P, C), L(q, w), {
|
|
148
|
+
addNoteLabel: a,
|
|
149
|
+
cancelLabel: b,
|
|
150
|
+
toggleAddNote: v,
|
|
151
|
+
updateNoteContent: _,
|
|
152
|
+
addNoteToTimeline: r,
|
|
153
|
+
showAddNoteTextArea: c
|
|
119
154
|
};
|
|
120
|
-
M(B, v), M(Y, r);
|
|
121
155
|
}
|
|
122
156
|
});
|
|
123
|
-
var
|
|
124
|
-
var
|
|
125
|
-
return
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
157
|
+
var ge = function() {
|
|
158
|
+
var e = this, i = e._self._c;
|
|
159
|
+
return e._self._setupProxy, i("div", { staticClass: "b-timeline" }, [e.addNote ? i("div", { staticClass: "b-timeline__add-note-section" }, [e.showAddNoteTextArea ? e._e() : i("bento-button", { attrs: { variant: "tertiary" }, on: { click: e.toggleAddNote } }, [e._v(e._s(e.addNoteLabel))]), e.showAddNoteTextArea ? i("div", [i("bento-textarea", { attrs: { label: e.addNoteLabel, "character-limit": 150, resizable: "vertical" }, on: { input: e.updateNoteContent } }), i("bento-button-actions", { attrs: { actions: [
|
|
160
|
+
{ title: e.addNoteLabel, event: e.addNoteToTimeline },
|
|
161
|
+
{ title: e.cancelLabel, event: e.toggleAddNote }
|
|
162
|
+
] } })], 1) : e._e()], 1) : e._e(), i("ol", { staticClass: "b-timeline__items" }, [e._t("default")], 2)]);
|
|
163
|
+
}, he = [], ye = /* @__PURE__ */ x(
|
|
164
|
+
be,
|
|
165
|
+
ge,
|
|
166
|
+
he,
|
|
130
167
|
!1,
|
|
131
168
|
null,
|
|
132
|
-
"
|
|
169
|
+
"5d7abc30",
|
|
133
170
|
null,
|
|
134
171
|
null
|
|
135
172
|
);
|
|
136
|
-
const
|
|
137
|
-
let
|
|
138
|
-
const
|
|
173
|
+
const Ke = ye.exports;
|
|
174
|
+
let $ = 0;
|
|
175
|
+
const Ce = {
|
|
139
176
|
beforeCreate() {
|
|
140
|
-
this.uuid =
|
|
177
|
+
this.uuid = $.toString(), $ += 1;
|
|
141
178
|
}
|
|
142
179
|
};
|
|
143
|
-
var
|
|
144
|
-
var
|
|
145
|
-
return i("svg",
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
180
|
+
var Te = function() {
|
|
181
|
+
var e = this, i = e._self._c;
|
|
182
|
+
return i("svg", e._b({ attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? i("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), i("path", { attrs: { fill: "#00112C", "fill-rule": "evenodd", d: "M5.5 3.25C4.25736 3.25 3.25 4.25736 3.25 5.5V10.5C3.25 11.7426 4.25736 12.75 5.5 12.75H10.5C11.7426 12.75 12.75 11.7426 12.75 10.5V5.5C12.75 4.25736 11.7426 3.25 10.5 3.25H5.5Z", "clip-rule": "evenodd" } })]);
|
|
183
|
+
}, Ie = [], Se = /* @__PURE__ */ x(
|
|
184
|
+
Ce,
|
|
185
|
+
Te,
|
|
186
|
+
Ie,
|
|
150
187
|
!1,
|
|
151
188
|
null,
|
|
152
189
|
"f702de38",
|
|
153
190
|
null,
|
|
154
191
|
null
|
|
155
192
|
);
|
|
156
|
-
const
|
|
193
|
+
const we = Se.exports, Ee = {
|
|
157
194
|
"en-US": {
|
|
158
195
|
timegap: "{timegap} passed between the timeline events",
|
|
159
196
|
showMore: "Show {items} more",
|
|
160
197
|
showLess: "Show less"
|
|
161
198
|
}
|
|
162
|
-
},
|
|
199
|
+
}, Ne = Y({
|
|
163
200
|
name: "bento-timeline-item",
|
|
164
201
|
components: {
|
|
165
|
-
BentoButton:
|
|
166
|
-
BentoDate:
|
|
167
|
-
BentoLink:
|
|
168
|
-
BentoTag:
|
|
169
|
-
BentoTypography:
|
|
170
|
-
BentoStructuredList:
|
|
171
|
-
BentoStructuredListItem:
|
|
172
|
-
CrossCircleIcon:
|
|
173
|
-
CheckedCircleIcon:
|
|
174
|
-
SquareSmallIcon:
|
|
202
|
+
BentoButton: z,
|
|
203
|
+
BentoDate: ee,
|
|
204
|
+
BentoLink: te,
|
|
205
|
+
BentoTag: ie,
|
|
206
|
+
BentoTypography: ae,
|
|
207
|
+
BentoStructuredList: ne,
|
|
208
|
+
BentoStructuredListItem: se,
|
|
209
|
+
CrossCircleIcon: re,
|
|
210
|
+
CheckedCircleIcon: le,
|
|
211
|
+
SquareSmallIcon: we
|
|
175
212
|
},
|
|
176
|
-
i18n: { messages:
|
|
213
|
+
i18n: { messages: Ee },
|
|
177
214
|
props: {
|
|
178
215
|
/**
|
|
179
216
|
* Additional timestamp of the event
|
|
@@ -215,7 +252,16 @@ const bt = gt.exports, Ct = {
|
|
|
215
252
|
*/
|
|
216
253
|
title: {
|
|
217
254
|
type: [Object, String],
|
|
218
|
-
|
|
255
|
+
default: null
|
|
256
|
+
},
|
|
257
|
+
/**
|
|
258
|
+
* Type of the timeline item. If set to 'note', it renders a note item in the timeline. Defaults to 'milestone'.
|
|
259
|
+
* @values milestone, note
|
|
260
|
+
*/
|
|
261
|
+
type: {
|
|
262
|
+
type: String,
|
|
263
|
+
default: "milestone",
|
|
264
|
+
validator: (t) => ["milestone", "note"].includes(t)
|
|
219
265
|
},
|
|
220
266
|
/**
|
|
221
267
|
* Variant for the timeline item
|
|
@@ -223,88 +269,95 @@ const bt = gt.exports, Ct = {
|
|
|
223
269
|
*/
|
|
224
270
|
variant: {
|
|
225
271
|
type: String,
|
|
226
|
-
default:
|
|
227
|
-
validator: (
|
|
272
|
+
default: p.DEFAULT,
|
|
273
|
+
validator: (t) => Object.values(p).includes(t)
|
|
228
274
|
}
|
|
229
275
|
},
|
|
230
|
-
setup(
|
|
231
|
-
const { t: i } =
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
"b-timeline-item__icon--
|
|
235
|
-
|
|
236
|
-
"b-timeline-
|
|
276
|
+
setup(t, { slots: e }) {
|
|
277
|
+
const { t: i } = H(), a = o(() => t.type === "note"), b = o(
|
|
278
|
+
() => a.value ? p.DEFAULT : t.variant
|
|
279
|
+
), m = o(() => ({
|
|
280
|
+
"b-timeline-item__icon--default": t.variant === p.DEFAULT || a.value,
|
|
281
|
+
"b-timeline-item__icon--success": t.variant === p.SUCCESS && !a.value,
|
|
282
|
+
"b-timeline-item__icon--critical": t.variant === p.CRITICAL && !a.value
|
|
283
|
+
})), _ = o(() => ({
|
|
284
|
+
"b-timeline-item__title--default": t.variant === p.DEFAULT
|
|
285
|
+
})), c = o(() => ({
|
|
286
|
+
"b-timeline-item--note": a.value
|
|
237
287
|
}));
|
|
238
|
-
|
|
239
|
-
const
|
|
240
|
-
title:
|
|
241
|
-
date:
|
|
288
|
+
L(oe, !0);
|
|
289
|
+
const v = D(P), { timelineEntries: r, index: n, unregisterTimelineEntry: d } = v({
|
|
290
|
+
title: t.title,
|
|
291
|
+
date: t.timestamp.date
|
|
242
292
|
});
|
|
243
|
-
|
|
244
|
-
const { showAll:
|
|
245
|
-
var
|
|
246
|
-
if (!
|
|
293
|
+
W(() => d());
|
|
294
|
+
const { showAll: y, showMoreIndex: u, hiddenItems: s, visibleIndexes: g, timegapLimit: h } = D(q), C = o(() => y.value || !g.value), w = o(() => C.value ? !0 : g.value.includes(n)), l = o(() => typeof t.title == "object"), f = o(() => t.title), T = o(() => {
|
|
295
|
+
var R;
|
|
296
|
+
if (!h.value)
|
|
247
297
|
return null;
|
|
248
|
-
const
|
|
249
|
-
if (!
|
|
298
|
+
const A = (R = r.value[n - 1]) == null ? void 0 : R.date, K = C.value || g.value.includes(n - 1);
|
|
299
|
+
if (!A || !K)
|
|
250
300
|
return null;
|
|
251
|
-
const { date:
|
|
252
|
-
|
|
301
|
+
const { date: O } = r.value[n], Z = parseInt(
|
|
302
|
+
j(A, O, { unit: h.value.unit }),
|
|
253
303
|
10
|
|
254
304
|
);
|
|
255
|
-
return
|
|
256
|
-
}),
|
|
305
|
+
return h.value.amount < Z ? j(A, O, { roundingMethod: "floor" }) : null;
|
|
306
|
+
}), I = o(() => T.value ? i("timegap", { timegap: T.value }) : ""), V = o(() => s.value && u.value === n), J = o(() => n === r.value.length - 1);
|
|
257
307
|
return {
|
|
258
308
|
// Values
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
309
|
+
isNoteType: a,
|
|
310
|
+
iconConditionalClasses: m,
|
|
311
|
+
titleConditionalClasses: _,
|
|
312
|
+
conditionalClasses: c,
|
|
313
|
+
displayShowMoreButton: V,
|
|
314
|
+
showAll: y,
|
|
315
|
+
hiddenItems: s,
|
|
316
|
+
isVisible: w,
|
|
317
|
+
isLinkTitle: l,
|
|
318
|
+
linkTitleProps: f,
|
|
319
|
+
timegap: T,
|
|
320
|
+
timegapAriaLabel: I,
|
|
321
|
+
isLastItem: J,
|
|
322
|
+
computedIconVariant: b,
|
|
270
323
|
// Methods
|
|
271
|
-
generateUid:
|
|
272
|
-
hasSlot:
|
|
324
|
+
generateUid: _e,
|
|
325
|
+
hasSlot: ve(e),
|
|
273
326
|
t: i
|
|
274
327
|
};
|
|
275
328
|
}
|
|
276
329
|
});
|
|
277
|
-
var
|
|
278
|
-
var
|
|
279
|
-
return
|
|
280
|
-
return [
|
|
281
|
-
})], 2) :
|
|
282
|
-
return i("bento-structured-list-item", { key:
|
|
283
|
-
}), 1)], 1) :
|
|
284
|
-
|
|
285
|
-
} } }, [
|
|
286
|
-
},
|
|
287
|
-
var
|
|
288
|
-
return
|
|
330
|
+
var Me = function() {
|
|
331
|
+
var e = this, i = e._self._c;
|
|
332
|
+
return e._self._setupProxy, e.isVisible ? i("li", { staticClass: "b-timeline-item", class: e.conditionalClasses }, [e.timegap ? i("div", { staticClass: "b-timeline-item__row" }, [e._m(0), i("div", { staticClass: "b-timeline-item__content" }, [i("bento-typography", { staticClass: "b-timeline-item__timegap", attrs: { "aria-label": e.timegapAriaLabel } }, [e._v(" " + e._s(e.timegap) + " ")])], 1)]) : e._e(), i("div", { staticClass: "b-timeline-item__row" }, [i("div", { staticClass: "b-timeline-item__marker", attrs: { "aria-hidden": "true" } }, [i(e.computedIconVariant, { tag: "component", staticClass: "b-timeline-item__icon", class: e.iconConditionalClasses }), e.isLastItem ? e._e() : i("div", { staticClass: "b-timeline-item__separator", attrs: { "data-testid": "last-timeline-item-separator" } })], 1), i("div", { staticClass: "b-timeline-item__content" }, [e.isNoteType ? e._e() : i("bento-typography", { staticClass: "b-timeline-item__title", class: e.titleConditionalClasses, attrs: { el: "div", variant: "body", strongest: "", role: "heading" } }, [e.isLinkTitle ? i("bento-link", e._b({ attrs: { "disable-typography": "" } }, "bento-link", e.linkTitleProps, !1), [e._v(e._s(e.linkTitleProps.title))]) : i("span", [e._v(e._s(e.title))])], 1), e.timestamp ? i("bento-typography", { staticClass: "b-timeline-item__timestamp", attrs: { el: "div", variant: "caption" } }, [i("bento-date", { attrs: { date: e.timestamp.date, format: e.timestamp.format, "disable-typography": "" } }), e._v(" " + e._s(e.timestamp.value) + " ")], 1) : e._e(), !e.isNoteType && e.additionalTimestamp ? i("bento-typography", { staticClass: "b-timeline-item__timestamp", attrs: { el: "div", variant: "caption" } }, [i("bento-date", { attrs: { date: e.additionalTimestamp.date, format: e.additionalTimestamp.format, "disable-typography": "" } }), e._v(" " + e._s(e.additionalTimestamp.value) + " ")], 1) : e._e(), e.description || e.hasSlot("default") ? i("bento-typography", { staticClass: "b-timeline-item__description", attrs: { el: "div", variant: "body" } }, [e._t("default", function() {
|
|
333
|
+
return [e._v(e._s(e.description))];
|
|
334
|
+
})], 2) : e._e(), !e.isNoteType && e.dataList ? i("div", { staticClass: "b-timeline-item__data-list" }, [i("bento-structured-list", e._l(e.dataList, function(a) {
|
|
335
|
+
return i("bento-structured-list-item", { key: e.generateUid(a.label), attrs: { label: a.label } }, [i("bento-typography", { attrs: { variant: "caption" } }, [e._v(e._s(a.value))])], 1);
|
|
336
|
+
}), 1)], 1) : e._e(), !e.isNoteType && e.tag ? i("bento-tag", e._b({ staticClass: "b-timeline-item__tag" }, "bento-tag", e.tag, !1)) : e._e()], 1)]), e.displayShowMoreButton ? i("div", { staticClass: "b-timeline-item__row" }, [e._m(1), i("div", { staticClass: "b-timeline-item__content" }, [i("bento-button", { staticClass: "b-timeline__show-more", attrs: { variant: "tertiary" }, on: { click: function(a) {
|
|
337
|
+
e.showAll = !e.showAll;
|
|
338
|
+
} } }, [e.showAll ? [e._v(e._s(e.t("showLess")))] : [e._v(e._s(e.t("showMore", { items: e.hiddenItems })))]], 2)], 1)]) : e._e()]) : e._e();
|
|
339
|
+
}, Ae = [function() {
|
|
340
|
+
var t = this, e = t._self._c;
|
|
341
|
+
return t._self._setupProxy, e("div", { staticClass: "b-timeline-item__marker", attrs: { "aria-hidden": "true" } }, [e("div", { staticClass: "b-timeline-item__icon b-timeline-item__icon--timegap" }), e("div", { staticClass: "b-timeline-item__separator" })]);
|
|
289
342
|
}, function() {
|
|
290
|
-
var
|
|
291
|
-
return
|
|
292
|
-
}],
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
343
|
+
var t = this, e = t._self._c;
|
|
344
|
+
return t._self._setupProxy, e("div", { staticClass: "b-timeline-item__marker", attrs: { "aria-hidden": "true" } }, [e("div", { staticClass: "b-timeline-item__separator" })]);
|
|
345
|
+
}], Le = /* @__PURE__ */ x(
|
|
346
|
+
Ne,
|
|
347
|
+
Me,
|
|
348
|
+
Ae,
|
|
296
349
|
!1,
|
|
297
350
|
null,
|
|
298
|
-
"
|
|
351
|
+
"7f5f4898",
|
|
299
352
|
null,
|
|
300
353
|
null
|
|
301
354
|
);
|
|
302
|
-
const
|
|
355
|
+
const Ze = Le.exports;
|
|
303
356
|
export {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
357
|
+
Ke as BentoTimeline,
|
|
358
|
+
fe as BentoTimelineGapUnit,
|
|
359
|
+
Ze as BentoTimelineItem,
|
|
360
|
+
p as BentoTimelineItemVariant,
|
|
361
|
+
S as BentoTimelineShowMorePlacement
|
|
309
362
|
};
|
|
310
363
|
//# sourceMappingURL=timeline.js.map
|