+ We're updating Fabric to use new colors from the{" "}
+ Fluent Design System.
+ Before these colors become the defaults, this theme is provided as
+ a way to preview how the color changes will affect your app.
+
+ }
+ />
+ );
+ }
+}
diff --git a/packages/experiments/src/components/fluent/theme/examples/FluentTheme.Basic.Example.tsx b/packages/experiments/src/components/fluent/theme/examples/FluentTheme.Basic.Example.tsx
new file mode 100644
index 00000000000000..b06aedcd2e52aa
--- /dev/null
+++ b/packages/experiments/src/components/fluent/theme/examples/FluentTheme.Basic.Example.tsx
@@ -0,0 +1,21 @@
+import * as React from "react";
+import { Link, Customizer } from "office-ui-fabric-react";
+import FluentTheme from "@uifabric/experiments/lib/components/fluent/theme/fluentTheme";
+
+export class FluentThemeBasicExample extends React.Component<{}, {}> {
+ public render(): JSX.Element {
+ return (
+
+
+ Disabled link (current theme)
+
+
+
+
+ Disabled link (Fluent theme)
+
+
+
+ );
+ }
+}
diff --git a/packages/experiments/src/demo/AppDefinition.tsx b/packages/experiments/src/demo/AppDefinition.tsx
index 8b2c57b9839ca6..3ae07750547d4c 100644
--- a/packages/experiments/src/demo/AppDefinition.tsx
+++ b/packages/experiments/src/demo/AppDefinition.tsx
@@ -81,6 +81,12 @@ export const AppDefinition: IAppDefinition = {
key: 'Nav',
name: 'Nav',
url: '#/examples/nav'
+ },
+ {
+ component: require("../components/fluent/theme/FluentThemePage").FluentThemePage,
+ key: "FluentTheme",
+ name: "Fluent Theme",
+ url: "#/examples/fluenttheme"
}
]
}
From 1abc9bc7728fab2099e64c1977f5c7d7cc345496 Mon Sep 17 00:00:00 2001
From: Mike Wheaton
Date: Thu, 3 May 2018 13:44:15 -0700
Subject: [PATCH 02/10] Add more documentation and an example of Breadcrumb
---
.../fluent/theme/FluentThemePage.tsx | 8 +++--
.../examples/FluentTheme.Basic.Example.tsx | 32 +++++++++++++------
2 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx b/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx
index 419e0b015aaf9c..c92caf5315dcdc 100644
--- a/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx
+++ b/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx
@@ -23,7 +23,11 @@ export class FluentThemePage extends React.Component<
We're updating Fabric to use new colors from the{" "}
Fluent Design System.
Before these colors become the defaults, this theme is provided as
- a way to preview how the color changes will affect your app.
+ a way to preview how the color changes will affect your app. Note
+ that theming requires components to be written using{" "}
+
+ mergeStyles
+ , and this conversion work has not been completed.
- We're updating Fabric to use new colors from the{" "}
- Fluent Design System.
+ We're updating Fabric to use new colors from the{ ' ' }
+ Fluent Design System.
Before these colors become the defaults, this theme is provided as
a way to preview how the color changes will affect your app. Note
- that theming requires components to be written using{" "}
-
+ that theming requires components to be written using{ ' ' }
+
mergeStyles
, and this conversion work has not been completed.
diff --git a/packages/experiments/src/demo/AppDefinition.tsx b/packages/experiments/src/demo/AppDefinition.tsx
index 3ae07750547d4c..f93c450e5416c9 100644
--- a/packages/experiments/src/demo/AppDefinition.tsx
+++ b/packages/experiments/src/demo/AppDefinition.tsx
@@ -83,10 +83,10 @@ export const AppDefinition: IAppDefinition = {
url: '#/examples/nav'
},
{
- component: require("../components/fluent/theme/FluentThemePage").FluentThemePage,
- key: "FluentTheme",
- name: "Fluent Theme",
- url: "#/examples/fluenttheme"
+ component: require('../components/fluent/theme/FluentThemePage').FluentThemePage,
+ key: 'FluentTheme',
+ name: 'Fluent Theme',
+ url: '#/examples/fluenttheme'
}
]
}
From 4d9a9a83a4b973a74e4ef692a85496ed1e59ded9 Mon Sep 17 00:00:00 2001
From: Mike Wheaton
Date: Thu, 3 May 2018 15:09:35 -0700
Subject: [PATCH 06/10] Split colors into separate groups
---
.../components/fluent/theme/FluentColors.ts | 43 +++++++++++--------
.../components/fluent/theme/FluentTheme.ts | 28 ++++++------
.../fluent/theme/FluentThemePage.tsx | 3 +-
3 files changed, 41 insertions(+), 33 deletions(-)
diff --git a/packages/experiments/src/components/fluent/theme/FluentColors.ts b/packages/experiments/src/components/fluent/theme/FluentColors.ts
index 39a57a63280914..32ac0dea1ed594 100644
--- a/packages/experiments/src/components/fluent/theme/FluentColors.ts
+++ b/packages/experiments/src/components/fluent/theme/FluentColors.ts
@@ -1,6 +1,5 @@
/* tslint:disable:no-any */
-export const FluentColors: any = {
- // Gray
+export const GrayColors: any = {
black: '#000000',
gray220: '#11100f',
gray210: '#161514',
@@ -24,9 +23,10 @@ export const FluentColors: any = {
gray30: '#edebe9',
gray20: '#f3f2f1',
gray10: '#faf9f8',
- white: '#ffffff',
+ white: '#ffffff'
+};
- // Illustration
+export const IllustrationColors: any = {
pinkRed40: '#750b1c',
pinkRed30: '#761721',
pinkRed20: '#e6808a',
@@ -222,9 +222,10 @@ export const FluentColors: any = {
pink40: '#c30052',
pink30: '#ea005e',
pink20: '#ee3f86',
- pink10: '#edbed3',
+ pink10: '#edbed3'
+}
- // Communication
+export const CommunicationColors: any = {
communication90: '#004578',
communication80: '#005a9e',
communication70: '#106ebe',
@@ -233,36 +234,40 @@ export const FluentColors: any = {
communication40: '#71afe5',
communication30: '#c7e0f4',
communication20: '#deecf9',
- communication10: '#eff6fc',
+ communication10: '#eff6fc'
+};
- // Excel
+export const ExcelColors: any = {
excel70: '#002901',
excel60: '#0b4218',
excel50: '#165a2f',
excel40: '#217346',
excel30: '#4c916c',
excel20: '#77b091',
- excel10: '#a2ceb7',
+ excel10: '#a2ceb7'
+};
- // PowerPoint
+export const PowerPointColors: any = {
powerPoint70: '#620000',
powerPoint60: '#7e180e',
powerPoint50: '#9b2f1c',
powerPoint40: '#b7472a',
powerPoint30: '#c96c54',
powerPoint20: '#dc927e',
- powerPoint10: '#eeb7a9',
+ powerPoint10: '#eeb7a9'
+};
- // Word
+export const WordColors: any = {
word70: '#001b59',
word60: '#0e2f6f',
word50: '#1d4384',
word40: '#2b579a',
word30: '#557bb3',
word20: '#7f9ecc',
- word10: '#a9c2e6',
+ word10: '#a9c2e6'
+};
- // OneNote
+export const OneNoteColors: any = {
oneNote80: '#4c0f6c',
oneNote70: '#5c1384',
oneNote60: '#7719aa',
@@ -270,18 +275,20 @@ export const FluentColors: any = {
oneNote40: '#d0afe2',
oneNote30: '#ddc5ec',
oneNote20: '#efdffa',
- oneNote10: '#f5edfd',
+ oneNote10: '#f5edfd'
+};
- // Teams
+export const TeamsColors: any = {
teams70: '#001765',
teams60: '#1c2d7e',
teams50: '#394296',
teams40: '#5558af',
teams30: '#787bc3',
teams20: '#9b9dd8',
- teams10: '#bec0ec',
+ teams10: '#bec0ec'
+};
- // High contrast
+export const HighContrastColors: any = {
contrastBlackDisabled: '#00ff00',
contrastWhiteDisabled: '#600000',
contrastBlackSelected: '#1aebff',
diff --git a/packages/experiments/src/components/fluent/theme/FluentTheme.ts b/packages/experiments/src/components/fluent/theme/FluentTheme.ts
index 8996e3b7564e4c..f51f1fef0c4df5 100644
--- a/packages/experiments/src/components/fluent/theme/FluentTheme.ts
+++ b/packages/experiments/src/components/fluent/theme/FluentTheme.ts
@@ -1,21 +1,21 @@
import { createTheme, ITheme } from 'office-ui-fabric-react';
-import { FluentColors } from '@uifabric/experiments/lib/components/fluent/theme/FluentColors';
+import { GrayColors } from '@uifabric/experiments/lib/components/fluent/theme/FluentColors';
const FluentTheme: ITheme = createTheme({
palette: {
- black: FluentColors.black,
- neutralDark: FluentColors.gray190,
- neutralPrimary: FluentColors.gray160,
- neutralPrimaryAlt: FluentColors.gray150,
- neutralSecondary: FluentColors.gray130,
- neutralTertiary: FluentColors.gray90,
- neutralTertiaryAlt: FluentColors.gray60,
- neutralQuaternary: FluentColors.gray50,
- neutralQuaternaryAlt: FluentColors.gray40,
- neutralLight: FluentColors.gray30,
- neutralLighter: FluentColors.gray20,
- neutralLighterAlt: FluentColors.gray10,
- white: FluentColors.white
+ black: GrayColors.black,
+ neutralDark: GrayColors.GrayColors190,
+ neutralPrimary: GrayColors.GrayColors160,
+ neutralPrimaryAlt: GrayColors.GrayColors150,
+ neutralSecondary: GrayColors.GrayColors130,
+ neutralTertiary: GrayColors.GrayColors90,
+ neutralTertiaryAlt: GrayColors.GrayColors60,
+ neutralQuaternary: GrayColors.GrayColors50,
+ neutralQuaternaryAlt: GrayColors.GrayColors40,
+ neutralLight: GrayColors.GrayColors30,
+ neutralLighter: GrayColors.GrayColors20,
+ neutralLighterAlt: GrayColors.GrayColors10,
+ white: GrayColors.white
}
});
diff --git a/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx b/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx
index 219d16b2bfcd78..60a9517bf1e3af 100644
--- a/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx
+++ b/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx
@@ -6,7 +6,8 @@ import {
} from '@uifabric/example-app-base';
import { FluentThemeBasicExample } from '@uifabric/experiments/lib/components/fluent/theme/examples/FluentTheme.Basic.Example';
-const FluentThemeBasicExampleCode = require('!raw-loader!@uifabric/experiments/src/components/fluent/theme/examples/FluentTheme.Basic.Example.tsx') as string;
+const FluentThemeBasicExampleCode =
+ require('!raw-loader!@uifabric/experiments/src/components/fluent/theme/examples/FluentTheme.Basic.Example.tsx') as string;
export class FluentThemePage extends React.Component<
IComponentDemoPageProps,
From 33f8bb5cf794dfbe1288227455151d83705a1c00 Mon Sep 17 00:00:00 2001
From: Mike Wheaton
Date: Thu, 3 May 2018 15:42:35 -0700
Subject: [PATCH 07/10] Update documentation
---
.../src/components/fluent/theme/FluentThemePage.tsx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx b/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx
index 60a9517bf1e3af..4ba5236bacd95f 100644
--- a/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx
+++ b/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx
@@ -24,11 +24,15 @@ export class FluentThemePage extends React.Component<
We're updating Fabric to use new colors from the{ ' ' }
Fluent Design System.
Before these colors become the defaults, this theme is provided as
- a way to preview how the color changes will affect your app. Note
- that theming requires components to be written using{ ' ' }
+ a way to preview how the color changes will affect your app.
+
+
+ For components that have been converted to{ ' ' }
mergeStyles
- , and this conversion work has not been completed.
+ , the Customizer component can be used to apply the theme. See
+ the examples below. For all other components (including your app's
+ custom components), use the loadTheme() function.
}
From a470b9f2c51bde8c744d49db7180ee619d0aeb4b Mon Sep 17 00:00:00 2001
From: Mike Wheaton
Date: Mon, 7 May 2018 09:15:12 -0700
Subject: [PATCH 08/10] Add missing semicolon
---
.../experiments/src/components/fluent/theme/FluentColors.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/experiments/src/components/fluent/theme/FluentColors.ts b/packages/experiments/src/components/fluent/theme/FluentColors.ts
index 32ac0dea1ed594..66fefe0c424917 100644
--- a/packages/experiments/src/components/fluent/theme/FluentColors.ts
+++ b/packages/experiments/src/components/fluent/theme/FluentColors.ts
@@ -223,7 +223,7 @@ export const IllustrationColors: any = {
pink30: '#ea005e',
pink20: '#ee3f86',
pink10: '#edbed3'
-}
+};
export const CommunicationColors: any = {
communication90: '#004578',
From cac96178c57126b2c59774082c97952236bd12b5 Mon Sep 17 00:00:00 2001
From: Mike Wheaton
Date: Mon, 7 May 2018 09:23:10 -0700
Subject: [PATCH 09/10] Link to loadTheme function
---
.../src/components/fluent/theme/FluentThemePage.tsx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx b/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx
index 4ba5236bacd95f..bb5e023424a59f 100644
--- a/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx
+++ b/packages/experiments/src/components/fluent/theme/FluentThemePage.tsx
@@ -32,7 +32,11 @@ export class FluentThemePage extends React.Component<
mergeStyles
, the Customizer component can be used to apply the theme. See
the examples below. For all other components (including your app's
- custom components), use the loadTheme() function.
+ custom components), use the
+
+ loadTheme()
+
+ function.
}
From 0ab113b549096c08eefb8a4bfa7eec543ae37028 Mon Sep 17 00:00:00 2001
From: Mike Wheaton
Date: Mon, 7 May 2018 10:02:33 -0700
Subject: [PATCH 10/10] Remove app-specific colors
---
.../components/fluent/theme/FluentColors.ts | 51 -------------------
1 file changed, 51 deletions(-)
diff --git a/packages/experiments/src/components/fluent/theme/FluentColors.ts b/packages/experiments/src/components/fluent/theme/FluentColors.ts
index 66fefe0c424917..a471b3e919f004 100644
--- a/packages/experiments/src/components/fluent/theme/FluentColors.ts
+++ b/packages/experiments/src/components/fluent/theme/FluentColors.ts
@@ -237,57 +237,6 @@ export const CommunicationColors: any = {
communication10: '#eff6fc'
};
-export const ExcelColors: any = {
- excel70: '#002901',
- excel60: '#0b4218',
- excel50: '#165a2f',
- excel40: '#217346',
- excel30: '#4c916c',
- excel20: '#77b091',
- excel10: '#a2ceb7'
-};
-
-export const PowerPointColors: any = {
- powerPoint70: '#620000',
- powerPoint60: '#7e180e',
- powerPoint50: '#9b2f1c',
- powerPoint40: '#b7472a',
- powerPoint30: '#c96c54',
- powerPoint20: '#dc927e',
- powerPoint10: '#eeb7a9'
-};
-
-export const WordColors: any = {
- word70: '#001b59',
- word60: '#0e2f6f',
- word50: '#1d4384',
- word40: '#2b579a',
- word30: '#557bb3',
- word20: '#7f9ecc',
- word10: '#a9c2e6'
-};
-
-export const OneNoteColors: any = {
- oneNote80: '#4c0f6c',
- oneNote70: '#5c1384',
- oneNote60: '#7719aa',
- oneNote50: '#9953c0',
- oneNote40: '#d0afe2',
- oneNote30: '#ddc5ec',
- oneNote20: '#efdffa',
- oneNote10: '#f5edfd'
-};
-
-export const TeamsColors: any = {
- teams70: '#001765',
- teams60: '#1c2d7e',
- teams50: '#394296',
- teams40: '#5558af',
- teams30: '#787bc3',
- teams20: '#9b9dd8',
- teams10: '#bec0ec'
-};
-
export const HighContrastColors: any = {
contrastBlackDisabled: '#00ff00',
contrastWhiteDisabled: '#600000',