@cccsaurora/clue-ui 1.2.7 → 1.2.8
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/components/EnrichedChip.js +25 -25
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as O } from "react/jsx-runtime";
|
|
2
2
|
import { Chip as B, Tooltip as G, Box as _, Stack as H, CircularProgress as J } from "@mui/material";
|
|
3
3
|
import K from "./display/icons/Iconified.js";
|
|
4
4
|
import { ClueComponentContext as L } from "../hooks/ClueComponentContext.js";
|
|
@@ -29,68 +29,68 @@ const D = X.memo(
|
|
|
29
29
|
slotProps: a = {},
|
|
30
30
|
...l
|
|
31
31
|
}) => {
|
|
32
|
-
const { t: j } = m(L, (o) => o.i18next), d = Y(), k = m(N, (o) => o == null ? void 0 : o.type), y = Q((o) => o.defaultClassification), n = u(() => C ?? k, [C, k]),
|
|
32
|
+
const { t: j } = m(L, (o) => o.i18next), d = Y(), k = m(N, (o) => o == null ? void 0 : o.type), y = Q((o) => o.defaultClassification), n = u(() => C ?? k, [C, k]), e = u(
|
|
33
33
|
() => x ?? y,
|
|
34
34
|
[x, y]
|
|
35
35
|
);
|
|
36
36
|
if (!n)
|
|
37
37
|
throw new Error("Type was not provided as a prop, and component is not used in a group context.");
|
|
38
|
-
const [p, T] = U(n, i,
|
|
38
|
+
const [p, T] = U(n, i, e, { skipEnrichment: R }), S = m(E, (o) => o.showInfo), M = m(E, (o) => o.closeInfo), w = Z(() => {
|
|
39
39
|
const o = {};
|
|
40
40
|
return c && (o.onClose = () => c(!1)), a != null && a.popover && (o.popoverProps = a.popover), o;
|
|
41
41
|
}, [c, a.popover]), g = u(
|
|
42
42
|
() => !h || s ? (o) => {
|
|
43
43
|
var I;
|
|
44
|
-
S("details", d.current, { type: n, value: i, classification:
|
|
44
|
+
S("details", d.current, { type: n, value: i, classification: e }, w()), (I = l.onClick) == null || I.call(l, o), o.stopPropagation(), o.preventDefault();
|
|
45
45
|
} : l.onClick,
|
|
46
46
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
47
|
-
[h, s, l, n, i,
|
|
47
|
+
[h, s, l, n, i, e]
|
|
48
48
|
);
|
|
49
49
|
return $(() => {
|
|
50
|
-
r ? S("details", d.current, { type: n, value: i, classification:
|
|
50
|
+
r ? S("details", d.current, { type: n, value: i, classification: e }, w()) : M("details", {
|
|
51
51
|
type: n,
|
|
52
52
|
value: i,
|
|
53
|
-
classification:
|
|
53
|
+
classification: e
|
|
54
54
|
});
|
|
55
|
-
}, [
|
|
55
|
+
}, [e, r, n, i]), /* @__PURE__ */ t(
|
|
56
56
|
B,
|
|
57
57
|
{
|
|
58
58
|
...l,
|
|
59
59
|
ref: d,
|
|
60
60
|
variant: l.variant || "outlined",
|
|
61
61
|
sx: {
|
|
62
|
-
height: l.size
|
|
62
|
+
height: l.size === "medium" ? "40px" : "unset",
|
|
63
63
|
"& .MuiChip-label": { overflow: "visible" },
|
|
64
64
|
...l.sx ?? {}
|
|
65
65
|
},
|
|
66
66
|
label: /* @__PURE__ */ O(H, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
67
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ t(
|
|
68
68
|
v,
|
|
69
69
|
{
|
|
70
70
|
ubiquitous: !0,
|
|
71
|
-
value: { type: n, value: i, classification:
|
|
71
|
+
value: { type: n, value: i, classification: e },
|
|
72
72
|
annotations: p,
|
|
73
73
|
counters: f,
|
|
74
74
|
disableTooltip: r,
|
|
75
75
|
style: { flexShrink: 0 }
|
|
76
76
|
}
|
|
77
77
|
),
|
|
78
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ t(
|
|
79
79
|
z,
|
|
80
80
|
{
|
|
81
81
|
ubiquitous: !0,
|
|
82
|
-
value: { type: n, value: i, classification:
|
|
82
|
+
value: { type: n, value: i, classification: e },
|
|
83
83
|
annotations: p,
|
|
84
84
|
counters: f,
|
|
85
85
|
disableTooltip: r,
|
|
86
86
|
style: { flexShrink: 0 }
|
|
87
87
|
}
|
|
88
88
|
),
|
|
89
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ t(
|
|
90
90
|
q,
|
|
91
91
|
{
|
|
92
92
|
ubiquitous: !0,
|
|
93
|
-
value: { type: n, value: i, classification:
|
|
93
|
+
value: { type: n, value: i, classification: e },
|
|
94
94
|
annotations: p,
|
|
95
95
|
counters: f,
|
|
96
96
|
showExtraIcon: b,
|
|
@@ -98,31 +98,31 @@ const D = X.memo(
|
|
|
98
98
|
style: { flexShrink: 0 }
|
|
99
99
|
}
|
|
100
100
|
),
|
|
101
|
-
l.label ?? /* @__PURE__ */
|
|
102
|
-
/* @__PURE__ */
|
|
101
|
+
l.label ?? /* @__PURE__ */ t(W, { fontSize: "inherit", annotations: p, value: i }),
|
|
102
|
+
/* @__PURE__ */ t(
|
|
103
103
|
v,
|
|
104
104
|
{
|
|
105
|
-
value: { type: n, value: i, classification:
|
|
105
|
+
value: { type: n, value: i, classification: e },
|
|
106
106
|
annotations: p,
|
|
107
107
|
counters: f,
|
|
108
108
|
disableTooltip: r,
|
|
109
109
|
style: { flexShrink: 0 }
|
|
110
110
|
}
|
|
111
111
|
),
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ t(
|
|
113
113
|
z,
|
|
114
114
|
{
|
|
115
|
-
value: { type: n, value: i, classification:
|
|
115
|
+
value: { type: n, value: i, classification: e },
|
|
116
116
|
annotations: p,
|
|
117
117
|
counters: f,
|
|
118
118
|
disableTooltip: r,
|
|
119
119
|
style: { flexShrink: 0 }
|
|
120
120
|
}
|
|
121
121
|
),
|
|
122
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ t(
|
|
123
123
|
q,
|
|
124
124
|
{
|
|
125
|
-
value: { type: n, value: i, classification:
|
|
125
|
+
value: { type: n, value: i, classification: e },
|
|
126
126
|
annotations: p,
|
|
127
127
|
counters: f,
|
|
128
128
|
showExtraIcon: b,
|
|
@@ -130,12 +130,12 @@ const D = X.memo(
|
|
|
130
130
|
style: { flexShrink: 0 }
|
|
131
131
|
}
|
|
132
132
|
),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
T && !A && /* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ t(V, { counters: f, value: { type: n, value: i, classification: e }, disableTooltip: r }),
|
|
134
|
+
T && !A && /* @__PURE__ */ t(J, { color: "primary", size: 16 })
|
|
135
135
|
] }),
|
|
136
136
|
onClick: s ? void 0 : g,
|
|
137
137
|
onDelete: !T && s ? g : void 0,
|
|
138
|
-
deleteIcon: s ? /* @__PURE__ */
|
|
138
|
+
deleteIcon: s ? /* @__PURE__ */ t(G, { title: j("details.open"), children: /* @__PURE__ */ t(_, { component: "span", sx: { pr: 1 }, children: /* @__PURE__ */ t(K, { icon: "ic:outline-info" }) }) }) : null
|
|
139
139
|
}
|
|
140
140
|
);
|
|
141
141
|
}
|