From 7a6d693032b02f8ffd4bcbdfc16f8a397f0afa90 Mon Sep 17 00:00:00 2001 From: pmakode-akamai Date: Mon, 11 Nov 2024 19:43:14 +0530 Subject: [PATCH 01/13] Replace one-off hardcoded color values with color tokens pt3 --- .../manager/src/assets/icons/monitor-disabled.svg | 2 +- packages/manager/src/components/Dialog/Dialog.tsx | 6 +++--- .../src/components/Placeholder/Placeholder.tsx | 12 ++++++++++-- packages/manager/src/components/Tag/Tag.styles.ts | 4 +++- packages/manager/src/features/TopMenu/TopMenu.tsx | 6 +++++- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/packages/manager/src/assets/icons/monitor-disabled.svg b/packages/manager/src/assets/icons/monitor-disabled.svg index 2f730c7a332..7be1239b37c 100644 --- a/packages/manager/src/assets/icons/monitor-disabled.svg +++ b/packages/manager/src/assets/icons/monitor-disabled.svg @@ -1,6 +1,6 @@ - + diff --git a/packages/manager/src/components/Dialog/Dialog.tsx b/packages/manager/src/components/Dialog/Dialog.tsx index fbbb76cfaa1..1504ef243ce 100644 --- a/packages/manager/src/components/Dialog/Dialog.tsx +++ b/packages/manager/src/components/Dialog/Dialog.tsx @@ -115,10 +115,10 @@ const StyledDialog = styled(_Dialog, { }, })); -const StyledHr = styled('hr')({ - backgroundColor: '#e3e5e8', +const StyledHr = styled('hr', { label: 'StyledHr' })(({ theme }) => ({ + backgroundColor: theme.tokens.color.Neutrals[20], border: 'none', height: 1, margin: '-2em 8px 0px 8px', width: '100%', -}); +})); diff --git a/packages/manager/src/components/Placeholder/Placeholder.tsx b/packages/manager/src/components/Placeholder/Placeholder.tsx index 891cc6dddf6..25662fe8936 100644 --- a/packages/manager/src/components/Placeholder/Placeholder.tsx +++ b/packages/manager/src/components/Placeholder/Placeholder.tsx @@ -218,12 +218,20 @@ const StyledButtonWrapper = styled('div')(({ theme }) => ({ const StyledLinksSection = styled('div')< Pick >(({ theme, ...props }) => ({ - borderTop: `1px solid ${theme.name === 'light' ? '#e3e5e8' : '#2e3238'}`, + borderTop: `1px solid ${ + theme.name === 'light' + ? theme.tokens.color.Neutrals[20] + : theme.tokens.color.Neutrals[100] + }`, gridArea: 'links', paddingTop: '38px', ...(props.showTransferDisplay && { - borderBottom: `1px solid ${theme.name === 'light' ? '#e3e5e8' : '#2e3238'}`, + borderBottom: `1px solid ${ + theme.name === 'light' + ? theme.tokens.color.Neutrals[20] + : theme.tokens.color.Neutrals[100] + }`, paddingBottom: theme.spacing(2), [theme.breakpoints.up('md')]: { paddingBottom: theme.spacing(4), diff --git a/packages/manager/src/components/Tag/Tag.styles.ts b/packages/manager/src/components/Tag/Tag.styles.ts index 77a491cc8cb..b9c8cef2b11 100644 --- a/packages/manager/src/components/Tag/Tag.styles.ts +++ b/packages/manager/src/components/Tag/Tag.styles.ts @@ -92,7 +92,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/features/TopMenu/TopMenu.tsx b/packages/manager/src/features/TopMenu/TopMenu.tsx index 00802f82ebb..32d23d5fc3f 100644 --- a/packages/manager/src/features/TopMenu/TopMenu.tsx +++ b/packages/manager/src/features/TopMenu/TopMenu.tsx @@ -39,7 +39,11 @@ export const TopMenu = React.memo((props: TopMenuProps) => { return ( {loggedInAsCustomer && ( - + theme.tokens.color.Pink[40]} + padding="1em" + textAlign="center" + > theme.tokens.color.Neutrals.Black} fontSize="1.2em" From b0c16d7a42cf416c01314b7470515e6b2e8c9b90 Mon Sep 17 00:00:00 2001 From: pmakode-akamai Date: Mon, 11 Nov 2024 19:56:09 +0530 Subject: [PATCH 02/13] Replace #c9c7c7 with theme.tokens.color.Neutrals[40] --- .../features/TopMenu/NotificationMenu/NotificationMenu.tsx | 4 +++- .../src/features/TopMenu/SearchBar/SearchBar.styles.ts | 2 +- packages/manager/src/features/TopMenu/TopMenuTooltip.tsx | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/manager/src/features/TopMenu/NotificationMenu/NotificationMenu.tsx b/packages/manager/src/features/TopMenu/NotificationMenu/NotificationMenu.tsx index 063ca7d533c..1e9360ac60e 100644 --- a/packages/manager/src/features/TopMenu/NotificationMenu/NotificationMenu.tsx +++ b/packages/manager/src/features/TopMenu/NotificationMenu/NotificationMenu.tsx @@ -88,7 +88,9 @@ export const NotificationMenu = () => { ({ ...topMenuIconButtonSx(theme), - color: notificationContext.menuOpen ? '#606469' : '#c9c7c7', + color: notificationContext.menuOpen + ? '#606469' + : theme.tokens.color.Neutrals[40], })} aria-describedby={id} aria-haspopup="true" diff --git a/packages/manager/src/features/TopMenu/SearchBar/SearchBar.styles.ts b/packages/manager/src/features/TopMenu/SearchBar/SearchBar.styles.ts index f23d19daff8..d53c91af154 100644 --- a/packages/manager/src/features/TopMenu/SearchBar/SearchBar.styles.ts +++ b/packages/manager/src/features/TopMenu/SearchBar/SearchBar.styles.ts @@ -16,7 +16,7 @@ export const StyledIconButton = styled(IconButton, { }, backgroundColor: 'inherit', border: 'none', - color: '#c9c7c7', + color: theme.tokens.color.Neutrals[40], cursor: 'pointer', padding: theme.spacing(), position: 'relative', diff --git a/packages/manager/src/features/TopMenu/TopMenuTooltip.tsx b/packages/manager/src/features/TopMenu/TopMenuTooltip.tsx index 43bff6c2967..7a87250dc07 100644 --- a/packages/manager/src/features/TopMenu/TopMenuTooltip.tsx +++ b/packages/manager/src/features/TopMenu/TopMenuTooltip.tsx @@ -26,7 +26,7 @@ export const topMenuIconButtonSx = (theme: Theme) => ({ '&:hover, &:focus': { color: '#606469', }, - color: '#c9c7c7', + color: theme.tokens.color.Neutrals[40], height: `50px`, [theme.breakpoints.down('sm')]: { padding: 1, From 29f2c36964ddbe97faeea8e4f7d8096f20eec738 Mon Sep 17 00:00:00 2001 From: pmakode-akamai Date: Mon, 11 Nov 2024 20:18:52 +0530 Subject: [PATCH 03/13] Replace #606469 with theme.tokens.color.Neutrals[70] --- packages/manager/src/components/AreaChart/AreaChart.tsx | 4 ++-- packages/manager/src/components/LineGraph/LineGraph.tsx | 2 +- .../features/TopMenu/NotificationMenu/NotificationMenu.tsx | 2 +- packages/manager/src/features/TopMenu/TopMenuTooltip.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/manager/src/components/AreaChart/AreaChart.tsx b/packages/manager/src/components/AreaChart/AreaChart.tsx index 70dcabf72b4..ff43f4793ef 100644 --- a/packages/manager/src/components/AreaChart/AreaChart.tsx +++ b/packages/manager/src/components/AreaChart/AreaChart.tsx @@ -241,10 +241,10 @@ export const AreaChart = (props: AreaChartProps) => { } diff --git a/packages/manager/src/components/LineGraph/LineGraph.tsx b/packages/manager/src/components/LineGraph/LineGraph.tsx index cde35ce4004..745e6a27af1 100644 --- a/packages/manager/src/components/LineGraph/LineGraph.tsx +++ b/packages/manager/src/components/LineGraph/LineGraph.tsx @@ -284,7 +284,7 @@ export const LineGraph = (props: LineGraphProps) => { intersect: false, mode: 'index', position: 'nearest', - titleFontColor: '#606469', + titleFontColor: theme.tokens.color.Neutrals[70], xPadding: 8, yPadding: 10, }, diff --git a/packages/manager/src/features/TopMenu/NotificationMenu/NotificationMenu.tsx b/packages/manager/src/features/TopMenu/NotificationMenu/NotificationMenu.tsx index 1e9360ac60e..86b74c64b6b 100644 --- a/packages/manager/src/features/TopMenu/NotificationMenu/NotificationMenu.tsx +++ b/packages/manager/src/features/TopMenu/NotificationMenu/NotificationMenu.tsx @@ -89,7 +89,7 @@ export const NotificationMenu = () => { sx={(theme) => ({ ...topMenuIconButtonSx(theme), color: notificationContext.menuOpen - ? '#606469' + ? theme.tokens.color.Neutrals[70] : theme.tokens.color.Neutrals[40], })} aria-describedby={id} diff --git a/packages/manager/src/features/TopMenu/TopMenuTooltip.tsx b/packages/manager/src/features/TopMenu/TopMenuTooltip.tsx index 7a87250dc07..22afe494a88 100644 --- a/packages/manager/src/features/TopMenu/TopMenuTooltip.tsx +++ b/packages/manager/src/features/TopMenu/TopMenuTooltip.tsx @@ -24,7 +24,7 @@ export const TopMenuTooltip = React.memo(({ children, title }: Props) => { export const topMenuIconButtonSx = (theme: Theme) => ({ '&:hover, &:focus': { - color: '#606469', + color: theme.tokens.color.Neutrals[70], }, color: theme.tokens.color.Neutrals[40], height: `50px`, From 6941e73aec85dee3d01fa70c242655f9d6505199 Mon Sep 17 00:00:00 2001 From: pmakode-akamai Date: Mon, 11 Nov 2024 20:26:46 +0530 Subject: [PATCH 04/13] Replace #555 with theme.tokens.color.Neutrals[80] --- .../PhoneVerification/PhoneVerification.styles.ts | 2 +- packages/ui/src/components/Notice/Notice.styles.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/manager/src/features/Profile/AuthenticationSettings/PhoneVerification/PhoneVerification.styles.ts b/packages/manager/src/features/Profile/AuthenticationSettings/PhoneVerification/PhoneVerification.styles.ts index cd5b9f75a26..65cbe8e180e 100644 --- a/packages/manager/src/features/Profile/AuthenticationSettings/PhoneVerification/PhoneVerification.styles.ts +++ b/packages/manager/src/features/Profile/AuthenticationSettings/PhoneVerification/PhoneVerification.styles.ts @@ -21,7 +21,7 @@ export const StyledPhoneNumberTitle = styled(Typography, { export const StyledLabel = styled(Typography, { label: 'StyledLabel', })(({ theme }) => ({ - color: theme.name === 'light' ? '#555' : '#c9cacb', + color: theme.name === 'light' ? theme.tokens.color.Neutrals[80] : '#c9cacb', fontSize: '.875rem', lineHeight: '1', marginBottom: '8px', diff --git a/packages/ui/src/components/Notice/Notice.styles.ts b/packages/ui/src/components/Notice/Notice.styles.ts index 440ca58a017..1e6b45ca9d3 100644 --- a/packages/ui/src/components/Notice/Notice.styles.ts +++ b/packages/ui/src/components/Notice/Notice.styles.ts @@ -77,7 +77,7 @@ export const useStyles = makeStyles< }, warning: { [`& .${classes.icon}`]: { - color: '#555', + color: theme.tokens.color.Neutrals[80], }, [`&.${classes.important}`]: { borderLeftWidth: 32, From 5c9290f3ab8bd37f3f6339cfdaf5d8e2f5796d2f Mon Sep 17 00:00:00 2001 From: pmakode-akamai Date: Mon, 11 Nov 2024 20:39:45 +0530 Subject: [PATCH 05/13] Replace #c9cacb with theme.tokens.color.Neutrals[40] or equivalent --- packages/manager/src/assets/icons/toggleOff.svg | 2 +- .../src/components/PasswordInput/StrengthIndicator.tsx | 2 +- .../PhoneVerification/PhoneVerification.styles.ts | 5 ++++- .../manager/src/features/TopMenu/SearchBar/SearchBar.tsx | 5 ++++- packages/ui/src/foundations/themes/light.ts | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/manager/src/assets/icons/toggleOff.svg b/packages/manager/src/assets/icons/toggleOff.svg index 79a13065668..433629a5f01 100644 --- a/packages/manager/src/assets/icons/toggleOff.svg +++ b/packages/manager/src/assets/icons/toggleOff.svg @@ -6,7 +6,7 @@ class="icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - + \ No newline at end of file diff --git a/packages/manager/src/components/PasswordInput/StrengthIndicator.tsx b/packages/manager/src/components/PasswordInput/StrengthIndicator.tsx index 5eb0b75f3b0..d64a2d4e88b 100644 --- a/packages/manager/src/components/PasswordInput/StrengthIndicator.tsx +++ b/packages/manager/src/components/PasswordInput/StrengthIndicator.tsx @@ -17,7 +17,7 @@ const useStyles = makeStyles()((theme: Theme) => ({ '&[class*="strength-"]': { backgroundColor: theme.palette.primary.main, }, - backgroundColor: '#C9CACB', + backgroundColor: theme.tokens.color.Neutrals[40], height: '4px', transition: 'background-color .5s ease-in-out', }, diff --git a/packages/manager/src/features/Profile/AuthenticationSettings/PhoneVerification/PhoneVerification.styles.ts b/packages/manager/src/features/Profile/AuthenticationSettings/PhoneVerification/PhoneVerification.styles.ts index 65cbe8e180e..3194d85c90f 100644 --- a/packages/manager/src/features/Profile/AuthenticationSettings/PhoneVerification/PhoneVerification.styles.ts +++ b/packages/manager/src/features/Profile/AuthenticationSettings/PhoneVerification/PhoneVerification.styles.ts @@ -21,7 +21,10 @@ export const StyledPhoneNumberTitle = styled(Typography, { export const StyledLabel = styled(Typography, { label: 'StyledLabel', })(({ theme }) => ({ - color: theme.name === 'light' ? theme.tokens.color.Neutrals[80] : '#c9cacb', + color: + theme.name === 'light' + ? theme.tokens.color.Neutrals[80] + : theme.tokens.color.Neutrals[40], fontSize: '.875rem', lineHeight: '1', marginBottom: '8px', diff --git a/packages/manager/src/features/TopMenu/SearchBar/SearchBar.tsx b/packages/manager/src/features/TopMenu/SearchBar/SearchBar.tsx index b6a53bb8130..18bf5642e0b 100644 --- a/packages/manager/src/features/TopMenu/SearchBar/SearchBar.tsx +++ b/packages/manager/src/features/TopMenu/SearchBar/SearchBar.tsx @@ -323,8 +323,11 @@ const SearchBar = (props: SearchProps) => { ({ + color: theme.tokens.color.Neutrals[40], + fontSize: '2rem', + })} data-qa-search-icon - sx={{ color: '#c9cacb', fontSize: '2rem' }} />