From bd888e9c94a3c34915240dc2aa60c769bbb3204f Mon Sep 17 00:00:00 2001 From: Ruriko Araki Date: Wed, 20 Dec 2023 16:56:03 -0800 Subject: [PATCH] Delete colors pass 2 (#3321) * Remove actionLinkHovered and disabledSubtext * Remove disabledBodySubtext, warningText * Change files * Delete inputTextHovered and buttonBackgroundCheckedHovered * Fix build --- apps/fluent-tester/src/theme/applyBrand.ts | 1 - ...-c398a03c-35c6-48ad-80f9-bd188d797aea.json | 7 ++++ ...-f314d307-7250-4968-943a-4b364a968184.json | 7 ++++ ...-d78b68cb-70c7-43ce-995d-20322bd79682.json | 7 ++++ ...-3159c03a-0be6-4fe9-a6e8-ebbc3c811d30.json | 7 ++++ ...-5b0ddbf8-d13f-4d1d-b5a2-e83d80edcae6.json | 7 ++++ ...-96339345-f6df-4850-9b34-de184a840261.json | 7 ++++ .../__snapshots__/android-theme.test.ts.snap | 42 ------------------- .../theming/android-theme/src/colorsTokens.ts | 6 --- .../__snapshots__/apple-theme.test.ts.snap | 29 ------------- .../apple-theme/src/appleColors.ios.ts | 6 --- .../apple-theme/src/appleColors.macos.ts | 6 --- .../__snapshots__/default-theme.test.ts.snap | 42 ------------------- .../default-theme/src/defaultColors.ts | 14 ------- .../theming/theme-types/src/Color.types.ts | 20 ++------- .../__snapshots__/win32-theme.test.ts.snap | 6 --- .../src/paletteFromOfficeColors.ts | 6 --- packages/utils/test-tools/src/mockTheme.ts | 6 --- 18 files changed, 46 insertions(+), 180 deletions(-) create mode 100644 change/@fluentui-react-native-android-theme-c398a03c-35c6-48ad-80f9-bd188d797aea.json create mode 100644 change/@fluentui-react-native-apple-theme-f314d307-7250-4968-943a-4b364a968184.json create mode 100644 change/@fluentui-react-native-default-theme-d78b68cb-70c7-43ce-995d-20322bd79682.json create mode 100644 change/@fluentui-react-native-tester-3159c03a-0be6-4fe9-a6e8-ebbc3c811d30.json create mode 100644 change/@fluentui-react-native-theme-types-5b0ddbf8-d13f-4d1d-b5a2-e83d80edcae6.json create mode 100644 change/@fluentui-react-native-win32-theme-96339345-f6df-4850-9b34-de184a840261.json diff --git a/apps/fluent-tester/src/theme/applyBrand.ts b/apps/fluent-tester/src/theme/applyBrand.ts index 641a7f2dec..5fc60e89f1 100644 --- a/apps/fluent-tester/src/theme/applyBrand.ts +++ b/apps/fluent-tester/src/theme/applyBrand.ts @@ -145,7 +145,6 @@ export const applyBrand = (parent: Theme, currentBrand: string): PartialTheme => primaryButtonBorder: ramp.App7, primaryButtonBorderFocused: ramp.App7, accentButtonBackground: ramp.App6, - actionLinkHovered: ramp.App5, link: ramp.App6, linkHovered: ramp.App7, linkPressed: ramp.App8, diff --git a/change/@fluentui-react-native-android-theme-c398a03c-35c6-48ad-80f9-bd188d797aea.json b/change/@fluentui-react-native-android-theme-c398a03c-35c6-48ad-80f9-bd188d797aea.json new file mode 100644 index 0000000000..f5f83def26 --- /dev/null +++ b/change/@fluentui-react-native-android-theme-c398a03c-35c6-48ad-80f9-bd188d797aea.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Remove unused colors", + "packageName": "@fluentui-react-native/android-theme", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-apple-theme-f314d307-7250-4968-943a-4b364a968184.json b/change/@fluentui-react-native-apple-theme-f314d307-7250-4968-943a-4b364a968184.json new file mode 100644 index 0000000000..289e6d121c --- /dev/null +++ b/change/@fluentui-react-native-apple-theme-f314d307-7250-4968-943a-4b364a968184.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Remove unused colors", + "packageName": "@fluentui-react-native/apple-theme", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-default-theme-d78b68cb-70c7-43ce-995d-20322bd79682.json b/change/@fluentui-react-native-default-theme-d78b68cb-70c7-43ce-995d-20322bd79682.json new file mode 100644 index 0000000000..5897214f32 --- /dev/null +++ b/change/@fluentui-react-native-default-theme-d78b68cb-70c7-43ce-995d-20322bd79682.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Remove unused colors", + "packageName": "@fluentui-react-native/default-theme", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-tester-3159c03a-0be6-4fe9-a6e8-ebbc3c811d30.json b/change/@fluentui-react-native-tester-3159c03a-0be6-4fe9-a6e8-ebbc3c811d30.json new file mode 100644 index 0000000000..37e5c07b51 --- /dev/null +++ b/change/@fluentui-react-native-tester-3159c03a-0be6-4fe9-a6e8-ebbc3c811d30.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Remove unused colors", + "packageName": "@fluentui-react-native/tester", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-theme-types-5b0ddbf8-d13f-4d1d-b5a2-e83d80edcae6.json b/change/@fluentui-react-native-theme-types-5b0ddbf8-d13f-4d1d-b5a2-e83d80edcae6.json new file mode 100644 index 0000000000..7fe943722e --- /dev/null +++ b/change/@fluentui-react-native-theme-types-5b0ddbf8-d13f-4d1d-b5a2-e83d80edcae6.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Remove unused colors", + "packageName": "@fluentui-react-native/theme-types", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-win32-theme-96339345-f6df-4850-9b34-de184a840261.json b/change/@fluentui-react-native-win32-theme-96339345-f6df-4850-9b34-de184a840261.json new file mode 100644 index 0000000000..fa070f4344 --- /dev/null +++ b/change/@fluentui-react-native-win32-theme-96339345-f6df-4850-9b34-de184a840261.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Remove unused colors", + "packageName": "@fluentui-react-native/win32-theme", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/theming/android-theme/src/__tests__/__snapshots__/android-theme.test.ts.snap b/packages/theming/android-theme/src/__tests__/__snapshots__/android-theme.test.ts.snap index 2c2a8337ee..3247942dfe 100644 --- a/packages/theming/android-theme/src/__tests__/__snapshots__/android-theme.test.ts.snap +++ b/packages/theming/android-theme/src/__tests__/__snapshots__/android-theme.test.ts.snap @@ -6,7 +6,6 @@ exports[`createAndroidTheme test option { appearance: 'dark', defaultAppearance: "accentButtonBackground": "#0086F0", "accentButtonText": "#000000", "actionLink": "#E1E1E1", - "actionLinkHovered": "#E1E1E1", "background": "#000000", "blockingBackground": "#CC3333", "bodyDivider": "#292929", @@ -54,7 +53,6 @@ exports[`createAndroidTheme test option { appearance: 'dark', defaultAppearance: "brandedSecondaryContent": "#6E6E6E", "buttonBackground": "#0086F0", "buttonBackgroundChecked": "#0086F0", - "buttonBackgroundCheckedHovered": "#0086F0", "buttonBackgroundDisabled": "#0078D4", "buttonBackgroundHovered": "#0086F0", "buttonBackgroundPressed": "#004C87", @@ -96,9 +94,7 @@ exports[`createAndroidTheme test option { appearance: 'dark', defaultAppearance: "defaultPressedSecondaryContent": "#6E6E6E", "defaultStateBackground": "transparent", "disabledBackground": "#212121", - "disabledBodySubtext": "#ACACAC", "disabledBodyText": "#404040", - "disabledSubtext": "#C8C8C8", "disabledText": "#919191", "errorBackground": "#CC3333", "errorText": "#E83A3A", @@ -141,7 +137,6 @@ exports[`createAndroidTheme test option { appearance: 'dark', defaultAppearance: "inputForegroundChecked": "#0086F0", "inputPlaceholderText": "#919191", "inputText": "#E1E1E1", - "inputTextHovered": "#E1E1E1", "link": "#D83B01", "linkHovered": "#D83B01", "linkPressed": "#D83B01", @@ -258,7 +253,6 @@ exports[`createAndroidTheme test option { appearance: 'dark', defaultAppearance: "warningForeground1": "#feee66", "warningForeground2": "#feee66", "warningHighlight": "#0D9D3D", - "warningText": "#0EB244", }, "components": { "Checkbox": { @@ -632,7 +626,6 @@ exports[`createAndroidTheme test option { appearance: 'darkElevated', defaultApp "accentButtonBackground": "#0086F0", "accentButtonText": "#000000", "actionLink": "#E1E1E1", - "actionLinkHovered": "#E1E1E1", "background": "#000000", "blockingBackground": "#CC3333", "bodyDivider": "#292929", @@ -680,7 +673,6 @@ exports[`createAndroidTheme test option { appearance: 'darkElevated', defaultApp "brandedSecondaryContent": "#6E6E6E", "buttonBackground": "#0086F0", "buttonBackgroundChecked": "#0086F0", - "buttonBackgroundCheckedHovered": "#0086F0", "buttonBackgroundDisabled": "#0078D4", "buttonBackgroundHovered": "#0086F0", "buttonBackgroundPressed": "#004C87", @@ -722,9 +714,7 @@ exports[`createAndroidTheme test option { appearance: 'darkElevated', defaultApp "defaultPressedSecondaryContent": "#6E6E6E", "defaultStateBackground": "transparent", "disabledBackground": "#212121", - "disabledBodySubtext": "#ACACAC", "disabledBodyText": "#404040", - "disabledSubtext": "#C8C8C8", "disabledText": "#919191", "errorBackground": "#CC3333", "errorText": "#E83A3A", @@ -767,7 +757,6 @@ exports[`createAndroidTheme test option { appearance: 'darkElevated', defaultApp "inputForegroundChecked": "#0086F0", "inputPlaceholderText": "#919191", "inputText": "#E1E1E1", - "inputTextHovered": "#E1E1E1", "link": "#D83B01", "linkHovered": "#D83B01", "linkPressed": "#D83B01", @@ -884,7 +873,6 @@ exports[`createAndroidTheme test option { appearance: 'darkElevated', defaultApp "warningForeground1": "#feee66", "warningForeground2": "#feee66", "warningHighlight": "#0D9D3D", - "warningText": "#0EB244", }, "components": { "Checkbox": { @@ -1258,7 +1246,6 @@ exports[`createAndroidTheme test option { appearance: 'dynamic', defaultAppearan "accentButtonBackground": "#0086F0", "accentButtonText": "#000000", "actionLink": "#E1E1E1", - "actionLinkHovered": "#E1E1E1", "background": "#000000", "blockingBackground": "#CC3333", "bodyDivider": "#292929", @@ -1306,7 +1293,6 @@ exports[`createAndroidTheme test option { appearance: 'dynamic', defaultAppearan "brandedSecondaryContent": "#6E6E6E", "buttonBackground": "#0086F0", "buttonBackgroundChecked": "#0086F0", - "buttonBackgroundCheckedHovered": "#0086F0", "buttonBackgroundDisabled": "#0078D4", "buttonBackgroundHovered": "#0086F0", "buttonBackgroundPressed": "#004C87", @@ -1348,9 +1334,7 @@ exports[`createAndroidTheme test option { appearance: 'dynamic', defaultAppearan "defaultPressedSecondaryContent": "#6E6E6E", "defaultStateBackground": "transparent", "disabledBackground": "#212121", - "disabledBodySubtext": "#ACACAC", "disabledBodyText": "#404040", - "disabledSubtext": "#C8C8C8", "disabledText": "#919191", "errorBackground": "#CC3333", "errorText": "#E83A3A", @@ -1393,7 +1377,6 @@ exports[`createAndroidTheme test option { appearance: 'dynamic', defaultAppearan "inputForegroundChecked": "#0086F0", "inputPlaceholderText": "#919191", "inputText": "#E1E1E1", - "inputTextHovered": "#E1E1E1", "link": "#D83B01", "linkHovered": "#D83B01", "linkPressed": "#D83B01", @@ -1510,7 +1493,6 @@ exports[`createAndroidTheme test option { appearance: 'dynamic', defaultAppearan "warningForeground1": "#feee66", "warningForeground2": "#feee66", "warningHighlight": "#0D9D3D", - "warningText": "#0EB244", }, "components": { "Checkbox": { @@ -1884,7 +1866,6 @@ exports[`createAndroidTheme test option { appearance: 'highContrast', defaultApp "accentButtonBackground": "#0086F0", "accentButtonText": "#000000", "actionLink": "#E1E1E1", - "actionLinkHovered": "#E1E1E1", "background": "#000000", "blockingBackground": "#CC3333", "bodyDivider": "#292929", @@ -1932,7 +1913,6 @@ exports[`createAndroidTheme test option { appearance: 'highContrast', defaultApp "brandedSecondaryContent": "#6E6E6E", "buttonBackground": "#0086F0", "buttonBackgroundChecked": "#0086F0", - "buttonBackgroundCheckedHovered": "#0086F0", "buttonBackgroundDisabled": "#0078D4", "buttonBackgroundHovered": "#0086F0", "buttonBackgroundPressed": "#004C87", @@ -1974,9 +1954,7 @@ exports[`createAndroidTheme test option { appearance: 'highContrast', defaultApp "defaultPressedSecondaryContent": "#6E6E6E", "defaultStateBackground": "transparent", "disabledBackground": "#212121", - "disabledBodySubtext": "#ACACAC", "disabledBodyText": "#404040", - "disabledSubtext": "#C8C8C8", "disabledText": "#919191", "errorBackground": "#CC3333", "errorText": "#E83A3A", @@ -2019,7 +1997,6 @@ exports[`createAndroidTheme test option { appearance: 'highContrast', defaultApp "inputForegroundChecked": "#0086F0", "inputPlaceholderText": "#919191", "inputText": "#E1E1E1", - "inputTextHovered": "#E1E1E1", "link": "#D83B01", "linkHovered": "#D83B01", "linkPressed": "#D83B01", @@ -2136,7 +2113,6 @@ exports[`createAndroidTheme test option { appearance: 'highContrast', defaultApp "warningForeground1": "#feee66", "warningForeground2": "#feee66", "warningHighlight": "#0D9D3D", - "warningText": "#0EB244", }, "components": { "Checkbox": { @@ -2510,7 +2486,6 @@ exports[`createAndroidTheme test option { appearance: 'light', defaultAppearance "accentButtonBackground": "#0078D4", "accentButtonText": "#FFFFFF", "actionLink": "#212121", - "actionLinkHovered": "#212121", "background": "#FFFFFF", "blockingBackground": "#DD4242", "bodyDivider": "#E1E1E1", @@ -2558,7 +2533,6 @@ exports[`createAndroidTheme test option { appearance: 'light', defaultAppearance "brandedSecondaryContent": "#919191", "buttonBackground": "#0078D4", "buttonBackgroundChecked": "#0078D4", - "buttonBackgroundCheckedHovered": "#0078D4", "buttonBackgroundDisabled": "#F1F1F1", "buttonBackgroundHovered": "#0078D4", "buttonBackgroundPressed": "#005A9E", @@ -2600,9 +2574,7 @@ exports[`createAndroidTheme test option { appearance: 'light', defaultAppearance "defaultPressedSecondaryContent": "#919191", "defaultStateBackground": "transparent", "disabledBackground": "#F1F1F1", - "disabledBodySubtext": "#ACACAC", "disabledBodyText": "#ACACAC", - "disabledSubtext": "#C8C8C8", "disabledText": "#6E6E6E", "errorBackground": "#DD4242", "errorText": "#D92C2C", @@ -2645,7 +2617,6 @@ exports[`createAndroidTheme test option { appearance: 'light', defaultAppearance "inputForegroundChecked": "#0078D4", "inputPlaceholderText": "#6E6E6E", "inputText": "#212121", - "inputTextHovered": "#212121", "link": "#D83B01", "linkHovered": "#D83B01", "linkPressed": "#D83B01", @@ -2762,7 +2733,6 @@ exports[`createAndroidTheme test option { appearance: 'light', defaultAppearance "warningForeground1": "#817400", "warningForeground2": "#817400", "warningHighlight": "#FFD94E", - "warningText": "#FFD335", }, "components": { "Checkbox": { @@ -3136,7 +3106,6 @@ exports[`getAndroidTheme dark appearance test 1`] = ` "accentButtonBackground": "#0086F0", "accentButtonText": "#000000", "actionLink": "#E1E1E1", - "actionLinkHovered": "#E1E1E1", "background": "#000000", "blockingBackground": "#CC3333", "bodyDivider": "#292929", @@ -3184,7 +3153,6 @@ exports[`getAndroidTheme dark appearance test 1`] = ` "brandedSecondaryContent": "#6E6E6E", "buttonBackground": "#0086F0", "buttonBackgroundChecked": "#0086F0", - "buttonBackgroundCheckedHovered": "#0086F0", "buttonBackgroundDisabled": "#0078D4", "buttonBackgroundHovered": "#0086F0", "buttonBackgroundPressed": "#004C87", @@ -3226,9 +3194,7 @@ exports[`getAndroidTheme dark appearance test 1`] = ` "defaultPressedSecondaryContent": "#6E6E6E", "defaultStateBackground": "transparent", "disabledBackground": "#212121", - "disabledBodySubtext": "#ACACAC", "disabledBodyText": "#404040", - "disabledSubtext": "#C8C8C8", "disabledText": "#919191", "errorBackground": "#CC3333", "errorText": "#E83A3A", @@ -3271,7 +3237,6 @@ exports[`getAndroidTheme dark appearance test 1`] = ` "inputForegroundChecked": "#0086F0", "inputPlaceholderText": "#919191", "inputText": "#E1E1E1", - "inputTextHovered": "#E1E1E1", "link": "#D83B01", "linkHovered": "#D83B01", "linkPressed": "#D83B01", @@ -3388,7 +3353,6 @@ exports[`getAndroidTheme dark appearance test 1`] = ` "warningForeground1": "#feee66", "warningForeground2": "#feee66", "warningHighlight": "#0D9D3D", - "warningText": "#0EB244", }, "components": { "Checkbox": { @@ -3762,7 +3726,6 @@ exports[`getAndroidTheme light appearance test 1`] = ` "accentButtonBackground": "#0078D4", "accentButtonText": "#FFFFFF", "actionLink": "#212121", - "actionLinkHovered": "#212121", "background": "#FFFFFF", "blockingBackground": "#DD4242", "bodyDivider": "#E1E1E1", @@ -3810,7 +3773,6 @@ exports[`getAndroidTheme light appearance test 1`] = ` "brandedSecondaryContent": "#919191", "buttonBackground": "#0078D4", "buttonBackgroundChecked": "#0078D4", - "buttonBackgroundCheckedHovered": "#0078D4", "buttonBackgroundDisabled": "#F1F1F1", "buttonBackgroundHovered": "#0078D4", "buttonBackgroundPressed": "#005A9E", @@ -3852,9 +3814,7 @@ exports[`getAndroidTheme light appearance test 1`] = ` "defaultPressedSecondaryContent": "#919191", "defaultStateBackground": "transparent", "disabledBackground": "#F1F1F1", - "disabledBodySubtext": "#ACACAC", "disabledBodyText": "#ACACAC", - "disabledSubtext": "#C8C8C8", "disabledText": "#6E6E6E", "errorBackground": "#DD4242", "errorText": "#D92C2C", @@ -3897,7 +3857,6 @@ exports[`getAndroidTheme light appearance test 1`] = ` "inputForegroundChecked": "#0078D4", "inputPlaceholderText": "#6E6E6E", "inputText": "#212121", - "inputTextHovered": "#212121", "link": "#D83B01", "linkHovered": "#D83B01", "linkPressed": "#D83B01", @@ -4014,7 +3973,6 @@ exports[`getAndroidTheme light appearance test 1`] = ` "warningForeground1": "#817400", "warningForeground2": "#817400", "warningHighlight": "#FFD94E", - "warningText": "#FFD335", }, "components": { "Checkbox": { diff --git a/packages/theming/android-theme/src/colorsTokens.ts b/packages/theming/android-theme/src/colorsTokens.ts index 4c959a783b..426de7c0e5 100644 --- a/packages/theming/android-theme/src/colorsTokens.ts +++ b/packages/theming/android-theme/src/colorsTokens.ts @@ -19,8 +19,6 @@ export function paletteFromAndroidColors(p: FluentUIAndroidPalette): ThemeColorD disabledBackground: p.surfacesTertiary, disabledText: p.textDisabledHighContrast, disabledBodyText: p.textDisabled, - disabledSubtext: p.gray200, - disabledBodySubtext: p.gray300, focusBorder: 'transparent', variantBorder: 'transparent', @@ -28,7 +26,6 @@ export function paletteFromAndroidColors(p: FluentUIAndroidPalette): ThemeColorD defaultStateBackground: 'transparent', errorText: p.dangerPrimary, - warningText: p.warningPrimary, errorBackground: p.dangerTint10, blockingBackground: p.dangerTint10, warningBackground: p.warningPrimary, @@ -44,13 +41,11 @@ export function paletteFromAndroidColors(p: FluentUIAndroidPalette): ThemeColorD inputFocusBorderAlt: 'transparent', smallInputBorder: 'transparent', inputText: p.textPrimary, - inputTextHovered: p.textPrimary, inputPlaceholderText: p.textSecondary, buttonBackground: p.buttonBackground, buttonBackgroundChecked: p.buttonBackground, buttonBackgroundHovered: p.buttonBackground, - buttonBackgroundCheckedHovered: p.buttonBackground, buttonBackgroundPressed: p.buttonBackgroundPressed, buttonBackgroundDisabled: p.buttonBackgroundDisabled, buttonBorder: 'transparent', @@ -96,7 +91,6 @@ export function paletteFromAndroidColors(p: FluentUIAndroidPalette): ThemeColorD listHeaderBackgroundPressed: 'transparent', actionLink: p.textPrimary, - actionLinkHovered: p.textPrimary, link: p.textHyperLink, linkHovered: p.textHyperLink, linkPressed: p.textHyperLink, diff --git a/packages/theming/apple-theme/src/__tests__/__snapshots__/apple-theme.test.ts.snap b/packages/theming/apple-theme/src/__tests__/__snapshots__/apple-theme.test.ts.snap index b9962ab72d..496473b18a 100644 --- a/packages/theming/apple-theme/src/__tests__/__snapshots__/apple-theme.test.ts.snap +++ b/packages/theming/apple-theme/src/__tests__/__snapshots__/apple-theme.test.ts.snap @@ -17,11 +17,6 @@ exports[`createAppleTheme test 1`] = ` "linkColor", ], }, - "actionLinkHovered": { - "semantic": [ - "linkColor", - ], - }, "background": { "semantic": [ "windowBackgroundColor", @@ -120,7 +115,6 @@ exports[`createAppleTheme test 1`] = ` "brandedSecondaryContent": "#ffffff", "buttonBackground": "#ffffff", "buttonBackgroundChecked": "#f5f5f5", - "buttonBackgroundCheckedHovered": "#f5f5f5", "buttonBackgroundDisabled": { "colorWithSystemEffect": { "baseColor": "#f5f5f5", @@ -230,21 +224,11 @@ exports[`createAppleTheme test 1`] = ` ], }, "disabledBackground": "#E1E1E1", - "disabledBodySubtext": { - "semantic": [ - "quaternaryLabelColor", - ], - }, "disabledBodyText": { "semantic": [ "tertiaryLabelColor", ], }, - "disabledSubtext": { - "semantic": [ - "quaternaryLabelColor", - ], - }, "disabledText": { "semantic": [ "tertiaryLabelColor", @@ -433,11 +417,6 @@ exports[`createAppleTheme test 1`] = ` "textColor", ], }, - "inputTextHovered": { - "semantic": [ - "textColor", - ], - }, "link": { "semantic": [ "linkColor", @@ -691,14 +670,6 @@ exports[`createAppleTheme test 1`] = ` "light": "#FFD94E", }, }, - "warningText": { - "dynamic": { - "dark": "#FFC328", - "highContrastDark": undefined, - "highContrastLight": undefined, - "light": "#FFD335", - }, - }, }, "components": { "Button": { diff --git a/packages/theming/apple-theme/src/appleColors.ios.ts b/packages/theming/apple-theme/src/appleColors.ios.ts index af60b69fbd..90bc0320ca 100644 --- a/packages/theming/apple-theme/src/appleColors.ios.ts +++ b/packages/theming/apple-theme/src/appleColors.ios.ts @@ -80,8 +80,6 @@ export function paletteFromAppleColors(isLightMode: boolean, isElevated: boolean disabledBackground: fluent2AliasColorTokens.neutralBackgroundDisabled, disabledText: fluent2AliasColorTokens.neutralForegroundDisabled1, disabledBodyText: fluent2AliasColorTokens.neutralForegroundDisabled1, - disabledSubtext: fluent2AliasColorTokens.neutralForegroundDisabled1, - disabledBodySubtext: fluent2AliasColorTokens.neutralForegroundDisabled1, focusBorder: 'transparent', variantBorder: fluent2AliasColorTokens.neutralStroke2, @@ -89,7 +87,6 @@ export function paletteFromAppleColors(isLightMode: boolean, isElevated: boolean defaultStateBackground: fluent2AliasColorTokens.neutralBackground1, errorText: fluentApple.dangerPrimary, - warningText: fluentApple.warningPrimary, errorBackground: fluentApple.dangerTint10, blockingBackground: fluentApple.dangerTint10, warningBackground: fluentApple.warningPrimary, @@ -105,7 +102,6 @@ export function paletteFromAppleColors(isLightMode: boolean, isElevated: boolean inputFocusBorderAlt: fluent2AliasColorTokens.neutralStroke1, smallInputBorder: fluent2AliasColorTokens.neutralStroke1, inputText: fluent2AliasColorTokens.neutralForeground1, - inputTextHovered: fluent2AliasColorTokens.neutralForeground1, inputPlaceholderText: fluent2AliasColorTokens.neutralForeground3, // Default values without any style @@ -113,7 +109,6 @@ export function paletteFromAppleColors(isLightMode: boolean, isElevated: boolean buttonBackground: 'transparent', buttonBackgroundChecked: 'transparent', buttonBackgroundHovered: 'transparent', - buttonBackgroundCheckedHovered: 'transparent', buttonBackgroundPressed: 'transparent', buttonBackgroundDisabled: 'transparent', buttonBorder: fluentApple.communicationBlueTint10, @@ -159,7 +154,6 @@ export function paletteFromAppleColors(isLightMode: boolean, isElevated: boolean listHeaderBackgroundPressed: fluent2AliasColorTokens.neutralForeground1, actionLink: fluentApple.communicationBlue, - actionLinkHovered: fluentApple.communicationBlue, link: fluentApple.communicationBlue, linkHovered: fluentApple.communicationBlue, linkPressed: fluentApple.communicationBlueTint10, diff --git a/packages/theming/apple-theme/src/appleColors.macos.ts b/packages/theming/apple-theme/src/appleColors.macos.ts index c2f4b6fd53..de892a8d04 100644 --- a/packages/theming/apple-theme/src/appleColors.macos.ts +++ b/packages/theming/apple-theme/src/appleColors.macos.ts @@ -281,15 +281,12 @@ export function fallbackApplePalette(mode: AppearanceOptions): ThemeColorDefinit disabledBackground: fluentUIApple.gray100, disabledText: applePlatform.tertiaryLabelColor, disabledBodyText: applePlatform.tertiaryLabelColor, - disabledSubtext: applePlatform.quaternaryLabelColor, - disabledBodySubtext: applePlatform.quaternaryLabelColor, focusBorder: 'transparent', variantBorder: applePlatform.separatorColor, variantBorderHovered: applePlatform.separatorColor, defaultStateBackground: applePlatform.controlBackgroundColor, errorText: fluentUIApple.dangerPrimary, - warningText: fluentUIApple.warningPrimary, errorBackground: fluentUIApple.dangerTint10, blockingBackground: fluentUIApple.dangerTint10, warningBackground: fluentUIApple.warningPrimary, @@ -305,14 +302,12 @@ export function fallbackApplePalette(mode: AppearanceOptions): ThemeColorDefinit inputFocusBorderAlt: applePlatform.keyboardFocusIndicatorColor, smallInputBorder: applePlatform.separatorColor, inputText: applePlatform.textColor, - inputTextHovered: applePlatform.textColor, inputPlaceholderText: applePlatform.placeholderTextColor, // Set the default button tokens to match the Acrylic Button style buttonBackground: macOSAliasColorTokens.neutralBackground1, buttonBackgroundChecked: macOSAliasColorTokens.neutralBackground3, buttonBackgroundHovered: macOSAliasColorTokens.neutralBackground3, - buttonBackgroundCheckedHovered: macOSAliasColorTokens.neutralBackground3, buttonBackgroundPressed: ColorWithSystemEffectMacOS(macOSAliasColorTokens.neutralBackground3, 'pressed'), buttonBackgroundDisabled: ColorWithSystemEffectMacOS(macOSAliasColorTokens.neutralBackground3, 'disabled'), buttonBorder: macOSAliasColorTokens.transparentStroke, @@ -359,7 +354,6 @@ export function fallbackApplePalette(mode: AppearanceOptions): ThemeColorDefinit listHeaderBackgroundPressed: applePlatform.headerTextColor, actionLink: applePlatform.linkColor, - actionLinkHovered: applePlatform.linkColor, link: applePlatform.linkColor, linkHovered: applePlatform.linkColor, linkPressed: applePlatform.selectedControlColor, diff --git a/packages/theming/default-theme/src/__tests__/__snapshots__/default-theme.test.ts.snap b/packages/theming/default-theme/src/__tests__/__snapshots__/default-theme.test.ts.snap index 2dbabed4f9..69146d0821 100644 --- a/packages/theming/default-theme/src/__tests__/__snapshots__/default-theme.test.ts.snap +++ b/packages/theming/default-theme/src/__tests__/__snapshots__/default-theme.test.ts.snap @@ -1045,7 +1045,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'dark', defaultAppe "accentButtonBackground": "#185abd", "accentButtonText": "#1b1a19", "actionLink": "#f3f2f1", - "actionLinkHovered": "#faf9f8", "background": "#1b1a19", "blockingBackground": "rgba(234, 67, 0, .5)", "bodyDivider": "#292827", @@ -1090,7 +1089,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'dark', defaultAppe "brandedSecondaryContent": "#201f1e", "buttonBackground": "#252423", "buttonBackgroundChecked": "#484644", - "buttonBackgroundCheckedHovered": "#292827", "buttonBackgroundDisabled": "#252423", "buttonBackgroundHovered": "#292827", "buttonBackgroundPressed": "#292827", @@ -1155,9 +1153,7 @@ exports[`createDefaultTheme test themeOption - { appearance: 'dark', defaultAppe "defaultPressedSecondaryContent": "#797775", "defaultStateBackground": "#201f1e", "disabledBackground": "#323130", - "disabledBodySubtext": "#484644", "disabledBodyText": "#797775", - "disabledSubtext": "#3b3a39", "disabledText": "#797775", "errorBackground": "rgba(232, 17, 35, .5)", "errorText": "#ff5f5f", @@ -1200,7 +1196,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'dark', defaultAppe "inputForegroundChecked": "#1b1a19", "inputPlaceholderText": "#a19f9d", "inputText": "#f3f2f1", - "inputTextHovered": "#faf9f8", "link": "#2e6ac5", "linkHovered": "#82c7ff", "linkPressed": "#aec6eb", @@ -1354,7 +1349,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'dark', defaultAppe "warningForeground3": "#fdea3d", "warningForegroundInverted": "#817400", "warningHighlight": "#fff100", - "warningText": "#ffffff", }, "components": {}, "host": { @@ -1707,7 +1701,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'dynamic', defaultA "accentButtonBackground": "#185abd", "accentButtonText": "#1b1a19", "actionLink": "#f3f2f1", - "actionLinkHovered": "#faf9f8", "background": "#1b1a19", "blockingBackground": "rgba(234, 67, 0, .5)", "bodyDivider": "#292827", @@ -1752,7 +1745,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'dynamic', defaultA "brandedSecondaryContent": "#201f1e", "buttonBackground": "#252423", "buttonBackgroundChecked": "#484644", - "buttonBackgroundCheckedHovered": "#292827", "buttonBackgroundDisabled": "#252423", "buttonBackgroundHovered": "#292827", "buttonBackgroundPressed": "#292827", @@ -1817,9 +1809,7 @@ exports[`createDefaultTheme test themeOption - { appearance: 'dynamic', defaultA "defaultPressedSecondaryContent": "#797775", "defaultStateBackground": "#201f1e", "disabledBackground": "#323130", - "disabledBodySubtext": "#484644", "disabledBodyText": "#797775", - "disabledSubtext": "#3b3a39", "disabledText": "#797775", "errorBackground": "rgba(232, 17, 35, .5)", "errorText": "#ff5f5f", @@ -1862,7 +1852,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'dynamic', defaultA "inputForegroundChecked": "#1b1a19", "inputPlaceholderText": "#a19f9d", "inputText": "#f3f2f1", - "inputTextHovered": "#faf9f8", "link": "#2e6ac5", "linkHovered": "#82c7ff", "linkPressed": "#aec6eb", @@ -2016,7 +2005,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'dynamic', defaultA "warningForeground3": "#fdea3d", "warningForegroundInverted": "#817400", "warningHighlight": "#fff100", - "warningText": "#ffffff", }, "components": {}, "host": { @@ -2369,7 +2357,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'highContrast', def "accentButtonBackground": "#000000", "accentButtonText": "#ffffff", "actionLink": "#ffff00", - "actionLinkHovered": "#ffffff", "background": "#000000", "blockingBackground": "#000000", "bodyDivider": "#ffffff", @@ -2470,7 +2457,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'highContrast', def "brandedSecondaryContent": "#ffffff", "buttonBackground": "#000000", "buttonBackgroundChecked": "#1aebff", - "buttonBackgroundCheckedHovered": "#1aebff", "buttonBackgroundDisabled": "#000000", "buttonBackgroundHovered": "#1aebff", "buttonBackgroundPressed": "#1aebff", @@ -2611,9 +2597,7 @@ exports[`createDefaultTheme test themeOption - { appearance: 'highContrast', def "defaultPressedSecondaryContent": "#000000", "defaultStateBackground": "#000000", "disabledBackground": "#000000", - "disabledBodySubtext": "#3ff23f", "disabledBodyText": "#3ff23f", - "disabledSubtext": "#3ff23f", "disabledText": "#3ff23f", "errorBackground": "#000000", "errorText": "#ffffff", @@ -2656,7 +2640,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'highContrast', def "inputForegroundChecked": "#000000", "inputPlaceholderText": "#ffffff", "inputText": "#ffffff", - "inputTextHovered": "#000000", "link": "#ffff00", "linkHovered": "#ffffff", "linkPressed": "#ffffff", @@ -3246,7 +3229,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'highContrast', def ], }, "warningHighlight": "#ffffff", - "warningText": "#ffffff", }, "components": {}, "host": { @@ -3599,7 +3581,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'light', defaultApp "accentButtonBackground": "#185abd", "accentButtonText": "#ffffff", "actionLink": "#323130", - "actionLinkHovered": "#201f1e", "background": "#ffffff", "blockingBackground": "rgba(250, 65, 0, .2)", "bodyDivider": "#edebe9", @@ -3644,7 +3625,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'light', defaultApp "brandedSecondaryContent": "#faf9f8", "buttonBackground": "#f3f2f1", "buttonBackgroundChecked": "#c8c6c4", - "buttonBackgroundCheckedHovered": "#edebe9", "buttonBackgroundDisabled": "#f3f2f1", "buttonBackgroundHovered": "#edebe9", "buttonBackgroundPressed": "#edebe9", @@ -3709,9 +3689,7 @@ exports[`createDefaultTheme test themeOption - { appearance: 'light', defaultApp "defaultPressedSecondaryContent": "#a19f9d", "defaultStateBackground": "#faf9f8", "disabledBackground": "#f3f2f1", - "disabledBodySubtext": "#c8c6c4", "disabledBodyText": "#a19f9d", - "disabledSubtext": "#d2d0ce", "disabledText": "#a19f9d", "errorBackground": "rgba(245, 135, 145, .2)", "errorText": "#a4262c", @@ -3754,7 +3732,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'light', defaultApp "inputForegroundChecked": "#ffffff", "inputPlaceholderText": "#605e5c", "inputText": "#323130", - "inputTextHovered": "#201f1e", "link": "#185abd", "linkHovered": "#004578", "linkPressed": "#13458f", @@ -3908,7 +3885,6 @@ exports[`createDefaultTheme test themeOption - { appearance: 'light', defaultApp "warningForeground3": "#fde300", "warningForegroundInverted": "#fef7b2", "warningHighlight": "#ffb900", - "warningText": "#333333", }, "components": {}, "host": { @@ -4261,7 +4237,6 @@ exports[`createDefaultTheme test themeOption - { appearance: undefined, defaultA "accentButtonBackground": "#185abd", "accentButtonText": "#ffffff", "actionLink": "#323130", - "actionLinkHovered": "#201f1e", "background": "#ffffff", "blockingBackground": "rgba(250, 65, 0, .2)", "bodyDivider": "#edebe9", @@ -4306,7 +4281,6 @@ exports[`createDefaultTheme test themeOption - { appearance: undefined, defaultA "brandedSecondaryContent": "#faf9f8", "buttonBackground": "#f3f2f1", "buttonBackgroundChecked": "#c8c6c4", - "buttonBackgroundCheckedHovered": "#edebe9", "buttonBackgroundDisabled": "#f3f2f1", "buttonBackgroundHovered": "#edebe9", "buttonBackgroundPressed": "#edebe9", @@ -4371,9 +4345,7 @@ exports[`createDefaultTheme test themeOption - { appearance: undefined, defaultA "defaultPressedSecondaryContent": "#a19f9d", "defaultStateBackground": "#faf9f8", "disabledBackground": "#f3f2f1", - "disabledBodySubtext": "#c8c6c4", "disabledBodyText": "#a19f9d", - "disabledSubtext": "#d2d0ce", "disabledText": "#a19f9d", "errorBackground": "rgba(245, 135, 145, .2)", "errorText": "#a4262c", @@ -4416,7 +4388,6 @@ exports[`createDefaultTheme test themeOption - { appearance: undefined, defaultA "inputForegroundChecked": "#ffffff", "inputPlaceholderText": "#605e5c", "inputText": "#323130", - "inputTextHovered": "#201f1e", "link": "#185abd", "linkHovered": "#004578", "linkPressed": "#13458f", @@ -4570,7 +4541,6 @@ exports[`createDefaultTheme test themeOption - { appearance: undefined, defaultA "warningForeground3": "#fde300", "warningForegroundInverted": "#fef7b2", "warningHighlight": "#ffb900", - "warningText": "#333333", }, "components": {}, "host": { @@ -5442,7 +5412,6 @@ exports[`defaultFluentDarkTheme test 1`] = ` "accentButtonBackground": "#185abd", "accentButtonText": "#1b1a19", "actionLink": "#f3f2f1", - "actionLinkHovered": "#faf9f8", "background": "#1b1a19", "blockingBackground": "rgba(234, 67, 0, .5)", "bodyDivider": "#292827", @@ -5487,7 +5456,6 @@ exports[`defaultFluentDarkTheme test 1`] = ` "brandedSecondaryContent": "#201f1e", "buttonBackground": "#252423", "buttonBackgroundChecked": "#484644", - "buttonBackgroundCheckedHovered": "#292827", "buttonBackgroundDisabled": "#252423", "buttonBackgroundHovered": "#292827", "buttonBackgroundPressed": "#292827", @@ -5552,9 +5520,7 @@ exports[`defaultFluentDarkTheme test 1`] = ` "defaultPressedSecondaryContent": "#797775", "defaultStateBackground": "#201f1e", "disabledBackground": "#323130", - "disabledBodySubtext": "#484644", "disabledBodyText": "#797775", - "disabledSubtext": "#3b3a39", "disabledText": "#797775", "errorBackground": "rgba(232, 17, 35, .5)", "errorText": "#ff5f5f", @@ -5597,7 +5563,6 @@ exports[`defaultFluentDarkTheme test 1`] = ` "inputForegroundChecked": "#1b1a19", "inputPlaceholderText": "#a19f9d", "inputText": "#f3f2f1", - "inputTextHovered": "#faf9f8", "link": "#2e6ac5", "linkHovered": "#82c7ff", "linkPressed": "#aec6eb", @@ -5751,7 +5716,6 @@ exports[`defaultFluentDarkTheme test 1`] = ` "warningForeground3": "#fdea3d", "warningForegroundInverted": "#817400", "warningHighlight": "#fff100", - "warningText": "#ffffff", }, "components": {}, "host": { @@ -6104,7 +6068,6 @@ exports[`defaultFluentTheme test 1`] = ` "accentButtonBackground": "#185abd", "accentButtonText": "#ffffff", "actionLink": "#323130", - "actionLinkHovered": "#201f1e", "background": "#ffffff", "blockingBackground": "rgba(250, 65, 0, .2)", "bodyDivider": "#edebe9", @@ -6149,7 +6112,6 @@ exports[`defaultFluentTheme test 1`] = ` "brandedSecondaryContent": "#faf9f8", "buttonBackground": "#f3f2f1", "buttonBackgroundChecked": "#c8c6c4", - "buttonBackgroundCheckedHovered": "#edebe9", "buttonBackgroundDisabled": "#f3f2f1", "buttonBackgroundHovered": "#edebe9", "buttonBackgroundPressed": "#edebe9", @@ -6214,9 +6176,7 @@ exports[`defaultFluentTheme test 1`] = ` "defaultPressedSecondaryContent": "#a19f9d", "defaultStateBackground": "#faf9f8", "disabledBackground": "#f3f2f1", - "disabledBodySubtext": "#c8c6c4", "disabledBodyText": "#a19f9d", - "disabledSubtext": "#d2d0ce", "disabledText": "#a19f9d", "errorBackground": "rgba(245, 135, 145, .2)", "errorText": "#a4262c", @@ -6259,7 +6219,6 @@ exports[`defaultFluentTheme test 1`] = ` "inputForegroundChecked": "#ffffff", "inputPlaceholderText": "#605e5c", "inputText": "#323130", - "inputTextHovered": "#201f1e", "link": "#185abd", "linkHovered": "#004578", "linkPressed": "#13458f", @@ -6413,7 +6372,6 @@ exports[`defaultFluentTheme test 1`] = ` "warningForeground3": "#fde300", "warningForegroundInverted": "#fef7b2", "warningHighlight": "#ffb900", - "warningText": "#333333", }, "components": {}, "host": { diff --git a/packages/theming/default-theme/src/defaultColors.ts b/packages/theming/default-theme/src/defaultColors.ts index 43897b2452..a2a6d0d12d 100644 --- a/packages/theming/default-theme/src/defaultColors.ts +++ b/packages/theming/default-theme/src/defaultColors.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ -import { globalTokens } from '@fluentui-react-native/theme-tokens'; import type { Palette, FabricWebPalette, ThemeColorDefinition } from '@fluentui-react-native/theme-types'; import { createColorAliasTokens } from './createAliasTokens'; @@ -24,8 +22,6 @@ export function paletteFromFabricColors(p: FabricWebPalette, isInverted?: boolea disabledBackground: isInverted ? p.neutralQuaternaryAlt : p.neutralLighter, disabledText: p.neutralTertiary, disabledBodyText: p.neutralTertiary, - disabledSubtext: p.neutralQuaternary, - disabledBodySubtext: p.neutralTertiaryAlt, focusBorder: p.neutralSecondary, variantBorder: p.neutralLight, @@ -33,7 +29,6 @@ export function paletteFromFabricColors(p: FabricWebPalette, isInverted?: boolea defaultStateBackground: p.neutralLighterAlt, errorText: !isInverted ? p.redDark : '#ff5f5f', - warningText: !isInverted ? globalTokens.color.grey20 : globalTokens.color.white, errorBackground: !isInverted ? 'rgba(245, 135, 145, .2)' : 'rgba(232, 17, 35, .5)', blockingBackground: !isInverted ? 'rgba(250, 65, 0, .2)' : 'rgba(234, 67, 0, .5)', warningBackground: !isInverted ? 'rgba(255, 200, 10, .2)' : 'rgba(255, 251, 0, .6)', @@ -49,13 +44,11 @@ export function paletteFromFabricColors(p: FabricWebPalette, isInverted?: boolea inputFocusBorderAlt: p.themePrimary, smallInputBorder: p.neutralSecondary, inputText: p.neutralPrimary, - inputTextHovered: p.neutralDark, inputPlaceholderText: p.neutralSecondary, buttonBackground: p.neutralLighter, buttonBackgroundChecked: p.neutralTertiaryAlt, buttonBackgroundHovered: p.neutralLight, - buttonBackgroundCheckedHovered: p.neutralLight, buttonBackgroundPressed: p.neutralLight, buttonBackgroundDisabled: p.neutralLighter, buttonBorder: p.neutralSecondaryAlt, @@ -101,7 +94,6 @@ export function paletteFromFabricColors(p: FabricWebPalette, isInverted?: boolea listHeaderBackgroundPressed: p.neutralLight, actionLink: p.neutralPrimary, - actionLinkHovered: p.neutralDark, link: p.themePrimary, linkHovered: p.themeDarker, linkPressed: p.themeDark, @@ -223,8 +215,6 @@ export function getStockWebHCPalette(): ThemeColorDefinition { disabledBackground: '#000000', disabledText: '#3ff23f', disabledBodyText: '#3ff23f', - disabledSubtext: '#3ff23f', - disabledBodySubtext: '#3ff23f', focusBorder: '#ffffff', variantBorder: '#ffffff', @@ -232,7 +222,6 @@ export function getStockWebHCPalette(): ThemeColorDefinition { defaultStateBackground: '#000000', errorText: '#ffffff', - warningText: '#ffffff', errorBackground: '#000000', blockingBackground: '#000000', warningBackground: '#000000', @@ -248,13 +237,11 @@ export function getStockWebHCPalette(): ThemeColorDefinition { inputFocusBorderAlt: '#ffffff', smallInputBorder: '#ffffff', inputText: '#ffffff', - inputTextHovered: '#000000', inputPlaceholderText: '#ffffff', buttonBackground: '#000000', buttonBackgroundChecked: '#1aebff', buttonBackgroundHovered: '#1aebff', - buttonBackgroundCheckedHovered: '#1aebff', buttonBackgroundPressed: '#1aebff', buttonBackgroundDisabled: '#000000', buttonBorder: '#ffffff', @@ -300,7 +287,6 @@ export function getStockWebHCPalette(): ThemeColorDefinition { listHeaderBackgroundPressed: '#1aebff', actionLink: '#ffff00', - actionLinkHovered: '#ffffff', link: '#ffff00', linkHovered: '#ffffff', linkPressed: '#ffffff', diff --git a/packages/theming/theme-types/src/Color.types.ts b/packages/theming/theme-types/src/Color.types.ts index 25a57d0b22..dfc50782b9 100644 --- a/packages/theming/theme-types/src/Color.types.ts +++ b/packages/theming/theme-types/src/Color.types.ts @@ -62,7 +62,7 @@ export interface FabricWebPalette { blackTranslucent40: ColorValue; // ROLE: text - // inputTextHovered, buttonTextHovered, buttonTextChecked, buttonTextPressed, menuItemTextHovered, actionLinkHovered + // buttonTextHovered, buttonTextChecked, buttonTextPressed, menuItemTextHovered neutralDark: ColorValue; // ROLE: text, border @@ -85,11 +85,11 @@ export interface FabricWebPalette { neutralTertiary: ColorValue; // ROLE: text, background, border - // disabledBodySubtext, buttonBackgroundChecked, menuDivider + // buttonBackgroundChecked, menuDivider neutralTertiaryAlt: ColorValue; // ROLE: text - // disabledSubtext, primaryButtonTextDisabled + // primaryButtonTextDisabled neutralQuaternary: ColorValue; // ROLE: background @@ -97,7 +97,7 @@ export interface FabricWebPalette { neutralQuaternaryAlt: ColorValue; // ROLE: background, border - // bodyFrameDivider, bodyDivider, variantBorder, buttonBackgroundHovered, buttonBackgroundCheckedHovered + // bodyFrameDivider, bodyDivider, variantBorder, buttonBackgroundHovered // buttonBackgroundPressed, menuItemBackgroundPressed, listItemBackgroundChecked, listHeaderBackgroundPressed neutralLight: ColorValue; @@ -139,8 +139,6 @@ export interface PaletteTextColors { subText: ColorValue; /** Neutral colored links and links for action buttons. */ actionLink: ColorValue; - /** Hover state for neutral colored links and links for action buttons. */ - actionLinkHovered: ColorValue; /** The color of a link. */ link: ColorValue; @@ -152,21 +150,13 @@ export interface PaletteTextColors { disabledText: ColorValue; /** The default color for disabled text on the default background (bodyBackground). */ disabledBodyText: ColorValue; - /** Disabled de-emphasized text, for use on disabledBackground. */ - disabledSubtext: ColorValue; - /** Disabled de-emphasized text, for use on the default background (bodyBackground). */ - disabledBodySubtext: ColorValue; //// Invariants - slots that rarely change color theme-to-theme because the color has meaning /** The default color of error text, used on bodyBackground. */ errorText: ColorValue; - /** The color of text on errorBackground, warningBackground, blockingBackground, or successBackground. */ - warningText: ColorValue; /** The color of input text. */ inputText: ColorValue; - /** The color of input text on hover. */ - inputTextHovered: ColorValue; /** The color of placeholder text. */ inputPlaceholderText: ColorValue; @@ -271,8 +261,6 @@ export interface PaletteBackgroundColors { buttonBackgroundChecked: ColorValue; /** Background of a hovered standard button */ buttonBackgroundHovered: ColorValue; - /** Background of a checked and hovered standard button; e.g. bold/italicize/underline text button in toolbar */ - buttonBackgroundCheckedHovered: ColorValue; /** Background of a disabled standard button */ buttonBackgroundDisabled: ColorValue; /** Background of a pressed standard button; i.e. currently being clicked by mouse */ diff --git a/packages/theming/win32-theme/src/__tests__/__snapshots__/win32-theme.test.ts.snap b/packages/theming/win32-theme/src/__tests__/__snapshots__/win32-theme.test.ts.snap index 10d846a9a4..808fffa72e 100644 --- a/packages/theming/win32-theme/src/__tests__/__snapshots__/win32-theme.test.ts.snap +++ b/packages/theming/win32-theme/src/__tests__/__snapshots__/win32-theme.test.ts.snap @@ -2444,7 +2444,6 @@ exports[`createOfficeTheme test 1`] = ` "accentButtonBackground": "#D83B01", "accentButtonText": "#FFFFFF", "actionLink": "#262626", - "actionLinkHovered": "#EA6115", "background": "antiquewhite", "blockingBackground": "antiquewhite", "bodyDivider": "#E6E6E6", @@ -2486,7 +2485,6 @@ exports[`createOfficeTheme test 1`] = ` "brandedSecondaryContent": "#faf9f8", "buttonBackground": "#E6E6E6", "buttonBackgroundChecked": "#E6E6E6", - "buttonBackgroundCheckedHovered": "#E6E6E6", "buttonBackgroundDisabled": "#E6E6E6", "buttonBackgroundHovered": "#FFF7F0", "buttonBackgroundPressed": "#FBDFD0", @@ -2551,9 +2549,7 @@ exports[`createOfficeTheme test 1`] = ` "defaultPressedSecondaryContent": "#a19f9d", "defaultStateBackground": "antiquewhite", "disabledBackground": "#F3F3F3", - "disabledBodySubtext": "#B1B1B1", "disabledBodyText": "#B1B1B1", - "disabledSubtext": "#B1B1B1", "disabledText": "#B1B1B1", "errorBackground": "antiquewhite", "errorText": "#A50000", @@ -2596,7 +2592,6 @@ exports[`createOfficeTheme test 1`] = ` "inputForegroundChecked": "#262626", "inputPlaceholderText": "#666666", "inputText": "#262626", - "inputTextHovered": "#262626", "link": "#D83B01", "linkHovered": "#A22C01", "linkPressed": "#6C1E01", @@ -2750,7 +2745,6 @@ exports[`createOfficeTheme test 1`] = ` "warningForeground3": "#fde300", "warningForegroundInverted": "#fef7b2", "warningHighlight": "#A50000", - "warningText": "#262626", }, "host": { "appearance": "light", diff --git a/packages/theming/win32-theme/src/paletteFromOfficeColors.ts b/packages/theming/win32-theme/src/paletteFromOfficeColors.ts index b2f2797090..141ab26420 100644 --- a/packages/theming/win32-theme/src/paletteFromOfficeColors.ts +++ b/packages/theming/win32-theme/src/paletteFromOfficeColors.ts @@ -14,8 +14,6 @@ export function paletteFromOfficeColors(p: OfficePalette): Palette { disabledBackground: p.BkgCtlSubtleDisabled, disabledText: p.TextCtlSubtleDisabled, disabledBodyText: p.TextDisabled, - disabledSubtext: p.TextCtlSubtleDisabled, - disabledBodySubtext: p.TextDisabled, focusBorder: p.StrokeKeyboard, variantBorder: p.AccentOutline, @@ -23,7 +21,6 @@ export function paletteFromOfficeColors(p: OfficePalette): Palette { defaultStateBackground: p.Bkg, errorText: p.TextError, - warningText: p.Text, errorBackground: p.Bkg, blockingBackground: p.Bkg, warningBackground: p.Bkg, @@ -39,13 +36,11 @@ export function paletteFromOfficeColors(p: OfficePalette): Palette { inputFocusBorderAlt: p.StrokeCtlSubtleKeyboard, smallInputBorder: p.StrokeCtlSubtle, inputText: p.TextCtlSubtle, - inputTextHovered: p.TextCtlSubtleHover, inputPlaceholderText: p.TextCtlSubtlePlaceholder, buttonBackground: p.BkgCtl, buttonBackgroundChecked: p.BkgCtlSelected, buttonBackgroundHovered: p.BkgCtlHover, - buttonBackgroundCheckedHovered: p.BkgCtlSelected, buttonBackgroundPressed: p.BkgCtlPressed, buttonBackgroundDisabled: p.BkgCtlDisabled, buttonBorder: p.StrokeCtl, @@ -91,7 +86,6 @@ export function paletteFromOfficeColors(p: OfficePalette): Palette { listHeaderBackgroundPressed: p.BkgPressed, actionLink: p.TextActive, - actionLinkHovered: p.TextActiveHover, link: p.TextHyperlink, linkHovered: p.TextHyperlinkHover, linkPressed: p.TextHyperlinkPressed, diff --git a/packages/utils/test-tools/src/mockTheme.ts b/packages/utils/test-tools/src/mockTheme.ts index 644b10bdb2..a9903363dd 100644 --- a/packages/utils/test-tools/src/mockTheme.ts +++ b/packages/utils/test-tools/src/mockTheme.ts @@ -73,8 +73,6 @@ export const mockTheme: Theme = { disabledBackground: neutralLighter, disabledText: neutralTertiary, disabledBodyText: neutralTertiary, - disabledSubtext: neutralQuaternary, - disabledBodySubtext: neutralTertiaryAlt, focusBorder: neutralSecondary, variantBorder: neutralLight, @@ -82,7 +80,6 @@ export const mockTheme: Theme = { defaultStateBackground: neutralLighterAlt, errorText: redDark, - warningText: '#333333', errorBackground: 'rgba(245, 135, 145, .2)', blockingBackground: 'rgba(250, 65, 0, .2)', warningBackground: 'rgba(255, 200, 10, .2)', @@ -98,13 +95,11 @@ export const mockTheme: Theme = { inputFocusBorderAlt: themePrimary, smallInputBorder: neutralSecondary, inputText: neutralPrimary, - inputTextHovered: neutralDark, inputPlaceholderText: neutralSecondary, buttonBackground: neutralLighter, buttonBackgroundChecked: neutralTertiaryAlt, buttonBackgroundHovered: neutralLight, - buttonBackgroundCheckedHovered: neutralLight, buttonBackgroundPressed: neutralLight, buttonBackgroundDisabled: neutralLighter, buttonBorder: neutralSecondaryAlt, @@ -150,7 +145,6 @@ export const mockTheme: Theme = { listHeaderBackgroundPressed: neutralLight, actionLink: neutralPrimary, - actionLinkHovered: neutralDark, link: themePrimary, linkHovered: themeDarker, linkPressed: themeDark,