diff --git a/package-lock.json b/package-lock.json index 4430422aba..8a9fa5cf67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "@kyper/utilityrow": "^2.1.0", "@mui/icons-material": "^6.1.5", "@mui/material": "^6.1.5", - "@mxenabled/mxui": "^1.5.2", + "@mxenabled/mxui": "^1.5.4", "@reduxjs/toolkit": "^2.2.7", "@types/node": "^22.1.0", "axios": "^1.8.4", @@ -2224,6 +2224,11 @@ } } }, + "node_modules/@mui/utils/node_modules/react-is": { + "version": "19.1.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.1.1.tgz", + "integrity": "sha512-tr41fA15Vn8p4X9ntI+yCyeGSf1TlYaY5vlTZfQmeLBrFo3psOPX6HhTDnFNL9uj3EhP0KAQ80cugCl4b4BERA==" + }, "node_modules/@mui/types": { "version": "7.2.24", "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.24.tgz", diff --git a/package.json b/package.json index 717a2b8b58..d484fc6fb3 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@kyper/utilityrow": "^2.1.0", "@mui/icons-material": "^6.1.5", "@mui/material": "^6.1.5", - "@mxenabled/mxui": "^1.5.2", + "@mxenabled/mxui": "^1.5.4", "@reduxjs/toolkit": "^2.2.7", "@types/node": "^22.1.0", "axios": "^1.8.4", diff --git a/src/ConnectedTokenProvider.tsx b/src/ConnectedTokenProvider.tsx index 7661a7c6d2..880311542a 100644 --- a/src/ConnectedTokenProvider.tsx +++ b/src/ConnectedTokenProvider.tsx @@ -55,6 +55,11 @@ const connectThemeOverrides = (palette: Theme['palette']) => ({ // Sets the default color of text. Can override singluar usage with color prop. color: palette?.text?.primary, }, + // TODO: Remove once we fully migrate to @mxenabled/mxui as it would apply the right theme styles automatically. + subtitle2: { + fontSize: '13px', + lineHeight: '20px', + }, }, }, MuiAccordion: { @@ -106,6 +111,12 @@ const connectThemeOverrides = (palette: Theme['palette']) => ({ }, MuiFormLabel: { styleOverrides: { + root: { + '&.MuiFormLabel-root': { + fontSize: '13px', + lineHeight: '20px', + }, + }, asterisk: { color: '#E32727', '&$error': { @@ -121,6 +132,16 @@ const connectThemeOverrides = (palette: Theme['palette']) => ({ }, }, }, + MuiFormControlLabel: { + styleOverrides: { + root: { + '&.MuiFormControlLabel-labelPlacementStart': { + marginLeft: 0, + marginRight: 0, + }, + }, + }, + }, MuiChip: { styleOverrides: { label: { diff --git a/src/privacy/input.ts b/src/privacy/input.ts index bc0f1764d1..19981b24bf 100644 --- a/src/privacy/input.ts +++ b/src/privacy/input.ts @@ -3,7 +3,7 @@ import { Radio, PASSWORD_VALIDATIONS } from '@kyper/input' import { Select } from '@kyper/select' -import { SelectionBox } from '@kyper/selectionbox' +import { SelectionBox } from '@mxenabled/mxui' import { UserFeedback } from '@kyper/userfeedback' import { withProtection } from 'src/privacy/withProtection' import { TextField } from '@kyper/mui' diff --git a/src/privacy/withProtection.tsx b/src/privacy/withProtection.tsx index 73f984ccff..3531ea78ef 100644 --- a/src/privacy/withProtection.tsx +++ b/src/privacy/withProtection.tsx @@ -29,31 +29,26 @@ export function withProtection(SensitiveComponent: React.ElementType) { function ProtectedComponent({ forwardedRef, - className, allowCapture = false, ...otherProps }: { forwardedRef: Element - className: string allowCapture: boolean }) { const PROTECTION_CLASS = 'ph-no-capture' const captureProps: keyable = {} - let newClassName = className ? `${className} ${PROTECTION_CLASS}` : PROTECTION_CLASS if (allowCapture) { - // Just apply whatever class was given, removing default protection. - newClassName = className captureProps[UNMASK_ATTRIBUTE] = allowCapture + // When allowCapture is true, render component directly without protection wrapper + return } return ( - + // Wrap the sensitive component in a div with the protection class from Posthog to prevent capturing +
+ +
) } diff --git a/src/views/manualAccount/ManualAccountForm.tsx b/src/views/manualAccount/ManualAccountForm.tsx index c7fb975890..ca91b56168 100644 --- a/src/views/manualAccount/ManualAccountForm.tsx +++ b/src/views/manualAccount/ManualAccountForm.tsx @@ -251,24 +251,26 @@ export const ManualAccountForm = React.forwardRef - setIsPersonal(true)} - style={styles.selectBox} - value={'personal'} - /> - setIsPersonal(false)} - style={styles.selectBox} - value={'business'} - /> +
+ setIsPersonal(true)} + selected={isPersonal} + value={'personal'} + /> +
+
+ setIsPersonal(false)} + selected={!isPersonal} + value={'business'} + /> +
) } else if (field.type === 'DateInput') { diff --git a/src/views/mfa/MFAOptions.js b/src/views/mfa/MFAOptions.js index c7453789bf..e3d20cf01a 100644 --- a/src/views/mfa/MFAOptions.js +++ b/src/views/mfa/MFAOptions.js @@ -76,20 +76,10 @@ export const MFAOptions = (props) => { > - {option.label} - - } + message={option.label} name="options-selection-box" onChange={() => { setSelectedOption({ guid: option.guid }) @@ -107,9 +97,9 @@ export const MFAOptions = (props) => { member_guid: sha256(currentMember.guid), }) }} - style={styles.card} + selected={isSelected} value={option.label} - variant="radio" + variant="outlined" /> ) @@ -158,11 +148,6 @@ const getStyles = (tokens) => { textAlign: 'left', wordBreak: 'break-word', }, - card: { - fontWeight: tokens.FontWeight.Bold, - padding: tokens.Spacing.SelectionBoxPadding, - marginBottom: tokens.Spacing.Small, - }, selected: { color: tokens.Color.Brand400, backgroundColor: tokens.BackgroundColor.SelectionBoxLinkHover, diff --git a/src/views/microdeposits/AccountInfo.js b/src/views/microdeposits/AccountInfo.js index e1e0c31f78..5e0d3dd1be 100644 --- a/src/views/microdeposits/AccountInfo.js +++ b/src/views/microdeposits/AccountInfo.js @@ -6,7 +6,7 @@ import { useTokens } from '@kyper/tokenprovider' import { Text } from '@kyper/mui' import { ChevronRight } from '@kyper/icon/ChevronRight' import { TextField, SelectionBox } from 'src/privacy/input' -import { Button } from '@mui/material' +import { Button, RadioGroup, FormControl, FormLabel } from '@mui/material' import useAnalyticsPath from 'src/hooks/useAnalyticsPath' @@ -88,39 +88,46 @@ export const AccountInfo = (props) => {
e.preventDefault()}> -
- {__('Account type')} - -
+ + {__('Account type')} + .ph-no-capture': { + width: '48%', + }, + }} + > setAccountType(ReadableAccountTypes.CHECKING)} - style={styles.selectBox} + selected={accountType === ReadableAccountTypes.CHECKING} value={AccountTypeLabels[ReadableAccountTypes.CHECKING]} /> - setAccountType(ReadableAccountTypes.SAVINGS)} - style={styles.selectBox} + selected={accountType === ReadableAccountTypes.SAVINGS} value={AccountTypeLabels[ReadableAccountTypes.SAVINGS]} /> -
-
+ +