@adyen/bento-vue2 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +4 -0
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-lazy-load/data-grid-lazy-load.vue.d.ts +17 -0
- package/dist/@types/packages/vue2/src/components/data-grid/components/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnHeadersTopPosition/useCalculateColumnHeadersTopPosition.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useLazyLoading/useLazyLoading.d.ts +8 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +27 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +522 -114
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +13 -13
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +12 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +5 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +12 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/image/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +24 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +13 -3
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.types.d.ts +1 -9
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.utils.d.ts +5 -21
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +119 -71
- package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +3 -2
- package/dist/@types/packages/vue2/src/components/stepper/components/step/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/stepper/components/step/step.vue.d.ts +33 -0
- package/dist/@types/packages/vue2/src/components/stepper/composables/useKeyboardNavigation/useKeyboardNavigation.d.ts +15 -0
- package/dist/@types/packages/vue2/src/components/stepper/index.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/stepper/stepper.keys.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/stepper/stepper.types.d.ts +24 -0
- package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +42 -0
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +389 -50
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/types/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/types/lazy-load.d.ts +1 -0
- package/dist/accordion.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/base-button.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.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/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 -0
- 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/tooltip.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +3 -3
- package/dist/chunks/base-button.89e9efbd.js +88 -0
- package/dist/chunks/base-button.89e9efbd.js.map +1 -0
- package/dist/chunks/base-modal.6eaa7e53.js +211 -0
- package/dist/chunks/base-modal.6eaa7e53.js.map +1 -0
- package/dist/chunks/{calendar.c20df708.js → calendar.44459d87.js} +2 -2
- package/dist/chunks/{calendar.c20df708.js.map → calendar.44459d87.js.map} +1 -1
- package/dist/chunks/{checkbox.5a69ce9d.js → checkbox.b69b8f22.js} +16 -16
- package/dist/chunks/{checkbox.5a69ce9d.js.map → checkbox.b69b8f22.js.map} +1 -1
- package/dist/chunks/{copy.982e1b19.js → copy.57f969d4.js} +2 -2
- package/dist/chunks/{copy.982e1b19.js.map → copy.57f969d4.js.map} +1 -1
- package/dist/chunks/debounce.b5ef6acf.js +10 -0
- package/dist/chunks/debounce.b5ef6acf.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.9bef4138.js → dropdown-default-textbox.2d093874.js} +8 -7
- package/dist/chunks/{dropdown-default-textbox.9bef4138.js.map → dropdown-default-textbox.2d093874.js.map} +1 -1
- package/dist/chunks/{dropdown.15cc1c45.js → dropdown.10ea8304.js} +33 -31
- package/dist/chunks/dropdown.10ea8304.js.map +1 -0
- package/dist/chunks/{index.c39c64c9.js → index.0f8690c4.js} +2 -2
- package/dist/chunks/{index.c39c64c9.js.map → index.0f8690c4.js.map} +1 -1
- package/dist/chunks/{index.58ce168a.js → index.4a11da21.js} +179 -170
- package/dist/chunks/index.4a11da21.js.map +1 -0
- package/dist/chunks/{index.876ea5bf.js → index.660f2f2e.js} +2 -2
- package/dist/chunks/{index.876ea5bf.js.map → index.660f2f2e.js.map} +1 -1
- package/dist/chunks/{index.b9c8c99a.js → index.f607a3f1.js} +4 -4
- package/dist/chunks/{index.b9c8c99a.js.map → index.f607a3f1.js.map} +1 -1
- package/dist/chunks/{debounce.f8d92e44.js → keyboard-navigation.ca47dfa8.js} +11 -17
- package/dist/chunks/keyboard-navigation.ca47dfa8.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.f8b467a7.js → listbox-option-tag.e2688e54.js} +2 -2
- package/dist/chunks/{listbox-option-tag.f8b467a7.js.map → listbox-option-tag.e2688e54.js.map} +1 -1
- package/dist/chunks/{listbox.cbf47484.js → listbox.201a8521.js} +6 -5
- package/dist/chunks/{listbox.cbf47484.js.map → listbox.201a8521.js.map} +1 -1
- package/dist/chunks/{tooltip.0297fd5d.js → tooltip.f89cb0cd.js} +18 -18
- package/dist/chunks/{tooltip.0297fd5d.js.map → tooltip.f89cb0cd.js.map} +1 -1
- package/dist/chunks/use-has-slot.6052d56a.js.map +1 -1
- package/dist/code-snippet.js +193 -191
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +1 -1
- package/dist/data-grid.js +750 -640
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +5 -5
- package/dist/date-range-picker.js +2 -2
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/empty-state.js +10 -10
- package/dist/empty-state.js.map +1 -1
- package/dist/filter-bar.js +533 -491
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +71 -50
- package/dist/form-layout.js.map +1 -1
- package/dist/header.js +181 -102
- package/dist/header.js.map +1 -1
- package/dist/image.js +3 -1
- package/dist/index.js +200 -193
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +2 -2
- package/dist/input-field.js +2 -2
- package/dist/internal.js +4 -4
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +39 -30
- package/dist/menu.js.map +1 -1
- package/dist/modal.js +29 -26
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +2 -2
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +43 -31
- package/dist/popover.js.map +1 -1
- package/dist/popper-container.js +1228 -180
- package/dist/popper-container.js.map +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/search-bar.js +3 -3
- package/dist/segmented-control.js +9 -9
- package/dist/segmented-control.js.map +1 -1
- package/dist/sidepanel.js +13 -13
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +1 -1
- package/dist/stepper.js +229 -0
- package/dist/stepper.js.map +1 -0
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +2 -2
- package/dist/tabs.js +1 -1
- package/dist/tag.js +2 -2
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +2 -2
- package/dist/toast.js +1 -1
- package/dist/toggle.js +14 -14
- package/dist/toggle.js.map +1 -1
- package/dist/web-types.json +279 -60
- package/package.json +3 -3
- package/dist/chunks/base-button.7a676605.js +0 -82
- package/dist/chunks/base-button.7a676605.js.map +0 -1
- package/dist/chunks/base-modal.a51d2395.js +0 -207
- package/dist/chunks/base-modal.a51d2395.js.map +0 -1
- package/dist/chunks/debounce.f8d92e44.js.map +0 -1
- package/dist/chunks/dropdown.15cc1c45.js.map +0 -1
- package/dist/chunks/index.58ce168a.js.map +0 -1
package/dist/sidepanel.js
CHANGED
|
@@ -5,9 +5,9 @@ import { F as $ } from "./chunks/footer-actions.6ddac024.js";
|
|
|
5
5
|
import { A as H } from "./chunks/arrow-left.1d5d08bd.js";
|
|
6
6
|
import { u as R } from "./chunks/i18n.155748d6.js";
|
|
7
7
|
import { n as k } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
8
|
-
import { B as j } from "./chunks/index.
|
|
8
|
+
import { B as j } from "./chunks/index.0f8690c4.js";
|
|
9
9
|
import { C as J } from "./chunks/cross.a2cadac5.js";
|
|
10
|
-
import "./assets/
|
|
10
|
+
import "./assets/index22.css";
|
|
11
11
|
var T = /* @__PURE__ */ ((l) => (l.UPDATE_ACTIVE_PAGE = "update:active-page", l.UPDATE_IS_OPEN = "update:is-open", l))(T || {}), y = /* @__PURE__ */ ((l) => (l.TRANSITION_LEVEL_DEEPER = "b-sidepanel-page__animation--level-deeper", l.TRANSITION_LEVEL_UPPER = "b-sidepanel-page__animation--level-upper", l))(y || {});
|
|
12
12
|
const D = Symbol("sidepanel registerPage injection key"), x = Symbol("sidepanel config data injection key"), K = {
|
|
13
13
|
"en-US": {
|
|
@@ -80,7 +80,7 @@ const D = Symbol("sidepanel registerPage injection key"), x = Symbol("sidepanel
|
|
|
80
80
|
setup(l) {
|
|
81
81
|
const a = l, { t } = R(), e = r(null), o = r(!1), P = r(!0), i = r(!1), u = B(D), { unregisterPage: n } = u({ title: a.title, pageId: a.pageId });
|
|
82
82
|
V(() => n());
|
|
83
|
-
const { activePage:
|
|
83
|
+
const { activePage: d, animation: _, goToPreviousPage: v, hasPreviousPages: f, isOpen: E } = B(x), g = p(() => d.value ? d.value === a.pageId : !0), C = p(() => a.previousPage ? !0 : a.previousPage === null ? !1 : f.value && g.value), I = p(() => ({
|
|
84
84
|
"b-sidepanel-page__header--with-border": o.value && !P.value
|
|
85
85
|
})), A = p(() => ({
|
|
86
86
|
"b-sidepanel-page__actions--with-border": o.value && !i.value
|
|
@@ -89,7 +89,7 @@ const D = Symbol("sidepanel registerPage injection key"), x = Symbol("sidepanel
|
|
|
89
89
|
}, m = async (s) => {
|
|
90
90
|
s && (await N(), o.value = e.value && e.value.scrollHeight > e.value.clientHeight);
|
|
91
91
|
};
|
|
92
|
-
return h(() => E.value, m, { immediate: !0 }), h(() => g.value, m, { immediate: !0 }), { __sfc: !0, props: a, t, contentElement: e, hasScroll: o, isScrollAtTop: P, isScrollAtBottom: i, registerPage: u, unregisterPage: n, activePage:
|
|
92
|
+
return h(() => E.value, m, { immediate: !0 }), h(() => g.value, m, { immediate: !0 }), { __sfc: !0, props: a, t, contentElement: e, hasScroll: o, isScrollAtTop: P, isScrollAtBottom: i, registerPage: u, unregisterPage: n, activePage: d, animation: _, goToPreviousPage: v, hasPreviousPages: f, isOpen: E, showPage: g, showBackButton: C, headerConditionalClasses: I, actionsConditionalClasses: A, onScroll: S, calculateScroll: m, updateAnimation: () => {
|
|
93
93
|
_.value === y.TRANSITION_LEVEL_UPPER && (_.value = y.TRANSITION_LEVEL_DEEPER);
|
|
94
94
|
}, BentoButton: w, BentoTypography: G, FooterActions: $, ArrowLeftIcon: H };
|
|
95
95
|
}
|
|
@@ -144,7 +144,7 @@ const _e = Q.exports, W = {
|
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
146
|
setup(l, { emit: a }) {
|
|
147
|
-
const t = l, { activePage: e, isOpen: o } = F(t), { t: P } = R(), i = r(null), u = r([]), n = r([]),
|
|
147
|
+
const t = l, { activePage: e, isOpen: o } = F(t), { t: P } = R(), i = r(null), u = r([]), n = r([]), d = p(() => n.value.length > 1), _ = r(y.TRANSITION_LEVEL_DEEPER), v = r(!1), f = p(() => n.value[n.value.length - 1]), E = p(() => u.value.some((s) => s.pageId === e.value)), g = (s) => {
|
|
148
148
|
if (s) {
|
|
149
149
|
const c = n.value.indexOf(s);
|
|
150
150
|
c !== -1 ? n.value = n.value.slice(0, c + 1) : n.value = [s];
|
|
@@ -164,11 +164,11 @@ const _e = Q.exports, W = {
|
|
|
164
164
|
{ immediate: !0 }
|
|
165
165
|
);
|
|
166
166
|
const C = p(() => ({
|
|
167
|
-
"b-
|
|
167
|
+
"b-sidepanel--hide": v.value
|
|
168
168
|
})), I = (s) => {
|
|
169
|
-
|
|
169
|
+
v.value && s.pseudoElement === "::backdrop" && (i.value.close(), n.value[0] && a(T.UPDATE_ACTIVE_PAGE, n.value[0]), n.value = [], v.value = !1, a(T.UPDATE_IS_OPEN, !1));
|
|
170
170
|
}, A = (s) => {
|
|
171
|
-
s && s.preventDefault(), i.value.open && (
|
|
171
|
+
s && s.preventDefault(), i.value.open && (v.value = !0);
|
|
172
172
|
}, S = ({ target: s }) => {
|
|
173
173
|
s && s.tagName === "DIALOG" && A();
|
|
174
174
|
};
|
|
@@ -187,9 +187,9 @@ const _e = Q.exports, W = {
|
|
|
187
187
|
activePage: e,
|
|
188
188
|
animation: _,
|
|
189
189
|
goToPreviousPage: g,
|
|
190
|
-
hasPreviousPages:
|
|
190
|
+
hasPreviousPages: d,
|
|
191
191
|
isOpen: o
|
|
192
|
-
}), O(D, b), { __sfc: !0, props: t, emit: a, activePage: e, isOpen: o, t: P, sidepanel: i, pages: u, previousPages: n, hasPreviousPages:
|
|
192
|
+
}), O(D, b), { __sfc: !0, props: t, emit: a, activePage: e, isOpen: o, t: P, sidepanel: i, pages: u, previousPages: n, hasPreviousPages: d, animation: _, isClosing: v, lastPage: f, isActivePageValid: E, goToPreviousPage: g, conditionalClasses: C, closeSidepanelAfterAnimation: I, startCloseSidepanelAnimation: A, closeSidepanelOnClickOutside: S, unregisterPage: m, registerPage: b, BentoButton: w, BentoFocusTrap: j, CrossIcon: J };
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
195
|
var ee = function() {
|
|
@@ -205,13 +205,13 @@ var ee = function() {
|
|
|
205
205
|
ae,
|
|
206
206
|
!1,
|
|
207
207
|
null,
|
|
208
|
-
"
|
|
208
|
+
"b0ec4027",
|
|
209
209
|
null,
|
|
210
210
|
null
|
|
211
211
|
);
|
|
212
|
-
const
|
|
212
|
+
const ve = te.exports;
|
|
213
213
|
export {
|
|
214
|
-
|
|
214
|
+
ve as BentoSidepanel,
|
|
215
215
|
y as BentoSidepanelAnimation,
|
|
216
216
|
T as BentoSidepanelEvent,
|
|
217
217
|
_e as BentoSidepanelPage
|
package/dist/sidepanel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidepanel.js","sources":["../src/components/sidepanel/sidepanel.types.ts","../src/components/sidepanel/sidepanel.keys.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","export const SIDEPANEL_REGISTER_PAGE_INJECTION_KEY = Symbol('sidepanel registerPage injection key');\nexport const SIDEPANEL_CONFIG_INJECTION_KEY = Symbol('sidepanel config data injection key');\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 v-if=\"actions\" class=\"b-sidepanel-page__actions\" :class=\"actionsConditionalClasses\">\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 ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @click=\"isDismissible && closeSidepanelOnClickOutside($event)\"\n @keydown.esc=\"startCloseSidepanelAnimation\"\n >\n <bento-focus-trap>\n <div 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 { 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 * 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\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 = (event: AnimationEvent) => {\n if (isClosing.value && event.pseudoElement === '::backdrop') {\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 = (event?: Event) => {\n if (event) {\n event.preventDefault();\n }\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</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","SIDEPANEL_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_CONFIG_INJECTION_KEY","__default__$1","messages$1","useI18n","contentElement","ref","hasScroll","isScrollAtTop","isScrollAtBottom","registerPage","inject","unregisterPage","props","onUnmounted","activePage","animation","goToPreviousPage","hasPreviousPages","isOpen","showPage","computed","showBackButton","headerConditionalClasses","actionsConditionalClasses","onScroll","calculateScroll","watchedValue","nextTick","watch","__default__","messages","toRefs","t","sidepanel","pages","previousPages","isClosing","lastPage","isActivePageValid","page","index","emit","conditionalClasses","closeSidepanelAfterAnimation","event","startCloseSidep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AA,KAAA,KACJmB,EAAA,MAAA,QAEAY,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAAlC,IAAA,CAAAqC,MAAA,MAAA;;AACI,MAAAd,EAAA,SAAAe,IAAAf,EAAA,UAAA,gBAAAe,EAAA,OAAA,CAAA,EAAA,QAAAC,EAAA,MAAAA,MAAAF;AAAA,IAA2E,GAI/EvC,IAAA,CAAA,EAAA,OAAA0C,GAAA,QAAAD,EAAA,OACIhB,EAAA,MAAA,KAAA,EAAA,OAAAiB,GAAA,QAAAD,EAAA,CAAA,GAEA,EAAA,gBAAAvC,EAAAuC,CAAA,EAAA;AAGJ,WAAAE,EAAApD,GAAA;AAAA,MAAwC,YAAAc;AAAA,MACpC,WAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,QAAAC;AAAA,IACA,CAAA,GAEJkC,EAAArD,GAAAU,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"sidepanel.js","sources":["../src/components/sidepanel/sidepanel.types.ts","../src/components/sidepanel/sidepanel.keys.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","export const SIDEPANEL_REGISTER_PAGE_INJECTION_KEY = Symbol('sidepanel registerPage injection key');\nexport const SIDEPANEL_CONFIG_INJECTION_KEY = Symbol('sidepanel config data injection key');\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 v-if=\"actions\" class=\"b-sidepanel-page__actions\" :class=\"actionsConditionalClasses\">\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 ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @click=\"isDismissible && closeSidepanelOnClickOutside($event)\"\n @keydown.esc=\"startCloseSidepanelAnimation\"\n >\n <bento-focus-trap>\n <div 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 { 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 * 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\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 = (event: AnimationEvent) => {\n if (isClosing.value && event.pseudoElement === '::backdrop') {\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 = (event?: Event) => {\n if (event) {\n event.preventDefault();\n }\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</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","SIDEPANEL_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_CONFIG_INJECTION_KEY","__default__$1","messages$1","useI18n","contentElement","ref","hasScroll","isScrollAtTop","isScrollAtBottom","registerPage","inject","unregisterPage","props","onUnmounted","activePage","animation","goToPreviousPage","hasPreviousPages","isOpen","showPage","computed","showBackButton","headerConditionalClasses","actionsConditionalClasses","onScroll","calculateScroll","watchedValue","nextTick","watch","__default__","messages","toRefs","t","sidepanel","pages","previousPages","isClosing","lastPage","isActivePageValid","page","index","emit","conditionalClasses","closeSidepanelAfterAnimation","event","startCloseSidepanelAnimation","closeSidepanelOnClickOutside","target","pageIdToRemove","_a","pageId","title","provide"],"mappings":";;;;;;;;;;AAOY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,qBAAA,sBACAA,EAAA,iBAAA,kBAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,0BAAA,6CACAA,EAAA,yBAAA,4CAFQA,IAAAD,KAAA,CAAA,CAAA;ACZC,MAAAE,IAAA,OAAA,sCAAA,GACAC,IAAA,OAAA,qCAAA;;;;GCwNTC,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA7GA,EAAA,EAAA,IAAAC,EAAA,GAGAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,EAAA,GACAE,IAAAF,EAAA,EAAA,GACAG,IAAAH,EAAA,EAAA,GAGAI,IAAAC,EAAAX,CAAA,GACA,EAAA,gBAAAY,EAAA,IAAAF,EAAA,EAAA,OAAAG,EAAA,OAAA,QAAAA,EAAA,OAAA,CAAA;AAGA,IAAAC,EAAA,MAAAF,EAAA,CAAA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AEJA,EAAA,QAAA,CAAA,GACAC,EAAA,QAAA,IACAK,EAAA9C,EAAA,gBAAA,EAAA;AAAA,IACJ,GAGJkD,IAAA,CAAAD,MAAA;AAII,MAHAA,KACIA,EAAA,eAAA,GAEJX,EAAA,MAAA,SAGAG,EAAA,QAAA;AAAA,IAAkB,GAOtBU,IAAA,CAAA,EAAA,QAAAC,EAAA,MAAA;AACI,MAAAA,KAAAA,EAAA,YAAA,YACIF,EAAA;AAAA,IACJ;AAIJ,IAAAjB;AAAA,MAAA,MAAAV,EAAA;AAAA,MACiB,YAAA;AAKT,QAFA,MAAAS,EAAA,GAEAM,EAAA,UAIAf,EAAA,SACIe,EAAA,MAAA,UAAA,GACAE,EAAA,MAAA,UACIA,EAAA,MAAA,KAAArB,EAAA,KAAA,KACJmB,EAAA,MAAA,QAEAY,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAAlC,IAAA,CAAAqC,MAAA,MAAA;;AACI,MAAAd,EAAA,SAAAe,IAAAf,EAAA,UAAA,gBAAAe,EAAA,OAAA,CAAA,EAAA,QAAAC,EAAA,MAAAA,MAAAF;AAAA,IAA2E,GAI/EvC,IAAA,CAAA,EAAA,OAAA0C,GAAA,QAAAD,EAAA,OACIhB,EAAA,MAAA,KAAA,EAAA,OAAAiB,GAAA,QAAAD,EAAA,CAAA,GAEA,EAAA,gBAAAvC,EAAAuC,CAAA,EAAA;AAGJ,WAAAE,EAAApD,GAAA;AAAA,MAAwC,YAAAc;AAAA,MACpC,WAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,QAAAC;AAAA,IACA,CAAA,GAEJkC,EAAArD,GAAAU,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/status.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as n, computed as a } from "vue";
|
|
2
2
|
import { B as o } from "./chunks/index.1645ffcb.js";
|
|
3
3
|
import { n as l } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
4
|
-
import "./assets/
|
|
4
|
+
import "./assets/index23.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
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
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.1645ffcb.js";
|
|
3
|
+
import { B as I, a as M } from "./chunks/keyboard-navigation.ca47dfa8.js";
|
|
4
|
+
import { u as U } from "./chunks/i18n.155748d6.js";
|
|
5
|
+
import { n as T } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
6
|
+
import { B as j } from "./chunks/base-button.89e9efbd.js";
|
|
7
|
+
import { C as G } from "./chunks/checkmark-small.5ca15f00.js";
|
|
8
|
+
import "./assets/index24.css";
|
|
9
|
+
const q = (l) => {
|
|
10
|
+
function s(i) {
|
|
11
|
+
return ({ detail: u }) => {
|
|
12
|
+
var t;
|
|
13
|
+
u.preventDefault();
|
|
14
|
+
const c = l.value.indexOf(document.activeElement);
|
|
15
|
+
c < 0 || (t = l.value[c + i]) == null || t.focus();
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
const n = s(-1), e = s(1);
|
|
19
|
+
return {
|
|
20
|
+
[I.ARROW_DOWN]: e,
|
|
21
|
+
[I.ARROW_RIGHT]: e,
|
|
22
|
+
[I.ARROW_UP]: n,
|
|
23
|
+
[I.ARROW_LEFT]: n
|
|
24
|
+
};
|
|
25
|
+
}, R = Symbol("stepper state");
|
|
26
|
+
var B = /* @__PURE__ */ ((l) => (l.LINEAR = "linear", l.NON_LINEAR = "non-linear", l))(B || {}), O = /* @__PURE__ */ ((l) => (l.HORIZONTAL = "horizontal", l.VERTICAL = "vertical", l))(O || {});
|
|
27
|
+
const J = {
|
|
28
|
+
"en-US": {
|
|
29
|
+
step: "Step {currentIndex}/{totalSteps} {content}"
|
|
30
|
+
}
|
|
31
|
+
}, Q = {
|
|
32
|
+
i18n: { messages: J },
|
|
33
|
+
name: "stepper"
|
|
34
|
+
}, X = /* @__PURE__ */ V({
|
|
35
|
+
...Q,
|
|
36
|
+
props: {
|
|
37
|
+
/**
|
|
38
|
+
* Type of stepper; defines how the stepper should behave. Default: linear
|
|
39
|
+
* @values linear, non-linear
|
|
40
|
+
*/
|
|
41
|
+
type: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "linear"
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* Stepper variant; defines how the stepper should be displayed. Default: vertical
|
|
47
|
+
* @values vertical, horizontal
|
|
48
|
+
*/
|
|
49
|
+
variant: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: "vertical"
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* Active step index
|
|
55
|
+
*/
|
|
56
|
+
index: {
|
|
57
|
+
type: Number,
|
|
58
|
+
default: 0
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
emits: ["update:index"],
|
|
62
|
+
setup(l, { emit: s }) {
|
|
63
|
+
const n = l, { t: e } = U(), i = p([]), u = p(n.index), c = p(u.value), t = (a) => {
|
|
64
|
+
a > c.value && (c.value = a), u.value = a;
|
|
65
|
+
}, S = o(() => {
|
|
66
|
+
var a;
|
|
67
|
+
return (a = i.value[u.value]) == null ? void 0 : a.stepContent;
|
|
68
|
+
}), v = o(() => i.value.length), y = o(() => i.value.map(({ buttonElement: a }) => a)), b = o(() => n.variant === O.HORIZONTAL), _ = o(
|
|
69
|
+
() => i.value.map(({ buttonElement: a, substeps: h }, m) => {
|
|
70
|
+
const N = u.value === m;
|
|
71
|
+
return !b.value && N ? [a].concat(h.map((g) => g.buttonElement)) : [a];
|
|
72
|
+
}).flat()
|
|
73
|
+
), d = (a) => {
|
|
74
|
+
i.value.push({
|
|
75
|
+
stepContent: a.stepContent,
|
|
76
|
+
buttonElement: a.buttonElement,
|
|
77
|
+
substeps: a.substeps
|
|
78
|
+
});
|
|
79
|
+
}, f = p({
|
|
80
|
+
activeStepIndex: u,
|
|
81
|
+
latestActiveStep: c,
|
|
82
|
+
steps: y,
|
|
83
|
+
type: n.type,
|
|
84
|
+
variant: n.variant,
|
|
85
|
+
navigateToStep: t,
|
|
86
|
+
registerStep: d
|
|
87
|
+
}), C = o(() => ({
|
|
88
|
+
"b-stepper__list--horizontal": b.value
|
|
89
|
+
}));
|
|
90
|
+
A(() => n.index, t), A(u, (a) => {
|
|
91
|
+
s("update:index", a);
|
|
92
|
+
});
|
|
93
|
+
const x = q(_);
|
|
94
|
+
return w(R, K(f)), { __sfc: !0, props: n, emit: s, t: e, childrenSteps: i, activeStepIndex: u, latestActiveStep: c, navigateToStep: t, currentStepContent: S, stepsAmount: v, childrenStepsElements: y, isHorizontalVariant: b, allVisibleStepsElements: _, registerStep: d, stepperState: f, conditionalClasses: C, keyboardNavigationListeners: x, BentoTypography: L, vBentoKeyboardNavigationDirective: M };
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
var Y = function() {
|
|
98
|
+
var s = this, n = s._self._c, e = s._self._setupProxy;
|
|
99
|
+
return n("nav", { staticClass: "b-stepper" }, [n("ol", s._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-stepper__list", class: e.conditionalClasses }, e.keyboardNavigationListeners), [s._t("default")], 2), n(e.BentoTypography, { staticClass: "b-stepper__text-stepper", attrs: { el: "span", variant: "body", stronger: "" } }, [s._v(s._s(e.t("step", { currentIndex: e.activeStepIndex + 1, totalSteps: e.stepsAmount, content: e.currentStepContent })) + " ")])], 1);
|
|
100
|
+
}, ee = [], te = /* @__PURE__ */ T(
|
|
101
|
+
X,
|
|
102
|
+
Y,
|
|
103
|
+
ee,
|
|
104
|
+
!1,
|
|
105
|
+
null,
|
|
106
|
+
"7987f68e",
|
|
107
|
+
null,
|
|
108
|
+
null
|
|
109
|
+
);
|
|
110
|
+
const ye = te.exports;
|
|
111
|
+
let $ = 0;
|
|
112
|
+
const se = {
|
|
113
|
+
beforeCreate() {
|
|
114
|
+
this.uuid = $.toString(), $ += 1;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
var ne = function() {
|
|
118
|
+
var s = this, n = s._self._c;
|
|
119
|
+
return n("svg", s._b({ attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", s.$attrs, !1), [s.$attrs["svg-title"] ? n("title", [s._v(s._s(s.$attrs["svg-title"]))]) : s._e(), n("path", { attrs: { fill: "#00112C", "fill-rule": "evenodd", d: "M8 5.25C6.48122 5.25 5.25 6.48122 5.25 8C5.25 9.51878 6.48122 10.75 8 10.75C9.51878 10.75 10.75 9.51878 10.75 8C10.75 6.48122 9.51878 5.25 8 5.25Z", "clip-rule": "evenodd" } })]);
|
|
120
|
+
}, ae = [], oe = /* @__PURE__ */ T(
|
|
121
|
+
se,
|
|
122
|
+
ne,
|
|
123
|
+
ae,
|
|
124
|
+
!1,
|
|
125
|
+
null,
|
|
126
|
+
"750b7c68",
|
|
127
|
+
null,
|
|
128
|
+
null
|
|
129
|
+
);
|
|
130
|
+
const le = oe.exports, re = {
|
|
131
|
+
name: "step"
|
|
132
|
+
}, ie = /* @__PURE__ */ V({
|
|
133
|
+
...re,
|
|
134
|
+
props: {
|
|
135
|
+
/**
|
|
136
|
+
* Completed status. Used on non-linear steppers to indicate if the step is completed.
|
|
137
|
+
*/
|
|
138
|
+
completed: {
|
|
139
|
+
type: Boolean,
|
|
140
|
+
default: !1
|
|
141
|
+
},
|
|
142
|
+
/**
|
|
143
|
+
* Active substep index
|
|
144
|
+
*/
|
|
145
|
+
substepIndex: {
|
|
146
|
+
type: Number,
|
|
147
|
+
default: 0
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
emits: ["update:substep-index"],
|
|
151
|
+
setup(l, { emit: s }) {
|
|
152
|
+
const n = l, e = W(), i = p(null), u = p(null), c = p([]), t = z(R), S = o(() => {
|
|
153
|
+
var r;
|
|
154
|
+
return (r = i.value) == null ? void 0 : r.$el;
|
|
155
|
+
}), v = o(() => t == null ? void 0 : t.value.steps.indexOf(S.value)), y = o(() => {
|
|
156
|
+
var r;
|
|
157
|
+
return (r = u.value) == null ? void 0 : r.$el.textContent;
|
|
158
|
+
}), b = o(() => c.value.map(({ buttonElement: r }) => r)), _ = p(n.substepIndex), d = p(_.value), f = (r) => {
|
|
159
|
+
r > d.value && (d.value = r), _.value = r;
|
|
160
|
+
}, C = (r) => {
|
|
161
|
+
c.value.push({
|
|
162
|
+
stepContent: r.stepContent,
|
|
163
|
+
buttonElement: r.buttonElement,
|
|
164
|
+
substeps: r.substeps
|
|
165
|
+
});
|
|
166
|
+
}, x = p({
|
|
167
|
+
activeStepIndex: _,
|
|
168
|
+
latestActiveStep: d,
|
|
169
|
+
type: t.value.type,
|
|
170
|
+
variant: t.value.variant,
|
|
171
|
+
steps: b,
|
|
172
|
+
isParentStep: !0,
|
|
173
|
+
navigateToStep: f,
|
|
174
|
+
registerStep: C
|
|
175
|
+
});
|
|
176
|
+
w(R, x), A(() => n.substepIndex, f), A(_, (r) => {
|
|
177
|
+
s("update:substep-index", r);
|
|
178
|
+
}), Z(() => {
|
|
179
|
+
if (!t)
|
|
180
|
+
throw new Error(
|
|
181
|
+
"BentoStep components should only be used inside BentoStepper or other BentoStep components."
|
|
182
|
+
);
|
|
183
|
+
t.value.registerStep({
|
|
184
|
+
buttonElement: S,
|
|
185
|
+
stepContent: y,
|
|
186
|
+
substeps: c
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
const a = o(() => t.value.isParentStep), h = p(!1), m = o(() => (t == null ? void 0 : t.value.activeStepIndex) === v.value), N = o(
|
|
190
|
+
() => m.value && t.value.variant !== O.HORIZONTAL && !a.value && e.substeps
|
|
191
|
+
), E = o(() => (t == null ? void 0 : t.value.type) === B.NON_LINEAR ? n.completed : (t == null ? void 0 : t.value.latestActiveStep) > v.value), g = o(
|
|
192
|
+
() => (t == null ? void 0 : t.value.type) === B.LINEAR && v.value > (t == null ? void 0 : t.value.latestActiveStep)
|
|
193
|
+
), D = () => {
|
|
194
|
+
g.value || t.value.navigateToStep(v.value);
|
|
195
|
+
}, k = o(() => m.value ? "step" : "false"), P = o(() => g.value.toString()), F = o(() => h.value || v.value === 0 && !a.value ? "0" : "-1"), H = o(() => ({
|
|
196
|
+
"b-step--active": m.value,
|
|
197
|
+
"b-step--completed": E.value,
|
|
198
|
+
"b-step--substep": a.value
|
|
199
|
+
}));
|
|
200
|
+
return { __sfc: !0, slots: e, props: n, emit: s, buttonComponent: i, stepContent: u, substeps: c, stepper: t, buttonElement: S, index: v, stepContentValue: y, substepsButtonElements: b, activeSubStepIndex: _, latestActiveSubStepIndex: d, navigateToSubstep: f, registerSubstep: C, stepState: x, isSubstep: a, isFocused: h, isActive: m, isSubstepsVisible: N, isCompleted: E, isDisabled: g, navigateToStep: D, ariaCurrentValue: k, ariaDisabledValue: P, tabIndexValue: F, conditionalClasses: H, BaseButton: j, BentoTypography: L, CheckmarkSmallIcon: G, DotIcon: le };
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
var ue = function() {
|
|
204
|
+
var s = this, n = s._self._c, e = s._self._setupProxy;
|
|
205
|
+
return n("li", { staticClass: "b-step", class: e.conditionalClasses }, [n(e.BaseButton, { ref: "buttonComponent", staticClass: "b-step__button", attrs: { "aria-current": e.ariaCurrentValue, "aria-disabled": e.ariaDisabledValue, type: "button", tabindex: e.tabIndexValue, disabled: e.isDisabled }, on: { click: e.navigateToStep, focus: function(i) {
|
|
206
|
+
e.isFocused = !0;
|
|
207
|
+
}, blur: function(i) {
|
|
208
|
+
e.isFocused = !1;
|
|
209
|
+
} }, scopedSlots: s._u([{ key: "iconLeft", fn: function() {
|
|
210
|
+
return [n(e.BentoTypography, { staticClass: "b-step__index", attrs: { el: "span", variant: "body", stronger: "", "aria-hidden": "true" } }, [e.isCompleted ? n(e.CheckmarkSmallIcon) : e.isSubstep ? n(e.DotIcon) : [s._v(s._s(e.index + 1))]], 2)];
|
|
211
|
+
}, proxy: !0 }]) }, [n(e.BentoTypography, { ref: "stepContent", staticClass: "b-step__content", attrs: { el: "span", variant: "body", stronger: e.isActive } }, [s._t("default")], 2)], 1), n("ul", { directives: [{ name: "show", rawName: "v-show", value: e.isSubstepsVisible, expression: "isSubstepsVisible" }], ref: "substepList", staticClass: "b-step__substep-list" }, [s._t("substeps")], 2)], 1);
|
|
212
|
+
}, ce = [], pe = /* @__PURE__ */ T(
|
|
213
|
+
ie,
|
|
214
|
+
ue,
|
|
215
|
+
ce,
|
|
216
|
+
!1,
|
|
217
|
+
null,
|
|
218
|
+
"69c1111a",
|
|
219
|
+
null,
|
|
220
|
+
null
|
|
221
|
+
);
|
|
222
|
+
const ge = pe.exports;
|
|
223
|
+
export {
|
|
224
|
+
ge as BentoStep,
|
|
225
|
+
ye as BentoStepper,
|
|
226
|
+
B as BentoStepperTypeOption,
|
|
227
|
+
O as BentoStepperVariantOption
|
|
228
|
+
};
|
|
229
|
+
//# sourceMappingURL=stepper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper.js","sources":["../src/components/stepper/composables/useKeyboardNavigation/useKeyboardNavigation.ts","../src/components/stepper/stepper.keys.ts","../src/components/stepper/stepper.types.ts","../src/components/stepper/stepper.vue","../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/dot.vue","../src/components/stepper/components/step/step.vue"],"sourcesContent":["import { Ref } from 'vue';\n\nimport { BentoKeyboardNavigationKeyDownEvent } from '@/types';\n\n/**\n * Returns keyboard navigation's event handlers to navigate through the steps\n *\n * @param steps the list of bento-steps DOM elements to focus on the navigation\n * @returns\n */\nexport const useKeyboardNavigation = (steps: Ref<HTMLButtonElement[]>) => {\n // Returns the event handler that moves the focus on a given step offset\n function focusOnStep(indexOffset: number) {\n return ({ detail: event }) => {\n event.preventDefault();\n\n const currentIndex = steps.value.indexOf(document.activeElement as HTMLButtonElement);\n if (currentIndex < 0) {\n return;\n }\n\n steps.value[currentIndex + indexOffset]?.focus();\n };\n }\n\n const focusOnPreviousStep = focusOnStep(-1);\n const focusOnNextStep = focusOnStep(1);\n\n return {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: focusOnNextStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_RIGHT]: focusOnNextStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: focusOnPreviousStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_LEFT]: focusOnPreviousStep,\n };\n};\n","import type { InjectionKey } from 'vue';\n\nimport type { BentoStepperState } from './stepper.types';\n\nexport const STEPPER_STATE = Symbol('stepper state') as InjectionKey<BentoStepperState>;\n","import type { ComputedRef, Ref } from 'vue';\n\nexport enum BentoStepperTypeOption {\n LINEAR = 'linear',\n NON_LINEAR = 'non-linear',\n}\n\nexport enum BentoStepperVariantOption {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport interface BentoStepperStepExposeState {\n buttonElement: HTMLButtonElement | Ref<HTMLButtonElement>;\n substeps: BentoStepperStepExposeState[] | Ref<BentoStepperStepExposeState[]>;\n stepContent: string | ComputedRef<string>;\n}\n\nexport type BentoStepperState = Ref<{\n activeStepIndex: number;\n latestActiveStep: number;\n type: `${BentoStepperTypeOption}`;\n variant: `${BentoStepperVariantOption}`;\n steps: HTMLElement[];\n isParentStep?: boolean;\n navigateToStep: (index: number) => void;\n registerStep: (stepState: BentoStepperStepExposeState) => void;\n}>;\n","<template>\n <nav class=\"b-stepper\">\n <ol\n v-bento-keyboard-navigation-directive\n class=\"b-stepper__list\"\n :class=\"conditionalClasses\"\n v-on=\"keyboardNavigationListeners\"\n >\n <slot></slot>\n </ol>\n\n <bento-typography el=\"span\" variant=\"body\" stronger class=\"b-stepper__text-stepper\"\n >{{\n t('step', { currentIndex: activeStepIndex + 1, totalSteps: stepsAmount, content: currentStepContent })\n }}\n </bento-typography>\n </nav>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n\n import { computed, PropType, provide, readonly, ref, watch } from 'vue';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n import { useKeyboardNavigation } from './composables/useKeyboardNavigation/useKeyboardNavigation';\n import { useI18n } from '@/utils/ts/i18n';\n\n import { STEPPER_STATE } from './stepper.keys';\n import {\n BentoStepperState,\n BentoStepperStepExposeState,\n BentoStepperTypeOption,\n BentoStepperVariantOption,\n } from './stepper.types';\n\n import messages from './messages.json';\n\n const props = defineProps({\n /**\n * Type of stepper; defines how the stepper should behave. Default: linear\n * @values linear, non-linear\n */\n type: {\n type: String as PropType<`${BentoStepperTypeOption}`>,\n default: 'linear',\n },\n /**\n * Stepper variant; defines how the stepper should be displayed. Default: vertical\n * @values vertical, horizontal\n */\n variant: {\n type: String as PropType<`${BentoStepperVariantOption}`>,\n default: 'vertical',\n },\n /**\n * Active step index\n */\n index: {\n type: Number,\n default: 0,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Event triggered when step is updated by the stepper\n */\n (e: 'update:index', index: number): void;\n }>();\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const childrenSteps = ref<BentoStepperStepExposeState[]>([]);\n const activeStepIndex = ref(props.index);\n const latestActiveStep = ref(activeStepIndex.value);\n\n const navigateToStep = (index: number) => {\n // Stores latest active step index so users can navigate backwards and forwards on linear stepper\n if (index > latestActiveStep.value) {\n latestActiveStep.value = index;\n }\n activeStepIndex.value = index;\n };\n\n const currentStepContent = computed(() => childrenSteps.value[activeStepIndex.value]?.stepContent);\n const stepsAmount = computed(() => childrenSteps.value.length);\n const childrenStepsElements = computed(() => childrenSteps.value.map(({ buttonElement }) => buttonElement));\n const isHorizontalVariant = computed(() => props.variant === BentoStepperVariantOption.HORIZONTAL);\n\n // List of all visible steps nested on the stepper, including the substeps of the children steps\n // Flattening the steps on a single list makes the keyboard navigation easier to be handled\n const allVisibleStepsElements = computed(() =>\n childrenSteps.value\n .map(({ buttonElement, substeps }, index) => {\n const isStepActive = activeStepIndex.value === index;\n const isSubstepsVisible = !isHorizontalVariant.value && isStepActive;\n\n if (!isSubstepsVisible) {\n return [buttonElement];\n }\n\n return [buttonElement].concat(substeps.map(step => step.buttonElement));\n })\n .flat()\n );\n\n // Maps BentoStep children components whenever the DOM is updated to keep track of steps indexes\n const registerStep = (stepState: BentoStepperStepExposeState) => {\n childrenSteps.value.push({\n stepContent: stepState.stepContent as string,\n buttonElement: stepState.buttonElement as HTMLButtonElement,\n substeps: stepState.substeps as BentoStepperStepExposeState[],\n });\n };\n\n const stepperState: BentoStepperState = ref({\n activeStepIndex,\n latestActiveStep,\n steps: childrenStepsElements,\n type: props.type,\n variant: props.variant,\n navigateToStep,\n registerStep,\n });\n\n const conditionalClasses = computed(() => ({\n 'b-stepper__list--horizontal': isHorizontalVariant.value,\n }));\n\n watch(() => props.index, navigateToStep);\n watch(activeStepIndex, index => {\n emit('update:index', index);\n });\n\n const keyboardNavigationListeners = useKeyboardNavigation(allVisibleStepsElements);\n\n // Provides stepper state to BentoStep children components\n provide(STEPPER_STATE, readonly(stepperState));\n</script>\n\n<script lang=\"ts\">\n /**\n * Steppers break down complex processes into manageable steps to guide users through a sequential or multi-step process.\n *\n * @example\n * import { BentoStep, BentoStepper } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStep, BentoStepper },\n * template: `\n * <bento-stepper :index=\"1\">\n * <bento-step>Step 1</bento-step>\n * <bento-step>Step 2</bento-step>\n * <bento-step>Step 3</bento-step>\n * </bento-stepper>\n * `\n * }\n */\n\n export default {\n i18n: { messages },\n name: 'stepper',\n };\n</script>\n\n<style scoped src=\"./stepper.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M8 5.25C6.48122 5.25 5.25 6.48122 5.25 8C5.25 9.51878 6.48122 10.75 8 10.75C9.51878 10.75 10.75 9.51878 10.75 8C10.75 6.48122 9.51878 5.25 8 5.25Z\" clip-rule=\"evenodd\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n","<template>\n <li :class=\"conditionalClasses\" class=\"b-step\">\n <base-button\n ref=\"buttonComponent\"\n :aria-current=\"ariaCurrentValue\"\n :aria-disabled=\"ariaDisabledValue\"\n class=\"b-step__button\"\n type=\"button\"\n :tabindex=\"tabIndexValue\"\n :disabled=\"isDisabled\"\n @click=\"navigateToStep\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n >\n <template #iconLeft>\n <bento-typography el=\"span\" variant=\"body\" stronger class=\"b-step__index\" aria-hidden=\"true\">\n <checkmark-small-icon v-if=\"isCompleted\" />\n <template v-else-if=\"!isSubstep\">{{ index + 1 }}</template>\n <dot-icon v-else />\n </bento-typography>\n </template>\n\n <bento-typography ref=\"stepContent\" el=\"span\" variant=\"body\" :stronger=\"isActive\" class=\"b-step__content\">\n <slot></slot>\n </bento-typography>\n </base-button>\n\n <ul v-show=\"isSubstepsVisible\" ref=\"substepList\" class=\"b-step__substep-list\">\n <slot name=\"substeps\"></slot>\n </ul>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, onMounted, provide, ref, useSlots, watch } from 'vue';\n import { BaseButton } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import DotIcon from '@adyen/ui-assets-icons-16/vue/dot';\n\n import { STEPPER_STATE } from '../../stepper.keys';\n import {\n BentoStepperState,\n BentoStepperStepExposeState,\n BentoStepperTypeOption,\n BentoStepperVariantOption,\n } from '../../stepper.types';\n import { Booleanish } from '@/types';\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Completed status. Used on non-linear steppers to indicate if the step is completed.\n */\n completed: {\n type: Boolean,\n default: false,\n },\n /**\n * Active substep index\n */\n substepIndex: {\n type: Number,\n default: 0,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Event triggered when substep is updated by the parent step\n */\n (e: 'update:substep-index', index: number): void;\n }>();\n\n // Element refs\n const buttonComponent = ref<InstanceType<typeof BaseButton> | null>(null);\n const stepContent = ref<InstanceType<typeof BentoTypography> | null>(null);\n const substeps = ref<BentoStepperStepExposeState[]>([]);\n\n // Injects parent BentoStepper state data\n const stepper = inject(STEPPER_STATE);\n\n const buttonElement = computed(() => buttonComponent.value?.$el as HTMLButtonElement);\n const index = computed(() => stepper?.value.steps.indexOf(buttonElement.value));\n\n const stepContentValue = computed(() => stepContent.value?.$el.textContent);\n\n // Substep logic\n const substepsButtonElements = computed(() => substeps.value.map(({ buttonElement }) => buttonElement));\n\n const activeSubStepIndex = ref(props.substepIndex);\n const latestActiveSubStepIndex = ref(activeSubStepIndex.value);\n\n const navigateToSubstep = (value: number) => {\n if (value > latestActiveSubStepIndex.value) {\n latestActiveSubStepIndex.value = value;\n }\n\n activeSubStepIndex.value = value;\n };\n\n const registerSubstep = (stepState: BentoStepperStepExposeState) => {\n substeps.value.push({\n stepContent: stepState.stepContent as string,\n buttonElement: stepState.buttonElement as HTMLButtonElement,\n substeps: stepState.substeps as BentoStepperStepExposeState[],\n });\n };\n\n const stepState: BentoStepperState = ref({\n activeStepIndex: activeSubStepIndex,\n latestActiveStep: latestActiveSubStepIndex,\n type: stepper.value.type,\n variant: stepper.value.variant,\n steps: substepsButtonElements,\n isParentStep: true,\n navigateToStep: navigateToSubstep,\n registerStep: registerSubstep,\n });\n\n provide(STEPPER_STATE, stepState);\n\n watch(() => props.substepIndex, navigateToSubstep);\n watch(activeSubStepIndex, value => {\n emit('update:substep-index', value);\n });\n\n onMounted(() => {\n if (!stepper) {\n throw new Error(\n 'BentoStep components should only be used inside BentoStepper or other BentoStep components.'\n );\n }\n\n stepper.value.registerStep({\n buttonElement,\n stepContent: stepContentValue,\n substeps,\n });\n });\n\n // Step states\n const isSubstep = computed(() => stepper.value.isParentStep);\n const isFocused = ref(false);\n const isActive = computed(() => stepper?.value.activeStepIndex === index.value);\n const isSubstepsVisible = computed(\n () =>\n isActive.value &&\n stepper.value.variant !== BentoStepperVariantOption.HORIZONTAL &&\n !isSubstep.value &&\n slots.substeps\n );\n const isCompleted = computed(() => {\n if (stepper?.value.type === BentoStepperTypeOption.NON_LINEAR) {\n return props.completed;\n }\n\n return stepper?.value.latestActiveStep > index.value;\n });\n const isDisabled = computed(\n () => stepper?.value.type === BentoStepperTypeOption.LINEAR && index.value > stepper?.value.latestActiveStep\n );\n\n const navigateToStep = () => {\n if (isDisabled.value) {\n return;\n }\n\n stepper.value.navigateToStep(index.value);\n };\n\n // Styling and a11y\n const ariaCurrentValue = computed(() => (isActive.value ? 'step' : ('false' as Booleanish)));\n const ariaDisabledValue = computed(() => isDisabled.value.toString() as Booleanish);\n const tabIndexValue = computed(() => (isFocused.value || (index.value === 0 && !isSubstep.value) ? '0' : '-1'));\n\n const conditionalClasses = computed(() => ({\n 'b-step--active': isActive.value,\n 'b-step--completed': isCompleted.value,\n 'b-step--substep': isSubstep.value,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Steps are components placed inside BentoSteppers to break down complex processes\n *\n * @example\n * import { BentoStep } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStep },\n * template: `\n * <bento-stepper>\n * <bento-step>Step 1</bento-step>\n * <bento-step>\n * Step 2\n * <template #substeps>\n * <bento-step>Substep 1</bento-step>\n * <bento-step>Substep 2</bento-step>\n * </template>\n * </bento-step>\n * </bento-stepper>\n * `\n * }\n */\n\n export default {\n name: 'step',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./step.scss\" />\n"],"names":["useKeyboardNavigation","steps","focusOnStep","indexOffset","event","currentIndex","_a","focusOnPreviousStep","focusOnNextStep","BentoKeyboardNavigationKeyDownEvent","STEPPER_STATE","BentoStepperTypeOption","BentoStepperTypeOption2","BentoStepperVariantOption","BentoStepperVariantOption2","__default__$1","messages","t","useI18n","childrenSteps","ref","activeStepIndex","props","latestActiveStep","navigateToStep","index","currentStepContent","computed","stepsAmount","childrenStepsElements","buttonElement","isHorizontalVariant","allVisibleStepsElements","substeps","isStepActive","step","registerStep","stepState","stepperState","conditionalClasses","watch","emit","keyboardNavigationListeners","provide","readonly","uuid","_sfc_main$1","__default__","slots","useSlots","buttonComponent","stepContent","stepper","inject","stepContentValue","substepsButtonElements","buttonElement2","activeSubStepIndex","latestActiveSubStepIndex","navigateToSubstep","value","registerSubstep","stepState2","onMounted","isSubstep","isFocused","isActive","isSubstepsVisible","isCompleted","isDisabled","ariaCurrentValue","ariaDisabledValue","tabIndexValue"],"mappings":";;;;;;;;AAUa,MAAAA,IAAA,CAAAC,MAAA;AAET,WAAAC,EAAAC,GAAA;AACI,WAAA,CAAA,EAAA,QAAAC,EAAA,MAAA;;AACI,MAAAA,EAAA,eAAA;AAEA,YAAAC,IAAAJ,EAAA,MAAA,QAAA,SAAA,aAAA;AACA,MAAAI,IAAA,MAIAC,IAAAL,EAAA,MAAAI,IAAAF,CAAA,MAAA,QAAAG,EAAA;AAAA,IAA+C;AAAA,EACnD;AAGJ,QAAAC,IAAAL,EAAA,EAAA,GACAM,IAAAN,EAAA,CAAA;AAEA,SAAA;AAAA,IAAO,CAAAO,EAAA,UAAA,GAAAD;AAAA,IAC+C,CAAAC,EAAA,WAAA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EAAA,MAAA,qBAAA3B,EAAA,KAAA,GACA0C,IAAAxC;AAAA,MAA0B,MAAAuC,EAAA,SAAAd,EAAA,MAAA,YAAAvC,EAAA,cAAA,CAAAmD,EAAA,SAAAhB,EAAA;AAAA,IAKZ,GAEdoB,IAAAzC,EAAA,OACIyB,KAAA,gBAAAA,EAAA,MAAA,UAAAzC,EAAA,aACIW,EAAA,aAGJ8B,KAAA,gBAAAA,EAAA,MAAA,oBAAA3B,EAAA,KAA+C,GAEnD4C,IAAA1C;AAAA,MAAmB,OAAAyB,KAAA,gBAAAA,EAAA,MAAA,UAAAzC,EAAA,UAAAc,EAAA,SAAA2B,KAAA,gBAAAA,EAAA,MAAA;AAAA,IAC6E,GAGhG5B,IAAA,MAAA;AACI,MAAA6C,EAAA,SAIAjB,EAAA,MAAA,eAAA3B,EAAA,KAAA;AAAA,IAAwC,GAI5C6C,IAAA3C,EAAA,MAAAuC,EAAA,QAAA,SAAA,OAAA,GACAK,IAAA5C,EAAA,MAAA0C,EAAA,MAAA,SAAA,CAAA,GACAG,IAAA7C,EAAA,MAAAsC,EAAA,SAAAxC,EAAA,UAAA,KAAA,CAAAuC,EAAA,QAAA,MAAA,IAAA,GAEAzB,IAAAZ,EAAA,OAAA;AAAA,MAA2C,kBAAAuC,EAAA;AAAA,MACZ,qBAAAE,EAAA;AAAA,MACM,mBAAAJ,EAAA;AAAA,IACJ,EAAA;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[4]}
|
package/dist/structured-list.js
CHANGED
package/dist/summary-grid.js
CHANGED
|
@@ -5,8 +5,8 @@ import { n as u } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
|
5
5
|
import { BentoInfoIcon as E } from "./info-icon.js";
|
|
6
6
|
import { B as O, a as v } from "./chunks/index.1645ffcb.js";
|
|
7
7
|
import { BentoTag as M, BentoTagVariant as _ } from "./tag.js";
|
|
8
|
-
import { C as L } from "./chunks/copy.
|
|
9
|
-
import "./assets/
|
|
8
|
+
import { C as L } from "./chunks/copy.57f969d4.js";
|
|
9
|
+
import "./assets/index26.css";
|
|
10
10
|
const P = c({
|
|
11
11
|
name: "bento-summary-grid",
|
|
12
12
|
components: { GridLayout: h },
|
package/dist/tabs.js
CHANGED
|
@@ -3,7 +3,7 @@ import { E as N, T as m, a as I } from "./chunks/tabs.keys.358742f2.js";
|
|
|
3
3
|
import { n as g } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
4
4
|
import { B as k } from "./chunks/index.1645ffcb.js";
|
|
5
5
|
import { g as B } from "./chunks/unique-id.a2a2b458.js";
|
|
6
|
-
import "./assets/
|
|
6
|
+
import "./assets/index27.css";
|
|
7
7
|
const R = p({
|
|
8
8
|
props: {
|
|
9
9
|
/**
|
package/dist/tag.js
CHANGED
|
@@ -2,9 +2,9 @@ import { defineComponent as c, computed as o } from "vue";
|
|
|
2
2
|
import { B as d } from "./chunks/index.1645ffcb.js";
|
|
3
3
|
import { u as m } from "./chunks/aria-label.ac9651a5.js";
|
|
4
4
|
import { g as s } from "./chunks/get-slot-text.c1114034.js";
|
|
5
|
-
import { b as _ } from "./chunks/tooltip.
|
|
5
|
+
import { b as _ } from "./chunks/tooltip.f89cb0cd.js";
|
|
6
6
|
import { n as v } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
7
|
-
import "./assets/
|
|
7
|
+
import "./assets/index28.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
|
@@ -8,7 +8,7 @@ import { u as K } from "./chunks/i18n.155748d6.js";
|
|
|
8
8
|
import { u as Q } from "./chunks/aria-label.ac9651a5.js";
|
|
9
9
|
import { u as X } from "./chunks/use-form-layout-loading.d03e5d48.js";
|
|
10
10
|
import { E as ee } from "./chunks/error-message.7a5db7f6.js";
|
|
11
|
-
import "./assets/
|
|
11
|
+
import "./assets/index29.css";
|
|
12
12
|
var m = /* @__PURE__ */ ((t) => (t.HORIZONTAL = "horizontal", t.VERTICAL = "vertical", t.BOTH = "both", t.NONE = "none", t))(m || {}), i = /* @__PURE__ */ ((t) => (t.CLEARABLE = "clearable", t.DISABLED = "disabled", t.ERROR = "error", t.READONLY = "readonly", t))(i || {}), r = /* @__PURE__ */ ((t) => (t.BLUR = "blur", t.CHANGE = "change", t.CLEAR = "clear", t.ESCAPE_PRESSED = "escape-pressed", t.FOCUS = "focus", t.INPUT = "input", t))(r || {});
|
|
13
13
|
let L = 0;
|
|
14
14
|
const te = {
|
package/dist/timeline.js
CHANGED
|
@@ -4,14 +4,14 @@ import { a as H } from "./chunks/button.66df5734.js";
|
|
|
4
4
|
import { B as J } from "./chunks/index.e722eb60.js";
|
|
5
5
|
import { BentoTag as K } from "./tag.js";
|
|
6
6
|
import { B as P } from "./chunks/index.1645ffcb.js";
|
|
7
|
-
import { B as V, a as Z, S as Q } from "./chunks/index.
|
|
7
|
+
import { B as V, a as Z, S as Q } from "./chunks/index.f607a3f1.js";
|
|
8
8
|
import { C as W } from "./chunks/checkmark-circle-fill.2cfbb81b.js";
|
|
9
9
|
import { C as X } from "./chunks/cross-circle-fill.d5e9ae44.js";
|
|
10
10
|
import { r as G, e as ee, t as C, g as A } from "./chunks/index.f55fdc32.js";
|
|
11
11
|
import { c as te, a as ie } from "./chunks/index.86453263.js";
|
|
12
12
|
import { g as se } from "./chunks/unique-id.a2a2b458.js";
|
|
13
13
|
import { u as ae } from "./chunks/i18n.155748d6.js";
|
|
14
|
-
import "./assets/
|
|
14
|
+
import "./assets/index30.css";
|
|
15
15
|
var O = 1e3 * 60, y = 60 * 24, D = y * 30, F = y * 365;
|
|
16
16
|
function U(t, e) {
|
|
17
17
|
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
package/dist/toast.js
CHANGED
|
@@ -5,7 +5,7 @@ import { a as x } from "./chunks/button.66df5734.js";
|
|
|
5
5
|
import { B as S } from "./chunks/index.1645ffcb.js";
|
|
6
6
|
import { u as w } from "./chunks/use-has-slot.6052d56a.js";
|
|
7
7
|
import { n as f } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
8
|
-
import "./assets/
|
|
8
|
+
import "./assets/index31.css";
|
|
9
9
|
const $ = {
|
|
10
10
|
"en-US": {
|
|
11
11
|
dismiss: "Dismiss"
|