From 8208adab96e9894faa34a7b14d02b7d4d1249380 Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Thu, 13 Mar 2025 14:42:48 +0300 Subject: [PATCH] F: Rework inline styles and improve animations --- .../frontend/src/app/application-layout.tsx | 7 +- .../src/app/navigation/navigation.tsx | 16 +- .../src/components/container/divider.tsx | 9 +- .../src/components/container/tooltip.tsx | 3 +- .../src/components/control/button.tsx | 13 +- .../src/components/control/mini-button.tsx | 7 +- .../components/control/selector-button.tsx | 5 +- .../src/components/data-table/data-table.tsx | 6 +- .../src/components/data-table/table-body.tsx | 9 +- .../components/data-table/table-header.tsx | 19 +- .../components/dropdown/dropdown-button.tsx | 6 +- .../src/components/dropdown/dropdown.tsx | 27 +-- .../frontend/src/components/info-error.tsx | 13 +- .../components/input/checkbox-tristate.tsx | 5 +- .../src/components/input/checkbox.tsx | 5 +- .../src/components/input/file-input.tsx | 2 +- .../src/components/input/select-tree.tsx | 22 +- .../src/components/input/text-area.tsx | 24 +-- .../src/components/input/text-input.tsx | 20 +- .../src/components/modal/modal-form.tsx | 5 +- .../src/components/modal/modal-view.tsx | 11 +- .../src/components/view/embed-youtube.tsx | 3 +- .../src/components/view/indicator.tsx | 6 +- .../src/components/view/value-icon.tsx | 2 +- .../features/help/components/badge-help.tsx | 3 +- .../help/items/ui/help-formula-tree.tsx | 14 +- .../features/help/items/ui/help-library.tsx | 3 +- .../features/help/items/ui/help-rseditor.tsx | 7 +- .../help/items/ui/help-rsgraph-term.tsx | 3 +- .../help/items/ui/help-type-graph.tsx | 8 +- .../pages/manuals-page/topics-dropdown.tsx | 22 +- .../create-item-page/form-create-item.tsx | 3 +- .../library-page/table-library-items.tsx | 2 +- .../pages/library-page/view-side-location.tsx | 18 +- .../oss/components/info-operation.tsx | 2 +- .../oss/components/operation-tooltip.tsx | 3 +- .../oss/components/pick-multi-operation.tsx | 5 +- .../dlg-edit-operation/tab-synthesis.tsx | 8 +- .../editor-oss-graph/graph/node-core.tsx | 13 +- .../editor-oss-graph/toolbar-oss-graph.tsx | 3 +- .../rsform/components/badge-grammeme.tsx | 7 +- .../components/pick-multi-constituenta.tsx | 2 +- .../dialogs/dlg-show-ast/dlg-show-ast.tsx | 2 +- .../dialogs/dlg-show-ast/graph/ast-node.tsx | 24 +-- .../dlg-show-type-graph/graph/mgraph-node.tsx | 14 +- .../editor-constituenta.tsx | 2 +- .../toolbar-constituenta.tsx | 2 +- .../editor-rsexpression/parsing-result.tsx | 14 +- .../editor-rsexpression/rs-edit-controls.tsx | 17 +- .../editor-rsexpression/rs-token-button.tsx | 5 +- .../editor-rsform-card/editor-rsform-card.tsx | 9 +- .../editor-term-graph/graph/tg-node.tsx | 47 ++-- .../rsform-page/editor-term-graph/tg-flow.tsx | 4 +- .../editor-term-graph/toolbar-focused-cst.tsx | 3 +- .../editor-term-graph/view-hidden.tsx | 49 ++--- .../view-constituents/view-constituents.tsx | 15 +- rsconcept/frontend/src/index.css | 11 +- rsconcept/frontend/src/stores/app-layout.ts | 8 +- rsconcept/frontend/src/styling/components.css | 202 ++++++++++++++++++ rsconcept/frontend/src/styling/constants.css | 7 - rsconcept/frontend/src/styling/setup.css | 4 - .../src/styling/{styles.css => utilities.css} | 70 +----- rsconcept/frontend/src/utils/constants.ts | 18 +- 63 files changed, 408 insertions(+), 490 deletions(-) create mode 100644 rsconcept/frontend/src/styling/components.css rename rsconcept/frontend/src/styling/{styles.css => utilities.css} (78%) diff --git a/rsconcept/frontend/src/app/application-layout.tsx b/rsconcept/frontend/src/app/application-layout.tsx index bb4e5f8c..a239b358 100644 --- a/rsconcept/frontend/src/app/application-layout.tsx +++ b/rsconcept/frontend/src/app/application-layout.tsx @@ -1,5 +1,6 @@ import { Suspense } from 'react'; import { Outlet } from 'react-router'; +import clsx from 'clsx'; import { ModalLoader } from '@/components/modal'; import { useAppLayoutStore, useMainHeight, useViewportHeight } from '@/stores/app-layout'; @@ -17,7 +18,6 @@ import { Navigation } from './navigation'; export function ApplicationLayout() { const mainHeight = useMainHeight(); const viewportHeight = useViewportHeight(); - const showScroll = useAppLayoutStore(state => !state.noScroll); const noNavigationAnimation = useAppLayoutStore(state => state.noNavigationAnimation); const noNavigation = useAppLayoutStore(state => state.noNavigation); const noFooter = useAppLayoutStore(state => state.noFooter); @@ -27,8 +27,7 @@ export function ApplicationLayout() {
-
+
diff --git a/rsconcept/frontend/src/app/navigation/navigation.tsx b/rsconcept/frontend/src/app/navigation/navigation.tsx index 1b2bf738..64db5b84 100644 --- a/rsconcept/frontend/src/app/navigation/navigation.tsx +++ b/rsconcept/frontend/src/app/navigation/navigation.tsx @@ -1,7 +1,8 @@ +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 { PARAMETER } from '@/utils/constants'; import { urls } from '../urls'; @@ -29,14 +30,11 @@ export function Navigation() {