From 9cd682b19ffa107aaf5d7989d05c68ebb00a12a4 Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Mon, 23 Oct 2023 18:22:55 +0300 Subject: [PATCH] Update Constituenta editor UI --- .../src/components/Common/TextArea.tsx | 7 +- .../src/components/Common/TextInput.tsx | 10 +- .../src/components/Help/HelpLibrary.tsx | 4 +- rsconcept/frontend/src/components/Icons.tsx | 41 +++- .../components/RefsInput/DlgEditReference.tsx | 8 +- .../frontend/src/hooks/useCheckExpression.ts | 2 +- .../frontend/src/hooks/useLocalStorage.ts | 29 +-- rsconcept/frontend/src/index.css | 4 +- rsconcept/frontend/src/models/miscelanious.ts | 6 - .../frontend/src/pages/CreateRSFormPage.tsx | 2 +- .../src/pages/LibraryPage/ViewLibrary.tsx | 4 +- .../src/pages/RSFormPage/DlgCreateCst.tsx | 3 +- .../src/pages/RSFormPage/DlgRenameCst.tsx | 2 +- .../pages/RSFormPage/EditorConstituenta.tsx | 27 +-- .../pages/RSFormPage/EditorRSExpression.tsx | 177 ++++++------------ .../src/pages/RSFormPage/EditorTermGraph.tsx | 2 +- .../frontend/src/pages/RSFormPage/RSTabs.tsx | 5 +- .../RSFormPage/elements/ParsingResult.tsx | 20 +- .../RSFormPage/elements/RSEditorControls.tsx | 139 ++++++++++++++ .../RSFormPage/elements/RSLocalButton.tsx | 2 +- .../pages/RSFormPage/elements/RSTabsMenu.tsx | 14 +- .../RSFormPage/elements/RSTokenButton.tsx | 4 +- .../pages/RSFormPage/elements/StatusBar.tsx | 2 +- .../elements/ViewSideConstituents.tsx | 6 +- .../src/pages/UserProfilePage/UserTabs.tsx | 6 +- rsconcept/frontend/src/utils/constants.ts | 5 +- 26 files changed, 302 insertions(+), 229 deletions(-) create mode 100644 rsconcept/frontend/src/pages/RSFormPage/elements/RSEditorControls.tsx diff --git a/rsconcept/frontend/src/components/Common/TextArea.tsx b/rsconcept/frontend/src/components/Common/TextArea.tsx index fc285852..4ca8799f 100644 --- a/rsconcept/frontend/src/components/Common/TextArea.tsx +++ b/rsconcept/frontend/src/components/Common/TextArea.tsx @@ -7,18 +7,19 @@ extends Omit, 'className' | 'title'> label?: string tooltip?: string dimensions?: string + dense?: boolean colorClass?: string } function TextArea({ - id, label, required, tooltip, + id, label, required, tooltip, dense, dimensions = 'w-full', colorClass = 'clr-input', rows = 4, ...props }: TextAreaProps) { return ( -
+
{label &&