@instructure/ui-view 8.12.1-snapshot.43 → 8.12.1-snapshot.47

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.
@@ -40,8 +40,8 @@ category: components
40
40
  @tsProps
41
41
  **/
42
42
  let ContextView = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = class ContextView extends Component {
43
- constructor(...args) {
44
- super(...args);
43
+ constructor() {
44
+ super(...arguments);
45
45
  this.ref = null;
46
46
 
47
47
  this.handleRef = el => {
@@ -53,7 +53,10 @@ export default {
53
53
  filter: props => {
54
54
  return (// Border radius and border width list 0 in addition to none in their object values
55
55
  // so we filter those here as they are redundant
56
- props.withFocusOutline && props.position !== 'relative' || props.withVisualDebug && (props.background !== 'transparent' || props.borderRadius !== '0' || props.position !== 'static' || props.shadow !== 'none' || props.textAlign !== 'center') || props.background !== 'transparent' && (props.borderRadius !== '0' || props.position !== 'static' || props.shadow !== 'none' || props.textAlign !== 'center') || props.borderWidth !== '0' && (props.background !== 'transparent' || props.borderRadius !== '0' || props.position !== 'static' || props.shadow !== 'none' || props.textAlign !== 'center')
56
+ props.withFocusOutline && props.position !== 'relative' || // Only generate a 1 variation for withVisualDebug
57
+ props.withVisualDebug && (props.background !== 'transparent' || props.borderRadius !== '0' || props.position !== 'static' || props.shadow !== 'none' || props.textAlign !== 'center') || // Only generate a 1 variation for non-'transparent' background
58
+ props.background !== 'transparent' && (props.borderRadius !== '0' || props.position !== 'static' || props.shadow !== 'none' || props.textAlign !== 'center') || // Only generate a 1 variation for non-'0' borderWidth
59
+ props.borderWidth !== '0' && (props.background !== 'transparent' || props.borderRadius !== '0' || props.position !== 'static' || props.shadow !== 'none' || props.textAlign !== 'center')
57
60
  );
58
61
  }
59
62
  };
package/es/View/styles.js CHANGED
@@ -26,12 +26,11 @@ import { getShorthandPropValue, mirrorShorthandEdges, mirrorShorthandCorners } f
26
26
  import { pickProps } from '@instructure/ui-react-utils';
27
27
  import { logError as error } from '@instructure/console';
28
28
 
29
- const getBorderStyle = ({
30
- borderRadius,
31
- borderWidth,
32
- dir,
33
- theme
34
- }) => {
29
+ const getBorderStyle = _ref => {
30
+ let borderRadius = _ref.borderRadius,
31
+ borderWidth = _ref.borderWidth,
32
+ dir = _ref.dir,
33
+ theme = _ref.theme;
35
34
  const isRtlDirection = dir === DIRECTION.rtl;
36
35
  return {
37
36
  borderRadius: getShorthandPropValue('View', theme, isRtlDirection ? mirrorShorthandCorners(borderRadius) : borderRadius, 'borderRadius'),
@@ -39,12 +38,11 @@ const getBorderStyle = ({
39
38
  };
40
39
  };
41
40
 
42
- const getSpacingStyle = ({
43
- margin,
44
- padding,
45
- dir,
46
- theme
47
- }) => {
41
+ const getSpacingStyle = _ref2 => {
42
+ let margin = _ref2.margin,
43
+ padding = _ref2.padding,
44
+ dir = _ref2.dir,
45
+ theme = _ref2.theme;
48
46
  const isRtlDirection = dir === DIRECTION.rtl;
49
47
  return {
50
48
  margin: getShorthandPropValue('View', theme, isRtlDirection ? mirrorShorthandEdges(margin) : margin, 'margin'),
@@ -52,13 +50,12 @@ const getSpacingStyle = ({
52
50
  };
53
51
  };
54
52
 
55
- const getOffsetStyle = ({
56
- insetBlockStart,
57
- insetBlockEnd,
58
- insetInlineStart,
59
- insetInlineEnd,
60
- dir
61
- }) => {
53
+ const getOffsetStyle = _ref3 => {
54
+ let insetBlockStart = _ref3.insetBlockStart,
55
+ insetBlockEnd = _ref3.insetBlockEnd,
56
+ insetInlineStart = _ref3.insetInlineStart,
57
+ insetInlineEnd = _ref3.insetInlineEnd,
58
+ dir = _ref3.dir;
62
59
  const isRtlDirection = dir === DIRECTION.rtl;
63
60
  const blockStart = {
64
61
  top: insetBlockStart,
@@ -78,10 +75,9 @@ const getOffsetStyle = ({
78
75
  };
79
76
  };
80
77
 
81
- const getStyleProps = ({
82
- cursor,
83
- style
84
- }) => {
78
+ const getStyleProps = _ref4 => {
79
+ let cursor = _ref4.cursor,
80
+ style = _ref4.style;
85
81
  const whitelisted = pickProps(style || {}, {}, [// Position/calculateElementPosition:
86
82
  'top', 'left', 'position', 'display', 'transform', 'overflow', 'minWidth', 'minHeight', // Img:
87
83
  'filter', // Flex.Item:
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.ContextView = exports.default = void 0;
8
+ exports.default = exports.ContextView = void 0;
9
9
 
10
10
  var _react = require("react");
11
11
 
@@ -30,8 +30,8 @@ category: components
30
30
  @tsProps
31
31
  **/
32
32
  let ContextView = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = class ContextView extends _react.Component {
33
- constructor(...args) {
34
- super(...args);
33
+ constructor() {
34
+ super(...arguments);
35
35
  this.ref = null;
36
36
 
37
37
  this.handleRef = el => {
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.allowedProps = exports.propTypes = void 0;
8
+ exports.propTypes = exports.allowedProps = void 0;
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
@@ -61,7 +61,10 @@ var _default = {
61
61
  filter: props => {
62
62
  return (// Border radius and border width list 0 in addition to none in their object values
63
63
  // so we filter those here as they are redundant
64
- props.withFocusOutline && props.position !== 'relative' || props.withVisualDebug && (props.background !== 'transparent' || props.borderRadius !== '0' || props.position !== 'static' || props.shadow !== 'none' || props.textAlign !== 'center') || props.background !== 'transparent' && (props.borderRadius !== '0' || props.position !== 'static' || props.shadow !== 'none' || props.textAlign !== 'center') || props.borderWidth !== '0' && (props.background !== 'transparent' || props.borderRadius !== '0' || props.position !== 'static' || props.shadow !== 'none' || props.textAlign !== 'center')
64
+ props.withFocusOutline && props.position !== 'relative' || // Only generate a 1 variation for withVisualDebug
65
+ props.withVisualDebug && (props.background !== 'transparent' || props.borderRadius !== '0' || props.position !== 'static' || props.shadow !== 'none' || props.textAlign !== 'center') || // Only generate a 1 variation for non-'transparent' background
66
+ props.background !== 'transparent' && (props.borderRadius !== '0' || props.position !== 'static' || props.shadow !== 'none' || props.textAlign !== 'center') || // Only generate a 1 variation for non-'0' borderWidth
67
+ props.borderWidth !== '0' && (props.background !== 'transparent' || props.borderRadius !== '0' || props.position !== 'static' || props.shadow !== 'none' || props.textAlign !== 'center')
65
68
  );
66
69
  }
67
70
  };
package/lib/View/index.js CHANGED
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.View = exports.default = void 0;
8
+ exports.default = exports.View = void 0;
9
9
 
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
 
package/lib/View/props.js CHANGED
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.allowedProps = exports.propTypes = void 0;
8
+ exports.propTypes = exports.allowedProps = void 0;
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
@@ -36,12 +36,11 @@ var _console = require("@instructure/console");
36
36
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37
37
  * SOFTWARE.
38
38
  */
39
- const getBorderStyle = ({
40
- borderRadius,
41
- borderWidth,
42
- dir,
43
- theme
44
- }) => {
39
+ const getBorderStyle = _ref => {
40
+ let borderRadius = _ref.borderRadius,
41
+ borderWidth = _ref.borderWidth,
42
+ dir = _ref.dir,
43
+ theme = _ref.theme;
45
44
  const isRtlDirection = dir === _uiI18n.DIRECTION.rtl;
46
45
  return {
47
46
  borderRadius: (0, _emotion.getShorthandPropValue)('View', theme, isRtlDirection ? (0, _emotion.mirrorShorthandCorners)(borderRadius) : borderRadius, 'borderRadius'),
@@ -49,12 +48,11 @@ const getBorderStyle = ({
49
48
  };
50
49
  };
51
50
 
52
- const getSpacingStyle = ({
53
- margin,
54
- padding,
55
- dir,
56
- theme
57
- }) => {
51
+ const getSpacingStyle = _ref2 => {
52
+ let margin = _ref2.margin,
53
+ padding = _ref2.padding,
54
+ dir = _ref2.dir,
55
+ theme = _ref2.theme;
58
56
  const isRtlDirection = dir === _uiI18n.DIRECTION.rtl;
59
57
  return {
60
58
  margin: (0, _emotion.getShorthandPropValue)('View', theme, isRtlDirection ? (0, _emotion.mirrorShorthandEdges)(margin) : margin, 'margin'),
@@ -62,13 +60,12 @@ const getSpacingStyle = ({
62
60
  };
63
61
  };
64
62
 
65
- const getOffsetStyle = ({
66
- insetBlockStart,
67
- insetBlockEnd,
68
- insetInlineStart,
69
- insetInlineEnd,
70
- dir
71
- }) => {
63
+ const getOffsetStyle = _ref3 => {
64
+ let insetBlockStart = _ref3.insetBlockStart,
65
+ insetBlockEnd = _ref3.insetBlockEnd,
66
+ insetInlineStart = _ref3.insetInlineStart,
67
+ insetInlineEnd = _ref3.insetInlineEnd,
68
+ dir = _ref3.dir;
72
69
  const isRtlDirection = dir === _uiI18n.DIRECTION.rtl;
73
70
  const blockStart = {
74
71
  top: insetBlockStart,
@@ -88,10 +85,9 @@ const getOffsetStyle = ({
88
85
  };
89
86
  };
90
87
 
91
- const getStyleProps = ({
92
- cursor,
93
- style
94
- }) => {
88
+ const getStyleProps = _ref4 => {
89
+ let cursor = _ref4.cursor,
90
+ style = _ref4.style;
95
91
  const whitelisted = (0, _pickProps.pickProps)(style || {}, {}, [// Position/calculateElementPosition:
96
92
  'top', 'left', 'position', 'display', 'transform', 'overflow', 'minWidth', 'minHeight', // Img:
97
93
  'filter', // Flex.Item:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-view",
3
- "version": "8.12.1-snapshot.43+3eb834049",
3
+ "version": "8.12.1-snapshot.47+70bc15c4e",
4
4
  "description": "A component for basic styles including spacing, sizing, borders, display, positioning, and focus states.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -25,21 +25,21 @@
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@babel/runtime": "^7.13.10",
28
- "@instructure/console": "8.12.1-snapshot.43+3eb834049",
29
- "@instructure/emotion": "8.12.1-snapshot.43+3eb834049",
30
- "@instructure/shared-types": "8.12.1-snapshot.43+3eb834049",
31
- "@instructure/ui-color-utils": "8.12.1-snapshot.43+3eb834049",
32
- "@instructure/ui-dom-utils": "8.12.1-snapshot.43+3eb834049",
33
- "@instructure/ui-i18n": "8.12.1-snapshot.43+3eb834049",
34
- "@instructure/ui-position": "8.12.1-snapshot.43+3eb834049",
35
- "@instructure/ui-prop-types": "8.12.1-snapshot.43+3eb834049",
36
- "@instructure/ui-react-utils": "8.12.1-snapshot.43+3eb834049",
28
+ "@instructure/console": "8.12.1-snapshot.47+70bc15c4e",
29
+ "@instructure/emotion": "8.12.1-snapshot.47+70bc15c4e",
30
+ "@instructure/shared-types": "8.12.1-snapshot.47+70bc15c4e",
31
+ "@instructure/ui-color-utils": "8.12.1-snapshot.47+70bc15c4e",
32
+ "@instructure/ui-dom-utils": "8.12.1-snapshot.47+70bc15c4e",
33
+ "@instructure/ui-i18n": "8.12.1-snapshot.47+70bc15c4e",
34
+ "@instructure/ui-position": "8.12.1-snapshot.47+70bc15c4e",
35
+ "@instructure/ui-prop-types": "8.12.1-snapshot.47+70bc15c4e",
36
+ "@instructure/ui-react-utils": "8.12.1-snapshot.47+70bc15c4e",
37
37
  "prop-types": "^15"
38
38
  },
39
39
  "devDependencies": {
40
- "@instructure/ui-babel-preset": "8.12.1-snapshot.43+3eb834049",
41
- "@instructure/ui-test-utils": "8.12.1-snapshot.43+3eb834049",
42
- "@instructure/ui-themes": "8.12.1-snapshot.43+3eb834049"
40
+ "@instructure/ui-babel-preset": "8.12.1-snapshot.47+70bc15c4e",
41
+ "@instructure/ui-test-utils": "8.12.1-snapshot.47+70bc15c4e",
42
+ "@instructure/ui-themes": "8.12.1-snapshot.47+70bc15c4e"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.8 <=17"
@@ -48,5 +48,5 @@
48
48
  "access": "public"
49
49
  },
50
50
  "sideEffects": false,
51
- "gitHead": "3eb834049428e487ae55ea3ef61fec3eb973156d"
51
+ "gitHead": "70bc15c4e8d89589a1372954f7a230ddde5ef71b"
52
52
  }