Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

chore(ui): remove orphan legacy features and v2 menu (#8425)

Andrew Huang7e5fd8bc96d8
diff --git a/frontend/src/components/COMPONENT_LIFECYCLE.md b/frontend/src/components/COMPONENT_LIFECYCLE.md
index e26ea4f11d..c0de4ba269 100644
--- a/frontend/src/components/COMPONENT_LIFECYCLE.md
+++ b/frontend/src/components/COMPONENT_LIFECYCLE.md
@@ -11,7 +11,7 @@ The [V3 migration ledger](V3_MIGRATION.md) tracks source removal, coverage, and
| `FilterableSelect` | Deprecated | Use V3 `Combobox` where its contract fits. |
| `Button`, `Card`, `Checkbox`, `EmptyState`, `IconButton`, `Input`, `Pagination`, `Select`, `Switch`, `TextArea`, `Tooltip` | Ready for focused deprecation | Supported V3 replacements exist. Check representative consumers before adding component-specific guidance. |
| `Accordion`, `Alert`, `Breadcrumb`, `CopyButton`, `Dropdown`, `HoverCardv2`, `Skeleton`, `Spinner`, `Table`, `Tabs` | Blocked | Composition, interaction, or state parity still needs verification. |
-| `ConfirmActionModal`, `DeleteActionModal`, `Menu`, `Modal` | Blocked | Verify confirmation, menu-item, nested-overlay, and close behavior before directing consumers to V3 overlays. |
+| `ConfirmActionModal`, `DeleteActionModal`, `Modal` | Blocked | Verify confirmation, menu-item, nested-overlay, and close behavior before directing consumers to V3 overlays. |
| `ContentLoader`, `FormControl`, `GenericFieldLabel`, `PageHeader`, `Tag` | Blocked | The V3 replacements require consumer-specific composition or accessibility changes. |
| `SecretInput`, `SecretPathInput` | Blocked | Security-sensitive or specialist behavior needs workflow-level parity validation. |
| `NoticeBannerV2` | Blocked | Verify that V3 `Alert` covers existing layout and action requirements. |
diff --git a/frontend/src/components/basic/InputField.tsx b/frontend/src/components/basic/InputField.tsx
deleted file mode 100644
index 76da4600d2..0000000000
--- a/frontend/src/components/basic/InputField.tsx
+++ /dev/null
@@ -1,129 +0,0 @@
-import { memo, useState } from "react";
-import { faCircle, faEye, faEyeSlash } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-
-import guidGenerator from "../utilities/randomId";
-
-interface InputFieldProps {
- isStatic?: boolean;
- label: string;
- type: string;
- value: string;
- placeholder?: string;
- isRequired: boolean;
- error?: boolean;
- text?: string;
- name?: string;
- blurred?: boolean;
- errorText?: string;
- onChangeHandler: (value: string) => void;
-}
-
-const InputField = ({
- isRequired,
- label,
- onChangeHandler,
- type,
- value,
- autoComplete,
- blurred,
- error,
- errorText,
- id,
- name,
- placeholder,
- isStatic,
- text
-}: InputFieldProps & Pick<JSX.IntrinsicElements["input"], "autoComplete" | "id">) => {
- const [passwordVisible, setPasswordVisible] = useState(false);
-
- if (isStatic === true) {
- return (
- <div className="my-2 flex w-full max-w-md flex-col justify-center md:my-4">
- <p className="mb-0.5 text-sm font-medium text-muted-cool">{label}</p>
- {text && <p className="mb-2 text-xs text-muted-cool">{text}</p>}
- <input
- onChange={(e) => onChangeHandler(e.target.value)}
- type={type}
- placeholder={placeholder}
- value={value}
- required={isRequired}
- className="text-md w-full min-w-16 rounded-md border border-border-cool-strong bg-page p-2 text-muted-cool outline-hidden"
- name={name}
- readOnly
- autoComplete={autoComplete}
- id={id}
- />
- </div>
- );
- }
- return (
- <div className="w-full flex-col">
- <div className="mb-0.5 flex flex-row items-center text-label">
- <p className="mr-1 text-sm font-medium">{label}</p>
- </div>
- <div
- className={`group relative flex w-full max-w-2xl flex-col justify-center border ${
- error ? "border-danger" : "border-border-strong"
- } rounded-md`}
- >
- <input
- onChange={(e) => onChangeHandler(e.target.value)}
- type={passwordVisible === false ? type : "text"}
- placeholder={placeholder}
- value={value}
- required={isRequired}
- className={`${
- blurred
- ? "text-page group-hover:text-muted-cool focus:text-muted-cool active:text-muted-cool"
- : ""
- } ${
- error ? "focus:ring-danger/50" : "focus:ring-project/50"
- } text-md peer relative w-full min-w-16 rounded-md bg-surface-base p-2 text-muted-cool outline-hidden duration-200 focus:ring-4`}
- name={name}
- spellCheck="false"
- autoComplete={autoComplete}
- id={id}
- />
- {label?.includes("Password") && (
- <button
- type="button"
- onClick={() => {
- setPasswordVisible(!passwordVisible);
- }}
- className="absolute mr-3 cursor-pointer self-end text-muted-cool"
- >
- {passwordVisible ? (
- <FontAwesomeIcon icon={faEyeSlash} />
- ) : (
- <FontAwesomeIcon icon={faEye} />
- )}
- </button>
- )}
- {blurred && (
- <div className="peer absolute flex h-10 w-fit max-w-xl items-center overflow-hidden rounded-md text-clip text-muted-cool/50 group-hover:!hidden peer-hover:hidden peer-focus:hidden peer-active:invisible">
- <p className="ml-2" />
- {value
- .split("")
- .slice(0, 54)
- .map(() => (
- <FontAwesomeIcon
- key={guidGenerator()}
- className="text-xxs mx-0.5"
- icon={faCircle}
- />
- ))}
- </div>
- )}
- {/* {error && (
- <div className="absolute z-20 flex items-end justify-end mt-4 mr-1.5 self-end">
- <Error />
- </div>
- )} */}
- </div>
- {error && <p className="mx-0 mt-0.5 mb-2 max-w-xs text-xs text-danger">{errorText}</p>}
- </div>
- );
-};
-
-export default memo(InputField);
diff --git a/frontend/src/components/integrations/NoEnvironmentsBanner.tsx b/frontend/src/components/integrations/NoEnvironmentsBanner.tsx
deleted file mode 100644
index d27aaa04cd..0000000000
--- a/frontend/src/components/integrations/NoEnvironmentsBanner.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import { useNavigate } from "@tanstack/react-router";
-
-import { Button } from "../v2";
-
-interface IProps {
- projectId: string;
-}
-
-export const NoEnvironmentsBanner = ({ projectId }: IProps) => {
- const navigate = useNavigate();
-
- return (
- <div className="mt-4 flex w-full flex-row items-center rounded-md border border-project/70 bg-project/[.07] p-4 text-base text-foreground-inverse">
- <div className="flex w-full flex-col text-sm">
- <span className="mb-2 text-lg font-medium">No environments in your project was found</span>
- <p>
- In order to use integrations, you need to create at least one environment in your project.
- </p>
- </div>
- <div className="my-2">
- <Button onClick={() => navigate({ to: `/project/${projectId}/settings#environments` })}>
- Add environments
- </Button>
- </div>
- </div>
- );
-};
diff --git a/frontend/src/components/navigation/SecretDashboardPathBreadcrumb.tsx b/frontend/src/components/navigation/SecretDashboardPathBreadcrumb.tsx
deleted file mode 100644
index 69190c5492..0000000000
--- a/frontend/src/components/navigation/SecretDashboardPathBreadcrumb.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-import { faCheck, faCopy } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { Link } from "@tanstack/react-router";
-import { twMerge } from "tailwind-merge";
-
-import { useOrganization } from "@app/context";
-import { useTimedReset } from "@app/hooks";
-
-import { createNotification } from "../notifications";
-import { IconButton, Tooltip } from "../v2";
-
-type Props = {
- secretPathSegments: string[];
- selectedPathSegmentIndex: number;
- environmentSlug: string;
- projectId: string;
- disableCopy?: boolean;
-};
-
-export const SecretDashboardPathBreadcrumb = ({
- secretPathSegments,
- selectedPathSegmentIndex,
- environmentSlug,
- projectId,
- disableCopy
-}: Props) => {
- const { currentOrg } = useOrganization();
- const [, isCopying, setIsCopying] = useTimedReset({
- initialState: false
- });
-
- const newSecretPath = `/${secretPathSegments.slice(0, selectedPathSegmentIndex + 1).join("/")}`;
- const isLastItem = secretPathSegments.length === selectedPathSegmentIndex + 1;
- const folderName = secretPathSegments.at(selectedPathSegmentIndex);
-
- return (
- <div className="flex items-center space-x-3">
- {isLastItem && !disableCopy ? (
- <div className="group flex items-center space-x-2">
- <span
- className={twMerge(
- "text-sm transition-all",
- isCopying ? "text-foreground-soft" : "text-label-secondary"
- )}
- >
- {folderName}
- </span>
- <Tooltip className="relative right-2" position="bottom" content="Copy secret path">
- <IconButton
- variant="plain"
- ariaLabel="copy"
- onClick={() => {
- if (isCopying) return;
- setIsCopying(true);
- navigator.clipboard.writeText(newSecretPath);
-
- createNotification({
- text: "Copied secret path to clipboard",
- type: "info"
- });
- }}
- className="opacity-0 transition duration-75 group-hover:opacity-100 hover:bg-foreground-default/10"
- >
- <FontAwesomeIcon
- icon={!isCopying ? faCopy : faCheck}
- size="sm"
- className="cursor-pointer"
- />
- </IconButton>
- </Tooltip>
- </div>
- ) : (
- <Link
- to="/organizations/$orgId/projects/secret-management/$projectId/overview"
- params={{
- orgId: currentOrg.id,
- projectId
- }}
- search={(query) => ({
- ...query,
- secretPath: newSecretPath,
- environments: [environmentSlug]
- })}
- className={twMerge(
- "text-sm transition-all hover:text-project",
- isCopying && "text-project"
- )}
- >
- {folderName}
- </Link>
- )}
- </div>
- );
-};
diff --git a/frontend/src/components/tags/CreateTagModal/CreateTagModal.tsx b/frontend/src/components/tags/CreateTagModal/CreateTagModal.tsx
deleted file mode 100644
index 0dc24c5fcd..0000000000
--- a/frontend/src/components/tags/CreateTagModal/CreateTagModal.tsx
+++ /dev/null
@@ -1,266 +0,0 @@
-import { useEffect, useState } from "react";
-import { Controller, useForm } from "react-hook-form";
-import { faCheck } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { zodResolver } from "@hookform/resolvers/zod";
-import { z } from "zod";
-
-import { createNotification } from "@app/components/notifications";
-import {
- Button,
- FormControl,
- Input,
- Modal,
- ModalClose,
- ModalContent,
- Tooltip
-} from "@app/components/v2";
-import { useProject } from "@app/context";
-import { useCreateWsTag } from "@app/hooks/api";
-import { SecretV3RawSanitized, WsTag } from "@app/hooks/api/types";
-import { slugSchema } from "@app/lib/schemas";
-
-export const secretTagsColors = [
- {
- id: 1,
- hex: "#bec2c8",
- rgba: "rgb(128,128,128, 0.8)",
- name: "Grey"
- },
- {
- id: 2,
- hex: "#95a2b3",
- rgba: "rgb(0,0,255, 0.8)",
- name: "blue"
- },
- {
- id: 3,
- hex: "#5e6ad2",
- rgba: "rgb(128,0,128, 0.8)",
- name: "Purple"
- },
- {
- id: 4,
- hex: "#26b5ce",
- rgba: "rgb(0,128,128, 0.8)",
- name: "Teal"
- },
- {
- id: 5,
- hex: "#4cb782",
- rgba: "rgb(0,128,0, 0.8)",
- name: "Green"
- },
- {
- id: 6,
- hex: "#f2c94c",
- rgba: "rgb(255,255,0, 0.8)",
- name: "Yellow"
- },
- {
- id: 7,
- hex: "#f2994a",
- rgba: "rgb(128,128,0, 0.8)",
- name: "Orange"
- },
- {
- id: 8,
- hex: "#f7c8c1",
- rgba: "rgb(128,0,0, 0.8)",
- name: "Pink"
- },
- {
- id: 9,
- hex: "#eb5757",
- rgba: "rgb(255,0,0, 0.8)",
- name: "Red"
- }
-];
-
-const isValidHexColor = (hexColor: string) => {
- const hexColorPattern = /^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;
-
- return hexColorPattern.test(hexColor);
-};
-
-type Props = {
- isOpen?: boolean;
- onToggle: (isOpen: boolean) => void;
- append: (data: WsTag) => void;
- currentSecret?: SecretV3RawSanitized;
-};
-
-const createTagSchema = z.object({
- slug: slugSchema({ min: 1, field: "Tag Slug" }),
- color: z.string().trim()
-});
-
-type FormData = z.infer<typeof createTagSchema>;
-type TagColor = {
- id: number;
- hex: string;
- rgba: string;
- name: string;
-};
-
-export const CreateTagModal = ({ isOpen, onToggle, append, currentSecret }: Props): JSX.Element => {
- const {
- control,
- reset,
- watch,
- setValue,
- formState: { isSubmitting },
- handleSubmit
- } = useForm<FormData>({
- resolver: zodResolver(createTagSchema),
- defaultValues: {
- color: secretTagsColors[0].hex
- }
- });
-
- const { currentProject } = useProject();
- const projectId = currentProject?.id || "";
-
- const { mutateAsync: createWsTag } = useCreateWsTag();
- const [showHexInput, setShowHexInput] = useState<boolean>(false);
- const selectedTagColor = watch("color", secretTagsColors[0].hex);
-
- useEffect(() => {
- if (!isOpen) reset();
- }, [isOpen]);
-
- const onFormSubmit = async ({ slug, color }: FormData) => {
- const data = await createWsTag({
- projectId,
- tagColor: color,
- tagSlug: slug
- });
- append(data);
- onToggle(false);
- reset();
- createNotification({
- text: "Successfully created a tag",
- type: "success"
- });
- };
-
- return (
- <Modal isOpen={isOpen} onOpenChange={onToggle}>
- <ModalContent
- title={currentSecret ? `Create tag for ${currentSecret.key}` : "Create tag"}
- subTitle={
- currentSecret
- ? `Create a new tag, and it will be automatically linked to secret: ${currentSecret.key}.`
- : "Specify your tag name, and the slug will be created automatically."
- }
- >
- <form onSubmit={handleSubmit(onFormSubmit)}>
- <Controller
- control={control}
- name="slug"
- defaultValue=""
- render={({ field, fieldState: { error } }) => (
- <FormControl label="Tag Slug" isError={Boolean(error)} errorText={error?.message}>
- <Input {...field} placeholder="Type your tag slug" />
- </FormControl>
- )}
- />
- <div className="mt-2">
- <div className="mb-0.5 ml-1 block text-sm font-normal text-muted">Tag Color</div>
- <div className="flex space-x-2">
- <div className="flex items-center justify-center rounded-sm border border-border-strong bg-surface-base p-2">
- <div
- className="h-6 w-6 rounded-full"
- style={{ background: `${selectedTagColor}` }}
- />
- </div>
- <div className="flex grow items-center rounded-sm border-border-strong bg-surface-base px-1 pr-2">
- {!showHexInput ? (
- <div className="inline-flex items-center gap-3 pl-3">
- {secretTagsColors.map(($tagColor: TagColor) => {
- return (
- <div key={`tag-color-${$tagColor.id}`}>
- <Tooltip content={`${$tagColor.name}`}>
- <div
- className="flex h-[26px] w-[26px] items-center justify-center rounded-full border-2 border-transparent bg-container p-2 hover:border-black hover:shadow-lg hover:ring-2 hover:ring-offset-2"
- key={`tag-${$tagColor.id}`}
- style={{ backgroundColor: `${$tagColor.hex}` }}
- onClick={() => setValue("color", $tagColor.hex)}
- tabIndex={0}
- role="button"
- onKeyDown={() => {}}
- >
- {$tagColor.hex === selectedTagColor && (
- <FontAwesomeIcon icon={faCheck} style={{ color: "#00000070" }} />
- )}
- </div>
- </Tooltip>
- </div>
- );
- })}
- </div>
- ) : (
- <div className="tags-hex-wrapper flex grow items-center px-2">
- <div className="relative flex items-center rounded-md">
- {isValidHexColor(selectedTagColor) && (
- <div
- className="flex h-7 w-7 items-center justify-center rounded-full"
- style={{ background: `${selectedTagColor}` }}
- >
- <FontAwesomeIcon icon={faCheck} style={{ color: "#00000070" }} />
- </div>
- )}
- {!isValidHexColor(selectedTagColor) && (
- <div className="h-7 w-7 rounded-full border border-dashed border-border-strong bg-info" />
- )}
- </div>
- <div className="grow">
- <Input
- variant="plain"
- value={selectedTagColor}
- onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
- setValue("color", e.target.value)
- }
- />
- </div>
- </div>
- )}
- <div className="mx-4 h-8 border border-border-strong" />
- <div className="flex h-7 w-7 items-center justify-center">
- <div
- className={`flex h-7 w-7 cursor-pointer items-center justify-center rounded-xs border border-border-strong bg-surface-base bg-transparent p-2 hover:ring-2 hover:ring-offset-1 ${
- showHexInput ? "tags-conic-bg rounded-full" : ""
- }`}
- onClick={() => setShowHexInput((prev) => !prev)}
- style={{ border: "1px solid rgba(220, 216, 254, 0.376)" }}
- tabIndex={0}
- role="button"
- onKeyDown={() => {}}
- >
- {!showHexInput && <span>#</span>}
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div className="mt-8 flex items-center">
- <Button
- className="mr-4"
- type="submit"
- isDisabled={isSubmitting}
- isLoading={isSubmitting}
- >
- {currentSecret ? "Create and Add" : "Create"}
- </Button>
- <ModalClose asChild>
- <Button variant="plain" colorSchema="secondary">
- Cancel
- </Button>
- </ModalClose>
- </div>
- </form>
- </ModalContent>
- </Modal>
- );
-};
diff --git a/frontend/src/components/tags/CreateTagModal/index.tsx b/frontend/src/components/tags/CreateTagModal/index.tsx
deleted file mode 100644
index e9d283b3c2..0000000000
--- a/frontend/src/components/tags/CreateTagModal/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export { CreateTagModal } from "./CreateTagModal";
diff --git a/frontend/src/components/v2/Menu/Menu.tsx b/frontend/src/components/v2/Menu/Menu.tsx
deleted file mode 100644
index 4a1a561a82..0000000000
--- a/frontend/src/components/v2/Menu/Menu.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import { ComponentPropsWithRef, ElementType, ReactNode, Ref } from "react";
-import { twMerge } from "tailwind-merge";
-
-export type MenuProps = {
- children: ReactNode;
- className?: string;
-};
-
-export const Menu = ({ children, className }: MenuProps): JSX.Element => {
- return <ul className={twMerge("p-2", className)}>{children}</ul>;
-};
-
-export type MenuItemProps<T extends ElementType> = {
- // Kudos to https://itnext.io/react-polymorphic-components-with-typescript-f7ce72ea7af2
- as?: T;
- children?: ReactNode;
- leftIcon?: ReactNode;
- description?: ReactNode;
- isDisabled?: boolean;
- isSelected?: boolean;
- className?: string;
- inputRef?: Ref<T>;
-};
-
-export const MenuItem = <T extends ElementType = "button">({
- children,
- leftIcon,
- iconMode,
- className,
- isDisabled,
- isSelected,
- as: Item = "div",
- description,
- // wrapping in forward ref with generic component causes the loss of ts definitions on props
- inputRef,
- variant,
- ...props
-}: MenuItemProps<T> &
- ComponentPropsWithRef<T> & { variant?: "project" | "namespace" | "org" }): JSX.Element => {
- return (
- <Item
- type="button"
- role="menuitem"
- className={twMerge(
- "group relative mt-0.5 box-border flex w-full cursor-pointer items-center rounded-[2px] border-l-2 border-transparent px-2 py-2 font-sans text-sm text-foreground-default transition-all duration-50 hover:bg-surface-hover",
- isSelected && "bg-surface-active hover:bg-surface-active",
- isDisabled && "cursor-not-allowed hover:bg-transparent",
- isSelected && variant === "org" && "border-org",
- isSelected && variant === "namespace" && "border-sub-org",
- isSelected && variant === "project" && "border-project",
- className
- )}
- ref={inputRef}
- {...props}
- >
- {leftIcon}
- {children && <span className="grow text-left whitespace-nowrap">{children}</span>}
- {description && <span className="mt-2 text-xs">{description}</span>}
- </Item>
- );
-};
-
-MenuItem.displayName = "MenuItem";
-
-export type MenuGroupProps = {
- children: ReactNode;
- title: ReactNode;
- className?: string;
-};
-
-export const MenuGroup = ({ children, title, className }: MenuGroupProps): JSX.Element => (
- <>
- <li className={twMerge("px-2 pt-3 text-xs font-medium text-muted-cool uppercase", className)}>
- {title}
- </li>
- {children}
- </>
-);
diff --git a/frontend/src/components/v2/Menu/index.tsx b/frontend/src/components/v2/Menu/index.tsx
deleted file mode 100644
index 97e9fb7ad1..0000000000
--- a/frontend/src/components/v2/Menu/index.tsx
+++ /dev/null
@@ -1,2 +0,0 @@
-export type { MenuGroupProps, MenuItemProps, MenuProps } from "./Menu";
-export { Menu, MenuGroup, MenuItem } from "./Menu";
diff --git a/frontend/src/components/v2/index.tsx b/frontend/src/components/v2/index.tsx
index ff5640c071..ea22cbf5a2 100644
--- a/frontend/src/components/v2/index.tsx
+++ b/frontend/src/components/v2/index.tsx
@@ -17,7 +17,6 @@ export * from "./HoverCardv2";
export * from "./IconButton";
export * from "./Input";
export * from "./Lottie";
-export * from "./Menu";
export * from "./Modal";
export * from "./NoticeBannerV2";
export * from "./PageHeader";
diff --git a/frontend/src/layouts/OrganizationLayout/components/MenuIconButton/MenuIconButton.tsx b/frontend/src/layouts/OrganizationLayout/components/MenuIconButton/MenuIconButton.tsx
index d96b29d6e6..85559683e4 100644
--- a/frontend/src/layouts/OrganizationLayout/components/MenuIconButton/MenuIconButton.tsx
+++ b/frontend/src/layouts/OrganizationLayout/components/MenuIconButton/MenuIconButton.tsx
@@ -1,8 +1,16 @@
-import { ComponentPropsWithRef, ElementType, useRef } from "react";
+import { ComponentPropsWithRef, ElementType, ReactNode, useRef } from "react";
import { DotLottie, DotLottieReact } from "@lottiefiles/dotlottie-react";
import { twMerge } from "tailwind-merge";
-import { MenuItemProps } from "@app/components/v2";
+type MenuIconButtonProps<T extends ElementType> = ComponentPropsWithRef<T> & {
+ as?: T;
+ icon?: string;
+ isDisabled?: boolean;
+ isSelected?: boolean;
+ description?: ReactNode;
+ inputRef?: ComponentPropsWithRef<T>["ref"];
+ lottieIconMode?: "reverse" | "forward";
+};
export const MenuIconButton = <T extends ElementType = "button">({
children,
@@ -16,8 +24,7 @@ export const MenuIconButton = <T extends ElementType = "button">({
inputRef,
lottieIconMode = "forward",
...props
-}: MenuItemProps<T> &
- ComponentPropsWithRef<T> & { lottieIconMode?: "reverse" | "forward" }): JSX.Element => {
+}: MenuIconButtonProps<T>): JSX.Element => {
const iconRef = useRef<DotLottie | null>(null);
return (
<div className={!isSelected ? "hover:px-1" : ""}>
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/SecretSearchInput.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/SecretSearchInput.tsx
deleted file mode 100644
index da5092680d..0000000000
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/SecretSearchInput.tsx
+++ /dev/null
@@ -1,121 +0,0 @@
-import { useState } from "react";
-import { faCircleXmark, faFolderTree, faSearch } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { Combobox, Transition } from "@headlessui/react";
-import { twMerge } from "tailwind-merge";
-
-import { IconButton, Tooltip } from "@app/components/v2";
-
-import { QuickSearchModal, QuickSearchModalProps } from "./components";
-
-type ModalProps = Omit<
- QuickSearchModalProps,
- "isOpen" | "onClose" | "onOpenChange" | "initialValue" | "onSelectResult"
-> & {
- value: string;
- onChange: (search: string) => void;
- className?: string;
-};
-
-export const SecretSearchInput = ({
- value,
- onChange,
- className,
- isSingleEnv,
- ...props
-}: ModalProps) => {
- const [isOpen, setIsOpen] = useState(false);
- const hasSearch = Boolean(value.trim());
-
- return (
- <div className={twMerge("relative w-80", className)}>
- <Combobox
- // keeps combobox from internally controlling state, hacky use of combobox
- value={undefined}
- >
- {({ activeIndex }) => (
- <>
- <div className="flex w-full items-center whitespace-nowrap">
- <Tooltip content="Search Options">
- <Combobox.Button className="button user-select-none relative inline-flex h-[2.42rem] cursor-pointer items-center justify-center rounded-md rounded-r-none border border-border bg-container p-3 font-sans text-sm font-medium text-foreground transition-all duration-100 hover:border-project/50 hover:bg-project/10">
- <FontAwesomeIcon
- icon={faSearch}
- size="sm"
- className={hasSearch ? "text-project" : ""}
- aria-hidden="true"
- />
- </Combobox.Button>
- </Tooltip>
- <div className="relative inline-flex w-full items-center rounded-md rounded-l-none border border-border bg-container font-sans text-muted">
- <Combobox.Input
- onKeyDown={(e) => {
- if (activeIndex === 0 && e.key === "Enter") setIsOpen(true);
- }}
- autoComplete="off"
- className={twMerge(
- "input text-md h-[2.3rem] w-full rounded-md rounded-l-none bg-container py-1.5 pl-2.5 text-muted outline-hidden duration-200 placeholder:text-sm placeholder:text-muted hover:ring-ring/60 focus:bg-container-hover focus:ring-1 focus:ring-ring",
- hasSearch ? "pr-8" : "pr-2.5"
- )}
- placeholder={
- isSingleEnv
- ? "Search by secret, folder, tag or metadata..."
- : "Search by secret or folder name..."
- }
- value={value}
- onChange={(e) => onChange(e.target.value)}
- />
- {hasSearch && (
- <IconButton
- isRounded
- variant="plain"
- onClick={() => onChange("")}
- className="absolute right-2 text-project"
- ariaLabel="Clear search"
- >
- <FontAwesomeIcon icon={faCircleXmark} />
- </IconButton>
- )}
- </div>
- </div>
- <Transition
- leave="transition ease-in duration-100"
- leaveFrom="opacity-100"
- leaveTo="opacity-0"
- >
- <Combobox.Options className="absolute z-30 mt-2 w-full min-w-[220px] overflow-y-auto rounded-md border border-border bg-popover text-foreground shadow-sm focus:outline-hidden">
- <Combobox.Option
- onClick={() => setIsOpen(true)}
- value={value}
- className={({ active }) =>
- `flex w-full cursor-pointer items-start rounded-xs px-4 py-2 font-sans text-sm text-foreground outline-hidden hover:bg-container-hover ${
- active ? "bg-container-hover" : ""
- }`
- }
- >
- <FontAwesomeIcon icon={faFolderTree} className="mt-1 mr-2 text-folder" />
- {value.trim()
- ? `Search for "${
- value.length > 10 ? `${value.substring(0, 10)}...` : value
- }" in all folders`
- : "Search in all folders"}
- </Combobox.Option>
- </Combobox.Options>
- </Transition>
- </>
- )}
- </Combobox>
- <QuickSearchModal
- isSingleEnv={isSingleEnv}
- isOpen={isOpen}
- onOpenChange={setIsOpen}
- initialValue={value}
- onSelectResult={({ search }) => onChange(search)}
- onClose={(clearSearch = true) => {
- setIsOpen(false);
- if (clearSearch) onChange("");
- }}
- {...props}
- />
- </div>
- );
-};
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/index.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/index.tsx
deleted file mode 100644
index 013b845eab..0000000000
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export { SecretSearchInput } from "./SecretSearchInput";