@mx-cartographer/insights-ui 1.16.21 → 1.16.22
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.
|
@@ -5,7 +5,6 @@ export interface ContentAndDescriptionProps {
|
|
|
5
5
|
asteriskText?: string;
|
|
6
6
|
beat: Beat;
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
-
textSx?: SxProps;
|
|
9
8
|
descriptionPlacement?: 'top' | 'bottom';
|
|
10
9
|
hideDescription?: boolean;
|
|
11
10
|
inDescriptionCtaOnClick?: (event?: React.MouseEvent<HTMLButtonElement, MouseEvent> | string) => void;
|
package/dist/index.es.js
CHANGED
|
@@ -1243,31 +1243,29 @@ const pe = (t) => {
|
|
|
1243
1243
|
asteriskText: t,
|
|
1244
1244
|
beat: n,
|
|
1245
1245
|
children: r,
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
sx: y
|
|
1246
|
+
descriptionPlacement: l = "bottom",
|
|
1247
|
+
hideDescription: s = !1,
|
|
1248
|
+
inDescriptionCtaOnClick: o,
|
|
1249
|
+
isLoading: a = !1,
|
|
1250
|
+
isMini: c = !1,
|
|
1251
|
+
hasFullWidthImage: h,
|
|
1252
|
+
hasFooterButton: m = !1,
|
|
1253
|
+
sx: u
|
|
1255
1254
|
}) => {
|
|
1256
|
-
const
|
|
1255
|
+
const y = () => s || !n.html_description ? null : c ? /* @__PURE__ */ e(Vt, { content: n.html_description, isLoading: a, sx: u }) : /* @__PURE__ */ e(
|
|
1257
1256
|
Gt,
|
|
1258
1257
|
{
|
|
1259
1258
|
beat: n,
|
|
1260
|
-
footerButton:
|
|
1261
|
-
hasFullWidthImage:
|
|
1262
|
-
inDescriptionCtaOnClick:
|
|
1263
|
-
sx:
|
|
1264
|
-
textSx: l
|
|
1259
|
+
footerButton: m,
|
|
1260
|
+
hasFullWidthImage: h,
|
|
1261
|
+
inDescriptionCtaOnClick: o,
|
|
1262
|
+
sx: u
|
|
1265
1263
|
}
|
|
1266
1264
|
);
|
|
1267
1265
|
return /* @__PURE__ */ d(G, { children: [
|
|
1268
|
-
|
|
1269
|
-
/* @__PURE__ */ e(p, { sx: { alignItems: "center", ...
|
|
1270
|
-
|
|
1266
|
+
l === "top" && y(),
|
|
1267
|
+
/* @__PURE__ */ e(p, { sx: { alignItems: "center", ...h && c && { mx: -16 } }, children: r }),
|
|
1268
|
+
l === "bottom" && y(),
|
|
1271
1269
|
t && /* @__PURE__ */ e(
|
|
1272
1270
|
C,
|
|
1273
1271
|
{
|
|
@@ -1296,7 +1294,7 @@ const pe = (t) => {
|
|
|
1296
1294
|
isLoading: u = !1,
|
|
1297
1295
|
isMini: y = !1
|
|
1298
1296
|
}) => /* @__PURE__ */ d(p, { sx: { height: "100%" }, children: [
|
|
1299
|
-
/* @__PURE__ */ e(Lt, { ...h, isMini: y,
|
|
1297
|
+
/* @__PURE__ */ e(Lt, { ...h, isMini: y, title: r.html_title }),
|
|
1300
1298
|
m ? /* @__PURE__ */ e(Ht, { erroredText: a }) : /* @__PURE__ */ d(G, { children: [
|
|
1301
1299
|
/* @__PURE__ */ e(
|
|
1302
1300
|
Ot,
|
|
@@ -1307,7 +1305,6 @@ const pe = (t) => {
|
|
|
1307
1305
|
hasFooterButton: !!l,
|
|
1308
1306
|
isLoading: u,
|
|
1309
1307
|
isMini: y,
|
|
1310
|
-
textSx: { pt: 12 },
|
|
1311
1308
|
children: u ? /* @__PURE__ */ e(It, { altLoadingText: t }) : s
|
|
1312
1309
|
}
|
|
1313
1310
|
),
|
|
@@ -1337,10 +1334,9 @@ const pe = (t) => {
|
|
|
1337
1334
|
footerButton: n,
|
|
1338
1335
|
hasFullWidthImage: r,
|
|
1339
1336
|
inDescriptionCtaOnClick: l,
|
|
1340
|
-
sx: s
|
|
1341
|
-
textSx: o
|
|
1337
|
+
sx: s
|
|
1342
1338
|
}) => {
|
|
1343
|
-
const { html_description:
|
|
1339
|
+
const { html_description: o, in_description_cta: a } = t, c = n ? 16 : 8;
|
|
1344
1340
|
return /* @__PURE__ */ d(
|
|
1345
1341
|
be,
|
|
1346
1342
|
{
|
|
@@ -1355,7 +1351,7 @@ const pe = (t) => {
|
|
|
1355
1351
|
/* @__PURE__ */ e(
|
|
1356
1352
|
M,
|
|
1357
1353
|
{
|
|
1358
|
-
dangerouslySetInnerHTML: { __html:
|
|
1354
|
+
dangerouslySetInnerHTML: { __html: o },
|
|
1359
1355
|
sx: {
|
|
1360
1356
|
m: 0,
|
|
1361
1357
|
pb: 24,
|
|
@@ -1364,14 +1360,13 @@ const pe = (t) => {
|
|
|
1364
1360
|
// The new description design has a 24px padding on the x axis, however, pulse already adds 16px. In order to not break existing insights we are only using 8px here so it adds up to 24. Once all insights are moved to this repo we make pulse 0px and this 24px.
|
|
1365
1361
|
wordBreak: "break-word",
|
|
1366
1362
|
wordWrap: "break-word",
|
|
1367
|
-
...r && { px: 16 }
|
|
1368
|
-
...o
|
|
1363
|
+
...r && { px: 16 }
|
|
1369
1364
|
},
|
|
1370
1365
|
variant: "ParagraphSmall"
|
|
1371
1366
|
}
|
|
1372
1367
|
),
|
|
1373
|
-
|
|
1374
|
-
|
|
1368
|
+
a && l && /* @__PURE__ */ d(X, { fullWidth: !0, onClick: l, sx: { mb: c }, children: [
|
|
1369
|
+
a,
|
|
1375
1370
|
/* @__PURE__ */ e(w, { name: "chevron_right" })
|
|
1376
1371
|
] })
|
|
1377
1372
|
]
|
|
@@ -1715,6 +1710,11 @@ const s1 = ({
|
|
|
1715
1710
|
onClick: (a) => r?.onClick?.(a, K.Primary)
|
|
1716
1711
|
}
|
|
1717
1712
|
),
|
|
1713
|
+
contentProps: {
|
|
1714
|
+
sx: {
|
|
1715
|
+
mt: -16
|
|
1716
|
+
}
|
|
1717
|
+
},
|
|
1718
1718
|
header: l,
|
|
1719
1719
|
isMini: s,
|
|
1720
1720
|
...o,
|