From e3ec718f6e6f9794dcd90651a64021f62655b0c0 Mon Sep 17 00:00:00 2001 From: Manish Dahamiwal Date: Wed, 24 May 2017 13:40:58 +0530 Subject: [PATCH 0001/1641] Spinner: [a11y] support for status announcements (#1680) * Spinner: accessibility improvement * change log * minor typos * typed ariaLive * addressing comments * using ms-u-screenReaderOnly --- ...spinner-accessiblity_2017-05-02-18-52.json | 10 ++++++++ .../src/components/Spinner/Spinner.Props.ts | 16 +++++++++++-- .../src/components/Spinner/Spinner.scss | 6 ++++- .../src/components/Spinner/Spinner.tsx | 24 +++++++++++++------ .../examples/Spinner.Basic.Example.tsx | 2 +- 5 files changed, 47 insertions(+), 11 deletions(-) create mode 100644 common/changes/spinner-accessiblity_2017-05-02-18-52.json diff --git a/common/changes/spinner-accessiblity_2017-05-02-18-52.json b/common/changes/spinner-accessiblity_2017-05-02-18-52.json new file mode 100644 index 0000000000000..e89b96422c15a --- /dev/null +++ b/common/changes/spinner-accessiblity_2017-05-02-18-52.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "Spinner: support for status announcement", + "type": "minor" + } + ], + "email": "manishda@microsoft.com" +} \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/Spinner/Spinner.Props.ts b/packages/office-ui-fabric-react/src/components/Spinner/Spinner.Props.ts index ff5c92084049f..998e7a387f247 100644 --- a/packages/office-ui-fabric-react/src/components/Spinner/Spinner.Props.ts +++ b/packages/office-ui-fabric-react/src/components/Spinner/Spinner.Props.ts @@ -25,14 +25,26 @@ export interface ISpinnerProps extends React.Props { size?: SpinnerSize; /** - * The label to show next to the Spinner. - */ + * The label to show next to the Spinner. Label updates will be announced to the screen readers. + * Use ariaLive to control politeness level. + */ label?: string; /** * Additional CSS class(es) to apply to the Spinner. */ className?: string; + + /** + * Politeness setting for label update announcement. + * @default polite + */ + ariaLive?: 'assertive' | 'polite' | 'off'; + + /** + * Alternative status label for screen reader + */ + ariaLabel?: string; } export enum SpinnerSize { diff --git a/packages/office-ui-fabric-react/src/components/Spinner/Spinner.scss b/packages/office-ui-fabric-react/src/components/Spinner/Spinner.scss index f92a3ebaf347c..b4d0105284352 100644 --- a/packages/office-ui-fabric-react/src/components/Spinner/Spinner.scss +++ b/packages/office-ui-fabric-react/src/components/Spinner/Spinner.scss @@ -48,11 +48,15 @@ $borderSize: 1.5px; height: 28px; } } - > .label { + .label { color: $ms-color-themePrimary; margin-top: 10px; text-align: center; } + + .screenReaderOnly { + @include ms-u-screenReaderOnly; + } } @media screen and (-ms-high-contrast: active) { diff --git a/packages/office-ui-fabric-react/src/components/Spinner/Spinner.tsx b/packages/office-ui-fabric-react/src/components/Spinner/Spinner.tsx index 87c807ecb671a..04633f55b5cc5 100644 --- a/packages/office-ui-fabric-react/src/components/Spinner/Spinner.tsx +++ b/packages/office-ui-fabric-react/src/components/Spinner/Spinner.tsx @@ -1,16 +1,18 @@ import * as React from 'react'; -import { BaseComponent, css } from '../../Utilities'; +import { BaseComponent, css, DelayedRender } from '../../Utilities'; import { ISpinnerProps, SpinnerType, SpinnerSize } from './Spinner.Props'; import * as stylesImport from './Spinner.scss'; const styles: any = stylesImport; export class Spinner extends BaseComponent { public static defaultProps: ISpinnerProps = { - size: SpinnerSize.medium + size: SpinnerSize.medium, + ariaLive: 'polite' }; public render() { - let { type, size, label, className } = this.props; // TODO remove deprecated type property at >= 2.0.0 + let { type, size, label, className, ariaLive, ariaLabel } = this.props; // TODO remove deprecated type property at >= 2.0.0 + const statusMessage = ariaLabel || label; return (
@@ -25,10 +27,18 @@ export class Spinner extends BaseComponent { }) }>
- { label && ( -
{ label }
- ) } - + { + label &&
{ label }
+ } + { + statusMessage && +
+ +
{ statusMessage }
+
+
+ } + ); } } \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/Spinner/examples/Spinner.Basic.Example.tsx b/packages/office-ui-fabric-react/src/components/Spinner/examples/Spinner.Basic.Example.tsx index 2acfb446a0f6c..48c586c10194f 100644 --- a/packages/office-ui-fabric-react/src/components/Spinner/examples/Spinner.Basic.Example.tsx +++ b/packages/office-ui-fabric-react/src/components/Spinner/examples/Spinner.Basic.Example.tsx @@ -26,7 +26,7 @@ export class SpinnerBasicExample extends React.Component { - + ); } From 2c49eca4b9842b22dbbda47817edd571206fd2a9 Mon Sep 17 00:00:00 2001 From: Micah Godbolt Date: Wed, 24 May 2017 12:47:09 -0700 Subject: [PATCH 0002/1641] Search box onblur (#1854) * Fixed searchbox on blur not working * Change file * remove unused imports --- .../search-box-onblur_2017-05-24-16-13.json | 10 +++++++++ .../src/components/SearchBox/SearchBox.tsx | 21 ++++++++----------- 2 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 common/changes/search-box-onblur_2017-05-24-16-13.json diff --git a/common/changes/search-box-onblur_2017-05-24-16-13.json b/common/changes/search-box-onblur_2017-05-24-16-13.json new file mode 100644 index 0000000000000..467e99375bbfb --- /dev/null +++ b/common/changes/search-box-onblur_2017-05-24-16-13.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "SearchBox: Fixed onBlur not removing focus", + "type": "patch" + } + ], + "email": "micahgodbolt@gmail.com" +} \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/SearchBox/SearchBox.tsx b/packages/office-ui-fabric-react/src/components/SearchBox/SearchBox.tsx index 2f43af1f0be95..09411429afda1 100644 --- a/packages/office-ui-fabric-react/src/components/SearchBox/SearchBox.tsx +++ b/packages/office-ui-fabric-react/src/components/SearchBox/SearchBox.tsx @@ -5,8 +5,6 @@ import { autobind, css, getId, - elementContains, - getDocument, KeyCodes } from '../../Utilities'; @@ -113,7 +111,7 @@ export class SearchBox extends BaseComponent { hasFocus: true }); - this._events.on(getDocument().body, 'focus', this._handleDocumentFocus, true); + this._events.on(this._rootElement, 'blur', this._onBlur, true); } @autobind @@ -139,6 +137,14 @@ export class SearchBox extends BaseComponent { ev.stopPropagation(); } + @autobind + private _onBlur(ev: React.ChangeEvent) { + this._events.off(this._rootElement, 'blur'); + this.setState({ + hasFocus: false + }); + } + @autobind private _onInputChange(ev: React.ChangeEvent) { const value = this._inputElement.value; @@ -151,15 +157,6 @@ export class SearchBox extends BaseComponent { this._callOnChange(value); } - private _handleDocumentFocus(ev: FocusEvent) { - if (!elementContains(this._rootElement, ev.target as HTMLElement)) { - this._events.off(getDocument().body, 'focus'); - this.setState({ - hasFocus: false - }); - } - } - private _callOnChange(newValue: string): void { let { onChange, onChanged } = this.props; From 352ed68433ce19f2bfd99a4512fc2e98984d7d16 Mon Sep 17 00:00:00 2001 From: Christian Gonzalez Date: Wed, 24 May 2017 14:38:25 -0700 Subject: [PATCH 0003/1641] Prevent infinite render loops for Resize Group (#1857) * Add a test that causes recreates the bug with resize group that is causing a stack overflow * Remove unused variable * Don't call reducedata again when it returns undefined, stop measuring. Add tests. * Check the value of the wrapper state * Update comment * Rename mocks to spies for clarity * Rush change * Update example app to return undefined --- ...ze-group-reduce-stop_2017-05-24-20-22.json | 10 ++ .../ResizeGroup/ResizeGroup.Props.ts | 4 +- .../ResizeGroup/ResizeGroup.test.tsx | 93 ++++++++++++++----- .../components/ResizeGroup/ResizeGroup.tsx | 22 +++-- .../ResizeGroup.OverflowSet.Example.tsx | 6 +- 5 files changed, 103 insertions(+), 32 deletions(-) create mode 100644 common/changes/resize-group-reduce-stop_2017-05-24-20-22.json diff --git a/common/changes/resize-group-reduce-stop_2017-05-24-20-22.json b/common/changes/resize-group-reduce-stop_2017-05-24-20-22.json new file mode 100644 index 0000000000000..e512403df9a35 --- /dev/null +++ b/common/changes/resize-group-reduce-stop_2017-05-24-20-22.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "Fixes bug where ResizeGroup gets stuck in an infinite render loop when subsequent calls to onReduceData does nothing.", + "type": "patch" + } + ], + "email": "chrisgo@microsoft.com" +} \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.Props.ts b/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.Props.ts index adecf404766e6..24d1738dde2a7 100644 --- a/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.Props.ts +++ b/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.Props.ts @@ -24,7 +24,9 @@ export interface IResizeGroupProps extends React.HTMLProps JSX.Element; /** - * Function to be performed on the data in order to make it fit into the given space + * Function to be performed on the data in order to make it fit into the given space. + * If there are no more scaling steps to apply, it should return undefined to prevent + * an infinite render loop. */ onReduceData: (prevData: any) => any; } diff --git a/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.test.tsx b/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.test.tsx index 136ea296fe9ec..8a6e65b994b23 100644 --- a/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.test.tsx +++ b/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.test.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; -import { shallow, mount } from 'enzyme'; +import { shallow, mount, ReactWrapper } from 'enzyme'; import { expect } from 'chai'; import { ResizeGroup, IResizeGroupState } from './ResizeGroup'; import * as sinon from 'sinon'; @@ -18,16 +18,26 @@ function onReduceScalingData(data: ITestScalingData): ITestScalingData { }; } -function getWrapperWithMocks(data: ITestScalingData = { scalingIndex: 5 }, onReduceData?: (data: ITestScalingData) => ITestScalingData) { - const onReduceDataMock = sinon.spy(onReduceData); - const onRenderDataMock = sinon.spy(); +function getWrapperWithMocks(data: ITestScalingData = { scalingIndex: 5 }, + onReduceData: (data: ITestScalingData) => ITestScalingData = onReduceScalingData) { + const onReduceDataSpy = sinon.spy(onReduceData); + const onRenderDataSpy = sinon.spy(); let wrapper = mount(); + return { + wrapper, + onReduceDataSpy, + onRenderDataSpy, + ...getMeasurementMocks(wrapper) + }; +} + +function getMeasurementMocks(wrapper: ReactWrapper) { let rootGetClientRectMock = sinon.stub(); let measuredGetClientRectMock = sinon.stub(); rootGetClientRectMock.returns({ width: 0 }); @@ -46,9 +56,6 @@ function getWrapperWithMocks(data: ITestScalingData = { scalingIndex: 5 }, onRed }); return { - wrapper, - onReduceDataMock, - onRenderDataMock, rootGetClientRectMock, measuredGetClientRectMock }; @@ -101,22 +108,22 @@ describe('ResizeGroup', () => { }); it('will call onReduceData when contents do not fit', () => { - let { wrapper, onReduceDataMock, rootGetClientRectMock, measuredGetClientRectMock } = getWrapperWithMocks(); + let { wrapper, onReduceDataSpy, rootGetClientRectMock, measuredGetClientRectMock } = getWrapperWithMocks(); - onReduceDataMock.reset(); + onReduceDataSpy.reset(); rootGetClientRectMock.returns({ width: 50 }); measuredGetClientRectMock.onFirstCall().returns({ width: 75 }); measuredGetClientRectMock.onSecondCall().returns({ width: 40 }); wrapper.setState({ shouldMeasure: true }); - expect(onReduceDataMock.callCount).to.equal(1); + expect(onReduceDataSpy.callCount).to.equal(1); }); it('will measure after a window resize', () => { - let { onReduceDataMock, rootGetClientRectMock, measuredGetClientRectMock } = getWrapperWithMocks(); + let { onReduceDataSpy, rootGetClientRectMock, measuredGetClientRectMock } = getWrapperWithMocks(); - onReduceDataMock.reset(); + onReduceDataSpy.reset(); rootGetClientRectMock.reset(); measuredGetClientRectMock.reset(); rootGetClientRectMock.returns({ width: 200 }); @@ -128,18 +135,18 @@ describe('ResizeGroup', () => { expect(measuredGetClientRectMock.callCount).to.equal(1); // Don't call onReduceData since everything fits - expect(onReduceDataMock.callCount).to.equal(0); + expect(onReduceDataSpy.callCount).to.equal(0); }); it('will continue to shrink until everything fits', () => { let data = { scalingIndex: 7 }; let { wrapper, - onReduceDataMock, + onReduceDataSpy, rootGetClientRectMock, measuredGetClientRectMock } = getWrapperWithMocks(data, onReduceScalingData); - onReduceDataMock.reset(); + onReduceDataSpy.reset(); measuredGetClientRectMock.reset(); rootGetClientRectMock.reset(); rootGetClientRectMock.returns({ width: 50 }); @@ -149,9 +156,9 @@ describe('ResizeGroup', () => { wrapper.setState({ shouldMeasure: true }); - expect(onReduceDataMock.callCount).to.equal(2); - expect(onReduceDataMock.getCall(0).args[0]).to.deep.equal(data); - expect(onReduceDataMock.getCall(1).args[0]).to.deep.equal({ scalingIndex: 6 }); + expect(onReduceDataSpy.callCount).to.equal(2); + expect(onReduceDataSpy.getCall(0).args[0]).to.deep.equal(data); + expect(onReduceDataSpy.getCall(1).args[0]).to.deep.equal({ scalingIndex: 6 }); expect(wrapper.state()).to.deep.equal({ measuredData: data, renderedData: { scalingIndex: 5 }, @@ -177,14 +184,14 @@ describe('ResizeGroup', () => { it('starts from the beginning when resizing', () => { let data = { scalingIndex: 10 }; - let { wrapper, onRenderDataMock } = getWrapperWithMocks(data); + let { wrapper, onRenderDataSpy } = getWrapperWithMocks(data); wrapper.setState({ renderedData: { scalingIndex: 5 }, shouldMeasure: false }); - onRenderDataMock.reset(); + onRenderDataSpy.reset(); wrapper.setState({ shouldMeasure: true }); @@ -193,12 +200,50 @@ describe('ResizeGroup', () => { // but the important thing here is that the last onRender data // starts from the beginning to make sure we are making maximal // use of the screen real estate. - expect(onRenderDataMock.callCount).to.equal(3); - expect(onRenderDataMock.getCall(2).args[0]).to.deep.equal(data); + expect(onRenderDataSpy.callCount).to.equal(3); + expect(onRenderDataSpy.getCall(2).args[0]).to.deep.equal(data); expect(wrapper.state()).to.deep.equal({ renderedData: data, measuredData: data, shouldMeasure: false }); }); + + it('does not call onReduceData again when it returns undefined', () => { + let mockData = { data: 'foo' }; + let onReduceDataStub = sinon.stub(); + onReduceDataStub.returns({}); + const onRenderDataMock = sinon.spy(); + + let wrapper = mount(); + + let { rootGetClientRectMock, measuredGetClientRectMock } = getMeasurementMocks(wrapper); + + rootGetClientRectMock.returns({ width: 50 }); + measuredGetClientRectMock.returns({ width: 75 }); + + let onRenderSpy = setRenderSpy(wrapper); + // This test will always return that the measured contents don't fit in the root + // The first onReduceData call returns some data, the second returns undefined. + // There should not be additional calls to onReduceData after undefined is returned. + onReduceDataStub.reset(); + onReduceDataStub.onFirstCall().returns(mockData); + onReduceDataStub.onSecondCall().returns(undefined); + + wrapper.setState({ + shouldMeasure: true + }); + + // We'll render 3 times after attaching the render spy. + // 1. Initial render from setting shouldMeasure + // 2. Second render after reducing the data + // 3. Third render to remove the measuring div after onReduce returns undefined + expect(onRenderSpy.callCount).to.equal(3); + expect(onReduceDataStub.callCount).to.equal(2); + expect(wrapper.state().shouldMeasure).to.equal(false); + }); }); diff --git a/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.tsx b/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.tsx index 199bf4193893c..64ca40b6d8e33 100644 --- a/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.tsx +++ b/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.tsx @@ -58,7 +58,7 @@ export class ResizeGroup extends BaseComponent container.width)) { - this.setState((prevState, props) => { - return { - measuredData: onReduceData(prevState.measuredData), - }; - }); + let nextMeasuredData = onReduceData(this.state.measuredData); + + // We don't want to get stuck in an infinite render loop when there are no more + // scaling steps, so implementations of onReduceData should return undefined when + // there are no more scaling states to apply. + if (nextMeasuredData !== undefined) { + this.setState({ + measuredData: nextMeasuredData, + }); + } else { + this.setState({ + shouldMeasure: false + }); + } + } else { this.setState((prevState, props) => { return { diff --git a/packages/office-ui-fabric-react/src/components/ResizeGroup/examples/ResizeGroup.OverflowSet.Example.tsx b/packages/office-ui-fabric-react/src/components/ResizeGroup/examples/ResizeGroup.OverflowSet.Example.tsx index ff6beca609a0d..abfbd6927443f 100644 --- a/packages/office-ui-fabric-react/src/components/ResizeGroup/examples/ResizeGroup.OverflowSet.Example.tsx +++ b/packages/office-ui-fabric-react/src/components/ResizeGroup/examples/ResizeGroup.OverflowSet.Example.tsx @@ -24,6 +24,10 @@ export class ResizeGroupOverflowSetExample extends BaseComponent { { + if (currentdata.primary.length === 0) { + return undefined; + } + let overflow = currentdata.overflow.concat(currentdata.primary.slice(-1)); let primary = currentdata.primary.slice(0, -1); return { primary, overflow }; @@ -55,5 +59,5 @@ export class ResizeGroupOverflowSetExample extends BaseComponent { /> ); - }; + } } \ No newline at end of file From 7f0384f5070942f876f50d19dd3ac11c7bc14664 Mon Sep 17 00:00:00 2001 From: SayaliS Date: Wed, 24 May 2017 14:53:53 -0700 Subject: [PATCH 0004/1641] Add useTargetWidth as a prop to context menu component. (#1842) * update * update * update * address comments * update * address comments * update --- ...lis-contextMenuWidth_2017-05-23-23-07.json | 30 +++++++++++++++++++ .../ContextualMenu/ContextualMenu.Props.ts | 8 ++++- .../ContextualMenu/ContextualMenu.tsx | 15 +++++++++- 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 common/changes/sayalis-contextMenuWidth_2017-05-23-23-07.json diff --git a/common/changes/sayalis-contextMenuWidth_2017-05-23-23-07.json b/common/changes/sayalis-contextMenuWidth_2017-05-23-23-07.json new file mode 100644 index 0000000000000..f30152118723e --- /dev/null +++ b/common/changes/sayalis-contextMenuWidth_2017-05-23-23-07.json @@ -0,0 +1,30 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "ContextMenu: added `useTargetWidth` property to match the width of the anchor element when true the context menu will apply target element's width to it", + "type": "minor" + }, + { + "comment": "", + "packageName": "@uifabric/utilities", + "type": "none" + }, + { + "comment": "", + "packageName": "@uifabric/styling", + "type": "none" + }, + { + "comment": "", + "packageName": "@uifabric/fabric-website", + "type": "none" + }, + { + "comment": "", + "packageName": "@uifabric/example-app-base", + "type": "none" + } + ], + "email": "sayalis@microsoft.com" +} \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.Props.ts b/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.Props.ts index edfa0520e0f35..5b2d961b8da4a 100644 --- a/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.Props.ts +++ b/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.Props.ts @@ -59,7 +59,13 @@ export interface IContextualMenuProps extends React.Props { beakWidth?: number; /** - * The bounding rectangle for which the contextual menu can appear in. + * If true the context menu will render as the same width as the target element + * @default false + */ + useTargetWidth?: boolean; + + /** + * The bounding rectangle for which the contextual menu can appear in. */ bounds?: IRectangle; diff --git a/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.tsx b/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.tsx index 90f32226f844f..f6ab74fe0d3bd 100644 --- a/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.tsx +++ b/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.tsx @@ -181,6 +181,7 @@ export class ContextualMenu extends BaseComponent !!item.canCheck)); const submenuProps = this.state.expandedMenuItemKey ? this._getSubmenuProps() : null; + /** + * When useTargetWidth is true, get the width of the target element and apply it for the context menu container + */ + let contextMenuStyle; + let targetAsHtmlElement = this._target as HTMLElement; + if (useTargetWidth && targetAsHtmlElement && targetAsHtmlElement.offsetWidth) { + let contextMenuWidth = targetAsHtmlElement.offsetWidth; + contextMenuStyle = { + width: contextMenuWidth + }; + } + // The menu should only return if items were provided, if no items were provided then it should not appear. if (items && items.length > 0) { return ( @@ -209,7 +222,7 @@ export class ContextualMenu extends BaseComponent -
this._host = host } id={ id } className={ css('ms-ContextualMenu-container', className) }> +
this._host = host } id={ id } className={ css('ms-ContextualMenu-container', className) }> { (items && items.length) ? ( Date: Thu, 25 May 2017 05:18:29 +0530 Subject: [PATCH 0005/1641] DatePicker: Accessibility fixes (#1821) * fixing accessibility issues in Datepicker * change log * resolving cr comments * Resolving CR comments * removing comment * applying application role on calendar * using role button for calendar days --- .../calendar-a11y_2017-05-18-18-52.json | 10 +++++++ .../src/components/Calendar/Calendar.tsx | 27 ++++++++++--------- .../src/components/Calendar/CalendarDay.tsx | 12 ++++----- .../src/components/Calendar/CalendarMonth.tsx | 26 +++++++++--------- .../src/components/Callout/Callout.Props.ts | 5 ++++ .../src/components/Callout/CalloutContent.tsx | 2 ++ .../components/DatePicker/DatePicker.Props.ts | 6 +++++ .../src/components/DatePicker/DatePicker.tsx | 15 +++++++---- .../src/components/Popup/Popup.Props.ts | 5 ++++ .../src/components/Popup/Popup.tsx | 3 ++- .../src/components/SearchBox/SearchBox.scss | 2 +- 11 files changed, 75 insertions(+), 38 deletions(-) create mode 100644 common/changes/calendar-a11y_2017-05-18-18-52.json diff --git a/common/changes/calendar-a11y_2017-05-18-18-52.json b/common/changes/calendar-a11y_2017-05-18-18-52.json new file mode 100644 index 0000000000000..bb9ed312eaf01 --- /dev/null +++ b/common/changes/calendar-a11y_2017-05-18-18-52.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "DatePicker: Fix for accessibility issues", + "type": "minor" + } + ], + "email": "manishda@microsoft.com" +} \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/Calendar/Calendar.tsx b/packages/office-ui-fabric-react/src/components/Calendar/Calendar.tsx index 7d53c164b74bd..898e8b7a1e5a5 100644 --- a/packages/office-ui-fabric-react/src/components/Calendar/Calendar.tsx +++ b/packages/office-ui-fabric-react/src/components/Calendar/Calendar.tsx @@ -85,7 +85,7 @@ export class Calendar extends BaseComponent impl let { selectedDate, navigatedDate } = this.state; return ( -
+
impl strings={ strings } onNavigateDate={ this._onNavigateDate } /> } - { showGoToToday && - { strings.goToToday } - } + { showGoToToday && + + { strings.goToToday } + + }
@@ -159,17 +162,17 @@ export class Calendar extends BaseComponent impl if (onSelectDate) { onSelectDate(date, selectedDateRangeArray); } - }; + } @autobind private _onGotoToday() { this._navigateDay(this.props.today); this._focusOnUpdate = true; - }; + } @autobind private _onGotoTodayKeyDown(ev: React.KeyboardEvent) { - if (ev.which === KeyCodes.enter) { + if (ev.which === KeyCodes.enter || ev.which === KeyCodes.space) { ev.preventDefault(); this._onGotoToday(); } else if (ev.which === KeyCodes.tab && !ev.shiftKey) { @@ -179,7 +182,7 @@ export class Calendar extends BaseComponent impl this.props.onDismiss(); } } - }; + } @autobind private _onDatePickerPopupKeyDown(ev: React.KeyboardEvent) { diff --git a/packages/office-ui-fabric-react/src/components/Calendar/CalendarDay.tsx b/packages/office-ui-fabric-react/src/components/Calendar/CalendarDay.tsx index 68f2970e04293..eca2361c89cdb 100644 --- a/packages/office-ui-fabric-react/src/components/Calendar/CalendarDay.tsx +++ b/packages/office-ui-fabric-react/src/components/Calendar/CalendarDay.tsx @@ -123,7 +123,6 @@ export class CalendarDay extends BaseComponent + aria-label={ strings.days[(index + firstDayOfWeek) % DAYS_IN_WEEK] }> { strings.shortDays[(index + firstDayOfWeek) % DAYS_IN_WEEK] } ) } @@ -146,7 +145,7 @@ export class CalendarDay extends BaseComponent { week.map((day, dayIndex) => - ) } diff --git a/packages/office-ui-fabric-react/src/components/Calendar/CalendarMonth.tsx b/packages/office-ui-fabric-react/src/components/Calendar/CalendarMonth.tsx index 5f49b27f6f46d..9c79628d0c632 100644 --- a/packages/office-ui-fabric-react/src/components/Calendar/CalendarMonth.tsx +++ b/packages/office-ui-fabric-react/src/components/Calendar/CalendarMonth.tsx @@ -68,18 +68,18 @@ export class CalendarMonth extends BaseComponent {
- { strings.shortMonths.map((month, index) => { - return ( - - { month } - ); - }) } + { strings.shortMonths.map((month, index) => + + { month } + + ) }
@@ -87,7 +87,7 @@ export class CalendarMonth extends BaseComponent { } private _onKeyDown(callback: () => void, ev: React.KeyboardEvent) { - if (ev.which === KeyCodes.enter) { + if (ev.which === KeyCodes.enter || ev.which === KeyCodes.space) { callback(); } } diff --git a/packages/office-ui-fabric-react/src/components/Callout/Callout.Props.ts b/packages/office-ui-fabric-react/src/components/Callout/Callout.Props.ts index db99634ca0d65..e670a4c9d2fd9 100644 --- a/packages/office-ui-fabric-react/src/components/Callout/Callout.Props.ts +++ b/packages/office-ui-fabric-react/src/components/Callout/Callout.Props.ts @@ -95,6 +95,11 @@ export interface ICalloutProps extends React.Props { */ role?: string; + /** + * Accessible label text for callout. + */ + ariaLabel?: string; + /** * Defines the element id referencing the element containing label text for callout. */ diff --git a/packages/office-ui-fabric-react/src/components/Callout/CalloutContent.tsx b/packages/office-ui-fabric-react/src/components/Callout/CalloutContent.tsx index 91dffc87d289a..eb7c3878ffc9e 100644 --- a/packages/office-ui-fabric-react/src/components/Callout/CalloutContent.tsx +++ b/packages/office-ui-fabric-react/src/components/Callout/CalloutContent.tsx @@ -94,6 +94,7 @@ export class CalloutContent extends BaseComponent } let { role, + ariaLabel, ariaDescribedBy, ariaLabelledBy, className, @@ -149,6 +150,7 @@ export class CalloutContent extends BaseComponent (
) } { */ ariaLabel?: string; + /** + * Aria label for date picker popup for screen reader users. + * @defaultvalue Calendar + */ + pickerAriaLabel?: string; + /** * Whether the month picker is shown beside the day picker or hidden. * @defaultvalue true diff --git a/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.tsx b/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.tsx index 293965d1ad6c1..caf42139df205 100644 --- a/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.tsx +++ b/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.tsx @@ -109,7 +109,8 @@ export class DatePicker extends BaseComponent { isDatePickerShown && ( ) { this._validateTextInput(); - }; + } @autobind private _onTextFieldChanged(newValue: string) { @@ -308,7 +313,7 @@ export class DatePicker extends BaseComponent) { diff --git a/packages/office-ui-fabric-react/src/components/Popup/Popup.Props.ts b/packages/office-ui-fabric-react/src/components/Popup/Popup.Props.ts index 171e2f735c034..816795bbd2c43 100644 --- a/packages/office-ui-fabric-react/src/components/Popup/Popup.Props.ts +++ b/packages/office-ui-fabric-react/src/components/Popup/Popup.Props.ts @@ -19,6 +19,11 @@ export interface IPopupProps extends React.HTMLProps { */ role?: string; + /** + * Accessible label text for the popup. + */ + ariaLabel?: string; + /** * Defines the element id referencing the element containing label text for popup. */ diff --git a/packages/office-ui-fabric-react/src/components/Popup/Popup.tsx b/packages/office-ui-fabric-react/src/components/Popup/Popup.tsx index 70487c07f3204..9c254b82df0c0 100644 --- a/packages/office-ui-fabric-react/src/components/Popup/Popup.tsx +++ b/packages/office-ui-fabric-react/src/components/Popup/Popup.tsx @@ -55,7 +55,7 @@ export class Popup extends BaseComponent { } public render() { - let { role, className, ariaLabelledBy, ariaDescribedBy } = this.props; + let { role, className, ariaLabel, ariaLabelledBy, ariaDescribedBy } = this.props; return (
{ { ...getNativeProps(this.props, divProperties) } className={ className } role={ role } + aria-label={ ariaLabel } aria-labelledby={ ariaLabelledBy } aria-describedby={ ariaDescribedBy } onKeyDown={ this._onKeyDown }> diff --git a/packages/office-ui-fabric-react/src/components/SearchBox/SearchBox.scss b/packages/office-ui-fabric-react/src/components/SearchBox/SearchBox.scss index 918fefb1b3466..143bd048de552 100644 --- a/packages/office-ui-fabric-react/src/components/SearchBox/SearchBox.scss +++ b/packages/office-ui-fabric-react/src/components/SearchBox/SearchBox.scss @@ -55,7 +55,7 @@ font-size: inherit; color: $ms-color-black; background-color: transparent; - flex: 1 1 0; + flex: 1 1 0px; overflow: hidden; text-overflow: ellipsis; // This padding forces the text placement to round up. From ac3ba5b560ad07506f02acadaea0b67cafc3e4a1 Mon Sep 17 00:00:00 2001 From: OneDrive Build Date: Wed, 24 May 2017 23:52:09 +0000 Subject: [PATCH 0006/1641] Applying package updates. --- apps/fabric-website/package.json | 2 +- apps/ssr-tests/package.json | 2 +- apps/test-bundle-button/package.json | 2 +- apps/todo-app/package.json | 2 +- ...cegroup-field-render_2017-05-22-21-22.json | 10 ---- ...ze-group-reduce-stop_2017-05-24-20-22.json | 10 ---- .../resize-group-tests_2017-05-23-18-22.json | 30 ----------- ...ickyp-dropdownTitles_2017-05-23-03-10.json | 10 ---- ...lis-contextMenuWidth_2017-05-23-23-07.json | 30 ----------- .../search-box-onblur_2017-05-24-16-13.json | 10 ---- ...spinner-accessiblity_2017-05-02-18-52.json | 10 ---- packages/example-app-base/package.json | 2 +- packages/example-component/package.json | 4 +- .../office-ui-fabric-react/CHANGELOG.json | 51 +++++++++++++++++++ packages/office-ui-fabric-react/CHANGELOG.md | 18 ++++++- packages/office-ui-fabric-react/package.json | 2 +- packages/utilities/CHANGELOG.json | 14 +++++ packages/utilities/CHANGELOG.md | 9 +++- packages/utilities/package.json | 2 +- 19 files changed, 99 insertions(+), 121 deletions(-) delete mode 100644 common/changes/choicegroup-field-render_2017-05-22-21-22.json delete mode 100644 common/changes/resize-group-reduce-stop_2017-05-24-20-22.json delete mode 100644 common/changes/resize-group-tests_2017-05-23-18-22.json delete mode 100644 common/changes/rickyp-dropdownTitles_2017-05-23-03-10.json delete mode 100644 common/changes/sayalis-contextMenuWidth_2017-05-23-23-07.json delete mode 100644 common/changes/search-box-onblur_2017-05-24-16-13.json delete mode 100644 common/changes/spinner-accessiblity_2017-05-02-18-52.json diff --git a/apps/fabric-website/package.json b/apps/fabric-website/package.json index 4109e49ee9262..44baae774f87f 100644 --- a/apps/fabric-website/package.json +++ b/apps/fabric-website/package.json @@ -52,7 +52,7 @@ "json-loader": "^0.5.4", "load-themed-styles": "^1.1.0", "office-ui-fabric-core": ">=5.1.0 <6.0.0", - "office-ui-fabric-react": ">=2.32.0 <3.0.0", + "office-ui-fabric-react": ">=2.33.0 <3.0.0", "@uifabric/utilities": ">=1.10.0 <2.0.0" } } \ No newline at end of file diff --git a/apps/ssr-tests/package.json b/apps/ssr-tests/package.json index 256f724e844a8..0ba025a1edb7b 100644 --- a/apps/ssr-tests/package.json +++ b/apps/ssr-tests/package.json @@ -25,7 +25,7 @@ "@types/mocha": "^2.2.39", "@types/webpack-env": "^1.13.0", "mocha": "~3.3.0", - "office-ui-fabric-react": ">=2.32.0 <3.0.0", + "office-ui-fabric-react": ">=2.33.0 <3.0.0", "raw-loader": "^0.5.1", "react": "^15.4.2", "react-addons-test-utils": "^15.4.2", diff --git a/apps/test-bundle-button/package.json b/apps/test-bundle-button/package.json index e7846b6dede84..2460ed3e3b2d4 100644 --- a/apps/test-bundle-button/package.json +++ b/apps/test-bundle-button/package.json @@ -29,6 +29,6 @@ "dependencies": { "react": "^0.14 || ^15.0.1-0 || ^16.0.0-0", "react-dom": "^0.14 || ^15.0.1-0 || ^16.0.0-0", - "office-ui-fabric-react": ">=2.32.0 <3.0.0" + "office-ui-fabric-react": ">=2.33.0 <3.0.0" } } \ No newline at end of file diff --git a/apps/todo-app/package.json b/apps/todo-app/package.json index 3a1b06d07891e..a51fa1df58a71 100644 --- a/apps/todo-app/package.json +++ b/apps/todo-app/package.json @@ -25,7 +25,7 @@ "es6-promise": "^4.1.0", "immutability-helper": "^2.0.0", "office-ui-fabric-core": ">=5.1.0 <6.0.0", - "office-ui-fabric-react": ">=2.32.0 <3.0.0", + "office-ui-fabric-react": ">=2.33.0 <3.0.0", "react": "^15.4.2", "react-dom": "^15.4.2", "typescript": "2.2.2" diff --git a/common/changes/choicegroup-field-render_2017-05-22-21-22.json b/common/changes/choicegroup-field-render_2017-05-22-21-22.json deleted file mode 100644 index 72675d84cbef6..0000000000000 --- a/common/changes/choicegroup-field-render_2017-05-22-21-22.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "office-ui-fabric-react", - "comment": "ChoiceGroup: Support custom option labels", - "type": "minor" - } - ], - "email": "micahgodbolt@gmail.com" -} \ No newline at end of file diff --git a/common/changes/resize-group-reduce-stop_2017-05-24-20-22.json b/common/changes/resize-group-reduce-stop_2017-05-24-20-22.json deleted file mode 100644 index e512403df9a35..0000000000000 --- a/common/changes/resize-group-reduce-stop_2017-05-24-20-22.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "office-ui-fabric-react", - "comment": "Fixes bug where ResizeGroup gets stuck in an infinite render loop when subsequent calls to onReduceData does nothing.", - "type": "patch" - } - ], - "email": "chrisgo@microsoft.com" -} \ No newline at end of file diff --git a/common/changes/resize-group-tests_2017-05-23-18-22.json b/common/changes/resize-group-tests_2017-05-23-18-22.json deleted file mode 100644 index 6373739452e8e..0000000000000 --- a/common/changes/resize-group-tests_2017-05-23-18-22.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "changes": [ - { - "comment": "Add unit tests to ResizeGroup", - "packageName": "office-ui-fabric-react", - "type": "patch" - }, - { - "packageName": "@uifabric/utilities", - "comment": "Add utlities for unit tests that need to override or spy on React lifecycle methods", - "type": "patch" - }, - { - "comment": "", - "packageName": "@uifabric/styling", - "type": "none" - }, - { - "comment": "", - "packageName": "@uifabric/fabric-website", - "type": "none" - }, - { - "comment": "", - "packageName": "@uifabric/example-app-base", - "type": "none" - } - ], - "email": "chrisgo@microsoft.com" -} \ No newline at end of file diff --git a/common/changes/rickyp-dropdownTitles_2017-05-23-03-10.json b/common/changes/rickyp-dropdownTitles_2017-05-23-03-10.json deleted file mode 100644 index 3d7b013c72dfa..0000000000000 --- a/common/changes/rickyp-dropdownTitles_2017-05-23-03-10.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "office-ui-fabric-react", - "comment": "Dropdown: Added title attribute for individual options.", - "type": "patch" - } - ], - "email": "rickyp@microsoft.com" -} diff --git a/common/changes/sayalis-contextMenuWidth_2017-05-23-23-07.json b/common/changes/sayalis-contextMenuWidth_2017-05-23-23-07.json deleted file mode 100644 index f30152118723e..0000000000000 --- a/common/changes/sayalis-contextMenuWidth_2017-05-23-23-07.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "changes": [ - { - "packageName": "office-ui-fabric-react", - "comment": "ContextMenu: added `useTargetWidth` property to match the width of the anchor element when true the context menu will apply target element's width to it", - "type": "minor" - }, - { - "comment": "", - "packageName": "@uifabric/utilities", - "type": "none" - }, - { - "comment": "", - "packageName": "@uifabric/styling", - "type": "none" - }, - { - "comment": "", - "packageName": "@uifabric/fabric-website", - "type": "none" - }, - { - "comment": "", - "packageName": "@uifabric/example-app-base", - "type": "none" - } - ], - "email": "sayalis@microsoft.com" -} \ No newline at end of file diff --git a/common/changes/search-box-onblur_2017-05-24-16-13.json b/common/changes/search-box-onblur_2017-05-24-16-13.json deleted file mode 100644 index 467e99375bbfb..0000000000000 --- a/common/changes/search-box-onblur_2017-05-24-16-13.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "office-ui-fabric-react", - "comment": "SearchBox: Fixed onBlur not removing focus", - "type": "patch" - } - ], - "email": "micahgodbolt@gmail.com" -} \ No newline at end of file diff --git a/common/changes/spinner-accessiblity_2017-05-02-18-52.json b/common/changes/spinner-accessiblity_2017-05-02-18-52.json deleted file mode 100644 index e89b96422c15a..0000000000000 --- a/common/changes/spinner-accessiblity_2017-05-02-18-52.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "office-ui-fabric-react", - "comment": "Spinner: support for status announcement", - "type": "minor" - } - ], - "email": "manishda@microsoft.com" -} \ No newline at end of file diff --git a/packages/example-app-base/package.json b/packages/example-app-base/package.json index f1f9811410ede..53c0a246b13f6 100644 --- a/packages/example-app-base/package.json +++ b/packages/example-app-base/package.json @@ -40,7 +40,7 @@ "react-dom": "^0.14 || ^15.0.1-0 || ^16.0.0-0" }, "dependencies": { - "@uifabric/utilities": "1.10.0", + "@uifabric/utilities": "1.10.1", "highlight.js": "^9.9.0", "office-ui-fabric-core": ">=5.0.0 <6.0.0", "office-ui-fabric-react": ">=2.11.0-0 <3.0.0-0" diff --git a/packages/example-component/package.json b/packages/example-component/package.json index 0172eb4cf8c72..14641f0252990 100644 --- a/packages/example-component/package.json +++ b/packages/example-component/package.json @@ -22,7 +22,7 @@ "@types/react-dom": "^15.5.0", "@types/webpack-env": "^1.13.0", "@uifabric/example-app-base": "1.3.13", - "@uifabric/utilities": "1.10.0", + "@uifabric/utilities": "1.10.1", "autoprefixer": "^6.7.6", "chai": "^3.5.0", "css-loader": "^0.28.0", @@ -30,7 +30,7 @@ "mocha": "^3.2.0", "mocha-loader": "^1.1.1", "node-sass": "^4.5.0", - "office-ui-fabric-react": ">=2.32.0 <3.0.0", + "office-ui-fabric-react": ">=2.33.0 <3.0.0", "office-ui-fabric-react-tslint": ">=1.0.0 <2.0.0", "postcss-loader": "^1.3.3", "react": "^15.4.2", diff --git a/packages/office-ui-fabric-react/CHANGELOG.json b/packages/office-ui-fabric-react/CHANGELOG.json index 092c3f72156f6..6245e06cb2b7a 100644 --- a/packages/office-ui-fabric-react/CHANGELOG.json +++ b/packages/office-ui-fabric-react/CHANGELOG.json @@ -1,6 +1,57 @@ { "name": "office-ui-fabric-react", "entries": [ + { + "version": "2.33.0", + "tag": "office-ui-fabric-react_v2.33.0", + "date": "Wed, 24 May 2017 23:52:09 GMT", + "comments": { + "minor": [ + { + "author": "Micah Godbolt ", + "commit": "14426398ce6c2241ba0ee27b869283d1f7cd02b5", + "comment": "ChoiceGroup: Support custom option labels" + }, + { + "author": "SayaliS ", + "commit": "7f0384f5070942f876f50d19dd3ac11c7bc14664", + "comment": "ContextMenu: added `useTargetWidth` property to match the width of the anchor element when true the context menu will apply target element's width to it" + }, + { + "author": "Manish Dahamiwal ", + "commit": "e3ec718f6e6f9794dcd90651a64021f62655b0c0", + "comment": "Spinner: support for status announcement" + } + ], + "patch": [ + { + "author": "Christian Gonzalez ", + "commit": "352ed68433ce19f2bfd99a4512fc2e98984d7d16", + "comment": "Fixes bug where ResizeGroup gets stuck in an infinite render loop when subsequent calls to onReduceData does nothing." + }, + { + "author": "Christian Gonzalez ", + "commit": "1020ec60dd7d0461fc945a2b2a87c6cbb0e07db9", + "comment": "Add unit tests to ResizeGroup" + }, + { + "author": "Ricky Patel ", + "commit": "ebc3d673685896357b556bddcd352b607e929a78", + "comment": "Dropdown: Added title attribute for individual options." + }, + { + "author": "Micah Godbolt ", + "commit": "2c49eca4b9842b22dbbda47817edd571206fd2a9", + "comment": "SearchBox: Fixed onBlur not removing focus" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@uifabric/utilities\" from `>=1.10.0 <2.0.0` to `>=1.10.0 <2.0.0`" + } + ] + } + }, { "version": "2.32.0", "tag": "office-ui-fabric-react_v2.32.0", diff --git a/packages/office-ui-fabric-react/CHANGELOG.md b/packages/office-ui-fabric-react/CHANGELOG.md index 61901cb6dc781..fda419798d1f6 100644 --- a/packages/office-ui-fabric-react/CHANGELOG.md +++ b/packages/office-ui-fabric-react/CHANGELOG.md @@ -1,6 +1,22 @@ # Change Log - office-ui-fabric-react -This log was last generated on Tue, 23 May 2017 10:16:04 GMT and should not be manually modified. +This log was last generated on Wed, 24 May 2017 23:52:09 GMT and should not be manually modified. + +## 2.33.0 +Wed, 24 May 2017 23:52:09 GMT + +### Minor changes + +- ChoiceGroup: Support custom option labels +- ContextMenu: added `useTargetWidth` property to match the width of the anchor element when true the context menu will apply target element's width to it +- Spinner: support for status announcement + +### Patches + +- Fixes bug where ResizeGroup gets stuck in an infinite render loop when subsequent calls to onReduceData does nothing. +- Add unit tests to ResizeGroup +- Dropdown: Added title attribute for individual options. +- SearchBox: Fixed onBlur not removing focus ## 2.32.0 Tue, 23 May 2017 10:16:04 GMT diff --git a/packages/office-ui-fabric-react/package.json b/packages/office-ui-fabric-react/package.json index ee06e037d86ec..1c124895f59e5 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": "2.32.0", + "version": "2.33.0", "description": "Reusable React components for building experiences for Office 365.", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/utilities/CHANGELOG.json b/packages/utilities/CHANGELOG.json index f3a376139d574..e47549b41ee02 100644 --- a/packages/utilities/CHANGELOG.json +++ b/packages/utilities/CHANGELOG.json @@ -1,6 +1,20 @@ { "name": "@uifabric/utilities", "entries": [ + { + "version": "1.10.1", + "tag": "@uifabric/utilities_v1.10.1", + "date": "Wed, 24 May 2017 23:52:09 GMT", + "comments": { + "patch": [ + { + "author": "Christian Gonzalez ", + "commit": "1020ec60dd7d0461fc945a2b2a87c6cbb0e07db9", + "comment": "Add utlities for unit tests that need to override or spy on React lifecycle methods" + } + ] + } + }, { "version": "1.10.0", "tag": "@uifabric/utilities_v1.10.0", diff --git a/packages/utilities/CHANGELOG.md b/packages/utilities/CHANGELOG.md index 1ca8fc8fffca2..b163ae25bad18 100644 --- a/packages/utilities/CHANGELOG.md +++ b/packages/utilities/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @uifabric/utilities -This log was last generated on Tue, 23 May 2017 10:16:04 GMT and should not be manually modified. +This log was last generated on Wed, 24 May 2017 23:52:09 GMT and should not be manually modified. + +## 1.10.1 +Wed, 24 May 2017 23:52:09 GMT + +### Patches + +- Add utlities for unit tests that need to override or spy on React lifecycle methods ## 1.10.0 Tue, 23 May 2017 10:16:04 GMT diff --git a/packages/utilities/package.json b/packages/utilities/package.json index 455f2eb8e243a..e1f051df2063f 100644 --- a/packages/utilities/package.json +++ b/packages/utilities/package.json @@ -1,6 +1,6 @@ { "name": "@uifabric/utilities", - "version": "1.10.0", + "version": "1.10.1", "description": "Office UI Fabric utilities for building React components.", "main": "lib/index.js", "typings": "lib/index.d.ts", From 272be626dfe813ffea34de30abd79d1d887d0854 Mon Sep 17 00:00:00 2001 From: David Zearing Date: Wed, 24 May 2017 17:04:40 -0700 Subject: [PATCH 0007/1641] typings updates. (#1861) --- apps/test-bundle-button/package.json | 5 +- apps/todo-app/package.json | 4 +- common/npm-shrinkwrap.json | 84 +++++++++---------- .../rush-example-app-base/package.json | 4 +- .../rush-example-component/package.json | 4 +- .../rush-office-ui-fabric-react/package.json | 4 +- common/temp_modules/rush-styling/package.json | 4 +- .../rush-test-bundle-button/package.json | 5 +- .../temp_modules/rush-todo-app/package.json | 4 +- .../temp_modules/rush-utilities/package.json | 4 +- packages/example-app-base/package.json | 4 +- packages/example-component/package.json | 4 +- packages/office-ui-fabric-react/package.json | 4 +- .../src/components/pickers/BasePicker.tsx | 2 +- packages/styling/package.json | 4 +- packages/utilities/package.json | 4 +- packages/utilities/src/BaseComponent.test.tsx | 4 +- 17 files changed, 75 insertions(+), 73 deletions(-) diff --git a/apps/test-bundle-button/package.json b/apps/test-bundle-button/package.json index 2460ed3e3b2d4..2588c02bd350c 100644 --- a/apps/test-bundle-button/package.json +++ b/apps/test-bundle-button/package.json @@ -16,8 +16,9 @@ }, "devDependencies": { "@microsoft/web-library-build": ">=3.0.0-0 <4.0.0-0", - "@types/react": "^15.0.16", - "@types/react-dom": "^0.14.23", + "@types/react": "^15.0.25", + "@types/react-addons-test-utils": "^0.14.18", + "@types/react-dom": "^15.5.0", "@types/webpack-env": "^1.13.0", "source-map-loader": "^0.2.1", "ts-loader": "^2.0.1", diff --git a/apps/todo-app/package.json b/apps/todo-app/package.json index a51fa1df58a71..209a1c44cce89 100644 --- a/apps/todo-app/package.json +++ b/apps/todo-app/package.json @@ -14,8 +14,8 @@ "@types/enzyme": "^2.7.5", "@types/es6-promise": "^0.0.32", "@types/mocha": "^2.2.39", - "@types/react": "^15.0.16", - "@types/react-addons-test-utils": "^0.14.17", + "@types/react": "^15.0.25", + "@types/react-addons-test-utils": "^0.14.18", "@types/react-dom": "^15.5.0", "@types/webpack-env": "^1.13.0", "react-addons-test-utils": "^15.4.2" diff --git a/common/npm-shrinkwrap.json b/common/npm-shrinkwrap.json index 44e340f78cbe7..3806fc22904b6 100644 --- a/common/npm-shrinkwrap.json +++ b/common/npm-shrinkwrap.json @@ -8,9 +8,9 @@ "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-2.0.6.tgz" }, "@microsoft/gulp-core-build": { - "version": "2.5.1", + "version": "2.5.3", "from": "@microsoft/gulp-core-build@>=2.5.0 <3.0.0", - "resolved": "https://registry.npmjs.org/@microsoft/gulp-core-build/-/gulp-core-build-2.5.1.tgz", + "resolved": "https://registry.npmjs.org/@microsoft/gulp-core-build/-/gulp-core-build-2.5.3.tgz", "dependencies": { "@types/chai": { "version": "3.4.34", @@ -838,13 +838,13 @@ "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz" }, "@types/react": { - "version": "15.0.24", - "from": "@types/react@>=15.0.16 <16.0.0", - "resolved": "https://registry.npmjs.org/@types/react/-/react-15.0.24.tgz" + "version": "15.0.25", + "from": "@types/react@>=15.0.25 <16.0.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-15.0.25.tgz" }, "@types/react-addons-test-utils": { "version": "0.14.18", - "from": "@types/react-addons-test-utils@>=0.14.17 <0.15.0", + "from": "@types/react-addons-test-utils@>=0.14.18 <0.15.0", "resolved": "https://registry.npmjs.org/@types/react-addons-test-utils/-/react-addons-test-utils-0.14.18.tgz" }, "@types/react-dom": { @@ -963,9 +963,9 @@ "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", "dependencies": { "acorn": { - "version": "4.0.11", + "version": "4.0.13", "from": "acorn@>=4.0.3 <5.0.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.11.tgz" + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz" } } }, @@ -2337,15 +2337,20 @@ "from": "detect-file@>=0.1.0 <0.2.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-0.1.0.tgz" }, + "detect-node": { + "version": "2.0.3", + "from": "detect-node@>=2.0.3 <3.0.0", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz" + }, "detective": { "version": "4.5.0", "from": "detective@>=4.3.1 <5.0.0", "resolved": "https://registry.npmjs.org/detective/-/detective-4.5.0.tgz", "dependencies": { "acorn": { - "version": "4.0.11", + "version": "4.0.13", "from": "acorn@>=4.0.3 <5.0.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.11.tgz" + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz" } } }, @@ -5661,7 +5666,7 @@ }, "nan": { "version": "2.6.2", - "from": "nan@>=2.3.2 <3.0.0", + "from": "nan@>=2.3.0 <3.0.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz" }, "native-promise-only": { @@ -6981,13 +6986,13 @@ }, "rush-example-app-base": { "version": "0.0.0", - "from": "temp_modules\\rush-example-app-base", - "resolved": "file:temp_modules\\rush-example-app-base" + "from": "temp_modules/rush-example-app-base", + "resolved": "file:temp_modules/rush-example-app-base" }, "rush-example-component": { "version": "0.0.0", - "from": "temp_modules\\rush-example-component", - "resolved": "file:temp_modules\\rush-example-component", + "from": "temp_modules/rush-example-component", + "resolved": "file:temp_modules/rush-example-component", "dependencies": { "acorn": { "version": "5.0.3", @@ -7110,13 +7115,13 @@ }, "rush-fabric-website": { "version": "0.0.0", - "from": "temp_modules\\rush-fabric-website", - "resolved": "file:temp_modules\\rush-fabric-website" + "from": "temp_modules/rush-fabric-website", + "resolved": "file:temp_modules/rush-fabric-website" }, "rush-office-ui-fabric-react": { "version": "0.0.0", - "from": "temp_modules\\rush-office-ui-fabric-react", - "resolved": "file:temp_modules\\rush-office-ui-fabric-react", + "from": "temp_modules/rush-office-ui-fabric-react", + "resolved": "file:temp_modules/rush-office-ui-fabric-react", "dependencies": { "acorn": { "version": "5.0.3", @@ -7279,8 +7284,8 @@ }, "rush-office-ui-fabric-react-tslint": { "version": "0.0.0", - "from": "temp_modules\\rush-office-ui-fabric-react-tslint", - "resolved": "file:temp_modules\\rush-office-ui-fabric-react-tslint", + "from": "temp_modules/rush-office-ui-fabric-react-tslint", + "resolved": "file:temp_modules/rush-office-ui-fabric-react-tslint", "dependencies": { "@microsoft/api-extractor": { "version": "1.1.19", @@ -7306,8 +7311,8 @@ }, "rush-ssr-tests": { "version": "0.0.0", - "from": "temp_modules\\rush-ssr-tests", - "resolved": "file:temp_modules\\rush-ssr-tests", + "from": "temp_modules/rush-ssr-tests", + "resolved": "file:temp_modules/rush-ssr-tests", "dependencies": { "acorn": { "version": "5.0.3", @@ -7420,8 +7425,8 @@ }, "rush-styling": { "version": "0.0.0", - "from": "temp_modules\\rush-styling", - "resolved": "file:temp_modules\\rush-styling", + "from": "temp_modules/rush-styling", + "resolved": "file:temp_modules/rush-styling", "dependencies": { "acorn": { "version": "5.0.3", @@ -7534,25 +7539,18 @@ }, "rush-test-bundle-button": { "version": "0.0.0", - "from": "temp_modules\\rush-test-bundle-button", - "resolved": "file:temp_modules\\rush-test-bundle-button", - "dependencies": { - "@types/react-dom": { - "version": "0.14.23", - "from": "@types/react-dom@>=0.14.23 <0.15.0", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-0.14.23.tgz" - } - } + "from": "temp_modules/rush-test-bundle-button", + "resolved": "file:temp_modules/rush-test-bundle-button" }, "rush-todo-app": { "version": "0.0.0", - "from": "temp_modules\\rush-todo-app", - "resolved": "file:temp_modules\\rush-todo-app" + "from": "temp_modules/rush-todo-app", + "resolved": "file:temp_modules/rush-todo-app" }, "rush-utilities": { "version": "0.0.0", - "from": "temp_modules\\rush-utilities", - "resolved": "file:temp_modules\\rush-utilities", + "from": "temp_modules/rush-utilities", + "resolved": "file:temp_modules/rush-utilities", "dependencies": { "diff": { "version": "3.2.0", @@ -8035,9 +8033,9 @@ } }, "spdy-transport": { - "version": "2.0.19", + "version": "2.0.20", "from": "spdy-transport@>=2.0.18 <3.0.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.0.19.tgz", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.0.20.tgz", "dependencies": { "debug": { "version": "2.6.8", @@ -8967,9 +8965,9 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-2.2.1.tgz", "dependencies": { "acorn": { - "version": "4.0.11", + "version": "4.0.13", "from": "acorn@>=4.0.4 <5.0.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.11.tgz" + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz" }, "async": { "version": "2.4.1", @@ -9548,4 +9546,4 @@ "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-3.17.0.tgz" } } -} +} \ No newline at end of file diff --git a/common/temp_modules/rush-example-app-base/package.json b/common/temp_modules/rush-example-app-base/package.json index 4de6307a2a61c..9ef1253d50895 100644 --- a/common/temp_modules/rush-example-app-base/package.json +++ b/common/temp_modules/rush-example-app-base/package.json @@ -8,8 +8,8 @@ "@types/enzyme": "^2.7.5", "@types/es6-promise": "^0.0.32", "@types/mocha": "^2.2.39", - "@types/react": "^15.0.16", - "@types/react-addons-test-utils": "^0.14.17", + "@types/react": "^15.0.25", + "@types/react-addons-test-utils": "^0.14.18", "@types/react-dom": "^15.5.0", "@types/webpack-env": "^1.13.0", "enzyme": "^2.7.0", diff --git a/common/temp_modules/rush-example-component/package.json b/common/temp_modules/rush-example-component/package.json index 19869311d1ea3..bb0a839a62de0 100644 --- a/common/temp_modules/rush-example-component/package.json +++ b/common/temp_modules/rush-example-component/package.json @@ -9,8 +9,8 @@ "@types/enzyme": "^2.7.5", "@types/es6-promise": "^0.0.32", "@types/mocha": "^2.2.39", - "@types/react": "^15.0.16", - "@types/react-addons-test-utils": "^0.14.17", + "@types/react": "^15.0.25", + "@types/react-addons-test-utils": "^0.14.18", "@types/react-dom": "^15.5.0", "@types/webpack-env": "^1.13.0", "autoprefixer": "^6.7.6", diff --git a/common/temp_modules/rush-office-ui-fabric-react/package.json b/common/temp_modules/rush-office-ui-fabric-react/package.json index c866a4331b5be..ec9e889766177 100644 --- a/common/temp_modules/rush-office-ui-fabric-react/package.json +++ b/common/temp_modules/rush-office-ui-fabric-react/package.json @@ -9,8 +9,8 @@ "@types/enzyme": "^2.7.5", "@types/es6-promise": "^0.0.32", "@types/mocha": "^2.2.39", - "@types/react": "^15.0.16", - "@types/react-addons-test-utils": "^0.14.17", + "@types/react": "^15.0.25", + "@types/react-addons-test-utils": "^0.14.18", "@types/react-dom": "^15.5.0", "@types/resemblejs": "~1.3.28", "@types/sinon": "^2.1.3", diff --git a/common/temp_modules/rush-styling/package.json b/common/temp_modules/rush-styling/package.json index b16a180eb529f..98c4f4f1bb333 100644 --- a/common/temp_modules/rush-styling/package.json +++ b/common/temp_modules/rush-styling/package.json @@ -9,8 +9,8 @@ "@types/chai": "^3.4.35", "@types/enzyme": "^2.7.5", "@types/mocha": "^2.2.39", - "@types/react": "^15.0.16", - "@types/react-addons-test-utils": "^0.14.17", + "@types/react": "^15.0.25", + "@types/react-addons-test-utils": "^0.14.18", "@types/react-dom": "^15.5.0", "@types/webpack-env": "^1.13.0", "@uifabric/example-app-base": ">=1.3.12 <2.0.0", diff --git a/common/temp_modules/rush-test-bundle-button/package.json b/common/temp_modules/rush-test-bundle-button/package.json index 130c4e159491a..f050db2007bdf 100644 --- a/common/temp_modules/rush-test-bundle-button/package.json +++ b/common/temp_modules/rush-test-bundle-button/package.json @@ -4,8 +4,9 @@ "private": true, "dependencies": { "@microsoft/web-library-build": ">=3.0.0-0 <4.0.0-0", - "@types/react": "^15.0.16", - "@types/react-dom": "^0.14.23", + "@types/react": "^15.0.25", + "@types/react-addons-test-utils": "^0.14.18", + "@types/react-dom": "^15.5.0", "@types/webpack-env": "^1.13.0", "source-map-loader": "^0.2.1", "ts-loader": "^2.0.1", diff --git a/common/temp_modules/rush-todo-app/package.json b/common/temp_modules/rush-todo-app/package.json index 2a40884c4866c..094ca87f26399 100644 --- a/common/temp_modules/rush-todo-app/package.json +++ b/common/temp_modules/rush-todo-app/package.json @@ -8,8 +8,8 @@ "@types/enzyme": "^2.7.5", "@types/es6-promise": "^0.0.32", "@types/mocha": "^2.2.39", - "@types/react": "^15.0.16", - "@types/react-addons-test-utils": "^0.14.17", + "@types/react": "^15.0.25", + "@types/react-addons-test-utils": "^0.14.18", "@types/react-dom": "^15.5.0", "@types/webpack-env": "^1.13.0", "react-addons-test-utils": "^15.4.2", diff --git a/common/temp_modules/rush-utilities/package.json b/common/temp_modules/rush-utilities/package.json index 4ceed5eb05d12..ab90684968691 100644 --- a/common/temp_modules/rush-utilities/package.json +++ b/common/temp_modules/rush-utilities/package.json @@ -8,8 +8,8 @@ "@types/enzyme": "^2.7.5", "@types/es6-promise": "^0.0.32", "@types/mocha": "^2.2.39", - "@types/react": "^15.0.16", - "@types/react-addons-test-utils": "^0.14.17", + "@types/react": "^15.0.25", + "@types/react-addons-test-utils": "^0.14.18", "@types/react-dom": "^15.5.0", "@types/sinon": "^2.1.3", "@types/webpack-env": "^1.13.0", diff --git a/packages/example-app-base/package.json b/packages/example-app-base/package.json index 53c0a246b13f6..e4162c59e7de1 100644 --- a/packages/example-app-base/package.json +++ b/packages/example-app-base/package.json @@ -20,8 +20,8 @@ "@types/enzyme": "^2.7.5", "@types/es6-promise": "^0.0.32", "@types/mocha": "^2.2.39", - "@types/react": "^15.0.16", - "@types/react-addons-test-utils": "^0.14.17", + "@types/react": "^15.0.25", + "@types/react-addons-test-utils": "^0.14.18", "@types/react-dom": "^15.5.0", "@types/webpack-env": "^1.13.0", "enzyme": "^2.7.0", diff --git a/packages/example-component/package.json b/packages/example-component/package.json index 14641f0252990..e6e85cc0bf842 100644 --- a/packages/example-component/package.json +++ b/packages/example-component/package.json @@ -17,8 +17,8 @@ "@types/enzyme": "^2.7.5", "@types/es6-promise": "^0.0.32", "@types/mocha": "^2.2.39", - "@types/react": "^15.0.16", - "@types/react-addons-test-utils": "^0.14.17", + "@types/react": "^15.0.25", + "@types/react-addons-test-utils": "^0.14.18", "@types/react-dom": "^15.5.0", "@types/webpack-env": "^1.13.0", "@uifabric/example-app-base": "1.3.13", diff --git a/packages/office-ui-fabric-react/package.json b/packages/office-ui-fabric-react/package.json index 1c124895f59e5..1b92cd3eb4d70 100644 --- a/packages/office-ui-fabric-react/package.json +++ b/packages/office-ui-fabric-react/package.json @@ -22,8 +22,8 @@ "@types/enzyme": "^2.7.5", "@types/es6-promise": "^0.0.32", "@types/mocha": "^2.2.39", - "@types/react": "^15.0.16", - "@types/react-addons-test-utils": "^0.14.17", + "@types/react": "^15.0.25", + "@types/react-addons-test-utils": "^0.14.18", "@types/react-dom": "^15.5.0", "@types/resemblejs": "~1.3.28", "@types/sinon": "^2.1.3", diff --git a/packages/office-ui-fabric-react/src/components/pickers/BasePicker.tsx b/packages/office-ui-fabric-react/src/components/pickers/BasePicker.tsx index fdbc1784e4677..0ba922a01f667 100644 --- a/packages/office-ui-fabric-react/src/components/pickers/BasePicker.tsx +++ b/packages/office-ui-fabric-react/src/components/pickers/BasePicker.tsx @@ -59,7 +59,7 @@ export class BasePicker> extends BaseComponent< return this.state.items; } - public componentWillUpdate(newProps: IBasePickerProps, newState: IBasePickerState) { + public componentWillUpdate(newProps: P, newState: IBasePickerState) { if (newState.items && newState.items !== this.state.items) { this.selection.setItems(newState.items); } diff --git a/packages/styling/package.json b/packages/styling/package.json index 49c465860a3f4..e3c38afc43bfb 100644 --- a/packages/styling/package.json +++ b/packages/styling/package.json @@ -16,8 +16,8 @@ "@types/chai": "^3.4.35", "@types/enzyme": "^2.7.5", "@types/mocha": "^2.2.39", - "@types/react": "^15.0.16", - "@types/react-addons-test-utils": "^0.14.17", + "@types/react": "^15.0.25", + "@types/react-addons-test-utils": "^0.14.18", "@types/react-dom": "^15.5.0", "@types/webpack-env": "^1.13.0", "@uifabric/example-app-base": ">=1.3.12 <2.0.0", diff --git a/packages/utilities/package.json b/packages/utilities/package.json index e1f051df2063f..19e10ee08aceb 100644 --- a/packages/utilities/package.json +++ b/packages/utilities/package.json @@ -21,8 +21,8 @@ "@types/enzyme": "^2.7.5", "@types/es6-promise": "^0.0.32", "@types/mocha": "^2.2.39", - "@types/react": "^15.0.16", - "@types/react-addons-test-utils": "^0.14.17", + "@types/react": "^15.0.25", + "@types/react-addons-test-utils": "^0.14.18", "@types/react-dom": "^15.5.0", "@types/sinon": "^2.1.3", "@types/webpack-env": "^1.13.0", diff --git a/packages/utilities/src/BaseComponent.test.tsx b/packages/utilities/src/BaseComponent.test.tsx index 7d7c1613aa974..a2f13026430c2 100644 --- a/packages/utilities/src/BaseComponent.test.tsx +++ b/packages/utilities/src/BaseComponent.test.tsx @@ -19,8 +19,10 @@ class TestComponent extends BaseComponent<{}, {}> { this._createNullRef(); } - public shouldComponentUpdate(): void { + public shouldComponentUpdate(nextProps?: {}, nextState?: {}): boolean { this._createNullRef(); + + return true; } public componentWillUpdate(): void { From 711ff29129624405d7cdd3b4d336d354d8e6751e Mon Sep 17 00:00:00 2001 From: OneDrive Build Date: Thu, 25 May 2017 03:22:10 -0700 Subject: [PATCH 0008/1641] Applying package updates. --- apps/fabric-website/package.json | 2 +- apps/ssr-tests/package.json | 2 +- apps/test-bundle-button/package.json | 2 +- apps/todo-app/package.json | 2 +- common/changes/calendar-a11y_2017-05-18-18-52.json | 10 ---------- packages/example-component/package.json | 2 +- packages/office-ui-fabric-react/CHANGELOG.json | 14 ++++++++++++++ packages/office-ui-fabric-react/CHANGELOG.md | 9 ++++++++- packages/office-ui-fabric-react/package.json | 2 +- 9 files changed, 28 insertions(+), 17 deletions(-) delete mode 100644 common/changes/calendar-a11y_2017-05-18-18-52.json diff --git a/apps/fabric-website/package.json b/apps/fabric-website/package.json index 44baae774f87f..ad6350d2441ab 100644 --- a/apps/fabric-website/package.json +++ b/apps/fabric-website/package.json @@ -52,7 +52,7 @@ "json-loader": "^0.5.4", "load-themed-styles": "^1.1.0", "office-ui-fabric-core": ">=5.1.0 <6.0.0", - "office-ui-fabric-react": ">=2.33.0 <3.0.0", + "office-ui-fabric-react": ">=2.34.0 <3.0.0", "@uifabric/utilities": ">=1.10.0 <2.0.0" } } \ No newline at end of file diff --git a/apps/ssr-tests/package.json b/apps/ssr-tests/package.json index 0ba025a1edb7b..8b730d3e9f05f 100644 --- a/apps/ssr-tests/package.json +++ b/apps/ssr-tests/package.json @@ -25,7 +25,7 @@ "@types/mocha": "^2.2.39", "@types/webpack-env": "^1.13.0", "mocha": "~3.3.0", - "office-ui-fabric-react": ">=2.33.0 <3.0.0", + "office-ui-fabric-react": ">=2.34.0 <3.0.0", "raw-loader": "^0.5.1", "react": "^15.4.2", "react-addons-test-utils": "^15.4.2", diff --git a/apps/test-bundle-button/package.json b/apps/test-bundle-button/package.json index 2588c02bd350c..b89203fdf9363 100644 --- a/apps/test-bundle-button/package.json +++ b/apps/test-bundle-button/package.json @@ -30,6 +30,6 @@ "dependencies": { "react": "^0.14 || ^15.0.1-0 || ^16.0.0-0", "react-dom": "^0.14 || ^15.0.1-0 || ^16.0.0-0", - "office-ui-fabric-react": ">=2.33.0 <3.0.0" + "office-ui-fabric-react": ">=2.34.0 <3.0.0" } } \ No newline at end of file diff --git a/apps/todo-app/package.json b/apps/todo-app/package.json index 209a1c44cce89..ca3164e66e95c 100644 --- a/apps/todo-app/package.json +++ b/apps/todo-app/package.json @@ -25,7 +25,7 @@ "es6-promise": "^4.1.0", "immutability-helper": "^2.0.0", "office-ui-fabric-core": ">=5.1.0 <6.0.0", - "office-ui-fabric-react": ">=2.33.0 <3.0.0", + "office-ui-fabric-react": ">=2.34.0 <3.0.0", "react": "^15.4.2", "react-dom": "^15.4.2", "typescript": "2.2.2" diff --git a/common/changes/calendar-a11y_2017-05-18-18-52.json b/common/changes/calendar-a11y_2017-05-18-18-52.json deleted file mode 100644 index bb9ed312eaf01..0000000000000 --- a/common/changes/calendar-a11y_2017-05-18-18-52.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "office-ui-fabric-react", - "comment": "DatePicker: Fix for accessibility issues", - "type": "minor" - } - ], - "email": "manishda@microsoft.com" -} \ No newline at end of file diff --git a/packages/example-component/package.json b/packages/example-component/package.json index e6e85cc0bf842..f01e1ba69c6aa 100644 --- a/packages/example-component/package.json +++ b/packages/example-component/package.json @@ -30,7 +30,7 @@ "mocha": "^3.2.0", "mocha-loader": "^1.1.1", "node-sass": "^4.5.0", - "office-ui-fabric-react": ">=2.33.0 <3.0.0", + "office-ui-fabric-react": ">=2.34.0 <3.0.0", "office-ui-fabric-react-tslint": ">=1.0.0 <2.0.0", "postcss-loader": "^1.3.3", "react": "^15.4.2", diff --git a/packages/office-ui-fabric-react/CHANGELOG.json b/packages/office-ui-fabric-react/CHANGELOG.json index 6245e06cb2b7a..7e8f9ab1dcef5 100644 --- a/packages/office-ui-fabric-react/CHANGELOG.json +++ b/packages/office-ui-fabric-react/CHANGELOG.json @@ -1,6 +1,20 @@ { "name": "office-ui-fabric-react", "entries": [ + { + "version": "2.34.0", + "tag": "office-ui-fabric-react_v2.34.0", + "date": "Thu, 25 May 2017 10:22:10 GMT", + "comments": { + "minor": [ + { + "author": "Manish Dahamiwal ", + "commit": "6e3128dc62ea0bda625896939405d1fbc4d2d640", + "comment": "DatePicker: Fix for accessibility issues" + } + ] + } + }, { "version": "2.33.0", "tag": "office-ui-fabric-react_v2.33.0", diff --git a/packages/office-ui-fabric-react/CHANGELOG.md b/packages/office-ui-fabric-react/CHANGELOG.md index fda419798d1f6..1ec34f44cd4af 100644 --- a/packages/office-ui-fabric-react/CHANGELOG.md +++ b/packages/office-ui-fabric-react/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - office-ui-fabric-react -This log was last generated on Wed, 24 May 2017 23:52:09 GMT and should not be manually modified. +This log was last generated on Thu, 25 May 2017 10:22:10 GMT and should not be manually modified. + +## 2.34.0 +Thu, 25 May 2017 10:22:10 GMT + +### Minor changes + +- DatePicker: Fix for accessibility issues ## 2.33.0 Wed, 24 May 2017 23:52:09 GMT diff --git a/packages/office-ui-fabric-react/package.json b/packages/office-ui-fabric-react/package.json index 1b92cd3eb4d70..7bdcf6d55a383 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": "2.33.0", + "version": "2.34.0", "description": "Reusable React components for building experiences for Office 365.", "main": "lib/index.js", "typings": "lib/index.d.ts", From 01ecef38e4999f165c0c558a6eef996604777a53 Mon Sep 17 00:00:00 2001 From: Micah Godbolt Date: Thu, 25 May 2017 10:15:32 -0700 Subject: [PATCH 0009/1641] Updated pull request template to use npm run change (#1860) * Updated pull request template to use npm run change * Update PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 88fb78faa62ce..de4a9e97d8393 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,7 +1,7 @@ #### Pull request checklist - [ ] Addresses an existing issue: Fixes #0000 -- [ ] Include a change request file if publishing +- [ ] Include a change request file using `$ npm run change` - [ ] New feature, bugfix, or enhancement - [ ] Includes tests - [ ] Documentation update @@ -13,19 +13,3 @@ #### Focus areas to test (optional) - - From f3b5400c99c8c441ba776f9d4cf62367a51ec961 Mon Sep 17 00:00:00 2001 From: Micah Godbolt Date: Thu, 25 May 2017 10:18:14 -0700 Subject: [PATCH 0010/1641] Update PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index de4a9e97d8393..96596ef25f373 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,9 +2,6 @@ - [ ] Addresses an existing issue: Fixes #0000 - [ ] Include a change request file using `$ npm run change` -- [ ] New feature, bugfix, or enhancement - - [ ] Includes tests -- [ ] Documentation update #### Description of changes From a564ac9adcc0b2fdbcdf00ac97b797e81ab4ebbe Mon Sep 17 00:00:00 2001 From: Kristian Halle Date: Thu, 25 May 2017 20:43:34 +0200 Subject: [PATCH 0011/1641] Update to logic for calculating initials (#1853) * Update to logic for calculating initials * Adding rush change file --- .../fix-initials_2017-05-24-20-35.json | 15 ++++ .../src/components/Persona/Persona.test.tsx | 2 +- packages/utilities/src/initials.test.ts | 55 ++++++++++++-- packages/utilities/src/initials.ts | 73 +++++-------------- 4 files changed, 81 insertions(+), 64 deletions(-) create mode 100644 common/changes/fix-initials_2017-05-24-20-35.json diff --git a/common/changes/fix-initials_2017-05-24-20-35.json b/common/changes/fix-initials_2017-05-24-20-35.json new file mode 100644 index 0000000000000..cac5a0f34f48a --- /dev/null +++ b/common/changes/fix-initials_2017-05-24-20-35.json @@ -0,0 +1,15 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "Persona: Updated test to match new logic for calculating initials.", + "type": "patch" + }, + { + "packageName": "@uifabric/utilities", + "comment": "Utilities: Fixed incorrect calculation of initials. Properly remove unwanted ASCII characters, and do not calculate initials for Arabic and CJK based languages. ", + "type": "patch" + } + ], + "email": "khalle@microsoft.com" +} \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/Persona/Persona.test.tsx b/packages/office-ui-fabric-react/src/components/Persona/Persona.test.tsx index 2ace343e5f64a..2328edc3783da 100644 --- a/packages/office-ui-fabric-react/src/components/Persona/Persona.test.tsx +++ b/packages/office-ui-fabric-react/src/components/Persona/Persona.test.tsx @@ -51,7 +51,7 @@ describe('Persona', () => { wrapper = shallow(); result = wrapper.find('.' + styles.initials); expect(result).to.have.length(1); - expect(result.text()).to.equal('D'); + expect(result.text()).to.equal('DG'); }); it('calculates an expected initials in RTL if one was not specified', () => { diff --git a/packages/utilities/src/initials.test.ts b/packages/utilities/src/initials.test.ts index a5661ff8d8aab..462004f6a2c91 100644 --- a/packages/utilities/src/initials.test.ts +++ b/packages/utilities/src/initials.test.ts @@ -16,6 +16,14 @@ describe('getInitials', () => { expect(result).to.equal('KL'); }); + it('calculates an expected initials in LTR for non-ASCII characters', () => { + let result = getInitials('Írissa Þórðardóttir', false); + expect(result).to.equal('ÍÞ'); + + result = getInitials('Øyvind Åsen', false); + expect(result).to.equal('ØÅ'); + }); + it('calculates an expected initials in LTR with a hypen', () => { let result = getInitials('David Zearing-Goff', false); expect(result).to.equal('DZ'); @@ -28,7 +36,12 @@ describe('getInitials', () => { it('calculates an expected initials in LTR with parentheses', () => { let result = getInitials('David (The man) Goff', false); - expect(result).to.equal('D'); + expect(result).to.equal('DG'); + }); + + it('calculates an expected initials in LTR with multiple parentheses, extra spaces, and unwanted characters', () => { + let result = getInitials(' !@#$%^&*()=+ (Alpha) David (The man) `~<>,./?[]{}|\ Goff (Gamma) ', false); + expect(result).to.equal('DG'); }); it('calculates an expected initials in RTL if one was not specified', () => { @@ -36,30 +49,56 @@ describe('getInitials', () => { expect(result).to.equal('LK'); }); + it('calculates an expected initials in LTR for names with multiple components', () => { + let result = getInitials('A', false); + expect(result).to.equal('A'); + + result = getInitials('A B', false); + expect(result).to.equal('AB'); + + result = getInitials('A B C', false); + expect(result).to.equal('AC'); + + result = getInitials('A B C D', false); + expect(result).to.equal('A'); + }); + it('calculates an expected initials for Arabic names', () => { let result = getInitials('خسرو رحیمی', true); - expect(result).to.equal('ی'); + expect(result).to.equal(''); }); it('calculates an expected initials for Chinese names', () => { let result = getInitials('桂英', false); - expect(result).to.equal('英'); + expect(result).to.equal(''); result = getInitials('佳', false); - expect(result).to.equal('佳'); + expect(result).to.equal(''); result = getInitials('宋智洋', false); - expect(result).to.equal('智洋'); + expect(result).to.equal(''); }); it('calculates an expected initials for Korean names', () => { let result = getInitials('강현', false); - expect(result).to.equal('현'); + expect(result).to.equal(''); result = getInitials('최종래', false); - expect(result).to.equal('종래'); + expect(result).to.equal(''); result = getInitials('남궁 성종', false); - expect(result).to.equal('성종'); + expect(result).to.equal(''); + }); + + it('calculates an expected initials for Japanese names', () => { + let result = getInitials('松田', false); + expect(result).to.equal(''); + + result = getInitials('海野', false); + expect(result).to.equal(''); + + result = getInitials('かり', false); + expect(result).to.equal(''); }); + }); diff --git a/packages/utilities/src/initials.ts b/packages/utilities/src/initials.ts index 8f874ff8257c4..43f2d08283272 100644 --- a/packages/utilities/src/initials.ts +++ b/packages/utilities/src/initials.ts @@ -1,51 +1,24 @@ -/** Regex to detect words within paraenthesis in a string where gi implies global and case-insensitive. */ -const CHARS_WITHIN_PARENTHESIS_REGEX: RegExp = new RegExp('\\(([^)]*)\\)', 'gi'); - /** - * Matches any non-word characters with respect to the Unicode codepoints; generated by - * https://mothereff.in/regexpu for regex /\W /u where u stands for Unicode support (ES6 feature). - * More info here: http://stackoverflow.com/questions/280712/javascript-unicode-regexes. - * gi implies global and case-insensitive. + * Regular expression matching characters to ignore when calculating the initials. + * The first part matches characters within parenthesis, including the parenthesis. + * The second part matches special ASCII characters except space, plus some unicode special characters. */ -/* tslint:disable:max-line-length */ -const UNICODE_ALPHANUMERIC_CHARS_REGEX = - new RegExp( - '(?:[\0-/:-@\[-\^`\{-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]) ', - 'gi'); -/* tslint:enable:max-line-length */ - -/** Regex to detect multiple spaces in a string where gi implies global and case-insensitive. */ -const MULTIPLE_WHITESPACES_REGEX_TOKEN: RegExp = new RegExp('\\s+', 'gi'); - -/** Regex to detect Arabic text. */ -const ARABIC_LANGUAGE_REGEX = new RegExp('[\u0621-\u064A\u0660-\u0669]'); +const UNWANTED_CHARS_REGEX: RegExp = /\([^)]*\)|[\0-\u001F\!-/:-@\[-`\{-\u00BF\u0250-\u036F\uD800-\uFFFF]/g; -/** Regex to detect Korean text. */ -const KOREAN_LANGUAGE_REGEX = new RegExp('[\u1100-\u11FF|\u3130-\u318F|\uA960-\uA97F|\uAC00-\uD7AF|\uD7B0-\uD7FF]'); +/** Regular expression matching one or more spaces. */ +const MULTIPLE_WHITESPACES_REGEX: RegExp = /\s+/g; -/** Regex to detect Chinese text. */ +/** + * Regular expression matching languages for which we currently don't support initials. + * Arabic: Arabic, Arabic Supplement, Arabic Extended-A. + * Korean: Hangul Jamo, Hangul Compatibility Jamo, Hangul Jamo Extended-A, Hangul Syllables, Hangul Jamo Extended-B. + * Japanese: Hiragana, Katakana. + * CJK: CJK Unified Ideographs Extension A, CJK Unified Ideographs, CJK Compatibility Ideographs, CJK Unified Ideographs Extension B + */ /* tslint:disable:max-line-length */ -const CHINESE_LANGUAGE_REGEX = new RegExp('[\u4E00-\u9FCC\u3400-\u4DB5\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\ud840-\ud868][\udc00-\udfff]|\ud869[\udc00-\uded6\udf00-\udfff]|[\ud86a-\ud86c][\udc00-\udfff]|\ud86d[\udc00-\udf34\udf40-\udfff]|\ud86e[\udc00-\udc1d]'); +const UNSUPPORTED_TEXT_REGEX: RegExp = /[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\u1100-\u11FF\u3130-\u318F\uA960-\uA97F\uAC00-\uD7AF\uD7B0-\uD7FF\u3040-\u309F\u30A0-\u30FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF]|[\uD840-\uD869][\uDC00-\uDED6]/; /* tslint:enable:max-line-length */ -function getInitialsArabic(displayName: string, isRtl: boolean): string { - const name = displayName.replace(/\s/, ''); - - return isRtl ? name[name.length - 1] : name[0]; -} - -function getInitialsAsian(displayName: string, isRtl: boolean): string { - const name = displayName.replace(/\s/, ''); - - // For short names, only display a single character of the family name - if (name.length <= 2) { - return isRtl ? name[0] : name[name.length - 1]; - } - - // For long names, display the two most significant characters of the family name - return isRtl ? name.substr(0, 2) : name.substr(name.length - 2, name.length); -} - function getInitialsLatin(displayName: string, isRtl: boolean): string { let initials = ''; @@ -69,14 +42,8 @@ function getInitialsLatin(displayName: string, isRtl: boolean): string { } function cleanupDisplayName(displayName: string): string { - // Do not consider the suffixes within parenthesis while computing the initials. - displayName = displayName.replace(CHARS_WITHIN_PARENTHESIS_REGEX, ''); - - // Ignore non-word characters - displayName = displayName.replace(UNICODE_ALPHANUMERIC_CHARS_REGEX, ''); - - // Make whitespace consistent - displayName = displayName.replace(MULTIPLE_WHITESPACES_REGEX_TOKEN, ' '); + displayName = displayName.replace(UNWANTED_CHARS_REGEX, ''); + displayName = displayName.replace(MULTIPLE_WHITESPACES_REGEX, ' '); displayName = displayName.trim(); return displayName; @@ -90,12 +57,8 @@ export function getInitials(displayName: string, isRtl: boolean): string { displayName = cleanupDisplayName(displayName); - if (ARABIC_LANGUAGE_REGEX.test(displayName)) { - return getInitialsArabic(displayName, isRtl); - } - - if (KOREAN_LANGUAGE_REGEX.test(displayName) || CHINESE_LANGUAGE_REGEX.test(displayName)) { - return getInitialsAsian(displayName, isRtl); + if (UNSUPPORTED_TEXT_REGEX.test(displayName)) { + return ''; } return getInitialsLatin(displayName, isRtl); From 558e0661028df1c0dbf5430a460a1ac866187396 Mon Sep 17 00:00:00 2001 From: Meetu Agarwal Date: Fri, 26 May 2017 02:04:35 +0530 Subject: [PATCH 0012/1641] Adding className prop to datepicker . (#1852) * Update DatePicker.Props.ts adding prop to datepicker * Update DatePicker.tsx added classname to datepicker div * Update DatePicker.tsx adding classname in this.props * Update DatePicker.Props.ts good comment --- .../src/components/DatePicker/DatePicker.Props.ts | 5 +++++ .../src/components/DatePicker/DatePicker.tsx | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.Props.ts b/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.Props.ts index 45304d78c9ad3..f8e618eccc512 100644 --- a/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.Props.ts +++ b/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.Props.ts @@ -102,6 +102,11 @@ export interface IDatePickerProps extends React.Props { * @defaultvalue false */ borderless?: boolean; + + /** + * Optional Classname for datepicker root element . + */ + className?: string; } export interface IDatePickerStrings { diff --git a/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.tsx b/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.tsx index caf42139df205..d020decf3fb94 100644 --- a/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.tsx +++ b/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.tsx @@ -172,12 +172,13 @@ export class DatePicker extends BaseComponent +
this._datepicker = c }> Date: Thu, 25 May 2017 23:11:03 -0700 Subject: [PATCH 0013/1641] ResizeGroup: Debounce window resize events to improve performance (#1864) * Debounce window resize events to improve performance * Rush change * Update resizegroup-debounce_2017-05-25-17-42.json * Make the debounce happen on the leading edge so that the unit tests pass. --- .../changes/resizegroup-debounce_2017-05-25-17-42.json | 10 ++++++++++ .../src/components/ResizeGroup/ResizeGroup.tsx | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 common/changes/resizegroup-debounce_2017-05-25-17-42.json diff --git a/common/changes/resizegroup-debounce_2017-05-25-17-42.json b/common/changes/resizegroup-debounce_2017-05-25-17-42.json new file mode 100644 index 0000000000000..bf64641e6ba46 --- /dev/null +++ b/common/changes/resizegroup-debounce_2017-05-25-17-42.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "ResizeGroup: Debounce window resize events to improve performance", + "type": "patch" + } + ], + "email": "chrisgo@microsoft.com" +} diff --git a/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.tsx b/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.tsx index 64ca40b6d8e33..832097067988e 100644 --- a/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.tsx +++ b/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.tsx @@ -6,6 +6,8 @@ import { import { IResizeGroupProps } from './ResizeGroup.Props'; import styles = require('./ResizeGroup.scss'); +const RESIZE_DELAY = 16; + export interface IResizeGroupState { /** @@ -54,7 +56,7 @@ export class ResizeGroup extends BaseComponent Date: Fri, 26 May 2017 10:21:04 +0000 Subject: [PATCH 0014/1641] Applying package updates. --- apps/fabric-website/CHANGELOG.json | 18 +++++++++++++ apps/fabric-website/CHANGELOG.md | 7 ++++- apps/fabric-website/package.json | 8 +++--- apps/ssr-tests/package.json | 2 +- apps/test-bundle-button/package.json | 2 +- apps/todo-app/package.json | 2 +- .../fix-initials_2017-05-24-20-35.json | 15 ----------- ...resizegroup-debounce_2017-05-25-17-42.json | 10 ------- packages/example-app-base/CHANGELOG.json | 12 +++++++++ packages/example-app-base/CHANGELOG.md | 7 ++++- packages/example-app-base/package.json | 4 +-- packages/example-component/package.json | 8 +++--- .../office-ui-fabric-react/CHANGELOG.json | 27 +++++++++++++++++++ packages/office-ui-fabric-react/CHANGELOG.md | 10 ++++++- packages/office-ui-fabric-react/package.json | 6 ++--- packages/styling/package.json | 2 +- packages/utilities/CHANGELOG.json | 14 ++++++++++ packages/utilities/CHANGELOG.md | 9 ++++++- packages/utilities/package.json | 2 +- 19 files changed, 118 insertions(+), 47 deletions(-) delete mode 100644 common/changes/fix-initials_2017-05-24-20-35.json delete mode 100644 common/changes/resizegroup-debounce_2017-05-25-17-42.json diff --git a/apps/fabric-website/CHANGELOG.json b/apps/fabric-website/CHANGELOG.json index ac3998a25d25e..7203eac8d15cb 100644 --- a/apps/fabric-website/CHANGELOG.json +++ b/apps/fabric-website/CHANGELOG.json @@ -1,6 +1,24 @@ { "name": "@uifabric/fabric-website", "entries": [ + { + "version": "4.5.26", + "tag": "@uifabric/fabric-website_v4.5.26", + "date": "Fri, 26 May 2017 10:21:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@uifabric/example-app-base\" from `1.3.13` to `1.3.14`" + }, + { + "comment": "Updating dependency \"office-ui-fabric-react\" from `>=2.34.0 <3.0.0` to `>=2.34.1 <3.0.0`" + }, + { + "comment": "Updating dependency \"@uifabric/utilities\" from `>=1.10.0 <2.0.0` to `>=1.10.2 <2.0.0`" + } + ] + } + }, { "version": "4.5.25", "tag": "@uifabric/fabric-website_v4.5.25", diff --git a/apps/fabric-website/CHANGELOG.md b/apps/fabric-website/CHANGELOG.md index 8dba09bcbe253..04283b609bd93 100644 --- a/apps/fabric-website/CHANGELOG.md +++ b/apps/fabric-website/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @uifabric/fabric-website -This log was last generated on Tue, 23 May 2017 10:16:04 GMT and should not be manually modified. +This log was last generated on Fri, 26 May 2017 10:21:03 GMT and should not be manually modified. + +## 4.5.26 +Fri, 26 May 2017 10:21:03 GMT + +*Changes not tracked* ## 4.5.25 Tue, 23 May 2017 10:16:04 GMT diff --git a/apps/fabric-website/package.json b/apps/fabric-website/package.json index ad6350d2441ab..f8bfe1ae4b26d 100644 --- a/apps/fabric-website/package.json +++ b/apps/fabric-website/package.json @@ -1,6 +1,6 @@ { "name": "@uifabric/fabric-website", - "version": "4.5.25", + "version": "4.5.26", "description": "Reusable React components for building experiences for Office 365.", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -47,12 +47,12 @@ "webpack-bundle-analyzer": "^2.2.1" }, "dependencies": { - "@uifabric/example-app-base": "1.3.13", + "@uifabric/example-app-base": "1.3.14", "color-functions": "1.1.0", "json-loader": "^0.5.4", "load-themed-styles": "^1.1.0", "office-ui-fabric-core": ">=5.1.0 <6.0.0", - "office-ui-fabric-react": ">=2.34.0 <3.0.0", - "@uifabric/utilities": ">=1.10.0 <2.0.0" + "office-ui-fabric-react": ">=2.34.1 <3.0.0", + "@uifabric/utilities": ">=1.10.2 <2.0.0" } } \ No newline at end of file diff --git a/apps/ssr-tests/package.json b/apps/ssr-tests/package.json index 8b730d3e9f05f..fefaeca58c698 100644 --- a/apps/ssr-tests/package.json +++ b/apps/ssr-tests/package.json @@ -25,7 +25,7 @@ "@types/mocha": "^2.2.39", "@types/webpack-env": "^1.13.0", "mocha": "~3.3.0", - "office-ui-fabric-react": ">=2.34.0 <3.0.0", + "office-ui-fabric-react": ">=2.34.1 <3.0.0", "raw-loader": "^0.5.1", "react": "^15.4.2", "react-addons-test-utils": "^15.4.2", diff --git a/apps/test-bundle-button/package.json b/apps/test-bundle-button/package.json index b89203fdf9363..24eeed947e7c6 100644 --- a/apps/test-bundle-button/package.json +++ b/apps/test-bundle-button/package.json @@ -30,6 +30,6 @@ "dependencies": { "react": "^0.14 || ^15.0.1-0 || ^16.0.0-0", "react-dom": "^0.14 || ^15.0.1-0 || ^16.0.0-0", - "office-ui-fabric-react": ">=2.34.0 <3.0.0" + "office-ui-fabric-react": ">=2.34.1 <3.0.0" } } \ No newline at end of file diff --git a/apps/todo-app/package.json b/apps/todo-app/package.json index ca3164e66e95c..33ce286f303ab 100644 --- a/apps/todo-app/package.json +++ b/apps/todo-app/package.json @@ -25,7 +25,7 @@ "es6-promise": "^4.1.0", "immutability-helper": "^2.0.0", "office-ui-fabric-core": ">=5.1.0 <6.0.0", - "office-ui-fabric-react": ">=2.34.0 <3.0.0", + "office-ui-fabric-react": ">=2.34.1 <3.0.0", "react": "^15.4.2", "react-dom": "^15.4.2", "typescript": "2.2.2" diff --git a/common/changes/fix-initials_2017-05-24-20-35.json b/common/changes/fix-initials_2017-05-24-20-35.json deleted file mode 100644 index cac5a0f34f48a..0000000000000 --- a/common/changes/fix-initials_2017-05-24-20-35.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "changes": [ - { - "packageName": "office-ui-fabric-react", - "comment": "Persona: Updated test to match new logic for calculating initials.", - "type": "patch" - }, - { - "packageName": "@uifabric/utilities", - "comment": "Utilities: Fixed incorrect calculation of initials. Properly remove unwanted ASCII characters, and do not calculate initials for Arabic and CJK based languages. ", - "type": "patch" - } - ], - "email": "khalle@microsoft.com" -} \ No newline at end of file diff --git a/common/changes/resizegroup-debounce_2017-05-25-17-42.json b/common/changes/resizegroup-debounce_2017-05-25-17-42.json deleted file mode 100644 index bf64641e6ba46..0000000000000 --- a/common/changes/resizegroup-debounce_2017-05-25-17-42.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "office-ui-fabric-react", - "comment": "ResizeGroup: Debounce window resize events to improve performance", - "type": "patch" - } - ], - "email": "chrisgo@microsoft.com" -} diff --git a/packages/example-app-base/CHANGELOG.json b/packages/example-app-base/CHANGELOG.json index f5d7ee69cf4b8..8dcce9744f517 100644 --- a/packages/example-app-base/CHANGELOG.json +++ b/packages/example-app-base/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@uifabric/example-app-base", "entries": [ + { + "version": "1.3.14", + "tag": "@uifabric/example-app-base_v1.3.14", + "date": "Fri, 26 May 2017 10:21:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@uifabric/utilities\" from `1.10.1` to `1.10.2`" + } + ] + } + }, { "version": "1.3.13", "tag": "@uifabric/example-app-base_v1.3.13", diff --git a/packages/example-app-base/CHANGELOG.md b/packages/example-app-base/CHANGELOG.md index 72387348ae199..43a046f210e40 100644 --- a/packages/example-app-base/CHANGELOG.md +++ b/packages/example-app-base/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @uifabric/example-app-base -This log was last generated on Tue, 23 May 2017 10:16:04 GMT and should not be manually modified. +This log was last generated on Fri, 26 May 2017 10:21:03 GMT and should not be manually modified. + +## 1.3.14 +Fri, 26 May 2017 10:21:03 GMT + +*Changes not tracked* ## 1.3.13 Tue, 23 May 2017 10:16:04 GMT diff --git a/packages/example-app-base/package.json b/packages/example-app-base/package.json index e4162c59e7de1..2dc0c6e31df53 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": "1.3.13", + "version": "1.3.14", "description": "Office UI Fabric example app base utilities for building example sites.", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -40,7 +40,7 @@ "react-dom": "^0.14 || ^15.0.1-0 || ^16.0.0-0" }, "dependencies": { - "@uifabric/utilities": "1.10.1", + "@uifabric/utilities": "1.10.2", "highlight.js": "^9.9.0", "office-ui-fabric-core": ">=5.0.0 <6.0.0", "office-ui-fabric-react": ">=2.11.0-0 <3.0.0-0" diff --git a/packages/example-component/package.json b/packages/example-component/package.json index f01e1ba69c6aa..a64079112483d 100644 --- a/packages/example-component/package.json +++ b/packages/example-component/package.json @@ -1,6 +1,6 @@ { "name": "@uifabric/example-component", - "version": "1.0.24", + "version": "1.0.25", "description": "", "main": "index.js", "scripts": { @@ -21,8 +21,8 @@ "@types/react-addons-test-utils": "^0.14.18", "@types/react-dom": "^15.5.0", "@types/webpack-env": "^1.13.0", - "@uifabric/example-app-base": "1.3.13", - "@uifabric/utilities": "1.10.1", + "@uifabric/example-app-base": "1.3.14", + "@uifabric/utilities": "1.10.2", "autoprefixer": "^6.7.6", "chai": "^3.5.0", "css-loader": "^0.28.0", @@ -30,7 +30,7 @@ "mocha": "^3.2.0", "mocha-loader": "^1.1.1", "node-sass": "^4.5.0", - "office-ui-fabric-react": ">=2.34.0 <3.0.0", + "office-ui-fabric-react": ">=2.34.1 <3.0.0", "office-ui-fabric-react-tslint": ">=1.0.0 <2.0.0", "postcss-loader": "^1.3.3", "react": "^15.4.2", diff --git a/packages/office-ui-fabric-react/CHANGELOG.json b/packages/office-ui-fabric-react/CHANGELOG.json index 7e8f9ab1dcef5..8a65119424dbf 100644 --- a/packages/office-ui-fabric-react/CHANGELOG.json +++ b/packages/office-ui-fabric-react/CHANGELOG.json @@ -1,6 +1,33 @@ { "name": "office-ui-fabric-react", "entries": [ + { + "version": "2.34.1", + "tag": "office-ui-fabric-react_v2.34.1", + "date": "Fri, 26 May 2017 10:21:03 GMT", + "comments": { + "patch": [ + { + "author": "Kristian Halle ", + "commit": "a564ac9adcc0b2fdbcdf00ac97b797e81ab4ebbe", + "comment": "Persona: Updated test to match new logic for calculating initials." + }, + { + "author": "Christian Gonzalez ", + "commit": "b8f035edde96da0435d72c8fa4623e65f93d96c3", + "comment": "ResizeGroup: Debounce window resize events to improve performance" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@uifabric/utilities\" from `>=1.10.0 <2.0.0` to `>=1.10.2 <2.0.0`" + }, + { + "comment": "Updating dependency \"@uifabric/example-app-base\" from `1.3.13` to `1.3.14`" + } + ] + } + }, { "version": "2.34.0", "tag": "office-ui-fabric-react_v2.34.0", diff --git a/packages/office-ui-fabric-react/CHANGELOG.md b/packages/office-ui-fabric-react/CHANGELOG.md index 1ec34f44cd4af..004b42d206413 100644 --- a/packages/office-ui-fabric-react/CHANGELOG.md +++ b/packages/office-ui-fabric-react/CHANGELOG.md @@ -1,6 +1,14 @@ # Change Log - office-ui-fabric-react -This log was last generated on Thu, 25 May 2017 10:22:10 GMT and should not be manually modified. +This log was last generated on Fri, 26 May 2017 10:21:03 GMT and should not be manually modified. + +## 2.34.1 +Fri, 26 May 2017 10:21:03 GMT + +### Patches + +- Persona: Updated test to match new logic for calculating initials. +- ResizeGroup: Debounce window resize events to improve performance ## 2.34.0 Thu, 25 May 2017 10:22:10 GMT diff --git a/packages/office-ui-fabric-react/package.json b/packages/office-ui-fabric-react/package.json index 7bdcf6d55a383..efaf3d4b80cf9 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": "2.34.0", + "version": "2.34.1", "description": "Reusable React components for building experiences for Office 365.", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -28,7 +28,7 @@ "@types/resemblejs": "~1.3.28", "@types/sinon": "^2.1.3", "@types/webpack-env": "^1.13.0", - "@uifabric/example-app-base": "1.3.13", + "@uifabric/example-app-base": "1.3.14", "autoprefixer": "^6.7.6", "chai": "^3.5.0", "css-loader": "^0.28.0", @@ -69,7 +69,7 @@ }, "dependencies": { "@microsoft/load-themed-styles": "^1.2.2", - "@uifabric/utilities": ">=1.10.0 <2.0.0" + "@uifabric/utilities": ">=1.10.2 <2.0.0" }, "peerDependencies": { "react": "^0.14 || ^15.0.1-0 || ^16.0.0-0", diff --git a/packages/styling/package.json b/packages/styling/package.json index e3c38afc43bfb..bbbaa5cd1da58 100644 --- a/packages/styling/package.json +++ b/packages/styling/package.json @@ -44,7 +44,7 @@ "webpack-split-by-path": "2.0.0" }, "dependencies": { - "@uifabric/utilities": ">=1.10.0 <2.0.0", + "@uifabric/utilities": ">=1.10.2 <2.0.0", "glamor": "^2.20.24", "rtl-css-js": "^1.1.0" } diff --git a/packages/utilities/CHANGELOG.json b/packages/utilities/CHANGELOG.json index e47549b41ee02..8c438499544e0 100644 --- a/packages/utilities/CHANGELOG.json +++ b/packages/utilities/CHANGELOG.json @@ -1,6 +1,20 @@ { "name": "@uifabric/utilities", "entries": [ + { + "version": "1.10.2", + "tag": "@uifabric/utilities_v1.10.2", + "date": "Fri, 26 May 2017 10:21:03 GMT", + "comments": { + "patch": [ + { + "author": "Kristian Halle ", + "commit": "a564ac9adcc0b2fdbcdf00ac97b797e81ab4ebbe", + "comment": "Utilities: Fixed incorrect calculation of initials. Properly remove unwanted ASCII characters, and do not calculate initials for Arabic and CJK based languages. " + } + ] + } + }, { "version": "1.10.1", "tag": "@uifabric/utilities_v1.10.1", diff --git a/packages/utilities/CHANGELOG.md b/packages/utilities/CHANGELOG.md index b163ae25bad18..282a2e8dd333b 100644 --- a/packages/utilities/CHANGELOG.md +++ b/packages/utilities/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @uifabric/utilities -This log was last generated on Wed, 24 May 2017 23:52:09 GMT and should not be manually modified. +This log was last generated on Fri, 26 May 2017 10:21:03 GMT and should not be manually modified. + +## 1.10.2 +Fri, 26 May 2017 10:21:03 GMT + +### Patches + +- Utilities: Fixed incorrect calculation of initials. Properly remove unwanted ASCII characters, and do not calculate initials for Arabic and CJK based languages. ## 1.10.1 Wed, 24 May 2017 23:52:09 GMT diff --git a/packages/utilities/package.json b/packages/utilities/package.json index 19e10ee08aceb..83cd6a8f7396c 100644 --- a/packages/utilities/package.json +++ b/packages/utilities/package.json @@ -1,6 +1,6 @@ { "name": "@uifabric/utilities", - "version": "1.10.1", + "version": "1.10.2", "description": "Office UI Fabric utilities for building React components.", "main": "lib/index.js", "typings": "lib/index.d.ts", From e6b653bc329e80ebc5e046055e4cb00553a465ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20N=C3=BA=C3=B1ez?= Date: Fri, 26 May 2017 18:34:29 +0200 Subject: [PATCH 0015/1641] ContextualMenu: Prevent li to be actionable, move role down to button/anchor. (#1868) * Use presentation in li and move menuitem role down to the button. * Change description * Move role and labels to ul. In order to match aria spec example and to prevent native ul role to interfere. * Fixed aria-labelledby spelling. --- ...enu-rolePresentation_2017-05-26-08-29.json | 30 +++++++++++++++++++ .../ContextualMenu/ContextualMenu.tsx | 20 +++++++------ 2 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 common/changes/contextualMenu-rolePresentation_2017-05-26-08-29.json diff --git a/common/changes/contextualMenu-rolePresentation_2017-05-26-08-29.json b/common/changes/contextualMenu-rolePresentation_2017-05-26-08-29.json new file mode 100644 index 0000000000000..bd291d76ffb46 --- /dev/null +++ b/common/changes/contextualMenu-rolePresentation_2017-05-26-08-29.json @@ -0,0 +1,30 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "ContextualMenu: prevent Narrator to announce items twice.", + "type": "patch" + }, + { + "comment": "", + "packageName": "@uifabric/utilities", + "type": "none" + }, + { + "comment": "", + "packageName": "@uifabric/styling", + "type": "none" + }, + { + "comment": "", + "packageName": "@uifabric/fabric-website", + "type": "none" + }, + { + "comment": "", + "packageName": "@uifabric/example-app-base", + "type": "none" + } + ], + "email": "v-panu@microsoft.com" +} \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.tsx b/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.tsx index f6ab74fe0d3bd..db7522f9dfc40 100644 --- a/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.tsx +++ b/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.tsx @@ -196,10 +196,10 @@ export class ContextualMenu extends BaseComponent -
this._host = host } id={ id } className={ css('ms-ContextualMenu-container', className) }> +
this._host = host } id={ id } className={ css('ms-ContextualMenu-container', className) }> { (items && items.length) ? ( this._focusZone = focusZone } - role='menu' - aria-label={ ariaLabel } isCircularNavigation={ true } >
    { items.map((item, index) => ( @@ -278,7 +278,7 @@ export class ContextualMenu extends BaseComponent @@ -323,6 +323,7 @@ export class ContextualMenu extends BaseComponent { this._renderMenuItemChildren(item, index, hasCheckmarks, hasIcons) } @@ -359,6 +360,7 @@ export class ContextualMenu extends BaseComponent Date: Sat, 27 May 2017 01:47:19 +0000 Subject: [PATCH 0016/1641] Applying package updates. --- apps/fabric-website/package.json | 2 +- apps/ssr-tests/package.json | 2 +- apps/test-bundle-button/package.json | 2 +- apps/todo-app/package.json | 2 +- ...enu-rolePresentation_2017-05-26-08-29.json | 30 ------------------- packages/example-component/package.json | 2 +- .../office-ui-fabric-react/CHANGELOG.json | 14 +++++++++ packages/office-ui-fabric-react/CHANGELOG.md | 9 +++++- packages/office-ui-fabric-react/package.json | 2 +- 9 files changed, 28 insertions(+), 37 deletions(-) delete mode 100644 common/changes/contextualMenu-rolePresentation_2017-05-26-08-29.json diff --git a/apps/fabric-website/package.json b/apps/fabric-website/package.json index f8bfe1ae4b26d..ae9537b5e350b 100644 --- a/apps/fabric-website/package.json +++ b/apps/fabric-website/package.json @@ -52,7 +52,7 @@ "json-loader": "^0.5.4", "load-themed-styles": "^1.1.0", "office-ui-fabric-core": ">=5.1.0 <6.0.0", - "office-ui-fabric-react": ">=2.34.1 <3.0.0", + "office-ui-fabric-react": ">=2.34.2 <3.0.0", "@uifabric/utilities": ">=1.10.2 <2.0.0" } } \ No newline at end of file diff --git a/apps/ssr-tests/package.json b/apps/ssr-tests/package.json index fefaeca58c698..15b74e322819c 100644 --- a/apps/ssr-tests/package.json +++ b/apps/ssr-tests/package.json @@ -25,7 +25,7 @@ "@types/mocha": "^2.2.39", "@types/webpack-env": "^1.13.0", "mocha": "~3.3.0", - "office-ui-fabric-react": ">=2.34.1 <3.0.0", + "office-ui-fabric-react": ">=2.34.2 <3.0.0", "raw-loader": "^0.5.1", "react": "^15.4.2", "react-addons-test-utils": "^15.4.2", diff --git a/apps/test-bundle-button/package.json b/apps/test-bundle-button/package.json index 24eeed947e7c6..fc731a94de519 100644 --- a/apps/test-bundle-button/package.json +++ b/apps/test-bundle-button/package.json @@ -30,6 +30,6 @@ "dependencies": { "react": "^0.14 || ^15.0.1-0 || ^16.0.0-0", "react-dom": "^0.14 || ^15.0.1-0 || ^16.0.0-0", - "office-ui-fabric-react": ">=2.34.1 <3.0.0" + "office-ui-fabric-react": ">=2.34.2 <3.0.0" } } \ No newline at end of file diff --git a/apps/todo-app/package.json b/apps/todo-app/package.json index 33ce286f303ab..4ecec96f13072 100644 --- a/apps/todo-app/package.json +++ b/apps/todo-app/package.json @@ -25,7 +25,7 @@ "es6-promise": "^4.1.0", "immutability-helper": "^2.0.0", "office-ui-fabric-core": ">=5.1.0 <6.0.0", - "office-ui-fabric-react": ">=2.34.1 <3.0.0", + "office-ui-fabric-react": ">=2.34.2 <3.0.0", "react": "^15.4.2", "react-dom": "^15.4.2", "typescript": "2.2.2" diff --git a/common/changes/contextualMenu-rolePresentation_2017-05-26-08-29.json b/common/changes/contextualMenu-rolePresentation_2017-05-26-08-29.json deleted file mode 100644 index bd291d76ffb46..0000000000000 --- a/common/changes/contextualMenu-rolePresentation_2017-05-26-08-29.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "changes": [ - { - "packageName": "office-ui-fabric-react", - "comment": "ContextualMenu: prevent Narrator to announce items twice.", - "type": "patch" - }, - { - "comment": "", - "packageName": "@uifabric/utilities", - "type": "none" - }, - { - "comment": "", - "packageName": "@uifabric/styling", - "type": "none" - }, - { - "comment": "", - "packageName": "@uifabric/fabric-website", - "type": "none" - }, - { - "comment": "", - "packageName": "@uifabric/example-app-base", - "type": "none" - } - ], - "email": "v-panu@microsoft.com" -} \ No newline at end of file diff --git a/packages/example-component/package.json b/packages/example-component/package.json index a64079112483d..d4a022c8a2b22 100644 --- a/packages/example-component/package.json +++ b/packages/example-component/package.json @@ -30,7 +30,7 @@ "mocha": "^3.2.0", "mocha-loader": "^1.1.1", "node-sass": "^4.5.0", - "office-ui-fabric-react": ">=2.34.1 <3.0.0", + "office-ui-fabric-react": ">=2.34.2 <3.0.0", "office-ui-fabric-react-tslint": ">=1.0.0 <2.0.0", "postcss-loader": "^1.3.3", "react": "^15.4.2", diff --git a/packages/office-ui-fabric-react/CHANGELOG.json b/packages/office-ui-fabric-react/CHANGELOG.json index 8a65119424dbf..19ba6585ba376 100644 --- a/packages/office-ui-fabric-react/CHANGELOG.json +++ b/packages/office-ui-fabric-react/CHANGELOG.json @@ -1,6 +1,20 @@ { "name": "office-ui-fabric-react", "entries": [ + { + "version": "2.34.2", + "tag": "office-ui-fabric-react_v2.34.2", + "date": "Sat, 27 May 2017 01:47:19 GMT", + "comments": { + "patch": [ + { + "author": "Pablo Núñez ", + "commit": "e6b653bc329e80ebc5e046055e4cb00553a465ae", + "comment": "ContextualMenu: prevent Narrator to announce items twice." + } + ] + } + }, { "version": "2.34.1", "tag": "office-ui-fabric-react_v2.34.1", diff --git a/packages/office-ui-fabric-react/CHANGELOG.md b/packages/office-ui-fabric-react/CHANGELOG.md index 004b42d206413..a86fdc7d48eec 100644 --- a/packages/office-ui-fabric-react/CHANGELOG.md +++ b/packages/office-ui-fabric-react/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - office-ui-fabric-react -This log was last generated on Fri, 26 May 2017 10:21:03 GMT and should not be manually modified. +This log was last generated on Sat, 27 May 2017 01:47:19 GMT and should not be manually modified. + +## 2.34.2 +Sat, 27 May 2017 01:47:19 GMT + +### Patches + +- ContextualMenu: prevent Narrator to announce items twice. ## 2.34.1 Fri, 26 May 2017 10:21:03 GMT diff --git a/packages/office-ui-fabric-react/package.json b/packages/office-ui-fabric-react/package.json index efaf3d4b80cf9..c4a4de81be473 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": "2.34.1", + "version": "2.34.2", "description": "Reusable React components for building experiences for Office 365.", "main": "lib/index.js", "typings": "lib/index.d.ts", From f812b804e890fd7762e0c09226fb28f9e5036717 Mon Sep 17 00:00:00 2001 From: Christian Gonzalez Date: Sat, 27 May 2017 08:21:45 -0700 Subject: [PATCH 0017/1641] ResizeGroup: Reduce the number of renders when shrinking the window (#1875) * Don't rerender when everything already fits in a resize group. * Add comments * More accurate typing of _lastKnownRootWidth * update grammer, add new test * Rush change * Update resizegroup-optimize-shrink_2017-05-26-21-04.json --- ...roup-optimize-shrink_2017-05-26-21-04.json | 10 +++ .../ResizeGroup/ResizeGroup.test.tsx | 78 +++++++++++++++++-- .../components/ResizeGroup/ResizeGroup.tsx | 25 +++++- 3 files changed, 103 insertions(+), 10 deletions(-) create mode 100644 common/changes/resizegroup-optimize-shrink_2017-05-26-21-04.json diff --git a/common/changes/resizegroup-optimize-shrink_2017-05-26-21-04.json b/common/changes/resizegroup-optimize-shrink_2017-05-26-21-04.json new file mode 100644 index 0000000000000..3be096ea38bc2 --- /dev/null +++ b/common/changes/resizegroup-optimize-shrink_2017-05-26-21-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "ResizeGroup: Reduce the number of render calls when reducing the width.", + "type": "patch" + } + ], + "email": "chrisgo@microsoft.com" +} diff --git a/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.test.tsx b/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.test.tsx index 8a6e65b994b23..f1747af1d86be 100644 --- a/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.test.tsx +++ b/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.test.tsx @@ -89,7 +89,7 @@ describe('ResizeGroup', () => { expect(onRenderData.called).to.equal(false); }); - it('will remeasure if props are updated', () => { + it('remeasures if props are updated', () => { const onReduceData = sinon.spy(); const onRenderData = sinon.spy(); @@ -107,7 +107,7 @@ describe('ResizeGroup', () => { expect(onRenderData.callCount).to.equal(4); }); - it('will call onReduceData when contents do not fit', () => { + it('calls onReduceData when contents do not fit', () => { let { wrapper, onReduceDataSpy, rootGetClientRectMock, measuredGetClientRectMock } = getWrapperWithMocks(); onReduceDataSpy.reset(); @@ -120,25 +120,89 @@ describe('ResizeGroup', () => { expect(onReduceDataSpy.callCount).to.equal(1); }); - it('will measure after a window resize', () => { - let { onReduceDataSpy, rootGetClientRectMock, measuredGetClientRectMock } = getWrapperWithMocks(); + it('measures after a window resize that grows the container', () => { + let { onReduceDataSpy, rootGetClientRectMock, measuredGetClientRectMock, wrapper } = getWrapperWithMocks(); + + // Initial render with measurements + rootGetClientRectMock.returns({ width: 200 }); + measuredGetClientRectMock.returns({ width: 100 }); + wrapper.setState({ shouldMeasure: true }); onReduceDataSpy.reset(); rootGetClientRectMock.reset(); measuredGetClientRectMock.reset(); + + rootGetClientRectMock.returns({ width: 250 }); + measuredGetClientRectMock.returns({ width: 100 }); + + let renderSpy = setRenderSpy(wrapper); + window.dispatchEvent(new Event('resize')); + + expect(rootGetClientRectMock.callCount).to.equal(2); + expect(measuredGetClientRectMock.callCount).to.equal(1); + + // Don't call onReduceData because everything fits. + expect(onReduceDataSpy.callCount).to.equal(0); + expect(renderSpy.callCount).to.equal(2); + }); + + it('does not render after a window resize that shrinks the container and everything still fits', () => { + let { onReduceDataSpy, rootGetClientRectMock, measuredGetClientRectMock, wrapper } = getWrapperWithMocks(); + + // Initial render with measurements rootGetClientRectMock.returns({ width: 200 }); measuredGetClientRectMock.returns({ width: 100 }); + wrapper.setState({ shouldMeasure: true }); + + onReduceDataSpy.reset(); + rootGetClientRectMock.reset(); + measuredGetClientRectMock.reset(); + + rootGetClientRectMock.returns({ width: 150 }); + measuredGetClientRectMock.returns({ width: 100 }); + let renderSpy = setRenderSpy(wrapper); window.dispatchEvent(new Event('resize')); expect(rootGetClientRectMock.callCount).to.equal(1); - expect(measuredGetClientRectMock.callCount).to.equal(1); + expect(measuredGetClientRectMock.callCount).to.equal(0); - // Don't call onReduceData since everything fits + // Don't call onReduceData or render because everything already fits. expect(onReduceDataSpy.callCount).to.equal(0); + expect(renderSpy.callCount).to.equal(0); + }); + + it('does render after a window resize that shrinks the container and things do not fit', () => { + let { onReduceDataSpy, rootGetClientRectMock, measuredGetClientRectMock, wrapper } = getWrapperWithMocks(); + + // Initial render with measurements + rootGetClientRectMock.returns({ width: 200 }); + measuredGetClientRectMock.returns({ width: 100 }); + wrapper.setState({ shouldMeasure: true }); + + onReduceDataSpy.reset(); + rootGetClientRectMock.reset(); + measuredGetClientRectMock.reset(); + + // Simulate a resize where the contents don't fit after a resize, but they fit + // after calling onReduceData once. + rootGetClientRectMock.returns({ width: 50 }); + measuredGetClientRectMock.onFirstCall().returns({ width: 100 }); + measuredGetClientRectMock.onSecondCall().returns({ width: 40 }); + + let renderSpy = setRenderSpy(wrapper); + window.dispatchEvent(new Event('resize')); + + expect(onReduceDataSpy.callCount).to.equal(1); + + // Renders: + // 1. Measures the contents and determines it does not fit + // 2. Measures reduced contents and determines it does fit + // 3. Removes the measured div and updates the rendered view + expect(renderSpy.callCount).to.equal(3); }); - it('will continue to shrink until everything fits', () => { + it('continues to shrink until everything fits', () => { let data = { scalingIndex: 7 }; let { wrapper, diff --git a/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.tsx b/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.tsx index 832097067988e..335e69670109a 100644 --- a/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.tsx +++ b/packages/office-ui-fabric-react/src/components/ResizeGroup/ResizeGroup.tsx @@ -34,6 +34,8 @@ export class ResizeGroup extends BaseComponent container.width)) { + const containerWidth = this._lastKnownRootWidth = this._root.getBoundingClientRect().width; + const measuredWidth = this._lastKnownMeasuredWidth = this._measured.getBoundingClientRect().width; + if ((measuredWidth > containerWidth)) { let nextMeasuredData = onReduceData(this.state.measuredData); // We don't want to get stuck in an infinite render loop when there are no more From 63b34daf51bc7185585c29c81bc34abd1ae64edb Mon Sep 17 00:00:00 2001 From: Jon Schectman Date: Sat, 27 May 2017 08:53:44 -0700 Subject: [PATCH 0018/1641] List: improved measure logic and fix nested list scroll problem" (#1866) * improved list rendering speed and fixed nested list jumping problem * adding change file * Update listimprovements_2017-05-25-23-31.json --- .../listimprovements_2017-05-25-23-31.json | 10 +++++ .../src/components/List/List.tsx | 41 ++++++++++++++++--- 2 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 common/changes/listimprovements_2017-05-25-23-31.json diff --git a/common/changes/listimprovements_2017-05-25-23-31.json b/common/changes/listimprovements_2017-05-25-23-31.json new file mode 100644 index 0000000000000..422a94faa0a90 --- /dev/null +++ b/common/changes/listimprovements_2017-05-25-23-31.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "List: improved measure logic and fix nested list scroll problem", + "type": "patch" + } + ], + "email": "joschect@microsoft.com" +} diff --git a/packages/office-ui-fabric-react/src/components/List/List.tsx b/packages/office-ui-fabric-react/src/components/List/List.tsx index 44f6d673c8d59..47d3c03775d0c 100644 --- a/packages/office-ui-fabric-react/src/components/List/List.tsx +++ b/packages/office-ui-fabric-react/src/components/List/List.tsx @@ -104,6 +104,8 @@ export class List extends BaseComponent implements IList private _requiredWindowsBehind: number; private _measureVersion: number; + private _scrollHeight: number; + private _scrollTop: number; constructor(props: IListProps) { super(props); @@ -148,6 +150,16 @@ export class List extends BaseComponent implements IList this._scrollingToIndex = -1; } + /** + * Scroll to the given index. By default will bring the page the specified item is on into the view. If a callback + * to measure the height of an individual item is specified, will only scroll to bring the specific item into view. + * + * Note: with items of variable height and no passed in `getPageHeight` method, the list might jump after scrolling + * when windows before/ahead are being rendered, and the estimated height is replaced using actual elements. + * + * @param index Index of item to scroll to + * @param measureItem Optional callback to measure the height of an individual item + */ public scrollToIndex(index: number, measureItem?: (itemIndex: number) => number): void { const { startIndex } = this.props; const renderCount = this._getRenderCount(); @@ -472,10 +484,7 @@ export class List extends BaseComponent implements IList let page = newPages[i]; if (page.items) { - // Only evaluate page height if the page contains less items than total. - if (page.items.length < renderCount) { - heightChanged = this._measurePage(page) || heightChanged; - } + heightChanged = this._measurePage(page) || heightChanged; if (!renderedIndexes[page.startIndex]) { this._onPageAdded(page); @@ -506,7 +515,10 @@ export class List extends BaseComponent implements IList // console.log(' * measure attempt', page.startIndex, cachedHeight); if (pageElement && (!cachedHeight || cachedHeight.measureVersion !== this._measureVersion)) { - let newClientRect = _measurePageRect(pageElement); + let newClientRect = { + width: pageElement.clientWidth, + height: pageElement.clientHeight + }; if (newClientRect.height || newClientRect.width) { hasChangedHeight = page.height !== newClientRect.height; @@ -690,16 +702,33 @@ export class List extends BaseComponent implements IList const { pages } = this.state; const renderCount = this._getRenderCount(props); let surfaceRect = this._surfaceRect; + let scrollHeight = this._scrollElement && this._scrollElement.scrollHeight; + let scrollTop = this._scrollElement ? this._scrollElement.scrollTop : 0; // WARNING: EXPENSIVE CALL! We need to know the surface top relative to the window. + // This needs to be called to recalculate when new pages should be loaded. + // We check to see how far we've scrolled and if it's further than a third of a page we run it again. if ( forceUpdate || !pages || !this._surfaceRect || - (pages.length > 0 && pages[0].items && pages[0].items.length < renderCount)) { + !scrollHeight || + scrollHeight !== this._scrollHeight || + Math.abs(this._scrollTop - scrollTop) > this._estimatedPageHeight / 3) { surfaceRect = this._surfaceRect = _measureSurfaceRect(this.refs.surface); + this._scrollTop = scrollTop; } + // If the scroll height has changed, something in the container likely resized and + // we should redo the page heights incase their content resized. + if (forceUpdate || + !scrollHeight || + scrollHeight !== this._scrollHeight) { + this._measureVersion++; + } + + this._scrollHeight = scrollHeight; + // If the surface is above the container top or below the container bottom, or if this is not the first // render return empty rect. // The first time the list gets rendered we need to calculate the rectangle. The width of the list is From 8424c7680a618013d5cb4d320e7f6ed798cb317b Mon Sep 17 00:00:00 2001 From: Aaron Zhou Date: Sat, 27 May 2017 09:03:48 -0700 Subject: [PATCH 0019/1641] GroupedList: Fix bug where selection would not work when keyboarding off a header (#1818) * Start fixes for details list with groups arrow selection * Clean up code * More cleanup * Revert behavior to pass test * Add changes json * don't remove selection when moving to non selectable element --- ...upedDetailsListSelectionFixes_2017-05-18-14-34.json | 10 ++++++++++ .../src/utilities/selection/SelectionZone.tsx | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 common/changes/groupedDetailsListSelectionFixes_2017-05-18-14-34.json diff --git a/common/changes/groupedDetailsListSelectionFixes_2017-05-18-14-34.json b/common/changes/groupedDetailsListSelectionFixes_2017-05-18-14-34.json new file mode 100644 index 0000000000000..1b8a656c1aef5 --- /dev/null +++ b/common/changes/groupedDetailsListSelectionFixes_2017-05-18-14-34.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "SelectionZone: Update behavior to fix using up/down arrows to navigate between groups in a GroupedList.", + "type": "patch" + } + ], + "email": "aazhou@microsoft.com" +} \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/utilities/selection/SelectionZone.tsx b/packages/office-ui-fabric-react/src/utilities/selection/SelectionZone.tsx index ded477edfedde..88060758bbe63 100644 --- a/packages/office-ui-fabric-react/src/utilities/selection/SelectionZone.tsx +++ b/packages/office-ui-fabric-react/src/utilities/selection/SelectionZone.tsx @@ -337,10 +337,10 @@ export class SelectionZone extends BaseComponent { target = getParent(target); } - - // A key was pressed while an item in this zone was focused. - this._shouldHandleFocus = true; } + + // A key was pressed while an item in this zone was focused. + this._shouldHandleFocus = true; } private _onToggleAllClick(ev: React.MouseEvent) { From cfffab19f72102f075b55422bbf3448f840deb9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20N=C3=BA=C3=B1ez?= Date: Sat, 27 May 2017 18:05:20 +0200 Subject: [PATCH 0020/1641] DetailsList: initialFocusedIndex was not considered on already mounted rows (#1833) * Considering initialFocusedIndex on mounted rows. Otherwise, when items changed, row was already loaded so new index to focus was ignored. * Added change description * Fix double quote. --- ...edIndexOnMountedRows_2017-05-23-06-30.json | 30 ++++++++++++ .../components/DetailsList/DetailsList.tsx | 21 ++++++-- .../DetailsList/DetailsListPage.tsx | 6 +++ .../DetailsList.NavigatingFocus.Example.tsx | 48 +++++++++++++++++++ 4 files changed, 100 insertions(+), 5 deletions(-) create mode 100644 common/changes/detailsList-initialFocusedIndexOnMountedRows_2017-05-23-06-30.json create mode 100644 packages/office-ui-fabric-react/src/components/DetailsList/examples/DetailsList.NavigatingFocus.Example.tsx diff --git a/common/changes/detailsList-initialFocusedIndexOnMountedRows_2017-05-23-06-30.json b/common/changes/detailsList-initialFocusedIndexOnMountedRows_2017-05-23-06-30.json new file mode 100644 index 0000000000000..aa68bc39d3d8c --- /dev/null +++ b/common/changes/detailsList-initialFocusedIndexOnMountedRows_2017-05-23-06-30.json @@ -0,0 +1,30 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "DetailsList: initialFocusedIndex is considered on already mounted rows ", + "type": "patch" + }, + { + "comment": "", + "packageName": "@uifabric/utilities", + "type": "none" + }, + { + "comment": "", + "packageName": "@uifabric/styling", + "type": "none" + }, + { + "comment": "", + "packageName": "@uifabric/fabric-website", + "type": "none" + }, + { + "comment": "", + "packageName": "@uifabric/example-app-base", + "type": "none" + } + ], + "email": "v-panu@microsoft.com" +} \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsList.tsx b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsList.tsx index 11025d2a1ea56..e7ca609f418a1 100644 --- a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsList.tsx +++ b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsList.tsx @@ -124,6 +124,13 @@ export class DetailsList extends BaseComponent { public render() { return ( @@ -56,6 +59,9 @@ export class DetailsListPage extends React.Component + + +
} propertiesTables={ diff --git a/packages/office-ui-fabric-react/src/components/DetailsList/examples/DetailsList.NavigatingFocus.Example.tsx b/packages/office-ui-fabric-react/src/components/DetailsList/examples/DetailsList.NavigatingFocus.Example.tsx new file mode 100644 index 0000000000000..c957939dbac75 --- /dev/null +++ b/packages/office-ui-fabric-react/src/components/DetailsList/examples/DetailsList.NavigatingFocus.Example.tsx @@ -0,0 +1,48 @@ +import * as React from 'react'; +import { DetailsList, IColumn } from 'office-ui-fabric-react/lib/DetailsList'; +import { Link } from 'office-ui-fabric-react/lib/Link'; +import './DetailsListExample.scss'; + +export class DetailsListNavigatingFocusExample extends React.Component { + public state = { + items: generateItems(''), + initialFocusedIndex: undefined, + }; + + private _columns = [ + { + name: 'File path', + onRender: item => + this.navigate(item) }> + { item } + , + } as IColumn, + { + name: 'Size', + onRender: item => '4 KB', + } as IColumn + ]; + + public render() { + return ( + + ); + } + + private navigate(name: string) { + this.setState({ + items: generateItems(name + '/'), + initialFocusedIndex: 0, + }); + } +} + +function generateItems(parent: string) { + return Array.prototype.map.call('abcdefghi', name => parent + name); +} From da0f88a8690c867e2bbcf19c533ba57487acc4ed Mon Sep 17 00:00:00 2001 From: Mike Wheaton Date: Sat, 27 May 2017 09:40:33 -0700 Subject: [PATCH 0021/1641] Update to Fabric Core 7 (#1587) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * The file that imports all of the variables and mixins is now named References * Remove the “u-“ utility prefix * Remove ms-baseFont from components, as this is now inherited from the ms-Fabric wrapper * Update names of responsive variables (swap min/max and size) * Add “ms” prefix to all mixin calls * Update animation variable names * The input-placeholder mixin has been removed, but we can use ::placeholder and the build will add in vendor prefixes as necessary * Remove anything that sets font-family, as this is now inherited from ms-Fabric. A mixin in Fabric Core ensures that button and input elements inherit the font family * Update to use Fabric Core 6.0 * Update fabric-website to use Fabric Core 6.0 * Add change file * Update path to localhost bundle * Update todo-app to use Fabric Core 6.0.0 * Add a simple component demo to verify that only the necessary styles are being included * Update icon list for Fabric Core 6.0.0 * Removing ‘fsevents’ in attempt to fix build issue * Change the type to ‘major’ * Merge ‘master’ into ‘miwhea/fabric-core-6’ * Add change file * Remove old Button.scss file that is no longer in use * Remove outdated change file * Add a base font size back to the example pages * Fix focus border mixin * Update gitignore to ignore Gulp cache and NPM debug files * Remove ‘fsevents’ from npm-shrinkwrap.json so that it builds * Remove old files left over from merge * Update build to copy subfolders for CSS and SCSS to dist * Update all “ms-u-“ classes to “ms-“ in the TSX files, which were missed in the previous updates. * Update to Fabric Core 7 * Remove ms-font-m class from Fabric and App, as the default size is now set by the ms-Fabric class * Update to latest icons in Core 7 * Update comment * Add change file * Remove extra change file * Cleaned the NPM cache * Removing ‘fsevents’ from npm-shrinkwrap * Update package.json --- .gitignore | 6 + apps/component-demo/gulpfile.js | 41 ++++ apps/component-demo/index.html | 20 ++ apps/component-demo/package.json | 33 +++ apps/component-demo/src/index.tsx | 24 +++ apps/component-demo/tsconfig.json | 23 ++ apps/component-demo/tsd.json | 15 ++ apps/component-demo/webpack.config.js | 59 +++++ apps/fabric-website/package.json | 2 +- .../src/components/App/App.scss | 30 +-- .../ColorTable/ColorTable.module.scss | 2 +- .../components/DONavigation/DONavigation.tsx | 22 +- .../DONavigation/DONavigationLink.scss | 2 +- .../components/DOSearchBox/DOSearchBox.scss | 2 +- .../src/components/Footer/Footer.scss | 20 +- .../src/components/Header/Header.scss | 4 +- .../components/IconGrid/IconGrid.module.scss | 2 +- .../src/components/Nav/Nav.module.scss | 10 +- .../PageHeader/PageHeader.module.scss | 24 +-- .../src/components/Table/Table.module.scss | 10 +- apps/fabric-website/src/data/animations.json | 54 ++--- .../src/data/layout-visibility.json | 30 +-- apps/fabric-website/src/data/utilities.json | 21 +- .../src/pages/BlogPage/BlogItem.scss | 2 +- .../src/pages/BlogPage/BlogPage.module.scss | 2 +- .../GetStartedPage.diagram.module.scss | 18 +- .../GetStarted/GetStartedPage.module.scss | 14 +- .../src/pages/GetStarted/GetStartedPage.tsx | 6 +- .../src/pages/HomePage/HomePage.module.scss | 20 +- .../src/pages/Interstitials/AngularJSPage.tsx | 10 +- .../src/pages/Interstitials/FabricIOSPage.tsx | 8 +- .../src/pages/Interstitials/FabricJSPage.tsx | 10 +- .../src/pages/Overviews/Overviews.module.scss | 8 +- .../ResourcesPage/ResourcesPage.module.scss | 6 +- .../src/pages/ResourcesPage/ResourcesPage.tsx | 8 +- .../Styles/AnimationsPage/AnimationsPage.scss | 28 +-- .../Styles/AnimationsPage/AnimationsPage.tsx | 2 +- .../BrandIconsPage/BrandIconsPage.module.scss | 4 +- .../Styles/BrandIconsPage/BrandIconsPage.tsx | 16 +- .../Styles/ColorsPage/ColorsPage.module.scss | 2 +- .../pages/Styles/ColorsPage/ColorsPage.tsx | 6 +- .../pages/Styles/LayoutPage/LayoutPage.tsx | 88 ++++---- .../LocalizationPage.module.scss | 2 +- apps/fabric-website/src/styles/_mixins.scss | 14 +- .../fabric-website/src/styles/_overrides.scss | 4 +- .../src/styles/_typography.scss | 1 - .../fabric-website/src/styles/_variables.scss | 2 +- apps/todo-app/index.html | 2 +- apps/todo-app/package.json | 2 +- apps/todo-app/src/components/Todo.module.scss | 6 +- apps/todo-app/src/components/TodoItem.tsx | 6 +- apps/todo-app/src/types/IDataProvider.ts | 1 + .../changes/beta-core-6_2017-04-24-19-30.json | 15 ++ common/npm-shrinkwrap.json | 71 ++++--- .../rush-example-app-base/package.json | 4 +- .../rush-example-component/package.json | 6 +- .../rush-fabric-website/package.json | 8 +- .../rush-office-ui-fabric-react/package.json | 6 +- .../temp_modules/rush-ssr-tests/package.json | 2 +- common/temp_modules/rush-styling/package.json | 2 +- .../rush-test-bundle-button/package.json | 2 +- .../temp_modules/rush-todo-app/package.json | 4 +- packages/example-app-base/package.json | 2 +- .../example-app-base/src/common/_common.scss | 2 +- .../src/components/App/App.scss | 10 +- .../src/components/App/App.tsx | 2 +- .../ComponentPage/ComponentPage.scss | 12 +- .../components/ExampleCard/ExampleCard.scss | 8 +- .../src/components/Header/Header.scss | 4 +- packages/office-ui-fabric-react/gulpfile.js | 4 +- packages/office-ui-fabric-react/package.json | 4 +- .../src/common/_common.scss | 2 +- .../src/components/Breadcrumb/Breadcrumb.scss | 5 +- .../src/components/Button/BaseButton.scss | 2 +- .../src/components/Calendar/Calendar.scss | 25 ++- .../src/components/Calendar/Calendar.tsx | 2 +- .../src/components/Callout/Callout.scss | 3 +- .../src/components/Callout/CalloutContent.tsx | 2 +- .../src/components/Check/Check.scss | 2 +- .../src/components/Checkbox/Checkbox.scss | 1 - .../components/ChoiceGroup/ChoiceGroup.scss | 31 ++- .../src/components/CommandBar/CommandBar.scss | 7 +- .../src/components/DatePicker/DatePicker.scss | 4 +- .../components/DetailsList/DetailsHeader.scss | 2 +- .../src/components/DetailsList/DetailsRow.tsx | 2 +- .../src/components/Dialog/Dialog.scss | 12 +- .../components/DocumentCard/DocumentCard.scss | 14 +- .../src/components/Dropdown/Dropdown.scss | 8 +- .../src/components/Fabric/Fabric.tsx | 2 +- .../src/components/Facepile/Facepile.scss | 2 +- .../components/GroupedList/GroupFooter.scss | 1 - .../components/GroupedList/GroupHeader.scss | 10 +- .../components/GroupedList/GroupedList.scss | 3 +- .../src/components/Icon/IconName.ts | 201 +++++++++++++++++- .../src/components/Image/Image.scss | 2 +- .../src/components/Image/Image.tsx | 2 +- .../src/components/Label/Label.scss | 2 +- .../Layer/examples/Layer.Basic.Example.tsx | 2 +- .../Layer/examples/Layer.Hosted.Example.tsx | 2 +- .../src/components/Link/Link.scss | 1 - .../List/examples/List.Mail.Example.scss | 10 +- .../List/examples/List.Scrolling.Example.scss | 4 +- .../src/components/MessageBar/MessageBar.scss | 3 +- .../src/components/Modal/Modal.scss | 12 +- .../src/components/Nav/Nav.scss | 14 +- .../src/components/Nav/Nav.tsx | 4 +- .../src/components/Panel/Panel.scss | 56 ++--- .../src/components/Panel/Panel.tsx | 12 +- .../src/components/Persona/Persona.scss | 35 ++- .../src/components/Pivot/Pivot.scss | 11 +- .../ProgressIndicator/ProgressIndicator.scss | 1 - .../src/components/Rating/Rating.scss | 2 +- .../src/components/SearchBox/SearchBox.scss | 12 +- .../src/components/Slider/Slider.scss | 4 +- .../src/components/Spinner/Spinner.scss | 2 +- .../TeachingBubble/TeachingBubble.scss | 4 +- .../src/components/TextField/TextField.scss | 32 +-- .../src/components/TextField/TextField.tsx | 2 +- .../src/components/Theme/ThemePage.scss | 2 +- .../src/components/Toggle/Toggle.scss | 10 +- .../src/components/Tooltip/Tooltip.scss | 2 +- .../src/components/Tooltip/Tooltip.tsx | 2 +- .../pickers/Suggestions/Suggestions.scss | 8 +- .../src/demo/GettingStartedPage.scss | 2 +- rush.json | 2 +- 125 files changed, 961 insertions(+), 563 deletions(-) create mode 100644 apps/component-demo/gulpfile.js create mode 100644 apps/component-demo/index.html create mode 100644 apps/component-demo/package.json create mode 100644 apps/component-demo/src/index.tsx create mode 100644 apps/component-demo/tsconfig.json create mode 100644 apps/component-demo/tsd.json create mode 100644 apps/component-demo/webpack.config.js create mode 100644 common/changes/beta-core-6_2017-04-24-19-30.json diff --git a/.gitignore b/.gitignore index e4b4a333dfaa8..288c84d1f2972 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,9 @@ common/npmx-recycler common/rush-link.json common/last-install.* common/rush-recycler + +# Gulp cache +gulp-cache + +# NPM debug logs +npm-debug.log.* diff --git a/apps/component-demo/gulpfile.js b/apps/component-demo/gulpfile.js new file mode 100644 index 0000000000000..c2007dcf9e087 --- /dev/null +++ b/apps/component-demo/gulpfile.js @@ -0,0 +1,41 @@ +'use strict'; + +let build = require('@microsoft/web-library-build'); +let serial = build.serial; + +build.tslint.isEnabled = () => false; +build.karma.isEnabled = () => false; + +/* Configure TypeScript 2.0. */ +build.typescript.setConfig({ typescript: require('typescript') }); + +// Set up a "rushBuild" subTask that will spawn rush build +let fs = require('fs'); +let spawn = require('child_process').spawn; +let rawStdout = new fs.SyncWriteStream(1, { autoClose: false }); + +let rushBuild = build.subTask('rushbuild', (gulp, options, done) => { + let child = spawn( + 'rush', + ['build', '--to', 'component-demo'] + ); + + child.stdout.on('data', data => rawStdout.write(data)); + child.on('close', done); +}); + +const sourceMatch = [ + 'src/**/*.{ts,tsx,scss,js,txt,html}', + '!src/**/*.scss.ts' +]; + +build.task('serve', serial( + build.serve, + build.watch(sourceMatch, serial( + rushBuild, + build.reload + )))); + +build.initialize(require('gulp')); + + diff --git a/apps/component-demo/index.html b/apps/component-demo/index.html new file mode 100644 index 0000000000000..65d95ddc6ccb1 --- /dev/null +++ b/apps/component-demo/index.html @@ -0,0 +1,20 @@ + + + + + + + + + Fabric React Component + + + + + + + + + + + \ No newline at end of file diff --git a/apps/component-demo/package.json b/apps/component-demo/package.json new file mode 100644 index 0000000000000..3e40879e6a34d --- /dev/null +++ b/apps/component-demo/package.json @@ -0,0 +1,33 @@ +{ + "name": "component-demo", + "description": "Simple demo of a Fabric React component.", + "version": "1.0.1", + "scripts": { + "build": "gulp", + "clean": "gulp clean", + "start": "gulp serve", + "test": "gulp test" + }, + "devDependencies": { + "@microsoft/web-library-build": "3.0.0" + }, + "dependencies": { + "@microsoft/load-themed-styles": ">=1.2.2 <2.0.0", + "@types/chai": "^3.4.35", + "@types/es6-promise": "^0.0.32", + "@types/immutability-helper": "^2.0.15", + "@types/mocha": "^2.2.32", + "@types/node": "^6.0.45", + "@types/react": "^15.0.16", + "@types/react-addons-test-utils": "^0.14.17", + "@types/react-dom": "^0.14.23", + "@types/webpack-env": "^1.13.0", + "es6-promise": ">=3.2.1 <4.0.0", + "immutability-helper": "^2.0.0", + "office-ui-fabric-core": "7.0.0", + "office-ui-fabric-react": ">=1.5.5 <2.0.0", + "react": ">=15.3.2 <16.0.0", + "react-dom": ">=15.3.2 <16.0.0", + "typescript": "^2.0.6" + } +} \ No newline at end of file diff --git a/apps/component-demo/src/index.tsx b/apps/component-demo/src/index.tsx new file mode 100644 index 0000000000000..c09ed6f9d014f --- /dev/null +++ b/apps/component-demo/src/index.tsx @@ -0,0 +1,24 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; + +import { Fabric } from 'office-ui-fabric-react/lib/Fabric'; +import { TextField } from 'office-ui-fabric-react/lib/components/TextField'; + +let _rootDiv: HTMLElement; + +function start(): void { + if (!_rootDiv) { + _rootDiv = document.createElement('div'); + document.body.appendChild(_rootDiv); + } + + ReactDOM.render( + +

Component Demo

+ +
, + _rootDiv); +} + +// Start the application. +start(); diff --git a/apps/component-demo/tsconfig.json b/apps/component-demo/tsconfig.json new file mode 100644 index 0000000000000..f287ad2753ab5 --- /dev/null +++ b/apps/component-demo/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "jsx": "react", + "declaration": true, + "sourceMap": true, + "experimentalDecorators": true, + "noEmitOnError": true, + "moduleResolution": "node", + "types": [ + "chai", + "mocha", + "webpack-env" + ] + }, + "exclude": [ + "node_modules", + "dist", + "lib", + "lib-amd" + ] +} \ No newline at end of file diff --git a/apps/component-demo/tsd.json b/apps/component-demo/tsd.json new file mode 100644 index 0000000000000..a912a39c8c9c9 --- /dev/null +++ b/apps/component-demo/tsd.json @@ -0,0 +1,15 @@ +{ + "version": "v4", + "repo": "borisyankov/DefinitelyTyped", + "ref": "master", + "path": "typings", + "bundle": "typings/tsd.d.ts", + "installed": { + "react/react-dom.d.ts": { + "commit": "33585c55fbb7cd3cfc59d18a3b87f4ae6012eaff" + }, + "react/react.d.ts": { + "commit": "33585c55fbb7cd3cfc59d18a3b87f4ae6012eaff" + } + } +} diff --git a/apps/component-demo/webpack.config.js b/apps/component-demo/webpack.config.js new file mode 100644 index 0000000000000..3fb1f0a32ca1a --- /dev/null +++ b/apps/component-demo/webpack.config.js @@ -0,0 +1,59 @@ +'use strict'; + +/** Note: this require may need to be fixed to point to the build that exports the gulp-core-build-webpack instance. */ +let webpackTaskResources = require('@microsoft/web-library-build').webpack.resources; +let webpack = webpackTaskResources.webpack; + +let path = require('path'); +let isProduction = process.argv.indexOf('--production') > -1; +let packageJSON = require('./package.json'); + +let webpackConfig = { + context: path.join(__dirname, 'lib/'), + + entry: { + [packageJSON.name]: './index.js' + }, + + output: { + libraryTarget: 'umd', + path: path.join(__dirname, '/dist'), + filename: `[name]${isProduction ? '.min' : ''}.js` + }, + + devtool: 'source-map', + + devServer: { + stats: 'none' + }, + + externals: [ + { + 'react': 'React' + + }, + { + 'react-dom': 'ReactDOM' + } + ], + + module: { + loaders: [ + ] + }, + + plugins: [ + // new WebpackNotifierPlugin() + ] +}; + +if (isProduction) { + webpackConfig.plugins.push(new webpack.optimize.UglifyJsPlugin({ + minimize: true, + compress: { + warnings: false + } + })); +} + +module.exports = webpackConfig; \ No newline at end of file diff --git a/apps/fabric-website/package.json b/apps/fabric-website/package.json index ae9537b5e350b..bd8706aef01ef 100644 --- a/apps/fabric-website/package.json +++ b/apps/fabric-website/package.json @@ -51,7 +51,7 @@ "color-functions": "1.1.0", "json-loader": "^0.5.4", "load-themed-styles": "^1.1.0", - "office-ui-fabric-core": ">=5.1.0 <6.0.0", + "office-ui-fabric-core": ">=7.0.0 <8.0.0", "office-ui-fabric-react": ">=2.34.2 <3.0.0", "@uifabric/utilities": ">=1.10.2 <2.0.0" } diff --git a/apps/fabric-website/src/components/App/App.scss b/apps/fabric-website/src/components/App/App.scss index c50357077e9a6..90f73c7314f9e 100644 --- a/apps/fabric-website/src/components/App/App.scss +++ b/apps/fabric-website/src/components/App/App.scss @@ -33,7 +33,7 @@ font-weight: $ms-font-weight-regular; height: $App-mobileNavBarHeight; line-height: $App-mobileNavBarHeight; - @include margin-right(12px); + @include ms-margin-right(12px); padding: 0; &:focus { @@ -52,12 +52,12 @@ .App-nav { -webkit-overflow-scrolling: touch; // Improves scrolling performance bottom: 0; - @include left(-$Nav-width); + @include ms-left(-$Nav-width); overflow-y: auto; position: fixed; top: $Header-height + $App-mobileNavBarHeight; - transition: $ms-duration2 $ms-ease1; - @include transition-property(left); + transition: $ms-animation-duration-2 $ms-animation-ease-1; + @include ms-transition-property(left); width: $Nav-width; } @@ -69,7 +69,7 @@ margin-top: $App-mobileNavBarHeight; // Move it down below the mobile nav bar overflow: hidden; position: relative; - transition: all $ms-duration2 $ms-ease1; + transition: all $ms-animation-duration-2 $ms-animation-ease-1; @include high-contrast { border-right: 1px solid $ms-color-white; @@ -91,7 +91,7 @@ } // When the nav is open (smaller screens only) push the content over and prevent app from scrolling - @media screen and (max-width: $ms-screen-lg-max) { + @media screen and (max-width: $ms-screen-max-lg) { .App.is-navOpen { bottom: 0; left: 0; @@ -101,7 +101,7 @@ top: 0; .App-mobileNavBar { - @include padding-left(36px); // Align to menu items + @include ms-padding-left(36px); // Align to menu items } .App-mobileNavOverlay { @@ -109,25 +109,25 @@ bottom: 0; display: block; position: absolute; - @include left($Nav-width); - @include right(0); + @include ms-left($Nav-width); + @include ms-right(0); top: 0; z-index: 1; } .App-nav { - @include left(0); + @include ms-left(0); } .App-content { - @include left($Nav-width); + @include ms-left($Nav-width); opacity: 0.5; // Dim the content } } } // Show the nav at all times, to the left of the content - @media screen and (min-width: $ms-screen-xl-min) { + @media screen and (min-width: $ms-screen-min-xl) { .App-wrapper { flex-direction: row; } @@ -137,7 +137,7 @@ } .App-nav { - @include left(auto); + @include ms-left(auto); top: auto; // Mobile nav bar is no longer there position: relative; overflow-y: visible @@ -152,11 +152,11 @@ // Reset values for the nav and content if opened on larger screens .App.is-navOpen { .App-nav { - @include left(auto); + @include ms-left(auto); } .App-content { - @include left(auto); + @include ms-left(auto); } } } diff --git a/apps/fabric-website/src/components/ColorTable/ColorTable.module.scss b/apps/fabric-website/src/components/ColorTable/ColorTable.module.scss index b382bdf136f99..a158967924844 100644 --- a/apps/fabric-website/src/components/ColorTable/ColorTable.module.scss +++ b/apps/fabric-website/src/components/ColorTable/ColorTable.module.scss @@ -13,5 +13,5 @@ } .screenReaderOnly { - @include ms-u-screenReaderOnly; + @include ms-screenReaderOnly; } \ No newline at end of file diff --git a/apps/fabric-website/src/components/DONavigation/DONavigation.tsx b/apps/fabric-website/src/components/DONavigation/DONavigation.tsx index 22586eb24a010..e56da4d563c1d 100644 --- a/apps/fabric-website/src/components/DONavigation/DONavigation.tsx +++ b/apps/fabric-website/src/components/DONavigation/DONavigation.tsx @@ -17,8 +17,8 @@ export class DONavigation extends React.Component
-
+
{ this._getLinks(links.exploreLinks.firstMenuColumn) }
-
+
{ this._getLinks(links.exploreLinks.secondMenuColumn) }
-
+
{ this._getLinks(links.exploreLinks.thirdMenuColumn) }
@@ -224,21 +224,21 @@ export class DONavigation extends React.Component {

Use our design language in your own experience

-
+
Illustration of Typography and color swatches.
Styles
Fabric gives you access to Segoe, Microsoft’s official typeface, along with the color palette, type ramp, icons, and responsive grid for Office 365.
-
+
Illustration of Icons
Icons
Fabric includes Office’s official product icons. Fabric also provides a suite of product and document symbols, so you can use the same metaphors we use.
-
+
Illustration of Components
Components
Components are the building blocks of your UI. Fabric has a variety of components, including navigation, commands, containers, and content.
diff --git a/apps/fabric-website/src/pages/HomePage/HomePage.module.scss b/apps/fabric-website/src/pages/HomePage/HomePage.module.scss index bfc967540864e..99f5004900ac6 100644 --- a/apps/fabric-website/src/pages/HomePage/HomePage.module.scss +++ b/apps/fabric-website/src/pages/HomePage/HomePage.module.scss @@ -73,7 +73,7 @@ margin-top: 16px; } -@media screen and (min-width: $ms-screen-lg-min) { +@media screen and (min-width: $ms-screen-min-lg) { .hero { padding-bottom: 120px; } @@ -83,7 +83,7 @@ } } -@media screen and (min-width: $ms-screen-xl-min) { +@media screen and (min-width: $ms-screen-min-xl) { .hero { padding-top: 140px; } @@ -115,7 +115,7 @@ a { color: $color-home-lighter; font-size: $ms-font-size-m; - transition: color $ms-duration2 $ms-ease1; + transition: color $ms-animation-duration-2 $ms-animation-ease-1; &:hover { color: $ms-color-white; @@ -146,7 +146,7 @@ text-align: center; } -@media screen and (min-width: $ms-screen-lg-min) { +@media screen and (min-width: $ms-screen-min-lg) { .flavors { flex-direction: row; padding-bottom: 72px; @@ -211,7 +211,7 @@ a, a:visited { color: $color-home-medium; - transition: color $ms-duration2 $ms-ease1; + transition: color $ms-animation-duration-2 $ms-animation-ease-1; } a:hover, a:active { @@ -227,7 +227,7 @@ background-color: $ms-color-neutralLight; } -@media screen and (min-width: $ms-screen-lg-min) { +@media screen and (min-width: $ms-screen-min-lg) { .product { flex-direction: row; padding-bottom: 60px; @@ -250,7 +250,7 @@ } } -@media screen and (min-width: $ms-screen-xl-min) { +@media screen and (min-width: $ms-screen-min-xl) { .productImage { width: 50%; } @@ -303,7 +303,7 @@ color: $ms-color-neutralLight; display: block; font-size: $ms-font-size-l; - transition: color $ms-duration2 $ms-ease1; + transition: color $ms-animation-duration-2 $ms-animation-ease-1; } &:hover { @@ -326,7 +326,7 @@ } } -@media screen and (min-width: $ms-screen-lg-min) { +@media screen and (min-width: $ms-screen-min-lg) { .featureList { flex-direction: row; flex-wrap: wrap; @@ -337,7 +337,7 @@ } } -@media screen and (min-width: $ms-screen-xl-min) { +@media screen and (min-width: $ms-screen-min-xl) { .featureList li { width: 23%; // @todo: Same here, better to use pixels that snap to grid } diff --git a/apps/fabric-website/src/pages/Interstitials/AngularJSPage.tsx b/apps/fabric-website/src/pages/Interstitials/AngularJSPage.tsx index 9ff7fdbd82683..678f664ca1129 100644 --- a/apps/fabric-website/src/pages/Interstitials/AngularJSPage.tsx +++ b/apps/fabric-website/src/pages/Interstitials/AngularJSPage.tsx @@ -16,11 +16,11 @@ export class AngularJSPage extends React.Component {
-
+

Using Angular to build out your experience? The ngOfficeUIFabric project makes it easy to use Fabric in Angular-based apps.

ngOfficeUIFabric is a community effort to build components for Angular-based apps. Watch the Channel 9 video, Angular Directives for Office UI Fabric, to learn more about the project.

-
+
@@ -30,15 +30,15 @@ export class AngularJSPage extends React.Component {
-
+
Efficient and easy to use

ngOfficeUIFabric includes Angular elements that not only implement Fabric controls like tables, input controls, and lists, but also add functionality.

-
+
Community-driven

This project is built by developers to help developers who want to use Angular and blend in with Office. Your contributions are welcome!

-
+
Based on Fabric

This project uses Fabric styles for its components. Because Fabric is open source, you can create a version that uses your favorite framework too.

diff --git a/apps/fabric-website/src/pages/Interstitials/FabricIOSPage.tsx b/apps/fabric-website/src/pages/Interstitials/FabricIOSPage.tsx index c5de4b6426b7b..0d9ee3015c473 100644 --- a/apps/fabric-website/src/pages/Interstitials/FabricIOSPage.tsx +++ b/apps/fabric-website/src/pages/Interstitials/FabricIOSPage.tsx @@ -15,7 +15,7 @@ export class FabricIOSPage extends React.Component {
-
+

Use Fabric styling and components written in native Swift to integrate your iOS experience with Office.

Fabric iOS includes core design elements along with components that are used in iOS Office products like the SharePoint iOS app.

@@ -26,15 +26,15 @@ export class FabricIOSPage extends React.Component {
-
+
Includes core Fabric styles

Fabric iOS includes core styles such as colors, the official Office iOS type ramp, and guidance for adding your own icons.

-
+
Adds unique components

Fabric iOS includes native customizations to buttons, labels, and text fields along with unique components like InitialsView and LogoView.

-
+
Open source

Fabric iOS is open source so you can file issues, submit bug fixes, or add new functionality. We welcome your contributions!

diff --git a/apps/fabric-website/src/pages/Interstitials/FabricJSPage.tsx b/apps/fabric-website/src/pages/Interstitials/FabricJSPage.tsx index 788a69f20044c..c46e45ddacf0f 100644 --- a/apps/fabric-website/src/pages/Interstitials/FabricJSPage.tsx +++ b/apps/fabric-website/src/pages/Interstitials/FabricJSPage.tsx @@ -16,11 +16,11 @@ export class FabricJSPage extends React.Component {
-
+

Fabric JS provides a set of basic components that show the visual language of Office.

This open source project includes components that don’t require a framework. You can use them to create simple experiences or extend them with the framework of your choice.

-
+
@@ -30,15 +30,15 @@ export class FabricJSPage extends React.Component {
-
+
Focused on styling

Fabric JS shows the basic visuals of the core Fabric building blocks. The components are simple and lightweight.

-
+
Framework-independent

Use Fabric JS components directly in simple experiences or as the foundation for controls that you implement in a different framework.

-
+
Open source

Fabric JS is open source so you can file issues, submit bug fixes, or add new functionality. We welcome your contributions!

diff --git a/apps/fabric-website/src/pages/Overviews/Overviews.module.scss b/apps/fabric-website/src/pages/Overviews/Overviews.module.scss index 2063e374562f5..96a99c02201ac 100644 --- a/apps/fabric-website/src/pages/Overviews/Overviews.module.scss +++ b/apps/fabric-website/src/pages/Overviews/Overviews.module.scss @@ -9,7 +9,7 @@ a, a:visited { color: $ms-color-white; - transition: color $ms-duration2 $ms-ease1; + transition: color $ms-animation-duration-2 $ms-animation-ease-1; } img { @@ -72,7 +72,7 @@ width: 50%; } -@media screen and (min-width: $ms-screen-lg-min) { +@media screen and (min-width: $ms-screen-min-lg) { .features { flex-direction: row; @@ -83,7 +83,7 @@ } } -@media screen and (min-width: $ms-screen-xl-min) { +@media screen and (min-width: $ms-screen-min-xl) { .header p, .features { max-width: 53%; @@ -98,7 +98,7 @@ position: absolute; top: -40px; height: 340px; - @include right(120px); + @include ms-right(120px); z-index: 500; } } diff --git a/apps/fabric-website/src/pages/ResourcesPage/ResourcesPage.module.scss b/apps/fabric-website/src/pages/ResourcesPage/ResourcesPage.module.scss index 68cb09a031b98..8926bafd8f1da 100644 --- a/apps/fabric-website/src/pages/ResourcesPage/ResourcesPage.module.scss +++ b/apps/fabric-website/src/pages/ResourcesPage/ResourcesPage.module.scss @@ -80,7 +80,7 @@ bottom: 0; content: ''; height: 6px; - @include left(0); + @include ms-left(0); position: absolute; width: 80%; } @@ -92,7 +92,7 @@ } } -@media screen and (min-width: $ms-screen-lg-min) { +@media screen and (min-width: $ms-screen-min-lg) { .angle { margin-top: 0; // Move back down to ensure room for in-page nav min-height: 120px; @@ -107,7 +107,7 @@ } } -@media screen and (min-width: $ms-screen-lg-min) { +@media screen and (min-width: $ms-screen-min-lg) { .reachOut { margin-bottom: 80px; } diff --git a/apps/fabric-website/src/pages/ResourcesPage/ResourcesPage.tsx b/apps/fabric-website/src/pages/ResourcesPage/ResourcesPage.tsx index 1fd018ea1247a..73d7b228b3d8f 100644 --- a/apps/fabric-website/src/pages/ResourcesPage/ResourcesPage.tsx +++ b/apps/fabric-website/src/pages/ResourcesPage/ResourcesPage.tsx @@ -32,7 +32,7 @@ export class ResourcesPage extends React.Component {
-
+
Github logo
@@ -40,7 +40,7 @@ export class ResourcesPage extends React.Component { We’re on GitHub, so you can file issues and contribute to the projects. See projects
-
+
Twitter logo
@@ -55,10 +55,10 @@ export class ResourcesPage extends React.Component {
-
+

Learn more with tutorials and resources

-
+

Use the tutorials and additional resources on this page to learn how to get Fabric running in your projects.

Tutorials

diff --git a/apps/fabric-website/src/pages/Styles/AnimationsPage/AnimationsPage.scss b/apps/fabric-website/src/pages/Styles/AnimationsPage/AnimationsPage.scss index aeb70283aec73..70b16cc7eb804 100644 --- a/apps/fabric-website/src/pages/Styles/AnimationsPage/AnimationsPage.scss +++ b/apps/fabric-website/src/pages/Styles/AnimationsPage/AnimationsPage.scss @@ -44,9 +44,9 @@ } .docs_animationsTable_body { // override for demo purposes - .ms-u-slideRightOut40, .ms-u-slideLeftOut40, .ms-u-slideUpOut20, .ms-u-slideUpOut10, - .ms-u-slideDownOut20, .ms-u-slideDownOut10, .ms-u-scaleUpOut103, .ms-u-scaleDownOut98, - .ms-u-fadeOut100, .ms-u-fadeOut200, .ms-u-fadeOut400, .ms-u-fadeOut500 { + .slideRightOut40, .slideLeftOut40, .slideUpOut20, .slideUpOut10, + .slideDownOut20, .slideDownOut10, .scaleUpOut103, .scaleDownOut98, + .fadeOut100, .fadeOut200, .fadeOut400, .fadeOut500 { -webkit-animation-play-state: paused; animation-play-state: paused; @@ -57,24 +57,24 @@ } } - .ms-u-slideRightOut40, .ms-u-slideLeftOut40, .ms-u-slideLeftIn10, .ms-u-slideLeftIn20, .ms-u-slideLeftIn40 { + .slideRightOut40, .slideLeftOut40, .slideLeftIn10, .slideLeftIn20, .slideLeftIn40 { .animationExample_panel { right: 0; } } - .ms-u-slideLeftOut40 { + .slideLeftOut40 { .animationExample_panel { left: 0; } } - .ms-u-slideUpOut20, .ms-u-slideUpOut10, .ms-u-slideDownOut20, .ms-u-slideDownOut10 { + .slideUpOut20, .slideUpOut10, .slideDownOut20, .slideDownOut10 { .animationExample_panel { width: 100%; height: 30px; top: 0; } } - .ms-u-slideUpOut10, .ms-u-slideDownOut10 { + .slideUpOut10, .slideDownOut10 { .animationExample_panel { width: 60px; top: 10px; @@ -82,15 +82,15 @@ height: 20px; } } - .ms-u-slideDownOut10, .ms-u-slideDownOut20 { + .slideDownOut10, .slideDownOut20 { .animationExample_panel { top: 60px; } } - .ms-u-scaleUpIn100, - .ms-u-scaleDownIn100, - .ms-u-scaleUpOut103, - .ms-u-scaleDownOut98 { + .scaleUpIn100, + .scaleDownIn100, + .scaleUpOut103, + .scaleDownOut98 { overflow: visible; .animationExample_panel { height: 100%; @@ -174,7 +174,7 @@ } } - .ms-u-fadeIn100, .ms-u-fadeIn200, .ms-u-fadeIn400, .ms-u-fadeIn500 { + .fadeIn100, .fadeIn200, .fadeIn400, .fadeIn500 { .animationExample_panel { height: 100%; width: 100%; @@ -182,7 +182,7 @@ } } - .ms-u-fadeOut100, .ms-u-fadeOut200, .ms-u-fadeOut400, .ms-u-fadeOut500 { + .fadeOut100, .fadeOut200, .fadeOut400, .fadeOut500 { .animationExample_panel { height: 100%; width: 100%; diff --git a/apps/fabric-website/src/pages/Styles/AnimationsPage/AnimationsPage.tsx b/apps/fabric-website/src/pages/Styles/AnimationsPage/AnimationsPage.tsx index 5054984f299cb..29a2e7432e33c 100644 --- a/apps/fabric-website/src/pages/Styles/AnimationsPage/AnimationsPage.tsx +++ b/apps/fabric-website/src/pages/Styles/AnimationsPage/AnimationsPage.tsx @@ -39,7 +39,7 @@ export class AnimationsPage extends React.Component {

Implementation

{ - `
This content will slide in.
` + `
This content will slide in.
` }
diff --git a/apps/fabric-website/src/pages/Styles/BrandIconsPage/BrandIconsPage.module.scss b/apps/fabric-website/src/pages/Styles/BrandIconsPage/BrandIconsPage.module.scss index 853548a1818e4..7bee21dff5a2a 100644 --- a/apps/fabric-website/src/pages/Styles/BrandIconsPage/BrandIconsPage.module.scss +++ b/apps/fabric-website/src/pages/Styles/BrandIconsPage/BrandIconsPage.module.scss @@ -48,7 +48,7 @@ } } -@media screen and (min-width: $ms-screen-lg-min) { +@media screen and (min-width: $ms-screen-min-lg) { .iconList { li { width: 50%; @@ -56,7 +56,7 @@ } } -@media screen and (min-width: $ms-screen-xl-min) { +@media screen and (min-width: $ms-screen-min-xl) { .iconList { li { width: 33%; diff --git a/apps/fabric-website/src/pages/Styles/BrandIconsPage/BrandIconsPage.tsx b/apps/fabric-website/src/pages/Styles/BrandIconsPage/BrandIconsPage.tsx index b6ef69adeb34c..a4395dfc5e5e7 100644 --- a/apps/fabric-website/src/pages/Styles/BrandIconsPage/BrandIconsPage.tsx +++ b/apps/fabric-website/src/pages/Styles/BrandIconsPage/BrandIconsPage.tsx @@ -57,10 +57,10 @@ export class BrandIconsPage extends React.Component {

Product icons

-
+

Use product icons to help your users transition between Microsoft products. Product icons represent an app or brand. Do not use a product icon to create a new document of that type. For example, do not create a Word document from a Word product icon.

-
+
  • Word logo @@ -79,10 +79,10 @@ export class BrandIconsPage extends React.Component {

    Document icons

    -
    +

    Use document icons to indicate to users that they are creating a new document of that type. Make sure that a document of the type that the icon represents loads when the user selects the icon. Document icons should always represent Microsoft Office documents. For example, do not use a Word .docx icon to open a .txt file.

    -
    +
    • Docx documents SVG @@ -101,13 +101,13 @@ export class BrandIconsPage extends React.Component {

      Formats and sizes

      -
      +

      Multicolor product and document icons look best at 16x16, 48x48, and 96x96 px sizes in the UI of Microsoft products. Fabric provides these icons in both SVG and PNG formats. SVGs are more versatile but are not supported by all browsers. PNGs are supported by most browsers, but require many sizes to remain visually crisp.

      PNGs come in 16x16, 32x32, 48x48, and 96x96 pixel sizes. Where possible, use the default sizes to prevent artifacts and split pixels. Otherwise, use a size that is close to one of the default sizes.

      Because SVGs are vectors, you can resize them more easily. They come in two sizes: 16x16 and 48x48 px. Use the size that most closely maps to what you need for your experience for the best quality.

      Monochrome product icons that are included in the icon font are subject to the branding guidelines, but you can reference them just like other icons noted in the icons section.

      -
      +
      • Outlook 16x1 PNG product icon @@ -139,10 +139,10 @@ export class BrandIconsPage extends React.Component {

        Resolutions

        -
        +

        Fabric provides multicolor icons of each type and size at different resolutions to accommodate pixel densities and scaling factors across mobile, laptop, and desktop screens. Choose the right resolution for your viewport to avoid icons that appear blurry. The resolution guidance doesn’t apply to the monochrome font icons.

        -
        +
+
) => this._navigateMonthEdge(ev, day.originalDate, weekIndex, dayIndex) } aria-selected={ day.isSelected } - aria-label={ day.originalDate.toLocaleDateString ? day.originalDate.toLocaleDateString() : day.originalDate.getDate() } + aria-label={ day.originalDate.toLocaleString ? + day.originalDate.toLocaleString([], { day: 'numeric', month: 'long', year: 'numeric' }) : day.originalDate.getDate() } id={ compareDates(navigatedDate, day.originalDate) ? activeDescendantId : null } data-is-focusable={ true } ref={ compareDates(navigatedDate, day.originalDate) ? 'navigatedDay' : null } key={ compareDates(navigatedDate, day.originalDate) ? 'navigatedDay' : null } > - { day.date } +
diff --git a/apps/fabric-website/src/pages/Styles/ColorsPage/ColorsPage.module.scss b/apps/fabric-website/src/pages/Styles/ColorsPage/ColorsPage.module.scss index f8b242e44111d..4b84067e5a52e 100644 --- a/apps/fabric-website/src/pages/Styles/ColorsPage/ColorsPage.module.scss +++ b/apps/fabric-website/src/pages/Styles/ColorsPage/ColorsPage.module.scss @@ -1,7 +1,7 @@ @import '../../../styles/variables'; // XL and up -@media screen and (min-width: $ms-screen-xl-min) { +@media screen and (min-width: $ms-screen-min-xl) { .accentGroup { min-height: 320px; // Set a minimum height to prevent groups from wrapping poorly (they are floated) } diff --git a/apps/fabric-website/src/pages/Styles/ColorsPage/ColorsPage.tsx b/apps/fabric-website/src/pages/Styles/ColorsPage/ColorsPage.tsx index fbdcbb17d3c4e..8cd67a1e6c89e 100644 --- a/apps/fabric-website/src/pages/Styles/ColorsPage/ColorsPage.tsx +++ b/apps/fabric-website/src/pages/Styles/ColorsPage/ColorsPage.tsx @@ -48,11 +48,11 @@ export class ColorsPage extends React.Component {
-
+

Theme colors

-
+

Neutral colors

@@ -63,7 +63,7 @@ export class ColorsPage extends React.Component {
{ accentColorsData.map((group, groupIndex) => ( -

{ group.name }

diff --git a/apps/fabric-website/src/pages/Styles/LayoutPage/LayoutPage.tsx b/apps/fabric-website/src/pages/Styles/LayoutPage/LayoutPage.tsx index 44c3547e8db04..ca6a76c3cc89f 100644 --- a/apps/fabric-website/src/pages/Styles/LayoutPage/LayoutPage.tsx +++ b/apps/fabric-website/src/pages/Styles/LayoutPage/LayoutPage.tsx @@ -40,98 +40,98 @@ export class LayoutPage extends React.Component {
-
+
1
-
+
1
-
+
1
-
+
1
-
+
1
-
+
1
-
+
1
-
+
1
-
+
1
-
+
1
-
+
1
-
+
1
-
+
2
-
+
2
-
+
2
-
+
2
-
+
2
-
+
2
-
+
3
-
+
3
-
+
3
-
+
3
-
+
4
-
+
4
-
+
4
-
+
6
-
+
6
-
+
12
@@ -139,24 +139,24 @@ export class LayoutPage extends React.Component {

How to use

-

A grid (ms-Grid) can contain multiple rows (ms-Grid-row), each of which has one or more columns (ms-Grid-col). Utility classes (ms-u-sm6) specify how large each column should be on small, medium, and large devices. The columns in a row should add up to 12 for each device size.

+

A grid (ms-Grid) can contain multiple rows (ms-Grid-row), each of which has one or more columns (ms-Grid-col). Utility classes (ms-sm6) specify how large each column should be on small, medium, and large devices. The columns in a row should add up to 12 for each device size.

{ `
-
A
-
B
+
A
+
B
` }
-
+
A
-
+
B
@@ -164,17 +164,17 @@ export class LayoutPage extends React.Component {

Inheritance

-

Because Fabric is mobile-first, any layout defined for small screens is automatically inherited by medium and large screens. The small size utilities (ms-u-sm6) are required. If you want to change the layout on larger screens, you can apply the other utility classes.

+

Because Fabric is mobile-first, any layout defined for small screens is automatically inherited by medium and large screens. The small size utilities (ms-sm6) are required. If you want to change the layout on larger screens, you can apply the other utility classes.

Try this out! On a large screen, the example block will be smaller. Try shrinking your browser window to see how the example block will take up the entire width of the screen.

{ - `
Example
` + `
Example
` }
-
+
Example
@@ -186,16 +186,16 @@ export class LayoutPage extends React.Component {
{ - `
First in code
-
Second in code
` + `
First in code
+
Second in code
` }
-
+
First in code
-
+
Second in code
@@ -209,16 +209,16 @@ export class LayoutPage extends React.Component { { - `
Visible on smaller screens
-
Visible on larger screens
` + `
Visible on smaller screens
+
Visible on larger screens
` }
-
+
Visible on smaller screens
-
+
Visible on larger screens
diff --git a/apps/fabric-website/src/pages/Styles/LocalizationPage/LocalizationPage.module.scss b/apps/fabric-website/src/pages/Styles/LocalizationPage/LocalizationPage.module.scss index 5e9af53f9855b..74623a0928815 100644 --- a/apps/fabric-website/src/pages/Styles/LocalizationPage/LocalizationPage.module.scss +++ b/apps/fabric-website/src/pages/Styles/LocalizationPage/LocalizationPage.module.scss @@ -25,7 +25,7 @@ color: $ms-color-neutralPrimary; font-size: $ms-font-size-xs; opacity: 0; - transition: opacity $ms-duration2 $ms-ease1; + transition: opacity $ms-animation-duration-2 $ms-animation-ease-1; } &:hover { diff --git a/apps/fabric-website/src/styles/_mixins.scss b/apps/fabric-website/src/styles/_mixins.scss index 95a2a5adf8596..5e8c524abede9 100644 --- a/apps/fabric-website/src/styles/_mixins.scss +++ b/apps/fabric-website/src/styles/_mixins.scss @@ -2,11 +2,11 @@ @mixin contentPadding($paddingTop:0px, $paddingBottom:$contentPaddingBottom) { padding: $paddingTop $contentPadding-sm $paddingBottom $contentPadding-sm; - @media screen and (min-width: $ms-screen-lg-min) { + @media screen and (min-width: $ms-screen-min-lg) { padding: $paddingTop $contentPadding-lg $paddingBottom $contentPadding-lg; } - @media screen and (min-width: $ms-screen-xl-min) { + @media screen and (min-width: $ms-screen-min-xl) { padding: $paddingTop $contentPadding-xl $paddingBottom $contentPadding-xl; } } @@ -16,12 +16,12 @@ margin-left: -$contentPadding-sm; margin-right: -$contentPadding-sm; - @media screen and (min-width: $ms-screen-lg-min) { + @media screen and (min-width: $ms-screen-min-lg) { margin-left: -$contentPadding-lg; margin-right: -$contentPadding-lg; } - @media screen and (min-width: $ms-screen-xl-min) { + @media screen and (min-width: $ms-screen-min-xl) { margin-left: -$contentPadding-xl; margin-right: -$contentPadding-xl; } @@ -47,7 +47,7 @@ right: -10px; // Use http://pressbin.com/tools/urlencode_urldecode/ and encodeURIComponent() to base64-encode the SVGs - + // SVG: $colorBelowValue: str-slice('#{$colorBelow}', 2); $bottomAngle: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%225%200%20395%2042%22%3E%3Cpolygon%20fill%3D%22%23#{$colorBelowValue}%22%20points%3D%22400%2050%20400%200%200%2042%200%2050%22%2F%3E%3C%2Fsvg%3E"); @@ -67,7 +67,7 @@ background-position: center bottom; } - @media screen and (min-width: $ms-screen-lg-min) { + @media screen and (min-width: $ms-screen-min-lg) { height: 140px; // Make room for wider angle } } @@ -100,7 +100,7 @@ color: $foregroundColor; letter-spacing: 0.03em; padding: 8px 20px 10px 20px; - transition: all $ms-duration2 $ms-ease1; + transition: all $ms-animation-duration-2 $ms-animation-ease-1; &:hover { background-color: $foregroundColor; diff --git a/apps/fabric-website/src/styles/_overrides.scss b/apps/fabric-website/src/styles/_overrides.scss index ccc9bfd7da018..ff2caa9f60f68 100644 --- a/apps/fabric-website/src/styles/_overrides.scss +++ b/apps/fabric-website/src/styles/_overrides.scss @@ -8,7 +8,7 @@ // Modifier to increase the Grid's gutters depending on screen size .ms-Grid--wide { - @media screen and (min-width: $ms-screen-lg-min) { + @media screen and (min-width: $ms-screen-min-lg) { margin: 0 (-$contentPadding-lg / 2); padding: 0 ($contentPadding-lg / 2); @@ -21,7 +21,7 @@ } } - @media screen and (min-width: $ms-screen-xl-min) { + @media screen and (min-width: $ms-screen-min-xl) { margin: 0 (-$contentPadding-xl / 2); padding: 0 ($contentPadding-xl / 2); diff --git a/apps/fabric-website/src/styles/_typography.scss b/apps/fabric-website/src/styles/_typography.scss index e525122955eda..a13a653687c4b 100644 --- a/apps/fabric-website/src/styles/_typography.scss +++ b/apps/fabric-website/src/styles/_typography.scss @@ -2,7 +2,6 @@ :global { body { color: $ms-color-neutralPrimary; - font-family: $ms-font-family-base; font-size: $ms-font-size-m; line-height: 1.5; } diff --git a/apps/fabric-website/src/styles/_variables.scss b/apps/fabric-website/src/styles/_variables.scss index 426b0e3b7be89..4011ba96bf501 100644 --- a/apps/fabric-website/src/styles/_variables.scss +++ b/apps/fabric-website/src/styles/_variables.scss @@ -1,5 +1,5 @@ // Import the Fabric variables and mixins -@import '../../node_modules/office-ui-fabric-core/src/sass/_Fabric.Common'; +@import '../../node_modules/office-ui-fabric-core/src/sass/References'; // Colors (all taken from the MDL2 palette) $color-home-darker: #004e8c; diff --git a/apps/todo-app/index.html b/apps/todo-app/index.html index 6428845e08308..8a7d857094fad 100644 --- a/apps/todo-app/index.html +++ b/apps/todo-app/index.html @@ -8,7 +8,7 @@ Test Page - + diff --git a/apps/todo-app/package.json b/apps/todo-app/package.json index 4ecec96f13072..c927e3454aec9 100644 --- a/apps/todo-app/package.json +++ b/apps/todo-app/package.json @@ -24,7 +24,7 @@ "@microsoft/load-themed-styles": ">=1.2.2 <2.0.0", "es6-promise": "^4.1.0", "immutability-helper": "^2.0.0", - "office-ui-fabric-core": ">=5.1.0 <6.0.0", + "office-ui-fabric-core": ">=7.0.0 <8.0.0", "office-ui-fabric-react": ">=2.34.2 <3.0.0", "react": "^15.4.2", "react-dom": "^15.4.2", diff --git a/apps/todo-app/src/components/Todo.module.scss b/apps/todo-app/src/components/Todo.module.scss index 948f6ffac6751..96ca35198a3cc 100644 --- a/apps/todo-app/src/components/Todo.module.scss +++ b/apps/todo-app/src/components/Todo.module.scss @@ -1,4 +1,4 @@ -@import "~/office-ui-fabric-core/dist/sass/Fabric.Common"; +@import "~/office-ui-fabric-core/dist/sass/References"; .todo { padding: 28px 40px 60px 40px; @@ -28,7 +28,7 @@ } .addButton { display: table-cell; - @include margin-left(16px); + @include ms-margin-left(16px); white-space: nowrap; } } @@ -49,7 +49,7 @@ top: 50%; transform: translateY(-50%); right: 0px; - @include margin-right(16px); + @include ms-margin-right(16px); &:hover, &:focus { color: $ms-color-themePrimary; diff --git a/apps/todo-app/src/components/TodoItem.tsx b/apps/todo-app/src/components/TodoItem.tsx index 19c1fa072f6cc..2fa2f1565e1ef 100644 --- a/apps/todo-app/src/components/TodoItem.tsx +++ b/apps/todo-app/src/components/TodoItem.tsx @@ -40,7 +40,7 @@ export default class TodoItem extends React.Component { styles.todoItem, this.props.item.isComplete === true ? styles.isCompleted : '', 'ms-Grid', - 'ms-u-slideDownIn20' + 'ms-slideDownIn20' ); return ( @@ -80,11 +80,11 @@ export default class TodoItem extends React.Component { } private _onCheckboxChange(ev: React.FormEvent, isChecked: boolean): void { - this._handleWithAnimation(this.props.onToggleComplete, 'ms-u-slideUpOut20'); + this._handleWithAnimation(this.props.onToggleComplete, 'ms-slideUpOut20'); } private _onDelete(event: React.MouseEvent): void { - this._handleWithAnimation(this.props.onDeleteItem, 'ms-u-slideUpOut20'); + this._handleWithAnimation(this.props.onDeleteItem, 'ms-slideUpOut20'); } private _handleWithAnimation(callback: (task: ITodoItem) => void, animationClass: string): void { diff --git a/apps/todo-app/src/types/IDataProvider.ts b/apps/todo-app/src/types/IDataProvider.ts index 2a832944bd91d..66f25f232a127 100644 --- a/apps/todo-app/src/types/IDataProvider.ts +++ b/apps/todo-app/src/types/IDataProvider.ts @@ -1,4 +1,5 @@ import { ITodoItem } from './index'; +import { Promise } from 'es6-promise'; /** * The data provider interface implemented by MockTodoDataProvider and TodoDataProvider. diff --git a/common/changes/beta-core-6_2017-04-24-19-30.json b/common/changes/beta-core-6_2017-04-24-19-30.json new file mode 100644 index 0000000000000..bda762b60a0ce --- /dev/null +++ b/common/changes/beta-core-6_2017-04-24-19-30.json @@ -0,0 +1,15 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "Updated dependency to Fabric Core 7", + "type": "major" + }, + { + "packageName": "@uifabric/example-app-base", + "comment": "Updated dependency to Fabric Core 7", + "type": "patch" + } + ], + "email": "miwhea@microsoft.com" +} \ No newline at end of file diff --git a/common/npm-shrinkwrap.json b/common/npm-shrinkwrap.json index 3806fc22904b6..192ff8b736f34 100644 --- a/common/npm-shrinkwrap.json +++ b/common/npm-shrinkwrap.json @@ -933,14 +933,21 @@ "resolved": "https://registry.npmjs.org/@types/z-schema/-/z-schema-3.16.31.tgz" }, "@uifabric/example-app-base": { - "version": "1.3.13", + "version": "1.3.14", "from": "@uifabric/example-app-base@>=1.3.12 <2.0.0", - "resolved": "https://registry.npmjs.org/@uifabric/example-app-base/-/example-app-base-1.3.13.tgz" + "resolved": "https://registry.npmjs.org/@uifabric/example-app-base/-/example-app-base-1.3.14.tgz", + "dependencies": { + "office-ui-fabric-core": { + "version": "5.1.0", + "from": "office-ui-fabric-core@>=5.0.0 <6.0.0", + "resolved": "https://registry.npmjs.org/office-ui-fabric-core/-/office-ui-fabric-core-5.1.0.tgz" + } + } }, "@uifabric/utilities": { - "version": "1.10.0", - "from": "@uifabric/utilities@>=1.10.0 <2.0.0", - "resolved": "https://registry.npmjs.org/@uifabric/utilities/-/utilities-1.10.0.tgz" + "version": "1.10.2", + "from": "@uifabric/utilities@>=1.10.2 <2.0.0", + "resolved": "https://registry.npmjs.org/@uifabric/utilities/-/utilities-1.10.2.tgz" }, "abbrev": { "version": "1.0.9", @@ -1597,9 +1604,9 @@ "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-1.6.1.tgz" }, "caniuse-db": { - "version": "1.0.30000670", + "version": "1.0.30000672", "from": "caniuse-db@>=1.0.30000488 <2.0.0", - "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000670.tgz" + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000672.tgz" }, "capture-stack-trace": { "version": "1.0.0", @@ -2099,9 +2106,9 @@ "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz" }, "css-loader": { - "version": "0.28.2", + "version": "0.28.3", "from": "css-loader@>=0.28.0 <0.29.0", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.28.2.tgz", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.28.3.tgz", "dependencies": { "loader-utils": { "version": "1.1.0", @@ -2477,9 +2484,9 @@ "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.6.tgz" }, "electron-to-chromium": { - "version": "1.3.11", + "version": "1.3.12", "from": "electron-to-chromium@>=1.2.7 <2.0.0", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.11.tgz" + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.12.tgz" }, "elliptic": { "version": "6.4.0", @@ -3916,9 +3923,9 @@ } }, "gulp-typescript": { - "version": "3.1.6", + "version": "3.1.7", "from": "gulp-typescript@>=3.1.6 <3.2.0", - "resolved": "https://registry.npmjs.org/gulp-typescript/-/gulp-typescript-3.1.6.tgz", + "resolved": "https://registry.npmjs.org/gulp-typescript/-/gulp-typescript-3.1.7.tgz", "dependencies": { "glob": { "version": "5.0.15", @@ -4173,9 +4180,9 @@ } }, "html-minifier": { - "version": "3.5.1", + "version": "3.5.2", "from": "html-minifier@>=3.0.1 <4.0.0", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.1.tgz", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.2.tgz", "dependencies": { "source-map": { "version": "0.5.6", @@ -5889,14 +5896,14 @@ "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.1.tgz" }, "office-ui-fabric-core": { - "version": "5.1.0", - "from": "office-ui-fabric-core@>=5.0.0 <6.0.0", - "resolved": "https://registry.npmjs.org/office-ui-fabric-core/-/office-ui-fabric-core-5.1.0.tgz" + "version": "7.0.0", + "from": "office-ui-fabric-core@7.0.0", + "resolved": "https://registry.npmjs.org/office-ui-fabric-core/-/office-ui-fabric-core-7.0.0.tgz" }, "office-ui-fabric-react": { - "version": "2.32.0", + "version": "2.34.1", "from": "office-ui-fabric-react@>=2.11.0-0 <3.0.0-0", - "resolved": "https://registry.npmjs.org/office-ui-fabric-react/-/office-ui-fabric-react-2.32.0.tgz" + "resolved": "https://registry.npmjs.org/office-ui-fabric-react/-/office-ui-fabric-react-2.34.1.tgz" }, "on-finished": { "version": "2.3.0", @@ -7097,9 +7104,9 @@ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.3.1.tgz" }, "webpack": { - "version": "2.6.0", + "version": "2.6.1", "from": "webpack@>=2.4.1 <3.0.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-2.6.0.tgz" + "resolved": "https://registry.npmjs.org/webpack/-/webpack-2.6.1.tgz" }, "yargs": { "version": "6.6.0", @@ -7209,9 +7216,9 @@ "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.2.1.tgz" }, "sinon": { - "version": "2.3.1", + "version": "2.3.2", "from": "sinon@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-2.3.1.tgz" + "resolved": "https://registry.npmjs.org/sinon/-/sinon-2.3.2.tgz" }, "source-map": { "version": "0.5.6", @@ -7266,9 +7273,9 @@ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.3.1.tgz" }, "webpack": { - "version": "2.6.0", + "version": "2.6.1", "from": "webpack@>=2.4.1 <3.0.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-2.6.0.tgz" + "resolved": "https://registry.npmjs.org/webpack/-/webpack-2.6.1.tgz" }, "yargs": { "version": "6.6.0", @@ -7407,9 +7414,9 @@ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.3.1.tgz" }, "webpack": { - "version": "2.6.0", + "version": "2.6.1", "from": "webpack@>=2.4.1 <3.0.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-2.6.0.tgz" + "resolved": "https://registry.npmjs.org/webpack/-/webpack-2.6.1.tgz" }, "yargs": { "version": "6.6.0", @@ -7521,9 +7528,9 @@ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.3.1.tgz" }, "webpack": { - "version": "2.6.0", + "version": "2.6.1", "from": "webpack@>=2.4.1 <3.0.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-2.6.0.tgz" + "resolved": "https://registry.npmjs.org/webpack/-/webpack-2.6.1.tgz" }, "yargs": { "version": "6.6.0", @@ -7583,9 +7590,9 @@ "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.2.1.tgz" }, "sinon": { - "version": "2.3.1", + "version": "2.3.2", "from": "sinon@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-2.3.1.tgz" + "resolved": "https://registry.npmjs.org/sinon/-/sinon-2.3.2.tgz" }, "type-detect": { "version": "4.0.3", diff --git a/common/temp_modules/rush-example-app-base/package.json b/common/temp_modules/rush-example-app-base/package.json index 9ef1253d50895..508f8438fb84f 100644 --- a/common/temp_modules/rush-example-app-base/package.json +++ b/common/temp_modules/rush-example-app-base/package.json @@ -22,11 +22,11 @@ "source-map-loader": "0.2.1", "typescript": "2.2.2", "highlight.js": "^9.9.0", - "office-ui-fabric-core": ">=5.0.0 <6.0.0", + "office-ui-fabric-core": "7.0.0", "office-ui-fabric-react": ">=2.11.0-0 <3.0.0-0" }, "rushDependencies": { "office-ui-fabric-react-tslint": ">=1.0.0 <2.0.0", - "@uifabric/utilities": "1.10.0" + "@uifabric/utilities": "1.10.2" } } diff --git a/common/temp_modules/rush-example-component/package.json b/common/temp_modules/rush-example-component/package.json index bb0a839a62de0..5f7de152afd39 100644 --- a/common/temp_modules/rush-example-component/package.json +++ b/common/temp_modules/rush-example-component/package.json @@ -33,9 +33,9 @@ "webpack-notifier": "^1.5.0" }, "rushDependencies": { - "@uifabric/example-app-base": "1.3.13", - "@uifabric/utilities": "1.10.0", - "office-ui-fabric-react": ">=2.32.0 <3.0.0", + "@uifabric/example-app-base": "1.3.14", + "@uifabric/utilities": "1.10.2", + "office-ui-fabric-react": ">=2.34.1 <3.0.0", "office-ui-fabric-react-tslint": ">=1.0.0 <2.0.0" } } diff --git a/common/temp_modules/rush-fabric-website/package.json b/common/temp_modules/rush-fabric-website/package.json index 63eae95c7e6af..4a4f1f5aee394 100644 --- a/common/temp_modules/rush-fabric-website/package.json +++ b/common/temp_modules/rush-fabric-website/package.json @@ -35,12 +35,12 @@ "color-functions": "1.1.0", "json-loader": "^0.5.4", "load-themed-styles": "^1.1.0", - "office-ui-fabric-core": ">=5.1.0 <6.0.0" + "office-ui-fabric-core": "7.0.0" }, "rushDependencies": { "office-ui-fabric-react-tslint": ">=1.0.0 <2.0.0", - "@uifabric/example-app-base": "1.3.13", - "office-ui-fabric-react": ">=2.32.0 <3.0.0", - "@uifabric/utilities": ">=1.10.0 <2.0.0" + "@uifabric/example-app-base": "1.3.14", + "office-ui-fabric-react": ">=2.34.1 <3.0.0", + "@uifabric/utilities": ">=1.10.2 <2.0.0" } } diff --git a/common/temp_modules/rush-office-ui-fabric-react/package.json b/common/temp_modules/rush-office-ui-fabric-react/package.json index ec9e889766177..7fa2daac23045 100644 --- a/common/temp_modules/rush-office-ui-fabric-react/package.json +++ b/common/temp_modules/rush-office-ui-fabric-react/package.json @@ -31,7 +31,7 @@ "mocha": "^3.2.0", "mocha-loader": "^1.1.1", "node-sass": "^4.5.0", - "office-ui-fabric-core": ">=5.0.0 <6.0.0", + "office-ui-fabric-core": "7.0.0", "postcss-loader": "^1.3.3", "raw-loader": "^0.5.1", "react": "^15.4.2", @@ -53,8 +53,8 @@ "webpack-split-by-path": "2.0.0" }, "rushDependencies": { - "@uifabric/example-app-base": "1.3.13", + "@uifabric/example-app-base": "1.3.14", "office-ui-fabric-react-tslint": ">=1.0.0 <2.0.0", - "@uifabric/utilities": ">=1.10.0 <2.0.0" + "@uifabric/utilities": ">=1.10.2 <2.0.0" } } diff --git a/common/temp_modules/rush-ssr-tests/package.json b/common/temp_modules/rush-ssr-tests/package.json index 74e4a0f90a1cb..aa14b2714e94a 100644 --- a/common/temp_modules/rush-ssr-tests/package.json +++ b/common/temp_modules/rush-ssr-tests/package.json @@ -19,6 +19,6 @@ "es6-promise": "^4.1.0" }, "rushDependencies": { - "office-ui-fabric-react": ">=2.32.0 <3.0.0" + "office-ui-fabric-react": ">=2.34.1 <3.0.0" } } diff --git a/common/temp_modules/rush-styling/package.json b/common/temp_modules/rush-styling/package.json index 98c4f4f1bb333..5a50eba8d2bad 100644 --- a/common/temp_modules/rush-styling/package.json +++ b/common/temp_modules/rush-styling/package.json @@ -39,6 +39,6 @@ }, "rushDependencies": { "office-ui-fabric-react-tslint": ">=1.0.0 <2.0.0", - "@uifabric/utilities": ">=1.10.0 <2.0.0" + "@uifabric/utilities": ">=1.10.2 <2.0.0" } } diff --git a/common/temp_modules/rush-test-bundle-button/package.json b/common/temp_modules/rush-test-bundle-button/package.json index f050db2007bdf..ae242b167d82d 100644 --- a/common/temp_modules/rush-test-bundle-button/package.json +++ b/common/temp_modules/rush-test-bundle-button/package.json @@ -18,6 +18,6 @@ "react-dom": "^0.14 || ^15.0.1-0 || ^16.0.0-0" }, "rushDependencies": { - "office-ui-fabric-react": ">=2.32.0 <3.0.0" + "office-ui-fabric-react": ">=2.34.1 <3.0.0" } } diff --git a/common/temp_modules/rush-todo-app/package.json b/common/temp_modules/rush-todo-app/package.json index 094ca87f26399..3946248b2bbb9 100644 --- a/common/temp_modules/rush-todo-app/package.json +++ b/common/temp_modules/rush-todo-app/package.json @@ -16,12 +16,12 @@ "@microsoft/load-themed-styles": ">=1.2.2 <2.0.0", "es6-promise": "^4.1.0", "immutability-helper": "^2.0.0", - "office-ui-fabric-core": ">=5.1.0 <6.0.0", + "office-ui-fabric-core": "7.0.0", "react": "^15.4.2", "react-dom": "^15.4.2", "typescript": "2.2.2" }, "rushDependencies": { - "office-ui-fabric-react": ">=2.32.0 <3.0.0" + "office-ui-fabric-react": ">=2.34.1 <3.0.0" } } diff --git a/packages/example-app-base/package.json b/packages/example-app-base/package.json index 2dc0c6e31df53..787d35d52e57f 100644 --- a/packages/example-app-base/package.json +++ b/packages/example-app-base/package.json @@ -42,7 +42,7 @@ "dependencies": { "@uifabric/utilities": "1.10.2", "highlight.js": "^9.9.0", - "office-ui-fabric-core": ">=5.0.0 <6.0.0", + "office-ui-fabric-core": "7.0.0", "office-ui-fabric-react": ">=2.11.0-0 <3.0.0-0" } } \ No newline at end of file diff --git a/packages/example-app-base/src/common/_common.scss b/packages/example-app-base/src/common/_common.scss index a047d898ca167..a135ab74ac2e3 100644 --- a/packages/example-app-base/src/common/_common.scss +++ b/packages/example-app-base/src/common/_common.scss @@ -1,4 +1,4 @@ -@import '~office-ui-fabric-core/dist/sass/Fabric.Common'; +@import '~office-ui-fabric-core/dist/sass/References'; @import './i18n'; @import './themeOverrides'; @import './focusBorder'; diff --git a/packages/example-app-base/src/components/App/App.scss b/packages/example-app-base/src/components/App/App.scss index fc31edfbb4f98..c4e5fec4422e5 100644 --- a/packages/example-app-base/src/components/App/App.scss +++ b/packages/example-app-base/src/components/App/App.scss @@ -21,7 +21,7 @@ .ms-App-nav { position: absolute; - @include left(0); + @include ms-left(0); width: 300px; top: 50px; bottom: 0; @@ -35,8 +35,8 @@ .ms-App-content { position: absolute; - @include left(300px); - @include right(0); + @include ms-left(300px); + @include ms-right(0); top: 50px; bottom: 0; overflow-x: auto; @@ -52,7 +52,7 @@ .ms-App--small .ms-App-content, .ms-App--medium .ms-App-content, .ms-App--large .ms-App-content { - @include left(0); + @include ms-left(0); padding: 5px; } @@ -83,7 +83,7 @@ vertical-align: middle; transform: translateY(-50%); position: absolute; - @include right(20px); + @include ms-right(20px); top: 50%; padding: 2px 6px; border-radius: 2px; diff --git a/packages/example-app-base/src/components/App/App.tsx b/packages/example-app-base/src/components/App/App.tsx index 7ba947d486e28..91bab92df3602 100644 --- a/packages/example-app-base/src/components/App/App.tsx +++ b/packages/example-app-base/src/components/App/App.tsx @@ -94,7 +94,7 @@ export class App extends React.Component { { (responsiveMode <= ResponsiveMode.large) ? ( =5.0.0 <6.0.0", + "office-ui-fabric-core": ">=7.0.0 <8.0.0", "office-ui-fabric-react-tslint": ">=1.0.0 <2.0.0", "postcss-loader": "^1.3.3", "raw-loader": "^0.5.1", @@ -75,4 +75,4 @@ "react": "^0.14 || ^15.0.1-0 || ^16.0.0-0", "react-dom": "^0.14 || ^15.0.1-0 || ^16.0.0-0" } -} \ No newline at end of file +} diff --git a/packages/office-ui-fabric-react/src/common/_common.scss b/packages/office-ui-fabric-react/src/common/_common.scss index a047d898ca167..a135ab74ac2e3 100644 --- a/packages/office-ui-fabric-react/src/common/_common.scss +++ b/packages/office-ui-fabric-react/src/common/_common.scss @@ -1,4 +1,4 @@ -@import '~office-ui-fabric-core/dist/sass/Fabric.Common'; +@import '~office-ui-fabric-core/dist/sass/References'; @import './i18n'; @import './themeOverrides'; @import './focusBorder'; diff --git a/packages/office-ui-fabric-react/src/components/Breadcrumb/Breadcrumb.scss b/packages/office-ui-fabric-react/src/components/Breadcrumb/Breadcrumb.scss index f0a5039f19f4b..7faf7819e54a1 100644 --- a/packages/office-ui-fabric-react/src/components/Breadcrumb/Breadcrumb.scss +++ b/packages/office-ui-fabric-react/src/components/Breadcrumb/Breadcrumb.scss @@ -15,7 +15,6 @@ $Breadcrumb-itemMaxWidth-sm: 116px; $Breadcrumb-chevron-sm: 8px; .root { - @include ms-baseFont; margin: 23px 0 1px; } @@ -110,7 +109,7 @@ $Breadcrumb-chevron-sm: 8px; outline: transparent; } -@media screen and (max-width: $ms-screen-md-max) { +@media screen and (max-width: $ms-screen-max-md) { // margin: 11px 0 1px; .listItem .itemLink { @@ -129,7 +128,7 @@ $Breadcrumb-chevron-sm: 8px; } } -@media screen and (max-width: $ms-screen-sm-max) { +@media screen and (max-width: $ms-screen-max-sm) { .listItem .itemLink { font-size: $ms-font-size-m; max-width: $Breadcrumb-itemMaxWidth-sm; diff --git a/packages/office-ui-fabric-react/src/components/Button/BaseButton.scss b/packages/office-ui-fabric-react/src/components/Button/BaseButton.scss index 1c74b3f885c78..d57ee78483446 100644 --- a/packages/office-ui-fabric-react/src/components/Button/BaseButton.scss +++ b/packages/office-ui-fabric-react/src/components/Button/BaseButton.scss @@ -13,5 +13,5 @@ } .screenReaderOnly { - @include ms-u-screenReaderOnly; + @include ms-screenReaderOnly; } diff --git a/packages/office-ui-fabric-react/src/components/Calendar/Calendar.scss b/packages/office-ui-fabric-react/src/components/Calendar/Calendar.scss index af3195264ccc2..14f710630ef7d 100644 --- a/packages/office-ui-fabric-react/src/components/Calendar/Calendar.scss +++ b/packages/office-ui-fabric-react/src/components/Calendar/Calendar.scss @@ -10,7 +10,7 @@ $Calendar-day:40px; $Calendar-dayPicker-margin: 10px; .root { - @include ms-u-normalize; + @include ms-normalize; margin-bottom: 17px; } @@ -25,7 +25,7 @@ $Calendar-dayPicker-margin: 10px; // The holder is the only "scrollable" top-level container element. .holder { -webkit-overflow-scrolling: touch; - @include ms-u-borderBox; + @include ms-borderBox; background: $ms-color-white; min-width: 300px; display: none; @@ -34,8 +34,7 @@ $Calendar-dayPicker-margin: 10px; // When the picker opens, reveal the content. .picker.pickerIsOpened .holder { - @include ms-u-slideDownIn10; - @include ms-u-borderBox; + @include ms-borderBox; display: block; } @@ -184,14 +183,14 @@ $Calendar-dayPicker-margin: 10px; .monthComponents { position: absolute; top: 9px; - @include right(9px); - @include left(9px); + @include ms-right(9px); + @include ms-left(9px); } .yearComponents, .decadeComponents { position: absolute; - @include right(10px); + @include ms-right(10px); top: -2px; } @@ -224,7 +223,7 @@ $Calendar-dayPicker-margin: 10px; // button is necessary to toggle the month view. .headerToggleView { height: $Calendar-day; - @include left(0px); + @include ms-left(0px); position: absolute; top: 0px; width: 140px; @@ -300,7 +299,7 @@ $Calendar-dayPicker-margin: 10px; line-height: 30px; padding: 0 10px; position: absolute !important; - @include right(3px); + @include ms-right(3px); &:hover { outline: 1px solid transparent; @@ -397,7 +396,7 @@ $Calendar-dayPicker-margin: 10px; } // Contains the calendar view for picking a day. .dayPicker { - @include ms-u-borderBox; + @include ms-borderBox; @include border-right(1px, solid, $ms-color-neutralLight); width: 220px; min-height: ( $Calendar-day * 8 ) - $Calendar-dayPicker-margin; @@ -415,7 +414,7 @@ $Calendar-dayPicker-margin: 10px; .monthPicker, .yearPicker { top: 9px; - @include left(238px); + @include ms-left(238px); position: absolute; } // Size and position of the month and year labels. @@ -458,12 +457,12 @@ $Calendar-dayPicker-margin: 10px; } // Position the "Go to today" button below the month picker. .goToday { - @include ms-u-borderBox; + @include ms-borderBox; font-size: 12px; height: $Calendar-day; line-height: $Calendar-day; padding: 0 10px; - @include right(3px); + @include ms-right(3px); @include text-align(right); top: 199px; } diff --git a/packages/office-ui-fabric-react/src/components/Calendar/Calendar.tsx b/packages/office-ui-fabric-react/src/components/Calendar/Calendar.tsx index 898e8b7a1e5a5..824932fcc6bca 100644 --- a/packages/office-ui-fabric-react/src/components/Calendar/Calendar.tsx +++ b/packages/office-ui-fabric-react/src/components/Calendar/Calendar.tsx @@ -93,7 +93,7 @@ export class Calendar extends BaseComponent impl styles.pickerIsFocused, isMonthPickerVisible && ('is-monthPickerVisible ' + styles.pickerIsMonthPickerVisible) ) } > -
+
backgroundColor: backgroundColor, }; - let directionalClassName = positions && positions.directionalClassName ? `ms-u-${positions.directionalClassName}` : ''; + let directionalClassName = positions && positions.directionalClassName ? `ms-${positions.directionalClassName}` : ''; let contentMaxHeight: number = this._getMaxHeight(); let beakVisible: boolean = isBeakVisible && (!!targetElement || !!target); diff --git a/packages/office-ui-fabric-react/src/components/Check/Check.scss b/packages/office-ui-fabric-react/src/components/Check/Check.scss index 87472a3633a3c..267f6c9fa53b1 100644 --- a/packages/office-ui-fabric-react/src/components/Check/Check.scss +++ b/packages/office-ui-fabric-react/src/components/Check/Check.scss @@ -15,7 +15,7 @@ $checkBoxHeight: 24px; height: $checkBoxHeight; vertical-align: top; position: relative; - @include user-select(none); + @include ms-user-select(none); &.rootIsChecked { .background { diff --git a/packages/office-ui-fabric-react/src/components/Checkbox/Checkbox.scss b/packages/office-ui-fabric-react/src/components/Checkbox/Checkbox.scss index e83a7397a2b01..c02ce06b859db 100644 --- a/packages/office-ui-fabric-react/src/components/Checkbox/Checkbox.scss +++ b/packages/office-ui-fabric-react/src/components/Checkbox/Checkbox.scss @@ -35,7 +35,6 @@ $ms-checkbox-highContrast-iconBoxSize: 16px; .root { box-sizing: border-box; color: $ms-color-neutralPrimary; - font-family: $ms-font-family-base; font-size: $ms-font-size-m; font-weight: $ms-font-weight-regular; min-height: 36px; diff --git a/packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroup.scss b/packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroup.scss index 15361c74eac12..ecf5a710c3152 100644 --- a/packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroup.scss +++ b/packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroup.scss @@ -38,7 +38,6 @@ $ms-choiceField-transition-timing: cubic-bezier(.4, 0, .23, 1); // .root { - @include ms-baseFont; margin-bottom: 4px; } @@ -47,18 +46,17 @@ $ms-choiceField-transition-timing: cubic-bezier(.4, 0, .23, 1); align-items: center; box-sizing: border-box; color: $radioButton-text-color; - font-family: $ms-font-family-base; font-size: $ms-font-size-m; font-weight: $ms-font-weight-regular; min-height: 26px; border: none; position: relative; margin-top: 8px; - @include padding-left(8px); + @include ms-padding-left(8px); :global(.ms-Label) { font-size: $ms-font-size-m; - @include padding(0, 0, 0, 26px); + @include ms-padding(0, 0, 0, 26px); display: inline-block; } } @@ -95,8 +93,8 @@ $ms-choiceField-transition-timing: cubic-bezier(.4, 0, .23, 1); height: 0; border-radius: 50%; position: absolute; - @include left($ms-choiceField-field-size / 2); - @include right(0); + @include ms-left($ms-choiceField-field-size / 2); + @include ms-right(0); transition-property: top, left, right, width, height; transition-duration: $ms-choiceField-transition-duration-inner; transition-timing-function: $ms-choiceField-transition-timing; @@ -148,7 +146,7 @@ $ms-choiceField-transition-timing: cubic-bezier(.4, 0, .23, 1); &::after { // the dot background-color: $radioButton-dot-color; top: 4px; - @include left(5px); + @include ms-left(5px); width: 10px; height: 10px; @@ -213,13 +211,10 @@ $ms-choiceField-transition-timing: cubic-bezier(.4, 0, .23, 1); .choiceFieldIsImage, .choiceFieldIsIcon { $fieldPadding: 4px; - display: inline-flex; - font-size: 0; - - @include margin(0, 4px, 4px, 0); - @include padding-left(0px); + @include ms-margin(0, 4px, 4px, 0); + @include ms-padding-left(0px); @include ms-bgColor-neutralLighter; .fieldIsImage, .fieldIsIcon { @@ -271,14 +266,12 @@ $ms-choiceField-transition-timing: cubic-bezier(.4, 0, .23, 1); .labelWrapper { $lineHeight: 16px; - display: inline-block; position: relative; margin: 4px 0 0 0; height: $lineHeight * 2; line-height: $lineHeight; overflow-y: hidden; - @include ms-font-m; :global(.ms-Label) { @@ -288,15 +281,15 @@ $ms-choiceField-transition-timing: cubic-bezier(.4, 0, .23, 1); &::before { top: $radioButtonSpacing; - @include right($radioButtonSpacing); - @include left(auto); // To reset the value of 'left' to its default value, so that 'right' works + @include ms-right($radioButtonSpacing); + @include ms-left(auto); // To reset the value of 'left' to its default value, so that 'right' works opacity: 0; } &::after { top: $radioButtonSpacing + ($radioButtonInnerSize * 2); - @include right($radioButtonSpacing + ($radioButtonInnerSize * 2)); - @include left(auto); // To reset the value of 'left' to its default value, so that 'right' works + @include ms-right($radioButtonSpacing + ($radioButtonInnerSize * 2)); + @include ms-left(auto); // To reset the value of 'left' to its default value, so that 'right' works } &:not(.fieldIsDisabled) { @@ -319,7 +312,7 @@ $ms-choiceField-transition-timing: cubic-bezier(.4, 0, .23, 1); &::after { top: $radioButtonSpacing + $radioButtonInnerSize; - @include right($radioButtonSpacing + $radioButtonInnerSize); + @include ms-right($radioButtonSpacing + $radioButtonInnerSize); } &:hover, diff --git a/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.scss b/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.scss index e56900563229a..ff4e5b8c8d04f 100644 --- a/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.scss +++ b/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.scss @@ -60,7 +60,7 @@ $SearchBox-sidePadding: 8px; // padding in input on left and right sides without .sideCommands { position: absolute; - @include right(0px); + @include ms-right(0px); @include text-align(right); @include padding-right(20px); } @@ -281,14 +281,14 @@ $SearchBox-sidePadding: 8px; // padding in input on left and right sides without .searchIconSearchWrapper, .searchIconArrowWrapper { top: 0; - @include padding-left(17px); + @include ms-padding-left(17px); @include padding-right(8px); } .searchIconClearWrapper { display: none; top: 1px; - @include right(0px); + @include ms-right(0px); z-index: $ms-zIndex-front; } @@ -308,7 +308,6 @@ $SearchBox-sidePadding: 8px; // padding in input on left and right sides without .searchInput, .searchInput::-webkit-input-placeholder { - @include ms-baseFont; font-size: $ms-font-size-m; } diff --git a/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.scss b/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.scss index a6b6cebd04ec7..f336ba04fec8e 100644 --- a/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.scss +++ b/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.scss @@ -12,11 +12,11 @@ line-height: 20px; pointer-events: none; position: absolute; - @include right(9px); + @include ms-right(9px); } .root { - @include ms-u-normalize; + @include ms-normalize; margin-bottom: 17px; } diff --git a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.scss b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.scss index c8857b5a7cf02..8dc4ae5d20444 100644 --- a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.scss +++ b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.scss @@ -134,7 +134,7 @@ $resizerColor: $ms-color-neutralTertiaryAlt; .cell .filterChevron { color: $dropdownChevronForegroundColor; - @include padding-left(4px); + @include ms-padding-left(4px); vertical-align: middle; } diff --git a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsRow.tsx b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsRow.tsx index 71fd64fac7b6d..a8ad69859e9f3 100644 --- a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsRow.tsx +++ b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsRow.tsx @@ -188,7 +188,7 @@ export class DetailsRow extends BaseComponent * { flex: 0 0 auto; } @@ -100,8 +100,8 @@ $Dialog-default-max-width: 340px; // Negative margin to needed to compensate for symmetric // padding between action elements. .actionsRight { - @include text-align(right); - @include margin-right(-4px); + @include ms-text-align(right); + @include ms-margin-right(-4px); font-size: 0; // Reset spacing for first button @@ -150,7 +150,7 @@ $Dialog-default-max-width: 340px; } } -@media (min-width: $ms-screen-md-min) { +@media (min-width: $ms-screen-min-md) { // Allow wider dialog on larger screens .main { width: auto; diff --git a/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCard.scss b/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCard.scss index d777eb3270114..f76099f814a85 100644 --- a/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCard.scss +++ b/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCard.scss @@ -88,7 +88,7 @@ $ms-DocumentCardActions-verticalPadding: 4px; .action { @include float(left); - @include margin-right(4px); + @include ms-margin-right(4px); color: $ms-color-neutralSecondary; cursor: pointer; @@ -111,7 +111,7 @@ $ms-DocumentCardActions-verticalPadding: 4px; line-height: $ms-DocumentCardActions-actionSize; :global(.ms-Icon) { - @include margin-right(4px); + @include ms-margin-right(4px); font-size: $ms-icon-size-m; vertical-align: top; } @@ -135,7 +135,7 @@ $ms-DocumentCardActivity-personaTextGutter: 8px; } .activityDetails { - @include left($ms-DocumentCardActivity-horizontalPadding + ($ms-DocumentCardActivity-imageSize * 1.5) + $ms-DocumentCardActivity-personaTextGutter); + @include ms-left($ms-DocumentCardActivity-horizontalPadding + ($ms-DocumentCardActivity-imageSize * 1.5) + $ms-DocumentCardActivity-personaTextGutter); } } @@ -165,7 +165,7 @@ $ms-DocumentCardActivity-personaTextGutter: 8px; } .activityDetails { - @include left($ms-DocumentCardActivity-horizontalPadding + $ms-DocumentCardActivity-imageSize + $ms-DocumentCardActivity-personaTextGutter); + @include ms-left($ms-DocumentCardActivity-horizontalPadding + $ms-DocumentCardActivity-imageSize + $ms-DocumentCardActivity-personaTextGutter); height: $ms-DocumentCardActivity-imageSize; position: absolute; top: $ms-DocumentCardActivity-verticalPadding; @@ -221,7 +221,7 @@ $ms-DocumentCardActivity-personaTextGutter: 8px; } .icon { - @include left(10px); + @include ms-left(10px); bottom: 10px; position: absolute; } @@ -236,7 +236,7 @@ $ms-DocumentCardActivity-personaTextGutter: 8px; line-height: 16px; // Vertically center the text margin-bottom: 8px; overflow: hidden; - @include padding-left(24px); // Make room for icon + @include ms-padding-left(24px); // Make room for icon position: relative; text-overflow: ellipsis; white-space: nowrap; @@ -254,7 +254,7 @@ $ms-DocumentCardActivity-personaTextGutter: 8px; } .fileListIcon { - @include left(0); + @include ms-left(0); position: absolute; top: 0; } diff --git a/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.scss b/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.scss index af71ac7072846..8b0c1dd5cc9c8 100644 --- a/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.scss +++ b/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.scss @@ -34,7 +34,7 @@ $DropDown-item-height: 36px; } .root { - @include ms-u-normalize; + @include ms-normalize; @include ms-font-m; color: $ms-color-neutralPrimary; @@ -138,7 +138,7 @@ $DropDown-item-height: 36px; font-size: $ms-icon-size-s; position: absolute; top: 1px; // border - @include right(12px); + @include ms-right(12px); pointer-events: none; height: $DropDown-height; line-height: $DropDown-height - 2px; // height minus the border @@ -146,7 +146,7 @@ $DropDown-item-height: 36px; // Style the new, replacement component .title { - @include ms-u-normalize; + @include ms-normalize; background: $ms-color-white; border: 1px solid $ms-color-neutralTertiaryAlt; cursor: pointer; @@ -169,7 +169,7 @@ $DropDown-item-height: 36px; .panel { // Force drop shadow even under medium breakpoint :global(.ms-Panel-main) { - @include drop-shadow(-30px, 0px, 30px, -30px, .2); + @include ms-drop-shadow(-30px, 0px, 30px, -30px, .2); } // Remove padding as items have their own padding and bg :global(.ms-Panel-contentInner) { diff --git a/packages/office-ui-fabric-react/src/components/Fabric/Fabric.tsx b/packages/office-ui-fabric-react/src/components/Fabric/Fabric.tsx index e76d103fbb764..da54043ad17e9 100644 --- a/packages/office-ui-fabric-react/src/components/Fabric/Fabric.tsx +++ b/packages/office-ui-fabric-react/src/components/Fabric/Fabric.tsx @@ -51,7 +51,7 @@ export class Fabric extends BaseComponent, IFabr public render() { const { isFocusVisible } = this.state; - const rootClass = css('ms-Fabric ms-font-m', this.props.className, { + const rootClass = css('ms-Fabric', this.props.className, { 'is-focusVisible': isFocusVisible }); diff --git a/packages/office-ui-fabric-react/src/components/Facepile/Facepile.scss b/packages/office-ui-fabric-react/src/components/Facepile/Facepile.scss index 12949dd79e9dd..15ae30f0143fb 100644 --- a/packages/office-ui-fabric-react/src/components/Facepile/Facepile.scss +++ b/packages/office-ui-fabric-react/src/components/Facepile/Facepile.scss @@ -85,5 +85,5 @@ button.descriptiveOverflowButton { } .screenReaderOnly { - @include ms-u-screenReaderOnly; + @include ms-screenReaderOnly; } \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/GroupedList/GroupFooter.scss b/packages/office-ui-fabric-react/src/components/GroupedList/GroupFooter.scss index d211d77d17ff3..6167d9c92733a 100644 --- a/packages/office-ui-fabric-react/src/components/GroupedList/GroupFooter.scss +++ b/packages/office-ui-fabric-react/src/components/GroupedList/GroupFooter.scss @@ -6,7 +6,6 @@ cursor: pointer; :global(.ms-Link) { - @include ms-baseFont; font-size: $ms-font-size-s; } } diff --git a/packages/office-ui-fabric-react/src/components/GroupedList/GroupHeader.scss b/packages/office-ui-fabric-react/src/components/GroupedList/GroupHeader.scss index acac50b8f5c03..b5c5c5bc00c46 100644 --- a/packages/office-ui-fabric-react/src/components/GroupedList/GroupHeader.scss +++ b/packages/office-ui-fabric-react/src/components/GroupedList/GroupHeader.scss @@ -79,7 +79,7 @@ $groupHeader-ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045); opacity: 0; padding: 0px 16px; vertical-align: middle; - transition: visibility $ms-duration3, opacity $ms-duration3; + transition: visibility $ms-animation-duration-3, opacity $ms-animation-duration-3; &.loadingIsVisible { visibility: visible; @@ -91,10 +91,10 @@ $groupHeader-ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045); display: inline-block; position: relative; top: -16px; - @include left(-26px); + @include ms-left(-26px); font-size: $ms-icon-size-l; color: $ms-color-neutralSecondaryAlt; - transition: transform $ms-duration2 $groupHeader-ease-in-back, opacity $ms-duration4 $groupHeader-ease-out-sine; + transition: transform $ms-animation-duration-2 $groupHeader-ease-in-back, opacity $ms-animation-duration-4 $groupHeader-ease-out-sine; opacity: 0; transform: rotate(0.2deg) scale(0.65); // rotation prevents jittery motion in IE transform-origin: 10px 10px; @@ -107,8 +107,8 @@ $groupHeader-ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045); :global(.ms-GroupedList-group.is-dropping) { > .root .dropIcon { - transition: transform $ms-duration4 $groupHeader-ease-out-circ, opacity $ms-duration1 $groupHeader-ease-out-sine; - transition-delay: $ms-duration3; + transition: transform $ms-animation-duration-4 $groupHeader-ease-out-circ, opacity $ms-animation-duration-1 $groupHeader-ease-out-sine; + transition-delay: $ms-animation-duration-3; opacity: 1; transform: rotate(0.2deg) scale(1); // rotation prevents jittery motion in IE } diff --git a/packages/office-ui-fabric-react/src/components/GroupedList/GroupedList.scss b/packages/office-ui-fabric-react/src/components/GroupedList/GroupedList.scss index bf3c85c7458d4..a5e20cbbede1b 100644 --- a/packages/office-ui-fabric-react/src/components/GroupedList/GroupedList.scss +++ b/packages/office-ui-fabric-react/src/components/GroupedList/GroupedList.scss @@ -7,13 +7,12 @@ $groupList-ease-in-out-sine: cubic-bezier(0.445, 0.050, 0.550, 0.950); font-size: $ms-font-size-s; BUTTON { - font-family: inherit; background-color: transparent; } } .group { - transition: background-color $ms-duration2 $groupList-ease-in-out-sine; + transition: background-color $ms-animation-duration-2 $groupList-ease-in-out-sine; } .groupIsDropping { diff --git a/packages/office-ui-fabric-react/src/components/Icon/IconName.ts b/packages/office-ui-fabric-react/src/components/Icon/IconName.ts index 7e3af1c075511..51f9ef149c5c2 100644 --- a/packages/office-ui-fabric-react/src/components/Icon/IconName.ts +++ b/packages/office-ui-fabric-react/src/components/Icon/IconName.ts @@ -1,9 +1,16 @@ // Please keep alphabetized export type IconName = + // These icons are not in the font. + 'CustomIcon' | + 'None' | + + // Icons from the Fabric MDL2 set. 'AADLogo' | 'Accept' | 'AccessLogo' | + 'AccessLogoFill' | 'Accounts' | + 'ActivityFeed' | 'Add' | 'AddEvent' | 'AddFavorite' | @@ -29,14 +36,17 @@ export type IconName = 'AlarmClock' | 'Album' | 'AlbumRemove' | - 'AlchemyLogo' | 'AlignCenter' | 'AlignLeft' | 'AlignRight' | + 'AnalyticsLogo' | + 'AnalyticsQuery' | + 'AnalyticsReport' | 'AndroidLogo' | 'Annotation' | - 'AppForOfficeLogo' | 'AppIconDefault' | + 'Archive' | + 'AreaChart' | 'Arrivals' | 'ArrowDownRight8' | 'ArrowDownRightMirrored8' | @@ -44,13 +54,16 @@ export type IconName = 'ArrowUpRightMirrored8' | 'Articles' | 'Ascending' | + 'AssessmentGroup' | 'AssetLibrary' | + 'Assign' | 'Asterisk' | 'ATPLogo' | 'Attach' | 'AustralianRules' | 'AutoEnhanceOff' | 'AutoEnhanceOn' | + 'AutoFillTemplate' | 'AutoRacing' | 'AwayStatus' | 'AzureLogo' | @@ -60,6 +73,7 @@ export type IconName = 'Balloons' | 'BarChart4' | 'BarChartHorizontal' | + 'BarChartVertical' | 'Baseball' | 'BidiLtr' | 'BidiRtl' | @@ -68,21 +82,37 @@ export type IconName = 'Blocked' | 'Blocked2' | 'BlowingSnow' | + 'Blur' | 'Boards' | 'Bold' | 'BookingsLogo' | 'Bookmarks' | 'BookmarksMirrored' | 'BoxLogo' | + 'BranchCommit' | + 'BranchCompare' | 'BranchFork' | + 'BranchFork2' | + 'BranchLocked' | + 'BranchMerge' | + 'BranchPullRequest' | + 'BranchSearch' | + 'BranchShelveset' | 'Breadcrumb' | 'Brightness' | 'Broom' | + 'BucketColor' | + 'BucketColorFill' | 'BufferTimeAfter' | 'BufferTimeBefore' | 'BufferTimeBoth' | + 'Build' | + 'BuildIssue' | + 'BuildQueue' | + 'BuildQueueNew' | 'BulletedList' | 'BulletedListMirrored' | + 'BusinessHoursSign' | 'BusSolid' | 'Cafe' | 'Cake' | @@ -98,6 +128,7 @@ export type IconName = 'CaloriesAdd' | 'Camera' | 'Cancel' | + 'CannedChat' | 'Car' | 'CaretBottomLeftSolid8' | 'CaretBottomRightSolid8' | @@ -107,10 +138,16 @@ export type IconName = 'CaretHollowMirrored' | 'CaretLeft8' | 'CaretLeftSolid8' | + 'CaretRight' | 'CaretRight8' | 'CaretRightSolid8' | 'CaretSolid' | + 'CaretSolid16' | + 'CaretSolidDown' | + 'CaretSolidLeft' | 'CaretSolidMirrored' | + 'CaretSolidRight' | + 'CaretSolidUp' | 'CaretTopLeftSolid8' | 'CaretTopRightSolid8' | 'CaretUp8' | @@ -123,6 +160,7 @@ export type IconName = 'ChatInviteFriend' | 'Checkbox' | 'CheckboxComposite' | + 'CheckboxCompositeReversed' | 'CheckboxIndeterminate' | 'CheckList' | 'CheckMark' | @@ -146,16 +184,18 @@ export type IconName = 'CircleHalfFull' | 'CirclePlus' | 'CircleRing' | - 'ClassNotebookLogo' | + 'ClassNotebookLogoInverse' | 'ClassroomLogo' | 'Clear' | 'ClearFilter' | 'ClearFormatting' | 'ClearNight' | 'Clock' | + 'CloneToDesktop' | 'ClosedCaption' | 'ClosePane' | 'ClosePaneMirrored' | + 'Cloud' | 'CloudAdd' | 'CloudDownload' | 'CloudUpload' | @@ -164,12 +204,19 @@ export type IconName = 'Cocktails' | 'Code' | 'Coffee' | - 'CollabsDBLogo' | + 'CollapseContent' | + 'CollapseContentSingle' | 'CollapseMenu' | 'CollegeFootball' | 'CollegeHoops' | 'Color' | + 'ColumnLeftTwoThirds' | + 'ColumnOptions' | + 'ColumnRightTwoThirds' | 'Combine' | + 'Comment' | + 'CommentUrgent' | + 'Communications' | 'CompassNW' | 'Completed' | 'CompletedSolid' | @@ -180,11 +227,14 @@ export type IconName = 'Copy' | 'Cotton' | 'Cricket' | + 'CRMReport' | 'CSS' | - 'CustomIcon' | 'CustomList' | 'CustomListMirrored' | + 'Cut' | 'Cycling' | + 'DataBarsFill' | + 'Database' | 'DataConnectionLibrary' | 'DateTime' | 'DateTime2' | @@ -194,6 +244,9 @@ export type IconName = 'DelveAnalytics' | 'DelveAnalyticsLogo' | 'DelveLogo' | + 'DelveLogoFill' | + 'DelveLogoInverse' | + 'Deploy' | 'Descending' | 'Design' | 'DeveloperTools' | @@ -202,13 +255,15 @@ export type IconName = 'Dialpad' | 'Dictionary' | 'DietPlanNotebook' | + 'DiffInline' | + 'DiffSideBySide' | 'DisableUpdates' | 'Dislike' | 'DockLeft' | 'DockLeftMirrored' | 'DockRight' | 'DocLibrary' | - 'DocsLogo' | + 'DocsLogoInverse' | 'Document' | 'Documentation' | 'DocumentReply' | @@ -226,6 +281,7 @@ export type IconName = 'DoubleChevronRight12' | 'DoubleChevronUp' | 'DoubleChevronUp12' | + 'DoubleColumn' | 'Down' | 'Download' | 'DRM' | @@ -258,8 +314,16 @@ export type IconName = 'EventInfo' | 'ExcelDocument' | 'ExcelLogo' | + 'ExcelLogoFill' | + 'ExcelLogoInverse' | 'ExchangeLogo' | + 'ExchangeLogoFill' | + 'ExchangeLogoInverse' | 'ExpandMenu' | + 'ExploreContent' | + 'ExploreContentSingle' | + 'Export' | + 'ExportMirrored' | 'FabricAssetLibrary' | 'FabricDataConnectionLibrary' | 'FabricDocLibrary' | @@ -280,22 +344,32 @@ export type IconName = 'FacebookLogo' | 'Family' | 'FangBody' | + 'FastForward' | + 'Favicon' | 'FavoriteList' | 'FavoriteStar' | 'FavoriteStarFill' | 'Fax' | 'Ferry' | 'FerrySolid' | + 'FileBug' | + 'FileCode' | + 'FileComment' | + 'FileImage' | + 'FileSymlink' | 'Filter' | 'Filters' | 'Financial' | 'Fingerprint' | + 'FiveTileGrid' | 'Flag' | + 'FlameSolid' | 'FlickDown' | 'FlickLeft' | 'FlickRight' | 'FlickUp' | 'Flow' | + 'FocalPoint' | 'Fog' | 'Folder' | 'FolderFill' | @@ -314,9 +388,11 @@ export type IconName = 'Freezing' | 'Frigid' | 'FullCircleMask' | + 'FullHistory' | 'FullScreen' | 'Generate' | 'Giftbox' | + 'GiftboxOpen' | 'GiftCard' | 'Glasses' | 'Glimmer' | @@ -326,6 +402,7 @@ export type IconName = 'Golf' | 'GoogleDriveLogo' | 'GotoToday' | + 'GripperBarVertical' | 'GripperTool' | 'Group' | 'GroupedAscending' | @@ -334,6 +411,7 @@ export type IconName = 'HailDay' | 'HailNight' | 'Handwriting' | + 'HardDriveGroup' | 'Header1' | 'Header2' | 'Header3' | @@ -346,18 +424,26 @@ export type IconName = 'HelpMirrored' | 'Hide' | 'Hide2' | + 'Highlight' | + 'HighlightMappedShapes' | 'History' | 'Home' | 'HomeSolid' | 'Hospital' | 'Hotel' | + 'IconSetsFlag' | + 'IconSetsFlagFill' | + 'ImageDiff' | + 'ImagePixel' | 'Important' | 'InboxCheck' | 'IncidentTriangle' | 'IncreaseIndentLegacy' | 'Info' | 'Info2' | + 'InfoSolid' | 'InsertTextBox' | + 'InstallToDrive' | 'InternetSharing' | 'iOSAppStoreLogo' | 'IssueTracking' | @@ -376,6 +462,7 @@ export type IconName = 'Lightbulb' | 'LightningBolt' | 'Like' | + 'LineChart' | 'Link' | 'List' | 'ListMirrored' | @@ -384,6 +471,8 @@ export type IconName = 'LocationDot' | 'LocationFill' | 'Lock' | + 'LockSolid' | + 'LogRemove' | 'LowerBrightness' | 'LyncLogo' | 'Mail' | @@ -406,6 +495,7 @@ export type IconName = 'Megaphone' | 'Memo' | 'Merge' | + 'MergeDuplicate' | 'Message' | 'MessageFill' | 'Microphone' | @@ -418,40 +508,52 @@ export type IconName = 'Move' | 'MoveToFolder' | 'MSNLogo' | + 'MSNVideos' | 'MultiSelect' | 'MultiSelectMirrored' | 'MusicInCollection' | 'MusicInCollectionFill' | 'MusicNote' | 'Nav2DMapView' | + 'NetworkTower' | + 'NewAnalyticsQuery' | 'NewFolder' | 'News' | - 'None' | + 'Next' | 'NoteForward' | 'NotePinned' | 'NoteReply' | 'NumberedList' | 'NumberField' | + 'OfficeAddinsLogo' | 'OfficeAssistantLogo' | 'OfficeFormLogo' | 'OfficeLogo' | 'OfficeStoreLogo' | 'OfficeVideoLogo' | + 'OfficeVideoLogoFill' | + 'OfficeVideoLogoInverse' | 'OfflineOneDriveParachute' | 'OfflineOneDriveParachuteDisabled' | 'OneDrive' | 'OneDriveAdd' | - 'OneNoteEduLogo' | + 'OneNoteEduLogoInverse' | 'OneNoteLogo' | + 'OneNoteLogoFill' | + 'OneNoteLogoInverse' | 'OpenFile' | 'OpenFolderHorizontal' | 'OpenInNewWindow' | 'OpenPane' | 'OpenPaneMirrored' | + 'OpenSource' | 'Org' | 'OutlookLogo' | + 'OutlookLogoFill' | + 'OutlookLogoInverse' | 'OutOfOffice' | 'Package' | + 'Packages' | 'Page' | 'PageAdd' | 'PageCheckedin' | @@ -460,10 +562,12 @@ export type IconName = 'PageRight' | 'PageSolid' | 'PanoIndicator' | + 'Parameter' | 'ParatureLogo' | 'PartlyCloudyDay' | 'PartlyCloudyNight' | 'PartyLeader' | + 'Paste' | 'Pause' | 'PaymentCard' | 'PC1' | @@ -476,6 +580,7 @@ export type IconName = 'PeoplePause' | 'PeopleRepeat' | 'Permissions' | + 'Personalize' | 'Phone' | 'Photo2' | 'Photo2Add' | @@ -484,13 +589,19 @@ export type IconName = 'Picture' | 'PictureLibrary' | 'PieDouble' | + 'PieSingle' | 'Pill' | 'Pin' | 'Pinned' | 'PinnedFill' | - 'Planner' | + 'PivotChart' | + 'PlannerLogo' | 'Play' | 'PlayerSettings' | + 'Plug' | + 'PlugConnected' | + 'PlugDisconnected' | + 'PlugSolid' | 'POI' | 'PostUpdate' | 'PowerApps' | @@ -499,40 +610,53 @@ export type IconName = 'PowerBILogo' | 'PowerPointDocument' | 'PowerPointLogo' | + 'PowerPointLogoFill' | + 'PowerPointLogoInverse' | 'Precipitation' | 'PresenceChickletVideo' | 'Preview' | 'PreviewLink' | + 'Previous' | 'Print' | 'PrintfaxPrinterFile' | + 'Processing' | + 'ProcessMetaTask' | 'Product' | 'ProFootball' | + 'ProgressRingDots' | 'ProHockey' | - 'ProjectLogo' | + 'ProjectLogoInverse' | 'ProtectedDocument' | + 'ProtectRestrict' | 'PublicCalendar' | 'PublicContactCard' | 'PublicEmail' | 'PublicFolder' | + 'PublisherLogo' | + 'PublisherLogoFill' | 'Puzzle' | 'Questionnaire' | 'QuestionnaireMirrored' | 'QuickNote' | + 'RadioBtnOff' | 'RadioBtnOn' | 'RadioBullet' | 'Rain' | 'RainShowersDay' | 'RainShowersNight' | 'RainSnow' | + 'RawSource' | 'Read' | 'ReadingMode' | 'ReceiptCheck' | 'ReceiptForward' | 'ReceiptReply' | 'Recent' | + 'Record2' | 'RecurringEvent' | 'RecurringTask' | 'RecycleBin' | + 'Redeploy' | 'RedEye' | 'Redo' | 'Refresh' | @@ -555,27 +679,40 @@ export type IconName = 'ReportLibraryMirrored' | 'ReturnToSession' | 'RevToggleKey' | + 'Rewind' | 'Ribbon' | 'RightDoubleQuote' | 'Ringer' | + 'Robot' | 'Room' | 'Rotate' | + 'RowsChild' | + 'RowsGroup' | 'Rugby' | 'Running' | 'Sad' | 'Save' | + 'SaveAll' | 'SaveAs' | + 'ScheduleEventAction' | + 'Script' | + 'ScrollUpDown' | 'Search' | 'Section' | 'Sections' | 'SecurityGroup' | 'Send' | 'SendMirrored' | + 'Server' | + 'ServerEnviroment' | + 'ServerProcesses' | 'SetAction' | 'Settings' | 'Share' | 'ShareiOS' | 'SharepointLogo' | + 'SharepointLogoFill' | + 'SharepointLogoInverse' | 'Shield' | 'Shop' | 'ShoppingCart' | @@ -583,17 +720,20 @@ export type IconName = 'ShowResultsMirrored' | 'SidePanel' | 'SingleBookmark' | + 'SingleColumn' | 'SIPMove' | 'SkypeCheck' | 'SkypeCircleCheck' | 'SkypeCircleClock' | 'SkypeCircleMinus' | 'SkypeClock' | + 'SkypeForBusinessLogoFill' | 'SkypeLogo' | 'SkypeMessage' | 'SkypeMinus' | 'SliderThumb' | 'Snow' | + 'Snowflake' | 'SnowShowerDay' | 'SnowShowerNight' | 'Soccer' | @@ -606,15 +746,26 @@ export type IconName = 'SpeedHigh' | 'Split' | 'Squalls' | + 'StackedBarChart' | + 'StackedLineChart' | 'StackIndicator' | 'Starburst' | 'StatusErrorFull' | 'StatusTriangle' | + 'Step' | + 'StepInsert' | + 'StepShared' | + 'StepSharedAdd' | + 'StepSharedInsert' | 'StockDown' | 'StockUp' | + 'Stop' | + 'StopSolid' | 'Stopwatch' | 'StoreLogo' | 'StoreLogoMed' | + 'Storyboard' | + 'Streaming' | 'Strikethrough' | 'Subscribe' | 'Subscript' | @@ -623,7 +774,7 @@ export type IconName = 'Sunny' | 'SunQuestionMark' | 'Superscript' | - 'SwayLogo' | + 'SwayLogoInverse' | 'Switch' | 'SwitcherStartEnd' | 'Sync' | @@ -637,10 +788,16 @@ export type IconName = 'Tag' | 'TaskManager' | 'TaskManagerMirrored' | + 'TeamsLogo' | + 'TeamsLogoFill' | + 'TeamsLogoInverse' | 'Teamwork' | 'TemporaryUser' | 'Tennis' | 'TextBox' | + 'TextCallout' | + 'TextCalloutFill' | + 'TextDocument' | 'TextField' | 'ThumbnailView' | 'ThumbnailViewMirrored' | @@ -661,11 +818,15 @@ export type IconName = 'TriangleDown12' | 'TriangleLeft12' | 'TriangleRight12' | + 'TriangleSolid' | 'TriangleSolidDown12' | 'TriangleSolidLeft12' | 'TriangleSolidRight12' | 'TriangleSolidUp12' | 'TriangleUp12' | + 'TriggerAuto' | + 'TriggerUser' | + 'TripleColumn' | 'Trophy' | 'TurnRight' | 'TVMonitor' | @@ -673,19 +834,32 @@ export type IconName = 'Underline' | 'Undo' | 'Unfavorite' | + 'Unknown' | 'UnknownCall' | 'Unlock' | + 'UnlockSolid' | 'Unpin' | 'Unsubscribe' | 'UnsyncFolder' | 'Up' | 'Upload' | + 'Variable' | + 'VariableGroup' | + 'VennDiagram' | 'Video' | 'VideoSolid' | 'View' | 'ViewAll' | 'ViewAll2' | + 'ViewDashboard' | + 'ViewList' | + 'ViewListGroup' | + 'ViewListTree' | + 'VisioDiagram' | + 'VisioDocument' | 'VisioLogo' | + 'VisioLogoFill' | + 'VisioLogoInverse' | 'VoicemailForward' | 'VoicemailReply' | 'Volume0' | @@ -697,13 +871,18 @@ export type IconName = 'Warning' | 'Website' | 'Weights' | + 'WifiEthernet' | 'WindDirection' | 'WindowsLogo' | 'WipePhone' | 'WordDocument' | 'WordLogo' | + 'WordLogoFill' | + 'WordLogoInverse' | 'Work' | 'WorkFlow' | + 'WorkItem' | + 'WorkItemBug' | 'WorldClock' | 'YammerLogo' | 'Zoom' | diff --git a/packages/office-ui-fabric-react/src/components/Image/Image.scss b/packages/office-ui-fabric-react/src/components/Image/Image.scss index 618f8ded9e085..12d4f2fd0e159 100644 --- a/packages/office-ui-fabric-react/src/components/Image/Image.scss +++ b/packages/office-ui-fabric-react/src/components/Image/Image.scss @@ -23,7 +23,7 @@ .imageIsContain, .imageIsCover { position: relative; - @include left(50%); + @include ms-left(50%); top: 50%; // transform-translateX mixin is not used here because a transateY is also required. @include LTR { diff --git a/packages/office-ui-fabric-react/src/components/Image/Image.tsx b/packages/office-ui-fabric-react/src/components/Image/Image.tsx index ecfe0d8f811c4..e30a3ee81f31a 100644 --- a/packages/office-ui-fabric-react/src/components/Image/Image.tsx +++ b/packages/office-ui-fabric-react/src/components/Image/Image.tsx @@ -111,7 +111,7 @@ export class Image extends BaseComponent { 'is-fadeIn': shouldFadeIn, 'is-notLoaded': !loaded, ['is-loaded ' + styles.imageIsLoaded]: loaded, - 'ms-u-fadeIn400': loaded && shouldFadeIn, + 'ms-fadeIn400': loaded && shouldFadeIn, 'is-error': loadState === ImageLoadState.error, ['ms-Image-image--scaleWidth ' + styles.imageIsScaleWidth]: (imageFit === undefined && !!width && !height), ['ms-Image-image--scaleHeight ' + styles.imageIsScaleHeight]: (imageFit === undefined && !width && !!height), diff --git a/packages/office-ui-fabric-react/src/components/Label/Label.scss b/packages/office-ui-fabric-react/src/components/Label/Label.scss index 81fe55506c90d..1439a0861f9b9 100644 --- a/packages/office-ui-fabric-react/src/components/Label/Label.scss +++ b/packages/office-ui-fabric-react/src/components/Label/Label.scss @@ -11,7 +11,7 @@ .root { @include ms-font-m; - @include ms-u-normalize; + @include ms-normalize; color: $ms-color-neutralPrimary; box-sizing: border-box; display: block; diff --git a/packages/office-ui-fabric-react/src/components/Layer/examples/Layer.Basic.Example.tsx b/packages/office-ui-fabric-react/src/components/Layer/examples/Layer.Basic.Example.tsx index 1a62c599de48b..d8c3ce7cbff7b 100644 --- a/packages/office-ui-fabric-react/src/components/Layer/examples/Layer.Basic.Example.tsx +++ b/packages/office-ui-fabric-react/src/components/Layer/examples/Layer.Basic.Example.tsx @@ -26,7 +26,7 @@ export class LayerContentExample extends BaseComponent { public render() { return ( -
+
{ this.context.message }
{ this.state.time }
diff --git a/packages/office-ui-fabric-react/src/components/Layer/examples/Layer.Hosted.Example.tsx b/packages/office-ui-fabric-react/src/components/Layer/examples/Layer.Hosted.Example.tsx index ca09ce99cd651..4f91460d67023 100644 --- a/packages/office-ui-fabric-react/src/components/Layer/examples/Layer.Hosted.Example.tsx +++ b/packages/office-ui-fabric-react/src/components/Layer/examples/Layer.Hosted.Example.tsx @@ -16,7 +16,7 @@ export class LayerHostedExample extends React.Component { public render() { let { showLayer, showHost} = this.state; let content = ( -
+
This is example layer content.
); diff --git a/packages/office-ui-fabric-react/src/components/Link/Link.scss b/packages/office-ui-fabric-react/src/components/Link/Link.scss index e90fea8dbb54d..cb666cb3acfe3 100644 --- a/packages/office-ui-fabric-react/src/components/Link/Link.scss +++ b/packages/office-ui-fabric-react/src/components/Link/Link.scss @@ -2,7 +2,6 @@ // Element: ms-Link root component .root { - @include ms-baseFont; color: $ms-color-themePrimary; margin: 0; overflow: inherit; diff --git a/packages/office-ui-fabric-react/src/components/List/examples/List.Mail.Example.scss b/packages/office-ui-fabric-react/src/components/List/examples/List.Mail.Example.scss index 9648f41a236f6..ddbcd8597be12 100644 --- a/packages/office-ui-fabric-react/src/components/List/examples/List.Mail.Example.scss +++ b/packages/office-ui-fabric-react/src/components/List/examples/List.Mail.Example.scss @@ -10,8 +10,8 @@ :global { .ms-ListItem { @include ms-font-m; - @include ms-u-normalize; - @include ms-u-clearfix; + @include ms-normalize; + @include ms-clearfix; padding: 9px 28px 3px; position: relative; display: block; @@ -20,7 +20,7 @@ .ms-ListItem-primaryText, .ms-ListItem-secondaryText, .ms-ListItem-tertiaryText { - @include noWrap; + @include ms-no-wrap; display: block; } @@ -206,7 +206,7 @@ // Primary text, typically the name. .ms-ListItem-primaryText { - @include noWrap; + @include ms-no-wrap; font-size: $ms-font-size-m; padding-top: 15px; padding-right: 0; @@ -215,7 +215,7 @@ // Secondary text, typically the modified date or some other metadata. .ms-ListItem-secondaryText { - @include noWrap; + @include ms-no-wrap; @include ms-font-xs; padding-top: 6px; } diff --git a/packages/office-ui-fabric-react/src/components/List/examples/List.Scrolling.Example.scss b/packages/office-ui-fabric-react/src/components/List/examples/List.Scrolling.Example.scss index f66737e696574..feb0ffc9c2666 100644 --- a/packages/office-ui-fabric-react/src/components/List/examples/List.Scrolling.Example.scss +++ b/packages/office-ui-fabric-react/src/components/List/examples/List.Scrolling.Example.scss @@ -10,8 +10,8 @@ &-itemCell { .ms-ListScrollingExample-itemContent { @include ms-font-m; - @include ms-u-normalize; - @include ms-u-clearfix; + @include ms-normalize; + @include ms-clearfix; position: relative; display: block; diff --git a/packages/office-ui-fabric-react/src/components/MessageBar/MessageBar.scss b/packages/office-ui-fabric-react/src/components/MessageBar/MessageBar.scss index 8427f7cb83c77..761e5b316d3cc 100644 --- a/packages/office-ui-fabric-react/src/components/MessageBar/MessageBar.scss +++ b/packages/office-ui-fabric-react/src/components/MessageBar/MessageBar.scss @@ -8,7 +8,6 @@ // MessageBar Styles .root { - @include ms-baseFont; @include ms-bgColor-info; color: $ms-color-infoText; width: 100%; @@ -162,7 +161,7 @@ min-width: 0; } .dismissalOneline .dismissal { - @include margin-right(-8px); + @include ms-margin-right(-8px); } // Add space between adjacent MessageBars. diff --git a/packages/office-ui-fabric-react/src/components/Modal/Modal.scss b/packages/office-ui-fabric-react/src/components/Modal/Modal.scss index bf34ab1f0a30c..6dea7dd629d85 100644 --- a/packages/office-ui-fabric-react/src/components/Modal/Modal.scss +++ b/packages/office-ui-fabric-react/src/components/Modal/Modal.scss @@ -7,10 +7,9 @@ // -------------------------------------------------- // Modal styles -:export { duration: $ms-duration2 } +:export { duration: $ms-animation-duration-2 } .root { - @include ms-baseFont; background-color: transparent; position: fixed; height: 100%; @@ -20,10 +19,11 @@ justify-content: center; opacity: 0; pointer-events: none; - transition: opacity $ms-duration2; + transition: opacity $ms-animation-duration-2; + :global(.ms-Button.ms-Button--compound) { display: block; - @include margin-left(0); + @include ms-margin-left(0); } :global(.ms-Overlay) { @@ -40,11 +40,11 @@ // The actual dialog element .main { - @include drop-shadow(); + @include ms-drop-shadow(); background-color: $ms-color-white; box-sizing: border-box; position: relative; - @include text-align(left); + @include ms-text-align(left); outline: 3px solid transparent; max-height: 100%; overflow-y: auto; diff --git a/packages/office-ui-fabric-react/src/components/Nav/Nav.scss b/packages/office-ui-fabric-react/src/components/Nav/Nav.scss index ef74d6ede94fc..c4b2b3ed8facc 100644 --- a/packages/office-ui-fabric-react/src/components/Nav/Nav.scss +++ b/packages/office-ui-fabric-react/src/components/Nav/Nav.scss @@ -41,7 +41,7 @@ $linkRightPadding: 20px; } .iconLink { - @include margin-right(4px); + @include ms-margin-right(4px); } .chevronButton { @@ -84,7 +84,7 @@ $linkRightPadding: 20px; .chevronIcon { position: absolute; - @include left(8px); + @include ms-left(8px); height: $navnode-height; line-height: $navnode-height; font-size: 12px; @@ -109,7 +109,7 @@ $linkRightPadding: 20px; height: $navnode-height - 2; position: absolute; top: 1px; - @include left(1px); + @include ms-left(1px); z-index: 1; padding: 0; margin: 0; @@ -153,9 +153,9 @@ $linkRightPadding: 20px; content: ''; position: absolute; top: 0; - @include right(0); + @include ms-right(0); bottom: 0; - @include left(0); + @include ms-left(0); } } } @@ -187,13 +187,13 @@ $linkRightPadding: 20px; } .root .link { - @include padding-left($noExpandButtonLinkLeftPadding); + @include ms-padding-left($noExpandButtonLinkLeftPadding); :global(.ms-Button-label) { @include ms-font-m; color: $ms-color-themePrimary; } &.linkIsOnExpanded { - @include padding-left($hasExpandButtonLinkLeftPadding); + @include ms-padding-left($hasExpandButtonLinkLeftPadding); } } diff --git a/packages/office-ui-fabric-react/src/components/Nav/Nav.tsx b/packages/office-ui-fabric-react/src/components/Nav/Nav.tsx index 06a20e097e3e8..d469d5b689165 100644 --- a/packages/office-ui-fabric-react/src/components/Nav/Nav.tsx +++ b/packages/office-ui-fabric-react/src/components/Nav/Nav.tsx @@ -74,7 +74,7 @@ export class Nav extends BaseComponent implements INav {
- + diff --git a/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.tsx b/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.tsx index 37692f14b2161..4c7aed048d603 100644 --- a/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.tsx +++ b/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.tsx @@ -18,6 +18,7 @@ import { IconName, IIconProps } from '../../Icon'; +import { FontClassNames } from '../../Styling'; import * as stylesImport from './CommandBar.scss'; const styles: any = stylesImport; @@ -93,14 +94,15 @@ export class CommandBar extends BaseComponent - +
- +
); @@ -127,7 +129,7 @@ export class CommandBar extends BaseComponent - + ] : []) } @@ -195,7 +197,7 @@ export class CommandBar extends BaseComponent ) } { hasSubmenuItems(item) ? ( - + ) : (null) } ; } else if (item.href) { @@ -227,7 +229,8 @@ export class CommandBar extends BaseComponent { (hasIcon) ? this._renderIcon(item) : (null) } - + ; } })() } diff --git a/packages/office-ui-fabric-react/src/components/CommandBar/examples/CommandBar.Customization.Example.tsx b/packages/office-ui-fabric-react/src/components/CommandBar/examples/CommandBar.Customization.Example.tsx index 487120b46c403..513d7e76737e2 100644 --- a/packages/office-ui-fabric-react/src/components/CommandBar/examples/CommandBar.Customization.Example.tsx +++ b/packages/office-ui-fabric-react/src/components/CommandBar/examples/CommandBar.Customization.Example.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; -import { DefaultButton } from 'office-ui-fabric-react/lib/Button'; +import { CommandButton } from 'office-ui-fabric-react/lib/Button'; import { CommandBar } from 'office-ui-fabric-react/lib/CommandBar'; import { css, autobind, } from 'office-ui-fabric-react/lib/Utilities'; import styles = require('./CommandBar.Example.scss'); -import { ContextualMenu, IContextualMenuItem, DirectionalHint } from '../../ContextualMenu'; +import { IContextualMenuItem } from '../../ContextualMenu'; export interface ISplitDropDownButtonState { isContextMenuShown: boolean; @@ -56,24 +56,6 @@ export class CommandBarCustomizationExample extends React.Component -
this.container = ref }> - this.container = ref }> + - - { 'New' } - + iconProps={ { iconName: 'add' } } + text='New' /> | - - - + className={ dropDownButtonClass } + menuProps={ { + className: css('ms-CommandBar-menuHost'), + items: item.subMenuProps.items + } } />
- { - this.state && this.state.isContextMenuShown && - - } ); } diff --git a/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.tsx b/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.tsx index db7522f9dfc40..e926fb91054ba 100644 --- a/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.tsx +++ b/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenu.tsx @@ -398,8 +398,7 @@ export class ContextualMenu extends BaseComponent - + { category.name } diff --git a/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.tsx b/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.tsx index d020decf3fb94..05e0ea5bf1aa1 100644 --- a/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.tsx +++ b/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.tsx @@ -196,11 +196,13 @@ export class DatePicker extends BaseComponent diff --git a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.scss b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.scss index 8dc4ae5d20444..432a354a9ab1b 100644 --- a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.scss +++ b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.scss @@ -25,12 +25,13 @@ $resizerColor: $ms-color-neutralTertiaryAlt; } } -.cell.cellIsCheck :global(.ms-Check-background) { +.cell.cellIsCheck :global(.ms-Check-circle) { opacity: 0; } -.cell.cellIsCheck:hover :global(.ms-Check-background), -.root.rootIsAllSelected :global(.ms-Check-background) { +.cell.cellIsCheck:hover :global(.ms-Check-circle), +.cell.cellIsCheck:focus :global(.ms-Check-circle), +.root.rootIsAllSelected :global(.ms-Check-circle) { opacity: 1; } diff --git a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsRow.tsx b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsRow.tsx index a8ad69859e9f3..1be478ba618ba 100644 --- a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsRow.tsx +++ b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsRow.tsx @@ -22,6 +22,7 @@ import { import { IViewport } from '../../utilities/decorators/withViewport'; import * as stylesImport from './DetailsRow.scss'; const styles: any = stylesImport; +import { AnimationClassNames } from '../../Styling'; export interface IDetailsRowProps extends React.Props { item: any; @@ -184,15 +185,20 @@ export class DetailsRow extends BaseComponent 0 && (
- + { views }
) } diff --git a/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.tsx b/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.tsx index cb62b269b33ff..9f7f8a52a32fc 100644 --- a/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.tsx +++ b/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.tsx @@ -5,6 +5,7 @@ import { Callout } from '../../Callout'; import { Label } from '../../Label'; import { CommandButton } from '../../Button'; import { Panel } from '../../Panel'; +import { Icon } from '../../Icon'; import { FocusZone, FocusZoneDirection } from '../../FocusZone'; import { withResponsiveMode, ResponsiveMode } from '../../utilities/decorators/withResponsiveMode'; import { IWithResponsiveModeState } from '../../utilities/decorators/withResponsiveMode'; @@ -155,7 +156,7 @@ export class Dropdown extends BaseComponent - + { isOpen && ( onRenderContainer(this.props, this._onRenderContainer) diff --git a/packages/office-ui-fabric-react/src/components/Fabric/Fabric.styles.ts b/packages/office-ui-fabric-react/src/components/Fabric/Fabric.styles.ts new file mode 100644 index 0000000000000..555bb0c05c1e4 --- /dev/null +++ b/packages/office-ui-fabric-react/src/components/Fabric/Fabric.styles.ts @@ -0,0 +1,30 @@ + +import { + memoizeFunction, +} from '../../Utilities'; +import { + ITheme, + IStyle, + getTheme +} from '../../Styling'; + +const inheritFont = { fontFamily: 'inherit' }; + +export interface IFabricStyles { + root: IStyle; +} + +export const getStyles = memoizeFunction(( + theme: ITheme = getTheme() +): IFabricStyles => { + return { + root: [ + theme.fonts.medium, + { + color: theme.palette.neutralPrimary, + '& button': inheritFont, + '& input': inheritFont + } + ] + }; +}); diff --git a/packages/office-ui-fabric-react/src/components/Fabric/Fabric.tsx b/packages/office-ui-fabric-react/src/components/Fabric/Fabric.tsx index da54043ad17e9..0a0b2b398b8e3 100644 --- a/packages/office-ui-fabric-react/src/components/Fabric/Fabric.tsx +++ b/packages/office-ui-fabric-react/src/components/Fabric/Fabric.tsx @@ -1,9 +1,12 @@ import * as React from 'react'; import { BaseComponent, - KeyCodes, - css + KeyCodes } from '../../Utilities'; +import { + mergeStyles +} from '../../Styling'; +import { getStyles } from './Fabric.styles'; const DIRECTIONAL_KEY_CODES = [ KeyCodes.up, @@ -51,9 +54,14 @@ export class Fabric extends BaseComponent, IFabr public render() { const { isFocusVisible } = this.state; - const rootClass = css('ms-Fabric', this.props.className, { - 'is-focusVisible': isFocusVisible - }); + const styles = getStyles(); + + const rootClass = mergeStyles( + 'ms-Fabric', + styles.root, + this.props.className, + isFocusVisible && 'is-focusVisible' + ) as string; return (
diff --git a/packages/office-ui-fabric-react/src/components/Facepile/Facepile.test.tsx b/packages/office-ui-fabric-react/src/components/Facepile/Facepile.test.tsx index 34d7759baefe9..e0e1712c6cd98 100644 --- a/packages/office-ui-fabric-react/src/components/Facepile/Facepile.test.tsx +++ b/packages/office-ui-fabric-react/src/components/Facepile/Facepile.test.tsx @@ -47,7 +47,7 @@ describe('Facepile', () => { />); let facepile = ReactDOM.findDOMNode(wrapper as React.ReactInstance); - let addButton = facepile.querySelectorAll('.ms-Icon--AddFriend'); + let addButton = facepile.querySelectorAll('.ms-Facepile-addButton'); expect(addButton).to.have.length(1, 'Add button should render'); let buttons = facepile.querySelectorAll('.ms-Facepile-itemButton'); expect(buttons).to.have.length(1, 'Only one button should be rendered'); @@ -61,7 +61,7 @@ describe('Facepile', () => { overflowButtonType={ OverflowButtonType.downArrow } />); let facepile = ReactDOM.findDOMNode(wrapper as React.ReactInstance); - let overflowButton = facepile.querySelectorAll('.ms-Icon--ChevronDown'); + let overflowButton = facepile.querySelectorAll('.ms-Facepile-overflowButton'); expect(overflowButton).to.have.length(1, 'Overflow button should render'); let buttons = facepile.querySelectorAll('.ms-Facepile-itemButton'); expect(buttons).to.have.length(1, 'Only one button should be rendered'); @@ -75,7 +75,7 @@ describe('Facepile', () => { overflowButtonType={ OverflowButtonType.more } />); let facepile = ReactDOM.findDOMNode(wrapper as React.ReactInstance); - let overflowButton = facepile.querySelectorAll('.ms-Icon--More'); + let overflowButton = facepile.querySelectorAll('.ms-Facepile-overflowButton'); expect(overflowButton).to.have.length(1, 'Overflow button should render'); let buttons = facepile.querySelectorAll('.ms-Facepile-itemButton'); expect(buttons).to.have.length(1, 'Only one button should be rendered'); diff --git a/packages/office-ui-fabric-react/src/components/Facepile/Facepile.tsx b/packages/office-ui-fabric-react/src/components/Facepile/Facepile.tsx index f3566bf08a116..138435550aa55 100644 --- a/packages/office-ui-fabric-react/src/components/Facepile/Facepile.tsx +++ b/packages/office-ui-fabric-react/src/components/Facepile/Facepile.tsx @@ -19,6 +19,9 @@ import { import { BaseButton } from '../../Button'; +import { + Icon +} from '../../Icon'; import { Persona, PersonaSize @@ -192,7 +195,7 @@ export class Facepile extends BaseComponent { size={ personaSize } hidePersonaDetails={ true } onRenderInitials={ () => ( -
Hex Red Green
+ { onRenderItem(cell, cell.index) } +