From f765a52164506b4118a6a42d212b2007dfe50abc Mon Sep 17 00:00:00 2001 From: Igor Carvalho Date: Fri, 23 Jun 2023 18:59:32 -0300 Subject: [PATCH] feat[Remove all redundant colors]: Change redundant colors and add new color variants --- .../components/parameterComponent/index.tsx | 6 +- .../src/CustomNodes/GenericNode/index.tsx | 32 ++-- .../components/singleAlertComponent/index.tsx | 6 +- .../src/alerts/alertDropDown/index.tsx | 12 +- src/frontend/src/alerts/error/index.tsx | 8 +- src/frontend/src/alerts/notice/index.tsx | 4 +- src/frontend/src/alerts/success/index.tsx | 6 +- .../components/CrashErrorComponent/index.tsx | 12 +- .../EditFlowSettingsComponent/index.tsx | 2 +- .../ExtraSidebarComponent/index.tsx | 30 ++-- .../ReactTooltipComponent/index.tsx | 2 +- .../chatComponent/buildTrigger/index.tsx | 2 +- .../chatComponent/chatMessage/index.tsx | 4 +- .../chatComponent/chatTrigger/index.tsx | 2 +- .../components/codeAreaComponent/index.tsx | 6 +- .../components/dropdownComponent/index.tsx | 20 +-- .../src/components/floatComponent/index.tsx | 6 +- .../src/components/headerComponent/index.tsx | 4 +- .../src/components/inputComponent/index.tsx | 12 +- .../components/inputFileComponent/index.tsx | 6 +- .../components/inputListComponent/index.tsx | 8 +- .../src/components/intComponent/index.tsx | 6 +- .../src/components/loadingComponent/index.tsx | 2 +- .../src/components/promptComponent/index.tsx | 6 +- .../components/textAreaComponent/index.tsx | 6 +- .../src/components/toggleComponent/index.tsx | 6 +- .../src/components/ui/rename-label.tsx | 2 +- src/frontend/src/index.css | 164 +++++++----------- src/frontend/src/modals/ApiModal/index.tsx | 4 +- .../src/modals/EditNodeModal/index.tsx | 12 +- .../NodeModal/components/ModalField/index.tsx | 2 +- src/frontend/src/modals/NodeModal/index.tsx | 16 +- .../src/modals/chatModal/chatInput/index.tsx | 10 +- .../chatModal/chatMessage/codeBlock/index.tsx | 6 +- .../modals/chatModal/chatMessage/index.tsx | 22 +-- .../modals/chatModal/fileComponent/index.tsx | 8 +- src/frontend/src/modals/chatModal/index.tsx | 18 +- .../src/modals/codeAreaModal/index.tsx | 4 +- src/frontend/src/modals/exportModal/index.tsx | 2 +- .../src/modals/genericModal/index.tsx | 4 +- .../modals/importModal/buttonBox/index.tsx | 8 +- src/frontend/src/modals/importModal/index.tsx | 8 +- src/frontend/src/modals/promptModal/index.tsx | 20 +-- .../src/modals/textAreaModal/index.tsx | 20 +-- .../ConnectionLineComponent/index.tsx | 2 +- .../components/DisclosureComponent/index.tsx | 8 +- .../components/PageComponent/index.tsx | 8 +- .../extraSidebarComponent/index.tsx | 18 +- .../components/nodeToolbarComponent/index.tsx | 12 +- src/frontend/tailwind.config.js | 32 ++-- 50 files changed, 294 insertions(+), 332 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index e2c651519..126e81c30 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -121,12 +121,12 @@ export default function ParameterComponent({ return (
<>
{title} - {required ? " *" : ""} + {required ? " *" : ""}
{left && (type === "str" || @@ -153,7 +153,7 @@ export default function ParameterComponent({ } className={classNames( left ? "-ml-0.5 " : "-mr-0.5 ", - "w-3 h-3 rounded-full border-2 bg-white dark:bg-dark-gray" + "w-3 h-3 rounded-full border-2 bg-background dark:bg-foreground" )} style={{ borderColor: color, diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 378a02344..1c08f101b 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -75,11 +75,11 @@ export default function GenericNode({
-
+
-
{data.type}
+
{data.type}
@@ -122,25 +122,25 @@ export default function GenericNode({
@@ -149,7 +149,7 @@ export default function GenericNode({
-
+
{data.node.description}
@@ -162,7 +162,7 @@ export default function GenericNode({ {/* {idx === 0 ? (
!key.startsWith("_") && @@ -213,7 +213,7 @@ export default function GenericNode({ > {" "}
- {/*
+ {/*
Output
*/}
-

+

{dropItem.title}

{dropItem.list ? ( @@ -87,7 +87,7 @@ export default function SingleAlert({ />
-

+

{dropItem.title}

@@ -133,7 +133,7 @@ export default function SingleAlert({ />

-

+

{dropItem.title}

diff --git a/src/frontend/src/alerts/alertDropDown/index.tsx b/src/frontend/src/alerts/alertDropDown/index.tsx index 7ba779c02..d695c7f71 100644 --- a/src/frontend/src/alerts/alertDropDown/index.tsx +++ b/src/frontend/src/alerts/alertDropDown/index.tsx @@ -24,13 +24,13 @@ export default function AlertDropdown({}: AlertDropdownType) { return (
-
+
Notifications
-
+
{notificationList.length !== 0 ? ( notificationList.map((alertItem, index) => ( )) ) : ( -
+
No new notifications
)} diff --git a/src/frontend/src/alerts/error/index.tsx b/src/frontend/src/alerts/error/index.tsx index 01c8fbb7e..8908fa37f 100644 --- a/src/frontend/src/alerts/error/index.tsx +++ b/src/frontend/src/alerts/error/index.tsx @@ -39,21 +39,21 @@ export default function ErrorAlert({ removeAlert(id); }, 500); }} - className="rounded-md w-96 mt-6 shadow-xl bg-light-red dark:bg-dark-red p-4 cursor-pointer" + className="rounded-md w-96 mt-6 shadow-xl bg-error-background p-4 cursor-pointer" >
-

+

{title}

{list.length !== 0 ? ( -
+
    {list.map((item, index) => (
  • {item}
  • diff --git a/src/frontend/src/alerts/notice/index.tsx b/src/frontend/src/alerts/notice/index.tsx index 004d63bc7..c6a9fe912 100644 --- a/src/frontend/src/alerts/notice/index.tsx +++ b/src/frontend/src/alerts/notice/index.tsx @@ -46,12 +46,12 @@ export default function NoticeAlert({ />
-

{title}

+

{title}

{link !== "" ? ( Details diff --git a/src/frontend/src/alerts/success/index.tsx b/src/frontend/src/alerts/success/index.tsx index 391a5831f..f62d9e3a9 100644 --- a/src/frontend/src/alerts/success/index.tsx +++ b/src/frontend/src/alerts/success/index.tsx @@ -34,17 +34,17 @@ export default function SuccessAlert({ setShow(false); removeAlert(id); }} - className="rounded-md w-96 mt-6 shadow-xl bg-light-green dark:bg-dark-green p-4" + className="rounded-md w-96 mt-6 shadow-xl bg-success-background dark:bg-success-foreground p-4" >

-

+

{title}

diff --git a/src/frontend/src/components/CrashErrorComponent/index.tsx b/src/frontend/src/components/CrashErrorComponent/index.tsx index c498e590a..760a1745a 100644 --- a/src/frontend/src/components/CrashErrorComponent/index.tsx +++ b/src/frontend/src/components/CrashErrorComponent/index.tsx @@ -1,11 +1,11 @@ export default function CrashErrorComponent({ error, resetErrorBoundary }) { return ( -
-
-

+
+
+

Oops! An unknown error has occurred.

-

+

Please click the 'Reset Application' button to restore the application's state. If the error persists, please create an issue on our GitHub page. We apologize for any inconvenience this may have @@ -14,7 +14,7 @@ export default function CrashErrorComponent({ error, resetErrorBoundary }) {

@@ -22,7 +22,7 @@ export default function CrashErrorComponent({ error, resetErrorBoundary }) { href="https://github.com/logspace-ai/langflow/issues/new" target="_blank" rel="noopener noreferrer" - className="bg-medium-red hover:bg-medium-dark-red text-white font-bold py-2 px-4 rounded" + className="bg-status-red hover:bg-error-foreground text-background font-bold py-2 px-4 rounded" > Create Issue diff --git a/src/frontend/src/components/EditFlowSettingsComponent/index.tsx b/src/frontend/src/components/EditFlowSettingsComponent/index.tsx index c24546af4..7aa225056 100644 --- a/src/frontend/src/components/EditFlowSettingsComponent/index.tsx +++ b/src/frontend/src/components/EditFlowSettingsComponent/index.tsx @@ -47,7 +47,7 @@ export const EditFlowSettings: React.FC = ({
Name{" "} {isMaxLength && ( - + Character limit reached )} diff --git a/src/frontend/src/components/ExtraSidebarComponent/index.tsx b/src/frontend/src/components/ExtraSidebarComponent/index.tsx index abf04c273..aa1b47c77 100644 --- a/src/frontend/src/components/ExtraSidebarComponent/index.tsx +++ b/src/frontend/src/components/ExtraSidebarComponent/index.tsx @@ -19,9 +19,9 @@ export default function ExtraSidebar() {