From 2f8ad7287f4cd5a9b1232d1cc2ba3191fb8209f1 Mon Sep 17 00:00:00 2001 From: Josh Berman Date: Thu, 16 Jul 2026 11:19:02 +1000 Subject: [PATCH 01/15] =?UTF-8?q?=E2=9C=A8=20Add=20light/dark=20theming=20?= =?UTF-8?q?support=20to=20the=20mega=20menu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drive the menu's colours from CSS-variable design tokens (foreground, background, muted-foreground, hairline) that mirror SSW.Website's styles.css, so the menu themes under a `.dark` scope with no `dark:` utilities. Swap the logo to the white-with-red dark-mode asset, mute + gap the nav chevrons, and tokenise the bar text/dividers. Adds a `prepare` build so the package can be consumed as a git dependency. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../CountryDropdown/CountryDropdown.tsx | 2 +- lib/components/DesktopMenu/DesktopMenu.tsx | 4 ++-- .../DesktopMenu/MenuItemWithSubmenu.tsx | 7 +++++-- lib/components/Logo/Logo.tsx | 14 +++++++++++++- .../MegaMenuLayout/MegaMenuLayout.tsx | 3 +-- lib/components/Search/Search.tsx | 2 +- lib/components/ui/Divider.tsx | 2 +- lib/index.css | 18 ++++++++++++++++++ lib/index.ts | 2 ++ package.json | 1 + src/index.css | 18 ++++++++++++++++++ tailwind.config.js | 5 +++++ 12 files changed, 68 insertions(+), 10 deletions(-) diff --git a/lib/components/CountryDropdown/CountryDropdown.tsx b/lib/components/CountryDropdown/CountryDropdown.tsx index a16c686..ef0e308 100644 --- a/lib/components/CountryDropdown/CountryDropdown.tsx +++ b/lib/components/CountryDropdown/CountryDropdown.tsx @@ -51,7 +51,7 @@ const CountryDropdown = ({ url, className }: CountryDropdownProps) => { setIsOpened(!isOpened)} diff --git a/lib/components/DesktopMenu/DesktopMenu.tsx b/lib/components/DesktopMenu/DesktopMenu.tsx index d71e6e2..6f6715a 100644 --- a/lib/components/DesktopMenu/DesktopMenu.tsx +++ b/lib/components/DesktopMenu/DesktopMenu.tsx @@ -31,7 +31,7 @@ const DesktopMenu: React.FC = ({ return ( <>
- + {menuGroups.map((group, index) => { if ( !!group.menuColumns && @@ -116,7 +116,7 @@ const DefaultSideActions = ({ }; const Divider: React.FC = () => { - return
; + return
; }; export default DesktopMenu; diff --git a/lib/components/DesktopMenu/MenuItemWithSubmenu.tsx b/lib/components/DesktopMenu/MenuItemWithSubmenu.tsx index b84cbe8..204071e 100644 --- a/lib/components/DesktopMenu/MenuItemWithSubmenu.tsx +++ b/lib/components/DesktopMenu/MenuItemWithSubmenu.tsx @@ -25,12 +25,15 @@ export const MenuItemWithSubmenu: React.FC = ({ <> {name} - + { // show the xmas logo for 1-25 December const date = new Date(); @@ -18,7 +22,15 @@ const Logo: React.FC = () => { alt="SSW - Enterprise Software Development" height={60} width={100} - className="h-full" + className="h-full dark:hidden" + /> +