Skip to content

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

improvement(frontend): rename v3 switch component to toggle (#8065)

claude[bot]7c255b2c1ae3
diff --git a/DESIGN.md b/DESIGN.md
index beb272ed7d..b6f2e6d6c7 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -195,7 +195,7 @@ variants, sizes, and class lists, open the source or its `*.stories.tsx`
| [`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 with chips, rich rows, and viewport-aware positioning. |
| [`ReactSelect`](frontend/src/components/v3/generic/ReactSelect/index.ts) | Sunsetting compatibility path for creatable, grouped, or advanced custom-rendering behavior. |
-| [`Switch`](frontend/src/components/v3/generic/Switch/Switch.tsx) / [`Checkbox`](frontend/src/components/v3/generic/Checkbox/Checkbox.tsx) | Boolean toggle / multi-select boolean. |
+| [`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/generic/DateRangeFilter/DateRangeFilter.tsx) | Date-range filter with presets — for filter bars. |
| [`SecretInput`](frontend/src/components/v3/generic/SecretInput/SecretInput.tsx) | Secret-value editor with mask toggle and `${var}` highlighting. |
diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/DynamicSecretProviderFields.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/DynamicSecretProviderFields.tsx
index 375d1439cf..554ca052b4 100644
--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/DynamicSecretProviderFields.tsx
+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/DynamicSecretProviderFields.tsx
@@ -11,8 +11,8 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
- TextArea
+ TextArea,
+ Toggle
} from "@app/components/v3";
import { cn } from "@app/components/v3/utils";
@@ -58,7 +58,7 @@ export const DynamicSecretProviderFields = <TValues extends FieldValues>({
if (fieldDefinition.type === "switch") {
input = (
- <Switch
+ <Toggle
ref={field.ref}
id={inputId}
variant="project"
diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/azureSqlDatabase.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/azureSqlDatabase.tsx
index c5a60ca0fb..0916b1b2f9 100644
--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/azureSqlDatabase.tsx
+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/azureSqlDatabase.tsx
@@ -13,7 +13,7 @@ import {
FieldTitle,
IconButton,
Input,
- Switch
+ Toggle
} from "@app/components/v3";
import { GatewayPicker, SecretInput } from "@app/components/v3/platform";
import {
@@ -351,7 +351,7 @@ const AzureSqlFields = ({ mode }: TDynamicSecretProviderRendererProps) => {
Configure a custom CA certificate for this connection.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
ref={field.ref}
checked={field.value ?? false}
onBlur={field.onBlur}
@@ -385,7 +385,7 @@ const AzureSqlFields = ({ mode }: TDynamicSecretProviderRendererProps) => {
Verify the server certificate against the supplied certificate authorities.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
ref={field.ref}
checked={field.value ?? true}
onBlur={field.onBlur}
diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/couchbase.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/couchbase.tsx
index 0baabee963..5ed7a0829a 100644
--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/couchbase.tsx
+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/couchbase.tsx
@@ -16,7 +16,7 @@ import {
FieldTitle,
IconButton,
Input,
- Switch
+ Toggle
} from "@app/components/v3";
import { DynamicSecretProviders } from "@app/hooks/api/dynamicSecret/types";
@@ -215,7 +215,7 @@ const CouchbaseBucketFields = () => {
Limit access by bucket, scope, and collection instead of using a bucket pattern.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
ref={field.ref}
id="couchbase-advanced-buckets"
variant="project"
diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/kubernetes.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/kubernetes.tsx
index 7e3deda2b3..0076956970 100644
--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/kubernetes.tsx
+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/kubernetes.tsx
@@ -19,8 +19,8 @@ import {
FieldTitle,
IconButton,
Input,
- Switch,
- TextArea
+ TextArea,
+ Toggle
} from "@app/components/v3";
import { GatewayPicker } from "@app/components/v3/platform/GatewayPicker";
import { ProjectPermissionSub, useProject } from "@app/context";
@@ -337,7 +337,7 @@ const KubernetesFields = ({ mode }: { mode: TDynamicSecretProviderFormMode }) =>
CA.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
ref={field.ref}
checked={field.value}
onBlur={field.onBlur}
@@ -385,7 +385,7 @@ const KubernetesFields = ({ mode }: { mode: TDynamicSecretProviderFormMode }) =>
error={error?.message}
/>
</FieldContent>
- <Switch
+ <Toggle
ref={field.ref}
checked={field.value ?? true}
onBlur={field.onBlur}
diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/ldap.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/ldap.tsx
index 536df2af9e..5f1c66b80f 100644
--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/ldap.tsx
+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/ldap.tsx
@@ -20,7 +20,7 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch
+ Toggle
} from "@app/components/v3";
import { ProjectPermissionSub, useProject } from "@app/context";
import { useCanUseProjectAppConnectionImport } from "@app/hooks";
@@ -145,7 +145,7 @@ const LdapFields = ({ mode }: TDynamicSecretProviderRendererProps) => {
error={error?.message}
/>
</FieldContent>
- <Switch
+ <Toggle
ref={field.ref}
checked={field.value}
onBlur={field.onBlur}
diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/milvus.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/milvus.tsx
index 910196ce13..632a8ae491 100644
--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/milvus.tsx
+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/milvus.tsx
@@ -22,7 +22,7 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch
+ Toggle
} from "@app/components/v3";
import { GatewayPicker } from "@app/components/v3/platform/GatewayPicker";
import {
@@ -349,7 +349,7 @@ const MilvusFields = ({ mode }: { mode: TDynamicSecretProviderFormMode }) => {
error={error?.message}
/>
</FieldContent>
- <Switch
+ <Toggle
ref={field.ref}
checked={field.value ?? true}
onBlur={field.onBlur}
diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/sqlDatabase.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/sqlDatabase.tsx
index f34478bc5b..1de127aaf1 100644
--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/sqlDatabase.tsx
+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/sqlDatabase.tsx
@@ -27,8 +27,8 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
- TextArea
+ TextArea,
+ Toggle
} from "@app/components/v3";
import { GatewayPicker } from "@app/components/v3/platform/GatewayPicker";
import { SecretInput } from "@app/components/v3/platform/SecretInput";
@@ -601,7 +601,7 @@ const SqlDatabaseFields = ({
<FieldTitle>Encrypt Connection (SSL)</FieldTitle>
<FieldError id="sql-database-ssl-enabled-error">{error?.message}</FieldError>
</FieldContent>
- <Switch
+ <Toggle
ref={field.ref}
checked={field.value ?? false}
onBlur={field.onBlur}
@@ -646,7 +646,7 @@ const SqlDatabaseFields = ({
error={error?.message}
/>
</FieldContent>
- <Switch
+ <Toggle
ref={field.ref}
checked={field.value ?? true}
onBlur={field.onBlur}
diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/tailscale.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/tailscale.tsx
index e0ebb436c8..ea3d563ac7 100644
--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/tailscale.tsx
+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/tailscale.tsx
@@ -1,6 +1,6 @@
import { Controller, useFormContext } from "react-hook-form";
-import { Field, FieldContent, FieldFeedback, FieldTitle, Switch } from "@app/components/v3";
+import { Field, FieldContent, FieldFeedback, FieldTitle, Toggle } from "@app/components/v3";
import {
DynamicSecretProviders,
TailscaleAuthMethod,
@@ -166,7 +166,7 @@ const TailscaleFields = () => {
error={error?.message}
/>
</FieldContent>
- <Switch
+ <Toggle
ref={field.ref}
checked={field.value}
onBlur={field.onBlur}
diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/shared/SslRejectUnauthorizedField.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/shared/SslRejectUnauthorizedField.tsx
index 94eca060fe..ee3cb4c622 100644
--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/shared/SslRejectUnauthorizedField.tsx
+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/shared/SslRejectUnauthorizedField.tsx
@@ -7,7 +7,7 @@ import {
FieldError,
FieldLabel,
FieldTitle,
- Switch
+ Toggle
} from "@app/components/v3";
type Props<TValues extends FieldValues> = {
@@ -50,7 +50,7 @@ export const SslRejectUnauthorizedField = <TValues extends FieldValues>({
{error?.message && <FieldError id={errorId}>{error.message}</FieldError>}
</FieldContent>
)}
- <Switch
+ <Toggle
ref={field.ref}
id={id}
variant="project"
diff --git a/frontend/src/components/pki-syncs/forms/CreatePkiSyncForm.tsx b/frontend/src/components/pki-syncs/forms/CreatePkiSyncForm.tsx
index ac5df8f223..90b3fc527d 100644
--- a/frontend/src/components/pki-syncs/forms/CreatePkiSyncForm.tsx
+++ b/frontend/src/components/pki-syncs/forms/CreatePkiSyncForm.tsx
@@ -23,7 +23,7 @@ import {
Stepper,
StepperList,
StepperStep,
- Switch
+ Toggle
} from "@app/components/v3";
import { useProject } from "@app/context";
import {
@@ -413,7 +413,7 @@ export const CreatePkiSyncForm = ({
off to only sync manually.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="auto-sync-enabled"
variant="project"
checked={value}
diff --git a/frontend/src/components/pki-syncs/forms/EditPkiSyncForm.tsx b/frontend/src/components/pki-syncs/forms/EditPkiSyncForm.tsx
index d18ede44ab..da30c74205 100644
--- a/frontend/src/components/pki-syncs/forms/EditPkiSyncForm.tsx
+++ b/frontend/src/components/pki-syncs/forms/EditPkiSyncForm.tsx
@@ -13,7 +13,7 @@ import {
Stepper,
StepperList,
StepperStep,
- Switch
+ Toggle
} from "@app/components/v3";
import { PKI_SYNC_MAP } from "@app/helpers/pkiSyncs";
import { AppConnection } from "@app/hooks/api/appConnections/enums";
@@ -232,7 +232,7 @@ export const EditPkiSyncForm = ({ pkiSync, onComplete, onDirtyChange, onCancel }
to only sync manually.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="auto-sync-enabled"
variant="project"
checked={value}
diff --git a/frontend/src/components/pki-syncs/forms/F5BigIpPkiSyncFields.tsx b/frontend/src/components/pki-syncs/forms/F5BigIpPkiSyncFields.tsx
index 3fb6b98ece..019c5f9797 100644
--- a/frontend/src/components/pki-syncs/forms/F5BigIpPkiSyncFields.tsx
+++ b/frontend/src/components/pki-syncs/forms/F5BigIpPkiSyncFields.tsx
@@ -14,7 +14,7 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -180,7 +180,7 @@ export const F5BigIpPkiSyncFields = () => {
</Tooltip>
</Label>
</FieldContent>
- <Switch
+ <Toggle
id="f5-create-profile-if-missing"
variant="project"
checked={value ?? false}
diff --git a/frontend/src/components/pki-syncs/forms/GcpCertificateManagerPkiSyncFields.tsx b/frontend/src/components/pki-syncs/forms/GcpCertificateManagerPkiSyncFields.tsx
index 86f0b2f4d4..ea95ac8533 100644
--- a/frontend/src/components/pki-syncs/forms/GcpCertificateManagerPkiSyncFields.tsx
+++ b/frontend/src/components/pki-syncs/forms/GcpCertificateManagerPkiSyncFields.tsx
@@ -17,7 +17,7 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -307,7 +307,7 @@ export const GcpCertificateManagerPkiSyncFields = ({ isUpdate }: Props) => {
Attach to a certificate map
</Label>
</FieldContent>
- <Switch
+ <Toggle
id="gcp-attach-certificate-map"
variant="project"
checked={Boolean(certificateMapBinding)}
diff --git a/frontend/src/components/pki-syncs/forms/PkiSyncOptionsFields/GcpCertificateManagerSyncOptions.tsx b/frontend/src/components/pki-syncs/forms/PkiSyncOptionsFields/GcpCertificateManagerSyncOptions.tsx
index 68cc1c3ca2..0e90a4c39d 100644
--- a/frontend/src/components/pki-syncs/forms/PkiSyncOptionsFields/GcpCertificateManagerSyncOptions.tsx
+++ b/frontend/src/components/pki-syncs/forms/PkiSyncOptionsFields/GcpCertificateManagerSyncOptions.tsx
@@ -10,7 +10,7 @@ import {
IconButton,
Input,
Label,
- Switch
+ Toggle
} from "@app/components/v3";
import { PkiSync } from "@app/hooks/api/pkiSyncs";
@@ -103,7 +103,7 @@ export const GcpCertificateManagerSyncOptions = () => {
labels Infisical sets.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="gcp-configure-labels"
variant="project"
checked={Array.isArray(labels)}
diff --git a/frontend/src/components/pki-syncs/forms/PkiSyncOptionsFields/ServerExportFormatFields.tsx b/frontend/src/components/pki-syncs/forms/PkiSyncOptionsFields/ServerExportFormatFields.tsx
index e04322bd9f..27114fa070 100644
--- a/frontend/src/components/pki-syncs/forms/PkiSyncOptionsFields/ServerExportFormatFields.tsx
+++ b/frontend/src/components/pki-syncs/forms/PkiSyncOptionsFields/ServerExportFormatFields.tsx
@@ -14,7 +14,7 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -115,7 +115,7 @@ export const ServerExportFormatFields = ({ isUpdate }: Props) => {
written.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="combine-certificate-chain"
variant="project"
checked={value ?? false}
@@ -173,7 +173,7 @@ export const ServerExportFormatFields = ({ isUpdate }: Props) => {
available (for example, one issued from an external CSR).
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="include-private-key"
variant="project"
checked={value ?? true}
diff --git a/frontend/src/components/pki-syncs/forms/PkiSyncOptionsFields/SyncSwitchField.tsx b/frontend/src/components/pki-syncs/forms/PkiSyncOptionsFields/SyncSwitchField.tsx
index 7faa017bba..afe05b7ed7 100644
--- a/frontend/src/components/pki-syncs/forms/PkiSyncOptionsFields/SyncSwitchField.tsx
+++ b/frontend/src/components/pki-syncs/forms/PkiSyncOptionsFields/SyncSwitchField.tsx
@@ -7,7 +7,7 @@ import {
FieldDescription,
FieldError,
Label,
- Switch
+ Toggle
} from "@app/components/v3";
import { TPkiSyncForm } from "../schemas/pki-sync-schema";
@@ -40,7 +40,7 @@ export const SyncSwitchField = ({
<Label htmlFor={id}>{label}</Label>
<FieldDescription>{description}</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id={id}
variant="project"
checked={(value as boolean | undefined) ?? defaultChecked}
diff --git a/frontend/src/components/pki-syncs/forms/PkiSyncTargetHostField.tsx b/frontend/src/components/pki-syncs/forms/PkiSyncTargetHostField.tsx
index 453aa14f8e..1250bb8e86 100644
--- a/frontend/src/components/pki-syncs/forms/PkiSyncTargetHostField.tsx
+++ b/frontend/src/components/pki-syncs/forms/PkiSyncTargetHostField.tsx
@@ -11,8 +11,8 @@ import {
FieldLabel,
FieldTitle,
Input,
- Switch,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -158,7 +158,7 @@ export const PkiSyncTargetHostField = ({ applicationId }: Props) => {
no server certificate is required.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="target-ssl-enabled"
checked={Boolean(value)}
onCheckedChange={onChange}
@@ -206,7 +206,7 @@ export const PkiSyncTargetHostField = ({ applicationId }: Props) => {
trusted certificate.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
disabled={!canSetTargetHost}
id="target-ssl-reject-unauthorized"
checked={value !== false}
diff --git a/frontend/src/components/proxied-services/forms/ProxiedServiceDetailsFields.tsx b/frontend/src/components/proxied-services/forms/ProxiedServiceDetailsFields.tsx
index f4f8ce6d2e..464617c7ac 100644
--- a/frontend/src/components/proxied-services/forms/ProxiedServiceDetailsFields.tsx
+++ b/frontend/src/components/proxied-services/forms/ProxiedServiceDetailsFields.tsx
@@ -9,7 +9,7 @@ import {
FieldLabel,
FieldTitle,
Input,
- Switch,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -85,7 +85,7 @@ export const ProxiedServiceDetailsFields = ({ isDuplicateName }: Props) => {
When off, the proxy stops brokering this service&apos;s traffic.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="proxied-service-enabled"
variant="project"
checked={field.value}
diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ConfigurationFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ConfigurationFields.tsx
index ec1c28c84b..0a4f4217e9 100644
--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ConfigurationFields.tsx
+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ConfigurationFields.tsx
@@ -13,7 +13,7 @@ import {
FilterableSelect,
Input,
Label,
- Switch
+ Toggle
} from "@app/components/v3";
import {
getRotateAtLocal,
@@ -137,7 +137,7 @@ export const SecretRotationV2ConfigurationFields = ({ isUpdate, environments }:
error={error?.message}
/>
</FieldContent>
- <Switch
+ <Toggle
ref={ref}
id="auto-rotation-enabled"
variant="project"
diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/OpenRouterApiKeyRotationParametersFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/OpenRouterApiKeyRotationParametersFields.tsx
index 10b227709a..3d10bd40f8 100644
--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/OpenRouterApiKeyRotationParametersFields.tsx
+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/OpenRouterApiKeyRotationParametersFields.tsx
@@ -14,7 +14,7 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch
+ Toggle
} from "@app/components/v3";
import { SecretRotation } from "@app/hooks/api/secretRotationsV2";
import { OpenRouterLimitReset } from "@app/hooks/api/secretRotationsV2/types/open-router-api-key-rotation";
@@ -128,7 +128,7 @@ export const OpenRouterApiKeyRotationParametersFields = () => {
control={control}
render={({ field: { value, onChange }, fieldState: { error } }) => (
<Field orientation="horizontal" data-invalid={Boolean(error)}>
- <Switch
+ <Toggle
id="include-byok-in-limit"
checked={value ?? false}
onCheckedChange={onChange}
diff --git a/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsx b/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsx
index 49a407f928..c2c40191cd 100644
--- a/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsx
+++ b/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsx
@@ -18,7 +18,7 @@ import {
FieldLabel,
FieldTitle,
Input,
- Switch
+ Toggle
} from "@app/components/v3";
import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";
import { TSecretSync, useDeleteSecretSync, useSecretSyncOption } from "@app/hooks/api/secretSyncs";
@@ -104,7 +104,7 @@ export const DeleteSecretSyncModal = ({ isOpen, onOpenChange, secretSync, onComp
Also delete the secrets synced to {destinationName}. This cannot be undone.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="remove-secrets"
variant="danger"
checked={removeSecrets}
diff --git a/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx b/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx
index 16f9467ebe..b3b5fba9dd 100644
--- a/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx
+++ b/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx
@@ -24,7 +24,7 @@ import {
Stepper,
StepperList,
StepperStep,
- Switch
+ Toggle
} from "@app/components/v3";
import { useOrganization, useProject } from "@app/context";
import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";
@@ -336,7 +336,7 @@ export const CreateSecretSyncForm = ({
automatically. Turn off to only sync manually.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="auto-sync-enabled"
variant="project"
checked={value}
diff --git a/frontend/src/components/secret-syncs/forms/EditSecretSyncForm.tsx b/frontend/src/components/secret-syncs/forms/EditSecretSyncForm.tsx
index c7867c4ecf..5594ad8ef0 100644
--- a/frontend/src/components/secret-syncs/forms/EditSecretSyncForm.tsx
+++ b/frontend/src/components/secret-syncs/forms/EditSecretSyncForm.tsx
@@ -14,7 +14,7 @@ import {
Stepper,
StepperList,
StepperStep,
- Switch
+ Toggle
} from "@app/components/v3";
import { useOrganization } from "@app/context";
import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";
@@ -266,7 +266,7 @@ export const EditSecretSyncForm = ({ secretSync, onComplete, onDirtyChange, onCa
Turn off to only sync manually.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="auto-sync-enabled"
variant="project"
checked={value}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx
index 148558b147..839b360d6d 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx
@@ -19,7 +19,7 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -82,7 +82,7 @@ const SecretProtectionOption = ({
<Label htmlFor={id}>{title}</Label>
<FieldDescription>{description}</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id={id}
variant="project"
checked={isEnabled}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsx
index f6e40b0127..b406e8f0d0 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsx
@@ -22,7 +22,7 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -277,7 +277,7 @@ export const VercelSyncFields = () => {
Vercel team.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="vercel-sync-all-custom-environments"
variant="project"
checked={Boolean(value)}
@@ -453,7 +453,7 @@ export const VercelSyncFields = () => {
</FieldDescription>
<FieldError errors={[error]} />
</FieldContent>
- <Switch
+ <Toggle
id="vercel-sync-sensitive"
variant="project"
checked={Boolean(value) && !isProjectDevTargeted}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsParameterStoreSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsParameterStoreSyncOptionsFields.tsx
index ab2ec92773..19c3882321 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsParameterStoreSyncOptionsFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsParameterStoreSyncOptionsFields.tsx
@@ -18,7 +18,7 @@ import {
IconButton,
Input,
Label,
- Switch,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -237,7 +237,7 @@ export const AwsParameterStoreSyncOptionsFields = () => {
Infisical. Manually configured tags take precedence when keys conflict.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="sync-secret-metadata-tags"
variant="project"
checked={value}
@@ -258,7 +258,7 @@ export const AwsParameterStoreSyncOptionsFields = () => {
synced parameters with the values defined below.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="configure-resource-tags"
variant="project"
checked={Array.isArray(watchedTags)}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsSecretsManagerSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsSecretsManagerSyncOptionsFields.tsx
index 64b68dd33c..f5ad8fe132 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsSecretsManagerSyncOptionsFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsSecretsManagerSyncOptionsFields.tsx
@@ -18,7 +18,7 @@ import {
IconButton,
Input,
Label,
- Switch,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -245,7 +245,7 @@ export const AwsSecretsManagerSyncOptionsFields = () => {
Infisical. Manually configured tags take precedence when keys conflict.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="sync-secret-metadata-tags"
variant="project"
checked={value}
@@ -267,7 +267,7 @@ export const AwsSecretsManagerSyncOptionsFields = () => {
secrets with the values defined below.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="configure-resource-tags"
variant="project"
checked={Array.isArray(watchedTags)}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AzureKeyVaultSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AzureKeyVaultSyncOptionsFields.tsx
index 202cf90f6e..3089a3d4e4 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AzureKeyVaultSyncOptionsFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AzureKeyVaultSyncOptionsFields.tsx
@@ -6,7 +6,7 @@ import {
FieldDescription,
FieldError,
Label,
- Switch
+ Toggle
} from "@app/components/v3";
import { SecretSync } from "@app/hooks/api/secretSyncs";
@@ -30,7 +30,7 @@ export const AzureKeyVaultSyncOptionsFields = () => {
objects that Azure Key Vault exposes through the secrets API.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="disable-certificate-import"
variant="project"
checked={value}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/CloudflareWorkersSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/CloudflareWorkersSyncOptionsFields.tsx
index ae507de279..70e49d10c1 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/CloudflareWorkersSyncOptionsFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/CloudflareWorkersSyncOptionsFields.tsx
@@ -10,7 +10,7 @@ import {
FieldDescription,
FieldError,
Label,
- Switch
+ Toggle
} from "@app/components/v3";
import { SecretSync } from "@app/hooks/api/secretSyncs";
@@ -40,7 +40,7 @@ export const CloudflareWorkersSyncOptionsFields = () => {
bindings on Cloudflare Workers, not create new ones.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="sync-non-secret-bindings"
variant="project"
checked={value}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/FlyioSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/FlyioSyncOptionsFields.tsx
index 6837080a77..3073d37b9b 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/FlyioSyncOptionsFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/FlyioSyncOptionsFields.tsx
@@ -6,7 +6,7 @@ import {
FieldDescription,
FieldError,
Label,
- Switch
+ Toggle
} from "@app/components/v3";
import { SecretSync } from "@app/hooks/api/secretSyncs";
@@ -31,7 +31,7 @@ export const FlyioSyncOptionsFields = () => {
Machines view or app logs.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="flyio-auto-redeploy"
variant="project"
checked={value}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/QoverySyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/QoverySyncOptionsFields.tsx
index 9080bce8bf..0ac7127283 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/QoverySyncOptionsFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/QoverySyncOptionsFields.tsx
@@ -6,7 +6,7 @@ import {
FieldDescription,
FieldError,
Label,
- Switch
+ Toggle
} from "@app/components/v3";
import { SecretSync } from "@app/hooks/api/secretSyncs";
import { QoveryVariableType } from "@app/hooks/api/secretSyncs/types/qovery-sync";
@@ -31,7 +31,7 @@ export const QoverySyncOptionsFields = () => {
value is hidden).
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="qovery-variable-type"
variant="project"
checked={value === QoveryVariableType.Variable}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/RenderSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/RenderSyncOptionsFields.tsx
index a915f5f50a..9a99c3db93 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/RenderSyncOptionsFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/RenderSyncOptionsFields.tsx
@@ -6,7 +6,7 @@ import {
FieldDescription,
FieldError,
Label,
- Switch
+ Toggle
} from "@app/components/v3";
import { SecretSync } from "@app/hooks/api/secretSyncs";
@@ -28,7 +28,7 @@ export const RenderSyncOptionsFields = () => {
Services are automatically redeployed when secrets change.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="render-auto-redeploy-services"
variant="project"
checked={value}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncKeySchemaField.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncKeySchemaField.tsx
index c57fe4ee0e..fdb204d456 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncKeySchemaField.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncKeySchemaField.tsx
@@ -10,7 +10,7 @@ import {
FieldLabel,
Input,
Label,
- Switch
+ Toggle
} from "@app/components/v3";
import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";
@@ -86,7 +86,7 @@ export const SecretSyncKeySchemaField = () => {
manages. Anything else is left untouched.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="customize-key-names"
variant="project"
checked={isEnabled}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncOptionsFields.tsx
index bba5125cfe..55e0f0b706 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncOptionsFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncOptionsFields.tsx
@@ -23,7 +23,7 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -243,7 +243,7 @@ export const SecretSyncOptionsFields = ({ hideInitialSync, children }: Props) =>
are not in Infisical.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="disable-secret-deletion"
variant="project"
checked={value}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SpaceliftSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SpaceliftSyncOptionsFields.tsx
index 167f571d54..9967878060 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SpaceliftSyncOptionsFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SpaceliftSyncOptionsFields.tsx
@@ -10,7 +10,7 @@ import {
FieldDescription,
FieldError,
Label,
- Switch
+ Toggle
} from "@app/components/v3";
import { SecretSync } from "@app/hooks/api/secretSyncs";
@@ -39,7 +39,7 @@ export const SpaceliftSyncOptionsFields = () => {
the web GUI or through the API.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="spacelift-write-only"
variant="project"
checked={value}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/TriggerDevSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/TriggerDevSyncOptionsFields.tsx
index de4676846e..b3a3a83fa6 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/TriggerDevSyncOptionsFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/TriggerDevSyncOptionsFields.tsx
@@ -6,7 +6,7 @@ import {
FieldDescription,
FieldError,
Label,
- Switch
+ Toggle
} from "@app/components/v3";
import { SecretSync } from "@app/hooks/api/secretSyncs";
@@ -29,7 +29,7 @@ export const TriggerDevSyncOptionsFields = () => {
in Trigger.dev.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="trigger-dev-secret"
variant="project"
checked={value ?? true}
diff --git a/frontend/src/components/v3/generic/Field/Field.stories.tsx b/frontend/src/components/v3/generic/Field/Field.stories.tsx
index e69822a489..404aab1dec 100644
--- a/frontend/src/components/v3/generic/Field/Field.stories.tsx
+++ b/frontend/src/components/v3/generic/Field/Field.stories.tsx
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react-vite";
import { Checkbox } from "../Checkbox";
import { Input } from "../Input";
-import { Switch } from "../Switch";
+import { Toggle } from "../Toggle";
import {
Field,
FieldContent,
@@ -119,7 +119,7 @@ export const Horizontal: Story = {
Require a second factor when signing in from a new device.
</FieldDescription>
</FieldContent>
- <Switch defaultChecked />
+ <Toggle defaultChecked />
</Field>
)
};
diff --git a/frontend/src/components/v3/generic/Label/Label.stories.tsx b/frontend/src/components/v3/generic/Label/Label.stories.tsx
index 0cba85f058..7afa189052 100644
--- a/frontend/src/components/v3/generic/Label/Label.stories.tsx
+++ b/frontend/src/components/v3/generic/Label/Label.stories.tsx
@@ -1,7 +1,7 @@
import type { Meta, StoryObj } from "@storybook/react-vite";
import { Input } from "../Input";
-import { Switch } from "../Switch";
+import { Toggle } from "../Toggle";
import { Label } from "./Label";
/**
@@ -66,18 +66,18 @@ export const WithInput: Story = {
};
export const InlineWithSwitch: Story = {
- name: "Example: Inline With Switch",
+ name: "Example: Inline With Toggle",
parameters: {
docs: {
description: {
story:
- "Use `Label` as the inline label for a `Switch` (or `Checkbox`) when you don't need a description below — for example, settings toggle rows. Place the label and control as flex siblings; the label inherits the row's vertical alignment."
+ "Use `Label` as the inline label for a `Toggle` (or `Checkbox`) when you don't need a description below — for example, settings toggle rows. Place the label and control as flex siblings; the label inherits the row's vertical alignment."
}
}
},
render: () => (
<div className="flex w-80 items-center gap-3">
- <Switch id="label-mfa" />
+ <Toggle id="label-mfa" />
<Label htmlFor="label-mfa">Require MFA on sign-in</Label>
</div>
)
diff --git a/frontend/src/components/v3/generic/Switch/index.ts b/frontend/src/components/v3/generic/Switch/index.ts
deleted file mode 100644
index 3b82ff0529..0000000000
--- a/frontend/src/components/v3/generic/Switch/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from "./Switch";
diff --git a/frontend/src/components/v3/generic/Switch/Switch.stories.tsx b/frontend/src/components/v3/generic/Toggle/Toggle.stories.tsx
similarity index 89%
rename from frontend/src/components/v3/generic/Switch/Switch.stories.tsx
rename to frontend/src/components/v3/generic/Toggle/Toggle.stories.tsx
index 23af9258ff..263e7e3808 100644
--- a/frontend/src/components/v3/generic/Switch/Switch.stories.tsx
+++ b/frontend/src/components/v3/generic/Toggle/Toggle.stories.tsx
@@ -2,16 +2,16 @@ import type { Meta, StoryObj } from "@storybook/react-vite";
import { Field, FieldContent, FieldDescription, FieldGroup, FieldTitle } from "../Field";
import { Label } from "../Label";
-import { Switch } from "./Switch";
+import { Toggle } from "./Toggle";
/**
- * Switches allow users to toggle between two states (on/off).
- * Use switches for binary settings that take effect immediately.
+ * Toggles allow users to switch between two states (on/off).
+ * Use toggles for binary settings that take effect immediately.
* The variant determines the color when checked.
*/
const meta = {
- title: "Generic/Switch",
- component: Switch,
+ title: "Generic/Toggle",
+ component: Toggle,
parameters: {
layout: "centered"
},
@@ -46,7 +46,7 @@ const meta = {
globals: {
backgrounds: { value: "card" }
}
-} satisfies Meta<typeof Switch>;
+} satisfies Meta<typeof Toggle>;
export default meta;
type Story = StoryObj<typeof meta>;
@@ -60,7 +60,7 @@ export const Outline: Story = {
parameters: {
docs: {
description: {
- story: "Use this variant for general switch toggles."
+ story: "Use this variant for general-purpose toggles."
}
}
}
@@ -195,7 +195,7 @@ export const Unchecked: Story = {
parameters: {
docs: {
description: {
- story: "All switches share the same unchecked state regardless of variant."
+ story: "All toggles share the same unchecked state regardless of variant."
}
}
}
@@ -255,14 +255,14 @@ export const WithLabel: Story = {
docs: {
description: {
story:
- "The minimum accessible pairing — a `Label` whose `htmlFor` matches the `Switch`'s `id`. Clicking the label toggles the switch."
+ "The minimum accessible pairing — a `Label` whose `htmlFor` matches the `Toggle`'s `id`. Clicking the label flips the toggle."
}
}
},
render: () => (
<div className="flex w-80 items-center gap-3">
- <Switch id="switch-mfa" />
- <Label htmlFor="switch-mfa">Require MFA on sign-in</Label>
+ <Toggle id="toggle-mfa" />
+ <Label htmlFor="toggle-mfa">Require MFA on sign-in</Label>
</div>
)
};
@@ -273,7 +273,7 @@ export const WithDescription: Story = {
docs: {
description: {
story:
- "Pair a `Switch` with `FieldTitle` and `FieldDescription` inside a horizontal `Field` for the canonical settings-row layout — title and helper text on the left, control on the right."
+ "Pair a `Toggle` with `FieldTitle` and `FieldDescription` inside a horizontal `Field` for the canonical settings-row layout — title and helper text on the left, control on the right."
}
}
},
@@ -285,7 +285,7 @@ export const WithDescription: Story = {
Require a second factor when signing in from a new device.
</FieldDescription>
</FieldContent>
- <Switch defaultChecked />
+ <Toggle defaultChecked />
</Field>
)
};
@@ -309,7 +309,7 @@ export const InFieldGroup: Story = {
Require a second factor when signing in from a new device.
</FieldDescription>
</FieldContent>
- <Switch defaultChecked />
+ <Toggle defaultChecked />
</Field>
<Field orientation="horizontal">
<FieldContent>
@@ -318,7 +318,7 @@ export const InFieldGroup: Story = {
Send a digest of audit events every Monday at 09:00 UTC.
</FieldDescription>
</FieldContent>
- <Switch />
+ <Toggle />
</Field>
<Field orientation="horizontal">
<FieldContent>
@@ -327,7 +327,7 @@ export const InFieldGroup: Story = {
Help us improve Infisical by sharing anonymous usage data.
</FieldDescription>
</FieldContent>
- <Switch defaultChecked />
+ <Toggle defaultChecked />
</Field>
</FieldGroup>
)
diff --git a/frontend/src/components/v3/generic/Switch/Switch.tsx b/frontend/src/components/v3/generic/Toggle/Toggle.tsx
similarity index 76%
rename from frontend/src/components/v3/generic/Switch/Switch.tsx
rename to frontend/src/components/v3/generic/Toggle/Toggle.tsx
index d3e78e7d81..f97be97e46 100644
--- a/frontend/src/components/v3/generic/Switch/Switch.tsx
+++ b/frontend/src/components/v3/generic/Toggle/Toggle.tsx
@@ -4,9 +4,9 @@ import { cva, VariantProps } from "cva";
import { cn } from "../../utils";
-const switchVariants = cva(
+const toggleVariants = cva(
cn(
- "peer group/switch relative inline-flex shrink-0 cursor-pointer items-center rounded-full border transition-all",
+ "peer group/toggle relative inline-flex shrink-0 cursor-pointer items-center rounded-full border transition-all",
"outline-none after:absolute after:-inset-x-3 after:-inset-y-2",
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
@@ -44,40 +44,40 @@ const switchVariants = cva(
}
);
-const switchThumbVariants = cva(
+const toggleThumbVariants = cva(
cn(
"pointer-events-none block rounded-full shadow-xs ring-0 transition-all",
- "ml-0.5 group-data-[size=default]/switch:size-3.5 group-data-[size=sm]/switch:size-2.5",
- "group-data-[size=default]/switch:data-[state=unchecked]:translate-x-0",
- "group-data-[size=default]/switch:data-[state=checked]:translate-x-4",
- "group-data-[size=sm]/switch:data-[state=unchecked]:translate-x-0",
- "group-data-[size=sm]/switch:data-[state=checked]:translate-x-3",
+ "ml-0.5 group-data-[size=default]/toggle:size-3.5 group-data-[size=sm]/toggle:size-2.5",
+ "group-data-[size=default]/toggle:data-[state=unchecked]:translate-x-0",
+ "group-data-[size=default]/toggle:data-[state=checked]:translate-x-4",
+ "group-data-[size=sm]/toggle:data-[state=unchecked]:translate-x-0",
+ "group-data-[size=sm]/toggle:data-[state=checked]:translate-x-3",
"data-[state=unchecked]:border-foreground/5 data-[state=unchecked]:bg-foreground/15",
- "data-[state=unchecked]:group-hover/switch:bg-foreground/35",
+ "data-[state=unchecked]:group-hover/toggle:bg-foreground/35",
"data-[state=checked]:border-foreground/5 data-[state=checked]:bg-foreground/65",
- "data-[state=checked]:group-hover/switch:bg-foreground/75"
+ "data-[state=checked]:group-hover/toggle:bg-foreground/75"
)
);
-type SwitchProps = React.ComponentProps<typeof SwitchPrimitive.Root> &
- VariantProps<typeof switchVariants> & {
+type ToggleProps = React.ComponentProps<typeof SwitchPrimitive.Root> &
+ VariantProps<typeof toggleVariants> & {
size?: "sm" | "default";
};
-function Switch({ className, variant, size = "default", ...props }: SwitchProps) {
+function Toggle({ className, variant, size = "default", ...props }: ToggleProps) {
return (
<SwitchPrimitive.Root
- data-slot="switch"
+ data-slot="toggle"
data-size={size}
- className={cn(switchVariants({ variant }), className)}
+ className={cn(toggleVariants({ variant }), className)}
{...props}
>
<SwitchPrimitive.Thumb
- data-slot="switch-thumb"
- className={cn(switchThumbVariants(), "border")}
+ data-slot="toggle-thumb"
+ className={cn(toggleThumbVariants(), "border")}
/>
</SwitchPrimitive.Root>
);
}
-export { Switch };
+export { Toggle };
diff --git a/frontend/src/components/v3/generic/Toggle/index.ts b/frontend/src/components/v3/generic/Toggle/index.ts
new file mode 100644
index 0000000000..f99c198242
--- /dev/null
+++ b/frontend/src/components/v3/generic/Toggle/index.ts
@@ -0,0 +1 @@
+export * from "./Toggle";
diff --git a/frontend/src/components/v3/generic/index.ts b/frontend/src/components/v3/generic/index.ts
index d75a28185d..5f8e174345 100644
--- a/frontend/src/components/v3/generic/index.ts
+++ b/frontend/src/components/v3/generic/index.ts
@@ -44,9 +44,9 @@ export * from "./Sidebar";
export * from "./Skeleton";
export * from "./Spinner";
export * from "./Stepper";
-export * from "./Switch";
export * from "./Table";
export * from "./Tabs";
export * from "./TextArea";
export * from "./Toast";
+export * from "./Toggle";
export * from "./Tooltip";
diff --git a/frontend/src/components/v3/platform/DateRangeFilter/DateRangeFilter.tsx b/frontend/src/components/v3/platform/DateRangeFilter/DateRangeFilter.tsx
index ee3ff30940..fc6615fbc3 100644
--- a/frontend/src/components/v3/platform/DateRangeFilter/DateRangeFilter.tsx
+++ b/frontend/src/components/v3/platform/DateRangeFilter/DateRangeFilter.tsx
@@ -17,7 +17,7 @@ import {
SelectTrigger,
SelectValue
} from "../../generic/Select";
-import { Switch } from "../../generic/Switch";
+import { Toggle } from "../../generic/Toggle";
const MAX_RANGE_MONTHS = 3;
@@ -510,7 +510,7 @@ export function DateRangeFilter({
>
Local
</span>
- <Switch
+ <Toggle
id="date-range-utc-toggle"
checked={pendingIsUtc}
onCheckedChange={setPendingIsUtc}
diff --git a/frontend/src/pages/admin/AuthenticationPage/components/AuthenticationPageForm.tsx b/frontend/src/pages/admin/AuthenticationPage/components/AuthenticationPageForm.tsx
index f4e7f92abf..a412822e90 100644
--- a/frontend/src/pages/admin/AuthenticationPage/components/AuthenticationPageForm.tsx
+++ b/frontend/src/pages/admin/AuthenticationPage/components/AuthenticationPageForm.tsx
@@ -16,7 +16,7 @@ import {
FieldError,
FieldGroup,
FieldTitle,
- Switch
+ Toggle
} from "@app/components/v3";
import { useServerConfig } from "@app/context";
import { useUpdateServerConfig } from "@app/hooks/api";
@@ -152,7 +152,7 @@ export const AuthenticationPageForm = () => {
<FieldDescription>Allow users to authenticate with {label}.</FieldDescription>
<FieldError>{error?.message}</FieldError>
</FieldContent>
- <Switch
+ <Toggle
id={id}
aria-label={label}
variant="neutral"
diff --git a/frontend/src/pages/admin/GeneralPage/components/GeneralPageForm.tsx b/frontend/src/pages/admin/GeneralPage/components/GeneralPageForm.tsx
index aa8cc0e103..c5c1c59864 100644
--- a/frontend/src/pages/admin/GeneralPage/components/GeneralPageForm.tsx
+++ b/frontend/src/pages/admin/GeneralPage/components/GeneralPageForm.tsx
@@ -25,8 +25,8 @@ import {
SelectTrigger,
SelectValue,
Separator,
- Switch,
- TextArea
+ TextArea,
+ Toggle
} from "@app/components/v3";
import { useServerConfig } from "@app/context";
import { allowedEmailDomainsSchema } from "@app/helpers/email";
@@ -208,7 +208,7 @@ export const GeneralPageForm = () => {
</FieldDescription>
<FieldError>{error?.message}</FieldError>
</FieldContent>
- <Switch
+ <Toggle
id="trust-ldap-emails"
aria-label="Trust LDAP emails"
variant="neutral"
diff --git a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ConfigureEnrollmentModal.tsx b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ConfigureEnrollmentModal.tsx
index 0a326a54b2..20f617103b 100644
--- a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ConfigureEnrollmentModal.tsx
+++ b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ConfigureEnrollmentModal.tsx
@@ -57,8 +57,8 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -327,7 +327,7 @@ const ApiPanel = ({
Automatically renew certificates issued via this profile before they expire.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
variant="project"
id="api-auto-renew"
checked={field.value}
@@ -533,7 +533,7 @@ const EstPanel = ({
Allow EST clients to skip server-certificate validation during enrollment.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
variant="project"
id="est-disable-bootstrap"
checked={field.value}
@@ -744,7 +744,7 @@ const AcmePanel = ({
<TooltipTrigger asChild>
{/* span wrapper lets the tooltip listen for hover on a disabled control */}
<span className="inline-flex">
- <Switch
+ <Toggle
variant="project"
id="acme-skip-dns"
checked={field.value}
@@ -761,7 +761,7 @@ const AcmePanel = ({
</TooltipContent>
</Tooltip>
) : (
- <Switch
+ <Toggle
variant="project"
id="acme-skip-dns"
checked={field.value}
@@ -789,7 +789,7 @@ const AcmePanel = ({
<Tooltip>
<TooltipTrigger asChild>
<span className="inline-flex">
- <Switch
+ <Toggle
variant="project"
id="acme-skip-eab"
checked={field.value}
@@ -807,7 +807,7 @@ const AcmePanel = ({
</TooltipContent>
</Tooltip>
) : (
- <Switch
+ <Toggle
variant="project"
id="acme-skip-eab"
checked={field.value}
@@ -1227,7 +1227,7 @@ const ScepPanel = ({
</p>
</div>
{raCaSigningSupported && !isScepConfigured ? (
- <Switch
+ <Toggle
variant="project"
id="scep-sign-ra-with-ca"
checked={field.value}
@@ -1237,7 +1237,7 @@ const ScepPanel = ({
<Tooltip>
<TooltipTrigger asChild>
<div>
- <Switch
+ <Toggle
variant="project"
id="scep-sign-ra-with-ca"
checked={raCaSigningSupported && field.value}
@@ -1266,7 +1266,7 @@ const ScepPanel = ({
Return the issuing CA certificate inline alongside the issued cert.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
variant="project"
id="scep-include-ca"
checked={field.value}
@@ -1287,7 +1287,7 @@ const ScepPanel = ({
Let clients renew using their existing certificate as authentication.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
variant="project"
id="scep-cert-renewal"
checked={field.value}
diff --git a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/CreateCaWizard/DistributionStep.tsx b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/CreateCaWizard/DistributionStep.tsx
index 01f396339f..4c68e5d431 100644
--- a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/CreateCaWizard/DistributionStep.tsx
+++ b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/CreateCaWizard/DistributionStep.tsx
@@ -11,7 +11,7 @@ import {
FieldLabel,
IconButton,
Input,
- Switch
+ Toggle
} from "@app/components/v3";
import { useSubscription } from "@app/context";
import { MAX_INTERNAL_CA_DISTRIBUTION_POINT_URLS } from "@app/hooks/api/ca";
@@ -43,7 +43,7 @@ export const DistributionStep = ({ form }: Props) => {
certificates. Only the custom URLs below are included.
</FieldDescription>
</FieldContent>
- <Switch variant="project" checked={value} onCheckedChange={onChange} />
+ <Toggle variant="project" checked={value} onCheckedChange={onChange} />
</Field>
)}
/>
diff --git a/frontend/src/pages/cert-manager/CertificatesPage/components/SaveViewModal.tsx b/frontend/src/pages/cert-manager/CertificatesPage/components/SaveViewModal.tsx
index d61d582da9..1211b1f3cc 100644
--- a/frontend/src/pages/cert-manager/CertificatesPage/components/SaveViewModal.tsx
+++ b/frontend/src/pages/cert-manager/CertificatesPage/components/SaveViewModal.tsx
@@ -10,7 +10,7 @@ import {
DialogHeader,
DialogTitle,
Input,
- Switch
+ Toggle
} from "@app/components/v3";
import { useCreateCertificateInventoryView } from "@app/hooks/api/certificateInventoryViews";
import type { TInventoryViewFilters } from "@app/hooks/api/certificateInventoryViews/types";
@@ -88,7 +88,7 @@ export const SaveViewModal = ({
/>
{/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
<label className="mt-4 flex cursor-pointer items-center gap-2 text-sm text-foreground">
- <Switch variant="project" checked={isShared} onCheckedChange={setIsShared} />
+ <Toggle variant="project" checked={isShared} onCheckedChange={setIsShared} />
Share with team
</label>
<DialogFooter className="mt-6">
diff --git a/frontend/src/pages/cert-manager/PoliciesPage/components/CertificatePoliciesTab/CreatePolicyModal.tsx b/frontend/src/pages/cert-manager/PoliciesPage/components/CertificatePoliciesTab/CreatePolicyModal.tsx
index 143aeccaaf..33159aee95 100644
--- a/frontend/src/pages/cert-manager/PoliciesPage/components/CertificatePoliciesTab/CreatePolicyModal.tsx
+++ b/frontend/src/pages/cert-manager/PoliciesPage/components/CertificatePoliciesTab/CreatePolicyModal.tsx
@@ -36,8 +36,8 @@ import {
Stepper,
StepperList,
StepperStep,
- Switch,
- TextArea
+ TextArea,
+ Toggle
} from "@app/components/v3";
import { useProject, useSubscription } from "@app/context";
import {
@@ -427,7 +427,7 @@ const SectionToggle = ({
<p className="text-sm font-medium text-foreground">{title}</p>
<p className="mt-0.5 text-xs text-muted">{description}</p>
</div>
- <Switch checked={enabled} onCheckedChange={onChange} variant="project" />
+ <Toggle checked={enabled} onCheckedChange={onChange} variant="project" />
</div>
{enabled && children && <div className="mt-4">{children}</div>}
{error && <p className="mt-2 text-xs text-danger">{error}</p>}
diff --git a/frontend/src/pages/cert-manager/SettingsPage/components/CertificateCleanupTab.tsx b/frontend/src/pages/cert-manager/SettingsPage/components/CertificateCleanupTab.tsx
index bd30b8a942..5efa6dc8bf 100644
--- a/frontend/src/pages/cert-manager/SettingsPage/components/CertificateCleanupTab.tsx
+++ b/frontend/src/pages/cert-manager/SettingsPage/components/CertificateCleanupTab.tsx
@@ -17,7 +17,7 @@ import {
DocumentationLinkBadge,
Input,
Skeleton,
- Switch
+ Toggle
} from "@app/components/v3";
import {
useGetCertificateCleanupConfig,
@@ -121,7 +121,7 @@ export const CertificateCleanupTab = () => {
control={control}
name="isEnabled"
render={({ field: { value, onChange } }) => (
- <Switch variant="project" checked={value} onCheckedChange={onChange} />
+ <Toggle variant="project" checked={value} onCheckedChange={onChange} />
)}
/>
</CardAction>
@@ -180,7 +180,7 @@ export const CertificateCleanupTab = () => {
name="skipCertsWithActiveSyncs"
render={({ field: { value, onChange } }) => (
<div className="flex items-center gap-4 border-t border-border py-4">
- <Switch
+ <Toggle
variant="project"
checked={isEnabled && value}
onCheckedChange={onChange}
diff --git a/frontend/src/pages/kms/OverviewPage/components/CmekModal.tsx b/frontend/src/pages/kms/OverviewPage/components/CmekModal.tsx
index 03192443e9..59fac6987a 100644
--- a/frontend/src/pages/kms/OverviewPage/components/CmekModal.tsx
+++ b/frontend/src/pages/kms/OverviewPage/components/CmekModal.tsx
@@ -20,7 +20,7 @@ import {
FieldContent,
FieldDescription,
FieldTitle,
- Switch
+ Toggle
} from "@app/components/v3";
import { useProject, useSubscription } from "@app/context";
import { keyUsageDefaultOption, kmsKeyUsageOptions } from "@app/helpers/kms";
@@ -264,7 +264,7 @@ const CmekForm = ({ onComplete, cmek }: FormProps) => {
cannot be changed after the key is created.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="is-exportable"
variant="project"
checked={value}
@@ -285,7 +285,7 @@ const CmekForm = ({ onComplete, cmek }: FormProps) => {
Prevents this key from being deleted while enabled.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="has-delete-protection"
variant="project"
checked={value}
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityAuthTemplateModal.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityAuthTemplateModal.tsx
index 1ca25ee396..fde63ae5c2 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityAuthTemplateModal.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityAuthTemplateModal.tsx
@@ -30,8 +30,8 @@ import {
SheetFooter,
SheetHeader,
SheetTitle,
- Switch,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -701,7 +701,7 @@ export const IdentityAuthTemplateModal = ({ popUp, handlePopUpToggle }: Props) =
render={({ field: { value, onChange } }) => (
<Field>
<div className="flex items-center gap-2">
- <Switch
+ <Toggle
id="identity-auth-template-clear-token-reviewer-jwt"
checked={value}
onCheckedChange={onChange}
@@ -749,7 +749,7 @@ export const IdentityAuthTemplateModal = ({ popUp, handlePopUpToggle }: Props) =
return (
<Field data-invalid={Boolean(error)}>
<div className="flex items-center gap-2">
- <Switch
+ <Toggle
id="identity-auth-template-verify-tls"
checked={hasCaCert ? true : value}
onCheckedChange={onChange}
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityKubernetesAuthForm.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityKubernetesAuthForm.tsx
index 516bd8c966..36b71396ce 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityKubernetesAuthForm.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityKubernetesAuthForm.tsx
@@ -28,12 +28,12 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -966,7 +966,7 @@ export const IdentityKubernetesAuthForm = ({
return (
<Field className={templateDisabledClass}>
<div className="flex items-center gap-2">
- <Switch
+ <Toggle
id="k8s-verify-tls-certificate"
variant={scopeVariant}
checked={hasCaCert ? true : value}
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityTlsCertAuthForm.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityTlsCertAuthForm.tsx
index 754c53f8cb..e3d34eba0a 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityTlsCertAuthForm.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityTlsCertAuthForm.tsx
@@ -12,12 +12,12 @@ import {
FieldGroup,
FieldLabel,
Input,
- Switch,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -332,7 +332,7 @@ export const IdentityTlsCertAuthForm = ({
</TooltipContent>
</Tooltip>
</FieldLabel>
- <Switch
+ <Toggle
id="verifyClientCertificateChain"
checked={field.value}
onCheckedChange={field.onChange}
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/OrgIdentityModal.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/OrgIdentityModal.tsx
index c0a4e24108..483df0c825 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/OrgIdentityModal.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/OrgIdentityModal.tsx
@@ -19,7 +19,7 @@ import {
IconButton,
Input,
Label,
- Switch
+ Toggle
} from "@app/components/v3";
import { useOrganization, useSubscription } from "@app/context";
import { findOrgMembershipRole, isCustomOrgRole } from "@app/helpers/roles";
@@ -191,7 +191,7 @@ export const OrgIdentityModal = ({ popUp, handlePopUpToggle }: Props) => {
name="hasDeleteProtection"
render={({ field: { onChange, value } }) => (
<Field orientation="horizontal">
- <Switch
+ <Toggle
id="delete-protection-enabled"
variant={isSubOrganization ? "sub-org" : "org"}
checked={value}
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/lockout/LockoutTab.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/lockout/LockoutTab.tsx
index 14f3d4d105..df86a8b9dc 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/lockout/LockoutTab.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/lockout/LockoutTab.tsx
@@ -16,8 +16,8 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
TabsContent,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -82,7 +82,7 @@ export const LockoutTab = ({
</FieldDescription>
<FieldError>{error?.message}</FieldError>
</FieldContent>
- <Switch
+ <Toggle
id="lockout-enabled"
variant={scopeVariant}
checked={value}
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureADCSConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureADCSConnectionForm.tsx
index 8c092c60da..bb3b658799 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureADCSConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureADCSConnectionForm.tsx
@@ -18,12 +18,12 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -233,7 +233,7 @@ export const AzureADCSConnectionForm = ({ appConnection, onSubmit }: Props) => {
self-signed certificates.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="ssl-reject-unauthorized"
variant={scopeVariant}
checked={sslEnabled ? value : false}
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/F5BigIpConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/F5BigIpConnectionForm.tsx
index 502aeda2fd..6adfc61b45 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/F5BigIpConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/F5BigIpConnectionForm.tsx
@@ -19,12 +19,12 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -304,7 +304,7 @@ export const F5BigIpConnectionForm = ({ appConnection, onSubmit }: Props) => {
provide a CA certificate above.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="ssl-reject-unauthorized"
variant={scopeVariant}
checked={value}
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/KempLoadMasterConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/KempLoadMasterConnectionForm.tsx
index fc4eddb44b..7bbb517314 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/KempLoadMasterConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/KempLoadMasterConnectionForm.tsx
@@ -19,12 +19,12 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -304,7 +304,7 @@ export const KempLoadMasterConnectionForm = ({ appConnection, onSubmit }: Props)
provide a CA certificate above.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="ssl-reject-unauthorized"
variant={scopeVariant}
checked={value}
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LdapConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LdapConnectionForm.tsx
index a6d11c2c5b..87b8efb08a 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LdapConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LdapConnectionForm.tsx
@@ -19,12 +19,12 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -339,7 +339,7 @@ export const LdapConnectionForm = ({ appConnection, onSubmit }: Props) => {
trusted SSL certificate.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="ssl-reject-unauthorized"
variant={scopeVariant}
checked={sslEnabled ? value : false}
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/MongoDBConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/MongoDBConnectionForm.tsx
index 342c1a5303..7eea8b6a3a 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/MongoDBConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/MongoDBConnectionForm.tsx
@@ -18,12 +18,12 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -224,7 +224,7 @@ export const MongoDBConnectionForm = ({ appConnection, onSubmit }: Props) => {
<FieldContent>
<Label htmlFor="tls-enabled">Enable TLS</Label>
</FieldContent>
- <Switch
+ <Toggle
id="tls-enabled"
variant={scopeVariant}
checked={value}
@@ -267,7 +267,7 @@ export const MongoDBConnectionForm = ({ appConnection, onSubmit }: Props) => {
trusted TLS certificate.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="tls-reject-unauthorized"
variant={scopeVariant}
checked={tlsEnabled ? value : false}
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NetScalerConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NetScalerConnectionForm.tsx
index 15efcfded9..51acc610cd 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NetScalerConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NetScalerConnectionForm.tsx
@@ -19,12 +19,12 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -301,7 +301,7 @@ export const NetScalerConnectionForm = ({ appConnection, onSubmit }: Props) => {
provide a CA certificate above.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="ssl-reject-unauthorized"
variant={scopeVariant}
checked={value}
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NutanixPrismCentralConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NutanixPrismCentralConnectionForm.tsx
index 54d05c9d9e..ae41139b08 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NutanixPrismCentralConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NutanixPrismCentralConnectionForm.tsx
@@ -19,12 +19,12 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -356,7 +356,7 @@ export const NutanixPrismCentralConnectionForm = ({ appConnection, onSubmit }: P
provide a CA certificate above.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="ssl-reject-unauthorized"
variant={scopeVariant}
checked={value}
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RedisConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RedisConnectionForm.tsx
index 5ad4c68752..e93a103f66 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RedisConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RedisConnectionForm.tsx
@@ -18,12 +18,12 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -211,7 +211,7 @@ export const RedisConnectionForm = ({ appConnection, onSubmit }: Props) => {
<FieldContent>
<Label htmlFor="ssl-enabled">Enable SSL</Label>
</FieldContent>
- <Switch
+ <Toggle
id="ssl-enabled"
variant={scopeVariant}
checked={value}
@@ -254,7 +254,7 @@ export const RedisConnectionForm = ({ appConnection, onSubmit }: Props) => {
trusted SSL certificate.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="ssl-reject-unauthorized"
variant={scopeVariant}
checked={sslEnabled ? value : false}
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/WinRMConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/WinRMConnectionForm.tsx
index da5adf6db3..dff7018e3e 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/WinRMConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/WinRMConnectionForm.tsx
@@ -18,8 +18,8 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -262,7 +262,7 @@ export const WinRMConnectionForm = ({ appConnection, onSubmit }: Props) => {
no server certificate is required.
</FieldDescription>
</FieldContent>
- <Switch id="ssl-enabled" checked={value} onCheckedChange={onChange} />
+ <Toggle id="ssl-enabled" checked={value} onCheckedChange={onChange} />
</Field>
<FieldError errors={[error]} />
</Field>
@@ -305,7 +305,7 @@ export const WinRMConnectionForm = ({ appConnection, onSubmit }: Props) => {
certificate.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="ssl-reject-unauthorized"
checked={sslEnabled ? value : false}
onCheckedChange={onChange}
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/CredentialRotationForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/CredentialRotationForm.tsx
index 1a575c4570..fade7eace6 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/CredentialRotationForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/CredentialRotationForm.tsx
@@ -12,7 +12,7 @@ import {
FieldLabel,
Input,
Label,
- Switch,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -46,7 +46,7 @@ export const CredentialRotationForm = ({ children }: Props) => {
: "App connection credentials will not be rotated automatically."}
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="auto-rotation-enabled"
variant={scopeVariant}
checked={value}
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/SqlConnectionFields.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/SqlConnectionFields.tsx
index 66dfa19c0e..b10c8d2faf 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/SqlConnectionFields.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/SqlConnectionFields.tsx
@@ -10,12 +10,12 @@ import {
Input,
Label,
SecretInput,
- Switch,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
- TextArea
+ TextArea,
+ Toggle
} from "@app/components/v3";
import { useScopeVariant } from "@app/hooks";
@@ -144,7 +144,7 @@ export const SqlConnectionFields = ({
<FieldContent>
<Label htmlFor="ssl-enabled">Enable SSL</Label>
</FieldContent>
- <Switch
+ <Toggle
id="ssl-enabled"
variant={scopeVariant}
checked={value}
@@ -188,7 +188,7 @@ export const SqlConnectionFields = ({
trusted SSL certificate.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="ssl-reject-unauthorized"
variant={scopeVariant}
checked={sslEnabled ? value : false}
@@ -216,7 +216,7 @@ export const SqlConnectionFields = ({
updating the password on creation.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="platform-managed"
variant={scopeVariant}
checked={value}
diff --git a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/CriblProviderAuditLogStreamForm.tsx b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/CriblProviderAuditLogStreamForm.tsx
index 4f847d3877..bd1d902318 100644
--- a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/CriblProviderAuditLogStreamForm.tsx
+++ b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/CriblProviderAuditLogStreamForm.tsx
@@ -9,7 +9,7 @@ import {
FieldLabel,
Input,
SecretInput,
- Switch,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -154,7 +154,7 @@ export const CriblProviderAuditLogStreamForm = ({ auditLogStream, onSubmit }: Pr
</TooltipContent>
</Tooltip>
</FieldLabel>
- <Switch
+ <Toggle
id="stream-batch-mode"
variant={scopeVariant}
checked={isBatch}
diff --git a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/CustomProviderAuditLogStreamForm.tsx b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/CustomProviderAuditLogStreamForm.tsx
index 5916b46760..0ee6c17df2 100644
--- a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/CustomProviderAuditLogStreamForm.tsx
+++ b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/CustomProviderAuditLogStreamForm.tsx
@@ -11,7 +11,7 @@ import {
FieldLabel,
IconButton,
Input,
- Switch,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -198,7 +198,7 @@ export const CustomProviderAuditLogStreamForm = ({ auditLogStream, onSubmit }: P
</TooltipContent>
</Tooltip>
</FieldLabel>
- <Switch
+ <Toggle
id="stream-batch-mode"
variant={scopeVariant}
checked={isBatch}
diff --git a/frontend/src/pages/organization/BillingV2Page/components/ProductSheet.tsx b/frontend/src/pages/organization/BillingV2Page/components/ProductSheet.tsx
index e7c284c781..4bf5befea3 100644
--- a/frontend/src/pages/organization/BillingV2Page/components/ProductSheet.tsx
+++ b/frontend/src/pages/organization/BillingV2Page/components/ProductSheet.tsx
@@ -23,13 +23,13 @@ import {
SheetFooter,
SheetHeader,
SheetTitle,
- Switch,
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
- TableRow
+ TableRow,
+ Toggle
} from "@app/components/v3";
import {
BillingV2Cadence,
@@ -306,7 +306,7 @@ const PlanCard = ({
{!isCustom && (showCadenceToggle || cardCadence === "annual") && (
<div className="flex items-center gap-2">
{showCadenceToggle && (
- <Switch
+ <Toggle
variant="org"
size="sm"
className="shrink-0"
diff --git a/frontend/src/pages/organization/NetworkingPage/components/NetworkingAuthMethodForm.tsx b/frontend/src/pages/organization/NetworkingPage/components/NetworkingAuthMethodForm.tsx
index 143d2812fc..ac425661bd 100644
--- a/frontend/src/pages/organization/NetworkingPage/components/NetworkingAuthMethodForm.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/components/NetworkingAuthMethodForm.tsx
@@ -12,8 +12,8 @@ import {
FieldLabel,
FilterableSelect,
Input,
- Switch,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -625,7 +625,7 @@ export const NetworkingAuthMethodForm = ({
render={({ field, fieldState: { error } }) => (
<Field>
<div className="flex items-center gap-2">
- <Switch
+ <Toggle
id="gateway-k8s-verify-tls"
variant="org"
checked={field.value}
diff --git a/frontend/src/pages/organization/ProductSettingsPage/SecretsManagement/ProductSettingsPage.tsx b/frontend/src/pages/organization/ProductSettingsPage/SecretsManagement/ProductSettingsPage.tsx
index 6d292e37ab..69b2e2b92f 100644
--- a/frontend/src/pages/organization/ProductSettingsPage/SecretsManagement/ProductSettingsPage.tsx
+++ b/frontend/src/pages/organization/ProductSettingsPage/SecretsManagement/ProductSettingsPage.tsx
@@ -16,7 +16,7 @@ import {
FieldDescription,
FieldGroup,
FieldTitle,
- Switch
+ Toggle
} from "@app/components/v3";
import {
OrgPermissionActions,
@@ -109,7 +109,7 @@ export const ProductSettingsPage = () => {
a={OrgPermissionSubjects.Settings}
>
{(isAllowed) => (
- <Switch
+ <Toggle
id="block-duplicate-secret-sync-destinations"
variant="project"
checked={currentOrg?.blockDuplicateSecretSyncDestinations ?? false}
@@ -132,7 +132,7 @@ export const ProductSettingsPage = () => {
a={OrgPermissionSubjects.Settings}
>
{(isAllowed) => (
- <Switch
+ <Toggle
id="allow-cross-project-secret-sharing"
variant="project"
checked={currentOrg?.allowCrossProjectSecretSharing ?? false}
diff --git a/frontend/src/pages/organization/SecretSharingPage/components/SecretSharingSettings/SecretSharingAllowShareToAnyone.tsx b/frontend/src/pages/organization/SecretSharingPage/components/SecretSharingSettings/SecretSharingAllowShareToAnyone.tsx
index 01a0616823..c9337b75f3 100644
--- a/frontend/src/pages/organization/SecretSharingPage/components/SecretSharingSettings/SecretSharingAllowShareToAnyone.tsx
+++ b/frontend/src/pages/organization/SecretSharingPage/components/SecretSharingSettings/SecretSharingAllowShareToAnyone.tsx
@@ -6,7 +6,7 @@ import {
CardDescription,
CardHeader,
CardTitle,
- Switch
+ Toggle
} from "@app/components/v3";
import { OrgPermissionActions, OrgPermissionSubjects, useOrganization } from "@app/context";
import { useUpdateOrg } from "@app/hooks/api";
@@ -42,7 +42,7 @@ export const SecretSharingAllowShareToAnyone = () => {
<CardAction>
<OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Settings}>
{(isAllowed) => (
- <Switch
+ <Toggle
variant="project"
id="enable-secret-sharing-outside-org"
onCheckedChange={(value) => handleSecretSharingToggle(value)}
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgOauthClientsTab/OauthClientModal.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgOauthClientsTab/OauthClientModal.tsx
index d58c667aa1..e76b11c6d8 100644
--- a/frontend/src/pages/organization/SettingsPage/components/OrgOauthClientsTab/OauthClientModal.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/OrgOauthClientsTab/OauthClientModal.tsx
@@ -31,8 +31,8 @@ import {
SheetFooter,
SheetHeader,
SheetTitle,
- Switch,
- TextArea
+ TextArea,
+ Toggle
} from "@app/components/v3";
import { useOrganization } from "@app/context";
import {
@@ -492,7 +492,7 @@ export const OauthClientModal = ({ popUp, handlePopUpClose, onCreated }: Props)
Reject authorization requests that do not include a PKCE code challenge.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="oauth-client-require-pkce"
variant="org"
checked={value}
@@ -539,7 +539,7 @@ export const OauthClientModal = ({ popUp, handlePopUpClose, onCreated }: Props)
declare that your identity provider already enforces MFA.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="oauth-client-token-exchange-idp-mfa"
variant="org"
checked={value}
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgProvisioningTab/OrgGithubSyncSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgProvisioningTab/OrgGithubSyncSection.tsx
index 95aef2ad1d..7d76bd962b 100644
--- a/frontend/src/pages/organization/SettingsPage/components/OrgProvisioningTab/OrgGithubSyncSection.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/OrgProvisioningTab/OrgGithubSyncSection.tsx
@@ -21,7 +21,7 @@ import {
FieldGroup,
FieldTitle,
Skeleton,
- Switch
+ Toggle
} from "@app/components/v3";
import { OrgPermissionActions, OrgPermissionSubjects, useSubscription } from "@app/context";
import {
@@ -138,7 +138,7 @@ export const OrgGithubSyncSection = () => {
a={OrgPermissionSubjects.GithubOrgSync}
>
{(isAllowed) => (
- <Switch
+ <Toggle
id="enable-sync"
variant="org"
checked={data.isActive}
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgProvisioningTab/OrgSCIMSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgProvisioningTab/OrgSCIMSection.tsx
index f82ceac959..96a4e48cf1 100644
--- a/frontend/src/pages/organization/SettingsPage/components/OrgProvisioningTab/OrgSCIMSection.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/OrgProvisioningTab/OrgSCIMSection.tsx
@@ -17,7 +17,7 @@ import {
FieldGroup,
FieldTitle,
Separator,
- Switch
+ Toggle
} from "@app/components/v3";
import {
OrgPermissionActions,
@@ -102,7 +102,7 @@ export const OrgScimSection = () => {
</FieldContent>
<OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Scim}>
{(isAllowed) => (
- <Switch
+ <Toggle
id="enable-scim"
variant="org"
checked={currentOrg?.scimEnabled ?? false}
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSecurityTab/OrgGenericAuthSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSecurityTab/OrgGenericAuthSection.tsx
index 712c0cc140..e757aca3dd 100644
--- a/frontend/src/pages/organization/SettingsPage/components/OrgSecurityTab/OrgGenericAuthSection.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/OrgSecurityTab/OrgGenericAuthSection.tsx
@@ -21,7 +21,7 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch
+ Toggle
} from "@app/components/v3";
import {
OrgPermissionActions,
@@ -100,7 +100,7 @@ export const OrgGenericAuthSection = () => {
</FieldContent>
<OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Sso}>
{(isAllowed) => (
- <Switch
+ <Toggle
id="enforce-org-mfa"
variant="org"
checked={currentOrg?.enforceMfa ?? false}
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/LDAPModal.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/LDAPModal.tsx
index d0a1cd0b35..baee09fe8b 100644
--- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/LDAPModal.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/LDAPModal.tsx
@@ -31,8 +31,8 @@ import {
SheetFooter,
SheetHeader,
SheetTitle,
- Switch,
- TextArea
+ TextArea,
+ Toggle
} from "@app/components/v3";
import { useOrganization } from "@app/context";
import { useToggle } from "@app/hooks";
@@ -463,7 +463,7 @@ export const LDAPModal = ({ popUp, handlePopUpClose, handlePopUpToggle, hideDele
Enable to present a client certificate during the TLS handshake.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="ldap-enable-mtls"
variant="org"
checked={field.value}
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgGeneralAuthSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgGeneralAuthSection.tsx
index 5adba81837..044ef49094 100644
--- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgGeneralAuthSection.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgGeneralAuthSection.tsx
@@ -30,7 +30,7 @@ import {
HoverCard,
HoverCardContent,
HoverCardTrigger,
- Switch
+ Toggle
} from "@app/components/v3";
import {
OrgPermissionActions,
@@ -260,7 +260,7 @@ export const OrgGeneralAuthSection = ({
</FieldContent>
<OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Sso}>
{(isAllowed) => (
- <Switch
+ <Toggle
id="enforce-saml-auth"
variant="org"
checked={currentOrg?.authEnforced ?? false}
@@ -286,7 +286,7 @@ export const OrgGeneralAuthSection = ({
</FieldContent>
<OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Sso}>
{(isAllowed) => (
- <Switch
+ <Toggle
id="enforce-oidc-auth"
variant="org"
checked={currentOrg?.authEnforced ?? false}
@@ -313,7 +313,7 @@ export const OrgGeneralAuthSection = ({
</FieldContent>
<OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Sso}>
{(isAllowed) => (
- <Switch
+ <Toggle
id="enforce-google-sso"
variant="org"
checked={currentOrg?.googleSsoAuthEnforced ?? false}
@@ -369,7 +369,7 @@ export const OrgGeneralAuthSection = ({
</FieldContent>
<OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Sso}>
{(isAllowed) => (
- <Switch
+ <Toggle
id="allow-admin-bypass"
variant="org"
checked={currentOrg?.bypassOrgAuthEnabled ?? false}
@@ -437,7 +437,7 @@ export const OrgGeneralAuthSection = ({
issues with their {enforcementLabel} provider.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="bypass-enabled-modal"
variant="org"
checked={bypassEnabledInModal}
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgLDAPSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgLDAPSection.tsx
index 8118a3ae3a..a41970b263 100644
--- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgLDAPSection.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgLDAPSection.tsx
@@ -21,7 +21,7 @@ import {
FieldGroup,
FieldTitle,
IconButton,
- Switch
+ Toggle
} from "@app/components/v3";
import {
OrgPermissionActions,
@@ -175,7 +175,7 @@ export const OrgLDAPSection = ({ onSwitchProvider }: Props): JSX.Element => {
>
{(isAllowed) => (
<div>
- <Switch
+ <Toggle
id="enable-ldap-sso"
variant="org"
checked={data.isActive}
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgOIDCSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgOIDCSection.tsx
index 5575693bca..2358e154cb 100644
--- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgOIDCSection.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgOIDCSection.tsx
@@ -26,7 +26,7 @@ import {
HoverCardContent,
HoverCardTrigger,
IconButton,
- Switch
+ Toggle
} from "@app/components/v3";
import {
OrgPermissionActions,
@@ -195,7 +195,7 @@ export const OrgOIDCSection = ({ onSwitchProvider }: Props): JSX.Element => {
>
{(isAllowed) => (
<div>
- <Switch
+ <Toggle
id="enable-oidc-sso"
variant="org"
checked={data.isActive}
@@ -251,7 +251,7 @@ export const OrgOIDCSection = ({ onSwitchProvider }: Props): JSX.Element => {
</FieldContent>
<OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Sso}>
{(isAllowed) => (
- <Switch
+ <Toggle
id="enforce-org-auth"
variant="org"
checked={data?.manageGroupMemberships ?? false}
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSSOSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSSOSection.tsx
index 0ab2bb97ae..636772290d 100644
--- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSSOSection.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSSOSection.tsx
@@ -20,7 +20,7 @@ import {
FieldGroup,
FieldTitle,
IconButton,
- Switch,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -185,7 +185,7 @@ export const OrgSSOSection = ({ onSwitchProvider }: Props): JSX.Element => {
>
{(isAllowed) => (
<div>
- <Switch
+ <Toggle
id="enable-saml-sso"
variant="org"
checked={data ? data.isActive : false}
@@ -242,7 +242,7 @@ export const OrgSSOSection = ({ onSwitchProvider }: Props): JSX.Element => {
</FieldContent>
<OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Sso}>
{(isAllowed) => (
- <Switch
+ <Toggle
id="enable-saml-group-sync"
variant="org"
checked={data?.enableGroupSync ?? false}
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamSchemaFields.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamSchemaFields.tsx
index 7d0ff2336c..6dfefadf75 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/PamSchemaFields.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamSchemaFields.tsx
@@ -24,8 +24,8 @@ import {
SelectTrigger,
SelectValue
} from "@app/components/v3/generic/Select";
-import { Switch } from "@app/components/v3/generic/Switch";
import { TextArea } from "@app/components/v3/generic/TextArea";
+import { Toggle } from "@app/components/v3/generic/Toggle";
import { Tooltip, TooltipContent, TooltipTrigger } from "@app/components/v3/generic/Tooltip";
import { useOrganization } from "@app/context";
import { PamFieldWidget, TPamFieldDescriptor } from "@app/hooks/api/pam";
@@ -214,7 +214,7 @@ export const PamSchemaFields = ({ control, setValue, namePrefix, fields, smartPa
)}
<FieldTooltip text={forcedRule?.reason ?? descriptor.tooltip} />
</FieldLabel>
- <Switch
+ <Toggle
variant="pam"
checked={Boolean(field.value)}
onCheckedChange={field.onChange}
diff --git a/frontend/src/pages/pam/PamDiscoveryPage/components/DiscoveryConfigFields.tsx b/frontend/src/pages/pam/PamDiscoveryPage/components/DiscoveryConfigFields.tsx
index c844b1e8f8..c1652fdc42 100644
--- a/frontend/src/pages/pam/PamDiscoveryPage/components/DiscoveryConfigFields.tsx
+++ b/frontend/src/pages/pam/PamDiscoveryPage/components/DiscoveryConfigFields.tsx
@@ -17,8 +17,8 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
- TextArea
+ TextArea,
+ Toggle
} from "@app/components/v3";
import {
PamAccountType,
@@ -94,7 +94,7 @@ const ToggleField = ({
<FieldLabel htmlFor={name} className="mb-0">
{label}
</FieldLabel>
- <Switch id={name} variant="pam" checked={field.value} onCheckedChange={field.onChange} />
+ <Toggle id={name} variant="pam" checked={field.value} onCheckedChange={field.onChange} />
</div>
</Field>
)}
diff --git a/frontend/src/pages/pam/PamTemplatesPage/components/TemplateDetailSheet.tsx b/frontend/src/pages/pam/PamTemplatesPage/components/TemplateDetailSheet.tsx
index 9693ea5272..79f2422ef8 100644
--- a/frontend/src/pages/pam/PamTemplatesPage/components/TemplateDetailSheet.tsx
+++ b/frontend/src/pages/pam/PamTemplatesPage/components/TemplateDetailSheet.tsx
@@ -27,8 +27,8 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
- TextArea
+ TextArea,
+ Toggle
} from "@app/components/v3";
import { Skeleton } from "@app/components/v3/generic/Skeleton";
import { useProject } from "@app/context";
@@ -626,7 +626,7 @@ const SettingsTab = ({
rotate only when triggered manually.
</p>
</div>
- <Switch
+ <Toggle
variant="pam"
checked={field.value ?? false}
onCheckedChange={field.onChange}
@@ -725,7 +725,7 @@ const SettingsTab = ({
render={({ field }) => (
<div className="flex items-center justify-between gap-3">
<p className="text-sm font-medium text-foreground">Check credentials</p>
- <Switch
+ <Toggle
variant="pam"
checked={field.value ?? false}
onCheckedChange={field.onChange}
diff --git a/frontend/src/pages/pam/components/RequestAccessSheet.tsx b/frontend/src/pages/pam/components/RequestAccessSheet.tsx
index 877b5984a4..b1e028e4f8 100644
--- a/frontend/src/pages/pam/components/RequestAccessSheet.tsx
+++ b/frontend/src/pages/pam/components/RequestAccessSheet.tsx
@@ -38,8 +38,8 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
- TextArea
+ TextArea,
+ Toggle
} from "@app/components/v3";
import {
PamAccessStatus,
@@ -431,7 +431,7 @@ export const RequestAccessSheet = ({
Grant now, skipping the approvers. Every use is audited.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
checked={breakGlassOnSubmit}
variant="danger"
onCheckedChange={setBreakGlassOnSubmit}
diff --git a/frontend/src/pages/pam/components/policyEditors/BooleanPolicyEditor.tsx b/frontend/src/pages/pam/components/policyEditors/BooleanPolicyEditor.tsx
index 56e1ee03a5..fd1e185ffd 100644
--- a/frontend/src/pages/pam/components/policyEditors/BooleanPolicyEditor.tsx
+++ b/frontend/src/pages/pam/components/policyEditors/BooleanPolicyEditor.tsx
@@ -1,4 +1,4 @@
-import { Field, FieldContent, FieldDescription, FieldTitle, Switch } from "@app/components/v3";
+import { Field, FieldContent, FieldDescription, FieldTitle, Toggle } from "@app/components/v3";
import { PolicyEditorProps } from "./types";
@@ -8,7 +8,7 @@ export const BooleanPolicyEditor = ({ label, description, value, onChange }: Pol
<FieldTitle>{label}</FieldTitle>
<FieldDescription>{description}</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
checked={value === true}
variant="pam"
onCheckedChange={(checked) => onChange(checked)}
diff --git a/frontend/src/pages/project/AccessControlPage/components/IdentityTab/components/ProjectIdentityModal.tsx b/frontend/src/pages/project/AccessControlPage/components/IdentityTab/components/ProjectIdentityModal.tsx
index 1efaa85b23..3702e95ed8 100644
--- a/frontend/src/pages/project/AccessControlPage/components/IdentityTab/components/ProjectIdentityModal.tsx
+++ b/frontend/src/pages/project/AccessControlPage/components/IdentityTab/components/ProjectIdentityModal.tsx
@@ -15,7 +15,7 @@ import {
IconButton,
Input,
Label,
- Switch
+ Toggle
} from "@app/components/v3";
import { useProject } from "@app/context";
import { TProjectIdentity, useUpdateProjectIdentity } from "@app/hooks/api";
@@ -107,7 +107,7 @@ export const ProjectIdentityModal = ({ onClose, identity }: ContentProps) => {
name="hasDeleteProtection"
render={({ field: { onChange, value } }) => (
<Field orientation="horizontal">
- <Switch
+ <Toggle
id="delete-protection-enabled"
variant="project"
checked={value}
diff --git a/frontend/src/pages/public/ShareSecretPage/components/ShareSecretForm.tsx b/frontend/src/pages/public/ShareSecretPage/components/ShareSecretForm.tsx
index e4183f6b44..08ebde58d2 100644
--- a/frontend/src/pages/public/ShareSecretPage/components/ShareSecretForm.tsx
+++ b/frontend/src/pages/public/ShareSecretPage/components/ShareSecretForm.tsx
@@ -25,8 +25,8 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
- Switch,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -299,7 +299,7 @@ export const ShareSecretForm = ({
defaultValue={SecretSharingAccessType.Organization}
render={({ field: { onChange, ...field }, fieldState: { error } }) => (
<Field orientation="horizontal">
- <Switch
+ <Toggle
variant="project"
checked={
field.value === SecretSharingAccessType.Organization ||
@@ -443,7 +443,7 @@ export const ShareSecretForm = ({
fieldState: { error }
}) => (
<Field orientation="horizontal">
- <Switch
+ <Toggle
variant="project"
checked={isOrgAccess ? false : (isChecked ?? false)}
onCheckedChange={onChange}
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx
index a70094028b..46251817d2 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx
@@ -30,8 +30,8 @@ import {
Input,
PasswordGenerator,
SheetFooter,
- Switch,
TextArea,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -621,7 +621,7 @@ export const CreateSecretForm = ({
render={({ field }) => (
<Field orientation="horizontal">
<FieldLabel className="cursor-pointer">Enable Multiline Encoding</FieldLabel>
- <Switch
+ <Toggle
variant="project"
checked={field.value}
onCheckedChange={field.onChange}
@@ -709,7 +709,7 @@ export const CreateSecretForm = ({
name={`metadata.${index}.isEncrypted`}
render={({ field: switchField }) => (
<>
- <Switch
+ <Toggle
id={`create-secret-metadata-${index}-encrypted`}
className="mt-2"
variant="project"
@@ -826,7 +826,7 @@ export const CreateSecretForm = ({
</Button>
<Field orientation="horizontal" className="my-auto ml-auto w-fit">
<FieldLabel htmlFor="create-more">Create More</FieldLabel>
- <Switch
+ <Toggle
id="create-more"
variant="project"
checked={createMore}
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretDropzone/ImportSecretsModal.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretDropzone/ImportSecretsModal.tsx
index f1e33c82b9..d2c3092569 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretDropzone/ImportSecretsModal.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretDropzone/ImportSecretsModal.tsx
@@ -27,13 +27,13 @@ import {
FileDropzone,
IconButton,
Input,
- Switch,
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -609,7 +609,7 @@ const ImportSecretsContent = ({
</TooltipContent>
</Tooltip>
</FieldLabel>
- <Switch
+ <Toggle
variant="danger"
checked={shouldOverwrite}
onCheckedChange={setShouldOverwrite}
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretAccessInsights.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretAccessInsights.tsx
index 87d5f3cbb6..c173372e52 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretAccessInsights.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretAccessInsights.tsx
@@ -50,13 +50,13 @@ import {
SheetHeader,
SheetTitle,
Skeleton,
- Switch,
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -592,7 +592,7 @@ export function SecretAccessInsights({ secretKey, environment, secretPath }: Pro
<div className="flex thin-scrollbar flex-col gap-4 overflow-y-auto p-4">
<div className="flex items-center gap-2">
<Label className="cursor-pointer gap-1.5 text-xs whitespace-nowrap text-muted">
- <Switch
+ <Toggle
size="sm"
variant="project"
checked={showAllEntities}
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretMetadataForm.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretMetadataForm.tsx
index 9b13fb11cd..94451f0edd 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretMetadataForm.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretMetadataForm.tsx
@@ -15,7 +15,7 @@ import {
FieldLabel,
IconButton,
Input,
- Switch
+ Toggle
} from "@app/components/v3";
import { useProject, useProjectPermission } from "@app/context";
import {
@@ -216,7 +216,7 @@ export const SecretMetadataForm = ({
control={control}
name={`metadata.${index}.isEncrypted`}
render={({ field: switchField }) => (
- <Switch
+ <Toggle
className="mt-2"
variant="project"
size="default"
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SelectionPanel/components/BulkTagDialog/BulkTagDialog.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SelectionPanel/components/BulkTagDialog/BulkTagDialog.tsx
index a625dc2335..35af022022 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SelectionPanel/components/BulkTagDialog/BulkTagDialog.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SelectionPanel/components/BulkTagDialog/BulkTagDialog.tsx
@@ -21,13 +21,13 @@ import {
FieldContent,
FieldDescription,
FieldLabel,
- Switch,
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
- TableRow
+ TableRow,
+ Toggle
} from "@app/components/v3";
import { ProjectPermissionActions, ProjectPermissionSub, useProjectPermission } from "@app/context";
import { ProjectPermissionSecretActions } from "@app/context/ProjectPermissionContext/types";
@@ -360,7 +360,7 @@ const BulkTagDialogContent = ({
name="isReplaceMode"
control={control}
render={({ field }) => (
- <Switch
+ <Toggle
variant="project"
id="replace-tags-toggle"
checked={field.value}
diff --git a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/ApprovalPolicyList/components/AccessPolicyModal.tsx b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/ApprovalPolicyList/components/AccessPolicyModal.tsx
index b126600a4d..efe1398df0 100644
--- a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/ApprovalPolicyList/components/AccessPolicyModal.tsx
+++ b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/ApprovalPolicyList/components/AccessPolicyModal.tsx
@@ -44,7 +44,7 @@ import {
SheetFooter,
SheetHeader,
SheetTitle,
- Switch,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -1024,7 +1024,7 @@ const Form = ({
<FieldTitle>Self Approvals</FieldTitle>
<FieldDescription>Allow approvers to review their own requests</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="self-approvals"
aria-label="Allow self approvals"
variant="project"
@@ -1046,7 +1046,7 @@ const Form = ({
When enabled, machine identities can modify secrets without requiring approval
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="bypass-machine-identities"
aria-label="Bypass approval for machine identities"
variant="project"
@@ -1069,7 +1069,7 @@ const Form = ({
Allow certain users to bypass policy in break-glass situations
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="bypass-approvals"
aria-label="Allow approval bypass"
variant="project"
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/ReplicateFolderFromBoard/ReplicateFolderFromBoard.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/ReplicateFolderFromBoard/ReplicateFolderFromBoard.tsx
index b437328238..869ab08dcb 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/ReplicateFolderFromBoard/ReplicateFolderFromBoard.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/ReplicateFolderFromBoard/ReplicateFolderFromBoard.tsx
@@ -23,7 +23,7 @@ import {
SheetFooter,
SheetHeader,
SheetTitle,
- Switch
+ Toggle
} from "@app/components/v3";
import { ProjectPermissionSecretActions } from "@app/context/ProjectPermissionContext/types";
import { useDebounce } from "@app/hooks";
@@ -445,7 +445,7 @@ export const ReplicateFolderFromBoard = ({
Turn this off to replicate secret keys without their current values.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
id="replicate-secrets-include-values"
variant="project"
checked={shouldIncludeValues}
diff --git a/frontend/src/pages/secret-manager/SettingsPage/components/PreferencesSection/PreferencesSection.tsx b/frontend/src/pages/secret-manager/SettingsPage/components/PreferencesSection/PreferencesSection.tsx
index 616c43ec24..25d9fd6b77 100644
--- a/frontend/src/pages/secret-manager/SettingsPage/components/PreferencesSection/PreferencesSection.tsx
+++ b/frontend/src/pages/secret-manager/SettingsPage/components/PreferencesSection/PreferencesSection.tsx
@@ -14,7 +14,7 @@ import {
FieldDescription,
FieldGroup,
FieldTitle,
- Switch
+ Toggle
} from "@app/components/v3";
import { ProjectPermissionActions, ProjectPermissionSub, useProject } from "@app/context";
import { useUpdateProject } from "@app/hooks/api";
@@ -92,7 +92,7 @@ export const PreferencesSection = () => {
a={ProjectPermissionSub.Settings}
>
{(isAllowed) => (
- <Switch
+ <Toggle
id="autoCapitalization"
variant="project"
checked={currentProject?.autoCapitalization ?? false}
@@ -115,7 +115,7 @@ export const PreferencesSection = () => {
a={ProjectPermissionSub.Settings}
>
{(isAllowed) => (
- <Switch
+ <Toggle
id="enforceEncryptedMetadata"
variant="project"
checked={currentProject?.enforceEncryptedSecretManagerSecretMetadata ?? false}
@@ -137,7 +137,7 @@ export const PreferencesSection = () => {
a={ProjectPermissionSub.Settings}
>
{(isAllowed) => (
- <Switch
+ <Toggle
id="secretSharing"
variant="project"
checked={currentProject?.secretSharing ?? true}
diff --git a/frontend/src/pages/secret-manager/SettingsPage/components/SecretValidationRulesSection/SecretValidationRulesSection.tsx b/frontend/src/pages/secret-manager/SettingsPage/components/SecretValidationRulesSection/SecretValidationRulesSection.tsx
index e2ed392d96..571a2ba416 100644
--- a/frontend/src/pages/secret-manager/SettingsPage/components/SecretValidationRulesSection/SecretValidationRulesSection.tsx
+++ b/frontend/src/pages/secret-manager/SettingsPage/components/SecretValidationRulesSection/SecretValidationRulesSection.tsx
@@ -57,13 +57,13 @@ import {
SheetFooter,
SheetHeader,
SheetTitle,
- Switch,
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
+ Toggle,
Tooltip,
TooltipContent,
TooltipTrigger
@@ -244,7 +244,7 @@ const RuleFormContent = ({
{isEditing && (
<div className="flex items-center justify-between border-b border-border px-6 py-3">
<span className="text-xs text-muted">{isActive ? "Enabled" : "Disabled"}</span>
- <Switch checked={isActive} onCheckedChange={setIsActive} variant="project" />
+ <Toggle checked={isActive} onCheckedChange={setIsActive} variant="project" />
</div>
)}
<div
diff --git a/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/MicrosoftTeamsIntegrationForm.tsx b/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/MicrosoftTeamsIntegrationForm.tsx
index 3aa5137127..f6b849771d 100644
--- a/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/MicrosoftTeamsIntegrationForm.tsx
+++ b/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/MicrosoftTeamsIntegrationForm.tsx
@@ -25,7 +25,7 @@ import {
SelectValue,
SheetClose,
SheetFooter,
- Switch
+ Toggle
} from "@app/components/v3";
import { useProject } from "@app/context";
import {
@@ -387,7 +387,7 @@ export const MicrosoftTeamsIntegrationForm = ({ onClose, onBack, menuContainer }
Send a notification when a secret approval request is opened.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
variant="project"
checked={field.value}
onCheckedChange={field.onChange}
@@ -408,7 +408,7 @@ export const MicrosoftTeamsIntegrationForm = ({ onClose, onBack, menuContainer }
Send a notification when an access request is opened.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
variant="project"
checked={field.value}
onCheckedChange={field.onChange}
diff --git a/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/SlackIntegrationForm.tsx b/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/SlackIntegrationForm.tsx
index 334bd4739a..82c8cb0d5e 100644
--- a/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/SlackIntegrationForm.tsx
+++ b/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/SlackIntegrationForm.tsx
@@ -25,7 +25,7 @@ import {
SelectValue,
SheetClose,
SheetFooter,
- Switch
+ Toggle
} from "@app/components/v3";
import { useProject } from "@app/context";
import {
@@ -284,7 +284,7 @@ export const SlackIntegrationForm = ({ onClose, onBack, menuContainer }: Props)
Send a notification when a secret approval request is opened.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
variant="project"
checked={field.value}
onCheckedChange={field.onChange}
@@ -321,7 +321,7 @@ export const SlackIntegrationForm = ({ onClose, onBack, menuContainer }: Props)
Send a notification when an access request is opened.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
variant="project"
checked={field.value}
onCheckedChange={field.onChange}
@@ -358,7 +358,7 @@ export const SlackIntegrationForm = ({ onClose, onBack, menuContainer }: Props)
Send a notification when a secret sync fails.
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
variant="project"
checked={field.value}
onCheckedChange={field.onChange}
diff --git a/frontend/src/pages/user/PersonalSettingsPage/components/AuthMethodSection/AuthMethodSection.tsx b/frontend/src/pages/user/PersonalSettingsPage/components/AuthMethodSection/AuthMethodSection.tsx
index 7321bbde36..56b209e924 100644
--- a/frontend/src/pages/user/PersonalSettingsPage/components/AuthMethodSection/AuthMethodSection.tsx
+++ b/frontend/src/pages/user/PersonalSettingsPage/components/AuthMethodSection/AuthMethodSection.tsx
@@ -17,7 +17,7 @@ import {
FieldContent,
FieldDescription,
FieldLabel,
- Switch
+ Toggle
} from "@app/components/v3";
import { useServerConfig, useUser } from "@app/context";
import { useUpdateUserAuthMethods } from "@app/hooks/api";
@@ -148,7 +148,7 @@ export const AuthMethodSection = () => {
: `Allow sign-in with ${authMethodOpt.label}.`}
</FieldDescription>
</FieldContent>
- <Switch
+ <Toggle
className="col-start-3 row-span-2 row-start-1 self-center"
id={`enable-${authMethodOpt.value}-auth`}
onCheckedChange={(value) => onAuthMethodToggle(value, authMethodOpt)}
diff --git a/frontend/src/views/Alerts/AlertAction.tsx b/frontend/src/views/Alerts/AlertAction.tsx
index 42ce6ae25d..53a456c117 100644
--- a/frontend/src/views/Alerts/AlertAction.tsx
+++ b/frontend/src/views/Alerts/AlertAction.tsx
@@ -20,7 +20,7 @@ import {
Popover,
PopoverContent,
PopoverTrigger,
- Switch
+ Toggle
} from "@app/components/v3";
import { usePopUp, useScopeVariant } from "@app/hooks";
import {
@@ -179,7 +179,7 @@ export const AlertAction = ({
<Label htmlFor="alert-quick-enable" className="cursor-pointer font-normal">
Enabled
</Label>
- <Switch
+ <Toggle
id="alert-quick-enable"
variant={scopeVariant}
checked={existingAlert.enabled}
diff --git a/frontend/src/views/Alerts/AlertForm.tsx b/frontend/src/views/Alerts/AlertForm.tsx
index ac871e195f..16ba4da595 100644
--- a/frontend/src/views/Alerts/AlertForm.tsx
+++ b/frontend/src/views/Alerts/AlertForm.tsx
@@ -20,8 +20,8 @@ import {
SelectTrigger,
SelectValue,
SheetFooter,
- Switch,
- TextArea
+ TextArea,
+ Toggle
} from "@app/components/v3";
import { useScopeVariant } from "@app/hooks";
import {
@@ -229,7 +229,7 @@ export const AlertForm = ({
className="cursor-pointer justify-between rounded-md border border-border px-3 py-2.5 font-normal"
>
Enabled
- <Switch
+ <Toggle
id="alert-enabled"
variant={scopeVariant}
checked={field.value}
diff --git a/frontend/src/views/Alerts/ChannelCard.tsx b/frontend/src/views/Alerts/ChannelCard.tsx
index 1466045ded..51fd317d02 100644
--- a/frontend/src/views/Alerts/ChannelCard.tsx
+++ b/frontend/src/views/Alerts/ChannelCard.tsx
@@ -16,7 +16,7 @@ import {
InputGroupButton,
InputGroupInput,
Label,
- Switch
+ Toggle
} from "@app/components/v3";
import { useScopeVariant } from "@app/hooks";
import {
@@ -168,7 +168,7 @@ export const ChannelCard = ({
control={control}
name={`channels.${index}.enabled`}
render={({ field }) => (
- <Switch
+ <Toggle
id={`channel-${index}-enabled`}
aria-label={`Toggle ${channelLabel} channel`}
variant={scopeVariant}