@instructure/ui-responsive 7.14.1 → 7.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [7.17.0](https://github.com/instructure/instructure-ui/compare/v7.16.0...v7.17.0) (2022-03-22)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-responsive
9
+
10
+ # [7.16.0](https://github.com/instructure/instructure-ui/compare/v7.15.0...v7.16.0) (2022-02-08)
11
+
12
+ ### Features
13
+
14
+ - **ui-responsive:** modify Responsive "props override" error to warning ([a2eb4b8](https://github.com/instructure/instructure-ui/commit/a2eb4b8))
15
+
16
+ # [7.15.0](https://github.com/instructure/instructure-ui/compare/v7.14.1...v7.15.0) (2022-02-03)
17
+
18
+ **Note:** Version bump only for package @instructure/ui-responsive
19
+
6
20
  ## [7.14.1](https://github.com/instructure/instructure-ui/compare/v7.14.0...v7.14.1) (2021-12-06)
7
21
 
8
22
  **Note:** Version bump only for package @instructure/ui-responsive
@@ -2,6 +2,7 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/esm/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/esm/inherits";
4
4
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
+ import { warn as _warn } from "@instructure/console";
5
6
  import { error as _error } from "@instructure/console";
6
7
 
7
8
  /*
@@ -147,13 +148,13 @@ var Responsive = /*#__PURE__*/function (_Component) {
147
148
  var matchProps = props[match]; // Iterate over the props for the current match. If that the prop is
148
149
  // already in `mergedProps` that means that the prop was defined for
149
150
  // multiple breakpoints, and more than one of those breakpoints is being
150
- // currently applied so we log an error.
151
+ // currently applied so we log a warning.
151
152
 
152
153
  Object.keys(matchProps).forEach(function (prop) {
153
154
  /*#__PURE__*/
154
155
 
155
156
  /*#__PURE__*/
156
- _error(!(prop in mergedProps), ["[Responsive] The prop `".concat(prop, "` is defined at 2 or more breakpoints"), "which are currently applied at the same time. Its current value, `".concat(mergedProps[prop], "`,"), "will be overwritten as `".concat(matchProps[prop], "`.")].join(' '));
157
+ _warn(!(prop in mergedProps), ["[Responsive] The prop `".concat(prop, "` is defined at 2 or more breakpoints"), "which are currently applied at the same time. Its current value, `".concat(mergedProps[prop], "`,"), "will be overwritten as `".concat(matchProps[prop], "`.")].join(' '));
157
158
 
158
159
  mergedProps[prop] = matchProps[prop];
159
160
  });
@@ -167,11 +167,11 @@ var Responsive = /*#__PURE__*/function (_Component) {
167
167
  var matchProps = props[match]; // Iterate over the props for the current match. If that the prop is
168
168
  // already in `mergedProps` that means that the prop was defined for
169
169
  // multiple breakpoints, and more than one of those breakpoints is being
170
- // currently applied so we log an error.
170
+ // currently applied so we log a warning.
171
171
 
172
172
  Object.keys(matchProps).forEach(function (prop) {
173
173
  /*#__PURE__*/
174
- ( /*#__PURE__*/0, _console.error)(!(prop in mergedProps), ["[Responsive] The prop `".concat(prop, "` is defined at 2 or more breakpoints"), "which are currently applied at the same time. Its current value, `".concat(mergedProps[prop], "`,"), "will be overwritten as `".concat(matchProps[prop], "`.")].join(' '));
174
+ ( /*#__PURE__*/0, _console.warn)(!(prop in mergedProps), ["[Responsive] The prop `".concat(prop, "` is defined at 2 or more breakpoints"), "which are currently applied at the same time. Its current value, `".concat(mergedProps[prop], "`,"), "will be overwritten as `".concat(matchProps[prop], "`.")].join(' '));
175
175
  mergedProps[prop] = matchProps[prop];
176
176
  });
177
177
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-responsive",
3
- "version": "7.14.1",
3
+ "version": "7.17.0",
4
4
  "description": "A component that allows for rendering a component differently based on either the element or the viewport size",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -23,19 +23,19 @@
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
25
  "@babel/runtime": "^7.9.2",
26
- "@instructure/console": "^7.14.1",
27
- "@instructure/debounce": "^7.14.1",
28
- "@instructure/ui-dom-utils": "^7.14.1",
29
- "@instructure/ui-react-utils": "^7.14.1",
30
- "@instructure/ui-testable": "^7.14.1",
31
- "@instructure/ui-themeable": "^7.14.1",
32
- "@instructure/ui-utils": "^7.14.1",
26
+ "@instructure/console": "^7.17.0",
27
+ "@instructure/debounce": "^7.17.0",
28
+ "@instructure/ui-dom-utils": "^7.17.0",
29
+ "@instructure/ui-react-utils": "^7.17.0",
30
+ "@instructure/ui-testable": "^7.17.0",
31
+ "@instructure/ui-themeable": "^7.17.0",
32
+ "@instructure/ui-utils": "^7.17.0",
33
33
  "prop-types": "^15"
34
34
  },
35
35
  "devDependencies": {
36
- "@instructure/ui-babel-preset": "^7.14.1",
37
- "@instructure/ui-color-utils": "^7.14.1",
38
- "@instructure/ui-test-utils": "^7.14.1"
36
+ "@instructure/ui-babel-preset": "^7.17.0",
37
+ "@instructure/ui-color-utils": "^7.17.0",
38
+ "@instructure/ui-test-utils": "^7.17.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": "^16.8"
@@ -26,7 +26,7 @@ import React, { Component } from 'react'
26
26
  import PropTypes from 'prop-types'
27
27
 
28
28
  import { deepEqual } from '@instructure/ui-utils'
29
- import { error } from '@instructure/console/macro'
29
+ import { error, warn } from '@instructure/console/macro'
30
30
 
31
31
  import {
32
32
  addElementQueryMatchListener,
@@ -163,9 +163,9 @@ class Responsive extends Component {
163
163
  // Iterate over the props for the current match. If that the prop is
164
164
  // already in `mergedProps` that means that the prop was defined for
165
165
  // multiple breakpoints, and more than one of those breakpoints is being
166
- // currently applied so we log an error.
166
+ // currently applied so we log a warning.
167
167
  Object.keys(matchProps).forEach((prop) => {
168
- error(
168
+ warn(
169
169
  !(prop in mergedProps),
170
170
  [
171
171
  `[Responsive] The prop \`${prop}\` is defined at 2 or more breakpoints`,