Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated "branded" alias tokens from v1 components #3184

Merged
merged 6 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove deprecated alias tokens from v1 components",
"packageName": "@fluentui-react-native/button",
"email": "email not defined",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove deprecated alias tokens from v1 components",
"packageName": "@fluentui-react-native/menu",
"email": "email not defined",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove deprecated alias tokens from v1 components",
"packageName": "@fluentui-react-native/theme-types",
"email": "email not defined",
"dependentChangeType": "patch"
}
40 changes: 20 additions & 20 deletions packages/components/Button/src/ButtonColorTokens.macos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,33 @@ export const defaultButtonColorTokens: TokenSettings<ButtonTokens, Theme> = (t:
icon: t.colors.defaultFocusedIcon,
},
primary: {
backgroundColor: t.colors.brandedBackground,
color: t.colors.primaryButtonText,
borderColor: t.colors.brandedBorder,
iconColor: t.colors.brandedIcon,
backgroundColor: t.colors.brandBackground,
color: t.colors.neutralForegroundOnBrand,
borderColor: t.colors.brandStroke1,
iconColor: t.colors.neutralForegroundOnBrand,
disabled: {
backgroundColor: t.colors.primaryButtonBackgroundDisabled,
color: t.colors.brandedDisabledContent,
borderColor: t.colors.defaultDisabledBorder,
iconColor: t.colors.brandedDisabledIcon,
backgroundColor: t.colors.neutralBackgroundDisabled,
color: t.colors.neutralForegroundDisabled,
borderColor: t.colors.neutralStrokeDisabled,
iconColor: t.colors.neutralForegroundDisabled,
},
hovered: {
backgroundColor: t.colors.brandedBackground,
color: t.colors.brandedHoveredContent,
borderColor: t.colors.brandedHoveredBorder,
iconColor: t.colors.brandedHoveredIcon,
backgroundColor: t.colors.brandBackgroundHover,
color: t.colors.neutralForegroundOnBrandHover,
borderColor: t.colors.brandBackgroundHover,
iconColor: t.colors.neutralForegroundOnBrandHover,
},
pressed: {
backgroundColor: t.colors.primaryButtonBackgroundPressed,
color: t.colors.brandedPressedContent,
borderColor: t.colors.brandedPressedBorder,
iconColor: t.colors.brandedPressedIcon,
backgroundColor: t.colors.brandBackgroundPressed,
color: t.colors.neutralForegroundOnBrandPressed,
borderColor: t.colors.brandBackgroundPressed,
iconColor: t.colors.neutralForegroundOnBrandPressed,
},
focused: {
backgroundColor: t.colors.brandedFocusedBackground,
color: t.colors.brandedFocusedContent,
borderColor: t.colors.brandedFocusedBorder,
iconColor: t.colors.brandedFocusedIcon,
backgroundColor: t.colors.brandBackgroundHover,
color: t.colors.neutralForegroundOnBrandHover,
borderColor: t.colors.strokeFocus2,
iconColor: t.colors.neutralForegroundOnBrandHover,
},
},
subtle: {
Expand Down
36 changes: 14 additions & 22 deletions packages/components/Button/src/ButtonColorTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,25 @@ export const defaultButtonColorTokens: TokenSettings<ButtonTokens, Theme> = (t:
icon: t.colors.defaultFocusedIcon,
},
primary: {
backgroundColor: t.colors.brandedBackground,
color: t.colors.brandedContent,
borderColor: t.colors.brandedBorder,
iconColor: t.colors.brandedIcon,
backgroundColor: t.colors.brandBackground,
color: t.colors.neutralForegroundOnColor,
borderColor: t.colors.brandStroke1,
iconColor: t.colors.neutralForegroundOnColor,
disabled: {
backgroundColor: t.colors.brandedDisabledBackground,
color: t.colors.brandedDisabledContent,
borderColor: t.colors.brandedDisabledBorder,
iconColor: t.colors.brandedDisabledIcon,
},
hovered: {
backgroundColor: t.colors.brandedHoveredBackground,
color: t.colors.brandedHoveredContent,
borderColor: t.colors.brandedHoveredBorder,
iconColor: t.colors.brandedHoveredIcon,
backgroundColor: t.colors.brandBackgroundDisabled,
color: t.colors.neutralForegroundDisabled1,
iconColor: t.colors.neutralForegroundDisabled1,
},
pressed: {
backgroundColor: t.colors.brandedPressedBackground,
color: t.colors.brandedPressedContent,
borderColor: t.colors.brandedPressedBorder,
iconColor: t.colors.brandedPressedIcon,
backgroundColor: t.colors.brandBackgroundPressed,
color: t.colors.neutralForegroundOnColor,
iconColor: t.colors.neutralForegroundOnColor,
},
focused: {
backgroundColor: t.colors.brandedFocusedBackground,
color: t.colors.brandedFocusedContent,
borderColor: t.colors.brandedFocusedBorder,
iconColor: t.colors.brandedFocusedIcon,
backgroundColor: t.colors.brandBackground,
color: t.colors.neutralForegroundOnColor,
borderColor: t.colors.strokeFocus2,
iconColor: t.colors.neutralForegroundOnColor,
},
},
subtle: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exports[`ToggleButton default 1`] = `
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#0f6cbd",
"borderColor": "#0f548c",
"borderColor": "#0f6cbd",
"borderRadius": 8,
"borderWidth": 1,
"display": "flex",
Expand Down
20 changes: 10 additions & 10 deletions packages/components/Button/src/__snapshots__/Button.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ exports[`Button component tests Button circular 1`] = `
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#0f6cbd",
"borderColor": "#0f548c",
"borderColor": "#0f6cbd",
"borderRadius": 9999,
"borderWidth": 1,
"display": "flex",
Expand Down Expand Up @@ -117,7 +117,7 @@ exports[`Button component tests Button composed 1`] = `
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#0f6cbd",
"borderColor": "#0f548c",
"borderColor": "#0f6cbd",
"borderRadius": 8,
"borderWidth": 1,
"display": "flex",
Expand Down Expand Up @@ -196,7 +196,7 @@ exports[`Button component tests Button customized 1`] = `
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#0f6cbd",
"borderColor": "#0f548c",
"borderColor": "#0f6cbd",
"borderRadius": 8,
"borderWidth": 1,
"display": "flex",
Expand Down Expand Up @@ -272,7 +272,7 @@ exports[`Button component tests Button default 1`] = `
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#0f6cbd",
"borderColor": "#0f548c",
"borderColor": "#0f6cbd",
"borderRadius": 8,
"borderWidth": 1,
"display": "flex",
Expand Down Expand Up @@ -347,7 +347,7 @@ exports[`Button component tests Button disabled 1`] = `
{
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#f3f2f1",
"backgroundColor": "#b4d6fa",
"borderColor": "#f3f2f1",
"borderRadius": 8,
"borderWidth": 1,
Expand All @@ -367,7 +367,7 @@ exports[`Button component tests Button disabled 1`] = `
numberOfLines={0}
style={
{
"color": "#d2d0ce",
"color": "#bdbdbd",
"fontFamily": "System",
"fontSize": 12,
"fontWeight": "600",
Expand Down Expand Up @@ -425,7 +425,7 @@ exports[`Button component tests Button large 1`] = `
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#0f6cbd",
"borderColor": "#0f548c",
"borderColor": "#0f6cbd",
"borderRadius": 12,
"borderWidth": 1,
"display": "flex",
Expand Down Expand Up @@ -502,7 +502,7 @@ exports[`Button component tests Button primary 1`] = `
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#0f6cbd",
"borderColor": "#0f548c",
"borderColor": "#0f6cbd",
"borderRadius": 8,
"borderWidth": 1,
"display": "flex",
Expand Down Expand Up @@ -579,7 +579,7 @@ exports[`Button component tests Button small 1`] = `
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#0f6cbd",
"borderColor": "#0f548c",
"borderColor": "#0f6cbd",
"borderRadius": 8,
"borderWidth": 1,
"display": "flex",
Expand Down Expand Up @@ -656,7 +656,7 @@ exports[`Button component tests Button square 1`] = `
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#0f6cbd",
"borderColor": "#0f548c",
"borderColor": "#0f6cbd",
"borderRadius": 0,
"borderWidth": 1,
"display": "flex",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ export const defaultMenuItemCheckboxTokens: TokenSettings<MenuItemCheckboxTokens
paddingVertical: 3,
focused: {
backgroundColor: t.colors.brandBackground,
color: t.colors.brandedContent,
iconColor: t.colors.brandedContent,
color: t.colors.neutralForegroundOnBrand,
iconColor: t.colors.neutralForegroundOnBrand,
checked: {
checkmarkColor: t.colors.neutralForeground2Hover,
checkmarkVisibility: 1,
},
},
pressed: {
backgroundColor: t.colors.brandBackgroundPressed,
color: t.colors.brandedPressedContent,
iconColor: t.colors.brandedPressedContent,
color: t.colors.neutralForegroundOnBrandPressed,
iconColor: t.colors.neutralForegroundOnBrandPressed,
checked: {
checkmarkColor: t.colors.brandedPressedContent,
checkmarkColor: t.colors.neutralForegroundOnBrandPressed,
checkmarkVisibility: 1,
},
},
Expand Down
48 changes: 38 additions & 10 deletions packages/theming/theme-types/src/Color.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,41 +386,74 @@ export interface ControlColorTokens {
ghostDisabledContent: ColorValue;
ghostDisabledIcon: ColorValue;

/* Deprecated */
Saadnajmi marked this conversation as resolved.
Show resolved Hide resolved
brandedBackground: ColorValue;
/* Deprecated */
brandedBorder: ColorValue;
/* Deprecated */
brandedContent: ColorValue;
/* Deprecated */
brandedIcon: ColorValue;

/* Deprecated */
brandedHoveredBackground: ColorValue;
/* Deprecated */
brandedHoveredBorder: ColorValue;
/* Deprecated */
brandedHoveredContent: ColorValue;
/* Deprecated */
brandedHoveredIcon: ColorValue;

/* Deprecated */
brandedFocusedBackground: ColorValue;
/* Deprecated */
brandedFocusedBorder: ColorValue;
/* Deprecated */
brandedFocusedContent: ColorValue;
/* Deprecated */
brandedFocusedIcon: ColorValue;

/* Deprecated */
brandedPressedBackground: ColorValue;
/* Deprecated */
brandedPressedBorder: ColorValue;
/* Deprecated */
brandedPressedContent: ColorValue;
/* Deprecated */
brandedPressedIcon: ColorValue;

/* Deprecated */
brandedDisabledBackground: ColorValue;
/* Deprecated */
brandedDisabledBorder: ColorValue;
/* Deprecated */
brandedDisabledContent: ColorValue;
/* Deprecated */
brandedDisabledIcon: ColorValue;

defaultCheckedBackground: ColorValue;
defaultCheckedContent: ColorValue;
defaultCheckedHoveredBackground: ColorValue;
defaultCheckedHoveredContent: ColorValue;

/* Deprecated */
brandedCheckedBackground: ColorValue;
/* Deprecated */
brandedCheckedContent: ColorValue;
/* Deprecated */
brandedCheckedHoveredBackground: ColorValue;
/* Deprecated */
brandedCheckedHoveredContent: ColorValue;

/* Deprecated */
brandedSecondaryContent: ColorValue;
/* Deprecated */
brandedFocusedSecondaryContent: ColorValue;
/* Deprecated */
brandedHoveredSecondaryContent: ColorValue;
/* Deprecated */
brandedPressedSecondaryContent: ColorValue;

defaultCheckedBackground: ColorValue;
defaultCheckedContent: ColorValue;
defaultCheckedHoveredBackground: ColorValue;
defaultCheckedHoveredContent: ColorValue;

ghostCheckedBackground: ColorValue;
ghostCheckedContent: ColorValue;
ghostCheckedHoveredBackground: ColorValue;
Expand All @@ -432,11 +465,6 @@ export interface ControlColorTokens {
ghostHoveredSecondaryContent: ColorValue;
ghostPressedSecondaryContent: ColorValue;

brandedSecondaryContent: ColorValue;
brandedFocusedSecondaryContent: ColorValue;
brandedHoveredSecondaryContent: ColorValue;
brandedPressedSecondaryContent: ColorValue;

defaultDisabledSecondaryContent: ColorValue;
defaultHoveredSecondaryContent: ColorValue;
defaultPressedSecondaryContent: ColorValue;
Expand Down
Loading