qt-ui-kit 1.0.59 → 1.0.61

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
@@ -15229,10 +15229,10 @@ function SenderSourceRow({
15229
15229
  }) {
15230
15230
  return /* @__PURE__ */ jsxs9("div", { className: "flex w-full place-content-between text-neutral-1 text-[14px] leading-[130%] flex-nowrap", children: [
15231
15231
  /* @__PURE__ */ jsxs9("div", { className: "flex gap-[4px] place-items-center", children: [
15232
- /* @__PURE__ */ jsx12("div", { className: "body-small-bold text-nowrap", children: leftText }),
15233
- /* @__PURE__ */ jsx12("div", { className: "body-small", children: seperator }),
15234
- /* @__PURE__ */ jsx12("div", { className: "body-small-bold text-nowrap", children: rightText }),
15235
- /* @__PURE__ */ jsx12("div", { className: "label-3 flex text-nowrap", children: date && formatCustomRelative(date) })
15232
+ /* @__PURE__ */ jsx12("div", { className: "body-small-bold line-clamp-1", children: leftText }),
15233
+ /* @__PURE__ */ jsx12("div", { className: "body-smal text-center", children: seperator }),
15234
+ /* @__PURE__ */ jsx12("div", { className: "body-small-bold text-center line-clamp-1", children: rightText }),
15235
+ /* @__PURE__ */ jsx12("div", { className: "label-3 flex flex-nowrap", children: date && formatCustomRelative(date) })
15236
15236
  ] }),
15237
15237
  /* @__PURE__ */ jsx12("div", { onClick, children: /* @__PURE__ */ jsx12(ExternalLink, { size: shrunk ? 16 : 24 }) })
15238
15238
  ] });
@@ -15247,7 +15247,7 @@ function SubjectLineRow({ text }) {
15247
15247
  // src/components/molecules/text_content/metadata_row/metadata_row.tsx
15248
15248
  import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
15249
15249
  function MetadataRow({ metadata }) {
15250
- return /* @__PURE__ */ jsxs10("div", { className: "flex h-[18px] w-full flex-none body-small text-neutral-900 gap-2", children: [
15250
+ return /* @__PURE__ */ jsxs10("div", { className: "flex w-full flex-wrap break-all body-small text-neutral-900 gap-2", children: [
15251
15251
  metadata && /* @__PURE__ */ jsx14("div", { children: metadata[0] + (metadata.length == 2 ? "," : "") }),
15252
15252
  metadata?.length == 2 && /* @__PURE__ */ jsx14("div", { children: metadata[1] })
15253
15253
  ] });
@@ -15696,7 +15696,7 @@ function PreviewCard({
15696
15696
  "div",
15697
15697
  {
15698
15698
  className: clsx4(
15699
- "flex gap-4 h-min w-[409px] bg-neutral-6 rounded-3xl p-4 border-[2px] preview-card-shadow",
15699
+ "flex gap-4 h-min w-[459px] bg-neutral-6 rounded-3xl p-4 border-[2px] preview-card-shadow",
15700
15700
  selected ? "bg-qtpurple-200 border-qtpurple-200" : "",
15701
15701
  !read ? "border-qtpurple-500" : "border-neutral-6"
15702
15702
  ),
@@ -15726,26 +15726,32 @@ function PreviewCard({
15726
15726
  }
15727
15727
  )
15728
15728
  ] }),
15729
- /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-2 w-full", children: [
15730
- /* @__PURE__ */ jsxs14("div", { className: "flex flex-col w-full", children: [
15731
- /* @__PURE__ */ jsx21(
15732
- SenderSourceRow,
15733
- {
15734
- leftText: sender,
15735
- seperator: "via",
15736
- rightText: source,
15737
- date,
15738
- onClick: onClickGoToSource
15739
- }
15740
- ),
15741
- subjectLine && /* @__PURE__ */ jsx21(SubjectLineRow, { text: subjectLine }),
15742
- /* @__PURE__ */ jsx21(MetadataRow, { metadata })
15743
- ] }),
15744
- body && /* @__PURE__ */ jsxs14("div", { className: "bg-white flex flex-col max-w-full w-full gap-2 wrap-anywhere rounded-2xl text-sm p-4 leading-[120%] font-normal", children: [
15745
- /* @__PURE__ */ jsx21("p", { className: "line-clamp-4", children: body }),
15746
- /* @__PURE__ */ jsx21(ThumbGroup, {})
15747
- ] })
15748
- ] })
15729
+ /* @__PURE__ */ jsxs14(
15730
+ "div",
15731
+ {
15732
+ className: "flex flex-col gap-2 w-full\n \n ",
15733
+ children: [
15734
+ /* @__PURE__ */ jsxs14("div", { className: "flex flex-col w-full gap-1", children: [
15735
+ /* @__PURE__ */ jsx21(
15736
+ SenderSourceRow,
15737
+ {
15738
+ leftText: sender,
15739
+ seperator: "via",
15740
+ rightText: source,
15741
+ date,
15742
+ onClick: onClickGoToSource
15743
+ }
15744
+ ),
15745
+ subjectLine && /* @__PURE__ */ jsx21(SubjectLineRow, { text: subjectLine }),
15746
+ /* @__PURE__ */ jsx21(MetadataRow, { metadata })
15747
+ ] }),
15748
+ body && /* @__PURE__ */ jsxs14("div", { className: "bg-white flex flex-col max-w-full w-full gap-2 wrap-anywhere rounded-2xl text-sm p-4 leading-[120%] font-normal", children: [
15749
+ /* @__PURE__ */ jsx21("p", { className: "line-clamp-4", children: body }),
15750
+ /* @__PURE__ */ jsx21(ThumbGroup, {})
15751
+ ] })
15752
+ ]
15753
+ }
15754
+ )
15749
15755
  ]
15750
15756
  }
15751
15757
  );
@@ -16329,7 +16335,8 @@ function SingleEvent({
16329
16335
  source,
16330
16336
  subjectLine,
16331
16337
  onExternal,
16332
- summary
16338
+ summary,
16339
+ urgencyExplanation
16333
16340
  }) {
16334
16341
  const [selected, setSelected] = useState3(false);
16335
16342
  const [expanded, setExpanded] = useState3(false);
@@ -16380,7 +16387,14 @@ function SingleEvent({
16380
16387
  ] }),
16381
16388
  expanded && /* @__PURE__ */ jsxs21(Fragment11, { children: [
16382
16389
  /* @__PURE__ */ jsxs21("div", { children: [
16383
- /* @__PURE__ */ jsx31(IntelCard, { summary, urgency }),
16390
+ /* @__PURE__ */ jsx31(
16391
+ IntelCard,
16392
+ {
16393
+ urgencyText: urgencyExplanation,
16394
+ summary,
16395
+ urgency
16396
+ }
16397
+ ),
16384
16398
  body
16385
16399
  ] }),
16386
16400
  /* @__PURE__ */ jsx31(BrandIcon, { service })
@@ -16409,13 +16423,15 @@ function EventCard({
16409
16423
  SingleEvent,
16410
16424
  {
16411
16425
  urgency: d.urgency,
16426
+ urgencyExplanation: d.urgencyText,
16412
16427
  service: d.service,
16413
16428
  body: d.eventBody,
16414
- startExpanded: i == eventData.length - 1,
16429
+ startExpanded: i == 0,
16415
16430
  sender: d.sender,
16416
16431
  source: d.source,
16417
16432
  subjectLine: d.subjectLine,
16418
- onExternal: () => window.open(d.link, "_blank")
16433
+ onExternal: () => window.open(d.link, "_blank"),
16434
+ summary: d.summary
16419
16435
  }
16420
16436
  )) : /* @__PURE__ */ jsx32(Fragment12, { children: " " }) });
16421
16437
  case "ticket" /* TICKET */:
@@ -16425,11 +16441,12 @@ function EventCard({
16425
16441
  urgency: d.urgency,
16426
16442
  service: d.service,
16427
16443
  body: d.eventBody,
16428
- startExpanded: i == eventData.length - 1,
16444
+ startExpanded: i == 0,
16429
16445
  sender: d.sender,
16430
16446
  source: d.source,
16431
16447
  subjectLine: d.subjectLine,
16432
- onExternal: () => window.open(d.link, "_blank")
16448
+ onExternal: () => window.open(d.link, "_blank"),
16449
+ summary: d.summary
16433
16450
  }
16434
16451
  )) : /* @__PURE__ */ jsx32(Fragment12, { children: " " }) });
16435
16452
  default:
@@ -16460,11 +16477,7 @@ function EventCard({
16460
16477
  }
16461
16478
 
16462
16479
  // src/components/organisms/message_body/email_body.tsx
16463
- import DOMPurify from "dompurify";
16464
16480
  import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
16465
- function isHtml(content) {
16466
- return /<\/?[a-z][\s\S]*>/i.test(content);
16467
- }
16468
16481
  function EmailBody({
16469
16482
  subjectLine,
16470
16483
  to,
@@ -16475,6 +16488,7 @@ function EmailBody({
16475
16488
  attachments,
16476
16489
  body
16477
16490
  }) {
16491
+ body = "Hi Greg,\n\nJust checking in on the milestone for Project Alpha this week. We\u2019re hoping to see visible progress by Friday, per the plan. Can you confirm we\u2019re still on track?\n\nThanks so much,\nDana\n\nDirector Major Projects\nAmtryx Co.";
16478
16492
  return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-4 bg-white p-4 rounded-b-2xl", children: [
16479
16493
  /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-0.5", children: [
16480
16494
  /* @__PURE__ */ jsx33(MetadataRow, { metadata: [`Subject: ${subjectLine}`] }),
@@ -16486,14 +16500,7 @@ function EmailBody({
16486
16500
  /* @__PURE__ */ jsx33(MetadataRow, { metadata: [`Attachments: ${attachments}`] })
16487
16501
  ] }),
16488
16502
  /* @__PURE__ */ jsx33("hr", { className: "text-qtneutral-500" }),
16489
- /* @__PURE__ */ jsx33("div", { className: "body-medium prose break-all", children: body ? isHtml(body) ? /* @__PURE__ */ jsx33(
16490
- "div",
16491
- {
16492
- dangerouslySetInnerHTML: {
16493
- __html: DOMPurify.sanitize(body)
16494
- }
16495
- }
16496
- ) : /* @__PURE__ */ jsx33("pre", { className: "whitespace-pre-wrap", children: body }) : null })
16503
+ /* @__PURE__ */ jsx33("div", { className: "body-medium prose break-all", children: body && /* @__PURE__ */ jsx33("pre", { className: "whitespace-pre-wrap", children: body }) })
16497
16504
  ] });
16498
16505
  }
16499
16506
 
@@ -16666,7 +16673,7 @@ function TicketBody({
16666
16673
  description,
16667
16674
  comments
16668
16675
  }) {
16669
- return /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-4 bg-white p-4 rounded-b-2xl", children: [
16676
+ return /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-4 bg-white p-4 rounded-b-2xl max-w-full", children: [
16670
16677
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-0.5", children: [
16671
16678
  /* @__PURE__ */ jsx38(MetadataRow, { metadata: [`Issue: ${issueNumber}`] }),
16672
16679
  /* @__PURE__ */ jsx38(MetadataRow, { metadata: [`Notification: ${notification}`] }),