@instructure/ui-metric 8.18.0 → 8.18.1-snapshot.2

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/LICENSE.md ADDED
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: The MIT License (MIT)
3
+ category: Getting Started
4
+ order: 9
5
+ ---
6
+
7
+ # The MIT License (MIT)
8
+
9
+ Copyright (c) 2015 Instructure, Inc.
10
+
11
+ **Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions.**
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
@@ -61,6 +61,8 @@ let Metric = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = t
61
61
  }
62
62
 
63
63
  render() {
64
+ var _this$props$styles, _this$props$styles2, _this$props$styles3;
65
+
64
66
  const _this$props = this.props,
65
67
  textAlign = _this$props.textAlign,
66
68
  renderLabel = _this$props.renderLabel,
@@ -70,14 +72,14 @@ let Metric = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = t
70
72
 
71
73
  return jsx("div", Object.assign({}, passthroughProps(rest), {
72
74
  role: isGroupChild ? 'row' : void 0,
73
- css: this.props.styles?.metric,
75
+ css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.metric,
74
76
  ref: this.handleRef
75
77
  }), jsx("div", {
76
78
  role: isGroupChild ? 'rowheader' : void 0,
77
- css: this.props.styles?.label
79
+ css: (_this$props$styles2 = this.props.styles) === null || _this$props$styles2 === void 0 ? void 0 : _this$props$styles2.label
78
80
  }, callRenderProp(renderLabel)), jsx("div", {
79
81
  role: isGroupChild ? 'gridcell' : void 0,
80
- css: this.props.styles?.value
82
+ css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.value
81
83
  }, callRenderProp(renderValue)));
82
84
  }
83
85
 
@@ -39,13 +39,13 @@ const generateComponentTheme = theme => {
39
39
  }
40
40
  };
41
41
  const componentVariables = {
42
- padding: `0 ${spacing?.xSmall}`,
43
- fontFamily: typography?.fontFamily,
44
- valueColor: colors?.textDarkest,
45
- valueFontSize: typography?.fontSizeXLarge,
46
- valueFontWeight: typography?.fontWeightBold,
47
- labelColor: colors?.textDarkest,
48
- labelFontSize: typography?.fontSizeXSmall
42
+ padding: `0 ${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall}`,
43
+ fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
44
+ valueColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
45
+ valueFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeXLarge,
46
+ valueFontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
47
+ labelColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
48
+ labelFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeXSmall
49
49
  };
50
50
  return { ...componentVariables,
51
51
  ...themeSpecificStyle[themeName]
@@ -66,8 +66,10 @@ let MetricGroup = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
66
66
  }
67
67
 
68
68
  render() {
69
+ var _this$props$styles;
70
+
69
71
  return jsx("div", Object.assign({}, passthroughProps(this.props), {
70
- css: this.props.styles?.metricGroup,
72
+ css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.metricGroup,
71
73
  role: "grid",
72
74
  "aria-readonly": "true",
73
75
  ref: this.handleRef
@@ -30,7 +30,7 @@
30
30
  const generateComponentTheme = theme => {
31
31
  const typography = theme.typography;
32
32
  const componentVariables = {
33
- lineHeight: typography?.lineHeightCondensed
33
+ lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed
34
34
  };
35
35
  return { ...componentVariables
36
36
  };
@@ -54,6 +54,8 @@ let Metric = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _
54
54
  }
55
55
 
56
56
  render() {
57
+ var _this$props$styles, _this$props$styles2, _this$props$styles3;
58
+
57
59
  const _this$props = this.props,
58
60
  textAlign = _this$props.textAlign,
59
61
  renderLabel = _this$props.renderLabel,
@@ -62,14 +64,14 @@ let Metric = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _
62
64
  rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
63
65
  return (0, _emotion.jsx)("div", Object.assign({}, (0, _passthroughProps.passthroughProps)(rest), {
64
66
  role: isGroupChild ? 'row' : void 0,
65
- css: this.props.styles?.metric,
67
+ css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.metric,
66
68
  ref: this.handleRef
67
69
  }), (0, _emotion.jsx)("div", {
68
70
  role: isGroupChild ? 'rowheader' : void 0,
69
- css: this.props.styles?.label
71
+ css: (_this$props$styles2 = this.props.styles) === null || _this$props$styles2 === void 0 ? void 0 : _this$props$styles2.label
70
72
  }, (0, _callRenderProp.callRenderProp)(renderLabel)), (0, _emotion.jsx)("div", {
71
73
  role: isGroupChild ? 'gridcell' : void 0,
72
- css: this.props.styles?.value
74
+ css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.value
73
75
  }, (0, _callRenderProp.callRenderProp)(renderValue)));
74
76
  }
75
77
 
@@ -46,13 +46,13 @@ const generateComponentTheme = theme => {
46
46
  }
47
47
  };
48
48
  const componentVariables = {
49
- padding: `0 ${spacing?.xSmall}`,
50
- fontFamily: typography?.fontFamily,
51
- valueColor: colors?.textDarkest,
52
- valueFontSize: typography?.fontSizeXLarge,
53
- valueFontWeight: typography?.fontWeightBold,
54
- labelColor: colors?.textDarkest,
55
- labelFontSize: typography?.fontSizeXSmall
49
+ padding: `0 ${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall}`,
50
+ fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
51
+ valueColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
52
+ valueFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeXLarge,
53
+ valueFontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
54
+ labelColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
55
+ labelFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeXSmall
56
56
  };
57
57
  return { ...componentVariables,
58
58
  ...themeSpecificStyle[themeName]
@@ -58,8 +58,10 @@ let MetricGroup = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defaul
58
58
  }
59
59
 
60
60
  render() {
61
+ var _this$props$styles;
62
+
61
63
  return (0, _emotion.jsx)("div", Object.assign({}, (0, _passthroughProps.passthroughProps)(this.props), {
62
- css: this.props.styles?.metricGroup,
64
+ css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.metricGroup,
63
65
  role: "grid",
64
66
  "aria-readonly": "true",
65
67
  ref: this.handleRef
@@ -37,7 +37,7 @@ exports.default = void 0;
37
37
  const generateComponentTheme = theme => {
38
38
  const typography = theme.typography;
39
39
  const componentVariables = {
40
- lineHeight: typography?.lineHeightCondensed
40
+ lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed
41
41
  };
42
42
  return { ...componentVariables
43
43
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-metric",
3
- "version": "8.18.0",
3
+ "version": "8.18.1-snapshot.2+ca4c1ff9d",
4
4
  "description": "A UI component for displaying Metrics",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,20 +24,20 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.13.10",
27
- "@instructure/console": "8.18.0",
28
- "@instructure/emotion": "8.18.0",
29
- "@instructure/shared-types": "8.18.0",
30
- "@instructure/ui-prop-types": "8.18.0",
31
- "@instructure/ui-react-utils": "8.18.0",
32
- "@instructure/ui-testable": "8.18.0",
27
+ "@instructure/console": "8.18.1-snapshot.2+ca4c1ff9d",
28
+ "@instructure/emotion": "8.18.1-snapshot.2+ca4c1ff9d",
29
+ "@instructure/shared-types": "8.18.1-snapshot.2+ca4c1ff9d",
30
+ "@instructure/ui-prop-types": "8.18.1-snapshot.2+ca4c1ff9d",
31
+ "@instructure/ui-react-utils": "8.18.1-snapshot.2+ca4c1ff9d",
32
+ "@instructure/ui-testable": "8.18.1-snapshot.2+ca4c1ff9d",
33
33
  "prop-types": "^15"
34
34
  },
35
35
  "devDependencies": {
36
- "@instructure/ui-babel-preset": "8.18.0",
37
- "@instructure/ui-color-utils": "8.18.0",
38
- "@instructure/ui-test-locator": "8.18.0",
39
- "@instructure/ui-test-utils": "8.18.0",
40
- "@instructure/ui-themes": "8.18.0"
36
+ "@instructure/ui-babel-preset": "8.18.1-snapshot.2+ca4c1ff9d",
37
+ "@instructure/ui-color-utils": "8.18.1-snapshot.2+ca4c1ff9d",
38
+ "@instructure/ui-test-locator": "8.18.1-snapshot.2+ca4c1ff9d",
39
+ "@instructure/ui-test-utils": "8.18.1-snapshot.2+ca4c1ff9d",
40
+ "@instructure/ui-themes": "8.18.1-snapshot.2+ca4c1ff9d"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "react": ">=16.8 <=17"
@@ -45,5 +45,6 @@
45
45
  "publishConfig": {
46
46
  "access": "public"
47
47
  },
48
- "sideEffects": false
48
+ "sideEffects": false,
49
+ "gitHead": "ca4c1ff9d3985151ae0758fb596de41652dbb58b"
49
50
  }