2025-07-15 12:55:27 -07:00
|
|
|
import { defineSlotRecipe, createSystem, defaultConfig, defineConfig, defineRecipe } from "@chakra-ui/react";
|
2025-07-10 07:49:03 -07:00
|
|
|
|
2025-07-15 12:55:27 -07:00
|
|
|
// RECIPES
|
|
|
|
|
const headerRecipe = defineRecipe({
|
|
|
|
|
base: {
|
2026-07-22 14:58:59 -07:00
|
|
|
bg: "{transparent}",
|
2025-07-15 12:55:27 -07:00
|
|
|
color: "text",
|
|
|
|
|
width: "100%",
|
|
|
|
|
height: "100%",
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "row",
|
|
|
|
|
justifyContent: "space-between",
|
|
|
|
|
alignItems: "center",
|
2025-07-10 09:58:23 -07:00
|
|
|
}
|
2025-07-10 07:49:03 -07:00
|
|
|
});
|
|
|
|
|
|
2025-07-28 13:32:03 -07:00
|
|
|
const dashboardRecipe = defineRecipe({
|
2025-07-15 18:28:37 -07:00
|
|
|
base: {
|
2026-07-22 14:58:59 -07:00
|
|
|
bg: "{testBackground}"
|
2025-07-15 18:28:37 -07:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2025-07-28 13:32:03 -07:00
|
|
|
const canvasRecipe = defineRecipe({
|
|
|
|
|
base: {
|
2026-07-22 14:58:59 -07:00
|
|
|
bg: "{transparent}",
|
2025-07-30 08:17:45 -07:00
|
|
|
zIndex: "-1",
|
|
|
|
|
color: "{text}"
|
2025-07-28 13:32:03 -07:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2025-07-15 12:55:27 -07:00
|
|
|
const sidebarRecipe = defineSlotRecipe({
|
|
|
|
|
slots: ["root", "close_button", "buttons", "dark_mode_button"],
|
|
|
|
|
base: {
|
|
|
|
|
root: {
|
2026-07-22 14:58:59 -07:00
|
|
|
// 1. Semi-transparent backgrounds
|
2026-07-24 14:11:17 -07:00
|
|
|
bg: { base: "linear-gradient(to bottom right, #99000040 20%, #FF660040 60%, #EEEE0040 100%)", _dark: "linear-gradient(to bottom right, #9900003C 20%, #FF66003C 60%, #FFC0003C 100%)" },
|
2026-07-22 14:58:59 -07:00
|
|
|
|
|
|
|
|
// 2. The glass blur effect
|
|
|
|
|
backdropFilter: "blur(12px)",
|
2026-07-23 15:47:51 -07:00
|
|
|
WebkitBackdropFilter: "blur(12px)",
|
2026-07-22 14:58:59 -07:00
|
|
|
|
2026-07-23 15:47:51 -07:00
|
|
|
// 3. Subtle semi-transparent borders
|
2026-07-22 14:58:59 -07:00
|
|
|
border: "1px solid",
|
2026-07-23 15:47:51 -07:00
|
|
|
borderColor: { base: "rgba(255, 255, 255, 0.8)", _dark: "rgba(255, 255, 255, 0.1)" },
|
|
|
|
|
|
|
|
|
|
// CRITICAL: Remove the right border so it doesn't draw a line through your cutout
|
|
|
|
|
borderRight: "none",
|
2026-07-22 14:58:59 -07:00
|
|
|
|
|
|
|
|
borderRadius: "2xl",
|
2026-07-23 15:47:51 -07:00
|
|
|
// boxShadow: "0 4px 30px rgba(0, 0, 0, 0.1)",
|
|
|
|
|
// boxShadow: "-10px 4px 30px rgba(0, 0, 0, 0.1)",
|
2025-07-15 12:55:27 -07:00
|
|
|
width: "100%",
|
2026-07-22 14:58:59 -07:00
|
|
|
height: "calc(100% - 16px)",
|
|
|
|
|
margin: "8px",
|
2025-07-15 12:55:27 -07:00
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "column",
|
2026-07-22 14:58:59 -07:00
|
|
|
justifyContent: "start",
|
2026-07-23 15:47:51 -07:00
|
|
|
alignItems: "stretch",
|
2025-07-28 15:10:57 -07:00
|
|
|
gap: 2,
|
2026-07-23 15:47:51 -07:00
|
|
|
|
|
|
|
|
// CRITICAL: Adjust padding and overflow to allow the button to touch the right edge
|
|
|
|
|
pl: 2, // Keep left padding
|
|
|
|
|
py: 2, // Keep top/bottom padding
|
|
|
|
|
pr: 0, // Remove right padding
|
|
|
|
|
overflow: "visible", // Allows the curved corner patches to render outside the button
|
2026-07-22 14:58:59 -07:00
|
|
|
zIndex: 10,
|
2025-07-15 12:55:27 -07:00
|
|
|
},
|
|
|
|
|
buttons: {
|
2026-07-23 15:47:51 -07:00
|
|
|
position: "relative", // Required to anchor the corner patches
|
2025-07-15 18:28:37 -07:00
|
|
|
bg: "transparent",
|
2026-07-23 15:47:51 -07:00
|
|
|
|
|
|
|
|
transition: "background-color 0.4s ease, color 0.4s ease",
|
|
|
|
|
|
|
|
|
|
"& svg": {
|
|
|
|
|
transition: "stroke-width 0.4s ease"
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
_hover: {
|
|
|
|
|
bg: "rgba(255, 255, 255, 0.1)",
|
|
|
|
|
color: "{text}",
|
|
|
|
|
fontWeight: "semibold",
|
|
|
|
|
"& svg": {
|
|
|
|
|
strokeWidth: "3"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
fontSize: "l",
|
2025-07-28 15:10:57 -07:00
|
|
|
color: {base: "{text}"},
|
2025-07-15 18:28:37 -07:00
|
|
|
variant: "ghost",
|
2025-07-16 13:31:05 -07:00
|
|
|
width: "100%",
|
2026-07-23 15:47:51 -07:00
|
|
|
|
|
|
|
|
// Flat on the right, rounded on the left
|
|
|
|
|
borderRightRadius: "0",
|
|
|
|
|
borderLeftRadius: "4xl",
|
|
|
|
|
|
|
|
|
|
"&.active": {
|
|
|
|
|
bg: "{testBackground}",
|
|
|
|
|
color: "{textInverted}",
|
|
|
|
|
|
|
|
|
|
_hover: {
|
|
|
|
|
bg: "{testBackground}",
|
|
|
|
|
color: "{textInverted}",
|
|
|
|
|
fontWeight: "normal",
|
|
|
|
|
"& svg": {
|
|
|
|
|
strokeWidth: "2" // Keeps the active icon at normal thickness on hover
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// The Top Inverted Curve
|
|
|
|
|
_before: {
|
|
|
|
|
content: '""',
|
|
|
|
|
position: "absolute",
|
|
|
|
|
right: "-1px",
|
|
|
|
|
top: "-25px",
|
|
|
|
|
width: "25px",
|
|
|
|
|
height: "25px",
|
|
|
|
|
bg: "inherit", // This forces the curve to match {testButton}
|
|
|
|
|
WebkitMaskImage: "radial-gradient(circle at top left, transparent 25px, black 25.5px)",
|
|
|
|
|
maskImage: "radial-gradient(circle at top left, transparent 25px, black 25.5px)",
|
|
|
|
|
pointerEvents: "none",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// The Bottom Inverted Curve
|
|
|
|
|
_after: {
|
|
|
|
|
content: '""',
|
|
|
|
|
position: "absolute",
|
|
|
|
|
right: "-1px",
|
|
|
|
|
bottom: "-25px",
|
|
|
|
|
width: "25px",
|
|
|
|
|
height: "25px",
|
|
|
|
|
bg: "inherit",
|
|
|
|
|
WebkitMaskImage: "radial-gradient(circle at bottom left, transparent 25px, black 25.5px)",
|
|
|
|
|
maskImage: "radial-gradient(circle at bottom left, transparent 25px, black 25.5px)",
|
|
|
|
|
pointerEvents: "none",
|
|
|
|
|
}
|
|
|
|
|
},
|
2025-07-15 12:55:27 -07:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2025-07-22 11:58:10 -07:00
|
|
|
const widgetRecipe = defineSlotRecipe({
|
|
|
|
|
slots: ["root", "header", "canvas"],
|
|
|
|
|
base: {
|
|
|
|
|
root: {
|
2025-07-23 13:44:24 -07:00
|
|
|
flexDirection: "column",
|
|
|
|
|
gap: "1",
|
|
|
|
|
position: "relative",
|
2025-07-22 11:58:10 -07:00
|
|
|
bg: "base100",
|
|
|
|
|
borderRadius: "md",
|
2025-07-22 13:41:32 -07:00
|
|
|
p: "1",
|
2025-07-23 13:44:24 -07:00
|
|
|
paddingBottom: "2",
|
2025-07-22 13:41:32 -07:00
|
|
|
border: "1px solid",
|
|
|
|
|
borderColor: "{base300}",
|
|
|
|
|
textAlign: "center",
|
2025-08-05 17:12:59 -07:00
|
|
|
height: "100%",
|
2026-01-30 19:11:11 +00:00
|
|
|
position: "fixed"
|
2025-07-22 11:58:10 -07:00
|
|
|
},
|
|
|
|
|
header: {
|
2025-07-23 14:58:22 -07:00
|
|
|
flexShrink: "0",
|
2025-07-30 08:17:45 -07:00
|
|
|
bg: "{base300}",
|
|
|
|
|
color: "{text}",
|
2025-07-22 11:58:10 -07:00
|
|
|
cursor: "move",
|
2025-07-23 13:44:24 -07:00
|
|
|
borderRadius: "sm",
|
2025-07-28 12:44:17 -07:00
|
|
|
whiteSpace: "nowrap",
|
|
|
|
|
textAlign: "left",
|
|
|
|
|
pl: "2"
|
2025-07-22 11:58:10 -07:00
|
|
|
},
|
|
|
|
|
canvas: {
|
2025-07-23 13:44:24 -07:00
|
|
|
flex: "1 1 auto",
|
2025-07-30 08:17:45 -07:00
|
|
|
bg: "transparent",
|
|
|
|
|
color: "{text}",
|
2025-07-23 13:44:24 -07:00
|
|
|
cursor: "default",
|
|
|
|
|
borderRadius: "md",
|
|
|
|
|
overflow: "auto",
|
2025-07-22 11:58:10 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2025-07-15 12:55:27 -07:00
|
|
|
const config = defineConfig({
|
2025-07-31 08:56:32 -07:00
|
|
|
globalCss: {
|
|
|
|
|
".react-grid-placeholder": {
|
|
|
|
|
background: "#c0d2e3ff !important",
|
|
|
|
|
borderColor: "#a9b6c2ff !important",
|
|
|
|
|
boxShadow: "0 0 10px #c0d2e3ff !important",
|
|
|
|
|
opacity: "1 !important",
|
|
|
|
|
borderRadius: "5px",
|
2025-07-31 09:23:40 -07:00
|
|
|
_dark: {
|
|
|
|
|
background: "#393c3fff !important",
|
|
|
|
|
borderColor: "#000000ff !important",
|
|
|
|
|
boxShadow: "0 0 10px #16181bff !important",
|
|
|
|
|
opacity: "1 !important",
|
|
|
|
|
},
|
2025-07-31 08:56:32 -07:00
|
|
|
},
|
|
|
|
|
".react-resizable-handle-se": {
|
|
|
|
|
zIndex: "1",
|
|
|
|
|
},
|
|
|
|
|
"*": {
|
|
|
|
|
scrollbarWidth: "thin",
|
|
|
|
|
scrollbarColor: "#a0aec0 transparent",
|
2025-07-31 09:23:40 -07:00
|
|
|
_dark: {
|
|
|
|
|
scrollbarColor: "#474747ff transparent",
|
|
|
|
|
}
|
2025-07-31 08:56:32 -07:00
|
|
|
},
|
|
|
|
|
"::-webkit-scrollbar": {
|
|
|
|
|
width: "8px",
|
|
|
|
|
},
|
|
|
|
|
"::-webkit-scrollbar-thumb": {
|
2025-07-31 09:23:40 -07:00
|
|
|
backgroundColor: "rgba(100, 100, 100, 0.4)",
|
2025-07-31 08:56:32 -07:00
|
|
|
borderRadius: "4px",
|
2025-07-31 09:23:40 -07:00
|
|
|
_dark: {
|
|
|
|
|
backgroundColor: "rgba(35, 35, 35, 0.81)",
|
|
|
|
|
}
|
2025-07-31 08:56:32 -07:00
|
|
|
},
|
|
|
|
|
"::-webkit-scrollbar-track": {
|
|
|
|
|
background: "transparent",
|
|
|
|
|
},
|
2026-06-05 11:13:10 -07:00
|
|
|
// '.leaflet-tile': {
|
|
|
|
|
// _dark: {
|
|
|
|
|
// filter: "invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%)",
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
'.leaflet-control-zoom-in, .leaflet-control-zoom-out, .leaflet-control-attribution, .leaflet-container': {
|
2025-07-31 08:56:32 -07:00
|
|
|
_dark: {
|
|
|
|
|
filter: "invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%)",
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
'.leaflet-control-attribution': {
|
|
|
|
|
_dark: {
|
|
|
|
|
filter: "invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%)",
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
'.leaflet-container': {
|
2026-06-05 11:13:10 -07:00
|
|
|
fontFamily: "system-ui, sans-serif !important",
|
2025-07-31 08:56:32 -07:00
|
|
|
_dark: {
|
|
|
|
|
filter: "invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%)",
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-06-05 11:13:10 -07:00
|
|
|
// ".leaflet-popup-content": {
|
|
|
|
|
// fontFamily: "georgia, system-ui, sans-serif !important"
|
|
|
|
|
// },
|
|
|
|
|
// ".leaflet-control a": {
|
|
|
|
|
// fontFamily: "georgia, system-ui, sans-serif !important"
|
|
|
|
|
// },
|
|
|
|
|
// ".leaflet-tooltip": {
|
|
|
|
|
// fontFamily: "georgia, system-ui, sans-serif !important"
|
|
|
|
|
// },
|
2025-08-05 17:12:59 -07:00
|
|
|
".react-grid-item": {
|
|
|
|
|
transition: "none !important"
|
|
|
|
|
},
|
2025-07-31 08:56:32 -07:00
|
|
|
},
|
2025-07-15 12:55:27 -07:00
|
|
|
theme: {
|
|
|
|
|
semanticTokens: {
|
|
|
|
|
colors: {
|
2025-07-30 08:17:45 -07:00
|
|
|
base100: { value: {base: "#f6f9faff", _dark: "#1617199e"}},
|
2025-07-22 13:41:32 -07:00
|
|
|
base200: { value: {base: "#e6ecf1ff", _dark: "#242424"}},
|
2025-07-30 08:17:45 -07:00
|
|
|
base300: { value: {base: "#d3dae4ff", _dark: "#0a0b0bff"}},
|
2025-07-17 15:35:01 -07:00
|
|
|
primary: { value: {base: "#2B98F8", _dark: "#2B98F8"}},
|
2025-07-22 09:26:40 -07:00
|
|
|
primaryLt: { value: {base: "#98cdffff", _dark: "#98cdffff"}},
|
2025-07-15 12:55:27 -07:00
|
|
|
secondaryBG: { value: {base: "#EDF1F1", _dark: "#121212"}},
|
2025-08-19 16:45:03 -07:00
|
|
|
border: {value: {base: "#000000", _dark: "#cbcbcb84"}},
|
2026-07-24 14:11:17 -07:00
|
|
|
text: {value: {base: "#000000", _dark: "#FFFFFF"}},
|
|
|
|
|
textInverted: {value: {base: "#000000", _dark: "#FFFFFF"}},
|
|
|
|
|
icon: {value: {base: "#000000", _dark: "#FFFFFF"}},
|
|
|
|
|
testBackground: { value: {base: "#F9F9F9", _dark: "#141414"} },
|
2026-07-22 14:58:59 -07:00
|
|
|
testSidebar: { value: {base: "#FBFBFB", _dark: "#272421"} },
|
|
|
|
|
testButton: { value: {base: "#FFFFFF", _dark: "#C09754"} },
|
|
|
|
|
|
2025-07-15 12:55:27 -07:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
tokens: {
|
|
|
|
|
fonts: {
|
2026-06-05 11:13:10 -07:00
|
|
|
body: { value: "system-ui, sans-serif" },
|
2025-07-15 12:55:27 -07:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
recipes: {
|
|
|
|
|
header: headerRecipe,
|
2025-07-28 13:32:03 -07:00
|
|
|
dashboard: dashboardRecipe,
|
2025-07-15 18:28:37 -07:00
|
|
|
canvas: canvasRecipe,
|
2025-07-15 12:55:27 -07:00
|
|
|
},
|
|
|
|
|
slotRecipes: {
|
|
|
|
|
sidebar: sidebarRecipe,
|
2025-07-22 11:58:10 -07:00
|
|
|
widget: widgetRecipe,
|
2025-07-22 12:56:44 -07:00
|
|
|
},
|
2025-07-15 12:55:27 -07:00
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
2025-07-10 09:58:23 -07:00
|
|
|
export const system = createSystem(defaultConfig, config);
|