Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
fca5fbc
theme: update neutral foreground and background tokens
spmonahan Jul 21, 2022
5cd8c47
theme: add new static foreground and background color tokens
spmonahan Jul 22, 2022
8b11a16
tooltip: update inverted color tokens.
spmonahan Jul 22, 2022
8f9cb4a
theme: update teams dark color tokens
spmonahan Jul 22, 2022
0056f0c
popover: update color tokens
spmonahan Jul 22, 2022
10f8308
checkbox: update color token
spmonahan Jul 22, 2022
cd007ea
theme: update high contrast token
spmonahan Jul 22, 2022
02a1315
switch: update thumb/indicator color token
spmonahan Jul 22, 2022
0f5ed70
spinner: update color tokens
spmonahan Jul 22, 2022
48d566c
change files
spmonahan Jul 26, 2022
a4c0d4b
add new tokens to v9ThemeShim
spmonahan Jul 26, 2022
fbf6c1d
update avatar color tokens in styles
spmonahan Jul 26, 2022
2c36414
update badge color tokens in styles
spmonahan Jul 26, 2022
18be354
change files
spmonahan Jul 26, 2022
a837edd
switch: update background color token
spmonahan Aug 4, 2022
a8f9732
badge: update color token for ghost/subtle appearance
spmonahan Aug 4, 2022
d9e5231
spinner: update color tokens and styles
spmonahan Aug 5, 2022
742478b
theme: update high contrast color token
spmonahan Aug 5, 2022
a658eea
tokens: update teams dark color neutral foreground inverted values
spmonahan Aug 5, 2022
b11fc53
tokens: update teams dark color neutral background inverted value
spmonahan Aug 5, 2022
f76e0bc
theme-sass: add new color tokens
spmonahan Aug 5, 2022
6099ff6
theme-sass change files
spmonahan Aug 5, 2022
87ed060
spinner: update vr tests for inverted appearance
spmonahan Aug 5, 2022
d3bc4b1
pr comments
spmonahan Aug 10, 2022
62b3a34
spinner: hard code inverted story background
spmonahan Aug 10, 2022
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
4 changes: 3 additions & 1 deletion apps/public-docsite-v9/src/shims/ThemeShim/v9ThemeShim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Theme as ThemeV9,
webLightTheme,
} from '@fluentui/react-components';
import { blackAlpha, whiteAlpha } from './themeDuplicates';
import { blackAlpha, whiteAlpha, grey } from './themeDuplicates';

/**
* Creates v9 color tokens from a v8 palette.
Expand Down Expand Up @@ -53,6 +53,7 @@ const mapAliasColors = (palette: IPalette, inverted: boolean): ColorTokens => {
colorNeutralForegroundInvertedPressed: palette.white,
colorNeutralForegroundInvertedSelected: palette.white,
colorNeutralForegroundOnBrand: palette.white,
colorNeutralForegroundInvertedStatic: palette.white,
colorNeutralForegroundInvertedLink: palette.white,
colorNeutralForegroundInvertedLinkHover: palette.white,
colorNeutralForegroundInvertedLinkPressed: palette.white,
Expand Down Expand Up @@ -85,6 +86,7 @@ const mapAliasColors = (palette: IPalette, inverted: boolean): ColorTokens => {
colorNeutralBackground5Pressed: palette.neutralLighter,
colorNeutralBackground5Selected: palette.neutralLighterAlt,
colorNeutralBackground6: palette.neutralLight,
colorNeutralBackgroundStatic: grey[20],
colorNeutralBackgroundInverted: palette.neutralSecondary,
colorSubtleBackground: 'transparent',
colorSubtleBackgroundHover: palette.neutralLighter,
Expand Down
156 changes: 122 additions & 34 deletions apps/vr-tests-react-components/src/stories/Spinner.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import * as React from 'react';
import { storiesOf } from '@storybook/react';
import { Spinner } from '@fluentui/react-spinner';
import { tokens } from '@fluentui/react-theme';
import { TestWrapperDecoratorNoAnimation } from '../utilities/TestWrapperDecorator';

// Inverted Spinners are meant to be used over a dark background
// or photo. This wrapper ensures a dark background so the Spinners
// are consistently visible.
const InvertedWrapper: React.FC = ({ children }) => {
return <div style={{ background: tokens.colorPaletteBerryForeground1, padding: '10px' }}>{children}</div>;
};

storiesOf('Spinner converged', module)
.addDecorator(TestWrapperDecoratorNoAnimation)
.addStory('Primary', () => <Spinner className="test-class" />, {
Expand Down Expand Up @@ -75,79 +83,159 @@ storiesOf('Spinner converged', module)
includeHighContrast: true,
includeDarkMode: true,
})
.addStory('Inverted', () => <Spinner className="test-class" appearance="inverted" />, {
includeHighContrast: true,
includeDarkMode: true,
})
.addStory('Inverted with Label', () => <Spinner className="test-class" appearance="inverted" label="Loading" />, {
includeHighContrast: true,
includeDarkMode: true,
})
.addStory(
'Inverted',
() => (
<InvertedWrapper>
<Spinner className="test-class" appearance="inverted" />
</InvertedWrapper>
),
{
includeHighContrast: true,
includeDarkMode: true,
},
)
.addStory(
'Inverted with Label',
() => (
<InvertedWrapper>
<Spinner className="test-class" appearance="inverted" label="Loading" />
</InvertedWrapper>
),
{
includeHighContrast: true,
includeDarkMode: true,
},
)
.addStory(
'Inverted with Label Before',
() => <Spinner className="test-class" appearance="inverted" labelPosition="before" label="Loading" />,
() => (
<InvertedWrapper>
<Spinner className="test-class" appearance="inverted" labelPosition="before" label="Loading" />
</InvertedWrapper>
),
{
includeHighContrast: true,
includeDarkMode: true,
},
)
.addStory(
'Inverted with Label After',
() => <Spinner className="test-class" appearance="inverted" labelPosition="after" label="Loading" />,
() => (
<InvertedWrapper>
<Spinner className="test-class" appearance="inverted" labelPosition="after" label="Loading" />
</InvertedWrapper>
),
{
includeHighContrast: true,
includeDarkMode: true,
},
)
.addStory(
'Inverted with Label Above',
() => <Spinner className="test-class" appearance="inverted" labelPosition="above" label="Loading" />,
() => (
<InvertedWrapper>
<Spinner className="test-class" appearance="inverted" labelPosition="above" label="Loading" />
</InvertedWrapper>
),
{
includeHighContrast: true,
includeDarkMode: true,
},
)
.addStory(
'Inverted with Label Below',
() => <Spinner className="test-class" appearance="inverted" labelPosition="below" label="Loading" />,
() => (
<InvertedWrapper>
<Spinner className="test-class" appearance="inverted" labelPosition="below" label="Loading" />
</InvertedWrapper>
),
{
includeHighContrast: true,
includeDarkMode: true,
},
)
.addStory(
'Primary with Size Tiny',
() => (
<InvertedWrapper>
<Spinner className="test-class" appearance="inverted" size="tiny" />
</InvertedWrapper>
),
{
includeHighContrast: true,
includeDarkMode: true,
},
)
.addStory('Primary with Size Tiny', () => <Spinner className="test-class" appearance="inverted" size="tiny" />, {
includeHighContrast: true,
includeDarkMode: true,
})
.addStory(
'Inverted with Size Extra Small',
() => <Spinner className="test-class" appearance="inverted" size="extra-small" />,
() => (
<InvertedWrapper>
<Spinner className="test-class" appearance="inverted" size="extra-small" />
</InvertedWrapper>
),
{
includeHighContrast: true,
includeDarkMode: true,
},
)
.addStory(
'Inverted with Size Small',
() => (
<InvertedWrapper>
<Spinner className="test-class" appearance="inverted" size="small" />
</InvertedWrapper>
),
{
includeHighContrast: true,
includeDarkMode: true,
},
)
.addStory(
'Inverted with Size Medium',
() => (
<InvertedWrapper>
<Spinner className="test-class" appearance="inverted" size="medium" />
</InvertedWrapper>
),
{
includeHighContrast: true,
includeDarkMode: true,
},
)
.addStory(
'Inverted with Size Large',
() => (
<InvertedWrapper>
<Spinner className="test-class" appearance="inverted" size="large" />
</InvertedWrapper>
),
{
includeHighContrast: true,
includeDarkMode: true,
},
)
.addStory('Inverted with Size Small', () => <Spinner className="test-class" appearance="inverted" size="small" />, {
includeHighContrast: true,
includeDarkMode: true,
})
.addStory('Inverted with Size Medium', () => <Spinner className="test-class" appearance="inverted" size="medium" />, {
includeHighContrast: true,
includeDarkMode: true,
})
.addStory('Inverted with Size Large', () => <Spinner className="test-class" appearance="inverted" size="large" />, {
includeHighContrast: true,
includeDarkMode: true,
})
.addStory(
'Inverted with Size Extra Large',
() => <Spinner className="test-class" appearance="inverted" size="extra-large" />,
() => (
<InvertedWrapper>
<Spinner className="test-class" appearance="inverted" size="extra-large" />
</InvertedWrapper>
),
{
includeHighContrast: true,
includeDarkMode: true,
},
)
.addStory('Inverted with Huge', () => <Spinner className="test-class" appearance="inverted" size="huge" />, {
includeHighContrast: true,
includeDarkMode: true,
});
.addStory(
'Inverted with Huge',
() => (
<InvertedWrapper>
<Spinner className="test-class" appearance="inverted" size="huge" />
</InvertedWrapper>
),
{
includeHighContrast: true,
includeDarkMode: true,
},
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: update color tokens",
"packageName": "@fluentui/react-avatar",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: update color tokens",
"packageName": "@fluentui/react-badge",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: update color tokens",
"packageName": "@fluentui/react-checkbox",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: update color tokens",
"packageName": "@fluentui/react-popover",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: update color tokens",
"packageName": "@fluentui/react-spinner",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: update color tokens",
"packageName": "@fluentui/react-switch",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: update token values to fix failing color contrast",
"packageName": "@fluentui/react-theme",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "feat: add new color tokens",
"packageName": "@fluentui/react-theme-sass",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: update color tokens",
"packageName": "@fluentui/react-tooltip",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ const useColorStyles = makeStyles({
backgroundColor: tokens.colorNeutralBackground6,
},
brand: {
color: tokens.colorNeutralForegroundInverted,
color: tokens.colorNeutralForegroundInvertedStatic,
backgroundColor: tokens.colorBrandBackgroundStatic,
},
'dark-red': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const useRootStyles = makeStyles({
color: tokens.colorPaletteDarkOrangeForeground3,
},
'ghost-subtle': {
color: tokens.colorNeutralForegroundInverted,
color: tokens.colorNeutralForegroundInvertedStatic,
},
'ghost-success': {
color: tokens.colorPaletteGreenForeground3,
Expand Down Expand Up @@ -187,7 +187,7 @@ const useRootStyles = makeStyles({
color: tokens.colorPaletteDarkOrangeForeground3,
},
'outline-subtle': {
color: tokens.colorNeutralForegroundInverted,
color: tokens.colorNeutralForegroundInvertedStatic,
},
'outline-success': {
color: tokens.colorPaletteGreenForeground2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const useInputStyles = makeStyles({
},
[`& ~ .${checkboxClassNames.indicator}`]: {
backgroundColor: tokens.colorCompoundBrandBackground,
color: tokens.colorNeutralForegroundOnBrand,
color: tokens.colorNeutralForegroundInverted,
...shorthands.borderColor(tokens.colorCompoundBrandBackground),
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@ const useStyles = makeStyles({
},

inverted: {
// TODO: neutral background inverted missing from superset and theme
backgroundColor: tokens.colorNeutralForeground1,
color: tokens.colorNeutralForegroundInverted,
backgroundColor: tokens.colorNeutralBackgroundStatic,
color: tokens.colorNeutralForegroundInvertedStatic,
},

brand: {
backgroundColor: tokens.colorBrandBackground,
// TODO: clarify with designers what foreground color should be with brand background,
color: tokens.colorNeutralForegroundInverted,
color: tokens.colorNeutralForegroundOnBrand,
},

smallPadding: {
Expand Down
Loading