qt-ui-kit 1.0.64 → 1.0.66

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/index.js CHANGED
@@ -15256,7 +15256,7 @@ function SenderSourceRow({
15256
15256
  }) {
15257
15257
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex w-full place-content-between text-neutral-1 text-[14px] leading-[130%] ", children: [
15258
15258
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex gap-[4px] place-items-center", children: [
15259
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "body-small-bold line-clamp-1", children: leftText }),
15259
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "body-small-bold break-all line-clamp-1", children: leftText }),
15260
15260
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "body-smal text-center", children: seperator }),
15261
15261
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "body-small-bold text-center line-clamp-1", children: rightText }),
15262
15262
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "label-3 flex", children: date && formatCustomRelative(date) })
@@ -15754,7 +15754,7 @@ function PreviewCard({
15754
15754
  )
15755
15755
  ] }),
15756
15756
  /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col gap-2 grow ", children: [
15757
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col grow gap-1 ", children: [
15757
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col grow gap-1", children: [
15758
15758
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15759
15759
  SenderSourceRow,
15760
15760
  {
@@ -16498,6 +16498,9 @@ function EventCard({
16498
16498
  }
16499
16499
 
16500
16500
  // src/components/organisms/message_body/email_body.tsx
16501
+ var import_dompurify = __toESM(require("dompurify"));
16502
+ var import_react_markdown = __toESM(require("react-markdown"));
16503
+ var import_rehype_raw = __toESM(require("rehype-raw"));
16501
16504
  var import_jsx_runtime33 = require("react/jsx-runtime");
16502
16505
  function EmailBody({
16503
16506
  subjectLine,
@@ -16509,7 +16512,8 @@ function EmailBody({
16509
16512
  attachments,
16510
16513
  body
16511
16514
  }) {
16512
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col gap-4 bg-white p-4 rounded-b-2xl", children: [
16515
+ const clean = import_dompurify.default.sanitize(body ?? "");
16516
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col gap-4 bg-white p-4 rounded-b-2xl overflow-auto", children: [
16513
16517
  /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col gap-0.5", children: [
16514
16518
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MetadataRow, { metadata: [`Subject: ${subjectLine}`] }),
16515
16519
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MetadataRow, { metadata: [`To: ${to}`] }),
@@ -16520,7 +16524,17 @@ function EmailBody({
16520
16524
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MetadataRow, { metadata: [`Attachments: ${attachments}`] })
16521
16525
  ] }),
16522
16526
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("hr", { className: "text-qtneutral-500" }),
16523
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "body-medium prose break-all", children: body && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("pre", { className: "whitespace-pre-wrap", children: body }) })
16527
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "body-medium prose break-all", children: body && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
16528
+ import_react_markdown.default,
16529
+ {
16530
+ children: clean,
16531
+ rehypePlugins: [import_rehype_raw.default],
16532
+ components: {
16533
+ img: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("img", { style: { maxWidth: "100%" }, ...props })
16534
+ // Apply custom components/styling
16535
+ }
16536
+ }
16537
+ ) })
16524
16538
  ] });
16525
16539
  }
16526
16540
 
@@ -16540,7 +16554,7 @@ function EmojiPill({ emoji, count }) {
16540
16554
 
16541
16555
  // src/util/utilcomponents.tsx
16542
16556
  var import_clsx8 = __toESM(require("clsx"));
16543
- var import_react_markdown = __toESM(require("react-markdown"));
16557
+ var import_react_markdown2 = __toESM(require("react-markdown"));
16544
16558
  var import_remark_gfm = __toESM(require("remark-gfm"));
16545
16559
  var import_jsx_runtime35 = require("react/jsx-runtime");
16546
16560
  function MarkdownRenderer({ content, truncated }) {
@@ -16551,7 +16565,7 @@ function MarkdownRenderer({ content, truncated }) {
16551
16565
  "flex flex-col markdown break-all",
16552
16566
  truncated && "line-clamp-3"
16553
16567
  ),
16554
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_markdown.default, { remarkPlugins: [import_remark_gfm.default], children: content })
16568
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_markdown2.default, { remarkPlugins: [import_remark_gfm.default], children: content })
16555
16569
  }
16556
16570
  );
16557
16571
  }