Skip to content

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

improvement(ui): migrate sync, alert and org settings pickers to Combobox (#8834)

Andrew Huang568982f32b12
diff --git a/frontend/src/components/honey-tokens/forms/HoneyTokenConfigurationFields.tsx b/frontend/src/components/honey-tokens/forms/HoneyTokenConfigurationFields.tsx
index f91b95e44b..046d613b9b 100644
--- a/frontend/src/components/honey-tokens/forms/HoneyTokenConfigurationFields.tsx
+++ b/frontend/src/components/honey-tokens/forms/HoneyTokenConfigurationFields.tsx
@@ -1,6 +1,6 @@
import { Controller, useFormContext } from "react-hook-form";
-import { Field, FieldContent, FieldError, FieldLabel, FilterableSelect } from "@app/components/v3";
+import { Combobox, Field, FieldContent, FieldError, FieldLabel } from "@app/components/v3";
import { ProjectEnv } from "@app/hooks/api/projects/types";
import { THoneyTokenForm } from "./schemas";
@@ -19,12 +19,14 @@ export const HoneyTokenConfigurationFields = ({ environments }: Props) => {
name="environment"
render={({ field: { value }, fieldState: { error } }) => (
<Field>
- <FieldLabel>Environment</FieldLabel>
+ <FieldLabel htmlFor="honey-token-environment">Environment</FieldLabel>
<FieldContent>
- <FilterableSelect
+ <Combobox
+ id="honey-token-environment"
value={value}
- onChange={(environment) =>
- setValue("environment", environment as ProjectEnv, {
+ isClearable={false}
+ onValueChange={(environment) =>
+ setValue("environment", environment, {
shouldDirty: true,
shouldTouch: true,
shouldValidate: true
@@ -32,8 +34,9 @@ export const HoneyTokenConfigurationFields = ({ environments }: Props) => {
}
options={environments}
placeholder="Select an environment..."
- getOptionLabel={(option) => option?.name}
- getOptionValue={(option) => option?.id}
+ getOptionLabel={(option) => option.name}
+ getOptionValue={(option) => option.id}
+ getOptionKeywords={(option) => [option.id]}
isError={Boolean(error)}
/>
</FieldContent>
diff --git a/frontend/src/components/pki-syncs/PaloAltoNetworksRemovalOptionsFields.tsx b/frontend/src/components/pki-syncs/PaloAltoNetworksRemovalOptionsFields.tsx
index ad806c98e8..c802b24d8a 100644
--- a/frontend/src/components/pki-syncs/PaloAltoNetworksRemovalOptionsFields.tsx
+++ b/frontend/src/components/pki-syncs/PaloAltoNetworksRemovalOptionsFields.tsx
@@ -1,9 +1,8 @@
-import { Field, FieldDescription, FieldLabel, FilterableSelect } from "@app/components/v3";
+import { useId } from "react";
+
+import { Combobox, Field, FieldDescription, FieldLabel } from "@app/components/v3";
import { getPaloAltoNetworksProfileLabel } from "@app/helpers/pkiSyncs";
-import {
- TPaloAltoNetworksCertificate,
- usePaloAltoNetworksConnectionListCertificates
-} from "@app/hooks/api/appConnections/palo-alto-networks";
+import { usePaloAltoNetworksConnectionListCertificates } from "@app/hooks/api/appConnections/palo-alto-networks";
import { TPkiSyncRemovalOptions, useListPkiSyncCertificates } from "@app/hooks/api/pkiSyncs";
import { TPaloAltoNetworksSslTlsProfilePkiSync } from "@app/hooks/api/pkiSyncs/types";
@@ -22,6 +21,7 @@ export const PaloAltoNetworksRemovalOptionsFields = ({
value,
onChange
}: Props) => {
+ const id = useId();
const { data: certificates = [], isPending } = usePaloAltoNetworksConnectionListCertificates(
connectionId,
destinationConfig.template
@@ -42,22 +42,20 @@ export const PaloAltoNetworksRemovalOptionsFields = ({
return (
<Field>
- <FieldLabel>Replacement Certificate</FieldLabel>
- <FilterableSelect
- isClearable
+ <FieldLabel htmlFor={id}>Replacement Certificate</FieldLabel>
+ <Combobox
+ id={id}
isLoading={isPending || isSyncCertificatesPending}
options={options}
value={selected ?? null}
- onChange={(option) =>
+ onValueChange={(option) =>
onChange({
...value,
- replacementCertificateName: (option as TPaloAltoNetworksCertificate | null)?.name
+ replacementCertificateName: option?.name
})
}
- getOptionLabel={(option) =>
- getPaloAltoNetworksProfileLabel(option as TPaloAltoNetworksCertificate)
- }
- getOptionValue={(option) => (option as TPaloAltoNetworksCertificate).name}
+ getOptionLabel={(option) => getPaloAltoNetworksProfileLabel(option)}
+ getOptionValue={(option) => option.name}
placeholder="Select a certificate on the device"
/>
<FieldDescription>
diff --git a/frontend/src/components/pki-syncs/forms/CloudflareCustomCertificatePkiSyncFields.tsx b/frontend/src/components/pki-syncs/forms/CloudflareCustomCertificatePkiSyncFields.tsx
index 001a99e733..08935a952a 100644
--- a/frontend/src/components/pki-syncs/forms/CloudflareCustomCertificatePkiSyncFields.tsx
+++ b/frontend/src/components/pki-syncs/forms/CloudflareCustomCertificatePkiSyncFields.tsx
@@ -1,20 +1,16 @@
import { Controller, useFormContext } from "react-hook-form";
-import { SingleValue } from "react-select";
import { Info } from "lucide-react";
import {
+ Combobox,
Field,
FieldError,
FieldLabel,
- FilterableSelect,
Tooltip,
TooltipContent,
TooltipTrigger
} from "@app/components/v3";
-import {
- TCloudflareZone,
- useCloudflareConnectionListZones
-} from "@app/hooks/api/appConnections/cloudflare";
+import { useCloudflareConnectionListZones } from "@app/hooks/api/appConnections/cloudflare";
import { PkiSync } from "@app/hooks/api/pkiSyncs";
import { TPkiSyncForm } from "./schemas/pki-sync-schema";
@@ -47,7 +43,7 @@ export const CloudflareCustomCertificatePkiSyncFields = () => {
control={control}
render={({ field: { value, onChange }, fieldState: { error } }) => (
<Field className="mb-4">
- <FieldLabel>
+ <FieldLabel htmlFor="pki-sync-cloudflare-zone">
Zone
<Tooltip>
<TooltipTrigger asChild>
@@ -59,20 +55,23 @@ export const CloudflareCustomCertificatePkiSyncFields = () => {
</TooltipContent>
</Tooltip>
</FieldLabel>
- <FilterableSelect
+ <Combobox
+ id="pki-sync-cloudflare-zone"
isLoading={isZonesLoading && !!connectionId}
isDisabled={!connectionId}
value={
zones.find((zone) => zone.id === value) ||
(value ? { id: value, name: value } : null)
}
- onChange={(option) => {
- onChange((option as SingleValue<TCloudflareZone>)?.id ?? "");
+ isClearable={false}
+ onValueChange={(option) => {
+ onChange(option.id);
}}
options={zones}
placeholder={connectionId ? "Select a zone..." : "Select a connection first"}
getOptionLabel={(option) => option.name}
getOptionValue={(option) => option.id}
+ getOptionKeywords={(option) => [option.id]}
isError={Boolean(error)}
/>
<FieldError errors={[error]} />
diff --git a/frontend/src/components/pki-syncs/forms/GcpCertificateManagerPkiSyncFields.tsx b/frontend/src/components/pki-syncs/forms/GcpCertificateManagerPkiSyncFields.tsx
index ea95ac8533..db9e659292 100644
--- a/frontend/src/components/pki-syncs/forms/GcpCertificateManagerPkiSyncFields.tsx
+++ b/frontend/src/components/pki-syncs/forms/GcpCertificateManagerPkiSyncFields.tsx
@@ -1,15 +1,14 @@
import { Controller, FieldError as TFieldError, useFormContext, useWatch } from "react-hook-form";
-import { SingleValue } from "react-select";
import { AxiosError } from "axios";
import { Info, Loader2Icon } from "lucide-react";
import {
+ Combobox,
Field,
FieldContent,
FieldDescription,
FieldError,
FieldLabel,
- FilterableSelect,
Input,
Label,
Select,
@@ -27,7 +26,6 @@ import {
useGcpConnectionListCertificateManagerProjects,
useGcpConnectionListCertificateMaps
} from "@app/hooks/api/appConnections/gcp/queries";
-import { TGcpCertificateMap } from "@app/hooks/api/appConnections/gcp/types";
import { GcpCertificateManagerScope, PkiSync } from "@app/hooks/api/pkiSyncs";
import {
GCP_CERTIFICATE_MANAGER_GLOBAL_LOCATION,
@@ -339,15 +337,13 @@ export const GcpCertificateManagerPkiSyncFields = ({ isUpdate }: Props) => {
return (
<Field className="mb-4">
- <FieldLabel>Certificate Map</FieldLabel>
+ <FieldLabel htmlFor="gcp-certificate-map">Certificate Map</FieldLabel>
<FieldContent>
- <FilterableSelect
- isClearable
+ <Combobox
+ id="gcp-certificate-map"
isLoading={isLoadingCertificateMaps}
value={certificateMaps?.find((map) => map.name === value) ?? null}
- onChange={(option) =>
- onChange((option as SingleValue<TGcpCertificateMap>)?.name ?? "")
- }
+ onValueChange={(option) => onChange(option?.name ?? "")}
options={certificateMaps ?? []}
getOptionLabel={(option) => option.name}
getOptionValue={(option) => option.name}
diff --git a/frontend/src/components/pki-syncs/forms/KempLoadMasterPkiSyncFields.tsx b/frontend/src/components/pki-syncs/forms/KempLoadMasterPkiSyncFields.tsx
index 00b53dc592..62b8c6cc65 100644
--- a/frontend/src/components/pki-syncs/forms/KempLoadMasterPkiSyncFields.tsx
+++ b/frontend/src/components/pki-syncs/forms/KempLoadMasterPkiSyncFields.tsx
@@ -2,10 +2,10 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";
import { Info } from "lucide-react";
import {
+ Combobox,
Field,
FieldError,
FieldLabel,
- FilterableSelect,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -40,7 +40,7 @@ export const KempLoadMasterPkiSyncFields = () => {
control={control}
render={({ field: { value, onChange }, fieldState: { error } }) => (
<Field className="mb-4">
- <FieldLabel>
+ <FieldLabel htmlFor="pki-sync-kemp-virtual-service">
Virtual Service <span className="text-muted">(optional)</span>
<Tooltip>
<TooltipTrigger asChild>
@@ -52,15 +52,16 @@ export const KempLoadMasterPkiSyncFields = () => {
</TooltipContent>
</Tooltip>
</FieldLabel>
- <FilterableSelect
+ <Combobox
+ id="pki-sync-kemp-virtual-service"
isDisabled={!connectionId}
isLoading={Boolean(connectionId) && isLoadingVirtualServices}
- isClearable
options={virtualServices}
value={virtualServices.find((vs) => vs.id === value) ?? null}
- onChange={(option) => onChange((option as TKempVirtualService | null)?.id)}
- getOptionLabel={(option) => getVirtualServiceLabel(option as TKempVirtualService)}
- getOptionValue={(option) => (option as TKempVirtualService).id}
+ onValueChange={(option) => onChange(option?.id)}
+ getOptionLabel={(option) => getVirtualServiceLabel(option)}
+ getOptionValue={(option) => option.id}
+ getOptionKeywords={(option) => [option.id]}
placeholder={
connectionId
? "Leave unset to import certificate only"
diff --git a/frontend/src/components/pki-syncs/forms/PaloAltoNetworksPkiSyncFields.tsx b/frontend/src/components/pki-syncs/forms/PaloAltoNetworksPkiSyncFields.tsx
index 44db1685fd..f5c6c2c747 100644
--- a/frontend/src/components/pki-syncs/forms/PaloAltoNetworksPkiSyncFields.tsx
+++ b/frontend/src/components/pki-syncs/forms/PaloAltoNetworksPkiSyncFields.tsx
@@ -4,12 +4,12 @@ import { AxiosError } from "axios";
import { Info } from "lucide-react";
import {
+ Combobox,
Field,
FieldContent,
FieldDescription,
FieldError,
FieldLabel,
- FilterableSelect,
Label,
Spinner,
Toggle,
@@ -139,7 +139,7 @@ export const PaloAltoNetworksPkiSyncFields = ({
control={control}
render={({ field: { value, onChange }, fieldState: { error } }) => (
<Field className="mb-4">
- <FieldLabel>
+ <FieldLabel htmlFor="palo-alto-networks-template">
Template
<Tooltip>
<TooltipTrigger asChild>
@@ -151,16 +151,18 @@ export const PaloAltoNetworksPkiSyncFields = ({
</TooltipContent>
</Tooltip>
</FieldLabel>
- <FilterableSelect
+ <Combobox
+ id="palo-alto-networks-template"
options={templates.map((name) => ({ name }))}
value={value ? { name: value } : null}
- onChange={(option) => {
- onChange((option as { name: string } | null)?.name ?? "");
+ isClearable={false}
+ onValueChange={(option) => {
+ onChange(option.name);
clearErrors("destinationConfig.template");
clearProfile();
}}
- getOptionLabel={(option) => (option as { name: string }).name}
- getOptionValue={(option) => (option as { name: string }).name}
+ getOptionLabel={(option) => option.name}
+ getOptionValue={(option) => option.name}
placeholder="Select a template"
isError={Boolean(error)}
/>
@@ -171,7 +173,7 @@ export const PaloAltoNetworksPkiSyncFields = ({
)}
{withSslTlsServiceProfile && (
<Field className="mb-4">
- <FieldLabel>
+ <FieldLabel htmlFor="palo-alto-networks-ssl-tls-service-profile">
SSL/TLS Service Profile
<Tooltip>
<TooltipTrigger asChild>
@@ -183,27 +185,25 @@ export const PaloAltoNetworksPkiSyncFields = ({
</TooltipContent>
</Tooltip>
</FieldLabel>
- <FilterableSelect
+ <Combobox
+ id="palo-alto-networks-ssl-tls-service-profile"
isDisabled={!isProfileSelectReady}
isLoading={isLoadingProfiles}
options={profiles}
value={profileName ? { name: profileName, vsys: profileVsys ?? null } : null}
- onChange={(option) => {
- const profile = option as TPaloAltoNetworksSslTlsServiceProfile | null;
- setValue("destinationConfig.sslTlsServiceProfileVsys", profile?.vsys ?? "", {
+ isClearable={false}
+ onValueChange={(profile) => {
+ setValue("destinationConfig.sslTlsServiceProfileVsys", profile.vsys ?? "", {
shouldDirty: true
});
- setValue("destinationConfig.sslTlsServiceProfileName", profile?.name ?? "", {
+ setValue("destinationConfig.sslTlsServiceProfileName", profile.name, {
shouldDirty: true,
shouldValidate: true
});
}}
- getOptionLabel={(option) =>
- getPaloAltoNetworksProfileLabel(option as TPaloAltoNetworksSslTlsServiceProfile)
- }
- getOptionValue={(option) =>
- getProfileValue(option as TPaloAltoNetworksSslTlsServiceProfile)
- }
+ getOptionLabel={(option) => getPaloAltoNetworksProfileLabel(option)}
+ getOptionValue={(option) => getProfileValue(option)}
+ getOptionKeywords={(option) => [getProfileValue(option)]}
placeholder={profilePlaceholder}
isError={Boolean(profileError)}
/>
diff --git a/frontend/src/components/pki-syncs/forms/PkiSyncFilterFields.tsx b/frontend/src/components/pki-syncs/forms/PkiSyncFilterFields.tsx
index 05190a0f72..e25bb5e6d5 100644
--- a/frontend/src/components/pki-syncs/forms/PkiSyncFilterFields.tsx
+++ b/frontend/src/components/pki-syncs/forms/PkiSyncFilterFields.tsx
@@ -5,11 +5,11 @@ import { PlusIcon, TrashIcon, XIcon } from "lucide-react";
import {
Badge,
Button,
+ Combobox,
Field,
FieldContent,
FieldError,
FieldLabel,
- FilterableSelect,
HoverCard,
HoverCardContent,
HoverCardTrigger,
@@ -169,19 +169,24 @@ export const PkiSyncFilterFields = ({ applicationId, orderNameById, onOpenPicker
const renderBody = (kind: TFilterKind) => {
if (kind === "profileIds") {
return (
- <FilterableSelect
- isMulti
+ <Combobox
+ id="pki-sync-filter-profile-ids"
+ multiple
placeholder="Select profiles"
+ searchAriaLabel="Search profiles"
options={profileOptions}
value={profileOptions.filter((option) =>
(filters.profileIds ?? []).includes(option.value)
)}
- onChange={(options) =>
+ onValueChange={(options) =>
setFilter(
"profileIds",
- ((options as TProfileOption[]) ?? []).map((option) => option.value)
+ options.map((option) => option.value)
)
}
+ getOptionLabel={(option) => option.label}
+ getOptionValue={(option) => option.value}
+ getOptionKeywords={(option) => [option.value]}
/>
);
}
@@ -265,7 +270,12 @@ export const PkiSyncFilterFields = ({ applicationId, orderNameById, onOpenPicker
)}
<div className="flex items-start gap-3">
<Field className="min-w-0 flex-1">
- <FieldLabel className="text-xs">{FILTER_LABELS[kind]}</FieldLabel>
+ <FieldLabel
+ className="text-xs"
+ htmlFor={kind === "profileIds" ? "pki-sync-filter-profile-ids" : undefined}
+ >
+ {FILTER_LABELS[kind]}
+ </FieldLabel>
<FieldContent>{renderBody(kind)}</FieldContent>
</Field>
{kind !== "metadata" && (
diff --git a/frontend/src/components/pki-syncs/forms/PkiSyncTargetHostField.tsx b/frontend/src/components/pki-syncs/forms/PkiSyncTargetHostField.tsx
index 1250bb8e86..09c1f6e1f5 100644
--- a/frontend/src/components/pki-syncs/forms/PkiSyncTargetHostField.tsx
+++ b/frontend/src/components/pki-syncs/forms/PkiSyncTargetHostField.tsx
@@ -3,7 +3,7 @@ import { Controller, useFormContext } from "react-hook-form";
import { Info } from "lucide-react";
import {
- CreatableSelect,
+ Combobox,
Field,
FieldContent,
FieldDescription,
@@ -67,7 +67,7 @@ export const PkiSyncTargetHostField = ({ applicationId }: Props) => {
control={control}
render={({ field: { value, onChange }, fieldState: { error } }) => (
<Field className="mb-4">
- <FieldLabel>
+ <FieldLabel htmlFor="pki-sync-target-host">
Target Host
<Tooltip>
<TooltipTrigger asChild>
@@ -81,6 +81,7 @@ export const PkiSyncTargetHostField = ({ applicationId }: Props) => {
</FieldLabel>
{isError ? (
<Input
+ id="pki-sync-target-host"
value={value ?? ""}
onChange={(event) => onChange(event.target.value)}
placeholder="server01.corp.example.com"
@@ -88,15 +89,16 @@ export const PkiSyncTargetHostField = ({ applicationId }: Props) => {
isError={Boolean(error)}
/>
) : (
- <CreatableSelect
+ <Combobox
+ id="pki-sync-target-host"
value={value ? { value, label: value } : null}
- onChange={(newValue) => onChange((newValue as { value: string } | null)?.value ?? "")}
- onCreateOption={(inputValue) => onChange(inputValue.trim())}
- onInputChange={(inputValue) => setSearch(inputValue)}
+ onValueChange={(newValue) => onChange(newValue?.value ?? "")}
+ creation={{ onCreate: (inputValue) => onChange(inputValue.trim()) }}
+ onInputValueChange={setSearch}
options={options}
isLoading={isPending}
- isClearable
- noOptionsMessage={() => "No machines match search"}
+ getOptionLabel={(option) => option.label}
+ getOptionValue={(option) => option.value}
placeholder="Select or enter a host..."
isDisabled={!canSetTargetHost}
isError={Boolean(error)}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsx
index 875e6d30c4..3750fd4bf9 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsx
@@ -1,6 +1,5 @@
import { useMemo, useState } from "react";
import { Controller, useFormContext, useWatch } from "react-hook-form";
-import { SingleValue } from "react-select";
import { Info, TriangleAlert } from "lucide-react";
import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";
@@ -9,7 +8,6 @@ import {
AlertDescription,
AlertTitle,
Combobox,
- CreatableSelect,
Field,
FieldContent,
FieldDescription,
@@ -462,11 +460,13 @@ export const VercelSyncFields = () => {
control={control}
render={({ field: { value, onChange }, fieldState: { error } }) => (
<Field>
- <FieldLabel>Vercel Preview Branch (Optional)</FieldLabel>
+ <FieldLabel htmlFor="secret-sync-vercel-branch">
+ Vercel Preview Branch (Optional)
+ </FieldLabel>
<FieldContent>
- <CreatableSelect
+ <Combobox
+ id="secret-sync-vercel-branch"
isError={Boolean(error)}
- className="w-full"
placeholder="Select a branch..."
isLoading={isTeamsLoading && Boolean(connectionId) && Boolean(currentApp)}
isDisabled={!connectionId || !currentApp}
@@ -479,20 +479,15 @@ export const VercelSyncFields = () => {
})
: null
}
- onChange={(option) =>
- onChange((option as SingleValue<{ id: string }>)?.id || "")
- }
- onCreateOption={onChange}
- getNewOptionData={(inputValue) => ({
- id: inputValue,
- name: `${inputValue} - press Enter`
- })}
+ isClearable={false}
+ onValueChange={(option) => onChange(option.id)}
+ creation={{
+ onCreate: onChange,
+ formatLabel: (inputValue) => `${inputValue} - press Enter`,
+ isDuplicate: (inputValue, option) => option.id === inputValue
+ }}
getOptionLabel={(option) => option.name}
getOptionValue={(option) => option.id}
- isValidNewOption={(inputValue) =>
- inputValue.trim().length > 0 &&
- !previewBranchOptions.some((branch) => branch.id === inputValue)
- }
/>
<FieldError errors={[error]} />
</FieldContent>
diff --git a/frontend/src/components/v3/platform/PasswordGenerator/PasswordGenerator.tsx b/frontend/src/components/v3/platform/PasswordGenerator/PasswordGenerator.tsx
index 9a57a945c4..f851cfb9c6 100644
--- a/frontend/src/components/v3/platform/PasswordGenerator/PasswordGenerator.tsx
+++ b/frontend/src/components/v3/platform/PasswordGenerator/PasswordGenerator.tsx
@@ -1,5 +1,4 @@
-import { cloneElement, type ReactElement, useEffect, useMemo, useState } from "react";
-import { components, OptionProps } from "react-select";
+import { cloneElement, type ReactElement, useEffect, useId, useMemo, useState } from "react";
import {
CheckIcon,
CopyIcon,
@@ -23,10 +22,10 @@ import {
import { Badge } from "../../generic/Badge";
import { Button } from "../../generic/Button";
import { Checkbox } from "../../generic/Checkbox";
+import { Combobox } from "../../generic/Combobox";
import { IconButton } from "../../generic/IconButton";
import { Label } from "../../generic/Label";
import { Popover, PopoverContent, PopoverTrigger } from "../../generic/Popover";
-import { FilterableSelect } from "../../generic/ReactSelect";
import { Tooltip, TooltipContent, TooltipTrigger } from "../../generic/Tooltip";
type PasswordOptionsType = {
@@ -122,28 +121,23 @@ const describeConstraints = (constraints: TValueConstraints) => {
return chips;
};
-const RuleOptionComponent = ({ isSelected, children, ...props }: OptionProps<RuleOption>) => (
- <components.Option isSelected={isSelected} {...props}>
- <div className="flex cursor-pointer flex-row items-center justify-between">
- <div className="flex items-center gap-2 truncate">
- <p className="truncate">{children}</p>
- {props.data.matchesCurrentScope && (
- <Tooltip>
- <TooltipTrigger asChild>
- <Badge variant="project">
- <ShieldCheckIcon className="size-3" />
- Current scope
- </Badge>
- </TooltipTrigger>
- <TooltipContent>
- This validation rule applies to the current environment and folder
- </TooltipContent>
- </Tooltip>
- )}
- </div>
- {isSelected && <CheckIcon className="ml-2 size-4 shrink-0" />}
- </div>
- </components.Option>
+const RuleOptionContent = ({ option }: { option: RuleOption }) => (
+ <div className="flex items-center gap-2 truncate">
+ <p className="truncate">{option.label}</p>
+ {option.matchesCurrentScope && (
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Badge variant="project">
+ <ShieldCheckIcon className="size-3" />
+ Current scope
+ </Badge>
+ </TooltipTrigger>
+ <TooltipContent>
+ This validation rule applies to the current environment and folder
+ </TooltipContent>
+ </Tooltip>
+ )}
+ </div>
);
export type PasswordGeneratorProps = {
@@ -167,6 +161,7 @@ export const PasswordGenerator = ({
selectedEnvironments,
trigger
}: PasswordGeneratorProps) => {
+ const ruleSelectId = useId();
const [isOpen, setIsOpen] = useState(false);
const [, isCopying, setCopyText] = useTimedReset<string>({
initialState: "Copy"
@@ -319,22 +314,25 @@ export const PasswordGenerator = ({
{showRuleSelector && (
<div>
- <Label className="mb-1.5 flex items-center gap-1.5 text-xs text-accent">
+ <Label
+ htmlFor={ruleSelectId}
+ className="mb-1.5 flex items-center gap-1.5 text-xs text-accent"
+ >
<ShieldCheckIcon className="size-3" />
Conform to Validation Rule
</Label>
- <FilterableSelect<RuleOption>
+ <Combobox
+ id={ruleSelectId}
options={ruleOptions}
value={selectedRuleOption}
- onChange={(option) => {
- setSelectedRuleId((option as RuleOption | null)?.value || "");
+ onValueChange={(option) => {
+ setSelectedRuleId(option.value);
setRefresh((prev) => !prev);
}}
getOptionLabel={(o) => o.label}
getOptionValue={(o) => o.value}
isClearable={false}
- isSearchable={false}
- components={{ Option: RuleOptionComponent }}
+ renderOption={(option) => <RuleOptionContent option={option} />}
/>
</div>
)}
diff --git a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/AuditLogStreamProductsField.tsx b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/AuditLogStreamProductsField.tsx
index 560a7119b3..67d223e6d5 100644
--- a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/AuditLogStreamProductsField.tsx
+++ b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/AuditLogStreamProductsField.tsx
@@ -1,13 +1,11 @@
-import { useEffect, useRef, useState } from "react";
import { useController, useFormContext } from "react-hook-form";
-import { components, MultiValue, OptionProps } from "react-select";
import { Building2Icon, CheckIcon, GlobeIcon, Info, type LucideIcon } from "lucide-react";
import { z } from "zod";
import {
+ Combobox,
Field,
FieldLabel,
- FilterableSelect,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -79,50 +77,9 @@ type FilterFormShape = {
filters?: { products?: AuditLogStreamProduct[] } | null;
};
-const ProductOptionItem = ({ isSelected, children, ...props }: OptionProps<ProductOption>) => {
- // The "All products" row is pinned to the top and divided from the rest. It reads as selected
- // whenever no specific products are chosen (the default).
- if (props.data.value === ALL_VALUE) {
- const isAllProducts = (props.getValue() as ProductOption[]).length === 0;
-
- return (
- <div className="border-b border-border">
- <components.Option {...props} isSelected={isAllProducts}>
- <div className="flex flex-row items-center gap-2">
- <GlobeIcon className="size-4 shrink-0 text-muted" />
- <p className="mr-auto truncate">{children}</p>
- {isAllProducts && <CheckIcon className="ml-2 size-4 shrink-0" />}
- </div>
- </components.Option>
- </div>
- );
- }
-
- const Icon = PRODUCT_ICONS[props.data.value];
-
- return (
- <components.Option isSelected={isSelected} {...props}>
- <div className="flex flex-row items-center gap-2">
- <Icon className="size-4 shrink-0 text-muted" />
- <p className="mr-auto truncate">{children}</p>
- {isSelected && <CheckIcon className="ml-2 size-4 shrink-0" />}
- </div>
- </components.Option>
- );
-};
-
export const ProductsField = () => {
const { control } = useFormContext<FilterFormShape>();
const { field } = useController({ control, name: "filters.products" });
- const containerRef = useRef<HTMLDivElement>(null);
- // Portal the menu into the enclosing modal so it can overflow the modal's scrollable body
- // instead of being clipped. Targeting the dialog (not document.body) keeps it inside Radix's
- // focus trap so options stay clickable. Falls back to inline rendering outside a modal.
- const [menuPortalTarget, setMenuPortalTarget] = useState<HTMLElement | null>(null);
-
- useEffect(() => {
- setMenuPortalTarget(containerRef.current?.closest<HTMLElement>('[role="dialog"]') ?? null);
- }, []);
const selected = field.value ?? [];
const value = PRODUCT_OPTIONS.filter((option) =>
@@ -144,37 +101,48 @@ export const ProductsField = () => {
</TooltipContent>
</Tooltip>
</FieldLabel>
- <div ref={containerRef}>
- <FilterableSelect
- inputId="products"
- isMulti
- value={value}
- options={[ALL_OPTION, ...PRODUCT_OPTIONS]}
- onChange={(newValue, actionMeta) => {
- // Picking "All products" clears the filter (= stream everything).
- if (actionMeta.action === "select-option" && actionMeta.option?.value === ALL_VALUE) {
- field.onChange([]);
- return;
- }
-
- const next = (newValue as MultiValue<ProductOption>)
- .map((option) => option.value)
- .filter(
- (productValue): productValue is AuditLogStreamProduct => productValue !== ALL_VALUE
- );
- // Empty selection is "stream everything" — selecting every product is the same intent,
- // so normalize it back to an empty list.
- field.onChange(next.length === PRODUCTS.length ? [] : next);
- }}
- placeholder="All products"
- getOptionValue={(option) => option.value}
- getOptionLabel={(option) => option.label}
- components={{ Option: ProductOptionItem }}
- menuPortalTarget={menuPortalTarget ?? undefined}
- menuPosition="fixed"
- menuPlacement="auto"
- />
- </div>
+ <Combobox
+ id="products"
+ multiple
+ value={value}
+ options={[ALL_OPTION, ...PRODUCT_OPTIONS]}
+ onValueChange={(newValue) => {
+ // Picking "All products" clears the filter (= stream everything).
+ if (newValue.some((option) => option.value === ALL_VALUE)) {
+ field.onChange([]);
+ return;
+ }
+
+ const next = newValue
+ .map((option) => option.value)
+ .filter(
+ (productValue): productValue is AuditLogStreamProduct => productValue !== ALL_VALUE
+ );
+ // Empty selection is "stream everything"; selecting every product is the same intent,
+ // so normalize it back to an empty list.
+ field.onChange(next.length === PRODUCTS.length ? [] : next);
+ }}
+ placeholder="All products"
+ searchAriaLabel="Search products"
+ getOptionValue={(option) => option.value}
+ getOptionKeywords={(option) => [option.value]}
+ getOptionLabel={(option) => option.label}
+ renderOption={(option) => {
+ const Icon = option.value === ALL_VALUE ? GlobeIcon : PRODUCT_ICONS[option.value];
+
+ return (
+ <span className="flex items-center gap-2">
+ <Icon className="size-4 shrink-0 text-muted" />
+ <span className="truncate">{option.label}</span>
+ </span>
+ );
+ }}
+ renderOptionIndicator={(option, { isSelected }) =>
+ (isSelected || (option.value === ALL_VALUE && selected.length === 0)) && (
+ <CheckIcon className="size-4" />
+ )
+ }
+ />
</Field>
);
};
diff --git a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/PoolDetailSheet.tsx b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/PoolDetailSheet.tsx
index 612dfae340..2b187a2ef6 100644
--- a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/PoolDetailSheet.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/PoolDetailSheet.tsx
@@ -19,11 +19,11 @@ import {
AlertDialogTitle,
Badge,
Button,
+ Combobox,
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
- FilterableSelect,
IconButton,
Sheet,
SheetContent,
@@ -176,18 +176,20 @@ export const PoolDetailSheet = ({ isOpen, onOpenChange, pool }: Props) => {
const isDisabled = !isAllowed || availableGateways.length === 0;
return (
<div className="flex min-w-0 items-start gap-2">
- <FilterableSelect<GatewayOption>
- isMulti
- value={selectedGateways}
- onChange={(value) =>
- setSelectedGateways(Array.isArray(value) ? [...value] : [])
- }
- options={gatewayOptions}
- placeholder="Select gateways..."
- isDisabled={isDisabled || addGateway.isPending}
- menuPosition="fixed"
- className="w-64"
- />
+ <div className="w-64">
+ <Combobox
+ multiple
+ value={selectedGateways}
+ onValueChange={setSelectedGateways}
+ options={gatewayOptions}
+ placeholder="Select gateways..."
+ searchAriaLabel="Select gateways"
+ isDisabled={isDisabled || addGateway.isPending}
+ getOptionLabel={(option) => option.label}
+ getOptionValue={(option) => option.value}
+ getOptionKeywords={(option) => [option.value]}
+ />
+ </div>
<Button
variant="outline"
size="sm"
diff --git a/frontend/src/pages/organization/NetworkingPage/components/NetworkingAuthMethodForm.tsx b/frontend/src/pages/organization/NetworkingPage/components/NetworkingAuthMethodForm.tsx
index 20ee28dc49..14d00f7a87 100644
--- a/frontend/src/pages/organization/NetworkingPage/components/NetworkingAuthMethodForm.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/components/NetworkingAuthMethodForm.tsx
@@ -6,12 +6,12 @@ import { z } from "zod";
import {
Button,
+ Combobox,
Field,
FieldContent,
FieldDescription,
FieldError,
FieldLabel,
- FilterableSelect,
Input,
TextArea,
Toggle,
@@ -26,8 +26,7 @@ import { useScopeVariant } from "@app/hooks";
import {
NETWORKING_AUTH_METHOD_OPTIONS,
NetworkingAuthMethod,
- NetworkingAuthMethodOption,
- NetworkingAuthMethodSingleValue
+ NetworkingAuthMethodLabel
} from "./NetworkingAuthMethodLabel";
const GCP_AUTH_TYPE_OPTIONS = [
@@ -357,22 +356,21 @@ export const NetworkingAuthMethodForm = ({
methodOptions.find((option) => option.value === field.value) ?? methodOptions[0];
return (
- <FilterableSelect
+ <Combobox
+ aria-label="Authentication method"
value={selected}
- onChange={(option) => {
- const next = option as { value: NetworkingAuthMethod } | null;
- if (next) field.onChange(next.value);
- }}
+ onValueChange={(option) => field.onChange(option.value)}
options={methodOptions}
- isSearchable={false}
isClearable={false}
isDisabled={isDisabled || isSaving}
getOptionLabel={(option) => option.label}
getOptionValue={(option) => option.value}
- components={{
- Option: NetworkingAuthMethodOption,
- SingleValue: NetworkingAuthMethodSingleValue
- }}
+ renderOption={(option) => (
+ <NetworkingAuthMethodLabel method={option.value} label={option.label} />
+ )}
+ renderValue={(option) => (
+ <NetworkingAuthMethodLabel method={option.value} label={option.label} />
+ )}
/>
);
}}
@@ -426,7 +424,10 @@ export const NetworkingAuthMethodForm = ({
name="gcpAuthType"
render={({ field }) => (
<Field>
- <FieldLabel className="inline-flex items-center gap-1.5">
+ <FieldLabel
+ htmlFor="networking-gcp-auth-type"
+ className="inline-flex items-center gap-1.5"
+ >
Type
<Tooltip>
<TooltipTrigger asChild>
@@ -440,15 +441,14 @@ export const NetworkingAuthMethodForm = ({
</Tooltip>
</FieldLabel>
<FieldContent>
- <FilterableSelect
- value={GCP_AUTH_TYPE_OPTIONS.find((option) => option.value === field.value)}
- onChange={(option) => {
- const next = option as { value: "gce" | "iam" } | null;
- if (next) field.onChange(next.value);
- }}
+ <Combobox
+ id="networking-gcp-auth-type"
+ value={
+ GCP_AUTH_TYPE_OPTIONS.find((option) => option.value === field.value) ?? null
+ }
+ onValueChange={(option) => field.onChange(option.value)}
options={GCP_AUTH_TYPE_OPTIONS}
isDisabled={isDisabled || isSaving}
- isSearchable={false}
isClearable={false}
getOptionLabel={(option) => option.label}
getOptionValue={(option) => option.value}
@@ -624,7 +624,10 @@ export const NetworkingAuthMethodForm = ({
name="tokenReviewMode"
render={({ field, fieldState: { error } }) => (
<Field>
- <FieldLabel className="inline-flex items-center gap-1.5">
+ <FieldLabel
+ htmlFor="networking-token-review-mode"
+ className="inline-flex items-center gap-1.5"
+ >
Review Mode
<Tooltip>
<TooltipTrigger asChild>
@@ -639,15 +642,15 @@ export const NetworkingAuthMethodForm = ({
</Tooltip>
</FieldLabel>
<FieldContent>
- <FilterableSelect
- value={reviewModeOptions.find((option) => option.value === field.value)}
- onChange={(option) => {
- const next = option as { value: "api" | "gateway" } | null;
- if (next) field.onChange(next.value);
- }}
+ <Combobox
+ id="networking-token-review-mode"
+ value={
+ reviewModeOptions.find((option) => option.value === field.value) ?? null
+ }
+ onValueChange={(option) => field.onChange(option.value)}
options={reviewModeOptions}
+ isOptionDisabled={(option) => option.isDisabled}
isDisabled={isDisabled || isSaving}
- isSearchable={false}
isClearable={false}
getOptionLabel={(option) => option.label}
getOptionValue={(option) => option.value}
diff --git a/frontend/src/pages/organization/NetworkingPage/components/NetworkingAuthMethodLabel.tsx b/frontend/src/pages/organization/NetworkingPage/components/NetworkingAuthMethodLabel.tsx
index 4d92b613dd..ff9ef8a7dd 100644
--- a/frontend/src/pages/organization/NetworkingPage/components/NetworkingAuthMethodLabel.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/components/NetworkingAuthMethodLabel.tsx
@@ -1,9 +1,4 @@
-import {
- components as ReactSelectComponents,
- type OptionProps,
- type SingleValueProps
-} from "react-select";
-import { CheckIcon, KeyIcon } from "lucide-react";
+import { KeyIcon } from "lucide-react";
import { ProviderIcon } from "@app/components/v3";
@@ -69,28 +64,3 @@ export const NetworkingAuthMethodLabel = ({
</span>
</span>
);
-
-export const NetworkingAuthMethodOption = (props: OptionProps<NetworkingAuthMethodOption>) => {
- const { data, isSelected } = props;
-
- return (
- <ReactSelectComponents.Option {...props}>
- <span className="flex items-center justify-between gap-2">
- <NetworkingAuthMethodLabel method={data.value} label={data.label} />
- {isSelected && <CheckIcon className="size-4 shrink-0" />}
- </span>
- </ReactSelectComponents.Option>
- );
-};
-
-export const NetworkingAuthMethodSingleValue = (
- props: SingleValueProps<NetworkingAuthMethodOption>
-) => {
- const { data } = props;
-
- return (
- <ReactSelectComponents.SingleValue {...props}>
- <NetworkingAuthMethodLabel method={data.value} label={data.label} />
- </ReactSelectComponents.SingleValue>
- );
-};
diff --git a/frontend/src/pages/organization/ProductSettingsPage/SecretsManagement/honey-token-config/HoneyTokenModal.tsx b/frontend/src/pages/organization/ProductSettingsPage/SecretsManagement/honey-token-config/HoneyTokenModal.tsx
index 988fc7198b..bda87197dd 100644
--- a/frontend/src/pages/organization/ProductSettingsPage/SecretsManagement/honey-token-config/HoneyTokenModal.tsx
+++ b/frontend/src/pages/organization/ProductSettingsPage/SecretsManagement/honey-token-config/HoneyTokenModal.tsx
@@ -15,11 +15,11 @@ import {
AccordionTrigger,
Button,
ButtonGroup,
+ Combobox,
Field,
FieldError,
FieldGroup,
FieldLabel,
- FilterableSelect,
IconButton,
Input,
Sheet,
@@ -229,23 +229,19 @@ export const HoneyTokenModal = ({ isOpen, onOpenChange }: Props) => {
return (
<Field>
- <FieldLabel>App Connection</FieldLabel>
- <FilterableSelect
+ <FieldLabel htmlFor="honey-token-app-connection">App Connection</FieldLabel>
+ <Combobox
+ id="honey-token-app-connection"
value={selectedConnection || null}
- onChange={(newValue) => {
- const singleValue = Array.isArray(newValue) ? newValue[0] : newValue;
- if (singleValue && "id" in singleValue) {
- field.onChange(singleValue.id);
- } else {
- field.onChange("");
- }
- }}
+ isClearable={false}
+ onValueChange={(connection) => field.onChange(connection.id)}
isError={Boolean(error)}
isLoading={isLoadingConnections}
options={awsConnections}
placeholder="Select an AWS App Connection..."
getOptionLabel={(option) => option.name}
getOptionValue={(option) => option.id}
+ getOptionKeywords={(option) => [option.id]}
/>
<FieldError errors={[error]} />
</Field>
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgEncryptionTab/GcpKmsForm.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgEncryptionTab/GcpKmsForm.tsx
index d313765d3b..f7d113d207 100644
--- a/frontend/src/pages/organization/SettingsPage/components/OrgEncryptionTab/GcpKmsForm.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/OrgEncryptionTab/GcpKmsForm.tsx
@@ -6,6 +6,7 @@ import { createNotification } from "@app/components/notifications";
import {
Badge,
Button,
+ Combobox,
DialogFooter,
Field,
FieldDescription,
@@ -13,7 +14,6 @@ import {
FieldGroup,
FieldLabel,
FileDropzone,
- FilterableSelect,
Input,
SheetFooter
} from "@app/components/v3";
@@ -542,22 +542,26 @@ export const GcpKmsForm = ({
render={({ field, fieldState: { error } }) => (
<Field data-invalid={Boolean(error)}>
<FieldLabel htmlFor="gcp-kms-region">GCP Region</FieldLabel>
- <FilterableSelect<SelectOption>
- inputId="gcp-kms-region"
+ <Combobox
+ id="gcp-kms-region"
placeholder="Select a GCP region"
options={GCP_REGIONS}
value={field.value}
isError={Boolean(error)}
- onChange={(option) => {
- const region = option as SelectOption | null;
+ isClearable={false}
+ onValueChange={(region) => {
resetField("keyObject");
field.onChange(region);
fetchGCPKeys({
- gcpRegion: region?.value,
+ gcpRegion: region.value,
shouldValidateMissingCredential: false
});
}}
- formatOptionLabel={formatOptionLabel}
+ getOptionLabel={(option) => option.label}
+ getOptionValue={(option) => option.value}
+ getOptionKeywords={(option) => [option.value]}
+ renderOption={formatOptionLabel}
+ renderValue={formatOptionLabel}
/>
<FieldError>{error?.message}</FieldError>
</Field>
@@ -570,15 +574,19 @@ export const GcpKmsForm = ({
render={({ field, fieldState: { error } }) => (
<Field data-invalid={Boolean(error)}>
<FieldLabel htmlFor="gcp-kms-key">GCP Key</FieldLabel>
- <FilterableSelect<SelectOption>
- inputId="gcp-kms-key"
+ <Combobox
+ id="gcp-kms-key"
placeholder={getPlaceholderText()}
isDisabled={!isCredentialValid || !keys.length}
isLoading={isFetchGcpKeysLoading}
options={keys}
value={field.value ?? null}
isError={Boolean(error)}
- onChange={field.onChange}
+ isClearable={false}
+ onValueChange={field.onChange}
+ getOptionLabel={(option) => option.label}
+ getOptionValue={(option) => option.value}
+ getOptionKeywords={(option) => [option.value]}
/>
<FieldError>{error?.message}</FieldError>
</Field>
diff --git a/frontend/src/views/Alerts/ChannelRecipientsField.tsx b/frontend/src/views/Alerts/ChannelRecipientsField.tsx
index 93f9833fe5..5a7f623e27 100644
--- a/frontend/src/views/Alerts/ChannelRecipientsField.tsx
+++ b/frontend/src/views/Alerts/ChannelRecipientsField.tsx
@@ -1,7 +1,7 @@
-import { useEffect, useRef, useState } from "react";
+import { useState } from "react";
import { LucideIcon, MailIcon, UserIcon, UsersIcon } from "lucide-react";
-import { FilterableSelect } from "@app/components/v3";
+import { Combobox } from "@app/components/v3";
import { useOrganization } from "@app/context";
import { isValidEmail } from "@app/helpers/email";
import {
@@ -77,14 +77,8 @@ const RecipientSelect = ({
isError,
allowEmailAddresses
}: SelectProps & { options: RecipientOption[]; labelledOptions?: RecipientOption[] }) => {
- const containerRef = useRef<HTMLDivElement>(null);
- const [menuPortalTarget, setMenuPortalTarget] = useState<HTMLElement | null>(null);
const [inputValue, setInputValue] = useState("");
- useEffect(() => {
- setMenuPortalTarget(containerRef.current?.closest<HTMLElement>('[role="dialog"]') ?? null);
- }, []);
-
const byKey = new Map(
(labelledOptions ?? options).map((o) => [`${o.principalType}-${o.principalId}`, o])
);
@@ -111,34 +105,32 @@ const RecipientSelect = ({
);
return (
- <div ref={containerRef}>
- <FilterableSelect<RecipientOption>
- isMulti
- placeholder={
- allowEmailAddresses ? "Add users, groups, or emails..." : "Add users or groups..."
- }
- options={canAddEmail ? [...options, emailOption] : options}
- onInputChange={setInputValue}
- value={selected}
- isError={isError}
- groupBy="groupLabel"
- getGroupHeaderLabel={(groupValue) => groupValue}
- getOptionValue={(option) => `${option.principalType}-${option.principalId}`}
- getOptionLabel={(option) => option.label}
- formatOptionLabel={formatOptionLabel}
- menuPortalTarget={menuPortalTarget ?? undefined}
- menuPosition="fixed"
- menuPlacement="auto"
- onChange={(newValue) =>
- onChange(
- (newValue as RecipientOption[]).map((option) => ({
- principalType: option.principalType,
- principalId: option.principalId
- }))
- )
- }
- />
- </div>
+ <Combobox
+ multiple
+ placeholder={
+ allowEmailAddresses ? "Add users, groups, or emails..." : "Add users or groups..."
+ }
+ searchAriaLabel="Search recipients"
+ options={canAddEmail ? [...options, emailOption] : options}
+ onInputValueChange={setInputValue}
+ value={selected}
+ includeMissingSelectedOptions={false}
+ isError={isError}
+ getOptionGroup={(option) => option.groupLabel}
+ getOptionValue={(option) => `${option.principalType}-${option.principalId}`}
+ getOptionKeywords={(option) => [`${option.principalType}-${option.principalId}`]}
+ getOptionLabel={(option) => option.label}
+ renderOption={formatOptionLabel}
+ renderValue={formatOptionLabel}
+ onValueChange={(newValue) =>
+ onChange(
+ newValue.map((option) => ({
+ principalType: option.principalType,
+ principalId: option.principalId
+ }))
+ )
+ }
+ />
);
};