qt-ui-kit 1.0.31 → 1.0.33

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
@@ -11168,9 +11168,6 @@ var require_lib7 = __commonJS({
11168
11168
  }
11169
11169
  });
11170
11170
 
11171
- // src/components/organisms/preview_card/preview_card.tsx
11172
- import { useState } from "react";
11173
-
11174
11171
  // src/types/global.ts
11175
11172
  var IntegrationService = /* @__PURE__ */ ((IntegrationService5) => {
11176
11173
  IntegrationService5["SLACK"] = "slack";
@@ -13111,22 +13108,58 @@ function ExternalLink({
13111
13108
  case 16:
13112
13109
  return {
13113
13110
  viewBox: "0 0 16 16",
13114
- path: /* @__PURE__ */ jsx8("path", { d: "M6.66699 3.99996H4.00033C3.26395 3.99996 2.66699 4.59691 2.66699 5.33329V12C2.66699 12.7363 3.26395 13.3333 4.00033 13.3333H10.667C11.4034 13.3333 12.0003 12.7363 12.0003 12V9.33329M9.33366 2.66663H13.3337M13.3337 2.66663V6.66663M13.3337 2.66663L6.66699 9.33329", stroke: color, "stroke-width": "1.25", "stroke-linecap": "round", "stroke-linejoin": "round" })
13111
+ path: /* @__PURE__ */ jsx8(
13112
+ "path",
13113
+ {
13114
+ d: "M6.66699 3.99996H4.00033C3.26395 3.99996 2.66699 4.59691 2.66699 5.33329V12C2.66699 12.7363 3.26395 13.3333 4.00033 13.3333H10.667C11.4034 13.3333 12.0003 12.7363 12.0003 12V9.33329M9.33366 2.66663H13.3337M13.3337 2.66663V6.66663M13.3337 2.66663L6.66699 9.33329",
13115
+ stroke: color,
13116
+ strokeWidth: "1.25",
13117
+ strokeLinecap: "round",
13118
+ strokeLinejoin: "round"
13119
+ }
13120
+ )
13115
13121
  };
13116
13122
  case 20:
13117
13123
  return {
13118
13124
  viewBox: "0 0 20 20",
13119
- path: /* @__PURE__ */ jsx8("path", { d: "M8.33301 5.00004H4.99967C4.0792 5.00004 3.33301 5.74623 3.33301 6.66671V15C3.33301 15.9205 4.0792 16.6667 4.99967 16.6667H13.333C14.2535 16.6667 14.9997 15.9205 14.9997 15V11.6667M11.6663 3.33337H16.6663M16.6663 3.33337V8.33337M16.6663 3.33337L8.33301 11.6667", stroke: color, "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })
13125
+ path: /* @__PURE__ */ jsx8(
13126
+ "path",
13127
+ {
13128
+ d: "M8.33301 5.00004H4.99967C4.0792 5.00004 3.33301 5.74623 3.33301 6.66671V15C3.33301 15.9205 4.0792 16.6667 4.99967 16.6667H13.333C14.2535 16.6667 14.9997 15.9205 14.9997 15V11.6667M11.6663 3.33337H16.6663M16.6663 3.33337V8.33337M16.6663 3.33337L8.33301 11.6667",
13129
+ stroke: color,
13130
+ strokeWidth: "1.5",
13131
+ strokeLinecap: "round",
13132
+ strokeLinejoin: "round"
13133
+ }
13134
+ )
13120
13135
  };
13121
13136
  case 24:
13122
13137
  return {
13123
13138
  viewBox: "0 0 24 24",
13124
- path: /* @__PURE__ */ jsx8("path", { d: "M10 6H6C4.89543 6 4 6.89543 4 8V18C4 19.1046 4.89543 20 6 20H16C17.1046 20 18 19.1046 18 18V14M14 4H20M20 4V10M20 4L10 14", stroke: color, "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })
13139
+ path: /* @__PURE__ */ jsx8(
13140
+ "path",
13141
+ {
13142
+ d: "M10 6H6C4.89543 6 4 6.89543 4 8V18C4 19.1046 4.89543 20 6 20H16C17.1046 20 18 19.1046 18 18V14M14 4H20M20 4V10M20 4L10 14",
13143
+ stroke: color,
13144
+ strokeWidth: "2",
13145
+ strokeLinecap: "round",
13146
+ strokeLinejoin: "round"
13147
+ }
13148
+ )
13125
13149
  };
13126
13150
  case 36:
13127
13151
  return {
13128
13152
  viewBox: "0 0 36 36",
13129
- path: /* @__PURE__ */ jsx8("path", { d: "M15 9H9C7.34315 9 6 10.3431 6 12V27C6 28.6569 7.34315 30 9 30H24C25.6569 30 27 28.6569 27 27V21M21 6H30M30 6V15M30 6L15 21", stroke: color, "stroke-width": "2.25", "stroke-linecap": "round", "stroke-linejoin": "round" })
13153
+ path: /* @__PURE__ */ jsx8(
13154
+ "path",
13155
+ {
13156
+ d: "M15 9H9C7.34315 9 6 10.3431 6 12V27C6 28.6569 7.34315 30 9 30H24C25.6569 30 27 28.6569 27 27V21M21 6H30M30 6V15M30 6L15 21",
13157
+ stroke: color,
13158
+ strokeWidth: "2.25",
13159
+ strokeLinecap: "round",
13160
+ strokeLinejoin: "round"
13161
+ }
13162
+ )
13130
13163
  };
13131
13164
  }
13132
13165
  };
@@ -15091,7 +15124,11 @@ function CategoryIconButton({ icon, label, active }) {
15091
15124
  import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
15092
15125
  function PreviewCard({
15093
15126
  onRead,
15127
+ read,
15094
15128
  onSelected,
15129
+ selected,
15130
+ onChecked,
15131
+ checked,
15095
15132
  service,
15096
15133
  subjectLine,
15097
15134
  body,
@@ -15103,33 +15140,6 @@ function PreviewCard({
15103
15140
  urgencyLevel,
15104
15141
  alert
15105
15142
  }) {
15106
- const [selected, setSelected] = useState(false);
15107
- const [checked, setChecked] = useState(false);
15108
- const [read, setRead] = useState(false);
15109
- function intializeState() {
15110
- }
15111
- function toggleRead() {
15112
- if (onRead) {
15113
- try {
15114
- onRead();
15115
- } catch (e) {
15116
- console.log(`Failed to execute: onRead() | [${e}]`);
15117
- return;
15118
- }
15119
- }
15120
- setRead(!read);
15121
- }
15122
- function toggleSelected() {
15123
- if (onSelected) {
15124
- try {
15125
- onSelected();
15126
- } catch (e) {
15127
- console.log(`Failed to execute: onSelected() | [${e}]`);
15128
- return;
15129
- }
15130
- }
15131
- setSelected(!selected);
15132
- }
15133
15143
  function getColorVariant(urgency) {
15134
15144
  switch (urgency) {
15135
15145
  case "high" /* HIGH */:
@@ -15152,20 +15162,12 @@ function PreviewCard({
15152
15162
  ),
15153
15163
  onClick: (e) => {
15154
15164
  e.stopPropagation();
15155
- toggleSelected();
15156
- if (!read) {
15157
- toggleRead();
15158
- }
15165
+ onRead && !read && onRead();
15166
+ onSelected && onSelected();
15159
15167
  },
15160
15168
  children: [
15161
15169
  /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-4 place-items-center", children: [
15162
- /* @__PURE__ */ jsx17(
15163
- SecondaryCheckBox,
15164
- {
15165
- active: checked,
15166
- onClick: () => setChecked(!checked)
15167
- }
15168
- ),
15170
+ /* @__PURE__ */ jsx17(SecondaryCheckBox, { active: checked, onClick: onChecked }),
15169
15171
  /* @__PURE__ */ jsx17(BrandIcon, { service, size: 24 }),
15170
15172
  urgencyLevel && /* @__PURE__ */ jsx17(
15171
15173
  CategoryIconButton,
@@ -15652,7 +15654,7 @@ function MainNavButton({ icon, label, active, onClick }) {
15652
15654
  children: icon
15653
15655
  }
15654
15656
  ),
15655
- /* @__PURE__ */ jsx22("div", { className: "label-3-bold text-qtpurple-500", children: label })
15657
+ /* @__PURE__ */ jsx22("div", { className: "label-3-bold text-qtpurple-500 select-none", children: label })
15656
15658
  ]
15657
15659
  }
15658
15660
  );
@@ -15711,7 +15713,7 @@ function CategoryIcon({ size = 24, icon, variant }) {
15711
15713
  }
15712
15714
 
15713
15715
  // src/components/organisms/emails/single_event.tsx
15714
- import { useEffect, useState as useState2 } from "react";
15716
+ import { useEffect, useState } from "react";
15715
15717
 
15716
15718
  // src/components/organisms/intel_card/intel_card.tsx
15717
15719
  import clsx6 from "clsx";
@@ -15782,8 +15784,8 @@ function SingleEvent({
15782
15784
  body,
15783
15785
  startExpanded
15784
15786
  }) {
15785
- const [selected, setSelected] = useState2(false);
15786
- const [expanded, setExpanded] = useState2(false);
15787
+ const [selected, setSelected] = useState(false);
15788
+ const [expanded, setExpanded] = useState(false);
15787
15789
  useEffect(() => {
15788
15790
  if (startExpanded) {
15789
15791
  setExpanded(true);
@@ -15926,7 +15928,7 @@ function EmailBody({
15926
15928
 
15927
15929
  // src/components/organisms/chat_messages/chat_bubble/chat_bubble.tsx
15928
15930
  import clsx9 from "clsx";
15929
- import { useEffect as useEffect2, useState as useState3 } from "react";
15931
+ import { useEffect as useEffect2, useState as useState2 } from "react";
15930
15932
 
15931
15933
  // src/components/atoms/emoji_pill/emoji_pill.tsx
15932
15934
  var import_emoji_dictionary = __toESM(require_lib7());
@@ -15958,9 +15960,9 @@ function ChatBubble({
15958
15960
  timestamp,
15959
15961
  emojis
15960
15962
  }) {
15961
- const [expanded, setExpanded] = useState3(false);
15962
- const [truncatedText, setTruncatedText] = useState3(false);
15963
- const [uniqueEmojis, setUniqueEmojis] = useState3(
15963
+ const [expanded, setExpanded] = useState2(false);
15964
+ const [truncatedText, setTruncatedText] = useState2(false);
15965
+ const [uniqueEmojis, setUniqueEmojis] = useState2(
15964
15966
  /* @__PURE__ */ new Map()
15965
15967
  );
15966
15968
  const textLen = text?.length;
@@ -16407,12 +16409,12 @@ function Search({
16407
16409
  }
16408
16410
 
16409
16411
  // src/components/organisms/search_bar/search_bar.tsx
16410
- import { useState as useState4, useEffect as useEffect3 } from "react";
16412
+ import { useState as useState3, useEffect as useEffect3 } from "react";
16411
16413
  import { jsx as jsx38, jsxs as jsxs26 } from "react/jsx-runtime";
16412
16414
  function SearchBar() {
16413
- const [query, setQuery] = useState4("");
16414
- const [state, setState] = useState4("inactive");
16415
- const [results, setResults] = useState4([]);
16415
+ const [query, setQuery] = useState3("");
16416
+ const [state, setState] = useState3("inactive");
16417
+ const [results, setResults] = useState3([]);
16416
16418
  useEffect3(() => {
16417
16419
  if (query === "") {
16418
16420
  setState("inactive");