Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4474b8ae33 |
@@ -24,6 +24,6 @@ export default defineConfig([globalIgnores(['dist']), {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
'no-unused-vars': 'off',
|
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
|
||||||
},
|
},
|
||||||
}, ...storybook.configs["flat/recommended"]])
|
}, ...storybook.configs["flat/recommended"]])
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
|
|
||||||
<link rel="icon" type="image/svg+xml" href="volcano.svg" />
|
<link rel="icon" type="image/svg+xml" href="volcano.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>VDAP</title>
|
<title>VDAP</title>
|
||||||
|
|||||||
+37
-32
@@ -19,7 +19,41 @@ import GlobalMap from "./pages/maps/GlobalMap.jsx";
|
|||||||
import Admin from "./pages/admin/Admin.jsx";
|
import Admin from "./pages/admin/Admin.jsx";
|
||||||
import MyDashboard from "./pages/home/tabs/MyDashboard.jsx";
|
import MyDashboard from "./pages/home/tabs/MyDashboard.jsx";
|
||||||
|
|
||||||
export default function App() {
|
function AppFoundation() {
|
||||||
|
const recipe = useRecipe({ key: "dashboard" });
|
||||||
|
const styles = recipe();
|
||||||
|
const dialog = useDialog();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<DialogPopup dialog={dialog} />
|
||||||
|
<Grid css={styles}
|
||||||
|
templateRows="1fr 11fr"
|
||||||
|
templateColumns="auto 1fr"
|
||||||
|
height="100vh"
|
||||||
|
width="100vw"
|
||||||
|
>
|
||||||
|
<GridItem rowSpan={2} colSpan={1}>
|
||||||
|
<Sidebar />
|
||||||
|
</GridItem>
|
||||||
|
<GridItem rowSpan={1} colSpan={1}>
|
||||||
|
<Header />
|
||||||
|
</GridItem>
|
||||||
|
<GridItem colSpan={1} width="100%" overflow="auto">
|
||||||
|
<Outlet />
|
||||||
|
</GridItem>
|
||||||
|
</Grid>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const Placeholder = ({ name }) => (
|
||||||
|
<Flex width="100%" height="100%" align="center" justify="center">
|
||||||
|
<Heading color="gray.500" _dark={{ color: "gray.200" }} size="lg">{name} Dashboard - Coming Soon</Heading>
|
||||||
|
</Flex>
|
||||||
|
);
|
||||||
|
|
||||||
|
function App() {
|
||||||
// 1. Pull the initialization function from Zustand
|
// 1. Pull the initialization function from Zustand
|
||||||
const checkAuth = useAuthStore((state) => state.checkAuth);
|
const checkAuth = useAuthStore((state) => state.checkAuth);
|
||||||
|
|
||||||
@@ -33,7 +67,7 @@ export default function App() {
|
|||||||
{/* --- Public Routes --- */}
|
{/* --- Public Routes --- */}
|
||||||
<Route path="/login" element={<Login />} />
|
<Route path="/login" element={<Login />} />
|
||||||
|
|
||||||
{/* --- Secure Routes --- */}
|
{/* --- SECURE ROUTES --- */}
|
||||||
<Route element={<ProtectedRoute />}>
|
<Route element={<ProtectedRoute />}>
|
||||||
|
|
||||||
{/* --- Non-Public Routes (Now completely locked down) --- */}
|
{/* --- Non-Public Routes (Now completely locked down) --- */}
|
||||||
@@ -61,33 +95,4 @@ export default function App() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The fundamental layout of the webpage
|
export default App;
|
||||||
function AppFoundation() {
|
|
||||||
const recipe = useRecipe({key: "dashboard"});
|
|
||||||
const styles = recipe();
|
|
||||||
const dialog = useDialog();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<DialogPopup dialog={dialog}/>
|
|
||||||
<Grid css={styles} templateRows="1fr 11fr" templateColumns="auto 1fr">
|
|
||||||
<GridItem rowSpan={2} colSpan={1}>
|
|
||||||
<Sidebar/>
|
|
||||||
</GridItem>
|
|
||||||
<GridItem rowSpan={1} colSpan={1}>
|
|
||||||
<Header/>
|
|
||||||
</GridItem>
|
|
||||||
<GridItem colSpan={1}>
|
|
||||||
<Outlet/>
|
|
||||||
</GridItem>
|
|
||||||
</Grid>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// A dummy page that acts as a placeholder for pages that aren't developed yet but are navigatable to
|
|
||||||
const Placeholder = ({name}) => (
|
|
||||||
<Flex width="100%" height="100%" align="center" justify="center">
|
|
||||||
<Heading color="gray.500" _dark={{color: "gray.200"}} size="lg">{name} Dashboard - Coming Soon</Heading>
|
|
||||||
</Flex>
|
|
||||||
);
|
|
||||||
@@ -31,11 +31,8 @@ export function SettingsButton() {
|
|||||||
const cancelEdit = useDashboardStore(state => state.cancelEdit);
|
const cancelEdit = useDashboardStore(state => state.cancelEdit);
|
||||||
const addWidget = useDashboardStore(state => state.addWidget);
|
const addWidget = useDashboardStore(state => state.addWidget);
|
||||||
|
|
||||||
const glassTabRecipe = useRecipe({key: "glassTab"});
|
const recipe = useRecipe({key: "glassTab"});
|
||||||
const tabStyles = glassTabRecipe();
|
const tabStyles = recipe();
|
||||||
|
|
||||||
const [canScrollLeft, setCanScrollLeft] = useState(false);
|
|
||||||
const [canScrollRight, setCanScrollRight] = useState(false);
|
|
||||||
|
|
||||||
// Pull the glass container styles for the dropdown and modal
|
// Pull the glass container styles for the dropdown and modal
|
||||||
const panelRecipe = useSlotRecipe({key: "glassPanel"});
|
const panelRecipe = useSlotRecipe({key: "glassPanel"});
|
||||||
@@ -46,6 +43,8 @@ export function SettingsButton() {
|
|||||||
|
|
||||||
// ⬅️ ➡️ This is the callbacks and scroll control to add the chevron arrows in the tab list
|
// ⬅️ ➡️ This is the callbacks and scroll control to add the chevron arrows in the tab list
|
||||||
const tabsRef = useRef(null);
|
const tabsRef = useRef(null);
|
||||||
|
const [canScrollLeft, setCanScrollLeft] = useState(false);
|
||||||
|
const [canScrollRight, setCanScrollRight] = useState(false);
|
||||||
|
|
||||||
const checkScroll = useCallback(() => {
|
const checkScroll = useCallback(() => {
|
||||||
if (tabsRef.current) {
|
if (tabsRef.current) {
|
||||||
@@ -93,17 +92,27 @@ export function SettingsButton() {
|
|||||||
<>
|
<>
|
||||||
{isEditing ? (
|
{isEditing ? (
|
||||||
// 📝 EDIT MODE: The 3-Pill Layout
|
// 📝 EDIT MODE: The 3-Pill Layout
|
||||||
<HStack>
|
<HStack gap={2}>
|
||||||
{/* 1. The Add Widget Button */}
|
{/* 1. The Add Widget Button */}
|
||||||
<Box as="button" css={tabStyles} data-state="open" onClick={() => setIsLibraryOpen(true)}
|
<Box
|
||||||
color={{base: "blue.500", _dark: "blue.300"}} _hover={{bg: "rgba(66, 153, 225, 0.1)"}}
|
as="button"
|
||||||
|
css={tabStyles}
|
||||||
|
data-state="open"
|
||||||
|
onClick={() => setIsLibraryOpen(true)}
|
||||||
|
color={{base: "blue.500", _dark: "blue.300"}}
|
||||||
|
_hover={{bg: "rgba(66, 153, 225, 0.1)"}}
|
||||||
>
|
>
|
||||||
<LayoutGrid size={20} style={{flexShrink: 0}}/>
|
<LayoutGrid size={20} style={{flexShrink: 0}}/>
|
||||||
<Box as="span">Widget Library</Box>
|
<Box as="span">Widget Library</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* 2. The Save Button */}
|
{/* 2. The Save Button */}
|
||||||
<Box as="button" css={tabStyles} data-state="open" onClick={saveEdit} color={{base: "green.600", _dark: "green.400"}}
|
<Box
|
||||||
|
as="button"
|
||||||
|
css={tabStyles}
|
||||||
|
data-state="open"
|
||||||
|
onClick={saveEdit}
|
||||||
|
color={{base: "green.600", _dark: "green.400"}}
|
||||||
_hover={{bg: "rgba(72, 187, 120, 0.1)"}}
|
_hover={{bg: "rgba(72, 187, 120, 0.1)"}}
|
||||||
>
|
>
|
||||||
<Save size={20} style={{flexShrink: 0}}/>
|
<Save size={20} style={{flexShrink: 0}}/>
|
||||||
@@ -111,7 +120,12 @@ export function SettingsButton() {
|
|||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* 3. The Discard Button */}
|
{/* 3. The Discard Button */}
|
||||||
<Box as="button" css={tabStyles} data-state="open" onClick={cancelEdit} color={{base: "red.500", _dark: "red.400"}}
|
<Box
|
||||||
|
as="button"
|
||||||
|
css={tabStyles}
|
||||||
|
data-state="open"
|
||||||
|
onClick={cancelEdit}
|
||||||
|
color={{base: "red.500", _dark: "red.400"}}
|
||||||
_hover={{bg: "rgba(245, 101, 101, 0.1)"}}
|
_hover={{bg: "rgba(245, 101, 101, 0.1)"}}
|
||||||
>
|
>
|
||||||
<X size={20} style={{flexShrink: 0}}/>
|
<X size={20} style={{flexShrink: 0}}/>
|
||||||
@@ -123,7 +137,7 @@ export function SettingsButton() {
|
|||||||
<Menu.Root positioning={{getAnchorRect}}>
|
<Menu.Root positioning={{getAnchorRect}}>
|
||||||
<Menu.Trigger asChild>
|
<Menu.Trigger asChild>
|
||||||
<Box ref={menuRef} as="button" css={tabStyles}>
|
<Box ref={menuRef} as="button" css={tabStyles}>
|
||||||
{/* settings icon size set to 24 to match tabs. flexShrink 0 is CRITICAL */}
|
{/* size increased to 24 to match tabs. flexShrink: 0 is CRITICAL */}
|
||||||
<Settings size={24} style={{flexShrink: 0}}/>
|
<Settings size={24} style={{flexShrink: 0}}/>
|
||||||
<Box as="span">Dashboard Settings</Box>
|
<Box as="span">Dashboard Settings</Box>
|
||||||
</Box>
|
</Box>
|
||||||
@@ -160,52 +174,136 @@ export function SettingsButton() {
|
|||||||
<Dialog.Root
|
<Dialog.Root
|
||||||
open={isLibraryOpen}
|
open={isLibraryOpen}
|
||||||
onOpenChange={(e) => setIsLibraryOpen(e.open)}
|
onOpenChange={(e) => setIsLibraryOpen(e.open)}
|
||||||
closeOnInteractOutside={true}
|
|
||||||
closeOnEscapeKeyDown={true}
|
|
||||||
size="xl"
|
size="xl"
|
||||||
placement="center"
|
placement="center"
|
||||||
|
closeOnInteractOutside={true}
|
||||||
|
closeOnEscapeKeyDown={true}
|
||||||
>
|
>
|
||||||
{/* Soft blur can be added to the background behind the modal */}
|
{/* Soft blur can be added to the background behind the modal */}
|
||||||
{/*<Dialog.Backdrop bg="blackAlpha.100" backdropFilter="blur(2px)"/>*/}
|
{/*<Dialog.Backdrop bg="blackAlpha.100" backdropFilter="blur(2px)"/>*/}
|
||||||
<Dialog.Positioner>
|
<Dialog.Positioner>
|
||||||
<Dialog.Content css={modalStyles.root}>
|
|
||||||
<Dialog.Header>
|
<Dialog.Content css={modalStyles.root} overflow="hidden" maxW="60%" minH="80%" p={0}>
|
||||||
<Dialog.Title>Widgets Shop</Dialog.Title>
|
|
||||||
|
<Dialog.Header bg="transparent" color={{base: "gray.800", _dark: "white"}} py={4}
|
||||||
|
borderColor={{base: "gray.200", _dark: "whiteAlpha.200"}}>
|
||||||
|
<Dialog.Title fontSize="xl" fontWeight="bold">Widgets Shop</Dialog.Title>
|
||||||
</Dialog.Header>
|
</Dialog.Header>
|
||||||
|
|
||||||
<Dialog.Body>
|
<Dialog.Body p={0}>
|
||||||
<Tabs.Root defaultValue={categories[0]} variant="unstyled">
|
<Tabs.Root defaultValue={categories[0]} variant="unstyled">
|
||||||
{/* HORIZONTAL SCROLLABLE MENU OF WIDGET CATEGORIES */}
|
<Box position="relative" display="flex" mx="auto" maxWidth="100%" mx={5} mt={4} mb={6}>
|
||||||
<Box>
|
|
||||||
{/* left glass crescent */}
|
{/* LEFT GLASS CRESCENT */}
|
||||||
{canScrollLeft && (
|
{canScrollLeft && (
|
||||||
<Flex onClick={() => tabsRef.current.scrollBy({left: -200, behavior: 'smooth'})}>
|
<Flex
|
||||||
<ChevronLeft size={18} style={{ marginLeft: "-30px" }}/> {/* Shifted slightly left to optically center it in the crescent mass */}
|
position="absolute"
|
||||||
|
left="0" top="0" bottom="0"
|
||||||
|
w="50px"
|
||||||
|
align="center" justify="center"
|
||||||
|
zIndex={2}
|
||||||
|
cursor="pointer"
|
||||||
|
onClick={() => tabsRef.current.scrollBy({left: -200, behavior: 'smooth'})}
|
||||||
|
bg={{base: "rgba(255, 255, 255, 0.7)", _dark: "rgba(30, 30, 30, 0.8)"}}
|
||||||
|
backdropFilter="blur(1px)"
|
||||||
|
borderTopLeftRadius="full"
|
||||||
|
borderBottomLeftRadius="full"
|
||||||
|
|
||||||
|
// THE MAGIC: Bites a transparent circle out of the flat right side!
|
||||||
|
WebkitMaskImage="radial-gradient(circle at 100% 50%, transparent 30px, black 19px)"
|
||||||
|
maskImage="radial-gradient(circle at 100% 50%, transparent 30px, black 35px)"
|
||||||
|
|
||||||
|
color={{base: "gray.600", _dark: "gray.300"}}
|
||||||
|
transition="background-color 0.2s"
|
||||||
|
_hover={{
|
||||||
|
color: {base: "blue.500", _dark: "blue.300"},
|
||||||
|
bg: {base: "rgba(255, 255, 255, 0.9)", _dark: "rgba(40, 40, 40, 0.95)"}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{/* Shifted slightly left to optically center it in the crescent mass */}
|
||||||
|
<ChevronLeft size={18} style={{ marginLeft: "-30px" }}/>
|
||||||
</Flex>
|
</Flex>
|
||||||
)}
|
)}
|
||||||
|
<Tabs.List
|
||||||
{/* the categories */}
|
ref={tabsRef}
|
||||||
<Tabs.List ref={tabsRef} onScroll={checkScroll}
|
onScroll={checkScroll}
|
||||||
// For desktop users (not on trackpad) to scroll
|
bg={{base: "rgba(0, 0, 0, 0.04)", _dark: "rgba(255, 255, 255, 0.05)"}}
|
||||||
onWheel={(e) => { if (e.currentTarget) e.currentTarget.scrollLeft += e.deltaY; }}
|
p={1}
|
||||||
|
borderRadius="full"
|
||||||
|
display="flex"
|
||||||
|
flexWrap="nowrap"
|
||||||
|
overflowX="auto"
|
||||||
|
maxWidth="100%"
|
||||||
|
border="1px solid"
|
||||||
|
borderColor={{base: "blackAlpha.50", _dark: "whiteAlpha.100"}}
|
||||||
|
css={{
|
||||||
|
scrollbarWidth: "none",
|
||||||
|
"&::-webkit-scrollbar": {display: "none"},
|
||||||
|
}}
|
||||||
|
// This is for desktop users not on trackpad to scroll the
|
||||||
|
onWheel={(e) => {
|
||||||
|
if (e.currentTarget) {
|
||||||
|
e.currentTarget.scrollLeft += e.deltaY;
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{categories.map(cat => (
|
{categories.map(cat => (
|
||||||
<Tabs.Trigger key={cat} value={cat}>
|
<Tabs.Trigger
|
||||||
|
key={cat}
|
||||||
|
value={cat}
|
||||||
|
px={5}
|
||||||
|
py={2}
|
||||||
|
borderRadius="full"
|
||||||
|
whiteSpace="nowrap"
|
||||||
|
flexShrink={0}
|
||||||
|
color={{base: "gray.500", _dark: "gray.400"}}
|
||||||
|
fontWeight="medium"
|
||||||
|
transition="background-color 0.2s, color 0.2s, box-shadow 0.2s"
|
||||||
|
_hover={{
|
||||||
|
color: {base: "gray.800", _dark: "gray.200"}
|
||||||
|
}}
|
||||||
|
_selected={{
|
||||||
|
bg: {base: "white", _dark: "rgba(255, 255, 255, 0.12)"},
|
||||||
|
color: {base: "blue.600", _dark: "blue.200"},
|
||||||
|
boxShadow: "sm",
|
||||||
|
fontWeight: "bold",
|
||||||
|
}}
|
||||||
|
>
|
||||||
{cat}
|
{cat}
|
||||||
</Tabs.Trigger>
|
</Tabs.Trigger>
|
||||||
))}
|
))}
|
||||||
</Tabs.List>
|
</Tabs.List>
|
||||||
|
|
||||||
{/* right glass crescent */}
|
|
||||||
{canScrollRight && (
|
{canScrollRight && (
|
||||||
<Flex onClick={() => tabsRef.current.scrollBy({left: 200, behavior: 'smooth'})}>
|
<Flex
|
||||||
|
position="absolute"
|
||||||
|
right="0" top="0" bottom="0"
|
||||||
|
w="50px"
|
||||||
|
align="center" justify="center"
|
||||||
|
zIndex={2}
|
||||||
|
cursor="pointer"
|
||||||
|
onClick={() => tabsRef.current.scrollBy({left: 200, behavior: 'smooth'})}
|
||||||
|
bg={{base: "rgba(255, 255, 255, 0.7)", _dark: "rgba(30, 30, 30, 0.8)"}}
|
||||||
|
backdropFilter="blur(1px)"
|
||||||
|
borderTopRightRadius="full"
|
||||||
|
borderBottomRightRadius="full"
|
||||||
|
|
||||||
|
// THE MAGIC: Bites a transparent circle out of the flat left side!
|
||||||
|
WebkitMaskImage="radial-gradient(circle at 0% 50%, transparent 30px, black 19px)"
|
||||||
|
maskImage="radial-gradient(circle at 0% 50%, transparent 30px, black 35px)"
|
||||||
|
|
||||||
|
color={{base: "gray.600", _dark: "gray.300"}}
|
||||||
|
transition="background-color 0.2s"
|
||||||
|
_hover={{
|
||||||
|
color: {base: "blue.500", _dark: "blue.300"},
|
||||||
|
bg: {base: "rgba(255, 255, 255, 0.9)", _dark: "rgba(40, 40, 40, 0.95)"}
|
||||||
|
}}
|
||||||
|
>
|
||||||
{/* Shifted slightly right to optically center it in the crescent mass */}
|
{/* Shifted slightly right to optically center it in the crescent mass */}
|
||||||
<ChevronRight size={18} style={{ marginRight: "-30px" }}/>
|
<ChevronRight size={18} style={{ marginRight: "-30px" }}/>
|
||||||
</Flex>
|
</Flex>
|
||||||
)}
|
)}
|
||||||
</Box>
|
|
||||||
|
|
||||||
{/* THE WIDGET OPTIONS W/IN EACH CATEGORY */}
|
</Box>
|
||||||
{categories.map(cat => (
|
{categories.map(cat => (
|
||||||
<Tabs.Content key={cat} value={cat} p={6}>
|
<Tabs.Content key={cat} value={cat} p={6}>
|
||||||
<Grid templateColumns="repeat(auto-fill, minmax(300px, 1fr))" gap={4}>
|
<Grid templateColumns="repeat(auto-fill, minmax(300px, 1fr))" gap={4}>
|
||||||
@@ -246,7 +344,7 @@ export function SettingsButton() {
|
|||||||
h="24px"
|
h="24px"
|
||||||
flexShrink={0}
|
flexShrink={0}
|
||||||
borderRadius="full"
|
borderRadius="full"
|
||||||
// bg={{base: "blue.50", _dark: "whiteAlpha.200"}}
|
bg={{base: "blue.50", _dark: "whiteAlpha.200"}}
|
||||||
fontWeight="black"
|
fontWeight="black"
|
||||||
fontSize="xs"
|
fontSize="xs"
|
||||||
bg='transparent'
|
bg='transparent'
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import {useSlotRecipe, Text, Flex} from "@chakra-ui/react"
|
import { useRecipe, Button, Stack, Text, Flex } from "@chakra-ui/react"
|
||||||
import UserAvatarMenu from "./UserAvatarMenu.jsx";
|
import UserAvatarMenu from "./UserAvatarMenu.jsx";
|
||||||
|
import { NavLink } from "react-router-dom";
|
||||||
import useAuthStore from "@/store/authStore";
|
import useAuthStore from "@/store/authStore";
|
||||||
import {SearchBar} from "@/components/dashboard/SearchBar.jsx";
|
import {SearchBar} from "@/components/dashboard/SearchBar.jsx";
|
||||||
|
|
||||||
@@ -8,7 +9,7 @@ import {SearchBar} from "@/components/dashboard/SearchBar.jsx";
|
|||||||
|
|
||||||
// Accept a 'user' prop now, fallback to placeholder if empty
|
// Accept a 'user' prop now, fallback to placeholder if empty
|
||||||
export default function Header() {
|
export default function Header() {
|
||||||
const recipe = useSlotRecipe({key: "header"});
|
const recipe = useRecipe({ key: "header" });
|
||||||
const styles = recipe();
|
const styles = recipe();
|
||||||
|
|
||||||
const { user } = useAuthStore();
|
const { user } = useAuthStore();
|
||||||
@@ -19,14 +20,11 @@ export default function Header() {
|
|||||||
const displayEmail = user?.email || "LDAP User";
|
const displayEmail = user?.email || "LDAP User";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex css={styles.root}>
|
<Flex css={styles} >
|
||||||
<Flex css={styles.search_bar}>
|
<SearchBar placeholder="Enter a volcano to search" size="sm" width="410px" />
|
||||||
<SearchBar placeholder="Enter a volcano to search"/>
|
|
||||||
</Flex>
|
|
||||||
|
|
||||||
{/* User Profile Section */}
|
{/* User Profile Section */}
|
||||||
<Flex css={styles.user_info}>
|
<Flex align="center" gap={3} pr={6}>
|
||||||
<Text>{displayName}</Text>
|
<Text fontWeight="bold" textStyle="md" >{displayName}</Text>
|
||||||
<UserAvatarMenu
|
<UserAvatarMenu
|
||||||
name={avatarname}
|
name={avatarname}
|
||||||
// avatar={user.avatar}
|
// avatar={user.avatar}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import {Mountain, House, Earth, MapPin, ShieldUser, PanelLeftClose, PanelLeftOpen} from 'lucide-react';
|
import {useSlotRecipe, Box, Button, IconButton} from "@chakra-ui/react";
|
||||||
import {useSlotRecipe, Box, Button, IconButton, Text, Flex} from "@chakra-ui/react";
|
|
||||||
import {ColorModeButton} from "@/components/ui/color-mode.jsx";
|
import {ColorModeButton} from "@/components/ui/color-mode.jsx";
|
||||||
import {NavLink} from "react-router-dom";
|
|
||||||
import {useState} from "react";
|
import {useState} from "react";
|
||||||
|
import {NavLink} from "react-router-dom";
|
||||||
|
import Tooltip from "../ui/Tooltip.jsx";
|
||||||
|
import {Mountain, House, Earth, MapPin, ShieldUser, Menu, PanelLeftClose, PanelLeftOpen} from 'lucide-react';
|
||||||
|
|
||||||
const SIDEBAR_DEFAULT_BUTTONS = [
|
const SIDEBAR_DEFAULT_BUTTONS = [
|
||||||
{icon: House, name: "Home", url: "/home"},
|
{icon: House, name: "Home", url: "/home"},
|
||||||
@@ -13,28 +14,40 @@ const SIDEBAR_DEFAULT_BUTTONS = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export default function Sidebar() {
|
export default function Sidebar() {
|
||||||
|
|
||||||
const [isOpen, setIsOpen] = useState(true);
|
const [isOpen, setIsOpen] = useState(true);
|
||||||
|
|
||||||
const recipe = useSlotRecipe({key: "sidebar"});
|
const recipe = useSlotRecipe({key: "sidebar"});
|
||||||
const styles = recipe({state: isOpen ? "open" : "closed"});
|
const styles = recipe({state: isOpen ? "open" : "closed"});
|
||||||
const visibleButtons = SIDEBAR_DEFAULT_BUTTONS; // TODO: call btns here according to users authorization
|
|
||||||
|
// TODO we will need to call buttons here by authorized user, for now we update the visible buttons as simply the default buttons
|
||||||
|
const visibleButtons = SIDEBAR_DEFAULT_BUTTONS;
|
||||||
|
|
||||||
const toggleSidebar = () => setIsOpen((prev) => !prev);
|
const toggleSidebar = () => setIsOpen((prev) => !prev);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box css={styles.root}>
|
<Box css={styles.root}>
|
||||||
{/* Logo Navigates to Home Page */}
|
{/* Home Link Logo */}
|
||||||
<Button as={NavLink} to="/home" variant="plain" css={styles.logo}>
|
<Button
|
||||||
<Flex>
|
as={NavLink}
|
||||||
<Text>🌋</Text>
|
to="/home"
|
||||||
<Text css={styles.logo_text}>VDAP</Text>
|
css={styles.logo}
|
||||||
</Flex>
|
variant="plain"
|
||||||
|
>
|
||||||
|
{isOpen ? "🌋 VDAP" : "🌋"}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
{/* Navigation Buttons */}
|
{/* Navigation Buttons */}
|
||||||
{visibleButtons.map((button) => {
|
{visibleButtons.map((button) => {
|
||||||
const Icon = button.icon;
|
const Icon = button.icon;
|
||||||
return (
|
return (
|
||||||
<Button as={NavLink} to={button.url} css={styles.buttons}> {/* Navigation buttons are [icon text] */}
|
<Button
|
||||||
|
as={NavLink}
|
||||||
|
to={button.url}
|
||||||
|
css={styles.buttons}
|
||||||
|
>
|
||||||
|
{/* Navigation buttons are [icon text] */}
|
||||||
<Icon/>
|
<Icon/>
|
||||||
<Box as="span" css={styles.button_text}>
|
<Box as="span" css={styles.button_text}>
|
||||||
{button.name}
|
{button.name}
|
||||||
@@ -42,16 +55,21 @@ export default function Sidebar() {
|
|||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
<Box css={styles.footer}>
|
||||||
{/* Collapse Sidebar and Theme Footer Buttons */}
|
{/* Menu Trigger */}
|
||||||
<Flex css={styles.footer}>
|
<IconButton
|
||||||
<IconButton aria-label="Toggle Sidebar" variant="plain" onClick={toggleSidebar} css={styles.collapse_button}>
|
aria-label="Toggle Sidebar"
|
||||||
|
variant="plain"
|
||||||
|
size="md"
|
||||||
|
onClick={toggleSidebar}
|
||||||
|
css={styles.collapse_button}
|
||||||
|
>
|
||||||
{isOpen ? <PanelLeftClose /> : <PanelLeftOpen />}
|
{isOpen ? <PanelLeftClose /> : <PanelLeftOpen />}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<Flex css={styles.color_mode_button}>
|
|
||||||
<ColorModeButton />
|
{/* Theme Toggler */}
|
||||||
</Flex>
|
<ColorModeButton _hover={{ bg: "transparent" }} />
|
||||||
</Flex>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
:root {
|
:root {
|
||||||
/*font-family: Georgia, 'Times New Roman', Times, serif;*/
|
font-family: Georgia, 'Times New Roman', Times, serif;
|
||||||
font-family: "Roboto", sans-serif;
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import {HStack, Flex, Box, useRecipe, useSlotRecipe} from "@chakra-ui/react";
|
import {HStack, Flex, Box, useRecipe} from "@chakra-ui/react";
|
||||||
import {NavLink, Outlet, useLocation} from "react-router-dom";
|
import {NavLink, Outlet, useLocation} from "react-router-dom";
|
||||||
import {SearchBar} from "../../components/dashboard/SearchBar.jsx";
|
import {SearchBar} from "../../components/dashboard/SearchBar.jsx";
|
||||||
import {SettingsButton} from "../../components/dashboard/SettingsButton.jsx";
|
import {SettingsButton} from "../../components/dashboard/SettingsButton.jsx";
|
||||||
@@ -16,23 +16,30 @@ const HOME_TABS = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const glassTabsRecipe = useRecipe({key: "glassTab"});
|
const recipe = useRecipe({key: "glassTab"});
|
||||||
const homeRecipe = useSlotRecipe({key: "home"});
|
const tabStyles = recipe();
|
||||||
const glassTabsStyle = glassTabsRecipe();
|
|
||||||
const homeStyle = homeRecipe();
|
|
||||||
|
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const isPersonalDashboard = location.pathname === "/home" || location.pathname === "/home/";
|
const isPersonalDashboard = location.pathname === "/home" || location.pathname === "/home/";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex css={homeStyle.root}>
|
<Flex direction="column" height="100%" width="100%">
|
||||||
<Flex as="header" css={homeStyle.header}>
|
|
||||||
|
<Flex as="header" position="sticky" top="0" zIndex="dropdown" bg="transparent" p={5} align="center"
|
||||||
|
justify="space-between" width="100%">
|
||||||
|
|
||||||
{/* TABS CONTAINER */}
|
{/* TABS CONTAINER */}
|
||||||
<Flex>
|
<Flex gap={2} alignItems="center">
|
||||||
{HOME_TABS.map((tab) => {
|
{HOME_TABS.map((tab) => {
|
||||||
const Icon = tab.icon;
|
const Icon = tab.icon;
|
||||||
return (
|
return (
|
||||||
<Box key={tab.name} as={NavLink} to={tab.url} end={tab.exact} css={glassTabsStyle}> {/* CRITICAL: 'end' prop forces exact match so "/home" deactivates on sub-routes*/}
|
<Box
|
||||||
|
key={tab.name}
|
||||||
|
as={NavLink}
|
||||||
|
to={tab.url}
|
||||||
|
end={tab.exact} // CRITICAL: Forces exact match so "/home" deactivates on sub-routes
|
||||||
|
css={tabStyles}
|
||||||
|
>
|
||||||
{/* flexShrink: 0 ensures the icon never squishes during the gooey animation */}
|
{/* flexShrink: 0 ensures the icon never squishes during the gooey animation */}
|
||||||
<Icon size={24} style={{flexShrink: 0}}/>
|
<Icon size={24} style={{flexShrink: 0}}/>
|
||||||
<Box as="span">{tab.name}</Box>
|
<Box as="span">{tab.name}</Box>
|
||||||
@@ -42,6 +49,7 @@ export default function Home() {
|
|||||||
|
|
||||||
{/* The Settings button is now inline with the tabs and only renders on the personal dashboard */}
|
{/* The Settings button is now inline with the tabs and only renders on the personal dashboard */}
|
||||||
{isPersonalDashboard && <SettingsButton/>}
|
{isPersonalDashboard && <SettingsButton/>}
|
||||||
|
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
{/* EDIT MODE BUTTONS & CONTROLS */}
|
{/* EDIT MODE BUTTONS & CONTROLS */}
|
||||||
@@ -49,10 +57,10 @@ export default function Home() {
|
|||||||
<HStack width="258px" justifyContent="flex-end">
|
<HStack width="258px" justifyContent="flex-end">
|
||||||
{/* Future global controls go here */}
|
{/* Future global controls go here */}
|
||||||
</HStack>
|
</HStack>
|
||||||
|
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
{/* TABS CONTENT */}
|
<Flex flex="1" overflow="auto">
|
||||||
<Flex css={homeStyle.body}>
|
|
||||||
<Outlet/>
|
<Outlet/>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ import {WIDGET_REGISTRY} from '@/constants/widgetRegistry.jsx';
|
|||||||
// React-Grid-Layout requires this wrapper to automatically calculate screen width
|
// React-Grid-Layout requires this wrapper to automatically calculate screen width
|
||||||
const ResponsiveGridLayout = WidthProvider(Responsive);
|
const ResponsiveGridLayout = WidthProvider(Responsive);
|
||||||
|
|
||||||
|
|
||||||
export default function MyDashboard() {
|
export default function MyDashboard() {
|
||||||
|
|
||||||
// ☁️ Database Connection
|
// ☁️ Database Connection
|
||||||
const {user} = useAuthStore();
|
const {user} = useAuthStore();
|
||||||
|
|
||||||
@@ -28,23 +28,25 @@ export default function MyDashboard() {
|
|||||||
// 🔒 Safety lock to prevent infinite re-renders
|
// 🔒 Safety lock to prevent infinite re-renders
|
||||||
const hasHydrated = useRef(false);
|
const hasHydrated = useRef(false);
|
||||||
|
|
||||||
// 1. Pull the global slot recipes
|
// 1. Pull the new global slot recipe
|
||||||
const recipe = useSlotRecipe({key: "glassPanel"});
|
const recipe = useSlotRecipe({key: "glassPanel"});
|
||||||
const styles = recipe({ layout: "widget" });
|
const styles = recipe({ layout: "widget" });
|
||||||
const popoverStyles = recipe({ layout: "popover" });
|
const popoverStyles = recipe({ layout: "popover" });
|
||||||
|
|
||||||
// 2. Populate widgets
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (user?.preferences?.dashboard_layout && !hasHydrated.current) {
|
if (user?.preferences?.dashboard_layout && !hasHydrated.current) {
|
||||||
const savedLayout = user.preferences.dashboard_layout;
|
const savedLayout = user.preferences.dashboard_layout;
|
||||||
|
|
||||||
// Safety check: Only inject if it's actually an array of widgets.
|
// Safety check: Only inject if it's actually an array of widgets.
|
||||||
// (Prevents a crash if MariaDB returns a default empty object {})
|
// (Prevents a crash if MariaDB returns a default empty object {})
|
||||||
if (Array.isArray(savedLayout)) setWidgets(savedLayout);
|
if (Array.isArray(savedLayout)) {
|
||||||
|
setWidgets(savedLayout);
|
||||||
|
}
|
||||||
hasHydrated.current = true;
|
hasHydrated.current = true;
|
||||||
}
|
}
|
||||||
}, [user, setWidgets]);
|
}, [user, setWidgets]);
|
||||||
|
|
||||||
|
|
||||||
// 🛠️ Format the data for RGL
|
// 🛠️ Format the data for RGL
|
||||||
const rglLayout = widgets.map(w => ({
|
const rglLayout = widgets.map(w => ({
|
||||||
i: w.id,
|
i: w.id,
|
||||||
@@ -52,10 +54,10 @@ export default function MyDashboard() {
|
|||||||
y: w.y,
|
y: w.y,
|
||||||
w: w.w,
|
w: w.w,
|
||||||
h: w.h,
|
h: w.h,
|
||||||
isResizable: false // The magic lock! No resizing allowed globally.
|
isResizable: false // 🚫 The magic lock! No resizing allowed globally.
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// 3. The component mapper
|
// 3. THE COMPONENT MAPPER
|
||||||
const renderWidget = (widget) => {
|
const renderWidget = (widget) => {
|
||||||
const registryEntry = WIDGET_REGISTRY[widget.type];
|
const registryEntry = WIDGET_REGISTRY[widget.type];
|
||||||
|
|
||||||
@@ -68,21 +70,28 @@ export default function MyDashboard() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Box css={styles.header}>
|
<Box css={styles.header}>
|
||||||
<Text>
|
<Text color="titleColor" fontWeight="semibold" fontSize="md" isTruncated>
|
||||||
{registryEntry.name}
|
{registryEntry.name}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
{/* WIDGET SETTINGS BUTTON (ELLIPSES) */}
|
{/* THE SETTINGS ELLIPSIS */}
|
||||||
{SettingsUI && (
|
{SettingsUI ? (
|
||||||
<Popover.Root positioning={{placement: "bottom-end"}}>
|
<Popover.Root positioning={{placement: "bottom-end"}}>
|
||||||
<Popover.Trigger asChild>
|
<Popover.Trigger asChild>
|
||||||
<IconButton size="xs" variant="ghost" aria-label="Widget Settings">
|
<IconButton
|
||||||
|
size="xs"
|
||||||
|
variant="ghost"
|
||||||
|
color="gray.400"
|
||||||
|
borderRadius="xl"
|
||||||
|
_hover={{color: "white", bg: "gray.700"}}
|
||||||
|
aria-label="Widget Settings"
|
||||||
|
>
|
||||||
<MoreVertical size={16}/>
|
<MoreVertical size={16}/>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Popover.Trigger>
|
</Popover.Trigger>
|
||||||
|
|
||||||
{/* NEW: The Positioner lifts the content out of the Flexbox flow */}
|
{/* NEW: The Positioner lifts the content out of the Flexbox flow */}
|
||||||
<Popover.Positioner zIndex={1}>
|
<Popover.Positioner zIndex={10}>
|
||||||
<Popover.Content css={popoverStyles.root}>
|
<Popover.Content css={popoverStyles.root}>
|
||||||
<Suspense fallback={<Spinner size="sm"/>}>
|
<Suspense fallback={<Spinner size="sm"/>}>
|
||||||
<SettingsUI
|
<SettingsUI
|
||||||
@@ -93,6 +102,8 @@ export default function MyDashboard() {
|
|||||||
</Popover.Content>
|
</Popover.Content>
|
||||||
</Popover.Positioner>
|
</Popover.Positioner>
|
||||||
</Popover.Root>
|
</Popover.Root>
|
||||||
|
) : (
|
||||||
|
<Box w="20px" h="20px"/>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
@@ -122,28 +133,30 @@ export default function MyDashboard() {
|
|||||||
rowHeight={30}
|
rowHeight={30}
|
||||||
isDraggable={isEditing} // Only allows dragging when Settings tools toggle this
|
isDraggable={isEditing} // Only allows dragging when Settings tools toggle this
|
||||||
isResizable={false} // Double lock-down
|
isResizable={false} // Double lock-down
|
||||||
compactType="vertical" // Auto-packs widgets to the top
|
|
||||||
onLayoutChange={(newLayout) => updateLayoutPositions(newLayout)} // Fires when user drops a widget
|
onLayoutChange={(newLayout) => updateLayoutPositions(newLayout)} // Fires when user drops a widget
|
||||||
|
compactType="vertical" // Auto-packs widgets to the top
|
||||||
>
|
>
|
||||||
{/* 🎨 Paint the Widgets */}
|
{/* 3. 🎨 Paint the Widgets */}
|
||||||
{widgets.map(widget => (
|
{widgets.map(widget => (
|
||||||
<Box
|
<Box
|
||||||
key={widget.id}
|
key={widget.id}
|
||||||
css={styles.root}
|
css={styles.root}
|
||||||
// Grid-specific state overrides remain inline
|
// 3. Grid-specific state overrides remain inline
|
||||||
boxShadow={isEditing ? "outline" : styles.root.boxShadow}
|
boxShadow={isEditing ? "outline" : styles.root.boxShadow}
|
||||||
borderStyle={isEditing ? "dashed" : "solid"}
|
borderStyle={isEditing ? "dashed" : "solid"}
|
||||||
borderWidth={isEditing ? "2px" : "1px"}
|
borderWidth={isEditing ? "2px" : "1px"}
|
||||||
borderColor={isEditing ? "orange.300" : styles.root.borderColor}
|
borderColor={isEditing ? "orange.300" : styles.root.borderColor}
|
||||||
cursor={isEditing ? "grab" : "default"}
|
cursor={isEditing ? "grab" : "default"}
|
||||||
position="relative" // REQUIRED so the absolute button stays inside this box
|
position="relative" // 3. REQUIRED so the absolute button stays inside this box
|
||||||
>
|
>
|
||||||
{/* THE DELETE BUTTON */}
|
{/* 4. THE DELETE BUTTON */}
|
||||||
{isEditing && (
|
{isEditing && (
|
||||||
<IconButton
|
<IconButton
|
||||||
|
aria-label="Remove widget"
|
||||||
position="absolute"
|
position="absolute"
|
||||||
top={2}
|
top={2}
|
||||||
right={2}
|
right={2}
|
||||||
|
size="xs"
|
||||||
bg="white"
|
bg="white"
|
||||||
color="black"
|
color="black"
|
||||||
border="1px solid"
|
border="1px solid"
|
||||||
@@ -151,8 +164,6 @@ export default function MyDashboard() {
|
|||||||
borderColor="gray.200"
|
borderColor="gray.200"
|
||||||
_hover={{bg: "red.50", color: "red.500", borderColor: "red.200"}}
|
_hover={{bg: "red.50", color: "red.500", borderColor: "red.200"}}
|
||||||
zIndex={2}
|
zIndex={2}
|
||||||
aria-label="Remove widget"
|
|
||||||
size="xs"
|
|
||||||
onClick={() => removeWidget(widget.id)}
|
onClick={() => removeWidget(widget.id)}
|
||||||
onMouseDown={(e) => e.stopPropagation()} // 🚫 Stops RGL from grabbing the widget
|
onMouseDown={(e) => e.stopPropagation()} // 🚫 Stops RGL from grabbing the widget
|
||||||
onTouchStart={(e) => e.stopPropagation()} // 🚫 Same protection for mobile touches
|
onTouchStart={(e) => e.stopPropagation()} // 🚫 Same protection for mobile touches
|
||||||
@@ -161,7 +172,7 @@ export default function MyDashboard() {
|
|||||||
</IconButton>
|
</IconButton>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* SUSPENSE BOUNDARY wrapping the render function */}
|
{/* 4. SUSPENSE BOUNDARY wrapping the render function */}
|
||||||
<Suspense fallback={
|
<Suspense fallback={
|
||||||
<Flex css={styles.body} align="center" justify="center">
|
<Flex css={styles.body} align="center" justify="center">
|
||||||
<Spinner size="md" color="blue.400" thickness="3px"/>
|
<Spinner size="md" color="blue.400" thickness="3px"/>
|
||||||
|
|||||||
+77
-401
@@ -1,10 +1,8 @@
|
|||||||
import {defineSlotRecipe, createSystem, defaultConfig, defineConfig, defineRecipe} from "@chakra-ui/react";
|
import {defineSlotRecipe, createSystem, defaultConfig, defineConfig, defineRecipe} from "@chakra-ui/react";
|
||||||
|
|
||||||
// CONSOLIDATED ✔
|
// RECIPES
|
||||||
const headerRecipe = defineSlotRecipe({
|
const headerRecipe = defineRecipe({
|
||||||
slots: ["root", "search_bar", "user_info"],
|
|
||||||
base: {
|
base: {
|
||||||
root: {
|
|
||||||
bg: "{transparent}",
|
bg: "{transparent}",
|
||||||
color: "text",
|
color: "text",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
@@ -13,40 +11,16 @@ const headerRecipe = defineSlotRecipe({
|
|||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
pl: 3,
|
|
||||||
},
|
|
||||||
search_bar: {
|
|
||||||
width: "100%",
|
|
||||||
// input element in search bar component
|
|
||||||
"& input": {
|
|
||||||
width: "410px",
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
user_info: {
|
|
||||||
flexDirection: "row",
|
|
||||||
justifyContent: "flex-end",
|
|
||||||
alignItems: "center",
|
|
||||||
gap: 3,
|
|
||||||
pr: 6,
|
|
||||||
|
|
||||||
// The Text component
|
|
||||||
"& p": {
|
|
||||||
fontWeight: "600",
|
|
||||||
fontSize: "md" // equivalent to 16px
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// CONSOLIDATED ✔
|
|
||||||
const sidebarRecipe = defineSlotRecipe({
|
const sidebarRecipe = defineSlotRecipe({
|
||||||
slots: ["root", "logo", "logo_text", "footer", "button_text", "buttons", "collapse_button", "color_mode_button"],
|
slots: ["root", "logo", "footer", "button_text","buttons", "collapse_button"],
|
||||||
base: {
|
base: {
|
||||||
root: {
|
root: {
|
||||||
// 1. Semi-transparent backgrounds
|
// 1. Semi-transparent backgrounds
|
||||||
bg: {
|
bg: {
|
||||||
// base: "linear-gradient(to bottom right, #99000040 20%, #FF660040 60%, #EEEE0040 100%)", // this is too pale for light mode imo
|
base: "linear-gradient(to bottom right, #99000040 20%, #FF660040 60%, #EEEE0040 100%)",
|
||||||
base: "linear-gradient(to bottom right, #97282880 20%, #EB7F3160 60%, #FCAD3840 100%)", // colors from: https://colorhunt.co/palette/972828e45742eb7f31fcad38
|
|
||||||
_dark: "linear-gradient(to bottom right, #9900003C 20%, #FF66003C 60%, #FFC0003C 100%)"
|
_dark: "linear-gradient(to bottom right, #9900003C 20%, #FF66003C 60%, #FFC0003C 100%)"
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -73,7 +47,7 @@ const sidebarRecipe = defineSlotRecipe({
|
|||||||
justifyContent: "start",
|
justifyContent: "start",
|
||||||
alignItems: "stretch",
|
alignItems: "stretch",
|
||||||
gap: 4,
|
gap: 4,
|
||||||
transition: "width 0.5s ease",
|
transition: "width 0.4s ease",
|
||||||
|
|
||||||
// CRITICAL: Adjust padding and overflow to allow the button to touch the right edge
|
// CRITICAL: Adjust padding and overflow to allow the button to touch the right edge
|
||||||
pl: 2, // Keep left padding
|
pl: 2, // Keep left padding
|
||||||
@@ -88,7 +62,7 @@ const sidebarRecipe = defineSlotRecipe({
|
|||||||
bg: "transparent",
|
bg: "transparent",
|
||||||
|
|
||||||
justifyContent: "flex-start",
|
justifyContent: "flex-start",
|
||||||
transition: "background-color 0.3s ease, color 0.3s ease",
|
transition: "background-color 0.4s ease, color 0.4s ease",
|
||||||
|
|
||||||
"& svg": {
|
"& svg": {
|
||||||
transition: "stroke-width 0.4s ease",
|
transition: "stroke-width 0.4s ease",
|
||||||
@@ -96,13 +70,11 @@ const sidebarRecipe = defineSlotRecipe({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_hover: {
|
_hover: {
|
||||||
bg: "rgba(255, 255, 255, 0.2)",
|
bg: "rgba(255, 255, 255, 0.1)",
|
||||||
color: "{text}",
|
color: "{text}",
|
||||||
|
fontWeight: "semibold",
|
||||||
"& svg": {
|
"& svg": {
|
||||||
strokeWidth: "3"
|
strokeWidth: "3"
|
||||||
},
|
|
||||||
"& span": {
|
|
||||||
fontWeight: "700",
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -122,11 +94,9 @@ const sidebarRecipe = defineSlotRecipe({
|
|||||||
_hover: {
|
_hover: {
|
||||||
bg: "{MainBackground}",
|
bg: "{MainBackground}",
|
||||||
color: "{textInverted}",
|
color: "{textInverted}",
|
||||||
|
fontWeight: "normal",
|
||||||
"& svg": {
|
"& svg": {
|
||||||
strokeWidth: "2" // Keeps the active icon at normal thickness on hover
|
strokeWidth: "2" // Keeps the active icon at normal thickness on hover
|
||||||
},
|
|
||||||
"& span": {
|
|
||||||
fontWeight: "500",
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -161,198 +131,98 @@ const sidebarRecipe = defineSlotRecipe({
|
|||||||
},
|
},
|
||||||
logo: {
|
logo: {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
justifyContent: "flex-start",
|
height: "auto",
|
||||||
ml: 2,
|
|
||||||
textStyle: "4xl",
|
|
||||||
fontWeight: "bold",
|
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
|
fontWeight: "bold",
|
||||||
px: 0,
|
px: 0,
|
||||||
},
|
},
|
||||||
logo_text: {
|
|
||||||
transition: "opacity 0.2s ease, visibility 0.2s ease, margin 0.2s ease",
|
|
||||||
whiteSpace: "nowrap",
|
|
||||||
overflow: "hidden",
|
|
||||||
textOverflow: "clip",
|
|
||||||
},
|
|
||||||
footer: {
|
footer: {
|
||||||
flexDirection: "row",
|
|
||||||
justifyContent: "space-between",
|
|
||||||
width: "100%",
|
|
||||||
mt: "auto",
|
mt: "auto",
|
||||||
pl: 2,
|
display: "flex",
|
||||||
|
justifyContent: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
pb: 4,
|
||||||
pr: 2,
|
pr: 2,
|
||||||
|
transition: "opacity 0.3s ease, visibility 0.3s ease, margin 0.3s ease"
|
||||||
},
|
},
|
||||||
button_text: {
|
button_text: {
|
||||||
transition: "opacity 0.3s ease, visibility 0.3s ease, margin 0.3s ease",
|
transition: "opacity 0.3s ease, visibility 0.3s ease, margin 0.3s ease",
|
||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap"
|
||||||
overflow: "hidden",
|
|
||||||
textOverflow: "clip",
|
|
||||||
fontWeight: "500",
|
|
||||||
},
|
},
|
||||||
collapse_button: {
|
collapse_button: {
|
||||||
"& svg": { flexShrink: "0" },
|
"& svg": { flexShrink: "0" },
|
||||||
},
|
},
|
||||||
color_mode_button: {
|
|
||||||
"& button": {
|
|
||||||
_hover: {
|
|
||||||
bg: "transparent",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// opened_theme_button: {
|
|
||||||
// width: "100%",
|
|
||||||
// align: "center",
|
|
||||||
// justifyContent: "right",
|
|
||||||
// mr: 6,
|
|
||||||
// // "& button": {
|
|
||||||
// // alignSelf: "center",
|
|
||||||
// // transition: "opacity 0.3s ease, visibility 0.3s ease, margin 0.3s ease",
|
|
||||||
// // _hover: {
|
|
||||||
// // bg: "transparent",
|
|
||||||
// // }
|
|
||||||
// // }
|
|
||||||
// },
|
|
||||||
// closed_theme_button: {
|
|
||||||
// // ml: 0.9,
|
|
||||||
// // "& button": {
|
|
||||||
// // transition: "opacity 0.3s ease, visibility 0.3s ease, margin 0.3s ease",
|
|
||||||
// // _hover: {
|
|
||||||
// // bg: "transparent",
|
|
||||||
// // }
|
|
||||||
// // }
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
variants: {
|
variants: {
|
||||||
state: {
|
state: {
|
||||||
open: {
|
open: {
|
||||||
root: { width: "190px" },
|
root: { width: "190px" },
|
||||||
|
logo: { justifyContent: "flex-start", ml: 2, textStyle: "4xl" },
|
||||||
|
footer: { gap: 16, flexDirection: "row" },
|
||||||
button_text: {ml: 3, opacity: 1, visibility: "visible"},
|
button_text: {ml: 3, opacity: 1, visibility: "visible"},
|
||||||
logo_text: {ml: 3, opacity: 1, visibility: "visible", transition: "opacity 0.5s ease, visibility 0.5s ease, margin 0.5s ease"},
|
|
||||||
color_mode_button: {
|
|
||||||
"& button": {
|
|
||||||
position: "static",
|
|
||||||
},
|
|
||||||
// the css below is equivalent to chakra's 'truncate' prop
|
|
||||||
// it makes sure the icon doesn't jump out of the bounds of the sidebar while it's transitioning from closed to open
|
|
||||||
whiteSpace: "nowrap",
|
|
||||||
overflow: "hidden",
|
|
||||||
textOverflow: "clip",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
closed: {
|
closed: {
|
||||||
root: { width: "71px" },
|
root: { width: "71px" },
|
||||||
button_text: {opacity: 0, visibility: "hidden"},
|
logo: { justifyContent: "center", ml: -1, textStyle: "3xl" },
|
||||||
logo_text: {opacity: 0, visibility: "hidden", transition: "opacity 0.2s ease, visibility 0.2s ease, margin 0.2s ease"},
|
footer: { gap: 2, flexDirection: "column-reverse" },
|
||||||
color_mode_button: {"& button": {position: "relative", bottom: "35px", right: "37px",}
|
button_text: {ml: 0, opacity: 0, visibility: "hidden"},
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// CONSOLIDATED ✔
|
|
||||||
const dashboardRecipe = defineRecipe({
|
const dashboardRecipe = defineRecipe({
|
||||||
base: {
|
base: {
|
||||||
height: "100vh",
|
bg: "{MainBackground}"
|
||||||
width: "100vw",
|
|
||||||
bg: "{MainBackground}",
|
|
||||||
|
|
||||||
// selects the third div in the grid layout (the canvas)
|
|
||||||
"& > div:nth-of-type(3)": {
|
|
||||||
width: "100%",
|
|
||||||
overflow: "auto",
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// CONSOLIDATED ✔
|
const canvasRecipe = defineRecipe({
|
||||||
const homeRecipe = defineSlotRecipe({
|
base: {
|
||||||
slots: ["root", "header", "body"],
|
bg: "{transparent}",
|
||||||
|
zIndex: "-1",
|
||||||
|
color: "{text}"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const widgetRecipe = defineSlotRecipe({
|
||||||
|
slots: ["root", "header", "canvas"],
|
||||||
base: {
|
base: {
|
||||||
root: {
|
root: {
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
|
gap: "1",
|
||||||
|
position: "relative",
|
||||||
|
bg: "base100",
|
||||||
|
borderRadius: "md",
|
||||||
|
p: "1",
|
||||||
|
paddingBottom: "2",
|
||||||
|
border: "1px solid",
|
||||||
|
borderColor: "{base300}",
|
||||||
|
textAlign: "center",
|
||||||
height: "100%",
|
height: "100%",
|
||||||
width: "100%",
|
position: "fixed"
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
// Flex contianer as a header that contains all the tabs
|
flexShrink: "0",
|
||||||
width: "100%",
|
bg: "{base300}",
|
||||||
align: "center",
|
color: "{text}",
|
||||||
justify: "space-between",
|
cursor: "move",
|
||||||
top: "0",
|
borderRadius: "sm",
|
||||||
p: 5,
|
whiteSpace: "nowrap",
|
||||||
position: "sticky",
|
textAlign: "left",
|
||||||
zIndex: "dropdown",
|
pl: "2"
|
||||||
bg: "transparent",
|
|
||||||
|
|
||||||
// THE TABS
|
|
||||||
// Flex container renders as div for all the buttons within the header
|
|
||||||
"& > div": {
|
|
||||||
alignItems: "center",
|
|
||||||
gap: 2,
|
|
||||||
|
|
||||||
// icon in each tab button
|
|
||||||
"& svg": {
|
|
||||||
// TODO: bring over svg styling
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
body: {
|
canvas: {
|
||||||
flex: 1,
|
flex: "1 1 auto",
|
||||||
|
bg: "transparent",
|
||||||
|
color: "{text}",
|
||||||
|
cursor: "default",
|
||||||
|
borderRadius: "md",
|
||||||
overflow: "auto",
|
overflow: "auto",
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
// const canvasRecipe = defineRecipe({
|
|
||||||
// base: {
|
|
||||||
// bg: "{transparent}",
|
|
||||||
// zIndex: "-1",
|
|
||||||
// color: "{text}"
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// const widgetRecipe = defineSlotRecipe({
|
|
||||||
// slots: ["root", "header", "canvas"],
|
|
||||||
// base: {
|
|
||||||
// root: {
|
|
||||||
// flexDirection: "column",
|
|
||||||
// gap: "1",
|
|
||||||
// position: "relative",
|
|
||||||
// bg: "base100",
|
|
||||||
// borderRadius: "md",
|
|
||||||
// p: "1",
|
|
||||||
// paddingBottom: "2",
|
|
||||||
// border: "1px solid",
|
|
||||||
// borderColor: "{base300}",
|
|
||||||
// textAlign: "center",
|
|
||||||
// height: "100%",
|
|
||||||
// // position: "fixed"
|
|
||||||
// },
|
|
||||||
// header: {
|
|
||||||
// flexShrink: "0",
|
|
||||||
// bg: "{base300}",
|
|
||||||
// color: "{text}",
|
|
||||||
// cursor: "move",
|
|
||||||
// borderRadius: "sm",
|
|
||||||
// whiteSpace: "nowrap",
|
|
||||||
// textAlign: "left",
|
|
||||||
// pl: "2"
|
|
||||||
// },
|
|
||||||
// canvas: {
|
|
||||||
// flex: "1 1 auto",
|
|
||||||
// bg: "transparent",
|
|
||||||
// color: "{text}",
|
|
||||||
// cursor: "default",
|
|
||||||
// borderRadius: "md",
|
|
||||||
// overflow: "auto",
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// USED IN COMPONENTS:
|
|
||||||
// * Settings Button
|
|
||||||
// * My Dashboard
|
|
||||||
const glassPanelRecipe = defineSlotRecipe({
|
const glassPanelRecipe = defineSlotRecipe({
|
||||||
slots: ["root", "header", "body"],
|
slots: ["root", "header", "body"],
|
||||||
|
|
||||||
@@ -376,216 +246,26 @@ const glassPanelRecipe = defineSlotRecipe({
|
|||||||
variants: {
|
variants: {
|
||||||
layout: {
|
layout: {
|
||||||
widget: {
|
widget: {
|
||||||
root: {
|
root: {width: "100%", height: "100%", borderRadius: "3xl"},
|
||||||
width: "100%",
|
header: {display: "flex", justifyContent: "space-between", alignItems: "center", px: 3, pt: 2, pb: 0},
|
||||||
height: "100%",
|
body: {flex: "1", overflow: "hidden", position: "relative", px: 1, pb: 1, pt: 0}
|
||||||
borderRadius: "3xl",
|
|
||||||
},
|
|
||||||
header: {
|
|
||||||
display: "flex",
|
|
||||||
justifyContent: "space-between",
|
|
||||||
alignItems: "center",
|
|
||||||
px: 3,
|
|
||||||
pt: 2,
|
|
||||||
pb: 0,
|
|
||||||
|
|
||||||
"& > p": {
|
|
||||||
color: "titleColor",
|
|
||||||
fontWeight: "500",
|
|
||||||
fontSize: "16px",
|
|
||||||
|
|
||||||
// the following three specifications are equivalent to Chakra's 'truncate' prop
|
|
||||||
whiteSpace: "nowrap",
|
|
||||||
overflow: "hidden",
|
|
||||||
textOverflow: "clip",
|
|
||||||
},
|
|
||||||
|
|
||||||
"& > button": {
|
|
||||||
borderRadius: "xl",
|
|
||||||
|
|
||||||
_hover: {
|
|
||||||
color: "white",
|
|
||||||
bg: "gray.500",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
body: {
|
|
||||||
flex: "1",
|
|
||||||
overflow: "hidden",
|
|
||||||
position: "relative",
|
|
||||||
px: 1,
|
|
||||||
pb: 1,
|
|
||||||
pt: 0
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
dropdown: {
|
dropdown: {
|
||||||
root: {
|
root: {borderRadius: "xl", p: 1}
|
||||||
borderRadius: "xl",
|
|
||||||
p: 1
|
|
||||||
}
|
|
||||||
// (Header and body slots are ignored here because dropdowns don't use them)
|
// (Header and body slots are ignored here because dropdowns don't use them)
|
||||||
},
|
},
|
||||||
popover: {
|
popover: {
|
||||||
root: {
|
root: {
|
||||||
borderRadius: "2xl",
|
borderRadius: "2xl",
|
||||||
p: 0,
|
p: 4,
|
||||||
boxShadow: "xl",
|
boxShadow: "xl",
|
||||||
minW: "240px",
|
minW: "240px",
|
||||||
maxW: "60%",
|
|
||||||
minH: "80%",
|
|
||||||
overflow: "hidden",
|
|
||||||
// OVERRIDES: Make the background 85-90% opaque instead of 40%
|
// OVERRIDES: Make the background 85-90% opaque instead of 40%
|
||||||
bg: {
|
bg: { base: "rgba(255, 255, 255, 0.75)", _dark: "rgba(20, 22, 25, 0.8)" },
|
||||||
base: "rgba(255, 255, 255, 0.75)",
|
|
||||||
_dark: "rgba(20, 22, 25, 0.8)"
|
|
||||||
},
|
|
||||||
|
|
||||||
// OVERRIDES: Increase the blur just to smooth out any stubborn gridlines
|
// OVERRIDES: Increase the blur just to smooth out any stubborn gridlines
|
||||||
backdropFilter: "blur(15px)",
|
backdropFilter: "blur(15px)",
|
||||||
WebkitBackdropFilter: "blur(15px)",
|
WebkitBackdropFilter: "blur(15px)",
|
||||||
|
|
||||||
|
|
||||||
// IMPORTANT: everything below is specific to the widget menu found in the settingsButton component
|
|
||||||
// dialog header
|
|
||||||
"& > div.chakra-dialog__header": {
|
|
||||||
bg: "transparent",
|
|
||||||
color: {
|
|
||||||
base: "gray.800",
|
|
||||||
_dark: "white"
|
|
||||||
},
|
|
||||||
py: 4,
|
|
||||||
borderColor: {
|
|
||||||
base: "gray.200",
|
|
||||||
_dark: "whiteAlpha.200"
|
|
||||||
},
|
|
||||||
|
|
||||||
// title
|
|
||||||
"& h2": {
|
|
||||||
fontSize: "xl",
|
|
||||||
fontWeight: "bold"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
// dialog body
|
|
||||||
"& > div.chakra-dialog__body": {
|
|
||||||
p: 0,
|
|
||||||
|
|
||||||
// box container of the widget category menu
|
|
||||||
"& div.chakra-tabs__root > div:first-child": {
|
|
||||||
position: "relative",
|
|
||||||
display: "flex",
|
|
||||||
maxW: "100%",
|
|
||||||
mx: 5,
|
|
||||||
mt: 4,
|
|
||||||
mb: 6
|
|
||||||
},
|
|
||||||
|
|
||||||
// the horizontal widget categories menu
|
|
||||||
"& div.chakra-tabs__list": {
|
|
||||||
bg: {
|
|
||||||
base: "rgba(0, 0, 0, 0.04)",
|
|
||||||
_dark: "rgba(255, 255, 255, 0.05)"
|
|
||||||
},
|
|
||||||
p: 1,
|
|
||||||
borderRadius: "full",
|
|
||||||
display: "flex",
|
|
||||||
flexWrap: "nowrap",
|
|
||||||
overflowX: "auto",
|
|
||||||
maxW: "100%",
|
|
||||||
border: "1px solid",
|
|
||||||
borderColor: {
|
|
||||||
base: "blackAlpha.50",
|
|
||||||
_dark: "whiteAlpha.100"
|
|
||||||
},
|
|
||||||
scrollbarWidth: "none",
|
|
||||||
"&::-webkit-scrollbar": {display: "none"},
|
|
||||||
|
|
||||||
// the pill shaped menu options
|
|
||||||
"& button.chakra-tabs__trigger": {
|
|
||||||
px: 5,
|
|
||||||
py: 2,
|
|
||||||
borderRadius: "full",
|
|
||||||
whiteSpace: "nowrap",
|
|
||||||
flexShrink: 0,
|
|
||||||
color: {
|
|
||||||
base: "gray.500",
|
|
||||||
_dark: "gray.400"
|
|
||||||
},
|
|
||||||
fontWeight: "medium",
|
|
||||||
transition: "background-color 0.2s, color 0.2s, box-shadow 0.2s",
|
|
||||||
_hover: {
|
|
||||||
color: {
|
|
||||||
base: "gray.800",
|
|
||||||
_dark: "gray.200"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
_selected: {
|
|
||||||
bg: {
|
|
||||||
base: "white",
|
|
||||||
_dark: "rgba(255, 255, 255, 0.12)"
|
|
||||||
},
|
|
||||||
color: {
|
|
||||||
base: "blue.600",
|
|
||||||
_dark: "blue.200"
|
|
||||||
},
|
|
||||||
boxShadow: "sm",
|
|
||||||
fontWeight: "bold",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// base styling applied to both chevron navigators
|
|
||||||
"& div.chakra-tabs__root > div:first-child div:has(svg)": {
|
|
||||||
position: "absolute",
|
|
||||||
top: "0",
|
|
||||||
bottom: "0",
|
|
||||||
w: "50px",
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "center",
|
|
||||||
zIndex: 2,
|
|
||||||
cursor: "pointer",
|
|
||||||
bg: {
|
|
||||||
base: "rgba(255, 255, 255, 0.7)",
|
|
||||||
_dark: "rgba(30, 30, 30, 0.8)"
|
|
||||||
},
|
|
||||||
color: {
|
|
||||||
base: "gray.600",
|
|
||||||
_dark: "gray.300"
|
|
||||||
},
|
|
||||||
backdropFilter: "blur(1px)",
|
|
||||||
transition: "background-color 0.2s",
|
|
||||||
|
|
||||||
_hover: {
|
|
||||||
color: {
|
|
||||||
base: "blue.500",
|
|
||||||
_dark: "blue.300"
|
|
||||||
},
|
|
||||||
bg: {
|
|
||||||
base: "rgba(255, 255, 255, 0.9)",
|
|
||||||
_dark: "rgba(40, 40, 40, 0.95)"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
"&:has(.lucide-chevron-left)": {
|
|
||||||
left: 0,
|
|
||||||
borderTopLeftRadius: "full",
|
|
||||||
borderBottomLeftRadius: "full",
|
|
||||||
// Bites a transparent circle out of the flat right side!
|
|
||||||
WebkitMaskImage: "radial-gradient(circle at 100% 50%, transparent 30px, black 19px)",
|
|
||||||
maskImage: "radial-gradient(circle at 100% 50%, transparent 30px, black 35px)",
|
|
||||||
},
|
|
||||||
|
|
||||||
"&:has(.lucide-chevron-right)": {
|
|
||||||
right: 0,
|
|
||||||
borderTopRightRadius: "full",
|
|
||||||
borderBottomRightRadius: "full",
|
|
||||||
// THE MAGIC: Bites a transparent circle out of the flat left side!
|
|
||||||
WebkitMaskImage: "radial-gradient(circle at 0% 50%, transparent 30px, black 19px)",
|
|
||||||
maskImage: "radial-gradient(circle at 0% 50%, transparent 30px, black 35px)",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -625,7 +305,7 @@ const glassTabRecipe = defineRecipe({
|
|||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
fontWeight: "500",
|
fontWeight: "bold",
|
||||||
color: "fg.muted",
|
color: "fg.muted",
|
||||||
|
|
||||||
// --- THE GLASS EFFECT (Inactive) ---
|
// --- THE GLASS EFFECT (Inactive) ---
|
||||||
@@ -743,17 +423,16 @@ const config = defineConfig({
|
|||||||
theme: {
|
theme: {
|
||||||
semanticTokens: {
|
semanticTokens: {
|
||||||
colors: {
|
colors: {
|
||||||
// base100: {value: {base: "#f6f9faff", _dark: "#1617199e"}},
|
base100: {value: {base: "#f6f9faff", _dark: "#1617199e"}},
|
||||||
// base200: {value: {base: "#e6ecf1ff", _dark: "#242424"}},
|
base200: {value: {base: "#e6ecf1ff", _dark: "#242424"}},
|
||||||
// base300: {value: {base: "#d3dae4ff", _dark: "#0a0b0bff"}},
|
base300: {value: {base: "#d3dae4ff", _dark: "#0a0b0bff"}},
|
||||||
// primary: {value: {base: "#2B98F8", _dark: "#2B98F8"}},
|
primary: {value: {base: "#2B98F8", _dark: "#2B98F8"}},
|
||||||
// primaryLt: {value: {base: "#98cdffff", _dark: "#98cdffff"}},
|
primaryLt: {value: {base: "#98cdffff", _dark: "#98cdffff"}},
|
||||||
// secondaryBG: {value: {base: "#EDF1F1", _dark: "#121212"}},
|
secondaryBG: {value: {base: "#EDF1F1", _dark: "#121212"}},
|
||||||
// border: {value: {base: "#000000", _dark: "#cbcbcb84"}},
|
border: {value: {base: "#000000", _dark: "#cbcbcb84"}},
|
||||||
text: {value: {base: "#000000", _dark: "#FFFFFF"}},
|
text: {value: {base: "#000000", _dark: "#FFFFFF"}},
|
||||||
textInverted: {value: {base: "#000000", _dark: "#FFFFFF"}},
|
textInverted: {value: {base: "#000000", _dark: "#FFFFFF"}},
|
||||||
// icon: {value: {base: "#000000", _dark: "#FFFFFF"}},
|
icon: {value: {base: "#000000", _dark: "#FFFFFF"}},
|
||||||
|
|
||||||
gooeyButtonBackground: {value: {base: "rgba(255, 255, 255, 0.1)", _dark: "rgba(255, 255, 255, 0.1)"}},
|
gooeyButtonBackground: {value: {base: "rgba(255, 255, 255, 0.1)", _dark: "rgba(255, 255, 255, 0.1)"}},
|
||||||
MainBackground: {value: {base: "#F9F9F9", _dark: "#141414"}},
|
MainBackground: {value: {base: "#F9F9F9", _dark: "#141414"}},
|
||||||
titleColor: {value: {base: "gray.800", _dark: "#FFFFFF"}},
|
titleColor: {value: {base: "gray.800", _dark: "#FFFFFF"}},
|
||||||
@@ -767,20 +446,17 @@ const config = defineConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
recipes: {
|
recipes: {
|
||||||
|
header: headerRecipe,
|
||||||
dashboard: dashboardRecipe,
|
dashboard: dashboardRecipe,
|
||||||
// canvas: canvasRecipe,
|
canvas: canvasRecipe,
|
||||||
glassTab: glassTabRecipe
|
glassTab: glassTabRecipe
|
||||||
},
|
},
|
||||||
slotRecipes: {
|
slotRecipes: {
|
||||||
header: headerRecipe,
|
|
||||||
sidebar: sidebarRecipe,
|
sidebar: sidebarRecipe,
|
||||||
// widget: widgetRecipe,
|
widget: widgetRecipe,
|
||||||
glassPanel: glassPanelRecipe,
|
glassPanel: glassPanelRecipe,
|
||||||
home: homeRecipe,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Define semantic tokens and export recipes
|
|
||||||
export const system = createSystem(defaultConfig, config);
|
export const system = createSystem(defaultConfig, config);
|
||||||
Reference in New Issue
Block a user