@mx-cartographer/experiences 7.4.10 → 7.4.11
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/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SxProps } from '@mui/material/styles';
|
|
2
|
+
interface MicroCardTemplateProps {
|
|
3
|
+
avatarSx?: SxProps;
|
|
4
|
+
cardSx?: SxProps;
|
|
5
|
+
description: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
hasCardEffect?: boolean;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
onPrimaryAction?: () => void;
|
|
10
|
+
onSecondaryAction?: () => void;
|
|
11
|
+
primaryActionText?: string;
|
|
12
|
+
secondaryActionText?: string;
|
|
13
|
+
title: string;
|
|
14
|
+
}
|
|
15
|
+
declare const MicroCardTemplate: ({ avatarSx, cardSx, description, icon, hasCardEffect, onClose, onPrimaryAction, onSecondaryAction, primaryActionText, secondaryActionText, title, }: MicroCardTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default MicroCardTemplate;
|
|
@@ -10,3 +10,4 @@ export { default as ViewMoreMicroCard } from './cards/ViewMoreMicroCard';
|
|
|
10
10
|
export { default as ZeroStateCard } from './cards/ZeroStateCard';
|
|
11
11
|
export { ChartFilledIcon, MonthlySpendComparisonIcon, ZeroStateIcon } from './beaticons';
|
|
12
12
|
export type { MicroWidgetProps, StyleProps } from './interfaces';
|
|
13
|
+
export { default as MicroCardTemplate } from './MicroCardTemplate';
|
|
@@ -1,16 +1,103 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as V, B as _, C as A, c as F, a as R, b as $, I as q, M as G, d as J, N as K, V as Q, Z as U, e as X } from "../ViewMoreMicroCard-DwR0v_ll.mjs";
|
|
2
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import g from "@mui/material/Avatar";
|
|
4
|
+
import v from "@mui/material/Box";
|
|
5
|
+
import d from "@mui/material/Button";
|
|
6
|
+
import u from "@mui/material/Card";
|
|
7
|
+
import I from "@mui/material/IconButton";
|
|
8
|
+
import t from "@mui/material/Stack";
|
|
9
|
+
import { Text as i, P as M } from "@mxenabled/mxui";
|
|
10
|
+
import { Close as w, Error as B } from "@mxenabled/mx-icons";
|
|
11
|
+
const k = {
|
|
12
|
+
close: "Close"
|
|
13
|
+
}, y = ({
|
|
14
|
+
avatarSx: p,
|
|
15
|
+
cardSx: h,
|
|
16
|
+
description: m,
|
|
17
|
+
icon: x = /* @__PURE__ */ e(B, {}),
|
|
18
|
+
hasCardEffect: C = !1,
|
|
19
|
+
onClose: a,
|
|
20
|
+
onPrimaryAction: s,
|
|
21
|
+
onSecondaryAction: n,
|
|
22
|
+
primaryActionText: l,
|
|
23
|
+
secondaryActionText: c,
|
|
24
|
+
title: b
|
|
25
|
+
}) => {
|
|
26
|
+
const o = !!(s && l), f = !!(n && c);
|
|
27
|
+
return /* @__PURE__ */ r(
|
|
28
|
+
C ? u : v,
|
|
29
|
+
{
|
|
30
|
+
sx: {
|
|
31
|
+
pb: 8,
|
|
32
|
+
position: "relative",
|
|
33
|
+
pt: 16,
|
|
34
|
+
px: 16,
|
|
35
|
+
...h
|
|
36
|
+
},
|
|
37
|
+
children: [
|
|
38
|
+
a && /* @__PURE__ */ e(
|
|
39
|
+
I,
|
|
40
|
+
{
|
|
41
|
+
"aria-label": k.close,
|
|
42
|
+
onClick: a,
|
|
43
|
+
sx: { minHeight: 40, minWidth: 40, position: "absolute", right: 4, top: 4 },
|
|
44
|
+
children: /* @__PURE__ */ e(w, {})
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ r(t, { sx: { gap: 6 }, children: [
|
|
48
|
+
/* @__PURE__ */ r(t, { sx: { flexDirection: "row", gap: 12 }, children: [
|
|
49
|
+
/* @__PURE__ */ e(
|
|
50
|
+
g,
|
|
51
|
+
{
|
|
52
|
+
sx: {
|
|
53
|
+
height: 32,
|
|
54
|
+
width: 32,
|
|
55
|
+
...p
|
|
56
|
+
},
|
|
57
|
+
variant: "rounded",
|
|
58
|
+
children: x
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
/* @__PURE__ */ r(t, { sx: { gap: 6 }, children: [
|
|
62
|
+
/* @__PURE__ */ e(t, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: /* @__PURE__ */ e(i, { bold: !0, sx: { lineHeight: 16 }, variant: "body1", children: b }) }),
|
|
63
|
+
/* @__PURE__ */ e(
|
|
64
|
+
M,
|
|
65
|
+
{
|
|
66
|
+
dangerouslySetInnerHTML: { __html: m },
|
|
67
|
+
sx: {
|
|
68
|
+
display: "-webkit-box",
|
|
69
|
+
overflow: "hidden",
|
|
70
|
+
textOverflow: "ellipsis",
|
|
71
|
+
WebkitBoxOrient: "vertical",
|
|
72
|
+
WebkitLineClamp: o ? 2 : 3
|
|
73
|
+
},
|
|
74
|
+
variant: "subtitle2"
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
] })
|
|
78
|
+
] }),
|
|
79
|
+
o && /* @__PURE__ */ r(t, { sx: { alignItems: "center", flexDirection: "row", height: 28, pb: 4, pl: 36 }, children: [
|
|
80
|
+
o && /* @__PURE__ */ e(d, { onClick: s, size: "small", sx: { px: 8 }, variant: "text", children: /* @__PURE__ */ e(i, { bold: !0, variant: "body2", children: l }) }),
|
|
81
|
+
f && /* @__PURE__ */ e(d, { onClick: n, size: "small", sx: { px: 8 }, variant: "text", children: /* @__PURE__ */ e(i, { bold: !0, sx: { color: "text.secondary" }, variant: "body2", children: c }) })
|
|
82
|
+
] })
|
|
83
|
+
] })
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}, L = y;
|
|
2
88
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
89
|
+
V as AppStore,
|
|
90
|
+
_ as BaseCard,
|
|
91
|
+
A as CarouselHeader,
|
|
92
|
+
F as ChartFilledIcon,
|
|
93
|
+
R as InsightCard,
|
|
94
|
+
$ as InsightsMicroWidget,
|
|
95
|
+
q as InsightsMicroWidgetDataProvider,
|
|
96
|
+
G as MicroBeatCarousel,
|
|
97
|
+
L as MicroCardTemplate,
|
|
98
|
+
J as MonthlySpendComparisonIcon,
|
|
99
|
+
K as NoRelevantInsightsCard,
|
|
100
|
+
Q as ViewMoreMicroCard,
|
|
101
|
+
U as ZeroStateCard,
|
|
102
|
+
X as ZeroStateIcon
|
|
16
103
|
};
|