From 43678cb1a42871b8efdbc91b334cea039e080349 Mon Sep 17 00:00:00 2001 From: cqh963852 Date: Sun, 14 Jul 2024 21:26:03 +0800 Subject: [PATCH] feat: update themes --- apps/website/app/layout.tsx | 4 +- apps/website/components/Drawer/DrawerSide.tsx | 15 +- apps/website/features/LayoutDrawer/index.tsx | 130 +- .../features/Navbar/LanguageDropdown.spec.tsx | 2 +- .../features/Navbar/LanguageDropdown.tsx | 5 +- .../website/features/Navbar/ThemeDropdown.tsx | 7 +- .../features/Navbar/VersionDropdown.tsx | 7 +- apps/website/features/Navbar/style.css.ts | 4 +- apps/website/package.json | 20 +- package.json | 12 +- packages/camphora-styled/README.md | 12 + packages/camphora-styled/package.json | 6 +- packages/camphora-styled/src/button.css.ts | 109 +- packages/camphora-styled/src/card.css.ts | 96 +- packages/camphora-styled/src/drawer.css.ts | 53 +- packages/camphora-styled/src/dropdown.css.ts | 6 +- packages/camphora-styled/src/index.ts | 1 + packages/camphora-styled/src/input.css.ts | 20 +- packages/camphora-styled/src/menu.css.ts | 51 +- packages/camphora-styled/src/overlay.css.ts | 24 + packages/camphora-styled/src/paper.css.ts | 6 +- packages/camphora-styled/src/preview.css.ts | 4 +- packages/camphora-styled/src/tabs.css.ts | 8 +- .../src/themes/contract.css.ts | 101 -- .../{light.css.ts => defaultTheme.css.ts} | 39 +- packages/camphora-styled/src/themes/index.ts | 3 +- yarn.lock | 1125 ++++++++++++----- 27 files changed, 1219 insertions(+), 651 deletions(-) create mode 100644 packages/camphora-styled/README.md create mode 100644 packages/camphora-styled/src/overlay.css.ts delete mode 100644 packages/camphora-styled/src/themes/contract.css.ts rename packages/camphora-styled/src/themes/{light.css.ts => defaultTheme.css.ts} (71%) diff --git a/apps/website/app/layout.tsx b/apps/website/app/layout.tsx index 7c46a26..b719a4d 100644 --- a/apps/website/app/layout.tsx +++ b/apps/website/app/layout.tsx @@ -1,4 +1,4 @@ -import { light } from "@idealjs/camphora-styled"; +import { defaultTheme } from "@idealjs/camphora-styled"; import type { Metadata } from "next"; import LayoutDrawer from "@/features/LayoutDrawer"; @@ -15,7 +15,7 @@ export default function RootLayout({ }) { return ( - + {children} diff --git a/apps/website/components/Drawer/DrawerSide.tsx b/apps/website/components/Drawer/DrawerSide.tsx index 966f771..26a0fd6 100644 --- a/apps/website/components/Drawer/DrawerSide.tsx +++ b/apps/website/components/Drawer/DrawerSide.tsx @@ -1,8 +1,4 @@ -import { - drawerMenu, - drawerOverlay, - drawerSide, -} from "@idealjs/camphora-styled"; +import { drawerMenu, drawerSide } from "@idealjs/camphora-styled"; import clsx from "clsx"; import { PropsWithChildren, ReactNode } from "react"; @@ -12,12 +8,11 @@ interface IProps { } export const DrawerSide = (props: PropsWithChildren) => { - const { children, drawerId, overlay } = props; + const { children } = props; return ( -
- {overlay ??
+ ); }; diff --git a/apps/website/features/LayoutDrawer/index.tsx b/apps/website/features/LayoutDrawer/index.tsx index c9503f1..3ed3dbc 100644 --- a/apps/website/features/LayoutDrawer/index.tsx +++ b/apps/website/features/LayoutDrawer/index.tsx @@ -1,5 +1,4 @@ -import { menu, menuItem, paper, vars } from "@idealjs/camphora-styled"; -import { assignInlineVars } from "@vanilla-extract/dynamic"; +import { menuItem, overlay } from "@idealjs/camphora-styled"; import clsx from "clsx"; import Link from "next/link"; import React, { PropsWithChildren } from "react"; @@ -21,30 +20,113 @@ const LayoutDrawer = (props: PropsWithChildren) => { {children} +