@adyen/bento-vue2 1.53.0 → 1.54.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/index.d.ts +1832 -2154
- package/dist/action-bar.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/link.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/payment-method.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/summary-grid.css +1 -0
- package/dist/assets/tabs.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.Cuktzrp5.js → action-bar.CH1Mswou.js} +5 -5
- package/dist/chunks/{action-bar.Cuktzrp5.js.map → action-bar.CH1Mswou.js.map} +1 -1
- package/dist/chunks/{base-modal.DnaWOvaM.js → base-modal.kHzGyWf6.js} +3 -3
- package/dist/chunks/{base-modal.DnaWOvaM.js.map → base-modal.kHzGyWf6.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.twMFsb82.js → button-actions-with-menu.mqNecwDb.js} +5 -5
- package/dist/chunks/{button-actions-with-menu.twMFsb82.js.map → button-actions-with-menu.mqNecwDb.js.map} +1 -1
- package/dist/chunks/{button-actions.DAvSJtOB.js → button-actions.XlUhz42n.js} +42 -100
- package/dist/chunks/{button-actions.DAvSJtOB.js.map → button-actions.XlUhz42n.js.map} +1 -1
- package/dist/chunks/{calendar.CJToU_uI.js → calendar.D4dMXwc0.js} +4 -4
- package/dist/chunks/{calendar.CJToU_uI.js.map → calendar.D4dMXwc0.js.map} +1 -1
- package/dist/chunks/{card.AQO_BjGb.js → card.BT04hjvV.js} +2 -2
- package/dist/chunks/{card.AQO_BjGb.js.map → card.BT04hjvV.js.map} +1 -1
- package/dist/chunks/{checkbox-group.DkM6n3JR.js → checkbox-group.DZF4UIym.js} +4 -4
- package/dist/chunks/{checkbox-group.DkM6n3JR.js.map → checkbox-group.DZF4UIym.js.map} +1 -1
- package/dist/chunks/{checkbox.l7h6GYew.js → checkbox.DloQJI-K.js} +40 -40
- package/dist/chunks/checkbox.DloQJI-K.js.map +1 -0
- package/dist/chunks/{code-snippet.BsEe6nml.js → code-snippet.B3GhZo7r.js} +5 -5
- package/dist/chunks/{code-snippet.BsEe6nml.js.map → code-snippet.B3GhZo7r.js.map} +1 -1
- package/dist/chunks/{controls-group.vFyThDMU.js → controls-group.C-HKhH1m.js} +2 -2
- package/dist/chunks/{controls-group.vFyThDMU.js.map → controls-group.C-HKhH1m.js.map} +1 -1
- package/dist/chunks/{copy.DD_Yfyn_.js → copy.k18tXmP1.js} +3 -3
- package/dist/chunks/{copy.DD_Yfyn_.js.map → copy.k18tXmP1.js.map} +1 -1
- package/dist/chunks/{dashboard-section.z-Rnv5E-.js → dashboard-section.DlIwNKkx.js} +4 -4
- package/dist/chunks/{dashboard-section.z-Rnv5E-.js.map → dashboard-section.DlIwNKkx.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CfQuYKV9.js → dashed-underline.BbQIbZfu.js} +3 -3
- package/dist/chunks/{dashed-underline.CfQuYKV9.js.map → dashed-underline.BbQIbZfu.js.map} +1 -1
- package/dist/chunks/{data-grid-template.73mazFER.js → data-grid-template.BJTWe6Ty.js} +3 -3
- package/dist/chunks/{data-grid-template.73mazFER.js.map → data-grid-template.BJTWe6Ty.js.map} +1 -1
- package/dist/chunks/{data-grid.C_Xoz-GC.js → data-grid.BjtvKzyw.js} +199 -199
- package/dist/chunks/data-grid.BjtvKzyw.js.map +1 -0
- package/dist/chunks/{date-picker.bgk9aymW.js → date-picker.Dy0k-7_1.js} +15 -15
- package/dist/chunks/{date-picker.bgk9aymW.js.map → date-picker.Dy0k-7_1.js.map} +1 -1
- package/dist/chunks/{date-range-picker.-s05jOQA.js → date-range-picker.B_uiZRMc.js} +24 -24
- package/dist/chunks/{date-range-picker.-s05jOQA.js.map → date-range-picker.B_uiZRMc.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.8qh8J-NE.js → dropdown-tag.D3py85f0.js} +4 -4
- package/dist/chunks/{dropdown-tag.8qh8J-NE.js.map → dropdown-tag.D3py85f0.js.map} +1 -1
- package/dist/chunks/{dropdown.DzWXcJyF.js → dropdown.CI6ccgJJ.js} +52 -53
- package/dist/chunks/{dropdown.DzWXcJyF.js.map → dropdown.CI6ccgJJ.js.map} +1 -1
- package/dist/chunks/{error-message.CzQf7YOD.js → error-message.qHRfH-8Y.js} +2 -2
- package/dist/chunks/{error-message.CzQf7YOD.js.map → error-message.qHRfH-8Y.js.map} +1 -1
- package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
- package/dist/chunks/{file-uploader.CcZPr-jD.js → file-uploader.BOWE87dN.js} +469 -449
- package/dist/chunks/file-uploader.BOWE87dN.js.map +1 -0
- package/dist/chunks/{filter-bar.BdGtQC7p.js → filter-bar.pVpO62X3.js} +633 -627
- package/dist/chunks/filter-bar.pVpO62X3.js.map +1 -0
- package/dist/chunks/{focus-trap.CIUzScHc.js → focus-trap.V3Q8H_5C.js} +2 -2
- package/dist/chunks/{focus-trap.CIUzScHc.js.map → focus-trap.V3Q8H_5C.js.map} +1 -1
- package/dist/chunks/{footer-actions.BkHpWa7A.js → footer-actions.DYi_MR9I.js} +2 -2
- package/dist/chunks/{footer-actions.BkHpWa7A.js.map → footer-actions.DYi_MR9I.js.map} +1 -1
- package/dist/chunks/{header-with-views.ChEgH2tn.js → header-with-views.CLSMOYua.js} +11 -11
- package/dist/chunks/{header-with-views.ChEgH2tn.js.map → header-with-views.CLSMOYua.js.map} +1 -1
- package/dist/chunks/{header.0hX8OYwM.js → header.DWx6s2nt.js} +4 -4
- package/dist/chunks/{header.0hX8OYwM.js.map → header.DWx6s2nt.js.map} +1 -1
- package/dist/chunks/{index.BCUiAdb6.js → index.48Mn1OCp.js} +3 -3
- package/dist/chunks/{index.BCUiAdb6.js.map → index.48Mn1OCp.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.w6MpKOWh.js → info-icon-with-popover.B4wYDzGz.js} +2 -2
- package/dist/chunks/{info-icon-with-popover.w6MpKOWh.js.map → info-icon-with-popover.B4wYDzGz.js.map} +1 -1
- package/dist/chunks/{info-icon.C1ReXurF.js → info-icon.J62KXp9I.js} +3 -3
- package/dist/chunks/{info-icon.C1ReXurF.js.map → info-icon.J62KXp9I.js.map} +1 -1
- package/dist/chunks/input-field-password.D6lhO8b2.js +228 -0
- package/dist/chunks/input-field-password.D6lhO8b2.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.C8WTJ1W-.js → input-field-phone-number.CYRNWZL8.js} +3 -3
- package/dist/chunks/{input-field-phone-number.C8WTJ1W-.js.map → input-field-phone-number.CYRNWZL8.js.map} +1 -1
- package/dist/chunks/{input-field.tP3Eupoo.js → input-field.CsnMZceM.js} +3 -3
- package/dist/chunks/{input-field.tP3Eupoo.js.map → input-field.CsnMZceM.js.map} +1 -1
- package/dist/chunks/inspector.types.Cmq6sdCz.js +105 -0
- package/dist/chunks/inspector.types.Cmq6sdCz.js.map +1 -0
- package/dist/chunks/{layout-row.BgBazwnM.js → layout-row.DWRoI0dm.js} +2 -2
- package/dist/chunks/{layout-row.BgBazwnM.js.map → layout-row.DWRoI0dm.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.T9cfTst7.js → listbox-option-tag.BHI-8rRX.js} +2 -2
- package/dist/chunks/{listbox-option-tag.T9cfTst7.js.map → listbox-option-tag.BHI-8rRX.js.map} +1 -1
- package/dist/chunks/{menu.CY7ceslP.js → menu.BoxhffPs.js} +2 -2
- package/dist/chunks/{menu.CY7ceslP.js.map → menu.BoxhffPs.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.Dz5w250z.js → modal-fullscreen.E7e13pW9.js} +3 -3
- package/dist/chunks/{modal-fullscreen.Dz5w250z.js.map → modal-fullscreen.E7e13pW9.js.map} +1 -1
- package/dist/chunks/{modal.CnmRkXZM.js → modal.BUPJIcb6.js} +4 -4
- package/dist/chunks/{modal.CnmRkXZM.js.map → modal.BUPJIcb6.js.map} +1 -1
- package/dist/chunks/{pagination.CvGOUwd8.js → pagination.FBlW1fUz.js} +3 -3
- package/dist/chunks/{pagination.CvGOUwd8.js.map → pagination.FBlW1fUz.js.map} +1 -1
- package/dist/chunks/{payment-method.NZKiNOmM.js → payment-method.Cx4nPDtE.js} +6 -6
- package/dist/chunks/payment-method.Cx4nPDtE.js.map +1 -0
- package/dist/chunks/payment-method.types.BqtH7RM2.js +5 -0
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -0
- package/dist/chunks/{popover.BvsqsZQ1.js → popover.C4PNSrnW.js} +3 -3
- package/dist/chunks/{popover.BvsqsZQ1.js.map → popover.C4PNSrnW.js.map} +1 -1
- package/dist/chunks/{popper-container.LRQgzjRf.js → popper-container.DWY19wS0.js} +2 -2
- package/dist/chunks/{popper-container.LRQgzjRf.js.map → popper-container.DWY19wS0.js.map} +1 -1
- package/dist/chunks/{promo-banner.DDnJwMDC.js → promo-banner.DgCKKp6o.js} +6 -6
- package/dist/chunks/{promo-banner.DDnJwMDC.js.map → promo-banner.DgCKKp6o.js.map} +1 -1
- package/dist/chunks/{radio-group.BvswbJa8.js → radio-group.WbbrQhEO.js} +4 -4
- package/dist/chunks/{radio-group.BvswbJa8.js.map → radio-group.WbbrQhEO.js.map} +1 -1
- package/dist/chunks/{search-bar.kKLreEXo.js → search-bar.CFKWbNeA.js} +3 -3
- package/dist/chunks/{search-bar.kKLreEXo.js.map → search-bar.CFKWbNeA.js.map} +1 -1
- package/dist/chunks/{secondary-nav.C6bfsK2p.js → secondary-nav.C0gPD0MR.js} +3 -3
- package/dist/chunks/{secondary-nav.C6bfsK2p.js.map → secondary-nav.C0gPD0MR.js.map} +1 -1
- package/dist/chunks/{segmented-control.BywW3ont.js → segmented-control.DGNMY2BP.js} +2 -2
- package/dist/chunks/{segmented-control.BywW3ont.js.map → segmented-control.DGNMY2BP.js.map} +1 -1
- package/dist/chunks/{selection-card-group.Ca4G00h5.js → selection-card-group.BmKUEuny.js} +11 -11
- package/dist/chunks/{selection-card-group.Ca4G00h5.js.map → selection-card-group.BmKUEuny.js.map} +1 -1
- package/dist/chunks/{sidepanel.D4H3Vu0m.js → sidepanel.CyhG1nQR.js} +3 -3
- package/dist/chunks/{sidepanel.D4H3Vu0m.js.map → sidepanel.CyhG1nQR.js.map} +1 -1
- package/dist/chunks/{structured-list-item.Bv8reTz2.js → structured-list-item.Co5P9bFC.js} +4 -4
- package/dist/chunks/{structured-list-item.Bv8reTz2.js.map → structured-list-item.Co5P9bFC.js.map} +1 -1
- package/dist/chunks/summary-grid.types.egM7irBt.js +295 -0
- package/dist/chunks/summary-grid.types.egM7irBt.js.map +1 -0
- package/dist/chunks/tabs.C8CgvNt4.js +214 -0
- package/dist/chunks/tabs.C8CgvNt4.js.map +1 -0
- package/dist/chunks/{tag.IyMxowGc.js → tag.CyspYb1E.js} +2 -2
- package/dist/chunks/{tag.IyMxowGc.js.map → tag.CyspYb1E.js.map} +1 -1
- package/dist/chunks/{textarea.B9HjT5LH.js → textarea.CC8esIW6.js} +75 -71
- package/dist/chunks/textarea.CC8esIW6.js.map +1 -0
- package/dist/chunks/{timeline-item.BIwk0vqM.js → timeline-item.Byorbxmc.js} +5 -5
- package/dist/chunks/{timeline-item.BIwk0vqM.js.map → timeline-item.Byorbxmc.js.map} +1 -1
- package/dist/chunks/{tooltip.DShIiBiY.js → tooltip.DOvci5lX.js} +2 -2
- package/dist/chunks/{tooltip.DShIiBiY.js.map → tooltip.DOvci5lX.js.map} +1 -1
- package/dist/chunks/{tutorial.DDlXTjAO.js → tutorial.QwHbq1FO.js} +5 -5
- package/dist/chunks/{tutorial.DDlXTjAO.js.map → tutorial.QwHbq1FO.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.LVldNial.js → use-cached-selected-values.DHpjo2tV.js} +26 -26
- package/dist/chunks/{use-cached-selected-values.LVldNial.js.map → use-cached-selected-values.DHpjo2tV.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/dropdown.js +3 -3
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +49 -49
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +10 -10
- package/dist/layout.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +42 -16
- package/dist/styles/bento-light.css +42 -16
- package/dist/styles/bento.css +42 -16
- package/dist/styles/legacy.css +30 -4
- package/dist/styles/styleguide.css +42 -16
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +5535 -5431
- package/package.json +5 -5
- package/dist/assets/summary-grid-item-custom.css +0 -1
- package/dist/chunks/checkbox.l7h6GYew.js.map +0 -1
- package/dist/chunks/data-grid.C_Xoz-GC.js.map +0 -1
- package/dist/chunks/file-uploader.CcZPr-jD.js.map +0 -1
- package/dist/chunks/filter-bar.BdGtQC7p.js.map +0 -1
- package/dist/chunks/input-field-password.CZn4kW8v.js +0 -198
- package/dist/chunks/input-field-password.CZn4kW8v.js.map +0 -1
- package/dist/chunks/inspector.types.A0b4jNO3.js +0 -101
- package/dist/chunks/inspector.types.A0b4jNO3.js.map +0 -1
- package/dist/chunks/payment-method.NZKiNOmM.js.map +0 -1
- package/dist/chunks/payment-method.types.CJKfZQN5.js +0 -5
- package/dist/chunks/payment-method.types.CJKfZQN5.js.map +0 -1
- package/dist/chunks/summary-grid-item-custom.Bbdie4EL.js +0 -631
- package/dist/chunks/summary-grid-item-custom.Bbdie4EL.js.map +0 -1
- package/dist/chunks/tabs.UFoTqvew.js +0 -154
- package/dist/chunks/tabs.UFoTqvew.js.map +0 -1
- package/dist/chunks/textarea.B9HjT5LH.js.map +0 -1
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { defineComponent as a, useSlots as i, onMounted as I, provide as h, toRef as B, toRefs as D, inject as R, ref as G, computed as s } from "vue";
|
|
2
|
+
import { u } from "./use-has-slot.C9lQZ6nz.js";
|
|
3
|
+
import { S as M, a as x } from "./summary-grid.keys.CxTf_FOc.js";
|
|
4
|
+
import { G as k } from "./grid-layout.HvTAa4to.js";
|
|
5
|
+
import { n as d } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
|
+
import { B as w } from "./dashed-underline.BbQIbZfu.js";
|
|
7
|
+
import { B as L } from "./info-icon.J62KXp9I.js";
|
|
8
|
+
import { B as E } from "./typography.J1v_SPG3.js";
|
|
9
|
+
import { B as z } from "./tag.CyspYb1E.js";
|
|
10
|
+
import { C as P } from "./copy.k18tXmP1.js";
|
|
11
|
+
import "../assets/summary-grid.css";
|
|
12
|
+
const A = {}, U = /* @__PURE__ */ a({
|
|
13
|
+
...A,
|
|
14
|
+
__name: "summary-grid",
|
|
15
|
+
props: {
|
|
16
|
+
columnWidth: { default: null },
|
|
17
|
+
slashedZero: { type: Boolean, default: !1 }
|
|
18
|
+
},
|
|
19
|
+
setup(r) {
|
|
20
|
+
var _, c;
|
|
21
|
+
const t = r, n = i(), e = u(n);
|
|
22
|
+
let o = 1;
|
|
23
|
+
if (n) {
|
|
24
|
+
const y = (c = (_ = Object.keys(n)) == null ? void 0 : _.filter((p) => p.includes("cell-"))) == null ? void 0 : c.map((p) => {
|
|
25
|
+
var f;
|
|
26
|
+
return parseInt((f = p.split("-")) == null ? void 0 : f[1], 10);
|
|
27
|
+
});
|
|
28
|
+
o = Math.max(...y);
|
|
29
|
+
}
|
|
30
|
+
I(() => {
|
|
31
|
+
if (o > 3)
|
|
32
|
+
throw new Error(
|
|
33
|
+
"BentoSummaryGrid must only have a maximum of 3 rows. Read the documentation for more information."
|
|
34
|
+
);
|
|
35
|
+
});
|
|
36
|
+
const l = () => ({ isSummaryGridLayout: !0 });
|
|
37
|
+
return h(M, l), h(x, B(t, "slashedZero")), { __sfc: !0, props: t, slots: n, hasSlot: e, numberOfRows: o, registerComponentsInSummaryGrid: l, GridLayout: k };
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
var F = function() {
|
|
41
|
+
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
42
|
+
return n("div", { staticClass: "b-summary-grid" }, t._l(e.numberOfRows, function(o) {
|
|
43
|
+
var l;
|
|
44
|
+
return n(e.GridLayout, { key: `summary-grid-row-${o}`, attrs: { "data-testid": `summary-grid-row-${o}`, "column-width": (l = t.columnWidth) == null ? void 0 : l[`row${o}`] }, scopedSlots: t._u([e.hasSlot(`cell-${o}-1`) ? { key: "col-1", fn: function() {
|
|
45
|
+
return [t._t(`cell-${o}-1`)];
|
|
46
|
+
}, proxy: !0 } : null, e.hasSlot(`cell-${o}-2`) ? { key: "col-2", fn: function() {
|
|
47
|
+
return [t._t(`cell-${o}-2`)];
|
|
48
|
+
}, proxy: !0 } : null, e.hasSlot(`cell-${o}-3`) ? { key: "col-3", fn: function() {
|
|
49
|
+
return [t._t(`cell-${o}-3`)];
|
|
50
|
+
}, proxy: !0 } : null, e.hasSlot(`cell-${o}-4`) ? { key: "col-4", fn: function() {
|
|
51
|
+
return [t._t(`cell-${o}-4`)];
|
|
52
|
+
}, proxy: !0 } : null, e.hasSlot(`cell-${o}-5`) ? { key: "col-5", fn: function() {
|
|
53
|
+
return [t._t(`cell-${o}-5`)];
|
|
54
|
+
}, proxy: !0 } : null, e.hasSlot(`cell-${o}-6`) ? { key: "col-6", fn: function() {
|
|
55
|
+
return [t._t(`cell-${o}-6`)];
|
|
56
|
+
}, proxy: !0 } : null], null, !0) });
|
|
57
|
+
}), 1);
|
|
58
|
+
}, O = [], V = /* @__PURE__ */ d(
|
|
59
|
+
U,
|
|
60
|
+
F,
|
|
61
|
+
O,
|
|
62
|
+
!1,
|
|
63
|
+
null,
|
|
64
|
+
"397e4d9c"
|
|
65
|
+
);
|
|
66
|
+
const Mt = V.exports, N = {}, Y = /* @__PURE__ */ a({
|
|
67
|
+
...N,
|
|
68
|
+
__name: "summary-grid-item",
|
|
69
|
+
props: {
|
|
70
|
+
copy: { default: void 0 },
|
|
71
|
+
fitContent: { type: Boolean, default: !1 },
|
|
72
|
+
infoIconTooltipText: { default: null },
|
|
73
|
+
size: { default: "small" },
|
|
74
|
+
title: null,
|
|
75
|
+
trend: { default: null },
|
|
76
|
+
trendDirection: { default: "positive" },
|
|
77
|
+
secondaryTrend: { default: null },
|
|
78
|
+
secondaryTrendDirection: { default: "positive" },
|
|
79
|
+
underlineTooltipText: { default: null },
|
|
80
|
+
itemType: { default: "custom" }
|
|
81
|
+
},
|
|
82
|
+
setup(r) {
|
|
83
|
+
const t = r, { trendDirection: n, secondaryTrendDirection: e, itemType: o, size: l } = D(t), _ = R(x, G(!1)), c = (C) => {
|
|
84
|
+
switch (C) {
|
|
85
|
+
case "positive":
|
|
86
|
+
return "green";
|
|
87
|
+
case "negative":
|
|
88
|
+
return "red";
|
|
89
|
+
default:
|
|
90
|
+
return "blue";
|
|
91
|
+
}
|
|
92
|
+
}, y = s(() => c(n.value)), p = s(() => c(e.value)), f = s(() => l.value === "small" ? "body" : o.value !== "text" ? "title" : null), g = s(() => ({
|
|
93
|
+
medium: l.value === "large",
|
|
94
|
+
strongest: l.value === "small",
|
|
95
|
+
wide: l.value === "small",
|
|
96
|
+
variant: f.value
|
|
97
|
+
})), $ = s(() => t.fitContent ? { width: "fit-content" } : {}), b = s(() => ({ "b-summary-grid-item--slashed-zero": _.value })), v = i(), T = u(v), S = s(() => t.underlineTooltipText || T("dashed-underline"));
|
|
98
|
+
return { __sfc: !0, props: t, trendDirection: n, secondaryTrendDirection: e, itemType: o, size: l, hasSlashedZero: _, tagVariantColor: c, trendVariant: y, secondaryTrendVariant: p, typographyContentElement: f, typographyProps: g, computedStyles: $, conditionalClasses: b, slots: v, hasSlot: T, withUnderline: S, BentoDashedUnderline: w, BentoInfoIcon: L, BentoTypography: E, BentoTag: z, Copy: P };
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
var Z = function() {
|
|
102
|
+
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
103
|
+
return n("div", { staticClass: "b-summary-grid-item", class: e.conditionalClasses, style: e.computedStyles }, [n("div", { staticClass: "b-summary-grid-item__header" }, [n(e.BentoTypography, { staticClass: "b-summary-grid-item__title", attrs: { el: "span", variant: "body" } }, [e.withUnderline ? n(e.BentoDashedUnderline, { attrs: { "tooltip-text": t.underlineTooltipText }, scopedSlots: t._u([e.hasSlot("dashed-underline") ? { key: "popover-content", fn: function() {
|
|
104
|
+
return [t._t("dashed-underline")];
|
|
105
|
+
}, proxy: !0 } : null], null, !0) }, [t._v(" " + t._s(t.title) + " ")]) : [t._v(" " + t._s(t.title) + " ")]], 2), n("div", { staticClass: "b-summary-grid-item__title-icons" }, [t.copy ? n(e.Copy, { staticClass: "b-structured-list__icon", attrs: { text: t.copy } }) : t._e(), t.infoIconTooltipText ? n(e.BentoInfoIcon, { staticClass: "b-summary-grid-item__title-tooltip", attrs: { "tooltip-text": t.infoIconTooltipText, "tooltip-position": "top" } }) : t._e()], 1)], 1), n(e.BentoTypography, t._b({ staticClass: "b-summary-grid-item__title", attrs: { "data-testid": "summary-grid-item-content-typography", el: "span" } }, "bento-typography", e.typographyProps, !1), [t._t("default"), t.trend && e.itemType !== "text" ? n(e.BentoTag, { staticClass: "b-summary-grid-item__content-trend", attrs: { variant: e.trendVariant, label: t.trend } }) : t._e()], 2), e.hasSlot("secondary") ? n(e.BentoTypography, { staticClass: "b-summary-grid-item__title", attrs: { "data-testid": "summary-grid-item-secondary-metric-typography", el: "span", variant: "caption", stronger: "" } }, [t._t("secondary"), t.secondaryTrend ? n(e.BentoTag, { staticClass: "b-summary-grid-item__content-trend", attrs: { variant: e.secondaryTrendVariant, label: t.secondaryTrend } }) : t._e()], 2) : t._e()], 1);
|
|
106
|
+
}, j = [], H = /* @__PURE__ */ d(
|
|
107
|
+
Y,
|
|
108
|
+
Z,
|
|
109
|
+
j,
|
|
110
|
+
!1,
|
|
111
|
+
null,
|
|
112
|
+
"55342bfd"
|
|
113
|
+
);
|
|
114
|
+
const m = H.exports, W = {}, J = /* @__PURE__ */ a({
|
|
115
|
+
...W,
|
|
116
|
+
__name: "summary-grid-item-amount",
|
|
117
|
+
props: {
|
|
118
|
+
copy: { default: void 0 },
|
|
119
|
+
fitContent: { type: Boolean, default: !1 },
|
|
120
|
+
infoIconTooltipText: { default: null },
|
|
121
|
+
size: { default: "small" },
|
|
122
|
+
title: null,
|
|
123
|
+
trend: { default: null },
|
|
124
|
+
trendDirection: { default: "positive" },
|
|
125
|
+
secondaryTrend: { default: null },
|
|
126
|
+
secondaryTrendDirection: { default: "positive" },
|
|
127
|
+
underlineTooltipText: { default: null },
|
|
128
|
+
label: null,
|
|
129
|
+
secondaryLabel: { default: null },
|
|
130
|
+
secondaryMetric: { default: null }
|
|
131
|
+
},
|
|
132
|
+
setup(r) {
|
|
133
|
+
const t = i(), n = u(t);
|
|
134
|
+
return { __sfc: !0, slots: t, hasSlot: n, SummaryGridItem: m };
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
var K = function() {
|
|
138
|
+
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
139
|
+
return n(e.SummaryGridItem, { staticClass: "b-summary-grid-item-amount", attrs: { "item-type": "amount", "info-icon-tooltip-text": t.infoIconTooltipText, title: t.title, copy: t.copy, "fit-content": t.fitContent, size: t.size, trend: t.trend, "trend-direction": t.trendDirection, "secondary-trend": t.secondaryTrend, "secondary-trend-direction": t.secondaryTrendDirection, "underline-tooltip-text": t.underlineTooltipText }, scopedSlots: t._u([e.hasSlot("dashed-underline") ? { key: "dashed-underline", fn: function() {
|
|
140
|
+
return [t._t("dashed-underline")];
|
|
141
|
+
}, proxy: !0 } : null, t.secondaryMetric ? { key: "secondary", fn: function() {
|
|
142
|
+
return [t._v(" " + t._s(t.secondaryMetric) + " ")];
|
|
143
|
+
}, proxy: !0 } : null], null, !0) }, [n("div", { staticClass: "b-summary-grid-item-amount__content" }, [n("div", [t._v(t._s(t.label))]), t.secondaryLabel ? n("div", { staticClass: "b-summary-grid-item-amount__secondary-label" }, [t._v(t._s(t.secondaryLabel))]) : t._e()])]);
|
|
144
|
+
}, q = [], Q = /* @__PURE__ */ d(
|
|
145
|
+
J,
|
|
146
|
+
K,
|
|
147
|
+
q,
|
|
148
|
+
!1,
|
|
149
|
+
null,
|
|
150
|
+
"33f45b74"
|
|
151
|
+
);
|
|
152
|
+
const kt = Q.exports, X = {}, tt = /* @__PURE__ */ a({
|
|
153
|
+
...X,
|
|
154
|
+
__name: "summary-grid-item-numeric",
|
|
155
|
+
props: {
|
|
156
|
+
copy: { default: void 0 },
|
|
157
|
+
fitContent: { type: Boolean, default: !1 },
|
|
158
|
+
infoIconTooltipText: { default: null },
|
|
159
|
+
size: { default: "small" },
|
|
160
|
+
title: null,
|
|
161
|
+
trend: { default: null },
|
|
162
|
+
trendDirection: { default: "positive" },
|
|
163
|
+
secondaryTrend: { default: null },
|
|
164
|
+
secondaryTrendDirection: { default: "positive" },
|
|
165
|
+
underlineTooltipText: { default: null },
|
|
166
|
+
label: null,
|
|
167
|
+
secondaryMetric: { default: null }
|
|
168
|
+
},
|
|
169
|
+
setup(r) {
|
|
170
|
+
const t = i(), n = u(t);
|
|
171
|
+
return { __sfc: !0, slots: t, hasSlot: n, SummaryGridItem: m };
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
var et = function() {
|
|
175
|
+
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
176
|
+
return n(e.SummaryGridItem, { staticClass: "b-summary-grid-item-numeric", attrs: { "item-type": "numeric", "info-icon-tooltip-text": t.infoIconTooltipText, title: t.title, copy: t.copy, "fit-content": t.fitContent, size: t.size, trend: t.trend, "trend-direction": t.trendDirection, "secondary-trend": t.secondaryTrend, "secondary-trend-direction": t.secondaryTrendDirection, "underline-tooltip-text": t.underlineTooltipText }, scopedSlots: t._u([e.hasSlot("dashed-underline") ? { key: "dashed-underline", fn: function() {
|
|
177
|
+
return [t._t("dashed-underline")];
|
|
178
|
+
}, proxy: !0 } : null, t.secondaryMetric ? { key: "secondary", fn: function() {
|
|
179
|
+
return [t._v(" " + t._s(t.secondaryMetric) + " ")];
|
|
180
|
+
}, proxy: !0 } : null], null, !0) }, [t._v(" " + t._s(t.label) + " ")]);
|
|
181
|
+
}, nt = [], rt = /* @__PURE__ */ d(
|
|
182
|
+
tt,
|
|
183
|
+
et,
|
|
184
|
+
nt,
|
|
185
|
+
!1,
|
|
186
|
+
null,
|
|
187
|
+
null
|
|
188
|
+
);
|
|
189
|
+
const wt = rt.exports, ot = {}, lt = /* @__PURE__ */ a({
|
|
190
|
+
...ot,
|
|
191
|
+
__name: "summary-grid-item-percentage",
|
|
192
|
+
props: {
|
|
193
|
+
copy: { default: void 0 },
|
|
194
|
+
fitContent: { type: Boolean, default: !1 },
|
|
195
|
+
infoIconTooltipText: { default: null },
|
|
196
|
+
size: { default: "small" },
|
|
197
|
+
title: null,
|
|
198
|
+
trend: { default: null },
|
|
199
|
+
trendDirection: { default: "positive" },
|
|
200
|
+
secondaryTrend: { default: null },
|
|
201
|
+
secondaryTrendDirection: { default: "positive" },
|
|
202
|
+
underlineTooltipText: { default: null },
|
|
203
|
+
label: null,
|
|
204
|
+
secondaryMetric: { default: null }
|
|
205
|
+
},
|
|
206
|
+
setup(r) {
|
|
207
|
+
const t = i(), n = u(t);
|
|
208
|
+
return { __sfc: !0, slots: t, hasSlot: n, SummaryGridItem: m };
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
var st = function() {
|
|
212
|
+
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
213
|
+
return n(e.SummaryGridItem, { staticClass: "b-summary-grid-item-percentage", attrs: { "item-type": "percentage", "info-icon-tooltip-text": t.infoIconTooltipText, title: t.title, copy: t.copy, "fit-content": t.fitContent, size: t.size, trend: t.trend, "trend-direction": t.trendDirection, "secondary-trend": t.secondaryTrend, "secondary-trend-direction": t.secondaryTrendDirection, "underline-tooltip-text": t.underlineTooltipText }, scopedSlots: t._u([e.hasSlot("dashed-underline") ? { key: "dashed-underline", fn: function() {
|
|
214
|
+
return [t._t("dashed-underline")];
|
|
215
|
+
}, proxy: !0 } : null, t.secondaryMetric ? { key: "secondary", fn: function() {
|
|
216
|
+
return [t._v(" " + t._s(t.secondaryMetric) + "% ")];
|
|
217
|
+
}, proxy: !0 } : null], null, !0) }, [t._v(" " + t._s(t.label) + "% ")]);
|
|
218
|
+
}, at = [], it = /* @__PURE__ */ d(
|
|
219
|
+
lt,
|
|
220
|
+
st,
|
|
221
|
+
at,
|
|
222
|
+
!1,
|
|
223
|
+
null,
|
|
224
|
+
null
|
|
225
|
+
);
|
|
226
|
+
const Lt = it.exports, ut = {}, dt = /* @__PURE__ */ a({
|
|
227
|
+
...ut,
|
|
228
|
+
__name: "summary-grid-item-text",
|
|
229
|
+
props: {
|
|
230
|
+
copy: { default: void 0 },
|
|
231
|
+
fitContent: { type: Boolean, default: !1 },
|
|
232
|
+
infoIconTooltipText: { default: null },
|
|
233
|
+
label: null,
|
|
234
|
+
title: null,
|
|
235
|
+
underlineTooltipText: { default: null }
|
|
236
|
+
},
|
|
237
|
+
setup(r) {
|
|
238
|
+
const t = i(), n = u(t);
|
|
239
|
+
return { __sfc: !0, slots: t, hasSlot: n, SummaryGridItem: m };
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
var ct = function() {
|
|
243
|
+
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
244
|
+
return n(e.SummaryGridItem, { staticClass: "b-summary-grid-item-text", attrs: { "item-type": "text", "info-icon-tooltip-text": t.infoIconTooltipText, title: t.title, copy: t.copy, "fit-content": t.fitContent, "underline-tooltip-text": t.underlineTooltipText }, scopedSlots: t._u([e.hasSlot("dashed-underline") ? { key: "dashed-underline", fn: function() {
|
|
245
|
+
return [t._t("dashed-underline")];
|
|
246
|
+
}, proxy: !0 } : null], null, !0) }, [t._v(" " + t._s(t.label) + " ")]);
|
|
247
|
+
}, _t = [], pt = /* @__PURE__ */ d(
|
|
248
|
+
dt,
|
|
249
|
+
ct,
|
|
250
|
+
_t,
|
|
251
|
+
!1,
|
|
252
|
+
null,
|
|
253
|
+
null
|
|
254
|
+
);
|
|
255
|
+
const Et = pt.exports, ft = {}, mt = /* @__PURE__ */ a({
|
|
256
|
+
...ft,
|
|
257
|
+
__name: "summary-grid-item-custom",
|
|
258
|
+
props: {
|
|
259
|
+
copy: { default: void 0 },
|
|
260
|
+
infoIconTooltipText: { default: null },
|
|
261
|
+
title: null,
|
|
262
|
+
fitContent: { type: Boolean, default: !1 },
|
|
263
|
+
underlineTooltipText: { default: null }
|
|
264
|
+
},
|
|
265
|
+
setup(r) {
|
|
266
|
+
const t = i(), n = u(t);
|
|
267
|
+
return { __sfc: !0, slots: t, hasSlot: n, SummaryGridItem: m };
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
var yt = function() {
|
|
271
|
+
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
272
|
+
return n(e.SummaryGridItem, { attrs: { title: t.title, "info-icon-tooltip-text": t.infoIconTooltipText, copy: t.copy, "fit-content": t.fitContent, "underline-tooltip-text": t.underlineTooltipText }, scopedSlots: t._u([e.hasSlot("dashed-underline") ? { key: "dashed-underline", fn: function() {
|
|
273
|
+
return [t._t("dashed-underline")];
|
|
274
|
+
}, proxy: !0 } : null], null, !0) }, [t._t("default")], 2);
|
|
275
|
+
}, vt = [], Tt = /* @__PURE__ */ d(
|
|
276
|
+
mt,
|
|
277
|
+
yt,
|
|
278
|
+
vt,
|
|
279
|
+
!1,
|
|
280
|
+
null,
|
|
281
|
+
null
|
|
282
|
+
);
|
|
283
|
+
const zt = Tt.exports;
|
|
284
|
+
var ht = /* @__PURE__ */ ((r) => (r.SMALL = "small", r.MEDIUM = "medium", r.LARGE = "large", r))(ht || {}), xt = /* @__PURE__ */ ((r) => (r.POSITIVE = "positive", r.NEGATIVE = "negative", r.NEUTRAL = "neutral", r))(xt || {});
|
|
285
|
+
export {
|
|
286
|
+
ht as B,
|
|
287
|
+
kt as a,
|
|
288
|
+
wt as b,
|
|
289
|
+
Lt as c,
|
|
290
|
+
Et as d,
|
|
291
|
+
zt as e,
|
|
292
|
+
xt as f,
|
|
293
|
+
Mt as s
|
|
294
|
+
};
|
|
295
|
+
//# sourceMappingURL=summary-grid.types.egM7irBt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary-grid.types.egM7irBt.js","sources":["../../src/components/summary-grid/summary-grid.vue","../../src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue","../../src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue","../../src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue","../../src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue","../../src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue","../../src/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue","../../src/components/summary-grid/summary-grid.types.ts"],"sourcesContent":["<template>\n <div class=\"b-summary-grid\">\n <grid-layout\n v-for=\"index in numberOfRows\"\n :key=\"`summary-grid-row-${index}`\"\n :data-testid=\"`summary-grid-row-${index}`\"\n :column-width=\"columnWidth?.[`row${index}`]\"\n >\n <template v-if=\"hasSlot(`cell-${index}-1`)\" #col-1>\n <slot :name=\"`cell-${index}-1`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-2`)\" #col-2>\n <slot :name=\"`cell-${index}-2`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-3`)\" #col-3>\n <slot :name=\"`cell-${index}-3`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-4`)\" #col-4>\n <slot :name=\"`cell-${index}-4`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-5`)\" #col-5>\n <slot :name=\"`cell-${index}-5`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-6`)\" #col-6>\n <slot :name=\"`cell-${index}-6`\" />\n </template>\n </grid-layout>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { onMounted, provide, toRef, useSlots } from 'vue';\n import type { BentoSummaryGridLayout, BentoSummaryGridProps } from './summary-grid.types';\n import { GridLayout } from '@/components/internal';\n import { useHasSlot } from '@/composables';\n import {\n SUMMARY_GRID_LAYOUT_INJECTION_KEY,\n SUMMARY_GRID_SLASHED_ZERO,\n } from '@/components/summary-grid/summary-grid.keys';\n\n const props = defineProps({\n columnWidth: { default: null },\n slashedZero: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n let numberOfRows = 1;\n if (slots) {\n const slotRows = Object.keys(slots)\n ?.filter(slotName => slotName.includes('cell-'))\n ?.map(slotName => parseInt(slotName.split('-')?.[1], 10));\n numberOfRows = Math.max(...slotRows);\n }\n\n onMounted(() => {\n if (numberOfRows > 3) {\n throw new Error(\n 'BentoSummaryGrid must only have a maximum of 3 rows. Read the documentation for more information.'\n );\n }\n });\n\n const registerComponentsInSummaryGrid: BentoSummaryGridLayout = () => {\n const isSummaryGridLayout = true;\n return { isSummaryGridLayout };\n };\n\n provide(SUMMARY_GRID_LAYOUT_INJECTION_KEY, registerComponentsInSummaryGrid);\n provide(SUMMARY_GRID_SLASHED_ZERO, toRef(props, 'slashedZero'));\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary grid component that displays a collection items.\n *\n * @example\n * import { BentoSummaryGrid, BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGrid, BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid>\n * <template #cell-2-2>\n * <bento-summary-grid-item-amount\n * title=\"Text Item\"\n * label=\"14\"\n * info-icon-tooltip-text=\"text for icon\"\n * copy=\"copy this to clipboard\"\n * />\n * </template>\n * </bento-summary-grid>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid.scss\" />\n","<template>\n <div class=\"b-summary-grid-item\" :class=\"conditionalClasses\" :style=\"computedStyles\">\n <div class=\"b-summary-grid-item__header\">\n <bento-typography class=\"b-summary-grid-item__title\" el=\"span\" variant=\"body\">\n <bento-dashed-underline v-if=\"withUnderline\" :tooltip-text=\"underlineTooltipText\">\n {{ title }}\n <template v-if=\"hasSlot('dashed-underline')\" #popover-content>\n <slot name=\"dashed-underline\"></slot>\n </template>\n </bento-dashed-underline>\n <template v-else>\n {{ title }}\n </template>\n </bento-typography>\n <div class=\"b-summary-grid-item__title-icons\">\n <copy v-if=\"copy\" class=\"b-structured-list__icon\" :text=\"copy\" />\n\n <bento-info-icon\n v-if=\"infoIconTooltipText\"\n :tooltip-text=\"infoIconTooltipText\"\n tooltip-position=\"top\"\n class=\"b-summary-grid-item__title-tooltip\"\n />\n </div>\n </div>\n <bento-typography\n data-testid=\"summary-grid-item-content-typography\"\n class=\"b-summary-grid-item__title\"\n v-bind=\"typographyProps\"\n el=\"span\"\n >\n <slot />\n <bento-tag\n v-if=\"trend && itemType !== 'text'\"\n :variant=\"trendVariant\"\n :label=\"trend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('secondary')\"\n class=\"b-summary-grid-item__title\"\n data-testid=\"summary-grid-item-secondary-metric-typography\"\n el=\"span\"\n variant=\"caption\"\n stronger\n >\n <slot name=\"secondary\" />\n <bento-tag\n v-if=\"secondaryTrend\"\n :variant=\"secondaryTrendVariant\"\n :label=\"secondaryTrend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, toRefs, useSlots } from 'vue';\n\n // Components\n import { BentoDashedUnderline } from '@/components/dashed-underline';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography, type BentoTypographyVariant } from '@/components/typography';\n import { BentoTag, type BentoTagVariant } from '@/components/tag';\n import { Copy } from '@/internal';\n\n // Utils\n import { useHasSlot } from '@/composables';\n\n // Types\n import { SUMMARY_GRID_SLASHED_ZERO } from '@/components/summary-grid/summary-grid.keys';\n import type { BentoSummaryGridItemTrendDirection } from '@/components/summary-grid/summary-grid.types';\n import type { BentoSummaryGridItemProps } from './summary-grid-item.types';\n\n const props = defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlineTooltipText: { default: null },\n itemType: { default: 'custom' }\n});\n\n const { trendDirection, secondaryTrendDirection, itemType, size } = toRefs(props);\n const hasSlashedZero = inject(SUMMARY_GRID_SLASHED_ZERO, ref(false));\n\n const tagVariantColor = (direction: `${BentoSummaryGridItemTrendDirection}`): `${BentoTagVariant}` => {\n switch (direction) {\n case 'positive':\n return 'green';\n case 'negative':\n return 'red';\n default:\n return 'blue';\n }\n };\n\n // TODO implement plus or minus symbol logic\n const trendVariant = computed(() => tagVariantColor(trendDirection.value));\n const secondaryTrendVariant = computed(() => tagVariantColor(secondaryTrendDirection.value));\n\n const typographyContentElement = computed<`${BentoTypographyVariant}`>(() => {\n if (size.value === 'small') {\n return 'body';\n }\n if (itemType.value !== 'text') {\n return 'title';\n }\n\n return null;\n });\n\n const typographyProps = computed(() => ({\n medium: size.value === 'large',\n strongest: size.value === 'small',\n wide: size.value === 'small',\n variant: typographyContentElement.value,\n }));\n\n const computedStyles = computed(() => (props.fitContent ? { width: 'fit-content' } : {}));\n\n const conditionalClasses = computed(() => ({ 'b-summary-grid-item--slashed-zero': hasSlashedZero.value }));\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const withUnderline = computed(() => props.underlineTooltipText || hasSlot('dashed-underline'));\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"amount\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-amount\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n <div class=\"b-summary-grid-item-amount__content\">\n <div>{{ label }}</div>\n <div v-if=\"secondaryLabel\" class=\"b-summary-grid-item-amount__secondary-label\">{{ secondaryLabel }}</div>\n </div>\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemAmountProps } from './summary-grid-item-amount.types';\n\n defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlineTooltipText: { default: null },\n label: null,\n secondaryLabel: { default: null },\n secondaryMetric: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display financial data, such as currency values and monetary amounts\n *\n * @example\n * import { BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid-item-amount\n * title=\"Your title\"\n * label=\"200.00 EUR\"\n * secondary-label=\"/ day\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item-amount.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"numeric\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-numeric\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemNumericProps } from './summary-grid-item-numeric.types';\n\n defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlineTooltipText: { default: null },\n label: null,\n secondaryMetric: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display any numeric information\n *\n * @example\n * import { BentoSummaryGridItemNumeric } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemNumeric },\n * template: `\n * <bento-summary-grid-item-numeric\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n item-type=\"percentage\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-percentage\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}%\n <template v-if=\"secondaryMetric\" #secondary> {{ secondaryMetric }}% </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemPercentageProps } from './summary-grid-item-percentage.types';\n\n defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlineTooltipText: { default: null },\n label: null,\n secondaryMetric: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display any percentage information\n *\n * @example\n * import { BentoSummaryGridItemPercentage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemPercentage },\n * template: `\n * <bento-summary-grid-item-percentage\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n item-type=\"text\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-text\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n\n import type { BentoSummaryGridItemTextProps } from './summary-grid-item-text.types';\n\n defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n label: null,\n title: null,\n underlineTooltipText: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display text only. Can be used for references, IDs or any other text data.\n *\n * @example\n * import { BentoSummaryGridItemText } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemText },\n * template: `\n * <bento-summary-grid-item-text\n * title=\"Your title\"\n * label=\"Your text here\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n :title=\"title\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :underline-tooltip-text=\"underlineTooltipText\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n <slot />\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import SummaryGridItem from '../summary-grid-item/summary-grid-item.vue';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemCustomProps } from './summary-grid-item-custom.types';\n\n defineProps({\n copy: { default: undefined },\n infoIconTooltipText: { default: null },\n title: null,\n fitContent: { type: Boolean, default: false },\n underlineTooltipText: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default {};\n</script>\n","import { GridLayoutColumnWidths } from '@/components/internal/grid-layout/grid-layout.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoSummaryGridItemSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoSummaryGridItemTrendDirection {\n POSITIVE = 'positive',\n NEGATIVE = 'negative',\n NEUTRAL = 'neutral',\n}\n\nexport interface BentoSummaryGridColumnWidth {\n row1: GridLayoutColumnWidths;\n row2?: GridLayoutColumnWidths;\n row3?: GridLayoutColumnWidths;\n}\n\nexport type BentoSummaryGridLayout = () => {\n isSummaryGridLayout: boolean;\n};\n\nexport interface BentoSummaryGridProps {\n /**\n * Sets the responsive columns widths values for 1 of the 3 rows.\n */\n columnWidth?: BentoSummaryGridColumnWidth;\n\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero?: boolean;\n}\n"],"names":["__default__$6","slots","useSlots","hasSlot","useHasSlot","numberOfRows","slotRows","_b","_a","slotName","onMounted","registerComponentsInSummaryGrid","provide","SUMMARY_GRID_LAYOUT_INJECTION_KEY","SUMMARY_GRID_SLASHED_ZERO","toRef","props","__default__$5","trendDirection","secondaryTrendDirection","itemType","size","toRefs","hasSlashedZero","inject","ref","tagVariantColor","direction","trendVariant","computed","secondaryTrendVariant","typographyContentElement","typographyProps","computedStyles","conditionalClasses","withUnderline","__default__$4","__default__$3","__default__$2","__default__$1","__default__","BentoSummaryGridItemSize","BentoSummaryGridItemSize2","BentoSummaryGridItemTrendDirection","BentoSummaryGridItemTrendDirection2"],"mappings":";;;;;;;;;;;AAgGI,MAAAA,IAAA,CAAA;;;;;;;;;iBA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nmounted as k, watch as w, nextTick as x, onMounted as L } from "vue";
|
|
2
|
+
import { E as F, T as A, a as N } from "./tabs.keys.Bc2pSKRw.js";
|
|
3
|
+
import { n as B } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
4
|
+
import { B as P } from "./typography.J1v_SPG3.js";
|
|
5
|
+
import { g as W } from "./generate-uid.NJ8tVoha.js";
|
|
6
|
+
import { F as X } from "./fixed-scroller.BwvXYzE6.js";
|
|
7
|
+
import "../assets/tabs.css";
|
|
8
|
+
const Y = E({
|
|
9
|
+
props: {
|
|
10
|
+
/**
|
|
11
|
+
* Displays a counter next to the tab title
|
|
12
|
+
*/
|
|
13
|
+
counter: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: null
|
|
16
|
+
},
|
|
17
|
+
/**
|
|
18
|
+
* Title of the tab
|
|
19
|
+
*/
|
|
20
|
+
title: {
|
|
21
|
+
type: String,
|
|
22
|
+
required: !0
|
|
23
|
+
},
|
|
24
|
+
/**
|
|
25
|
+
* Determines whether the tab is disabled
|
|
26
|
+
*/
|
|
27
|
+
disabled: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !1
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* Displays the tab with a notification indicator
|
|
33
|
+
*/
|
|
34
|
+
withNotificationIndicator: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
setup(s) {
|
|
40
|
+
const { disabled: t, withNotificationIndicator: e, counter: d } = K(s), n = _();
|
|
41
|
+
T(F, (f) => {
|
|
42
|
+
n.value = f;
|
|
43
|
+
});
|
|
44
|
+
const o = y(() => n.value ?? s.title), l = C(A), c = C(N), { id: I, unregisterTab: v } = l({
|
|
45
|
+
disabled: t,
|
|
46
|
+
title: o,
|
|
47
|
+
withNotificationIndicator: e,
|
|
48
|
+
counter: d
|
|
49
|
+
});
|
|
50
|
+
return k(() => v()), { activeTabId: c, id: I, computedTitle: o };
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
var j = function() {
|
|
54
|
+
var t = this, e = t._self._c;
|
|
55
|
+
return t._self._setupProxy, e("div", { directives: [{ name: "show", rawName: "v-show", value: t.activeTabId === t.id, expression: "activeTabId === id" }], staticClass: "b-tab", attrs: { id: `${t.id}-tabpanel`, role: "tabpanel", "aria-labelledby": t.id } }, [t.activeTabId === t.id ? [t._t("default")] : t._e()], 2);
|
|
56
|
+
}, G = [], J = /* @__PURE__ */ B(
|
|
57
|
+
Y,
|
|
58
|
+
j,
|
|
59
|
+
G,
|
|
60
|
+
!1,
|
|
61
|
+
null,
|
|
62
|
+
"0e7e8dbe"
|
|
63
|
+
);
|
|
64
|
+
const at = J.exports, R = (s, t) => {
|
|
65
|
+
const e = s === 0 ? t.length - 1 : s - 1;
|
|
66
|
+
return t[e].disabled ? R(e, t) : e;
|
|
67
|
+
}, O = (s, t) => {
|
|
68
|
+
const e = s === t.length - 1 ? 0 : s + 1;
|
|
69
|
+
return t[e].disabled ? O(e, t) : e;
|
|
70
|
+
};
|
|
71
|
+
var m = /* @__PURE__ */ ((s) => (s.ACTIVE_TAB_INDEX = "update:active-tab-index", s))(m || {});
|
|
72
|
+
const U = E({
|
|
73
|
+
components: {
|
|
74
|
+
BentoTypography: P,
|
|
75
|
+
FixedScroller: X
|
|
76
|
+
},
|
|
77
|
+
props: {
|
|
78
|
+
/**
|
|
79
|
+
* Sets the active tab by its index (0 being the first tab item).
|
|
80
|
+
*/
|
|
81
|
+
activeTabIndex: { type: Number, default: 0 },
|
|
82
|
+
/*
|
|
83
|
+
* Renders the tab with a sticky positioning.
|
|
84
|
+
*/
|
|
85
|
+
sticky: { type: Boolean, default: !1 },
|
|
86
|
+
/**
|
|
87
|
+
* Additional configurable options for tabs rendered with a sticky positioning.
|
|
88
|
+
* It must be an object of type {@see BentoStickyTabsOption}
|
|
89
|
+
* @property {Ref<number>} stickyOptions.top - Top position the tabs should take up when rendered as sticky.
|
|
90
|
+
*/
|
|
91
|
+
stickyOptions: { type: Object, default: null }
|
|
92
|
+
},
|
|
93
|
+
emits: [m.ACTIVE_TAB_INDEX],
|
|
94
|
+
setup(s, { emit: t }) {
|
|
95
|
+
const e = _([]), d = _(null), n = _(), p = _(), o = _("");
|
|
96
|
+
let l;
|
|
97
|
+
T(N, o);
|
|
98
|
+
const c = (a) => () => {
|
|
99
|
+
var r;
|
|
100
|
+
e.value = (r = e.value) == null ? void 0 : r.filter(({ id: i }) => i !== a);
|
|
101
|
+
};
|
|
102
|
+
T(A, ({ title: a, disabled: r, withNotificationIndicator: i, counter: b }) => {
|
|
103
|
+
const u = W("b-tab");
|
|
104
|
+
return e.value.push({ disabled: r, id: u, title: a, withNotificationIndicator: i, counter: b }), { id: u, unregisterTab: c(u) };
|
|
105
|
+
});
|
|
106
|
+
const v = (a) => {
|
|
107
|
+
if (a.code === "ArrowLeft" || a.code === "ArrowRight") {
|
|
108
|
+
const r = e.value.find((b) => document.activeElement.id === b.id);
|
|
109
|
+
let i = e.value.indexOf(r);
|
|
110
|
+
a.code === "ArrowLeft" ? i = R(i, e.value) : a.code === "ArrowRight" && (i = O(i, e.value)), d.value.children[i].focus();
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
w(
|
|
114
|
+
[() => s.activeTabIndex, e],
|
|
115
|
+
([a, r]) => {
|
|
116
|
+
x(() => {
|
|
117
|
+
var b;
|
|
118
|
+
const i = r[a];
|
|
119
|
+
o.value = i && !i.disabled ? i.id : (b = e.value.find(({ disabled: u }) => !u)) == null ? void 0 : b.id;
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
{ immediate: !0 }
|
|
123
|
+
);
|
|
124
|
+
const f = (a) => {
|
|
125
|
+
o.value = a;
|
|
126
|
+
const r = e.value.findIndex(({ id: i }) => i === o.value);
|
|
127
|
+
t(m.ACTIVE_TAB_INDEX, r);
|
|
128
|
+
}, S = (a) => a ? "disabled" : !1, g = () => {
|
|
129
|
+
var a;
|
|
130
|
+
(a = n.value) != null && a.$el && (l = new IntersectionObserver(
|
|
131
|
+
([r]) => {
|
|
132
|
+
var i, b;
|
|
133
|
+
(b = (i = n.value) == null ? void 0 : i.$el) == null || b.classList.toggle(
|
|
134
|
+
"b-tabs__tab-list-wrapper--pinned",
|
|
135
|
+
r.intersectionRatio < 1
|
|
136
|
+
);
|
|
137
|
+
},
|
|
138
|
+
{ threshold: [1] }
|
|
139
|
+
), l.observe(n.value.$el));
|
|
140
|
+
}, h = () => {
|
|
141
|
+
l && (l.disconnect(), l = null);
|
|
142
|
+
};
|
|
143
|
+
L(() => {
|
|
144
|
+
s.sticky && g();
|
|
145
|
+
}), k(() => {
|
|
146
|
+
h();
|
|
147
|
+
}), w(
|
|
148
|
+
() => s.sticky,
|
|
149
|
+
(a) => {
|
|
150
|
+
x(() => {
|
|
151
|
+
a ? g() : h();
|
|
152
|
+
});
|
|
153
|
+
},
|
|
154
|
+
// Do not run immediately on component mount, as onMounted handles initial setup
|
|
155
|
+
{ immediate: !1 }
|
|
156
|
+
);
|
|
157
|
+
const $ = y(() => {
|
|
158
|
+
var a;
|
|
159
|
+
return {
|
|
160
|
+
"b-tabs__tab-list-wrapper--sticky": s.sticky,
|
|
161
|
+
"b-tabs__tab-list-wrapper--pinned": s.sticky && ((a = s.stickyOptions) == null ? void 0 : a.top)
|
|
162
|
+
};
|
|
163
|
+
}), D = y(
|
|
164
|
+
() => {
|
|
165
|
+
var a;
|
|
166
|
+
return (
|
|
167
|
+
// This helps us detect when the tabs are pinned without calculations on the tabs positions because it makes the tabs intersect by 1 pixel with the element on top of it, which is getting aught by the intersection observer.
|
|
168
|
+
// Followed this example: https://css-tricks.com/how-to-detect-when-a-sticky-element-gets-pinned/
|
|
169
|
+
s.sticky ? { top: `${(((a = s.stickyOptions) == null ? void 0 : a.top) ?? 0) - 1}px` } : {}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
return {
|
|
174
|
+
tabs: e,
|
|
175
|
+
tablist: d,
|
|
176
|
+
tablistwrapper: n,
|
|
177
|
+
activeTabId: o,
|
|
178
|
+
tablistWrapperConditionalClasses: $,
|
|
179
|
+
tablistWrapperStyles: D,
|
|
180
|
+
onKeydownTabsNavigation: v,
|
|
181
|
+
handleTabChange: f,
|
|
182
|
+
isDisabled: S,
|
|
183
|
+
isPinned: p
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
var q = function() {
|
|
188
|
+
var t = this, e = t._self._c;
|
|
189
|
+
return t._self._setupProxy, e("div", { staticClass: "b-tabs" }, [e("fixed-scroller", { ref: "tablistwrapper", staticClass: "b-tabs__tab-list-wrapper", class: t.tablistWrapperConditionalClasses, style: t.tablistWrapperStyles, attrs: { condensed: "", "extra-padding-top": 2 } }, [e("div", { ref: "tablist", staticClass: "b-tabs__tab-list", attrs: { role: "tablist" }, on: { keydown: t.onKeydownTabsNavigation } }, t._l(t.tabs, function({ disabled: d, id: n, title: p, withNotificationIndicator: o, counter: l }) {
|
|
190
|
+
return e("button", { key: n, staticClass: "b-tabs__tab", class: {
|
|
191
|
+
"b-tabs__tab--active": t.activeTabId === n,
|
|
192
|
+
"b-tabs__tab--disabled": d
|
|
193
|
+
}, attrs: { id: n, role: "tab", type: "button", "aria-controls": `${n}-tabpanel`, "aria-selected": t.activeTabId === n ? "true" : "false", tabindex: t.activeTabId === n && !d.value ? null : -1, disabled: t.isDisabled(d) }, on: { click: function(c) {
|
|
194
|
+
return t.handleTabChange(n);
|
|
195
|
+
}, keydown: function(c) {
|
|
196
|
+
return !c.type.indexOf("key") && t._k(c.keyCode, "enter", 13, c.key, "Enter") && t._k(c.keyCode, "space", 32, c.key, [" ", "Spacebar"]) ? null : t.handleTabChange(n);
|
|
197
|
+
} } }, [e("span", { staticClass: "b-tabs__tab-text" }, [e("bento-typography", { staticClass: "b-tabs__tab-title", attrs: { el: "span", variant: "body", stronger: "" } }, [t._v(" " + t._s(p) + " ")]), l != null ? e("bento-typography", { staticClass: "b-tabs__tab-counter", class: {
|
|
198
|
+
"b-tabs__tab-counter--active": t.activeTabId === n
|
|
199
|
+
}, attrs: { el: "span", variant: "body", stronger: "" } }, [t._v(" " + t._s(l) + " ")]) : t._e(), o ? e("span", { staticClass: "b-tabs__tab-notification-dot", attrs: { "aria-hidden": "true" } }) : t._e()], 1), e("span", { directives: [{ name: "show", rawName: "v-show", value: t.activeTabId === n, expression: "activeTabId === id" }], staticClass: "b-tabs__tab-underline", attrs: { "aria-hidden": "true" } })]);
|
|
200
|
+
}), 0)]), t._t("default")], 2);
|
|
201
|
+
}, z = [], M = /* @__PURE__ */ B(
|
|
202
|
+
U,
|
|
203
|
+
q,
|
|
204
|
+
z,
|
|
205
|
+
!1,
|
|
206
|
+
null,
|
|
207
|
+
"90f706fa"
|
|
208
|
+
);
|
|
209
|
+
const st = M.exports;
|
|
210
|
+
export {
|
|
211
|
+
at as B,
|
|
212
|
+
st as a
|
|
213
|
+
};
|
|
214
|
+
//# sourceMappingURL=tabs.C8CgvNt4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.C8CgvNt4.js","sources":["../../src/components/tabs/components/tab.vue","../../src/components/tabs/tabs.utils.ts","../../src/components/tabs/tabs.types.ts","../../src/components/tabs/tabs.vue"],"sourcesContent":["<template>\n <div v-show=\"activeTabId === id\" :id=\"`${id}-tabpanel`\" class=\"b-tab\" role=\"tabpanel\" :aria-labelledby=\"id\">\n <template v-if=\"activeTabId === id\">\n <slot />\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, inject, onUnmounted, provide, ref, toRefs } from 'vue';\n import {\n EXTERNAL_TITLE_REGISTER_ENTRY_INJECTION_KEY,\n TABS_ACTIVE_TAB_ID_KEY,\n TABS_REGISTER_TAB_INJECTION_KEY,\n } from '../tabs.keys';\n import { BentoTabsRegisterTab } from '../tabs.types';\n import { BentoTabProvidedTitle } from './tab.types';\n\n export default defineComponent({\n props: {\n /**\n * Displays a counter next to the tab title\n */\n counter: {\n type: Number,\n default: null,\n },\n /**\n * Title of the tab\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Determines whether the tab is disabled\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays the tab with a notification indicator\n */\n withNotificationIndicator: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n // External title injection\n const { disabled, withNotificationIndicator, counter } = toRefs(props);\n const componentTitle = ref();\n const setTitle: BentoTabProvidedTitle = (value: string) => {\n componentTitle.value = value;\n };\n provide(EXTERNAL_TITLE_REGISTER_ENTRY_INJECTION_KEY, setTitle);\n\n const computedTitle = computed(() => (componentTitle.value ?? props.title) as string);\n\n const registerTab: BentoTabsRegisterTab = inject(TABS_REGISTER_TAB_INJECTION_KEY);\n const activeTabId = inject(TABS_ACTIVE_TAB_ID_KEY);\n\n const { id, unregisterTab } = registerTab({\n disabled,\n title: computedTitle,\n withNotificationIndicator,\n counter,\n });\n\n onUnmounted(() => unregisterTab());\n\n return { activeTabId, id, computedTitle };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./tab.scss\" />\n","import { BentoTab } from './components/tab.types';\n\nexport const getPreviousTabIndex = (activeTabIndex: number, tabsValue: BentoTab[]) => {\n const newActiveTabIndex = activeTabIndex === 0 ? tabsValue.length - 1 : activeTabIndex - 1;\n if (tabsValue[newActiveTabIndex].disabled) {\n return getPreviousTabIndex(newActiveTabIndex, tabsValue);\n }\n return newActiveTabIndex;\n};\n\nexport const getNextTabIndex = (activeTabIndex: number, tabsValue: BentoTab[]) => {\n const newActiveTabIndex = activeTabIndex === tabsValue.length - 1 ? 0 : activeTabIndex + 1;\n if (tabsValue[newActiveTabIndex].disabled) {\n return getNextTabIndex(newActiveTabIndex, tabsValue);\n }\n return newActiveTabIndex;\n};\n","import type { Ref } from 'vue';\n\nexport interface BentoStickyTabsOptions {\n top?: Ref<number>;\n}\n\nexport type BentoTabsRegisterTab = (props: {\n disabled: Ref<boolean>;\n title: Ref<string>;\n withNotificationIndicator: Ref<boolean>;\n counter: Ref<number>;\n}) => { id: string; unregisterTab: () => void };\n\nexport enum BentoTabsEvent {\n ACTIVE_TAB_INDEX = 'update:active-tab-index',\n}\n","<template>\n <div class=\"b-tabs\">\n <fixed-scroller\n ref=\"tablistwrapper\"\n condensed\n :extra-padding-top=\"2\"\n class=\"b-tabs__tab-list-wrapper\"\n :class=\"tablistWrapperConditionalClasses\"\n :style=\"tablistWrapperStyles\"\n >\n <div ref=\"tablist\" class=\"b-tabs__tab-list\" role=\"tablist\" @keydown=\"onKeydownTabsNavigation\">\n <button\n v-for=\"{ disabled, id, title, withNotificationIndicator, counter } in tabs\"\n :id=\"id\"\n :key=\"id\"\n role=\"tab\"\n type=\"button\"\n class=\"b-tabs__tab\"\n :class=\"{\n 'b-tabs__tab--active': activeTabId === id,\n 'b-tabs__tab--disabled': disabled,\n }\"\n :aria-controls=\"`${id}-tabpanel`\"\n :aria-selected=\"activeTabId === id ? 'true' : 'false'\"\n :tabindex=\"activeTabId === id && !disabled.value ? null : -1\"\n :disabled=\"isDisabled(disabled)\"\n @click=\"handleTabChange(id)\"\n @keydown.enter.space=\"handleTabChange(id)\"\n >\n <span class=\"b-tabs__tab-text\">\n <bento-typography class=\"b-tabs__tab-title\" el=\"span\" variant=\"body\" stronger>\n {{ title }}\n </bento-typography>\n <bento-typography\n v-if=\"counter != null\"\n class=\"b-tabs__tab-counter\"\n el=\"span\"\n variant=\"body\"\n stronger\n :class=\"{\n 'b-tabs__tab-counter--active': activeTabId === id,\n }\"\n >\n {{ counter }}\n </bento-typography>\n <span\n v-if=\"withNotificationIndicator\"\n class=\"b-tabs__tab-notification-dot\"\n aria-hidden=\"true\"\n ></span>\n </span>\n <span v-show=\"activeTabId === id\" class=\"b-tabs__tab-underline\" aria-hidden=\"true\"></span>\n </button>\n </div>\n </fixed-scroller>\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, provide, ref, Ref, watch } from 'vue';\n\n // components\n import { BentoTypography } from '@/components/typography';\n import { FixedScroller } from '@/internal';\n\n // utils\n import { generateUid } from '@/core/utils/ts';\n import { getNextTabIndex, getPreviousTabIndex } from './tabs.utils';\n\n // types\n import { BentoTab } from './components/tab.types';\n import { BentoStickyTabsOptions, BentoTabsEvent, BentoTabsRegisterTab } from './tabs.types';\n\n // keys\n import { TABS_ACTIVE_TAB_ID_KEY, TABS_REGISTER_TAB_INJECTION_KEY } from './tabs.keys';\n import { Booleanish } from '@/types';\n import { onMounted } from 'vue';\n import { onUnmounted } from 'vue';\n\n /**\n * Tabs are used to navigate between different, but related content views within a page.\n * This component conforms to the official WAI-ARIA guidelines for tabs: https://www.w3.org/WAI/ARIA/apg/patterns/tabs/\n *\n * @example\n * import { BentoTabs, BentoTab } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTabs, BentoTab },\n * template: `\n * <bento-tabs v-bind=\"$props\">\n * <bento-tab title=\"Maria Ahlefeldt\">\n * (16 January 1755 - 20 December 1810) was a Danish, (originally German), composer. She is known as the first female composer in Denmark.\n * </bento-tab>\n * <bento-tab title=\"Carl Andersen\">\n * (29 April 1847 - 7 May 1909) was a Danish flutist, conductor and composer born in Copenhagen, son of the flutist Christian Joachim Andersen.\n * </bento-tab>\n * <bento-tab title=\"Karl Truffel\">\n * (1 March 1981 - 7 November 1992) was a Danish dog and commander born in Berlin, son of the machinist Tom Jahoor Truffel.\n * </bento-tab>\n * <bento-tab title=\"Maria Ahlefeldt\" :disabled=\"true\">\n * (16 January 1755 - 20 December 1810) was a Danish, (originally German), composer. She is known as the first female composer in Denmark.\n * </bento-tab>\n * </bento-tabs>\n * `\n * };\n */\n\n // component\n export default defineComponent({\n components: {\n BentoTypography,\n FixedScroller,\n },\n props: {\n /**\n * Sets the active tab by its index (0 being the first tab item).\n */\n activeTabIndex: { type: Number, default: 0 },\n\n /*\n * Renders the tab with a sticky positioning.\n */\n sticky: { type: Boolean, default: false },\n\n /**\n * Additional configurable options for tabs rendered with a sticky positioning.\n * It must be an object of type {@see BentoStickyTabsOption}\n * @property {Ref<number>} stickyOptions.top - Top position the tabs should take up when rendered as sticky.\n */\n stickyOptions: { type: Object as PropType<BentoStickyTabsOptions>, default: null },\n },\n emits: [BentoTabsEvent.ACTIVE_TAB_INDEX],\n setup(props, { emit }) {\n const tabs: Ref<BentoTab[]> = ref([]);\n const tablist = ref(null);\n const tablistwrapper = ref();\n const isPinned = ref();\n const activeTabId = ref('');\n let observer;\n\n provide(TABS_ACTIVE_TAB_ID_KEY, activeTabId);\n\n // unregister tab if removed / destroyed\n const unregisterTab = (tabIdToRemove: string) => () => {\n tabs.value = tabs.value?.filter(({ id }) => id !== tabIdToRemove);\n };\n\n // register tab\n const registerTab: BentoTabsRegisterTab = ({ title, disabled, withNotificationIndicator, counter }) => {\n const id = generateUid('b-tab');\n\n // add tab to tabs\n tabs.value.push({ disabled, id, title, withNotificationIndicator, counter });\n\n // return values to the Tab component\n return { id, unregisterTab: unregisterTab(id) };\n };\n\n // provide activeTab and registerTab to tab items\n provide(TABS_REGISTER_TAB_INJECTION_KEY, registerTab);\n\n // keyboard navigation\n const onKeydownTabsNavigation = (e: KeyboardEvent) => {\n if (e.code === 'ArrowLeft' || e.code === 'ArrowRight') {\n // find tab that is focussed\n const activeTab = tabs.value.find(tab => document.activeElement.id === tab.id);\n let activeTabIndex = tabs.value.indexOf(activeTab);\n\n // conditionally increase or decrease the\n if (e.code === 'ArrowLeft') {\n activeTabIndex = getPreviousTabIndex(activeTabIndex, tabs.value);\n } else if (e.code === 'ArrowRight') {\n activeTabIndex = getNextTabIndex(activeTabIndex, tabs.value);\n }\n\n // focus new active tab\n tablist.value.children[activeTabIndex].focus();\n }\n };\n\n watch(\n [() => props.activeTabIndex, tabs],\n ([index, currentTabs]) => {\n nextTick(() => {\n const tab = currentTabs[index];\n activeTabId.value =\n tab && !tab.disabled ? tab.id : tabs.value.find(({ disabled }) => !disabled)?.id;\n });\n },\n { immediate: true }\n );\n\n const handleTabChange = (tabId: string) => {\n activeTabId.value = tabId;\n const activeIndex = tabs.value.findIndex(({ id }) => id === activeTabId.value);\n emit(BentoTabsEvent.ACTIVE_TAB_INDEX, activeIndex);\n };\n\n const isDisabled = (isDisabledTab: Ref<boolean>): Booleanish =>\n (isDisabledTab ? 'disabled' : false) as Booleanish;\n\n /* == Sticky tabs logic == */\n // Function to create and observe\n const setupIntersectionObserver = () => {\n if (tablistwrapper.value?.$el) {\n observer = new IntersectionObserver(\n ([e]) => {\n tablistwrapper.value?.$el?.classList.toggle(\n 'b-tabs__tab-list-wrapper--pinned',\n e.intersectionRatio < 1\n );\n },\n { threshold: [1] }\n );\n observer.observe(tablistwrapper.value.$el);\n }\n };\n\n // Function to disconnect observer\n const disconnectIntersectionObserver = () => {\n if (observer) {\n observer.disconnect();\n observer = null;\n }\n };\n\n onMounted(() => {\n // Initial setup based on `sticky` prop\n if (props.sticky) {\n setupIntersectionObserver();\n }\n });\n\n onUnmounted(() => {\n disconnectIntersectionObserver();\n });\n\n // Watch the `sticky` prop for changes and retrigger the observer accordingly\n watch(\n () => props.sticky,\n newVal => {\n nextTick(() => {\n // Ensure the DOM is updated before trying to observe\n if (newVal) {\n setupIntersectionObserver();\n } else {\n disconnectIntersectionObserver();\n }\n });\n },\n // Do not run immediately on component mount, as onMounted handles initial setup\n { immediate: false }\n );\n\n const tablistWrapperConditionalClasses = computed(() => ({\n 'b-tabs__tab-list-wrapper--sticky': props.sticky,\n 'b-tabs__tab-list-wrapper--pinned': props.sticky && props.stickyOptions?.top,\n }));\n\n const tablistWrapperStyles = computed(() =>\n // This helps us detect when the tabs are pinned without calculations on the tabs positions because it makes the tabs intersect by 1 pixel with the element on top of it, which is getting aught by the intersection observer.\n // Followed this example: https://css-tricks.com/how-to-detect-when-a-sticky-element-gets-pinned/\n props.sticky ? { top: `${(props.stickyOptions?.top ?? 0) - 1}px` } : {}\n );\n\n return {\n tabs,\n tablist,\n tablistwrapper,\n activeTabId,\n tablistWrapperConditionalClasses,\n tablistWrapperStyles,\n onKeydownTabsNavigation,\n handleTabChange,\n isDisabled,\n isPinned,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./tabs.scss\" />\n"],"names":["_sfc_main$1","defineComponent","props","disabled","withNotificationIndicator","counter","toRefs","componentTitle","ref","provide","EXTERNAL_TITLE_REGISTER_ENTRY_INJECTION_KEY","value","computedTitle","computed","registerTab","inject","TABS_REGISTER_TAB_INJECTION_KEY","activeTabId","TABS_ACTIVE_TAB_ID_KEY","id","unregisterTab","onUnmounted","getPreviousTabIndex","activeTabIndex","tabsValue","newActiveTabIndex","getNextTabIndex","BentoTabsEvent","BentoTabsEvent2","_sfc_main","BentoTypography","FixedScroller","emit","tabs","tablist","tablistwrapper","isPinned","observer","tabIdToRemove","_a","title","generateUid","onKeydownTabsNavigation","e","activeTab","tab","watch","index","currentTabs","nextTick","handleTabChange","tabId","activeIndex","isDisabled","isDisabledTab","setupIntersectionObserver","_b","disconnectIntersectionObserver","onMounted","newVal","tablistWrapperConditionalClasses","tablistWrapperStyles"],"mappings":";;;;;;;AAkBA,MAAAA,IAAAC,EAAA;AAAA,EAAA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,SAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,OAAA;AAAA,MAIA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,2BAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,MAAAC,GAAA;AAGA,UAAA,EAAA,UAAAC,GAAA,2BAAAC,GAAA,SAAAC,EAAA,IAAAC,EAAAJ,CAAA,GACAK,IAAAC,EAAA;AAIA,IAAAC,EAAAC,GAHA,CAAAC,MAAA;AACA,MAA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A,EAAA,WAAA,GAAA;AAAA,IAEA;AAGA,UAAAG,IAAA/C,EAAA,MAAA;;AAAA;AAAA,QAAA,oCAAAX,EAAA;AAAA,QACA,oCAAAA,EAAA,YAAAqC,IAAArC,EAAA,kBAAA,gBAAAqC,EAAA;AAAA,MACA;AAAA,KAAA,GAGAsB,IAAAhD;AAAA,MAAA,MAAA;;AAAA;AAAA;AAAA;AAAA,UAAAX,EAAA,SAAA,EAAA,KAAA,MAAAqC,IAAArC,EAAA,kBAAA,gBAAAqC,EAAA,QAAA,KAAA,CAAA,KAAA,IAAA,CAAA;AAAA;AAAA;AAAA,IAGA;AAGA,WAAA;AAAA,MAAA,MAAAN;AAAA,MACA,SAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,aAAAlB;AAAA,MACA,kCAAA2C;AAAA,MACA,sBAAAC;AAAA,MACA,yBAAAnB;AAAA,MACA,iBAAAQ;AAAA,MACA,YAAAG;AAAA,MACA,UAAAjB;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@ import { defineComponent as p, useSlots as m, computed as r } from "vue";
|
|
|
2
2
|
import { B as d } from "./typography.J1v_SPG3.js";
|
|
3
3
|
import { u as f } from "./aria-label.CaUURpnB.js";
|
|
4
4
|
import { g as n } from "./get-slot-text.BQS5Olxm.js";
|
|
5
|
-
import { B as _ } from "./tooltip.
|
|
5
|
+
import { B as _ } from "./tooltip.DOvci5lX.js";
|
|
6
6
|
import { n as v } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
7
7
|
import "../assets/tag.css";
|
|
8
8
|
var i = /* @__PURE__ */ ((e) => (e.GREY = "grey", e.BLUE = "blue", e.GREEN = "green", e.ORANGE = "orange", e.RED = "red", e.WHITE = "white", e))(i || {});
|
|
@@ -41,4 +41,4 @@ export {
|
|
|
41
41
|
F as B,
|
|
42
42
|
i as a
|
|
43
43
|
};
|
|
44
|
-
//# sourceMappingURL=tag.
|
|
44
|
+
//# sourceMappingURL=tag.CyspYb1E.js.map
|