@adyen/bento-vue3 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 +1851 -2155
- 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.PIz6tShf.js → action-bar.CUDi5Po7.js} +5 -5
- package/dist/chunks/{action-bar.PIz6tShf.js.map → action-bar.CUDi5Po7.js.map} +1 -1
- package/dist/chunks/{base-modal.D4INiJGX.js → base-modal.BegK8cPb.js} +3 -3
- package/dist/chunks/{base-modal.D4INiJGX.js.map → base-modal.BegK8cPb.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.DFD7gbdT.js → button-actions-with-menu.CcoKss9T.js} +5 -5
- package/dist/chunks/{button-actions-with-menu.DFD7gbdT.js.map → button-actions-with-menu.CcoKss9T.js.map} +1 -1
- package/dist/chunks/{button-actions.BvGAE7sw.js → button-actions.CdlXZ29B.js} +59 -117
- package/dist/chunks/{button-actions.BvGAE7sw.js.map → button-actions.CdlXZ29B.js.map} +1 -1
- package/dist/chunks/{calendar.DKHNrb9_.js → calendar.BRsV4rkQ.js} +72 -72
- package/dist/chunks/{calendar.DKHNrb9_.js.map → calendar.BRsV4rkQ.js.map} +1 -1
- package/dist/chunks/{card.IrL_Fw-f.js → card.C5bSqYsB.js} +2 -2
- package/dist/chunks/{card.IrL_Fw-f.js.map → card.C5bSqYsB.js.map} +1 -1
- package/dist/chunks/{checkbox-group.X2fi2jkS.js → checkbox-group.EPDS2n3a.js} +4 -4
- package/dist/chunks/{checkbox-group.X2fi2jkS.js.map → checkbox-group.EPDS2n3a.js.map} +1 -1
- package/dist/chunks/{checkbox.CXZQtFhM.js → checkbox.Z2Jeglk-.js} +52 -52
- package/dist/chunks/checkbox.Z2Jeglk-.js.map +1 -0
- package/dist/chunks/{code-snippet.CcdsPxT7.js → code-snippet.zdidL9RT.js} +5 -5
- package/dist/chunks/{code-snippet.CcdsPxT7.js.map → code-snippet.zdidL9RT.js.map} +1 -1
- package/dist/chunks/{controls-group.ClMNznTz.js → controls-group.DcbOWqxA.js} +2 -2
- package/dist/chunks/{controls-group.ClMNznTz.js.map → controls-group.DcbOWqxA.js.map} +1 -1
- package/dist/chunks/{copy.BYG9aoNO.js → copy.CFhrpASp.js} +2 -2
- package/dist/chunks/{copy.BYG9aoNO.js.map → copy.CFhrpASp.js.map} +1 -1
- package/dist/chunks/{dashboard-section.Dz9GpOvy.js → dashboard-section.DpL72ax7.js} +4 -4
- package/dist/chunks/{dashboard-section.Dz9GpOvy.js.map → dashboard-section.DpL72ax7.js.map} +1 -1
- package/dist/chunks/{dashed-underline.BuCIjMch.js → dashed-underline.BYAXhfnX.js} +3 -3
- package/dist/chunks/{dashed-underline.BuCIjMch.js.map → dashed-underline.BYAXhfnX.js.map} +1 -1
- package/dist/chunks/{data-grid-template.B4jxtwoW.js → data-grid-template.CJxPIu3E.js} +3 -3
- package/dist/chunks/{data-grid-template.B4jxtwoW.js.map → data-grid-template.CJxPIu3E.js.map} +1 -1
- package/dist/chunks/{data-grid.CLu8mvil.js → data-grid.i-NPmpso.js} +15 -15
- package/dist/chunks/data-grid.i-NPmpso.js.map +1 -0
- package/dist/chunks/{date-picker.CA2i6QxD.js → date-picker.wesQox8h.js} +17 -17
- package/dist/chunks/{date-picker.CA2i6QxD.js.map → date-picker.wesQox8h.js.map} +1 -1
- package/dist/chunks/{date-range-picker.DVQ-j-JX.js → date-range-picker.V6QCtfnc.js} +26 -26
- package/dist/chunks/{date-range-picker.DVQ-j-JX.js.map → date-range-picker.V6QCtfnc.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.DFWV7Zj_.js → dropdown-tag.D8wU10wx.js} +4 -4
- package/dist/chunks/{dropdown-tag.DFWV7Zj_.js.map → dropdown-tag.D8wU10wx.js.map} +1 -1
- package/dist/chunks/{dropdown.RVt9T6j5.js → dropdown.DQunMieR.js} +138 -139
- package/dist/chunks/{dropdown.RVt9T6j5.js.map → dropdown.DQunMieR.js.map} +1 -1
- package/dist/chunks/{error-message.BQ5MlnLg.js → error-message.DH8Er2JS.js} +2 -2
- package/dist/chunks/{error-message.BQ5MlnLg.js.map → error-message.DH8Er2JS.js.map} +1 -1
- package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
- package/dist/chunks/{file-uploader.DJLGEmtF.js → file-uploader.Rtt1Uz2U.js} +592 -540
- package/dist/chunks/file-uploader.Rtt1Uz2U.js.map +1 -0
- package/dist/chunks/{filter-bar.GGHRoo6O.js → filter-bar.DW7lAAtF.js} +697 -689
- package/dist/chunks/filter-bar.DW7lAAtF.js.map +1 -0
- package/dist/chunks/{focus-trap.D-HSKa_Q.js → focus-trap.BFCzfiI_.js} +2 -2
- package/dist/chunks/{focus-trap.D-HSKa_Q.js.map → focus-trap.BFCzfiI_.js.map} +1 -1
- package/dist/chunks/{footer-actions.DK3pMfDY.js → footer-actions.A9H5F5D-.js} +2 -2
- package/dist/chunks/{footer-actions.DK3pMfDY.js.map → footer-actions.A9H5F5D-.js.map} +1 -1
- package/dist/chunks/{header-with-views.BkcFu7QW.js → header-with-views.D2B-20ZR.js} +11 -11
- package/dist/chunks/{header-with-views.BkcFu7QW.js.map → header-with-views.D2B-20ZR.js.map} +1 -1
- package/dist/chunks/{header.CyTcPWF4.js → header.CoyUQXFL.js} +4 -4
- package/dist/chunks/{header.CyTcPWF4.js.map → header.CoyUQXFL.js.map} +1 -1
- package/dist/chunks/{index.C5sL_d0I.js → index.BzJQl-2M.js} +3 -3
- package/dist/chunks/{index.C5sL_d0I.js.map → index.BzJQl-2M.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.DgZh2mnN.js → info-icon-with-popover.CBi7CmUZ.js} +2 -2
- package/dist/chunks/{info-icon-with-popover.DgZh2mnN.js.map → info-icon-with-popover.CBi7CmUZ.js.map} +1 -1
- package/dist/chunks/{info-icon.DxOAiUg4.js → info-icon.Bomzzcc5.js} +2 -2
- package/dist/chunks/{info-icon.DxOAiUg4.js.map → info-icon.Bomzzcc5.js.map} +1 -1
- package/dist/chunks/input-field-password.DMEjy243.js +343 -0
- package/dist/chunks/input-field-password.DMEjy243.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.BtRMkC84.js → input-field-phone-number.DhJznFQP.js} +3 -3
- package/dist/chunks/{input-field-phone-number.BtRMkC84.js.map → input-field-phone-number.DhJznFQP.js.map} +1 -1
- package/dist/chunks/{input-field.CRlXtS3z.js → input-field.B9AU1IsG.js} +3 -3
- package/dist/chunks/{input-field.CRlXtS3z.js.map → input-field.B9AU1IsG.js.map} +1 -1
- package/dist/chunks/inspector.types.Fs9URmPq.js +188 -0
- package/dist/chunks/inspector.types.Fs9URmPq.js.map +1 -0
- package/dist/chunks/{layout-row.CwwbWO7s.js → layout-row.BC3Z1mQx.js} +2 -2
- package/dist/chunks/{layout-row.CwwbWO7s.js.map → layout-row.BC3Z1mQx.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.2k0hRv0z.js → listbox-option-tag.CqnkZr9x.js} +2 -2
- package/dist/chunks/{listbox-option-tag.2k0hRv0z.js.map → listbox-option-tag.CqnkZr9x.js.map} +1 -1
- package/dist/chunks/{menu.DBRBVdsd.js → menu.P_KG1J8b.js} +2 -2
- package/dist/chunks/{menu.DBRBVdsd.js.map → menu.P_KG1J8b.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.POY-6qYC.js → modal-fullscreen.DxuMKagz.js} +3 -3
- package/dist/chunks/{modal-fullscreen.POY-6qYC.js.map → modal-fullscreen.DxuMKagz.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CGV0E6eK.js → modal.vue_vue_type_script_setup_true_lang.DfzxXSwn.js} +4 -4
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CGV0E6eK.js.map → modal.vue_vue_type_script_setup_true_lang.DfzxXSwn.js.map} +1 -1
- package/dist/chunks/{pagination.TWtayPVy.js → pagination.DsEd-vpq.js} +3 -3
- package/dist/chunks/{pagination.TWtayPVy.js.map → pagination.DsEd-vpq.js.map} +1 -1
- package/dist/chunks/{payment-method.CLUppDo_.js → payment-method.eazefwm6.js} +9 -9
- package/dist/chunks/payment-method.eazefwm6.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.BBnUL5Y_.js → popover.Csq1gQ6T.js} +3 -3
- package/dist/chunks/{popover.BBnUL5Y_.js.map → popover.Csq1gQ6T.js.map} +1 -1
- package/dist/chunks/{popper-container.Be3h7X17.js → popper-container.DnlxQ9eS.js} +2 -2
- package/dist/chunks/{popper-container.Be3h7X17.js.map → popper-container.DnlxQ9eS.js.map} +1 -1
- package/dist/chunks/{promo-banner.BdaUFMsl.js → promo-banner.CN-TTSov.js} +2 -2
- package/dist/chunks/{promo-banner.BdaUFMsl.js.map → promo-banner.CN-TTSov.js.map} +1 -1
- package/dist/chunks/{radio-group.BUazlUAi.js → radio-group.Vm-hmL1q.js} +4 -4
- package/dist/chunks/{radio-group.BUazlUAi.js.map → radio-group.Vm-hmL1q.js.map} +1 -1
- package/dist/chunks/{search-bar.21CWuOHb.js → search-bar.BBV1KNdd.js} +3 -3
- package/dist/chunks/{search-bar.21CWuOHb.js.map → search-bar.BBV1KNdd.js.map} +1 -1
- package/dist/chunks/{secondary-nav.CUQi4Ybt.js → secondary-nav.O2R1ltD9.js} +3 -3
- package/dist/chunks/{secondary-nav.CUQi4Ybt.js.map → secondary-nav.O2R1ltD9.js.map} +1 -1
- package/dist/chunks/{segmented-control.BZJ9DzRF.js → segmented-control.DBy-nbYM.js} +2 -2
- package/dist/chunks/{segmented-control.BZJ9DzRF.js.map → segmented-control.DBy-nbYM.js.map} +1 -1
- package/dist/chunks/{selection-card-group.Bdrx1b6M.js → selection-card-group.Bt4jBqjc.js} +4 -4
- package/dist/chunks/{selection-card-group.Bdrx1b6M.js.map → selection-card-group.Bt4jBqjc.js.map} +1 -1
- package/dist/chunks/{sidepanel.D_bGUcyi.js → sidepanel.Ds2CCG9L.js} +3 -3
- package/dist/chunks/{sidepanel.D_bGUcyi.js.map → sidepanel.Ds2CCG9L.js.map} +1 -1
- package/dist/chunks/{structured-list-item.r1jYiX6Y.js → structured-list-item.CygGTBVl.js} +4 -4
- package/dist/chunks/{structured-list-item.r1jYiX6Y.js.map → structured-list-item.CygGTBVl.js.map} +1 -1
- package/dist/chunks/summary-grid.types.DzvuP-NU.js +454 -0
- package/dist/chunks/summary-grid.types.DzvuP-NU.js.map +1 -0
- package/dist/chunks/tabs.B8BRqQpv.js +272 -0
- package/dist/chunks/tabs.B8BRqQpv.js.map +1 -0
- package/dist/chunks/{tag.DVkBzXMx.js → tag.C4SGN5Eb.js} +2 -2
- package/dist/chunks/{tag.DVkBzXMx.js.map → tag.C4SGN5Eb.js.map} +1 -1
- package/dist/chunks/{textarea.C8R71Q4l.js → textarea.bQwvvIkq.js} +103 -95
- package/dist/chunks/textarea.bQwvvIkq.js.map +1 -0
- package/dist/chunks/{timeline-item.DBeAlt3N.js → timeline-item.Bxt_pNII.js} +5 -5
- package/dist/chunks/{timeline-item.DBeAlt3N.js.map → timeline-item.Bxt_pNII.js.map} +1 -1
- package/dist/chunks/{tooltip.Cbs_YIap.js → tooltip.CyQxprBQ.js} +2 -2
- package/dist/chunks/{tooltip.Cbs_YIap.js.map → tooltip.CyQxprBQ.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.4smMvopK.js → tutorial.vue_vue_type_script_setup_true_lang.BtVT3Ltg.js} +5 -5
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.4smMvopK.js.map → tutorial.vue_vue_type_script_setup_true_lang.BtVT3Ltg.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.Chb18cq_.js → use-cached-selected-values.DmW8XRgJ.js} +135 -135
- package/dist/chunks/{use-cached-selected-values.Chb18cq_.js.map → use-cached-selected-values.DmW8XRgJ.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 +61 -61
- 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 +1 -1
- package/package.json +5 -5
- package/dist/assets/summary-grid-item-custom.css +0 -1
- package/dist/chunks/checkbox.CXZQtFhM.js.map +0 -1
- package/dist/chunks/data-grid.CLu8mvil.js.map +0 -1
- package/dist/chunks/file-uploader.DJLGEmtF.js.map +0 -1
- package/dist/chunks/filter-bar.GGHRoo6O.js.map +0 -1
- package/dist/chunks/input-field-password.BSJMbPHf.js +0 -313
- package/dist/chunks/input-field-password.BSJMbPHf.js.map +0 -1
- package/dist/chunks/inspector.types.s0va--Nn.js +0 -184
- package/dist/chunks/inspector.types.s0va--Nn.js.map +0 -1
- package/dist/chunks/payment-method.CLUppDo_.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.ACP0RH0N.js +0 -826
- package/dist/chunks/summary-grid-item-custom.ACP0RH0N.js.map +0 -1
- package/dist/chunks/tabs.hp52NnXH.js +0 -211
- package/dist/chunks/tabs.hp52NnXH.js.map +0 -1
- package/dist/chunks/textarea.C8R71Q4l.js.map +0 -1
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
import { defineComponent as v, useSlots as T, onMounted as Y, provide as E, toRef as Z, createElementBlock as I, openBlock as i, Fragment as G, renderList as P, unref as t, createBlock as c, createSlots as h, withCtx as o, renderSlot as d, toRefs as j, inject as H, ref as W, computed as y, normalizeStyle as F, normalizeClass as J, createElementVNode as M, createVNode as L, createCommentVNode as $, createTextVNode as f, toDisplayString as p, mergeProps as K } from "vue";
|
|
2
|
+
import { u as _ } from "./use-has-slot.B7eQSabc.js";
|
|
3
|
+
import { S as q, a as A } from "./summary-grid.keys.CxTf_FOc.js";
|
|
4
|
+
import { G as Q } from "./grid-layout.BTLE3rac.js";
|
|
5
|
+
import { _ as z } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
+
import { B as X } from "./dashed-underline.BYAXhfnX.js";
|
|
7
|
+
import { B as x } from "./info-icon.Bomzzcc5.js";
|
|
8
|
+
import { B as w } from "./typography.DN5eC5ch.js";
|
|
9
|
+
import { B as R } from "./tag.C4SGN5Eb.js";
|
|
10
|
+
import { C as ee } from "./copy.CFhrpASp.js";
|
|
11
|
+
import "../assets/summary-grid.css";
|
|
12
|
+
const te = { class: "b-summary-grid" }, oe = {}, ne = /* @__PURE__ */ v({
|
|
13
|
+
...oe,
|
|
14
|
+
__name: "summary-grid",
|
|
15
|
+
props: {
|
|
16
|
+
columnWidth: { default: null },
|
|
17
|
+
slashedZero: { type: Boolean, default: !1 }
|
|
18
|
+
},
|
|
19
|
+
setup(l) {
|
|
20
|
+
var S, k;
|
|
21
|
+
const a = l, s = T(), e = _(s);
|
|
22
|
+
let m = 1;
|
|
23
|
+
if (s) {
|
|
24
|
+
const u = (k = (S = Object.keys(s)) == null ? void 0 : S.filter((g) => g.includes("cell-"))) == null ? void 0 : k.map((g) => {
|
|
25
|
+
var n;
|
|
26
|
+
return parseInt((n = g.split("-")) == null ? void 0 : n[1], 10);
|
|
27
|
+
});
|
|
28
|
+
m = Math.max(...u);
|
|
29
|
+
}
|
|
30
|
+
return Y(() => {
|
|
31
|
+
if (m > 3)
|
|
32
|
+
throw new Error(
|
|
33
|
+
"BentoSummaryGrid must only have a maximum of 3 rows. Read the documentation for more information."
|
|
34
|
+
);
|
|
35
|
+
}), E(q, () => ({ isSummaryGridLayout: !0 })), E(A, Z(a, "slashedZero")), (u, g) => (i(), I("div", te, [
|
|
36
|
+
(i(!0), I(G, null, P(t(m), (n) => {
|
|
37
|
+
var D;
|
|
38
|
+
return i(), c(t(Q), {
|
|
39
|
+
key: `summary-grid-row-${n}`,
|
|
40
|
+
"data-testid": `summary-grid-row-${n}`,
|
|
41
|
+
"column-width": (D = u.columnWidth) == null ? void 0 : D[`row${n}`]
|
|
42
|
+
}, h({ _: 2 }, [
|
|
43
|
+
t(e)(`cell-${n}-1`) ? {
|
|
44
|
+
name: "col-1",
|
|
45
|
+
fn: o(() => [
|
|
46
|
+
d(u.$slots, `cell-${n}-1`, {}, void 0, !0)
|
|
47
|
+
]),
|
|
48
|
+
key: "0"
|
|
49
|
+
} : void 0,
|
|
50
|
+
t(e)(`cell-${n}-2`) ? {
|
|
51
|
+
name: "col-2",
|
|
52
|
+
fn: o(() => [
|
|
53
|
+
d(u.$slots, `cell-${n}-2`, {}, void 0, !0)
|
|
54
|
+
]),
|
|
55
|
+
key: "1"
|
|
56
|
+
} : void 0,
|
|
57
|
+
t(e)(`cell-${n}-3`) ? {
|
|
58
|
+
name: "col-3",
|
|
59
|
+
fn: o(() => [
|
|
60
|
+
d(u.$slots, `cell-${n}-3`, {}, void 0, !0)
|
|
61
|
+
]),
|
|
62
|
+
key: "2"
|
|
63
|
+
} : void 0,
|
|
64
|
+
t(e)(`cell-${n}-4`) ? {
|
|
65
|
+
name: "col-4",
|
|
66
|
+
fn: o(() => [
|
|
67
|
+
d(u.$slots, `cell-${n}-4`, {}, void 0, !0)
|
|
68
|
+
]),
|
|
69
|
+
key: "3"
|
|
70
|
+
} : void 0,
|
|
71
|
+
t(e)(`cell-${n}-5`) ? {
|
|
72
|
+
name: "col-5",
|
|
73
|
+
fn: o(() => [
|
|
74
|
+
d(u.$slots, `cell-${n}-5`, {}, void 0, !0)
|
|
75
|
+
]),
|
|
76
|
+
key: "4"
|
|
77
|
+
} : void 0,
|
|
78
|
+
t(e)(`cell-${n}-6`) ? {
|
|
79
|
+
name: "col-6",
|
|
80
|
+
fn: o(() => [
|
|
81
|
+
d(u.$slots, `cell-${n}-6`, {}, void 0, !0)
|
|
82
|
+
]),
|
|
83
|
+
key: "5"
|
|
84
|
+
} : void 0
|
|
85
|
+
]), 1032, ["data-testid", "column-width"]);
|
|
86
|
+
}), 128))
|
|
87
|
+
]));
|
|
88
|
+
}
|
|
89
|
+
}), Be = /* @__PURE__ */ z(ne, [["__scopeId", "data-v-14d3ddaf"]]), le = { class: "b-summary-grid-item__header" }, ie = { class: "b-summary-grid-item__title-icons" }, re = {}, ae = /* @__PURE__ */ v({
|
|
90
|
+
...re,
|
|
91
|
+
__name: "summary-grid-item",
|
|
92
|
+
props: {
|
|
93
|
+
itemType: { default: "custom" },
|
|
94
|
+
copy: { default: void 0 },
|
|
95
|
+
fitContent: { type: Boolean, default: !1 },
|
|
96
|
+
infoIconTooltipText: { default: null },
|
|
97
|
+
size: { default: "small" },
|
|
98
|
+
title: {},
|
|
99
|
+
trend: { default: null },
|
|
100
|
+
trendDirection: { default: "positive" },
|
|
101
|
+
secondaryTrend: { default: null },
|
|
102
|
+
secondaryTrendDirection: { default: "positive" },
|
|
103
|
+
underlineTooltipText: { default: null }
|
|
104
|
+
},
|
|
105
|
+
setup(l) {
|
|
106
|
+
const a = l, { trendDirection: s, secondaryTrendDirection: e, itemType: m, size: b } = j(a), S = H(A, W(!1)), k = (r) => {
|
|
107
|
+
switch (r) {
|
|
108
|
+
case "positive":
|
|
109
|
+
return "green";
|
|
110
|
+
case "negative":
|
|
111
|
+
return "red";
|
|
112
|
+
default:
|
|
113
|
+
return "blue";
|
|
114
|
+
}
|
|
115
|
+
}, u = y(() => k(s.value)), g = y(() => k(e.value)), n = y(() => b.value === "small" ? "body" : m.value !== "text" ? "title" : null), D = y(() => ({
|
|
116
|
+
medium: b.value === "large",
|
|
117
|
+
strongest: b.value === "small",
|
|
118
|
+
wide: b.value === "small",
|
|
119
|
+
variant: n.value
|
|
120
|
+
})), V = y(() => a.fitContent ? { width: "fit-content" } : {}), N = y(() => ({ "b-summary-grid-item--slashed-zero": S.value })), U = T(), B = _(U), O = y(() => a.underlineTooltipText || B("dashed-underline"));
|
|
121
|
+
return (r, he) => (i(), I("div", {
|
|
122
|
+
class: J(["b-summary-grid-item", N.value]),
|
|
123
|
+
style: F(V.value)
|
|
124
|
+
}, [
|
|
125
|
+
M("div", le, [
|
|
126
|
+
L(t(w), {
|
|
127
|
+
class: "b-summary-grid-item__title",
|
|
128
|
+
el: "span",
|
|
129
|
+
variant: "body"
|
|
130
|
+
}, {
|
|
131
|
+
default: o(() => [
|
|
132
|
+
O.value ? (i(), c(t(X), {
|
|
133
|
+
key: 0,
|
|
134
|
+
"tooltip-text": r.underlineTooltipText
|
|
135
|
+
}, h({
|
|
136
|
+
default: o(() => [
|
|
137
|
+
f(p(r.title) + " ", 1)
|
|
138
|
+
]),
|
|
139
|
+
_: 2
|
|
140
|
+
}, [
|
|
141
|
+
t(B)("dashed-underline") ? {
|
|
142
|
+
name: "popover-content",
|
|
143
|
+
fn: o(() => [
|
|
144
|
+
d(r.$slots, "dashed-underline", {}, void 0, !0)
|
|
145
|
+
]),
|
|
146
|
+
key: "0"
|
|
147
|
+
} : void 0
|
|
148
|
+
]), 1032, ["tooltip-text"])) : (i(), I(G, { key: 1 }, [
|
|
149
|
+
f(p(r.title), 1)
|
|
150
|
+
], 64))
|
|
151
|
+
]),
|
|
152
|
+
_: 3
|
|
153
|
+
}),
|
|
154
|
+
M("div", ie, [
|
|
155
|
+
r.copy ? (i(), c(t(ee), {
|
|
156
|
+
key: 0,
|
|
157
|
+
class: "b-structured-list__icon",
|
|
158
|
+
text: r.copy
|
|
159
|
+
}, null, 8, ["text"])) : $("", !0),
|
|
160
|
+
r.infoIconTooltipText ? (i(), c(t(x), {
|
|
161
|
+
key: 1,
|
|
162
|
+
"tooltip-text": r.infoIconTooltipText,
|
|
163
|
+
"tooltip-position": "top",
|
|
164
|
+
class: "b-summary-grid-item__title-tooltip"
|
|
165
|
+
}, null, 8, ["tooltip-text"])) : $("", !0)
|
|
166
|
+
])
|
|
167
|
+
]),
|
|
168
|
+
L(t(w), K({
|
|
169
|
+
"data-testid": "summary-grid-item-content-typography",
|
|
170
|
+
class: "b-summary-grid-item__title"
|
|
171
|
+
}, D.value, { el: "span" }), {
|
|
172
|
+
default: o(() => [
|
|
173
|
+
d(r.$slots, "default", {}, void 0, !0),
|
|
174
|
+
r.trend && t(m) !== "text" ? (i(), c(t(R), {
|
|
175
|
+
key: 0,
|
|
176
|
+
variant: u.value,
|
|
177
|
+
label: r.trend,
|
|
178
|
+
class: "b-summary-grid-item__content-trend"
|
|
179
|
+
}, null, 8, ["variant", "label"])) : $("", !0)
|
|
180
|
+
]),
|
|
181
|
+
_: 3
|
|
182
|
+
}, 16),
|
|
183
|
+
t(B)("secondary") ? (i(), c(t(w), {
|
|
184
|
+
key: 0,
|
|
185
|
+
class: "b-summary-grid-item__title",
|
|
186
|
+
"data-testid": "summary-grid-item-secondary-metric-typography",
|
|
187
|
+
el: "span",
|
|
188
|
+
variant: "caption",
|
|
189
|
+
stronger: ""
|
|
190
|
+
}, {
|
|
191
|
+
default: o(() => [
|
|
192
|
+
d(r.$slots, "secondary", {}, void 0, !0),
|
|
193
|
+
r.secondaryTrend ? (i(), c(t(R), {
|
|
194
|
+
key: 0,
|
|
195
|
+
variant: g.value,
|
|
196
|
+
label: r.secondaryTrend,
|
|
197
|
+
class: "b-summary-grid-item__content-trend"
|
|
198
|
+
}, null, 8, ["variant", "label"])) : $("", !0)
|
|
199
|
+
]),
|
|
200
|
+
_: 3
|
|
201
|
+
})) : $("", !0)
|
|
202
|
+
], 6));
|
|
203
|
+
}
|
|
204
|
+
}), C = /* @__PURE__ */ z(ae, [["__scopeId", "data-v-65135ddf"]]), se = { class: "b-summary-grid-item-amount__content" }, de = {
|
|
205
|
+
key: 0,
|
|
206
|
+
class: "b-summary-grid-item-amount__secondary-label"
|
|
207
|
+
}, ue = {}, ce = /* @__PURE__ */ v({
|
|
208
|
+
...ue,
|
|
209
|
+
__name: "summary-grid-item-amount",
|
|
210
|
+
props: {
|
|
211
|
+
label: {},
|
|
212
|
+
secondaryLabel: { default: null },
|
|
213
|
+
secondaryMetric: { default: null },
|
|
214
|
+
copy: { default: void 0 },
|
|
215
|
+
fitContent: { type: Boolean, default: !1 },
|
|
216
|
+
infoIconTooltipText: { default: null },
|
|
217
|
+
size: { default: "small" },
|
|
218
|
+
title: {},
|
|
219
|
+
trend: { default: null },
|
|
220
|
+
trendDirection: { default: "positive" },
|
|
221
|
+
secondaryTrend: { default: null },
|
|
222
|
+
secondaryTrendDirection: { default: "positive" },
|
|
223
|
+
underlineTooltipText: { default: null }
|
|
224
|
+
},
|
|
225
|
+
setup(l) {
|
|
226
|
+
const a = T(), s = _(a);
|
|
227
|
+
return (e, m) => (i(), c(t(C), {
|
|
228
|
+
"item-type": "amount",
|
|
229
|
+
"info-icon-tooltip-text": e.infoIconTooltipText,
|
|
230
|
+
title: e.title,
|
|
231
|
+
copy: e.copy,
|
|
232
|
+
"fit-content": e.fitContent,
|
|
233
|
+
size: e.size,
|
|
234
|
+
trend: e.trend,
|
|
235
|
+
"trend-direction": e.trendDirection,
|
|
236
|
+
"secondary-trend": e.secondaryTrend,
|
|
237
|
+
"secondary-trend-direction": e.secondaryTrendDirection,
|
|
238
|
+
"underline-tooltip-text": e.underlineTooltipText,
|
|
239
|
+
class: "b-summary-grid-item-amount"
|
|
240
|
+
}, h({
|
|
241
|
+
default: o(() => [
|
|
242
|
+
M("div", se, [
|
|
243
|
+
M("div", null, p(e.label), 1),
|
|
244
|
+
e.secondaryLabel ? (i(), I("div", de, p(e.secondaryLabel), 1)) : $("", !0)
|
|
245
|
+
])
|
|
246
|
+
]),
|
|
247
|
+
_: 2
|
|
248
|
+
}, [
|
|
249
|
+
t(s)("dashed-underline") ? {
|
|
250
|
+
name: "dashed-underline",
|
|
251
|
+
fn: o(() => [
|
|
252
|
+
d(e.$slots, "dashed-underline", {}, void 0, !0)
|
|
253
|
+
]),
|
|
254
|
+
key: "0"
|
|
255
|
+
} : void 0,
|
|
256
|
+
e.secondaryMetric ? {
|
|
257
|
+
name: "secondary",
|
|
258
|
+
fn: o(() => [
|
|
259
|
+
f(p(e.secondaryMetric), 1)
|
|
260
|
+
]),
|
|
261
|
+
key: "1"
|
|
262
|
+
} : void 0
|
|
263
|
+
]), 1032, ["info-icon-tooltip-text", "title", "copy", "fit-content", "size", "trend", "trend-direction", "secondary-trend", "secondary-trend-direction", "underline-tooltip-text"]));
|
|
264
|
+
}
|
|
265
|
+
}), we = /* @__PURE__ */ z(ce, [["__scopeId", "data-v-8219d760"]]), me = {}, ze = /* @__PURE__ */ v({
|
|
266
|
+
...me,
|
|
267
|
+
__name: "summary-grid-item-numeric",
|
|
268
|
+
props: {
|
|
269
|
+
label: {},
|
|
270
|
+
secondaryMetric: { default: null },
|
|
271
|
+
copy: { default: void 0 },
|
|
272
|
+
fitContent: { type: Boolean, default: !1 },
|
|
273
|
+
infoIconTooltipText: { default: null },
|
|
274
|
+
size: { default: "small" },
|
|
275
|
+
title: {},
|
|
276
|
+
trend: { default: null },
|
|
277
|
+
trendDirection: { default: "positive" },
|
|
278
|
+
secondaryTrend: { default: null },
|
|
279
|
+
secondaryTrendDirection: { default: "positive" },
|
|
280
|
+
underlineTooltipText: { default: null }
|
|
281
|
+
},
|
|
282
|
+
setup(l) {
|
|
283
|
+
const a = T(), s = _(a);
|
|
284
|
+
return (e, m) => (i(), c(t(C), {
|
|
285
|
+
"item-type": "numeric",
|
|
286
|
+
"info-icon-tooltip-text": e.infoIconTooltipText,
|
|
287
|
+
title: e.title,
|
|
288
|
+
copy: e.copy,
|
|
289
|
+
"fit-content": e.fitContent,
|
|
290
|
+
size: e.size,
|
|
291
|
+
trend: e.trend,
|
|
292
|
+
"trend-direction": e.trendDirection,
|
|
293
|
+
"secondary-trend": e.secondaryTrend,
|
|
294
|
+
"secondary-trend-direction": e.secondaryTrendDirection,
|
|
295
|
+
"underline-tooltip-text": e.underlineTooltipText,
|
|
296
|
+
class: "b-summary-grid-item-numeric"
|
|
297
|
+
}, h({
|
|
298
|
+
default: o(() => [
|
|
299
|
+
f(" " + p(e.label) + " ", 1)
|
|
300
|
+
]),
|
|
301
|
+
_: 2
|
|
302
|
+
}, [
|
|
303
|
+
t(s)("dashed-underline") ? {
|
|
304
|
+
name: "dashed-underline",
|
|
305
|
+
fn: o(() => [
|
|
306
|
+
d(e.$slots, "dashed-underline")
|
|
307
|
+
]),
|
|
308
|
+
key: "0"
|
|
309
|
+
} : void 0,
|
|
310
|
+
e.secondaryMetric ? {
|
|
311
|
+
name: "secondary",
|
|
312
|
+
fn: o(() => [
|
|
313
|
+
f(p(e.secondaryMetric), 1)
|
|
314
|
+
]),
|
|
315
|
+
key: "1"
|
|
316
|
+
} : void 0
|
|
317
|
+
]), 1032, ["info-icon-tooltip-text", "title", "copy", "fit-content", "size", "trend", "trend-direction", "secondary-trend", "secondary-trend-direction", "underline-tooltip-text"]));
|
|
318
|
+
}
|
|
319
|
+
}), pe = {}, Ee = /* @__PURE__ */ v({
|
|
320
|
+
...pe,
|
|
321
|
+
__name: "summary-grid-item-percentage",
|
|
322
|
+
props: {
|
|
323
|
+
label: {},
|
|
324
|
+
secondaryMetric: { default: null },
|
|
325
|
+
copy: { default: void 0 },
|
|
326
|
+
fitContent: { type: Boolean, default: !1 },
|
|
327
|
+
infoIconTooltipText: { default: null },
|
|
328
|
+
size: { default: "small" },
|
|
329
|
+
title: {},
|
|
330
|
+
trend: { default: null },
|
|
331
|
+
trendDirection: { default: "positive" },
|
|
332
|
+
secondaryTrend: { default: null },
|
|
333
|
+
secondaryTrendDirection: { default: "positive" },
|
|
334
|
+
underlineTooltipText: { default: null }
|
|
335
|
+
},
|
|
336
|
+
setup(l) {
|
|
337
|
+
const a = T(), s = _(a);
|
|
338
|
+
return (e, m) => (i(), c(t(C), {
|
|
339
|
+
"item-type": "percentage",
|
|
340
|
+
"info-icon-tooltip-text": e.infoIconTooltipText,
|
|
341
|
+
title: e.title,
|
|
342
|
+
copy: e.copy,
|
|
343
|
+
"fit-content": e.fitContent,
|
|
344
|
+
size: e.size,
|
|
345
|
+
trend: e.trend,
|
|
346
|
+
"trend-direction": e.trendDirection,
|
|
347
|
+
"secondary-trend": e.secondaryTrend,
|
|
348
|
+
"secondary-trend-direction": e.secondaryTrendDirection,
|
|
349
|
+
"underline-tooltip-text": e.underlineTooltipText,
|
|
350
|
+
class: "b-summary-grid-item-percentage"
|
|
351
|
+
}, h({
|
|
352
|
+
default: o(() => [
|
|
353
|
+
f(" " + p(e.label) + "% ", 1)
|
|
354
|
+
]),
|
|
355
|
+
_: 2
|
|
356
|
+
}, [
|
|
357
|
+
t(s)("dashed-underline") ? {
|
|
358
|
+
name: "dashed-underline",
|
|
359
|
+
fn: o(() => [
|
|
360
|
+
d(e.$slots, "dashed-underline")
|
|
361
|
+
]),
|
|
362
|
+
key: "0"
|
|
363
|
+
} : void 0,
|
|
364
|
+
e.secondaryMetric ? {
|
|
365
|
+
name: "secondary",
|
|
366
|
+
fn: o(() => [
|
|
367
|
+
f(p(e.secondaryMetric) + "% ", 1)
|
|
368
|
+
]),
|
|
369
|
+
key: "1"
|
|
370
|
+
} : void 0
|
|
371
|
+
]), 1032, ["info-icon-tooltip-text", "title", "copy", "fit-content", "size", "trend", "trend-direction", "secondary-trend", "secondary-trend-direction", "underline-tooltip-text"]));
|
|
372
|
+
}
|
|
373
|
+
}), fe = {}, Le = /* @__PURE__ */ v({
|
|
374
|
+
...fe,
|
|
375
|
+
__name: "summary-grid-item-text",
|
|
376
|
+
props: {
|
|
377
|
+
copy: { default: void 0 },
|
|
378
|
+
fitContent: { type: Boolean, default: !1 },
|
|
379
|
+
infoIconTooltipText: { default: null },
|
|
380
|
+
label: {},
|
|
381
|
+
title: {},
|
|
382
|
+
underlineTooltipText: { default: null }
|
|
383
|
+
},
|
|
384
|
+
setup(l) {
|
|
385
|
+
const a = T(), s = _(a);
|
|
386
|
+
return (e, m) => (i(), c(t(C), {
|
|
387
|
+
"item-type": "text",
|
|
388
|
+
"info-icon-tooltip-text": e.infoIconTooltipText,
|
|
389
|
+
title: e.title,
|
|
390
|
+
copy: e.copy,
|
|
391
|
+
"fit-content": e.fitContent,
|
|
392
|
+
"underline-tooltip-text": e.underlineTooltipText,
|
|
393
|
+
class: "b-summary-grid-item-text"
|
|
394
|
+
}, h({
|
|
395
|
+
default: o(() => [
|
|
396
|
+
f(" " + p(e.label), 1)
|
|
397
|
+
]),
|
|
398
|
+
_: 2
|
|
399
|
+
}, [
|
|
400
|
+
t(s)("dashed-underline") ? {
|
|
401
|
+
name: "dashed-underline",
|
|
402
|
+
fn: o(() => [
|
|
403
|
+
d(e.$slots, "dashed-underline")
|
|
404
|
+
]),
|
|
405
|
+
key: "0"
|
|
406
|
+
} : void 0
|
|
407
|
+
]), 1032, ["info-icon-tooltip-text", "title", "copy", "fit-content", "underline-tooltip-text"]));
|
|
408
|
+
}
|
|
409
|
+
}), ye = {}, Re = /* @__PURE__ */ v({
|
|
410
|
+
...ye,
|
|
411
|
+
__name: "summary-grid-item-custom",
|
|
412
|
+
props: {
|
|
413
|
+
copy: { default: void 0 },
|
|
414
|
+
infoIconTooltipText: { default: null },
|
|
415
|
+
title: {},
|
|
416
|
+
fitContent: { type: Boolean, default: !1 },
|
|
417
|
+
underlineTooltipText: { default: null }
|
|
418
|
+
},
|
|
419
|
+
setup(l) {
|
|
420
|
+
const a = T(), s = _(a);
|
|
421
|
+
return (e, m) => (i(), c(C, {
|
|
422
|
+
title: e.title,
|
|
423
|
+
"info-icon-tooltip-text": e.infoIconTooltipText,
|
|
424
|
+
copy: e.copy,
|
|
425
|
+
"fit-content": e.fitContent,
|
|
426
|
+
"underline-tooltip-text": e.underlineTooltipText
|
|
427
|
+
}, h({
|
|
428
|
+
default: o(() => [
|
|
429
|
+
d(e.$slots, "default")
|
|
430
|
+
]),
|
|
431
|
+
_: 2
|
|
432
|
+
}, [
|
|
433
|
+
t(s)("dashed-underline") ? {
|
|
434
|
+
name: "dashed-underline",
|
|
435
|
+
fn: o(() => [
|
|
436
|
+
d(e.$slots, "dashed-underline")
|
|
437
|
+
]),
|
|
438
|
+
key: "0"
|
|
439
|
+
} : void 0
|
|
440
|
+
]), 1032, ["title", "info-icon-tooltip-text", "copy", "fit-content", "underline-tooltip-text"]));
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
var ve = /* @__PURE__ */ ((l) => (l.SMALL = "small", l.MEDIUM = "medium", l.LARGE = "large", l))(ve || {}), Te = /* @__PURE__ */ ((l) => (l.POSITIVE = "positive", l.NEGATIVE = "negative", l.NEUTRAL = "neutral", l))(Te || {});
|
|
444
|
+
export {
|
|
445
|
+
ve as B,
|
|
446
|
+
ze as _,
|
|
447
|
+
we as a,
|
|
448
|
+
Ee as b,
|
|
449
|
+
Le as c,
|
|
450
|
+
Re as d,
|
|
451
|
+
Te as e,
|
|
452
|
+
Be as s
|
|
453
|
+
};
|
|
454
|
+
//# sourceMappingURL=summary-grid.types.DzvuP-NU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary-grid.types.DzvuP-NU.js","sources":["../../../vue2/src/components/summary-grid/summary-grid.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue","../../../vue2/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 = withDefaults(defineProps<BentoSummaryGridProps>(), {\n columnWidth: null,\n slashedZero: 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 = withDefaults(defineProps<BentoSummaryGridItemProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n itemType: 'custom',\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlineTooltipText: null,\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 withDefaults(defineProps<BentoSummaryGridItemAmountProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n secondaryLabel: null,\n secondaryMetric: null,\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlineTooltipText: 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 withDefaults(defineProps<BentoSummaryGridItemNumericProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n secondaryMetric: null,\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlineTooltipText: 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 withDefaults(defineProps<BentoSummaryGridItemPercentageProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n secondaryMetric: null,\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlineTooltipText: 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 withDefaults(defineProps<BentoSummaryGridItemTextProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n underlineTooltipText: 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 withDefaults(defineProps<BentoSummaryGridItemCustomProps>(), {\n copy: undefined,\n infoIconTooltipText: null,\n fitContent: false,\n underlineTooltipText: 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","props","__props","slots","useSlots","hasSlot","useHasSlot","numberOfRows","slotRows","_b","_a","slotName","onMounted","provide","SUMMARY_GRID_LAYOUT_INJECTION_KEY","SUMMARY_GRID_SLASHED_ZERO","toRef","__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":"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"}
|