{
export default function preload(requests: RequestMap
) {
return function (Component: React.ComponentType
) {
return class LoadedComponent extends React.Component
{
+ static displayName = `PromiseLoader(${
+ Component.displayName || Component.name
+ })`;
+ handleDone = () => {
+ if (!this.mounted) {
+ return;
+ }
+
+ this.setState((prevState) => ({ ...prevState, loading: false }));
+ };
+
+ mounted: boolean = false;
+
+ state = { loading: true };
+
componentDidMount() {
this.mounted = true;
const promises = Object.entries(requests).map(([name, request]) =>
@@ -50,6 +64,7 @@ export default function preload
(requests: RequestMap
) {
Promise.all(promises).then(this.handleDone).catch(this.handleDone);
}
+
componentWillUnmount() {
this.mounted = false;
}
@@ -62,22 +77,6 @@ export default function preload
(requests: RequestMap
) {
return ;
}
-
- static displayName = `PromiseLoader(${
- Component.displayName || Component.name
- })`;
-
- handleDone = () => {
- if (!this.mounted) {
- return;
- }
-
- this.setState((prevState) => ({ ...prevState, loading: false }));
- };
-
- mounted: boolean = false;
-
- state = { loading: true };
};
};
}
diff --git a/packages/manager/src/components/PromotionalOfferCard/PromotionalOfferCard.tsx b/packages/manager/src/components/PromotionalOfferCard/PromotionalOfferCard.tsx
index 47e9dab10a5..1bbb41870a3 100644
--- a/packages/manager/src/components/PromotionalOfferCard/PromotionalOfferCard.tsx
+++ b/packages/manager/src/components/PromotionalOfferCard/PromotionalOfferCard.tsx
@@ -1,11 +1,10 @@
-import { Paper } from '@linode/ui';
+import { Paper, Typography } from '@linode/ui';
import Button from '@mui/material/Button';
import * as React from 'react';
import { Link } from 'react-router-dom';
import { makeStyles } from 'tss-react/mui';
import HeavenlyBucketIcon from 'src/assets/icons/promotionalOffers/heavenly-bucket.svg';
-import { Typography } from 'src/components/Typography';
import { OFFSITE_URL_REGEX, ONSITE_URL_REGEX } from 'src/constants';
import { useWindowDimensions } from 'src/hooks/useWindowDimensions';
diff --git a/packages/manager/src/components/RegionSelect/RegionMultiSelect.tsx b/packages/manager/src/components/RegionSelect/RegionMultiSelect.tsx
index 0bcfd9a3cea..c15bbc78c05 100644
--- a/packages/manager/src/components/RegionSelect/RegionMultiSelect.tsx
+++ b/packages/manager/src/components/RegionSelect/RegionMultiSelect.tsx
@@ -1,14 +1,11 @@
+import { Autocomplete, Chip, Stack, StyledListItem } from '@linode/ui';
import CloseIcon from '@mui/icons-material/Close';
import React from 'react';
-import { Autocomplete } from 'src/components/Autocomplete/Autocomplete';
-import { Chip } from 'src/components/Chip';
import { Flag } from 'src/components/Flag';
import { useAllAccountAvailabilitiesQuery } from 'src/queries/account/availability';
import { getRegionCountryGroup } from 'src/utilities/formatRegion';
-import { StyledListItem } from '../Autocomplete/Autocomplete.styles';
-import { Stack } from '../Stack';
import { RegionOption } from './RegionOption';
import { StyledAutocompleteContainer } from './RegionSelect.styles';
import {
diff --git a/packages/manager/src/components/RegionSelect/RegionOption.tsx b/packages/manager/src/components/RegionSelect/RegionOption.tsx
index ae3fe3b182b..d3be0d72e22 100644
--- a/packages/manager/src/components/RegionSelect/RegionOption.tsx
+++ b/packages/manager/src/components/RegionSelect/RegionOption.tsx
@@ -1,10 +1,9 @@
-import { Box } from '@linode/ui';
+import { Box, Stack } from '@linode/ui';
import React from 'react';
import { Flag } from 'src/components/Flag';
import { ListItemOption } from 'src/components/ListItemOption';
import { useIsGeckoEnabled } from 'src/components/RegionSelect/RegionSelect.utils';
-import { Stack } from 'src/components/Stack';
import type { Region } from '@linode/api-v4';
import type { ListItemProps } from 'src/components/ListItemOption';
diff --git a/packages/manager/src/components/RegionSelect/RegionSelect.styles.ts b/packages/manager/src/components/RegionSelect/RegionSelect.styles.ts
index 46605c20261..1f274abd608 100644
--- a/packages/manager/src/components/RegionSelect/RegionSelect.styles.ts
+++ b/packages/manager/src/components/RegionSelect/RegionSelect.styles.ts
@@ -1,9 +1,6 @@
-import { Box } from '@linode/ui';
+import { Box, Chip, ListItem } from '@linode/ui';
import { styled } from '@mui/material/styles';
-import { Chip } from 'src/components/Chip';
-import { ListItem } from 'src/components/ListItem';
-
export const StyledAutocompleteContainer = styled(Box, {
label: 'RegionSelect',
})(({ theme }) => ({
diff --git a/packages/manager/src/components/RegionSelect/RegionSelect.tsx b/packages/manager/src/components/RegionSelect/RegionSelect.tsx
index b719eb824fd..ca23ad027c0 100644
--- a/packages/manager/src/components/RegionSelect/RegionSelect.tsx
+++ b/packages/manager/src/components/RegionSelect/RegionSelect.tsx
@@ -1,7 +1,7 @@
import { createFilterOptions } from '@mui/material/Autocomplete';
import * as React from 'react';
-import { Autocomplete } from 'src/components/Autocomplete/Autocomplete';
+import { Autocomplete } from '@linode/ui';
import { Flag } from 'src/components/Flag';
import { useIsGeckoEnabled } from 'src/components/RegionSelect/RegionSelect.utils';
import { useAllAccountAvailabilitiesQuery } from 'src/queries/account/availability';
@@ -121,7 +121,7 @@ export const RegionSelect = <
}}
sx={(theme) => ({
[theme.breakpoints.up('md')]: {
- width: '416px',
+ width: tooltipText ? '458px' : '416px',
},
})}
textFieldProps={{
diff --git a/packages/manager/src/components/RegionSelect/RegionSelect.types.ts b/packages/manager/src/components/RegionSelect/RegionSelect.types.ts
index 87a9b6b9344..be624354c8d 100644
--- a/packages/manager/src/components/RegionSelect/RegionSelect.types.ts
+++ b/packages/manager/src/components/RegionSelect/RegionSelect.types.ts
@@ -4,8 +4,8 @@ import type {
Region,
RegionSite,
} from '@linode/api-v4';
+import type { EnhancedAutocompleteProps } from '@linode/ui';
import type React from 'react';
-import type { EnhancedAutocompleteProps } from 'src/components/Autocomplete/Autocomplete';
import type { DisableItemOption } from 'src/components/ListItemOption';
export type RegionFilterValue =
diff --git a/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.stories.tsx b/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.stories.tsx
index 300f3e4486b..49dc6d58ad6 100644
--- a/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.stories.tsx
+++ b/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.stories.tsx
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-empty-function */
+import { Button } from '@linode/ui';
import * as React from 'react';
-import { Button } from '../Button/Button';
import { RemovableSelectionsList } from './RemovableSelectionsList';
import type { RemovableItem } from './RemovableSelectionsList';
diff --git a/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.style.ts b/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.style.ts
index 5f715da92d9..07e27f559bf 100644
--- a/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.style.ts
+++ b/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.style.ts
@@ -1,11 +1,6 @@
-import { Box, omittedProps } from '@linode/ui';
+import { Box, List, ListItem, Typography, omittedProps } from '@linode/ui';
import { styled } from '@mui/material/styles';
-import { List } from 'src/components/List';
-import { ListItem } from 'src/components/ListItem';
-
-import { Typography } from '../Typography';
-
import type { RemovableSelectionsListProps } from './RemovableSelectionsList';
export const StyledNoAssignedLinodesBox = styled(Box, {
diff --git a/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.test.tsx b/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.test.tsx
index 89bbf72f9d4..6dc50bb8bec 100644
--- a/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.test.tsx
+++ b/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.test.tsx
@@ -1,9 +1,9 @@
+import { Button } from '@linode/ui';
import { fireEvent } from '@testing-library/react';
import * as React from 'react';
import { renderWithTheme } from 'src/utilities/testHelpers';
-import { Button } from '../Button/Button';
import { RemovableSelectionsList } from './RemovableSelectionsList';
const defaultList = Array.from({ length: 5 }, (_, index) => {
diff --git a/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.tsx b/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.tsx
index 713689dd2c7..817daf34aba 100644
--- a/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.tsx
+++ b/packages/manager/src/components/RemovableSelectionsList/RemovableSelectionsList.tsx
@@ -12,8 +12,8 @@ import {
StyledScrollBox,
} from './RemovableSelectionsList.style';
+import type { ButtonProps } from '@linode/ui';
import type { SxProps, Theme } from '@mui/material';
-import type { ButtonProps } from 'src/components/Button/Button';
export type RemovableItem = {
// The remaining key-value pairs must have their values typed
diff --git a/packages/manager/src/components/SelectFirewallPanel/SelectFirewallPanel.tsx b/packages/manager/src/components/SelectFirewallPanel/SelectFirewallPanel.tsx
index 0c8e7a6ac1f..ae81fb10c9f 100644
--- a/packages/manager/src/components/SelectFirewallPanel/SelectFirewallPanel.tsx
+++ b/packages/manager/src/components/SelectFirewallPanel/SelectFirewallPanel.tsx
@@ -1,16 +1,13 @@
-import { Box, Paper } from '@linode/ui';
+import { Autocomplete, Box, Paper, Stack, Typography } from '@linode/ui';
import { styled } from '@mui/material/styles';
import * as React from 'react';
-import { Stack } from 'src/components/Stack';
-import { Typography } from 'src/components/Typography';
import { CreateFirewallDrawer } from 'src/features/Firewalls/FirewallLanding/CreateFirewallDrawer';
import { useFlags } from 'src/hooks/useFlags';
import { useSecureVMNoticesEnabled } from 'src/hooks/useSecureVMNoticesEnabled';
import { useFirewallsQuery } from 'src/queries/firewalls';
import { AkamaiBanner } from '../AkamaiBanner/AkamaiBanner';
-import { Autocomplete } from '../Autocomplete/Autocomplete';
import { GenerateFirewallDialog } from '../GenerateFirewallDialog/GenerateFirewallDialog';
import { LinkButton } from '../LinkButton';
diff --git a/packages/manager/src/components/SelectRegionPanel/RegionHelperText.tsx b/packages/manager/src/components/SelectRegionPanel/RegionHelperText.tsx
index 0844cce2290..b677cba9286 100644
--- a/packages/manager/src/components/SelectRegionPanel/RegionHelperText.tsx
+++ b/packages/manager/src/components/SelectRegionPanel/RegionHelperText.tsx
@@ -1,8 +1,7 @@
-import { Box } from '@linode/ui';
+import { Box, Typography } from '@linode/ui';
import * as React from 'react';
import { Link } from 'src/components/Link';
-import { Typography } from 'src/components/Typography';
import type { BoxProps } from '@linode/ui';
diff --git a/packages/manager/src/components/SelectableTableRow/SelectableTableRow.tsx b/packages/manager/src/components/SelectableTableRow/SelectableTableRow.tsx
index caa8d3c345b..c76965c7422 100644
--- a/packages/manager/src/components/SelectableTableRow/SelectableTableRow.tsx
+++ b/packages/manager/src/components/SelectableTableRow/SelectableTableRow.tsx
@@ -1,7 +1,7 @@
+import { Checkbox } from '@linode/ui';
import { styled } from '@mui/material/styles';
import * as React from 'react';
-import { Checkbox } from 'src/components/Checkbox';
import { TableCell } from 'src/components/TableCell';
import { TableRow } from 'src/components/TableRow';
diff --git a/packages/manager/src/components/SelectionCard/SelectionCard.stories.tsx b/packages/manager/src/components/SelectionCard/SelectionCard.stories.tsx
index 78d136e972c..8ca2b5e5bfe 100644
--- a/packages/manager/src/components/SelectionCard/SelectionCard.stories.tsx
+++ b/packages/manager/src/components/SelectionCard/SelectionCard.stories.tsx
@@ -1,11 +1,10 @@
+import { Chip } from '@linode/ui';
import Alarm from '@mui/icons-material/Alarm';
import InsertPhoto from '@mui/icons-material/InsertPhoto';
import DE from 'flag-icons/flags/4x3/de.svg';
import US from 'flag-icons/flags/4x3/us.svg';
import * as React from 'react';
-import { Chip } from 'src/components/Chip';
-
import { SelectionCard } from './SelectionCard';
import type { SelectionCardProps } from './SelectionCard';
diff --git a/packages/manager/src/components/SelectionCard/SelectionCard.tsx b/packages/manager/src/components/SelectionCard/SelectionCard.tsx
index b82143a66fb..4991bf1e32b 100644
--- a/packages/manager/src/components/SelectionCard/SelectionCard.tsx
+++ b/packages/manager/src/components/SelectionCard/SelectionCard.tsx
@@ -5,6 +5,7 @@ import * as React from 'react';
import { CardBase } from './CardBase';
+import type { TooltipProps } from '@linode/ui';
import type { SxProps, Theme } from '@mui/material/styles';
export interface SelectionCardProps {
@@ -87,6 +88,11 @@ export interface SelectionCardProps {
* Optional text to set in a tooltip when hovering over the card.
*/
tooltip?: JSX.Element | string;
+ /**
+ * The placement of the tooltip
+ * @default top
+ */
+ tooltipPlacement?: TooltipProps['placement'];
}
/**
@@ -114,6 +120,7 @@ export const SelectionCard = React.memo((props: SelectionCardProps) => {
sxGrid,
sxTooltip,
tooltip,
+ tooltipPlacement = 'top',
} = props;
const handleKeyPress = (e: React.KeyboardEvent) => {
@@ -171,7 +178,7 @@ export const SelectionCard = React.memo((props: SelectionCardProps) => {
componentsProps={{
tooltip: { sx: sxTooltip },
}}
- placement="top"
+ placement={tooltipPlacement}
title={tooltip}
>
{cardGrid}
diff --git a/packages/manager/src/components/ShowMore/ShowMore.tsx b/packages/manager/src/components/ShowMore/ShowMore.tsx
index 600a4399a74..d9a8640d420 100644
--- a/packages/manager/src/components/ShowMore/ShowMore.tsx
+++ b/packages/manager/src/components/ShowMore/ShowMore.tsx
@@ -1,8 +1,9 @@
+import { Chip } from '@linode/ui';
import Popover from '@mui/material/Popover';
import { styled, useTheme } from '@mui/material/styles';
import * as React from 'react';
-import { Chip, ChipProps } from 'src/components/Chip';
+import type { ChipProps } from '@linode/ui';
interface ShowMoreProps {
ariaItemType: string;
diff --git a/packages/manager/src/components/ShowMoreExpansion/ShowMoreExpansion.stories.tsx b/packages/manager/src/components/ShowMoreExpansion/ShowMoreExpansion.stories.tsx
index a655dd4489a..d67d7e9c573 100644
--- a/packages/manager/src/components/ShowMoreExpansion/ShowMoreExpansion.stories.tsx
+++ b/packages/manager/src/components/ShowMoreExpansion/ShowMoreExpansion.stories.tsx
@@ -1,7 +1,6 @@
+import { Typography } from '@linode/ui';
import React from 'react';
-import { Typography } from 'src/components/Typography';
-
import { ShowMoreExpansion } from './ShowMoreExpansion';
import type { ShowMoreExpansionProps } from './ShowMoreExpansion';
diff --git a/packages/manager/src/components/ShowMoreExpansion/ShowMoreExpansion.test.tsx b/packages/manager/src/components/ShowMoreExpansion/ShowMoreExpansion.test.tsx
index b45070b2b6d..c5128d7dc1a 100644
--- a/packages/manager/src/components/ShowMoreExpansion/ShowMoreExpansion.test.tsx
+++ b/packages/manager/src/components/ShowMoreExpansion/ShowMoreExpansion.test.tsx
@@ -1,7 +1,7 @@
+import { Typography } from '@linode/ui';
import { fireEvent } from '@testing-library/react';
import React from 'react';
-import { Typography } from 'src/components/Typography';
import { renderWithTheme } from 'src/utilities/testHelpers';
import { ShowMoreExpansion } from './ShowMoreExpansion';
diff --git a/packages/manager/src/components/ShowMoreExpansion/ShowMoreExpansion.tsx b/packages/manager/src/components/ShowMoreExpansion/ShowMoreExpansion.tsx
index 3b0b6304d38..cc25cd9e66d 100644
--- a/packages/manager/src/components/ShowMoreExpansion/ShowMoreExpansion.tsx
+++ b/packages/manager/src/components/ShowMoreExpansion/ShowMoreExpansion.tsx
@@ -1,10 +1,10 @@
+import { Button } from '@linode/ui';
import KeyboardArrowRight from '@mui/icons-material/KeyboardArrowRight';
import Collapse from '@mui/material/Collapse';
-import { Theme } from '@mui/material/styles';
import * as React from 'react';
import { makeStyles } from 'tss-react/mui';
-import { Button } from 'src/components/Button/Button';
+import type { Theme } from '@mui/material/styles';
const useStyles = makeStyles()(
(theme: Theme, _params, classes) => ({
diff --git a/packages/manager/src/components/Snackbar/ToastNotifications.stories.tsx b/packages/manager/src/components/Snackbar/ToastNotifications.stories.tsx
index 0d66a284d73..79399717b43 100644
--- a/packages/manager/src/components/Snackbar/ToastNotifications.stories.tsx
+++ b/packages/manager/src/components/Snackbar/ToastNotifications.stories.tsx
@@ -1,12 +1,10 @@
+import { Button, Stack } from '@linode/ui';
import { useSnackbar } from 'notistack';
import React from 'react';
-import { Button } from 'src/components/Button/Button';
import { Snackbar } from 'src/components/Snackbar/Snackbar';
import { getEventMessage } from 'src/features/Events/utils';
-import { Stack } from '../Stack';
-
import type { Meta, StoryObj } from '@storybook/react';
import type { VariantType } from 'notistack';
diff --git a/packages/manager/src/components/SplashScreen.tsx b/packages/manager/src/components/SplashScreen.tsx
index 4890a2af50d..1a2e65b66f7 100644
--- a/packages/manager/src/components/SplashScreen.tsx
+++ b/packages/manager/src/components/SplashScreen.tsx
@@ -1,7 +1,6 @@
-import { Box } from '@linode/ui';
+import { Box, CircleProgress } from '@linode/ui';
import * as React from 'react';
-import { CircleProgress } from 'src/components/CircleProgress';
import { srSpeak } from 'src/utilities/accessibility';
export const SplashScreen = () => {
diff --git a/packages/manager/src/components/StackScript/StackScript.tsx b/packages/manager/src/components/StackScript/StackScript.tsx
index 2951c34ee34..7ad79f8138c 100644
--- a/packages/manager/src/components/StackScript/StackScript.tsx
+++ b/packages/manager/src/components/StackScript/StackScript.tsx
@@ -1,23 +1,24 @@
-import { Box } from '@linode/ui';
+import {
+ Box,
+ Button,
+ Chip,
+ Divider,
+ H1Header,
+ TooltipIcon,
+ Typography,
+} from '@linode/ui';
import { useTheme } from '@mui/material/styles';
import * as React from 'react';
import { Link, useHistory } from 'react-router-dom';
import { makeStyles } from 'tss-react/mui';
-import { Button } from 'src/components/Button/Button';
-import { Chip } from 'src/components/Chip';
import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import { DateTimeDisplay } from 'src/components/DateTimeDisplay';
-import { Divider } from 'src/components/Divider';
-import { H1Header } from 'src/components/H1Header/H1Header';
import { ScriptCode } from 'src/components/ScriptCode/ScriptCode';
-import { Typography } from 'src/components/Typography';
import { useAccountManagement } from 'src/hooks/useAccountManagement';
import { listToItemsByID } from 'src/queries/base';
import { useAllImagesQuery } from 'src/queries/images';
-import { TooltipIcon } from '../TooltipIcon';
-
import type { StackScript as StackScriptType } from '@linode/api-v4/lib/stackscripts';
import type { Theme } from '@mui/material/styles';
diff --git a/packages/manager/src/components/SupportTicketGeneralError.tsx b/packages/manager/src/components/SupportTicketGeneralError.tsx
index e3c64a64292..91d64171b28 100644
--- a/packages/manager/src/components/SupportTicketGeneralError.tsx
+++ b/packages/manager/src/components/SupportTicketGeneralError.tsx
@@ -1,3 +1,4 @@
+import { Typography } from '@linode/ui';
import { useTheme } from '@mui/material/styles';
import React from 'react';
@@ -5,7 +6,6 @@ import { SupportLink } from 'src/components/SupportLink';
import { capitalize } from 'src/utilities/capitalize';
import { supportTextRegex } from './ErrorMessage';
-import { Typography } from './Typography';
import type { EntityForTicketDetails } from './SupportLink/SupportLink';
import type { FormPayloadValues } from 'src/features/Support/SupportTickets/SupportTicketDialog';
diff --git a/packages/manager/src/components/SuspenseLoader.tsx b/packages/manager/src/components/SuspenseLoader.tsx
index fe6fc62fce3..55a245e06f9 100644
--- a/packages/manager/src/components/SuspenseLoader.tsx
+++ b/packages/manager/src/components/SuspenseLoader.tsx
@@ -1,7 +1,6 @@
+import { CircleProgress } from '@linode/ui';
import * as React from 'react';
-import { CircleProgress } from 'src/components/CircleProgress';
-
interface Props {
/**
* Ammount of time before the CircleProgress shows
diff --git a/packages/manager/src/components/TabbedPanel/TabbedPanel.tsx b/packages/manager/src/components/TabbedPanel/TabbedPanel.tsx
index 8393e3cbde1..4602d14b363 100644
--- a/packages/manager/src/components/TabbedPanel/TabbedPanel.tsx
+++ b/packages/manager/src/components/TabbedPanel/TabbedPanel.tsx
@@ -1,15 +1,13 @@
-import { Box, Paper, Tooltip } from '@linode/ui';
+import { Box, Notice, Paper, Tooltip, Typography } from '@linode/ui';
import HelpOutline from '@mui/icons-material/HelpOutline';
import { styled } from '@mui/material/styles';
import React, { useEffect, useState } from 'react';
-import { Notice } from 'src/components/Notice/Notice';
import { Tab } from 'src/components/Tabs/Tab';
import { TabList } from 'src/components/Tabs/TabList';
import { TabPanel } from 'src/components/Tabs/TabPanel';
import { TabPanels } from 'src/components/Tabs/TabPanels';
import { Tabs } from 'src/components/Tabs/Tabs';
-import { Typography } from 'src/components/Typography';
import type { SxProps, Theme } from '@mui/material/styles';
diff --git a/packages/manager/src/components/Table/Table.styles.ts b/packages/manager/src/components/Table/Table.styles.ts
index d0a07122ea4..2a0c27838fc 100644
--- a/packages/manager/src/components/Table/Table.styles.ts
+++ b/packages/manager/src/components/Table/Table.styles.ts
@@ -13,25 +13,24 @@ export const StyledTableWrapper = styled('div', {
'spacingTop',
]),
})(({ theme, ...props }) => ({
+ '& thead': {
+ '& th': {
+ '&:first-of-type': {
+ borderLeft: 'none',
+ },
+ '&:last-of-type': {
+ borderRight: 'none',
+ },
+ backgroundColor: theme.bg.tableHeader,
+ borderBottom: `1px solid ${theme.borderColors.borderTable}`,
+ borderRight: `1px solid ${theme.borderColors.borderTable}`,
+ borderTop: `1px solid ${theme.borderColors.borderTable}`,
+ fontFamily: theme.font.bold,
+ },
+ },
marginBottom: props.spacingBottom !== undefined ? props.spacingBottom : 0,
marginTop: props.spacingTop !== undefined ? props.spacingTop : 0,
...(!props.noOverflow && {
- '& thead': {
- '& th': {
- '&:first-of-type': {
- borderLeft: 'none',
- },
- '&:last-of-type': {
- borderRight: 'none',
- },
- backgroundColor: theme.bg.tableHeader,
- borderBottom: `1px solid ${theme.borderColors.borderTable}`,
- borderRight: `1px solid ${theme.borderColors.borderTable}`,
- borderTop: `1px solid ${theme.borderColors.borderTable}`,
- fontFamily: theme.font.bold,
- padding: '10px 15px',
- },
- },
overflowX: 'auto',
overflowY: 'hidden',
}),
diff --git a/packages/manager/src/components/TableCell/TableCell.tsx b/packages/manager/src/components/TableCell/TableCell.tsx
index f30c4a116dc..dde56344668 100644
--- a/packages/manager/src/components/TableCell/TableCell.tsx
+++ b/packages/manager/src/components/TableCell/TableCell.tsx
@@ -1,9 +1,8 @@
+import { TooltipIcon } from '@linode/ui';
import { default as _TableCell } from '@mui/material/TableCell';
import * as React from 'react';
import { makeStyles } from 'tss-react/mui';
-import { TooltipIcon } from 'src/components/TooltipIcon';
-
import type { Theme } from '@mui/material/styles';
import type { TableCellProps as _TableCellProps } from '@mui/material/TableCell';
diff --git a/packages/manager/src/components/TableFooter.stories.tsx b/packages/manager/src/components/TableFooter.stories.tsx
index e5066d7d460..4f43aa61f34 100644
--- a/packages/manager/src/components/TableFooter.stories.tsx
+++ b/packages/manager/src/components/TableFooter.stories.tsx
@@ -1,3 +1,4 @@
+import { Typography } from '@linode/ui';
import React from 'react';
import { Table } from 'src/components/Table';
@@ -7,7 +8,6 @@ import { TableHead } from 'src/components/TableHead';
import { TableRow } from 'src/components/TableRow';
import { TableFooter } from './TableFooter';
-import { Typography } from './Typography';
import type { Meta, StoryObj } from '@storybook/react';
diff --git a/packages/manager/src/components/TableSortCell/TableSortCell.tsx b/packages/manager/src/components/TableSortCell/TableSortCell.tsx
index 0928cc1787b..67fd8047260 100644
--- a/packages/manager/src/components/TableSortCell/TableSortCell.tsx
+++ b/packages/manager/src/components/TableSortCell/TableSortCell.tsx
@@ -1,15 +1,14 @@
-import {
- TableCellProps as _TableCellProps,
- default as TableCell,
-} from '@mui/material/TableCell';
+import { CircleProgress } from '@linode/ui';
+import { default as TableCell } from '@mui/material/TableCell';
import TableSortLabel from '@mui/material/TableSortLabel';
-import { Theme } from '@mui/material/styles';
import * as React from 'react';
import { makeStyles } from 'tss-react/mui';
import SortUp from 'src/assets/icons/sort-up.svg';
import Sort from 'src/assets/icons/unsorted.svg';
-import { CircleProgress } from 'src/components/CircleProgress';
+
+import type { Theme } from '@mui/material/styles';
+import type { TableCellProps as _TableCellProps } from '@mui/material/TableCell';
const useStyles = makeStyles()((theme: Theme) => ({
initialIcon: {
diff --git a/packages/manager/src/components/Tabs/Tabs.stories.tsx b/packages/manager/src/components/Tabs/Tabs.stories.tsx
index 89d488081d8..12b127768fb 100644
--- a/packages/manager/src/components/Tabs/Tabs.stories.tsx
+++ b/packages/manager/src/components/Tabs/Tabs.stories.tsx
@@ -1,10 +1,9 @@
-import { Paper } from '@linode/ui';
+import { Paper, Typography } from '@linode/ui';
import * as React from 'react';
import { SafeTabPanel } from 'src/components/Tabs/SafeTabPanel';
import { TabPanels } from 'src/components/Tabs/TabPanels';
import { Tabs } from 'src/components/Tabs/Tabs';
-import { Typography } from 'src/components/Typography';
import { TabLinkList } from './TabLinkList';
diff --git a/packages/manager/src/components/Tag/Tag.styles.ts b/packages/manager/src/components/Tag/Tag.styles.ts
index 77a491cc8cb..2c2309550a8 100644
--- a/packages/manager/src/components/Tag/Tag.styles.ts
+++ b/packages/manager/src/components/Tag/Tag.styles.ts
@@ -1,10 +1,6 @@
-import { omittedProps } from '@linode/ui';
+import { Chip, StyledLinkButton, omittedProps } from '@linode/ui';
import { styled } from '@mui/material/styles';
-import { Chip } from 'src/components/Chip';
-
-import { StyledLinkButton } from '../Button/StyledLinkButton';
-
import type { TagProps } from './Tag';
export const StyledChip = styled(Chip, {
@@ -92,7 +88,9 @@ export const StyledDeleteButton = styled(StyledLinkButton, {
},
borderBottomRightRadius: 3,
borderLeft: `1px solid ${
- theme.name === 'light' ? theme.tokens.color.Neutrals.White : '#2e3238'
+ theme.name === 'light'
+ ? theme.tokens.color.Neutrals.White
+ : theme.tokens.color.Neutrals[100]
}`,
borderRadius: theme.tokens.borderRadius.None,
borderTopRightRadius: 3,
diff --git a/packages/manager/src/components/Tag/Tag.tsx b/packages/manager/src/components/Tag/Tag.tsx
index ba0bc40ca92..b1dab233322 100644
--- a/packages/manager/src/components/Tag/Tag.tsx
+++ b/packages/manager/src/components/Tag/Tag.tsx
@@ -6,7 +6,7 @@ import { truncateEnd } from 'src/utilities/truncate';
import { StyledChip, StyledDeleteButton } from './Tag.styles';
-import type { ChipProps } from 'src/components/Chip';
+import type { ChipProps } from '@linode/ui';
type Variants = 'blue' | 'lightBlue';
diff --git a/packages/manager/src/components/TagCell/AddTag.tsx b/packages/manager/src/components/TagCell/AddTag.tsx
index d6e0b58364f..efa75c81202 100644
--- a/packages/manager/src/components/TagCell/AddTag.tsx
+++ b/packages/manager/src/components/TagCell/AddTag.tsx
@@ -1,11 +1,10 @@
+import { Autocomplete } from '@linode/ui';
import { useQueryClient } from '@tanstack/react-query';
import * as React from 'react';
import { useProfile } from 'src/queries/profile/profile';
import { updateTagsSuggestionsData, useAllTagsQuery } from 'src/queries/tags';
-import { Autocomplete } from '../Autocomplete/Autocomplete';
-
interface AddTagProps {
addTag: (tag: string) => Promise;
existingTags: string[];
diff --git a/packages/manager/src/components/TagCell/TagCell.tsx b/packages/manager/src/components/TagCell/TagCell.tsx
index 92d667b0f32..ec217726a24 100644
--- a/packages/manager/src/components/TagCell/TagCell.tsx
+++ b/packages/manager/src/components/TagCell/TagCell.tsx
@@ -1,4 +1,10 @@
-import { IconButton, omittedProps } from '@linode/ui';
+import {
+ CircleProgress,
+ IconButton,
+ StyledPlusIcon,
+ StyledTagButton,
+ omittedProps,
+} from '@linode/ui';
import MoreHoriz from '@mui/icons-material/MoreHoriz';
import { styled } from '@mui/material/styles';
import Grid from '@mui/material/Unstable_Grid2';
@@ -7,8 +13,6 @@ import * as React from 'react';
import { Tag } from 'src/components/Tag/Tag';
import { useWindowDimensions } from 'src/hooks/useWindowDimensions';
-import { StyledPlusIcon, StyledTagButton } from '../Button/StyledTagButton';
-import { CircleProgress } from '../CircleProgress';
import { AddTag } from './AddTag';
import { TagDrawer } from './TagDrawer';
diff --git a/packages/manager/src/components/TagsInput/TagsInput.tsx b/packages/manager/src/components/TagsInput/TagsInput.tsx
index c88260181a8..ae0c205148f 100644
--- a/packages/manager/src/components/TagsInput/TagsInput.tsx
+++ b/packages/manager/src/components/TagsInput/TagsInput.tsx
@@ -1,15 +1,15 @@
+import { Autocomplete, Chip } from '@linode/ui';
import CloseIcon from '@mui/icons-material/Close';
-import { APIError } from '@linode/api-v4/lib/types';
import { useQueryClient } from '@tanstack/react-query';
import { concat } from 'ramda';
import * as React from 'react';
-import { Autocomplete } from 'src/components/Autocomplete/Autocomplete';
-import { Chip } from 'src/components/Chip';
import { useProfile } from 'src/queries/profile/profile';
import { updateTagsSuggestionsData, useAllTagsQuery } from 'src/queries/tags';
import { getErrorMap } from 'src/utilities/errorUtils';
+import type { APIError } from '@linode/api-v4/lib/types';
+
export interface Tag {
label: string;
value: string;
diff --git a/packages/manager/src/components/TextTooltip/TextTooltip.stories.tsx b/packages/manager/src/components/TextTooltip/TextTooltip.stories.tsx
index 5bdbf80d011..c89cc737c92 100644
--- a/packages/manager/src/components/TextTooltip/TextTooltip.stories.tsx
+++ b/packages/manager/src/components/TextTooltip/TextTooltip.stories.tsx
@@ -1,7 +1,6 @@
+import { Typography } from '@linode/ui';
import React from 'react';
-import { Typography } from 'src/components/Typography';
-
import { TextTooltip } from './TextTooltip';
import type { TextTooltipProps } from './TextTooltip';
diff --git a/packages/manager/src/components/TextTooltip/TextTooltip.tsx b/packages/manager/src/components/TextTooltip/TextTooltip.tsx
index 9a1f1f43979..5a7f3ffc206 100644
--- a/packages/manager/src/components/TextTooltip/TextTooltip.tsx
+++ b/packages/manager/src/components/TextTooltip/TextTooltip.tsx
@@ -1,12 +1,10 @@
-import { Tooltip } from '@linode/ui';
+import { Tooltip, Typography } from '@linode/ui';
import { styled } from '@mui/material/styles';
import * as React from 'react';
-import { Typography } from 'src/components/Typography';
-
+import type { TypographyProps } from '@linode/ui';
import type { SxProps, Theme } from '@mui/material';
import type { TooltipProps } from '@mui/material/Tooltip';
-import type { TypographyProps } from 'src/components/Typography';
export interface TextTooltipProps {
/**
diff --git a/packages/manager/src/components/Tile/Tile.tsx b/packages/manager/src/components/Tile/Tile.tsx
index b717753b230..200a07bde1d 100644
--- a/packages/manager/src/components/Tile/Tile.tsx
+++ b/packages/manager/src/components/Tile/Tile.tsx
@@ -1,9 +1,8 @@
+import { Notice, Typography } from '@linode/ui';
import Button from '@mui/material/Button';
import * as React from 'react';
import { Link } from 'src/components/Link';
-import { Notice } from 'src/components/Notice/Notice';
-import { Typography } from 'src/components/Typography';
import { useStyles } from './Tile.styles';
diff --git a/packages/manager/src/components/TransferDisplay/TransferDisplay.tsx b/packages/manager/src/components/TransferDisplay/TransferDisplay.tsx
index ff3e9b810f8..e878fa4db59 100644
--- a/packages/manager/src/components/TransferDisplay/TransferDisplay.tsx
+++ b/packages/manager/src/components/TransferDisplay/TransferDisplay.tsx
@@ -1,12 +1,9 @@
-import { Box } from '@linode/ui';
+import { Box, CircleProgress, StyledLinkButton, Typography } from '@linode/ui';
import * as React from 'react';
-import { CircleProgress } from 'src/components/CircleProgress';
-import { Typography } from 'src/components/Typography';
import { useAccountNetworkTransfer } from 'src/queries/account/transfer';
import { useRegionsQuery } from 'src/queries/regions/regions';
-import { StyledLinkButton } from '../Button/StyledLinkButton';
import { StyledTransferDisplayContainer } from './TransferDisplay.styles';
import { TransferDisplayDialog } from './TransferDisplayDialog';
import {
diff --git a/packages/manager/src/components/TransferDisplay/TransferDisplayDialog.tsx b/packages/manager/src/components/TransferDisplay/TransferDisplayDialog.tsx
index e5ad1ec0225..e74567adf10 100644
--- a/packages/manager/src/components/TransferDisplay/TransferDisplayDialog.tsx
+++ b/packages/manager/src/components/TransferDisplay/TransferDisplayDialog.tsx
@@ -1,12 +1,10 @@
-import { Box } from '@linode/ui';
-import { useTheme } from '@mui/material/styles';
+import { Box, Divider, Typography } from '@linode/ui';
import { styled } from '@mui/material/styles';
+import { useTheme } from '@mui/material/styles';
import * as React from 'react';
import { Dialog } from 'src/components/Dialog/Dialog';
-import { Divider } from 'src/components/Divider';
import { Link } from 'src/components/Link';
-import { Typography } from 'src/components/Typography';
import { useIsGeckoEnabled } from '../RegionSelect/RegionSelect.utils';
import { NETWORK_TRANSFER_USAGE_AND_COST_LINK } from './constants';
diff --git a/packages/manager/src/components/TransferDisplay/TransferDisplayDialogHeader.tsx b/packages/manager/src/components/TransferDisplay/TransferDisplayDialogHeader.tsx
index d48106c3e8c..62b6cacbad2 100644
--- a/packages/manager/src/components/TransferDisplay/TransferDisplayDialogHeader.tsx
+++ b/packages/manager/src/components/TransferDisplay/TransferDisplayDialogHeader.tsx
@@ -1,9 +1,7 @@
+import { TooltipIcon, Typography } from '@linode/ui';
import { useTheme } from '@mui/material/styles';
import * as React from 'react';
-import { TooltipIcon } from 'src/components/TooltipIcon';
-import { Typography } from 'src/components/Typography';
-
interface Props {
dataTestId: string;
headerText: string;
diff --git a/packages/manager/src/components/TransferDisplay/TransferDisplayUsage.tsx b/packages/manager/src/components/TransferDisplay/TransferDisplayUsage.tsx
index 75d072be66c..075cf7cb4b9 100644
--- a/packages/manager/src/components/TransferDisplay/TransferDisplayUsage.tsx
+++ b/packages/manager/src/components/TransferDisplay/TransferDisplayUsage.tsx
@@ -1,9 +1,9 @@
+import { Typography } from '@linode/ui';
import { useTheme } from '@mui/material/styles';
import Grid from '@mui/material/Unstable_Grid2';
import * as React from 'react';
import { BarPercent } from 'src/components/BarPercent';
-import { Typography } from 'src/components/Typography';
import { formatPoolUsagePct } from './utils';
diff --git a/packages/manager/src/components/TypeToConfirm/TypeToConfirm.tsx b/packages/manager/src/components/TypeToConfirm/TypeToConfirm.tsx
index 84f70c6380c..7c88b881acd 100644
--- a/packages/manager/src/components/TypeToConfirm/TypeToConfirm.tsx
+++ b/packages/manager/src/components/TypeToConfirm/TypeToConfirm.tsx
@@ -1,8 +1,9 @@
+import { TextField, Typography } from '@linode/ui';
import * as React from 'react';
import { Link } from 'src/components/Link';
-import { TextField, TextFieldProps } from 'src/components/TextField';
-import { Typography } from 'src/components/Typography';
+
+import type { TextFieldProps } from '@linode/ui';
export interface TypeToConfirmProps extends Omit {
confirmationText?: JSX.Element | string;
diff --git a/packages/manager/src/components/TypeToConfirmDialog/TypeToConfirmDialog.test.tsx b/packages/manager/src/components/TypeToConfirmDialog/TypeToConfirmDialog.test.tsx
index e3b308e52f7..4b4853c371a 100644
--- a/packages/manager/src/components/TypeToConfirmDialog/TypeToConfirmDialog.test.tsx
+++ b/packages/manager/src/components/TypeToConfirmDialog/TypeToConfirmDialog.test.tsx
@@ -1,7 +1,7 @@
+import { Typography } from '@linode/ui';
import { fireEvent } from '@testing-library/react';
import * as React from 'react';
-import { Typography } from 'src/components/Typography';
import { renderWithTheme } from 'src/utilities/testHelpers';
import { TypeToConfirmDialog } from './TypeToConfirmDialog';
diff --git a/packages/manager/src/components/TypeToConfirmDialog/TypeToConfirmDialog.tsx b/packages/manager/src/components/TypeToConfirmDialog/TypeToConfirmDialog.tsx
index 55e555abe50..1132f9cd7d3 100644
--- a/packages/manager/src/components/TypeToConfirmDialog/TypeToConfirmDialog.tsx
+++ b/packages/manager/src/components/TypeToConfirmDialog/TypeToConfirmDialog.tsx
@@ -1,17 +1,14 @@
-import { APIError } from '@linode/api-v4/lib/types';
import * as React from 'react';
import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel';
-import {
- ConfirmationDialog,
- ConfirmationDialogProps,
-} from 'src/components/ConfirmationDialog/ConfirmationDialog';
-import {
- TypeToConfirm,
- TypeToConfirmProps,
-} from 'src/components/TypeToConfirm/TypeToConfirm';
+import { ConfirmationDialog } from 'src/components/ConfirmationDialog/ConfirmationDialog';
+import { TypeToConfirm } from 'src/components/TypeToConfirm/TypeToConfirm';
import { usePreferences } from 'src/queries/profile/preferences';
+import type { APIError } from '@linode/api-v4/lib/types';
+import type { ConfirmationDialogProps } from 'src/components/ConfirmationDialog/ConfirmationDialog';
+import type { TypeToConfirmProps } from 'src/components/TypeToConfirm/TypeToConfirm';
+
interface EntityInfo {
action?:
| 'cancellation'
@@ -37,10 +34,6 @@ interface EntityInfo {
}
interface TypeToConfirmDialogProps {
- /**
- * Chidlren are rendered above the TypeToConfirm input
- */
- children?: React.ReactNode;
/**
* Props to be allow disabling the input
*/
@@ -69,10 +62,6 @@ interface TypeToConfirmDialogProps {
* The click handler for the primary button
*/
onClick: () => void;
- /**
- * Optional callback to be executed when the closing animation has completed
- */
- onExited?: () => void;
/**
* The open/closed state of the dialog
*/
@@ -95,7 +84,6 @@ export const TypeToConfirmDialog = (props: CombinedProps) => {
loading,
onClick,
onClose,
- onExited,
open,
textFieldStyle,
title,
@@ -133,7 +121,7 @@ export const TypeToConfirmDialog = (props: CombinedProps) => {
secondaryButtonProps={{
'data-testid': 'cancel',
label: 'Cancel',
- onClick: onClose,
+ onClick: onClose ? () => onClose({}, 'escapeKeyDown') : undefined,
}}
style={{ padding: 0 }}
/>
@@ -144,7 +132,6 @@ export const TypeToConfirmDialog = (props: CombinedProps) => {
actions={actions}
error={errors ? errors[0].reason : undefined}
onClose={onClose}
- onExited={onExited}
open={open}
title={title}
>
diff --git a/packages/manager/src/components/Uploaders/FileUpload.styles.ts b/packages/manager/src/components/Uploaders/FileUpload.styles.ts
index c5b1ef3bdff..d33745e45c0 100644
--- a/packages/manager/src/components/Uploaders/FileUpload.styles.ts
+++ b/packages/manager/src/components/Uploaders/FileUpload.styles.ts
@@ -1,9 +1,8 @@
+import { Typography, rotate360 } from '@linode/ui';
import { styled } from '@mui/material/styles';
import { makeStyles } from 'tss-react/mui';
import UploadPending from 'src/assets/icons/uploadPending.svg';
-import { Typography } from 'src/components/Typography';
-import { rotate360 } from 'src/styles/keyframes';
import type { FileUploadProps } from './FileUpload';
import type { Theme } from '@mui/material/styles';
diff --git a/packages/manager/src/components/Uploaders/FileUpload.tsx b/packages/manager/src/components/Uploaders/FileUpload.tsx
index 6152322f7af..b53d5cb3810 100644
--- a/packages/manager/src/components/Uploaders/FileUpload.tsx
+++ b/packages/manager/src/components/Uploaders/FileUpload.tsx
@@ -1,11 +1,9 @@
-import { Tooltip } from '@linode/ui';
+import { Button, Tooltip, Typography } from '@linode/ui';
import * as React from 'react';
import CautionIcon from 'src/assets/icons/caution.svg';
import FileUploadComplete from 'src/assets/icons/fileUploadComplete.svg';
-import { Button } from 'src/components/Button/Button';
import { LinearProgress } from 'src/components/LinearProgress';
-import { Typography } from 'src/components/Typography';
import { readableBytes } from 'src/utilities/unitConversions';
import {
@@ -94,7 +92,8 @@ export const FileUpload = React.memo((props: FileUploadProps) => {
})}
variant="body1"
>
- {readableBytes(props.sizeInBytes).formatted}
+ {/* to convert from binary units (GiB) to decimal units (GB) we need to pass the base10 flag */}
+ {readableBytes(props.sizeInBytes, { base10: true }).formatted}
{props.percentCompleted === 100 ? (
, 'value'>> {
/**
diff --git a/packages/manager/src/components/VerticalLinearStepper/VerticalLinearStepper.stories.tsx b/packages/manager/src/components/VerticalLinearStepper/VerticalLinearStepper.stories.tsx
index f455e4dce7a..dbfc6be04e4 100644
--- a/packages/manager/src/components/VerticalLinearStepper/VerticalLinearStepper.stories.tsx
+++ b/packages/manager/src/components/VerticalLinearStepper/VerticalLinearStepper.stories.tsx
@@ -1,9 +1,10 @@
-import { Meta, StoryObj } from '@storybook/react';
+import { Typography } from '@linode/ui';
import React from 'react';
-import { Typography } from '../Typography';
import { VerticalLinearStepper } from './VerticalLinearStepper';
+import type { Meta, StoryObj } from '@storybook/react';
+
const meta: Meta = {
component: VerticalLinearStepper,
title: 'Components/VerticalLinearStepper',
diff --git a/packages/manager/src/components/VerticalLinearStepper/VerticalLinearStepper.tsx b/packages/manager/src/components/VerticalLinearStepper/VerticalLinearStepper.tsx
index 99f9424c9e1..8e2e46e0e62 100644
--- a/packages/manager/src/components/VerticalLinearStepper/VerticalLinearStepper.tsx
+++ b/packages/manager/src/components/VerticalLinearStepper/VerticalLinearStepper.tsx
@@ -1,3 +1,4 @@
+import { Button, convertToKebabCase } from '@linode/ui';
import {
Step,
StepConnector,
@@ -7,18 +8,16 @@ import {
useTheme,
} from '@mui/material';
import Box from '@mui/material/Box';
-import { Theme } from '@mui/material/styles';
import useMediaQuery from '@mui/material/useMediaQuery';
import React, { useState } from 'react';
-import { convertToKebabCase } from 'src/utilities/convertToKebobCase';
-
import {
CustomStepIcon,
StyledCircleIcon,
StyledColorlibConnector,
} from './VerticalLinearStepper.styles';
-import { Button } from '../Button/Button';
+
+import type { Theme } from '@mui/material/styles';
type VerticalLinearStep = {
content: JSX.Element;
@@ -73,10 +72,10 @@ export const VerticalLinearStepper = ({
/>
}
sx={{
- cursor: 'pointer !important',
'& .MuiStepIcon-text': {
display: 'none',
},
+ cursor: 'pointer !important',
p: 0,
}}
>
@@ -137,10 +136,10 @@ export const VerticalLinearStepper = ({
)}
{index !== 2 && (