@adyen/bento-vue2 1.18.0 → 1.19.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 +4 -0
- package/dist/@types/packages/vue2/src/components/button/components/toggle-button/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/button/components/toggle-button/toggle-button.vue.d.ts +65 -0
- package/dist/@types/packages/vue2/src/components/button/components/toggle-button/toggle.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/button/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.types.d.ts +3 -8
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +3 -6
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +7 -5
- package/dist/@types/packages/vue2/src/components/{internal/calendar → date-range-picker}/composables/use-granularity-memory.types.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +18 -19
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.types.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.types.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/internal/checkbox-input/checkbox-input.types.d.ts +20 -0
- package/dist/@types/packages/vue2/src/components/internal/checkbox-input/checkbox-input.vue.d.ts +90 -0
- package/dist/@types/packages/vue2/src/components/internal/checkbox-input/index.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/internal/dialog-page/dialog-page.keys.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/dialog-page/dialog-page.types.d.ts +16 -0
- package/dist/@types/packages/vue2/src/components/internal/dialog-page/dialog-page.vue.d.ts +54 -0
- package/dist/@types/packages/vue2/src/components/internal/dialog-page/index.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/internal/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/composables/use-cached-selected-values/use-cached-selected-values.d.ts +14 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/radio-input/index.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/internal/radio-input/radio-input.types.d.ts +6 -0
- package/dist/@types/packages/vue2/src/components/internal/radio-input/radio-input.vue.d.ts +80 -0
- package/dist/@types/packages/vue2/src/components/modal-fullscreen/components/modal-fullscreen-page.vue.d.ts +60 -0
- package/dist/@types/packages/vue2/src/components/modal-fullscreen/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/modal-fullscreen/modal-fullscreen.vue.d.ts +12 -1
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.types.d.ts +3 -6
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/sidepanel/components/sidepanel-page.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.keys.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.types.d.ts +0 -19
- package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.d.ts +1 -1
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +6 -6
- package/dist/alert.js +3 -3
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -0
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/dialog-page.css +1 -0
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.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/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/index46.css +1 -1
- package/dist/assets/index47.css +1 -1
- package/dist/assets/index48.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/teleport.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/button.js +71 -93
- package/dist/button.js.map +1 -1
- package/dist/card.js +3 -3
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.bf0c938c.js → base-button.3c3d473d.js} +2 -2
- package/dist/chunks/{base-button.bf0c938c.js.map → base-button.3c3d473d.js.map} +1 -1
- package/dist/chunks/{base-modal.1dc6cf96.js → base-modal.27c6f2db.js} +5 -5
- package/dist/chunks/{base-modal.1dc6cf96.js.map → base-modal.27c6f2db.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.4ecf3d93.js → button-actions-with-menu.a38327c2.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.4ecf3d93.js.map → button-actions-with-menu.a38327c2.js.map} +1 -1
- package/dist/chunks/button-actions.1dc90a19.js +111 -0
- package/dist/chunks/button-actions.1dc90a19.js.map +1 -0
- package/dist/chunks/{button.f5739261.js → button.0b6cda85.js} +3 -3
- package/dist/chunks/{button.f5739261.js.map → button.0b6cda85.js.map} +1 -1
- package/dist/chunks/calendar.263cfc88.js +913 -0
- package/dist/chunks/calendar.263cfc88.js.map +1 -0
- package/dist/chunks/checkbox.c7a74005.js +275 -0
- package/dist/chunks/checkbox.c7a74005.js.map +1 -0
- package/dist/chunks/{controls-group.2b645d54.js → controls-group.8abe0bd1.js} +3 -3
- package/dist/chunks/{controls-group.2b645d54.js.map → controls-group.8abe0bd1.js.map} +1 -1
- package/dist/chunks/{copy.e01532cf.js → copy.647aae54.js} +4 -4
- package/dist/chunks/{copy.e01532cf.js.map → copy.647aae54.js.map} +1 -1
- package/dist/chunks/dialog-page.f787969c.js +113 -0
- package/dist/chunks/dialog-page.f787969c.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.d45138fa.js → dropdown-default-textbox.59803edd.js} +97 -111
- package/dist/chunks/dropdown-default-textbox.59803edd.js.map +1 -0
- package/dist/chunks/{dropdown.0a9acf8b.js → dropdown.0574f613.js} +62 -61
- package/dist/chunks/dropdown.0574f613.js.map +1 -0
- package/dist/chunks/{error-message.317dd85f.js → error-message.75666843.js} +2 -2
- package/dist/chunks/{error-message.317dd85f.js.map → error-message.75666843.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.afe02620.js → fixed-scroller.06574a66.js} +2 -2
- package/dist/chunks/{fixed-scroller.afe02620.js.map → fixed-scroller.06574a66.js.map} +1 -1
- package/dist/chunks/{footer-actions.e0b866b1.js → footer-actions.0268a57b.js} +4 -4
- package/dist/chunks/{footer-actions.e0b866b1.js.map → footer-actions.0268a57b.js.map} +1 -1
- package/dist/chunks/{index.7aa428c2.js → index.026ae47b.js} +2 -2
- package/dist/chunks/{index.7aa428c2.js.map → index.026ae47b.js.map} +1 -1
- package/dist/chunks/{index.898a95bc.js → index.0bb773a7.js} +6 -6
- package/dist/chunks/{index.898a95bc.js.map → index.0bb773a7.js.map} +1 -1
- package/dist/chunks/{index.651dac2d.js → index.10b9618d.js} +3 -3
- package/dist/chunks/{index.651dac2d.js.map → index.10b9618d.js.map} +1 -1
- package/dist/chunks/{index.6c299479.js → index.302e9cf2.js} +2 -2
- package/dist/chunks/{index.6c299479.js.map → index.302e9cf2.js.map} +1 -1
- package/dist/chunks/index.408e1419.js +712 -0
- package/dist/chunks/index.408e1419.js.map +1 -0
- package/dist/chunks/{index.88ac1dab.js → index.45cd2344.js} +31 -31
- package/dist/chunks/index.45cd2344.js.map +1 -0
- package/dist/chunks/{index.6c017121.js → index.5b47c56b.js} +7 -7
- package/dist/chunks/{index.6c017121.js.map → index.5b47c56b.js.map} +1 -1
- package/dist/chunks/{index.2e70720a.js → index.5bfc67d1.js} +2 -2
- package/dist/chunks/{index.2e70720a.js.map → index.5bfc67d1.js.map} +1 -1
- package/dist/chunks/{index.e6aa2c36.js → index.932c230b.js} +6 -6
- package/dist/chunks/{index.e6aa2c36.js.map → index.932c230b.js.map} +1 -1
- package/dist/chunks/{index.81443e01.js → index.a52b98d1.js} +8 -8
- package/dist/chunks/{index.81443e01.js.map → index.a52b98d1.js.map} +1 -1
- package/dist/chunks/{index.290bbc9e.js → index.dc985e76.js} +3 -3
- package/dist/chunks/{index.290bbc9e.js.map → index.dc985e76.js.map} +1 -1
- package/dist/chunks/{index.546b27ae.js → index.de687404.js} +3 -2
- package/dist/chunks/{index.546b27ae.js.map → index.de687404.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.720eabb5.js → listbox-option-tag.89846151.js} +3 -3
- package/dist/chunks/{listbox-option-tag.720eabb5.js.map → listbox-option-tag.89846151.js.map} +1 -1
- package/dist/chunks/{listbox.dc3d986e.js → listbox.a8180c4a.js} +5 -5
- package/dist/chunks/{listbox.dc3d986e.js.map → listbox.a8180c4a.js.map} +1 -1
- package/dist/chunks/{loading-button.390228ff.js → loading-button.50dddf2f.js} +2 -2
- package/dist/chunks/{loading-button.390228ff.js.map → loading-button.50dddf2f.js.map} +1 -1
- package/dist/chunks/modal-fullscreen.keys.b9f31632.js +5 -0
- package/dist/chunks/modal-fullscreen.keys.b9f31632.js.map +1 -0
- package/dist/chunks/sidepanel.keys.1ed8a57c.js +5 -0
- package/dist/chunks/sidepanel.keys.1ed8a57c.js.map +1 -0
- package/dist/chunks/{teleport.d52e5254.js → teleport.84b0f20b.js} +14 -13
- package/dist/chunks/teleport.84b0f20b.js.map +1 -0
- package/dist/chunks/{tooltip.d452f6c4.js → tooltip.6748027a.js} +3 -3
- package/dist/chunks/{tooltip.d452f6c4.js.map → tooltip.6748027a.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 +1 -1
- package/dist/date-picker.js +18 -18
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +6 -6
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +19 -19
- 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 +4 -4
- package/dist/index.js +299 -2935
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +4 -4
- package/dist/internal.js +78 -25
- package/dist/internal.js.map +1 -1
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +144 -44
- package/dist/modal-fullscreen.js.map +1 -1
- package/dist/modal.js +6 -6
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +147 -78
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +2 -2
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +78 -111
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +3 -3
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +12 -12
- package/dist/toast.js +3 -3
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +6 -6
- package/dist/typography.js +1 -1
- package/dist/web-types.json +431 -5
- package/package.json +3 -3
- package/dist/chunks/calendar.7a2d1894.js +0 -960
- package/dist/chunks/calendar.7a2d1894.js.map +0 -1
- package/dist/chunks/checkbox.1345941b.js +0 -195
- package/dist/chunks/checkbox.1345941b.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.d45138fa.js.map +0 -1
- package/dist/chunks/dropdown.0a9acf8b.js.map +0 -1
- package/dist/chunks/index.84c2cef6.js +0 -637
- package/dist/chunks/index.84c2cef6.js.map +0 -1
- package/dist/chunks/index.88ac1dab.js.map +0 -1
- package/dist/chunks/sidepanel.keys.3f8d69c1.js +0 -7
- package/dist/chunks/sidepanel.keys.3f8d69c1.js.map +0 -1
- package/dist/chunks/teleport.d52e5254.js.map +0 -1
- /package/dist/@types/packages/vue2/src/components/{internal/calendar → date-range-picker}/composables/use-granularity-memory.d.ts +0 -0
package/dist/sidepanel.js
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { F as
|
|
5
|
-
import {
|
|
6
|
-
import { a as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { g as
|
|
12
|
-
import "./assets/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"en-US": {
|
|
16
|
-
goToPreviousPage: "Go to previous page"
|
|
17
|
-
}
|
|
18
|
-
}, q = {
|
|
19
|
-
i18n: { messages: M }
|
|
20
|
-
}, Q = /* @__PURE__ */ D({
|
|
21
|
-
...q,
|
|
1
|
+
import { defineComponent as P, toRefs as T, ref as r, computed as B, watch as h, nextTick as k, provide as f } from "vue";
|
|
2
|
+
import { B as N } from "./chunks/index.de687404.js";
|
|
3
|
+
import { F as x } from "./chunks/footer-actions.0268a57b.js";
|
|
4
|
+
import { D as G, B as L, b as F, a as R } from "./chunks/dialog-page.f787969c.js";
|
|
5
|
+
import { n as C } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
6
|
+
import { a as U } from "./chunks/button.0b6cda85.js";
|
|
7
|
+
import { B as w } from "./chunks/index.302e9cf2.js";
|
|
8
|
+
import { C as V } from "./chunks/cross.04678d81.js";
|
|
9
|
+
import { S as J } from "./chunks/sidepanel.keys.1ed8a57c.js";
|
|
10
|
+
import { u as K } from "./chunks/i18n.eb5b985b.js";
|
|
11
|
+
import { g as Y } from "./chunks/unique-id.a2a2b458.js";
|
|
12
|
+
import "./assets/index29.css";
|
|
13
|
+
const $ = {}, z = /* @__PURE__ */ P({
|
|
14
|
+
...$,
|
|
22
15
|
__name: "sidepanel-page",
|
|
23
16
|
props: {
|
|
24
17
|
/**
|
|
@@ -79,46 +72,39 @@ const M = {
|
|
|
79
72
|
default: null
|
|
80
73
|
}
|
|
81
74
|
},
|
|
82
|
-
setup(
|
|
83
|
-
|
|
84
|
-
G(() => s());
|
|
85
|
-
const { activePage: v, animation: _, goToPreviousPage: d, hasPreviousPages: P, isOpen: f } = L(k), g = p(() => v.value ? v.value === a.pageId : !0), T = p(() => a.previousPage ? !0 : a.previousPage === null ? !1 : P.value && g.value), S = p(() => ({
|
|
86
|
-
"b-sidepanel-page__header--with-border": n.value && !m.value
|
|
87
|
-
})), b = p(() => ({
|
|
88
|
-
"b-sidepanel-page__actions--with-border": n.value && !i.value
|
|
89
|
-
})), E = () => {
|
|
90
|
-
e.value && (m.value = e.value.scrollTop === 0, i.value = e.value.scrollHeight - e.value.clientHeight === e.value.scrollTop);
|
|
91
|
-
}, A = async (h) => {
|
|
92
|
-
h && (await B(), n.value = e.value && e.value.scrollHeight > e.value.clientHeight);
|
|
93
|
-
};
|
|
94
|
-
return y(() => f.value, A, { immediate: !0 }), y(() => g.value, A, { immediate: !0 }), { __sfc: !0, props: a, t, contentElement: e, hasScroll: n, isScrollAtTop: m, isScrollAtBottom: i, registerPage: u, unregisterPage: s, activePage: v, animation: _, goToPreviousPage: d, hasPreviousPages: P, isOpen: f, showPage: g, showBackButton: T, headerConditionalClasses: S, actionsConditionalClasses: b, onScroll: E, calculateScroll: A, updateAnimation: () => {
|
|
95
|
-
_.value === I.TRANSITION_LEVEL_UPPER && (_.value = I.TRANSITION_LEVEL_DEEPER);
|
|
96
|
-
}, BentoButton: w, BentoTypography: $, FooterActions: H, ArrowLeftIcon: J };
|
|
75
|
+
setup(i) {
|
|
76
|
+
return { __sfc: !0, BentoTypography: N, FooterActions: x, DialogPage: G };
|
|
97
77
|
}
|
|
98
78
|
});
|
|
99
|
-
var
|
|
100
|
-
var
|
|
101
|
-
return t
|
|
102
|
-
return e.
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
79
|
+
var M = function() {
|
|
80
|
+
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
81
|
+
return s(t.DialogPage, { staticClass: "b-sidepanel-page", attrs: { "page-id": e.pageId, "previous-page": e.previousPage }, scopedSlots: e._u([{ key: "header", fn: function() {
|
|
82
|
+
return [s("div", { staticClass: "b-sidepanel-page__header" }, [s(t.BentoTypography, { staticClass: "b-sidepanel-page__title", attrs: { el: "h2", variant: "title" } }, [e._v(" " + e._s(e.title) + " ")])], 1)];
|
|
83
|
+
}, proxy: !0 }, { key: "content", fn: function() {
|
|
84
|
+
return [s("div", { staticClass: "b-sidepanel-page__content" }, [s(t.BentoTypography, { attrs: { el: "div", variant: "body" } }, [e._t("default")], 2)], 1)];
|
|
85
|
+
}, proxy: !0 }, e.actions && e.actions.length > 0 ? { key: "footer", fn: function() {
|
|
86
|
+
return [s("div", { staticClass: "b-sidepanel-page__actions" }, [s(t.FooterActions, { attrs: { actions: e.actions, "actions-label": e.actionsLabel, "destructive-actions": e.destructiveActions } })], 1)];
|
|
87
|
+
}, proxy: !0 } : null], null, !0) });
|
|
88
|
+
}, j = [], q = /* @__PURE__ */ C(
|
|
89
|
+
z,
|
|
90
|
+
M,
|
|
91
|
+
j,
|
|
108
92
|
!1,
|
|
109
93
|
null,
|
|
110
|
-
"
|
|
94
|
+
"4e6c994b",
|
|
111
95
|
null,
|
|
112
96
|
null
|
|
113
97
|
);
|
|
114
|
-
const
|
|
98
|
+
const ue = q.exports;
|
|
99
|
+
var u = /* @__PURE__ */ ((i) => (i.UPDATE_ACTIVE_PAGE = "update:active-page", i.UPDATE_IS_OPEN = "update:is-open", i))(u || {});
|
|
100
|
+
const H = {
|
|
115
101
|
"en-US": {
|
|
116
102
|
close: "Close"
|
|
117
103
|
}
|
|
118
|
-
},
|
|
119
|
-
i18n: { messages:
|
|
120
|
-
},
|
|
121
|
-
...
|
|
104
|
+
}, Q = {
|
|
105
|
+
i18n: { messages: H }
|
|
106
|
+
}, W = /* @__PURE__ */ P({
|
|
107
|
+
...Q,
|
|
122
108
|
__name: "sidepanel",
|
|
123
109
|
props: {
|
|
124
110
|
/**
|
|
@@ -145,79 +131,60 @@ const me = Z.exports, ee = {
|
|
|
145
131
|
default: null
|
|
146
132
|
}
|
|
147
133
|
},
|
|
148
|
-
setup(
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
y(
|
|
158
|
-
() => e.value,
|
|
159
|
-
async () => {
|
|
160
|
-
if (await B(), e.value && !g.value) {
|
|
161
|
-
console.error(`The activePage passed "${e.value}" does not match the id of any SidepanelPage`);
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
e.value !== f.value && s.value.push(e.value);
|
|
165
|
-
},
|
|
166
|
-
{ immediate: !0 }
|
|
167
|
-
);
|
|
168
|
-
const S = p(() => ({
|
|
169
|
-
"b-sidepanel--hide": d.value
|
|
170
|
-
})), b = () => {
|
|
171
|
-
d.value && (i.value.close(), s.value[0] && a(C.UPDATE_ACTIVE_PAGE, s.value[0]), s.value = [], d.value = !1, a(C.UPDATE_IS_OPEN, !1));
|
|
172
|
-
}, E = () => {
|
|
173
|
-
i.value.open && (d.value = !0);
|
|
174
|
-
}, A = ({ target: l }) => {
|
|
175
|
-
l && l.tagName === "DIALOG" && E();
|
|
134
|
+
setup(i, { emit: e }) {
|
|
135
|
+
const s = i, { activePage: t, isOpen: a } = T(s), { t: I } = K(), l = r(null), p = r([]), o = r([]), v = r(L.TRANSITION_LEVEL_DEEPER), c = r(!1), g = Y("sidepanel"), _ = r(!1), b = B(() => ({
|
|
136
|
+
"b-sidepanel--hide": c.value
|
|
137
|
+
})), D = () => {
|
|
138
|
+
c.value && (l.value.close(), o.value[0] && e(u.UPDATE_ACTIVE_PAGE, o.value[0]), o.value = [], c.value = !1, _.value = !1, e(u.UPDATE_IS_OPEN, !1));
|
|
139
|
+
}, d = () => {
|
|
140
|
+
l.value.open && (c.value = !0);
|
|
141
|
+
}, S = ({ target: n }) => {
|
|
142
|
+
n && n.tagName === "DIALOG" && d();
|
|
176
143
|
};
|
|
177
|
-
|
|
178
|
-
() =>
|
|
144
|
+
h(
|
|
145
|
+
() => a.value,
|
|
179
146
|
async () => {
|
|
180
|
-
await
|
|
147
|
+
await k(), l.value && (a.value ? (_.value = !0, l.value.showModal(), o.value.length || o.value.push(t.value)) : l.value.open && d());
|
|
181
148
|
},
|
|
182
149
|
{ immediate: !0 }
|
|
183
150
|
);
|
|
184
|
-
const
|
|
185
|
-
var
|
|
186
|
-
|
|
187
|
-
},
|
|
188
|
-
return
|
|
189
|
-
activePage:
|
|
190
|
-
animation:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
151
|
+
const m = (n) => e(u.UPDATE_ACTIVE_PAGE, n), y = (n) => () => {
|
|
152
|
+
var E;
|
|
153
|
+
p.value = (E = p.value) == null ? void 0 : E.filter((O) => O !== n);
|
|
154
|
+
}, A = (n) => (p.value.push(n), { unregisterPage: y(n) });
|
|
155
|
+
return f(F, {
|
|
156
|
+
activePage: t,
|
|
157
|
+
animation: v,
|
|
158
|
+
isOpen: _,
|
|
159
|
+
pages: p,
|
|
160
|
+
previousPages: o,
|
|
161
|
+
updatePage: m
|
|
162
|
+
}), f(R, A), f(J, g), { __sfc: !0, props: s, emit: e, activePage: t, isOpen: a, t: I, sidepanel: l, pages: p, previousPages: o, animation: v, isClosing: c, sidepanelId: g, internalIsOpen: _, conditionalClasses: b, closeSidepanelAfterAnimation: D, startCloseSidepanelAnimation: d, closeSidepanelOnClickOutside: S, updatePage: m, unregisterPage: y, registerPage: A, BentoButton: U, BentoFocusTrap: w, CrossIcon: V };
|
|
195
163
|
}
|
|
196
164
|
});
|
|
197
|
-
var
|
|
198
|
-
var
|
|
199
|
-
return
|
|
200
|
-
|
|
201
|
-
}, keydown: function(
|
|
202
|
-
if (!
|
|
165
|
+
var X = function() {
|
|
166
|
+
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
167
|
+
return s("dialog", { ref: "sidepanel", staticClass: "b-sidepanel", class: t.conditionalClasses, attrs: { id: t.sidepanelId }, on: { animationend: t.closeSidepanelAfterAnimation, click: function(a) {
|
|
168
|
+
e.isDismissible && t.closeSidepanelOnClickOutside(a);
|
|
169
|
+
}, keydown: function(a) {
|
|
170
|
+
if (!a.type.indexOf("key") && e._k(a.keyCode, "esc", 27, a.key, ["Esc", "Escape"]))
|
|
203
171
|
return null;
|
|
204
|
-
|
|
205
|
-
} } }, [t
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
172
|
+
a.preventDefault(), e.isDismissible && t.startCloseSidepanelAnimation;
|
|
173
|
+
} } }, [s(t.BentoFocusTrap, [e.isDismissible ? s("div", { staticClass: "b-sidepanel__close-button" }, [s(t.BentoButton, { attrs: { variant: "tertiary" }, on: { click: t.startCloseSidepanelAnimation } }, [s(t.CrossIcon, { attrs: { "svg-title": t.t("close") } })], 1)], 1) : e._e(), e._t("default")], 2)], 1);
|
|
174
|
+
}, Z = [], ee = /* @__PURE__ */ C(
|
|
175
|
+
W,
|
|
176
|
+
X,
|
|
177
|
+
Z,
|
|
210
178
|
!1,
|
|
211
179
|
null,
|
|
212
|
-
"
|
|
180
|
+
"97a8b5da",
|
|
213
181
|
null,
|
|
214
182
|
null
|
|
215
183
|
);
|
|
216
|
-
const
|
|
184
|
+
const de = ee.exports;
|
|
217
185
|
export {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
me as BentoSidepanelPage
|
|
186
|
+
de as BentoSidepanel,
|
|
187
|
+
u as BentoSidepanelEvent,
|
|
188
|
+
ue as BentoSidepanelPage
|
|
222
189
|
};
|
|
223
190
|
//# sourceMappingURL=sidepanel.js.map
|
package/dist/sidepanel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidepanel.js","sources":["../src/components/sidepanel/sidepanel.types.ts","../src/components/sidepanel/components/sidepanel-page.vue","../src/components/sidepanel/sidepanel.vue"],"sourcesContent":["import { Ref } from 'vue';\n\nexport interface BentoSidepanelPageObject {\n title: string;\n pageId: string;\n}\n\nexport enum BentoSidepanelEvent {\n UPDATE_ACTIVE_PAGE = 'update:active-page',\n UPDATE_IS_OPEN = 'update:is-open',\n}\n\nexport enum BentoSidepanelAnimation {\n TRANSITION_LEVEL_DEEPER = 'b-sidepanel-page__animation--level-deeper',\n TRANSITION_LEVEL_UPPER = 'b-sidepanel-page__animation--level-upper',\n}\n\nexport interface BentoSidepanelConfigData {\n activePage: Ref<string>;\n animation: Ref<string>;\n goToPreviousPage: (page: string) => void;\n hasPreviousPages: Ref<boolean>;\n isOpen: Ref<boolean>;\n}\n\nexport type BentoSidepanelRegisterPage = (props: BentoSidepanelPageObject) => { unregisterPage: () => void };\n","<template>\n <Transition :name=\"animation\" mode=\"out-in\" @after-leave=\"updateAnimation\">\n <div v-show=\"showPage\" class=\"b-sidepanel-page\">\n <div class=\"b-sidepanel-page__header\" :class=\"headerConditionalClasses\">\n <bento-button v-if=\"showBackButton\" variant=\"tertiary\" @click=\"goToPreviousPage(previousPage)\">\n <arrow-left-icon :svg-title=\"t('goToPreviousPage')\" />\n </bento-button>\n\n <bento-typography class=\"b-sidepanel-page__title\" el=\"h2\" variant=\"title\">\n {{ title }}\n </bento-typography>\n </div>\n <div ref=\"contentElement\" class=\"b-sidepanel-page__content\" @scroll=\"onScroll\">\n <bento-typography el=\"div\" variant=\"body\">\n <slot />\n </bento-typography>\n </div>\n <div\n v-if=\"actions && actions.length > 0\"\n class=\"b-sidepanel-page__actions\"\n :class=\"actionsConditionalClasses\"\n >\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onUnmounted, PropType, ref, watch } from 'vue';\n\n import { BentoButton, BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { FooterActions } from '@/components/internal/footer-actions';\n import ArrowLeftIcon from '@adyen/ui-assets-icons-16/vue/arrow-left';\n\n import { BentoSidepanelAnimation, BentoSidepanelConfigData, BentoSidepanelRegisterPage } from '../sidepanel.types';\n import { SIDEPANEL_CONFIG_INJECTION_KEY, SIDEPANEL_REGISTER_PAGE_INJECTION_KEY } from '../sidepanel.keys';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\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 * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the sidepanel page\n */\n title: {\n type: String,\n default: null,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // Refs\n const contentElement = ref<HTMLDivElement>(null);\n const hasScroll = ref(false);\n const isScrollAtTop = ref(true);\n const isScrollAtBottom = ref(false);\n\n // Register page to parent component and inject data from parent component\n const registerPage = inject<BentoSidepanelRegisterPage>(SIDEPANEL_REGISTER_PAGE_INJECTION_KEY);\n const { unregisterPage } = registerPage({ title: props.title, pageId: props.pageId });\n\n // Unregister page on unmounting the page\n onUnmounted(() => unregisterPage());\n\n const { activePage, animation, goToPreviousPage, hasPreviousPages, isOpen } =\n inject<BentoSidepanelConfigData>(SIDEPANEL_CONFIG_INJECTION_KEY);\n\n // Logic to choose which page is active/shown\n const showPage = computed(() => (activePage.value ? activePage.value === props.pageId : true));\n\n // Logic to determine whether the back button should be shown on the page\n const showBackButton = computed(() => {\n if (props.previousPage) {\n return true;\n }\n if (props.previousPage === null) {\n return false;\n }\n return hasPreviousPages.value && showPage.value;\n });\n\n // Scrolling styling logic\n const headerConditionalClasses = computed(() => ({\n 'b-sidepanel-page__header--with-border': hasScroll.value && !isScrollAtTop.value,\n }));\n\n const actionsConditionalClasses = computed(() => ({\n 'b-sidepanel-page__actions--with-border': hasScroll.value && !isScrollAtBottom.value,\n }));\n\n const onScroll = () => {\n if (!contentElement.value) {\n return;\n }\n isScrollAtTop.value = contentElement.value.scrollTop === 0;\n isScrollAtBottom.value =\n contentElement.value.scrollHeight - contentElement.value.clientHeight === contentElement.value.scrollTop;\n };\n\n const calculateScroll = async watchedValue => {\n if (!watchedValue) {\n return;\n }\n // Wait for content to be rendered to be able to calculate the height\n await nextTick();\n hasScroll.value = contentElement.value && contentElement.value.scrollHeight > contentElement.value.clientHeight;\n };\n\n watch(() => isOpen.value, calculateScroll, { immediate: true });\n watch(() => showPage.value, calculateScroll, { immediate: true });\n\n // Animation\n const updateAnimation = () => {\n if (animation.value === BentoSidepanelAnimation.TRANSITION_LEVEL_UPPER) {\n animation.value = BentoSidepanelAnimation.TRANSITION_LEVEL_DEEPER;\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * SidepanelPage is used to render different pages of Sidepanel component\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./sidepanel-page.scss\" />\n","<template>\n <dialog\n :id=\"sidepanelId\"\n ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @click=\"isDismissible && closeSidepanelOnClickOutside($event)\"\n @keydown.esc.prevent=\"isDismissible && startCloseSidepanelAnimation\"\n >\n <bento-focus-trap>\n <div v-if=\"isDismissible\" class=\"b-sidepanel__close-button\">\n <bento-button variant=\"tertiary\" @click=\"startCloseSidepanelAnimation\">\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n <slot />\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, provide, ref, toRefs, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import {\n BentoSidepanelAnimation,\n BentoSidepanelEvent,\n BentoSidepanelPageObject,\n BentoSidepanelRegisterPage,\n } from './sidepanel.types';\n\n import {\n SIDEPANEL_CONFIG_INJECTION_KEY,\n SIDEPANEL_DIALOG_ID_INJECTION_KEY,\n SIDEPANEL_REGISTER_PAGE_INJECTION_KEY,\n } from './sidepanel.keys';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n import { generateUid } from '@/utils/ts/unique-id';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * The id of the current active page\n * Should be the same id as the BentoSidepanelPage to be displayed\n * If the component only has one page, it can be left null/undefined.\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If set to true, it allows the sidepanel to be closed\n */\n isDismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the sidepanel's state from the outside. Set it to true to open the sidepanel\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when page is changed internally\n */\n (e: BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page: string): void;\n /**\n * Emits close-sidepanel event when the sidepanel is closed\n */\n (e: BentoSidepanelEvent.UPDATE_IS_OPEN, isOpen: boolean): void;\n }>();\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const sidepanel = ref(null);\n const pages = ref<BentoSidepanelPageObject[]>([]);\n const previousPages = ref([]);\n const hasPreviousPages = computed(() => previousPages.value.length > 1);\n const animation = ref(BentoSidepanelAnimation.TRANSITION_LEVEL_DEEPER);\n const isClosing = ref(false);\n const sidepanelId = generateUid('sidepanel');\n\n // Previous page/back button logic\n const lastPage = computed(() => previousPages.value[previousPages.value.length - 1]);\n const isActivePageValid = computed(() => pages.value.some(page => page.pageId === activePage.value));\n\n const goToPreviousPage = (page: string) => {\n if (page) {\n const index = previousPages.value.indexOf(page);\n if (index !== -1) {\n previousPages.value = previousPages.value.slice(0, index + 1);\n } else {\n previousPages.value = [page];\n }\n } else {\n previousPages.value.pop();\n }\n\n animation.value = BentoSidepanelAnimation.TRANSITION_LEVEL_UPPER;\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, lastPage.value);\n };\n\n // Add new page to the previousPage array to keep track of user navigation\n watch(\n () => activePage.value,\n async () => {\n await nextTick();\n\n if (!!activePage.value && !isActivePageValid.value) {\n // eslint-disable-next-line no-console\n console.error(`The activePage passed \"${activePage.value}\" does not match the id of any SidepanelPage`);\n return;\n }\n if (activePage.value !== lastPage.value) {\n previousPages.value.push(activePage.value);\n }\n },\n { immediate: true }\n );\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-sidepanel--hide': isClosing.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeSidepanelAfterAnimation = () => {\n if (isClosing.value) {\n sidepanel.value.close();\n if (previousPages.value[0]) {\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n emit(BentoSidepanelEvent.UPDATE_IS_OPEN, false);\n }\n };\n\n const startCloseSidepanelAnimation = () => {\n if (!sidepanel.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n /**\n * Since the dialog HTML element doesn't automatically close when clicking outside, a check on when the user is clicking is needed.\n * If the click doesn't happen in the dialog box itself, the modal closes\n */\n const closeSidepanelOnClickOutside = ({ target }: Event): void => {\n if (target && (target as HTMLElement).tagName === 'DIALOG') {\n startCloseSidepanelAnimation();\n }\n };\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n () => isOpen.value,\n async () => {\n // Wait for sidepanel ref to be created\n await nextTick();\n\n if (!sidepanel.value) {\n return;\n }\n\n if (isOpen.value) {\n sidepanel.value.showModal();\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (sidepanel.value.open) {\n startCloseSidepanelAnimation();\n }\n },\n { immediate: true }\n );\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(({ pageId }) => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoSidepanelRegisterPage = ({ title, pageId }) => {\n pages.value.push({ title, pageId });\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide(SIDEPANEL_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n goToPreviousPage,\n hasPreviousPages,\n isOpen,\n });\n provide(SIDEPANEL_REGISTER_PAGE_INJECTION_KEY, registerPage);\n\n // Let's Children components know they are inside a SidePanel (dialog element)\n provide(SIDEPANEL_DIALOG_ID_INJECTION_KEY, sidepanelId);\n</script>\n\n<script lang=\"ts\">\n /**\n * Sidepanel component is a slide-in panel that should be used for presenting actions, settings or features that are directly associated with a specific task or interaction on the main screen.\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n<style lang=\"scss\" scoped src=\"./sidepanel.scss\" />\n"],"names":["BentoSidepanelEvent","BentoSidepanelEvent2","BentoSidepanelAnimation","BentoSidepanelAnimation2","__default__$1","messages$1","useI18n","contentElement","ref","hasScroll","isScrollAtTop","isScrollAtBottom","registerPage","inject","SIDEPANEL_REGISTER_PAGE_INJECTION_KEY","unregisterPage","props","onUnmounted","activePage","animation","goToPreviousPage","hasPreviousPages","isOpen","SIDEPANEL_CONFIG_INJECTION_KEY","showPage","computed","showBackButton","headerConditionalClasses","actionsConditionalClasses","onScroll","calculateScroll","watchedValue","nextTick","watch","__default__","messages","toRefs","t","sidepanel","pages","previousPages","isClosing","sidepanelId","generateUid","lastPage","isActivePageValid","page","index","emit","conditionalClasses","closeSidepanelAfterAnimation","startCloseSidepanelAnimation","closeSidepanelOnClickOutside","target","pageIdToRemove","_a","pageId","title","provide","SIDEPANEL_DIALOG_ID_INJECTION_KEY"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"sidepanel.js","sources":["../src/components/sidepanel/components/sidepanel-page.vue","../src/components/sidepanel/sidepanel.types.ts","../src/components/sidepanel/sidepanel.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-sidepanel-page\" :page-id=\"pageId\" :previous-page=\"previousPage\">\n <template #header>\n <div class=\"b-sidepanel-page__header\">\n <bento-typography class=\"b-sidepanel-page__title\" el=\"h2\" variant=\"title\">\n {{ title }}\n </bento-typography>\n </div>\n </template>\n <template #content>\n <div class=\"b-sidepanel-page__content\">\n <bento-typography el=\"div\" variant=\"body\">\n <slot />\n </bento-typography>\n </div>\n </template>\n <template v-if=\"actions && actions.length > 0\" #footer>\n <div class=\"b-sidepanel-page__actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType } from 'vue';\n\n import { BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { FooterActions } from '@/components/internal/footer-actions';\n import { DialogPage } from '@/internal';\n\n 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 * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the sidepanel page\n */\n title: {\n type: String,\n default: null,\n },\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * SidepanelPage is used to render different pages of Sidepanel component\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./sidepanel-page.scss\" />\n","export enum BentoSidepanelEvent {\n UPDATE_ACTIVE_PAGE = 'update:active-page',\n UPDATE_IS_OPEN = 'update:is-open',\n}\n","<template>\n <dialog\n :id=\"sidepanelId\"\n ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @click=\"isDismissible && closeSidepanelOnClickOutside($event)\"\n @keydown.esc.prevent=\"isDismissible && startCloseSidepanelAnimation\"\n >\n <bento-focus-trap>\n <div v-if=\"isDismissible\" class=\"b-sidepanel__close-button\">\n <bento-button variant=\"tertiary\" @click=\"startCloseSidepanelAnimation\">\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n <slot />\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, provide, ref, toRefs, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { BentoSidepanelEvent } from './sidepanel.types';\n import {\n BentoDialogPageAnimation,\n BentoDialogPageConfigData,\n BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n import { SIDEPANEL_DIALOG_ID_INJECTION_KEY } from './sidepanel.keys';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n import { generateUid } from '@/utils/ts/unique-id';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * The id of the current active page\n * Should be the same id as the BentoSidepanelPage to be displayed\n * If the component only has one page, it can be left null/undefined.\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If set to true, it allows the sidepanel to be closed\n */\n isDismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the sidepanel's state from the outside. Set it to true to open the sidepanel\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when page is changed internally\n */\n (e: BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page: string): void;\n /**\n * Emits close-sidepanel event when the sidepanel is closed\n */\n (e: BentoSidepanelEvent.UPDATE_IS_OPEN, isOpen: boolean): void;\n }>();\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const sidepanel = ref(null);\n const pages = ref<string[]>([]);\n const previousPages = ref([]);\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const isClosing = ref(false);\n const sidepanelId = generateUid('sidepanel');\n const internalIsOpen = ref(false);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-sidepanel--hide': isClosing.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeSidepanelAfterAnimation = () => {\n if (isClosing.value) {\n sidepanel.value.close();\n if (previousPages.value[0]) {\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit(BentoSidepanelEvent.UPDATE_IS_OPEN, false);\n }\n };\n\n const startCloseSidepanelAnimation = () => {\n if (!sidepanel.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n /**\n * Since the dialog HTML element doesn't automatically close when clicking outside, a check on when the user is clicking is needed.\n * If the click doesn't happen in the dialog box itself, the modal closes\n */\n const closeSidepanelOnClickOutside = ({ target }: Event): void => {\n if (target && (target as HTMLElement).tagName === 'DIALOG') {\n startCloseSidepanelAnimation();\n }\n };\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n () => isOpen.value,\n async () => {\n // Wait for sidepanel ref to be created\n await nextTick();\n\n if (!sidepanel.value) {\n return;\n }\n\n if (isOpen.value) {\n internalIsOpen.value = true;\n sidepanel.value.showModal();\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (sidepanel.value.open) {\n startCloseSidepanelAnimation();\n }\n },\n { immediate: true }\n );\n\n // Pages\n const updatePage = page => emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page);\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n pages.value.push(pageId);\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n\n // Let's Children components know they are inside a SidePanel (dialog element)\n provide(SIDEPANEL_DIALOG_ID_INJECTION_KEY, sidepanelId);\n</script>\n\n<script lang=\"ts\">\n /**\n * Sidepanel component is a slide-in panel that should be used for presenting actions, settings or features that are directly associated with a specific task or interaction on the main screen.\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n<style lang=\"scss\" scoped src=\"./sidepanel.scss\" />\n"],"names":["__default__$1","BentoSidepanelEvent","BentoSidepanelEvent2","__default__","messages","activePage","isOpen","toRefs","props","t","useI18n","sidepanel","ref","pages","previousPages","animation","BentoDialogPageAnimation","isClosing","sidepanelId","generateUid","internalIsOpen","conditionalClasses","computed","closeSidepanelAfterAnimation","emit","startCloseSidepanelAnimation","closeSidepanelOnClickOutside","target","watch","nextTick","updatePage","page","unregisterPage","pageIdToRemove","_a","pageId","registerPage","provide","DIALOG_PAGE_CONFIG_INJECTION_KEY","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_DIALOG_ID_INJECTION_KEY"],"mappings":";;;;;;;;;;;;AA2II,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3IQ,IAAAC,IAAA,kBAAAC,OACRA,EAAA,qBAAA,sBACAA,EAAA,iBAAA,kBAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;GC8NRE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA1IA,EAAA,YAAAC,GAAA,QAAAC,EAAA,IAAAC,EAAAC,CAAA,GACA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,CAAA,CAAA,GACAE,IAAAF,EAAA,CAAA,CAAA,GACAG,IAAAH,EAAAI,EAAA,uBAAA,GACAC,IAAAL,EAAA,EAAA,GACAM,IAAAC,EAAA,WAAA,GACAC,IAAAR,EAAA,EAAA,GAGAS,IAAAC,EAAA,OAAA;AAAA,MAA2C,qBAAAL,EAAA;AAAA,IACR,EAAA,GAInCM,IAAA,MAAA;AACI,MAAAN,EAAA,UACIN,EAAA,MAAA,MAAA,GACAG,EAAA,MAAA,CAAA,KACIU,EAAAvB,EAAA,oBAAAa,EAAA,MAAA,CAAA,CAAA,GAEJA,EAAA,QAAA,CAAA,GACAG,EAAA,QAAA,IACAG,EAAA,QAAA,IACAI,EAAAvB,EAAA,gBAAA,EAAA;AAAA,IACJ,GAGJwB,IAAA,MAAA;AACI,MAAAd,EAAA,MAAA,SAGAM,EAAA,QAAA;AAAA,IAAkB,GAOtBS,IAAA,CAAA,EAAA,QAAAC,EAAA,MAAA;AACI,MAAAA,KAAAA,EAAA,YAAA,YACIF,EAAA;AAAA,IACJ;AAIJ,IAAAG;AAAA,MAAA,MAAAtB,EAAA;AAAA,MACiB,YAAA;AAKT,QAFA,MAAAuB,EAAA,GAEAlB,EAAA,UAIAL,EAAA,SACIc,EAAA,QAAA,IACAT,EAAA,MAAA,UAAA,GACAG,EAAA,MAAA,UACIA,EAAA,MAAA,KAAAT,EAAA,KAAA,KACJM,EAAA,MAAA,QAEAc,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAAK,IAAA,CAAAC,MAAAP,EAAAvB,EAAA,oBAAA8B,CAAA,GAGAC,IAAA,CAAAC,MAAA,MAAA;;AACI,MAAApB,EAAA,SAAAqB,IAAArB,EAAA,UAAA,gBAAAqB,EAAA,OAAA,CAAAC,MAAAA,MAAAF;AAAA,IAAqE,GAIzEG,IAAA,CAAAD,OACItB,EAAA,MAAA,KAAAsB,CAAA,GAEA,EAAA,gBAAAH,EAAAG,CAAA,EAAA;AAGJ,WAAAE,EAAAC,GAAA;AAAA,MAAqE,YAAAjC;AAAA,MACjE,WAAAU;AAAA,MACA,QAAAK;AAAA,MACQ,OAAAP;AAAA,MACR,eAAAC;AAAA,MACA,YAAAgB;AAAA,IACA,CAAA,GAEJO,EAAAE,GAAAH,CAAA,GAGAC,EAAAG,GAAAtB,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/status.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as n, computed as a } from "vue";
|
|
2
|
-
import { B as o } from "./chunks/index.
|
|
2
|
+
import { B as o } from "./chunks/index.de687404.js";
|
|
3
3
|
import { n as l } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
4
|
-
import "./assets/
|
|
4
|
+
import "./assets/index30.css";
|
|
5
5
|
var r = /* @__PURE__ */ ((s) => (s.BLUE = "blue", s.GREEN = "green", s.GREY = "grey", s.ORANGE = "orange", s.RED = "red", s.YELLOW = "yellow", s))(r || {});
|
|
6
6
|
const _ = n({
|
|
7
7
|
name: "bento-status",
|
package/dist/stepper.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as V, ref as p, computed as o, watch as A, provide as w, readonly as K, useSlots as W, inject as z, onMounted as Z } from "vue";
|
|
2
|
-
import { B as L } from "./chunks/index.
|
|
2
|
+
import { B as L } from "./chunks/index.de687404.js";
|
|
3
3
|
import { B as I, a as M } from "./chunks/keyboard-navigation.ca47dfa8.js";
|
|
4
4
|
import { u as U } from "./chunks/i18n.eb5b985b.js";
|
|
5
5
|
import { n as T } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
6
|
-
import { B as j } from "./chunks/base-button.
|
|
6
|
+
import { B as j } from "./chunks/base-button.3c3d473d.js";
|
|
7
7
|
import { C as G } from "./chunks/checkmark-small.520f01b1.js";
|
|
8
|
-
import "./assets/
|
|
8
|
+
import "./assets/index31.css";
|
|
9
9
|
const q = (i) => {
|
|
10
10
|
function s(r) {
|
|
11
11
|
return ({ detail: u }) => {
|
package/dist/structured-list.js
CHANGED
package/dist/summary-grid.js
CHANGED
|
@@ -4,10 +4,10 @@ import { S as h } from "./chunks/summary-grid.keys.1d1028c2.js";
|
|
|
4
4
|
import { G as E } from "./chunks/grid-layout.e0025286.js";
|
|
5
5
|
import { n as c } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
6
6
|
import { BentoInfoIcon as O } from "./info-icon.js";
|
|
7
|
-
import { B as L, a as g } from "./chunks/index.
|
|
7
|
+
import { B as L, a as g } from "./chunks/index.de687404.js";
|
|
8
8
|
import { BentoTag as M, BentoTagVariant as f } from "./tag.js";
|
|
9
|
-
import { C as G } from "./chunks/copy.
|
|
10
|
-
import "./assets/
|
|
9
|
+
import { C as G } from "./chunks/copy.647aae54.js";
|
|
10
|
+
import "./assets/index44.css";
|
|
11
11
|
const P = l({
|
|
12
12
|
name: "bento-summary-grid",
|
|
13
13
|
components: { GridLayout: E },
|
package/dist/tabs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as m, toRefs as C, ref as b, provide as u, computed as w, inject as p, onUnmounted as A, watch as N, nextTick as B } from "vue";
|
|
2
2
|
import { E as k, T as I, a as h } from "./chunks/tabs.keys.358742f2.js";
|
|
3
3
|
import { n as g } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
4
|
-
import { B as R } from "./chunks/index.
|
|
4
|
+
import { B as R } from "./chunks/index.de687404.js";
|
|
5
5
|
import { g as D } from "./chunks/unique-id.a2a2b458.js";
|
|
6
|
-
import { F as S } from "./chunks/fixed-scroller.
|
|
7
|
-
import "./assets/
|
|
6
|
+
import { F as S } from "./chunks/fixed-scroller.06574a66.js";
|
|
7
|
+
import "./assets/index33.css";
|
|
8
8
|
const K = m({
|
|
9
9
|
props: {
|
|
10
10
|
/**
|
package/dist/tag.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as c, computed as o } from "vue";
|
|
2
|
-
import { B as d } from "./chunks/index.
|
|
2
|
+
import { B as d } from "./chunks/index.de687404.js";
|
|
3
3
|
import { u as m } from "./chunks/aria-label.ac9651a5.js";
|
|
4
4
|
import { g as s } from "./chunks/get-slot-text.99c3d860.js";
|
|
5
|
-
import { B as _ } from "./chunks/tooltip.
|
|
5
|
+
import { B as _ } from "./chunks/tooltip.6748027a.js";
|
|
6
6
|
import { n as v } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
7
|
-
import "./assets/
|
|
7
|
+
import "./assets/index34.css";
|
|
8
8
|
var r = /* @__PURE__ */ ((t) => (t.GREY = "grey", t.BLUE = "blue", t.GREEN = "green", t.ORANGE = "orange", t.RED = "red", t.WHITE = "white", t))(r || {});
|
|
9
9
|
const p = c({
|
|
10
10
|
name: "bento-tag",
|
package/dist/textarea.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as K, useAttrs as Q, toRefs as O, ref as u, toRef as X, computed as o, watch as L, nextTick as ee, onMounted as te, onUnmounted as ae } from "vue";
|
|
2
|
-
import { a as le } from "./chunks/button.
|
|
3
|
-
import { B as re } from "./chunks/index.
|
|
2
|
+
import { a as le } from "./chunks/button.0b6cda85.js";
|
|
3
|
+
import { B as re } from "./chunks/index.de687404.js";
|
|
4
4
|
import { n as w } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
5
5
|
import { g as se } from "./chunks/unique-id.a2a2b458.js";
|
|
6
6
|
import { o as F } from "./chunks/resize.a041304d.js";
|
|
7
7
|
import { u as oe } from "./chunks/aria-label.ac9651a5.js";
|
|
8
8
|
import { u as ne } from "./chunks/i18n.eb5b985b.js";
|
|
9
9
|
import { u as ie } from "./chunks/use-form-layout-loading.d03e5d48.js";
|
|
10
|
-
import { E as ue, F as ce } from "./chunks/error-message.
|
|
11
|
-
import "./assets/
|
|
10
|
+
import { E as ue, F as ce } from "./chunks/error-message.75666843.js";
|
|
11
|
+
import "./assets/index35.css";
|
|
12
12
|
let T = 0;
|
|
13
13
|
const de = {
|
|
14
14
|
beforeCreate() {
|
package/dist/timeline.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { defineComponent as Y, computed as r, ref as N, toRefs as Z, provide as A, inject as D, onUnmounted as G } from "vue";
|
|
2
|
-
import { a as z } from "./chunks/button.
|
|
2
|
+
import { a as z } from "./chunks/button.0b6cda85.js";
|
|
3
3
|
import { BentoTextarea as Q } from "./textarea.js";
|
|
4
4
|
import { u as H } from "./chunks/i18n.eb5b985b.js";
|
|
5
|
-
import {
|
|
5
|
+
import { B as X } from "./chunks/button-actions.1dc90a19.js";
|
|
6
6
|
import { n as x } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
7
|
-
import { B as ee } from "./chunks/index.
|
|
8
|
-
import { B as te } from "./chunks/index.
|
|
7
|
+
import { B as ee } from "./chunks/index.5bfc67d1.js";
|
|
8
|
+
import { B as te } from "./chunks/index.5b47c56b.js";
|
|
9
9
|
import { BentoTag as ie } from "./tag.js";
|
|
10
|
-
import { B as ae, d as se } from "./chunks/index.
|
|
11
|
-
import { B as ne, a as oe, S as re } from "./chunks/index.
|
|
10
|
+
import { B as ae, d as se } from "./chunks/index.de687404.js";
|
|
11
|
+
import { B as ne, a as oe, S as re } from "./chunks/index.0bb773a7.js";
|
|
12
12
|
import { g as le } from "./chunks/unique-id.a2a2b458.js";
|
|
13
13
|
import { u as me } from "./chunks/use-has-slot.fbeb19ec.js";
|
|
14
14
|
import { r as ce, e as de, t as w, g as k } from "./chunks/index.f55fdc32.js";
|
|
15
15
|
import { c as ue, a as _e } from "./chunks/index.86453263.js";
|
|
16
|
-
import "./assets/
|
|
16
|
+
import "./assets/index36.css";
|
|
17
17
|
var F = 1e3 * 60, M = 60 * 24, U = M * 30, j = M * 365;
|
|
18
|
-
function
|
|
18
|
+
function B(t, e) {
|
|
19
19
|
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
20
20
|
ce(2, arguments);
|
|
21
21
|
var a = i.locale || de;
|
|
@@ -169,10 +169,10 @@ var be = function() {
|
|
|
169
169
|
null
|
|
170
170
|
);
|
|
171
171
|
const Pe = he.exports;
|
|
172
|
-
let
|
|
172
|
+
let $ = 0;
|
|
173
173
|
const ye = {
|
|
174
174
|
beforeCreate() {
|
|
175
|
-
this.uuid =
|
|
175
|
+
this.uuid = $.toString(), $ += 1;
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
178
|
var Ce = function() {
|
|
@@ -307,10 +307,10 @@ const Te = Ee.exports, Ne = {
|
|
|
307
307
|
if (!L || !V)
|
|
308
308
|
return null;
|
|
309
309
|
const { date: R } = d.value[n], W = parseInt(
|
|
310
|
-
|
|
310
|
+
B(L, R, { unit: b.value.unit }),
|
|
311
311
|
10
|
|
312
312
|
);
|
|
313
|
-
return b.value.amount < W ?
|
|
313
|
+
return b.value.amount < W ? B(L, R, { roundingMethod: "floor" }) : null;
|
|
314
314
|
}), T = r(() => v.value ? i("timegap", { timegap: v.value }) : ""), h = r(() => _.value && C.value === n), J = r(() => n === d.value.length - 1);
|
|
315
315
|
return {
|
|
316
316
|
// Values
|
package/dist/toast.js
CHANGED
|
@@ -2,11 +2,11 @@ import { defineComponent as d, ref as u, computed as c, onMounted as g, watch as
|
|
|
2
2
|
import { u as y } from "./chunks/toastController.fd667b68.js";
|
|
3
3
|
import { I as C } from "./chunks/info-filled.c37e091d.js";
|
|
4
4
|
import { C as k } from "./chunks/cross-small.e851e0de.js";
|
|
5
|
-
import { a as x } from "./chunks/button.
|
|
6
|
-
import { B as S } from "./chunks/index.
|
|
5
|
+
import { a as x } from "./chunks/button.0b6cda85.js";
|
|
6
|
+
import { B as S } from "./chunks/index.de687404.js";
|
|
7
7
|
import { u as w } from "./chunks/use-has-slot.fbeb19ec.js";
|
|
8
8
|
import { n as f } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
9
|
-
import "./assets/
|
|
9
|
+
import "./assets/index40.css";
|
|
10
10
|
const $ = {
|
|
11
11
|
"en-US": {
|
|
12
12
|
dismiss: "Dismiss"
|
package/dist/toggle.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as k, ref as p, computed as u, toRefs as I, watch as A } from "vue";
|
|
2
2
|
import { C as B } from "./chunks/checkmark-small.520f01b1.js";
|
|
3
|
-
import { B as L } from "./chunks/index.
|
|
3
|
+
import { B as L } from "./chunks/index.de687404.js";
|
|
4
4
|
import { g as E } from "./chunks/unique-id.a2a2b458.js";
|
|
5
5
|
import { u as F } from "./chunks/use-default-slot-validator.b9bff4c6.js";
|
|
6
6
|
import { u as R } from "./chunks/use-has-slot.fbeb19ec.js";
|
|
7
7
|
import { g } from "./chunks/get-slot-text.99c3d860.js";
|
|
8
8
|
import { u as x } from "./chunks/aria-label.ac9651a5.js";
|
|
9
9
|
import { n as T } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
10
|
-
import "./assets/
|
|
10
|
+
import "./assets/index46.css";
|
|
11
11
|
var f = /* @__PURE__ */ ((t) => (t.LABEL_FIRST = "label-first", t))(f || {}), d = /* @__PURE__ */ ((t) => (t.BEFORE = "before", t.AFTER = "after", t))(d || {});
|
|
12
12
|
const D = k({
|
|
13
13
|
name: "bento-toggle",
|
package/dist/tutorial.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as g, ref as d, computed as a, isRef as R, watch as F, nextTick as $ } from "vue";
|
|
2
|
-
import { B as I } from "./chunks/index.
|
|
3
|
-
import { B as S, a as P } from "./chunks/index.
|
|
4
|
-
import { B as k } from "./chunks/index.
|
|
2
|
+
import { B as I } from "./chunks/index.a52b98d1.js";
|
|
3
|
+
import { B as S, a as P } from "./chunks/index.932c230b.js";
|
|
4
|
+
import { B as k } from "./chunks/index.de687404.js";
|
|
5
5
|
import { BentoImage as w } from "./image.js";
|
|
6
6
|
import { u as A } from "./chunks/i18n.eb5b985b.js";
|
|
7
7
|
import { R as N } from "./chunks/refresh.71a03998.js";
|
|
8
8
|
import { n as f } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
9
|
-
import { a as T, h as D, o as M } from "./chunks/index.
|
|
10
|
-
import {
|
|
11
|
-
import "./assets/
|
|
9
|
+
import { a as T, h as D, o as M } from "./chunks/index.dc985e76.js";
|
|
10
|
+
import { B as V } from "./chunks/button-actions.1dc90a19.js";
|
|
11
|
+
import "./assets/index48.css";
|
|
12
12
|
var E;
|
|
13
13
|
const j = /* @__PURE__ */ g({
|
|
14
14
|
__name: "tutorial-indicator",
|
package/dist/typography.js
CHANGED