Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

style: update dark theme active colors

Brad Barbin734baea35c5e
diff --git a/packages/react/src/ModelViewer.tsx b/packages/react/src/ModelViewer.tsx
index f39cc867e4..b484ccdea9 100644
--- a/packages/react/src/ModelViewer.tsx
+++ b/packages/react/src/ModelViewer.tsx
@@ -27,9 +27,6 @@ export const supportedModelTypes = [
"stp",
];
-const darkColor = "#9797a5";
-const lightColor = "#8c8a8a";
-
export function ModelViewer({
file,
url,
@@ -70,7 +67,12 @@ export function ModelViewer({
onModelLoaded: (model) => {
if (viewerRef.current) {
const viewer3D = viewerRef.current.GetViewer();
- updateColor(color ?? (isDarkMode ? darkColor : lightColor));
+ updateColor(
+ color ??
+ getComputedStyle(document.documentElement)
+ .getPropertyValue("--card")
+ .trim()
+ );
viewer3D.Resize(
parentDiv.current?.clientWidth,
@@ -238,7 +240,11 @@ export function ModelViewer({
);
if (!color) {
- updateColor(isDarkMode ? darkColor : lightColor);
+ updateColor(
+ getComputedStyle(document.documentElement)
+ .getPropertyValue("--card")
+ .trim()
+ );
}
}
}, [isDarkMode, color]);
@@ -250,7 +256,7 @@ export function ModelViewer({
role={"img"}
aria-label="Canvas showing the model in the 3D Viewer"
className={cn(
- "h-full w-full items-center justify-center rounded-lg relative border border-border dark:border-0 dark:shadow-[0px_1px_0px_0px_hsla(0,0%,100%,.03)_inset,0px_0px_0px_1px_hsla(0,0%,100%,.03)_inset,0px_0px_0px_1px_rgba(0,0,0,.1),0px_2px_2px_0px_rgba(0,0,0,.1),0px_4px_4px_0px_rgba(0,0,0,.1),0px_8px_8px_0px_rgba(0,0,0,.1)] bg-gradient-to-bl from-card from-50% via-card to-background min-h-[400px] shadow-md dark:border-none dark:shadow-[inset_0_0.5px_0_rgb(255_255_255_/_0.08),_inset_0_0_1px_rgb(255_255_255_/_0.24),_0_0_0_0.5px_rgb(0,0,0,1),0px_0px_4px_rgba(0,_0,_0,_0.08),_0px_0px_10px_rgba(0,_0,_0,_0.12),_0px_0px_24px_rgba(0,_0,_0,_0.16),_0px_0px_80px_rgba(0,_0,_0,_0.2)]",
+ "h-full w-full items-center justify-center rounded-lg relative border border-border bg-gradient-to-bl from-card from-50% via-card to-background min-h-[400px] shadow-md dark:border-none dark:shadow-[inset_0_0.5px_0_rgb(255_255_255_/_0.08),_inset_0_0_1px_rgb(255_255_255_/_0.24),_0_0_0_0.5px_rgb(0,0,0,1),0px_0px_4px_rgba(0,_0,_0,_0.08),_0px_0px_10px_rgba(0,_0,_0,_0.12),_0px_0px_24px_rgba(0,_0,_0,_0.16),_0px_0px_80px_rgba(0,_0,_0,_0.2)]",
className
)}
>
diff --git a/packages/utils/src/themes.ts b/packages/utils/src/themes.ts
index 959af44848..88441d61ba 100644
--- a/packages/utils/src/themes.ts
+++ b/packages/utils/src/themes.ts
@@ -41,7 +41,7 @@ export const themes = [
"popover-foreground": "0 0% 98%",
primary: "0 0% 98%",
"primary-foreground": "220 5.9% 10%",
- active: "220 5.2% 33.9%",
+ active: "220 5.2% 13.9%",
"active-foreground": "0 0% 98%",
secondary: "220 3.7% 15.9%",
"secondary-foreground": "0 0% 98%",
@@ -97,8 +97,8 @@ export const themes = [
"popover-foreground": "0 0% 98%",
primary: "30 24% 81%",
"primary-foreground": "0 0% 9%",
- active: "0 0% 86%",
- "active-foreground": "0 0% 4.1%",
+ active: "0 0% 98%",
+ "active-foreground": "0 0 20%",
secondary: "0 0% 14.9%",
"secondary-foreground": "0 0% 98%",
muted: "0 0% 14.9%",
@@ -153,8 +153,9 @@ export const themes = [
"popover-foreground": "0 0% 98%",
primary: "0 72.2% 50.6%",
"primary-foreground": "0 85.7% 97.3%",
- active: "0 0% 86%",
- "active-foreground": "0 0% 4.1%",
+ active: "0 5.2% 13.9%",
+ "active-foreground": "0 0% 98%",
+
secondary: "0 0% 14.9%",
"secondary-foreground": "0 0% 98%",
muted: "0 0% 14.9%",