CSS Color Changes and Dark Mode Implementation - New Style Features (#572)

This pull request introduces significant style changes to the website,
focusing on CSS color modifications and the implementation of a dark
mode feature. These updates enhance the overall visual appeal and
improve user experience in different lighting environments. Below is a
detailed overview of the changes made.

Updated Color Palette: The existing color scheme has been revamped to
create a more visually appealing and cohesive design. This involved
modifying the colors used throughout the website, including background
colors, text colors, and accent colors.

Dark Mode Implementation: A new feature, dark mode, has been added to
provide users with an alternative interface that is easier on the eyes
in low-light environments. The dark mode utilizes a new set of colors
specifically designed for this mode, ensuring optimal readability and
aesthetic appeal.

CSS Classes and Selectors: New CSS classes and selectors have been
introduced to facilitate the implementation of the color changes and
dark mode feature. These classes are applied to specific elements within
the HTML structure, allowing for precise control over the appearance of
different components.
This commit is contained in:
Gustavo Schaedler 2023-06-30 00:41:27 +01:00 • committed by GitHub
commit 12164ec79a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 525 additions and 545 deletions

View file

@ -97,7 +97,7 @@ export default function ParameterComponent({
> >
{React.createElement(nodeIconsLucide[item.family])} {React.createElement(nodeIconsLucide[item.family])}
</div> </div>
<span className="ps-2 text-gray-950"> <span className="ps-2 text-foreground">
{nodeNames[item.family] ?? ""}{" "} {nodeNames[item.family] ?? ""}{" "}
<span className={classNames(left ? "hidden" : "")}> <span className={classNames(left ? "hidden" : "")}>
{" "} {" "}
@ -123,12 +123,12 @@ export default function ParameterComponent({
return ( return (
<div <div
ref={ref} ref={ref}
className="w-full flex flex-wrap justify-between items-center bg-muted dark:bg-gray-800 dark:text-white mt-1 px-5 py-2" className="w-full flex flex-wrap justify-between items-center bg-muted mt-1 px-5 py-2"
> >
<> <>
<div className={"text-sm truncate w-full " + (left ? "" : "text-end")}> <div className={"text-sm truncate w-full " + (left ? "" : "text-end")}>
{title} {title}
<span className="text-red-600">{required ? " *" : ""}</span> <span className="text-destructive">{required ? " *" : ""}</span>
</div> </div>
{left && {left &&
(type === "str" || (type === "str" ||
@ -155,7 +155,7 @@ export default function ParameterComponent({
} }
className={classNames( className={classNames(
left ? "-ml-0.5 " : "-mr-0.5 ", left ? "-ml-0.5 " : "-mr-0.5 ",
"w-3 h-3 rounded-full border-2 bg-white dark:bg-gray-800" "w-3 h-3 rounded-full border-2 bg-background"
)} )}
style={{ style={{
borderColor: color, borderColor: color,
@ -197,7 +197,7 @@ export default function ParameterComponent({
)} )}
</div> </div>
) : left === true && type === "bool" ? ( ) : left === true && type === "bool" ? (
<div className="mt-2"> <div className="mt-2 w-full">
<ToggleShadComponent <ToggleShadComponent
disabled={disabled} disabled={disabled}
enabled={enabled} enabled={enabled}
@ -220,7 +220,7 @@ export default function ParameterComponent({
) : left === true && ) : left === true &&
type === "str" && type === "str" &&
data.node.template[name].options ? ( data.node.template[name].options ? (
<div className="w-full"> <div className="w-full mt-2">
<Dropdown <Dropdown
options={data.node.template[name].options} options={data.node.template[name].options}
onSelect={handleOnNewValue} onSelect={handleOnNewValue}
@ -228,23 +228,27 @@ export default function ParameterComponent({
></Dropdown> ></Dropdown>
</div> </div>
) : left === true && type === "code" ? ( ) : left === true && type === "code" ? (
<CodeAreaComponent <div className="mt-2 w-full">
disabled={disabled} <CodeAreaComponent
value={data.node.template[name].value ?? ""} disabled={disabled}
onChange={handleOnNewValue} value={data.node.template[name].value ?? ""}
/> onChange={handleOnNewValue}
/>
</div>
) : left === true && type === "file" ? ( ) : left === true && type === "file" ? (
<InputFileComponent <div className="mt-2 w-full">
disabled={disabled} <InputFileComponent
value={data.node.template[name].value ?? ""} disabled={disabled}
onChange={handleOnNewValue} value={data.node.template[name].value ?? ""}
fileTypes={data.node.template[name].fileTypes} onChange={handleOnNewValue}
suffixes={data.node.template[name].suffixes} fileTypes={data.node.template[name].fileTypes}
onFileChange={(t: string) => { suffixes={data.node.template[name].suffixes}
data.node.template[name].file_path = t; onFileChange={(t: string) => {
save(); data.node.template[name].file_path = t;
}} save();
></InputFileComponent> }}
></InputFileComponent>
</div>
) : left === true && type === "int" ? ( ) : left === true && type === "int" ? (
<div className="mt-2 w-full"> <div className="mt-2 w-full">
<IntComponent <IntComponent
@ -255,11 +259,13 @@ export default function ParameterComponent({
/> />
</div> </div>
) : left === true && type === "prompt" ? ( ) : left === true && type === "prompt" ? (
<PromptAreaComponent <div className="mt-2 w-full">
disabled={disabled} <PromptAreaComponent
value={data.node.template[name].value ?? ""} disabled={disabled}
onChange={handleOnNewValue} value={data.node.template[name].value ?? ""}
/> onChange={handleOnNewValue}
/>
</div>
) : ( ) : (
<></> <></>
)} )}

View file

@ -91,13 +91,14 @@ export default function GenericNode({
<div <div
className={classNames( className={classNames(
selected ? "border border-ring" : "border dark:border-gray-700", selected ? "border border-ring" : "border",
"prompt-node relative flex w-96 flex-col justify-center rounded-lg bg-white dark:bg-gray-900" "prompt-node relative flex w-96 flex-col justify-center rounded-lg bg-background"
)} )}
> >
<div className="flex w-full items-center justify-between gap-8 rounded-t-lg border-b bg-muted p-4 dark:border-b-gray-700 dark:bg-gray-800 dark:text-white "> <div className="flex w-full items-center justify-between gap-8 rounded-t-lg border-b bg-muted p-4 ">
<div className="flex w-full items-center gap-2 truncate text-lg"> <div className="flex w-full items-center gap-2 truncate text-lg">
<Icon <Icon
strokeWidth={1.5}
className="h-10 w-10 rounded p-1" className="h-10 w-10 rounded p-1"
style={{ style={{
color: nodeColors[types[data.type]] ?? nodeColors.unknown, color: nodeColors[types[data.type]] ?? nodeColors.unknown,
@ -108,7 +109,7 @@ export default function GenericNode({
delayDuration={1500} delayDuration={1500}
content={data.node.display_name} content={data.node.display_name}
> >
<div className="ml-2 truncate text-gray-800"> <div className="ml-2 truncate text-primary">
{data.node.display_name} {data.node.display_name}
</div> </div>
</ShadTooltip> </ShadTooltip>
@ -143,25 +144,25 @@ export default function GenericNode({
<div <div
className={classNames( className={classNames(
validationStatus && validationStatus.valid validationStatus && validationStatus.valid
? "w-4 h-4 rounded-full bg-green-500 opacity-100" ? "w-4 h-4 rounded-full bg-status-red opacity-100"
: "w-4 h-4 rounded-full bg-gray-500 opacity-0 hidden animate-spin", : "w-4 h-4 rounded-full bg-ring opacity-0 hidden animate-spin",
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200" "absolute w-4 hover:text-ring hover: transition-all ease-in-out duration-200"
)} )}
></div> ></div>
<div <div
className={classNames( className={classNames(
validationStatus && !validationStatus.valid validationStatus && !validationStatus.valid
? "w-4 h-4 rounded-full bg-red-500 opacity-100" ? "w-4 h-4 rounded-full bg-status-red opacity-100"
: "w-4 h-4 rounded-full bg-gray-500 opacity-0 hidden animate-spin", : "w-4 h-4 rounded-full bg-ring opacity-0 hidden animate-spin",
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200" "absolute w-4 hover:text-ring hover: transition-all ease-in-out duration-200"
)} )}
></div> ></div>
<div <div
className={classNames( className={classNames(
!validationStatus || isBuilding !validationStatus || isBuilding
? "w-4 h-4 rounded-full bg-yellow-500 opacity-100" ? "w-4 h-4 rounded-full bg-status-yellow opacity-100"
: "w-4 h-4 rounded-full bg-gray-500 opacity-0 hidden animate-spin", : "w-4 h-4 rounded-full bg-ring opacity-0 hidden animate-spin",
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200" "absolute w-4 hover:text-ring transition-all ease-in-out duration-200"
)} )}
></div> ></div>
</div> </div>
@ -170,7 +171,7 @@ export default function GenericNode({
</div> </div>
</div> </div>
<div className="h-full w-full py-5 text-gray-800"> <div className="h-full w-full py-5 text-foreground">
<div className="w-full px-5 pb-3 text-sm text-muted-foreground"> <div className="w-full px-5 pb-3 text-sm text-muted-foreground">
{data.node.description} {data.node.description}
</div> </div>
@ -183,7 +184,7 @@ export default function GenericNode({
{/* {idx === 0 ? ( {/* {idx === 0 ? (
<div <div
className={classNames( className={classNames(
"px-5 py-2 mt-2 dark:text-white text-center", "px-5 py-2 mt-2 text-center",
Object.keys(data.node.template).filter( Object.keys(data.node.template).filter(
(key) => (key) =>
!key.startsWith("_") && !key.startsWith("_") &&
@ -234,7 +235,7 @@ export default function GenericNode({
> >
{" "} {" "}
</div> </div>
{/* <div className="px-5 py-2 mt-2 dark:text-white text-center"> {/* <div className="px-5 py-2 mt-2 text-center">
Output Output
</div> */} </div> */}
<ParameterComponent <ParameterComponent

View file

@ -25,21 +25,18 @@ export default function SingleAlert({
> >
{type === "error" ? ( {type === "error" ? (
<div <div
className="flex bg-red-50 dark:bg-red-900 rounded-md p-3 mb-2 mx-2" className="flex bg-error-background rounded-md p-3 mb-2 mx-2"
key={dropItem.id} key={dropItem.id}
> >
<div className="flex-shrink-0"> <div className="flex-shrink-0">
<XCircle <XCircle className="h-5 w-5 text-status-red" aria-hidden="true" />
className="h-5 w-5 text-red-400 dark:text-red-50"
aria-hidden="true"
/>
</div> </div>
<div className="ml-3"> <div className="ml-3">
<h3 className="text-sm break-words font-medium text-red-800 dark:text-white/80"> <h3 className="text-sm break-words font-medium text-error-foreground">
{dropItem.title} {dropItem.title}
</h3> </h3>
{dropItem.list ? ( {dropItem.list ? (
<div className="mt-2 text-sm text-red-700 dark:text-red-50"> <div className="mt-2 text-sm text-error-foreground">
<ul className="list-disc space-y-1 pl-5"> <ul className="list-disc space-y-1 pl-5">
{dropItem.list.map((item, idx) => ( {dropItem.list.map((item, idx) => (
<li className="break-words" key={idx}> <li className="break-words" key={idx}>
@ -62,34 +59,34 @@ export default function SingleAlert({
removeAlert(dropItem.id); removeAlert(dropItem.id);
}, 500); }, 500);
}} }}
className="inline-flex rounded-md bg-red-50 dark:bg-transparent p-1.5 text-red-500 dark:text-red-50" className="inline-flex rounded-md p-1.5 text-status-red"
> >
<span className="sr-only">Dismiss</span> <span className="sr-only">Dismiss</span>
<X className="h-5 w-5" aria-hidden="true" /> <X
className="h-4 w-4 text-error-foreground"
aria-hidden="true"
/>
</button> </button>
</div> </div>
</div> </div>
</div> </div>
) : type === "notice" ? ( ) : type === "notice" ? (
<div <div
className="flex rounded-md bg-blue-50 dark:bg-blue-900 p-3 mb-2 mx-2" className="flex rounded-md bg-info-background p-3 mb-2 mx-2"
key={dropItem.id} key={dropItem.id}
> >
<div className="flex-shrink-0"> <div className="flex-shrink-0">
<Info <Info className="h-5 w-5 text-status-blue " aria-hidden="true" />
className="h-5 w-5 text-blue-400 dark:text-blue-50"
aria-hidden="true"
/>
</div> </div>
<div className="ml-3 flex-1 md:flex md:justify-between"> <div className="ml-3 flex-1 md:flex md:justify-between">
<p className="text-sm text-blue-700 dark:text-white/80"> <p className="text-sm text-info-foreground font-medium">
{dropItem.title} {dropItem.title}
</p> </p>
<p className="mt-3 text-sm md:mt-0 md:ml-6"> <p className="mt-3 text-sm md:mt-0 md:ml-6">
{dropItem.link ? ( {dropItem.link ? (
<Link <Link
to={dropItem.link} to={dropItem.link}
className="whitespace-nowrap font-medium text-blue-700 dark:text-blue-50 dark:hover:text-blue-100 hover:text-ring" className="whitespace-nowrap font-medium text-info-foreground hover:text-ring"
> >
Details Details
</Link> </Link>
@ -108,27 +105,30 @@ export default function SingleAlert({
removeAlert(dropItem.id); removeAlert(dropItem.id);
}, 500); }, 500);
}} }}
className="inline-flex rounded-md bg-blue-50 dark:bg-transparent p-1.5 text-blue-500 dark:text-blue-50" className="inline-flex rounded-md p-1.5 text-info-foreground"
> >
<span className="sr-only">Dismiss</span> <span className="sr-only">Dismiss</span>
<X className="h-5 w-5" aria-hidden="true" /> <X
className="h-4 w-4 text-info-foreground"
aria-hidden="true"
/>
</button> </button>
</div> </div>
</div> </div>
</div> </div>
) : ( ) : (
<div <div
className="flex bg-green-50 dark:bg-green-900 p-3 mb-2 mx-2 rounded-md" className="flex bg-success-background p-3 mb-2 mx-2 rounded-md"
key={dropItem.id} key={dropItem.id}
> >
<div className="flex-shrink-0"> <div className="flex-shrink-0">
<CheckCircle2 <CheckCircle2
className="h-5 w-5 text-green-400 dark:text-green-50" className="h-5 w-5 text-status-green"
aria-hidden="true" aria-hidden="true"
/> />
</div> </div>
<div className="ml-3"> <div className="ml-3">
<p className="text-sm font-medium text-green-800 dark:bg-white/80"> <p className="text-sm font-medium text-success-foreground">
{dropItem.title} {dropItem.title}
</p> </p>
</div> </div>
@ -142,10 +142,13 @@ export default function SingleAlert({
removeAlert(dropItem.id); removeAlert(dropItem.id);
}, 500); }, 500);
}} }}
className="inline-flex rounded-md bg-green-50 dark:bg-transparent p-1.5 text-green-500 dark:text-green-50" className="inline-flex rounded-md p-1.5 text-status-green"
> >
<span className="sr-only">Dismiss</span> <span className="sr-only">Dismiss</span>
<X className="h-5 w-5" aria-hidden="true" /> <X
className="h-4 w-4 text-success-foreground"
aria-hidden="true"
/>
</button> </button>
</div> </div>
</div> </div>

View file

@ -24,13 +24,13 @@ export default function AlertDropdown({}: AlertDropdownType) {
return ( return (
<div <div
ref={componentRef} ref={componentRef}
className="z-10 py-3 pb-4 px-2 rounded-md bg-white dark:bg-gray-800 ring-1 ring-black ring-opacity-5 shadow-lg focus:outline-none overflow-hidden w-[400px] h-[500px] flex flex-col" className="z-10 py-3 pb-4 px-2 rounded-md bg-background ring-1 ring-black ring-opacity-5 shadow-lg focus:outline-none overflow-hidden w-[400px] h-[500px] flex flex-col"
> >
<div className="flex pl-3 flex-row justify-between text-md font-medium text-gray-800 dark:text-gray-200"> <div className="flex pl-3 flex-row justify-between text-md font-medium text-foreground">
Notifications Notifications
<div className="flex gap-3 pr-3 "> <div className="flex gap-3 pr-3 ">
<button <button
className="text-gray-800 hover:text-red-500 dark:text-gray-200 dark:hover:text-red-500" className="text-foreground hover:text-status-red"
onClick={() => { onClick={() => {
closePopUp(); closePopUp();
setTimeout(clearNotificationList, 100); setTimeout(clearNotificationList, 100);
@ -39,14 +39,14 @@ export default function AlertDropdown({}: AlertDropdownType) {
<Trash2 className="w-[1.1rem] h-[1.1rem]" /> <Trash2 className="w-[1.1rem] h-[1.1rem]" />
</button> </button>
<button <button
className="text-gray-800 hover:text-red-500 dark:text-gray-200 dark:hover:text-red-500" className="text-foreground hover:text-status-red"
onClick={closePopUp} onClick={closePopUp}
> >
<X className="h-5 w-5" /> <X className="h-5 w-5" />
</button> </button>
</div> </div>
</div> </div>
<div className="mt-3 flex flex-col overflow-y-scroll w-full h-full scrollbar-hide text-gray-900 dark:text-gray-300"> <div className="mt-3 flex flex-col overflow-y-scroll w-full h-full scrollbar-hide text-high-foreground">
{notificationList.length !== 0 ? ( {notificationList.length !== 0 ? (
notificationList.map((alertItem, index) => ( notificationList.map((alertItem, index) => (
<SingleAlert <SingleAlert
@ -56,7 +56,7 @@ export default function AlertDropdown({}: AlertDropdownType) {
/> />
)) ))
) : ( ) : (
<div className="h-full w-full pb-16 text-gray-500 dark:text-gray-500 flex justify-center items-center"> <div className="h-full w-full pb-16 text-ring flex justify-center items-center">
No new notifications No new notifications
</div> </div>
)} )}

View file

@ -39,21 +39,18 @@ export default function ErrorAlert({
removeAlert(id); removeAlert(id);
}, 500); }, 500);
}} }}
className="rounded-md w-96 mt-6 shadow-xl bg-red-50 dark:bg-red-900 p-4 cursor-pointer" className="rounded-md w-96 mt-6 shadow-xl bg-error-background p-4 cursor-pointer"
> >
<div className="flex"> <div className="flex">
<div className="flex-shrink-0"> <div className="flex-shrink-0">
<XCircle <XCircle className="h-5 w-5 text-status-red" aria-hidden="true" />
className="h-5 w-5 text-red-400 dark:text-red-50"
aria-hidden="true"
/>
</div> </div>
<div className="ml-3"> <div className="ml-3">
<h3 className="text-sm font-medium text-red-800 dark:text-white/80"> <h3 className="text-sm font-medium text-error-foreground">
{title} {title}
</h3> </h3>
{list.length !== 0 ? ( {list.length !== 0 ? (
<div className="mt-2 text-sm text-red-700 dark:text-red-50"> <div className="mt-2 text-sm text-error-foreground">
<ul className="list-disc space-y-1 pl-5"> <ul className="list-disc space-y-1 pl-5">
{list.map((item, index) => ( {list.map((item, index) => (
<li key={index}>{item}</li> <li key={index}>{item}</li>

View file

@ -36,22 +36,19 @@ export default function NoticeAlert({
setShow(false); setShow(false);
removeAlert(id); removeAlert(id);
}} }}
className="rounded-md w-96 mt-6 shadow-xl bg-blue-50 dark:bg-blue-900 p-4" className="rounded-md w-96 mt-6 shadow-xl bg-info-background p-4"
> >
<div className="flex"> <div className="flex">
<div className="flex-shrink-0"> <div className="flex-shrink-0">
<Info <Info className="h-5 w-5 text-status-blue " aria-hidden="true" />
className="h-5 w-5 text-blue-400 dark:text-blue-50"
aria-hidden="true"
/>
</div> </div>
<div className="ml-3 flex-1 md:flex md:justify-between"> <div className="ml-3 flex-1 md:flex md:justify-between">
<p className="text-sm text-blue-700 dark:text-white/80">{title}</p> <p className="text-sm text-info-foreground">{title}</p>
<p className="mt-3 text-sm md:mt-0 md:ml-6"> <p className="mt-3 text-sm md:mt-0 md:ml-6">
{link !== "" ? ( {link !== "" ? (
<Link <Link
to={link} to={link}
className="whitespace-nowrap font-medium text-blue-700 dark:text-blue-50 hover:dark:text-blue-10 hover:text-ring" className="whitespace-nowrap font-medium text-info-foreground hover:text-ring"
> >
Details Details
</Link> </Link>

View file

@ -34,17 +34,17 @@ export default function SuccessAlert({
setShow(false); setShow(false);
removeAlert(id); removeAlert(id);
}} }}
className="rounded-md w-96 mt-6 shadow-xl bg-green-50 dark:bg-green-900 p-4" className="rounded-md w-96 mt-6 shadow-xl bg-success-background p-4"
> >
<div className="flex"> <div className="flex">
<div className="flex-shrink-0"> <div className="flex-shrink-0">
<CheckCircle2 <CheckCircle2
className="h-5 w-5 text-green-400 dark:text-green-50" className="h-5 w-5 text-status-green"
aria-hidden="true" aria-hidden="true"
/> />
</div> </div>
<div className="ml-3"> <div className="ml-3">
<p className="text-sm font-medium text-green-800 dark:text-white/80"> <p className="text-sm font-medium text-success-foreground">
{title} {title}
</p> </p>
</div> </div>

View file

@ -1,11 +1,11 @@
export default function CrashErrorComponent({ error, resetErrorBoundary }) { export default function CrashErrorComponent({ error, resetErrorBoundary }) {
return ( return (
<div className="fixed top-0 left-0 w-full h-full flex items-center justify-center bg-gray-800 bg-opacity-50 z-50"> <div className="fixed top-0 left-0 w-full h-full flex items-center justify-center bg-foreground bg-opacity-50 z-50">
<div className="bg-white max-w-4xl h-1/3 min-h-fit rounded-lg shadow-lg p-8 text-start flex flex-col justify-evenly"> <div className="bg-background max-w-4xl h-1/3 min-h-fit rounded-lg shadow-lg p-8 text-start flex flex-col justify-evenly">
<h1 className="text-red-500 text-3xl mb-4"> <h1 className="text-status-red text-3xl mb-4">
Oops! An unknown error has occurred. Oops! An unknown error has occurred.
</h1> </h1>
<p className="text-gray-700 mb-4 text-xl"> <p className="text-foreground mb-4 text-xl">
Please click the 'Reset Application' button to restore the Please click the 'Reset Application' button to restore the
application's state. If the error persists, please create an issue on application's state. If the error persists, please create an issue on
our GitHub page. We apologize for any inconvenience this may have our GitHub page. We apologize for any inconvenience this may have
@ -14,7 +14,7 @@ export default function CrashErrorComponent({ error, resetErrorBoundary }) {
<div className="flex justify-center"> <div className="flex justify-center">
<button <button
onClick={resetErrorBoundary} onClick={resetErrorBoundary}
className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mr-4" className="bg-primary hover:bg-ring text-background font-bold py-2 px-4 rounded mr-4"
> >
Reset Application Reset Application
</button> </button>
@ -22,7 +22,7 @@ export default function CrashErrorComponent({ error, resetErrorBoundary }) {
href="https://github.com/logspace-ai/langflow/issues/new" href="https://github.com/logspace-ai/langflow/issues/new"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
className="bg-red-500 hover:bg-red-700 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 Create Issue
</a> </a>

View file

@ -47,7 +47,7 @@ export const EditFlowSettings: React.FC<InputProps> = ({
<div className="flex justify-between"> <div className="flex justify-between">
<span className="font-medium">Name</span>{" "} <span className="font-medium">Name</span>{" "}
{isMaxLength && ( {isMaxLength && (
<span className="text-red-500 animate-pulse ml-10"> <span className="text-status-red animate-pulse ml-10">
Character limit reached Character limit reached
</span> </span>
)} )}

View file

@ -18,9 +18,9 @@ export default function ExtraSidebar() {
<aside <aside
className={` ${ className={` ${
isStackedOpen ? "w-52" : "w-0 " isStackedOpen ? "w-52" : "w-0 "
} flex-shrink-0 flex overflow-hidden flex-col border-r dark:border-r-gray-700 transition-all duration-500`} } flex-shrink-0 flex overflow-hidden flex-col border-r transition-all duration-500`}
> >
<div className="w-52 dark:bg-gray-800 border dark:border-gray-700 overflow-y-auto scrollbar-hide h-full flex flex-col items-start bg-white"> <div className="w-52 border overflow-y-auto scrollbar-hide h-full flex flex-col items-start bg-background">
<div className="flex flex-grow flex-col w-full"> <div className="flex flex-grow flex-col w-full">
{extraNavigation.options ? ( {extraNavigation.options ? (
<div className="p-4"> <div className="p-4">
@ -32,16 +32,16 @@ export default function ExtraSidebar() {
to={item.href} to={item.href}
className={classNames( className={classNames(
item.href.split("/")[2] === current[4] item.href.split("/")[2] === current[4]
? "bg-muted text-gray-900" ? "bg-muted text-foreground"
: "bg-white text-gray-600 hover:bg-muted hover:text-gray-900", : "bg-background text-muted-foreground hover:bg-muted hover:text-foreground",
"group w-full flex items-center pl-2 py-2 text-sm font-medium rounded-md" "group w-full flex items-center pl-2 py-2 text-sm font-medium rounded-md"
)} )}
> >
<item.icon <item.icon
className={classNames( className={classNames(
item.href.split("/")[2] === current[4] item.href.split("/")[2] === current[4]
? "text-gray-500" ? "text-ring"
: "text-gray-400 group-hover:text-gray-500", : "text-ring group-hover:text-ring",
"mr-3 flex-shrink-0 h-6 w-6" "mr-3 flex-shrink-0 h-6 w-6"
)} )}
/> />
@ -59,22 +59,20 @@ export default function ExtraSidebar() {
<Disclosure.Button <Disclosure.Button
className={classNames( className={classNames(
item.href.split("/")[2] === current[4] item.href.split("/")[2] === current[4]
? "bg-muted text-gray-900" ? "bg-muted text-foreground"
: "bg-white text-gray-600 hover:bg-muted hover:text-gray-900", : "bg-background text-muted-foreground hover:bg-muted hover:text-foreground",
"group w-full flex items-center pl-2 pr-1 py-2 text-left text-sm font-medium rounded-md focus:outline-none focus:ring-1 focus:ring-indigo-500" "group w-full flex items-center pl-2 pr-1 py-2 text-left text-sm font-medium rounded-md focus:outline-none focus:ring-1 focus:ring-ring"
)} )}
> >
<item.icon <item.icon
className="mr-3 h-6 w-6 flex-shrink-0 text-gray-400 group-hover:text-gray-500" className="mr-3 h-6 w-6 flex-shrink-0 text-ring group-hover:text-ring"
aria-hidden="true" aria-hidden="true"
/> />
<span className="flex-1">{item.name}</span> <span className="flex-1">{item.name}</span>
<svg <svg
className={classNames( className={classNames(
open open ? "text-ring rotate-90" : "text-ring",
? "text-gray-400 rotate-90" "ml-3 h-5 w-5 flex-shrink-0 transition-rotate duration-150 ease-in-out group-hover:text-ring"
: "text-gray-300",
"ml-3 h-5 w-5 flex-shrink-0 transition-rotate duration-150 ease-in-out group-hover:text-gray-400"
)} )}
viewBox="0 0 20 20" viewBox="0 0 20 20"
aria-hidden="true" aria-hidden="true"
@ -92,8 +90,8 @@ export default function ExtraSidebar() {
to={subItem.href} to={subItem.href}
className={classNames( className={classNames(
subItem.href.split("/")[3] === current[5] subItem.href.split("/")[3] === current[5]
? "bg-muted text-gray-900" ? "bg-muted text-foreground"
: "bg-white text-gray-600 hover:bg-muted hover:text-gray-900", : "bg-background text-muted-foreground hover:bg-muted hover:text-foreground",
"group flex w-full items-center rounded-md py-2 pl-11 pr-2 text-sm font-medium" "group flex w-full items-center rounded-md py-2 pl-11 pr-2 text-sm font-medium"
)} )}
> >

View file

@ -37,7 +37,7 @@ const TooltipReact: FC<TooltipProps> = ({
id={selector} id={selector}
content={content} content={content}
className={classNames( className={classNames(
"!bg-white !text-xs !font-normal !text-gray-700 !shadow-md !opacity-100 z-[9999]", "!bg-white !text-xs !font-normal !text-foreground !shadow-md !opacity-100 z-[9999]",
className className
)} )}
place={position} place={position}

View file

@ -8,6 +8,7 @@ import { useSSE } from "../../../contexts/SSEContext";
import { typesContext } from "../../../contexts/typesContext"; import { typesContext } from "../../../contexts/typesContext";
import { alertContext } from "../../../contexts/alertContext"; import { alertContext } from "../../../contexts/alertContext";
import { postBuildInit } from "../../../controllers/API"; import { postBuildInit } from "../../../controllers/API";
import ShadTooltip from "../../ShadTooltipComponent";
import RadialProgressComponent from "../../RadialProgress"; import RadialProgressComponent from "../../RadialProgress";
@ -157,7 +158,7 @@ export default function BuildTrigger({
> >
<div className={`fixed right-4` + (isBuilt ? " bottom-20" : " bottom-4")}> <div className={`fixed right-4` + (isBuilt ? " bottom-20" : " bottom-4")}>
<div <div
className={`${eventClick} flex justify-center align-center py-1 px-3 w-12 h-12 rounded-full shadow-md shadow-[#0000002a] hover:shadow-[#00000032] bg-[#E2E7EE] dark:border-gray-600 cursor-pointer`} className={`${eventClick} flex justify-center align-center py-1 px-3 w-12 h-12 rounded-full shadow-md shadow-round-btn-shadow hover:shadow-round-btn-shadow bg-border cursor-pointer`}
onClick={() => { onClick={() => {
handleBuild(flow); handleBuild(flow);
}} }}
@ -169,13 +170,14 @@ export default function BuildTrigger({
{isBuilding && progress < 1 ? ( {isBuilding && progress < 1 ? (
// Render your loading animation here when isBuilding is true // Render your loading animation here when isBuilding is true
<RadialProgressComponent <RadialProgressComponent
color={"text-orange-400"} // ! confirm below works
color={"text-build-trigger"}
value={progress} value={progress}
></RadialProgressComponent> ></RadialProgressComponent>
) : isBuilding ? ( ) : isBuilding ? (
<Loading strokeWidth={1.5} style={{ color: "#fb923c" }} /> <Loading strokeWidth={1.5} className="stroke-build-trigger" />
) : ( ) : (
<Zap className="sh-6 w-6 fill-orange-400 stroke-1 stroke-orange-400" /> <Zap className="sh-6 w-6 fill-build-trigger stroke-1 stroke-build-trigger" />
)} )}
</div> </div>
</button> </button>

View file

@ -13,7 +13,7 @@ export default function ChatMessage({ chat }: { chat: ChatMessageType }) {
<div className="w-full text-start"> <div className="w-full text-start">
<div <div
style={{ backgroundColor: nodeColors["chat"] }} style={{ backgroundColor: nodeColors["chat"] }}
className=" relative text-start inline-block text-white rounded-xl overflow-hidden w-fit max-w-[280px] text-sm font-normal rounded-tl-none" className=" relative text-start inline-block text-background rounded-xl overflow-hidden w-fit max-w-[280px] text-sm font-normal rounded-tl-none"
> >
{hidden && chat.thought && chat.thought !== "" && ( {hidden && chat.thought && chat.thought !== "" && (
<div <div
@ -44,7 +44,7 @@ export default function ChatMessage({ chat }: { chat: ChatMessageType }) {
</div> </div>
) : ( ) : (
<div className="w-full text-end"> <div className="w-full text-end">
<div className="text-start inline-block rounded-xl p-3 overflow-hidden w-fit max-w-[280px] px-5 text-sm text-black dark:text-white dark:bg-gray-700 bg-gray-200 font-normal rounded-tr-none"> <div className="text-start inline-block rounded-xl p-3 overflow-hidden w-fit max-w-[280px] px-5 text-sm text-black bg-input font-normal rounded-tr-none">
{chat.message} {chat.message}
</div> </div>
</div> </div>

View file

@ -3,6 +3,7 @@ import { MessagesSquare } from "lucide-react";
import { alertContext } from "../../../contexts/alertContext"; import { alertContext } from "../../../contexts/alertContext";
import { useContext } from "react"; import { useContext } from "react";
import ShadTooltip from "../../ShadTooltipComponent";
export default function ChatTrigger({ open, setOpen, isBuilt }) { export default function ChatTrigger({ open, setOpen, isBuilt }) {
const { setErrorData } = useContext(alertContext); const { setErrorData } = useContext(alertContext);
@ -31,14 +32,14 @@ export default function ChatTrigger({ open, setOpen, isBuilt }) {
> >
<div className="absolute bottom-4 right-3"> <div className="absolute bottom-4 right-3">
<div <div
className="flex justify-center align-center py-1 px-3 w-12 h-12 rounded-full shadow-md shadow-[#0000002a] hover:shadow-[#00000032] className="flex justify-center align-center py-1 px-3 w-12 h-12 rounded-full shadow-md shadow-round-btn-shadow hover:shadow-round-btn-shadow
bg-[#E2E7EE] dark:border-gray-600 cursor-pointer" bg-border cursor-pointer"
onClick={handleClick} onClick={handleClick}
> >
<button> <button>
<div className="flex gap-3"> <div className="flex gap-3">
<MessagesSquare <MessagesSquare
className="pth-6 w-6 fill-[#5c8be1] stroke-1 stroke-[#5c8be1]" className="pth-6 w-6 fill-chat-trigger stroke-1 stroke-chat-trigger"
style={{ color: "white" }} style={{ color: "white" }}
strokeWidth={1.5} strokeWidth={1.5}
/> />

View file

@ -46,11 +46,11 @@ export default function CodeAreaComponent({
}} }}
className={ className={
editNode editNode
? "truncate cursor-pointer placeholder:text-center text-gray-500 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 border-1 shadow-sm sm:text-sm" + ? "truncate cursor-pointer placeholder:text-center text-ring block w-full pt-0.5 pb-0.5 form-input rounded-md border-ring border-1 shadow-sm text-sm bg-transparent sm:text-sm" +
INPUT_STYLE INPUT_STYLE
: "truncate block w-full text-gray-500 px-3 py-2 rounded-md border border-gray-300 dark:border-gray-700 shadow-sm sm:text-sm" + : "truncate block w-full text-ring px-3 py-2 rounded-md border border-ring shadow-sm sm:text-sm placeholder:text-muted-foreground" +
INPUT_STYLE + INPUT_STYLE +
(disabled ? " bg-gray-200" : "") (disabled ? " bg-input" : "")
} }
> >
{myValue !== "" ? myValue : "Type something..."} {myValue !== "" ? myValue : "Type something..."}
@ -69,7 +69,7 @@ export default function CodeAreaComponent({
}} }}
> >
{!editNode && ( {!editNode && (
<ExternalLink className="w-6 h-6 hover:text-ring dark:text-gray-300 ml-3" /> <ExternalLink className="w-6 h-6 hover:text-ring ml-3" />
)} )}
</button> </button>
</div> </div>

View file

@ -34,20 +34,22 @@ export default function Dropdown({
<Listbox.Button <Listbox.Button
className={ className={
editNode editNode
? "relative pr-8 placeholder:text-center 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 shadow-sm sm:text-sm border-gray-300 border-1" + ? "relative pr-8 placeholder:text-center block w-full pt-0.5 pb-0.5 form-input rounded-md shadow-sm sm:text-sm border-ring border-1" +
INPUT_STYLE INPUT_STYLE
: "ring-1 ring-slate-300 dark:ring-slate-600 w-full py-2 pl-3 pr-10 text-left dark:focus:ring-offset-2 dark:focus:ring-offset-gray-900 dark:focus:ring-1 dark:focus:ring-gray-600 dark:focus-visible:ring-gray-900 dark:focus-visible:ring-offset-2 focus-visible:outline-none dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600 rounded-md border-gray-300 shadow-sm sm:text-sm" + : "ring-1 ring-ring placeholder:text-muted-foreground w-full py-2 pl-3 pr-10 text-left focus-visible:outline-none rounded-md border-ring shadow-sm sm:text-sm bg-background" +
INPUT_STYLE INPUT_STYLE
} }
> >
<span className="block truncate w-full">{internalValue}</span> <span className="block bg-background truncate w-full">
{internalValue}
</span>
<span <span
className={ className={
"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2" "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2"
} }
> >
<ChevronsUpDown <ChevronsUpDown
className="h-5 w-5 text-gray-400" className="h-5 w-5 text-muted-foreground"
aria-hidden="true" aria-hidden="true"
/> />
</span> </span>
@ -63,8 +65,8 @@ export default function Dropdown({
<Listbox.Options <Listbox.Options
className={ className={
editNode editNode
? "absolute z-10 mt-1 max-h-60 overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm w-[215px]" ? "absolute z-10 mt-1 max-h-60 overflow-auto rounded-md bg-background py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm w-[215px]"
: "nowheel absolute z-10 mt-1 max-h-60 w-full overflow-auto overflow-y rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm " : "nowheel absolute z-10 mt-1 max-h-60 w-full overflow-auto overflow-y rounded-md bg-background py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm "
} }
> >
{options.map((option, id) => ( {options.map((option, id) => (
@ -72,12 +74,10 @@ export default function Dropdown({
key={id} key={id}
className={({ active }) => className={({ active }) =>
classNames( classNames(
active active ? " bg-accent" : "",
? " bg-accent dark:bg-white dark:text-gray-500"
: "",
editNode editNode
? "relative cursor-default select-none py-0.5 pl-3 pr-12 dark:text-gray-300 dark:bg-gray-800" ? "relative cursor-default select-none py-0.5 pl-3 pr-12"
: "relative cursor-default select-none py-2 pl-3 pr-9 dark:text-gray-300 dark:bg-gray-800" : "relative cursor-default select-none py-2 pl-3 pr-9"
) )
} }
value={option} value={option}
@ -96,15 +96,15 @@ export default function Dropdown({
{selected ? ( {selected ? (
<span <span
className={classNames( className={classNames(
active ? "text-white dark:text-black" : "", active ? "text-background " : "",
"absolute inset-y-0 right-0 flex items-center pr-4" "absolute inset-y-0 right-0 flex items-center pr-4"
)} )}
> >
<Check <Check
className={ className={
active active
? "h-5 w-5 dark:text-black text-black" ? "h-5 w-5 text-black"
: "h-5 w-5 dark:text-white text-black" : "h-5 w-5 text-black"
} }
aria-hidden="true" aria-hidden="true"
/> />

View file

@ -56,11 +56,11 @@ export default function FloatComponent({
value={myValue} value={myValue}
className={ className={
editNode editNode
? "focus:placeholder-transparent text-center placeholder:text-center 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" + ? "focus:placeholder-transparent text-center placeholder:text-center border-1 block w-full pt-0.5 pb-0.5 form-input rounded-md border-ring shadow-sm sm:text-sm placeholder:text-muted-foreground" +
INPUT_STYLE INPUT_STYLE
: "focus:placeholder-transparent block w-full form-input dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600 rounded-md border-gray-300 shadow-sm ring-offset-gray-200 sm:text-sm" + : "focus:placeholder-transparent block w-full form-input placeholder:text-muted-foreground bg-background rounded-md border-ring shadow-sm ring-offset-input sm:text-sm" +
INPUT_STYLE + INPUT_STYLE +
(disabled ? " bg-gray-200 dark:bg-gray-700" : "") (disabled ? " bg-input" : "")
} }
placeholder={ placeholder={
editNode ? "Number 0 to 1" : "Type a number from zero to one" editNode ? "Number 0 to 1" : "Type a number from zero to one"

View file

@ -80,7 +80,7 @@ export const MenuBar = ({ flows, tabId }) => {
}} }}
className="cursor-pointer" className="cursor-pointer"
> >
<Settings2 className="w-4 h-4 mr-2 dark:text-gray-300" /> <Settings2 className="w-4 h-4 mr-2 " />
Settings Settings
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem <DropdownMenuItem
@ -89,7 +89,7 @@ export const MenuBar = ({ flows, tabId }) => {
}} }}
className="cursor-pointer" className="cursor-pointer"
> >
<Undo className="w-4 h-4 mr-2 dark:text-gray-300" /> <Undo className="w-4 h-4 mr-2 " />
Undo Undo
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem <DropdownMenuItem
@ -98,7 +98,7 @@ export const MenuBar = ({ flows, tabId }) => {
}} }}
className="cursor-pointer" className="cursor-pointer"
> >
<Redo className="w-4 h-4 mr-2 dark:text-gray-300" /> <Redo className="w-4 h-4 mr-2 " />
Redo Redo
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuSeparator /> <DropdownMenuSeparator />

View file

@ -75,7 +75,7 @@ export default function Header() {
href="https://github.com/logspace-ai/langflow" href="https://github.com/logspace-ai/langflow"
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
className="inline-flex shadow-sm items-center justify-center text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background text-gray-600 dark:text-gray-300 border border-input hover:bg-accent hover:text-accent-foreground h-9 px-3 pr-0 rounded-md" className="inline-flex shadow-sm items-center justify-center text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background text-muted-foreground border border-input hover:bg-accent hover:text-accent-foreground h-9 px-3 pr-0 rounded-md"
> >
<FaGithub className="h-5 w-5 mr-2" /> <FaGithub className="h-5 w-5 mr-2" />
Star Star
@ -99,9 +99,10 @@ export default function Header() {
> >
<FaDiscord className="h-5 w-5" /> <FaDiscord className="h-5 w-5" />
</a> </a>
{/* <Separator orientation="vertical" />
<Separator orientation="vertical" />
<button <button
className="text-gray-600 hover:text-gray-500 dark:text-gray-300 dark:hover:text-gray-200" className="text-muted-foreground hover:text-ring "
onClick={() => { onClick={() => {
setDark(!dark); setDark(!dark);
}} }}
@ -111,9 +112,9 @@ export default function Header() {
) : ( ) : (
<MoonIcon className="h-5 w-5" /> <MoonIcon className="h-5 w-5" />
)} )}
</button> */} </button>
<button <button
className="text-gray-600 hover:text-gray-500 dark:text-gray-300 dark:hover:text-gray-200 relative" className="text-muted-foreground hover:text-ring relative"
onClick={(event: React.MouseEvent<HTMLElement>) => { onClick={(event: React.MouseEvent<HTMLElement>) => {
setNotificationCenter(false); setNotificationCenter(false);
const { top, left } = ( const { top, left } = (

View file

@ -46,13 +46,13 @@ export default function InputComponent({
if (disableCopyPaste) setDisableCopyPaste(false); if (disableCopyPaste) setDisableCopyPaste(false);
}} }}
className={classNames( className={classNames(
"block w-full pr-12 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:placeholder-transparent", "block w-full pr-12 form-input rounded-md bg-background border-ring shadow-sm sm:text-sm focus:placeholder-transparent placeholder:text-muted-foreground",
disabled ? " bg-gray-200 dark:bg-gray-700" : "", disabled ? " bg-input" : "",
password && !pwdVisible && myValue !== "" ? "password" : "", password && !pwdVisible && myValue !== "" ? "password" : "",
editNode editNode
? "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 text-center" + ? "border-1 block w-full pt-0.5 pb-0.5 form-input rounded-md border-ring shadow-sm sm:text-sm text-center" +
INPUT_STYLE INPUT_STYLE
: "ring-offset-gray-200" + INPUT_STYLE, : "ring-offset-input" + INPUT_STYLE,
password && editNode ? "pr-8" : "pr-3" password && editNode ? "pr-8" : "pr-3"
)} )}
placeholder={password && editNode ? "Key" : "Type something..."} placeholder={password && editNode ? "Key" : "Type something..."}
@ -65,8 +65,8 @@ export default function InputComponent({
<button <button
className={classNames( className={classNames(
editNode editNode
? "absolute inset-y-0 right-0 pr-2 items-center text-gray-600" ? "absolute inset-y-0 right-0 pr-2 items-center text-muted-foreground"
: "absolute inset-y-0 right-0 items-center px-4 text-gray-600" : "absolute inset-y-0 right-0 items-center px-4 text-muted-foreground"
)} )}
onClick={() => { onClick={() => {
setPwdVisible(!pwdVisible); setPwdVisible(!pwdVisible);

View file

@ -103,11 +103,11 @@ export default function InputFileComponent({
onClick={handleButtonClick} onClick={handleButtonClick}
className={ className={
editNode editNode
? "truncate placeholder:text-center text-gray-500 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 border-1" + ? "truncate placeholder:text-center text-ring block w-full pt-0.5 pb-0.5 form-input rounded-md border-ring shadow-sm sm:text-sm border-1" +
INPUT_STYLE INPUT_STYLE
: "truncate block w-full text-gray-500 dark:text-gray-300 px-3 py-2 rounded-md border border-gray-300 dark:border-gray-700 shadow-sm sm:text-sm" + : "truncate block w-full text-ring px-3 py-2 rounded-md border border-ring shadow-sm sm:text-sm" +
INPUT_STYLE + INPUT_STYLE +
(disabled ? " bg-gray-200" : "") (disabled ? " bg-input" : "")
} }
> >
{myValue !== "" ? myValue : "No file"} {myValue !== "" ? myValue : "No file"}

View file

@ -33,10 +33,10 @@ export default function InputListComponent({
value={i} value={i}
className={ className={
editNode editNode
? "border-[1px] truncate cursor-pointer text-center placeholder:text-center text-gray-500 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" + ? "border-[1px] truncate cursor-pointer text-center placeholder:text-center text-ring block w-full pt-0.5 pb-0.5 form-input rounded-md border-ring shadow-sm sm:text-sm" +
INPUT_STYLE INPUT_STYLE
: "block w-full form-input rounded-md border-gray-300 shadow-sm focus:border-gray-500 focus:ring-gray-500 sm:text-sm" + : "block w-full form-input bg-background rounded-md border-ring shadow-sm focus:border-ring focus:ring-ring sm:text-sm" +
(disabled ? " bg-gray-200" : "") + (disabled ? " bg-input" : "") +
"focus:placeholder-transparent" "focus:placeholder-transparent"
} }
placeholder="Type something..." placeholder="Type something..."
@ -73,7 +73,7 @@ export default function InputListComponent({
onChange(inputList); onChange(inputList);
}} }}
> >
<X className="w-4 h-4 hover:text-red-600" /> <X className="w-4 h-4 hover:text-status-red" />
</button> </button>
)} )}
</div> </div>

View file

@ -70,13 +70,13 @@ export default function IntComponent({
value={myValue} value={myValue}
className={ className={
editNode editNode
? "focus:placeholder-transparent text-center placeholder:text-center 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" + ? "focus:placeholder-transparent text-center placeholder:text-center border-1 block w-full pt-0.5 pb-0.5 form-input rounded-md border-ring shadow-sm sm:text-sm placeholder:text-muted-foreground" +
INPUT_STYLE INPUT_STYLE
: "focus:placeholder-transparent block w-full form-input dark:bg-gray-900 dark:border-gray-600 dark:text-gray-300 rounded-md border-gray-300 shadow-sm ring-offset-background sm:text-sm" + : "focus:placeholder-transparent block w-full form-input bg-background rounded-md border-ring shadow-sm ring-offset-background sm:text-sm placeholder:text-muted-foreground" +
INPUT_STYLE + INPUT_STYLE +
(disabled ? " bg-gray-200 dark:bg-gray-700" : "") (disabled ? " bg-input" : "")
} }
placeholder={editNode ? "Integer number" : "Type a integer number"} placeholder={editNode ? "Integer number" : "Type an integer number"}
onChange={(e) => { onChange={(e) => {
setMyValue(e.target.value); setMyValue(e.target.value);
onChange(e.target.value); onChange(e.target.value);

View file

@ -7,7 +7,7 @@ export default function LoadingComponent({ remSize }: LoadingComponentProps) {
<div role="status" className="w-min m-auto"> <div role="status" className="w-min m-auto">
<svg <svg
aria-hidden="true" aria-hidden="true"
className={`w-${remSize} h-${remSize} mr-2 text-muted animate-spin dark:text-gray-600 fill-blue-600`} className={`w-${remSize} h-${remSize} mr-2 text-muted animate-spin fill-almost-medium-blue`}
viewBox="0 0 100 101" viewBox="0 0 100 101"
fill="none" fill="none"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -22,7 +22,9 @@ export default function LoadingComponent({ remSize }: LoadingComponentProps) {
/> />
</svg> </svg>
<br></br> <br></br>
<span className="animate-pulse text-blue-600 text-lg">Loading...</span> <span className="animate-pulse text-almost-medium-blue text-lg">
Loading...
</span>
</div> </div>
); );
} }

View file

@ -49,10 +49,10 @@ export default function PromptAreaComponent({
}} }}
className={ className={
editNode editNode
? "cursor-pointer truncate 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" + ? "cursor-pointer truncate placeholder:text-center text-ring border-1 block w-full pt-0.5 pb-0.5 form-input rounded-md border-ring shadow-sm sm:text-sm" +
INPUT_STYLE INPUT_STYLE
: "truncate block w-full text-gray-500 px-3 py-2 rounded-md border border-gray-300 dark:border-gray-700 shadow-sm sm:text-sm" + : "truncate block w-full text-ring px-3 py-2 rounded-md border border-ring shadow-sm sm:text-sm" +
(disabled ? " bg-gray-200" : "") (disabled ? " bg-input" : "")
} }
> >
{myValue !== "" ? myValue : "Type your prompt here"} {myValue !== "" ? myValue : "Type your prompt here"}
@ -73,9 +73,7 @@ export default function PromptAreaComponent({
); );
}} }}
> >
{!editNode && ( {!editNode && <ExternalLink className="w-6 h-6 hover:text-ring " />}
<ExternalLink className="w-6 h-6 hover:text-ring dark:text-gray-300" />
)}
</button> </button>
</div> </div>
</div> </div>

View file

@ -52,10 +52,10 @@ export default function TextAreaComponent({
}} }}
className={ className={
editNode editNode
? "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" + ? "truncate cursor-pointer placeholder:text-center text-ring border-1 block w-full pt-0.5 pb-0.5 form-input rounded-md border-ring bg-transparent shadow-sm sm:text-sm" +
INPUT_STYLE 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" + : "truncate block w-full text-ring px-3 py-2 rounded-md border border-ring shadow-sm sm:text-sm" +
(disabled ? " bg-gray-200" : "") (disabled ? " bg-input" : "")
} }
> >
{myValue !== "" ? myValue : "Type something..."} {myValue !== "" ? myValue : "Type something..."}
@ -76,9 +76,7 @@ export default function TextAreaComponent({
); );
}} }}
> >
{!editNode && ( {!editNode && <ExternalLink className="w-6 h-6 hover:text-ring " />}
<ExternalLink className="w-6 h-6 hover:text-ring dark:text-gray-300" />
)}
</button> </button>
</div> </div>
</div> </div>

View file

@ -21,7 +21,7 @@ export default function ToggleComponent({
setEnabled(x); setEnabled(x);
}} }}
className={classNames( className={classNames(
enabled ? "bg-primary" : "bg-gray-200", enabled ? "bg-primary" : "bg-input",
"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" "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"
)} )}
> >
@ -30,9 +30,7 @@ export default function ToggleComponent({
className={classNames( className={classNames(
enabled ? "translate-x-5" : "translate-x-0", enabled ? "translate-x-5" : "translate-x-0",
"pointer-events-none relative inline-block h-5 w-5 transform rounded-full shadow ring-0 transition duration-200 ease-in-out", "pointer-events-none relative inline-block h-5 w-5 transform rounded-full shadow ring-0 transition duration-200 ease-in-out",
disabled disabled ? "bg-input " : "bg-background"
? "bg-gray-200 dark:bg-gray-600"
: "bg-white dark:bg-gray-800"
)} )}
> >
<span <span

View file

@ -37,7 +37,7 @@ export default function ToggleShadComponent({
style={{ style={{
transform: `scaleX(${scaleX}) scaleY(${scaleY})`, transform: `scaleX(${scaleX}) scaleY(${scaleY})`,
}} }}
className="data-[state=unchecked]:bg-slate-500" className=""
checked={enabled} checked={enabled}
onCheckedChange={(x: boolean) => { onCheckedChange={(x: boolean) => {
setEnabled(x); setEnabled(x);

View file

@ -27,7 +27,7 @@ const DialogOverlay = React.forwardRef<
<DialogPrimitive.Overlay <DialogPrimitive.Overlay
ref={ref} ref={ref}
className={cn( className={cn(
"fixed inset-0 z-50 bg-primary/80 backdrop-blur-sm transition-all duration-100 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in", "fixed inset-0 z-50 bg-blur-shared backdrop-blur-sm transition-all duration-100 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in",
className className
)} )}
{...props} {...props}

View file

@ -57,7 +57,7 @@ export default function RenameLabel(props) {
ref={inputRef} ref={inputRef}
onInput={resizeInput} onInput={resizeInput}
className={cn( className={cn(
"px-2 bg-transparent focus:border-none active:outline hover:outline focus:outline outline-gray-300 rounded-md", "px-2 bg-transparent focus:border-none active:outline hover:outline focus:outline outline-ring rounded-md",
props.className props.className
)} )}
onBlur={() => { onBlur={() => {

View file

@ -10,7 +10,7 @@ const Switch = React.forwardRef<
>(({ className, ...props }, ref) => ( >(({ className, ...props }, ref) => (
<SwitchPrimitives.Root <SwitchPrimitives.Root
className={cn( className={cn(
"peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", "peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-ring",
className className
)} )}
{...props} {...props}

View file

@ -148,7 +148,28 @@ export const EXPORT_CODE_DIALOG =
* @constant * @constant
*/ */
export const INPUT_STYLE = export const INPUT_STYLE =
" focus:ring-1 focus:ring-offset-1 focus:ring-ring focus:outline-none "; "focus:tw-ring-none focus-visible:outline-none focus:ring-ring bg-background focus:outline-none";
/**
* The base text for subtitle of code dialog
* @constant
*/
export const COLUMN_DIV_STYLE =
" w-full h-full flex overflow-auto flex-col bg-muted px-16 ";
/**
* The base text for subtitle of code dialog
* @constant
*/
export const NAV_DISPLAY_STYLE =
" w-full flex justify-between py-12 pb-2 px-6 ";
/**
* The base text for subtitle of code dialog
* @constant
*/
export const BUTTON_DIV_STYLE = " flex gap-2 ";
(" focus:ring-1 focus:ring-offset-1 focus:ring-ring focus:outline-none ");
/** /**
* Default description for the flow * Default description for the flow

View file

@ -192,26 +192,28 @@ export function TabsProvider({ children }: { children: ReactNode }) {
} }
function processFlowEdges(flow) { function processFlowEdges(flow) {
if(!flow.data || !flow.data.edges) return; if (!flow.data || !flow.data.edges) return;
flow.data.edges.forEach((edge) => { flow.data.edges.forEach((edge) => {
edge.className = ""; edge.className = "";
edge.style = { stroke: "#555555" }; edge.style = { stroke: "#555555" };
}); });
} }
function updateDisplay_name(node:NodeType,template:APIClassType) { function updateDisplay_name(node: NodeType, template: APIClassType) {
node.data.node.display_name = template["display_name"]?template["display_name"]:node.data.type; node.data.node.display_name = template["display_name"]
? template["display_name"]
: node.data.type;
} }
function processFlowNodes(flow) { function processFlowNodes(flow) {
if(!flow.data || !flow.data.nodes) return; if (!flow.data || !flow.data.nodes) return;
flow.data.nodes.forEach((node:NodeType) => { flow.data.nodes.forEach((node: NodeType) => {
const template = templates[node.data.type]; const template = templates[node.data.type];
if (!template) { if (!template) {
setErrorData({ title: `Unknown node type: ${node.data.type}` }); setErrorData({ title: `Unknown node type: ${node.data.type}` });
return; return;
} }
if (Object.keys(template["template"]).length > 0) { if (Object.keys(template["template"]).length > 0) {
updateDisplay_name(node,template); updateDisplay_name(node, template);
updateNodeBaseClasses(node, template); updateNodeBaseClasses(node, template);
updateNodeEdges(flow, node, template); updateNodeEdges(flow, node, template);
updateNodeDescription(node, template); updateNodeDescription(node, template);
@ -220,11 +222,15 @@ export function TabsProvider({ children }: { children: ReactNode }) {
}); });
} }
function updateNodeBaseClasses(node:NodeType,template:APIClassType) { function updateNodeBaseClasses(node: NodeType, template: APIClassType) {
node.data.node.base_classes = template["base_classes"]; node.data.node.base_classes = template["base_classes"];
} }
function updateNodeEdges(flow:FlowType, node:NodeType,template:APIClassType) { function updateNodeEdges(
flow: FlowType,
node: NodeType,
template: APIClassType
) {
flow.data.edges.forEach((edge) => { flow.data.edges.forEach((edge) => {
if (edge.source === node.id) { if (edge.source === node.id) {
edge.sourceHandle = edge.sourceHandle edge.sourceHandle = edge.sourceHandle
@ -236,11 +242,11 @@ export function TabsProvider({ children }: { children: ReactNode }) {
}); });
} }
function updateNodeDescription(node:NodeType,template:APIClassType) { function updateNodeDescription(node: NodeType, template: APIClassType) {
node.data.node.description = template["description"]; node.data.node.description = template["description"];
} }
function updateNodeTemplate(node:NodeType,template:APIClassType) { function updateNodeTemplate(node: NodeType, template: APIClassType) {
node.data.node.template = updateTemplate( node.data.node.template = updateTemplate(
template["template"] as unknown as APITemplateType, template["template"] as unknown as APITemplateType,
node.data.node.template as APITemplateType node.data.node.template as APITemplateType
@ -446,8 +452,8 @@ export function TabsProvider({ children }: { children: ReactNode }) {
style: { stroke: "inherit" }, style: { stroke: "inherit" },
className: className:
targetHandle.split("|")[0] === "Text" targetHandle.split("|")[0] === "Text"
? "stroke-gray-800 dark:stroke-gray-300" ? "stroke-gray-800 "
: "stroke-gray-900 dark:stroke-gray-200", : "stroke-gray-900 ",
animated: targetHandle.split("|")[0] === "Text", animated: targetHandle.split("|")[0] === "Text",
selected: false, selected: false,
}, },
@ -513,8 +519,8 @@ export function TabsProvider({ children }: { children: ReactNode }) {
edge.style = { stroke: "inherit" }; edge.style = { stroke: "inherit" };
edge.className = edge.className =
edge.targetHandle.split("|")[0] === "Text" edge.targetHandle.split("|")[0] === "Text"
? "stroke-gray-800 dark:stroke-gray-300" ? "stroke-gray-800 "
: "stroke-gray-900 dark:stroke-gray-200"; : "stroke-gray-900 ";
edge.animated = edge.targetHandle.split("|")[0] === "Text"; edge.animated = edge.targetHandle.split("|")[0] === "Text";
}); });
}; };

View file

@ -2,73 +2,10 @@
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
/* TODO: Confirm that all colors here are found in tailwind config */
@layer base { @layer base {
:root {
--background: 0 0% 100%; /* hsl(0 0% 100%) */
--foreground: 222.2 47.4% 11.2%; /* hsl(222 47% 11%) */
--muted: 210 40% 96.1%; /* hsl(210 40% 96%) */
--muted-foreground: 215.4 16.3% 46.9%; /* hsl(215 16% 46%) */
--popover: 0 0% 100%; /* hsl(0 0% 100%) */
--popover-foreground: 222.2 47.4% 11.2%; /* hsl(222 47% 11%) */
--card: 0 0% 100%; /* hsl(0 0% 100%) */
--card-foreground: 222.2 47.4% 11.2%; /* hsl(222 47% 11%) */
--border: 214.3 31.8% 91.4%; /* hsl(214 32% 91%) */
--input: 214.3 31.8% 91.4%; /* hsl(214 32% 91%) */
--primary: 222.2 47.4% 11.2%; /* hsl(222 47% 11%) */
--primary-foreground: 210 40% 98%; /* hsl(210 40% 98%) */
--secondary: 210 40% 96.1%; /* hsl(210 40% 96%) */
--secondary-foreground: 222.2 47.4% 11.2%; /* hsl(222 47% 11%) */
--accent: 210 40% 96.1%; /* hsl(210 40% 96%) */
--accent-foreground: 222.2 47.4% 11.2%; /* hsl(222 47% 11%) */
--destructive: 0 100% 50%; /* hsl(0 100% 50%) */
--destructive-foreground: 210 40% 98%; /* hsl(210 40% 98%) */
--ring: 215 20.2% 65.1%; /* hsl(215 20% 65%) */
--radius: 0.5rem;
}
.dark {
--background: 224 71% 4%; /* hsl(224 71% 4%) */
--foreground: 213 31% 91%; /* hsl(213 31% 91%) */
--muted: 223 47% 11%; /* hsl(223 47% 11%) */
--muted-foreground: 215.4 16.3% 56.9%; /* hsl(215 16% 56%) */
--popover: 224 71% 4%; /* hsl(224 71% 4%) */
--popover-foreground: 215 20.2% 65.1%; /* hsl(215 20% 65%) */
--card: 224 71% 4%; /* hsl(224 71% 4%) */
--card-foreground: 213 31% 91%; /* hsl(213 31% 91%) */
--border: 216 34% 17%; /* hsl(216 34% 17%) */
--input: 216 34% 17%; /* hsl(216 34% 17%) */
--primary: 210 40% 98%; /* hsl(210 40% 98%) */
--primary-foreground: 222.2 47.4% 1.2%; /* hsl(222 47% 1%) */
--secondary: 222.2 47.4% 11.2%; /* hsl(222 47% 11%) */
--secondary-foreground: 210 40% 98%; /* hsl(210 40% 98%) */
--accent: 216 34% 17%; /* hsl(216 34% 17%) */
--accent-foreground: 210 40% 98%; /* hsl(210 40% 98%) */
--destructive: 0 63% 31%; /* hsl(0 63% 31%) */
--destructive-foreground: 210 40% 98%; /* hsl(210 40% 98%) */
--ring: 216 34% 17%; /* hsl(216 34% 17%) */
--radius: 0.5rem;
}
}
:root { :root {
--background: 0 0% 100%; /* hsl(0 0% 100%) */ --background: 0 0% 100%; /* hsl(0 0% 100%) */
@ -89,51 +26,89 @@
--accent-foreground: 222.2 47.4% 11.2%; /* hsl(222 47% 11%) */ --accent-foreground: 222.2 47.4% 11.2%; /* hsl(222 47% 11%) */
--destructive: 0 100% 50%; /* hsl(0 100% 50%) */ --destructive: 0 100% 50%; /* hsl(0 100% 50%) */
--destructive-foreground: 210 40% 98%; /* hsl(210 40% 98%) */ --destructive-foreground: 210 40% 98%; /* hsl(210 40% 98%) */
--ring: 215 20.2% 65.1%; /* hsl(215 20% 65%) */
--radius: 0.5rem; --radius: 0.5rem;
--ring: 215 20.2% 65.1%; /* hsl(215 20% 65%) */
--round-btn-shadow: #00000063;
--error-background: #fef2f2;
--error-foreground: #991b1b;
--success-background: #f0fdf4;
--success-foreground: #14532d;
--info-background: #f0f4fd;
--info-foreground: #141653;
--high-indigo: #4338ca;
--medium-indigo: #6366f1;
/* Colors that are shared in dark and light mode */
--blur-shared: #151923de;
--build-trigger: #dc735b;
--chat-trigger: #5c8be1;
--status-red: #ef4444;
--status-yellow: #eab308;
--status-green: #4ade80;
--status-blue:#2563eb;
} }
.dark { .dark {
-background: 224 71% 4%; --background: 224 35% 7.5%; /* hsl(224 40% 10%) */
/* hsl(224 71% 4%) */ --foreground: 213 31% 85%; /* hsl(213 31% 91%) */
-foreground: 213 31% 91%;
/* hsl(213 31% 91%) */ --muted: 223 27% 11%; /* hsl(223 27% 11%) */
-muted: 223 47% 11%; --muted-foreground: 215.4 16.3% 56.9%; /* hsl(215 16% 56%) */
/* hsl(223 47% 11%) */
-muted-foreground: 215.4 16.3% 56.9%; --popover: 224 71% 4%; /* hsl(224 71% 4%) */
/* hsl(215 16% 56%) */ --popover-foreground: 215 20.2% 65.1%; /* hsl(215 20% 65%) */
-popover: 224 71% 4%;
/* hsl(224 71% 4%) */ --card: 224 25% 15.5%; /* hsl(224 71% 4%) */
-popover-foreground: 215 20.2% 65.1%; --card-foreground: 213 31% 80%; /* hsl(213 31% 91%) */
/* hsl(215 20% 65%) */
-card: 224 71% 4%; --border: 216 24% 17%; /* hsl(216 34% 17%) */
/* hsl(224 71% 4%) */ --input: 216 24% 17%; /* hsl(216 34% 17%) */
-card-foreground: 213 31% 91%;
/* hsl(213 31% 91%) */ --primary: 210 20% 80%; /* hsl(210 40% 98%) */
-border: 216 34% 17%; --primary-foreground: 222.2 27.4% 1.2%; /* hsl(222 47% 1%) */
/* hsl(216 34% 17%) */
-input: 216 34% 17%; --secondary: 222.2 47.4% 11.2%; /* hsl(222 47% 11%) */
/* hsl(216 34% 17%) */ --secondary-foreground: 210 40% 98%; /* hsl(210 40% 98%) */
-primary: 210 40% 98%;
/* hsl(210 40% 98%) */ --accent: 216 24% 17%; /* hsl(216 34% 17%) */
-primary-foreground: 222.2 47.4% 1.2%; --accent-foreground: 210 30% 98%; /* hsl(210 40% 98%) */
/* hsl(222 47% 1%) */
-secondary: 222.2 47.4% 11.2%; --destructive: 0 63% 31%; /* hsl(0 63% 31%) */
/* hsl(222 47% 11%) */ --destructive-foreground: 210 40% 98%; /* hsl(210 40% 98%) */
-secondary-foreground: 210 40% 98%;
/* hsl(210 40% 98%) */ --ring: 216 24% 30%; /* hsl(216 24% 30%) */
-accent: 216 34% 17%;
/* hsl(216 34% 17%) */ --radius: 0.5rem;
-accent-foreground: 210 40% 98%;
/* hsl(210 40% 98%) */ --round-btn-shadow: #00000063;
-destructive: 0 63% 31%;
/* hsl(0 63% 31%) */ --success-background: #022c22;
-destructive-foreground: 210 40% 98%; --success-foreground: #ecfdf5;
/* hsl(210 40% 98%) */
-ring: 216 34% 17%; --error-foreground: #fef2f2;
/* hsl(216 34% 17%) */ --error-background: #450a0a;
-radius: 0.5rem;
} --info-foreground: #eff6ff;
--info-background: #172554;
--high-indigo: #4338ca;
--medium-indigo: #6366f1;
/* Colors that are shared in dark and light mode */
--blur-shared: #151923d2;
--build-trigger: #dc735b;
--chat-trigger: #5c8be1;
--status-red: #ef4444;
--status-yellow: #eab308;
--status-green: #4ade80;
--status-blue: #2563eb;
}}
@layer base { @layer base {
* { * {

View file

@ -87,10 +87,7 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
<DialogHeader> <DialogHeader>
<DialogTitle className="flex items-center"> <DialogTitle className="flex items-center">
<span className="pr-2">Code</span> <span className="pr-2">Code</span>
<Code2 <Code2 className="h-6 w-6 text-primary pl-1 " aria-hidden="true" />
className="h-6 w-6 text-gray-800 pl-1 dark:text-white"
aria-hidden="true"
/>
</DialogTitle> </DialogTitle>
<DialogDescription>{EXPORT_CODE_DIALOG}</DialogDescription> <DialogDescription>{EXPORT_CODE_DIALOG}</DialogDescription>
</DialogHeader> </DialogHeader>
@ -103,12 +100,14 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
<div className="flex items-center justify-between px-2"> <div className="flex items-center justify-between px-2">
<TabsList> <TabsList>
{tabs.map((tab, index) => ( {tabs.map((tab, index) => (
<TabsTrigger key={index} value={index.toString()}>{tab.name}</TabsTrigger> <TabsTrigger key={index} value={index.toString()}>
{tab.name}
</TabsTrigger>
))} ))}
</TabsList> </TabsList>
<div className="float-right"> <div className="float-right">
<button <button
className="flex gap-1.5 items-center rounded bg-none p-1 text-xs text-gray-500 dark:text-gray-300" className="flex gap-1.5 items-center rounded bg-none p-1 text-xs text-ring "
onClick={copyToClipboard} onClick={copyToClipboard}
> >
{isCopied ? <Check size={18} /> : <Clipboard size={15} />} {isCopied ? <Check size={18} /> : <Clipboard size={15} />}

View file

@ -79,7 +79,7 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) {
} }
return ( return (
<Dialog open={true} onOpenChange={setModalOpen} > <Dialog open={true} onOpenChange={setModalOpen}>
<DialogTrigger asChild></DialogTrigger> <DialogTrigger asChild></DialogTrigger>
<DialogContent className="lg:max-w-[700px] "> <DialogContent className="lg:max-w-[700px] ">
<DialogHeader> <DialogHeader>
@ -90,8 +90,8 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) {
<DialogDescription> <DialogDescription>
{data.node?.description} {data.node?.description}
<div className="flex pt-4"> <div className="flex pt-4">
<Variable className="w-5 h-5 pe-1 text-gray-700 stroke-2 dark:text-slate-200"></Variable> <Variable className="w-5 h-5 pe-1 text-muted-foreground stroke-2 "></Variable>
<span className="text-sm font-semibold text-gray-800 dark:text-white"> <span className="text-sm font-semibold text-primary ">
Parameters Parameters
</span> </span>
</div> </div>
@ -101,7 +101,7 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) {
<div className="flex w-full max-h-[350px] h-fit"> <div className="flex w-full max-h-[350px] h-fit">
<div <div
className={classNames( className={classNames(
"w-full rounded-lg bg-white dark:bg-gray-800 border-[1px] border-gray-200", "w-full rounded-lg bg-background border-[1px] border-input",
nodeLength > limitScrollFieldsModal nodeLength > limitScrollFieldsModal
? "overflow-scroll overflow-x-hidden custom-scroll" ? "overflow-scroll overflow-x-hidden custom-scroll"
: "overflow-hidden" : "overflow-hidden"
@ -110,8 +110,8 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) {
{nodeLength > 0 && ( {nodeLength > 0 && (
<div className="flex flex-col gap-5 h-fit"> <div className="flex flex-col gap-5 h-fit">
<Table className="table-fixed bg-muted outline-1"> <Table className="table-fixed bg-muted outline-1">
<TableHeader className="border-gray-200 text-gray-500 text-xs font-medium h-10"> <TableHeader className="border-input text-ring text-xs font-medium h-10">
<TableRow className="dark:border-b-muted"> <TableRow className="">
<TableHead className="h-7 text-center">PARAM</TableHead> <TableHead className="h-7 text-center">PARAM</TableHead>
<TableHead className="p-0 h-7 text-center"> <TableHead className="p-0 h-7 text-center">
VALUE VALUE
@ -134,13 +134,13 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) {
data.node.template[t].type === "int") data.node.template[t].type === "int")
) )
.map((n, i) => ( .map((n, i) => (
<TableRow key={i} className="h-10 dark:border-b-muted"> <TableRow key={i} className="h-10 ">
<TableCell className="p-0 text-center text-gray-900 dark:text-gray-300 text-sm"> <TableCell className="p-0 text-center text-foreground text-sm">
{data.node.template[n].name {data.node.template[n].name
? data.node.template[n].name ? data.node.template[n].name
: data.node.template[n].display_name} : data.node.template[n].display_name}
</TableCell> </TableCell>
<TableCell className="p-0 text-center text-gray-900 text-xs w-[300px] dark:text-gray-300"> <TableCell className="p-0 text-center text-foreground text-xs w-[300px] ">
{data.node.template[n].type === "str" && {data.node.template[n].type === "str" &&
!data.node.template[n].options ? ( !data.node.template[n].options ? (
<div className="mx-auto"> <div className="mx-auto">

View file

@ -52,8 +52,8 @@ export default function ModalField({
> >
{display && ( {display && (
<div> <div>
<span className="mx-2 dark:text-gray-300">{title}</span> <span className="mx-2">{title}</span>
<span className="text-red-600">{required ? " *" : ""}</span> <span className="text-destructive">{required ? " *" : ""}</span>
</div> </div>
)} )}

View file

@ -46,7 +46,7 @@ export default function NodeModal({ data }: { data: NodeDataType }) {
leaveFrom="opacity-100" leaveFrom="opacity-100"
leaveTo="opacity-0" leaveTo="opacity-0"
> >
<div className="fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" /> <div className="fixed inset-0 bg-ring bg-opacity-75 transition-opacity" />
</Transition.Child> </Transition.Child>
<div className="fixed inset-0 z-10 overflow-y-auto"> <div className="fixed inset-0 z-10 overflow-y-auto">
@ -60,11 +60,11 @@ export default function NodeModal({ data }: { data: NodeDataType }) {
leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveFrom="opacity-100 translate-y-0 sm:scale-100"
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
> >
<Dialog.Panel className="relative flex flex-col justify-between transform h-[600px] overflow-hidden rounded-lg bg-white dark:bg-gray-800 text-left shadow-xl transition-all sm:my-8 w-[700px]"> <Dialog.Panel className="relative flex flex-col justify-between transform h-[600px] overflow-hidden rounded-lg bg-background text-left shadow-xl transition-all sm:my-8 w-[700px]">
<div className=" z-50 absolute top-0 right-0 hidden pt-4 pr-4 sm:block"> <div className=" z-50 absolute top-0 right-0 hidden pt-4 pr-4 sm:block">
<button <button
type="button" type="button"
className="rounded-md text-gray-400 hover:text-gray-500" className="rounded-md text-ring hover:text-ring"
onClick={() => { onClick={() => {
setModalOpen(false); setModalOpen(false);
}} }}
@ -76,6 +76,7 @@ export default function NodeModal({ data }: { data: NodeDataType }) {
<div className="h-full w-full flex flex-col justify-center items-center"> <div className="h-full w-full flex flex-col justify-center items-center">
<div className="flex w-full pb-4 z-10 justify-center shadow-sm"> <div className="flex w-full pb-4 z-10 justify-center shadow-sm">
<Icon <Icon
strokeWidth={1.5}
className="w-10 mt-4 h-10 p-1 rounded" className="w-10 mt-4 h-10 p-1 rounded"
style={{ style={{
color: color:
@ -85,17 +86,17 @@ export default function NodeModal({ data }: { data: NodeDataType }) {
<div className="mt-4 text-center sm:ml-4 sm:text-left"> <div className="mt-4 text-center sm:ml-4 sm:text-left">
<Dialog.Title <Dialog.Title
as="h3" as="h3"
className="text-lg font-medium dark:text-white leading-10 text-gray-900" className="text-lg font-medium leading-10 text-foreground"
> >
{data.type} {data.type}
</Dialog.Title> </Dialog.Title>
</div> </div>
</div> </div>
<div className="h-full w-full bg-gray-200 dark:bg-gray-900 p-4 gap-4 flex flex-row justify-center items-center"> <div className="h-full w-full bg-input p-4 gap-4 flex flex-row justify-center items-center">
<div className="flex w-full h-[445px]"> <div className="flex w-full h-[445px]">
<div <div
className={classNames( className={classNames(
"px-4 sm:p-4 w-full rounded-lg bg-white dark:bg-gray-800 shadow", "px-4 sm:p-4 w-full rounded-lg bg-background shadow",
Object.keys(data.node.template).filter( Object.keys(data.node.template).filter(
(t) => (t) =>
t.charAt(0) !== "_" && t.charAt(0) !== "_" &&
@ -144,10 +145,10 @@ export default function NodeModal({ data }: { data: NodeDataType }) {
</div> </div>
</div> </div>
</div> </div>
<div className="bg-gray-200 dark:bg-gray-900 w-full pb-3 flex flex-row-reverse px-4"> <div className="bg-input w-full pb-3 flex flex-row-reverse px-4">
<button <button
type="button" type="button"
className="inline-flex w-full justify-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:ring-offset-1 sm:ml-3 sm:w-auto sm:text-sm" className="inline-flex w-full justify-center rounded-md border border-transparent bg-status-red px-4 py-2 text-base font-medium text-background shadow-sm hover:bg-ring focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1 sm:ml-3 sm:w-auto sm:text-sm"
onClick={() => { onClick={() => {
setModalOpen(false); setModalOpen(false);
}} }}

View file

@ -51,9 +51,9 @@ export default function ChatInput({
}} }}
className={classNames( className={classNames(
lockChat lockChat
? " bg-input text-black dark:bg-gray-700 dark:text-gray-300" ? " bg-input text-foreground "
: " bg-white-200 text-black dark:bg-gray-900 dark:text-gray-300", : " bg-background text-foreground ",
"form-input block w-full custom-scroll rounded-md border-gray-300 dark:border-gray-600 pr-10 sm:text-sm" + "form-input block w-full custom-scroll rounded-md border-ring pr-10 sm:text-sm" +
INPUT_STYLE INPUT_STYLE
)} )}
placeholder={"Send a message..."} placeholder={"Send a message..."}
@ -62,12 +62,12 @@ export default function ChatInput({
<button disabled={lockChat} onClick={() => sendMessage()}> <button disabled={lockChat} onClick={() => sendMessage()}>
{lockChat ? ( {lockChat ? (
<Lock <Lock
className="h-5 w-5 text-gray-500 dark:hover:text-gray-300 animate-pulse" className="h-5 w-5 text-ring animate-pulse"
aria-hidden="true" aria-hidden="true"
/> />
) : ( ) : (
<Send <Send
className="h-5 w-5 text-gray-500 hover:text-gray-600 dark:hover:text-gray-300" className="h-5 w-5 text-ring hover:text-muted-foreground "
aria-hidden="true" aria-hidden="true"
/> />
)} )}

View file

@ -49,18 +49,18 @@ export const CodeBlock: FC<Props> = memo(({ language, value }) => {
return ( return (
<div className="codeblock font-sans text-[16px]"> <div className="codeblock font-sans text-[16px]">
<div className="flex items-center justify-between py-1.5 px-4"> <div className="flex items-center justify-between py-1.5 px-4">
<span className="text-xs lowercase text-white">{language}</span> <span className="text-xs lowercase text-background">{language}</span>
<div className="flex items-center"> <div className="flex items-center">
<button <button
className="flex gap-1.5 items-center rounded bg-none p-1 text-xs text-white" className="flex gap-1.5 items-center rounded bg-none p-1 text-xs text-background"
onClick={copyToClipboard} onClick={copyToClipboard}
> >
{isCopied ? <IconCheck size={18} /> : <IconClipboard size={18} />} {isCopied ? <IconCheck size={18} /> : <IconClipboard size={18} />}
{isCopied ? "Copied!" : "Copy code"} {isCopied ? "Copied!" : "Copy code"}
</button> </button>
<button <button
className="flex items-center rounded bg-none p-1 text-xs text-white" className="flex items-center rounded bg-none p-1 text-xs text-background"
onClick={downloadAsFile} onClick={downloadAsFile}
> >
<IconDownload size={18} /> <IconDownload size={18} />

View file

@ -32,9 +32,7 @@ export default function ChatMessage({
<div <div
className={classNames( className={classNames(
"w-full py-2 pl-2 flex", "w-full py-2 pl-2 flex",
chat.isSend chat.isSend ? "bg-background " : "bg-input"
? "bg-background dark:bg-gray-900 "
: "bg-input dark:bg-gray-800"
)} )}
> >
<div <div
@ -60,26 +58,24 @@ export default function ChatMessage({
/> />
</div> </div>
)} )}
{chat.isSend && ( {chat.isSend && <User2 className="w-6 h-6 -mb-1 text-primary " />}
<User2 className="w-6 h-6 -mb-1 text-gray-800 dark:text-gray-200" />
)}
</div> </div>
{!chat.isSend ? ( {!chat.isSend ? (
<div className="w-full text-start flex items-center"> <div className="w-full text-start flex items-center">
<div className="w-full relative text-start inline-block text-gray-600 dark:text-gray-300 text-sm font-normal"> <div className="w-full relative text-start inline-block text-muted-foreground text-sm font-normal">
{hidden && chat.thought && chat.thought !== "" && ( {hidden && chat.thought && chat.thought !== "" && (
<div <div
onClick={() => setHidden((prev) => !prev)} onClick={() => setHidden((prev) => !prev)}
className="absolute -top-1 -left-2 cursor-pointer" className="absolute -top-1 -left-2 cursor-pointer"
> >
<MessageCircle className="w-5 h-5 animate-bounce dark:text-white" /> <MessageCircle className="w-5 h-5 animate-bounce " />
</div> </div>
)} )}
{chat.thought && chat.thought !== "" && !hidden && ( {chat.thought && chat.thought !== "" && !hidden && (
<div <div
onClick={() => setHidden((prev) => !prev)} onClick={() => setHidden((prev) => !prev)}
className=" text-start inline-block rounded-md text-gray-600 dark:text-gray-200 h-full border border-gray-300 dark:border-gray-500 className=" text-start inline-block rounded-md text-muted-foreground h-full border border-ring
bg-muted dark:bg-gray-800 w-[95%] pb-3 pt-3 px-2 ml-3 cursor-pointer scrollbar-hide overflow-scroll" bg-muted w-[95%] pb-3 pt-3 px-2 ml-3 cursor-pointer scrollbar-hide overflow-scroll"
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: convert.toHtml(chat.thought), __html: convert.toHtml(chat.thought),
}} }}
@ -87,12 +83,12 @@ export default function ChatMessage({
)} )}
{chat.thought && chat.thought !== "" && !hidden && <br></br>} {chat.thought && chat.thought !== "" && !hidden && <br></br>}
<div className="w-full px-4 pb-3 pt-3 pr-8"> <div className="w-full px-4 pb-3 pt-3 pr-8">
<div className="dark:text-white w-full"> <div className="w-full">
<div className="w-full"> <div className="w-full">
<ReactMarkdown <ReactMarkdown
remarkPlugins={[remarkGfm, remarkMath]} remarkPlugins={[remarkGfm, remarkMath]}
rehypePlugins={[rehypeMathjax]} rehypePlugins={[rehypeMathjax]}
className="markdown prose dark:prose-invert text-gray-600 dark:text-gray-200" className="markdown prose text-muted-foreground "
components={{ components={{
code({ node, inline, className, children, ...props }) { code({ node, inline, className, children, ...props }) {
if (children.length) { if (children.length) {
@ -151,9 +147,9 @@ export default function ChatMessage({
</div> </div>
) : ( ) : (
<div className="w-full flex items-center"> <div className="w-full flex items-center">
<div className="text-start inline-block px-3 text-gray-600 dark:text-white"> <div className="text-start inline-block px-3 text-muted-foreground ">
<span <span
className="text-gray-600 dark:text-gray-200" className="text-muted-foreground "
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: message.replace(/\n/g, "<br>"), __html: message.replace(/\n/g, "<br>"),
}} }}

View file

@ -37,12 +37,9 @@ export default function FileCard({ fileName, content, fileType }) {
/> />
{isHovered && ( {isHovered && (
<div <div
className={`absolute top-0 right-0 bg-muted text-gray-700 rounded-bl-lg px-1 text-sm font-bold dark:bg-gray-700 dark:text-gray-300`} className={`absolute top-0 right-0 bg-muted text-foreground rounded-bl-lg px-1 text-sm font-bold `}
> >
<button <button className="text-ring py-1 px-2 " onClick={handleDownload}>
className="text-gray-500 py-1 px-2 dark:bg-gray-700 dark:text-gray-300"
onClick={handleDownload}
>
<DownloadCloud className="hover:scale-110 w-5 h-5 text-current" /> <DownloadCloud className="hover:scale-110 w-5 h-5 text-current" />
</button> </button>
</div> </div>
@ -54,7 +51,7 @@ export default function FileCard({ fileName, content, fileType }) {
return ( return (
<button <button
onClick={handleDownload} onClick={handleDownload}
className="bg-muted shadow rounded w-1/2 text-gray-700 hover:drop-shadow-lg px-2 py-2 flex justify-between items-center border border-gray-300" className="bg-muted shadow rounded w-1/2 text-foreground hover:drop-shadow-lg px-2 py-2 flex justify-between items-center border border-ring"
> >
<div className="flex gap-2 text-current items-center w-full mr-2"> <div className="flex gap-2 text-current items-center w-full mr-2">
{" "} {" "}
@ -70,7 +67,7 @@ export default function FileCard({ fileName, content, fileType }) {
<div className="flex flex-col items-start"> <div className="flex flex-col items-start">
{" "} {" "}
<div className="truncate text-sm text-current">{fileName}</div> <div className="truncate text-sm text-current">{fileName}</div>
<div className="truncate text-xs text-gray-500">{fileType}</div> <div className="truncate text-xs text-ring">{fileType}</div>
</div> </div>
<DownloadCloud className="w-6 h-6 text-current ml-auto" /> <DownloadCloud className="w-6 h-6 text-current ml-auto" />
</div> </div>

View file

@ -330,7 +330,7 @@ export default function ChatModal({
leaveFrom="opacity-100" leaveFrom="opacity-100"
leaveTo="opacity-0" leaveTo="opacity-0"
> >
<div className="fixed inset-0 bg-black backdrop-blur-sm dark:bg-gray-600 dark:bg-opacity-80 bg-opacity-80 transition-opacity" /> <div className="fixed inset-0 bg-black backdrop-blur-sm bg-opacity-80 transition-opacity" />
</Transition.Child> </Transition.Child>
<div className="fixed inset-0 z-10 overflow-y-auto"> <div className="fixed inset-0 z-10 overflow-y-auto">
@ -344,24 +344,24 @@ export default function ChatModal({
leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveFrom="opacity-100 translate-y-0 sm:scale-100"
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
> >
<Dialog.Panel className=" drop-shadow-2xl relative flex flex-col justify-between transform h-[95%] overflow-hidden rounded-lg bg-white dark:bg-gray-800 text-left shadow-xl transition-all w-[690px]"> <Dialog.Panel className=" drop-shadow-2xl relative flex flex-col justify-between transform h-[95%] overflow-hidden rounded-lg bg-background text-left shadow-xl transition-all w-[690px]">
<div className="relative w-full p-4"> <div className="relative w-full p-4">
<button <button
onClick={() => clearChat()} onClick={() => clearChat()}
className="absolute top-2 right-10 hover:text-red-500 text-gray-600 dark:text-gray-300 dark:hover:text-red-500 z-30" className="absolute top-2 right-10 hover:text-status-red text-muted-foreground z-30"
> >
<Eraser className="w-4 h-4" /> <Eraser className="w-4 h-4" />
</button> </button>
<button <button
onClick={() => setModalOpen(false)} onClick={() => setModalOpen(false)}
className="absolute top-1.5 right-2 hover:text-red-500 text-gray-600 dark:text-gray-300 dark:hover:text-red-500 z-30" className="absolute top-1.5 right-2 hover:text-status-red text-muted-foreground z-30"
> >
<X className="w-5 h-5" /> <X className="w-5 h-5" />
</button> </button>
</div> </div>
<div <div
ref={messagesRef} ref={messagesRef}
className="w-full h-full bg-white dark:bg-gray-800 border-t dark:border-t-gray-600 flex-col flex items-center overflow-scroll scrollbar-hide" className="w-full h-full bg-background border-t flex-col flex items-center overflow-scroll scrollbar-hide"
> >
{chatHistory.length > 0 ? ( {chatHistory.length > 0 ? (
chatHistory.map((c, i) => ( chatHistory.map((c, i) => (
@ -376,13 +376,13 @@ export default function ChatModal({
<div className="flex flex-col h-full text-center justify-center w-full items-center align-middle"> <div className="flex flex-col h-full text-center justify-center w-full items-center align-middle">
<span> <span>
👋{" "} 👋{" "}
<span className="text-gray-600 dark:text-gray-300 text-lg"> <span className="text-muted-foreground text-lg">
LangFlow Chat LangFlow Chat
</span> </span>
</span> </span>
<br /> <br />
<div className="bg-muted dark:bg-gray-900 rounded-md w-2/4 px-6 py-8 border border-gray-200 dark:border-gray-700"> <div className="bg-muted rounded-md w-2/4 px-6 py-8 border border-input">
<span className="text-base text-gray-500"> <span className="text-base text-ring">
Start a conversation and click the agent’s thoughts{" "} Start a conversation and click the agent’s thoughts{" "}
<span> <span>
<MessagesSquare className="w-5 h-5 inline animate-bounce mx-1 " /> <MessagesSquare className="w-5 h-5 inline animate-bounce mx-1 " />
@ -394,7 +394,7 @@ export default function ChatModal({
)} )}
<div ref={ref}></div> <div ref={ref}></div>
</div> </div>
<div className="w-full bg-white dark:bg-gray-800 border-t dark:border-t-gray-600 flex-col flex items-center justify-between p-3"> <div className="w-full bg-background border-t flex-col flex items-center justify-between p-3">
<div className="relative w-full mt-1 rounded-md shadow-sm"> <div className="relative w-full mt-1 rounded-md shadow-sm">
<ChatInput <ChatInput
chatValue={chatValue} chatValue={chatValue}

View file

@ -52,7 +52,7 @@ export default function CodeAreaModal({
<DialogTitle className="flex items-center"> <DialogTitle className="flex items-center">
<span className="pr-2">Edit Code</span> <span className="pr-2">Edit Code</span>
<TerminalSquare <TerminalSquare
className="h-6 w-6 text-gray-800 pl-1 dark:text-white" className="h-6 w-6 text-primary pl-1 "
aria-hidden="true" aria-hidden="true"
/> />
</DialogTitle> </DialogTitle>
@ -73,7 +73,7 @@ export default function CodeAreaModal({
onChange={(value) => { onChange={(value) => {
setCode(value); setCode(value);
}} }}
className="w-full rounded-lg h-[300px] custom-scroll border-[1px] border-gray-300 dark:border-gray-600" className="w-full rounded-lg h-[300px] custom-scroll border-[1px] border-ring "
/> />
</div> </div>

View file

@ -46,7 +46,7 @@ export default function ExportModal() {
<DialogTitle className="flex items-center"> <DialogTitle className="flex items-center">
<span className="pr-2">Export</span> <span className="pr-2">Export</span>
<Download <Download
className="h-6 w-6 text-gray-800 pl-1 dark:text-white" className="h-6 w-6 text-foreground pl-1"
aria-hidden="true" aria-hidden="true"
/> />
</DialogTitle> </DialogTitle>

View file

@ -52,7 +52,7 @@ export default function FlowSettingsModal() {
<DialogHeader> <DialogHeader>
<DialogTitle className="flex items-center"> <DialogTitle className="flex items-center">
<span className="pr-2">Settings </span> <span className="pr-2">Settings </span>
<Settings2 className="w-4 h-4 mr-2 dark:text-gray-300" /> <Settings2 className="w-4 h-4 mr-2 " />
</DialogTitle> </DialogTitle>
<DialogDescription>{SETTINGS_DIALOG_SUBTITLE}</DialogDescription> <DialogDescription>{SETTINGS_DIALOG_SUBTITLE}</DialogDescription>
</DialogHeader> </DialogHeader>

View file

@ -55,7 +55,7 @@ export default function GenericModal({
<DialogTitle className="flex items-center"> <DialogTitle className="flex items-center">
<span className="pr-2">{myModalTitle}</span> <span className="pr-2">{myModalTitle}</span>
<FileText <FileText
className="h-6 w-6 text-gray-800 pl-1 dark:text-white" className="h-6 w-6 text-primary pl-1 "
aria-hidden="true" aria-hidden="true"
/> />
</DialogTitle> </DialogTitle>
@ -78,7 +78,7 @@ export default function GenericModal({
<div className="flex h-full w-full mt-2"> <div className="flex h-full w-full mt-2">
<Textarea <Textarea
ref={ref} ref={ref}
className="form-input h-[300px] w-full rounded-lg border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-white focus-visible:ring-1" className="form-input h-[300px] w-full rounded-lg border-ring focus-visible:ring-1"
value={myValue} value={myValue}
onChange={(e) => { onChange={(e) => {
setMyValue(e.target.value); setMyValue(e.target.value);

View file

@ -77,7 +77,7 @@ export default function ButtonBox({
<button disabled={deactivate} onClick={onClick}> <button disabled={deactivate} onClick={onClick}>
<div <div
className={classNames( className={classNames(
"flex flex-col justify-center items-center rounded-lg text-center shadow border border-gray-300 dark:border-gray-800 hover:shadow-lg transform hover:scale-105", "flex flex-col justify-center items-center rounded-lg text-center shadow border border-ring hover:shadow-lg transform hover:scale-105",
bgColor, bgColor,
height, height,
width, width,
@ -85,10 +85,10 @@ export default function ButtonBox({
)} )}
> >
<div <div
className={`flex items-center justify-center ${bigCircle} bg-white/30 dark:bg-white/30 rounded-full mb-1`} className={`flex items-center justify-center ${bigCircle} bg-background/30 rounded-full mb-1`}
> >
<div <div
className={`flex items-center justify-center ${smallCircle} bg-white dark:bg-white/80 rounded-full`} className={`flex items-center justify-center ${smallCircle} bg-background rounded-full`}
> >
<div className={textColor}>{icon}</div> <div className={textColor}>{icon}</div>
</div> </div>
@ -96,7 +96,7 @@ export default function ButtonBox({
<div className="w-full mt-auto mb-auto"> <div className="w-full mt-auto mb-auto">
<h3 <h3
className={classNames( className={classNames(
"w-full font-semibold break-words text-white dark:text-white/80 truncate-multiline", "w-full font-semibold break-words text-background truncate-multiline",
titleFontSize, titleFontSize,
marginTop marginTop
)} )}

View file

@ -85,7 +85,7 @@ export default function ImportModal() {
}} }}
> >
<ArrowLeftIcon <ArrowLeftIcon
className="h-5 w-5 text-gray-800 ml-1 dark:text-white" className="h-5 w-5 text-foreground ml-1"
aria-hidden="true" aria-hidden="true"
/> />
</button> </button>
@ -97,7 +97,7 @@ export default function ImportModal() {
{showExamples ? "Select an example" : "Import"} {showExamples ? "Select an example" : "Import"}
</span> </span>
<ArrowUpTrayIcon <ArrowUpTrayIcon
className="h-5 w-5 text-gray-800 ml-1 dark:text-white" className="h-5 w-5 text-foreground ml-1"
aria-hidden="true" aria-hidden="true"
/> />
</DialogTitle> </DialogTitle>
@ -106,7 +106,7 @@ export default function ImportModal() {
<div <div
className={classNames( className={classNames(
"h-full w-full dark:bg-gray-900 overflow-y-auto scrollbar-hide", "h-full w-full overflow-y-auto scrollbar-hide",
showExamples && !loadingExamples showExamples && !loadingExamples
? "flex flex-row start justify-center items-start flex-wrap overflow-auto mx-auto" ? "flex flex-row start justify-center items-start flex-wrap overflow-auto mx-auto"
: "flex flex-row justify-center items-center" : "flex flex-row justify-center items-center"
@ -116,7 +116,7 @@ export default function ImportModal() {
<div className="flex h-full w-full justify-evenly items-center"> <div className="flex h-full w-full justify-evenly items-center">
<ButtonBox <ButtonBox
size="big" size="big"
bgColor="bg-emerald-500 dark:bg-emerald-500/75" bgColor="bg-medium-emerald "
description="Prebuilt Examples" description="Prebuilt Examples"
icon={ icon={
<DocumentDuplicateIcon className="h-10 w-10 flex-shrink-0" /> <DocumentDuplicateIcon className="h-10 w-10 flex-shrink-0" />
@ -125,12 +125,12 @@ export default function ImportModal() {
setShowExamples(true); setShowExamples(true);
handleExamples(); handleExamples();
}} }}
textColor="text-emerald-500 dark:text-emerald-500/75" textColor="text-medium-emerald "
title="Examples" title="Examples"
></ButtonBox> ></ButtonBox>
<ButtonBox <ButtonBox
size="big" size="big"
bgColor="bg-blue-500 dark:bg-blue-500/75" bgColor="bg-almost-dark-blue "
description="Import from Local" description="Import from Local"
icon={ icon={
<ComputerDesktopIcon className="h-10 w-10 flex-shrink-0" /> <ComputerDesktopIcon className="h-10 w-10 flex-shrink-0" />
@ -139,7 +139,7 @@ export default function ImportModal() {
uploadFlow(); uploadFlow();
setModalOpen(false); setModalOpen(false);
}} }}
textColor="text-blue-500 dark:text-blue-500/75" textColor="text-almost-dark-blue "
title="Local File" title="Local File"
></ButtonBox> ></ButtonBox>
</div> </div>
@ -157,7 +157,7 @@ export default function ImportModal() {
{" "} {" "}
<ButtonBox <ButtonBox
size="small" size="small"
bgColor="bg-emerald-500 dark:bg-emerald-500/75" bgColor="bg-medium-emerald "
description={example.description ?? "Prebuilt Examples"} description={example.description ?? "Prebuilt Examples"}
icon={ icon={
<DocumentDuplicateIcon className="h-6 w-6 flex-shrink-0" /> <DocumentDuplicateIcon className="h-6 w-6 flex-shrink-0" />
@ -166,7 +166,7 @@ export default function ImportModal() {
addFlow(example, false); addFlow(example, false);
setModalOpen(false); setModalOpen(false);
}} }}
textColor="text-emerald-500 dark:text-emerald-500/75" textColor="text-medium-emerald "
title={example.name} title={example.name}
></ButtonBox> ></ButtonBox>
</div> </div>
@ -179,7 +179,7 @@ export default function ImportModal() {
<a <a
href="https://github.com/logspace-ai/langflow_examples" href="https://github.com/logspace-ai/langflow_examples"
target="_blank" target="_blank"
className="flex items-center justify-center text-gray-600 dark:text-gray-300" className="flex items-center justify-center text-muted-foreground "
rel="noreferrer" rel="noreferrer"
> >
<svg <svg

View file

@ -43,7 +43,7 @@ export default function PromptAreaModal({
leaveFrom="opacity-100" leaveFrom="opacity-100"
leaveTo="opacity-0" leaveTo="opacity-0"
> >
<div className="fixed inset-0 bg-ring dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" /> <div className="fixed inset-0 bg-ring bg-opacity-75 transition-opacity" />
</Transition.Child> </Transition.Child>
<div className="fixed inset-0 z-10 overflow-y-auto"> <div className="fixed inset-0 z-10 overflow-y-auto">
@ -57,11 +57,11 @@ export default function PromptAreaModal({
leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveFrom="opacity-100 translate-y-0 sm:scale-100"
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
> >
<Dialog.Panel className="relative flex flex-col justify-between transform h-[600px] overflow-hidden rounded-lg bg-white dark:bg-gray-800 text-left shadow-xl transition-all sm:my-8 w-[700px]"> <Dialog.Panel className="relative flex flex-col justify-between transform h-[600px] overflow-hidden rounded-lg bg-background text-left shadow-xl transition-all sm:my-8 w-[700px]">
<div className=" z-50 absolute top-0 right-0 hidden pt-4 pr-4 sm:block"> <div className=" z-50 absolute top-0 right-0 hidden pt-4 pr-4 sm:block">
<button <button
type="button" type="button"
className="rounded-md text-gray-400 hover:text-gray-500" className="rounded-md text-ring hover:text-ring"
onClick={() => { onClick={() => {
setModalOpen(false); setModalOpen(false);
}} }}
@ -72,27 +72,27 @@ export default function PromptAreaModal({
</div> </div>
<div className="h-full w-full flex flex-col justify-center items-center"> <div className="h-full w-full flex flex-col justify-center items-center">
<div className="flex w-full pb-4 z-10 justify-center shadow-sm"> <div className="flex w-full pb-4 z-10 justify-center shadow-sm">
<div className="mx-auto mt-4 flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-blue-100 dark:bg-gray-900 sm:mx-0 sm:h-10 sm:w-10"> <div className="mx-auto mt-4 flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-almost-light-blue sm:mx-0 sm:h-10 sm:w-10">
<DocumentTextIcon <DocumentTextIcon
className="h-6 w-6 text-blue-600" className="h-6 w-6 text-almost-medium-blue"
aria-hidden="true" aria-hidden="true"
/> />
</div> </div>
<div className="mt-4 text-center sm:ml-4 sm:text-left"> <div className="mt-4 text-center sm:ml-4 sm:text-left">
<Dialog.Title <Dialog.Title
as="h3" as="h3"
className="text-lg font-medium dark:text-white leading-10 text-gray-900" className="text-lg font-medium leading-10 text-foreground"
> >
Edit Prompt Edit Prompt
</Dialog.Title> </Dialog.Title>
</div> </div>
</div> </div>
<div className="h-full w-full bg-accent overflow-auto dark:bg-gray-900 p-4 gap-4 flex flex-row justify-center items-center"> <div className="h-full w-full bg-accent overflow-auto p-4 gap-4 flex flex-row justify-center items-center">
<div className="flex h-full w-full"> <div className="flex h-full w-full">
<div className="overflow-hidden px-4 py-5 sm:p-6 w-full h-full rounded-lg bg-white dark:bg-gray-800 shadow"> <div className="overflow-hidden px-4 py-5 sm:p-6 w-full h-full rounded-lg bg-background shadow">
<textarea <textarea
ref={ref} ref={ref}
className="form-input h-full w-full rounded-lg border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-white" className="form-input h-full w-full rounded-lg border-ring"
value={myValue} value={myValue}
onChange={(e) => { onChange={(e) => {
setMyValue(e.target.value); setMyValue(e.target.value);
@ -102,10 +102,10 @@ export default function PromptAreaModal({
</div> </div>
</div> </div>
</div> </div>
<div className="bg-gray-200 dark:bg-gray-900 w-full pb-3 flex flex-row-reverse px-4"> <div className="bg-input w-full pb-3 flex flex-row-reverse px-4">
<button <button
type="button" type="button"
className="inline-flex w-full justify-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-ring focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:ring-offset-1 sm:ml-3 sm:w-auto sm:text-sm" className="inline-flex w-full justify-center rounded-md border border-transparent px-4 py-2 text-base font-medium text-background shadow-sm hover:bg-ring focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1 sm:ml-3 sm:w-auto sm:text-sm"
onClick={() => { onClick={() => {
checkPrompt(myValue) checkPrompt(myValue)
.then((apiReturn) => { .then((apiReturn) => {

View file

@ -42,7 +42,7 @@ export default function TextAreaModal({
leaveFrom="opacity-100" leaveFrom="opacity-100"
leaveTo="opacity-0" leaveTo="opacity-0"
> >
<div className="fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" /> <div className="fixed inset-0 bg-ring bg-opacity-75 transition-opacity" />
</Transition.Child> </Transition.Child>
<div className="fixed inset-0 z-10 overflow-y-auto"> <div className="fixed inset-0 z-10 overflow-y-auto">
@ -56,11 +56,11 @@ export default function TextAreaModal({
leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveFrom="opacity-100 translate-y-0 sm:scale-100"
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
> >
<Dialog.Panel className="relative flex flex-col justify-between transform h-[600px] overflow-hidden rounded-lg bg-white dark:bg-gray-800 text-left shadow-xl transition-all sm:my-8 w-[700px]"> <Dialog.Panel className="relative flex flex-col justify-between transform h-[600px] overflow-hidden rounded-lg bg-background text-left shadow-xl transition-all sm:my-8 w-[700px]">
<div className=" z-50 absolute top-0 right-0 hidden pt-4 pr-4 sm:block"> <div className=" z-50 absolute top-0 right-0 hidden pt-4 pr-4 sm:block">
<button <button
type="button" type="button"
className="rounded-md text-gray-400 hover:text-gray-500" className="rounded-md text-ring hover:text-ring"
onClick={() => { onClick={() => {
setModalOpen(false); setModalOpen(false);
}} }}
@ -71,27 +71,27 @@ export default function TextAreaModal({
</div> </div>
<div className="h-full w-full flex flex-col justify-center items-center"> <div className="h-full w-full flex flex-col justify-center items-center">
<div className="flex w-full pb-4 z-10 justify-center shadow-sm"> <div className="flex w-full pb-4 z-10 justify-center shadow-sm">
<div className="mx-auto mt-4 flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-blue-100 dark:bg-gray-900 sm:mx-0 sm:h-10 sm:w-10"> <div className="mx-auto mt-4 flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-almost-light-blue sm:mx-0 sm:h-10 sm:w-10">
<ClipboardDocumentListIcon <ClipboardDocumentListIcon
className="h-6 w-6 text-blue-600" className="h-6 w-6 text-almost-medium-blue"
aria-hidden="true" aria-hidden="true"
/> />
</div> </div>
<div className="mt-4 text-center sm:ml-4 sm:text-left"> <div className="mt-4 text-center sm:ml-4 sm:text-left">
<Dialog.Title <Dialog.Title
as="h3" as="h3"
className="text-lg font-medium dark:text-white leading-10 text-gray-900" className="text-lg font-medium leading-10 text-foreground"
> >
Edit text Edit text
</Dialog.Title> </Dialog.Title>
</div> </div>
</div> </div>
<div className="h-full w-full bg-gray-200 dark:bg-gray-900 p-4 gap-4 flex flex-row justify-center items-center"> <div className="h-full w-full bg-input p-4 gap-4 flex flex-row justify-center items-center">
<div className="flex h-full w-full"> <div className="flex h-full w-full">
<div className="overflow-hidden px-4 py-5 sm:p-6 w-full rounded-lg bg-white dark:bg-gray-800 shadow"> <div className="overflow-hidden px-4 py-5 sm:p-6 w-full rounded-lg bg-background shadow">
<textarea <textarea
ref={ref} ref={ref}
className="form-input h-full w-full rounded-lg border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-white" className="form-input h-full w-full rounded-lg border-ring"
value={myValue} value={myValue}
onChange={(e) => { onChange={(e) => {
setMyValue(e.target.value); setMyValue(e.target.value);
@ -101,10 +101,10 @@ export default function TextAreaModal({
</div> </div>
</div> </div>
</div> </div>
<div className="bg-gray-200 dark:bg-gray-900 w-full pb-3 flex flex-row-reverse px-4"> <div className="bg-input w-full pb-3 flex flex-row-reverse px-4">
<button <button
type="button" type="button"
className="inline-flex w-full justify-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:ring-offset-1 sm:ml-3 sm:w-auto sm:text-sm" className="inline-flex w-full justify-center rounded-md border border-transparent px-4 py-2 text-base font-medium text-background shadow-sm hover:bg-ring focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1 sm:ml-3 sm:w-auto sm:text-sm"
onClick={() => { onClick={() => {
setModalOpen(false); setModalOpen(false);
}} }}

View file

@ -11,9 +11,10 @@ const ConnectionLineComponent = ({
<g> <g>
<path <path
fill="none" fill="none"
// ! Replace hash # colors here
stroke="#222" stroke="#222"
strokeWidth={1.5} strokeWidth={1.5}
className="animated dark:stroke-gray-400" className="animated "
d={`M${fromX},${fromY} C ${fromX} ${toY} ${fromX} ${toY} ${toX},${toY}`} d={`M${fromX},${fromY} C ${fromX} ${toY} ${fromX} ${toY} ${toX},${toY}`}
style={connectionLineStyle} style={connectionLineStyle}
/> />
@ -23,7 +24,7 @@ const ConnectionLineComponent = ({
fill="#fff" fill="#fff"
r={3} r={3}
stroke="#222" stroke="#222"
className="dark:stroke-gray-400 dark:fill-gray-800" className=""
strokeWidth={1.5} strokeWidth={1.5}
/> />
</g> </g>

View file

@ -12,10 +12,10 @@ export default function DisclosureComponent({
{({ open }) => ( {({ open }) => (
<> <>
<div> <div>
<Disclosure.Button className="select-none bg-muted dark:bg-gray-700/60 dark:border-y-gray-600 w-full flex justify-between items-center -mt-px px-3 py-2 border-y border-y-gray-200"> <Disclosure.Button className="select-none bg-muted w-full flex justify-between items-center -mt-px px-3 py-2 border-y border-y-input">
<div className="flex gap-4"> <div className="flex gap-4">
<Icon size={22} className="text-gray-800 dark:text-white/80" /> <Icon strokeWidth={1.5} size={22} className="text-primary " />
<span className="flex items-center text-sm text-gray-800 dark:text-white/80 font-medium"> <span className="flex items-center text-sm text-primary">
{title} {title}
</span> </span>
</div> </div>
@ -29,7 +29,7 @@ export default function DisclosureComponent({
<ChevronRight <ChevronRight
className={`${ className={`${
open || openDisc ? "rotate-90 transform" : "" open || openDisc ? "rotate-90 transform" : ""
} h-4 w-4 text-gray-800 dark:text-white`} } h-4 w-4 text-foreground`}
/> />
</div> </div>
</div> </div>

View file

@ -184,8 +184,8 @@ export default function Page({ flow }: { flow: FlowType }) {
style: { stroke: "inherit" }, style: { stroke: "inherit" },
className: className:
params.targetHandle.split("|")[0] === "Text" params.targetHandle.split("|")[0] === "Text"
? "stroke-gray-800 dark:stroke-gray-300" ? "stroke-foreground "
: "stroke-gray-900 dark:stroke-gray-200", : "stroke-foreground ",
animated: params.targetHandle.split("|")[0] === "Text", animated: params.targetHandle.split("|")[0] === "Text",
}, },
eds eds
@ -401,8 +401,11 @@ export default function Page({ flow }: { flow: FlowType }) {
minZoom={0.01} minZoom={0.01}
maxZoom={8} maxZoom={8}
> >
<Background className="dark:bg-gray-900" /> <Background className="" />
<Controls className="[&>button]:text-black [&>button]:dark:bg-gray-800 hover:[&>button]:dark:bg-gray-700 [&>button]:dark:text-gray-400 [&>button]:dark:fill-gray-400 [&>button]:dark:border-gray-600"></Controls> <Controls
className="text-primary stroke-foreground [&>button]:border-b-border hover:[&>button]:bg-border
fill-foreground bg-muted"
></Controls>
</ReactFlow> </ReactFlow>
<Chat flow={flow} reactFlowInstance={reactFlowInstance} /> <Chat flow={flow} reactFlowInstance={reactFlowInstance} />
</div> </div>

View file

@ -64,44 +64,44 @@ export default function ExtraSidebar() {
<div className="mt-2 mb-2 w-full flex gap-2 justify-between px-2 items-center"> <div className="mt-2 mb-2 w-full flex gap-2 justify-between px-2 items-center">
<ShadTooltip delayDuration={1000} content="Import" side="top"> <ShadTooltip delayDuration={1000} content="Import" side="top">
<button <button
className="hover:dark:hover:bg-[#242f47] text-gray-700 w-full justify-center shadow-sm transition-all duration-500 ease-in-out dark:bg-gray-800 dark:text-gray-300 relative inline-flex items-center rounded-md bg-white px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-gray-50" className="text-foreground w-full justify-center shadow-sm transition-all duration-500 ease-in-out relative inline-flex items-center rounded-md bg-background px-2 py-2 ring-1 ring-inset ring-input hover:bg-muted"
onClick={() => { onClick={() => {
// openPopUp(<ImportModal />); // openPopUp(<ImportModal />);
uploadFlow(); uploadFlow();
}} }}
> >
<FileUp className="w-5 h-5 dark:text-gray-300"></FileUp> <FileUp strokeWidth={1.5} className="w-5 h-5 "></FileUp>
</button> </button>
</ShadTooltip> </ShadTooltip>
<ShadTooltip delayDuration={1000} content="Export" side="top"> <ShadTooltip delayDuration={1000} content="Export" side="top">
<button <button
className={classNames( className={classNames(
"hover:dark:hover:bg-[#242f47] text-gray-700 w-full justify-center shadow-sm transition-all duration-500 ease-in-out dark:bg-gray-800 dark:text-gray-300 relative inline-flex items-center bg-white px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 rounded-md" "text-foreground w-full justify-center shadow-sm transition-all duration-500 ease-in-out relative inline-flex items-center bg-background px-2 py-2 ring-1 ring-inset ring-input hover:bg-muted rounded-md"
)} )}
onClick={(event) => { onClick={(event) => {
openPopUp(<ExportModal />); openPopUp(<ExportModal />);
}} }}
> >
<FileDown className="w-5 h-5 dark:text-gray-300"></FileDown> <FileDown strokeWidth={1.5} className="w-5 h-5 "></FileDown>
</button> </button>
</ShadTooltip> </ShadTooltip>
<ShadTooltip delayDuration={1000} content="Code" side="top"> <ShadTooltip delayDuration={1000} content="Code" side="top">
<button <button
className={classNames( className={classNames(
"hover:dark:hover:bg-[#242f47] text-gray-700 w-full justify-center shadow-sm transition-all duration-500 ease-in-out dark:bg-gray-800 dark:text-gray-300 relative inline-flex items-center bg-white px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 rounded-md" "text-foreground w-full justify-center shadow-sm transition-all duration-500 ease-in-out relative inline-flex items-center bg-background px-2 py-2 ring-1 ring-inset ring-input hover:bg-muted rounded-md"
)} )}
onClick={(event) => { onClick={(event) => {
openPopUp(<ApiModal flow={flows.find((f) => f.id === tabId)} />); openPopUp(<ApiModal flow={flows.find((f) => f.id === tabId)} />);
}} }}
> >
<Code2 className="w-5 h-5 dark:text-gray-300"></Code2> <Code2 strokeWidth={1.5} className="w-5 h-5 "></Code2>
</button> </button>
</ShadTooltip> </ShadTooltip>
<ShadTooltip delayDuration={1000} content="Save" side="top"> <ShadTooltip delayDuration={1000} content="Save" side="top">
<button <button
className="hover:dark:hover:bg-[#242f47] text-gray-700 w-full justify-center transition-all shadow-sm duration-500 ease-in-out dark:bg-gray-800 dark:text-gray-300 relative inline-flex items-center bg-white px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 rounded-md" className="text-foreground w-full justify-center transition-all shadow-sm duration-500 ease-in-out relative inline-flex items-center bg-background px-2 py-2 ring-1 ring-inset ring-input hover:bg-muted rounded-md"
onClick={(event) => { onClick={(event) => {
saveFlow(flows.find((f) => f.id === tabId)); saveFlow(flows.find((f) => f.id === tabId));
setSuccessData({ title: "Changes saved successfully" }); setSuccessData({ title: "Changes saved successfully" });
@ -109,6 +109,7 @@ export default function ExtraSidebar() {
disabled={!isPending} disabled={!isPending}
> >
<Save <Save
strokeWidth={1.5}
className={ className={
"w-5 h-5" + (isPending ? " " : " text-muted-foreground") "w-5 h-5" + (isPending ? " " : " text-muted-foreground")
} }
@ -117,7 +118,7 @@ export default function ExtraSidebar() {
</ShadTooltip> </ShadTooltip>
</div> </div>
<Separator /> <Separator />
<div className="relative mt-2 flex items-center mb-2 mx-2"> <div className="relative mt-2 flex items-center mb-2 mx-auto">
<input <input
type="text" type="text"
name="search" name="search"
@ -125,7 +126,7 @@ export default function ExtraSidebar() {
placeholder="Search" placeholder="Search"
className={ className={
INPUT_STYLE + INPUT_STYLE +
"w-full border-1 dark:border-slate-600 dark:border-0.5 dark:ring-0 focus-visible:dark:ring-0 focus-visible:dark:ring-offset-1 rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50" "w-full border-1 rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"
} }
onChange={(e) => { onChange={(e) => {
handleSearchInput(e.target.value); handleSearchInput(e.target.value);
@ -133,7 +134,8 @@ export default function ExtraSidebar() {
}} }}
/> />
<div className="absolute inset-y-0 right-0 flex py-1.5 pr-3 items-center"> <div className="absolute inset-y-0 right-0 flex py-1.5 pr-3 items-center">
<Search size={20} color="#000000" /> {/* ! replace hash color here */}
<Search size={20} strokeWidth={1.5} className="text-primary" />
</div> </div>
</div> </div>
@ -163,7 +165,7 @@ export default function ExtraSidebar() {
<div key={k} data-tooltip-id={t}> <div key={k} data-tooltip-id={t}>
<div <div
draggable draggable
className={" cursor-grab border-l-8 rounded-l-md"} className={"cursor-grab border-l-8 rounded-l-md"}
style={{ style={{
borderLeftColor: borderLeftColor:
nodeColors[d] ?? nodeColors.unknown, nodeColors[d] ?? nodeColors.unknown,
@ -182,11 +184,11 @@ export default function ExtraSidebar() {
); );
}} }}
> >
<div className="flex w-full justify-between text-sm px-3 py-1 bg-white dark:bg-gray-800 items-center border-dashed border-gray-400 dark:border-gray-600 border-l-0 rounded-md rounded-l-none border"> <div className="flex w-full justify-between text-sm px-3 py-1 bg-white items-center border-dashed border-ring border-l-0 rounded-md rounded-l-none border">
<span className="text-black dark:text-white w-full pr-1 truncate text-xs"> <span className="text-foreground w-full pr-1 truncate text-xs">
{data[d][t].display_name} {data[d][t].display_name}
</span> </span>
<Menu className="w-4 h-6 text-gray-400 dark:text-gray-600" /> <Menu className="w-4 h-6 text-ring " />
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,10 +1,11 @@
import { useContext, useState } from "react"; import { useContext, useState } from "react";
import { Settings2, Copy, Trash2 } from "lucide-react"; import { Settings2, Copy, Trash2, Menu } from "lucide-react";
import { classNames } from "../../../../utils"; import { classNames } from "../../../../utils";
import { TabsContext } from "../../../../contexts/tabsContext"; import { TabsContext } from "../../../../contexts/tabsContext";
import { useReactFlow } from "reactflow"; import { useReactFlow } from "reactflow";
import EditNodeModal from "../../../../modals/EditNodeModal"; import EditNodeModal from "../../../../modals/EditNodeModal";
import ShadTooltip from "../../../../components/ShadTooltipComponent"; import ShadTooltip from "../../../../components/ShadTooltipComponent";
import { EllipsisVerticalIcon } from "@heroicons/react/24/outline";
const NodeToolbarComponent = (props) => { const NodeToolbarComponent = (props) => {
const [nodeLength, setNodeLength] = useState( const [nodeLength, setNodeLength] = useState(
@ -31,12 +32,12 @@ const NodeToolbarComponent = (props) => {
<span className="isolate inline-flex rounded-md shadow-sm"> <span className="isolate inline-flex rounded-md shadow-sm">
<ShadTooltip delayDuration={1000} content="Delete" side="top"> <ShadTooltip delayDuration={1000} content="Delete" side="top">
<button <button
className="hover:dark:hover:bg-[#242f47] text-gray-700 transition-all duration-500 ease-in-out dark:bg-gray-800 dark:text-gray-300 shadow-md relative inline-flex items-center rounded-l-md bg-white px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-muted focus:z-10" className="text-foreground transition-all duration-500 ease-in-out shadow-md relative inline-flex items-center rounded-l-md bg-background px-2 py-2 ring-1 ring-inset ring-ring hover:bg-muted focus:z-10"
onClick={() => { onClick={() => {
props.deleteNode(props.data.id); props.deleteNode(props.data.id);
}} }}
> >
<Trash2 className="w-4 h-4 dark:text-gray-300"></Trash2> <Trash2 className="w-4 h-4 "></Trash2>
</button> </button>
</ShadTooltip> </ShadTooltip>
@ -44,8 +45,8 @@ const NodeToolbarComponent = (props) => {
<button <button
className={classNames( className={classNames(
nodeLength > 0 nodeLength > 0
? "hover:dark:hover:bg-[#242f47] text-gray-700 transition-all duration-500 ease-in-out dark:bg-gray-800 dark:text-gray-300 shadow-md relative -ml-px inline-flex items-center bg-white px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-muted focus:z-10" ? "text-foreground transition-all duration-500 ease-in-out shadow-md relative -ml-px inline-flex items-center bg-background px-2 py-2 ring-1 ring-inset ring-ring hover:bg-muted focus:z-10"
: "hover:dark:hover:bg-[#242f47] text-gray-700 transition-all duration-500 ease-in-out dark:bg-gray-800 dark:text-gray-300 shadow-md relative -ml-px inline-flex items-center bg-white px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-muted focus:z-10 rounded-r-md" : "text-foreground transition-all duration-500 ease-in-out shadow-md relative -ml-px inline-flex items-center bg-background px-2 py-2 ring-1 ring-inset ring-ring hover:bg-muted focus:z-10 rounded-r-md"
)} )}
onClick={(event) => { onClick={(event) => {
event.preventDefault(); event.preventDefault();
@ -64,31 +65,30 @@ const NodeToolbarComponent = (props) => {
); );
}} }}
> >
<Copy className="w-4 h-4 dark:text-gray-300"></Copy> <Copy className="w-4 h-4 "></Copy>
</button> </button>
</ShadTooltip> </ShadTooltip>
{nodeLength > 0 && ( {nodeLength > 0 && (
<ShadTooltip delayDuration={1000} content="Edit" side="top"> <ShadTooltip delayDuration={1000} content="Edit" side="top">
<button <button
className="hover:dark:hover:bg-[#242f47] text-gray-700 transition-all duration-500 ease-in-out dark:bg-gray-800 dark:text-gray-300 shadow-md relative -ml-px inline-flex items-center bg-white px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-muted focus:z-10 rounded-r-md" className="text-foreground transition-all duration-500 ease-in-out shadow-md relative -ml-px inline-flex items-center bg-background px-2 py-2 ring-1 ring-inset ring-ring hover:bg-muted focus:z-10 rounded-r-md"
onClick={(event) => { onClick={(event) => {
event.preventDefault(); event.preventDefault();
props.openPopUp(<EditNodeModal data={props.data} />); props.openPopUp(<EditNodeModal data={props.data} />);
}} }}
> >
<Settings2 className="w-4 h-4 dark:text-gray-300"></Settings2> <Settings2 className="w-4 h-4 "></Settings2>
</button> </button>
</ShadTooltip> </ShadTooltip>
)} )}
{/* {/* <Menu as="div" className="relative inline-block text-left z-100">
<Menu as="div" className="relative inline-block text-left z-100"> <button className="text-gray-700 transition-all duration-500 ease-in-out shadow-md relative -ml-px inline-flex items-center bg-background px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-muted focus:z-10 rounded-r-md">
<button className="hover:dark:hover:bg-[#242f47] text-gray-700 transition-all duration-500 ease-in-out dark:bg-gray-800 dark:text-gray-300 shadow-md relative -ml-px inline-flex items-center bg-white px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-muted focus:z-10 rounded-r-md">
<div> <div>
<Menu.Button className="flex items-center"> <Menu.Button className="flex items-center">
<EllipsisVerticalIcon <EllipsisVerticalIcon
className="w-5 h-5 dark:text-gray-300" className="w-5 h-5 "
aria-hidden="true" aria-hidden="true"
/> />
</Menu.Button> </Menu.Button>
@ -103,7 +103,7 @@ const NodeToolbarComponent = (props) => {
leaveFrom="transform opacity-100 scale-100" leaveFrom="transform opacity-100 scale-100"
leaveTo="transform opacity-0 scale-95" leaveTo="transform opacity-0 scale-95"
> >
<Menu.Items className="absolute z-40 mt-2 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none top-[28px]"> <Menu.Items className="absolute z-40 mt-2 w-56 origin-top-right rounded-md bg-background shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none top-[28px]">
<div className="py-1"> <div className="py-1">
<Menu.Item> <Menu.Item>
{({ active }) => ( {({ active }) => (

View file

@ -5,6 +5,7 @@ import { Button } from "../../components/ui/button";
import { Link, useNavigate } from "react-router-dom"; import { Link, useNavigate } from "react-router-dom";
import { CardComponent } from "../../components/cardComponent"; import { CardComponent } from "../../components/cardComponent";
import { USER_PROJECTS_HEADER } from "../../constants"; import { USER_PROJECTS_HEADER } from "../../constants";
import { BUTTON_DIV_STYLE } from "../../constants";
export default function HomePage() { export default function HomePage() {
const { flows, setTabId, downloadFlows, uploadFlows, addFlow, removeFlow } = const { flows, setTabId, downloadFlows, uploadFlows, addFlow, removeFlow } =
useContext(TabsContext); useContext(TabsContext);
@ -19,7 +20,7 @@ export default function HomePage() {
<Home className="w-6" /> <Home className="w-6" />
{USER_PROJECTS_HEADER} {USER_PROJECTS_HEADER}
</span> </span>
<div className="flex gap-2"> <div className={`${BUTTON_DIV_STYLE}`}>
<Button <Button
variant="primary" variant="primary"
onClick={() => { onClick={() => {

View file

@ -383,6 +383,23 @@ export const gradients = [
"bg-gradient-to-br from-green-500 to-green-700", "bg-gradient-to-br from-green-500 to-green-700",
"bg-gradient-to-br from-rose-400 via-fuchsia-500 to-indigo-500", "bg-gradient-to-br from-rose-400 via-fuchsia-500 to-indigo-500",
"bg-gradient-to-br from-sky-400 to-blue-500", "bg-gradient-to-br from-sky-400 to-blue-500",
"bg-gradient-to-br from-green-200 via-green-400 to-green-500",
"bg-gradient-to-br from-red-400 via-gray-300 to-blue-500",
"bg-gradient-to-br from-gray-900 to-gray-600 bg-gradient-to-r",
"bg-gradient-to-br from-rose-500 via-red-400 to-red-500",
"bg-gradient-to-br from-fuchsia-600 to-pink-600",
"bg-gradient-to-br from-emerald-500 to-lime-600",
"bg-gradient-to-br from-rose-500 to-indigo-700",
"bg-gradient-to-br bg-gradient-to-tr from-violet-500 to-orange-300",
"bg-gradient-to-br from-gray-900 via-purple-900 to-violet-600",
"bg-gradient-to-br from-yellow-200 via-red-500 to-fuchsia-500",
"bg-gradient-to-br from-sky-400 to-indigo-900",
"bg-gradient-to-br from-amber-200 via-violet-600 to-sky-900",
"bg-gradient-to-br from-amber-700 via-orange-300 to-rose-800",
"bg-gradient-to-br from-gray-300 via-fuchsia-600 to-orange-600",
"bg-gradient-to-br from-fuchsia-500 via-red-600 to-orange-400",
"bg-gradient-to-br from-sky-400 via-rose-400 to-lime-400",
"bg-gradient-to-br from-lime-600 via-yellow-300 to-red-600",
]; ];
export const bgColors = { export const bgColors = {

View file

@ -3,83 +3,15 @@ const { fontFamily } = require("tailwindcss/defaultTheme");
import plugin from "tailwindcss/plugin"; import plugin from "tailwindcss/plugin";
// ! Check if removing the other module.exports made sense
module.exports = { module.exports = {
darkMode: ["class"], darkMode: ["class"],
content: ["app/**/*.{ts,tsx}", "components/**/*.{ts,tsx}"], content: [
theme: { "app/**/*.{ts,tsx}",
container: { "components/**/*.{ts,tsx}",
center: true, "./index.html",
padding: "2rem", "./src/**/*.{js,ts,tsx,jsx}",
screens: { ],
"2xl": "1400px",
},
},
extend: {
colors: {
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
},
borderRadius: {
lg: `var(--radius)`,
md: `calc(var(--radius) - 2px)`,
sm: "calc(var(--radius) - 4px)",
},
fontFamily: {
sans: ["var(--font-sans)", ...fontFamily.sans],
},
keyframes: {
"accordion-down": {
from: { height: 0 },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: 0 },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [require("tailwindcss-animate")],
};
module.exports = {
content: ["./index.html", "./src/**/*.{js,ts,tsx,jsx}"],
darkMode: "class",
important: true, important: true,
theme: { theme: {
container: { container: {
@ -91,6 +23,46 @@ module.exports = {
}, },
extend: { extend: {
colors: { colors: {
"almost-dark-gray": "var(--almost-dark-gray)",
"almost-light-blue": "var(--almost-light-blue)",
"almost-medium-blue": "var(--almost-medium-blue)",
"almost-medium-gray": "var(--almost-medium-gray)",
"almost-medium-green": "var(--almost-medium-green)",
"almost-medium-red": "var(--almost-medium-red)",
"btn-shadow": "var(--round-btn-shadow)",
"build-trigger": "var(--build-trigger)",
"chat-trigger": "var(--chat-trigger)",
"blur-shared": "var(--blur-shared)",
"dark-blue": "var(--dark-blue)",
"dark-gray": "var(--dark-gray)",
"dark-red": "var(--dark-red)",
"error-background": "var(--error-background)",
"error-foreground": "var(--error-foreground)",
"high-dark-gray": "var(--high-dark-gray)",
"high-indigo": "var(--high-indigo)",
"high-light-gray": "var(--high-light-gray)",
"info-background": "var(--info-background)",
"info-foreground": "var(--info-foreground)",
"light-blue": "var(--light-blue)",
"light-gray": "var(--light-gray)",
"light-slate": "var(--light-slate)",
"medium-blue": "var(--medium-blue)",
"status-blue": "var(--status-blue)",
"medium-dark-gray": "var(--medium-dark-gray)",
"medium-dark-green": "var(--medium-dark-green)",
"medium-dark-red": "var(--medium-dark-red)",
"medium-emerald": "var(--medium-emerald)",
"medium-gray": "var(--medium-gray)",
"medium-high-indigo": "var(--medium-high-indigo)",
"medium-indigo": "var(--medium-indigo)",
"medium-low-gray": "var(--medium-low-gray)",
"status-green": "var(--status-green)",
"status-red": "var(--status-red)",
"status-yellow": "var(--status-yellow)",
"success-background": "var(--success-background)",
"success-foreground": "var(--success-foreground)",
white: "var(--white)",
border: "hsl(var(--border))", border: "hsl(var(--border))",
input: "hsl(var(--input))", input: "hsl(var(--input))",
ring: "hsl(var(--ring))", ring: "hsl(var(--ring))",
@ -142,27 +114,14 @@ module.exports = {
from: { height: "var(--radix-accordion-content-height)" }, from: { height: "var(--radix-accordion-content-height)" },
to: { height: 0 }, to: { height: 0 },
}, },
pulseGreen: {
"0%": { boxShadow: "0 0 0 0 rgba(72, 187, 120, 0.7)" },
"100%": { boxShadow: "0 0 0 10px rgba(72, 187, 120, 0)" },
},
}, },
animation: { animation: {
"accordion-down": "accordion-down 0.2s ease-out", "accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out", "accordion-up": "accordion-up 0.2s ease-out",
"pulse-green": "pulseGreen 1s linear",
"spin-once": "spin 1s linear 0.7",
},
borderColor: {
"red-outline": "rgba(255, 0, 0, 0.8)",
"green-outline": "rgba(72, 187, 120, 0.7)",
},
boxShadow: {
"red-outline": "0 0 5px rgba(255, 0, 0, 0.5)",
"green-outline": "0 0 5px rgba(72, 187, 120, 0.7)",
}, },
}, },
}, },
plugins: [ plugins: [
require("tailwindcss-animate"), require("tailwindcss-animate"),
require("@tailwindcss/forms")({ require("@tailwindcss/forms")({