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

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-1](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-1) (2022-06-10)
6
+ ## [8.25.1-snapshot-10](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-10) (2022-06-20)
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, _class2;
1
+ var _dec, _dec2, _class;
2
2
 
3
3
  /*
4
4
  * The MIT License (MIT)
@@ -42,54 +42,60 @@ category: components
42
42
  @tsProps
43
43
  **/
44
44
 
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
- }
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;
76
58
 
77
59
  componentDidMount() {
78
- var _this$props$makeStyle, _this$props2;
60
+ var _this$props$makeStyle, _this$props;
79
61
 
80
- (_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
62
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
81
63
  }
82
64
 
83
65
  componentDidUpdate() {
84
- var _this$props$makeStyle2, _this$props3;
66
+ var _this$props$makeStyle2, _this$props2;
85
67
 
86
- (_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
68
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
87
69
  }
88
70
 
89
71
  get focused() {
90
72
  return isActiveElement(this.ref);
91
73
  }
92
74
 
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
+
93
99
  render() {
94
100
  const _this$props4 = this.props,
95
101
  className = _this$props4.className,
@@ -120,12 +126,6 @@ let Tag = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = test
120
126
  }) : null);
121
127
  }
122
128
 
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);
129
+ }) || _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, _class2;
32
+ var _dec, _dec2, _class;
33
33
 
34
34
  /**
35
35
  ---
@@ -37,54 +37,60 @@ 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 = (_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
- }
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;
71
53
 
72
54
  componentDidMount() {
73
- var _this$props$makeStyle, _this$props2;
55
+ var _this$props$makeStyle, _this$props;
74
56
 
75
- (_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
57
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
76
58
  }
77
59
 
78
60
  componentDidUpdate() {
79
- var _this$props$makeStyle2, _this$props3;
61
+ var _this$props$makeStyle2, _this$props2;
80
62
 
81
- (_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
63
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
82
64
  }
83
65
 
84
66
  get focused() {
85
67
  return (0, _isActiveElement.isActiveElement)(this.ref);
86
68
  }
87
69
 
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
+
88
94
  render() {
89
95
  const _this$props4 = this.props,
90
96
  className = _this$props4.className,
@@ -117,13 +123,7 @@ let Tag = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec
117
123
  }) : null);
118
124
  }
119
125
 
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);
126
+ }) || _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-1",
3
+ "version": "8.25.1-snapshot-10",
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-1",
28
- "@instructure/emotion": "8.25.1-snapshot-1",
29
- "@instructure/shared-types": "8.25.1-snapshot-1",
30
- "@instructure/ui-color-utils": "8.25.1-snapshot-1",
31
- "@instructure/ui-dom-utils": "8.25.1-snapshot-1",
32
- "@instructure/ui-icons": "8.25.1-snapshot-1",
33
- "@instructure/ui-react-utils": "8.25.1-snapshot-1",
34
- "@instructure/ui-testable": "8.25.1-snapshot-1",
35
- "@instructure/ui-view": "8.25.1-snapshot-1",
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",
36
36
  "prop-types": "^15"
37
37
  },
38
38
  "devDependencies": {
39
- "@instructure/ui-babel-preset": "8.25.1-snapshot-1",
40
- "@instructure/ui-test-locator": "8.25.1-snapshot-1",
41
- "@instructure/ui-test-utils": "8.25.1-snapshot-1",
42
- "@instructure/ui-themes": "8.25.1-snapshot-1"
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"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.8 <=17"