diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 5da7cebc5dd96..930c567c64b10 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -5,13 +5,7 @@
"label": "Typescript (oufr) watch",
"type": "process",
"command": "node",
- "args": [
- "./scripts/node_modules/typescript/bin/tsc",
- "-p",
- "packages/office-ui-fabric-react/tsconfig.json",
- "-w",
- "--noEmit"
- ],
+ "args": ["./scripts/node_modules/typescript/bin/tsc", "-p", "packages/office-ui-fabric-react/tsconfig.json", "-w", "--noEmit"],
"problemMatcher": "$tsc",
"group": {
"kind": "build",
diff --git a/common/changes/@uifabric/charting/charting_2018-05-22-23-27.json b/common/changes/@uifabric/charting/charting_2018-05-22-23-27.json
index 67dee374297f6..ec642e71b1ff2 100644
--- a/common/changes/@uifabric/charting/charting_2018-05-22-23-27.json
+++ b/common/changes/@uifabric/charting/charting_2018-05-22-23-27.json
@@ -8,4 +8,4 @@
],
"packageName": "@uifabric/charting",
"email": "kakje@microsoft.com"
-}
\ No newline at end of file
+}
diff --git a/common/changes/@uifabric/example-app-base/applied-prettier_2018-06-02-22-17.json b/common/changes/@uifabric/example-app-base/applied-prettier_2018-06-02-22-17.json
deleted file mode 100644
index 7daca3ae1f054..0000000000000
--- a/common/changes/@uifabric/example-app-base/applied-prettier_2018-06-02-22-17.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "changes": [
- {
- "packageName": "@uifabric/example-app-base",
- "comment": "Added Prettier",
- "type": "patch"
- }
- ],
- "packageName": "@uifabric/example-app-base",
- "email": "mark@thedutchies.com"
-}
diff --git a/common/changes/@uifabric/experiments/applied-prettier_2018-06-02-22-17.json b/common/changes/@uifabric/experiments/applied-prettier_2018-06-02-22-17.json
deleted file mode 100644
index e1b493bf405cb..0000000000000
--- a/common/changes/@uifabric/experiments/applied-prettier_2018-06-02-22-17.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "changes": [
- {
- "packageName": "@uifabric/experiments",
- "comment": "Added Prettier",
- "type": "patch"
- }
- ],
- "packageName": "@uifabric/experiments",
- "email": "mark@thedutchies.com"
-}
diff --git a/common/changes/@uifabric/fabric-website/applied-prettier_2018-06-02-22-17.json b/common/changes/@uifabric/fabric-website/applied-prettier_2018-06-02-22-17.json
deleted file mode 100644
index feda8a391affd..0000000000000
--- a/common/changes/@uifabric/fabric-website/applied-prettier_2018-06-02-22-17.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "changes": [
- {
- "packageName": "@uifabric/fabric-website",
- "comment": "Added Prettier",
- "type": "patch"
- }
- ],
- "packageName": "@uifabric/fabric-website",
- "email": "mark@thedutchies.com"
-}
diff --git a/common/changes/@uifabric/file-type-icons/applied-prettier_2018-06-02-22-17.json b/common/changes/@uifabric/file-type-icons/applied-prettier_2018-06-02-22-17.json
deleted file mode 100644
index e6b174da528e7..0000000000000
--- a/common/changes/@uifabric/file-type-icons/applied-prettier_2018-06-02-22-17.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "changes": [
- {
- "packageName": "@uifabric/file-type-icons",
- "comment": "Added Prettier",
- "type": "patch"
- }
- ],
- "packageName": "@uifabric/file-type-icons",
- "email": "mark@thedutchies.com"
-}
diff --git a/common/changes/@uifabric/icons/applied-prettier_2018-06-02-22-17.json b/common/changes/@uifabric/icons/applied-prettier_2018-06-02-22-17.json
deleted file mode 100644
index 8a69d07b0eeed..0000000000000
--- a/common/changes/@uifabric/icons/applied-prettier_2018-06-02-22-17.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "changes": [
- {
- "packageName": "@uifabric/icons",
- "comment": "Added Prettier",
- "type": "patch"
- }
- ],
- "packageName": "@uifabric/icons",
- "email": "mark@thedutchies.com"
-}
diff --git a/common/changes/@uifabric/jest-serializer-merge-styles/applied-prettier_2018-06-02-22-17.json b/common/changes/@uifabric/jest-serializer-merge-styles/applied-prettier_2018-06-02-22-17.json
deleted file mode 100644
index ff39beb31b58b..0000000000000
--- a/common/changes/@uifabric/jest-serializer-merge-styles/applied-prettier_2018-06-02-22-17.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "changes": [
- {
- "packageName": "@uifabric/jest-serializer-merge-styles",
- "comment": "Added Prettier",
- "type": "patch"
- }
- ],
- "packageName": "@uifabric/jest-serializer-merge-styles",
- "email": "mark@thedutchies.com"
-}
diff --git a/common/changes/@uifabric/merge-styles/applied-prettier_2018-06-02-22-17.json b/common/changes/@uifabric/merge-styles/applied-prettier_2018-06-02-22-17.json
deleted file mode 100644
index fbbf52c69ae18..0000000000000
--- a/common/changes/@uifabric/merge-styles/applied-prettier_2018-06-02-22-17.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "changes": [
- {
- "packageName": "@uifabric/merge-styles",
- "comment": "Added Prettier",
- "type": "patch"
- }
- ],
- "packageName": "@uifabric/merge-styles",
- "email": "mark@thedutchies.com"
-}
diff --git a/common/changes/@uifabric/styling/applied-prettier_2018-06-02-22-17.json b/common/changes/@uifabric/styling/applied-prettier_2018-06-02-22-17.json
deleted file mode 100644
index 837ab4334bd7e..0000000000000
--- a/common/changes/@uifabric/styling/applied-prettier_2018-06-02-22-17.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "changes": [
- {
- "packageName": "@uifabric/styling",
- "comment": "Added Prettier",
- "type": "patch"
- }
- ],
- "packageName": "@uifabric/styling",
- "email": "mark@thedutchies.com"
-}
diff --git a/common/changes/@uifabric/utilities/applied-prettier_2018-06-02-22-17.json b/common/changes/@uifabric/utilities/applied-prettier_2018-06-02-22-17.json
deleted file mode 100644
index 179f1b4c9230d..0000000000000
--- a/common/changes/@uifabric/utilities/applied-prettier_2018-06-02-22-17.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "changes": [
- {
- "packageName": "@uifabric/utilities",
- "comment": "Added Prettier",
- "type": "patch"
- }
- ],
- "packageName": "@uifabric/utilities",
- "email": "mark@thedutchies.com"
-}
diff --git a/common/changes/@uifabric/utilities/ftz-breakoutbug_2018-05-16-23-31.json b/common/changes/@uifabric/utilities/ftz-breakoutbug_2018-05-16-23-31.json
index 9b6b761492b57..fca0edfc63a70 100644
--- a/common/changes/@uifabric/utilities/ftz-breakoutbug_2018-05-16-23-31.json
+++ b/common/changes/@uifabric/utilities/ftz-breakoutbug_2018-05-16-23-31.json
@@ -8,4 +8,4 @@
],
"packageName": "@uifabric/utilities",
"email": "benw@microsoft.com"
-}
+}
\ No newline at end of file
diff --git a/common/changes/@uifabric/variants/applied-prettier_2018-06-02-22-17.json b/common/changes/@uifabric/variants/applied-prettier_2018-06-02-22-17.json
deleted file mode 100644
index fcad5945e5d36..0000000000000
--- a/common/changes/@uifabric/variants/applied-prettier_2018-06-02-22-17.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "changes": [
- {
- "packageName": "@uifabric/variants",
- "comment": "Added Prettier",
- "type": "patch"
- }
- ],
- "packageName": "@uifabric/variants",
- "email": "mark@thedutchies.com"
-}
diff --git a/common/changes/office-ui-fabric-react/commandbar-fabricjs_2018-06-04-19-00.json b/common/changes/office-ui-fabric-react/coachmarkSCSSFixes_2018-05-10-19-12.json
similarity index 54%
rename from common/changes/office-ui-fabric-react/commandbar-fabricjs_2018-06-04-19-00.json
rename to common/changes/office-ui-fabric-react/coachmarkSCSSFixes_2018-05-10-19-12.json
index f2d45c081eae0..ef1526a483fbe 100644
--- a/common/changes/office-ui-fabric-react/commandbar-fabricjs_2018-06-04-19-00.json
+++ b/common/changes/office-ui-fabric-react/coachmarkSCSSFixes_2018-05-10-19-12.json
@@ -2,10 +2,10 @@
"changes": [
{
"packageName": "office-ui-fabric-react",
- "comment": "CommandBarPage: Remove fabric js reference.",
+ "comment": "Update Coachmark basic example and fix TeachingBubble SCSS selectors",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
- "email": "lynam.emily@gmail.com"
-}
+ "email": "edwl@microsoft.com"
+}
\ No newline at end of file
diff --git a/common/changes/office-ui-fabric-react/applied-prettier_2018-06-02-22-17.json b/common/changes/office-ui-fabric-react/demo2_2018-06-04-21-48.json
similarity index 57%
rename from common/changes/office-ui-fabric-react/applied-prettier_2018-06-02-22-17.json
rename to common/changes/office-ui-fabric-react/demo2_2018-06-04-21-48.json
index 5a8c74e9ddda0..500fce3f39a11 100644
--- a/common/changes/office-ui-fabric-react/applied-prettier_2018-06-02-22-17.json
+++ b/common/changes/office-ui-fabric-react/demo2_2018-06-04-21-48.json
@@ -1,11 +1,11 @@
{
"changes": [
{
+ "comment": "",
"packageName": "office-ui-fabric-react",
- "comment": "Added Prettier",
- "type": "patch"
+ "type": "none"
}
],
"packageName": "office-ui-fabric-react",
- "email": "mark@thedutchies.com"
-}
+ "email": "kchau@microsoft.com"
+}
\ No newline at end of file
diff --git a/common/changes/office-ui-fabric-react/ftz-breakoutbug_2018-05-16-23-31.json b/common/changes/office-ui-fabric-react/ftz-breakoutbug_2018-05-16-23-31.json
index 393e19463e04d..0bc529a47cee1 100644
--- a/common/changes/office-ui-fabric-react/ftz-breakoutbug_2018-05-16-23-31.json
+++ b/common/changes/office-ui-fabric-react/ftz-breakoutbug_2018-05-16-23-31.json
@@ -2,11 +2,10 @@
"changes": [
{
"packageName": "office-ui-fabric-react",
- "comment":
- "Fixed FocusTrapZone bug: If first child in the FTZ is a FocusZone and that FZ's last focused child is not the first focusable child, shift-tab would break out of the FTZ.",
+ "comment": "Fixed FocusTrapZone bug: If first child in the FTZ is a FocusZone and that FZ's last focused child is not the first focusable child, shift-tab would break out of the FTZ.",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
"email": "benw@microsoft.com"
-}
+}
\ No newline at end of file
diff --git a/common/changes/office-ui-fabric-react/ftz-rememberlastfocused_2018-05-16-22-37.json b/common/changes/office-ui-fabric-react/ftz-rememberlastfocused_2018-05-16-22-37.json
new file mode 100644
index 0000000000000..0741f771aec9f
--- /dev/null
+++ b/common/changes/office-ui-fabric-react/ftz-rememberlastfocused_2018-05-16-22-37.json
@@ -0,0 +1,11 @@
+{
+ "changes": [
+ {
+ "packageName": "office-ui-fabric-react",
+ "comment": "FocusTrapZone: Added new capability. When `FTZ.focus()` is called, it will pass focus to a descendant element. The new prop `focusPreviouslyFocusedInnerElement` controls the descendant-choosing behavior.",
+ "type": "minor"
+ }
+ ],
+ "packageName": "office-ui-fabric-react",
+ "email": "benw@microsoft.com"
+}
diff --git a/common/changes/office-ui-fabric-react/jolore-contentBoxFix_2018-06-05-21-50.json b/common/changes/office-ui-fabric-react/jolore-contentBoxFix_2018-06-05-21-50.json
new file mode 100644
index 0000000000000..02f18a9b25340
--- /dev/null
+++ b/common/changes/office-ui-fabric-react/jolore-contentBoxFix_2018-06-05-21-50.json
@@ -0,0 +1,11 @@
+{
+ "changes": [
+ {
+ "packageName": "office-ui-fabric-react",
+ "comment": "adding css fix to remove unnecessary scroll bars on calendar and datepicker components",
+ "type": "patch"
+ }
+ ],
+ "packageName": "office-ui-fabric-react",
+ "email": "jolore@microsoft.com"
+}
diff --git a/common/changes/office-ui-fabric-react/v-vibr-HoverCard-IEfix_2018-06-05-17-33.json b/common/changes/office-ui-fabric-react/v-vibr-HoverCard-IEfix_2018-06-05-17-33.json
new file mode 100644
index 0000000000000..258d9bf1984dc
--- /dev/null
+++ b/common/changes/office-ui-fabric-react/v-vibr-HoverCard-IEfix_2018-06-05-17-33.json
@@ -0,0 +1,11 @@
+{
+ "changes": [
+ {
+ "packageName": "office-ui-fabric-react",
+ "comment": "HoverCard: Removing unnecessary animation class causing a visual bug in IE browser.",
+ "type": "patch"
+ }
+ ],
+ "packageName": "office-ui-fabric-react",
+ "email": "v-vibr@microsoft.com"
+}
diff --git a/common/config/rush/version-policies.json b/common/config/rush/version-policies.json
index 6b14cd74bd803..20fdf28357e22 100644
--- a/common/config/rush/version-policies.json
+++ b/common/config/rush/version-policies.json
@@ -4,4 +4,4 @@
"definitionName": "individualVersion",
"lockedMajor": 6
}
-]
+]
\ No newline at end of file
diff --git a/package.json b/package.json
index 8acdf49a03472..189b214cfb2a1 100644
--- a/package.json
+++ b/package.json
@@ -36,12 +36,13 @@
"lint-staged": "^7.0.5"
},
"lint-staged": {
- "*.{ts,tsx,js,json}": [
+ "*.{ts,tsx}": [
"node ./scripts/lint-staged/prettier",
+ "node ./scripts/lint-staged/tslint",
"git add"
],
- "*.{ts,tsx}": [
- "node ./scripts/lint-staged/tslint",
+ "*.{js,json}": [
+ "node ./scripts/lint-staged/prettier",
"git add"
]
}
diff --git a/packages/experiments/src/components/Nav/Nav.tsx b/packages/experiments/src/components/Nav/Nav.tsx
index 26050bdeb1c85..fc3ae6f726da3 100644
--- a/packages/experiments/src/components/Nav/Nav.tsx
+++ b/packages/experiments/src/components/Nav/Nav.tsx
@@ -38,9 +38,9 @@ class NavComponent extends NavBase {
return (
- {this.props.groups.map((group: ICustomNavLinkGroup, groupIndex: number) => {
+ { this.props.groups.map((group: ICustomNavLinkGroup, groupIndex: number) => {
return this._renderGroup(group, groupIndex);
- })}
+ }) }
);
}
@@ -108,21 +108,21 @@ class NavComponent extends NavBase {
return (
);
}
@@ -142,16 +142,16 @@ class NavComponent extends NavBase {
link.disableAutoExpand = false;
return (
-
- {this._renderCompositeLink(link, linkIndex, nestingLevel)}
+
+ { this._renderCompositeLink(link, linkIndex, nestingLevel) }
{// show child links
- // 1. only for the first level and
- // 2. if the link is expanded
- nestingLevel == 0 && link.isExpanded ? (
-
- {this._renderLinks(link.links as INavLink[], ++nestingLevel)}
-
- ) : null}
+ // 1. only for the first level and
+ // 2. if the link is expanded
+ nestingLevel == 0 && link.isExpanded ? (
+
+ { this._renderLinks(link.links as INavLink[], ++nestingLevel) }
+
+ ) : null }
);
}
@@ -165,7 +165,7 @@ class NavComponent extends NavBase {
return (
- {links.map((link: INavLink, linkIndex: number) => {
+ { links.map((link: INavLink, linkIndex: number) => {
if (enableCustomization && link.isHidden && !showMore) {
// atleast one link is hidden
this._hasAtleastOneHiddenLink = true;
@@ -178,7 +178,7 @@ class NavComponent extends NavBase {
} else {
return this._renderLink(link, linkIndex, nestingLevel);
}
- })}
+ }) }
);
}
@@ -205,15 +205,15 @@ class NavComponent extends NavBase {
}
return (
-
- {isGroupHeaderVisible ? (
-
-
- {group.name ?
{group.name} : null}
+
+ { isGroupHeaderVisible ? (
+
+
+ { group.name ? { group.name } : null }
- ) : null}
- {this._renderLinks(group.links, 0 /* nestingLevel */)}
+ ) : null }
+ { this._renderLinks(group.links, 0 /* nestingLevel */) }
);
}
diff --git a/packages/experiments/src/components/Nav/NavBase.tsx b/packages/experiments/src/components/Nav/NavBase.tsx
index 2a0eca2f56f83..375bf45317226 100644
--- a/packages/experiments/src/components/Nav/NavBase.tsx
+++ b/packages/experiments/src/components/Nav/NavBase.tsx
@@ -71,10 +71,8 @@ export class NavBase extends React.Component
implements IN
return false;
}
- return links.some(
- (link: INavLink): boolean => {
- return !link.isHidden;
- }
- );
+ return links.some((link: INavLink): boolean => {
+ return !link.isHidden;
+ });
}
}
diff --git a/packages/experiments/src/components/Nav/SlimNav.tsx b/packages/experiments/src/components/Nav/SlimNav.tsx
index f73a2c7d3c667..741dfe175e988 100644
--- a/packages/experiments/src/components/Nav/SlimNav.tsx
+++ b/packages/experiments/src/components/Nav/SlimNav.tsx
@@ -44,9 +44,9 @@ class SlimNavComponent extends NavBase {
return (
- {this.props.groups.map((group: ICustomNavLinkGroup, groupIndex: number) => {
+ { this.props.groups.map((group: ICustomNavLinkGroup, groupIndex: number) => {
return this._renderGroup(group, groupIndex);
- })}
+ }) }
);
}
@@ -162,19 +162,19 @@ class SlimNavComponent extends NavBase {
return (
);
}
@@ -187,11 +187,11 @@ class SlimNavComponent extends NavBase {
const linkText = this.getLinkText(link, this.props.showMore);
return (
-
- {this._renderCompositeLink(link, linkIndex, nestingLevel)}
+
+ { this._renderCompositeLink(link, linkIndex, nestingLevel) }
{// show child links
- // 1. only for the first level
- nestingLevel == 0 ? {this._renderFloatingLinks(link.links as INavLink[], ++nestingLevel)}
: null}
+ // 1. only for the first level
+ nestingLevel == 0 ? { this._renderFloatingLinks(link.links as INavLink[], ++nestingLevel) }
: null }
);
}
@@ -203,9 +203,9 @@ class SlimNavComponent extends NavBase {
return (
- {links.map((link: INavLink, linkIndex: number) => {
+ { links.map((link: INavLink, linkIndex: number) => {
return this._renderFloatingLink(link, linkIndex, nestingLevel);
- })}
+ }) }
);
}
@@ -220,8 +220,8 @@ class SlimNavComponent extends NavBase {
const classNames = getClassNames(styles!, { hasChildren, scrollTop: link.scrollTop });
return (
-
- {this._renderFloatingLinks([link], 0 /* nestingLevel */)}
+
+ { this._renderFloatingLinks([link], 0 /* nestingLevel */) }
);
}
@@ -242,27 +242,27 @@ class SlimNavComponent extends NavBase {
return (
- {this._renderFloatingNav(link, linkIndex)}
+ { this._renderFloatingNav(link, linkIndex) }
);
}
@@ -276,7 +276,7 @@ class SlimNavComponent extends NavBase {
return (
- {links.map((link: INavLink, linkIndex: number) => {
+ { links.map((link: INavLink, linkIndex: number) => {
if (enableCustomization && link.isHidden && !showMore) {
// atleast one link is hidden
this._hasAtleastOneHiddenLink = true;
@@ -289,7 +289,7 @@ class SlimNavComponent extends NavBase {
} else {
return this._renderLink(link, linkIndex, nestingLevel);
}
- })}
+ }) }
);
}
@@ -308,6 +308,7 @@ class SlimNavComponent extends NavBase {
const classNames = getClassNames(styles!, {});
+
let isGroupHeaderVisible = false;
// first group header is hidden by default, display group header for other groups only if there are visible links
@@ -316,14 +317,14 @@ class SlimNavComponent extends NavBase {
}
return (
-
+
{// do not render group header for the first group
- isGroupHeaderVisible ? (
-
- ) : null}
- {this._renderLinks(group.links, 0 /* nestingLevel */)}
+ isGroupHeaderVisible ? (
+
+ ) : null }
+ { this._renderLinks(group.links, 0 /* nestingLevel */) }
);
}
diff --git a/packages/experiments/src/components/Tile/index.ts b/packages/experiments/src/components/Tile/index.ts
index 232f04cf36ca7..37874e9e0d875 100644
--- a/packages/experiments/src/components/Tile/index.ts
+++ b/packages/experiments/src/components/Tile/index.ts
@@ -1,4 +1,4 @@
export * from './Tile.types';
export * from './Tile';
export * from './ShimmerTile/ShimmerTile';
-export * from './ShimmerTile/ShimmerTile.types';
+export * from './ShimmerTile/ShimmerTile.types';
\ No newline at end of file
diff --git a/packages/office-ui-fabric-react/src/components/ActivityItem/ActivityItemPage.tsx b/packages/office-ui-fabric-react/src/components/ActivityItem/ActivityItemPage.tsx
index 2df3c5b1aa00d..f4f54ae6cc912 100644
--- a/packages/office-ui-fabric-react/src/components/ActivityItem/ActivityItemPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/ActivityItem/ActivityItemPage.tsx
@@ -34,17 +34,22 @@ export const ActivityItemPageProps: IDemoPageProps = {
}
],
propertiesTablesSources: [
- require
('!raw-loader!office-ui-fabric-react/src/components/ActivityItem/ActivityItem.types.ts')
+ require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ActivityItem/ActivityItem.types.ts')
],
overview: require<
string
>('!raw-loader!office-ui-fabric-react/src/components/ActivityItem/docs/ActivityItemOverview.md'),
bestPractices: '',
- dos: require('!raw-loader!office-ui-fabric-react/src/components/ActivityItem/docs/ActivityItemDos.md'),
- donts: require('!raw-loader!office-ui-fabric-react/src/components/ActivityItem/docs/ActivityItemDonts.md'),
+ dos: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ActivityItem/docs/ActivityItemDos.md'),
+ donts: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ActivityItem/docs/ActivityItemDonts.md'),
isHeaderVisible: true
};
-export const ActivityItemPage = (props: { isHeaderVisible: boolean }) => (
-
-);
+export const ActivityItemPage = (props: { isHeaderVisible: boolean }) =>
+ ;
diff --git a/packages/office-ui-fabric-react/src/components/Breadcrumb/BreadcrumbPage.tsx b/packages/office-ui-fabric-react/src/components/Breadcrumb/BreadcrumbPage.tsx
index 9afac63de69f8..61b63d61d2a5b 100644
--- a/packages/office-ui-fabric-react/src/components/Breadcrumb/BreadcrumbPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Breadcrumb/BreadcrumbPage.tsx
@@ -1,63 +1,41 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PropertiesTableSet,
- PageMarkdown
-} from '@uifabric/example-app-base';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { BreadcrumbStatus } from './Breadcrumb.checklist';
import { BreadcrumbBasicExample } from './examples/Breadcrumb.Basic.Example';
import { BreadcrumbStaticExample } from './examples/Breadcrumb.Static.Example';
const BreadcrumbBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Breadcrumb/examples/Breadcrumb.Basic.Example.tsx') as string;
const BreadcrumbStaticExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Breadcrumb/examples/Breadcrumb.Static.Example.tsx') as string;
+export const BreadcrumbPageProps: IDemoPageProps = {
+ title: 'Breadcrumb',
+ componentName: 'Breadcrumb',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Breadcrumb',
+ componentStatus: BreadcrumbStatus,
+ examples: [
+ {
+ title: 'Default Breadcrumb',
+ code: BreadcrumbBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Breadcrumb with static width ',
+ code: BreadcrumbStaticExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/Breadcrumb/Breadcrumb.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Breadcrumb/docs/BreadcrumbOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Breadcrumb/docs/BreadcrumbDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Breadcrumb/docs/BreadcrumbDonts.md'),
+ isHeaderVisible: true
+};
-export class BreadcrumbPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
- }
- propertiesTables={
-
('!raw-loader!office-ui-fabric-react/src/components/Breadcrumb/Breadcrumb.types.ts')
- ]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Breadcrumb/docs/BreadcrumbOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Breadcrumb/docs/BreadcrumbDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Breadcrumb/docs/BreadcrumbDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const BreadcrumbPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/Calendar/Calendar.scss b/packages/office-ui-fabric-react/src/components/Calendar/Calendar.scss
index c9e13357ef790..e6a9c20c6dab2 100644
--- a/packages/office-ui-fabric-react/src/components/Calendar/Calendar.scss
+++ b/packages/office-ui-fabric-react/src/components/Calendar/Calendar.scss
@@ -57,6 +57,7 @@ $Calendar-dayPicker-margin: 10px;
min-height: 212px;
padding: 12px;
display: flex;
+ box-sizing: content-box;
}
// Wrapper containing the calendar view to pick a specific date.
diff --git a/packages/office-ui-fabric-react/src/components/Calendar/CalendarPage.tsx b/packages/office-ui-fabric-react/src/components/Calendar/CalendarPage.tsx
index ec0c77792742f..5449431091367 100644
--- a/packages/office-ui-fabric-react/src/components/Calendar/CalendarPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Calendar/CalendarPage.tsx
@@ -1,182 +1,215 @@
import * as React from 'react';
-import {
- ComponentPage,
- ExampleCard,
- IComponentDemoPageProps,
- PropertiesTableSet,
- PageMarkdown
-} from '@uifabric/example-app-base';
import { DateRangeType, DayOfWeek } from 'office-ui-fabric-react/lib/Calendar';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { CalendarButtonExample } from './examples/Calendar.Button.Example';
import { CalendarInlineExample } from './examples/Calendar.Inline.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { CalendarStatus } from './Calendar.checklist';
import { addMonths, addYears } from '../../utilities/dateMath/DateMath';
const CalendarButtonExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Calendar/examples/Calendar.Button.Example.tsx') as string;
const CalendarInlineExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Calendar/examples/Calendar.Inline.Example.tsx') as string;
-export class CalendarPage extends React.Component {
- public render(): JSX.Element {
- const today = new Date(Date.now());
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Calendar/Calendar.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Calendar/docs/CalendarOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Calendar/docs/CalendarDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Calendar/docs/CalendarDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+const today = new Date(Date.now());
+
+export const CalendarPageProps: IDemoPageProps = {
+ title: 'Calendar',
+ componentName: 'Calendar',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Calendar',
+ componentStatus: CalendarStatus,
+ examples: [
+ {
+ title: 'Inline Calendar',
+ code: CalendarInlineExampleCode,
+
+ view: (
+
+ )
+ },
+ {
+ title: 'Inline Calendar with overlayed month picker when header is clicked',
+ code: CalendarInlineExampleCode,
+
+ view: (
+
+ )
+ },
+ {
+ title: 'Inline Calendar with month picker',
+ code: CalendarInlineExampleCode,
+
+ view: (
+
+ )
+ },
+ {
+ title: 'Inline Calendar with week selection',
+ code: CalendarInlineExampleCode,
+
+ view: (
+
+ )
+ },
+ {
+ title: 'Inline Calendar with month selection',
+ code: CalendarInlineExampleCode,
+
+ view: (
+
+ )
+ },
+ {
+ title: 'Inline Calendar with week numbers',
+ code: CalendarInlineExampleCode,
+
+ view: (
+
+ )
+ },
+ {
+ title: 'Inline Calendar with 6 weeks display by default',
+ code: CalendarInlineExampleCode,
+
+ view: (
+
+ )
+ },
+ {
+ title: 'Inline Calendar with month picker and no day picker',
+ code: CalendarInlineExampleCode,
+
+ view: (
+
+ )
+ },
+ {
+ title: 'Inline Calendar with date boundary (minDate, maxDate)',
+ code: CalendarInlineExampleCode,
+
+ view: (
+
+ )
+ },
+ {
+ title:
+ 'Calendar with selectableDays = [Tuesday, Wednesday, Friday, Saturday] provided, first day of week = Monday',
+ code: CalendarButtonExampleCode,
+
+ view: (
+
+ )
+ },
+ {
+ title: 'Calendar launched from a button',
+ code: CalendarButtonExampleCode,
+
+ view:
+ },
+ {
+ title: 'Month picker launched from a button',
+ code: CalendarButtonExampleCode,
+
+ view: (
+
+ )
+ },
+ {
+ title: 'Calendar with overlayed month picker launched from a button',
+ code: CalendarButtonExampleCode,
+
+ view: (
+
+ )
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/Calendar/Calendar.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Calendar/docs/CalendarOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Calendar/docs/CalendarDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Calendar/docs/CalendarDonts.md'),
+ isHeaderVisible: true
+};
+
+export const CalendarPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/Callout/CalloutContent.base.tsx b/packages/office-ui-fabric-react/src/components/Callout/CalloutContent.base.tsx
index 7dae1f69c9bd1..828f7bca0e14e 100644
--- a/packages/office-ui-fabric-react/src/components/Callout/CalloutContent.base.tsx
+++ b/packages/office-ui-fabric-react/src/components/Callout/CalloutContent.base.tsx
@@ -240,10 +240,10 @@ export class CalloutContentBase extends BaseComponent {
- public render(): JSX.Element {
- const cmdBarParamsTextAndIcons: any = { items: items, farItems: null };
+const cmdBarParamsTextAndIcons: any = { items: items, farItems: null };
+
+export const CalloutPageProps: IDemoPageProps = {
+ title: 'Callout',
+ componentName: 'Callout',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Callout',
+ componentStatus: CalloutStatus,
+ examples: [
+ {
+ title: 'Default Callout',
+ code: CalloutBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Nested Callout... Callout with a commandbar with a sub menu',
+ code: CalloutNestedExampleCode,
+ view:
+ },
+ {
+ title: 'Callout with directional hint',
+ code: CalloutDirectionalExampleCode,
+ view:
+ },
+ {
+ title: 'Callout with cover',
+ code: CalloutCoverExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/Callout/Callout.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Callout/docs/CalloutOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Callout/docs/CalloutDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Callout/docs/CalloutDonts.md'),
+ isHeaderVisible: true
+};
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- propertiesTables={
-
-
('!raw-loader!office-ui-fabric-react/src/components/Callout/Callout.types.ts')]}
- />
-
- Besides the above properties, the Callout component accepts all properties that the React{' '}
- button and a components accept.
-
-
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Callout/docs/CalloutOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Callout/docs/CalloutDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Callout/docs/CalloutDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={
}
- />
- );
- }
-}
+export const CalloutPage = (props: { isHeaderVisible: boolean }) =>
;
diff --git a/packages/office-ui-fabric-react/src/components/Checkbox/CheckboxPage.tsx b/packages/office-ui-fabric-react/src/components/Checkbox/CheckboxPage.tsx
index cc60e66441db4..40ce37030c26b 100644
--- a/packages/office-ui-fabric-react/src/components/Checkbox/CheckboxPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Checkbox/CheckboxPage.tsx
@@ -1,61 +1,40 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PropertiesTableSet,
- PageMarkdown
-} from '@uifabric/example-app-base';
import { CheckboxBasicExample } from './examples/Checkbox.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { CheckboxImplementationExamples } from './examples/Checkbox.ImplementationExamples';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { CheckboxStatus } from './Checkbox.checklist';
const CheckboxBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Checkbox/examples/Checkbox.Basic.Example.tsx') as string;
const CheckboxImplementationExamplesCode = require('!raw-loader!office-ui-fabric-react/src/components/Checkbox/examples/Checkbox.ImplementationExamples.tsx') as string;
+export const CheckboxPageProps: IDemoPageProps = {
+ title: 'Checkbox',
+ componentName: 'Checkbox',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Checkbox',
+ componentStatus: CheckboxStatus,
+ examples: [
+ {
+ title: 'Default Checkbox',
+ code: CheckboxBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Implementation Examples',
+ code: CheckboxImplementationExamplesCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require
('!raw-loader!office-ui-fabric-react/src/components/Checkbox/Checkbox.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Checkbox/docs/CheckboxOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Checkbox/docs/CheckboxDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Checkbox/docs/CheckboxDonts.md'),
+ isHeaderVisible: true
+};
-export class CheckboxPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
- }
- propertiesTables={
-
('!raw-loader!office-ui-fabric-react/src/components/Checkbox/Checkbox.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Checkbox/docs/CheckboxOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Checkbox/docs/CheckboxDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Checkbox/docs/CheckboxDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const CheckboxPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroupPage.tsx b/packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroupPage.tsx
index e681c9f912151..a695505af6102 100644
--- a/packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroupPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroupPage.tsx
@@ -1,16 +1,10 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PropertiesTableSet,
- PageMarkdown
-} from '@uifabric/example-app-base';
import { ChoiceGroupBasicExample } from './examples/ChoiceGroup.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { ChoiceGroupCustomExample } from './examples/ChoiceGroup.Custom.Example';
import { ChoiceGroupImageExample } from './examples/ChoiceGroup.Image.Example';
import { ChoiceGroupIconExample } from './examples/ChoiceGroup.Icon.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { ChoiceGroupStatus } from './ChoiceGroup.checklist';
const ChoiceGroupBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ChoiceGroup/examples/ChoiceGroup.Basic.Example.tsx') as string;
@@ -18,59 +12,48 @@ const ChoiceGroupCustomExampleCode = require('!raw-loader!office-ui-fabric-react
const ChoiceGroupImageExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ChoiceGroup/examples/ChoiceGroup.Image.Example.tsx') as string;
const ChoiceGroupIconExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ChoiceGroup/examples/ChoiceGroup.Icon.Example.tsx') as string;
-export class ChoiceGroupPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- allowNativeProps={true}
- nativePropsElement={'input'}
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroup.types.ts')
- ]}
- />
- }
- overview={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/ChoiceGroup/docs/ChoiceGroupOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/ChoiceGroup/docs/ChoiceGroupDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/ChoiceGroup/docs/ChoiceGroupDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const ChoiceGroupPageProps: IDemoPageProps = {
+ title: 'ChoiceGroup',
+ componentName: 'ChoiceGroup',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/ChoiceGroup',
+ componentStatus: ChoiceGroupStatus,
+ examples: [
+ {
+ title: 'Default ChoiceGroup',
+ code: ChoiceGroupBasicExampleCode,
+ view:
+ },
+ {
+ title: 'ChoiceGroup with dropdown',
+ code: ChoiceGroupCustomExampleCode,
+ view:
+ },
+ {
+ title: 'ChoiceGroups with images',
+ code: ChoiceGroupImageExampleCode,
+ view:
+ },
+ {
+ title: 'ChoiceGroup with icons',
+ code: ChoiceGroupIconExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroup.types.ts')
+ ],
+ overview: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ChoiceGroup/docs/ChoiceGroupOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/ChoiceGroup/docs/ChoiceGroupDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/ChoiceGroup/docs/ChoiceGroupDonts.md'),
+ isHeaderVisible: true,
+ allowNativeProps: true,
+ nativePropsElement: 'input'
+};
+
+export const ChoiceGroupPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/Coachmark/CoachmarkPage.tsx b/packages/office-ui-fabric-react/src/components/Coachmark/CoachmarkPage.tsx
index 1bca861fe9816..304b4e2fc71d7 100644
--- a/packages/office-ui-fabric-react/src/components/Coachmark/CoachmarkPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Coachmark/CoachmarkPage.tsx
@@ -1,54 +1,31 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PropertiesTableSet,
- PageMarkdown
-} from '@uifabric/example-app-base';
import { CoachmarkBasicExample } from './examples/Coachmark.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
const CoachmarkBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Coachmark/examples/Coachmark.Basic.Example.tsx') as string;
+export const CoachmarkPageProps: IDemoPageProps = {
+ title: 'Coachmark',
+ componentName: 'Coachmark',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Coachmark',
+ examples: [
+ {
+ title: 'Coachmark Basic',
+ code: CoachmarkBasicExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/Coachmark/Coachmark.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Coachmark/docs/CoachmarkOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Coachmark/docs/CoachmarkDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Coachmark/docs/CoachmarkDonts.md'),
+ isHeaderVisible: true
+};
-export class CoachmarkPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Coachmark/Coachmark.types.ts')
- ]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Coachmark/docs/CoachmarkOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Coachmark/docs/CoachmarkDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Coachmark/docs/CoachmarkDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- />
- );
- }
-}
+export const CoachmarkPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/Coachmark/PositioningContainer/PositioningContainerPage.tsx b/packages/office-ui-fabric-react/src/components/Coachmark/PositioningContainer/PositioningContainerPage.tsx
index 5794ce0cfb4e4..0e4d899fdb4b3 100644
--- a/packages/office-ui-fabric-react/src/components/Coachmark/PositioningContainer/PositioningContainerPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Coachmark/PositioningContainer/PositioningContainerPage.tsx
@@ -1,49 +1,32 @@
import * as React from 'react';
-import { ExampleCard, IComponentDemoPageProps, ComponentPage, PropertiesTableSet } from '@uifabric/example-app-base';
import { PositioningContainerBasicExample } from './examples/PositioningContainer.Basic.Example';
+import { DemoPage } from '../../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../../demo/components/DemoPage.types';
const CoachmarkBasicExampleCode = require('!raw-loader!experiments/src/components/PositioningContainer/examples/PositioningContainer.Basic.Example.tsx') as string;
-export class PositioningContainerPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!experiments/src/components/PositioningContainer/PositioningContainer.types.ts')
- ]}
- />
- }
- overview={
}
- bestPractices={
}
- dos={
-
- }
- donts={
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- />
- );
- }
-}
+export const PositioningContainerPageProps: IDemoPageProps = {
+ title: 'PositioningContainer',
+ componentName: 'PositioningContainer',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/PositioningContainer',
+ examples: [
+ {
+ title: 'Positioning Container Basic',
+ code: CoachmarkBasicExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!experiments/src/components/PositioningContainer/PositioningContainer.types.ts')
+ ],
+ overview: '',
+ bestPractices: '',
+ dos: '',
+ donts: '',
+ isHeaderVisible: true
+};
+
+export const PositioningContainerPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/ColorPicker/ColorPicker.tsx b/packages/office-ui-fabric-react/src/components/ColorPicker/ColorPicker.tsx
index 7ad24d38fd945..90dd1fa0579ec 100644
--- a/packages/office-ui-fabric-react/src/components/ColorPicker/ColorPicker.tsx
+++ b/packages/office-ui-fabric-react/src/components/ColorPicker/ColorPicker.tsx
@@ -55,85 +55,85 @@ export class ColorPicker extends BaseComponent
-
-
+
+
+
- {!this.props.alphaSliderHidden && (
+ { !this.props.alphaSliderHidden && (
- )}
-
+ ) }
+
-
- {this.props.hexLabel}
- {this.props.redLabel}
- {this.props.greenLabel}
- {this.props.blueLabel}
- {!this.props.alphaSliderHidden && {this.props.alphaLabel} }
+
+ { this.props.hexLabel }
+ { this.props.redLabel }
+ { this.props.greenLabel }
+ { this.props.blueLabel }
+ { !this.props.alphaSliderHidden && { this.props.alphaLabel } }
(this.hexText = ref!)}
- onBlur={this._onHexChanged}
- spellCheck={false}
+ className={ css('ms-ColorPicker-input', styles.input) }
+ value={ color.hex }
+ ref={ ref => (this.hexText = ref!) }
+ onBlur={ this._onHexChanged }
+ spellCheck={ false }
/>
-
+
(this.rText = ref!)}
- spellCheck={false}
+ className={ css('ms-ColorPicker-input', styles.input) }
+ onBlur={ this._onRGBAChanged }
+ value={ String(color.r) }
+ ref={ ref => (this.rText = ref!) }
+ spellCheck={ false }
/>
-
+
(this.gText = ref!)}
- spellCheck={false}
+ className={ css('ms-ColorPicker-input', styles.input) }
+ onBlur={ this._onRGBAChanged }
+ value={ String(color.g) }
+ ref={ ref => (this.gText = ref!) }
+ spellCheck={ false }
/>
-
+
(this.bText = ref!)}
- spellCheck={false}
+ className={ css('ms-ColorPicker-input', styles.input) }
+ onBlur={ this._onRGBAChanged }
+ value={ String(color.b) }
+ ref={ ref => (this.bText = ref!) }
+ spellCheck={ false }
/>
- {!this.props.alphaSliderHidden && (
-
+ { !this.props.alphaSliderHidden && (
+
(this.aText = ref!)}
- spellCheck={false}
+ className={ css('ms-ColorPicker-input', styles.input) }
+ onBlur={ this._onRGBAChanged }
+ value={ String(color.a) }
+ ref={ ref => (this.aText = ref!) }
+ spellCheck={ false }
/>
- )}
+ ) }
diff --git a/packages/office-ui-fabric-react/src/components/ColorPicker/ColorPickerPage.tsx b/packages/office-ui-fabric-react/src/components/ColorPicker/ColorPickerPage.tsx
index 6963448afaae7..8ff6b771731bc 100644
--- a/packages/office-ui-fabric-react/src/components/ColorPicker/ColorPickerPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/ColorPicker/ColorPickerPage.tsx
@@ -1,46 +1,35 @@
-import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PropertiesTableSet,
- PageMarkdown
-} from '@uifabric/example-app-base';
-import { ColorPickerBasicExample } from './examples/ColorPicker.Basic.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
-import { ColorPickerStatus } from './ColorPicker.checklist';
-
-const ColorPickerBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ColorPicker/examples/ColorPicker.Basic.Example.tsx') as string;
-
-export class ColorPickerPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/ColorPicker/ColorPicker.types.ts')
- ]}
- />
- }
- overview={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/ColorPicker/docs/ColorPickerOverview.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+import * as React from 'react';
+import { ColorPickerBasicExample } from './examples/ColorPicker.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
+import { ColorPickerStatus } from './ColorPicker.checklist';
+
+const ColorPickerBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ColorPicker/examples/ColorPicker.Basic.Example.tsx') as string;
+export const ColorPickerPageProps: IDemoPageProps = {
+ title: 'ColorPicker',
+ componentName: 'ColorPicker',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/ColorPicker',
+ componentStatus: ColorPickerStatus,
+ examples: [
+ {
+ title: 'Default ColorPicker',
+ code: ColorPickerBasicExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/ColorPicker/ColorPicker.types.ts')
+ ],
+ overview: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ColorPicker/docs/ColorPickerOverview.md'),
+ bestPractices: '',
+ dos: '',
+ donts: '',
+ isHeaderVisible: true
+};
+
+export const ColorPickerPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/ComboBox/ComboBoxPage.tsx b/packages/office-ui-fabric-react/src/components/ComboBox/ComboBoxPage.tsx
index 6fa35c8034e83..6f8cc91cc5ec8 100644
--- a/packages/office-ui-fabric-react/src/components/ComboBox/ComboBoxPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/ComboBox/ComboBoxPage.tsx
@@ -1,61 +1,42 @@
-import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PropertiesTableSet,
- PageMarkdown
-} from '@uifabric/example-app-base';
-import { ComboBoxBasicExample } from './examples/ComboBox.Basic.Example';
-import { ComboBoxCustomStyledExample } from './examples/ComboBox.CustomStyled.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
-import { ComboBoxStatus } from './ComboBox.checklist';
-
-const ComboBoxBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ComboBox/examples/ComboBox.Basic.Example.tsx') as string;
-const ComboBoxCustomStyledExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ComboBox/examples/ComboBox.CustomStyled.Example.tsx') as string;
-
-export class ComboBoxPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
- }
- allowNativeProps={true}
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/ComboBox/ComboBox.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/ComboBox/docs/ComboBoxOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/ComboBox/docs/ComboBoxDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/ComboBox/docs/ComboBoxDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+import * as React from 'react';
+import { ComboBoxBasicExample } from './examples/ComboBox.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
+import { ComboBoxCustomStyledExample } from './examples/ComboBox.CustomStyled.Example';
+import { ComboBoxStatus } from './ComboBox.checklist';
+
+const ComboBoxBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ComboBox/examples/ComboBox.Basic.Example.tsx') as string;
+const ComboBoxCustomStyledExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ComboBox/examples/ComboBox.CustomStyled.Example.tsx') as string;
+
+export const ComboBoxPageProps: IDemoPageProps = {
+ title: 'ComboBox',
+ componentName: 'ComboBox',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/ComboBox',
+ componentStatus: ComboBoxStatus,
+ examples: [
+ {
+ title: 'ComboBox',
+ code: ComboBoxBasicExampleCode,
+ view:
+ },
+ {
+ title: 'ComboBoxCustomStyled',
+ code: ComboBoxCustomStyledExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/ComboBox/ComboBox.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/ComboBox/docs/ComboBoxOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/ComboBox/docs/ComboBoxDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/ComboBox/docs/ComboBoxDonts.md'),
+ isHeaderVisible: true,
+ allowNativeProps: true
+};
+
+export const ComboBoxPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/CommandBar/CommandBarPage.tsx b/packages/office-ui-fabric-react/src/components/CommandBar/CommandBarPage.tsx
index 4a8b268106eb5..e197bb39e1ed1 100644
--- a/packages/office-ui-fabric-react/src/components/CommandBar/CommandBarPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/CommandBar/CommandBarPage.tsx
@@ -1,14 +1,7 @@
import * as React from 'react';
-import {
- ComponentPage,
- ExampleCard,
- IComponentDemoPageProps,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
-
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { CommandBarStatus } from './CommandBar.checklist';
import { ICommandBarProps } from './CommandBar.types';
import { CommandBarBasicExample } from './examples/CommandBar.Basic.Example';
@@ -19,54 +12,41 @@ const CommandBarBasicExampleCode = require('!raw-loader!office-ui-fabric-react/s
const CommandBarButtonAsExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/CommandBar/examples/CommandBar.ButtonAs.Example.tsx') as string;
-export class CommandBarPage extends React.Component {
- public render(): JSX.Element {
- const cmdBarParamsTextAndIcons: ICommandBarProps = { items, overflowItems, farItems };
+const cmdBarParamsTextAndIcons: ICommandBarProps = {
+ items,
+ overflowItems,
+ farItems
+};
+
+export const CommandBarPageProps: IDemoPageProps = {
+ title: 'CommandBar',
+ componentName: 'CommandBar',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/CommandBar',
+ componentStatus: CommandBarStatus,
+ examples: [
+ {
+ title: 'CommandBar with overflowing menu items',
+ code: CommandBarBasicExampleCode,
+ view:
+ },
+ {
+ title: 'CommandBar custom buttons',
+ code: CommandBarButtonAsExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/CommandBar/CommandBar.types.ts'),
+ require('!raw-loader!office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/CommandBar/docs/CommandBarOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/CommandBar/docs/CommandBarDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/CommandBar/docs/CommandBarDonts.md'),
+ isHeaderVisible: true
+};
- return (
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/CommandBar/CommandBar.types.ts'),
- require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.types.ts')
- ]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/CommandBar/docs/CommandBarOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/CommandBar/docs/CommandBarDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/CommandBar/docs/CommandBarDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const CommandBarPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenuPage.tsx b/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenuPage.tsx
index 2ab09479a304f..cd144e11809de 100644
--- a/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenuPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenuPage.tsx
@@ -1,12 +1,7 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PropertiesTableSet,
- PageMarkdown
-} from '@uifabric/example-app-base';
import { ContextualMenuBasicExample } from './examples/ContextualMenu.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { ContextualMenuIconExample } from './examples/ContextualMenu.Icon.Example';
import { ContextualMenuIconSecondaryTextExample } from './examples/ContextualMenu.Icon.SecondaryText.Example';
import { ContextualMenuSectionExample } from './examples/ContextualMenu.Section.Example';
@@ -17,7 +12,6 @@ import { ContextualMenuDirectionalExample } from './examples/ContextualMenu.Dire
import { ContextualMenuCustomizationExample } from './examples/ContextualMenu.Customization.Example';
import { ContextualMenuWithScrollBarExample } from './examples/ContextualMenu.ScrollBar.Example';
import { ContextualMenuWithCustomMenuItemExample } from './examples/ContextualMenu.CustomMenuItem.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { ContextualMenuStatus } from './ContextualMenu.checklist';
const ContextualMenuBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ContextualMenu/examples/ContextualMenu.Basic.Example.tsx') as string;
@@ -31,103 +25,84 @@ const ContextualMenuCustomizationExampleCode = require('!raw-loader!office-ui-fa
const ContextualMenuWithScrollBarExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ContextualMenu/examples/ContextualMenu.ScrollBar.Example.tsx') as string;
const ContextualMenuWithCustomMenuItemExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ContextualMenu/examples/ContextualMenu.CustomMenuItem.Example.tsx') as string;
-export class ContextualMenuPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.types.ts'),
- require('!raw-loader!office-ui-fabric-react/src/components/Callout/Callout.types.ts')
- ]}
- />
- }
- overview={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/ContextualMenu/docs/ContextualMenuOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/ContextualMenu/docs/ContextualMenuDos.md')}
-
- }
- donts={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/ContextualMenu/docs/ContextualMenuDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const ContextualMenuPageProps: IDemoPageProps = {
+ title: 'ContextualMenu',
+ componentName: 'ContextualMenu',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/ContextualMenu',
+ componentStatus: ContextualMenuStatus,
+ examples: [
+ {
+ title: 'Default ContextualMenu',
+ code: ContextualMenuBasicExampleCode,
+ view:
+ },
+ {
+ title: 'ContextualMenu with icons',
+ code: ContextualMenuIconExampleCode,
+ view:
+ },
+ {
+ title: 'ContextualMenu with icons and secondary text',
+ code: ContextualMenuIconSecondaryTextExampleCode,
+ view:
+ },
+ {
+ title: 'ContextualMenu with submenus',
+ code: ContextualMenuSubmenuExampleCode,
+ view:
+ },
+ {
+ title: 'ContextualMenu with section headers',
+ code: ContextualMenuSectionExampleCode,
+ view:
+ },
+ {
+ title: 'ContextualMenu with checkable menu items and toggleable split button',
+ code: ContextualMenuCheckmarksExampleCode,
+ view:
+ },
+ {
+ title: 'ContextualMenu with beak and directional settings',
+ code: ContextualMenuDirectionalExampleCode,
+ view:
+ },
+ {
+ title: 'ContextualMenu with customized submenus',
+ code: ContextualMenuCustomizationExampleCode,
+ view:
+ },
+ {
+ title: 'ContextualMenu with customized submenus and noWrap attributes',
+ code: ContextualMenuSubmenuExampleCode,
+ view:
+ },
+ {
+ title: 'ContextualMenu with a scroll bar and fixed direction',
+ code: ContextualMenuWithScrollBarExampleCode,
+ view:
+ },
+ {
+ title: 'ContextualMenu with custom rendered menu items',
+ code: ContextualMenuWithCustomMenuItemExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.types.ts'),
+ require('!raw-loader!office-ui-fabric-react/src/components/Callout/Callout.types.ts')
+ ],
+ overview: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ContextualMenu/docs/ContextualMenuOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/ContextualMenu/docs/ContextualMenuDos.md'),
+ donts: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ContextualMenu/docs/ContextualMenuDonts.md'),
+ isHeaderVisible: true
+};
+
+export const ContextualMenuPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/DatePicker/DatePickerPage.tsx b/packages/office-ui-fabric-react/src/components/DatePicker/DatePickerPage.tsx
index d538818793da7..892ffdf42d821 100644
--- a/packages/office-ui-fabric-react/src/components/DatePicker/DatePickerPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/DatePicker/DatePickerPage.tsx
@@ -1,18 +1,12 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PropertiesTableSet,
- PageMarkdown
-} from '@uifabric/example-app-base';
import { DatePickerBasicExample } from './examples/DatePicker.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { DatePickerWeekNumbersExample } from './examples/DatePicker.WeekNumbers.Example';
import { DatePickerRequiredExample } from './examples/DatePicker.Required.Example';
import { DatePickerInputExample } from './examples/DatePicker.Input.Example';
import { DatePickerFormatExample } from './examples/DatePicker.Format.Example';
import { DatePickerBoundedExample } from './examples/DatePicker.Bounded.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { DatePickerStatus } from './DatePicker.checklist';
const DatePickerBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/DatePicker/examples/DatePicker.Basic.Example.tsx') as string;
@@ -22,61 +16,54 @@ const DatePickerInputExampleCode = require('!raw-loader!office-ui-fabric-react/s
const DatePickerFormatExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/DatePicker/examples/DatePicker.Format.Example.tsx') as string;
const DatePickerBoundedExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/DatePicker/examples/DatePicker.Bounded.Example.tsx') as string;
-export class DatePickerPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/DatePicker/DatePicker.types.ts')
- ]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/DatePicker/docs/DatePickerOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/DatePicker/docs/DatePickerDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/DatePicker/docs/DatePickerDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const DatePickerPageProps: IDemoPageProps = {
+ title: 'DatePicker',
+ componentName: 'DatePicker',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/DatePicker',
+ componentStatus: DatePickerStatus,
+ examples: [
+ {
+ title: 'Default DatePicker',
+ code: DatePickerBasicExampleCode,
+ view:
+ },
+ {
+ title: 'DatePicker with week numbers',
+ code: DatePickerWeekNumbersExampleCode,
+ view:
+ },
+ {
+ title: 'DatePicker with required field',
+ code: DatePickerRequiredExampleCode,
+ view:
+ },
+ {
+ title: 'DatePicker allows input date string',
+ code: DatePickerInputExampleCode,
+ view:
+ },
+ {
+ title: 'DatePicker allows dates to be formatted',
+ code: DatePickerFormatExampleCode,
+ view:
+ },
+ {
+ title: 'DatePicker with date boundary (minDate, maxDate)',
+ code: DatePickerBoundedExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/DatePicker/DatePicker.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/DatePicker/docs/DatePickerOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/DatePicker/docs/DatePickerDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/DatePicker/docs/DatePickerDonts.md'),
+ isHeaderVisible: true
+};
+
+export const DatePickerPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsListPage.tsx b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsListPage.tsx
index 31c7bd89e2b9d..43b26e440cf31 100644
--- a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsListPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsListPage.tsx
@@ -1,12 +1,6 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { DetailsListStatus } from './DetailsList.checklist';
import { DetailsListBasicExample } from './examples/DetailsList.Basic.Example';
@@ -39,107 +33,76 @@ const DetailsListDocumentsExampleCode = require('!raw-loader!office-ui-fabric-re
import { DetailsListNavigatingFocusExample } from './examples/DetailsList.NavigatingFocus.Example';
const DetailsListNavigatingFocusExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/DetailsList/examples/DetailsList.NavigatingFocus.Example.tsx') as string;
-export class DetailsListPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ,
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/DetailsList/DetailsList.types.ts')
- ]}
- />
- }
- overview={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/DetailsList/docs/DetailsListOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/DetailsList/docs/DetailsListDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/DetailsList/docs/DetailsListDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const DetailsListPageProps: IDemoPageProps = {
+ title: 'DetailsList',
+ componentName: 'DetailsList',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/DetailsList',
+ componentStatus: DetailsListStatus,
+ examples: [
+ {
+ title: 'Document DetailsList with 500 items, sorting, filtering, marquee selection, justified columns',
+ code: DetailsListDocumentsExampleCode,
+ view:
+ },
+ {
+ title: 'Simple DetailsList with 500 items, filtering, marquee selection',
+ code: DetailsListBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Compact DetailsList with 500 items, filtering, marquee selection',
+ code: DetailsListCompactExampleCode,
+ view:
+ },
+ {
+ title: 'Simple Grouped DetailsList',
+ code: DetailsListGroupedExampleCode,
+ view:
+ },
+ {
+ title: 'Rendering custom item columns with sorting',
+ code: DetailsListCustomColumnsExampleCode,
+ view:
+ },
+ {
+ title: 'Rendering custom item rows',
+ code: DetailsListCustomRowsExampleCode,
+ view:
+ },
+ {
+ title: 'Rendering custom group headers',
+ code: DetailsListCustomGroupHeadersExampleCode,
+ view:
+ },
+ {
+ title: 'Advanced DetailsList of 5000 items, variable row heights',
+ code: DetailsListAdvancedExampleCode,
+ view:
+ },
+ {
+ title: 'Drag and Drop DetailsList with 10 items',
+ code: DetailsListDragDropExampleCode,
+ view:
+ },
+ {
+ title: 'Navigating to new content preserving keyboard focus with initialFocusedIndex',
+ code: DetailsListNavigatingFocusExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/DetailsList/DetailsList.types.ts')
+ ],
+ overview: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/DetailsList/docs/DetailsListOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/DetailsList/docs/DetailsListDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/DetailsList/docs/DetailsListDonts.md'),
+ isHeaderVisible: true
+};
+
+export const DetailsListPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/Dialog/DialogPage.tsx b/packages/office-ui-fabric-react/src/components/Dialog/DialogPage.tsx
index d5369c58b329b..be27cb2eb2827 100644
--- a/packages/office-ui-fabric-react/src/components/Dialog/DialogPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Dialog/DialogPage.tsx
@@ -1,74 +1,63 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { DialogBasicExample } from './examples/Dialog.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { DialogLargeHeaderExample } from './examples/Dialog.LargeHeader.Example';
import { DialogBlockingExample } from './examples/Dialog.Blocking.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { DialogStatus } from './Dialog.checklist';
const DialogBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Dialog/examples/Dialog.Basic.Example.tsx') as string;
const DialogLargeHeaderExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Dialog/examples/Dialog.LargeHeader.Example.tsx') as string;
const DialogBlockingExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Dialog/examples/Dialog.Blocking.Example.tsx') as string;
-export class DialogPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
- Use this Dialog sparingly, when calling extra attention to the content. It can be used in situations
- where you want to teach the user something or notify them of an important change.
-
-
-
-
-
- A blocking Dialog disables all other actions and commands on the page behind it. They should be used
- very sparingly, only when it is critical that the user makes a choice or provides information before
- they can proceed. Blocking Dialogs are generally used for irreversible or potentially destructive tasks.
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Dialog/Dialog.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Dialog/docs/DialogOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Dialog/docs/DialogDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Dialog/docs/DialogDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const DialogPageProps: IDemoPageProps = {
+ title: 'Dialog',
+ componentName: 'Dialog',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Dialog',
+ componentStatus: DialogStatus,
+ examples: [
+ {
+ title: 'Default Dialog',
+ code: DialogBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Dialog with large header and ChoiceGroup',
+ code: DialogLargeHeaderExampleCode,
+ view: (
+ <>
+
+ Use this Dialog sparingly, when calling extra attention to the content. It can be used in situations where
+ you want to teach the user something or notify them of an important change.
+
+
+ >
+ )
+ },
+ {
+ title: 'Blocking Dialog',
+ code: DialogBlockingExampleCode,
+ view: (
+ <>
+
+ A blocking Dialog disables all other actions and commands on the page behind it. They should be used very
+ sparingly, only when it is critical that the user makes a choice or provides information before they can
+ proceed. Blocking Dialogs are generally used for irreversible or potentially destructive tasks.
+
+
+ >
+ )
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/Dialog/Dialog.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Dialog/docs/DialogOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Dialog/docs/DialogDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Dialog/docs/DialogDonts.md'),
+ isHeaderVisible: true
+};
+
+export const DialogPage = (props: { isHeaderVisible: boolean }) => ;
diff --git a/packages/office-ui-fabric-react/src/components/Divider/DividerPage.tsx b/packages/office-ui-fabric-react/src/components/Divider/DividerPage.tsx
index f7c7aeeb87552..0c98386c4e6e3 100644
--- a/packages/office-ui-fabric-react/src/components/Divider/DividerPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Divider/DividerPage.tsx
@@ -1,67 +1,42 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { VerticalDividerBasicExample } from './examples/VerticalDivider.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { VerticalDividerCustomExample } from './examples/VerticalDivider.Custom.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { DividerStatus } from './Divider.checklist';
const VerticalDividerBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Divider/examples/VerticalDivider.Basic.Example.tsx') as string;
const VerticalDividerCustomExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Divider/examples/VerticalDivider.Custom.Example.tsx') as string;
-export class DividerPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Divider/VerticalDivider.types.ts')
- ]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Divider/docs/DividerOverview.md')}
-
- }
- bestPractices={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Divider/docs/DividerBestPractices.md')}
-
- }
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Divider/docs/DividerDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Divider/docs/DividerDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const DividerPageProps: IDemoPageProps = {
+ title: 'Divider',
+ componentName: 'Divider',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Divider',
+ componentStatus: DividerStatus,
+ examples: [
+ {
+ title: 'Vertical Divider',
+ code: VerticalDividerBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Custom Vertical Divider',
+ code: VerticalDividerCustomExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/Divider/VerticalDivider.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Divider/docs/DividerOverview.md'),
+ bestPractices: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/Divider/docs/DividerBestPractices.md'),
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Divider/docs/DividerDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Divider/docs/DividerDonts.md'),
+ isHeaderVisible: true
+};
+
+export const DividerPage = (props: { isHeaderVisible: boolean }) => ;
diff --git a/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCardPage.tsx b/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCardPage.tsx
index c62f3e23e036f..2968e74658420 100644
--- a/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCardPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCardPage.tsx
@@ -1,88 +1,76 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { DocumentCardBasicExample } from './examples/DocumentCard.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { DocumentCardCompleteExample } from './examples/DocumentCard.Complete.Example';
import { DocumentCardCompactExample } from './examples/DocumentCard.Compact.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { DocumentCardStatus } from './DocumentCard.checklist';
const DocumentCardBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/DocumentCard/examples/DocumentCard.Basic.Example.tsx') as string;
const DocumentCardCompleteExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/DocumentCard/examples/DocumentCard.Complete.Example.tsx') as string;
const DocumentCardCompactExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/DocumentCard/examples/DocumentCard.Compact.Example.tsx') as string;
-export class DocumentCardPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
- The default configuration for a card represents a single file, with space to denote the last significant
- event and the person involved.
-
-
-
-
-
- This example shows a couple of optional abilities, including being able to have a card represent
- multiple items, being able to expose up to three relevant commands, and showing the number of views in
- the bottom right corner.
-
- Also show a card with Logo, text preview and status that is used for Conversation card.
-
-
-
-
- When showing a card on a mobile device or a similarly narrow layout, you may choose this Compact layout
- which helps the filename remain scannable while giving roomy space for a preview thumbnail.
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/DocumentCard/DocumentCard.types.ts')
- ]}
- />
- }
- overview={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/DocumentCard/docs/DocumentCardOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/DocumentCard/docs/DocumentCardDos.md')}
-
- }
- donts={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/DocumentCard/docs/DocumentCardDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const DocumentCardPageProps: IDemoPageProps = {
+ title: 'DocumentCard',
+ componentName: 'DocumentCard',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/DocumentCard',
+ componentStatus: DocumentCardStatus,
+ examples: [
+ {
+ title: 'Default DocumentCard',
+ code: DocumentCardBasicExampleCode,
+ view: (
+ <>
+
+ The default configuration for a card represents a single file, with space to denote the last significant
+ event and the person involved.
+
+
+ >
+ )
+ },
+ {
+ title: 'DocumentCard with multiple items, commands, and views',
+ code: DocumentCardCompleteExampleCode,
+ view: (
+ <>
+
+ This example shows a couple of optional abilities, including being able to have a card represent multiple
+ items, being able to expose up to three relevant commands, and showing the number of views in the bottom
+ right corner.
+
+ Also show a card with Logo, text preview and status that is used for Conversation card.
+
+ >
+ )
+ },
+ {
+ title: 'DocumentCard with compact layout ',
+ code: DocumentCardCompactExampleCode,
+ view: (
+ <>
+
+ When showing a card on a mobile device or a similarly narrow layout, you may choose this Compact layout
+ which helps the filename remain scannable while giving roomy space for a preview thumbnail.
+
+
+ >
+ )
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/DocumentCard/DocumentCard.types.ts')
+ ],
+ overview: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/DocumentCard/docs/DocumentCardOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/DocumentCard/docs/DocumentCardDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/DocumentCard/docs/DocumentCardDonts.md'),
+ isHeaderVisible: true
+};
+
+export const DocumentCardPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/Dropdown/DropdownPage.tsx b/packages/office-ui-fabric-react/src/components/Dropdown/DropdownPage.tsx
index b7c44ed2f5a7b..9361390faf016 100644
--- a/packages/office-ui-fabric-react/src/components/Dropdown/DropdownPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Dropdown/DropdownPage.tsx
@@ -1,72 +1,52 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { DropdownBasicExample } from './examples/Dropdown.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { DropdownCustomExample } from './examples/Dropdown.Custom.Example';
import { DropdownErrorExample } from './examples/Dropdown.Error.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { DropdownStatus } from './Dropdown.checklist';
const DropdownBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Dropdown/examples/Dropdown.Basic.Example.tsx') as string;
const DropdownCustomExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Dropdown/examples/Dropdown.Custom.Example.tsx') as string;
const DropdownErrorExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Dropdown/examples/Dropdown.Error.Example.tsx') as string;
-export class DropdownPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
+export const DropdownPageProps: IDemoPageProps = {
+ title: 'Dropdown',
+ componentName: 'Dropdown',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Dropdown',
+ componentStatus: DropdownStatus,
+ examples: [
+ {
+ title: 'Dropdown',
+ code: DropdownBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Customized Dropdown',
+ code: DropdownCustomExampleCode,
+ view:
+ },
+ {
+ title: 'Dropdown with Error Message',
+ code: DropdownErrorExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/Dropdown/Dropdown.types.ts'),
+ require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/utilities/selectableOption/SelectableDroppableText.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Dropdown/docs/DropdownOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Dropdown/docs/DropdownDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Dropdown/docs/DropdownDonts.md'),
+ isHeaderVisible: true,
+ allowNativeProps: true
+};
-
-
-
-
-
-
-
- }
- allowNativeProps={true}
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Dropdown/Dropdown.types.ts'),
- require<
- string
- >('!raw-loader!office-ui-fabric-react/src/utilities/selectableOption/SelectableDroppableText.types.ts')
- ]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Dropdown/docs/DropdownOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Dropdown/docs/DropdownDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Dropdown/docs/DropdownDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const DropdownPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/ExtendedPicker/PeoplePicker/ExtendedPeoplePickerPage.tsx b/packages/office-ui-fabric-react/src/components/ExtendedPicker/PeoplePicker/ExtendedPeoplePickerPage.tsx
index b758bfc6fce4e..f8152df062315 100644
--- a/packages/office-ui-fabric-react/src/components/ExtendedPicker/PeoplePicker/ExtendedPeoplePickerPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/ExtendedPicker/PeoplePicker/ExtendedPeoplePickerPage.tsx
@@ -1,71 +1,40 @@
import * as React from 'react';
-import { ExampleCard, ComponentPage, IComponentDemoPageProps, PropertiesTableSet } from '@uifabric/example-app-base';
import { ExtendedPeoplePickerTypesExample } from '../examples/ExtendedPeoplePicker.Basic.Example';
+import { DemoPage } from '../../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../../demo/components/DemoPage.types';
+
const ExtendedPeoplePickerBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ExtendedPicker/examples/ExtendedPeoplePicker.Basic.Example.tsx') as string;
+export const ExtendedPeoplePickerPageProps: IDemoPageProps = {
+ title: 'ExtendedPeoplePicker',
+ componentName: 'ExtendedPeoplePicker',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/ExtendedPeoplePicker',
+ examples: [
+ {
+ title: 'Extended People Picker',
+ code: ExtendedPeoplePickerBasicExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/ExtendedPicker/BaseExtendedPicker.types.ts')
+ ],
+ overview: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerOverview.md'),
+ bestPractices: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerBestPractices.md'),
+ dos: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerDos.md'),
+ donts: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerDonts.md'),
+ isHeaderVisible: true
+};
-export class ExtendedPeoplePickerPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/ExtendedPicker/BaseExtendedPicker.types.ts')
- ]}
- />
- }
- overview={
-
-
- ExtendedPeoplePicker are used to pick recipients. The difference between this and the current PeoplePicker
- are:
-
-
- Will remove selected items on backspace even if there is text in the input area
-
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- bestPractices={
-
- The ExtendedPeoplePicker is used to select one or more entities, such as people or groups. Entry points for
- ExtendedPeoplePicker are typically specialized TextField-like input fields known as a "well", which are used
- to search for recipients from a list. When a recipient is selected from the list, it is added to the well as
- a specialized Persona that can be interacted with or removed. Clicking on a Persona from the well should
- invoke a PersonaCard or open a profile pane for that recipient.
-
- }
- dos={
-
-
- Use the ExtendedPeoplePicker to quickly search for a few people
- Use the ExtendedPeoplePicker to manage a group of people
- Use defaultSelectedItems when some people have already been selected
-
-
- }
- donts={
-
-
- Use the ExtendedPeoplePicker to select something other than people
- Use the ExtendedPeoplePicker to only display people
- Use the ExtendedPeoplePicker without sufficient space
-
-
- }
- />
- );
- }
-}
+export const ExtendedPeoplePickerPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerBestPractices.md b/packages/office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerBestPractices.md
new file mode 100644
index 0000000000000..4e0c9e300fcca
--- /dev/null
+++ b/packages/office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerBestPractices.md
@@ -0,0 +1,4 @@
+The ExtendedPeoplePicker is used to select one or more entities, such as people or groups. Entry points for
+ExtendedPeoplePicker are typically specialized TextField-like input fields known as a "well", which are used to search for recipients from a list. When
+a recipient is selected from the list, it is added to the well as a specialized Persona that can be interacted with or removed.
+Clicking on a Persona from the well should invoke a PersonaCard or open a profile pane for that recipient.
diff --git a/packages/office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerDonts.md b/packages/office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerDonts.md
new file mode 100644
index 0000000000000..55e11adfc4f6f
--- /dev/null
+++ b/packages/office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerDonts.md
@@ -0,0 +1,3 @@
+- Use the ExtendedPeoplePicker to select something other than people
+- Use the ExtendedPeoplePicker to only display people
+- Use the ExtendedPeoplePicker without sufficient space
diff --git a/packages/office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerDos.md b/packages/office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerDos.md
new file mode 100644
index 0000000000000..18c7be162cbbb
--- /dev/null
+++ b/packages/office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerDos.md
@@ -0,0 +1,3 @@
+- Use the ExtendedPeoplePicker to quickly search for a few people
+- Use the ExtendedPeoplePicker to manage a group of people
+- Use defaultSelectedItems when some people have already been selected
diff --git a/packages/office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerOverview.md b/packages/office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerOverview.md
new file mode 100644
index 0000000000000..84e83ae487310
--- /dev/null
+++ b/packages/office-ui-fabric-react/src/components/ExtendedPicker/docs/ExtendedPeoplePickerOverview.md
@@ -0,0 +1,3 @@
+ExtendedPeoplePicker are used to pick recipients. The difference between this and the current PeoplePicker are:
+
+- Will remove selected items on backspace even if there is text in the input area
diff --git a/packages/office-ui-fabric-react/src/components/Facepile/FacepilePage.tsx b/packages/office-ui-fabric-react/src/components/Facepile/FacepilePage.tsx
index ef33752f8ee4c..277d55c3ae3d4 100644
--- a/packages/office-ui-fabric-react/src/components/Facepile/FacepilePage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Facepile/FacepilePage.tsx
@@ -1,65 +1,48 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { FacepileAddFaceExample } from './examples/Facepile.AddFace.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { FacepileBasicExample } from './examples/Facepile.Basic.Example';
import { FacepileOverflowExample } from './examples/Facepile.Overflow.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { FacepileStatus } from './Facepile.checklist';
const FacepileAddFaceExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Facepile/examples/Facepile.AddFace.Example.tsx') as string;
const FacepileBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Facepile/examples/Facepile.Basic.Example.tsx') as string;
const FacepileOverflowExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Facepile/examples/Facepile.Overflow.Example.tsx') as string;
-export class FacepilePage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Facepile/Facepile.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Facepile/docs/FacepileOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Facepile/docs/FacepileDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Facepile/docs/FacepileDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const FacepilePageProps: IDemoPageProps = {
+ title: 'Facepile',
+ componentName: 'Facepile',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Facepile',
+ componentStatus: FacepileStatus,
+ examples: [
+ {
+ title: 'Facepile with size and fade in options',
+ code: FacepileBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Facepile with overflow buttons',
+ code: FacepileOverflowExampleCode,
+ view:
+ },
+ {
+ title: 'Facepile with face adding functionality',
+ code: FacepileAddFaceExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/Facepile/Facepile.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Facepile/docs/FacepileOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Facepile/docs/FacepileDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Facepile/docs/FacepileDonts.md'),
+ isHeaderVisible: true
+};
+
+export const FacepilePage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/FloatingPeoplePickerPage.tsx b/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/FloatingPeoplePickerPage.tsx
index a0ba6df73cbf5..dd74f90ba5317 100644
--- a/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/FloatingPeoplePickerPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/FloatingPeoplePickerPage.tsx
@@ -1,66 +1,40 @@
import * as React from 'react';
-import { ExampleCard, ComponentPage, IComponentDemoPageProps, PropertiesTableSet } from '@uifabric/example-app-base';
import { FloatingPeoplePickerTypesExample } from '../PeoplePicker/examples/FloatingPeoplePicker.Basic.Example';
+import { DemoPage } from '../../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../../demo/components/DemoPage.types';
+
const FloatingPeoplePickerBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/examples/FloatingPeoplePicker.Basic.Example.tsx') as string;
+export const FloatingPeoplePickerPageProps: IDemoPageProps = {
+ title: 'FloatingPeoplePicker',
+ componentName: 'FloatingPeoplePicker',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/FloatingPeoplePicker',
+ examples: [
+ {
+ title: 'Floating People Picker',
+ code: FloatingPeoplePickerBasicExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/FloatingPicker/BaseFloatingPicker.types.ts')
+ ],
+ overview: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerOverview.md'),
+ bestPractices: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerBestPractices.md'),
+ dos: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerDos.md'),
+ donts: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerDonts.md'),
+ isHeaderVisible: true
+};
-export class FloatingPeoplePickerPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/FloatingPicker/BaseFloatingPicker.types.ts')
- ]}
- />
- }
- overview={
-
-
- {' '}
- FloatingPeoplePicker are used to pick recipients but do not need a well or necessarily keep track of
- selected people
-
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- bestPractices={
-
- The FloatingPeoplePicker is used to select one or more entities, such as people or groups. Entry points for
- PeoplePickers are typically specialized TextField-like input fields known as a "well", which are used to
- search for recipients from a list. When a recipient is selected from the list, it is added to the well as a
- specialized Persona that can be interacted with or removed. Clicking on a Persona from the well should
- invoke a PersonaCard or open a profile pane for that recipient.
-
- }
- dos={
-
-
- Use the FloatingPeoplePicker to quickly search for a few people
-
-
- }
- donts={
-
-
- Use the FloatingPeoplePicker to select something other than people
- Use the FloatingPeoplePicker without sufficient space
-
-
- }
- />
- );
- }
-}
+export const FloatingPeoplePickerPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerBestPractices.md b/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerBestPractices.md
new file mode 100644
index 0000000000000..e2ba00d00c753
--- /dev/null
+++ b/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerBestPractices.md
@@ -0,0 +1,4 @@
+The FloatingPeoplePicker is used to select one or more entities, such as people or groups. Entry points for PeoplePickers
+are typically specialized TextField-like input fields known as a "well", which are used to search for recipients from a list.
+When a recipient is selected from the list, it is added to the well as a specialized Persona that can be interacted with or
+removed. Clicking on a Persona from the well should invoke a PersonaCard or open a profile pane for that recipient.
diff --git a/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerDonts.md b/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerDonts.md
new file mode 100644
index 0000000000000..a30903a6e23c3
--- /dev/null
+++ b/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerDonts.md
@@ -0,0 +1,2 @@
+- Use the FloatingPeoplePicker to select something other than people
+- Use the FloatingPeoplePicker without sufficient space
diff --git a/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerDos.md b/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerDos.md
new file mode 100644
index 0000000000000..9311f7ac2b1a5
--- /dev/null
+++ b/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerDos.md
@@ -0,0 +1 @@
+- Use the FloatingPeoplePicker to quickly search for a few people
diff --git a/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerOverview.md b/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerOverview.md
new file mode 100644
index 0000000000000..90b332952b8f6
--- /dev/null
+++ b/packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/docs/FloatingPeoplePickerOverview.md
@@ -0,0 +1 @@
+FloatingPeoplePicker are used to pick recipients but do not need a well or necessarily keep track of selected people
diff --git a/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.test.tsx b/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.test.tsx
index 9e89154caca6c..e7965d95559a1 100644
--- a/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.test.tsx
+++ b/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import * as ReactTestUtils from 'react-dom/test-utils';
-import { KeyCodes } from '../../Utilities';
+import { KeyCodes, createRef } from '../../Utilities';
import { FocusZone, FocusZoneDirection } from '../FocusZone';
import { FocusTrapZone } from './FocusTrapZone';
@@ -304,4 +304,94 @@ describe('FocusTrapZone', () => {
expect(lastFocusedElement).toBe(buttonB);
});
});
+
+ describe('Focusing the FTZ', () => {
+ function setupTest(focusPreviouslyFocusedInnerElement: boolean) {
+ const focusTrapZoneRef = createRef();
+ const topLevelDiv = ReactTestUtils.renderIntoDocument(
+
+
+ f
+
+ a
+ b
+
+
+ z
+
+ ) as HTMLElement;
+
+ const buttonF = topLevelDiv.querySelector('.f') as HTMLElement;
+ const buttonA = topLevelDiv.querySelector('.a') as HTMLElement;
+ const buttonB = topLevelDiv.querySelector('.b') as HTMLElement;
+ const buttonZ = topLevelDiv.querySelector('.z') as HTMLElement;
+
+ // Assign bounding locations to buttons.
+ setupElement(buttonF, { clientRect: { top: 0, bottom: 10, left: 0, right: 10 } });
+ setupElement(buttonA, { clientRect: { top: 10, bottom: 20, left: 0, right: 10 } });
+ setupElement(buttonB, { clientRect: { top: 20, bottom: 30, left: 0, right: 10 } });
+ setupElement(buttonZ, { clientRect: { top: 30, bottom: 40, left: 0, right: 10 } });
+
+ return { focusTrapZone: focusTrapZoneRef.current!, buttonF, buttonA, buttonB, buttonZ };
+ }
+
+ it('goes to previously focused element when focusing the FTZ', async () => {
+ expect.assertions(4);
+
+ const { focusTrapZone, buttonF, buttonB, buttonZ } = setupTest(true /*focusPreviouslyFocusedInnerElement*/);
+
+ // Manually focusing FTZ when FTZ has never
+ // had focus within should go to 1st focusable inner element.
+ focusTrapZone.focus();
+ await animationFrame();
+ expect(lastFocusedElement).toBe(buttonF);
+
+ // Focus inside the trap zone, not the first element.
+ ReactTestUtils.Simulate.focus(buttonB);
+ await animationFrame();
+ expect(lastFocusedElement).toBe(buttonB);
+
+ // Focus outside the trap zone
+ ReactTestUtils.Simulate.focus(buttonZ);
+ await animationFrame();
+ expect(lastFocusedElement).toBe(buttonZ);
+
+ // Manually focusing FTZ should return to originally focused inner element.
+ focusTrapZone.focus();
+ await animationFrame();
+ expect(lastFocusedElement).toBe(buttonB);
+ });
+
+ it('goes to first focusable element when focusing the FTZ', async () => {
+ expect.assertions(4);
+
+ const { focusTrapZone, buttonF, buttonB, buttonZ } = setupTest(false /*focusPreviouslyFocusedInnerElement*/);
+
+ // Manually focusing FTZ when FTZ has never
+ // had focus within should go to 1st focusable inner element.
+ focusTrapZone.focus();
+ await animationFrame();
+ expect(lastFocusedElement).toBe(buttonF);
+
+ // Focus inside the trap zone, not the first element.
+ ReactTestUtils.Simulate.focus(buttonB);
+ await animationFrame();
+ expect(lastFocusedElement).toBe(buttonB);
+
+ // Focus outside the trap zone
+ ReactTestUtils.Simulate.focus(buttonZ);
+ await animationFrame();
+ expect(lastFocusedElement).toBe(buttonZ);
+
+ // Manually focusing FTZ should go to the first focusable element.
+ focusTrapZone.focus();
+ await animationFrame();
+ expect(lastFocusedElement).toBe(buttonF);
+ });
+ });
});
diff --git a/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx b/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx
index 9733049668ee7..a72fb033addd4 100644
--- a/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx
+++ b/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx
@@ -18,7 +18,8 @@ export class FocusTrapZone extends BaseComponent implem
private static _clickStack: FocusTrapZone[] = [];
private _root = createRef();
- private _previouslyFocusedElement: HTMLElement;
+ private _previouslyFocusedElementOutsideTrapZone: HTMLElement;
+ private _previouslyFocusedElementInTrapZone?: HTMLElement;
private _isInFocusStack = false;
private _isInClickStack = false;
@@ -42,10 +43,10 @@ export class FocusTrapZone extends BaseComponent implem
disableFirstFocus = false
} = this.props;
- this._previouslyFocusedElement = elementToFocusOnDismiss
+ this._previouslyFocusedElementOutsideTrapZone = elementToFocusOnDismiss
? elementToFocusOnDismiss
: (document.activeElement as HTMLElement);
- if (!elementContains(this._root.current, this._previouslyFocusedElement) && !disableFirstFocus) {
+ if (!elementContains(this._root.current, this._previouslyFocusedElementOutsideTrapZone) && !disableFirstFocus) {
this.focus();
}
@@ -60,8 +61,8 @@ export class FocusTrapZone extends BaseComponent implem
public componentWillReceiveProps(nextProps: IFocusTrapZoneProps): void {
const { elementToFocusOnDismiss } = nextProps;
- if (elementToFocusOnDismiss && this._previouslyFocusedElement !== elementToFocusOnDismiss) {
- this._previouslyFocusedElement = elementToFocusOnDismiss;
+ if (elementToFocusOnDismiss && this._previouslyFocusedElementOutsideTrapZone !== elementToFocusOnDismiss) {
+ this._previouslyFocusedElementOutsideTrapZone = elementToFocusOnDismiss;
}
}
@@ -84,11 +85,11 @@ export class FocusTrapZone extends BaseComponent implem
const activeElement = document.activeElement as HTMLElement;
if (
!ignoreExternalFocusing &&
- this._previouslyFocusedElement &&
- typeof this._previouslyFocusedElement.focus === 'function' &&
+ this._previouslyFocusedElementOutsideTrapZone &&
+ typeof this._previouslyFocusedElementOutsideTrapZone.focus === 'function' &&
(elementContains(this._root.value, activeElement) || activeElement === document.body)
) {
- focusAsync(this._previouslyFocusedElement);
+ focusAsync(this._previouslyFocusedElementOutsideTrapZone);
}
}
@@ -103,17 +104,26 @@ export class FocusTrapZone extends BaseComponent implem
ref={this._root}
aria-labelledby={ariaLabelledBy}
onKeyDown={this._onKeyboardHandler}
+ onFocusCapture={this._onFocusCapture}
>
{this.props.children}
);
}
- /**
- * Need to expose this method in case of popups since focus needs to be set when popup is opened
- */
public focus() {
- const { firstFocusableSelector } = this.props;
+ const { focusPreviouslyFocusedInnerElement, firstFocusableSelector } = this.props;
+
+ if (
+ focusPreviouslyFocusedInnerElement &&
+ this._previouslyFocusedElementInTrapZone &&
+ elementContains(this._root.value, this._previouslyFocusedElementInTrapZone)
+ ) {
+ // focus on the last item that had focus in the zone before we left the zone
+ focusAsync(this._previouslyFocusedElementInTrapZone);
+ return;
+ }
+
const focusSelector =
typeof firstFocusableSelector === 'string'
? firstFocusableSelector
@@ -140,7 +150,18 @@ export class FocusTrapZone extends BaseComponent implem
}
}
- private _onKeyboardHandler = (ev: React.KeyboardEvent): void => {
+ private _onFocusCapture = (ev: React.FocusEvent) => {
+ if (this.props.onFocusCapture) {
+ this.props.onFocusCapture(ev);
+ }
+ if (ev.target !== ev.currentTarget) {
+ // every time focus changes within the trap zone, remember the focused element so that
+ // it can be restored if focus leaves the pane and returns via keystroke (i.e. via a call to this.focus(true))
+ this._previouslyFocusedElementInTrapZone = ev.target as HTMLElement;
+ }
+ };
+
+ private _onKeyboardHandler = (ev: React.KeyboardEvent): void => {
if (this.props.onKeyDown) {
this.props.onKeyDown(ev);
}
diff --git a/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.types.ts b/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.types.ts
index 247a5e19f7e7e..d0ab9e81c434e 100644
--- a/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.types.ts
+++ b/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.types.ts
@@ -2,7 +2,8 @@ import * as React from 'react';
export interface IFocusTrapZone {
/**
- * Sets focus on the first focusable, or configured, child in focus trap zone
+ * Sets focus to a descendant in the Trap Zone.
+ * See firstFocusableSelector and focusPreviouslyFocusedInnerElement for details.
*/
focus: () => void;
}
@@ -44,7 +45,7 @@ export interface IFocusTrapZoneProps extends React.HTMLAttributes string);
@@ -55,7 +56,11 @@ export interface IFocusTrapZoneProps extends React.HTMLAttributes) => void;
+ focusPreviouslyFocusedInnerElement?: boolean;
}
diff --git a/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZonePage.tsx b/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZonePage.tsx
index 5f07d4033adb5..1ab27df386525 100644
--- a/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZonePage.tsx
+++ b/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZonePage.tsx
@@ -1,12 +1,7 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import FocusTrapZoneBoxExample from './examples/FocusTrapZone.Box.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
const FocusTrapZoneBoxExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/FocusTrapZone/examples/FocusTrapZone.Box.Example.tsx') as string;
import FocusTrapZoneBoxExampleWithFocusableItem from './examples/FocusTrapZone.Box.FocusOnCustomElement.Example';
@@ -18,52 +13,46 @@ const FocusTrapZoneBoxClickExampleCode = require('!raw-loader!office-ui-fabric-r
import FocusTrapZoneNestedExample from './examples/FocusTrapZone.Nested.Example';
const FocusTrapZoneNestedExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/FocusTrapZone/examples/FocusTrapZone.Nested.Example.tsx') as string;
-export class FocusTrapZonePage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- allowNativeProps={true}
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.types.ts')
- ]}
- />
- }
- overview={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/FocusTrapZone/docs/FocusTrapZoneOverview.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- />
- );
- }
-}
+export const FocusTrapZonePageProps: IDemoPageProps = {
+ title: 'FocusTrapZone',
+ componentName: 'FocusTrapZone',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/FocusTrapZone',
+ examples: [
+ {
+ title: 'Simple Box',
+ code: FocusTrapZoneBoxExampleCode,
+ view:
+ },
+ {
+ title: 'Simple Box with focus on custom focusable element',
+ code: FocusTrapZoneBoxExampleWithFocusableItemCode,
+ view:
+ },
+ {
+ title: 'Simple Box with Clicking outside Trap Zone enabled',
+ code: FocusTrapZoneBoxClickExampleCode,
+ view:
+ },
+ {
+ title: 'Multiple Nest FocusTrapZones',
+ code: FocusTrapZoneNestedExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.types.ts')
+ ],
+ overview: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/FocusTrapZone/docs/FocusTrapZoneOverview.md'),
+ bestPractices: '',
+ dos: '',
+ donts: '',
+ isHeaderVisible: true,
+ allowNativeProps: true
+};
+
+export const FocusTrapZonePage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/FocusZone/FocusZonePage.tsx b/packages/office-ui-fabric-react/src/components/FocusZone/FocusZonePage.tsx
index be3fb70105cc1..580517f3a6679 100644
--- a/packages/office-ui-fabric-react/src/components/FocusZone/FocusZonePage.tsx
+++ b/packages/office-ui-fabric-react/src/components/FocusZone/FocusZonePage.tsx
@@ -1,12 +1,7 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { FocusZonePhotosExample } from './examples/FocusZone.Photos.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { FocusZoneListExample } from './examples/FocusZone.List.Example';
import { FocusZoneDisabledExample } from './examples/FocusZone.Disabled.Example';
import { FocusZoneTabbableExample } from './examples/FocusZone.Tabbable.Example';
@@ -16,44 +11,44 @@ const FocusZoneListExampleCode = require('!raw-loader!office-ui-fabric-react/src
const FocusZoneDisabledExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/FocusZone/examples/FocusZone.Disabled.Example.tsx') as string;
const FocusZoneTabbableCode = require('!raw-loader!office-ui-fabric-react/src/components/FocusZone/examples/FocusZone.Tabbable.Example.tsx') as string;
-export class FocusZonePage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- allowNativeProps={true}
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/FocusZone/FocusZone.types.ts')
- ]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/FocusZone/docs/FocusZoneOverview.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- />
- );
- }
-}
+export const FocusZonePageProps: IDemoPageProps = {
+ title: 'FocusZone',
+ componentName: 'FocusZone',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/FocusZone',
+ examples: [
+ {
+ title: 'Non-uniform photos within bidirectional FocusZone',
+ code: FocusZonePhotosExampleCode,
+ view:
+ },
+ {
+ title: 'Nesting FocusZones in list rows',
+ code: FocusZoneListExampleCode,
+ view:
+ },
+ {
+ title: 'Disabled FocusZone',
+ code: FocusZoneDisabledExampleCode,
+ view:
+ },
+ {
+ title: 'Tabbable FocusZone',
+ code: FocusZoneTabbableCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/FocusZone/FocusZone.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/FocusZone/docs/FocusZoneOverview.md'),
+ bestPractices: '',
+ dos: '',
+ donts: '',
+ isHeaderVisible: true,
+ allowNativeProps: true
+};
+
+export const FocusZonePage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/GroupedList/GroupedListPage.tsx b/packages/office-ui-fabric-react/src/components/GroupedList/GroupedListPage.tsx
index c2e17b22c4ed6..62b41d4a1fdad 100644
--- a/packages/office-ui-fabric-react/src/components/GroupedList/GroupedListPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/GroupedList/GroupedListPage.tsx
@@ -1,57 +1,43 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { GroupedListBasicExample } from './examples/GroupedList.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { GroupedListCustomExample } from './examples/GroupedList.Custom.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { GroupedListStatus } from './GroupedList.checklist';
const GroupedListBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/GroupedList/examples/GroupedList.Basic.Example.tsx') as string;
const GroupedListCustomExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/GroupedList/examples/GroupedList.Custom.Example.tsx') as string;
-export class GroupedListPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/GroupedList/GroupedList.types.ts')
- ]}
- />
- }
- overview={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/GroupedList/docs/GroupedListOverview.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const GroupedListPageProps: IDemoPageProps = {
+ title: 'GroupedList',
+ componentName: 'GroupedList',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/GroupedList',
+ componentStatus: GroupedListStatus,
+ examples: [
+ {
+ title: 'GroupedList basic example',
+ code: GroupedListBasicExampleCode,
+ view:
+ },
+ {
+ title: 'GroupedList example with custom header and footer',
+ code: GroupedListCustomExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/GroupedList/GroupedList.types.ts')
+ ],
+ overview: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/GroupedList/docs/GroupedListOverview.md'),
+ bestPractices: '',
+ dos: '',
+ donts: '',
+ isHeaderVisible: true
+};
+
+export const GroupedListPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/HoverCard/ExpandingCard.tsx b/packages/office-ui-fabric-react/src/components/HoverCard/ExpandingCard.tsx
index 4d63457f18ae6..5b18f796cea28 100644
--- a/packages/office-ui-fabric-react/src/components/HoverCard/ExpandingCard.tsx
+++ b/packages/office-ui-fabric-react/src/components/HoverCard/ExpandingCard.tsx
@@ -3,7 +3,7 @@ import { BaseComponent, getNativeProps, divProperties, customizable, KeyCodes, c
import { IExpandingCardProps, IExpandingCardStyles, ExpandingCardMode } from './ExpandingCard.types';
import { Callout, ICallout } from '../../Callout';
import { DirectionalHint } from '../../common/DirectionalHint';
-import { AnimationStyles, mergeStyles } from '../../Styling';
+import { mergeStyles } from '../../Styling';
import { FocusTrapZone } from '../../FocusTrapZone';
import { getStyles } from './ExpandingCard.styles';
@@ -67,7 +67,7 @@ export class ExpandingCard extends BaseComponent {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
- }
- allowNativeProps={true}
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/HoverCard/HoverCard.types.ts'),
- require('!raw-loader!office-ui-fabric-react/src/components/HoverCard/ExpandingCard.types.ts')
- ]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/HoverCard/docs/HoverCardOverview.md')}
-
- }
- componentStatus={ }
- isHeaderVisible={this.props.isHeaderVisible}
- />
- );
- }
-}
+export const HoverCardPageProps: IDemoPageProps = {
+ title: 'HoverCard',
+ componentName: 'HoverCard',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/HoverCard',
+ componentStatus: HoverCardStatus,
+ examples: [
+ {
+ title: 'HoverCard',
+ code: HoverCardBasicExampleCode,
+ view:
+ },
+ {
+ title: 'HoverCard using Target and at right center',
+ code: HoverCardTargetExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/HoverCard/HoverCard.types.ts'),
+ require('!raw-loader!office-ui-fabric-react/src/components/HoverCard/ExpandingCard.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/HoverCard/docs/HoverCardOverview.md'),
+ isHeaderVisible: true,
+ allowNativeProps: true
+};
+
+export const HoverCardPage = (props: { isHeaderVisible: boolean }) => (
+
+
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/Icon/IconPage.tsx b/packages/office-ui-fabric-react/src/components/Icon/IconPage.tsx
index d91e0067851ad..b28452cf433a7 100644
--- a/packages/office-ui-fabric-react/src/components/Icon/IconPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Icon/IconPage.tsx
@@ -1,16 +1,10 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { IconBasicExample } from './examples/Icon.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { IconSvgExample } from './examples/Icon.Svg.Example';
import { IconColorExample } from './examples/Icon.Color.Example';
import { IconImageSheetExample } from './examples/Icon.ImageSheet.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { IconStatus } from './Icon.checklist';
const IconBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Icon/examples/Icon.Basic.Example.tsx') as string;
@@ -18,54 +12,41 @@ const IconSvgExampleCode = require('!raw-loader!office-ui-fabric-react/src/compo
const IconColorExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Icon/examples/Icon.Color.Example.tsx') as string;
const IconImageSheetExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Icon/examples/Icon.ImageSheet.Example.tsx') as string;
-export class IconPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- allowNativeProps={true}
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Icon/Icon.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Icon/docs/IconOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Icon/docs/IconDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Icon/docs/IconDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const IconPageProps: IDemoPageProps = {
+ title: 'Icon',
+ componentName: 'Icon',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Icon',
+ componentStatus: IconStatus,
+ examples: [
+ {
+ title: 'Icon',
+ code: IconBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Icon with custom color',
+ code: IconColorExampleCode,
+ view:
+ },
+ {
+ title: 'Icon using custom svg',
+ code: IconSvgExampleCode,
+ view:
+ },
+ {
+ title: 'Icon using image sheet',
+ code: IconImageSheetExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [require('!raw-loader!office-ui-fabric-react/src/components/Icon/Icon.types.ts')],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Icon/docs/IconOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Icon/docs/IconDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Icon/docs/IconDonts.md'),
+ isHeaderVisible: true,
+ allowNativeProps: true
+};
+
+export const IconPage = (props: { isHeaderVisible: boolean }) => ;
diff --git a/packages/office-ui-fabric-react/src/components/Image/ImagePage.tsx b/packages/office-ui-fabric-react/src/components/Image/ImagePage.tsx
index abbcfd5137535..7a3f8977146a1 100644
--- a/packages/office-ui-fabric-react/src/components/Image/ImagePage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Image/ImagePage.tsx
@@ -1,19 +1,13 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import './ImagePage.scss';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { ImageDefaultExample } from './examples/Image.Default.Example';
import { ImageCenterExample } from './examples/Image.Center.Example';
import { ImageContainExample } from './examples/Image.Contain.Example';
import { ImageCoverExample } from './examples/Image.Cover.Example';
import { ImageNoneExample } from './examples/Image.None.Example';
import { ImageMaximizeFrameExample } from './examples/Image.MaximizeFrame.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { ImageStatus } from './Image.checklist';
const ImageDefaultExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Image/examples/Image.Default.Example.tsx') as string;
@@ -23,61 +17,52 @@ const ImageCoverExampleCode = require('!raw-loader!office-ui-fabric-react/src/co
const ImageNoneExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Image/examples/Image.None.Example.tsx') as string;
const ImageMaximizeFrameExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Image/examples/Image.MaximizeFrame.Example.tsx') as string;
-export class ImagePage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- allowNativeProps={true}
- nativePropsElement={'img'}
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Image/Image.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Image/docs/ImageOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Image/docs/ImageDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Image/docs/ImageDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const ImagePageProps: IDemoPageProps = {
+ title: 'Image',
+ componentName: 'Image',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Image',
+ componentStatus: ImageStatus,
+ examples: [
+ {
+ title: 'ImageFit: Not specified',
+ code: ImageDefaultExampleCode,
+ view:
+ },
+ {
+ title: 'ImageFit: None',
+ code: ImageNoneExampleCode,
+ view:
+ },
+ {
+ title: 'ImageFit: Center',
+ code: ImageCenterExampleCode,
+ view:
+ },
+ {
+ title: 'ImageFit: Contain',
+ code: ImageContainExampleCode,
+ view:
+ },
+ {
+ title: 'ImageFit: Cover',
+ code: ImageCoverExampleCode,
+ view:
+ },
+ {
+ title: 'Maximizing the image frame',
+ code: ImageMaximizeFrameExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [require('!raw-loader!office-ui-fabric-react/src/components/Image/Image.types.ts')],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Image/docs/ImageOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Image/docs/ImageDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Image/docs/ImageDonts.md'),
+ isHeaderVisible: true,
+ allowNativeProps: true,
+ nativePropsElement: 'img'
+};
+
+export const ImagePage = (props: { isHeaderVisible: boolean }) => ;
diff --git a/packages/office-ui-fabric-react/src/components/Keytip/KeytipsPage.tsx b/packages/office-ui-fabric-react/src/components/Keytip/KeytipsPage.tsx
index a74aacca1acb4..828a82fdf36ea 100644
--- a/packages/office-ui-fabric-react/src/components/Keytip/KeytipsPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Keytip/KeytipsPage.tsx
@@ -1,15 +1,8 @@
import { KeytipLayer } from 'office-ui-fabric-react/lib/KeytipLayer';
import * as React from 'react';
-import {
- ComponentPage,
- ExampleCard,
- IComponentDemoPageProps,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
-
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { KeytipStatus } from './Keytip.checklist';
import { KeytipsBasicExample } from './examples/Keytips.Basic.Example';
import { KeytipsButtonExample } from './examples/Keytips.Button.Example';
@@ -20,59 +13,48 @@ const KeytipsBasicCode = require('!raw-loader!office-ui-fabric-react/src/compone
const KeytipsButtonCode = require('!raw-loader!office-ui-fabric-react/src/components/Keytip/examples/Keytips.Button.Example.tsx') as string;
const KeytipsCommandBarCode = require('!raw-loader!office-ui-fabric-react/src/components/Keytip/examples/Keytips.CommandBar.Example.tsx') as string;
const KeytipsOverflowCode = require('!raw-loader!office-ui-fabric-react/src/components/Keytip/examples/Keytips.Overflow.Example.tsx') as string;
+export const KeytipsPageProps: IDemoPageProps = {
+ title: 'Keytips',
+ componentName: 'Keytips',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Keytips',
+ componentStatus: KeytipStatus,
+ examples: [
+ {
+ title: 'Keytips on Buttons',
+ code: KeytipsButtonCode,
+ view:
+ },
+ {
+ title: 'Keytips in a CommandBar',
+ code: KeytipsCommandBarCode,
+ view:
+ },
+ {
+ title: 'Keytips in an OverflowWell',
+ code: KeytipsOverflowCode,
+ view:
+ },
+ {
+ title: 'Keytips Example',
+ code: KeytipsBasicCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/Keytip/Keytip.types.ts'),
+ require('!raw-loader!office-ui-fabric-react/src/components/KeytipLayer/KeytipLayer.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Keytip/docs/KeytipOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Keytip/docs/KeytipDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Keytip/docs/KeytipDonts.md'),
+ isHeaderVisible: true
+};
-export class KeytipsPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
- Press Alt-Win to enable keytips, Esc to return up a level, and Alt-Win again to exit keytip mode
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Keytip/Keytip.types.ts'),
- require('!raw-loader!office-ui-fabric-react/src/components/KeytipLayer/KeytipLayer.types.ts')
- ]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Keytip/docs/KeytipOverview.md')}
-
- }
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Keytip/docs/KeytipDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Keytip/docs/KeytipDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
-
-
- );
- }
-}
+export const KeytipsPage = (props: { isHeaderVisible: boolean }) => (
+
+
+
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/Label/LabelPage.tsx b/packages/office-ui-fabric-react/src/components/Label/LabelPage.tsx
index a60d52221ef3b..c1530c398d219 100644
--- a/packages/office-ui-fabric-react/src/components/Label/LabelPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Label/LabelPage.tsx
@@ -1,54 +1,31 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { LabelBasicExample } from './examples/Label.Basic.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { LabelStatus } from './Label.checklist';
const LabelBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Label/examples/Label.Basic.Example.tsx') as string;
-export class LabelPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
- }
- allowNativeProps={true}
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Label/Label.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Label/docs/LabelOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Label/docs/LabelDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Label/docs/LabelDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const LabelPageProps: IDemoPageProps = {
+ title: 'Label',
+ componentName: 'Label',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Label',
+ componentStatus: LabelStatus,
+ examples: [
+ {
+ title: 'Label',
+ code: LabelBasicExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [require('!raw-loader!office-ui-fabric-react/src/components/Label/Label.types.ts')],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Label/docs/LabelOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Label/docs/LabelDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Label/docs/LabelDonts.md'),
+ isHeaderVisible: true,
+ allowNativeProps: true
+};
+
+export const LabelPage = (props: { isHeaderVisible: boolean }) => ;
diff --git a/packages/office-ui-fabric-react/src/components/Layer/LayerPage.tsx b/packages/office-ui-fabric-react/src/components/Layer/LayerPage.tsx
index dd2be29f22e6b..ecbd1c7c06c4d 100644
--- a/packages/office-ui-fabric-react/src/components/Layer/LayerPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Layer/LayerPage.tsx
@@ -1,68 +1,44 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { LayerBasicExample } from './examples/Layer.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { LayerHostedExample } from './examples/Layer.Hosted.Example';
import { LayerCustomizedExample } from './examples/Layer.Customized.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { LayerStatus } from './Layer.checklist';
const LayerBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Layer/examples/Layer.Basic.Example.tsx') as string;
const LayerHostedExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Layer/examples/Layer.Hosted.Example.tsx') as string;
const LayerCustomizedExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Layer/examples/Layer.Customized.Example.tsx') as string;
-export class LayerPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Layer/Layer.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Layer/docs/LayerOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Layer/docs/LayerDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Layer/docs/LayerDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const LayerPageProps: IDemoPageProps = {
+ title: 'Layer',
+ componentName: 'Layer',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Layer',
+ componentStatus: LayerStatus,
+ examples: [
+ {
+ title: 'Basic layered content',
+ code: LayerBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Using LayerHost to control projection',
+ code: LayerHostedExampleCode,
+ view:
+ },
+ {
+ title: 'Using Customizer to control the default layer behavior',
+ code: LayerCustomizedExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [require('!raw-loader!office-ui-fabric-react/src/components/Layer/Layer.types.ts')],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Layer/docs/LayerOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Layer/docs/LayerDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Layer/docs/LayerDonts.md'),
+ isHeaderVisible: true
+};
+
+export const LayerPage = (props: { isHeaderVisible: boolean }) => ;
diff --git a/packages/office-ui-fabric-react/src/components/Link/LinkPage.tsx b/packages/office-ui-fabric-react/src/components/Link/LinkPage.tsx
index f95e54fb0f317..a6816b3c6586f 100644
--- a/packages/office-ui-fabric-react/src/components/Link/LinkPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Link/LinkPage.tsx
@@ -1,55 +1,32 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { LinkBasicExample } from './examples/Link.Basic.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { LinkStatus } from './Link.checklist';
const LinkBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Link/examples/Link.Basic.Example.tsx') as string;
-export class LinkPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
- }
- allowNativeProps={true}
- nativePropsElement={['a', 'button']}
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Link/Link.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Link/docs/LinkOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Link/docs/LinkDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Link/docs/LinkDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const LinkPageProps: IDemoPageProps = {
+ title: 'Link',
+ componentName: 'Link',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Link',
+ componentStatus: LinkStatus,
+ examples: [
+ {
+ title: 'Link',
+ code: LinkBasicExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [require('!raw-loader!office-ui-fabric-react/src/components/Link/Link.types.ts')],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Link/docs/LinkOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Link/docs/LinkDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Link/docs/LinkDonts.md'),
+ isHeaderVisible: true,
+ allowNativeProps: true,
+ nativePropsElement: ['a', 'button']
+};
+
+export const LinkPage = (props: { isHeaderVisible: boolean }) => ;
diff --git a/packages/office-ui-fabric-react/src/components/MarqueeSelection/MarqueeSelectionPage.tsx b/packages/office-ui-fabric-react/src/components/MarqueeSelection/MarqueeSelectionPage.tsx
index ac1385e2e24e3..01d8a2ad92a99 100644
--- a/packages/office-ui-fabric-react/src/components/MarqueeSelection/MarqueeSelectionPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/MarqueeSelection/MarqueeSelectionPage.tsx
@@ -1,31 +1,33 @@
import * as React from 'react';
-import { ExampleCard, ComponentPage, PageMarkdown, IComponentDemoPageProps } from '@uifabric/example-app-base';
import { MarqueeSelectionBasicExample } from './examples/MarqueeSelection.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
+
const MarqueeSelectionBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/MarqueeSelection/examples/MarqueeSelection.Basic.Example.tsx') as string;
+export const MarqueeSelectionPageProps: IDemoPageProps = {
+ title: 'MarqueeSelection',
+ componentName: 'MarqueeSelection',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/MarqueeSelection',
+ examples: [
+ {
+ title: 'Basic Selection Example',
+ code: MarqueeSelectionBasicExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [],
+ overview: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/MarqueeSelection/docs/MarqueeSelectionOverview.md'),
+ bestPractices: '',
+ dos: '',
+ donts: '',
+ isHeaderVisible: true
+};
-export class MarqueeSelectionPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
- }
- overview={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/MarqueeSelection/docs/MarqueeSelectionOverview.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- />
- );
- }
-}
+export const MarqueeSelectionPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/MessageBar/MessageBarPage.tsx b/packages/office-ui-fabric-react/src/components/MessageBar/MessageBarPage.tsx
index 1c1323719a8e2..81b72b1b895d4 100644
--- a/packages/office-ui-fabric-react/src/components/MessageBar/MessageBarPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/MessageBar/MessageBarPage.tsx
@@ -1,55 +1,34 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { MessageBarBasicExample } from './examples/MessageBar.Basic.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { MessageBarStatus } from './MessageBar.checklist';
const MessageBarBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/MessageBar/examples/MessageBar.Basic.Example.tsx') as string;
-export class MessageBarPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/MessageBar/MessageBar.types.ts')
- ]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/MessageBar/docs/MessageBarOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/MessageBar/docs/MessageBarDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/MessageBar/docs/MessageBarDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const MessageBarPageProps: IDemoPageProps = {
+ title: 'MessageBar',
+ componentName: 'MessageBar',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/MessageBar',
+ componentStatus: MessageBarStatus,
+ examples: [
+ {
+ title: 'Various MessageBar types',
+ code: MessageBarBasicExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/MessageBar/MessageBar.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/MessageBar/docs/MessageBarOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/MessageBar/docs/MessageBarDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/MessageBar/docs/MessageBarDonts.md'),
+ isHeaderVisible: true
+};
+
+export const MessageBarPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/Modal/ModalPage.tsx b/packages/office-ui-fabric-react/src/components/Modal/ModalPage.tsx
index 191ecbdad59a1..c24fb32f7a5b9 100644
--- a/packages/office-ui-fabric-react/src/components/Modal/ModalPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Modal/ModalPage.tsx
@@ -1,55 +1,30 @@
import * as React from 'react';
-import {
- ComponentPage,
- ExampleCard,
- IComponentDemoPageProps,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { ModalBasicExample } from './examples/Modal.Basic.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { ModalStatus } from './Modal.checklist';
const ModalBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Modal/examples/Modal.Basic.Example.tsx') as string;
-export class ModalPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Modal/Modal.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Modal/docs/ModalOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Modal/docs/ModalDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Modal/docs/ModalDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const ModalPageProps: IDemoPageProps = {
+ title: 'Modal',
+ componentName: 'Modal',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Modal',
+ componentStatus: ModalStatus,
+ examples: [
+ {
+ title: 'Modal',
+ code: ModalBasicExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [require('!raw-loader!office-ui-fabric-react/src/components/Modal/Modal.types.ts')],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Modal/docs/ModalOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Modal/docs/ModalDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Modal/docs/ModalDonts.md'),
+ isHeaderVisible: true
+};
+
+export const ModalPage = (props: { isHeaderVisible: boolean }) => ;
diff --git a/packages/office-ui-fabric-react/src/components/Nav/NavPage.tsx b/packages/office-ui-fabric-react/src/components/Nav/NavPage.tsx
index 2e62778726413..a027f340b9dae 100644
--- a/packages/office-ui-fabric-react/src/components/Nav/NavPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Nav/NavPage.tsx
@@ -1,16 +1,10 @@
import * as React from 'react';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { NavBasicExample } from './examples/Nav.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { NavFabricDemoAppExample } from './examples/Nav.FabricDemoApp.Example';
import { NavNestedExample } from './examples/Nav.Nested.Example';
import { NavByKeysExample } from './examples/Nav.ByKeys.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { NavStatus } from './Nav.checklist';
const NavBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Nav/examples/Nav.Basic.Example.tsx') as string;
@@ -18,53 +12,40 @@ const NavFabricDemoAppExampleCode = require('!raw-loader!office-ui-fabric-react/
const NavNestedExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Nav/examples/Nav.Nested.Example.tsx') as string;
const NavByKeysExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Nav/examples/Nav.ByKeys.Example.tsx') as string;
-export class NavPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Nav/Nav.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Nav/docs/NavOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Nav/docs/NavDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Nav/docs/NavDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const NavPageProps: IDemoPageProps = {
+ title: 'Nav',
+ componentName: 'Nav',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Nav',
+ componentStatus: NavStatus,
+ examples: [
+ {
+ title: 'Basic Nav bar with sample links',
+ code: NavBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Navigation menu used in this Fabric React demo app',
+ code: NavFabricDemoAppExampleCode,
+ view:
+ },
+ {
+ title: 'Nested navigation menu (without group header)',
+ code: NavNestedExampleCode,
+ view:
+ },
+ {
+ title: 'Nav bar of links each with unique keys and empty urls',
+ code: NavByKeysExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [require('!raw-loader!office-ui-fabric-react/src/components/Nav/Nav.types.ts')],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Nav/docs/NavOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Nav/docs/NavDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Nav/docs/NavDonts.md'),
+ isHeaderVisible: true
+};
+
+export const NavPage = (props: { isHeaderVisible: boolean }) => ;
diff --git a/packages/office-ui-fabric-react/src/components/OverflowSet/OverflowSetPage.tsx b/packages/office-ui-fabric-react/src/components/OverflowSet/OverflowSetPage.tsx
index dc9ef5f99bcf2..c1ddb543059ce 100644
--- a/packages/office-ui-fabric-react/src/components/OverflowSet/OverflowSetPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/OverflowSet/OverflowSetPage.tsx
@@ -1,60 +1,64 @@
import * as React from 'react';
import { LayerHost } from 'office-ui-fabric-react/lib/Layer';
-import {
- ExampleCard,
- ComponentPage,
- IComponentDemoPageProps,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { OverflowSetCustomExample } from './examples/OverflowSet.Custom.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { OverflowSetBasicExample } from './examples/OverflowSet.Basic.Example';
import { OverflowSetVerticalExample } from './examples/OverflowSet.Vertical.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { OverflowSetStatus } from './OverflowSet.checklist';
const OverflowSetCustomExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/OverflowSet/examples/OverflowSet.Custom.Example.tsx') as string;
const OverflowSetBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/OverflowSet/examples/OverflowSet.Basic.Example.tsx') as string;
const OverflowSetVerticalExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/OverflowSet/examples/OverflowSet.Vertical.Example.tsx') as string;
-export class OverflowSetPage extends React.Component {
- public render(): JSX.Element {
- return (
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/OverflowSet/docs/OverflowSetOverview.md')}
-
- }
- allowNativeProps={true}
- exampleCards={
-
-
-
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/OverflowSet/OverflowSet.types.ts')
- ]}
- />
- }
- componentStatus={ }
- isHeaderVisible={this.props.isHeaderVisible}
- />
- );
- }
-}
+export const OverflowSetPageProps: IDemoPageProps = {
+ title: 'OverflowSet',
+ componentName: 'OverflowSet',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/OverflowSet',
+ componentStatus: OverflowSetStatus,
+ examples: [
+ {
+ title: 'OverflowSet Basic Example',
+ code: OverflowSetBasicExampleCode,
+ view: (
+
+
+
+ )
+ },
+ {
+ title: 'OverflowSet Vertical Example',
+ code: OverflowSetVerticalExampleCode,
+ view: (
+
+
+
+ )
+ },
+ {
+ title: 'OverflowSet Custom Example',
+ code: OverflowSetCustomExampleCode,
+ view: (
+
+
+
+ )
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/OverflowSet/OverflowSet.types.ts')
+ ],
+ overview: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/OverflowSet/docs/OverflowSetOverview.md'),
+ bestPractices: '',
+ dos: '',
+ donts: '',
+ isHeaderVisible: true,
+ allowNativeProps: true
+};
+
+export const OverflowSetPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/Overlay/OverlayPage.tsx b/packages/office-ui-fabric-react/src/components/Overlay/OverlayPage.tsx
index 5a01b1c05f47a..884bb8489f418 100644
--- a/packages/office-ui-fabric-react/src/components/Overlay/OverlayPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Overlay/OverlayPage.tsx
@@ -1,61 +1,40 @@
import * as React from 'react';
-import {
- ExampleCard,
- ComponentPage,
- IComponentDemoPageProps,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { OverlayDarkExample } from './examples/Overlay.Dark.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { OverlayLightExample } from './examples/Overlay.Light.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { OverlayStatus } from './Overlay.checklist';
const OverlayLightExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Overlay/examples/Overlay.Light.Example.tsx') as string;
const OverlayDarkExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Overlay/examples/Overlay.Dark.Example.tsx') as string;
-export class OverlayPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
- }
- allowNativeProps={true}
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Overlay/Overlay.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Overlay/docs/OverlayOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Overlay/docs/OverlayDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Overlay/docs/OverlayDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const OverlayPageProps: IDemoPageProps = {
+ title: 'Overlay',
+ componentName: 'Overlay',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Overlay',
+ componentStatus: OverlayStatus,
+ examples: [
+ {
+ title: 'Light',
+ code: OverlayLightExampleCode,
+ view:
+ },
+ {
+ title: 'Dark',
+ code: OverlayDarkExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/Overlay/Overlay.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Overlay/docs/OverlayOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Overlay/docs/OverlayDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Overlay/docs/OverlayDonts.md'),
+ isHeaderVisible: true,
+ allowNativeProps: true
+};
+
+export const OverlayPage = (props: { isHeaderVisible: boolean }) => ;
diff --git a/packages/office-ui-fabric-react/src/components/Panel/PanelPage.tsx b/packages/office-ui-fabric-react/src/components/Panel/PanelPage.tsx
index 4bc816c50a724..6494148d5db26 100644
--- a/packages/office-ui-fabric-react/src/components/Panel/PanelPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Panel/PanelPage.tsx
@@ -1,12 +1,7 @@
import * as React from 'react';
-import {
- ExampleCard,
- ComponentPage,
- IComponentDemoPageProps,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { PanelSmallRightExample } from './examples/Panel.SmallRight.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { PanelSmallLeftExample } from './examples/Panel.SmallLeft.Example';
import { PanelSmallFluidExample } from './examples/Panel.SmallFluid.Example';
import { PanelMediumExample } from './examples/Panel.Medium.Example';
@@ -19,7 +14,6 @@ import { PanelLightDismissExample } from './examples/Panel.LightDismiss.Example'
import { PanelLightDismissCustomExample } from './examples/Panel.LightDismissCustom.Example';
import { PanelNonModalExample } from './examples/Panel.NonModal.Example';
import { PanelFooterExample } from './examples/Panel.Footer.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { PanelStatus } from './Panel.checklist';
const PanelSmallRightExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Panel/examples/Panel.SmallRight.Example.tsx') as string;
@@ -36,81 +30,86 @@ const PanelLightDismissCustomExampleCode = require('!raw-loader!office-ui-fabric
const PanelNonModalExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Panel/examples/Panel.NonModal.Example.tsx') as string;
const PanelFooterExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Panel/examples/Panel.Footer.Example.tsx') as string;
-export class PanelPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Panel/Panel.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Panel/docs/PanelOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Panel/docs/PanelDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Panel/docs/PanelDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const PanelPageProps: IDemoPageProps = {
+ title: 'Panel',
+ componentName: 'Panel',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Panel',
+ componentStatus: PanelStatus,
+ examples: [
+ {
+ title: 'Panel - Small Panel, Anchored Right, Fixed Width',
+ code: PanelSmallRightExampleCode,
+ view:
+ },
+ {
+ title: 'Panel - Small Panel, Anchored Left, Fixed Width',
+ code: PanelSmallLeftExampleCode,
+ view:
+ },
+ {
+ title: 'Panel - Small Panel, Full Screen, Fluid Width',
+ code: PanelSmallFluidExampleCode,
+ view:
+ },
+ {
+ title: 'Panel - Medium',
+ code: PanelMediumExampleCode,
+ view:
+ },
+ {
+ title: 'Panel - Large',
+ code: PanelLargeExampleCode,
+ view:
+ },
+ {
+ title: 'Panel - LargeFixed',
+ code: PanelLargeFixedExampleCode,
+ view:
+ },
+ {
+ title: 'Panel - Extra Large',
+ code: PanelExtraLargeExampleCode,
+ view:
+ },
+ {
+ title: 'Panel - Custom',
+ code: PanelCustomExampleCode,
+ view:
+ },
+ {
+ title: 'Panel - Hidden on Dismiss',
+ code: PanelHiddenOnDismissExampleCode,
+ view:
+ },
+ {
+ title: 'Panel - Light Dismiss',
+ code: PanelLightDismissExampleCode,
+ view:
+ },
+ {
+ title: 'Panel - Custom Light Dismiss',
+ code: PanelLightDismissCustomExampleCode,
+ view:
+ },
+ {
+ title: 'Panel - Non-Modal',
+ code: PanelNonModalExampleCode,
+ view:
+ },
+ {
+ title: 'Panel - Footer',
+ code: PanelFooterExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [require('!raw-loader!office-ui-fabric-react/src/components/Panel/Panel.types.ts')],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Panel/docs/PanelOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Panel/docs/PanelDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Panel/docs/PanelDonts.md'),
+ isHeaderVisible: true,
+ allowNativeProps: true
+};
+
+export const PanelPage = (props: { isHeaderVisible: boolean }) => ;
diff --git a/packages/office-ui-fabric-react/src/components/Persona/PersonaPage.tsx b/packages/office-ui-fabric-react/src/components/Persona/PersonaPage.tsx
index 6e71e774d1135..1be245939370c 100644
--- a/packages/office-ui-fabric-react/src/components/Persona/PersonaPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Persona/PersonaPage.tsx
@@ -1,18 +1,12 @@
import * as React from 'react';
-import {
- ExampleCard,
- ComponentPage,
- IComponentDemoPageProps,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { PersonaInitialsExample } from './examples/Persona.Initials.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { PersonaBasicExample } from './examples/Persona.Basic.Example';
import { PersonaAlternateExample } from './examples/Persona.Alternate.Example';
import { PersonaCustomRenderExample } from './examples/Persona.CustomRender.Example';
import { PersonaCustomCoinRenderExample } from './examples/Persona.CustomCoinRender.Example';
import { UnknownPersonaExample } from './examples/Persona.UnknownPersona.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { PersonaStatus } from './Persona.checklist';
const PersonaInitialsExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Persona/examples/Persona.Initials.Example.tsx') as string;
@@ -22,60 +16,53 @@ const PersonaCustomRenderExampleCode = require('!raw-loader!office-ui-fabric-rea
const PersonaCustomCoinRenderExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Persona/examples/Persona.CustomCoinRender.Example.tsx') as string;
const UnknownPersonaExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Persona/examples/Persona.UnknownPersona.Example.tsx') as string;
-export class PersonaPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- allowNativeProps={true}
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Persona/Persona.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Persona/docs/PersonaOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Persona/docs/PersonaDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Persona/docs/PersonaDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const PersonaPageProps: IDemoPageProps = {
+ title: 'Persona',
+ componentName: 'Persona',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Persona',
+ componentStatus: PersonaStatus,
+ examples: [
+ {
+ title: 'Persona in various sizes',
+ code: PersonaBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Alternative small personas',
+ code: PersonaAlternateExampleCode,
+ view:
+ },
+ {
+ title: 'Persona with initials',
+ code: PersonaInitialsExampleCode,
+ view:
+ },
+ {
+ title: 'Rendering custom persona text',
+ code: PersonaCustomRenderExampleCode,
+ view:
+ },
+ {
+ title: 'Rendering custom coin',
+ code: PersonaCustomCoinRenderExampleCode,
+ view:
+ },
+ {
+ title: 'Rendering unknown persona coin',
+ code: UnknownPersonaExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/Persona/Persona.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Persona/docs/PersonaOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Persona/docs/PersonaDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Persona/docs/PersonaDonts.md'),
+ isHeaderVisible: true,
+ allowNativeProps: true
+};
+
+export const PersonaPage = (props: { isHeaderVisible: boolean }) => ;
diff --git a/packages/office-ui-fabric-react/src/components/Pivot/PivotPage.tsx b/packages/office-ui-fabric-react/src/components/Pivot/PivotPage.tsx
index 18c2b6601259e..84a0e250572b6 100644
--- a/packages/office-ui-fabric-react/src/components/Pivot/PivotPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Pivot/PivotPage.tsx
@@ -1,12 +1,7 @@
import * as React from 'react';
-import {
- ExampleCard,
- ComponentPage,
- IComponentDemoPageProps,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { PivotBasicExample } from './examples/Pivot.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { PivotIconCountExample } from './examples/Pivot.IconCount.Example';
import { PivotLargeExample } from './examples/Pivot.Large.Example';
import { PivotTabsExample } from './examples/Pivot.Tabs.Example';
@@ -16,7 +11,6 @@ import { PivotOnChangeExample } from './examples/Pivot.OnChange.Example';
import { PivotRemoveExample } from './examples/Pivot.Remove.Example';
import { PivotOverrideExample } from './examples/Pivot.Override.Example';
import { PivotSeparateExample } from './examples/Pivot.Separate.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { PivotStatus } from './Pivot.checklist';
const PivotRemoveExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Pivot/examples/Pivot.Remove.Example.tsx') as string;
@@ -30,75 +24,74 @@ const PivotIconCountExampleCode = require('!raw-loader!office-ui-fabric-react/sr
const PivotOverrideExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Pivot/examples/Pivot.Override.Example.tsx') as string;
const PivotSeparateExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Pivot/examples/Pivot.Separate.Example.tsx') as string;
-export class PivotPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- allowNativeProps={'PivotItem'}
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Pivot/Pivot.types.ts'),
- require('!raw-loader!office-ui-fabric-react/src/components/Pivot/PivotItem.types.ts')
- ]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Pivot/docs/PivotOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Pivot/docs/PivotDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Pivot/docs/PivotDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const PivotPageProps: IDemoPageProps = {
+ title: 'Pivot',
+ componentName: 'Pivot',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Pivot',
+ componentStatus: PivotStatus,
+ examples: [
+ {
+ title: 'Default Pivot',
+ code: PivotBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Count and Icon',
+ code: PivotIconCountExampleCode,
+ view:
+ },
+ {
+ title: 'Large link size',
+ code: PivotLargeExampleCode,
+ view:
+ },
+ {
+ title: 'Links of tab style',
+ code: PivotTabsExampleCode,
+ view:
+ },
+ {
+ title: 'Links of large tab style',
+ code: PivotTabsLargesExampleCode,
+ view:
+ },
+ {
+ title: 'Trigger onchange event',
+ code: PivotOnChangeExampleCode,
+ view:
+ },
+ {
+ title: 'Rendering nested components within the Pivot',
+ code: PivotFabricExampleCode,
+ view:
+ },
+ {
+ title: 'Show/Hide pivot item',
+ code: PivotRemoveExampleCode,
+ view:
+ },
+ {
+ title: 'Override selected item',
+ code: PivotOverrideExampleCode,
+ view:
+ },
+ {
+ title: 'Render content separately',
+ code: PivotSeparateExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/Pivot/Pivot.types.ts'),
+ require('!raw-loader!office-ui-fabric-react/src/components/Pivot/PivotItem.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Pivot/docs/PivotOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Pivot/docs/PivotDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Pivot/docs/PivotDonts.md'),
+ isHeaderVisible: true,
+ allowNativeProps: 'PivotItem'
+};
+
+export const PivotPage = (props: { isHeaderVisible: boolean }) => ;
diff --git a/packages/office-ui-fabric-react/src/components/ProgressIndicator/ProgressIndicatorPage.tsx b/packages/office-ui-fabric-react/src/components/ProgressIndicator/ProgressIndicatorPage.tsx
index 84974980e1f60..9573d3602bf0d 100644
--- a/packages/office-ui-fabric-react/src/components/ProgressIndicator/ProgressIndicatorPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/ProgressIndicator/ProgressIndicatorPage.tsx
@@ -1,70 +1,47 @@
import * as React from 'react';
-import {
- ExampleCard,
- ComponentPage,
- IComponentDemoPageProps,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { ProgressIndicatorBasicExample } from './examples/ProgressIndicator.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { ProgressIndicatorIndeterminateExample } from './examples/ProgressIndicator.Indeterminate.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { ProgressIndicatorStatus } from './ProgressIndicator.checklist';
const ProgressIndicatorBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ProgressIndicator/examples/ProgressIndicator.Basic.Example.tsx') as string;
const ProgressIndicatorIndeterminateExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ProgressIndicator/examples/ProgressIndicator.Indeterminate.Example.tsx') as string;
-export class ProgressIndicatorPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/ProgressIndicator/ProgressIndicator.types.ts')
- ]}
- />
- }
- overview={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/ProgressIndicator/docs/ProgressIndicatorOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/ProgressIndicator/docs/ProgressIndicatorDos.md')}
-
- }
- donts={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/ProgressIndicator/docs/ProgressIndicatorDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const ProgressIndicatorPageProps: IDemoPageProps = {
+ title: 'ProgressIndicator',
+ componentName: 'ProgressIndicator',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/ProgressIndicator',
+ componentStatus: ProgressIndicatorStatus,
+ examples: [
+ {
+ title: 'Default ProgressIndicator',
+ code: ProgressIndicatorBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Indeterminate ProgressIndicator',
+ code: ProgressIndicatorIndeterminateExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/ProgressIndicator/ProgressIndicator.types.ts')
+ ],
+ overview: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ProgressIndicator/docs/ProgressIndicatorOverview.md'),
+ bestPractices: '',
+ dos: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ProgressIndicator/docs/ProgressIndicatorDos.md'),
+ donts: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ProgressIndicator/docs/ProgressIndicatorDonts.md'),
+ isHeaderVisible: true
+};
+
+export const ProgressIndicatorPage = (props: { isHeaderVisible: boolean }) => (
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/Rating/RatingPage.tsx b/packages/office-ui-fabric-react/src/components/Rating/RatingPage.tsx
index e1dcc3b9272b0..1dc4da70d40f1 100644
--- a/packages/office-ui-fabric-react/src/components/Rating/RatingPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/Rating/RatingPage.tsx
@@ -1,60 +1,39 @@
import * as React from 'react';
-import {
- ExampleCard,
- ComponentPage,
- IComponentDemoPageProps,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { RatingBasicExample } from './examples/Rating.Basic.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { RatingButtonControlledExample } from './examples/Rating.ButtonControlled.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { RatingStatus } from './Rating.checklist';
const RatingBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Rating/examples/Rating.Basic.Example.tsx') as string;
const RatingButtonControlledExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Rating/examples/Rating.ButtonControlled.Example.tsx') as string;
-export class RatingPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
- }
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/Rating/Rating.types.ts')]}
- />
- }
- overview={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Rating/docs/RatingOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Rating/docs/RatingDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/Rating/docs/RatingDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const RatingPageProps: IDemoPageProps = {
+ title: 'Rating',
+ componentName: 'Rating',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Rating',
+ componentStatus: RatingStatus,
+ examples: [
+ {
+ title: 'Rating',
+ code: RatingBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Button Controlled Rating',
+ code: RatingButtonControlledExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/Rating/Rating.types.ts')
+ ],
+ overview: require('!raw-loader!office-ui-fabric-react/src/components/Rating/docs/RatingOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/Rating/docs/RatingDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/Rating/docs/RatingDonts.md'),
+ isHeaderVisible: true
+};
+
+export const RatingPage = (props: { isHeaderVisible: boolean }) => ;
diff --git a/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroupPage.tsx b/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroupPage.tsx
index 6cce66a965c31..0ce8cf69e648c 100644
--- a/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroupPage.tsx
+++ b/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroupPage.tsx
@@ -1,73 +1,48 @@
import * as React from 'react';
import { LayerHost } from 'office-ui-fabric-react/lib/Layer';
-import {
- ExampleCard,
- IComponentDemoPageProps,
- ComponentPage,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { ResizeGroupOverflowSetExample } from './examples/ResizeGroup.OverflowSet.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { FlexBoxResizeGroupExample } from './examples/ResizeGroup.FlexBox.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { ResizeGroupStatus } from './ResizeGroup.checklist';
const ResizeGroupBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ResizeGroup/examples/ResizeGroup.OverflowSet.Example.tsx') as string;
const ResizeGroupFlexBoxExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ResizeGroup/examples/ResizeGroup.FlexBox.Example.tsx') as string;
-export class ResizeGroupPage extends React.Component {
- public render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
- }
- allowNativeProps={true}
- propertiesTables={
- ('!raw-loader!office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.types.ts')
- ]}
- />
- }
- overview={
-
- {require<
- string
- >('!raw-loader!office-ui-fabric-react/src/components/ResizeGroup/docs/ResizeGroupOverview.md')}
-
- }
- bestPractices={
}
- dos={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/ResizeGroup/docs/ResizeGroupDos.md')}
-
- }
- donts={
-
- {require('!raw-loader!office-ui-fabric-react/src/components/ResizeGroup/docs/ResizeGroupDonts.md')}
-
- }
- isHeaderVisible={this.props.isHeaderVisible}
- componentStatus={ }
- />
- );
- }
-}
+export const ResizeGroupPageProps: IDemoPageProps = {
+ title: 'ResizeGroup',
+ componentName: 'ResizeGroup',
+ componentUrl:
+ 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/ResizeGroup',
+ componentStatus: ResizeGroupStatus,
+ examples: [
+ {
+ title: 'Use ResizeGroup to move commands into an overflow menu',
+ code: ResizeGroupBasicExampleCode,
+ view:
+ },
+ {
+ title: 'Use ResizeGroup to prevent two groups of items from overlapping',
+ code: ResizeGroupFlexBoxExampleCode,
+ view:
+ }
+ ],
+ propertiesTablesSources: [
+ require('!raw-loader!office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.types.ts')
+ ],
+ overview: require<
+ string
+ >('!raw-loader!office-ui-fabric-react/src/components/ResizeGroup/docs/ResizeGroupOverview.md'),
+ bestPractices: '',
+ dos: require('!raw-loader!office-ui-fabric-react/src/components/ResizeGroup/docs/ResizeGroupDos.md'),
+ donts: require('!raw-loader!office-ui-fabric-react/src/components/ResizeGroup/docs/ResizeGroupDonts.md'),
+ isHeaderVisible: true,
+ allowNativeProps: true
+};
+
+export const ResizeGroupPage = (props: { isHeaderVisible: boolean }) => (
+
+
+
+);
diff --git a/packages/office-ui-fabric-react/src/components/ScrollablePane/ScrollablePanePage.tsx b/packages/office-ui-fabric-react/src/components/ScrollablePane/ScrollablePanePage.tsx
index d3b74017bcd52..44fed508c1354 100644
--- a/packages/office-ui-fabric-react/src/components/ScrollablePane/ScrollablePanePage.tsx
+++ b/packages/office-ui-fabric-react/src/components/ScrollablePane/ScrollablePanePage.tsx
@@ -1,76 +1,49 @@
import * as React from 'react';
-import {
- ExampleCard,
- ComponentPage,
- IComponentDemoPageProps,
- PageMarkdown,
- PropertiesTableSet
-} from '@uifabric/example-app-base';
import { ScrollablePaneDefaultExample } from './examples/ScrollablePane.Default.Example';
+import { DemoPage } from '../../demo/components/DemoPage';
+import { IDemoPageProps } from '../../demo/components/DemoPage.types';
import { ScrollablePaneDetailsListExample } from './examples/ScrollablePane.DetailsList.Example';
-import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus';
import { ScrollablePaneStatus } from './ScrollablePane.checklist';
const ScrollablePaneDefaultExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ScrollablePane/examples/ScrollablePane.Default.Example.tsx') as string;
const ScrollablePaneDetailsListExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ScrollablePane/examples/ScrollablePane.DetailsList.Example.tsx') as string;
-export class ScrollablePanePage extends React.Component {
- public render(): JSX.Element {
- return (
-
-