diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 562d44635849f0..25780e2001c574 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -34,7 +34,8 @@ azure-pipelines.yml @ecraig12345 @kenotron #### Apps # component-demo/ -fabric-website/ @jordandrako +fabric-website/ @jordandrako @ecraig12345 +fabric-website-resources/ @ecraig12345 # ssr-tests/ # test-bundle-button/ @dzearing # todo-app/ @@ -44,10 +45,11 @@ Controls/web.tsx @Vitalius1 @natalieethell packages/charting/ @Raghurk @veeray @chankev packages/codepen-loader/ @ecraig12345 @kenotron packages/foundation/ @JasonGore -# packages/example-app-base/ +packages/example-app-base/ @ecraig12345 packages/file-type-icons/ @KatherineThayerMicrosoft @jahnp @bigbadcapers # packages/icons/ # packages/jest-serializer-merge-styles/ +packages/lists/ @dzearing @KevinTCoughlin @aditima # packages/merge-styles/ # packages/prettier-rules/ # packages/tslint-rules/ @@ -83,14 +85,14 @@ Checkbox/ @cliffkoh ChoiceGroup/ @srideshpande CollapsibleSection/ @JasonGore ColorPicker/ @ecraig12345 -ComboBox/ @ecraig12345 +ComboBox/ @joschect CommandBar/ @micahgodbolt @joschect ContextualMenu/ @joschect DatePicker/ @OfficeDev/uifabric-calendar DetailsList/ @KevinTCoughlin Dialog/ @kkjeer DocumentCard/ @yiminwu -Dropdown/ @ecraig12345 +Dropdown/ @joschect Fabric/ @dzearing FacePile/ @markionium FolderCover/ @ThomasMichon @@ -107,7 +109,7 @@ List/ @KevinTCoughlin MarqueeSelection/ @dzearing MessageBar/ @ecraig12345 Modal/ @JasonGore -Nav/ @jdhuntington +office-ui-fabric-react/src/components/Nav/ @jdhuntington OverflowSet/ @micahgodbolt Overlay/ @kkjeer Pagination/ @caradong diff --git a/.vscode/launch.json b/.vscode/launch.json index 7ef0126c3739ed..1f6d0e76062add 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -23,7 +23,7 @@ "program": "${workspaceRoot}/scripts/debug-test.js", "cwd": "${fileDirname}", "stopOnEntry": false, - "args": ["-i", "--testPathPattern=${file}"], + "args": ["-i", "--testPathPattern=${fileBasenameNoExtension}"], "runtimeExecutable": null, "runtimeArgs": ["--nolazy", "--debug"], "env": { diff --git a/apps/a11y-tests/package.json b/apps/a11y-tests/package.json index 7c3818748e593a..3b969c60970944 100644 --- a/apps/a11y-tests/package.json +++ b/apps/a11y-tests/package.json @@ -17,7 +17,7 @@ "axe-sarif-converter": "^1.0.0", "concurrently": "^4.1.0", "mkdirp": "^0.5.1", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "puppeteer": "^1.13.0", "tslib": "^1.7.1", "wait-on": "^3.2.0" diff --git a/apps/dom-tests/package.json b/apps/dom-tests/package.json index dc453cd7fc4552..4c47951a83f580 100644 --- a/apps/dom-tests/package.json +++ b/apps/dom-tests/package.json @@ -36,7 +36,7 @@ "@microsoft/load-themed-styles": "^1.7.13", "es6-promise": "^4.1.0", "immutability-helper": "~2.8.1", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "react": ">=16.8.0 <17.0.0", "react-dom": ">=16.8.0 <17.0.0", "tslib": "^1.7.1" diff --git a/apps/dom-tests/src/index.tsx b/apps/dom-tests/src/index.tsx index fa6ba253aee8d7..c2ab03a1d3841f 100644 --- a/apps/dom-tests/src/index.tsx +++ b/apps/dom-tests/src/index.tsx @@ -5,6 +5,7 @@ import * as ReactDOM from 'react-dom'; import { Router, Route } from 'office-ui-fabric-react/lib/utilities/router/index'; import { setBaseUrl } from 'office-ui-fabric-react/lib/Utilities'; import { Fabric } from 'office-ui-fabric-react/lib/Fabric'; +import { IRouteProps } from '../../../packages/office-ui-fabric-react/lib/utilities/router/Route'; setBaseUrl('./dist/'); @@ -23,15 +24,16 @@ function _onLoad(): void { function _getRoutes(): JSX.Element[] { return require('./pages/pageList') - .map((page: string) => { - return { - component: (require(`./pages/${page}`) as any).default, - key: page, - name: page, - url: `#/${page}` - }; - }) - .map((page: any) => ); + .map( + (page: string): IRouteProps => { + return { + component: require(`./pages/${page}`).default, + key: page, + path: `#/${page}` + }; + } + ) + .map((page: IRouteProps) => ); } function _onUnload(): void { diff --git a/apps/dom-tests/src/pages/pageList.ts b/apps/dom-tests/src/pages/pageList.ts index 5ddfbf4ac3d9bb..415c477de41ed0 100644 --- a/apps/dom-tests/src/pages/pageList.ts +++ b/apps/dom-tests/src/pages/pageList.ts @@ -1 +1,2 @@ -module.exports = ['FocusZone.example1']; +const pages: string[] = ['FocusZone.example1']; +module.exports = pages; diff --git a/apps/dom-tests/src/test/FocusZone.test.dom.ts b/apps/dom-tests/src/test/FocusZone.test.dom.ts index f0a91cce26d410..d0a62abc434524 100644 --- a/apps/dom-tests/src/test/FocusZone.test.dom.ts +++ b/apps/dom-tests/src/test/FocusZone.test.dom.ts @@ -1,7 +1,7 @@ import * as puppeteer from 'puppeteer'; describe('FocusZone', () => { - let browser: any; + let browser: puppeteer.Browser; beforeAll(async () => { browser = await puppeteer.launch({ headless: true }); @@ -19,9 +19,9 @@ describe('FocusZone', () => { // Act // 'Nesting FocusZons in list rows' const focusZone = await page.$('#fz'); - await focusZone.focus(); + await focusZone!.focus(); // Assert - expect(await page.$eval('#a', (button: any) => document.activeElement === button)); + expect(await page.$eval('#a', (button: Element) => document.activeElement === button)); }); }); diff --git a/apps/dom-tests/tslint.json b/apps/dom-tests/tslint.json index be9508c1adfdde..06e306229f8738 100644 --- a/apps/dom-tests/tslint.json +++ b/apps/dom-tests/tslint.json @@ -1,6 +1,4 @@ { "extends": ["@uifabric/tslint-rules"], - "rules": { - "no-any": false - } + "rules": {} } diff --git a/apps/fabric-website-resources/package.json b/apps/fabric-website-resources/package.json index 6cdccf33737522..4bb326860aabf7 100644 --- a/apps/fabric-website-resources/package.json +++ b/apps/fabric-website-resources/package.json @@ -47,7 +47,7 @@ "es6-weak-map": "^2.0.2", "highlight.js": "^9.12.0", "office-ui-fabric-core": "^9.0.0", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "react": "~16.6.3", "react-dom": "~16.6.3", "react-highlight": "0.10.0", @@ -59,7 +59,7 @@ "@microsoft/load-themed-styles": "^1.7.13", "@uifabric/api-docs": "^1.1.1", "@uifabric/azure-themes": "^0.1.9", - "@uifabric/example-app-base": "^6.20.1", + "@uifabric/example-app-base": "^6.21.0", "@uifabric/fluent-theme": "^0.16.9", "@uifabric/icons": "^6.5.2", "@uifabric/merge-styles": "^6.17.3", diff --git a/apps/fabric-website/CHANGELOG.json b/apps/fabric-website/CHANGELOG.json index 688886949f9d97..e6a9d54472279d 100644 --- a/apps/fabric-website/CHANGELOG.json +++ b/apps/fabric-website/CHANGELOG.json @@ -1,6 +1,64 @@ { "name": "@uifabric/fabric-website", "entries": [ + { + "version": "6.18.4", + "tag": "@uifabric/fabric-website_v6.18.4", + "date": "Thu, 16 May 2019 12:21:56 GMT", + "comments": { + "patch": [ + { + "comment": "Add versioned release notes and demo section", + "author": "Kevin Coughlin <706967+KevinTCoughlin@users.noreply.github.com>", + "commit": "d80271e480c1ab7e986d9dd547be7f5a9dae621e" + } + ] + } + }, + { + "version": "6.18.3", + "tag": "@uifabric/fabric-website_v6.18.3", + "date": "Thu, 16 May 2019 05:28:50 GMT", + "comments": { + "patch": [ + { + "comment": "Adding mobile examples and docs for Button.", + "author": "lynamemi ", + "commit": "4382ed8bf9bc3793fe0511fdfae36a51b02f2ebb" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@uifabric/file-type-icons\" from `^6.4.9` to `^6.4.10`" + }, + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `^6.182.0` to `^6.182.1`" + } + ] + } + }, + { + "version": "6.18.2", + "tag": "@uifabric/fabric-website_v6.18.2", + "date": "Wed, 15 May 2019 12:31:44 GMT", + "comments": { + "patch": [ + { + "comment": "Add 404 page", + "author": "Jordan Janzen ", + "commit": "1a7b6c65005dab8fbcc6fe21dbaa42ed042465eb" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@uifabric/example-app-base\" from `^6.20.1` to `^6.21.0`" + }, + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `^6.181.1` to `^6.182.0`" + } + ] + } + }, { "version": "6.18.1", "tag": "@uifabric/fabric-website_v6.18.1", diff --git a/apps/fabric-website/CHANGELOG.md b/apps/fabric-website/CHANGELOG.md index 2d1298b7a247f8..c68d6ae57c8176 100644 --- a/apps/fabric-website/CHANGELOG.md +++ b/apps/fabric-website/CHANGELOG.md @@ -1,6 +1,27 @@ # Change Log - @uifabric/fabric-website -This log was last generated on Tue, 14 May 2019 07:50:30 GMT and should not be manually modified. +This log was last generated on Thu, 16 May 2019 12:21:56 GMT and should not be manually modified. + +## 6.18.4 +Thu, 16 May 2019 12:21:56 GMT + +### Patches + +- Add versioned release notes and demo section + +## 6.18.3 +Thu, 16 May 2019 05:28:50 GMT + +### Patches + +- Adding mobile examples and docs for Button. + +## 6.18.2 +Wed, 15 May 2019 12:31:44 GMT + +### Patches + +- Add 404 page ## 6.18.1 Tue, 14 May 2019 07:50:30 GMT diff --git a/apps/fabric-website/just-task.js b/apps/fabric-website/just-task.js index 2f5270cadb730f..69fde2d9df6a52 100644 --- a/apps/fabric-website/just-task.js +++ b/apps/fabric-website/just-task.js @@ -1,9 +1,10 @@ const preset = require('@uifabric/build/just-task'); const { task, option } = preset.just; -const createFlightConfigTaskFactory = require('./scripts/createFlightConfig'); +const { createInternalFlightConfigTask, createPublicFlightConfigTask } = require('./scripts/createFlightConfig'); module.exports = function() { preset(); option('baseCDNUrl', { default: './dist' }); - task('create-flight-config', createFlightConfigTaskFactory()); + task('create-internal-flight-config', createInternalFlightConfigTask()); + task('create-public-flight-config', createPublicFlightConfigTask()); }; diff --git a/apps/fabric-website/package.json b/apps/fabric-website/package.json index 5ceba3a2b122b9..21ce644bb74618 100644 --- a/apps/fabric-website/package.json +++ b/apps/fabric-website/package.json @@ -1,6 +1,6 @@ { "name": "@uifabric/fabric-website", - "version": "6.18.1", + "version": "6.18.4", "description": "Reusable React components for building experiences for Office 365.", "main": "lib-commonjs/index.js", "module": "lib/index.js", @@ -12,7 +12,8 @@ }, "scripts": { "build": "node node_modules/@uifabric/build/just.js build", - "create-flight-config": "node node_modules/@uifabric/build/just.js create-flight-config", + "create-internal-flight-config": "node node_modules/@uifabric/build/just.js create-internal-flight-config", + "create-public-flight-config": "node node_modules/@uifabric/build/just.js create-public-flight-config", "just": "node node_modules/@uifabric/build/just.js", "clean": "node node_modules/@uifabric/build/just.js clean", "code-style": "node node_modules/@uifabric/build/just.js code-style", @@ -48,17 +49,17 @@ "dependencies": { "@microsoft/load-themed-styles": "^1.7.13", "@uifabric/api-docs": "^1.1.1", - "@uifabric/example-app-base": "^6.20.1", + "@uifabric/example-app-base": "^6.21.0", "@uifabric/experiments": "^6.76.2", "@uifabric/fabric-website-resources": "^6.18.1", - "@uifabric/file-type-icons": "^6.4.9", + "@uifabric/file-type-icons": "^6.4.10", "@uifabric/fluent-theme": "^0.16.9", "@uifabric/icons": "^6.5.2", "@uifabric/set-version": "^1.1.3", "@uifabric/theme-samples": "^0.1.6", "react-app-polyfill": "~1.0.1", "json-loader": "^0.5.7", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "tslib": "^1.7.1", "whatwg-fetch": "2.0.4" } diff --git a/apps/fabric-website/scripts/createFlightConfig.js b/apps/fabric-website/scripts/createFlightConfig.js index ce9b1f19d62934..343b57d009644a 100644 --- a/apps/fabric-website/scripts/createFlightConfig.js +++ b/apps/fabric-website/scripts/createFlightConfig.js @@ -6,8 +6,11 @@ const fs = require('fs'); const path = require('path'); const { argv, logger } = require('@uifabric/build/just-task').just; -module.exports = function createFlightConfigTaskFactory() { - return function createFlightConfigTask() { +/** + * A Task Function for Fabric Website that Generates a Manifest for Non-UHF "Internal" Site + */ +module.exports.createInternalFlightConfigTask = function() { + return function() { let date = new Date(); // Produces date string of the form yyyyMMdd, e.g. 20180701 @@ -31,6 +34,34 @@ module.exports = function createFlightConfigTaskFactory() { }; }; +/** + * A Task Function for Fabric Website that Generates a Manifest for UHF Public Site + */ +module.exports.createPublicFlightConfigTask = function() { + return function() { + let date = new Date(); + + // Produces date string of the form yyyyMMdd, e.g. 20180701 + let today = date.getFullYear() + ('0' + (date.getMonth() + 1)).slice(-2) + ('0' + date.getDate()).slice(-2); + + let configsToGenerate = ['fabric-website-prod', 'fabric-website-df']; + + let configData = { + version: process.env.BUILD_BUILDNUMBER || '0', + baseCDNUrl: path.join(argv().baseCDNUrl, process.env.BUILD_BUILDNUMBER) + '/', + buildName: process.env.BUILD_DEFINITIONNAME || 'localbuild', + createdDate: today + }; + + logger.info('config data:'); + logger.info(configData); + + configsToGenerate.forEach(fileName => { + generateConfig(fileName, path.resolve(process.cwd(), 'flights'), configData); + }); + }; +}; + function generateConfig(fileName, outDir, configData) { try { if (!fs.existsSync(outDir)) { diff --git a/apps/fabric-website/src/SiteDefinition/SiteDefinition.pages/Controls/android.tsx b/apps/fabric-website/src/SiteDefinition/SiteDefinition.pages/Controls/android.tsx index 7b8423edefe8c8..4bd8593b64c6d8 100644 --- a/apps/fabric-website/src/SiteDefinition/SiteDefinition.pages/Controls/android.tsx +++ b/apps/fabric-website/src/SiteDefinition/SiteDefinition.pages/Controls/android.tsx @@ -9,6 +9,19 @@ export const controlsPagesAndroid: INavPage[] = [ component: () => , getComponent: cb => require.ensure([], require => cb(require('../../../pages/Overviews/ControlsPage/ControlsPage').ControlsPage)) }, + { + title: 'Basic Inputs', + url: '#/controls/android/button', + isCategory: true, + pages: [ + { + title: 'Button', + url: '#/controls/android/button', + component: () => , + getComponent: cb => require.ensure([], require => cb(require('../../../pages/Controls/ButtonPage/ButtonPage').ButtonPage)) + } + ] + }, { title: 'Pickers', url: '#/controls/android/date-time-picker', diff --git a/apps/fabric-website/src/SiteDefinition/SiteDefinition.pages/Controls/ios.tsx b/apps/fabric-website/src/SiteDefinition/SiteDefinition.pages/Controls/ios.tsx index e69e6a8080280f..dde9d83ff2b2fb 100644 --- a/apps/fabric-website/src/SiteDefinition/SiteDefinition.pages/Controls/ios.tsx +++ b/apps/fabric-website/src/SiteDefinition/SiteDefinition.pages/Controls/ios.tsx @@ -9,6 +9,19 @@ export const controlsPagesIos: INavPage[] = [ component: () => , getComponent: cb => require.ensure([], require => cb(require('../../../pages/Overviews/ControlsPage/ControlsPage').ControlsPage)) }, + { + title: 'Basic Inputs', + url: '#/controls/ios/button', + isCategory: true, + pages: [ + { + title: 'Button', + url: '#/controls/ios/button', + component: () => , + getComponent: cb => require.ensure([], require => cb(require('../../../pages/Controls/ButtonPage/ButtonPage').ButtonPage)) + } + ] + }, { title: 'Pickers', url: '#/controls/ios/date-time-picker', diff --git a/apps/fabric-website/src/pages/Controls/ButtonPage/ButtonPage.doc.ts b/apps/fabric-website/src/pages/Controls/ButtonPage/ButtonPage.doc.ts index e1a22e5205ba57..e795e2f0ad5bad 100644 --- a/apps/fabric-website/src/pages/Controls/ButtonPage/ButtonPage.doc.ts +++ b/apps/fabric-website/src/pages/Controls/ButtonPage/ButtonPage.doc.ts @@ -3,6 +3,7 @@ import { Platforms } from '../../../interfaces/Platforms'; import { TPlatformPageProps } from '@uifabric/example-app-base/lib/index2'; const related = require('!raw-loader!@uifabric/fabric-website/src/pages/Controls/ButtonPage/docs/ButtonRelated.md') as string; +const componentUrl = 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/apps/fabric-website/src/pages/Controls/ButtonPage'; export const ButtonPageProps = (disabled: boolean, checked: boolean): TPlatformPageProps => { const externalProps = ExternalProps({ areButtonsDisabled: disabled, areButtonsChecked: checked }); @@ -10,6 +11,16 @@ export const ButtonPageProps = (disabled: boolean, checked: boolean): TPlatformP web: { ...(externalProps as any), related + }, + ios: { + overview: require('!raw-loader!@uifabric/fabric-website/src/pages/Controls/ButtonPage/docs/ios/ButtonOverview.md') as string, + related, + componentUrl + }, + android: { + overview: require('!raw-loader!@uifabric/fabric-website/src/pages/Controls/ButtonPage/docs/android/ButtonOverview.md') as string, + related, + componentUrl } }; }; diff --git a/apps/fabric-website/src/pages/Controls/ButtonPage/ButtonPage.tsx b/apps/fabric-website/src/pages/Controls/ButtonPage/ButtonPage.tsx index ea2acf5d4f8fe1..470be968bdd215 100644 --- a/apps/fabric-website/src/pages/Controls/ButtonPage/ButtonPage.tsx +++ b/apps/fabric-website/src/pages/Controls/ButtonPage/ButtonPage.tsx @@ -3,7 +3,11 @@ import { Checkbox } from 'office-ui-fabric-react'; import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage'; import { ButtonPageProps } from './ButtonPage.doc'; import * as exampleStylesImport from 'office-ui-fabric-react/lib/common/_exampleStyles.scss'; +import { Platforms } from 'src/interfaces/Platforms'; +import { IPageSectionProps, Markdown } from '../../../../../../packages/example-app-base/lib/index2'; + const exampleStyles: any = exampleStylesImport; +const baseUrl = 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/apps/fabric-website/src/pages/Controls/ButtonPage/'; export class ButtonPage extends React.Component< IControlsPageProps, @@ -43,7 +47,37 @@ export class ButtonPage extends React.Component< public render() { const { areButtonsDisabled, areButtonsChecked } = this.state; const buttonPageProps = ButtonPageProps(areButtonsDisabled, areButtonsChecked); - return ; + return ( + + ); + } + + private _otherSections(platform: Platforms): IPageSectionProps[] { + switch (platform) { + case 'ios': + return [ + { + sectionName: 'Implementation', + editUrl: baseUrl + 'docs/ios/ButtonImplementation.md', + content: require('!raw-loader!@uifabric/fabric-website/src/pages/Controls/ButtonPage/docs/ios/ButtonImplementation.md') as string + } + ]; + + case 'android': + return [ + { + sectionName: 'Implementation', + editUrl: baseUrl + 'docs/android/ButtonImplementation.md', + content: require('!raw-loader!@uifabric/fabric-website/src/pages/Controls/ButtonPage/docs/android/ButtonImplementation.md') as string + } + ]; + } } private _onDisabledChanged = (ev: React.MouseEvent, disabled: boolean): void => { diff --git a/apps/fabric-website/src/pages/Controls/ButtonPage/docs/ButtonRelated.md b/apps/fabric-website/src/pages/Controls/ButtonPage/docs/ButtonRelated.md index e69de29bb2d1d6..94a181c59b0db9 100644 --- a/apps/fabric-website/src/pages/Controls/ButtonPage/docs/ButtonRelated.md +++ b/apps/fabric-website/src/pages/Controls/ButtonPage/docs/ButtonRelated.md @@ -0,0 +1,3 @@ +- [Web Button](#/controls/web/button) +- [iOS Button](#/controls/ios/button) +- [Android Button](#/controls/android/button) diff --git a/apps/fabric-website/src/pages/Controls/ButtonPage/docs/android/ButtonImplementation.md b/apps/fabric-website/src/pages/Controls/ButtonPage/docs/android/ButtonImplementation.md new file mode 100644 index 00000000000000..e583027bd29598 --- /dev/null +++ b/apps/fabric-website/src/pages/Controls/ButtonPage/docs/android/ButtonImplementation.md @@ -0,0 +1,15 @@ +### Designs + +Coming soon + +### Style names + +`Widget.UIFabric.Button` + +`Widget.UIFabric.Button.Borderless` + +### Library + +[UI Fabric Android](https://github.com/OfficeDev/ui-fabric-android) + +[Sample Code](https://github.com/OfficeDev/ui-fabric-android/blob/master/OfficeUIFabric.Demo/src/main/res/layout/activity_basic_inputs.xml) diff --git a/apps/fabric-website/src/pages/Controls/ButtonPage/docs/android/ButtonOverview.md b/apps/fabric-website/src/pages/Controls/ButtonPage/docs/android/ButtonOverview.md new file mode 100644 index 00000000000000..259dd6bb0d809d --- /dev/null +++ b/apps/fabric-website/src/pages/Controls/ButtonPage/docs/android/ButtonOverview.md @@ -0,0 +1,5 @@ +Buttons are one of the core controls that make an app feel native to the platform it's on. It’s important to respect the platform's paradigms in order to help the user feel at home on Android and keep the experience quality high. + +Borderless buttons should be used as a secondary command, typically underneath the primary button. + +Example of a Button on Android diff --git a/apps/fabric-website/src/pages/Controls/ButtonPage/docs/ios/ButtonImplementation.md b/apps/fabric-website/src/pages/Controls/ButtonPage/docs/ios/ButtonImplementation.md new file mode 100644 index 00000000000000..1c795a76e84c0c --- /dev/null +++ b/apps/fabric-website/src/pages/Controls/ButtonPage/docs/ios/ButtonImplementation.md @@ -0,0 +1,13 @@ +### Designs + +Coming soon + +### Control name + +`MSButton` + +### Library + +[UI Fabric iOS](https://github.com/OfficeDev/ui-fabric-ios) + +[Sample Code](https://github.com/OfficeDev/ui-fabric-ios/blob/master/OfficeUIFabric.Demo/OfficeUIFabric.Demo/Demos/MSButtonDemoController.swift) diff --git a/apps/fabric-website/src/pages/Controls/ButtonPage/docs/ios/ButtonOverview.md b/apps/fabric-website/src/pages/Controls/ButtonPage/docs/ios/ButtonOverview.md new file mode 100644 index 00000000000000..ee8ade1be9bff4 --- /dev/null +++ b/apps/fabric-website/src/pages/Controls/ButtonPage/docs/ios/ButtonOverview.md @@ -0,0 +1,3 @@ +Buttons are one of the core controls that make an app feel native to the platform it's on. It’s important to respect the platform's paradigms in order to help the user feel at home on iOS and keep the experience quality high. + +Example of a Button on iOS diff --git a/apps/fabric-website/src/pages/NotFoundPage/NotFoundPage.tsx b/apps/fabric-website/src/pages/NotFoundPage/NotFoundPage.tsx new file mode 100644 index 00000000000000..a59098e19bfa27 --- /dev/null +++ b/apps/fabric-website/src/pages/NotFoundPage/NotFoundPage.tsx @@ -0,0 +1,129 @@ +import * as React from 'react'; +import { Link, DefaultButton, mergeStyles } from 'office-ui-fabric-react'; +import { + trackEvent, + EventNames, + randomEntry, + getSiteArea, + Page, + IPageProps, + IPageSectionProps +} from '@uifabric/example-app-base/lib/index2'; +import { SiteDefinition } from '../../SiteDefinition/index'; +import { topNavHeight, mediaQuery } from '../../styles/constants'; + +const illustrations = [ + 'https://static2.sharepointonline.com/files/fabric/office-ui-fabric-react-assets/images/error/error1.svg', + 'https://static2.sharepointonline.com/files/fabric/office-ui-fabric-react-assets/images/error/error2.svg', + 'https://static2.sharepointonline.com/files/fabric/office-ui-fabric-react-assets/images/error/error3.svg' +]; + +const rootClass = mergeStyles({ + backgroundRepeat: 'no-repeat', + backgroundSize: '480px', + backgroundPosition: '80% 80%', + backgroundImage: `url(${randomEntry(illustrations)})`, + minHeight: `calc(100vh - ${topNavHeight}px)`, + + selectors: { + [mediaQuery.maxMobile]: { + backgroundSize: '80%' + } + } +}); + +export interface INotFoundPageProps extends IPageProps {} + +export class NotFoundPage extends React.Component { + public componentDidMount(): void { + trackEvent(EventNames.PageNotFound, { + currentArea: getSiteArea(), + currentPage: window.location.hash + }); + } + + public render() { + return ; + } + + private _otherSections = (): IPageSectionProps[] => [ + { + sectionName: 'Sorry, the page you requested cannot be found.', + content: ( +
+

The URL may be misspelled or the page you are looking for is no longer available.

+
    +
  • + this._onInternalLinkClick(ev, '#/') + } + > + UI Fabric Home + +
  • + {this._getAreaLink()} +
+ {this._renderBackButton()} +
+ ) + } + ]; + + /** Gets the top level page from the current URL and returns a link to it. */ + private _getAreaLink = (): JSX.Element => { + const area = getSiteArea(SiteDefinition.pages); + const pageForArea = SiteDefinition.pages.filter(page => page.title === area)[0]; + if (pageForArea) { + const { title, url } = pageForArea; + + return ( +
  • + this._onInternalLinkClick(ev, url) + } + > + {title} + +
  • + ); + } + }; + + /** Renders a button to go back in the browser history only if there is a page to go back to. */ + private _renderBackButton = (): JSX.Element => { + if (window.history.length > 1) { + return ( +

    + Go back +

    + ); + } + }; + + private _onGoBackClick = (): void => { + trackEvent(EventNames.ClickedGoBack, { + currentArea: getSiteArea(SiteDefinition.pages), + currentPage: window.location.hash, + context: 'NotFoundPage', + referrer: document.referrer || undefined + }); + window.history.back(); + }; + + private _onInternalLinkClick = (ev: React.MouseEvent<{}> | React.KeyboardEvent<{}>, url: string): void => { + trackEvent(EventNames.ClickedInternalLink, { + currentArea: getSiteArea(SiteDefinition.pages), + nextArea: getSiteArea(SiteDefinition.pages, url), + currentPage: window.location.hash, + nextPage: url, + context: 'NotFoundPage', + referrer: document.referrer.length ? document.referrer : undefined + }); + }; +} diff --git a/apps/fabric-website/src/pages/Overviews/ResourcesPage/docs/default/ResourcesDeveloperResources.md b/apps/fabric-website/src/pages/Overviews/ResourcesPage/docs/default/ResourcesDeveloperResources.md index 4d08fcb41c0839..264586548e8045 100644 --- a/apps/fabric-website/src/pages/Overviews/ResourcesPage/docs/default/ResourcesDeveloperResources.md +++ b/apps/fabric-website/src/pages/Overviews/ResourcesPage/docs/default/ResourcesDeveloperResources.md @@ -7,6 +7,14 @@ Get started with React and learn how to build your first projects.
  • [Fabric React tutorial](https://github.com/OfficeDev/office-ui-fabric-react/wiki/Getting-Started-with-UI-Fabric)
  • +### Release notes and demos + +View Fabric React's versioned release notes and component demos. + +
      +
    • [Release notes and demos](https://aka.ms/FabricDemo)
    • +
    +

    SharePoint Framework

    SharePoint uses Fabric, so if you’re building on top of or within a SharePoint experience, you can be sure that your UI will blend in. diff --git a/apps/fabric-website/src/root.tsx b/apps/fabric-website/src/root.tsx index f587e18300dff9..c992ec33be0641 100644 --- a/apps/fabric-website/src/root.tsx +++ b/apps/fabric-website/src/root.tsx @@ -5,6 +5,7 @@ import { createSite } from './utilities/createSite'; import * as platformPickerStyles from '@uifabric/example-app-base/lib/components/PlatformPicker/PlatformPicker.module.scss'; import { SiteDefinition } from './SiteDefinition/index'; import { HomePage } from './pages/HomePage/HomePage'; +import { NotFoundPage } from './pages/NotFoundPage/NotFoundPage'; import { AndroidLogo, AppleLogo, WebLogo } from './utilities/index'; // TODO: handle redirects @@ -25,4 +26,4 @@ registerIcons({ } }); -createSite(SiteDefinition, HomePage); +createSite(SiteDefinition, [NotFoundPage, HomePage]); diff --git a/apps/fabric-website/src/styles/constants.ts b/apps/fabric-website/src/styles/constants.ts index 069f97fcc018d6..ab9d0920e5f4b8 100644 --- a/apps/fabric-website/src/styles/constants.ts +++ b/apps/fabric-website/src/styles/constants.ts @@ -35,6 +35,7 @@ export const PageHeaderFullHeight = 136; export const navWidthSm = 252; export const navWidthLg = 302; export const navPadding = appPaddingSm; +export const topNavHeight = 52; // We want the text to appear the same distance from the body and the nav. It include 8 padding already. export const sideRailPaddingLeft = appPaddingMd - 8; diff --git a/apps/fabric-website/src/version.ts b/apps/fabric-website/src/version.ts index 3817eacf96233a..a3d9d28b5b15c5 100644 --- a/apps/fabric-website/src/version.ts +++ b/apps/fabric-website/src/version.ts @@ -1,4 +1,4 @@ -// @uifabric/fabric-website@6.18.1 +// @uifabric/fabric-website@6.18.4 // Do not modify this file, the file is generated as part of publish. The checked in version is a placeholder only. import { setVersion } from '@uifabric/set-version'; - setVersion('@uifabric/fabric-website', '6.18.1'); \ No newline at end of file + setVersion('@uifabric/fabric-website', '6.18.4'); \ No newline at end of file diff --git a/apps/perf-test/package.json b/apps/perf-test/package.json index 4d4d13af03a7b1..d879b34c7f3ecb 100644 --- a/apps/perf-test/package.json +++ b/apps/perf-test/package.json @@ -28,7 +28,7 @@ "@microsoft/load-themed-styles": "^1.7.13", "es6-promise": "^4.1.0", "immutability-helper": "~2.8.1", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "react": ">=16.8.0 <17.0.0", "react-dom": ">=16.8.0 <17.0.0", "tslib": "^1.7.1" diff --git a/apps/pr-deploy-site/chiclet-test.html b/apps/pr-deploy-site/chiclet-test.html new file mode 100644 index 00000000000000..00a9925fd9f17a --- /dev/null +++ b/apps/pr-deploy-site/chiclet-test.html @@ -0,0 +1,18 @@ + + + + + + + + + + + + + Chiclet Test Page + + diff --git a/apps/pr-deploy-site/config/pre-copy.json b/apps/pr-deploy-site/config/pre-copy.json index dca11927baf12b..e842196fc6ddc3 100644 --- a/apps/pr-deploy-site/config/pre-copy.json +++ b/apps/pr-deploy-site/config/pre-copy.json @@ -1,6 +1,6 @@ { "copyTo": { - "dist": ["./node_modules/@uifabric/*/dist/**", "index.html"], + "dist": ["./node_modules/@uifabric/*/dist/**", "index.html", "chiclet-test.html"], "dist/todo-app": ["./node_modules/todo-app/dist/**"], "dist/theming-designer": ["./node_modules/theming-designer/dist/**"], "dist/test-bundles": ["./node_modules/test-bundles/dist/**"], diff --git a/apps/pr-deploy-site/package.json b/apps/pr-deploy-site/package.json index a50e78c573d7fd..8c331922572b49 100644 --- a/apps/pr-deploy-site/package.json +++ b/apps/pr-deploy-site/package.json @@ -12,7 +12,7 @@ "@uifabric/date-time": "6.1.1", "@uifabric/experiments": "^6.76.2", "@uifabric/fabric-website-resources": "^6.18.1", - "@uifabric/fabric-website": "^6.18.1", + "@uifabric/fabric-website": "^6.18.4", "@uifabric/foundation-scenarios": "^0.1.0", "perf-test": "^6.0.0", "test-bundles": "^6.0.0", diff --git a/apps/server-rendered-app/package.json b/apps/server-rendered-app/package.json index 913b1d026444ac..497a39b744ca45 100644 --- a/apps/server-rendered-app/package.json +++ b/apps/server-rendered-app/package.json @@ -34,7 +34,7 @@ "@uifabric/merge-styles": "^6.17.3", "@uifabric/set-version": "^1.1.3", "es6-promise": "^4.1.0", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "react-dom": "~16.6.3", "react": "~16.6.3", "tslib": "^1.7.1" diff --git a/apps/ssr-tests/package.json b/apps/ssr-tests/package.json index d3b127430972da..a5fa9568620860 100644 --- a/apps/ssr-tests/package.json +++ b/apps/ssr-tests/package.json @@ -27,7 +27,7 @@ "@uifabric/fabric-website-resources": "^6.18.1", "@uifabric/prettier-rules": "^1.0.2", "mocha": "^3.3.0", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "raw-loader": "^0.5.1", "react": "~16.6.3", "react-dom": "~16.6.3", diff --git a/apps/test-bundles/package.json b/apps/test-bundles/package.json index 07e0b76b487a6a..ba19390dcfb4af 100644 --- a/apps/test-bundles/package.json +++ b/apps/test-bundles/package.json @@ -35,7 +35,7 @@ "dependencies": { "@uifabric/set-version": "^1.1.3", "@uifabric/styling": "^6.47.6", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "react": "~16.6.3", "react-dom": "~16.6.3", "tslib": "^1.7.1" diff --git a/apps/theming-designer/package.json b/apps/theming-designer/package.json index e009cfd7885587..82f6a7c6678596 100644 --- a/apps/theming-designer/package.json +++ b/apps/theming-designer/package.json @@ -25,14 +25,14 @@ "dependencies": { "@uifabric/react-cards": "0.3.2", "@uifabric/merge-styles": ">=6.17.3 <7.0.0", - "@uifabric/example-app-base": "^6.20.1", + "@uifabric/example-app-base": "^6.21.0", "@uifabric/variants": "^6.14.2", "@uifabric/set-version": ">=1.1.3 <2.0.0", "@uifabric/icons": ">=6.5.2 <7.0.0", "@microsoft/load-themed-styles": "^1.7.13", "es6-promise": "^4.1.0", "immutability-helper": "~2.8.1", - "office-ui-fabric-react": ">=6.181.1 <7.0.0", + "office-ui-fabric-react": ">=6.182.1 <7.0.0", "react": ">=16.3.2-0 <17.0.0", "react-dom": ">=16.3.2-0 <17.0.0", "typescript": "2.8.4", diff --git a/apps/todo-app/package.json b/apps/todo-app/package.json index 971d22bed26769..04ef61fc21d38d 100644 --- a/apps/todo-app/package.json +++ b/apps/todo-app/package.json @@ -27,7 +27,7 @@ "@microsoft/load-themed-styles": "^1.7.13", "es6-promise": "^4.1.0", "immutability-helper": "~2.8.1", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "react": "~16.6.3", "react-dom": "~16.6.3", "typescript": "2.8.4", diff --git a/apps/vr-tests/package.json b/apps/vr-tests/package.json index 727117c87c0e43..743900328c0c34 100644 --- a/apps/vr-tests/package.json +++ b/apps/vr-tests/package.json @@ -38,7 +38,7 @@ "dependencies": { "@uifabric/experiments": "^6.76.2", "@uifabric/set-version": "^1.1.3", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "react": "~16.6.3", "react-dom": "~16.6.3", "tslib": "^1.7.1", diff --git a/azure-pipelines.release.yml b/azure-pipelines.release.yml new file mode 100644 index 00000000000000..75c43d50fd6404 --- /dev/null +++ b/azure-pipelines.release.yml @@ -0,0 +1,107 @@ +pr: none +trigger: none + +variables: + - group: 'Github and NPM secrets' + +pool: + vmImage: 'Ubuntu 16.04' + +steps: + - task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + + - script: | + git config user.name "UI Fabric Build" + git config user.email "fabrictactical@service.microsoft.com" + git remote set-url origin https://$(githubUser):$(githubPAT)@github.com/OfficeDev/office-ui-fabric-react.git + displayName: Authenticate git for pushes + + - script: | + node common/scripts/install-run-rush.js install --bypass-policy + displayName: rush install + + - script: | + npm run generate-version-files + displayName: npm run generate-version-files + + - script: | + node common/scripts/install-run-rush.js build --production --verbose + displayName: rush build (Create production build) + + - script: | + echo Making $(Build.ArtifactStagingDirectory)/api && + mkdir -p $(Build.ArtifactStagingDirectory)/api && + cp packages/*/dist/*.api.json $(Build.ArtifactStagingDirectory)/api + displayName: Copy api.json files to artifact staging directory + + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: $(Build.ArtifactStagingDirectory)/api + artifactName: 'api-json' + publishLocation: 'Container' + displayName: 'Publish Artifact: api.json' + + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: apps/fabric-website/dist + artifactName: 'fabric-website' + publishLocation: 'Container' + displayName: 'Publish Artifact: Fabric Website' + + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: apps/fabric-website/index.html + artifactName: 'fabric-website-index' + publishLocation: 'Container' + displayName: 'Publish Artifact: Fabric Website index.html' + + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: packages/office-ui-fabric-react/dist + artifactName: 'fabric' + publishLocation: 'Container' + displayName: 'Publish Artifact: Fabric' + + - script: | + node ./common/scripts/install-run-rush.js publish -a -p -b master -n $(npmToken) --add-commit-details --set-access-level public + displayName: 'Publish Change Requests and Bump Versions' + + - script: | + node scripts/updateReleaseNotes.js --token=$(githubPAT) --apply --debug + displayName: 'Update github release notes' + + - script: | + oufrVersion=$(node -p -e "require('./packages/office-ui-fabric-react/package.json').version") && + echo "OUFR Version: $oufrVersion" && + echo $oufrVersion > oufr-version.txt && + echo "##vso[task.setvariable variable=oufrVersion;]$oufrVersion" + displayName: 'Set OUFR Version Task Variable' + + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: ./oufr-version.txt + artifactName: 'oufr-version' + publishLocation: 'Container' + displayName: 'Publish Artifact: oufr-version.txt' + + - script: | + npm run create-public-flight-config -- --baseCDNUrl https://fabricweb.azureedge.net/fabric-website/ + workingDirectory: apps/fabric-website + displayName: 'Generate Fabric Website Flight Manifest Files' + + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: apps/fabric-website/flights + artifactName: 'fabric-website-manifests' + publishLocation: 'Container' + displayName: 'Publish Artifact: Website manifests' + + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: apps/fabric-website-resources/dist + artifactName: 'fabric-website-resources' + publishLocation: 'Container' + displayName: 'Publish Artifact: Fabric Website Resources' diff --git a/common/config/rush/shrinkwrap.yaml b/common/config/rush/shrinkwrap.yaml index 222b56437ed60e..c75f90176bbfb7 100644 --- a/common/config/rush/shrinkwrap.yaml +++ b/common/config/rush/shrinkwrap.yaml @@ -23,6 +23,7 @@ dependencies: '@rush-temp/foundation-scenarios': 'file:projects/foundation-scenarios.tgz' '@rush-temp/icons': 'file:projects/icons.tgz' '@rush-temp/jest-serializer-merge-styles': 'file:projects/jest-serializer-merge-styles.tgz' + '@rush-temp/lists': 'file:projects/lists.tgz' '@rush-temp/merge-styles': 'file:projects/merge-styles.tgz' '@rush-temp/migration': 'file:projects/migration.tgz' '@rush-temp/office-ui-fabric-react': 'file:projects/office-ui-fabric-react.tgz' @@ -80,7 +81,6 @@ dependencies: '@types/storybook__react': 3.0.5 '@types/webpack': 4.4.0 '@types/webpack-env': 1.13.9 - '@uifabric/react-cards': 0.1.0 async: 2.6.1 autoprefixer: 7.2.6 awesome-typescript-loader: 3.5.0 @@ -284,6 +284,10 @@ packages: dev: false resolution: integrity: sha512-0Ib811ohD4lU439k0yswTwua8JZjQBaHrrM6HAgq5KbTZCRW3FtPd9rCKSvtCFcaFFcuzNGsg7PHkByo2XQAww== + /@microsoft/load-themed-styles/1.9.1: + dev: false + resolution: + integrity: sha512-IoaTk18QME1M53GJ9RnnGW39eG+uiMzd4iKNQPu4ZoYHeKcZXvi1dMqTTSv9YG324qFjPf9ed1pEIlZeFsfIHA== /@microsoft/loader-load-themed-styles/1.7.107: dependencies: '@microsoft/load-themed-styles': 1.8.39 @@ -1139,32 +1143,6 @@ packages: dev: false resolution: integrity: sha512-sTuyzO2jJuDZwOM7mv7NXqIkcr/32qM45gDTUDHGaWMQQBIsr3etgJwUgwpzL1lhqttd/4W8SHu74N/GMLLalw== - /@uifabric/charting/0.28.13: - dependencies: - '@microsoft/load-themed-styles': 1.8.85 - '@types/d3-array': 1.2.1 - '@types/d3-axis': 1.0.10 - '@types/d3-scale': 2.0.0 - '@types/d3-selection': 1.3.0 - '@types/d3-shape': 1.3.1 - '@types/d3-time-format': 2.1.1 - '@uifabric/icons': 6.5.1 - '@uifabric/set-version': 1.1.3 - d3-array: 1.2.1 - d3-axis: 1.0.8 - d3-scale: 2.0.0 - d3-selection: 1.3.0 - d3-shape: 1.3.5 - d3-time-format: 2.1.3 - office-ui-fabric-react: 6.174.0 - prop-types: 15.7.2 - tslib: 1.9.3 - dev: false - peerDependencies: - react: ^0.14.9 || ^15.0.1-0 || ^16.0.0-0 - react-dom: ^0.14.9 || ^15.0.1-0 || ^16.0.0-0 - resolution: - integrity: sha512-IQgJhJUq3ZY84N+aWfPxQsQwcZSvmp0hubTUavLDMp7rFyohhbNiwJta7hYwv9eppwXtgaFBbOXKOC5ieG/YMQ== /@uifabric/charting/0.28.13/react-dom@16.6.3+react@16.6.3: dependencies: '@microsoft/load-themed-styles': 1.8.85 @@ -1208,31 +1186,6 @@ packages: react-dom: ^0.14.9 || ^15.0.1-0 || ^16.0.0-0 resolution: integrity: sha512-Izvn9xUjS6rZlkvHuLht20wmTGi0tQVUTzQtPtZ/fkts/JLq89cBoHm7xu4z7CfB2r9K1bsKd0Am28NFuRfjqw== - /@uifabric/experiments/6.75.0: - dependencies: - '@microsoft/load-themed-styles': 1.8.85 - '@uifabric/azure-themes': 0.1.8 - '@uifabric/charting': 0.28.13 - '@uifabric/file-type-icons': 6.4.8 - '@uifabric/fluent-theme': 0.16.7 - '@uifabric/foundation': 0.7.4 - '@uifabric/icons': 6.5.1 - '@uifabric/merge-styles': 6.17.0 - '@uifabric/set-version': 1.1.3 - '@uifabric/styling': 6.47.0 - '@uifabric/theme-samples': 0.1.5 - '@uifabric/utilities': 6.37.1 - '@uifabric/variants': 6.14.1 - deep-assign: 2.0.0 - office-ui-fabric-react: 6.174.0 - prop-types: 15.7.2 - tslib: 1.9.3 - dev: false - peerDependencies: - react: '>=16.3.2-0 <17.0.0' - react-dom: '>=16.3.2-0 <17.0.0' - resolution: - integrity: sha512-CMh9/5hN/u3JgIjSSavxTdcVuamoZtY6FICReNND/oShqBl1FLLlXxJ+OaudMYqYPzbRqq9rzPJWnTULUlX4xw== /@uifabric/experiments/6.75.0/react-dom@16.6.3+react@16.6.3: dependencies: '@microsoft/load-themed-styles': 1.8.85 @@ -1261,17 +1214,6 @@ packages: react-dom: '>=16.3.2-0 <17.0.0' resolution: integrity: sha512-CMh9/5hN/u3JgIjSSavxTdcVuamoZtY6FICReNND/oShqBl1FLLlXxJ+OaudMYqYPzbRqq9rzPJWnTULUlX4xw== - /@uifabric/file-type-icons/6.4.8: - dependencies: - '@uifabric/set-version': 1.1.3 - '@uifabric/styling': 6.47.0 - tslib: 1.9.3 - dev: false - peerDependencies: - react: '>=16.3.2-0 <17.0.0' - react-dom: '>=16.3.2-0 <17.0.0' - resolution: - integrity: sha512-JQF3Ok7bvR/yGquMe0u0A+kroSA6B2ngkUIjiFEgdBmqqlyiN60PP20Mon9PG9KD6aNNVOE9QV4W6CLJiVoByQ== /@uifabric/file-type-icons/6.4.8/react-dom@16.6.3+react@16.6.3: dependencies: '@uifabric/set-version': 1.1.3 @@ -1346,26 +1288,6 @@ packages: dev: false resolution: integrity: sha512-yTIjOhskNzhstiqpMhM/HI5yUBCNbWOF/8+WDfGLIe4rusxxjVyC6lpBV+B2Iw20ridDFdIhs/YjKy19/ifTgQ== - /@uifabric/react-cards/0.1.0: - dependencies: - '@microsoft/load-themed-styles': 1.8.85 - '@uifabric/azure-themes': 0.1.8 - '@uifabric/experiments': 6.75.0 - '@uifabric/file-type-icons': 6.4.8 - '@uifabric/fluent-theme': 0.16.7 - '@uifabric/foundation': 0.7.4 - '@uifabric/set-version': 1.1.3 - '@uifabric/styling': 6.47.0 - '@uifabric/theme-samples': 0.1.5 - '@uifabric/utilities': 6.37.1 - office-ui-fabric-react: 6.174.0 - tslib: 1.9.3 - dev: false - peerDependencies: - react: '>=16.3.2-0 <17.0.0' - react-dom: '>=16.3.2-0 <17.0.0' - resolution: - integrity: sha512-jUeKghRAbVaui7DHFf4Xd7xvWHfAuzfzj38SeYUGpHWi6f2gLzVvdUSy7n+mQO+japOUoP5A4MsDzO0XIz6khg== /@uifabric/react-cards/0.1.0/react-dom@16.6.3+react@16.6.3: dependencies: '@microsoft/load-themed-styles': 1.8.85 @@ -1770,6 +1692,25 @@ packages: dev: false resolution: integrity: sha512-h8UtyB/TCdOwWoEPQJGHgsWwSnTqPrRZbhyZYjAwY9/AbjdjfkKy9L/T3fIFS6MKX8YrpWFRm6xqFSgU+2DRGw== + /airbnb-prop-types/2.13.2/react@16.6.3: + dependencies: + array.prototype.find: 2.0.4 + function.prototype.name: 1.1.0 + has: 1.0.3 + is-regex: 1.0.4 + object-is: 1.0.1 + object.assign: 4.1.0 + object.entries: 1.1.0 + prop-types: 15.7.2 + prop-types-exact: 1.2.0 + react: 16.6.3 + react-is: 16.8.6 + dev: false + id: registry.npmjs.org/airbnb-prop-types/2.13.2 + peerDependencies: + react: ^0.14 || ^15.0.0 || ^16.0.0-alpha + resolution: + integrity: sha512-2FN6DlHr6JCSxPPi25EnqGaXC4OC3/B3k1lCd6MMYrZ51/Gf/1qDfaR+JElzWa+Tl7cY2aYOlsYJGFeQyVHIeQ== /ajv-errors/1.0.1/ajv@6.6.2: dependencies: ajv: 6.6.2 @@ -2150,6 +2091,13 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + /array.prototype.find/2.0.4: + dependencies: + define-properties: 1.1.3 + es-abstract: 1.13.0 + dev: false + resolution: + integrity: sha1-VWpcU2LAhkgyPdrrnenRS8GGTJA= /array.prototype.flat/1.2.1: dependencies: define-properties: 1.1.3 @@ -5495,6 +5443,26 @@ packages: react-dom: ^16.0.0-0 resolution: integrity: sha512-2ruTTCPRb0lPuw/vKTXGVZVBZqh83MNDnakMhzxhpJcIbneEwNy2Cv0KvL97pl57/GOazJHflWNLjwWhex5AAA== + /enzyme-adapter-react-16/1.13.0/bee7085a969f5266f6e838ec30192afe: + dependencies: + enzyme: 3.9.0 + enzyme-adapter-utils: /enzyme-adapter-utils/1.12.0/react@16.6.3 + object.assign: 4.1.0 + object.values: 1.1.0 + prop-types: 15.7.2 + react: 16.6.3 + react-dom: /react-dom/16.6.3/react@16.6.3 + react-is: 16.8.6 + react-test-renderer: /react-test-renderer/16.8.6/react@16.6.3 + semver: 5.7.0 + dev: false + id: registry.npmjs.org/enzyme-adapter-react-16/1.13.0 + peerDependencies: + enzyme: ^3.0.0 + react: ^16.0.0-0 + react-dom: ^16.0.0-0 + resolution: + integrity: sha512-ZUVo9XATKrKavfe9v61EiYDu6V1NJCKtJyp1X2ILPgtuGQ58bItUR9uWwH6gzKJNww3sUiXM826jIiwPgO9iVQ== /enzyme-adapter-react-16/1.7.0: dependencies: enzyme-adapter-utils: 1.9.0 @@ -5559,6 +5527,21 @@ packages: react: 0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0 resolution: integrity: sha512-oasinhhLoBuZsIkTe8mx0HiudtfErUtG0Ooe1FOplu/t4c9rOmyG5gtrBASK6u4whHIRWvv0cbZMElzNTR21SA== + /enzyme-adapter-utils/1.12.0/react@16.6.3: + dependencies: + airbnb-prop-types: /airbnb-prop-types/2.13.2/react@16.6.3 + function.prototype.name: 1.1.0 + object.assign: 4.1.0 + object.fromentries: 2.0.0 + prop-types: 15.7.2 + react: 16.6.3 + semver: 5.7.0 + dev: false + id: registry.npmjs.org/enzyme-adapter-utils/1.12.0 + peerDependencies: + react: 0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0 + resolution: + integrity: sha512-wkZvE0VxcFx/8ZsBw0iAbk3gR1d9hK447ebnSYBf95+r32ezBq+XDSAvRErkc4LZosgH8J7et7H7/7CtUuQfBA== /enzyme-adapter-utils/1.9.0: dependencies: function.prototype.name: 1.1.0 @@ -11755,6 +11738,14 @@ packages: node: '>= 6' resolution: integrity: sha512-HTzM3UWp/99A0gk51gAegwo1QRYA7xjcZufMNe33rCclFszUYAuHe1fIN/3ZmiHeGPkUsNaRyQm1hHOfM0PKxA== + /prop-types-exact/1.2.0: + dependencies: + has: 1.0.3 + object.assign: 4.1.0 + reflect.ownkeys: 0.2.0 + dev: false + resolution: + integrity: sha512-K+Tk3Kd9V0odiXFP9fwDHUYRyvK3Nun3GVyPapSIs5OBkITAm15W0CPFD/YKTkMUAbc0b9CUwRQp2ybiBIq+eA== /prop-types/15.6.2: dependencies: loose-envify: 1.4.0 @@ -12292,6 +12283,10 @@ packages: dev: false resolution: integrity: sha512-PVadd+WaUDOAciICm/J1waJaSvgq+4rHE/K70j0PFqKhkTBsPv/82UGQJNXAngz1fOQLLxI6z1sEDmJDQhCTAA== + /react-is/16.8.6: + dev: false + resolution: + integrity: sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== /react-lifecycles-compat/3.0.4: dev: false resolution: @@ -12422,6 +12417,19 @@ packages: react: ^16.0.0 resolution: integrity: sha512-jQ9Tf/ilIGSr55Cz23AZ/7H3ABEdo9oy2zF9nDHZyhLHDSLKuoILxw2ifpBfuuwQvj4LCoqdru9iZf7gwFH28A== + /react-test-renderer/16.8.6/react@16.6.3: + dependencies: + object-assign: 4.1.1 + prop-types: 15.7.2 + react: 16.6.3 + react-is: 16.8.6 + scheduler: 0.13.6 + dev: false + id: registry.npmjs.org/react-test-renderer/16.8.6 + peerDependencies: + react: ^16.0.0 + resolution: + integrity: sha512-H2srzU5IWYT6cZXof6AhUcx/wEyJddQ8l7cLM/F7gDXYyPr4oq+vCIxJYXVGhId1J706sqziAjuOEjyNkfgoEw== /react-transition-group/2.5.0: dependencies: dom-helpers: 3.4.0 @@ -12739,6 +12747,10 @@ packages: dev: false resolution: integrity: sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A== + /reflect.ownkeys/0.2.0: + dev: false + resolution: + integrity: sha1-dJrO7H8/34tj+SegSAnpDFwLNGA= /refractor/2.9.0: dependencies: hastscript: 5.0.0 @@ -16045,7 +16057,7 @@ packages: dev: false name: '@rush-temp/a11y-tests' resolution: - integrity: sha512-9akc3IR7uVrhFtlqsIIkja3Ct84pLzDLC2n9tUpHrSpV5WCLIBj0R3TNwSwdxr35CqeE3DkFQQgk42KggiOS6w== + integrity: sha512-bgdsPFHlgRPeYP7JD4tXcNU0OqOp4girv1T/EZMLyBHXS2hi51056qioJzyvLj9tEEO/A7YGHqbnaulfZlB0GQ== tarball: 'file:projects/a11y-tests.tgz' version: 0.0.0 'file:projects/api-docs.tgz': @@ -16057,7 +16069,7 @@ packages: dev: false name: '@rush-temp/api-docs' resolution: - integrity: sha512-YgKhd4yv6VXrzZguMhZ8GAo4nrQ3ihs/CBmP7iGU0XP0bsiDbPfncG76JxtAZPwqiZ8TrDHP1SkVnjX0z0kyDQ== + integrity: sha512-FZImZ12vbnHt32B2k44lrIQpK29TlhN2/0WHJn6R33gpux6JIUvwWpn/osDg9vfAG7+Fuvr4mW6uSiYJvbodfQ== tarball: 'file:projects/api-docs.tgz' version: 0.0.0 'file:projects/azure-themes.tgz': @@ -16067,7 +16079,7 @@ packages: dev: false name: '@rush-temp/azure-themes' resolution: - integrity: sha512-OyalngSiXMsKx1UVIVt6IMQvVkxifPOTzwNp6DZ1LGLvzVu7iuHOBPY7XWuQ4fj8g2S7ESzbZd44id0N2+PKvg== + integrity: sha512-MyJyXSFNysMVu+lrBPtw0QPTZ9a6M6dL228tPFC4E/mDetfTljrN6NLu0QRvAerFY80MZXdpMG+8YB7oESs5og== tarball: 'file:projects/azure-themes.tgz' version: 0.0.0 'file:projects/build.tgz': @@ -16136,7 +16148,7 @@ packages: dev: false name: '@rush-temp/build' resolution: - integrity: sha512-uMULbQSSFIJv5fHMa7Hhoh9M+/+CM/RrpcoVFSmS/P1fc6AxNgdXqqT33mxWuhGBluzsNoeS9ndtOsmbC1EjSg== + integrity: sha512-dvcCdf8aD2Q626hF+F3v1tua36ArbARdzljyDVwxS69+9qefgK4ebxmbJ2I0Lf+bHgozZ8bGW2rkk8VABVklyQ== tarball: 'file:projects/build.tgz' version: 0.0.0 'file:projects/charting.tgz': @@ -16179,7 +16191,7 @@ packages: dev: false name: '@rush-temp/charting' resolution: - integrity: sha512-34cYgmG1IJZuNUFXftA7zSPhzbiQoCq13tiY7Z9MI+N7UMPWmNaynDxaB6gEtIax+GxSEz8FylAL3v4KPANQTg== + integrity: sha512-TU4kS4FplhxeiSqfl9cxcCBusR9RlUlMVi1Nu0dG6K7OvyjP/dBfgV05TmoHia55iPLkMt4KawjkuZMl6BlxMw== tarball: 'file:projects/charting.tgz' version: 0.0.0 'file:projects/codepen-loader.tgz': @@ -16200,7 +16212,7 @@ packages: dev: false name: '@rush-temp/codepen-loader' resolution: - integrity: sha512-fIwDu99RQlTPeI1UT4qkGxjp5Z3gHcWAl/J6JayOjgkwHh9j+uzdsB0wg7GwCGl164yhlZ07piDqrGpNKSIhGA== + integrity: sha512-9bPAsSkwvIDlRswRPAFdrdDLCNHDde8NPbvFHL6eyoTxyh96Ex0hCstdV8EN+Q3e30nJzT1G8vQ3+G9rTOQg3A== tarball: 'file:projects/codepen-loader.tgz' version: 0.0.0 'file:projects/date-time.tgz': @@ -16225,7 +16237,7 @@ packages: dev: false name: '@rush-temp/date-time' resolution: - integrity: sha512-+0tRFzzrQ8Tg3LwNhHwNt5ZRb5oNQOjjvo3HXc7laURQjgch/VnhlXeh1TaaFrr5Tj6u78frWt8Wfx3NRKLGVA== + integrity: sha512-1UML0eyT8iORr1XXk2Tgpgwspo1DKa7x/fvpeSuYqKQEXyUVancm4NBwtEts9IA3ZjCLDd5P3zbqakyA8g5KrA== tarball: 'file:projects/date-time.tgz' version: 0.0.0 'file:projects/dom-tests.tgz': @@ -16250,7 +16262,7 @@ packages: dev: false name: '@rush-temp/dom-tests' resolution: - integrity: sha512-aFej9KrXoC+SvnhjKDcljgY8pKIp7jnRQQafCYINwGRCJWPODq2FQ7Y/fdMzlWTcy1Oj7fIKDVPk5MsTeLInDA== + integrity: sha512-jjhy0//NZqEgnrxDEkg/RC4WwU2nGpLrk0YKa/PCWZWdMsmw1yzN1gfBphrWVtCcs+iRKaTmoWe6fuSVIfKxMw== tarball: 'file:projects/dom-tests.tgz' version: 0.0.0 'file:projects/example-app-base.tgz': @@ -16281,7 +16293,7 @@ packages: dev: false name: '@rush-temp/example-app-base' resolution: - integrity: sha512-fP7CRLhw0vN7rpaDJc6u3V3tC9goPVg/UJnyRby+1tbjYGlr4ioVBjPhMJbJTrRNPAnUOfMK3kyPO/+Z35jgtw== + integrity: sha512-5e6AlFkE8oXYjNGMTFENiq6vS1Ox0ujRMm+XPrbR4GPjmHzx39oRn2Bw+r3YY0LvQtvQTKuHf7mMRhdGGGEE6w== tarball: 'file:projects/example-app-base.tgz' version: 0.0.0 'file:projects/experiments.tgz': @@ -16314,7 +16326,7 @@ packages: dev: false name: '@rush-temp/experiments' resolution: - integrity: sha512-oZ6A1z5+BYQz18RlEl4ig7aDegLvbdCTtBaQxW0zs8FnlhL4AH5C8WtvhjRSSLxxldlAHOHgwOwhx5QqWvsZjQ== + integrity: sha512-Ar2BRuzbRfA5i6GIAW2/6owul9Bqt5gWFxGtXBz4R5hDHHKou3OrLAl+DC3i6VJrL2apI43fzbqeJQvx29H6wA== tarball: 'file:projects/experiments.tgz' version: 0.0.0 'file:projects/fabric-website-resources.tgz': @@ -16350,7 +16362,7 @@ packages: dev: false name: '@rush-temp/fabric-website-resources' resolution: - integrity: sha512-bQP9s8mZnoLLUUFAKh8HPanjhDrTHC9RjvpEvfy6zRnDSKBoupZ1n/LZr0m+uX5pYXX3SgerF6SF1/r53Axnsw== + integrity: sha512-Hpxo7Jxjo14dPldv3iDujy274ry8GfrCgroV93ekIJ4pXaKfd7PO3xAcT5BrrJsi2+MrEt7A0F2c+MFdwwQZqw== tarball: 'file:projects/fabric-website-resources.tgz' version: 0.0.0 'file:projects/fabric-website.tgz': @@ -16378,7 +16390,7 @@ packages: dev: false name: '@rush-temp/fabric-website' resolution: - integrity: sha512-rQWT3dq7UtTaYTVuNLc4uGZah4NnPQL0T17l/5naAgwUM7VM0jNaEWFq4gh+RWbrK7r8bljnA5G+pSNMCEHzSA== + integrity: sha512-t5ynofqo88EkrGBTnQqDHqWnPSgWfuzDhIt6BXEGesGdE9g5TRMK3AYtdfXLNe6sVKex1lKvMkUuDBzK3KVKAQ== tarball: 'file:projects/fabric-website.tgz' version: 0.0.0 'file:projects/file-type-icons.tgz': @@ -16392,7 +16404,7 @@ packages: dev: false name: '@rush-temp/file-type-icons' resolution: - integrity: sha512-+rFf9y0YYhiW6tKKZfaqdUzGWcvWneP3xfb9WUk+fwATzjtd7bDc/Qdb10+jCRNvU99TwVyWFYoNoj6Y4yNIfw== + integrity: sha512-pb5oqUjXZ1cxtbeM6sFLmUOx3hG3uebOOXXIdss1YkzpWUvXEeTMzXIBd9verpcZ3u+3RGWeFWnIzDVf/DprCA== tarball: 'file:projects/file-type-icons.tgz' version: 0.0.0 'file:projects/fluent-theme.tgz': @@ -16402,7 +16414,7 @@ packages: dev: false name: '@rush-temp/fluent-theme' resolution: - integrity: sha512-RHNJpwRE0O3zM4q2cEsGYS8qBpiFPvLxd+5yYjsZNzOR+xO1r8cx0EyFbp3Gg4KqMEgvs0liyhLXlIRw+C20HA== + integrity: sha512-tVf6WnDkb2QJp1KO0wSsnpmFeehDSwgglPk+h+o/0PqWXIl0gc8rLGzcvdjOEHZxkGezm1/Hi+NEi2P6EcKPJw== tarball: 'file:projects/fluent-theme.tgz' version: 0.0.0 'file:projects/foundation-scenarios.tgz': @@ -16426,7 +16438,7 @@ packages: dev: false name: '@rush-temp/foundation-scenarios' resolution: - integrity: sha512-WN0+wPxd/hguSL2QiRQdB6xmhw7TUUEnYoAXpLT7pYD4EZBo5MtmuqcLK74ZpR9h9YvB4LU4uxCPvbsm23jl+Q== + integrity: sha512-9+4t8upwlLrtzOlyjldV41OAEMUN+FcbolYrSQmTlqlA6fnEVdM9k/4E1nM2VR8WDt/qsgODxwaZbIkdPKY0aQ== tarball: 'file:projects/foundation-scenarios.tgz' version: 0.0.0 'file:projects/foundation.tgz': @@ -16448,7 +16460,7 @@ packages: dev: false name: '@rush-temp/foundation' resolution: - integrity: sha512-a+BDwqAmhGfQJJq9qAfG8ef97VHQKTW0AXFmMODnDDzwINzcsXalYeLBPXwaWSx+qLKqT+K1JZLFhTamRinfKA== + integrity: sha512-/8mLQS4JBCgQ69c632fJ9gADD66rFeYW6dvHecm6Fg8m2x/nd4btC6EmqKUd/JgPbHDunOKfOU2Kju/M1Z9VXg== tarball: 'file:projects/foundation.tgz' version: 0.0.0 'file:projects/icons.tgz': @@ -16457,7 +16469,7 @@ packages: dev: false name: '@rush-temp/icons' resolution: - integrity: sha512-X+Xk1uJ1XJJu7FNdsQf7Gx4ngMkQYE7+mnhXct6WP/7c7PzoUCoDWV3BkQe6bkcgpghDrXTDkaKABW7mg1zRwQ== + integrity: sha512-pc2b1CfYQOQ2BpLY1dCmCHsSUSG0JMcVLHmJaCWxtJg2BZ4Yl8fqlwXDnHEDA6YMoKTOHHKW7qjfycbh8Yo6uw== tarball: 'file:projects/icons.tgz' version: 0.0.0 'file:projects/jest-serializer-merge-styles.tgz': @@ -16472,9 +16484,33 @@ packages: dev: false name: '@rush-temp/jest-serializer-merge-styles' resolution: - integrity: sha512-dFMJAKAWPZIAmav1kV9gg27bLv4UiB+tWzRWFGdd3jU5fIZVNkXmEbUxeMM1hICN2RpXKnyWmQNW2h9GxR/2MA== + integrity: sha512-gtq8G9ZQtQIFYqIwHIzGknakKKlWyn2NoHFPkzCgtvXJCEiNnQu3riKq3lTqjdq61pkBcsfC+7oibgF/tJvZ/g== tarball: 'file:projects/jest-serializer-merge-styles.tgz' version: 0.0.0 + 'file:projects/lists.tgz': + dependencies: + '@microsoft/load-themed-styles': 1.9.1 + '@types/enzyme': 3.1.13 + '@types/enzyme-adapter-react-16': 1.0.3 + '@types/es6-promise': 0.0.32 + '@types/jest': 23.0.0 + '@types/react': 16.3.16 + '@types/react-dom': 16.0.5 + '@types/react-test-renderer': 16.8.1 + '@types/webpack-env': 1.13.9 + enzyme: 3.9.0 + enzyme-adapter-react-16: /enzyme-adapter-react-16/1.13.0/bee7085a969f5266f6e838ec30192afe + es6-weak-map: 2.0.2 + react: 16.6.3 + react-dom: /react-dom/16.6.3/react@16.6.3 + react-test-renderer: /react-test-renderer/16.8.6/react@16.6.3 + tslib: 1.9.3 + dev: false + name: '@rush-temp/lists' + resolution: + integrity: sha512-6lAN+qbeWm+gvJ6POfqvYHifxfTxQEpHSj/1/HJrACWQ1TDxjTbWdSK1IR5w1pTipRgFswGKi0K6QwjnlHhg9Q== + tarball: 'file:projects/lists.tgz' + version: 0.0.0 'file:projects/merge-styles.tgz': dependencies: '@types/jest': 23.0.0 @@ -16482,7 +16518,7 @@ packages: dev: false name: '@rush-temp/merge-styles' resolution: - integrity: sha512-DcyN2IWZHjA6HfitQgoB7cgkSXwUNtjiCFQU89DftOrj9uE46JmOUba3xRDrG7dxu3XDmX0DouDlttVrv7rhTA== + integrity: sha512-zZpKy7DRrnSOgnbbeugHlxJp7h+XEyob809oVaHnjukJtPhuVuCpPIDHzTACGmC8ECame6yorD2U4+Oe0eyKpA== tarball: 'file:projects/merge-styles.tgz' version: 0.0.0 'file:projects/migration.tgz': @@ -16514,7 +16550,7 @@ packages: dev: false name: '@rush-temp/migration' resolution: - integrity: sha512-paD0mZ6Coto2rKl4vAvwqwBPN1id4okEWc136ilibBP0x3+HoqMw1yj2r6Bcc7CZhpj8UeYN5wvD36eUdRESvQ== + integrity: sha512-/zXQSTelcCSME7xjDJEbjglG/a1zzDzedz+wT9LopfkTzGLumZ3Sw0j7PrkqC95hALl5HKl9Tm3TTpjkwcT7MQ== tarball: 'file:projects/migration.tgz' version: 0.0.0 'file:projects/office-ui-fabric-react.tgz': @@ -16554,7 +16590,7 @@ packages: dev: false name: '@rush-temp/office-ui-fabric-react' resolution: - integrity: sha512-eZlsRwDc5k2X0L3JXeknjDAdAWK8YbrqkbMgF6gP2clX7n/RAEvB/KDVUOnors90Ov0tqYDvOyyp4uospfhTAQ== + integrity: sha512-To6W8UICJJLdZg4VuK2oIIUP0yEPRII3YeQTdFAFWbUpbiahmVWrV1h8Gcp8RA+H6wuV49jps0ZSkb48mf5p+w== tarball: 'file:projects/office-ui-fabric-react.tgz' version: 0.0.0 'file:projects/perf-test.tgz': @@ -16573,7 +16609,7 @@ packages: dev: false name: '@rush-temp/perf-test' resolution: - integrity: sha512-F1a4FwgY/9C893Vl0YUHo7s7l/UFrB6zYEpw7n/Ua2JUziakrqx+JZ2Z3Od9xUS4ba9j0LBwR+mpkireHtaDzg== + integrity: sha512-MIN95lhOUDQ54sJ9TCt7Ayu1YkhkMoNO+YCTEeB44vMnci/osbtVESp3c+hBN3Ob2KlzVBoUAxEVUawRcZCHSw== tarball: 'file:projects/perf-test.tgz' version: 0.0.0 'file:projects/pr-deploy-site.tgz': @@ -16582,14 +16618,14 @@ packages: dev: false name: '@rush-temp/pr-deploy-site' resolution: - integrity: sha512-/TMCa+1BIDXiHeY18qIeNMyNiuU65K1JdinIr1j3qWuADqyX1HZ3R7NAREuwOvBHQQN3dKYT5cbkg0l5tKkhpQ== + integrity: sha512-ixscC5qsSna4kQwazfCXob1f91C3vCedzoWzEz1EbinxKkZRdm5DvvM3kimzDODgJueQMx4uYgr+YOIbsGYWYg== tarball: 'file:projects/pr-deploy-site.tgz' version: 0.0.0 'file:projects/prettier-rules.tgz': dev: false name: '@rush-temp/prettier-rules' resolution: - integrity: sha512-7r4uNiMS8+omI76CKiVw7nJn2G0vs6Cd+CEAmTGmXDRT/FaMbDSIlsOpg+jzuO/fzg/zDB5GT7kwYff1IQWMiw== + integrity: sha512-jWWVmeywKZJiB8xv4ZdJ77AkTUoIgzr9ZNB2lGWp57zq/NqAGn6JVhkrf8Kp4GUPUyszGKn2NIVPx510n1eT7Q== tarball: 'file:projects/prettier-rules.tgz' version: 0.0.0 'file:projects/react-cards.tgz': @@ -16614,7 +16650,7 @@ packages: dev: false name: '@rush-temp/react-cards' resolution: - integrity: sha512-TU3d+M4Dz7//K60DC/Unox3nKEAgaj43V3ys5WXWAhs19i430gVh9p1d/J4ZmAvGHQGaXKmXHSxNRgPfQ3w7cQ== + integrity: sha512-HjtQvQXHahoKqZhpghqblxmejVYpyHNjhLY0cSYgbKbG5XBd0EITBh6PqpuGX4daTMWwzQBig0dkqNyz3gWlHA== tarball: 'file:projects/react-cards.tgz' version: 0.0.0 'file:projects/server-rendered-app.tgz': @@ -16634,7 +16670,7 @@ packages: dev: false name: '@rush-temp/server-rendered-app' resolution: - integrity: sha512-nIT1vNymSMXbJU0xIlowaZvilMM/po+I1MVF/jBycome9pbOv80X+sYwZx8RN6kcp7k3Bmca7LnxoRQt/lIrQw== + integrity: sha512-PTKn47SHZ8wPzIn9EtSF2IZ+4lHp/Q8OYZhZPIhX57+pSfb92ri04xfDqD/gj0zQLHrTuIoQtEJiHWXlN5Hdsw== tarball: 'file:projects/server-rendered-app.tgz' version: 0.0.0 'file:projects/set-version.tgz': @@ -16644,7 +16680,7 @@ packages: dev: false name: '@rush-temp/set-version' resolution: - integrity: sha512-ewQ7olWNGrlyOVbvGy5EkNeimohWvFhfUomWVU6St4tcgaqbRaozniu4obEAW0p7aCUtcUrAVvNrIZaD07QhxQ== + integrity: sha512-nveiHH7skpaqgHGAN/s+cx8Gd5YdK6gLJ9FL1CEOJWOda1tIi7ntg5wJ12tLVAI9bhNE1vruqUwH3pAPg0SLcA== tarball: 'file:projects/set-version.tgz' version: 0.0.0 'file:projects/ssr-tests.tgz': @@ -16663,7 +16699,7 @@ packages: dev: false name: '@rush-temp/ssr-tests' resolution: - integrity: sha512-Hi3B1ziYa0GumMyKEYr3n7jSpstWz6RFQ+UbSBmnB81MlY0O4IKAmPSh7ISWPuea7Kt55yeM2YyX1sOkVsV+Ag== + integrity: sha512-iW2sORmcr8EQRp0zQUzqlBGtOKciKdvlTuR2brV/DO/FR0l0N/HZ/FNlBNP3MEXF5/fC/TDlLhUxtRmHNbFx7Q== tarball: 'file:projects/ssr-tests.tgz' version: 0.0.0 'file:projects/styling.tgz': @@ -16680,7 +16716,7 @@ packages: dev: false name: '@rush-temp/styling' resolution: - integrity: sha512-nxfmmTp7r7iJrTjQIqWA1HWwdl5No8HMWUMicoGQBO5y4P9EKSpTg3sSyUkY0G409y7LihzqyMEyjEdeG7eBxw== + integrity: sha512-qxBh7gY8L8v6CZmpBuU/s8Vuknbmj8LkGuNB+K2cPoM68rKyvSLAmFS+OUq/dE70tbmQj6tVcW0YC6NFkGXSzQ== tarball: 'file:projects/styling.tgz' version: 0.0.0 'file:projects/test-bundles.tgz': @@ -16694,7 +16730,7 @@ packages: dev: false name: '@rush-temp/test-bundles' resolution: - integrity: sha512-r77TEGGyHFhYuWBSxnr15HFRNcZ2tD6S38LSNqP9oSMxduQ59cyiIPN7nWR6cn29SmFrLSXgvTZ+BgD2vFnx4Q== + integrity: sha512-HeLKqspBdWLayg4nPrZ55O2C9tNOeTtnypRHu+ZPZ0ZKcbVOVJvaqcBEF/KFJQfagGxGAW7Ru/zCB2MAzxi9dg== tarball: 'file:projects/test-bundles.tgz' version: 0.0.0 'file:projects/test-utilities.tgz': @@ -16716,7 +16752,7 @@ packages: dev: false name: '@rush-temp/test-utilities' resolution: - integrity: sha512-kgNOQXN1McMFqCaHfNRY9kXqcYl9C2Vgdiw+RUtW34Y439YJ956RunMOdL2XB6KULEwO3yvW/k6W2iBC/I9N/Q== + integrity: sha512-w7nuQjPFn3IyOUZTz9Oz+G9c1X0RwIjgn8PHq4aLPapuWo4wc/BrbNEUIE/hU+5kf67fEpdKUk3qTz7wO0070Q== tarball: 'file:projects/test-utilities.tgz' version: 0.0.0 'file:projects/theme-samples.tgz': @@ -16726,7 +16762,7 @@ packages: dev: false name: '@rush-temp/theme-samples' resolution: - integrity: sha512-qoZma2qSQKV0JjeHnFNpxb7MBG8Y/NR/6f2mAxhb7LNGam+93VaWQX4mNQfT7AZ+n1SOFtwCmvUg8HB7MJgJrg== + integrity: sha512-GizC7WO61xhKY3TVxhQ7To9vWeZtDHpmiEj9DiXESP5+QQeo+vP4KXBGS59NZhdyejS5C82kAEdNFLtBfmc/UA== tarball: 'file:projects/theme-samples.tgz' version: 0.0.0 'file:projects/theming-designer.tgz': @@ -16746,7 +16782,7 @@ packages: dev: false name: '@rush-temp/theming-designer' resolution: - integrity: sha512-gUyQbEMMrqYRakSL/tGcD21uj6SZBF7GrEueqg1qzNp6qLBtm4LrG8CrP6+36X1b1fG6Zyjey1lUC8ZsRnjD8A== + integrity: sha512-CVvPGHcsVQVzaFdsfvaISkYW2Cp/hiJAV/FTtvu4wi4Szziij7P1Atdli/YkoqDw/n8QqYAZ2sJ4gPV/dsDzcA== tarball: 'file:projects/theming-designer.tgz' version: 0.0.0 'file:projects/todo-app.tgz': @@ -16765,7 +16801,7 @@ packages: dev: false name: '@rush-temp/todo-app' resolution: - integrity: sha512-Xmtz6QpHotJyp3GaM4Lv9IyK776b1iXHNx0sYRJ+WlsXI5kKYN8gHhgxQi+CkbXRizO4CnzXEO5/sqU4ip8NKA== + integrity: sha512-yR3/8Ju+HvFRDv3j7k/t4M1yI3jQ91/fol4fId7hOlkIt7swU7pNjlH2l5G4arE83N7vCjVRWX12Cxgppcjf9A== tarball: 'file:projects/todo-app.tgz' version: 0.0.0 'file:projects/tslint-rules.tgz': @@ -16774,7 +16810,7 @@ packages: dev: false name: '@rush-temp/tslint-rules' resolution: - integrity: sha512-wxJu4jPuWMouAugLwHDOVKHQ7naFstdesRmKN+Q4HgZUKnIKojreHDHcfaTlvVEBkIjbKXwsJWQvYWiN/ypmQQ== + integrity: sha512-sJZbDeOptA/9QAmZZ3a6+4v9HYsKFgmDIOZOF8LLfYxAvzSlbLnvsrOZzxKjwPpqEuRm6+cYYBy38/+UFpoXZQ== tarball: 'file:projects/tslint-rules.tgz' version: 0.0.0 'file:projects/utilities.tgz': @@ -16798,7 +16834,7 @@ packages: dev: false name: '@rush-temp/utilities' resolution: - integrity: sha512-AOneaWU6L16rWVzVE95ZrG/iyJ5j/h1LUfD519rADA7LRhgNoJql5XNa3I4rw8PJr3EHkt2trUrwz16Y19MHLw== + integrity: sha512-ixdUVAsW70MP0ZJQPbzbiK3teccm+lNr1ovE4bJKGXP5t6UMcTzKKu3ZkTd9tVGtz8WVApUNeVcsHVBL48G4ng== tarball: 'file:projects/utilities.tgz' version: 0.0.0 'file:projects/variants.tgz': @@ -16808,7 +16844,7 @@ packages: dev: false name: '@rush-temp/variants' resolution: - integrity: sha512-G7mbfP/WgJl2FzJOZzMe5wS72UXEbAdKAQXPz554Jn+F3+uBiNUg/QnV+QIrOhHVi18vuPdfWK+sobs/itDYdw== + integrity: sha512-z+M9j0i43laXTRLlPYRy48cxr79BUfG8w6wyQP9PgVKcgVJ0xOFLKpkB+d3ui17VVBgBuv5nHu6HAlTsYxC4Jg== tarball: 'file:projects/variants.tgz' version: 0.0.0 'file:projects/vr-tests.tgz': @@ -16839,7 +16875,7 @@ packages: dev: false name: '@rush-temp/vr-tests' resolution: - integrity: sha512-z7NPDf98u2/wEGttdCyFwmSLVbAENM7kcSgxbUTxReOkuQvPz16DRuSMGv0rfp1AEO7FSO+LS4V8qctGVdIGQQ== + integrity: sha512-4LOkT2740Adpru4W3OYzbiXbGqSQaXf3qheq+9HX0b3H6VWndEJaGExsihP7BJc9ab+/4cCzhu6xWWNM9aFavw== tarball: 'file:projects/vr-tests.tgz' version: 0.0.0 'file:projects/webpack-utils.tgz': @@ -16854,7 +16890,7 @@ packages: dev: false name: '@rush-temp/webpack-utils' resolution: - integrity: sha512-zoEAhmbsnzcd2aSFQBgd6D0xWo5xkSlQa2DliwqBHMvbZlDGbRW/aXNlPpdGta2xlQec8J36n8YPCKs9fLc0qg== + integrity: sha512-RMZEWqNclStfV2YxaX78VGeT9Yc3h10oelMaGGMfTtxCVOUtRTI6C5IzKmeyoc0cRcOcq+YaYFLp+iqN/RHgVw== tarball: 'file:projects/webpack-utils.tgz' version: 0.0.0 registry: 'https://registry.npmjs.org/' @@ -16885,6 +16921,7 @@ specifiers: '@rush-temp/foundation-scenarios': 'file:./projects/foundation-scenarios.tgz' '@rush-temp/icons': 'file:./projects/icons.tgz' '@rush-temp/jest-serializer-merge-styles': 'file:./projects/jest-serializer-merge-styles.tgz' + '@rush-temp/lists': 'file:./projects/lists.tgz' '@rush-temp/merge-styles': 'file:./projects/merge-styles.tgz' '@rush-temp/migration': 'file:./projects/migration.tgz' '@rush-temp/office-ui-fabric-react': 'file:./projects/office-ui-fabric-react.tgz' @@ -16942,7 +16979,6 @@ specifiers: '@types/storybook__react': 3.0.5 '@types/webpack': 4.4.0 '@types/webpack-env': 1.13.9 - '@uifabric/react-cards': 0.1.0 async: ^2.6.1 autoprefixer: ^7.1.5 awesome-typescript-loader: ^3.2.3 diff --git a/packages/api-docs/package.json b/packages/api-docs/package.json index 167038df7440bb..c8a72559e95ced 100644 --- a/packages/api-docs/package.json +++ b/packages/api-docs/package.json @@ -25,7 +25,7 @@ "@uifabric/styling": "^6.47.6", "@uifabric/merge-styles": "^6.17.3", "@uifabric/utilities": "^6.38.3", - "office-ui-fabric-react": "^6.181.1" + "office-ui-fabric-react": "^6.182.1" }, "dependencies": { "@microsoft/tsdoc": "0.12.8", diff --git a/packages/azure-themes/package.json b/packages/azure-themes/package.json index 8577cb364fb2dd..71c4a336277e26 100644 --- a/packages/azure-themes/package.json +++ b/packages/azure-themes/package.json @@ -33,7 +33,7 @@ "dependencies": { "@uifabric/merge-styles": "^6.17.3", "@uifabric/set-version": "^1.1.3", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "tslib": "^1.7.1" } } diff --git a/packages/charting/package.json b/packages/charting/package.json index 18c49a97ea884c..c14616fad0d9de 100644 --- a/packages/charting/package.json +++ b/packages/charting/package.json @@ -35,7 +35,7 @@ "@types/resemblejs": "~1.3.28", "@types/sinon": "2.2.2", "@types/webpack-env": "1.13.9", - "@uifabric/example-app-base": "^6.20.1", + "@uifabric/example-app-base": "^6.21.0", "@uifabric/jest-serializer-merge-styles": "^6.0.9", "@uifabric/prettier-rules": "^1.0.2", "@uifabric/tslint-rules": "^1.0.2", @@ -64,7 +64,7 @@ "d3-selection": "1.3.0", "d3-shape": "^1.2.0", "d3-time-format": "^2.1.3", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "prop-types": "^15.5.10", "tslib": "^1.7.1" }, diff --git a/packages/date-time/package.json b/packages/date-time/package.json index 9a01ea5e80d9cd..2c9249791c529f 100644 --- a/packages/date-time/package.json +++ b/packages/date-time/package.json @@ -34,7 +34,7 @@ "@types/react-test-renderer": "^16.0.0", "@types/webpack-env": "1.13.9", "@uifabric/codepen-loader": "^0.1.2", - "@uifabric/example-app-base": "^6.20.1", + "@uifabric/example-app-base": "^6.21.0", "@uifabric/jest-serializer-merge-styles": "^6.0.9", "@uifabric/prettier-rules": "^1.0.2", "@uifabric/tslint-rules": "^1.0.2", @@ -50,7 +50,7 @@ "@uifabric/set-version": "^1.1.3", "@uifabric/styling": "^6.47.6", "@uifabric/utilities": "^6.38.3", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "tslib": "^1.7.1" }, "peerDependencies": { diff --git a/packages/example-app-base/CHANGELOG.json b/packages/example-app-base/CHANGELOG.json index ad8aefdf190ea6..28f5e07d7fdf83 100644 --- a/packages/example-app-base/CHANGELOG.json +++ b/packages/example-app-base/CHANGELOG.json @@ -1,6 +1,32 @@ { "name": "@uifabric/example-app-base", "entries": [ + { + "version": "6.21.0", + "tag": "@uifabric/example-app-base_v6.21.0", + "date": "Wed, 15 May 2019 12:31:44 GMT", + "comments": { + "minor": [ + { + "comment": "Add randomEntry utility", + "author": "Jordan Janzen ", + "commit": "1a7b6c65005dab8fbcc6fe21dbaa42ed042465eb" + } + ], + "patch": [ + { + "comment": "PlatformContext: improve types, add displayName", + "author": "Elizabeth Craig ", + "commit": "3f659bf2800c5a71488ef979baa13f7ad91b9e11" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `^6.181.1` to `^6.182.0`" + } + ] + } + }, { "version": "6.20.1", "tag": "@uifabric/example-app-base_v6.20.1", diff --git a/packages/example-app-base/CHANGELOG.md b/packages/example-app-base/CHANGELOG.md index e6418005b7d14a..6e87844f49c998 100644 --- a/packages/example-app-base/CHANGELOG.md +++ b/packages/example-app-base/CHANGELOG.md @@ -1,6 +1,17 @@ # Change Log - @uifabric/example-app-base -This log was last generated on Tue, 14 May 2019 07:50:30 GMT and should not be manually modified. +This log was last generated on Wed, 15 May 2019 12:31:44 GMT and should not be manually modified. + +## 6.21.0 +Wed, 15 May 2019 12:31:44 GMT + +### Minor changes + +- Add randomEntry utility + +### Patches + +- PlatformContext: improve types, add displayName ## 6.20.1 Tue, 14 May 2019 07:50:30 GMT diff --git a/packages/example-app-base/package.json b/packages/example-app-base/package.json index b934278cffa270..b4da7348ed8e30 100644 --- a/packages/example-app-base/package.json +++ b/packages/example-app-base/package.json @@ -1,6 +1,6 @@ { "name": "@uifabric/example-app-base", - "version": "6.20.1", + "version": "6.21.0", "description": "Office UI Fabric example app base utilities for building example sites.", "main": "lib-commonjs/index.js", "module": "lib/index.js", @@ -46,7 +46,7 @@ "highlight.js": "^9.12.0", "markdown-to-jsx": "6.6.1", "office-ui-fabric-core": "10.0.0", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "react-custom-scrollbars": "^4.2.1", "react-syntax-highlighter": "^10.1.3", "tslib": "^1.7.1" diff --git a/packages/example-app-base/src/utilities/PlatformContext.tsx b/packages/example-app-base/src/utilities/PlatformContext.tsx index b0b468bdd93097..f303a59e0b256b 100644 --- a/packages/example-app-base/src/utilities/PlatformContext.tsx +++ b/packages/example-app-base/src/utilities/PlatformContext.tsx @@ -6,12 +6,14 @@ export interface IWithPlatformProps { platform?: TPlatforms; } -export function withPlatform( - Component: React.ComponentType -): React.StatelessComponent> { - // tslint:disable-next-line no-any - const ComponentWithPlatform = (props: any) => ( +export function withPlatform< + TPlatforms extends string = string, + TProps extends IWithPlatformProps = IWithPlatformProps +>(Component: React.ComponentType): React.StatelessComponent> { + const ComponentWithPlatform: React.StatelessComponent = (props: TProps & { children?: React.ReactNode }) => ( {(platform: string) => } ); + // tslint:disable no-any + ComponentWithPlatform.displayName = (Component.displayName || (Component as any).name) + 'WithPlatform'; return ComponentWithPlatform; } diff --git a/packages/example-app-base/src/utilities/appInsightsHelper.ts b/packages/example-app-base/src/utilities/appInsightsHelper.ts index b227fcf3f41acf..7fa04c2e41c594 100644 --- a/packages/example-app-base/src/utilities/appInsightsHelper.ts +++ b/packages/example-app-base/src/utilities/appInsightsHelper.ts @@ -54,7 +54,13 @@ export enum EventNames { ClickedExternalLink = 'ClickedExternalLink', /** The user clicked the search filter option in the left nav. */ - ClickedSearchFilter = 'ClickedSearchFilter' + ClickedSearchFilter = 'ClickedSearchFilter', + + /** The user clicked a "go back" link or button. */ + ClickedGoBack = 'ClickedGoBack', + + /** The user landed on a page that doesn't exist. */ + PageNotFound = 'PageNotFound' } export interface IEventProperties { diff --git a/packages/example-app-base/src/utilities/index2.ts b/packages/example-app-base/src/utilities/index2.ts index 78706b456a0a81..ad29b64e90a23d 100644 --- a/packages/example-app-base/src/utilities/index2.ts +++ b/packages/example-app-base/src/utilities/index2.ts @@ -5,11 +5,12 @@ export * from './appInsightsHelper'; export * from './baseDefinition'; export * from './getEditUrl'; export * from './getPageFirstPlatform'; -export * from './removeAnchorLink'; export * from './getSiteArea'; export * from './jumpToAnchor'; export * from './PlatformContext'; +export * from './randomEntry'; export * from './redirects'; +export * from './removeAnchorLink'; export * from './SiteDefinition.types'; export * from './string'; export * from './windowWidth'; diff --git a/packages/example-app-base/src/utilities/randomEntry.ts b/packages/example-app-base/src/utilities/randomEntry.ts new file mode 100644 index 00000000000000..6bda37efb401ef --- /dev/null +++ b/packages/example-app-base/src/utilities/randomEntry.ts @@ -0,0 +1,7 @@ +/** + * Returns a single random entry from an array. + * @param arr Array you want a random entry from. + */ +export function randomEntry(arr: T[]): T { + return arr[Math.floor(Math.random() * arr.length)]; +} diff --git a/packages/example-app-base/src/version.ts b/packages/example-app-base/src/version.ts index 6e35928165f7cb..5a057ec89a2785 100644 --- a/packages/example-app-base/src/version.ts +++ b/packages/example-app-base/src/version.ts @@ -1,4 +1,4 @@ -// @uifabric/example-app-base@6.20.1 +// @uifabric/example-app-base@6.21.0 // Do not modify this file, the file is generated as part of publish. The checked in version is a placeholder only. import { setVersion } from '@uifabric/set-version'; - setVersion('@uifabric/example-app-base', '6.20.1'); \ No newline at end of file + setVersion('@uifabric/example-app-base', '6.21.0'); \ No newline at end of file diff --git a/packages/experiments/package.json b/packages/experiments/package.json index c35ec6624f1e1d..6683a134136c64 100644 --- a/packages/experiments/package.json +++ b/packages/experiments/package.json @@ -36,7 +36,7 @@ "@types/resemblejs": "~1.3.28", "@types/sinon": "2.2.2", "@types/webpack-env": "1.13.9", - "@uifabric/example-app-base": "^6.20.1", + "@uifabric/example-app-base": "^6.21.0", "@uifabric/jest-serializer-merge-styles": "^6.0.9", "@uifabric/prettier-rules": "^1.0.2", "@uifabric/tslint-rules": "^1.0.2", @@ -53,7 +53,7 @@ "@microsoft/load-themed-styles": "^1.7.13", "@uifabric/azure-themes": "^0.1.9", "@uifabric/charting": "^0.28.14", - "@uifabric/file-type-icons": "^6.4.9", + "@uifabric/file-type-icons": "^6.4.10", "@uifabric/fluent-theme": "^0.16.9", "@uifabric/foundation": "^0.7.6", "@uifabric/icons": "^6.5.2", @@ -64,7 +64,7 @@ "@uifabric/utilities": "^6.38.3", "@uifabric/variants": "^6.14.2", "deep-assign": "^2.0.0", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "prop-types": "^15.5.10", "tslib": "^1.7.1" }, diff --git a/packages/file-type-icons/CHANGELOG.json b/packages/file-type-icons/CHANGELOG.json index 3c9acf8e8b7db4..707ad7fd195f4e 100644 --- a/packages/file-type-icons/CHANGELOG.json +++ b/packages/file-type-icons/CHANGELOG.json @@ -1,6 +1,20 @@ { "name": "@uifabric/file-type-icons", "entries": [ + { + "version": "6.4.10", + "tag": "@uifabric/file-type-icons_v6.4.10", + "date": "Thu, 16 May 2019 05:28:50 GMT", + "comments": { + "patch": [ + { + "comment": "Update README with note about how to use the new Fluent file type icons", + "author": "Peter Jahn ", + "commit": "341ce8951311d90c854525e58ca39b498810ed53" + } + ] + } + }, { "version": "6.4.9", "tag": "@uifabric/file-type-icons_v6.4.9", diff --git a/packages/file-type-icons/CHANGELOG.md b/packages/file-type-icons/CHANGELOG.md index 43da2f3be00a9b..084c3b3fa78d30 100644 --- a/packages/file-type-icons/CHANGELOG.md +++ b/packages/file-type-icons/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @uifabric/file-type-icons -This log was last generated on Tue, 14 May 2019 07:50:30 GMT and should not be manually modified. +This log was last generated on Thu, 16 May 2019 05:28:50 GMT and should not be manually modified. + +## 6.4.10 +Thu, 16 May 2019 05:28:50 GMT + +### Patches + +- Update README with note about how to use the new Fluent file type icons ## 6.4.9 Tue, 14 May 2019 07:50:30 GMT diff --git a/packages/file-type-icons/README.md b/packages/file-type-icons/README.md index d90b05be201d16..4c858535110861 100644 --- a/packages/file-type-icons/README.md +++ b/packages/file-type-icons/README.md @@ -29,6 +29,16 @@ import { getFileTypeIconProps } from '@uifabric/file-type-icons'; ``` +# Fluent file type icons + +You can use the new Fluent file type icons as they become available by passing the following path to `initializeFileTypeIcons`: + +```tsx +initializeFileTypeIcons('https://spoprod-a.akamaihd.net/files/fabric/assets/item-types-fluent/'); +``` + +In Fabric 7, the new Fluent file type icons will be the default. + # Notes See [Office UI Fabric React](http://github.com/OfficeDev/office-ui-fabric-react) for more details on the UI Fabric project and packages within. diff --git a/packages/file-type-icons/package.json b/packages/file-type-icons/package.json index dc02570c9b340a..4e9950da0b8bb1 100644 --- a/packages/file-type-icons/package.json +++ b/packages/file-type-icons/package.json @@ -1,6 +1,6 @@ { "name": "@uifabric/file-type-icons", - "version": "6.4.9", + "version": "6.4.10", "description": "Office UI Fabric file type icon set.", "main": "lib-commonjs/index.js", "module": "lib/index.js", diff --git a/packages/file-type-icons/src/version.ts b/packages/file-type-icons/src/version.ts index 7681bd82c8658a..b519bebdf2acc2 100644 --- a/packages/file-type-icons/src/version.ts +++ b/packages/file-type-icons/src/version.ts @@ -1,4 +1,4 @@ -// @uifabric/file-type-icons@6.4.9 +// @uifabric/file-type-icons@6.4.10 // Do not modify this file, the file is generated as part of publish. The checked in version is a placeholder only. import { setVersion } from '@uifabric/set-version'; - setVersion('@uifabric/file-type-icons', '6.4.9'); \ No newline at end of file + setVersion('@uifabric/file-type-icons', '6.4.10'); \ No newline at end of file diff --git a/packages/fluent-theme/package.json b/packages/fluent-theme/package.json index 4d4807bde04a03..b9c6623733f219 100644 --- a/packages/fluent-theme/package.json +++ b/packages/fluent-theme/package.json @@ -34,7 +34,7 @@ "@uifabric/set-version": "^1.1.3", "@uifabric/styling": "^6.47.6", "@uifabric/variants": "^6.14.2", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "tslib": "^1.7.1" } } diff --git a/packages/foundation-scenarios/package.json b/packages/foundation-scenarios/package.json index bd43356965ca28..8e6b7f63963393 100644 --- a/packages/foundation-scenarios/package.json +++ b/packages/foundation-scenarios/package.json @@ -31,7 +31,7 @@ "@types/react-dom": "16.0.5", "@types/react-test-renderer": "^16.0.0", "@types/webpack-env": "1.13.9", - "@uifabric/example-app-base": "^6.20.1", + "@uifabric/example-app-base": "^6.21.0", "@uifabric/jest-serializer-merge-styles": "^6.0.9", "@uifabric/prettier-rules": "^1.0.2", "@uifabric/tslint-rules": "^1.0.2", @@ -45,7 +45,7 @@ "dependencies": { "@microsoft/load-themed-styles": "^1.7.13", "@uifabric/set-version": "^1.1.3", - "office-ui-fabric-react": "^6.181.1", + "office-ui-fabric-react": "^6.182.1", "tslib": "^1.7.1" }, "peerDependencies": { diff --git a/packages/lists/.npmignore b/packages/lists/.npmignore new file mode 100644 index 00000000000000..90b8575770eac5 --- /dev/null +++ b/packages/lists/.npmignore @@ -0,0 +1,31 @@ +*.config.js +*.nuspec +*.yml +*.test.* +.editorconfig +.gitattributes +.gitignore +.vscode +coverage +temp +images +results +*.build.log +dist/*.stats.html +dist/*.stats.json +dist/demo*.* +gulpfile.js +index.html +jsconfig.json +karma.config.js +node_modules +src/**/* +!src/**/*.types.ts +!src/**/*.Example.tsx +tsconfig.json +tsd.json +tslint.json +typings +webpack.config.js +fabric-test* +visualtests \ No newline at end of file diff --git a/packages/lists/.npmrc b/packages/lists/.npmrc new file mode 100644 index 00000000000000..825c83e09df4da --- /dev/null +++ b/packages/lists/.npmrc @@ -0,0 +1,2 @@ +registry=https://registry.npmjs.org/ + diff --git a/packages/lists/CHANGELOG.json b/packages/lists/CHANGELOG.json new file mode 100644 index 00000000000000..7047ab3b305db0 --- /dev/null +++ b/packages/lists/CHANGELOG.json @@ -0,0 +1,4 @@ +{ + "name": "@uifabric/lists", + "entries": [] +} \ No newline at end of file diff --git a/packages/lists/CHANGELOG.md b/packages/lists/CHANGELOG.md new file mode 100644 index 00000000000000..a6beb1578d03c4 --- /dev/null +++ b/packages/lists/CHANGELOG.md @@ -0,0 +1,3 @@ +# Change Log - @uifabric/lists + +This log was last generated on Wed, 15 May 2019 04:18:46 GMT and should not be manually modified. \ No newline at end of file diff --git a/packages/lists/LICENSE b/packages/lists/LICENSE new file mode 100644 index 00000000000000..8dc168c232c441 --- /dev/null +++ b/packages/lists/LICENSE @@ -0,0 +1,15 @@ +@uifabric/lists + +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Note: Usage of the fonts and icons referenced in Office UI Fabric is subject to the terms listed at https://aka.ms/fabric-assets-license diff --git a/packages/lists/README.md b/packages/lists/README.md new file mode 100644 index 00000000000000..390fe0d1ff0594 --- /dev/null +++ b/packages/lists/README.md @@ -0,0 +1,27 @@ +# [@uifabric/lists](http://dev.microsoft.com/fabric) + +## Overview + +The intent of the `@uifabric/lists` package is to prototype approaches to lists both virtualized and non-virtualized. + +Eventually, this will be a home for _all_ Fabric List controls, migrated in a backwards-compatible way. Until then, we recommend using `office-ui-fabric-react`'s more _stable_ List components: + +- [List](https://developer.microsoft.com/en-us/fabric#/controls/web/list) +- [DetailsList](https://developer.microsoft.com/en-us/fabric#/controls/web/detailslist) +- [GroupedList](https://developer.microsoft.com/en-us/fabric#/controls/web/groupedlist) + +##### Lists components for Office UI Fabric React + +These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release. + +To import Lists components: + +```js +import { ComponentName } from '@uifabric/lists'; +``` + +Once the Lists component graduates to a production release, the component will be available at: + +```js +import { ComponentName } from 'office-ui-fabric-react'; +``` diff --git a/packages/lists/config/pre-copy.json b/packages/lists/config/pre-copy.json new file mode 100644 index 00000000000000..f9f40617509330 --- /dev/null +++ b/packages/lists/config/pre-copy.json @@ -0,0 +1,11 @@ +{ + "copyTo": { + "dist": [ + "./index.html", + "./node_modules/react/umd/react.development.js", + "./node_modules/react/umd/react.production.min.js", + "./node_modules/react-dom/umd/react-dom.development.js", + "./node_modules/react-dom/umd/react-dom.production.min.js" + ] + } +} diff --git a/packages/lists/config/tests.js b/packages/lists/config/tests.js new file mode 100644 index 00000000000000..a5fde28f62fb82 --- /dev/null +++ b/packages/lists/config/tests.js @@ -0,0 +1,18 @@ +/** Jest test setup file. */ + +const { setIconOptions } = require('office-ui-fabric-react/lib/Styling'); +const { configure } = require('enzyme'); +const Adapter = require('enzyme-adapter-react-16'); + +// Suppress icon warnings. +setIconOptions({ + disableWarnings: true +}); + +// Mock requestAnimationFrame for React 16+. +global.requestAnimationFrame = callback => { + setTimeout(callback, 0); +}; + +// Configure enzyme. +configure({ adapter: new Adapter() }); diff --git a/packages/lists/etc/lists.api.md b/packages/lists/etc/lists.api.md new file mode 100644 index 00000000000000..b16b052207a231 --- /dev/null +++ b/packages/lists/etc/lists.api.md @@ -0,0 +1,10 @@ +## API Review File for "@uifabric/lists" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/packages/lists/index.html b/packages/lists/index.html new file mode 100644 index 00000000000000..0f93dc60324823 --- /dev/null +++ b/packages/lists/index.html @@ -0,0 +1,54 @@ + + + + + + + + Office UI Fabric React Lists Examples + + + +
    + + + diff --git a/packages/lists/jest.config.js b/packages/lists/jest.config.js new file mode 100644 index 00000000000000..cfcb849b9c03b6 --- /dev/null +++ b/packages/lists/jest.config.js @@ -0,0 +1,14 @@ +let { createConfig } = require('../../scripts/jest/jest-resources'); +let path = require('path'); + +const config = createConfig({ + setupFiles: [path.resolve(path.join(__dirname, 'config', 'tests.js'))], + + moduleNameMapper: { + 'office-ui-fabric-react/lib/(.*)$': 'office-ui-fabric-react/lib-commonjs/$1' + }, + + snapshotSerializers: [path.resolve(__dirname, './node_modules/@uifabric/jest-serializer-merge-styles')] +}); + +module.exports = config; diff --git a/packages/lists/jsconfig.json b/packages/lists/jsconfig.json new file mode 100644 index 00000000000000..c25b2cc60e6443 --- /dev/null +++ b/packages/lists/jsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "target": "ES6", + "module": "commonjs" + } +} diff --git a/packages/lists/package.json b/packages/lists/package.json new file mode 100644 index 00000000000000..e07261eb58c79d --- /dev/null +++ b/packages/lists/package.json @@ -0,0 +1,55 @@ +{ + "name": "@uifabric/lists", + "version": "0.1.0", + "description": "Experimental React components for list experiences for Microsoft 365.", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "typings": "lib/index.d.ts", + "sideEffects": [ + "lib/version.js" + ], + "repository": { + "type": "git", + "url": "https://github.com/OfficeDev/office-ui-fabric-react" + }, + "license": "MIT", + "scripts": { + "build": "node ../../scripts/just.js build", + "clean": "node ../../scripts/just.js clean", + "code-style": "node ../../scripts/just.js code-style", + "start": "node ../../scripts/just.js dev", + "start-test": "node ../../scripts/just.js jest-watch", + "update-api": "node ../../scripts/update-api.js", + "update-snapshots": "node ../../scripts/just.js jest -u" + }, + "devDependencies": { + "@types/enzyme": "3.1.13", + "@types/enzyme-adapter-react-16": "1.0.3", + "@types/es6-promise": "0.0.32", + "@types/jest": "23.0.0", + "@types/react": "16.3.16", + "@types/react-dom": "16.0.5", + "@types/react-test-renderer": "^16.0.0", + "@types/webpack-env": "1.13.9", + "@uifabric/example-app-base": "^6.20.1", + "@uifabric/jest-serializer-merge-styles": "^6.0.9", + "@uifabric/prettier-rules": "^1.0.2", + "@uifabric/tslint-rules": "^1.0.2", + "enzyme": "^3.4.1", + "enzyme-adapter-react-16": "^1.2.0", + "es6-weak-map": "^2.0.2", + "react": "~16.6.3", + "react-dom": "~16.6.3", + "react-test-renderer": "^16.3.0" + }, + "dependencies": { + "@microsoft/load-themed-styles": "^1.7.13", + "@uifabric/set-version": "^1.1.3", + "office-ui-fabric-react": "^6.182.1", + "tslib": "^1.7.1" + }, + "peerDependencies": { + "react": "~16.6.3", + "react-dom": "~16.6.3" + } +} diff --git a/packages/lists/prettier.config.js b/packages/lists/prettier.config.js new file mode 100644 index 00000000000000..2ad22963ecf7fe --- /dev/null +++ b/packages/lists/prettier.config.js @@ -0,0 +1 @@ +module.exports = require('@uifabric/prettier-rules'); diff --git a/packages/lists/src/common/tests.js b/packages/lists/src/common/tests.js new file mode 100644 index 00000000000000..a5fde28f62fb82 --- /dev/null +++ b/packages/lists/src/common/tests.js @@ -0,0 +1,18 @@ +/** Jest test setup file. */ + +const { setIconOptions } = require('office-ui-fabric-react/lib/Styling'); +const { configure } = require('enzyme'); +const Adapter = require('enzyme-adapter-react-16'); + +// Suppress icon warnings. +setIconOptions({ + disableWarnings: true +}); + +// Mock requestAnimationFrame for React 16+. +global.requestAnimationFrame = callback => { + setTimeout(callback, 0); +}; + +// Configure enzyme. +configure({ adapter: new Adapter() }); diff --git a/packages/lists/src/demo/AppDefinition.tsx b/packages/lists/src/demo/AppDefinition.tsx new file mode 100644 index 00000000000000..4622d56a9088e9 --- /dev/null +++ b/packages/lists/src/demo/AppDefinition.tsx @@ -0,0 +1,30 @@ +// tslint:disable:no-any +import * as React from 'react'; +import { App as AppBase, IAppDefinition, IAppProps } from '@uifabric/example-app-base'; + +export const AppDefinition: IAppDefinition = { + appTitle: 'Fabric - React', + + testPages: [], + examplePages: [ + { + links: [] + } + ], + headerLinks: [ + { + name: 'Getting started', + url: '#/' + }, + { + name: 'Fabric', + url: 'http://dev.office.com/fabric' + }, + { + name: 'Github', + url: 'http://www.github.com/officedev' + } + ] +}; + +export const App = (props: IAppProps) => ; diff --git a/packages/lists/src/demo/ColorStyles.scss b/packages/lists/src/demo/ColorStyles.scss new file mode 100644 index 00000000000000..3d02e1c04e061b --- /dev/null +++ b/packages/lists/src/demo/ColorStyles.scss @@ -0,0 +1,49 @@ +@import '~office-ui-fabric-react/dist/sass/References'; + +:global { + .hljs { + background: $ms-color-neutralDark; + color: $ms-color-white; + } + .hljs-comment, + .hljs-quote { + color: #777; + } + .hljs-variable, + .hljs-template-variable, + .hljs-tag, + .hljs-regexp, + .hljs-meta, + .hljs-number, + .hljs-built_in, + .hljs-builtin-name, + .hljs-literal, + .hljs-params, + .hljs-symbol, + .hljs-bullet, + .hljs-link, + .hljs-deletion { + color: #ab875d; + } + .hljs-section, + .hljs-title, + .hljs-name, + .hljs-selector-id, + .hljs-selector-class, + .hljs-type, + .hljs-attribute { + color: #9b869b; + } + .hljs-string, + .hljs-keyword, + .hljs-selector-tag, + .hljs-addition { + color: #8f9c6c; + } + .hljs-emphasis { + font-style: italic; + } + .hljs-strong { + font-weight: bold; + } +} diff --git a/packages/lists/src/demo/GettingStartedPage.scss b/packages/lists/src/demo/GettingStartedPage.scss new file mode 100644 index 00000000000000..f8b5b2e23ff1df --- /dev/null +++ b/packages/lists/src/demo/GettingStartedPage.scss @@ -0,0 +1,56 @@ +@import '~office-ui-fabric-react/dist/sass/References'; + +:global { + .ms-GettingStartedPage { + margin-top: -20px; + padding: 40px; + + h1 { + @include ms-font-xxl; + } + + h2 { + @include ms-font-xl; + } + + h3 { + @include ms-font-l; + } + } + + .ms-GettingStartedPage-banner { + padding: 1px 20px; + margin: -20px; + margin-bottom: 20px; + // border-bottom: 1px solid $ms-color-neutralTertiaryAlt; + + h1 { + margin-bottom: 0; + } + + h3 { + margin-top: 0; + } + } + + @media (max-width: $ms-screen-max-lg) { + .ms-GettingStartedPage-banner { + margin: -20px 0; + margin-bottom: 20px; + } + } + + .ms-GettingStartedPage-code { + background: $ms-color-neutralDark; + padding: 20px; + + pre { + margin: 0; + } + + .hljs { + background: inherit; + padding: 0; + } + } +} diff --git a/packages/lists/src/demo/GettingStartedPage.tsx b/packages/lists/src/demo/GettingStartedPage.tsx new file mode 100644 index 00000000000000..d4fe8b9cd136c6 --- /dev/null +++ b/packages/lists/src/demo/GettingStartedPage.tsx @@ -0,0 +1,103 @@ +/* tslint:disable:jsx-no-multiline-js max-line-length */ + +import * as React from 'react'; +import { Link } from 'office-ui-fabric-react/lib/Link'; +import './GettingStartedPage.scss'; +import { Highlight } from '@uifabric/example-app-base'; + +export class GettingStartedPage extends React.Component<{}, {}> { + public render(): JSX.Element { + return ( +
    +
    +

    Office UI Fabric React Lists!

    +

    A library of reusable, generic React components

    +
    + +

    Overview

    + +

    + Fabric React components are built as production-ready, generalized, documented, and reusable components to be used in Microsoft + products. This enables us and our partners to more easily build great applications without spending a ton of time implementing the + same things over and over. +

    + +

    + Each component is designed to be RTL-friendly, keyboard accessible, screen reader-friendly, themeable, and generalized. TypeScript + definition files are also included, so if you use TypeScript (which isn't a requirement), you will get compiler validation and + using an editor like VS Code, you'll get intellisense. Each component is exported as a named module that can be easily imported in + your code, allowing your external bundler to create small bundles that include just what you need. +

    + +

    Getting started

    + +

    + Integrating components into your project depends heavily on your setup. The recommended setup is to use a bundler such as + + Webpack + + which can resolve NPM package imports in your code and can bundle the specific things you import. +

    + +

    Within an npm project, you should install the package and save it as a dependency:

    + +
    + npm install --save office-ui-fabric-react +
    + +

    + This will add the fabric-react project as a dependency in your package.json file, and will drop the project under + node_modules/office-ui-fabric-react. +

    + +

    + The library includes commonjs entry points under the lib folder. To use a control, you should be able to import it and use it in + your render method. Note that wrapping your application in the Fabric component is required to support RTL, keyboard focus and + other features. +

    + +
    + {` +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; +import { Fabric } from 'office-ui-fabric-react/lib/Fabric'; +import { DefaultButton } from 'office-ui-fabric-react/lib/Button'; + +const MyPage = () => (I am a button.); + +ReactDOM.render(, document.body.firstChild);`} +
    + +

    Notes on module vs path-based imports

    +

    + While it is possible to import all components as named imports from the main module entry point, it is not recommended to do so + without using a bundler that supports es6 tree shaking. In other words, if you import the Button component like this: } +

    + +
    + {`import { Button } from 'office-ui-fabric-react';`} +
    + +

    + ...this would work, but then unless you are using a tree-shaking bundler such as Rollup.js or Webpack 2, Webpack will assume you + want every module exported from the main entry file to be included in your final bundle, which produces unnecessary large bundles + and slows your page load down. Instead you can import the specific paths to trim down your bundle size: +

    + +
    + {` +import { Button } from 'office-ui-fabric-react/lib/Button'; +import { Dropdown } from 'office-ui-fabric-react/lib/Dropdown'; +import { List } from 'office-ui-fabric-react/lib/List';`} +
    + +

    Using an AMD bundler like r.js

    + +

    + If your project relies on AMD modules, they are dropped in the lib-amd folder. You will need to set up your bundler to handle the + imports correctly. This may require you to symlink or copy the folder into your pre-bundle location. +

    +
    + ); + } +} diff --git a/packages/lists/src/demo/index.scss b/packages/lists/src/demo/index.scss new file mode 100644 index 00000000000000..77cebee061ee60 --- /dev/null +++ b/packages/lists/src/demo/index.scss @@ -0,0 +1,8 @@ +@import '~office-ui-fabric-react/dist/sass/References'; + +:global { + html, + body { + -webkit-tap-highlight-color: transparent; + } +} diff --git a/packages/lists/src/demo/index.tsx b/packages/lists/src/demo/index.tsx new file mode 100644 index 00000000000000..12659a38067b26 --- /dev/null +++ b/packages/lists/src/demo/index.tsx @@ -0,0 +1,89 @@ +/* tslint:disable:no-unused-variable */ +import * as React from 'react'; +/* tslint:enable:no-unused-variable */ +import * as ReactDOM from 'react-dom'; +import { App, AppDefinition } from './AppDefinition'; +import { IAppLink, IAppLinkGroup } from '@uifabric/example-app-base'; +import { Router, Route } from 'office-ui-fabric-react/lib/utilities/router/index'; +import { initializeIcons } from 'office-ui-fabric-react/lib/Icons'; +import { setBaseUrl, Fabric } from 'office-ui-fabric-react'; +import { GettingStartedPage } from './GettingStartedPage'; + +import './index.scss'; +import './ColorStyles.scss'; + +setBaseUrl('./dist/'); + +// Initialize all icons. +initializeIcons(); + +let rootElement: HTMLElement | null; + +// Return the anchor link from the URL without the hash +function _extractAnchorLink(path: string): string { + const index = path.lastIndexOf('#'); + if (index >= 0) { + path = path.substr(index + 1, path.length - index); + } + return path; +} + +function _scrollAnchorLink(): void { + if ((window.location.hash.match(/#/g) || []).length > 1) { + const anchor = _extractAnchorLink(window.location.hash); + document.getElementById(anchor)!.scrollIntoView(); + } +} + +function _onLoad(): void { + rootElement = rootElement || document.getElementById('content'); + + ReactDOM.render( + + {_getRoutes()} + , + rootElement + ); +} + +function _getRoutes(): JSX.Element[] { + const routes = AppDefinition.testPages.map((page: IAppLink) => ); + const appRoutes: JSX.Element[] = []; + + AppDefinition.examplePages.forEach((group: IAppLinkGroup) => { + group.links + .filter((link: IAppLink) => link.hasOwnProperty('component') || link.hasOwnProperty('getComponent')) + .forEach((link: IAppLink, linkIndex: number) => { + const { component, getComponent } = link; + + appRoutes.push(); + }); + }); + + // Default route. + appRoutes.push(); + + routes.push( + + {appRoutes} + + ); + + return routes; +} + +function _onUnload(): void { + if (rootElement) { + ReactDOM.unmountComponentAtNode(rootElement); + } +} + +const isReady = document.readyState === 'interactive' || document.readyState === 'complete'; + +if (isReady) { + _onLoad(); +} else { + window.onload = _onLoad; +} + +window.onunload = _onUnload; diff --git a/packages/lists/src/index.ts b/packages/lists/src/index.ts new file mode 100644 index 00000000000000..107367257abe5c --- /dev/null +++ b/packages/lists/src/index.ts @@ -0,0 +1 @@ +import './version'; diff --git a/packages/lists/src/version.ts b/packages/lists/src/version.ts new file mode 100644 index 00000000000000..f5705775a27ed9 --- /dev/null +++ b/packages/lists/src/version.ts @@ -0,0 +1,4 @@ +// @uifabric/lists@0.1.0 +// Do not modify this file, the file is generated as part of publish. The checked in version is a placeholder only. +import { setVersion } from '@uifabric/set-version'; +setVersion('@uifabric/lists', '0.1.0'); \ No newline at end of file diff --git a/packages/lists/tsconfig.json b/packages/lists/tsconfig.json new file mode 100644 index 00000000000000..19aeb40f1c2dbd --- /dev/null +++ b/packages/lists/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "outDir": "dist", + "target": "es5", + "module": "commonjs", + "jsx": "react", + "declaration": true, + "sourceMap": true, + "experimentalDecorators": true, + "importHelpers": true, + "noUnusedLocals": true, + "forceConsistentCasingInFileNames": true, + "strictNullChecks": true, + "noImplicitAny": true, + "moduleResolution": "node", + "preserveConstEnums": true, + "lib": ["es5", "dom"], + "types": ["jest", "webpack-env"], + "paths": { + "@uifabric/lists/lib/*": ["./src/*"], + "@uifabric/lists": ["./src"] + } + }, + "include": ["src"] +} diff --git a/packages/lists/tslint.json b/packages/lists/tslint.json new file mode 100644 index 00000000000000..06e306229f8738 --- /dev/null +++ b/packages/lists/tslint.json @@ -0,0 +1,4 @@ +{ + "extends": ["@uifabric/tslint-rules"], + "rules": {} +} diff --git a/packages/lists/webpack.config.js b/packages/lists/webpack.config.js new file mode 100644 index 00000000000000..8205c64803042b --- /dev/null +++ b/packages/lists/webpack.config.js @@ -0,0 +1,26 @@ +const path = require('path'); +const resources = require('../../scripts/webpack/webpack-resources'); + +const BUNDLE_NAME = 'lists'; +const IS_PRODUCTION = process.argv.indexOf('--production') > -1; + +module.exports = resources.createConfig(BUNDLE_NAME, IS_PRODUCTION, { + entry: { + [BUNDLE_NAME]: './lib/index.js' + }, + + output: { + libraryTarget: 'var', + library: 'FabricLists' + }, + + externals: [{ react: 'React' }, { 'react-dom': 'ReactDOM' }], + + resolve: { + alias: { + '@uifabric/lists/src': path.join(__dirname, 'src'), + '@uifabric/lists/lib': path.join(__dirname, 'lib'), + '@uifabric/lists': path.join(__dirname, 'lib') + } + } +}); diff --git a/packages/lists/webpack.serve.config.js b/packages/lists/webpack.serve.config.js new file mode 100644 index 00000000000000..68c1f2d279d996 --- /dev/null +++ b/packages/lists/webpack.serve.config.js @@ -0,0 +1,28 @@ +const path = require('path'); +const resources = require('../../scripts/webpack/webpack-resources'); +const webpack = resources.webpack; + +const PACKAGE_NAME = require('./package.json').name; + +module.exports = resources.createServeConfig({ + entry: './src/demo/index.tsx', + + output: { + filename: 'demo-app.js' + }, + + externals: { + react: 'React', + 'react-dom': 'ReactDOM' + }, + + resolve: { + alias: { + '@uifabric/lists/src': path.join(__dirname, 'src'), + '@uifabric/lists/lib': path.join(__dirname, 'lib'), + '@uifabric/lists': path.join(__dirname, 'lib'), + 'Props.ts.js': 'Props', + 'Example.tsx.js': 'Example' + } + } +}); diff --git a/packages/office-ui-fabric-react/CHANGELOG.json b/packages/office-ui-fabric-react/CHANGELOG.json index 750dadb3f7179e..b3aba70ef222ef 100644 --- a/packages/office-ui-fabric-react/CHANGELOG.json +++ b/packages/office-ui-fabric-react/CHANGELOG.json @@ -1,6 +1,61 @@ { "name": "office-ui-fabric-react", "entries": [ + { + "version": "6.182.1", + "tag": "office-ui-fabric-react_v6.182.1", + "date": "Thu, 16 May 2019 05:28:50 GMT", + "comments": { + "patch": [ + { + "comment": "[Checkbox] Fix outline on focus.", + "author": "JD Huntington ", + "commit": "d0d926c5c415c4df00e3e537297e36cdb5efccdd" + } + ] + } + }, + { + "version": "6.182.0", + "tag": "office-ui-fabric-react_v6.182.0", + "date": "Wed, 15 May 2019 12:31:44 GMT", + "comments": { + "patch": [ + { + "comment": "added the title attribute for the cancel icon in the panel which is same as aira-label", + "author": "shivasai09 <33802398+shivasai09@users.noreply.github.com>", + "commit": "4b6c5f67888661c38ec4a1f75a9737a2ecf56dfd" + }, + { + "comment": "Add TextField multiple-line errorMessage support", + "author": "iamchangming ", + "commit": "61a272d0a6795db704cbd2e154889b12edf1a45f" + }, + { + "comment": "This latest PR is to ensure Nav link without icon should not be rendered with place-holder", + "author": "inateeg ", + "commit": "a2dd64cfd3a5540ced0dae0799d282fe574b90e6" + } + ], + "minor": [ + { + "comment": "Nav respects changes to collapsedByDefault", + "author": "JD Huntington ", + "commit": "96b7dc34667f348bcaeb2a5884017438191df998" + }, + { + "comment": "Allow custom aria label generation in suggestionStore", + "author": "Max ", + "commit": "950f160fea68db673098b9834d5116b6c9d9ce21" + }, + { + "comment": "ShimmeredDetailsList: export to the surface missing API items.", + "author": "Vitalie Braga ", + "commit": "8c3f3b4755122ed5c78a819baf27c57b3805f075" + } + ] + } + }, { "version": "6.181.1", "tag": "office-ui-fabric-react_v6.181.1", diff --git a/packages/office-ui-fabric-react/CHANGELOG.md b/packages/office-ui-fabric-react/CHANGELOG.md index 5b75d52480a67a..184a69650c23c7 100644 --- a/packages/office-ui-fabric-react/CHANGELOG.md +++ b/packages/office-ui-fabric-react/CHANGELOG.md @@ -1,6 +1,28 @@ # Change Log - office-ui-fabric-react -This log was last generated on Tue, 14 May 2019 07:50:31 GMT and should not be manually modified. +This log was last generated on Thu, 16 May 2019 05:28:50 GMT and should not be manually modified. + +## 6.182.1 +Thu, 16 May 2019 05:28:50 GMT + +### Patches + +- [Checkbox] Fix outline on focus. + +## 6.182.0 +Wed, 15 May 2019 12:31:44 GMT + +### Minor changes + +- Nav respects changes to collapsedByDefault +- Allow custom aria label generation in suggestionStore +- ShimmeredDetailsList: export to the surface missing API items. + +### Patches + +- added the title attribute for the cancel icon in the panel which is same as aira-label +- Add TextField multiple-line errorMessage support +- This latest PR is to ensure Nav link without icon should not be rendered with place-holder ## 6.181.1 Tue, 14 May 2019 07:50:31 GMT diff --git a/packages/office-ui-fabric-react/etc/office-ui-fabric-react.api.md b/packages/office-ui-fabric-react/etc/office-ui-fabric-react.api.md index 8c522ac4bf2f97..903445c76c8f3c 100644 --- a/packages/office-ui-fabric-react/etc/office-ui-fabric-react.api.md +++ b/packages/office-ui-fabric-react/etc/office-ui-fabric-react.api.md @@ -5521,7 +5521,7 @@ export interface INavProps { // @public (undocumented) export interface INavState { // (undocumented) - isGroupCollapsed?: { + isGroupCollapsed: { [key: string]: boolean; }; // (undocumented) @@ -6681,13 +6681,21 @@ export interface IShimmeredDetailsListProps extends IDetailsListProps { onRenderCustomPlaceholder?: (rowProps: IDetailsRowProps) => React_2.ReactNode; removeFadingOverlay?: boolean; shimmerLines?: number; - // Warning: (ae-forgotten-export) The symbol "IShimmeredDetailsListStyleProps" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "IShimmeredDetailsListStyles" needs to be exported by the entry point index.d.ts - // // @deprecated styles?: IStyleFunctionOrObject; } +// @public +export type IShimmeredDetailsListStyleProps = Required> & { + className?: string; + enableShimmer?: boolean; +}; + +// @public +export interface IShimmeredDetailsListStyles { + root: IStyle; +} + // @public export interface IShimmerElement { height?: number; @@ -7496,7 +7504,7 @@ export interface ITextFieldProps extends React_2.AllHTMLAttributes, newValue?: string) => void; // @deprecated (undocumented) onChanged?: (newValue: any) => void; - onGetErrorMessage?: (value: string) => string | PromiseLike | undefined; - onNotifyValidationResult?: (errorMessage: string, value: string | undefined) => void; + onGetErrorMessage?: (value: string) => string | JSX.Element | PromiseLike | undefined; + onNotifyValidationResult?: (errorMessage: string | JSX.Element, value: string | undefined) => void; // @deprecated (undocumented) onRenderAddon?: IRenderFunction; onRenderDescription?: IRenderFunction; @@ -7535,7 +7543,7 @@ export interface ITextFieldProps extends React_2.AllHTMLAttributes; export class NavBase extends React.Component implements INav { constructor(props: INavProps); // (undocumented) - componentWillReceiveProps(newProps: INavProps): void; - // (undocumented) static defaultProps: INavProps; // (undocumented) render(): JSX.Element | null; // (undocumented) readonly selectedKey: string | undefined; -} + } // @public (undocumented) export const NormalPeoplePicker: React.StatelessComponent; @@ -9159,7 +9165,7 @@ export class SuggestionsItem extends BaseComponent, { // @public (undocumented) export class SuggestionsStore { - constructor(); + constructor(options?: SuggestionsStoreOptions); // (undocumented) convertSuggestionsToSuggestionItems(suggestions: Array | T>): ISuggestionModel[]; // (undocumented) @@ -9174,6 +9180,11 @@ export class SuggestionsStore { updateSuggestions(newSuggestions: T[]): void; } +// @public (undocumented) +export type SuggestionsStoreOptions = { + getAriaLabel?: (item: T) => string; +}; + // @public (undocumented) export const SwatchColorPicker: React_2.StatelessComponent; diff --git a/packages/office-ui-fabric-react/package.json b/packages/office-ui-fabric-react/package.json index e1752754835546..1e3ab8166d9684 100644 --- a/packages/office-ui-fabric-react/package.json +++ b/packages/office-ui-fabric-react/package.json @@ -1,6 +1,6 @@ { "name": "office-ui-fabric-react", - "version": "6.181.1", + "version": "6.182.1", "description": "Reusable React components for building experiences for Office 365.", "main": "lib-commonjs/index.js", "module": "lib/index.js", diff --git a/packages/office-ui-fabric-react/src/ShimmeredDetailsList.ts b/packages/office-ui-fabric-react/src/ShimmeredDetailsList.ts index 6c39e97dad5c2a..97cc1f76d4d8a0 100644 --- a/packages/office-ui-fabric-react/src/ShimmeredDetailsList.ts +++ b/packages/office-ui-fabric-react/src/ShimmeredDetailsList.ts @@ -1,3 +1,3 @@ export * from './components/DetailsList/ShimmeredDetailsList'; export * from './components/DetailsList/ShimmeredDetailsList.base'; -export { IShimmeredDetailsListProps } from './components/DetailsList/ShimmeredDetailsList.types'; +export * from './components/DetailsList/ShimmeredDetailsList.types'; diff --git a/packages/office-ui-fabric-react/src/components/Button/BaseButton.tsx b/packages/office-ui-fabric-react/src/components/Button/BaseButton.tsx index 21d7c4edfa3434..ccf2b5e03b1adc 100644 --- a/packages/office-ui-fabric-react/src/components/Button/BaseButton.tsx +++ b/packages/office-ui-fabric-react/src/components/Button/BaseButton.tsx @@ -313,7 +313,7 @@ export class BaseButton extends BaseComponent): JSX.Element | null => { const { iconProps } = this.props; - if (iconProps) { + if (iconProps && (iconProps.iconName || iconProps.imageProps)) { const { className, ...rest } = iconProps; return ; diff --git a/packages/office-ui-fabric-react/src/components/Checkbox/Checkbox.styles.ts b/packages/office-ui-fabric-react/src/components/Checkbox/Checkbox.styles.ts index 5bd72f79f0e97a..2624537175df97 100644 --- a/packages/office-ui-fabric-react/src/components/Checkbox/Checkbox.styles.ts +++ b/packages/office-ui-fabric-react/src/components/Checkbox/Checkbox.styles.ts @@ -44,7 +44,7 @@ export const getStyles = (props: ICheckboxStyleProps): ICheckboxStyles => { opacity: 0, selectors: { - [`.${IsFocusVisibleClassName} &:focus + label::before`]: { + [`.${IsFocusVisibleClassName} &:focus + label`]: { outline: '1px solid ' + theme.palette.neutralSecondary, outlineOffset: '2px', selectors: { diff --git a/packages/office-ui-fabric-react/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap b/packages/office-ui-fabric-react/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap index fdc918a8544f34..216711fc9defa5 100644 --- a/packages/office-ui-fabric-react/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +++ b/packages/office-ui-fabric-react/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap @@ -18,11 +18,11 @@ exports[`Checkbox renders Checkbox correctly 1`] = ` opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } id="checkbox-0" diff --git a/packages/office-ui-fabric-react/src/components/DetailsList/ShimmeredDetailsList.types.ts b/packages/office-ui-fabric-react/src/components/DetailsList/ShimmeredDetailsList.types.ts index 351aecff7b599e..100c21953dd496 100644 --- a/packages/office-ui-fabric-react/src/components/DetailsList/ShimmeredDetailsList.types.ts +++ b/packages/office-ui-fabric-react/src/components/DetailsList/ShimmeredDetailsList.types.ts @@ -5,7 +5,7 @@ import { IStyleFunctionOrObject } from '../../Utilities'; /** * ShimmeredDetailsList props interface - * {@docCategory ShimmeredDetailsList} + * {@docCategory DetailsList} */ export interface IShimmeredDetailsListProps extends IDetailsListProps { /** @@ -50,7 +50,7 @@ export interface IShimmeredDetailsListProps extends IDetailsListProps { /** * Defines props needed to construct styles. This represents the simplified set of immutable things which control the class names. - * @internal + * {@docCategory DetailsList} */ export type IShimmeredDetailsListStyleProps = Required> & { /** @@ -68,7 +68,7 @@ export type IShimmeredDetailsListStyleProps = Required d.customName + ' label'; + +describe('SuggestionsStore', () => { + describe('when getting the aria-label', () => { + it('uses getAriaLabel for item text when it is set', () => { + const store = new SuggestionsStore({ + getAriaLabel: getCustomName + }); + store.updateSuggestions([ + { + customName: 'me' + } + ]); + + expect(store.getSuggestionAtIndex(0)).toEqual({ + item: { + customName: 'me' + }, + selected: false, + ariaLabel: 'me label' + }); + }); + + it('prioritizes getAriaLabel over name', () => { + const store = new SuggestionsStore({ + getAriaLabel: getCustomName + }); + store.updateSuggestions([ + { + customName: 'u', + name: 'name' + } + ]); + + expect(store.getSuggestionAtIndex(0)).toEqual({ + item: { + customName: 'u', + name: 'name' + }, + selected: false, + ariaLabel: 'u label' + }); + }); + + it('prioritizes getAriaLabel over primaryText', () => { + const store = new SuggestionsStore({ + getAriaLabel: getCustomName + }); + store.updateSuggestions([ + { + customName: 'us', + primaryText: 'primaryText' + } + ]); + + expect(store.getSuggestionAtIndex(0)).toEqual({ + item: { + customName: 'us', + primaryText: 'primaryText' + }, + selected: false, + ariaLabel: 'us label' + }); + }); + + it('prioritizes name over primaryText if getAriaLabel is unset', () => { + const store = new SuggestionsStore(); + store.updateSuggestions([ + { + customName: 'us', + primaryText: 'primaryText', + name: 'name' + } + ]); + + expect(store.getSuggestionAtIndex(0)).toEqual({ + item: { + customName: 'us', + primaryText: 'primaryText', + name: 'name' + }, + selected: false, + ariaLabel: 'name' + }); + }); + }); +}); diff --git a/packages/office-ui-fabric-react/src/components/FloatingPicker/Suggestions/SuggestionsStore.ts b/packages/office-ui-fabric-react/src/components/FloatingPicker/Suggestions/SuggestionsStore.ts index b1f6e5b7089d89..a145f5dcdb117c 100644 --- a/packages/office-ui-fabric-react/src/components/FloatingPicker/Suggestions/SuggestionsStore.ts +++ b/packages/office-ui-fabric-react/src/components/FloatingPicker/Suggestions/SuggestionsStore.ts @@ -1,11 +1,17 @@ -import { autobind } from '../../../Utilities'; -import { ISuggestionModel } from '../../../Pickers'; +import { ISuggestionModel, ITag } from '../../../Pickers'; +import { IPersonaProps } from '../../../Persona'; + +export type SuggestionsStoreOptions = { + getAriaLabel?: (item: T) => string; +}; export class SuggestionsStore { public suggestions: ISuggestionModel[]; + private getAriaLabel?: (item: T) => string; - constructor() { + constructor(options?: SuggestionsStoreOptions) { this.suggestions = []; + this.getAriaLabel = options && options.getAriaLabel; } public updateSuggestions(newSuggestions: T[]): void { @@ -32,22 +38,23 @@ export class SuggestionsStore { return Array.isArray(suggestions) ? suggestions.map(this._ensureSuggestionModel) : []; } - @autobind - private _isSuggestionModel(value: ISuggestionModel | T): value is ISuggestionModel { + private _isSuggestionModel = (value: ISuggestionModel | T): value is ISuggestionModel => { return (>value).item !== undefined; - } + }; - @autobind - private _ensureSuggestionModel(suggestion: ISuggestionModel | T): ISuggestionModel { + private _ensureSuggestionModel = (suggestion: ISuggestionModel | T): ISuggestionModel => { if (this._isSuggestionModel(suggestion)) { - return suggestion as ISuggestionModel; + return suggestion; } else { return { item: suggestion, selected: false, - // tslint:disable-next-line:no-any - ariaLabel: (suggestion).name || (suggestion).primaryText - } as ISuggestionModel; + ariaLabel: + this.getAriaLabel !== undefined + ? this.getAriaLabel(suggestion) + : // tslint:disable-next-line:no-any + ((suggestion as any) as ITag).name || (suggestion).primaryText + }; } - } + }; } diff --git a/packages/office-ui-fabric-react/src/components/Nav/Nav.base.tsx b/packages/office-ui-fabric-react/src/components/Nav/Nav.base.tsx index ed52d96a19643c..4f7ebe8e910952 100644 --- a/packages/office-ui-fabric-react/src/components/Nav/Nav.base.tsx +++ b/packages/office-ui-fabric-react/src/components/Nav/Nav.base.tsx @@ -23,7 +23,7 @@ export function isRelativeUrl(url: string): boolean { const getClassNames = classNamesFunction(); export interface INavState { - isGroupCollapsed?: { [key: string]: boolean }; + isGroupCollapsed: { [key: string]: boolean }; isLinkExpandStateChanged?: boolean; selectedKey?: string; } @@ -41,36 +41,6 @@ export class NavBase extends React.Component implements IN isLinkExpandStateChanged: false, selectedKey: props.initialSelectedKey || props.selectedKey }; - - if (props.groups) { - for (const group of props.groups) { - if (group.collapseByDefault && group.name) { - this.state.isGroupCollapsed![group.name] = true; - } - } - } - } - - public componentWillReceiveProps(newProps: INavProps): void { - const newGroups = newProps.groups || []; - const isGroupCollapsed = this.state.isGroupCollapsed!; - - // If the component's props were updated, new groups may have been added, which may have - // collapseByDefault set. Ensure that setting is respected for any new groups. - // (If isGroupCollapsed is already set for a group, don't overwrite that.) - let hasUpdated = false; - for (const newGroup of newGroups) { - if (newGroup.name && newGroup.collapseByDefault && !isGroupCollapsed.hasOwnProperty(newGroup.name)) { - isGroupCollapsed[newGroup.name] = true; - hasUpdated = true; - } - } - - if (hasUpdated) { - this.setState({ - isGroupCollapsed: isGroupCollapsed - }); - } } public render(): JSX.Element | null { @@ -105,13 +75,13 @@ export class NavBase extends React.Component implements IN private _renderNavLink(link: INavLink, linkIndex: number, nestingLevel: number): JSX.Element { const { styles, groups, theme, onRenderLink = this._onRenderLink, linkAs: LinkAs = ActionButton } = this.props; - + const isLinkWithIcon = link.icon || link.iconProps; const classNames = getClassNames(styles!, { theme: theme!, isSelected: this._isLinkSelected(link), isDisabled: link.disabled, isButtonEntry: link.onClick && !link.forceAnchor, - leftPadding: _indentationSize * nestingLevel + _baseIndent, + leftPadding: _indentationSize * nestingLevel + _baseIndent + (isLinkWithIcon ? 0 : 24), groups }); @@ -123,7 +93,7 @@ export class NavBase extends React.Component implements IN className={classNames.link} styles={buttonStyles} href={link.url || (link.forceAnchor ? 'javascript:' : undefined)} - iconProps={link.iconProps || { iconName: link.icon || '' }} + iconProps={link.iconProps || { iconName: link.icon }} onClick={link.onClick ? this._onNavButtonLinkClicked.bind(this, link) : this._onNavAnchorLinkClicked.bind(this, link)} title={link.title || link.name} target={link.target} @@ -201,7 +171,7 @@ export class NavBase extends React.Component implements IN const classNames = getClassNames(styles!, { theme: theme!, isGroup: true, - isExpanded: !this.state.isGroupCollapsed![group.name!], + isExpanded: this._isGroupExpanded(group), groups }); @@ -218,7 +188,7 @@ export class NavBase extends React.Component implements IN const classNames = getClassNames(styles!, { theme: theme!, isGroup: true, - isExpanded: !this.state.isGroupCollapsed![group.name!], + isExpanded: this._isGroupExpanded(group), groups }); @@ -227,7 +197,7 @@ export class NavBase extends React.Component implements IN className={classNames.chevronButton} onClick={this._onGroupHeaderClicked.bind(this, group)} aria-label={expandButtonAriaLabel} - aria-expanded={!this.state.isGroupCollapsed![group.name!]} + aria-expanded={this._isGroupExpanded(group)} > {group.name} @@ -236,16 +206,11 @@ export class NavBase extends React.Component implements IN }; private _onGroupHeaderClicked(group: INavLinkGroup, ev: React.MouseEvent): void { - const { isGroupCollapsed } = this.state; - const groupKey = group.name!; - const isCollapsed = !isGroupCollapsed![groupKey]; - if (group.onHeaderClick) { - group.onHeaderClick(ev, isCollapsed); + group.onHeaderClick(ev, this._isGroupExpanded(group)); } - isGroupCollapsed![groupKey] = isCollapsed; - this.setState({ isGroupCollapsed: isGroupCollapsed }); + this._toggleCollapsed(group); ev.preventDefault(); ev.stopPropagation(); @@ -331,4 +296,24 @@ export class NavBase extends React.Component implements IN return false; } + + private _isGroupExpanded(group: INavLinkGroup): boolean { + if (group.name && this.state.isGroupCollapsed.hasOwnProperty(group.name)) { + return !this.state.isGroupCollapsed[group.name]; + } + if (group.collapseByDefault !== undefined) { + return !group.collapseByDefault; + } + return true; + } + + private _toggleCollapsed(group: INavLinkGroup): void { + if (group.name) { + const newGroupCollapsed = { + ...this.state.isGroupCollapsed, // Make a copy in order to not modify state + [group.name]: this._isGroupExpanded(group) // sic - presently open will be collapsed after setState + }; + this.setState({ isGroupCollapsed: newGroupCollapsed }); + } + } } diff --git a/packages/office-ui-fabric-react/src/components/Nav/__snapshots__/Nav.test.tsx.snap b/packages/office-ui-fabric-react/src/components/Nav/__snapshots__/Nav.test.tsx.snap index 186a2ffddc1489..e2c1c619bc32fc 100644 --- a/packages/office-ui-fabric-react/src/components/Nav/__snapshots__/Nav.test.tsx.snap +++ b/packages/office-ui-fabric-react/src/components/Nav/__snapshots__/Nav.test.tsx.snap @@ -104,7 +104,7 @@ exports[`Nav renders Nav correctly 1`] = ` outline: transparent; overflow: hidden; padding-bottom: 0; - padding-left: 3px; + padding-left: 27px; padding-right: 20px; padding-top: 0; position: relative; @@ -184,28 +184,6 @@ exports[`Nav renders Nav correctly 1`] = ` justify-content: flex-start; } > -
    implement className={this._classNames.closeButton} onClick={this._onPanelClick} ariaLabel={closeButtonAriaLabel} + title={closeButtonAriaLabel} data-is-visible={true} iconProps={{ iconName: 'Cancel' }} /> diff --git a/packages/office-ui-fabric-react/src/components/TextField/TextField.base.tsx b/packages/office-ui-fabric-react/src/components/TextField/TextField.base.tsx index f2ce4e62a57293..9a1bcc2bff3c3f 100644 --- a/packages/office-ui-fabric-react/src/components/TextField/TextField.base.tsx +++ b/packages/office-ui-fabric-react/src/components/TextField/TextField.base.tsx @@ -32,7 +32,7 @@ export interface ITextFieldState { * - If there is no validation error or we have not validated the input value, errorMessage is an empty string. * - If we have done the validation and there is validation error, errorMessage is the validation error message. */ - errorMessage: string; + errorMessage: string | JSX.Element; } const DEFAULT_STATE_VALUE = ''; @@ -418,7 +418,7 @@ export class TextFieldBase extends React.Component{suffix}; } - private get _errorMessage(): string | undefined { + private get _errorMessage(): string | JSX.Element | undefined { let { errorMessage } = this.state; if (!errorMessage && this.props.errorMessage) { errorMessage = this.props.errorMessage; @@ -524,13 +524,13 @@ export class TextFieldBase extends React.Component { + result.then((errorMessage: string | JSX.Element) => { if (this._isMounted && currentValidation === this._lastValidation) { this.setState({ errorMessage } as ITextFieldState); } @@ -542,7 +542,7 @@ export class TextFieldBase extends React.Component { describe('error message', () => { const errorMessage = 'The string is too long, should not exceed 3 characters.'; + const errorMessageJSX = ( + + The string is too long, +
    + should not exceed 3 characters. +
    + ); - function assertErrorMessage(renderedDOM: Element, expectedErrorMessage: string | boolean): void { + function assertErrorMessage(renderedDOM: Element, expectedErrorMessage: string | JSX.Element | boolean): void { const errorMessageDOM = renderedDOM.querySelector('[data-automation-id=error-message]'); if (expectedErrorMessage === false) { expect(errorMessageDOM).toBeNull(); // element not exists - } else { + } else if (typeof expectedErrorMessage === 'string') { expect(errorMessageDOM!.textContent).toEqual(expectedErrorMessage); + } else if (typeof expectedErrorMessage !== 'boolean') { + const xhtml = errorMessageDOM!.innerHTML.replace(/
    /g, '
    '); + expect(xhtml).toEqual(renderToStaticMarkup(expectedErrorMessage)); } } @@ -233,6 +244,22 @@ describe('TextField', () => { return delay(20).then(() => assertErrorMessage(textField.getDOMNode(), errorMessage)); }); + it('should render error message when onGetErrorMessage returns a JSX.Element', () => { + function validator(value: string): string | JSX.Element { + return value.length > 3 ? errorMessageJSX : ''; + } + + const textField = mount( + + ); + + const inputDOM = textField.getDOMNode().querySelector('input'); + ReactTestUtils.Simulate.change(inputDOM as Element, mockEvent('the input value')); + + // The value is delayed to validate, so it must to query error message after a while. + return delay(20).then(() => assertErrorMessage(textField.getDOMNode(), errorMessageJSX)); + }); + it('should render error message when onGetErrorMessage returns a Promise', () => { function validator(value: string): Promise { return Promise.resolve(value.length > 3 ? errorMessage : ''); @@ -249,6 +276,22 @@ describe('TextField', () => { return delay(20).then(() => assertErrorMessage(textField.getDOMNode(), errorMessage)); }); + it('should render error message when onGetErrorMessage returns a Promise', () => { + function validator(value: string): Promise { + return Promise.resolve(value.length > 3 ? errorMessageJSX : ''); + } + + const textField = mount( + + ); + + const inputDOM = textField.getDOMNode().querySelector('input'); + ReactTestUtils.Simulate.change(inputDOM as Element, mockEvent('the input value')); + + // The value is delayed to validate, so it must to query error message after a while. + return delay(20).then(() => assertErrorMessage(textField.getDOMNode(), errorMessageJSX)); + }); + it('should render error message on first render when onGetErrorMessage returns a string', () => { const textField = mount( void; + onNotifyValidationResult?: (errorMessage: string | JSX.Element, value: string | undefined) => void; /** * Function used to determine whether the input value is valid and get an error message if not. * Mutually exclusive with the static string `errorMessage` (it will take precedence over this). * - * When it returns string: + * When it returns string | JSX.Element: * - If valid, it returns empty string. - * - If invalid, it returns the error message string and the text field will + * - If invalid, it returns the error message and the text field will * show a red border and show an error message below the text field. * - * When it returns Promise: + * When it returns Promise\: * - The resolved value is displayed as the error message. * - If rejected, the value is thrown away. */ - onGetErrorMessage?: (value: string) => string | PromiseLike | undefined; + onGetErrorMessage?: (value: string) => string | JSX.Element | PromiseLike | undefined; /** * Text field will start to validate after users stop typing for `deferredValidationTime` milliseconds. diff --git a/packages/office-ui-fabric-react/src/components/__snapshots__/Callout.Directional.Example.tsx.shot b/packages/office-ui-fabric-react/src/components/__snapshots__/Callout.Directional.Example.tsx.shot index 7b71b9f2d2df38..605c1f179d5596 100644 --- a/packages/office-ui-fabric-react/src/components/__snapshots__/Callout.Directional.Example.tsx.shot +++ b/packages/office-ui-fabric-react/src/components/__snapshots__/Callout.Directional.Example.tsx.shot @@ -26,11 +26,11 @@ exports[`Component Examples renders Callout.Directional.Example.tsx correctly 1` opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } id="checkbox-0" diff --git a/packages/office-ui-fabric-react/src/components/__snapshots__/Checkbox.Basic.Example.tsx.shot b/packages/office-ui-fabric-react/src/components/__snapshots__/Checkbox.Basic.Example.tsx.shot index 8444b3766d7e68..47d88056d64de8 100644 --- a/packages/office-ui-fabric-react/src/components/__snapshots__/Checkbox.Basic.Example.tsx.shot +++ b/packages/office-ui-fabric-react/src/components/__snapshots__/Checkbox.Basic.Example.tsx.shot @@ -19,11 +19,11 @@ exports[`Component Examples renders Checkbox.Basic.Example.tsx correctly 1`] = ` opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } id="checkbox-0" diff --git a/packages/office-ui-fabric-react/src/components/__snapshots__/Checkbox.Other.Example.tsx.shot b/packages/office-ui-fabric-react/src/components/__snapshots__/Checkbox.Other.Example.tsx.shot index 569f7c40c25a78..40e1002232dcdb 100644 --- a/packages/office-ui-fabric-react/src/components/__snapshots__/Checkbox.Other.Example.tsx.shot +++ b/packages/office-ui-fabric-react/src/components/__snapshots__/Checkbox.Other.Example.tsx.shot @@ -20,11 +20,11 @@ exports[`Component Examples renders Checkbox.Other.Example.tsx correctly 1`] = ` opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } id="checkbox-0" @@ -151,11 +151,11 @@ exports[`Component Examples renders Checkbox.Other.Example.tsx correctly 1`] = ` opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } defaultChecked={true} @@ -296,11 +296,11 @@ exports[`Component Examples renders Checkbox.Other.Example.tsx correctly 1`] = ` opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } disabled={true} @@ -413,11 +413,11 @@ exports[`Component Examples renders Checkbox.Other.Example.tsx correctly 1`] = ` opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } defaultChecked={true} @@ -531,11 +531,11 @@ exports[`Component Examples renders Checkbox.Other.Example.tsx correctly 1`] = ` opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } id="checkbox-4" @@ -662,11 +662,11 @@ exports[`Component Examples renders Checkbox.Other.Example.tsx correctly 1`] = ` opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } id="checkbox-5" @@ -794,11 +794,11 @@ exports[`Component Examples renders Checkbox.Other.Example.tsx correctly 1`] = ` opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } id="checkbox-6" diff --git a/packages/office-ui-fabric-react/src/components/__snapshots__/ContextualMenu.Directional.Example.tsx.shot b/packages/office-ui-fabric-react/src/components/__snapshots__/ContextualMenu.Directional.Example.tsx.shot index 741e6c12d2617c..917197d0163e19 100644 --- a/packages/office-ui-fabric-react/src/components/__snapshots__/ContextualMenu.Directional.Example.tsx.shot +++ b/packages/office-ui-fabric-react/src/components/__snapshots__/ContextualMenu.Directional.Example.tsx.shot @@ -25,11 +25,11 @@ exports[`Component Examples renders ContextualMenu.Directional.Example.tsx corre opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } id="checkbox-0" diff --git a/packages/office-ui-fabric-react/src/components/__snapshots__/Dialog.Basic.Example.tsx.shot b/packages/office-ui-fabric-react/src/components/__snapshots__/Dialog.Basic.Example.tsx.shot index 44a9236d573e0c..062a64fc1b5ca8 100644 --- a/packages/office-ui-fabric-react/src/components/__snapshots__/Dialog.Basic.Example.tsx.shot +++ b/packages/office-ui-fabric-react/src/components/__snapshots__/Dialog.Basic.Example.tsx.shot @@ -20,11 +20,11 @@ exports[`Component Examples renders Dialog.Basic.Example.tsx correctly 1`] = ` opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } id="checkbox-2" diff --git a/packages/office-ui-fabric-react/src/components/__snapshots__/Dialog.Modeless.Example.tsx.shot b/packages/office-ui-fabric-react/src/components/__snapshots__/Dialog.Modeless.Example.tsx.shot index 235aa10ed393d0..b9f9fd6e366c17 100644 --- a/packages/office-ui-fabric-react/src/components/__snapshots__/Dialog.Modeless.Example.tsx.shot +++ b/packages/office-ui-fabric-react/src/components/__snapshots__/Dialog.Modeless.Example.tsx.shot @@ -26,11 +26,11 @@ exports[`Component Examples renders Dialog.Modeless.Example.tsx correctly 1`] = opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } disabled={false} diff --git a/packages/office-ui-fabric-react/src/components/__snapshots__/Facepile.Basic.Example.tsx.shot b/packages/office-ui-fabric-react/src/components/__snapshots__/Facepile.Basic.Example.tsx.shot index 652f900dd306a3..c4e955a9d998be 100644 --- a/packages/office-ui-fabric-react/src/components/__snapshots__/Facepile.Basic.Example.tsx.shot +++ b/packages/office-ui-fabric-react/src/components/__snapshots__/Facepile.Basic.Example.tsx.shot @@ -943,11 +943,11 @@ exports[`Component Examples renders Facepile.Basic.Example.tsx correctly 1`] = ` opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } id="checkbox-6" diff --git a/packages/office-ui-fabric-react/src/components/__snapshots__/MarqueeSelection.Basic.Example.tsx.shot b/packages/office-ui-fabric-react/src/components/__snapshots__/MarqueeSelection.Basic.Example.tsx.shot index f5c5e4f5e70d29..2e9cabc8dd53d8 100644 --- a/packages/office-ui-fabric-react/src/components/__snapshots__/MarqueeSelection.Basic.Example.tsx.shot +++ b/packages/office-ui-fabric-react/src/components/__snapshots__/MarqueeSelection.Basic.Example.tsx.shot @@ -27,11 +27,11 @@ exports[`Component Examples renders MarqueeSelection.Basic.Example.tsx correctly opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } defaultChecked={true} diff --git a/packages/office-ui-fabric-react/src/components/__snapshots__/Modal.Basic.Example.tsx.shot b/packages/office-ui-fabric-react/src/components/__snapshots__/Modal.Basic.Example.tsx.shot index 642a88d1eb6137..ef52e704a402dc 100644 --- a/packages/office-ui-fabric-react/src/components/__snapshots__/Modal.Basic.Example.tsx.shot +++ b/packages/office-ui-fabric-react/src/components/__snapshots__/Modal.Basic.Example.tsx.shot @@ -20,11 +20,11 @@ exports[`Component Examples renders Modal.Basic.Example.tsx correctly 1`] = ` opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } id="checkbox-2" diff --git a/packages/office-ui-fabric-react/src/components/__snapshots__/Modal.Modeless.Example.tsx.shot b/packages/office-ui-fabric-react/src/components/__snapshots__/Modal.Modeless.Example.tsx.shot index 335fb4107dbab2..7ca881016b619f 100644 --- a/packages/office-ui-fabric-react/src/components/__snapshots__/Modal.Modeless.Example.tsx.shot +++ b/packages/office-ui-fabric-react/src/components/__snapshots__/Modal.Modeless.Example.tsx.shot @@ -21,11 +21,11 @@ exports[`Component Examples renders Modal.Modeless.Example.tsx correctly 1`] = ` opacity: 0; position: absolute; } - .ms-Fabric--isFocusVisible &:focus + label::before { + .ms-Fabric--isFocusVisible &:focus + label { outline-offset: 2px; outline: 1px solid #666666; } - @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label::before { + @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus + label { outline: 1px solid ActiveBorder; } disabled={false} diff --git a/packages/office-ui-fabric-react/src/components/__snapshots__/Nav.Basic.Example.tsx.shot b/packages/office-ui-fabric-react/src/components/__snapshots__/Nav.Basic.Example.tsx.shot index f13b68bdbcdbb9..a5dc7c89f6c0ef 100644 --- a/packages/office-ui-fabric-react/src/components/__snapshots__/Nav.Basic.Example.tsx.shot +++ b/packages/office-ui-fabric-react/src/components/__snapshots__/Nav.Basic.Example.tsx.shot @@ -196,7 +196,7 @@ exports[`Component Examples renders Nav.Basic.Example.tsx correctly 1`] = ` outline: transparent; overflow: hidden; padding-bottom: 0; - padding-left: 3px; + padding-left: 27px; padding-right: 20px; padding-top: 0; position: relative; @@ -276,28 +276,6 @@ exports[`Component Examples renders Nav.Basic.Example.tsx correctly 1`] = ` justify-content: flex-start; } > -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    jestTask({ ...(process.env.TF_BUILD && { runInBand: true }), - ...(process.env.TF_BUILD || argv().production ? { coverage: true } : undefined), ...(argv().u || argv().updateSnapshot ? { updateSnapshot: true } : undefined) }); @@ -15,7 +14,6 @@ exports.jestWatch = () => { const args = argv(); return jestTask({ ...(process.env.TF_BUILD && { runInBand: true }), - ...(process.env.TF_BUILD || args.production ? { coverage: true } : undefined), ...(args.u || args.updateSnapshot ? { updateSnapshot: true } : undefined), watch: true, _: ['-i', ...(args._ || []).filter(arg => arg !== 'jest-watch')]