@instructure/ui-pill 8.18.0 → 8.18.1-snapshot.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/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.
package/es/Pill/index.js CHANGED
@@ -65,11 +65,15 @@ let Pill = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
65
65
  }
66
66
 
67
67
  componentDidMount() {
68
- this.props.makeStyles?.();
68
+ var _this$props$makeStyle, _this$props;
69
+
70
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
69
71
  }
70
72
 
71
73
  componentDidUpdate() {
72
- this.props.makeStyles?.();
74
+ var _this$props$makeStyle2, _this$props2;
75
+
76
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
73
77
  }
74
78
 
75
79
  handleTruncation(truncated) {
@@ -81,15 +85,15 @@ let Pill = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
81
85
  }
82
86
 
83
87
  renderPill(focused, getTriggerProps) {
84
- const _this$props = this.props,
85
- margin = _this$props.margin,
86
- children = _this$props.children,
87
- color = _this$props.color,
88
- as = _this$props.as,
89
- elementRef = _this$props.elementRef,
90
- styles = _this$props.styles,
91
- makeStyles = _this$props.makeStyles,
92
- props = _objectWithoutProperties(_this$props, _excluded);
88
+ const _this$props3 = this.props,
89
+ margin = _this$props3.margin,
90
+ children = _this$props3.children,
91
+ color = _this$props3.color,
92
+ as = _this$props3.as,
93
+ elementRef = _this$props3.elementRef,
94
+ styles = _this$props3.styles,
95
+ makeStyles = _this$props3.makeStyles,
96
+ props = _objectWithoutProperties(_this$props3, _excluded);
93
97
 
94
98
  const filteredProps = passthroughProps(props);
95
99
  const containerProps = typeof getTriggerProps === 'function' ? getTriggerProps(filteredProps) : filteredProps;
@@ -98,7 +102,7 @@ let Pill = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
98
102
  elementRef: this.handleRef,
99
103
  margin: margin,
100
104
  padding: "0",
101
- maxWidth: styles?.maxWidth,
105
+ maxWidth: styles === null || styles === void 0 ? void 0 : styles.maxWidth,
102
106
  background: "transparent",
103
107
  borderRadius: "pill",
104
108
  borderWidth: "0",
@@ -107,9 +111,9 @@ let Pill = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
107
111
  withFocusOutline: focused,
108
112
  focusColor: "info"
109
113
  }), jsx("span", {
110
- css: styles?.pill
114
+ css: styles === null || styles === void 0 ? void 0 : styles.pill
111
115
  }, jsx("span", {
112
- css: styles?.text
116
+ css: styles === null || styles === void 0 ? void 0 : styles.text
113
117
  }, jsx(TruncateText, {
114
118
  onUpdate: truncated => {
115
119
  this.handleTruncation(truncated);
package/es/Pill/theme.js CHANGED
@@ -39,22 +39,22 @@ const generateComponentTheme = theme => {
39
39
  }
40
40
  };
41
41
  const componentVariables = {
42
- fontFamily: typography?.fontFamily,
43
- padding: `0 ${spacing?.xSmall}`,
42
+ fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
43
+ padding: `0 ${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall}`,
44
44
  height: '1.3125rem',
45
- background: colors?.backgroundLightest,
45
+ background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
46
46
  textTransformStyle: 'uppercase',
47
- textFontSize: typography?.fontSizeXSmall,
48
- textFontWeight: typography?.fontWeightBold,
47
+ textFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeXSmall,
48
+ textFontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
49
49
  maxWidth: '15rem',
50
- primaryColor: colors?.textDark,
51
- infoColor: colors?.textInfo,
52
- dangerColor: colors?.textDanger,
53
- successColor: colors?.textSuccess,
54
- warningColor: colors?.textWarning,
55
- alertColor: colors?.textAlert,
56
- borderWidth: borders?.widthSmall,
57
- borderStyle: borders?.style,
50
+ primaryColor: colors === null || colors === void 0 ? void 0 : colors.textDark,
51
+ infoColor: colors === null || colors === void 0 ? void 0 : colors.textInfo,
52
+ dangerColor: colors === null || colors === void 0 ? void 0 : colors.textDanger,
53
+ successColor: colors === null || colors === void 0 ? void 0 : colors.textSuccess,
54
+ warningColor: colors === null || colors === void 0 ? void 0 : colors.textWarning,
55
+ alertColor: colors === null || colors === void 0 ? void 0 : colors.textAlert,
56
+ borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
57
+ borderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
58
58
  borderRadius: '999rem'
59
59
  };
60
60
  return { ...componentVariables,
package/lib/Pill/index.js CHANGED
@@ -59,11 +59,15 @@ let Pill = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
59
59
  }
60
60
 
61
61
  componentDidMount() {
62
- this.props.makeStyles?.();
62
+ var _this$props$makeStyle, _this$props;
63
+
64
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
63
65
  }
64
66
 
65
67
  componentDidUpdate() {
66
- this.props.makeStyles?.();
68
+ var _this$props$makeStyle2, _this$props2;
69
+
70
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
67
71
  }
68
72
 
69
73
  handleTruncation(truncated) {
@@ -75,15 +79,15 @@ let Pill = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
75
79
  }
76
80
 
77
81
  renderPill(focused, getTriggerProps) {
78
- const _this$props = this.props,
79
- margin = _this$props.margin,
80
- children = _this$props.children,
81
- color = _this$props.color,
82
- as = _this$props.as,
83
- elementRef = _this$props.elementRef,
84
- styles = _this$props.styles,
85
- makeStyles = _this$props.makeStyles,
86
- props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
82
+ const _this$props3 = this.props,
83
+ margin = _this$props3.margin,
84
+ children = _this$props3.children,
85
+ color = _this$props3.color,
86
+ as = _this$props3.as,
87
+ elementRef = _this$props3.elementRef,
88
+ styles = _this$props3.styles,
89
+ makeStyles = _this$props3.makeStyles,
90
+ props = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
87
91
  const filteredProps = (0, _passthroughProps.passthroughProps)(props);
88
92
  const containerProps = typeof getTriggerProps === 'function' ? getTriggerProps(filteredProps) : filteredProps;
89
93
  return (0, _emotion.jsx)(_View.View, Object.assign({}, containerProps, {
@@ -91,7 +95,7 @@ let Pill = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
91
95
  elementRef: this.handleRef,
92
96
  margin: margin,
93
97
  padding: "0",
94
- maxWidth: styles?.maxWidth,
98
+ maxWidth: styles === null || styles === void 0 ? void 0 : styles.maxWidth,
95
99
  background: "transparent",
96
100
  borderRadius: "pill",
97
101
  borderWidth: "0",
@@ -100,9 +104,9 @@ let Pill = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
100
104
  withFocusOutline: focused,
101
105
  focusColor: "info"
102
106
  }), (0, _emotion.jsx)("span", {
103
- css: styles?.pill
107
+ css: styles === null || styles === void 0 ? void 0 : styles.pill
104
108
  }, (0, _emotion.jsx)("span", {
105
- css: styles?.text
109
+ css: styles === null || styles === void 0 ? void 0 : styles.text
106
110
  }, (0, _emotion.jsx)(_TruncateText.TruncateText, {
107
111
  onUpdate: truncated => {
108
112
  this.handleTruncation(truncated);
package/lib/Pill/theme.js CHANGED
@@ -46,22 +46,22 @@ const generateComponentTheme = theme => {
46
46
  }
47
47
  };
48
48
  const componentVariables = {
49
- fontFamily: typography?.fontFamily,
50
- padding: `0 ${spacing?.xSmall}`,
49
+ fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
50
+ padding: `0 ${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall}`,
51
51
  height: '1.3125rem',
52
- background: colors?.backgroundLightest,
52
+ background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
53
53
  textTransformStyle: 'uppercase',
54
- textFontSize: typography?.fontSizeXSmall,
55
- textFontWeight: typography?.fontWeightBold,
54
+ textFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeXSmall,
55
+ textFontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
56
56
  maxWidth: '15rem',
57
- primaryColor: colors?.textDark,
58
- infoColor: colors?.textInfo,
59
- dangerColor: colors?.textDanger,
60
- successColor: colors?.textSuccess,
61
- warningColor: colors?.textWarning,
62
- alertColor: colors?.textAlert,
63
- borderWidth: borders?.widthSmall,
64
- borderStyle: borders?.style,
57
+ primaryColor: colors === null || colors === void 0 ? void 0 : colors.textDark,
58
+ infoColor: colors === null || colors === void 0 ? void 0 : colors.textInfo,
59
+ dangerColor: colors === null || colors === void 0 ? void 0 : colors.textDanger,
60
+ successColor: colors === null || colors === void 0 ? void 0 : colors.textSuccess,
61
+ warningColor: colors === null || colors === void 0 ? void 0 : colors.textWarning,
62
+ alertColor: colors === null || colors === void 0 ? void 0 : colors.textAlert,
63
+ borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
64
+ borderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
65
65
  borderRadius: '999rem'
66
66
  };
67
67
  return { ...componentVariables,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-pill",
3
- "version": "8.18.0",
3
+ "version": "8.18.1-snapshot.0+435c9ae79",
4
4
  "description": "A UI component to communicate concise status.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,24 +24,24 @@
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-react-utils": "8.18.0",
31
- "@instructure/ui-testable": "8.18.0",
32
- "@instructure/ui-tooltip": "8.18.0",
33
- "@instructure/ui-truncate-text": "8.18.0",
34
- "@instructure/ui-utils": "8.18.0",
35
- "@instructure/ui-view": "8.18.0",
27
+ "@instructure/console": "8.18.1-snapshot.0+435c9ae79",
28
+ "@instructure/emotion": "8.18.1-snapshot.0+435c9ae79",
29
+ "@instructure/shared-types": "8.18.1-snapshot.0+435c9ae79",
30
+ "@instructure/ui-react-utils": "8.18.1-snapshot.0+435c9ae79",
31
+ "@instructure/ui-testable": "8.18.1-snapshot.0+435c9ae79",
32
+ "@instructure/ui-tooltip": "8.18.1-snapshot.0+435c9ae79",
33
+ "@instructure/ui-truncate-text": "8.18.1-snapshot.0+435c9ae79",
34
+ "@instructure/ui-utils": "8.18.1-snapshot.0+435c9ae79",
35
+ "@instructure/ui-view": "8.18.1-snapshot.0+435c9ae79",
36
36
  "prop-types": "^15"
37
37
  },
38
38
  "devDependencies": {
39
- "@instructure/ui-babel-preset": "8.18.0",
40
- "@instructure/ui-color-utils": "8.18.0",
41
- "@instructure/ui-test-locator": "8.18.0",
42
- "@instructure/ui-test-queries": "8.18.0",
43
- "@instructure/ui-test-utils": "8.18.0",
44
- "@instructure/ui-themes": "8.18.0"
39
+ "@instructure/ui-babel-preset": "8.18.1-snapshot.0+435c9ae79",
40
+ "@instructure/ui-color-utils": "8.18.1-snapshot.0+435c9ae79",
41
+ "@instructure/ui-test-locator": "8.18.1-snapshot.0+435c9ae79",
42
+ "@instructure/ui-test-queries": "8.18.1-snapshot.0+435c9ae79",
43
+ "@instructure/ui-test-utils": "8.18.1-snapshot.0+435c9ae79",
44
+ "@instructure/ui-themes": "8.18.1-snapshot.0+435c9ae79"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": ">=16.8 <=17"
@@ -49,5 +49,6 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "sideEffects": false
52
+ "sideEffects": false,
53
+ "gitHead": "435c9ae794c15e2bd103f700f8c4e946d91c1b59"
53
54
  }