@mx-cartographer/insights-ui 1.16.20 → 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;
@@ -7,7 +7,6 @@ interface DescriptionProps {
7
7
  hasFullWidthImage?: boolean;
8
8
  inDescriptionCtaOnClick?: () => void;
9
9
  sx?: SxProps;
10
- textSx?: SxProps;
11
10
  }
12
11
  export declare const Description: React.FC<DescriptionProps>;
13
12
  export {};
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
- textSx: l,
1247
- descriptionPlacement: s = "bottom",
1248
- hideDescription: o = !1,
1249
- inDescriptionCtaOnClick: a,
1250
- isLoading: c = !1,
1251
- isMini: h = !1,
1252
- hasFullWidthImage: m,
1253
- hasFooterButton: u = !1,
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 k = () => o || !n.html_description ? null : h ? /* @__PURE__ */ e(Vt, { content: n.html_description, isLoading: c, sx: y }) : /* @__PURE__ */ e(
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: u,
1261
- hasFullWidthImage: m,
1262
- inDescriptionCtaOnClick: a,
1263
- sx: y,
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
- s === "top" && k(),
1269
- /* @__PURE__ */ e(p, { sx: { alignItems: "center", ...m && h && { mx: -16 } }, children: r }),
1270
- s === "bottom" && k(),
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, sx: { mb: 0 }, title: r.html_title }),
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: a, in_description_cta: c } = t, h = n ? 16 : 8;
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: a },
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
- c && l && /* @__PURE__ */ d(X, { fullWidth: !0, onClick: l, sx: { mb: h }, children: [
1374
- c,
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
  ]
@@ -1700,7 +1695,8 @@ const s1 = ({
1700
1695
  beat: n,
1701
1696
  buttonProps: r,
1702
1697
  header: l,
1703
- isMini: s
1698
+ isMini: s,
1699
+ ...o
1704
1700
  }) => /* @__PURE__ */ e(
1705
1701
  H,
1706
1702
  {
@@ -1711,11 +1707,17 @@ const s1 = ({
1711
1707
  {
1712
1708
  beat: n,
1713
1709
  ...r,
1714
- onClick: (o) => r?.onClick?.(o, K.Primary)
1710
+ onClick: (a) => r?.onClick?.(a, K.Primary)
1715
1711
  }
1716
1712
  ),
1713
+ contentProps: {
1714
+ sx: {
1715
+ mt: -16
1716
+ }
1717
+ },
1717
1718
  header: l,
1718
1719
  isMini: s,
1720
+ ...o,
1719
1721
  children: /* @__PURE__ */ e(G, {})
1720
1722
  }
1721
1723
  ), c1 = ({