From 91261a745b46ce4f72ff4b4e9474eae1de409672 Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Thu, 10 Apr 2025 11:03:55 +0300 Subject: [PATCH] F: Improve shadcn Select integration --- .../src/app/navigation/navigation.tsx | 4 +- .../frontend/src/components/ui/select.tsx | 26 ++++++++++-- .../components/select-library-item.tsx | 41 ++++++++----------- .../library/components/select-version.tsx | 13 ++++-- .../rsform/components/pick-substitutions.tsx | 6 ++- .../rsform/components/select-cst-type.tsx | 32 ++++++++------- .../dlg-create-cst/form-create-cst.tsx | 1 - .../rsform/dialogs/dlg-rename-cst.tsx | 3 +- .../editor-term-graph/graph-selectors.tsx | 38 ----------------- .../editor-term-graph/schemas-guide.tsx | 2 +- .../editor-term-graph/select-coloring.tsx | 37 +++++++++++++++++ .../rsform-page/editor-term-graph/tg-flow.tsx | 4 +- .../editor-term-graph/view-hidden.tsx | 4 +- rsconcept/frontend/src/index.css | 2 +- rsconcept/frontend/src/styling/components.css | 32 +++++++++++++++ 15 files changed, 151 insertions(+), 94 deletions(-) delete mode 100644 rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-term-graph/graph-selectors.tsx create mode 100644 rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-term-graph/select-coloring.tsx diff --git a/rsconcept/frontend/src/app/navigation/navigation.tsx b/rsconcept/frontend/src/app/navigation/navigation.tsx index cd29a745..a6ed8245 100644 --- a/rsconcept/frontend/src/app/navigation/navigation.tsx +++ b/rsconcept/frontend/src/app/navigation/navigation.tsx @@ -3,6 +3,7 @@ import clsx from 'clsx'; import { IconLibrary2, IconManuals, IconNewItem2 } from '@/components/icons'; import { useWindowSize } from '@/hooks/use-window-size'; import { useAppLayoutStore } from '@/stores/app-layout'; +import { useDialogsStore } from '@/stores/dialogs'; import { urls } from '../urls'; @@ -16,6 +17,7 @@ export function Navigation() { const { push } = useConceptNavigation(); const size = useWindowSize(); const noNavigationAnimation = useAppLayoutStore(state => state.noNavigationAnimation); + const activeDialog = useDialogsStore(state => state.active); const navigateHome = (event: React.MouseEvent) => push({ path: urls.home, newTab: event.ctrlKey || event.metaKey }); @@ -27,7 +29,7 @@ export function Navigation() { push({ path: urls.create_schema, newTab: event.ctrlKey || event.metaKey }); return ( -