+
{
openPopUp(
@@ -39,12 +51,13 @@ export default function TextAreaComponent({
}}
className={
editNode
- ? "h-7 truncate placeholder:text-center text-gray-500 border-0 block w-full pt-0.5 pb-0.5 form-input dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600 rounded-md border-gray-300 shadow-sm sm:text-sm focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200"
- : "truncate block w-full text-gray-500 dark:text-gray-100 px-3 py-2 rounded-md border border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm" +
+ ? "truncate cursor-pointer placeholder:text-center text-gray-500 border-1 block w-full pt-0.5 pb-0.5 form-input dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600 rounded-md border-gray-300 shadow-sm sm:text-sm" +
+ INPUT_STYLE
+ : "truncate block w-full text-gray-500 dark:text-muted px-3 py-2 rounded-md border border-gray-300 dark:border-gray-700 shadow-sm sm:text-sm" +
(disabled ? " bg-gray-200" : "")
}
>
- {myValue !== "" ? myValue : "Text empty"}
+ {myValue !== "" ? myValue : "Type something..."}
diff --git a/src/frontend/src/components/toggleComponent/index.tsx b/src/frontend/src/components/toggleComponent/index.tsx
index f7140bdee..9481f6760 100644
--- a/src/frontend/src/components/toggleComponent/index.tsx
+++ b/src/frontend/src/components/toggleComponent/index.tsx
@@ -21,8 +21,8 @@ export default function ToggleComponent({
setEnabled(x);
}}
className={classNames(
- enabled ? "bg-indigo-600" : "bg-gray-200",
- "relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2"
+ enabled ? "bg-primary" : "bg-gray-200",
+ "relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-1 focus:ring-primary focus:ring-offset-1"
)}
>
Use setting
diff --git a/src/frontend/src/components/toggleShadComponent/index.tsx b/src/frontend/src/components/toggleShadComponent/index.tsx
index 188ddccf9..632ee1bad 100644
--- a/src/frontend/src/components/toggleShadComponent/index.tsx
+++ b/src/frontend/src/components/toggleShadComponent/index.tsx
@@ -19,6 +19,7 @@ export default function ToggleShadComponent({
style={{
transform: "scaleX(0.6) scaleY(0.6)",
}}
+ className="data-[state=unchecked]:bg-slate-500"
checked={enabled}
onCheckedChange={(x: boolean) => {
setEnabled(x);
diff --git a/src/frontend/src/constants.tsx b/src/frontend/src/constants.tsx
index d08aa75e7..285da5277 100644
--- a/src/frontend/src/constants.tsx
+++ b/src/frontend/src/constants.tsx
@@ -4,7 +4,7 @@
* The base text for subtitle of Export Dialog (Toolbar)
* @constant
*/
-export const EXPORT_DIALOG_SUBTITLE = "Export your models.";
+export const EXPORT_DIALOG_SUBTITLE = "Export flow as JSON file.";
/**
* The base text for subtitle of Flow Settings (Menubar)
@@ -24,25 +24,27 @@ export const CODE_DIALOG_SUBTITLE =
* @constant
*/
export const EDIT_DIALOG_SUBTITLE =
- "Make configurations changes to your nodes. Click save when you're done.";
+ "Adjust the configurations of your component. Define parameter visibility for the canvas view. Remember to save once you’re finished.";
/**
* The base text for subtitle of Code Dialog
* @constant
*/
-export const CODE_PROMPT_DIALOG_SUBTITLE = "Edit you python code.";
+export const CODE_PROMPT_DIALOG_SUBTITLE =
+ "Edit your Python code. This code snippet accepts module import and a single function definition. Make sure that your function returns a string.";
/**
* The base text for subtitle of Prompt Dialog
* @constant
*/
-export const PROMPT_DIALOG_SUBTITLE = "Edit you prompt.";
+export const PROMPT_DIALOG_SUBTITLE =
+ "Create your prompt. Prompts can help guide the behavior of a Language Model.";
/**
* The base text for subtitle of Text Dialog
* @constant
*/
-export const TEXT_DIALOG_SUBTITLE = "Edit you text.";
+export const TEXT_DIALOG_SUBTITLE = "Edit your text.";
/**
* Function to get the python code for the API
@@ -103,3 +105,25 @@ export const getPythonCode = (flowName: string): string => {
# Now you can use it like any chain
flow("Hey, have you heard of LangFlow?")`;
};
+
+/**
+ * The base text for subtitle of Import Dialog
+ * @constant
+ */
+export const IMPORT_DIALOG_SUBTITLE =
+ "Upload a JSON file or select from the available community examples.";
+
+/**
+ * The base text for subtitle of code dialog
+ * @constant
+ */
+export const EXPORT_CODE_DIALOG =
+ "Generate the code to integrate your flow into an external application.";
+
+/**
+ * The base text for subtitle of code dialog
+ * @constant
+ */
+export const INPUT_STYLE =
+ " focus:ring-1 focus:ring-offset-1 focus:ring-ring focus:outline-none ";
+
diff --git a/src/frontend/src/index.css b/src/frontend/src/index.css
index f6bad16a2..2c00dbc22 100644
--- a/src/frontend/src/index.css
+++ b/src/frontend/src/index.css
@@ -70,16 +70,63 @@
}
}
- @layer base {
- * {
- @apply border-border;
- }
- body {
- @apply bg-background text-foreground;
- font-feature-settings: "rlig" 1, "calt" 1;
- }
+:root {
+ --background: 0 0% 100%;
+ --foreground: 222.2 47.4% 11.2%;
+ --muted: 210 40% 98%;
+ --muted-foreground: 215.4 16.3% 46.9%;
+ --popover: 0 0% 100%;
+ --popover-foreground: 222.2 47.4% 11.2%;
+ --card: 0 0% 100%;
+ --card-foreground: 222.2 47.4% 11.2%;
+ --border: 214.3 31.8% 91.4%;
+ --input: 214.3 31.8% 91.4%;
+ --primary: 222.2 47.4% 18%;
+ --primary-foreground: 210 40% 98%;
+ --secondary: 210 40% 96.1%;
+ --secondary-foreground: 222.2 47.4% 11.2%;
+ --accent: 210 40% 96.1%;
+ --accent-foreground: 222.2 47.4% 11.2%;
+ --destructive: 0 100% 50%;
+ --destructive-foreground: 210 40% 98%;
+ --ring: 215 20.2% 65.1%;
+ --radius: 0.5rem;
+}
+
+.dark {
+ -background: 224 71% 4%;
+ -foreground: 213 31% 91%;
+ -muted: 223 47% 11%;
+ -muted-foreground: 215.4 16.3% 56.9%;
+ -popover: 224 71% 4%;
+ -popover-foreground: 215 20.2% 65.1%;
+ -card: 224 71% 4%;
+ -card-foreground: 213 31% 91%;
+ -border: 216 34% 17%;
+ -input: 216 34% 17%;
+ -primary: 210 40% 98%;
+ -primary-foreground: 222.2 47.4% 1.2%;
+ -secondary: 222.2 47.4% 11.2%;
+ -secondary-foreground: 210 40% 98%;
+ -accent: 216 34% 17%;
+ -accent-foreground: 210 40% 98%;
+ -destructive: 0 63% 31%;
+ -destructive-foreground: 210 40% 98%;
+ -ring: 216 34% 17%;
+ -radius: 0.5rem;
+}
+
+@layer base {
+ * {
+ @apply border-border;
}
+ body {
+ @apply bg-background text-foreground;
+ font-feature-settings: "rlig" 1, "calt" 1;
+ }
+}
+
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
@@ -98,4 +145,4 @@ code {
The cursor: default; property value restores the browser's default cursor style for the targeted element. By applying this style, the element will no longer have a custom cursor appearance such as "grab" or any other custom cursor defined elsewhere in the application. Instead, it will revert to the default cursor style determined by the browser, typically an arrow-shaped cursor. */
.react-flow__pane {
cursor: default;
-}
+}
\ No newline at end of file
diff --git a/src/frontend/src/modals/ApiModal/index.tsx b/src/frontend/src/modals/ApiModal/index.tsx
index 6a58d467a..c34cb4afb 100644
--- a/src/frontend/src/modals/ApiModal/index.tsx
+++ b/src/frontend/src/modals/ApiModal/index.tsx
@@ -26,6 +26,7 @@ import {
import { Button } from "../../components/ui/button";
import { FlowType } from "src/types/flow";
import { getCurlCode, getPythonApiCode, getPythonCode } from "../../constants";
+import { EXPORT_CODE_DIALOG } from "../../constants";
export default function ApiModal({ flow }: { flow: FlowType }) {
const [open, setOpen] = useState(true);
@@ -83,7 +84,7 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
return (