diff --git a/src/ConnectedTokenProvider.tsx b/src/ConnectedTokenProvider.tsx index 483b4c9105..ee8bfc8404 100644 --- a/src/ConnectedTokenProvider.tsx +++ b/src/ConnectedTokenProvider.tsx @@ -112,6 +112,17 @@ const connectThemeOverrides = (palette: Theme['palette']) => ({ }, }, }, + MuiButton: { + styleOverrides: { + // MUI sizes icon slot children off the button size (medium 20px, large 22px), + // which beats the Icon's own size prop. Our chevrons are always 24px. + endIcon: { + '& > *:nth-of-type(1)': { + fontSize: '24px', + }, + }, + }, + }, MuiChip: { styleOverrides: { label: { diff --git a/src/components/InstitutionTile.js b/src/components/InstitutionTile.js index 63aaef1d01..789c467c76 100644 --- a/src/components/InstitutionTile.js +++ b/src/components/InstitutionTile.js @@ -6,8 +6,7 @@ import { __ } from 'src/utilities/Intl' import { useTokens } from '@kyper/tokenprovider' import { Button, Chip } from '@mui/material' -import { ChevronRight } from '@kyper/icon/ChevronRight' -import { InstitutionLogo } from '@mxenabled/mxui' +import { Icon, InstitutionLogo } from '@mxenabled/mxui' import { formatUrl } from 'src/utilities/FormatUrl' import { @@ -34,11 +33,7 @@ export const InstitutionTile = (props) => { aria-label={__('Add account with %1', institution.name)} className={'institutionButton '} data-test={`${institution.name.replace(/\s+/g, '-')}-row`} - endIcon={ - !institution.is_disabled_by_client && ( - - ) - } + endIcon={!institution.is_disabled_by_client && } fullWidth={true} onClick={selectInstitution} startIcon={ diff --git a/src/components/support/SupportMenu.js b/src/components/support/SupportMenu.js index 93a617384c..0c1cf3a870 100644 --- a/src/components/support/SupportMenu.js +++ b/src/components/support/SupportMenu.js @@ -3,8 +3,7 @@ import PropTypes from 'prop-types' import { useTokens } from '@kyper/tokenprovider' import { UtilityRow } from '@kyper/utilityrow' -import { ChevronRight } from '@kyper/icon/ChevronRight' -import { Text } from '@mxenabled/mxui' +import { Icon, Text } from '@mxenabled/mxui' import { __ } from 'src/utilities/Intl' @@ -32,7 +31,7 @@ export const SupportMenu = React.forwardRef((props, menuRef) => { } + rightChildren={} subTitle={__('Get help connecting your account')} title={__('Request support')} /> diff --git a/src/styles/spacing.css b/src/styles/spacing.css index 600a852008..d1f23de35b 100644 --- a/src/styles/spacing.css +++ b/src/styles/spacing.css @@ -1,6 +1,7 @@ :root { --spacing-point-25: calc(var(--mui-spacing) * 0.25); --spacing-point-5: calc(var(--mui-spacing) * 0.5); + --spacing-point-75: calc(var(--mui-spacing) * 0.75); --spacing-1: calc(var(--mui-spacing) * 1); --spacing-1-point-25: calc(var(--mui-spacing) * 1.25); --spacing-1-point-5: calc(var(--mui-spacing) * 1.5); diff --git a/src/views/disclosure/DataRequested.js b/src/views/disclosure/DataRequested.js index 4b9efc464d..ed79c7c4ab 100644 --- a/src/views/disclosure/DataRequested.js +++ b/src/views/disclosure/DataRequested.js @@ -2,10 +2,8 @@ import React, { Fragment } from 'react' import { useSelector } from 'react-redux' import PropTypes from 'prop-types' -import { useTokens } from '@kyper/tokenprovider' -import { Text } from '@mxenabled/mxui' -import { ChevronRight } from '@kyper/icon/ChevronRight' -import { Link } from '@mui/material' +import { Icon, Text } from '@mxenabled/mxui' +import { Link, Stack } from '@mui/material' import { selectConnectConfig } from 'src/redux/reducers/configSlice' @@ -21,6 +19,7 @@ import { DataCluster } from 'src/components/DataCluster' import { getDelay } from 'src/utilities/getDelay' import { VIEWS } from 'src/views/disclosure/Interstitial' +import styles from 'src/views/disclosure/DataRequested.module.css' export const DataRequested = (props) => { useAnalyticsPath(...PageviewInfo.CONNECT_DISCLOSURE_DATA_REQUESTED) @@ -31,8 +30,6 @@ export const DataRequested = (props) => { aggIdentityDataCluster, } = getDataClusters() const connectConfig = useSelector(selectConnectConfig) - const tokens = useTokens() - const styles = getStyles(tokens) const getNextDelay = getDelay() const appName = useSelector((state) => state.profiles.client.oauth_app_name || null) @@ -64,12 +61,11 @@ export const DataRequested = (props) => { return ( -
+ @@ -78,7 +74,6 @@ export const DataRequested = (props) => { @@ -87,41 +82,24 @@ export const DataRequested = (props) => { appName ? appName : __('Your app'), )} -
+ {dataClusterElement} { props.setCurrentView(VIEWS.AVAILABLE_DATA) }} - style={styles.link} + variant="ParagraphSmall" > {__('Other available data')} - +
) } -const getStyles = (tokens) => { - return { - title: { - marginBottom: tokens.Spacing.Tiny, - }, - paragraph: { - marginBottom: tokens.Spacing.XSmall, - }, - container: { - marginBottom: tokens.Spacing.Large, - }, - link: { - fontWeight: tokens.FontWeight.Semibold, - fontSize: tokens.FontSize.Small, - }, - } -} - DataRequested.propTypes = { setCurrentView: PropTypes.func.isRequired, } diff --git a/src/views/disclosure/DataRequested.module.css b/src/views/disclosure/DataRequested.module.css new file mode 100644 index 0000000000..a6304ef8e8 --- /dev/null +++ b/src/views/disclosure/DataRequested.module.css @@ -0,0 +1,7 @@ +.container:global(.MuiStack-root) { + margin-bottom: var(--spacing-4); +} + +.link:global(.MuiLink-root) { + gap: var(--spacing-point-5); +} diff --git a/src/views/disclosure/Interstitial.js b/src/views/disclosure/Interstitial.js index 10b16f2770..06b7c707b5 100644 --- a/src/views/disclosure/Interstitial.js +++ b/src/views/disclosure/Interstitial.js @@ -3,11 +3,10 @@ import { useSelector } from 'react-redux' import PropTypes from 'prop-types' import { useTokens } from '@kyper/tokenprovider' -import { Text } from '@mxenabled/mxui' +import { Icon, Text } from '@mxenabled/mxui' import { Link as LinkIcon } from '@kyper/icon/Link' import { Lock } from '@kyper/icon/Lock' import { InfoOutline } from '@kyper/icon/InfoOutline' -import { ChevronRight } from '@kyper/icon/ChevronRight' import { Link, Stack } from '@mui/material' import { PageviewInfo } from 'src/const/Analytics' @@ -23,6 +22,7 @@ import { PrivacyPolicy } from 'src/views/disclosure/PrivacyPolicy' import { DataRequested } from 'src/views/disclosure/DataRequested' import { DataAvailable } from 'src/views/disclosure/DataAvailable' import { getSelectedInstitution } from 'src/redux/selectors/Connect' +import styles from 'src/views/disclosure/Interstitial.module.css' export const VIEWS = { AVAILABLE_DATA: 'available_data', @@ -35,7 +35,6 @@ export const DisclosureInterstitial = React.forwardRef((props, interstitialNavRe const { handleGoBack, scrollToTop } = props useAnalyticsPath(...PageviewInfo.CONNECT_DISCLOSURE) const tokens = useTokens() - const styles = getStyles(tokens) const getNextDelay = getDelay() const institution = useSelector(getSelectedInstitution) const appName = useSelector((state) => state.profiles.client.oauth_app_name || null) @@ -79,7 +78,7 @@ export const DisclosureInterstitial = React.forwardRef((props, interstitialNavRe return ( -
+
-
+ @@ -99,86 +98,94 @@ export const DisclosureInterstitial = React.forwardRef((props, interstitialNavRe ? __('%1 trusts MX to connect your %2 account', appName, institution.name) : __('This app trusts MX to connect your account')} -
-
- - - {__('Connect in seconds')} - -
- - {appName - ? __( - 'MX helps you connect your financial accounts to apps and services. MX will allow %1 to access only the data requested.', - appName, - ) - : __( - 'MX helps you connect your financial accounts to apps and services. MX will allow your app to access only the data requested.', - )} - - -
- - - {__('Private and secure')} - -
- - {__( - 'Your data is encrypted and shared only with your permission. MX doesn’t sell your info, and you can stop sharing at any time.', - )} - -
- - - {__('Learn more')} - -
+ + + + + + {__('Connect in seconds')} + + + + {appName + ? __( + 'MX helps you connect your financial accounts to apps and services. MX will allow %1 to access only the data requested.', + appName, + ) + : __( + 'MX helps you connect your financial accounts to apps and services. MX will allow your app to access only the data requested.', + )} + + + + + + + + {__('Private and secure')} + + + + {__( + 'Your data is encrypted and shared only with your permission. MX doesn’t sell your info, and you can stop sharing at any time.', + )} + + + + + + + {__('Learn more')} + + + +
{ setCurrentView(VIEWS.DATA_REQUESTED) }} - style={styles.link} variant="ParagraphSmall" > {__('Data requested')} - + { if (showExternalLinkPopup) { @@ -193,63 +200,17 @@ export const DisclosureInterstitial = React.forwardRef((props, interstitialNavRe goToUrlLink(privacyUrl, true) } }} - style={styles.link} variant="ParagraphSmall" > {_p('connect/disclosure/policy/link', 'MX Privacy Policy')} - + ) }) -const getStyles = (tokens) => { - return { - logoHeader: { - marginTop: tokens.Spacing.Medium, - marginBottom: tokens.Spacing.Small, - }, - flexGroup: { - display: 'flex', - flexDirection: 'column', - }, - title: { - marginTop: tokens.Spacing.Large, - marginBottom: tokens.Spacing.Large, - textAlign: 'center', - }, - iconGroup: { - display: 'flex', - }, - icon: { - display: 'block', - left: '0%', - right: ' 0%', - top: '0%', - bottom: '-0.01%', - }, - subTitle: { - marginLeft: tokens.Spacing.Small, - marginBottom: tokens.Spacing.Tiny, - }, - paragraph: { - flexDirection: 'column', - marginLeft: `36px`, - marginBottom: tokens.Spacing.Medium, - }, - link: { - fontWeight: tokens.FontWeight.Semibold, - fontSize: tokens.FontSize.Small, - marginLeft: '32px', - marginTop: tokens.Spacing.Medium, - width: 'fit-content', - }, - chevron: { marginLeft: '13.02px' }, - } -} - DisclosureInterstitial.propTypes = { handleGoBack: PropTypes.func.isRequired, scrollToTop: PropTypes.func.isRequired, diff --git a/src/views/disclosure/Interstitial.module.css b/src/views/disclosure/Interstitial.module.css new file mode 100644 index 0000000000..d115cb91d5 --- /dev/null +++ b/src/views/disclosure/Interstitial.module.css @@ -0,0 +1,32 @@ +.logoHeader { + margin-bottom: var(--spacing-1-point-5); + margin-top: var(--spacing-2); +} + +.title:global(.MuiTypography-root) { + margin-top: var(--spacing-3); + text-align: center; +} + +.sections:global(.MuiStack-root) { + margin-bottom: var(--spacing-point-5); +} + +.icon { + display: block; +} + +.subTitle:global(.MuiTypography-root) { + margin-left: var(--spacing-1-point-5); +} + +.paragraph:global(.MuiTypography-root) { + margin-left: var(--spacing-4-point-5); +} + +.link:global(.MuiLink-root) { + gap: var(--spacing-point-5); + margin-left: var(--spacing-4); + margin-top: var(--spacing-2); + width: fit-content; +} diff --git a/src/views/disclosure/PoweredByMX.js b/src/views/disclosure/PoweredByMX.js index 8ada4a6413..cf8f395164 100644 --- a/src/views/disclosure/PoweredByMX.js +++ b/src/views/disclosure/PoweredByMX.js @@ -1,27 +1,24 @@ import React from 'react' -import { useTokens } from '@kyper/tokenprovider' -import { ChevronRight } from '@kyper/icon/ChevronRight' +import { Icon } from '@mxenabled/mxui' import PropTypes from 'prop-types' import { Button } from '@mui/material' import PoweredByMXText from 'src/views/disclosure/PoweredByMXText' +import styles from 'src/views/disclosure/PoweredByMX.module.css' const PoweredByMX = ({ onClick }) => { - const tokens = useTokens() - const styles = getStyles(tokens) - return ( ) } @@ -30,14 +27,4 @@ PoweredByMX.propTypes = { onClick: PropTypes.func, } -const getStyles = () => { - return { - button: { - display: 'flex', - flexDirection: 'row', - }, - chevron: { marginLeft: 4 }, - } -} - export default PoweredByMX diff --git a/src/views/disclosure/PoweredByMX.module.css b/src/views/disclosure/PoweredByMX.module.css new file mode 100644 index 0000000000..30b3644e61 --- /dev/null +++ b/src/views/disclosure/PoweredByMX.module.css @@ -0,0 +1,3 @@ +.button:global(.MuiButton-root) { + gap: var(--spacing-point-75); +} diff --git a/src/views/loginError/ImpededMemberError.js b/src/views/loginError/ImpededMemberError.js index bd273b56d4..188390fcf3 100644 --- a/src/views/loginError/ImpededMemberError.js +++ b/src/views/loginError/ImpededMemberError.js @@ -7,8 +7,7 @@ import { getInstitutionLoginUrl } from 'src/utilities/Institution' import { goToUrlLink } from 'src/utilities/global' import { useTokens } from '@kyper/tokenprovider' -import { Text } from '@mxenabled/mxui' -import { ChevronRight } from '@kyper/icon/ChevronRight' +import { Icon, Text } from '@mxenabled/mxui' import { Link } from '@mui/material' export const ImpededMemberError = ({ @@ -52,7 +51,7 @@ export const ImpededMemberError = ({ > {__('Visit website')} - +
@@ -66,7 +65,7 @@ export const ImpededMemberError = ({
{__('Try again')} - +
diff --git a/src/views/manualAccount/ManualAccountMenu.js b/src/views/manualAccount/ManualAccountMenu.js index b9ef6728da..2eb0b5fb9b 100644 --- a/src/views/manualAccount/ManualAccountMenu.js +++ b/src/views/manualAccount/ManualAccountMenu.js @@ -3,9 +3,8 @@ import PropTypes from 'prop-types' import { __ } from 'src/utilities/Intl' import { useTokens } from '@kyper/tokenprovider' -import { Text } from '@mxenabled/mxui' +import { Icon, Text } from '@mxenabled/mxui' import { UtilityRow } from '@kyper/utilityrow' -import { ChevronRight } from '@kyper/icon/ChevronRight' import { Check } from '@kyper/icon/Check' import { PiggyBankOutline } from '@kyper/icon/PiggyBankOutline' import { Document } from '@kyper/icon/Document' @@ -107,7 +106,7 @@ export const ManualAccountMenu = React.forwardRef((props, ref) => { onClick={() => fadeOut(ref.current, 'up', 300).then(props.handleAccountTypeSelect(account_type)) } - rightChildren={} + rightChildren={} title={AccountTypeNames[account_type]()} /> ))} diff --git a/src/views/microdeposits/AccountInfo.js b/src/views/microdeposits/AccountInfo.js index 9879d44cd5..76c9e960b8 100644 --- a/src/views/microdeposits/AccountInfo.js +++ b/src/views/microdeposits/AccountInfo.js @@ -2,9 +2,7 @@ import React, { useState, useRef } from 'react' import PropTypes from 'prop-types' import _isEmpty from 'lodash/isEmpty' -import { useTokens } from '@kyper/tokenprovider' -import { Text } from '@mxenabled/mxui' -import { ChevronRight } from '@kyper/icon/ChevronRight' +import { Icon, Text } from '@mxenabled/mxui' import { TextField, SelectionBox } from 'src/privacy/input' import { Button, RadioGroup, FormControl, FormLabel, Stack } from '@mui/material' @@ -59,7 +57,6 @@ export const AccountInfo = (props) => { schema, initialForm, ) - const tokens = useTokens() const getNextDelay = getDelay() function handleContinue() { @@ -175,7 +172,7 @@ export const AccountInfo = (props) => { } + icon={} onClick={() => setShowFindDetails(true)} text={__('Help finding your account number')} /> diff --git a/src/views/microdeposits/RoutingNumber.js b/src/views/microdeposits/RoutingNumber.js index 30ae9909a0..fc4de0c039 100644 --- a/src/views/microdeposits/RoutingNumber.js +++ b/src/views/microdeposits/RoutingNumber.js @@ -5,8 +5,7 @@ import { defer } from 'rxjs' import _isEmpty from 'lodash/isEmpty' import { useTokens } from '@kyper/tokenprovider' -import { Text } from '@mxenabled/mxui' -import { ChevronRight } from '@kyper/icon/ChevronRight' +import { Icon, Text } from '@mxenabled/mxui' import { TextField } from 'src/privacy/input' import { Button } from '@mui/material' @@ -224,7 +223,7 @@ export const RoutingNumber = (props) => { } + icon={} onClick={() => setShowFindDetails(true)} text={__('Help finding your routing number')} />