diff --git a/example/src/Examples/IconButtonExample.tsx b/example/src/Examples/IconButtonExample.tsx index 2f558db65d..06665991c8 100644 --- a/example/src/Examples/IconButtonExample.tsx +++ b/example/src/Examples/IconButtonExample.tsx @@ -7,7 +7,7 @@ import ScreenWrapper from '../ScreenWrapper'; const ButtonExample = () => { return ( - + {}} /> @@ -175,7 +175,7 @@ const ButtonExample = () => { ButtonExample.title = 'Icon Button'; const styles = StyleSheet.create({ - v3Container: { + container: { flexDirection: 'column', }, row: { diff --git a/example/src/Examples/MenuExample.tsx b/example/src/Examples/MenuExample.tsx index 027cc5b84d..47734112e4 100644 --- a/example/src/Examples/MenuExample.tsx +++ b/example/src/Examples/MenuExample.tsx @@ -69,7 +69,7 @@ const MenuExample = ({ navigation }: Props) => { > {}} title="Undo" /> {}} title="Redo" /> - + {}} title="Cut" disabled /> {}} title="Copy" disabled /> {}} title="Paste" /> @@ -93,7 +93,7 @@ const MenuExample = ({ navigation }: Props) => { {}} title="Undo" /> {}} title="Redo" /> - + { > {}} title="Item 1" /> {}} title="Item 2" /> - + {}} title="Item 3" disabled /> @@ -190,7 +190,7 @@ const styles = StyleSheet.create({ alignCenter: { alignItems: 'center', }, - md3Divider: { + divider: { marginVertical: 8, }, bottomMenu: { width: '40%' }, diff --git a/src/components/Appbar/Appbar.tsx b/src/components/Appbar/Appbar.tsx index a699b1b931..dbd431ebb5 100644 --- a/src/components/Appbar/Appbar.tsx +++ b/src/components/Appbar/Appbar.tsx @@ -217,7 +217,7 @@ const Appbar = ({ shouldAddRightSpacing = shouldCenterContent && rightItemsCount === 0; } - const spacingStyle = styles.v3Spacing; + const spacingStyle = styles.spacing; const insets = { paddingBottom: safeAreaInsets?.bottom, @@ -321,7 +321,7 @@ const styles = StyleSheet.create({ alignItems: 'center', paddingHorizontal: 4, }, - v3Spacing: { + spacing: { width: 52, }, controlsRow: { diff --git a/src/components/Appbar/AppbarContent.tsx b/src/components/Appbar/AppbarContent.tsx index cff1efacde..39318c26a2 100644 --- a/src/components/Appbar/AppbarContent.tsx +++ b/src/components/Appbar/AppbarContent.tsx @@ -119,10 +119,10 @@ const AppbarContent = ({ const titleTextColor = titleColor ? titleColor : onSurface; const modeContainerStyles = { - small: styles.v3DefaultContainer, - medium: styles.v3MediumContainer, - large: styles.v3LargeContainer, - 'center-aligned': styles.v3DefaultContainer, + small: styles.defaultContainer, + medium: styles.mediumContainer, + large: styles.largeContainer, + 'center-aligned': styles.defaultContainer, }; const variant = modeTextVariant[mode] as TypescaleKey; @@ -197,15 +197,15 @@ const styles = StyleSheet.create({ flex: 1, paddingHorizontal: 12, }, - v3DefaultContainer: { + defaultContainer: { paddingHorizontal: 0, }, - v3MediumContainer: { + mediumContainer: { paddingHorizontal: 0, justifyContent: 'flex-end', paddingBottom: 24, }, - v3LargeContainer: { + largeContainer: { paddingHorizontal: 0, paddingTop: 36, justifyContent: 'flex-end', diff --git a/src/components/Appbar/utils.ts b/src/components/Appbar/utils.ts index 0fb63bdc0a..dffa290fea 100644 --- a/src/components/Appbar/utils.ts +++ b/src/components/Appbar/utils.ts @@ -161,7 +161,7 @@ export const renderAppbarContent = ({ if (child.type.displayName === 'Appbar.Content') { props.mode = mode; props.style = [ - i === 0 && !shouldCenterContent && styles.v3Spacing, + i === 0 && !shouldCenterContent && styles.spacing, shouldCenterContent && styles.centerAlignedContent, child.props.style, ]; @@ -175,10 +175,7 @@ const styles = StyleSheet.create({ centerAlignedContent: { alignItems: 'center', }, - v2Spacing: { - marginLeft: 8, - }, - v3Spacing: { + spacing: { marginLeft: 12, }, }); diff --git a/src/components/BottomNavigation/BottomNavigationBar.tsx b/src/components/BottomNavigation/BottomNavigationBar.tsx index 909b9cca84..6c9fbb1b5d 100644 --- a/src/components/BottomNavigation/BottomNavigationBar.tsx +++ b/src/components/BottomNavigation/BottomNavigationBar.tsx @@ -568,12 +568,15 @@ const BottomNavigationBar = ({ outputRange: [1, 0], }); - const v3ActiveOpacity = focused ? 1 : 0; - const v3InactiveOpacity = shifting - ? inactiveOpacity - : focused - ? 0 - : 1; + const getActiveOpacity = () => { + if (shiftingAndLabeled) return activeOpacity; + return focused ? 1 : 0; + }; + + const getInactiveOpacity = () => { + if (shiftingAndLabeled) return inactiveOpacity; + return focused ? 0 : 1; + }; // Scale horizontally the outline pill const outlineScale = focused @@ -607,7 +610,7 @@ const BottomNavigationBar = ({ : 0, }; - const isLegacyOrV3Shifting = shifting && labeled; + const shiftingAndLabeled = shifting && labeled; return renderTouchable({ key: route.key, @@ -627,14 +630,14 @@ const BottomNavigationBar = ({ pointerEvents="none" style={ labeled - ? styles.v3TouchableContainer - : styles.v3NoLabelContainer + ? styles.touchableContainer + : styles.noLabelContainer } > ({ style={[ styles.iconWrapper, { - opacity: isLegacyOrV3Shifting - ? activeOpacity - : v3ActiveOpacity, + opacity: getActiveOpacity(), }, ]} > @@ -683,9 +684,7 @@ const BottomNavigationBar = ({ style={[ styles.iconWrapper, { - opacity: isLegacyOrV3Shifting - ? inactiveOpacity - : v3InactiveOpacity, + opacity: getInactiveOpacity(), }, ]} > @@ -723,9 +722,7 @@ const BottomNavigationBar = ({ style={[ styles.labelWrapper, { - opacity: isLegacyOrV3Shifting - ? activeOpacity - : v3ActiveOpacity, + opacity: getActiveOpacity(), }, ]} > @@ -756,9 +753,7 @@ const BottomNavigationBar = ({ style={[ styles.labelWrapper, { - opacity: isLegacyOrV3Shifting - ? inactiveOpacity - : v3InactiveOpacity, + opacity: getInactiveOpacity(), }, ]} > @@ -862,11 +857,11 @@ const styles = StyleSheet.create({ position: 'absolute', left: 0, }, - v3TouchableContainer: { + touchableContainer: { paddingTop: 12, paddingBottom: 16, }, - v3NoLabelContainer: { + noLabelContainer: { height: 80, justifyContent: 'center', alignItems: 'center', diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index 52eb2e9c99..4ce07f138b 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -322,16 +322,15 @@ const Button = ( const iconStyle = StyleSheet.flatten(contentStyle)?.flexDirection === 'row-reverse' ? [ - styles.iconReverse, - styles[`md3IconReverse${compact ? 'Compact' : ''}`], + styles.iconReverseBase, + styles[`iconReverse${compact ? 'Compact' : ''}`], isMode('text') && - styles[`md3IconReverseTextMode${compact ? 'Compact' : ''}`], + styles[`iconReverseTextMode${compact ? 'Compact' : ''}`], ] : [ - styles.icon, - styles[`md3Icon${compact ? 'Compact' : ''}`], - isMode('text') && - styles[`md3IconTextMode${compact ? 'Compact' : ''}`], + styles.iconBase, + styles[`icon${compact ? 'Compact' : ''}`], + isMode('text') && styles[`iconTextMode${compact ? 'Compact' : ''}`], ]; return ( @@ -401,12 +400,12 @@ const Button = ( numberOfLines={1} testID={`${testID}-text`} style={[ - styles.label, + styles.labelBase, isMode('text') ? icon || loading - ? styles.md3LabelTextAddons - : styles.md3LabelText - : styles.md3Label, + ? styles.labelTextAddons + : styles.labelText + : styles.label, compact && styles.compactLabel, uppercase && styles.uppercaseLabel, textStyle, @@ -435,49 +434,49 @@ const styles = StyleSheet.create({ alignItems: 'center', justifyContent: 'center', }, - icon: { + iconBase: { marginLeft: 12, marginRight: -4, }, - iconReverse: { + iconReverseBase: { marginRight: 12, marginLeft: -4, }, /* eslint-disable react-native/no-unused-styles */ - md3Icon: { + icon: { marginLeft: 16, marginRight: -16, }, - md3IconCompact: { + iconCompact: { marginLeft: 8, marginRight: 0, }, - md3IconReverse: { + iconReverse: { marginLeft: -16, marginRight: 16, }, - md3IconReverseCompact: { + iconReverseCompact: { marginLeft: 0, marginRight: 8, }, - md3IconTextMode: { + iconTextMode: { marginLeft: 12, marginRight: -8, }, - md3IconTextModeCompact: { + iconTextModeCompact: { marginLeft: 6, marginRight: 0, }, - md3IconReverseTextMode: { + iconReverseTextMode: { marginLeft: -8, marginRight: 12, }, - md3IconReverseTextModeCompact: { + iconReverseTextModeCompact: { marginLeft: 0, marginRight: 6, }, /* eslint-enable react-native/no-unused-styles */ - label: { + labelBase: { textAlign: 'center', marginVertical: 9, marginHorizontal: 16, @@ -488,14 +487,14 @@ const styles = StyleSheet.create({ uppercaseLabel: { textTransform: 'uppercase', }, - md3Label: { + label: { marginVertical: 10, marginHorizontal: 24, }, - md3LabelText: { + labelText: { marginHorizontal: 12, }, - md3LabelTextAddons: { + labelTextAddons: { marginHorizontal: 16, }, }); diff --git a/src/components/Chip/Chip.tsx b/src/components/Chip/Chip.tsx index b87bfa2cf3..356168d26c 100644 --- a/src/components/Chip/Chip.tsx +++ b/src/components/Chip/Chip.tsx @@ -352,7 +352,7 @@ const Chip = ({ ? [ styles.avatar, styles.avatarSelected, - selected && styles.md3SelectedIcon, + selected && styles.selectedIcon, ] : null, ]} @@ -380,12 +380,7 @@ const Chip = ({ variant="labelLarge" selectable={false} numberOfLines={1} - style={[ - styles.md3LabelText, - labelTextStyle, - labelSpacings, - textStyle, - ]} + style={[styles.labelText, labelTextStyle, labelSpacings, textStyle]} ellipsizeMode={ellipsizeMode} maxFontSizeMultiplier={maxFontSizeMultiplier} > @@ -442,7 +437,7 @@ const styles = StyleSheet.create({ marginRight: 8, padding: 0, }, - md3LabelText: { + labelText: { textAlignVertical: 'center', marginVertical: 6, }, @@ -455,7 +450,7 @@ const styles = StyleSheet.create({ marginLeft: 4, marginRight: 0, }, - md3SelectedIcon: { + selectedIcon: { paddingLeft: 4, }, // eslint-disable-next-line react-native/no-color-literals diff --git a/src/components/Dialog/DialogActions.tsx b/src/components/Dialog/DialogActions.tsx index 99ddc18784..d50a2e050b 100644 --- a/src/components/Dialog/DialogActions.tsx +++ b/src/components/Dialog/DialogActions.tsx @@ -49,7 +49,7 @@ const DialogActions = (props: Props) => { const actionsLength = React.Children.toArray(props.children).length; return ( - + {React.Children.map(props.children, (child, i) => React.isValidElement(child) ? React.cloneElement(child, { @@ -71,7 +71,7 @@ const DialogActions = (props: Props) => { DialogActions.displayName = 'Dialog.Actions'; const styles = StyleSheet.create({ - v3Container: { + conainer: { flexDirection: 'row', flexGrow: 1, alignItems: 'center', diff --git a/src/components/Divider.tsx b/src/components/Divider.tsx index ef9c480e5e..ebd3b42b6d 100644 --- a/src/components/Divider.tsx +++ b/src/components/Divider.tsx @@ -68,7 +68,7 @@ const Divider = ({ height: StyleSheet.hairlineWidth, backgroundColor: outlineVariant, }, - leftInset && styles.v3LeftInset, + leftInset && styles.leftInset, horizontalInset && styles.horizontalInset, bold && styles.bold, style, @@ -78,7 +78,7 @@ const Divider = ({ }; const styles = StyleSheet.create({ - v3LeftInset: { + leftInset: { marginLeft: 16, }, horizontalInset: { diff --git a/src/components/FAB/AnimatedFAB.tsx b/src/components/FAB/AnimatedFAB.tsx index 2247b01973..8584621c3b 100644 --- a/src/components/FAB/AnimatedFAB.tsx +++ b/src/components/FAB/AnimatedFAB.tsx @@ -370,12 +370,11 @@ const AnimatedFAB = ({ ...labelLarge, }; - const md3Elevation = disabled || !isIOS ? 0 : 3; + const elevation = disabled || !isIOS ? 0 : 3; - const shadowStyle = styles.v3Shadow; const baseStyle = [ StyleSheet.absoluteFill, - disabled ? styles.disabled : shadowStyle, + disabled ? styles.disabled : styles.shadow, ]; const newAccessibilityState = { ...accessibilityState, disabled }; @@ -397,7 +396,7 @@ const AnimatedFAB = ({ styles.container, restStyle, ]} - elevation={md3Elevation} + elevation={elevation} theme={theme} > @@ -579,7 +578,7 @@ const styles = StyleSheet.create({ shadowWrapper: { elevation: 0, }, - v3Shadow: { + shadow: { elevation: 3, }, iconWrapper: { diff --git a/src/components/FAB/FAB.tsx b/src/components/FAB/FAB.tsx index cc3d40754b..94709a7092 100644 --- a/src/components/FAB/FAB.tsx +++ b/src/components/FAB/FAB.tsx @@ -264,7 +264,7 @@ const FAB = forwardRef( ...labelLarge, }; - const md3Elevation = isFlatMode || disabled ? 0 : 3; + const elevation = isFlatMode || disabled ? 0 : 3; const newAccessibilityState = { ...accessibilityState, disabled }; @@ -287,7 +287,7 @@ const FAB = forwardRef( ]} pointerEvents={visible ? 'auto' : 'none'} testID={`${testID}-container`} - elevation={md3Elevation} + elevation={elevation} > { if (customSize) return getExtendedFabDimensions(customSize); - return v3Extended; + return extended; }; let cachedContext: CanvasRenderingContext2D | null = null; diff --git a/src/components/List/ListAccordion.tsx b/src/components/List/ListAccordion.tsx index 3bbbc220af..0c48f8c8ff 100644 --- a/src/components/List/ListAccordion.tsx +++ b/src/components/List/ListAccordion.tsx @@ -254,7 +254,7 @@ const ListAccordion = ({ {left @@ -278,7 +278,7 @@ const ListAccordion = ({ style: getLeftStyles(alignToTop, description), }) : null} - + + ); }; const styles = StyleSheet.create({ - itemV3: { + item: { alignItems: 'center', justifyContent: 'center', }, diff --git a/src/components/List/ListImage.tsx b/src/components/List/ListImage.tsx index 312bb53892..b44b3dced5 100644 --- a/src/components/List/ListImage.tsx +++ b/src/components/List/ListImage.tsx @@ -40,7 +40,7 @@ export type Props = { const ListImage = ({ style, source, variant = 'image' }: Props) => { const getStyles = () => { if (variant === 'video') { - return [style, styles.videoV3]; + return [style, styles.video]; } return [style, styles.image]; @@ -61,7 +61,7 @@ const styles = StyleSheet.create({ width: 56, height: 56, }, - videoV3: { + video: { width: 114, height: 64, marginLeft: 0, diff --git a/src/components/List/ListItem.tsx b/src/components/List/ListItem.tsx index fcb17a7b51..3122d41fd2 100644 --- a/src/components/List/ListItem.tsx +++ b/src/components/List/ListItem.tsx @@ -228,12 +228,12 @@ const ListItem = ( - + {left ? left({ color: onSurfaceVariant, @@ -241,7 +241,7 @@ const ListItem = ( }) : null} {renderTitle()} @@ -265,11 +265,11 @@ ListItem.displayName = 'List.Item'; const Component = forwardRef(ListItem); const styles = StyleSheet.create({ - containerV3: { + container: { paddingVertical: 8, paddingRight: 24, }, - rowV3: { + row: { width: '100%', flexDirection: 'row', marginVertical: 6, @@ -280,7 +280,7 @@ const styles = StyleSheet.create({ description: { fontSize: 14, }, - itemV3: { + item: { paddingLeft: 16, }, content: { diff --git a/src/components/List/utils.ts b/src/components/List/utils.ts index cbefa73909..e787713e06 100644 --- a/src/components/List/utils.ts +++ b/src/components/List/utils.ts @@ -36,7 +36,7 @@ export const getLeftStyles = ( alignToTop: boolean, description: Description ): Style => { - const stylesV3 = { + const additionalStyles = { marginRight: 0, marginLeft: 16, alignSelf: (alignToTop ? 'flex-start' : 'center') as FlexAlignType, @@ -46,13 +46,13 @@ export const getLeftStyles = ( return { ...styles.iconMarginLeft, ...styles.marginVerticalNone, - ...stylesV3, + ...additionalStyles, }; } return { ...styles.iconMarginLeft, - ...stylesV3, + ...additionalStyles, }; }; @@ -60,7 +60,7 @@ export const getRightStyles = ( alignToTop: boolean, description: Description ): Style => { - const stylesV3 = { + const additionalStyles = { marginLeft: 16, alignSelf: (alignToTop ? 'flex-start' : 'center') as FlexAlignType, }; @@ -69,13 +69,13 @@ export const getRightStyles = ( return { ...styles.iconMarginRight, ...styles.marginVerticalNone, - ...stylesV3, + ...additionalStyles, }; } return { ...styles.iconMarginRight, - ...stylesV3, + ...additionalStyles, }; }; diff --git a/src/components/Menu/MenuItem.tsx b/src/components/Menu/MenuItem.tsx index e67b0dea96..f172fb4bb6 100644 --- a/src/components/Menu/MenuItem.tsx +++ b/src/components/Menu/MenuItem.tsx @@ -182,7 +182,7 @@ const MenuItem = ({ style={[ styles.container, { paddingHorizontal: containerPadding }, - dense && styles.md3DenseContainer, + dense && styles.denseContainer, style, ]} onPress={onPress} @@ -205,7 +205,7 @@ const MenuItem = ({ style={[ styles.content, { minWidth, maxWidth }, - leadingIcon ? styles.md3LeadingIcon : styles.md3WithoutLeadingIcon, + leadingIcon ? styles.leadingIcon : styles.withoutLeadingIcons, contentStyle, ]} pointerEvents="none" @@ -240,7 +240,7 @@ const styles = StyleSheet.create({ height: 48, justifyContent: 'center', }, - md3DenseContainer: { + denseContainer: { height: 32, }, row: { @@ -249,10 +249,10 @@ const styles = StyleSheet.create({ content: { justifyContent: 'center', }, - md3LeadingIcon: { + leadingIcon: { marginLeft: 12, }, - md3WithoutLeadingIcon: { + withoutLeadingIcons: { marginLeft: 4, }, }); diff --git a/src/components/Searchbar.tsx b/src/components/Searchbar.tsx index 275212472a..a35f3ca931 100644 --- a/src/components/Searchbar.tsx +++ b/src/components/Searchbar.tsx @@ -323,7 +323,7 @@ const Searchbar = forwardRef( {loading ? ( ) : ( // Clear icon should be always rendered within Searchbar – it's transparent, @@ -334,8 +334,8 @@ const Searchbar = forwardRef( pointerEvents={value ? 'auto' : 'none'} testID={`${testID}-icon-wrapper`} style={[ - !value && styles.v3ClearIcon, - right !== undefined && styles.v3ClearIconHidden, + !value && styles.clearIcon, + right !== undefined && styles.clearIconHidden, ]} > { ], }); - const v3Spacing = { + const spacing = { marginLeft: 12, }; expect(renderResult()[0].props.style).toEqual( - expect.arrayContaining([expect.objectContaining(v3Spacing)]) + expect.arrayContaining([expect.objectContaining(spacing)]) ); }); @@ -301,13 +301,13 @@ describe('getAppbarColors', () => { ); }); - it('should return v3 light color if theme version is 3', () => { + it('should return default light color', () => { expect(getAppbarBackgroundColor(getTheme())).toBe( tokens.md.ref.palette.neutral99 ); }); - it('should return v3 dark color if theme version is 3', () => { + it('should return default dark color', () => { expect(getAppbarBackgroundColor(getTheme(true))).toBe( tokens.md.ref.palette.neutral10 ); diff --git a/src/components/__tests__/Dialog.test.tsx b/src/components/__tests__/Dialog.test.tsx index 0d3686755a..f91c062daf 100644 --- a/src/components/__tests__/Dialog.test.tsx +++ b/src/components/__tests__/Dialog.test.tsx @@ -95,7 +95,7 @@ describe('Dialog', () => { expect(onDismiss).toHaveBeenCalledTimes(1); }); - it('should apply top margin to the first child if the dialog is V3', () => { + it('should apply top margin to the first child', () => { const { getByTestId } = render( diff --git a/src/components/__tests__/ListUtils.test.tsx b/src/components/__tests__/ListUtils.test.tsx index 2640eaa037..266d72ed87 100644 --- a/src/components/__tests__/ListUtils.test.tsx +++ b/src/components/__tests__/ListUtils.test.tsx @@ -6,18 +6,11 @@ import Text from '../Typography/Text'; const styles = StyleSheet.create({ leftItem: { - marginLeft: 0, - marginRight: 16, - }, - leftItemV3: { marginLeft: 16, marginRight: 0, alignSelf: 'center', }, rightItem: { - marginRight: 0, - }, - rightItemV3: { marginLeft: 16, marginRight: 0, alignSelf: 'center', @@ -30,15 +23,15 @@ const description = Test; * ********************** getLeftStyles ********************** * */ -it('returns styles for left item without description for V3', () => { +it('returns styles for left item without description', () => { const style = getLeftStyles(false, null); - expect(style).toStrictEqual({ ...styles.leftItemV3, marginVertical: 0 }); + expect(style).toStrictEqual({ ...styles.leftItem, marginVertical: 0 }); }); -it('returns styles for left item w/ desctiption for V3', () => { +it('returns styles for left item w/ desctiption', () => { const style = getLeftStyles(true, description); expect(style).toStrictEqual({ - ...styles.leftItemV3, + ...styles.leftItem, alignSelf: 'flex-start', }); }); @@ -47,15 +40,15 @@ it('returns styles for left item w/ desctiption for V3', () => { * ********************** getRightStyles ********************** * */ -it('returns styles for right item without description for V3', () => { +it('returns styles for right item without description', () => { const style = getRightStyles(false, null); - expect(style).toStrictEqual({ ...styles.rightItemV3, marginVertical: 0 }); + expect(style).toStrictEqual({ ...styles.rightItem, marginVertical: 0 }); }); -it('returns styles for right item w/ desctiption for V3', () => { +it('returns styles for right item w/ desctiption', () => { const style = getRightStyles(true, description); expect(style).toStrictEqual({ - ...styles.rightItemV3, + ...styles.rightItem, alignSelf: 'flex-start', }); }); diff --git a/src/components/__tests__/Searchbar.test.tsx b/src/components/__tests__/Searchbar.test.tsx index 59ade128e4..69b572cbce 100644 --- a/src/components/__tests__/Searchbar.test.tsx +++ b/src/components/__tests__/Searchbar.test.tsx @@ -117,7 +117,7 @@ it('defines onClearIconPress action and checks if it is called when close button expect(onClearIconPressMock).toHaveBeenCalledTimes(1); }); -it('renders clear icon wrapper, with appropriate style for v3', () => { +it('renders clear icon wrapper, with appropriate style', () => { const { getByTestId, update } = render( ); diff --git a/src/components/__tests__/SegmentedButton.test.tsx b/src/components/__tests__/SegmentedButton.test.tsx index cf4fc10580..be25fca452 100644 --- a/src/components/__tests__/SegmentedButton.test.tsx +++ b/src/components/__tests__/SegmentedButton.test.tsx @@ -65,7 +65,7 @@ describe('getSegmentedButtonColors', () => { ${getTheme()} | ${false} | ${false} | ${'a125f5'} | ${undefined} | ${getTheme().colors.onSurface} ${getTheme()} | ${false} | ${true} | ${undefined} | ${'000'} | ${getTheme().colors.onSecondaryContainer} `( - 'returns $expected when disabled: $disabled, checked: $checked, checkedColor is $checkedColor and uncheckedColor is $uncheckedColor and isV3: $theme.isV3', + 'returns $expected when disabled: $disabled, checked: $checked, checkedColor is $checkedColor and uncheckedColor is $uncheckedColor', ({ theme, disabled, checked, checkedColor, uncheckedColor, expected }) => { expect( getSegmentedButtonColors({ @@ -79,7 +79,7 @@ describe('getSegmentedButtonColors', () => { } ); - it('should return correct background color when checked and theme version 3', () => { + it('should return correct background color when checked', () => { expect( getSegmentedButtonColors({ theme: getTheme(), @@ -101,7 +101,7 @@ describe('getSegmentedButtonColors', () => { }); }); - it('should return correct border color with theme version 3', () => { + it('should return correct border color', () => { expect( getSegmentedButtonColors({ theme: getTheme(), @@ -113,7 +113,7 @@ describe('getSegmentedButtonColors', () => { }); }); - it('should return correct border color when disabled and theme version 3', () => { + it('should return correct border color when disabled', () => { expect( getSegmentedButtonColors({ theme: getTheme(), @@ -125,7 +125,7 @@ describe('getSegmentedButtonColors', () => { }); }); - it('should return correct textColor with theme version 3', () => { + it('should return correct textColor', () => { expect( getSegmentedButtonColors({ theme: getTheme(), @@ -137,7 +137,7 @@ describe('getSegmentedButtonColors', () => { }); }); - it('should return correct textColor when disabled and theme version 3', () => { + it('should return correct textColor when disabled', () => { expect( getSegmentedButtonColors({ theme: getTheme(), diff --git a/src/components/__tests__/__snapshots__/BottomNavigation.test.tsx.snap b/src/components/__tests__/__snapshots__/BottomNavigation.test.tsx.snap index aa734f554c..92038c1f8c 100644 --- a/src/components/__tests__/__snapshots__/BottomNavigation.test.tsx.snap +++ b/src/components/__tests__/__snapshots__/BottomNavigation.test.tsx.snap @@ -1774,15 +1774,19 @@ exports[`hides labels in shifting bottom navigation 1`] = ` { letterSpacing: 0, }, }) - ).toEqual(customFontV3); + ).toEqual(customFont); }); it('overrides properties passed in config for several variants', () => {