qt-ui-kit 1.0.85 → 1.0.87

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.mjs CHANGED
@@ -16264,7 +16264,11 @@ function EmailBody({
16264
16264
  attachments,
16265
16265
  body
16266
16266
  }) {
16267
- const safeText = DOMPurify.sanitize(body ? body.replace(/\n/g, "<br>") : "");
16267
+ function isHtml(content) {
16268
+ return /<\/?[a-z][\s\S]*>/i.test(content);
16269
+ }
16270
+ const isHtmlContent = body && isHtml(body);
16271
+ const safeText = isHtmlContent ? DOMPurify.sanitize(body) : DOMPurify.sanitize(body?.replace(/\n/g, "<br>") || "");
16268
16272
  return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-4 bg-white p-4 rounded-b-2xl overflow-auto", children: [
16269
16273
  /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-0.5", children: [
16270
16274
  /* @__PURE__ */ jsx31(MetadataRow, { metadata: [`Subject: ${subjectLine}`] }),
@@ -16276,12 +16280,12 @@ function EmailBody({
16276
16280
  /* @__PURE__ */ jsx31(MetadataRow, { metadata: [`Attachments: ${attachments}`] })
16277
16281
  ] }),
16278
16282
  /* @__PURE__ */ jsx31("hr", { className: "text-qtneutral-500" }),
16279
- /* @__PURE__ */ jsx31("div", { className: "body-medium prose break-all whitespace-pre-line", children: body && /* @__PURE__ */ jsx31(
16283
+ /* @__PURE__ */ jsx31("div", { className: "body-small break-all whitespace-pre-line flex", children: body && /* @__PURE__ */ jsx31(
16280
16284
  "iframe",
16281
16285
  {
16282
- srcDoc: `<div style="font-family: sans-serif;">${safeText}</div>`,
16286
+ srcDoc: `<div style="font-family: sans-serif; padding: 0px; margin: 0px;">${safeText}</div>`,
16283
16287
  sandbox: "allow-popups",
16284
- style: { border: 0, width: "100%" },
16288
+ style: { border: 0, width: "100%", height: "500px" },
16285
16289
  title: "Plain Text Email"
16286
16290
  }
16287
16291
  ) })