diff --git a/CHANGELOG.md b/CHANGELOG.md index 19b986e..adb776f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +## 7.0.7 +### Changed +- Change `data-active` attribute to be a boolean attribute (i.e., emit \ instead of \) +- Rename componentWillReceiveProps to [UNSAFE_componentWillReceiveProps](https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html) to avoid deprecation warnings in React 16.11+ +- Add deprecation warnings for Date components because they're not fully localized/accessible. We should use the [Office Fabric control](https://developer.microsoft.com/en-us/fabric/#/controls/web/datepicker) instead. +### Fixed +- Update handlebars version to fix vulnerability + ## 7.0.6 ### Changed - Added data-test-active to active navigation item diff --git a/lib/components/Balloon/Balloon.tsx b/lib/components/Balloon/Balloon.tsx index aff8df1..6a21b9f 100644 --- a/lib/components/Balloon/Balloon.tsx +++ b/lib/components/Balloon/Balloon.tsx @@ -76,7 +76,7 @@ export class Balloon extends React.Component { }; } - componentWillReceiveProps(newProps: BalloonProps) { + UNSAFE_componentWillReceiveProps(newProps: BalloonProps) { this.setState({ visible: this.state.hovered || newProps.expanded, }); diff --git a/lib/components/DateTime/Calendar.tsx b/lib/components/DateTime/Calendar.tsx index b89f4ed..d4bda68 100644 --- a/lib/components/DateTime/Calendar.tsx +++ b/lib/components/DateTime/Calendar.tsx @@ -60,6 +60,7 @@ export interface CalendarState { * Calendar control * * @param props Control properties (defined in `CalendarProps` interface) + * @deprecated This is not fully localized/accessible. Use https://developer.microsoft.com/en-us/fabric/#/controls/web/datepicker instead. */ export class Calendar extends React.Component> { static defaultProps = { @@ -119,7 +120,7 @@ export class Calendar extends React.Component 0) { diff --git a/lib/components/DateTime/DateField.tsx b/lib/components/DateTime/DateField.tsx index 98a04a8..cdf1fd4 100644 --- a/lib/components/DateTime/DateField.tsx +++ b/lib/components/DateTime/DateField.tsx @@ -72,6 +72,7 @@ export interface DateFieldProps extends React.Props { * High level form text field * * @param props Control properties (defined in `DateFieldProps` interface) + * @deprecated This is not fully localized/accessible. Use https://developer.microsoft.com/en-us/fabric/#/controls/web/datepicker instead. */ export const DateField: React.StatelessComponent = (props: DateFieldProps) => { const tooltipId = (!!props.tooltip) ? `${props.name}-tt` : undefined; diff --git a/lib/components/DateTime/DatePicker.tsx b/lib/components/DateTime/DatePicker.tsx index d90e7f6..f767464 100644 --- a/lib/components/DateTime/DatePicker.tsx +++ b/lib/components/DateTime/DatePicker.tsx @@ -91,6 +91,7 @@ export interface DatePickerState { * Low level date picker control * * (Use the `DateField` control instead when making a form with standard styling) + * @deprecated This is not fully localized/accessible. Use https://developer.microsoft.com/en-us/fabric/#/controls/web/datepicker instead. */ export class DatePicker extends React.Component> { static defaultProps = { @@ -207,7 +208,7 @@ export class DatePicker extends React.Component> { static defaultProps = { @@ -211,7 +212,7 @@ export class DateTimeField extends React.Component { return time; } - componentWillReceiveProps(newProps) { + UNSAFE_componentWillReceiveProps(newProps) { let newState: any = {}; let update = false; let newHours = this.state.hours; diff --git a/lib/components/Input/NumberInput.tsx b/lib/components/Input/NumberInput.tsx index 324bb2b..23aeb9d 100644 --- a/lib/components/Input/NumberInput.tsx +++ b/lib/components/Input/NumberInput.tsx @@ -226,7 +226,7 @@ export class NumberInput extends React.Component