@cccsaurora/clue-ui 1.2.1-patch.256 → 1.2.1-patch.258

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.
Files changed (2) hide show
  1. package/icons/Opinion.js +27 -27
  2. package/package.json +1 -1
package/icons/Opinion.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsxs as x, Fragment as R, jsx as s } from "react/jsx-runtime";
1
+ import { jsxs as x, Fragment as R, jsx as r } from "react/jsx-runtime";
2
2
  import { I as u } from "../iconify-BBckr5AQ.js";
3
3
  import { useTheme as S, Stack as b, Chip as y, Divider as j, Grid as I } from "@mui/material";
4
4
  import q from "../components/CountBadge.js";
@@ -8,30 +8,30 @@ import { s as E } from "../sortBy-DY2JBf9n.js";
8
8
  import { s as M } from "../sumBy-DuMASLPd.js";
9
9
  import { memo as D, useRef as F, useMemo as a, useCallback as G, useEffect as K } from "react";
10
10
  import { u as C } from "../index-Dj5C04IX.js";
11
- const w = { malicious: 3, suspicious: 2, obscure: 1, benign: 0 }, L = ({ annotations: m, value: l, counters: z = !0, disableTooltip: c = !1, ubiquitous: p = !1, ...f }) => {
12
- const i = S(), $ = C(v, (e) => e.showInfo), g = C(v, (e) => e.closeInfo), h = F(), r = a(
11
+ const w = { malicious: 3, suspicious: 2, obscure: 1, benign: 0 }, L = ({ annotations: m, value: l, counters: z = !0, disableTooltip: n = !1, ubiquitous: p = !1, ...f }) => {
12
+ const s = S(), $ = C(v, (e) => e.showInfo), g = C(v, (e) => e.closeInfo), h = F(), i = a(
13
13
  () => m.filter((e) => e.type === "opinion" && e.ubiquitous === p),
14
14
  [m, p]
15
15
  ), t = a(
16
- () => Object.entries(B(r, "value")).map(([e, o]) => [e, M(o, "quantity")]).sort(([e, o], [k, d]) => d !== o ? d - o : (w[k] ?? -1) - (w[e] ?? -1)),
17
- [r]
18
- ), n = G(
16
+ () => Object.entries(B(i, "value")).map(([e, o]) => [e, M(o, "quantity")]).sort(([e, o], [k, d]) => d !== o ? d - o : (w[k] ?? -1) - (w[e] ?? -1)),
17
+ [i]
18
+ ), c = G(
19
19
  (e) => e === "benign" ? "mdi:shield-check" : e === "suspicious" ? "mdi:warning-outline" : e === "obscure" ? "bi:eye-slash-fill" : "mdi:warning-decagram",
20
20
  []
21
21
  );
22
22
  K(() => {
23
- c && g("opinion", l);
24
- }, [c]);
23
+ n && g("opinion", l);
24
+ }, [n]);
25
25
  const O = a(
26
26
  () => /* @__PURE__ */ x(b, { spacing: 1, onClick: (e) => e.stopPropagation(), children: [
27
- r.length > 1 && /* @__PURE__ */ x(R, { children: [
28
- /* @__PURE__ */ s(b, { direction: "row", spacing: 1, children: t.map(([e, o]) => /* @__PURE__ */ s(
27
+ i.length > 1 && /* @__PURE__ */ x(R, { children: [
28
+ /* @__PURE__ */ r(b, { direction: "row", spacing: 1, children: t.map(([e, o]) => /* @__PURE__ */ r(
29
29
  y,
30
30
  {
31
31
  size: "small",
32
32
  variant: "outlined",
33
33
  label: `${e}: ${o}`,
34
- icon: /* @__PURE__ */ s(u, { icon: n(e) }),
34
+ icon: /* @__PURE__ */ r(u, { icon: c(e) }),
35
35
  sx: { textTransform: "capitalize" },
36
36
  color: {
37
37
  benign: "success",
@@ -42,25 +42,25 @@ const w = { malicious: 3, suspicious: 2, obscure: 1, benign: 0 }, L = ({ annotat
42
42
  },
43
43
  e
44
44
  )) }),
45
- /* @__PURE__ */ s(j, { orientation: "horizontal", flexItem: !0 })
45
+ /* @__PURE__ */ r(j, { orientation: "horizontal", flexItem: !0 })
46
46
  ] }),
47
- /* @__PURE__ */ s(
47
+ /* @__PURE__ */ r(
48
48
  I,
49
49
  {
50
50
  sx: {
51
- mt: r.length < 2 && `${i.spacing(-0.5)} !important`,
52
- ml: `${i.spacing(-0.5)} !important`
51
+ mt: i.length < 2 && `${s.spacing(-0.5)} !important`,
52
+ ml: `${s.spacing(-0.5)} !important`
53
53
  },
54
54
  container: !0,
55
55
  spacing: 0.5,
56
56
  maxWidth: "500px",
57
- children: E(r, "value").map((e) => /* @__PURE__ */ s(I, { item: !0, children: /* @__PURE__ */ s(
57
+ children: E(i, "value").map((e) => /* @__PURE__ */ r(I, { item: !0, children: /* @__PURE__ */ r(
58
58
  y,
59
59
  {
60
60
  size: "small",
61
61
  variant: "outlined",
62
62
  label: (e.analytic ?? e.author) + (e.quantity > 1 ? ` (x${e.quantity})` : ""),
63
- icon: /* @__PURE__ */ s(u, { icon: n(e.value) }),
63
+ icon: /* @__PURE__ */ r(u, { icon: c(e.value) }),
64
64
  color: {
65
65
  benign: "success",
66
66
  suspicious: "warning",
@@ -72,26 +72,26 @@ const w = { malicious: 3, suspicious: 2, obscure: 1, benign: 0 }, L = ({ annotat
72
72
  }
73
73
  )
74
74
  ] }),
75
- [n, r, t, i]
75
+ [c, i, t, s]
76
76
  );
77
- return (r == null ? void 0 : r.length) < 1 ? null : /* @__PURE__ */ s(
77
+ return (i == null ? void 0 : i.length) < 1 ? null : /* @__PURE__ */ r(
78
78
  "span",
79
79
  {
80
80
  ref: h,
81
81
  style: { display: "flex" },
82
- onMouseOver: c ? void 0 : () => $("assessment", h.current, l, { content: O }),
83
- onMouseLeave: c ? void 0 : () => g("assessment", l),
84
- children: /* @__PURE__ */ s(q, { disabled: !z, count: t[0][1], children: /* @__PURE__ */ s(
82
+ onMouseOver: n ? void 0 : () => $("opinion", h.current, l, { content: O }),
83
+ onMouseLeave: n ? void 0 : () => g("opinion", l),
84
+ children: /* @__PURE__ */ r(q, { disabled: !z, count: t[0][1], children: /* @__PURE__ */ r(
85
85
  u,
86
86
  {
87
87
  fontSize: "1.25em",
88
88
  ...f,
89
- icon: n(t[0][0]),
89
+ icon: c(t[0][0]),
90
90
  color: {
91
- benign: i.palette.success.light,
92
- suspicious: i.palette.warning.light,
93
- obscure: i.palette.error.light,
94
- malicious: i.palette.error.light
91
+ benign: s.palette.success.light,
92
+ suspicious: s.palette.warning.light,
93
+ obscure: s.palette.error.light,
94
+ malicious: s.palette.error.light
95
95
  }[t[0][0]],
96
96
  style: {
97
97
  zIndex: 2,
package/package.json CHANGED
@@ -66,7 +66,7 @@
66
66
  },
67
67
  "type": "module",
68
68
  "types": "main.d.ts",
69
- "version": "1.2.1-patch.256",
69
+ "version": "1.2.1-patch.258",
70
70
  "exports": {
71
71
  ".": "./main.js",
72
72
  "./index.css": "./index.css",