From 590be2b7e51846b9796ddf564f11e049b0f5fddd Mon Sep 17 00:00:00 2001 From: Anton Tranelis <31516529+antontranelis@users.noreply.github.com> Date: Tue, 14 Oct 2025 12:00:23 +0200 Subject: [PATCH] fix(lib): optimized layout elements (#424) Co-authored-by: Claude --- app/src/App.tsx | 1 + lib/package.json | 2 +- lib/src/Components/AppShell/SideBar.tsx | 15 +- lib/src/Components/AppShell/UserControl.tsx | 4 +- .../Components/AppShell/hooks/useTheme.tsx | 32 +++- .../Map/Subcomponents/AddButton.tsx | 47 +++++- .../Subcomponents/Controls/LayerControl.tsx | 3 +- .../Map/Subcomponents/SelectPosition.tsx | 35 ----- .../Map/Subcomponents/SelectPositionToast.tsx | 142 ++++++++++++++++++ lib/src/Components/Map/UtopiaMap.tsx | 1 + lib/src/Components/Map/UtopiaMapInner.tsx | 12 +- lib/src/assets/css/leaflet.css | 5 +- lib/src/assets/css/tailwind.css | 18 ++- package-lock.json | 14 +- 14 files changed, 261 insertions(+), 70 deletions(-) delete mode 100644 lib/src/Components/Map/Subcomponents/SelectPosition.tsx create mode 100644 lib/src/Components/Map/Subcomponents/SelectPositionToast.tsx diff --git a/app/src/App.tsx b/app/src/App.tsx index 033d786c..29d01af9 100644 --- a/app/src/App.tsx +++ b/app/src/App.tsx @@ -149,6 +149,7 @@ function App() { /> ), name: l.name, // name that appear in Sidebar + color: l.menuColor, })), ) // eslint-disable-next-line no-catch-all/no-catch-all diff --git a/lib/package.json b/lib/package.json index df6b3908..f9b18a7d 100644 --- a/lib/package.json +++ b/lib/package.json @@ -61,7 +61,7 @@ "@vitejs/plugin-react": "^4.3.4", "@vitest/coverage-v8": "^3.0.5", "cypress": "^14.0.3", - "daisyui": "^5.0.6", + "daisyui": "^5.2.3", "eslint": "^8.24.0", "eslint-config-prettier": "^9.1.0", "eslint-config-standard": "^17.1.0", diff --git a/lib/src/Components/AppShell/SideBar.tsx b/lib/src/Components/AppShell/SideBar.tsx index 645d9344..b1f958b4 100644 --- a/lib/src/Components/AppShell/SideBar.tsx +++ b/lib/src/Components/AppShell/SideBar.tsx @@ -10,6 +10,7 @@ export interface Route { name: string submenu?: Route[] blank?: boolean + color?: string } /** @@ -35,7 +36,7 @@ export function SideBar({ routes, bottomRoutes }: { routes: Route[]; bottomRoute