cloudmr-ux 4.4.6 → 4.4.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.
|
@@ -14,7 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
* Shared ROI label color row (NiiVue pen indices 1–6). Used by pen, rectangle, and ellipse tools.
|
|
15
15
|
* Rectangle/ellipse palettes may also show Apply/Cancel while a shape draft is being adjusted.
|
|
16
16
|
*/
|
|
17
|
-
import { Stack, IconButton,
|
|
17
|
+
import { Stack, IconButton, Button, Tooltip } from "@mui/material";
|
|
18
18
|
import FiberManualRecordIcon from "@mui/icons-material/FiberManualRecord";
|
|
19
19
|
import CheckIcon from "@mui/icons-material/Check";
|
|
20
20
|
import CloseIcon from "@mui/icons-material/Close";
|
|
@@ -26,6 +26,8 @@ var FILLED_COLORS = [
|
|
|
26
26
|
{ sx: { color: "cyan" } },
|
|
27
27
|
{ sx: { color: "#e81ce8" } },
|
|
28
28
|
];
|
|
29
|
+
var ACTION_FONT_SIZE = "0.75rem";
|
|
30
|
+
var ACTION_ICON_SIZE = "0.875rem";
|
|
29
31
|
export default function DrawColorPlatte(_a) {
|
|
30
32
|
var expanded = _a.expanded, updateDrawPen = _a.updateDrawPen, setDrawingEnabled = _a.setDrawingEnabled, _b = _a.shapeDraftActive, shapeDraftActive = _b === void 0 ? false : _b, onApplyShapeDraft = _a.onApplyShapeDraft, onCancelShapeDraft = _a.onCancelShapeDraft;
|
|
31
33
|
return (_jsxs(Stack, __assign({ style: {
|
|
@@ -43,5 +45,21 @@ export default function DrawColorPlatte(_a) {
|
|
|
43
45
|
}, direction: "column", spacing: 0.5, sx: { py: shapeDraftActive && expanded ? 0.5 : 0 } }, { children: [_jsx(Stack, __assign({ direction: "row" }, { children: FILLED_COLORS.map(function (color, index) { return (_jsx(IconButton, __assign({ onClick: function () {
|
|
44
46
|
updateDrawPen({ target: { value: index + 1 } });
|
|
45
47
|
setDrawingEnabled(true);
|
|
46
|
-
} }, { children: _jsx(FiberManualRecordIcon, { sx: color.sx }) }), index)); }) })), shapeDraftActive && expanded && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center",
|
|
48
|
+
} }, { children: _jsx(FiberManualRecordIcon, { sx: color.sx }) }), index)); }) })), shapeDraftActive && expanded && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between", sx: { px: 1, py: 0.5, borderTop: "1px solid #555", width: "100%" } }, { children: [_jsx(Tooltip, __assign({ title: "Cancel shape (Esc)" }, { children: _jsx(Button, __assign({ size: "small", "aria-label": "cancel shape", onClick: function () { return onCancelShapeDraft === null || onCancelShapeDraft === void 0 ? void 0 : onCancelShapeDraft(); }, startIcon: _jsx(CloseIcon, { sx: { fontSize: ACTION_ICON_SIZE } }), sx: {
|
|
49
|
+
color: "#ccc",
|
|
50
|
+
fontSize: ACTION_FONT_SIZE,
|
|
51
|
+
textTransform: "none",
|
|
52
|
+
minWidth: 0,
|
|
53
|
+
py: 0.25,
|
|
54
|
+
px: 0.75,
|
|
55
|
+
"& .MuiButton-startIcon": { mr: 0.5, ml: 0 }
|
|
56
|
+
} }, { children: "Cancel" })) })), _jsx(Tooltip, __assign({ title: "Apply shape (Enter)" }, { children: _jsx(Button, __assign({ size: "small", "aria-label": "apply shape", onClick: function () { return onApplyShapeDraft === null || onApplyShapeDraft === void 0 ? void 0 : onApplyShapeDraft(); }, startIcon: _jsx(CheckIcon, { sx: { fontSize: ACTION_ICON_SIZE } }), sx: {
|
|
57
|
+
color: "#c9a0e8",
|
|
58
|
+
fontSize: ACTION_FONT_SIZE,
|
|
59
|
+
textTransform: "none",
|
|
60
|
+
minWidth: 0,
|
|
61
|
+
py: 0.25,
|
|
62
|
+
px: 0.75,
|
|
63
|
+
"& .MuiButton-startIcon": { mr: 0.5, ml: 0 }
|
|
64
|
+
} }, { children: "Apply" })) }))] })))] })));
|
|
47
65
|
}
|