Skip to content
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
Expand Up @@ -232,6 +232,7 @@ export const alias = {
colorBrandStroke2: 'brand[140]',
colorBrandStroke2Hover: 'brand[120]',
colorBrandStroke2Pressed: 'brand[80]',
colorBrandStroke2Contrast: 'brand[140]',
colorCompoundBrandStroke: 'brand[80]',
colorCompoundBrandStrokeHover: 'brand[70]',
colorCompoundBrandStrokePressed: 'brand[60]',
Expand All @@ -240,6 +241,7 @@ export const alias = {
colorTransparentStroke: 'transparent',
colorTransparentStrokeInteractive: 'transparent',
colorTransparentStrokeDisabled: 'transparent',
colorNeutralStrokeAlpha2: 'whiteAlpha[20]',
colorStrokeFocus1: 'white',
colorStrokeFocus2: 'black',
colorNeutralShadowAmbient: 'rgba(0,0,0,0.12)',
Expand Down
2 changes: 2 additions & 0 deletions apps/public-docsite-v9/src/shims/ThemeShim/v9ThemeShim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ const mapAliasColors = (palette: IPalette, inverted: boolean): ColorTokens => {
colorBrandStroke2: palette.themeLight,
colorBrandStroke2Hover: palette.themeLight,
colorBrandStroke2Pressed: palette.themeLight,
colorBrandStroke2Contrast: palette.themeLight,
colorCompoundBrandStroke: palette.themePrimary,
colorCompoundBrandStrokeHover: palette.themeDarkAlt,
colorCompoundBrandStrokePressed: palette.themeDark,
Expand All @@ -160,6 +161,7 @@ const mapAliasColors = (palette: IPalette, inverted: boolean): ColorTokens => {
colorTransparentStrokeInteractive: 'transparent',
colorTransparentStrokeDisabled: 'transparent',
colorNeutralStrokeAlpha: inverted ? whiteAlpha[10] : blackAlpha[5],
colorNeutralStrokeAlpha2: whiteAlpha[20],
colorStrokeFocus1: palette.white,
colorStrokeFocus2: palette.black,
colorNeutralShadowAmbient: 'rgba(0,0,0,0.12)',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feat(tokens): Add colorBrandStroke2Contrast and colorNeutralStrokeAlpha2",
"packageName": "@fluentui/react-migration-v8-v9",
"email": "miroslav.stastny@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "feat(tokens): Add colorBrandStroke2Contrast and colorNeutralStrokeAlpha2",
"packageName": "@fluentui/react-theme-sass",
"email": "miroslav.stastny@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Add colorBrandStroke2Contrast and colorNeutralStrokeAlpha2",
"packageName": "@fluentui/tokens",
"email": "miroslav.stastny@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ const mapAliasColors = (palette: IPalette, inverted: boolean): ColorTokens => {
colorBrandStroke2: palette.themeLight,
colorBrandStroke2Hover: palette.themeLight,
colorBrandStroke2Pressed: palette.themeLight,
colorBrandStroke2Contrast: palette.themeLight,
colorCompoundBrandStroke: palette.themePrimary,
colorCompoundBrandStrokeHover: palette.themeDarkAlt,
colorCompoundBrandStrokePressed: palette.themeDark,
Expand All @@ -156,6 +157,7 @@ const mapAliasColors = (palette: IPalette, inverted: boolean): ColorTokens => {
colorTransparentStrokeInteractive: 'transparent',
colorTransparentStrokeDisabled: 'transparent',
colorNeutralStrokeAlpha: inverted ? whiteAlpha[10] : blackAlpha[5],
colorNeutralStrokeAlpha2: whiteAlpha[20],
colorStrokeFocus1: palette.white,
colorStrokeFocus2: palette.black,
colorNeutralShadowAmbient: 'rgba(0,0,0,0.12)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ $colorBrandStroke1: var(--colorBrandStroke1);
$colorBrandStroke2: var(--colorBrandStroke2);
$colorBrandStroke2Hover: var(--colorBrandStroke2Hover);
$colorBrandStroke2Pressed: var(--colorBrandStroke2Pressed);
$colorBrandStroke2Contrast: var(--colorBrandStroke2Contrast);
$colorCompoundBrandStroke: var(--colorCompoundBrandStroke);
$colorCompoundBrandStrokeHover: var(--colorCompoundBrandStrokeHover);
$colorCompoundBrandStrokePressed: var(--colorCompoundBrandStrokePressed);
Expand All @@ -145,6 +146,7 @@ $colorTransparentStroke: var(--colorTransparentStroke);
$colorTransparentStrokeInteractive: var(--colorTransparentStrokeInteractive);
$colorTransparentStrokeDisabled: var(--colorTransparentStrokeDisabled);
$colorNeutralStrokeAlpha: var(--colorNeutralStrokeAlpha);
$colorNeutralStrokeAlpha2: var(--colorNeutralStrokeAlpha2);
$colorStrokeFocus1: var(--colorStrokeFocus1);
$colorStrokeFocus2: var(--colorStrokeFocus2);
$colorNeutralShadowAmbient: var(--colorNeutralShadowAmbient);
Expand Down
2 changes: 2 additions & 0 deletions packages/tokens/etc/tokens.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ export type ColorTokens = {
colorBrandStroke2: string;
colorBrandStroke2Hover: string;
colorBrandStroke2Pressed: string;
colorBrandStroke2Contrast: string;
colorCompoundBrandStroke: string;
colorCompoundBrandStrokeHover: string;
colorCompoundBrandStrokePressed: string;
Expand All @@ -277,6 +278,7 @@ export type ColorTokens = {
colorTransparentStrokeInteractive: string;
colorTransparentStrokeDisabled: string;
colorNeutralStrokeAlpha: string;
colorNeutralStrokeAlpha2: string;
colorStrokeFocus1: string;
colorStrokeFocus2: string;
colorNeutralShadowAmbient: string;
Expand Down
2 changes: 2 additions & 0 deletions packages/tokens/src/alias/darkColor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export const generateColorTokens = (brand: BrandVariants): ColorTokens => ({
colorBrandStroke2: brand[50], // #004c87 Global.Color.Brand.50
colorBrandStroke2Hover: brand[50], // #004c87 Global.Color.Brand.50
colorBrandStroke2Pressed: brand[30], // #043862 Global.Color.Brand.30
colorBrandStroke2Contrast: brand[50], // #004c87 Global.Color.Brand.50
colorCompoundBrandStroke: brand[100], // #2899f5 Global.Color.Brand.100
colorCompoundBrandStrokeHover: brand[110], // #3aa0f3 Global.Color.Brand.110
colorCompoundBrandStrokePressed: brand[90], // #1890f1 Global.Color.Brand.90
Expand All @@ -152,6 +153,7 @@ export const generateColorTokens = (brand: BrandVariants): ColorTokens => ({
colorTransparentStrokeInteractive: 'transparent', // transparent undefined
colorTransparentStrokeDisabled: 'transparent', // transparent undefined
colorNeutralStrokeAlpha: whiteAlpha[10], // rgba(255, 255, 255, 0.1) Global.Color.WhiteAlpha.10
colorNeutralStrokeAlpha2: whiteAlpha[20], // rgba(255, 255, 255, 0.2) Global.Color.WhiteAlpha.20
colorStrokeFocus1: black, // #000000 Global.Color.Black
colorStrokeFocus2: white, // #ffffff Global.Color.White
colorNeutralShadowAmbient: 'rgba(0,0,0,0.24)', // rgba(0,0,0,0.24) undefined
Expand Down
2 changes: 2 additions & 0 deletions packages/tokens/src/alias/highContrastColor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export const generateColorTokens = (): ColorTokens => ({
colorBrandStroke2: hcCanvasText, // CanvasText Global.Color.hcCanvasText
colorBrandStroke2Hover: hcHighlight, // Highlight Global.Color.hcHighlight
colorBrandStroke2Pressed: hcHighlight, // Highlight Global.Color.hcHighlight
colorBrandStroke2Contrast: hcCanvas, // Canvas Global.Color.hcCanvas
colorCompoundBrandStroke: hcHighlight, // Highlight Global.Color.hcHighlight
colorCompoundBrandStrokeHover: hcHighlight, // Highlight Global.Color.hcHighlight
colorCompoundBrandStrokePressed: hcHighlight, // Highlight Global.Color.hcHighlight
Expand All @@ -162,6 +163,7 @@ export const generateColorTokens = (): ColorTokens => ({
colorTransparentStrokeInteractive: hcHighlight, // Highlight Global.Color.hcHighlight
colorTransparentStrokeDisabled: hcDisabled, // GrayText Global.Color.hcDisabled
colorNeutralStrokeAlpha: hcCanvasText, // CanvasText Global.Color.hcCanvasText
colorNeutralStrokeAlpha2: hcCanvas, // Canvas Global.Color.hcCanvas
colorStrokeFocus1: hcCanvas, // Canvas Global.Color.hcCanvas
colorStrokeFocus2: hcHighlight, // Highlight Global.Color.hcHighlight
colorNeutralShadowAmbient: 'rgba(0,0,0,0.24)', // rgba(0,0,0,0.24) undefined
Expand Down
2 changes: 2 additions & 0 deletions packages/tokens/src/alias/lightColor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export const generateColorTokens = (brand: BrandVariants): ColorTokens => ({
colorBrandStroke2: brand[140], // #c7e0f4 Global.Color.Brand.140
colorBrandStroke2Hover: brand[120], // #6cb8f6 Global.Color.Brand.120
colorBrandStroke2Pressed: brand[80], // #0078d4 Global.Color.Brand.80
colorBrandStroke2Contrast: brand[140], // #c7e0f4 Global.Color.Brand.140
colorCompoundBrandStroke: brand[80], // #0078d4 Global.Color.Brand.80
colorCompoundBrandStrokeHover: brand[70], // #106ebe Global.Color.Brand.70
colorCompoundBrandStrokePressed: brand[60], // #005a9e Global.Color.Brand.60
Expand All @@ -152,6 +153,7 @@ export const generateColorTokens = (brand: BrandVariants): ColorTokens => ({
colorTransparentStrokeInteractive: 'transparent', // transparent undefined
colorTransparentStrokeDisabled: 'transparent', // transparent undefined
colorNeutralStrokeAlpha: blackAlpha[5], // rgba(0, 0, 0, 0.05) Global.Color.BlackAlpha.5
colorNeutralStrokeAlpha2: whiteAlpha[20], // rgba(255, 255, 255, 0.2) Global.Color.WhiteAlpha.20
colorStrokeFocus1: white, // #ffffff Global.Color.White
colorStrokeFocus2: black, // #000000 Global.Color.Black
colorNeutralShadowAmbient: 'rgba(0,0,0,0.12)', // rgba(0,0,0,0.12) undefined
Expand Down
2 changes: 2 additions & 0 deletions packages/tokens/src/alias/teamsDarkColor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export const generateColorTokens = (brand: BrandVariants): ColorTokens => ({
colorBrandStroke2: brand[50], // #004c87 Global.Color.Brand.50
colorBrandStroke2Hover: brand[50], // #004c87 Global.Color.Brand.50
colorBrandStroke2Pressed: brand[30], // #043862 Global.Color.Brand.30
colorBrandStroke2Contrast: brand[50], // #004c87 Global.Color.Brand.50
colorCompoundBrandStroke: brand[90], // #1890f1 Global.Color.Brand.90
colorCompoundBrandStrokeHover: brand[100], // #2899f5 Global.Color.Brand.100
colorCompoundBrandStrokePressed: brand[80], // #0078d4 Global.Color.Brand.80
Expand All @@ -152,6 +153,7 @@ export const generateColorTokens = (brand: BrandVariants): ColorTokens => ({
colorTransparentStrokeInteractive: 'transparent', // transparent undefined
colorTransparentStrokeDisabled: 'transparent', // transparent undefined
colorNeutralStrokeAlpha: whiteAlpha[10], // rgba(255, 255, 255, 0.1) Global.Color.WhiteAlpha.10
colorNeutralStrokeAlpha2: whiteAlpha[20], // rgba(255, 255, 255, 0.2) Global.Color.WhiteAlpha.20
colorStrokeFocus1: black, // #000000 Global.Color.Black
colorStrokeFocus2: white, // #ffffff Global.Color.White
colorNeutralShadowAmbient: 'rgba(0,0,0,0.24)', // rgba(0,0,0,0.24) undefined
Expand Down
2 changes: 2 additions & 0 deletions packages/tokens/src/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export const tokens: Record<keyof Theme, string> = {
colorBrandStroke2: 'var(--colorBrandStroke2)',
colorBrandStroke2Hover: 'var(--colorBrandStroke2Hover)',
colorBrandStroke2Pressed: 'var(--colorBrandStroke2Pressed)',
colorBrandStroke2Contrast: 'var(--colorBrandStroke2Contrast)',
colorCompoundBrandStroke: 'var(--colorCompoundBrandStroke)',
colorCompoundBrandStrokeHover: 'var(--colorCompoundBrandStrokeHover)',
colorCompoundBrandStrokePressed: 'var(--colorCompoundBrandStrokePressed)',
Expand All @@ -149,6 +150,7 @@ export const tokens: Record<keyof Theme, string> = {
colorTransparentStrokeInteractive: 'var(--colorTransparentStrokeInteractive)',
colorTransparentStrokeDisabled: 'var(--colorTransparentStrokeDisabled)',
colorNeutralStrokeAlpha: 'var(--colorNeutralStrokeAlpha)',
colorNeutralStrokeAlpha2: 'var(--colorNeutralStrokeAlpha2)',
colorStrokeFocus1: 'var(--colorStrokeFocus1)',
colorStrokeFocus2: 'var(--colorStrokeFocus2)',
colorNeutralShadowAmbient: 'var(--colorNeutralShadowAmbient)',
Expand Down
2 changes: 2 additions & 0 deletions packages/tokens/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export type ColorTokens = {
colorBrandStroke2: string;
colorBrandStroke2Hover: string;
colorBrandStroke2Pressed: string;
colorBrandStroke2Contrast: string;
colorCompoundBrandStroke: string;
colorCompoundBrandStrokeHover: string;
colorCompoundBrandStrokePressed: string;
Expand All @@ -151,6 +152,7 @@ export type ColorTokens = {
colorTransparentStrokeInteractive: string;
colorTransparentStrokeDisabled: string;
colorNeutralStrokeAlpha: string;
colorNeutralStrokeAlpha2: string;
colorStrokeFocus1: string;
colorStrokeFocus2: string;
colorNeutralShadowAmbient: string;
Expand Down