diff --git a/.devcontainer/demo/README.md b/.devcontainer/demo/README.md index d0ad14f9e..0a828a009 100644 --- a/.devcontainer/demo/README.md +++ b/.devcontainer/demo/README.md @@ -1,6 +1,6 @@ -# LangFlow Demo Codespace Readme +# Langflow Demo Codespace Readme -These instructions will walk you through the process of running a LangFlow demo via GitHub Codespaces. +These instructions will walk you through the process of running a Langflow demo via GitHub Codespaces. ## Setup diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 001417643..f2c471b1a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to LangFlow +# Contributing to Langflow -Hello there! We appreciate your interest in contributing to LangFlow. +Hello there! We appreciate your interest in contributing to Langflow. As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infra, or better documentation. @@ -40,7 +40,7 @@ the system we use to tag our issues and pull requests. ### Local development -You can develop LangFlow using docker compose, or locally. +You can develop Langflow using docker compose, or locally. We provide a .vscode/launch.json file for debugging the backend in VSCode, which is a lot faster than using docker compose. diff --git a/README.md b/README.md index b1bcbad6a..e53f3b535 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# ⛓️ LangFlow +# ⛓️ Langflow ~ An effortless way to experiment and prototype [LangChain](https://github.com/hwchase17/langchain) pipelines ~ @@ -16,7 +16,7 @@

Discord Server -HuggingFace Spaces +HuggingFace Spaces

@@ -43,7 +43,7 @@ # 📦 Installation ### Locally -You can install LangFlow from pip: +You can install Langflow from pip: ```shell pip install langflow @@ -220,7 +220,7 @@ print(run_flow("Your message", flow_id=FLOW_ID, tweaks=TWEAKS)) ## 🎨 Creating Flows -Creating flows with LangFlow is easy. Simply drag sidebar components onto the canvas and connect them together to create your pipeline. LangFlow provides a range of [LangChain components](https://langchain.readthedocs.io/en/latest/reference.html) to choose from, including LLMs, prompt serializers, agents, and chains. +Creating flows with Langflow is easy. Simply drag sidebar components onto the canvas and connect them together to create your pipeline. Langflow provides a range of [LangChain components](https://langchain.readthedocs.io/en/latest/reference.html) to choose from, including LLMs, prompt serializers, agents, and chains. Explore by editing prompt parameters, link chains and agents, track an agent's thought process, and export your flow. @@ -233,13 +233,13 @@ from langflow import load_flow_from_json flow = load_flow_from_json("path/to/flow.json") # Now you can use it like any chain -flow("Hey, have you heard of LangFlow?") +flow("Hey, have you heard of Langflow?") ``` ## 👋 Contributing -We welcome contributions from developers of all levels to our open-source project on GitHub. If you'd like to contribute, please check our [contributing guidelines](./CONTRIBUTING.md) and help make LangFlow more accessible. +We welcome contributions from developers of all levels to our open-source project on GitHub. If you'd like to contribute, please check our [contributing guidelines](./CONTRIBUTING.md) and help make Langflow more accessible. Join our [Discord](https://discord.com/invite/EqksyE2EX9) server to ask questions, make suggestions and showcase your projects! 🦾 @@ -252,4 +252,4 @@ Join our [Discord](https://discord.com/invite/EqksyE2EX9) server to ask question ## 📄 License -LangFlow is released under the MIT License. See the LICENSE file for details. +Langflow is released under the MIT License. See the LICENSE file for details. diff --git a/pyproject.toml b/pyproject.toml index dbd60f4c1..08bdaad65 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langflow" -version = "0.2.12" +version = "0.2.13" description = "A Python package with a built-in web application" authors = ["Logspace "] maintainers = [ diff --git a/src/backend/langflow/__main__.py b/src/backend/langflow/__main__.py index 15005585c..385e74932 100644 --- a/src/backend/langflow/__main__.py +++ b/src/backend/langflow/__main__.py @@ -48,6 +48,26 @@ def update_settings( settings.update_settings(cache=cache) +def load_params(): + """ + Load the parameters from the environment variables. + """ + global_vars = globals() + + for key, value in global_vars.items(): + env_key = f"LANGFLOW_{key.upper()}" + if env_key in os.environ: + if isinstance(value, bool): + # Handle booleans + global_vars[key] = os.getenv(env_key, str(value)).lower() == "true" + elif isinstance(value, int): + # Handle integers + global_vars[key] = int(os.getenv(env_key, str(value))) + elif isinstance(value, str) or value is None: + # Handle strings and None values + global_vars[key] = os.getenv(env_key, str(value)) + + def serve_on_jcloud(): """ Deploy Langflow server on Jina AI Cloud @@ -149,6 +169,7 @@ def serve( # override env variables with .env file if env_file: load_dotenv(env_file, override=True) + load_params() if jcloud: return serve_on_jcloud() @@ -244,7 +265,7 @@ def get_free_port(port): def print_banner(host, port): # console = Console() - word = "LangFlow" + word = "Langflow" colors = ["#3300cc"] styled_word = "" diff --git a/src/backend/langflow/api/v1/schemas.py b/src/backend/langflow/api/v1/schemas.py index f5f1f9ccf..22df4a977 100644 --- a/src/backend/langflow/api/v1/schemas.py +++ b/src/backend/langflow/api/v1/schemas.py @@ -23,7 +23,7 @@ class GraphData(BaseModel): class ExportedFlow(BaseModel): - """Exported flow from LangFlow.""" + """Exported flow from Langflow.""" description: str name: str diff --git a/src/frontend/index.html b/src/frontend/index.html index 3b6e30308..50bdae647 100644 --- a/src/frontend/index.html +++ b/src/frontend/index.html @@ -5,7 +5,7 @@ - LangFlow + Langflow diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 166baf4c7..af42df916 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -118,7 +118,7 @@ export default function App() { const removeAlert = (id: string) => { setAlertsList((prevAlertsList) => - prevAlertsList.filter((alert) => alert.id !== id) + prevAlertsList.filter((alert) => alert.id !== id), ); }; diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index ccc18a5fa..4e1c226a0 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -59,7 +59,7 @@ export default function ParameterComponent({ }, [data.id, position, updateNodeInternals]); const [enabled, setEnabled] = useState( - data.node.template[name]?.value ?? false + data.node.template[name]?.value ?? false, ); useEffect(() => {}, [closePopUp, data.node.template]); @@ -101,7 +101,7 @@ export default function ParameterComponent({ 0 ? "items-center flex mt-3" : "items-center flex" + i > 0 ? "items-center flex mt-3" : "items-center flex", )} >
@@ -132,7 +132,7 @@ export default function GenericNode({ validationStatus && validationStatus.valid ? "w-4 h-4 rounded-full bg-green-500 opacity-100" : "w-4 h-4 rounded-full bg-gray-500 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-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200", )} >
@@ -217,7 +217,7 @@ export default function GenericNode({
{" "} diff --git a/src/frontend/src/components/AccordionComponent/index.tsx b/src/frontend/src/components/AccordionComponent/index.tsx index f03a2ad5f..8990da245 100644 --- a/src/frontend/src/components/AccordionComponent/index.tsx +++ b/src/frontend/src/components/AccordionComponent/index.tsx @@ -18,7 +18,7 @@ export default function AccordionComponent({ open = [], }: AccordionComponentType) { const [value, setValue] = useState( - open.length == 0 ? "" : getOpenAccordion() + open.length == 0 ? "" : getOpenAccordion(), ); function getOpenAccordion() { diff --git a/src/frontend/src/components/ExtraSidebarComponent/index.tsx b/src/frontend/src/components/ExtraSidebarComponent/index.tsx index b6fbf94b2..c0ad0b506 100644 --- a/src/frontend/src/components/ExtraSidebarComponent/index.tsx +++ b/src/frontend/src/components/ExtraSidebarComponent/index.tsx @@ -34,7 +34,7 @@ export default function ExtraSidebar() { item.href.split("/")[2] === current[4] ? "bg-muted text-gray-900" : "bg-white text-gray-600 hover:bg-muted hover:text-gray-900", - "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.name} @@ -61,7 +61,7 @@ export default function ExtraSidebar() { item.href.split("/")[2] === current[4] ? "bg-muted text-gray-900" : "bg-white text-gray-600 hover:bg-muted hover:text-gray-900", - "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-indigo-500", )} >
diff --git a/src/frontend/src/components/ReactTooltipComponent/index.tsx b/src/frontend/src/components/ReactTooltipComponent/index.tsx index cb2a54f7c..cb4349305 100644 --- a/src/frontend/src/components/ReactTooltipComponent/index.tsx +++ b/src/frontend/src/components/ReactTooltipComponent/index.tsx @@ -38,7 +38,7 @@ const TooltipReact: FC = ({ content={content} className={classNames( "!bg-white !text-xs !font-normal !text-gray-700 !shadow-md !opacity-100 z-[9999]", - className + className, )} place={position} clickable={clickable} diff --git a/src/frontend/src/components/chatComponent/buildTrigger/index.tsx b/src/frontend/src/components/chatComponent/buildTrigger/index.tsx index 215b75971..a247a46b8 100644 --- a/src/frontend/src/components/chatComponent/buildTrigger/index.tsx +++ b/src/frontend/src/components/chatComponent/buildTrigger/index.tsx @@ -126,7 +126,7 @@ export default function BuildTrigger({ async function enforceMinimumLoadingTime( startTime: number, - minimumLoadingTime: number + minimumLoadingTime: number, ) { const elapsedTime = Date.now() - startTime; const remainingTime = minimumLoadingTime - elapsedTime; diff --git a/src/frontend/src/components/chatComponent/index.tsx b/src/frontend/src/components/chatComponent/index.tsx index 6c451fc31..0c7c069c5 100644 --- a/src/frontend/src/components/chatComponent/index.tsx +++ b/src/frontend/src/components/chatComponent/index.tsx @@ -45,7 +45,7 @@ export default function Chat({ flow }: ChatType) { useEffect(() => { const prevNodes = prevNodesRef.current; const currentNodes = nodes.map( - (node: NodeType) => node.data.node.template.value + (node: NodeType) => node.data.node.template.value, ); if ( diff --git a/src/frontend/src/components/codeAreaComponent/index.tsx b/src/frontend/src/components/codeAreaComponent/index.tsx index b42f1489b..fc827fb05 100644 --- a/src/frontend/src/components/codeAreaComponent/index.tsx +++ b/src/frontend/src/components/codeAreaComponent/index.tsx @@ -13,7 +13,7 @@ export default function CodeAreaComponent({ editNode = false, }: TextAreaComponentType) { const [myValue, setMyValue] = useState( - typeof value == "string" ? value : JSON.stringify(value) + typeof value == "string" ? value : JSON.stringify(value), ); const { openPopUp } = useContext(PopUpContext); useEffect(() => { @@ -43,7 +43,7 @@ export default function CodeAreaComponent({ setMyValue(t); onChange(t); }} - /> + />, ); }} className={ @@ -67,7 +67,7 @@ export default function CodeAreaComponent({ setMyValue(t); onChange(t); }} - /> + />, ); }} > diff --git a/src/frontend/src/components/dropdownComponent/index.tsx b/src/frontend/src/components/dropdownComponent/index.tsx index fab9cad93..35f008aba 100644 --- a/src/frontend/src/components/dropdownComponent/index.tsx +++ b/src/frontend/src/components/dropdownComponent/index.tsx @@ -18,7 +18,7 @@ export default function Dropdown({ const { closePopUp } = useContext(PopUpContext); let [internalValue, setInternalValue] = useState( - value === "" || !value ? "Choose an option" : value + value === "" || !value ? "Choose an option" : value, ); useEffect(() => { @@ -71,7 +71,7 @@ export default function Dropdown({ editNode ? "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]" : "nowheel 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 ", - apiModal ? "w-[250px] mb-2" : "absolute" + apiModal ? "w-[250px] mb-2" : "absolute", )} > {options.map((option, id) => ( @@ -84,7 +84,7 @@ export default function Dropdown({ : "", 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-2 pl-3 pr-9 dark:text-gray-300 dark:bg-gray-800" + : "relative cursor-default select-none py-2 pl-3 pr-9 dark:text-gray-300 dark:bg-gray-800", ) } value={option} @@ -94,7 +94,7 @@ export default function Dropdown({ {option} @@ -104,7 +104,7 @@ export default function Dropdown({
- + , ); }} > diff --git a/src/frontend/src/components/inputComponent/index.tsx b/src/frontend/src/components/inputComponent/index.tsx index 98e643871..fb9c6f99e 100644 --- a/src/frontend/src/components/inputComponent/index.tsx +++ b/src/frontend/src/components/inputComponent/index.tsx @@ -53,7 +53,7 @@ export default function InputComponent({ ? "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" + INPUT_STYLE : "ring-offset-gray-200" + INPUT_STYLE, - password && editNode ? "pr-8" : "pr-3" + password && editNode ? "pr-8" : "pr-3", )} placeholder={password && editNode ? "Key" : "Type something..."} onChange={(e) => { @@ -66,7 +66,7 @@ export default function InputComponent({ className={classNames( editNode ? "absolute inset-y-0 right-0 pr-2 items-center text-gray-600" - : "absolute inset-y-0 right-0 items-center px-4 text-gray-600" + : "absolute inset-y-0 right-0 items-center px-4 text-gray-600", )} onClick={() => { setPwdVisible(!pwdVisible); @@ -83,7 +83,7 @@ export default function InputComponent({ className={classNames( editNode ? "w-5 h-5 absolute bottom-0.5 right-2" - : "w-5 h-5 absolute bottom-2 right-3" + : "w-5 h-5 absolute bottom-2 right-3", )} > + />, ); }} className={ @@ -70,7 +70,7 @@ export default function PromptAreaComponent({ setMyValue(t); onChange(t); }} - /> + />, ); }} > diff --git a/src/frontend/src/components/textAreaComponent/index.tsx b/src/frontend/src/components/textAreaComponent/index.tsx index d32a76687..731991117 100644 --- a/src/frontend/src/components/textAreaComponent/index.tsx +++ b/src/frontend/src/components/textAreaComponent/index.tsx @@ -47,7 +47,7 @@ export default function TextAreaComponent({ setMyValue(t); onChange(t); }} - /> + />, ); }} className={ @@ -73,7 +73,7 @@ export default function TextAreaComponent({ setMyValue(t); onChange(t); }} - /> + />, ); }} > diff --git a/src/frontend/src/components/toggleComponent/index.tsx b/src/frontend/src/components/toggleComponent/index.tsx index 9481f6760..7414a462c 100644 --- a/src/frontend/src/components/toggleComponent/index.tsx +++ b/src/frontend/src/components/toggleComponent/index.tsx @@ -22,7 +22,7 @@ export default function ToggleComponent({ }} className={classNames( enabled ? "bg-primary" : "bg-gray-200", - "relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-1 focus:ring-primary focus:ring-offset-1" + "relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-1 focus:ring-primary focus:ring-offset-1", )} > Use setting @@ -32,7 +32,7 @@ export default function ToggleComponent({ "pointer-events-none relative inline-block h-5 w-5 transform rounded-full shadow ring-0 transition duration-200 ease-in-out", disabled ? "bg-gray-200 dark:bg-gray-600" - : "bg-white dark:bg-gray-800" + : "bg-white dark:bg-gray-800", )} > @@ -49,7 +49,7 @@ export default function ToggleComponent({ enabled ? "opacity-100 ease-in duration-200" : "opacity-0 ease-out duration-100", - "absolute inset-0 flex h-full w-full items-center justify-center transition-opacity" + "absolute inset-0 flex h-full w-full items-center justify-center transition-opacity", )} aria-hidden="true" >
diff --git a/src/frontend/src/components/ui/accordion.tsx b/src/frontend/src/components/ui/accordion.tsx index 684b257fc..9dcb1c2a1 100644 --- a/src/frontend/src/components/ui/accordion.tsx +++ b/src/frontend/src/components/ui/accordion.tsx @@ -28,7 +28,7 @@ const AccordionTrigger = React.forwardRef< ref={ref} className={cn( "flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", - className + className, )} {...props} > @@ -47,7 +47,7 @@ const AccordionContent = React.forwardRef< ref={ref} className={cn( "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", - className + className, )} {...props} > diff --git a/src/frontend/src/components/ui/badge.tsx b/src/frontend/src/components/ui/badge.tsx index d8f6ca740..3febd0bcd 100644 --- a/src/frontend/src/components/ui/badge.tsx +++ b/src/frontend/src/components/ui/badge.tsx @@ -19,7 +19,7 @@ const badgeVariants = cva( defaultVariants: { variant: "default", }, - } + }, ); export interface BadgeProps diff --git a/src/frontend/src/components/ui/button.tsx b/src/frontend/src/components/ui/button.tsx index 635da79b4..31c06c9e7 100644 --- a/src/frontend/src/components/ui/button.tsx +++ b/src/frontend/src/components/ui/button.tsx @@ -30,7 +30,7 @@ const buttonVariants = cva( variant: "default", size: "default", }, - } + }, ); export interface ButtonProps @@ -49,7 +49,7 @@ const Button = React.forwardRef( {...props} /> ); - } + }, ); Button.displayName = "Button"; diff --git a/src/frontend/src/components/ui/card.tsx b/src/frontend/src/components/ui/card.tsx index 84fba4ede..23af93f78 100644 --- a/src/frontend/src/components/ui/card.tsx +++ b/src/frontend/src/components/ui/card.tsx @@ -9,7 +9,7 @@ const Card = React.forwardRef< ref={ref} className={cn( "rounded-lg flex flex-col justify-between border bg-card text-card-foreground shadow-sm hover:shadow-lg transition-all", - className + className, )} {...props} /> @@ -36,7 +36,7 @@ const CardTitle = React.forwardRef< ref={ref} className={cn( "text-base font-semibold leading-tight tracking-tight", - className + className, )} {...props} /> diff --git a/src/frontend/src/components/ui/checkbox.tsx b/src/frontend/src/components/ui/checkbox.tsx index 4e4905bb9..1038b4bdc 100644 --- a/src/frontend/src/components/ui/checkbox.tsx +++ b/src/frontend/src/components/ui/checkbox.tsx @@ -13,7 +13,7 @@ const Checkbox = React.forwardRef< ref={ref} className={cn( "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", - className + className, )} {...props} > diff --git a/src/frontend/src/components/ui/dialog.tsx b/src/frontend/src/components/ui/dialog.tsx index 050db3aaa..6adecee78 100644 --- a/src/frontend/src/components/ui/dialog.tsx +++ b/src/frontend/src/components/ui/dialog.tsx @@ -28,7 +28,7 @@ const DialogOverlay = React.forwardRef< ref={ref} 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", - className + className, )} {...props} /> @@ -45,7 +45,7 @@ const DialogContent = React.forwardRef< ref={ref} className={cn( "fixed z-50 grid w-full gap-4 rounded-b-lg border bg-background p-6 shadow-lg animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 sm:max-w-lg sm:rounded-lg sm:zoom-in-90 data-[state=open]:sm:slide-in-from-bottom-0", - className + className, )} {...props} > @@ -66,7 +66,7 @@ const DialogHeader = ({
@@ -80,7 +80,7 @@ const DialogFooter = ({
@@ -95,7 +95,7 @@ const DialogTitle = React.forwardRef< ref={ref} className={cn( "text-lg font-semibold leading-none tracking-tight", - className + className, )} {...props} /> diff --git a/src/frontend/src/components/ui/dropdown-menu.tsx b/src/frontend/src/components/ui/dropdown-menu.tsx index d13ee400e..9a69f2a9a 100644 --- a/src/frontend/src/components/ui/dropdown-menu.tsx +++ b/src/frontend/src/components/ui/dropdown-menu.tsx @@ -28,7 +28,7 @@ const DropdownMenuSubTrigger = React.forwardRef< className={cn( "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent", inset && "pl-8", - className + className, )} {...props} > @@ -47,7 +47,7 @@ const DropdownMenuSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1", - className + className, )} {...props} /> @@ -65,7 +65,7 @@ const DropdownMenuContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", - className + className, )} {...props} /> @@ -84,7 +84,7 @@ const DropdownMenuItem = React.forwardRef< className={cn( "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", - className + className, )} {...props} /> @@ -99,7 +99,7 @@ const DropdownMenuCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} checked={checked} {...props} @@ -123,7 +123,7 @@ const DropdownMenuRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > @@ -148,7 +148,7 @@ const DropdownMenuLabel = React.forwardRef< className={cn( "px-2 pl-2 py-1.5 text-sm font-semibold", inset && "pl-8", - className + className, )} {...props} /> diff --git a/src/frontend/src/components/ui/input.tsx b/src/frontend/src/components/ui/input.tsx index f3a8757e8..bb3c0409f 100644 --- a/src/frontend/src/components/ui/input.tsx +++ b/src/frontend/src/components/ui/input.tsx @@ -11,13 +11,13 @@ const Input = React.forwardRef( type={type} className={cn( "flex h-10 w-full 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 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", - className + className, )} ref={ref} {...props} /> ); - } + }, ); Input.displayName = "Input"; diff --git a/src/frontend/src/components/ui/label.tsx b/src/frontend/src/components/ui/label.tsx index ab5129253..f2017b255 100644 --- a/src/frontend/src/components/ui/label.tsx +++ b/src/frontend/src/components/ui/label.tsx @@ -6,7 +6,7 @@ import { cva, type VariantProps } from "class-variance-authority"; import { cn } from "../../utils"; const labelVariants = cva( - "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" + "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", ); const Label = React.forwardRef< diff --git a/src/frontend/src/components/ui/menubar.tsx b/src/frontend/src/components/ui/menubar.tsx index 2eb3a61f4..a0c382e01 100644 --- a/src/frontend/src/components/ui/menubar.tsx +++ b/src/frontend/src/components/ui/menubar.tsx @@ -24,7 +24,7 @@ const Menubar = React.forwardRef< ref={ref} className={cn( "flex h-10 items-center space-x-1 rounded-md border bg-background p-1", - className + className, )} {...props} /> @@ -39,7 +39,7 @@ const MenubarTrigger = React.forwardRef< ref={ref} className={cn( "flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", - className + className, )} {...props} /> @@ -57,7 +57,7 @@ const MenubarSubTrigger = React.forwardRef< className={cn( "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", - className + className, )} {...props} > @@ -75,7 +75,7 @@ const MenubarSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1", - className + className, )} {...props} /> @@ -88,7 +88,7 @@ const MenubarContent = React.forwardRef< >( ( { className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, - ref + ref, ) => ( - ) + ), ); MenubarContent.displayName = MenubarPrimitive.Content.displayName; @@ -118,7 +118,7 @@ const MenubarItem = React.forwardRef< className={cn( "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", - className + className, )} {...props} /> @@ -133,7 +133,7 @@ const MenubarCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} checked={checked} {...props} @@ -156,7 +156,7 @@ const MenubarRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > @@ -181,7 +181,7 @@ const MenubarLabel = React.forwardRef< className={cn( "px-2 py-1.5 text-sm font-semibold", inset && "pl-8", - className + className, )} {...props} /> @@ -208,7 +208,7 @@ const MenubarShortcut = ({ diff --git a/src/frontend/src/components/ui/progress.tsx b/src/frontend/src/components/ui/progress.tsx index 69d1f86fb..71ff8a889 100644 --- a/src/frontend/src/components/ui/progress.tsx +++ b/src/frontend/src/components/ui/progress.tsx @@ -12,7 +12,7 @@ const Progress = React.forwardRef< ref={ref} className={cn( "relative h-4 w-full overflow-hidden rounded-full bg-secondary", - className + className, )} {...props} > diff --git a/src/frontend/src/components/ui/rename-label.tsx b/src/frontend/src/components/ui/rename-label.tsx index 1ee79808b..ffc93f4df 100644 --- a/src/frontend/src/components/ui/rename-label.tsx +++ b/src/frontend/src/components/ui/rename-label.tsx @@ -58,7 +58,7 @@ export default function RenameLabel(props) { onInput={resizeInput} className={cn( "px-2 bg-transparent focus:border-none active:outline hover:outline focus:outline outline-gray-300 rounded-md", - props.className + props.className, )} onBlur={() => { setIsRename(false); diff --git a/src/frontend/src/components/ui/separator.tsx b/src/frontend/src/components/ui/separator.tsx index 84a16676d..f78d5c0cb 100644 --- a/src/frontend/src/components/ui/separator.tsx +++ b/src/frontend/src/components/ui/separator.tsx @@ -10,7 +10,7 @@ const Separator = React.forwardRef< >( ( { className, orientation = "horizontal", decorative = true, ...props }, - ref + ref, ) => ( - ) + ), ); Separator.displayName = SeparatorPrimitive.Root.displayName; diff --git a/src/frontend/src/components/ui/switch.tsx b/src/frontend/src/components/ui/switch.tsx index 122057cfb..5cc6456c5 100644 --- a/src/frontend/src/components/ui/switch.tsx +++ b/src/frontend/src/components/ui/switch.tsx @@ -11,14 +11,14 @@ const Switch = React.forwardRef< diff --git a/src/frontend/src/components/ui/table.tsx b/src/frontend/src/components/ui/table.tsx index f08ce3f6b..64a5c207c 100644 --- a/src/frontend/src/components/ui/table.tsx +++ b/src/frontend/src/components/ui/table.tsx @@ -55,7 +55,7 @@ const TableRow = React.forwardRef< ref={ref} className={cn( "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", - className + className, )} {...props} /> @@ -70,7 +70,7 @@ const TableHead = React.forwardRef< ref={ref} className={cn( "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", - className + className, )} {...props} /> diff --git a/src/frontend/src/components/ui/tabs.tsx b/src/frontend/src/components/ui/tabs.tsx index f58a5b68f..c0ab2318f 100644 --- a/src/frontend/src/components/ui/tabs.tsx +++ b/src/frontend/src/components/ui/tabs.tsx @@ -14,7 +14,7 @@ const TabsList = React.forwardRef< ref={ref} className={cn( "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", - className + className, )} {...props} /> @@ -29,7 +29,7 @@ const TabsTrigger = React.forwardRef< ref={ref} className={cn( "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm data-[state=inactive]:hover:bg-secondary/80 data-[state=active]:border data-[state=inactive]:border data-[state=inactive]:border-muted", - className + className, )} {...props} /> @@ -44,7 +44,7 @@ const TabsContent = React.forwardRef< ref={ref} className={cn( "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", - className + className, )} {...props} /> diff --git a/src/frontend/src/components/ui/textarea.tsx b/src/frontend/src/components/ui/textarea.tsx index fc0cda2ff..b399e167d 100644 --- a/src/frontend/src/components/ui/textarea.tsx +++ b/src/frontend/src/components/ui/textarea.tsx @@ -10,13 +10,13 @@ const Textarea = React.forwardRef(