Skip to content

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

chore(ui): remove the deprecated V3 ReactSelect compatibility selects

andrewhuhhf966374f8702
diff --git a/DESIGN.md b/DESIGN.md
index fa4fbd4c42..05e86f7cdf 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -217,7 +217,6 @@ specialized primitives not listed here (for example `CodeBlock`, `CopyButton`,
| [`InputGroup`](frontend/src/components/v3/generic/InputGroup/InputGroup.tsx) | Input with left/right addons — search bars, prefixed values. |
| [`Select`](frontend/src/components/v3/generic/Select/Select.tsx) | Non-searchable single-select with a short, known option list. |
| [`Combobox`](frontend/src/components/v3/generic/Combobox/Combobox.tsx) | Searchable single- or multi-select, including grouped/rich rows and inline or dialog creation when its contract fits. |
-| [`ReactSelect`](frontend/src/components/v3/generic/ReactSelect/index.ts) | Deprecated compatibility for consumers needing react-select-specific overrides; see the lifecycle ledger. |
| [`Toggle`](frontend/src/components/v3/generic/Toggle/Toggle.tsx) / [`Checkbox`](frontend/src/components/v3/generic/Checkbox/Checkbox.tsx) | Boolean toggle / multi-select boolean. |
| [`Calendar`](frontend/src/components/v3/generic/Calendar/Calendar.tsx) | Date / multi-date / range picker primitive. |
| [`DateRangeFilter`](frontend/src/components/v3/platform/DateRangeFilter/DateRangeFilter.tsx) | Platform date-range filter with presets — for filter bars. |
diff --git a/frontend/src/components/COMPONENT_LIFECYCLE.md b/frontend/src/components/COMPONENT_LIFECYCLE.md
index ff49944c2d..501d34841f 100644
--- a/frontend/src/components/COMPONENT_LIFECYCLE.md
+++ b/frontend/src/components/COMPONENT_LIFECYCLE.md
@@ -26,8 +26,7 @@ The 2026-10-04 source audit found no external consumers of `Blur`, `CreatableSel
| Components | Status | Direction |
| ------------------------------ | ---------- | --------------------------------------------------------------------- |
| `PageHeader` | Supported | Owns the normal 40px bottom boundary (`mb-10`). Remove header-boundary parent gaps and redundant caller margins when adopting it; preserve independent body/card spacing in body containers. `className` supports intentional compact/responsive boundaries. See its spacing stories. |
-| `ReactSelect/FilterableSelect` | Deprecated | Use `Combobox`; keep compatibility available while consumers migrate. |
-| `ReactSelect/CreatableSelect` | Deprecated | Use `Combobox` with inline `creation` for values needing no metadata, or dialog `creation` for caller-owned forms and persistence. Keep compatibility for react-select-specific component overrides; migrate consumers separately. |
+| `ReactSelect/FilterableSelect`, `ReactSelect/CreatableSelect` | Removed | Deleted the compatibility directory and its `generic/index.ts` export. No consumers remained at `e434f2fdfdd608f97cd4041af84062991d2645cf`. Use `Combobox`, with inline `creation` for values needing no metadata or dialog `creation` for caller-owned forms and persistence. |
## Updating the ledger
diff --git a/frontend/src/components/V3_MIGRATION.md b/frontend/src/components/V3_MIGRATION.md
index a4534b0875..afca83dbb9 100644
--- a/frontend/src/components/V3_MIGRATION.md
+++ b/frontend/src/components/V3_MIGRATION.md
@@ -118,7 +118,7 @@ All source anchors in this surface table are relative to `frontend/src/`. Refres
- `components/integrations/NoEnvironmentsBanner.tsx`, `components/navigation/SecretDashboardPathBreadcrumb.tsx`, and `components/tags/CreateTagModal/CreateTagModal.tsx` are V2-dependent feature wrappers with no consuming module/symbol references at the baseline. Reverify and delete their unused implementation/export closure in a separate focused unit. The known outside-path completion gate includes these files.
- `pages/secret-manager/OverviewPage/components/SecretSearchInput/SecretSearchInput.tsx` and its barrel are an old Headless UI search control. Its sibling quick-search components are also consumed by the newer `ResourceSearchInput`; preserve those workflows while removing or replacing the old control.
- `legacy.css`, imported by `index.css`, is the legacy palette. Migrate all remaining utility consumers before deleting it; deleting V2 React files alone is not a token cleanup proof.
-- V3 `ReactSelect` is an independently implemented, token-based compatibility family, not a wrapper importing V2. Its deprecated status does not make every current consumer a V2 import. Do not use it as a cosmetic shortcut to avoid verifying Combobox behavior. Record custom option/group/creation/portal contracts and any replacement work before retiring `react-select`.
+- The V3 `ReactSelect` compatibility family (`FilterableSelect`, `CreatableSelect`) is deleted. Its consumers moved to `Combobox`, and none remained at `e434f2fdfdd608f97cd4041af84062991d2645cf`. The `react-select` package itself still has direct importers outside that directory; retire it only after those are gone.
- V3 `SecretInput`, `InfisicalSecretInput`, `SecretPathInput`, and `PasswordGenerator` have their own implementations. Compare security-sensitive behavior, not names. Removing unused V2 Editor/PasswordGenerator does not certify every active V3 editor flow.
- API/data versions such as `hooks/api/secretRotationsV2`, `BillingV2Page`, `PkiAlertsV2Page`, backend secret-v2 services and migration files are not automatically legacy UI. Their actual UI imports and implementations remain in scope; their legitimate API versions are not renamed.
- Third-party Radix, Lexical, Lottie, Font Awesome and react-select packages have current non-V2 consumers. A dependency is deleted only after its remaining ownership is proved; no package-name-based purge.
diff --git a/frontend/src/components/v3/generic/Combobox/Combobox.tsx b/frontend/src/components/v3/generic/Combobox/Combobox.tsx
index bbc395d4b6..714c3c9261 100644
--- a/frontend/src/components/v3/generic/Combobox/Combobox.tsx
+++ b/frontend/src/components/v3/generic/Combobox/Combobox.tsx
@@ -1725,7 +1725,7 @@ const MultipleCombobox = <TOption,>({
/**
* Searchable object select built on Base UI. Use `multiple` for the chips-based
- * multi-select contract while legacy `FilterableSelect` consumers migrate incrementally.
+ * multi-select contract.
* Options are filtered in the browser unless `onSearchChange` is passed, which hands
* filtering to the caller so the list can be fetched a page at a time.
*/
diff --git a/frontend/src/components/v3/generic/RadioGroup/RadioGroup.stories.tsx b/frontend/src/components/v3/generic/RadioGroup/RadioGroup.stories.tsx
index 64cff6dda3..190cf60f45 100644
--- a/frontend/src/components/v3/generic/RadioGroup/RadioGroup.stories.tsx
+++ b/frontend/src/components/v3/generic/RadioGroup/RadioGroup.stories.tsx
@@ -27,7 +27,7 @@ import { RadioGroup, RadioGroupItem } from "./RadioGroup";
*
* Reach for `RadioGroup` for short, mutually-exclusive choices that benefit
* from showing every option at once. For long lists, use `Select` (or
- * `FilterableSelect` once the list gets searchable). For multi-select,
+ * `Combobox` once the list gets searchable). For multi-select,
* `Checkbox` rows in a `FieldSet`.
*/
const meta = {
diff --git a/frontend/src/components/v3/generic/ReactSelect/CreatableSelect.stories.tsx b/frontend/src/components/v3/generic/ReactSelect/CreatableSelect.stories.tsx
deleted file mode 100644
index 5f8a7e9d5c..0000000000
--- a/frontend/src/components/v3/generic/ReactSelect/CreatableSelect.stories.tsx
+++ /dev/null
@@ -1,232 +0,0 @@
-import { useState } from "react";
-import type { Meta, StoryObj } from "@storybook/react-vite";
-
-import { Field, FieldDescription, FieldError, FieldLabel } from "../Field";
-import { CreatableSelect } from "./CreatableSelect";
-
-type Option = { label: string; value: string };
-
-const TAG_OPTIONS: Option[] = [
- { label: "production", value: "production" },
- { label: "staging", value: "staging" },
- { label: "rotation-required", value: "rotation-required" },
- { label: "compliance", value: "compliance" },
- { label: "audit", value: "audit" }
-];
-
-const slugRegex = /^[a-z][a-z0-9-]*$/;
-
-/**
- * `CreatableSelect` is the deprecated react-select compatibility path for
- * existing inline-creation consumers. New and migrated code should use
- * `Combobox` with its `creation` config.
- *
- * Inherits `FilterableSelect`'s state and styling, plus react-select-creatable's
- * extras for managing inline creation:
- * - **`onCreateOption(input)`** — called when the user creates a new value.
- * Persist it (e.g. via a mutation), then add it to the option list.
- * - **`isValidNewOption(input)`** — gate creation on a validator (slug shape,
- * length, uniqueness). Return `false` to hide the Create suggestion.
- * - **`formatCreateLabel(input)`** — customize the suggestion text.
- *
- * Keep this component only where a consumer still depends on react-select-specific
- * component overrides. Migrate those customizations to Combobox composition before
- * removing the compatibility path.
- */
-const meta = {
- title: "Generic/CreatableSelect",
- component: CreatableSelect,
- parameters: {
- layout: "centered"
- },
- tags: ["autodocs", "deprecated"],
- decorators: [
- (Story) => (
- <div className="h-52 w-96">
- <Story />
- </div>
- )
- ],
- globals: {
- backgrounds: { value: "card" }
- }
-} satisfies Meta<typeof CreatableSelect>;
-
-export default meta;
-type Story = StoryObj<typeof meta>;
-
-function DefaultRender() {
- const [options, setOptions] = useState<Option[]>(TAG_OPTIONS);
- const [value, setValue] = useState<Option | null>(null);
- return (
- <CreatableSelect
- value={value}
- onChange={(next) => setValue(next as Option | null)}
- options={options}
- onCreateOption={(input) => {
- const next = { label: input, value: input };
- setOptions([...options, next]);
- setValue(next);
- }}
- placeholder="Pick or create a tag..."
- />
- );
-}
-
-export const Default: Story = {
- parameters: {
- docs: {
- description: {
- story:
- "Baseline creatable single-select. Type a value not in the list and the menu offers a Create suggestion; selecting it triggers `onCreateOption(input)` so the parent can persist the new value and append it to the option list."
- }
- }
- },
- render: () => <DefaultRender />
-};
-
-function MultiRender() {
- const [options, setOptions] = useState<Option[]>(TAG_OPTIONS);
- const [value, setValue] = useState<Option[]>([]);
- return (
- <CreatableSelect
- isMulti
- value={value}
- onChange={(next) => setValue([...((next ?? []) as Option[])])}
- options={options}
- onCreateOption={(input) => {
- const next = { label: input, value: input };
- setOptions([...options, next]);
- setValue([...value, next]);
- }}
- placeholder="Pick or create tags..."
- />
- );
-}
-
-export const Multi: Story = {
- name: "Variant: Multi",
- parameters: {
- docs: {
- description: {
- story:
- "Pass `isMulti` for the canonical tag-input experience — pick existing tags from the menu, type a new one and hit Enter to create it. Each selection renders as a removable chip; created entries persist in the option list so the next user sees them."
- }
- }
- },
- render: () => <MultiRender />
-};
-
-export const Disabled: Story = {
- name: "State: Disabled",
- parameters: {
- docs: {
- description: {
- story:
- "Pass `isDisabled` to block opening the menu and creating new entries. Use when the field is contextually locked (no permission to edit tags, locked by policy)."
- }
- }
- },
- render: () => (
- <CreatableSelect
- isDisabled
- isMulti
- defaultValue={[TAG_OPTIONS[0], TAG_OPTIONS[3]]}
- options={TAG_OPTIONS}
- />
- )
-};
-
-export const WithError: Story = {
- name: "State: Error",
- parameters: {
- docs: {
- description: {
- story:
- "Setting `isError` paints the danger border + ring and announces the error to assistive tech, matching `Input`'s error contract. Always pair with a `FieldError` so sighted users get the explanation — see *Example: With Validation Error*."
- }
- }
- },
- render: () => (
- <CreatableSelect isError isMulti options={TAG_OPTIONS} placeholder="Pick or create tags..." />
- )
-};
-
-function WithValidationErrorRender() {
- const [value, setValue] = useState<Option[]>([]);
- const isInvalid = value.length === 0;
- return (
- <Field>
- <FieldLabel htmlFor="creatable-error">Tags</FieldLabel>
- <CreatableSelect
- inputId="creatable-error"
- isMulti
- value={value}
- onChange={(next) => setValue([...((next ?? []) as Option[])])}
- options={TAG_OPTIONS}
- isError={isInvalid}
- placeholder="Pick or create tags..."
- />
- {isInvalid && <FieldError>Add at least one tag.</FieldError>}
- </Field>
- );
-}
-
-export const WithValidationError: Story = {
- name: "Example: With Validation Error",
- parameters: {
- docs: {
- description: {
- story:
- "The standard validation pattern: `isError` on the control + a `FieldError` below it. The error clears as soon as the user picks (or creates) a value."
- }
- }
- },
- render: () => <WithValidationErrorRender />
-};
-
-function ValidatedCreationRender() {
- const [options, setOptions] = useState<Option[]>(TAG_OPTIONS);
- const [value, setValue] = useState<Option[]>([]);
- return (
- <Field>
- <FieldLabel htmlFor="creatable-tags">Tags</FieldLabel>
- <CreatableSelect
- inputId="creatable-tags"
- isMulti
- value={value}
- onChange={(next) => setValue([...((next ?? []) as Option[])])}
- options={options}
- isValidNewOption={(input) =>
- slugRegex.test(input) && !options.some((o) => o.value === input)
- }
- formatCreateLabel={(input) => `Create tag "${input}"`}
- noOptionsMessage={({ inputValue }) =>
- inputValue ? "Tags must be lowercase slugs (a–z, 0–9, hyphen)" : "No tags yet"
- }
- onCreateOption={(input) => {
- const next = { label: input, value: input };
- setOptions([...options, next]);
- setValue([...value, next]);
- }}
- placeholder="Pick or create tags..."
- />
- <FieldDescription>
- Tag slugs must start with a letter and contain only lowercase letters, numbers, and hyphens.
- </FieldDescription>
- </Field>
- );
-}
-
-export const ValidatedCreation: Story = {
- name: "Example: Validated Creation",
- parameters: {
- docs: {
- description: {
- story:
- "Pass `isValidNewOption` to gate inline creation — return `false` to hide the Create suggestion until the user types a valid value. Pair with `noOptionsMessage` to explain *why* the input is rejected, and `formatCreateLabel` to customize the suggestion text. This is the canonical secret-tag input from the secret-manager UI."
- }
- }
- },
- render: () => <ValidatedCreationRender />
-};
diff --git a/frontend/src/components/v3/generic/ReactSelect/CreatableSelect.tsx b/frontend/src/components/v3/generic/ReactSelect/CreatableSelect.tsx
deleted file mode 100644
index 58d8eb5bb8..0000000000
--- a/frontend/src/components/v3/generic/ReactSelect/CreatableSelect.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import { GroupBase } from "react-select";
-import ReactSelectCreatable, { CreatableProps } from "react-select/creatable";
-
-import {
- ClearIndicator,
- DropdownIndicator,
- MenuList,
- MultiValueRemove,
- Option
-} from "./components";
-import { getSelectClassNames, selectClassNames, selectStyles } from "./styles";
-
-/**
- * @deprecated Use `Combobox` with its `creation` config. Keep this compatibility
- * path for consumers that still depend on react-select-specific component overrides.
- */
-export const CreatableSelect = <T,>({
- isMulti,
- closeMenuOnSelect,
- isError,
- components,
- menuPortalTarget = typeof document === "undefined" ? undefined : document.body,
- menuPosition = "fixed",
- ...props
-}: CreatableProps<T, boolean, GroupBase<T>> & { isError?: boolean }) => {
- return (
- <ReactSelectCreatable
- isMulti={isMulti}
- closeMenuOnSelect={closeMenuOnSelect ?? !isMulti}
- hideSelectedOptions={false}
- unstyled
- data-slot="creatable-select"
- menuPortalTarget={menuPortalTarget}
- menuPosition={menuPosition}
- styles={selectStyles as any}
- components={{
- DropdownIndicator,
- ClearIndicator,
- MenuList,
- MultiValueRemove,
- Option,
- ...components
- }}
- classNames={(isError ? getSelectClassNames(isError) : selectClassNames) as any}
- {...props}
- />
- );
-};
diff --git a/frontend/src/components/v3/generic/ReactSelect/FilterableSelect.stories.tsx b/frontend/src/components/v3/generic/ReactSelect/FilterableSelect.stories.tsx
deleted file mode 100644
index f1f545dd40..0000000000
--- a/frontend/src/components/v3/generic/ReactSelect/FilterableSelect.stories.tsx
+++ /dev/null
@@ -1,271 +0,0 @@
-import { useState } from "react";
-import { components, OptionProps } from "react-select";
-import type { Meta, StoryObj } from "@storybook/react-vite";
-import { InfoIcon } from "lucide-react";
-
-import { Field, FieldDescription, FieldError, FieldLabel } from "../Field";
-import { Tooltip, TooltipContent, TooltipTrigger } from "../Tooltip";
-import { FilterableSelect } from "./FilterableSelect";
-
-type Option = { label: string; value: string };
-type RegionOption = Option & { region: string };
-type PolicyOption = Option & { description: string };
-
-const ENVIRONMENT_OPTIONS: Option[] = [
- { label: "Development", value: "dev" },
- { label: "Staging", value: "staging" },
- { label: "QA", value: "qa" },
- { label: "Production", value: "prod" },
- { label: "Disaster Recovery", value: "dr" }
-];
-
-const REGION_OPTIONS: RegionOption[] = [
- { label: "us-east-1 (N. Virginia)", value: "us-east-1", region: "Americas" },
- { label: "us-west-2 (Oregon)", value: "us-west-2", region: "Americas" },
- { label: "ca-central-1 (Montréal)", value: "ca-central-1", region: "Americas" },
- { label: "eu-west-1 (Ireland)", value: "eu-west-1", region: "Europe" },
- { label: "eu-central-1 (Frankfurt)", value: "eu-central-1", region: "Europe" },
- { label: "ap-south-1 (Mumbai)", value: "ap-south-1", region: "Asia Pacific" },
- { label: "ap-southeast-1 (Singapore)", value: "ap-southeast-1", region: "Asia Pacific" }
-];
-
-const POLICY_OPTIONS: PolicyOption[] = [
- {
- label: "Secret Viewing Policies",
- value: "secret-viewer",
- description: "Grants read access to secrets and related resources"
- },
- {
- label: "Secret Editing Policies",
- value: "secret-editor",
- description: "Grants read and edit access to secrets and related resources"
- }
-];
-
-const PolicyOptionRow = ({ children, ...props }: OptionProps<PolicyOption>) => (
- <components.Option {...props}>
- <div className="flex items-center justify-between gap-2">
- <div className="min-w-0 flex-1">
- <p className="truncate">{children}</p>
- <p className="text-xs text-muted">{props.data.description}</p>
- </div>
- <Tooltip defaultOpen={props.data.value === "secret-viewer"}>
- <TooltipTrigger type="button" aria-label={`View ${props.data.label}`}>
- <InfoIcon className="size-4 text-muted" />
- </TooltipTrigger>
- <TooltipContent side="left">Secrets: Read</TooltipContent>
- </Tooltip>
- </div>
- </components.Option>
-);
-
-/**
- * > Deprecated: Use [Combobox](?path=/docs/generic-combobox--docs) instead.
- *
- * `FilterableSelect` is the v3 react-select-based dropdown for searchable
- * single or multi selection over a known set of options. Reach for it when the
- * option list is too long for the Radix-based `Select` (which has no search)
- * but doesn't need users to add new entries — for that, see `CreatableSelect`.
- *
- * Pass options as `{ label, value }[]`. Use `isMulti` for multi-select; pass
- * `groupBy` (a key on each option) and optionally `getGroupHeaderLabel` to
- * bucket options into headed groups.
- *
- * Errors flip via the `isError` prop, matching `Input` and `Select`. For
- * labels and helper text, compose with `Field` / `FieldLabel` /
- * `FieldDescription` / `FieldError` — same pattern as the rest of the v3 form
- * primitives.
- */
-const meta = {
- title: "Generic/FilterableSelect",
- component: FilterableSelect,
- parameters: {
- layout: "centered"
- },
- tags: ["autodocs", "deprecated"],
- decorators: [
- (Story) => (
- <div className="h-52 w-96">
- <Story />
- </div>
- )
- ],
- globals: {
- backgrounds: { value: "card" }
- }
-} satisfies Meta<typeof FilterableSelect>;
-
-export default meta;
-type Story = StoryObj<typeof meta>;
-
-export const Default: Story = {
- parameters: {
- docs: {
- description: {
- story:
- "Baseline single-select with a searchable list. Type in the field to filter options; click or hit Enter to select. Reach for this over the Radix-based `Select` whenever the option list is long enough that a user would want search."
- }
- }
- },
- render: () => (
- <FilterableSelect options={ENVIRONMENT_OPTIONS} placeholder="Choose an environment..." />
- )
-};
-
-export const Multi: Story = {
- name: "Variant: Multi",
- parameters: {
- docs: {
- description: {
- story:
- "Pass `isMulti` to allow selecting multiple options. The chosen values render as removable chips inside the control; `closeMenuOnSelect` defaults to `false` in this mode so the user can pick several without re-opening the menu."
- }
- }
- },
- render: () => (
- <FilterableSelect isMulti options={ENVIRONMENT_OPTIONS} placeholder="Choose environments..." />
- )
-};
-
-export const Disabled: Story = {
- name: "State: Disabled",
- parameters: {
- docs: {
- description: {
- story:
- "Pass `isDisabled` to block opening the menu and dim the control. Use when the field is contextually unavailable (no entitlement, dependent on another field, locked by policy)."
- }
- }
- },
- render: () => (
- <FilterableSelect
- isDisabled
- defaultValue={ENVIRONMENT_OPTIONS[3]}
- options={ENVIRONMENT_OPTIONS}
- />
- )
-};
-
-export const Loading: Story = {
- name: "State: Loading",
- parameters: {
- docs: {
- description: {
- story:
- "Pass `isLoading` while the option list is fetching. The control still opens but shows a loading indicator instead of options. Useful for selects whose options come from an async query."
- }
- }
- },
- render: () => <FilterableSelect isLoading options={[]} placeholder="Loading regions..." />
-};
-
-export const WithError: Story = {
- name: "State: Error",
- parameters: {
- docs: {
- description: {
- story:
- "Setting `isError` paints the danger border + ring and announces the error to assistive tech, matching `Input`'s error contract. Always pair with a `FieldError` so sighted users get the explanation — see *Example: With Validation Error*."
- }
- }
- },
- render: () => (
- <FilterableSelect
- isError
- options={ENVIRONMENT_OPTIONS}
- placeholder="Choose an environment..."
- />
- )
-};
-
-export const Grouped: Story = {
- name: "Example: Grouped",
- parameters: {
- docs: {
- description: {
- story:
- "Pass `groupBy` (a key on each option) and the dropdown buckets options under that key's value. Optionally pass `getGroupHeaderLabel` to format the heading text. The grouping is purely visual — values must still be unique across the whole menu."
- }
- }
- },
- render: () => (
- <FilterableSelect options={REGION_OPTIONS} groupBy="region" placeholder="Choose a region..." />
- )
-};
-
-export const WithTooltipOption: Story = {
- name: "Example: Tooltip Inside Menu",
- parameters: {
- docs: {
- description: {
- story:
- "Option content can open a portaled tooltip above the select menu. This composition documents the overlay order used when an option needs secondary detail."
- }
- }
- },
- render: () => (
- <FilterableSelect
- menuIsOpen
- options={POLICY_OPTIONS}
- placeholder="Select additional privileges..."
- components={{ Option: PolicyOptionRow }}
- />
- )
-};
-
-export const WithLabel: Story = {
- name: "Example: With Label",
- parameters: {
- docs: {
- description: {
- story:
- "Wrap in a `Field` with `FieldLabel` for the minimum accessible pairing. Pass `inputId` so the label points at the inner input — clicking the label focuses the search box rather than opening the menu."
- }
- }
- },
- render: () => (
- <Field>
- <FieldLabel htmlFor="filterable-region">Default region</FieldLabel>
- <FilterableSelect
- inputId="filterable-region"
- options={REGION_OPTIONS}
- placeholder="Choose a region..."
- />
- <FieldDescription>
- New projects in this org will deploy here unless overridden at create time.
- </FieldDescription>
- </Field>
- )
-};
-
-function WithValidationErrorRender() {
- const [value, setValue] = useState<Option | null>(null);
- const isInvalid = !value;
- return (
- <Field>
- <FieldLabel htmlFor="filterable-error">Environment</FieldLabel>
- <FilterableSelect
- inputId="filterable-error"
- value={value}
- onChange={(next) => setValue(next as Option | null)}
- options={ENVIRONMENT_OPTIONS}
- isError={isInvalid}
- placeholder="Choose an environment..."
- />
- {isInvalid && <FieldError>Environment is required.</FieldError>}
- </Field>
- );
-}
-
-export const WithValidationError: Story = {
- name: "Example: With Validation Error",
- parameters: {
- docs: {
- description: {
- story:
- "The standard validation pattern: `isError` on the control + a `FieldError` below it. The error clears as soon as the user picks a value."
- }
- }
- },
- render: () => <WithValidationErrorRender />
-};
diff --git a/frontend/src/components/v3/generic/ReactSelect/FilterableSelect.tsx b/frontend/src/components/v3/generic/ReactSelect/FilterableSelect.tsx
deleted file mode 100644
index 49ea42e895..0000000000
--- a/frontend/src/components/v3/generic/ReactSelect/FilterableSelect.tsx
+++ /dev/null
@@ -1,82 +0,0 @@
-import Select, { GroupBase, Props } from "react-select";
-
-import {
- ClearIndicator,
- DropdownIndicator,
- Group,
- MenuList,
- MultiValueRemove,
- Option
-} from "./components";
-import { getSelectClassNames, selectClassNames, selectStyles } from "./styles";
-
-/**
- * @deprecated Migrate searchable single- and multi-select callsites to `Combobox` when its
- * contract fits. Creatable, grouped, and advanced compatibility consumers remain supported.
- */
-export const FilterableSelect = <T,>({
- isMulti,
- closeMenuOnSelect,
- tabSelectsValue = false,
- groupBy = null,
- getGroupHeaderLabel = null,
- options = [],
- isError,
- components,
- menuPortalTarget = typeof document === "undefined" ? undefined : document.body,
- menuPosition = "fixed",
- ...props
-}: Props<T, boolean, GroupBase<T>> & {
- groupBy?: string | null;
- getGroupHeaderLabel?: ((groupValue: any) => string) | null;
- isError?: boolean;
-}) => {
- let processedOptions: Props<T, boolean, GroupBase<T>>["options"] = options;
-
- if (groupBy && Array.isArray(options)) {
- const groupedOptions = options.reduce<Record<string, { label: string; options: T[] }>>(
- (acc, option) => {
- const groupValue = (option as Record<string, any>)[groupBy];
- const groupKey = groupValue?.toString() || "undefined";
-
- if (!acc[groupKey]) {
- acc[groupKey] = {
- label: getGroupHeaderLabel ? getGroupHeaderLabel(groupValue) : groupValue,
- options: []
- };
- }
-
- acc[groupKey].options.push(option);
- return acc;
- },
- {}
- );
-
- processedOptions = Object.values(groupedOptions);
- }
-
- return (
- <Select<T, boolean, GroupBase<T>>
- isMulti={isMulti}
- closeMenuOnSelect={closeMenuOnSelect ?? !isMulti}
- hideSelectedOptions={false}
- unstyled
- options={processedOptions}
- tabSelectsValue={tabSelectsValue}
- menuPortalTarget={menuPortalTarget}
- menuPosition={menuPosition}
- styles={selectStyles as any}
- components={{
- DropdownIndicator,
- ClearIndicator,
- MenuList,
- MultiValueRemove,
- Option,
- Group,
- ...components
- }}
- classNames={(isError ? getSelectClassNames(isError) : selectClassNames) as any}
- {...props}
- />
- );
-};
diff --git a/frontend/src/components/v3/generic/ReactSelect/components.tsx b/frontend/src/components/v3/generic/ReactSelect/components.tsx
deleted file mode 100644
index 40d5d35185..0000000000
--- a/frontend/src/components/v3/generic/ReactSelect/components.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import {
- ClearIndicatorProps,
- components,
- DropdownIndicatorProps,
- GroupProps,
- MenuListProps,
- MultiValueRemoveProps,
- OptionProps
-} from "react-select";
-import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react";
-
-export const DropdownIndicator = <T,>(props: DropdownIndicatorProps<T>) => (
- <components.DropdownIndicator {...props}>
- <ChevronDownIcon />
- </components.DropdownIndicator>
-);
-
-export const ClearIndicator = <T,>(props: ClearIndicatorProps<T>) => (
- <components.ClearIndicator {...props}>
- <XIcon />
- </components.ClearIndicator>
-);
-
-export const MultiValueRemove = (props: MultiValueRemoveProps) => {
- // eslint-disable-next-line react/destructuring-assignment
- return props.selectProps?.isDisabled ? null : (
- <components.MultiValueRemove {...props}>
- <XIcon />
- </components.MultiValueRemove>
- );
-};
-
-export const Option = <T,>({ isSelected, children, ...props }: OptionProps<T>) => (
- <components.Option isSelected={isSelected} {...props}>
- <div className="flex cursor-pointer flex-row items-center justify-between">
- <p className="truncate">{children}</p>
- {isSelected && <CheckIcon className="ml-2 size-4 shrink-0" />}
- </div>
- </components.Option>
-);
-
-export const Group = <T,>(props: GroupProps<T>) => {
- return <components.Group {...props} />;
-};
-
-export const MenuList = <T,>({ innerProps, ...props }: MenuListProps<T>) => (
- <components.MenuList
- {...props}
- innerProps={{ ...innerProps, onWheel: (event) => event.stopPropagation() }}
- />
-);
diff --git a/frontend/src/components/v3/generic/ReactSelect/index.ts b/frontend/src/components/v3/generic/ReactSelect/index.ts
deleted file mode 100644
index 9e7cf986ff..0000000000
--- a/frontend/src/components/v3/generic/ReactSelect/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export { Option as ReactSelectOption } from "./components";
-export { CreatableSelect } from "./CreatableSelect";
-export { FilterableSelect } from "./FilterableSelect";
diff --git a/frontend/src/components/v3/generic/ReactSelect/styles.ts b/frontend/src/components/v3/generic/ReactSelect/styles.ts
deleted file mode 100644
index d33afe56b6..0000000000
--- a/frontend/src/components/v3/generic/ReactSelect/styles.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-import { ClassNamesConfig, GroupBase, StylesConfig } from "react-select";
-
-import { cn } from "../../utils";
-
-export const selectClassNames: ClassNamesConfig<unknown, boolean, GroupBase<unknown>> = {
- control: ({ isFocused, isDisabled }) =>
- cn(
- "!min-h-9 w-full cursor-pointer overflow-hidden rounded-md border border-border bg-transparent py-1 pr-1 pl-2 text-sm",
- isFocused && "border-ring ring-[3px] ring-ring/50",
- !isFocused && !isDisabled && "hover:border-foreground/20",
- isDisabled && "pointer-events-none cursor-not-allowed opacity-50"
- ),
- placeholder: () => "text-muted text-sm",
- input: () => "text-foreground text-sm",
- singleValue: () => "truncate pr-2 text-foreground",
- valueContainer: () =>
- "gap-1 max-h-40 !pointer-events-auto !overflow-y-auto thin-scrollbar flex-wrap",
- multiValue: () => "bg-foreground/10 rounded px-1.5 py-0.5 gap-1 text-xs items-center",
- multiValueLabel: () => "text-foreground/85",
- multiValueRemove: () =>
- "shrink-0 [&>svg]:size-3 [&>svg]:shrink-0 hover:text-danger text-muted cursor-pointer ml-0.5",
- menu: () => "my-2 w-full rounded-[6px] border border-border bg-popover p-1 shadow-md",
- menuList: () => "max-h-48 text-sm overflow-y-auto overscroll-contain thin-scrollbar",
- option: ({ isFocused }) =>
- cn(
- "cursor-pointer rounded-sm truncate px-2 py-1.5 text-sm text-foreground",
- isFocused && "bg-foreground/5"
- ),
- dropdownIndicator: () =>
- "opacity-50 p-1 hover:bg-foreground/10 cursor-pointer rounded-md [&>svg]:size-4 [&>svg]:shrink-0",
- indicatorsContainer: () => "gap-1 flex items-center text-foreground",
- indicatorSeparator: () => "bg-accent/20",
- clearIndicator: () =>
- "opacity-50 hover:opacity-100 hover:bg-foreground/10 cursor-pointer rounded-md p-1 text-danger [&>svg]:size-4 [&>svg]:shrink-0",
- noOptionsMessage: () => "text-muted p-2 text-sm",
- loadingMessage: () => "text-muted p-2 text-sm",
- group: () => "pb-1",
- groupHeading: () => "px-2 pt-2 pb-1 text-xs font-medium text-muted",
- menuPortal: () => "react-select-menu-portal"
-};
-
-export const selectStyles: StylesConfig<unknown, boolean, GroupBase<unknown>> = {
- control: (base) => ({ ...base, minHeight: "unset" }),
- input: (base) => ({
- ...base,
- "input:focus": {
- boxShadow: "none"
- }
- }),
- multiValueLabel: (base) => ({
- ...base,
- whiteSpace: "normal",
- overflow: "visible"
- }),
- menuPortal: (provided) => ({
- ...provided,
- zIndex: "var(--z-index-combobox)",
- pointerEvents: "auto"
- })
-};
-
-export const getSelectClassNames = (
- isError?: boolean
-): ClassNamesConfig<unknown, boolean, GroupBase<unknown>> => ({
- ...selectClassNames,
- control: ({ isFocused, isDisabled }) =>
- cn(
- "!min-h-9 w-full cursor-pointer overflow-hidden rounded-md border border-border bg-transparent py-1 pr-1 pl-2 text-sm",
- // eslint-disable-next-line no-nested-ternary
- isError
- ? isFocused
- ? "border-danger ring-[3px] ring-danger/40"
- : "border-danger"
- : isFocused
- ? "border-ring ring-[3px] ring-ring/50"
- : !isDisabled && "hover:border-foreground/20",
- isDisabled && "pointer-events-none cursor-not-allowed opacity-50"
- )
-});
diff --git a/frontend/src/components/v3/generic/Select/Select.stories.tsx b/frontend/src/components/v3/generic/Select/Select.stories.tsx
index 9222d2f779..9fdeec62db 100644
--- a/frontend/src/components/v3/generic/Select/Select.stories.tsx
+++ b/frontend/src/components/v3/generic/Select/Select.stories.tsx
@@ -34,8 +34,8 @@ import {
* you would for `Input` — the `id` belongs on the **trigger**, not the root.
*
* Reach for `Select` when the option list is short and known. For searchable
- * object lists, multi-selects, or grouped options, use `Combobox`. Creatable
- * use cases remain on `ReactSelect` until their replacement API is introduced.
+ * object lists, multi-selects, grouped options, or creatable values, use
+ * `Combobox`.
* `Select` is single-value by design.
*/
const meta = {
diff --git a/frontend/src/components/v3/generic/index.ts b/frontend/src/components/v3/generic/index.ts
index ff998862fd..82b5a291a1 100644
--- a/frontend/src/components/v3/generic/index.ts
+++ b/frontend/src/components/v3/generic/index.ts
@@ -35,7 +35,6 @@ export * from "./Loader";
export * from "./Pagination";
export * from "./Popover";
export * from "./RadioGroup";
-export * from "./ReactSelect";
export * from "./ScrollableContent";
export * from "./Select";
export * from "./SelectedActionBar";