@instructure/ui-tag 8.25.1-snapshot-10 → 8.25.1-snapshot-13

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,7 +3,7 @@
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
- ## [8.25.1-snapshot-10](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-10) (2022-06-20)
6
+ ## [8.25.1-snapshot-13](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-13) (2022-06-22)
7
7
 
8
8
  **Note:** Version bump only for package @instructure/ui-tag
9
9
 
package/es/Tag/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var _dec, _dec2, _class;
1
+ var _dec, _dec2, _class, _class2;
2
2
 
3
3
  /*
4
4
  * The MIT License (MIT)
@@ -42,60 +42,54 @@ category: components
42
42
  @tsProps
43
43
  **/
44
44
 
45
- let Tag = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = class Tag extends Component {
46
- static displayName = "Tag";
47
- static componentId = 'Tag';
48
- static allowedProps = allowedProps;
49
- static propTypes = propTypes;
50
- static defaultProps = {
51
- size: 'medium',
52
- dismissible: false,
53
- variant: 'default',
54
- disabled: false,
55
- readOnly: false
56
- };
57
- ref = null;
45
+ let Tag = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class Tag extends Component {
46
+ constructor() {
47
+ super(...arguments);
48
+ this.ref = null;
49
+
50
+ this.focus = () => {
51
+ this.ref && this.ref.focus();
52
+ };
53
+
54
+ this.handleClick = e => {
55
+ const _this$props = this.props,
56
+ disabled = _this$props.disabled,
57
+ readOnly = _this$props.readOnly,
58
+ onClick = _this$props.onClick;
59
+
60
+ if (disabled || readOnly) {
61
+ e.preventDefault();
62
+ e.stopPropagation();
63
+ } else if (typeof onClick === 'function') {
64
+ onClick(e);
65
+ }
66
+ };
67
+
68
+ this.handleRef = element => {
69
+ this.ref = element;
70
+
71
+ if (typeof this.props.elementRef === 'function') {
72
+ this.props.elementRef(element);
73
+ }
74
+ };
75
+ }
58
76
 
59
77
  componentDidMount() {
60
- var _this$props$makeStyle, _this$props;
78
+ var _this$props$makeStyle, _this$props2;
61
79
 
62
- (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
80
+ (_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
63
81
  }
64
82
 
65
83
  componentDidUpdate() {
66
- var _this$props$makeStyle2, _this$props2;
84
+ var _this$props$makeStyle2, _this$props3;
67
85
 
68
- (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
86
+ (_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
69
87
  }
70
88
 
71
89
  get focused() {
72
90
  return isActiveElement(this.ref);
73
91
  }
74
92
 
75
- focus = () => {
76
- this.ref && this.ref.focus();
77
- };
78
- handleClick = e => {
79
- const _this$props3 = this.props,
80
- disabled = _this$props3.disabled,
81
- readOnly = _this$props3.readOnly,
82
- onClick = _this$props3.onClick;
83
-
84
- if (disabled || readOnly) {
85
- e.preventDefault();
86
- e.stopPropagation();
87
- } else if (typeof onClick === 'function') {
88
- onClick(e);
89
- }
90
- };
91
- handleRef = element => {
92
- this.ref = element;
93
-
94
- if (typeof this.props.elementRef === 'function') {
95
- this.props.elementRef(element);
96
- }
97
- };
98
-
99
93
  render() {
100
94
  const _this$props4 = this.props,
101
95
  className = _this$props4.className,
@@ -126,6 +120,12 @@ let Tag = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = test
126
120
  }) : null);
127
121
  }
128
122
 
129
- }) || _class) || _class);
123
+ }, _class2.displayName = "Tag", _class2.componentId = 'Tag', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
124
+ size: 'medium',
125
+ dismissible: false,
126
+ variant: 'default',
127
+ disabled: false,
128
+ readOnly: false
129
+ }, _class2)) || _class) || _class);
130
130
  export default Tag;
131
131
  export { Tag };
package/lib/Tag/index.js CHANGED
@@ -29,7 +29,7 @@ var _theme = _interopRequireDefault(require("./theme"));
29
29
 
30
30
  var _props = require("./props");
31
31
 
32
- var _dec, _dec2, _class;
32
+ var _dec, _dec2, _class, _class2;
33
33
 
34
34
  /**
35
35
  ---
@@ -37,60 +37,54 @@ category: components
37
37
  ---
38
38
  @tsProps
39
39
  **/
40
- let Tag = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = class Tag extends _react.Component {
41
- static displayName = "Tag";
42
- static componentId = 'Tag';
43
- static allowedProps = _props.allowedProps;
44
- static propTypes = _props.propTypes;
45
- static defaultProps = {
46
- size: 'medium',
47
- dismissible: false,
48
- variant: 'default',
49
- disabled: false,
50
- readOnly: false
51
- };
52
- ref = null;
40
+ let Tag = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class Tag extends _react.Component {
41
+ constructor() {
42
+ super(...arguments);
43
+ this.ref = null;
44
+
45
+ this.focus = () => {
46
+ this.ref && this.ref.focus();
47
+ };
48
+
49
+ this.handleClick = e => {
50
+ const _this$props = this.props,
51
+ disabled = _this$props.disabled,
52
+ readOnly = _this$props.readOnly,
53
+ onClick = _this$props.onClick;
54
+
55
+ if (disabled || readOnly) {
56
+ e.preventDefault();
57
+ e.stopPropagation();
58
+ } else if (typeof onClick === 'function') {
59
+ onClick(e);
60
+ }
61
+ };
62
+
63
+ this.handleRef = element => {
64
+ this.ref = element;
65
+
66
+ if (typeof this.props.elementRef === 'function') {
67
+ this.props.elementRef(element);
68
+ }
69
+ };
70
+ }
53
71
 
54
72
  componentDidMount() {
55
- var _this$props$makeStyle, _this$props;
73
+ var _this$props$makeStyle, _this$props2;
56
74
 
57
- (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
75
+ (_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
58
76
  }
59
77
 
60
78
  componentDidUpdate() {
61
- var _this$props$makeStyle2, _this$props2;
79
+ var _this$props$makeStyle2, _this$props3;
62
80
 
63
- (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
81
+ (_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
64
82
  }
65
83
 
66
84
  get focused() {
67
85
  return (0, _isActiveElement.isActiveElement)(this.ref);
68
86
  }
69
87
 
70
- focus = () => {
71
- this.ref && this.ref.focus();
72
- };
73
- handleClick = e => {
74
- const _this$props3 = this.props,
75
- disabled = _this$props3.disabled,
76
- readOnly = _this$props3.readOnly,
77
- onClick = _this$props3.onClick;
78
-
79
- if (disabled || readOnly) {
80
- e.preventDefault();
81
- e.stopPropagation();
82
- } else if (typeof onClick === 'function') {
83
- onClick(e);
84
- }
85
- };
86
- handleRef = element => {
87
- this.ref = element;
88
-
89
- if (typeof this.props.elementRef === 'function') {
90
- this.props.elementRef(element);
91
- }
92
- };
93
-
94
88
  render() {
95
89
  const _this$props4 = this.props,
96
90
  className = _this$props4.className,
@@ -123,7 +117,13 @@ let Tag = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec
123
117
  }) : null);
124
118
  }
125
119
 
126
- }) || _class) || _class);
120
+ }, _class2.displayName = "Tag", _class2.componentId = 'Tag', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
121
+ size: 'medium',
122
+ dismissible: false,
123
+ variant: 'default',
124
+ disabled: false,
125
+ readOnly: false
126
+ }, _class2)) || _class) || _class);
127
127
  exports.Tag = Tag;
128
128
  var _default = Tag;
129
129
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-tag",
3
- "version": "8.25.1-snapshot-10",
3
+ "version": "8.25.1-snapshot-13",
4
4
  "description": "A tag component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,22 +24,22 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.13.10",
27
- "@instructure/console": "8.25.1-snapshot-10",
28
- "@instructure/emotion": "8.25.1-snapshot-10",
29
- "@instructure/shared-types": "8.25.1-snapshot-10",
30
- "@instructure/ui-color-utils": "8.25.1-snapshot-10",
31
- "@instructure/ui-dom-utils": "8.25.1-snapshot-10",
32
- "@instructure/ui-icons": "8.25.1-snapshot-10",
33
- "@instructure/ui-react-utils": "8.25.1-snapshot-10",
34
- "@instructure/ui-testable": "8.25.1-snapshot-10",
35
- "@instructure/ui-view": "8.25.1-snapshot-10",
27
+ "@instructure/console": "8.25.1-snapshot-13",
28
+ "@instructure/emotion": "8.25.1-snapshot-13",
29
+ "@instructure/shared-types": "8.25.1-snapshot-13",
30
+ "@instructure/ui-color-utils": "8.25.1-snapshot-13",
31
+ "@instructure/ui-dom-utils": "8.25.1-snapshot-13",
32
+ "@instructure/ui-icons": "8.25.1-snapshot-13",
33
+ "@instructure/ui-react-utils": "8.25.1-snapshot-13",
34
+ "@instructure/ui-testable": "8.25.1-snapshot-13",
35
+ "@instructure/ui-view": "8.25.1-snapshot-13",
36
36
  "prop-types": "^15"
37
37
  },
38
38
  "devDependencies": {
39
- "@instructure/ui-babel-preset": "8.25.1-snapshot-10",
40
- "@instructure/ui-test-locator": "8.25.1-snapshot-10",
41
- "@instructure/ui-test-utils": "8.25.1-snapshot-10",
42
- "@instructure/ui-themes": "8.25.1-snapshot-10"
39
+ "@instructure/ui-babel-preset": "8.25.1-snapshot-13",
40
+ "@instructure/ui-test-locator": "8.25.1-snapshot-13",
41
+ "@instructure/ui-test-utils": "8.25.1-snapshot-13",
42
+ "@instructure/ui-themes": "8.25.1-snapshot-13"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.8 <=17"