From 6be3f6bb13ec233f2b9e84867eca13e7f6aad94c Mon Sep 17 00:00:00 2001 From: Purvesh Makode Date: Wed, 4 Dec 2024 14:03:36 +0530 Subject: [PATCH] refactor: [M3-8899] - Migrate `FormControlLabel` to `ui` package (#11353) * Move `FormControlLabel` to `ui` package * Added changeset: Migrate `FormControlLabel` from `manager` to `ui` package * Added changeset: Migrate `FormControlLabel` from `manager` to `ui` package --- .../.changeset/pr-11353-removed-1733229097582.md | 5 +++++ packages/manager/src/components/FormGroup.stories.tsx | 3 +-- packages/manager/src/components/FormLabel.stories.tsx | 3 +-- .../manager/src/components/ModeSelect/ModeSelect.tsx | 4 +--- packages/manager/src/features/Account/AutoBackups.tsx | 9 +++++++-- .../manager/src/features/Account/NetworkHelper.tsx | 4 +--- packages/manager/src/features/Backups/AutoEnroll.tsx | 9 +++++++-- .../DatabaseCreate/DatabaseCreateAccessControls.tsx | 9 +++++++-- .../Databases/DatabaseCreate/DatabaseNodeSelector.tsx | 10 ++++++++-- .../DatabaseSettings/MaintenanceWindow.tsx | 4 ++-- .../manager/src/features/Domains/CloneDomainDrawer.tsx | 9 +++++++-- .../src/features/Domains/CreateDomain/CreateDomain.tsx | 2 +- .../manager/src/features/Domains/EditDomainDrawer.tsx | 9 +++++++-- .../FirewallDetail/Rules/FirewallRuleForm.tsx | 2 +- .../Firewalls/FirewallLanding/CreateFirewallDrawer.tsx | 2 +- .../Kubernetes/CreateCluster/ApplicationPlatform.tsx | 2 +- .../Kubernetes/CreateCluster/ControlPlaneACLPane.tsx | 10 ++++++++-- .../Kubernetes/CreateCluster/HAControlPlane.tsx | 3 +-- .../KubeControlPaneACLDrawer.tsx | 2 +- .../NodePoolsDisplay/AutoscalePoolDialog.tsx | 10 ++++++++-- .../features/Linodes/LinodeCreate/Addons/Backups.tsx | 9 +++++++-- .../features/Linodes/LinodeCreate/Addons/PrivateIP.tsx | 3 +-- .../Linodes/LinodeCreate/FirewallAuthorization.tsx | 3 +-- .../UserDefinedFields/UserDefinedFieldInput.tsx | 2 +- .../src/features/Linodes/LinodeCreate/VPC/VPC.tsx | 2 +- .../LinodeCreate/shared/LinodeSelectTableRow.tsx | 3 +-- .../LinodeBackup/RestoreToLinodeDrawer.tsx | 2 +- .../LinodeConfigs/LinodeConfigDialog.styles.ts | 3 +-- .../LinodesDetail/LinodeConfigs/LinodeConfigDialog.tsx | 2 +- .../LinodesDetail/LinodeNetworking/AddIPDrawer.tsx | 3 +-- .../LinodeResize/LinodeResizeUnifiedMigrationPanel.tsx | 3 +-- .../LinodesDetail/LinodeSettings/AlertSection.tsx | 3 +-- .../LinodeSettings/LinodeWatchdogPanel.tsx | 2 +- .../Linodes/LinodesDetail/LinodeSettings/VPCPanel.tsx | 2 +- .../features/Managed/SSHAccess/EditSSHAccessDrawer.tsx | 3 +-- .../NodeBalancers/NodeBalancerPassiveCheck.tsx | 9 ++++++--- .../AccessKeyLanding/LimitedAccessControls.tsx | 3 +-- .../ObjectStorage/BucketDetail/AccessSelect.tsx | 9 +++++++-- .../BucketLanding/BucketRateLimitTable.tsx | 3 +-- .../PlacementGroups/PlacementGroupPolicyRadioGroup.tsx | 10 ++++++++-- .../TwoFactor/TwoFactorToggle.tsx | 4 +--- .../Profile/OAuthClients/CreateOAuthClientDrawer.tsx | 9 +++++++-- .../Profile/OAuthClients/EditOAuthClientDrawer.tsx | 9 +++++++-- .../manager/src/features/Profile/Settings/Settings.tsx | 2 +- .../FieldTypes/UserDefinedSelect.tsx | 10 +++++++--- .../manager/src/features/Users/CreateUserDrawer.tsx | 3 +-- .../manager/src/features/Users/UserPermissions.tsx | 2 +- .../features/Users/UserPermissionsEntitySection.tsx | 3 +-- .../VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx | 2 +- .../features/Volumes/VolumeDrawer/ModeSelection.tsx | 4 +--- .../features/components/PlansPanel/PlanSelection.tsx | 3 +-- packages/ui/.changeset/pr-11353-added-1733229144769.md | 5 +++++ .../FormControlLabel}/FormControlLabel.stories.tsx | 4 +++- .../components/FormControlLabel}/FormControlLabel.tsx | 0 packages/ui/src/components/FormControlLabel/index.ts | 1 + packages/ui/src/components/index.ts | 1 + 56 files changed, 159 insertions(+), 93 deletions(-) create mode 100644 packages/manager/.changeset/pr-11353-removed-1733229097582.md create mode 100644 packages/ui/.changeset/pr-11353-added-1733229144769.md rename packages/{manager/src/components => ui/src/components/FormControlLabel}/FormControlLabel.stories.tsx (86%) rename packages/{manager/src/components => ui/src/components/FormControlLabel}/FormControlLabel.tsx (100%) create mode 100644 packages/ui/src/components/FormControlLabel/index.ts diff --git a/packages/manager/.changeset/pr-11353-removed-1733229097582.md b/packages/manager/.changeset/pr-11353-removed-1733229097582.md new file mode 100644 index 00000000000..4b3a19d5908 --- /dev/null +++ b/packages/manager/.changeset/pr-11353-removed-1733229097582.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Removed +--- + +Migrate `FormControlLabel` from `manager` to `ui` package ([#11353](https://github.com/linode/manager/pull/11353)) diff --git a/packages/manager/src/components/FormGroup.stories.tsx b/packages/manager/src/components/FormGroup.stories.tsx index cbedd10ec28..b03cf18701c 100644 --- a/packages/manager/src/components/FormGroup.stories.tsx +++ b/packages/manager/src/components/FormGroup.stories.tsx @@ -1,7 +1,6 @@ -import { Checkbox } from '@linode/ui'; +import { Checkbox, FormControlLabel } from '@linode/ui'; import React from 'react'; -import { FormControlLabel } from './FormControlLabel'; import { FormGroup } from './FormGroup'; import type { Meta, StoryObj } from '@storybook/react'; diff --git a/packages/manager/src/components/FormLabel.stories.tsx b/packages/manager/src/components/FormLabel.stories.tsx index 2c8138603c9..d928c7275e4 100644 --- a/packages/manager/src/components/FormLabel.stories.tsx +++ b/packages/manager/src/components/FormLabel.stories.tsx @@ -1,7 +1,6 @@ -import { FormControl, Radio, RadioGroup } from '@linode/ui'; +import { FormControl, FormControlLabel, Radio, RadioGroup } from '@linode/ui'; import React from 'react'; -import { FormControlLabel } from './FormControlLabel'; import { FormLabel } from './FormLabel'; import type { Meta, StoryObj } from '@storybook/react'; diff --git a/packages/manager/src/components/ModeSelect/ModeSelect.tsx b/packages/manager/src/components/ModeSelect/ModeSelect.tsx index dbdf843da7d..bf0a2ae3e07 100644 --- a/packages/manager/src/components/ModeSelect/ModeSelect.tsx +++ b/packages/manager/src/components/ModeSelect/ModeSelect.tsx @@ -1,8 +1,6 @@ -import { Radio, RadioGroup } from '@linode/ui'; +import { FormControlLabel, Radio, RadioGroup } from '@linode/ui'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; - export interface Mode { label: string; mode: modes; diff --git a/packages/manager/src/features/Account/AutoBackups.tsx b/packages/manager/src/features/Account/AutoBackups.tsx index a6de470a3c3..5fa9016789e 100644 --- a/packages/manager/src/features/Account/AutoBackups.tsx +++ b/packages/manager/src/features/Account/AutoBackups.tsx @@ -1,9 +1,14 @@ -import { Accordion, Notice, Toggle, Typography } from '@linode/ui'; +import { + Accordion, + FormControlLabel, + Notice, + Toggle, + Typography, +} from '@linode/ui'; import Grid from '@mui/material/Unstable_Grid2'; import * as React from 'react'; import { makeStyles } from 'tss-react/mui'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { Link } from 'src/components/Link'; import type { Theme } from '@mui/material/styles'; diff --git a/packages/manager/src/features/Account/NetworkHelper.tsx b/packages/manager/src/features/Account/NetworkHelper.tsx index 912bbee79f7..f4c9e15f20a 100644 --- a/packages/manager/src/features/Account/NetworkHelper.tsx +++ b/packages/manager/src/features/Account/NetworkHelper.tsx @@ -1,9 +1,7 @@ -import { Accordion, Toggle, Typography } from '@linode/ui'; +import { Accordion, FormControlLabel, Toggle, Typography } from '@linode/ui'; import Grid from '@mui/material/Unstable_Grid2'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; - interface Props { networkHelperEnabled: boolean; onChange: () => void; diff --git a/packages/manager/src/features/Backups/AutoEnroll.tsx b/packages/manager/src/features/Backups/AutoEnroll.tsx index 311b8ce4986..5a1fcb0453c 100644 --- a/packages/manager/src/features/Backups/AutoEnroll.tsx +++ b/packages/manager/src/features/Backups/AutoEnroll.tsx @@ -1,8 +1,13 @@ -import { Notice, Paper, Toggle, Typography } from '@linode/ui'; +import { + FormControlLabel, + Notice, + Paper, + Toggle, + Typography, +} from '@linode/ui'; import { styled } from '@mui/material/styles'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { Link } from 'src/components/Link'; interface AutoEnrollProps { diff --git a/packages/manager/src/features/Databases/DatabaseCreate/DatabaseCreateAccessControls.tsx b/packages/manager/src/features/Databases/DatabaseCreate/DatabaseCreateAccessControls.tsx index 3df07268d21..3b9d422307b 100644 --- a/packages/manager/src/features/Databases/DatabaseCreate/DatabaseCreateAccessControls.tsx +++ b/packages/manager/src/features/Databases/DatabaseCreate/DatabaseCreateAccessControls.tsx @@ -1,10 +1,15 @@ -import { Notice, Radio, RadioGroup, Typography } from '@linode/ui'; +import { + FormControlLabel, + Notice, + Radio, + RadioGroup, + Typography, +} from '@linode/ui'; import Grid from '@mui/material/Unstable_Grid2'; import { useState } from 'react'; import * as React from 'react'; import { makeStyles } from 'tss-react/mui'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { Link } from 'src/components/Link'; import { MultipleIPInput } from 'src/components/MultipleIPInput/MultipleIPInput'; import { ipFieldPlaceholder } from 'src/utilities/ipUtils'; diff --git a/packages/manager/src/features/Databases/DatabaseCreate/DatabaseNodeSelector.tsx b/packages/manager/src/features/Databases/DatabaseCreate/DatabaseNodeSelector.tsx index 0a62e1ab68f..0f3e4851b25 100644 --- a/packages/manager/src/features/Databases/DatabaseCreate/DatabaseNodeSelector.tsx +++ b/packages/manager/src/features/Databases/DatabaseCreate/DatabaseNodeSelector.tsx @@ -1,7 +1,13 @@ -import { FormControl, Notice, Radio, RadioGroup, Typography } from '@linode/ui'; +import { + FormControl, + FormControlLabel, + Notice, + Radio, + RadioGroup, + Typography, +} from '@linode/ui'; import React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { StyledChip } from 'src/features/components/PlansPanel/PlanSelection.styles'; import { determineInitialPlanCategoryTab } from 'src/features/components/PlansPanel/utils'; import { useRestrictedGlobalGrantCheck } from 'src/hooks/useRestrictedGlobalGrantCheck'; diff --git a/packages/manager/src/features/Databases/DatabaseDetail/DatabaseSettings/MaintenanceWindow.tsx b/packages/manager/src/features/Databases/DatabaseDetail/DatabaseSettings/MaintenanceWindow.tsx index 85c1d255f2f..092a43cafd1 100644 --- a/packages/manager/src/features/Databases/DatabaseDetail/DatabaseSettings/MaintenanceWindow.tsx +++ b/packages/manager/src/features/Databases/DatabaseDetail/DatabaseSettings/MaintenanceWindow.tsx @@ -1,12 +1,13 @@ -import { Typography } from '@linode/ui'; import { Autocomplete, Button, FormControl, + FormControlLabel, Notice, Radio, RadioGroup, TooltipIcon, + Typography, } from '@linode/ui'; import { useFormik } from 'formik'; import { DateTime } from 'luxon'; @@ -15,7 +16,6 @@ import * as React from 'react'; import { Link } from 'react-router-dom'; import { makeStyles } from 'tss-react/mui'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { useDatabaseMutation } from 'src/queries/databases/databases'; import type { Database, UpdatesSchedule } from '@linode/api-v4/lib/databases'; diff --git a/packages/manager/src/features/Domains/CloneDomainDrawer.tsx b/packages/manager/src/features/Domains/CloneDomainDrawer.tsx index 5749e5b40e9..891f536b9e8 100644 --- a/packages/manager/src/features/Domains/CloneDomainDrawer.tsx +++ b/packages/manager/src/features/Domains/CloneDomainDrawer.tsx @@ -1,11 +1,16 @@ -import { Notice, Radio, RadioGroup, TextField } from '@linode/ui'; +import { + FormControlLabel, + Notice, + Radio, + RadioGroup, + TextField, +} from '@linode/ui'; import { useFormik } from 'formik'; import React from 'react'; import { useHistory } from 'react-router-dom'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { Drawer } from 'src/components/Drawer'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { useCloneDomainMutation } from 'src/queries/domains'; import { useGrants, useProfile } from 'src/queries/profile/profile'; diff --git a/packages/manager/src/features/Domains/CreateDomain/CreateDomain.tsx b/packages/manager/src/features/Domains/CreateDomain/CreateDomain.tsx index 82f42d819c6..49cd6e60593 100644 --- a/packages/manager/src/features/Domains/CreateDomain/CreateDomain.tsx +++ b/packages/manager/src/features/Domains/CreateDomain/CreateDomain.tsx @@ -1,5 +1,6 @@ import { Autocomplete, + FormControlLabel, FormHelperText, Notice, Paper, @@ -18,7 +19,6 @@ import { useHistory } from 'react-router-dom'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { LandingHeader } from 'src/components/LandingHeader'; import { MultipleIPInput } from 'src/components/MultipleIPInput/MultipleIPInput'; import { reportException } from 'src/exceptionReporting'; diff --git a/packages/manager/src/features/Domains/EditDomainDrawer.tsx b/packages/manager/src/features/Domains/EditDomainDrawer.tsx index 739df097802..abd9efa4351 100644 --- a/packages/manager/src/features/Domains/EditDomainDrawer.tsx +++ b/packages/manager/src/features/Domains/EditDomainDrawer.tsx @@ -1,10 +1,15 @@ -import { Notice, Radio, RadioGroup, TextField } from '@linode/ui'; +import { + FormControlLabel, + Notice, + Radio, + RadioGroup, + TextField, +} from '@linode/ui'; import { useFormik } from 'formik'; import * as React from 'react'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { Drawer } from 'src/components/Drawer'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { MultipleIPInput } from 'src/components/MultipleIPInput/MultipleIPInput'; import { TagsInput } from 'src/components/TagsInput/TagsInput'; import { useUpdateDomainMutation } from 'src/queries/domains'; diff --git a/packages/manager/src/features/Firewalls/FirewallDetail/Rules/FirewallRuleForm.tsx b/packages/manager/src/features/Firewalls/FirewallDetail/Rules/FirewallRuleForm.tsx index 11da7411327..10e2549a106 100644 --- a/packages/manager/src/features/Firewalls/FirewallDetail/Rules/FirewallRuleForm.tsx +++ b/packages/manager/src/features/Firewalls/FirewallDetail/Rules/FirewallRuleForm.tsx @@ -1,5 +1,6 @@ import { Autocomplete, + FormControlLabel, Notice, Radio, RadioGroup, @@ -10,7 +11,6 @@ import { styled } from '@mui/material/styles'; import * as React from 'react'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { MultipleIPInput } from 'src/components/MultipleIPInput/MultipleIPInput'; import { addressOptions, diff --git a/packages/manager/src/features/Firewalls/FirewallLanding/CreateFirewallDrawer.tsx b/packages/manager/src/features/Firewalls/FirewallLanding/CreateFirewallDrawer.tsx index 46d0f278472..1465f91002b 100644 --- a/packages/manager/src/features/Firewalls/FirewallLanding/CreateFirewallDrawer.tsx +++ b/packages/manager/src/features/Firewalls/FirewallLanding/CreateFirewallDrawer.tsx @@ -1,6 +1,7 @@ /* eslint-disable jsx-a11y/anchor-is-valid */ import { Box, + FormControlLabel, Notice, Radio, RadioGroup, @@ -16,7 +17,6 @@ import { useLocation } from 'react-router-dom'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { Drawer } from 'src/components/Drawer'; import { ErrorMessage } from 'src/components/ErrorMessage'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { Link } from 'src/components/Link'; import { FIREWALL_LIMITS_CONSIDERATIONS_LINK } from 'src/constants'; import { LinodeSelect } from 'src/features/Linodes/LinodeSelect/LinodeSelect'; diff --git a/packages/manager/src/features/Kubernetes/CreateCluster/ApplicationPlatform.tsx b/packages/manager/src/features/Kubernetes/CreateCluster/ApplicationPlatform.tsx index 52132c98b0d..d0f4e0c135d 100644 --- a/packages/manager/src/features/Kubernetes/CreateCluster/ApplicationPlatform.tsx +++ b/packages/manager/src/features/Kubernetes/CreateCluster/ApplicationPlatform.tsx @@ -2,13 +2,13 @@ import { Box, Chip, FormControl, + FormControlLabel, Radio, RadioGroup, Typography, } from '@linode/ui'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { FormLabel } from 'src/components/FormLabel'; import { Link } from 'src/components/Link'; diff --git a/packages/manager/src/features/Kubernetes/CreateCluster/ControlPlaneACLPane.tsx b/packages/manager/src/features/Kubernetes/CreateCluster/ControlPlaneACLPane.tsx index b430813316d..6d4fd03087a 100644 --- a/packages/manager/src/features/Kubernetes/CreateCluster/ControlPlaneACLPane.tsx +++ b/packages/manager/src/features/Kubernetes/CreateCluster/ControlPlaneACLPane.tsx @@ -1,9 +1,15 @@ -import { Box, FormControl, Notice, Toggle, Typography } from '@linode/ui'; +import { + Box, + FormControl, + FormControlLabel, + Notice, + Toggle, + Typography, +} from '@linode/ui'; import { FormLabel } from '@mui/material'; import * as React from 'react'; import { ErrorMessage } from 'src/components/ErrorMessage'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { MultipleIPInput } from 'src/components/MultipleIPInput/MultipleIPInput'; import { validateIPs } from 'src/utilities/ipUtils'; diff --git a/packages/manager/src/features/Kubernetes/CreateCluster/HAControlPlane.tsx b/packages/manager/src/features/Kubernetes/CreateCluster/HAControlPlane.tsx index f80e596e423..b886bf2861b 100644 --- a/packages/manager/src/features/Kubernetes/CreateCluster/HAControlPlane.tsx +++ b/packages/manager/src/features/Kubernetes/CreateCluster/HAControlPlane.tsx @@ -1,4 +1,4 @@ -import { Typography } from '@linode/ui'; +import { FormControlLabel, Typography } from '@linode/ui'; import { Box, CircleProgress, @@ -11,7 +11,6 @@ import { import { FormLabel } from '@mui/material'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { Link } from 'src/components/Link'; export interface HAControlPlaneProps { diff --git a/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeControlPaneACLDrawer.tsx b/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeControlPaneACLDrawer.tsx index 7c4daab503b..b44a51826cc 100644 --- a/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeControlPaneACLDrawer.tsx +++ b/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeControlPaneACLDrawer.tsx @@ -1,6 +1,7 @@ import { yupResolver } from '@hookform/resolvers/yup'; import { Box, + FormControlLabel, Notice, TextField, Toggle, @@ -15,7 +16,6 @@ import { Controller, useForm } from 'react-hook-form'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { Drawer } from 'src/components/Drawer'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { MultipleNonExtendedIPInput } from 'src/components/MultipleIPInput/MultipleNonExtendedIPInput'; import { useKubernetesClusterMutation, diff --git a/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/AutoscalePoolDialog.tsx b/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/AutoscalePoolDialog.tsx index 26f605c88d3..fb0bdbabf88 100644 --- a/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/AutoscalePoolDialog.tsx +++ b/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/AutoscalePoolDialog.tsx @@ -1,4 +1,11 @@ -import { Button, Notice, TextField, Toggle, Typography } from '@linode/ui'; +import { + Button, + FormControlLabel, + Notice, + TextField, + Toggle, + Typography, +} from '@linode/ui'; import { AutoscaleNodePoolSchema } from '@linode/validation/lib/kubernetes.schema'; import Grid from '@mui/material/Unstable_Grid2'; import { useFormik } from 'formik'; @@ -8,7 +15,6 @@ import { makeStyles } from 'tss-react/mui'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { ConfirmationDialog } from 'src/components/ConfirmationDialog/ConfirmationDialog'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { Link } from 'src/components/Link'; import { useUpdateNodePoolMutation } from 'src/queries/kubernetes'; diff --git a/packages/manager/src/features/Linodes/LinodeCreate/Addons/Backups.tsx b/packages/manager/src/features/Linodes/LinodeCreate/Addons/Backups.tsx index 761ef633277..c129f622a8a 100644 --- a/packages/manager/src/features/Linodes/LinodeCreate/Addons/Backups.tsx +++ b/packages/manager/src/features/Linodes/LinodeCreate/Addons/Backups.tsx @@ -1,10 +1,15 @@ -import { Checkbox, Notice, Stack, Typography } from '@linode/ui'; +import { + Checkbox, + FormControlLabel, + Notice, + Stack, + Typography, +} from '@linode/ui'; import React, { useMemo } from 'react'; import { useController, useFormContext, useWatch } from 'react-hook-form'; import { Currency } from 'src/components/Currency'; import { DISK_ENCRYPTION_BACKUPS_CAVEAT_COPY } from 'src/components/Encryption/constants'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { Link } from 'src/components/Link'; import { useRestrictedGlobalGrantCheck } from 'src/hooks/useRestrictedGlobalGrantCheck'; import { useAccountSettings } from 'src/queries/account/settings'; diff --git a/packages/manager/src/features/Linodes/LinodeCreate/Addons/PrivateIP.tsx b/packages/manager/src/features/Linodes/LinodeCreate/Addons/PrivateIP.tsx index 0dba9d54b56..0837d72a004 100644 --- a/packages/manager/src/features/Linodes/LinodeCreate/Addons/PrivateIP.tsx +++ b/packages/manager/src/features/Linodes/LinodeCreate/Addons/PrivateIP.tsx @@ -1,8 +1,7 @@ -import { Checkbox, Stack, Typography } from '@linode/ui'; +import { Checkbox, FormControlLabel, Stack, Typography } from '@linode/ui'; import React, { useMemo } from 'react'; import { useController, useWatch } from 'react-hook-form'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { useRestrictedGlobalGrantCheck } from 'src/hooks/useRestrictedGlobalGrantCheck'; import { useRegionsQuery } from 'src/queries/regions/regions'; diff --git a/packages/manager/src/features/Linodes/LinodeCreate/FirewallAuthorization.tsx b/packages/manager/src/features/Linodes/LinodeCreate/FirewallAuthorization.tsx index e0f673b34be..83b0e688090 100644 --- a/packages/manager/src/features/Linodes/LinodeCreate/FirewallAuthorization.tsx +++ b/packages/manager/src/features/Linodes/LinodeCreate/FirewallAuthorization.tsx @@ -1,9 +1,8 @@ -import { Checkbox } from '@linode/ui'; +import { Checkbox, FormControlLabel } from '@linode/ui'; import React from 'react'; import { useController, useFormContext } from 'react-hook-form'; import { AkamaiBanner } from 'src/components/AkamaiBanner/AkamaiBanner'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { useFlags } from 'src/hooks/useFlags'; import { isNotNullOrUndefined } from 'src/utilities/nullOrUndefined'; diff --git a/packages/manager/src/features/Linodes/LinodeCreate/Tabs/StackScripts/UserDefinedFields/UserDefinedFieldInput.tsx b/packages/manager/src/features/Linodes/LinodeCreate/Tabs/StackScripts/UserDefinedFields/UserDefinedFieldInput.tsx index a8a1da0e7a7..4b52089f74e 100644 --- a/packages/manager/src/features/Linodes/LinodeCreate/Tabs/StackScripts/UserDefinedFields/UserDefinedFieldInput.tsx +++ b/packages/manager/src/features/Linodes/LinodeCreate/Tabs/StackScripts/UserDefinedFields/UserDefinedFieldInput.tsx @@ -2,6 +2,7 @@ import { Autocomplete, Divider, FormControl, + FormControlLabel, Radio, RadioGroup, Stack, @@ -11,7 +12,6 @@ import { import React from 'react'; import { useController, useFormContext } from 'react-hook-form'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { FormLabel } from 'src/components/FormLabel'; import { Link } from 'src/components/Link'; import PasswordInput from 'src/components/PasswordInput/PasswordInput'; diff --git a/packages/manager/src/features/Linodes/LinodeCreate/VPC/VPC.tsx b/packages/manager/src/features/Linodes/LinodeCreate/VPC/VPC.tsx index d3752bec5ec..071a0388d41 100644 --- a/packages/manager/src/features/Linodes/LinodeCreate/VPC/VPC.tsx +++ b/packages/manager/src/features/Linodes/LinodeCreate/VPC/VPC.tsx @@ -3,6 +3,7 @@ import { Box, Checkbox, Divider, + FormControlLabel, Notice, Paper, Stack, @@ -13,7 +14,6 @@ import { import React, { useState } from 'react'; import { Controller, useFormContext, useWatch } from 'react-hook-form'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { Link } from 'src/components/Link'; import { LinkButton } from 'src/components/LinkButton'; import { VPCSelect } from 'src/components/VPCSelect'; diff --git a/packages/manager/src/features/Linodes/LinodeCreate/shared/LinodeSelectTableRow.tsx b/packages/manager/src/features/Linodes/LinodeCreate/shared/LinodeSelectTableRow.tsx index 3bdccb73b8e..aa1e7e074a2 100644 --- a/packages/manager/src/features/Linodes/LinodeCreate/shared/LinodeSelectTableRow.tsx +++ b/packages/manager/src/features/Linodes/LinodeCreate/shared/LinodeSelectTableRow.tsx @@ -1,7 +1,6 @@ -import { Radio } from '@linode/ui'; +import { FormControlLabel, Radio } from '@linode/ui'; import React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { InlineMenuAction } from 'src/components/InlineMenuAction/InlineMenuAction'; import { StatusIcon } from 'src/components/StatusIcon/StatusIcon'; import { TableCell } from 'src/components/TableCell'; diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeBackup/RestoreToLinodeDrawer.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeBackup/RestoreToLinodeDrawer.tsx index 4559d235578..2a204ddee28 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeBackup/RestoreToLinodeDrawer.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeBackup/RestoreToLinodeDrawer.tsx @@ -2,6 +2,7 @@ import { Autocomplete, Checkbox, FormControl, + FormControlLabel, FormHelperText, Notice, } from '@linode/ui'; @@ -11,7 +12,6 @@ import * as React from 'react'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { Drawer } from 'src/components/Drawer'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { useEventsPollingActions } from 'src/queries/events/events'; import { useLinodeBackupRestoreMutation } from 'src/queries/linodes/backups'; import { diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeConfigs/LinodeConfigDialog.styles.ts b/packages/manager/src/features/Linodes/LinodesDetail/LinodeConfigs/LinodeConfigDialog.styles.ts index 6280805fb1e..5be0126ff62 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeConfigs/LinodeConfigDialog.styles.ts +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeConfigs/LinodeConfigDialog.styles.ts @@ -1,7 +1,6 @@ -import { Divider, FormControl, RadioGroup } from '@linode/ui'; +import { Divider, FormControl, FormControlLabel, RadioGroup } from '@linode/ui'; import { styled } from '@mui/material/styles'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { FormGroup } from 'src/components/FormGroup'; const formGroupStyling = { diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeConfigs/LinodeConfigDialog.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeConfigs/LinodeConfigDialog.tsx index dea70edfb49..ddb1dcfc580 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeConfigs/LinodeConfigDialog.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeConfigs/LinodeConfigDialog.tsx @@ -5,6 +5,7 @@ import { CircleProgress, Divider, FormControl, + FormControlLabel, FormHelperText, Notice, Radio, @@ -24,7 +25,6 @@ import * as React from 'react'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { Dialog } from 'src/components/Dialog/Dialog'; import { ErrorState } from 'src/components/ErrorState/ErrorState'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { FormLabel } from 'src/components/FormLabel'; import { Link } from 'src/components/Link'; import { DeviceSelection } from 'src/features/Linodes/LinodesDetail/LinodeRescue/DeviceSelection'; diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/AddIPDrawer.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/AddIPDrawer.tsx index 39935bf4a91..d7a71740e56 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/AddIPDrawer.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/AddIPDrawer.tsx @@ -1,4 +1,4 @@ -import { Typography } from '@linode/ui'; +import { FormControlLabel, Typography } from '@linode/ui'; import { Box, Divider, @@ -13,7 +13,6 @@ import * as React from 'react'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { Drawer } from 'src/components/Drawer'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { Link } from 'src/components/Link'; import { useAllocateIPMutation, diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeResize/LinodeResizeUnifiedMigrationPanel.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeResize/LinodeResizeUnifiedMigrationPanel.tsx index 245c4118c66..81aef5a4296 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeResize/LinodeResizeUnifiedMigrationPanel.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeResize/LinodeResizeUnifiedMigrationPanel.tsx @@ -1,4 +1,4 @@ -import { Typography } from '@linode/ui'; +import { FormControlLabel, Typography } from '@linode/ui'; import { Box, Divider, @@ -10,7 +10,6 @@ import { import { useTheme } from '@mui/material/styles'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { Link } from 'src/components/Link'; import { capitalize } from 'src/utilities/capitalize'; diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/AlertSection.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/AlertSection.tsx index e467a9d512d..baee422cfd9 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/AlertSection.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/AlertSection.tsx @@ -1,6 +1,7 @@ import { Box, Divider, + FormControlLabel, InputAdornment, TextField, Toggle, @@ -11,8 +12,6 @@ import { useTheme } from '@mui/material/styles'; import Grid from '@mui/material/Unstable_Grid2'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; - interface Props { copy: string; endAdornment: string; diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/LinodeWatchdogPanel.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/LinodeWatchdogPanel.tsx index 45f65236e08..3b90e511891 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/LinodeWatchdogPanel.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/LinodeWatchdogPanel.tsx @@ -2,6 +2,7 @@ import { Accordion, Box, CircleProgress, + FormControlLabel, Notice, Stack, Toggle, @@ -10,7 +11,6 @@ import { import Grid from '@mui/material/Unstable_Grid2'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { useLinodeQuery, useLinodeUpdateMutation, diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/VPCPanel.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/VPCPanel.tsx index 5b182b6479e..544e010403c 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/VPCPanel.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/VPCPanel.tsx @@ -2,6 +2,7 @@ import { Autocomplete, Box, Checkbox, + FormControlLabel, Paper, Stack, TextField, @@ -12,7 +13,6 @@ import { useTheme } from '@mui/material/styles'; import useMediaQuery from '@mui/material/useMediaQuery'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { REGION_CAVEAT_HELPER_TEXT, VPC_AUTO_ASSIGN_IPV4_TOOLTIP, diff --git a/packages/manager/src/features/Managed/SSHAccess/EditSSHAccessDrawer.tsx b/packages/manager/src/features/Managed/SSHAccess/EditSSHAccessDrawer.tsx index 5e93778b783..37c13ac906a 100644 --- a/packages/manager/src/features/Managed/SSHAccess/EditSSHAccessDrawer.tsx +++ b/packages/manager/src/features/Managed/SSHAccess/EditSSHAccessDrawer.tsx @@ -1,11 +1,10 @@ -import { Notice, TextField, Toggle } from '@linode/ui'; +import { FormControlLabel, Notice, TextField, Toggle } from '@linode/ui'; import Grid from '@mui/material/Unstable_Grid2'; import { Formik } from 'formik'; import * as React from 'react'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { Drawer } from 'src/components/Drawer'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { IPSelect } from 'src/components/IPSelect/IPSelect'; import { useUpdateLinodeSettingsMutation } from 'src/queries/managed/managed'; import { diff --git a/packages/manager/src/features/NodeBalancers/NodeBalancerPassiveCheck.tsx b/packages/manager/src/features/NodeBalancers/NodeBalancerPassiveCheck.tsx index b111a603c2f..2b7d62472d6 100644 --- a/packages/manager/src/features/NodeBalancers/NodeBalancerPassiveCheck.tsx +++ b/packages/manager/src/features/NodeBalancers/NodeBalancerPassiveCheck.tsx @@ -1,9 +1,12 @@ -import { FormHelperText, Toggle, Typography } from '@linode/ui'; +import { + FormControlLabel, + FormHelperText, + Toggle, + Typography, +} from '@linode/ui'; import Grid from '@mui/material/Unstable_Grid2'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; - import type { NodeBalancerConfigPanelProps } from './types'; export const PassiveCheck = (props: NodeBalancerConfigPanelProps) => { diff --git a/packages/manager/src/features/ObjectStorage/AccessKeyLanding/LimitedAccessControls.tsx b/packages/manager/src/features/ObjectStorage/AccessKeyLanding/LimitedAccessControls.tsx index 605afdf84a0..147f8a81f53 100644 --- a/packages/manager/src/features/ObjectStorage/AccessKeyLanding/LimitedAccessControls.tsx +++ b/packages/manager/src/features/ObjectStorage/AccessKeyLanding/LimitedAccessControls.tsx @@ -1,7 +1,6 @@ -import { Toggle, TooltipIcon, Typography } from '@linode/ui'; +import { FormControlLabel, Toggle, TooltipIcon, Typography } from '@linode/ui'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { useAccountManagement } from 'src/hooks/useAccountManagement'; import { useFlags } from 'src/hooks/useFlags'; import { isFeatureEnabledV2 } from 'src/utilities/accountCapabilities'; diff --git a/packages/manager/src/features/ObjectStorage/BucketDetail/AccessSelect.tsx b/packages/manager/src/features/ObjectStorage/BucketDetail/AccessSelect.tsx index 0322c90c196..e11fa45ad9d 100644 --- a/packages/manager/src/features/ObjectStorage/BucketDetail/AccessSelect.tsx +++ b/packages/manager/src/features/ObjectStorage/BucketDetail/AccessSelect.tsx @@ -1,10 +1,15 @@ -import { Autocomplete, Notice, Toggle, Typography } from '@linode/ui'; +import { + Autocomplete, + FormControlLabel, + Notice, + Toggle, + Typography, +} from '@linode/ui'; import * as React from 'react'; import { Controller, useForm } from 'react-hook-form'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { ConfirmationDialog } from 'src/components/ConfirmationDialog/ConfirmationDialog'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { Link } from 'src/components/Link'; import { useOpenClose } from 'src/hooks/useOpenClose'; import { diff --git a/packages/manager/src/features/ObjectStorage/BucketLanding/BucketRateLimitTable.tsx b/packages/manager/src/features/ObjectStorage/BucketLanding/BucketRateLimitTable.tsx index 704c6d86782..16c635374db 100644 --- a/packages/manager/src/features/ObjectStorage/BucketLanding/BucketRateLimitTable.tsx +++ b/packages/manager/src/features/ObjectStorage/BucketLanding/BucketRateLimitTable.tsx @@ -1,7 +1,6 @@ -import { Box, Radio, Typography } from '@linode/ui'; +import { Box, FormControlLabel, Radio, Typography } from '@linode/ui'; import React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { FormLabel } from 'src/components/FormLabel'; import { Link } from 'src/components/Link'; import { SupportLink } from 'src/components/SupportLink'; diff --git a/packages/manager/src/features/PlacementGroups/PlacementGroupPolicyRadioGroup.tsx b/packages/manager/src/features/PlacementGroups/PlacementGroupPolicyRadioGroup.tsx index ef9c61a674b..41e2fff6f1f 100644 --- a/packages/manager/src/features/PlacementGroups/PlacementGroupPolicyRadioGroup.tsx +++ b/packages/manager/src/features/PlacementGroups/PlacementGroupPolicyRadioGroup.tsx @@ -1,7 +1,13 @@ -import { Box, Notice, Radio, RadioGroup, Typography } from '@linode/ui'; +import { + Box, + FormControlLabel, + Notice, + Radio, + RadioGroup, + Typography, +} from '@linode/ui'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { FormLabel } from 'src/components/FormLabel'; import { diff --git a/packages/manager/src/features/Profile/AuthenticationSettings/TwoFactor/TwoFactorToggle.tsx b/packages/manager/src/features/Profile/AuthenticationSettings/TwoFactor/TwoFactorToggle.tsx index 6a1cea4c0b9..09c255654a7 100644 --- a/packages/manager/src/features/Profile/AuthenticationSettings/TwoFactor/TwoFactorToggle.tsx +++ b/packages/manager/src/features/Profile/AuthenticationSettings/TwoFactor/TwoFactorToggle.tsx @@ -1,8 +1,6 @@ -import { FormControl, Toggle } from '@linode/ui'; +import { FormControl, FormControlLabel, Toggle } from '@linode/ui'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; - interface ToggleProps { disabled?: boolean; onChange: (value: boolean) => void; diff --git a/packages/manager/src/features/Profile/OAuthClients/CreateOAuthClientDrawer.tsx b/packages/manager/src/features/Profile/OAuthClients/CreateOAuthClientDrawer.tsx index c8cc9e0e279..9b913d2ec1c 100644 --- a/packages/manager/src/features/Profile/OAuthClients/CreateOAuthClientDrawer.tsx +++ b/packages/manager/src/features/Profile/OAuthClients/CreateOAuthClientDrawer.tsx @@ -1,10 +1,15 @@ -import { Checkbox, FormControl, Notice, TextField } from '@linode/ui'; +import { + Checkbox, + FormControl, + FormControlLabel, + Notice, + TextField, +} from '@linode/ui'; import { useFormik } from 'formik'; import * as React from 'react'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { Drawer } from 'src/components/Drawer'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { useCreateOAuthClientMutation } from 'src/queries/account/oauth'; import { getAPIErrorFor } from 'src/utilities/getAPIErrorFor'; diff --git a/packages/manager/src/features/Profile/OAuthClients/EditOAuthClientDrawer.tsx b/packages/manager/src/features/Profile/OAuthClients/EditOAuthClientDrawer.tsx index e0bb31826b9..ae362bbe2c3 100644 --- a/packages/manager/src/features/Profile/OAuthClients/EditOAuthClientDrawer.tsx +++ b/packages/manager/src/features/Profile/OAuthClients/EditOAuthClientDrawer.tsx @@ -1,10 +1,15 @@ -import { Checkbox, FormControl, Notice, TextField } from '@linode/ui'; +import { + Checkbox, + FormControl, + FormControlLabel, + Notice, + TextField, +} from '@linode/ui'; import { useFormik } from 'formik'; import * as React from 'react'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { Drawer } from 'src/components/Drawer'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { useUpdateOAuthClientMutation } from 'src/queries/account/oauth'; import { getAPIErrorFor } from 'src/utilities/getAPIErrorFor'; diff --git a/packages/manager/src/features/Profile/Settings/Settings.tsx b/packages/manager/src/features/Profile/Settings/Settings.tsx index 7ea47c473fb..295da94ba22 100644 --- a/packages/manager/src/features/Profile/Settings/Settings.tsx +++ b/packages/manager/src/features/Profile/Settings/Settings.tsx @@ -1,4 +1,5 @@ import { + FormControlLabel, Paper, Radio, RadioGroup, @@ -12,7 +13,6 @@ import { useHistory, useLocation } from 'react-router-dom'; import { Code } from 'src/components/Code/Code'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { useMutatePreferences, usePreferences, diff --git a/packages/manager/src/features/StackScripts/UserDefinedFieldsPanel/FieldTypes/UserDefinedSelect.tsx b/packages/manager/src/features/StackScripts/UserDefinedFieldsPanel/FieldTypes/UserDefinedSelect.tsx index 51b66c42e2f..0415acbee76 100644 --- a/packages/manager/src/features/StackScripts/UserDefinedFieldsPanel/FieldTypes/UserDefinedSelect.tsx +++ b/packages/manager/src/features/StackScripts/UserDefinedFieldsPanel/FieldTypes/UserDefinedSelect.tsx @@ -1,9 +1,13 @@ -import { Autocomplete, InputLabel, Notice, Radio } from '@linode/ui'; +import { + Autocomplete, + FormControlLabel, + InputLabel, + Notice, + Radio, +} from '@linode/ui'; import { styled } from '@mui/material/styles'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; - import type { UserDefinedField } from '@linode/api-v4/lib/stackscripts'; interface Props { diff --git a/packages/manager/src/features/Users/CreateUserDrawer.tsx b/packages/manager/src/features/Users/CreateUserDrawer.tsx index 80a1e5ea22b..b7ae8aca252 100644 --- a/packages/manager/src/features/Users/CreateUserDrawer.tsx +++ b/packages/manager/src/features/Users/CreateUserDrawer.tsx @@ -1,11 +1,10 @@ import { createUser } from '@linode/api-v4/lib/account'; -import { Notice, TextField, Toggle } from '@linode/ui'; +import { FormControlLabel, Notice, TextField, Toggle } from '@linode/ui'; import * as React from 'react'; import { withRouter } from 'react-router-dom'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { Drawer } from 'src/components/Drawer'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { getAPIErrorOrDefault } from 'src/utilities/errorUtils'; import { getAPIErrorFor } from 'src/utilities/getAPIErrorFor'; diff --git a/packages/manager/src/features/Users/UserPermissions.tsx b/packages/manager/src/features/Users/UserPermissions.tsx index 07729a25b11..6adefc2048f 100644 --- a/packages/manager/src/features/Users/UserPermissions.tsx +++ b/packages/manager/src/features/Users/UserPermissions.tsx @@ -7,6 +7,7 @@ import { import { Box, CircleProgress, + FormControlLabel, Notice, Paper, Toggle, @@ -19,7 +20,6 @@ import * as React from 'react'; import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { SelectionCard } from 'src/components/SelectionCard/SelectionCard'; import { SafeTabPanel } from 'src/components/Tabs/SafeTabPanel'; import { Tab } from 'src/components/Tabs/Tab'; diff --git a/packages/manager/src/features/Users/UserPermissionsEntitySection.tsx b/packages/manager/src/features/Users/UserPermissionsEntitySection.tsx index e8b2ac886d0..6e64005ee5a 100644 --- a/packages/manager/src/features/Users/UserPermissionsEntitySection.tsx +++ b/packages/manager/src/features/Users/UserPermissionsEntitySection.tsx @@ -6,11 +6,10 @@ * I'll create a tech debt ticket in jira to keep track of this issue. */ -import { Box, Radio, Typography } from '@linode/ui'; +import { Box, FormControlLabel, Radio, Typography } from '@linode/ui'; import { useTheme } from '@mui/material/styles'; import React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { createDisplayPage } from 'src/components/Paginate'; import { PaginationFooter } from 'src/components/PaginationFooter/PaginationFooter'; import { TableBody } from 'src/components/TableBody'; diff --git a/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx b/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx index dc24cf8abea..aeddc2fea41 100644 --- a/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx +++ b/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx @@ -4,6 +4,7 @@ import { Box, Button, Checkbox, + FormControlLabel, FormHelperText, Notice, TextField, @@ -16,7 +17,6 @@ import * as React from 'react'; import { DownloadCSV } from 'src/components/DownloadCSV/DownloadCSV'; import { Drawer } from 'src/components/Drawer'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { Link } from 'src/components/Link'; import { RemovableSelectionsListTable } from 'src/components/RemovableSelectionsList/RemovableSelectionsListTable'; import { LinodeSelect } from 'src/features/Linodes/LinodeSelect/LinodeSelect'; diff --git a/packages/manager/src/features/Volumes/VolumeDrawer/ModeSelection.tsx b/packages/manager/src/features/Volumes/VolumeDrawer/ModeSelection.tsx index 7195cdee81d..70a1e696af9 100644 --- a/packages/manager/src/features/Volumes/VolumeDrawer/ModeSelection.tsx +++ b/packages/manager/src/features/Volumes/VolumeDrawer/ModeSelection.tsx @@ -1,8 +1,6 @@ -import { Radio, RadioGroup } from '@linode/ui'; +import { FormControlLabel, Radio, RadioGroup } from '@linode/ui'; import * as React from 'react'; -import { FormControlLabel } from 'src/components/FormControlLabel'; - type Mode = 'attach' | 'create'; interface Props { diff --git a/packages/manager/src/features/components/PlansPanel/PlanSelection.tsx b/packages/manager/src/features/components/PlansPanel/PlanSelection.tsx index fc17e25bb66..602291aabf2 100644 --- a/packages/manager/src/features/components/PlansPanel/PlanSelection.tsx +++ b/packages/manager/src/features/components/PlansPanel/PlanSelection.tsx @@ -1,8 +1,7 @@ -import { Chip, Radio } from '@linode/ui'; +import { Chip, FormControlLabel, Radio } from '@linode/ui'; import * as React from 'react'; import { Currency } from 'src/components/Currency'; -import { FormControlLabel } from 'src/components/FormControlLabel'; import { Hidden } from 'src/components/Hidden'; import { SelectionCard } from 'src/components/SelectionCard/SelectionCard'; import { TableCell } from 'src/components/TableCell'; diff --git a/packages/ui/.changeset/pr-11353-added-1733229144769.md b/packages/ui/.changeset/pr-11353-added-1733229144769.md new file mode 100644 index 00000000000..79185e1a80f --- /dev/null +++ b/packages/ui/.changeset/pr-11353-added-1733229144769.md @@ -0,0 +1,5 @@ +--- +"@linode/ui": Added +--- + +Migrate `FormControlLabel` from `manager` to `ui` package ([#11353](https://github.com/linode/manager/pull/11353)) diff --git a/packages/manager/src/components/FormControlLabel.stories.tsx b/packages/ui/src/components/FormControlLabel/FormControlLabel.stories.tsx similarity index 86% rename from packages/manager/src/components/FormControlLabel.stories.tsx rename to packages/ui/src/components/FormControlLabel/FormControlLabel.stories.tsx index b088aa6e51a..7769ccf176e 100644 --- a/packages/manager/src/components/FormControlLabel.stories.tsx +++ b/packages/ui/src/components/FormControlLabel/FormControlLabel.stories.tsx @@ -1,6 +1,8 @@ -import { Checkbox, Radio, Toggle } from '@linode/ui'; import React from 'react'; +import { Checkbox } from '../Checkbox'; +import { Radio } from '../Radio'; +import { Toggle } from '../Toggle'; import { FormControlLabel } from './FormControlLabel'; import type { Meta, StoryObj } from '@storybook/react'; diff --git a/packages/manager/src/components/FormControlLabel.tsx b/packages/ui/src/components/FormControlLabel/FormControlLabel.tsx similarity index 100% rename from packages/manager/src/components/FormControlLabel.tsx rename to packages/ui/src/components/FormControlLabel/FormControlLabel.tsx diff --git a/packages/ui/src/components/FormControlLabel/index.ts b/packages/ui/src/components/FormControlLabel/index.ts new file mode 100644 index 00000000000..f2e06e99474 --- /dev/null +++ b/packages/ui/src/components/FormControlLabel/index.ts @@ -0,0 +1 @@ +export * from './FormControlLabel'; diff --git a/packages/ui/src/components/index.ts b/packages/ui/src/components/index.ts index dc47477c022..c5b1088c114 100644 --- a/packages/ui/src/components/index.ts +++ b/packages/ui/src/components/index.ts @@ -10,6 +10,7 @@ export * from './ClickAwayListener'; export * from './Divider'; export * from './EditableText'; export * from './FormControl'; +export * from './FormControlLabel'; export * from './FormHelperText'; export * from './H1Header'; export * from './IconButton';