@instructure/ui-alerts 8.10.1-snapshot.9 → 8.10.3-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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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.10.2](https://github.com/instructure/instructure-ui/compare/v8.10.1...v8.10.2) (2021-10-01)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-alerts
9
+
10
+ ## [8.10.1](https://github.com/instructure/instructure-ui/compare/v8.10.0...v8.10.1) (2021-10-01)
11
+
12
+ **Note:** Version bump only for package @instructure/ui-alerts
13
+
6
14
  # [8.10.0](https://github.com/instructure/instructure-ui/compare/v8.9.1...v8.10.0) (2021-09-28)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-alerts
package/es/Alert/index.js CHANGED
@@ -57,6 +57,11 @@ let Alert = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_clas
57
57
  success: IconCheckMarkSolid,
58
58
  warning: IconWarningBorderlessSolid
59
59
  };
60
+ this.ref = null;
61
+
62
+ this.handleRef = el => {
63
+ this.ref = el;
64
+ };
60
65
 
61
66
  this.handleTimeout = () => {
62
67
  if (this.props.timeout > 0) {
@@ -246,7 +251,8 @@ let Alert = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_clas
246
251
  as: "div",
247
252
  margin: this.props.margin,
248
253
  css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.alert,
249
- onKeyUp: this.handleKeyUp
254
+ onKeyUp: this.handleKeyUp,
255
+ elementRef: this.handleRef
250
256
  }, this.renderIcon(), jsx("div", {
251
257
  css: (_this$props$styles4 = this.props.styles) === null || _this$props$styles4 === void 0 ? void 0 : _this$props$styles4.content
252
258
  }, this.props.children), this.renderCloseButton());
@@ -62,6 +62,11 @@ let Alert = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
62
62
  success: _IconCheckMarkSolid.IconCheckMarkSolid,
63
63
  warning: _IconWarningBorderlessSolid.IconWarningBorderlessSolid
64
64
  };
65
+ this.ref = null;
66
+
67
+ this.handleRef = el => {
68
+ this.ref = el;
69
+ };
65
70
 
66
71
  this.handleTimeout = () => {
67
72
  if (this.props.timeout > 0) {
@@ -254,7 +259,8 @@ let Alert = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
254
259
  as: "div",
255
260
  margin: this.props.margin,
256
261
  css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.alert,
257
- onKeyUp: this.handleKeyUp
262
+ onKeyUp: this.handleKeyUp,
263
+ elementRef: this.handleRef
258
264
  }, this.renderIcon(), (0, _emotion.jsx)("div", {
259
265
  css: (_this$props$styles4 = this.props.styles) === null || _this$props$styles4 === void 0 ? void 0 : _this$props$styles4.content
260
266
  }, this.props.children), this.renderCloseButton());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-alerts",
3
- "version": "8.10.1-snapshot.9+93b506fe0",
3
+ "version": "8.10.3-snapshot.2+ccdf8f43b",
4
4
  "description": "An alert component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -24,24 +24,24 @@
24
24
  },
25
25
  "license": "MIT",
26
26
  "devDependencies": {
27
- "@instructure/ui-babel-preset": "8.10.1-snapshot.9+93b506fe0",
28
- "@instructure/ui-color-utils": "8.10.1-snapshot.9+93b506fe0",
29
- "@instructure/ui-test-utils": "8.10.1-snapshot.9+93b506fe0"
27
+ "@instructure/ui-babel-preset": "8.10.3-snapshot.2+ccdf8f43b",
28
+ "@instructure/ui-color-utils": "8.10.3-snapshot.2+ccdf8f43b",
29
+ "@instructure/ui-test-utils": "8.10.3-snapshot.2+ccdf8f43b"
30
30
  },
31
31
  "dependencies": {
32
32
  "@babel/runtime": "^7.13.10",
33
- "@instructure/console": "8.10.1-snapshot.9+93b506fe0",
34
- "@instructure/emotion": "8.10.1-snapshot.9+93b506fe0",
35
- "@instructure/shared-types": "8.10.1-snapshot.9+93b506fe0",
36
- "@instructure/ui-a11y-content": "8.10.1-snapshot.9+93b506fe0",
37
- "@instructure/ui-buttons": "8.10.1-snapshot.9+93b506fe0",
38
- "@instructure/ui-icons": "8.10.1-snapshot.9+93b506fe0",
39
- "@instructure/ui-motion": "8.10.1-snapshot.9+93b506fe0",
40
- "@instructure/ui-react-utils": "8.10.1-snapshot.9+93b506fe0",
41
- "@instructure/ui-themes": "8.10.1-snapshot.9+93b506fe0",
42
- "@instructure/ui-utils": "8.10.1-snapshot.9+93b506fe0",
43
- "@instructure/ui-view": "8.10.1-snapshot.9+93b506fe0",
44
- "@instructure/uid": "8.10.1-snapshot.9+93b506fe0",
33
+ "@instructure/console": "8.10.3-snapshot.2+ccdf8f43b",
34
+ "@instructure/emotion": "8.10.3-snapshot.2+ccdf8f43b",
35
+ "@instructure/shared-types": "8.10.3-snapshot.2+ccdf8f43b",
36
+ "@instructure/ui-a11y-content": "8.10.3-snapshot.2+ccdf8f43b",
37
+ "@instructure/ui-buttons": "8.10.3-snapshot.2+ccdf8f43b",
38
+ "@instructure/ui-icons": "8.10.3-snapshot.2+ccdf8f43b",
39
+ "@instructure/ui-motion": "8.10.3-snapshot.2+ccdf8f43b",
40
+ "@instructure/ui-react-utils": "8.10.3-snapshot.2+ccdf8f43b",
41
+ "@instructure/ui-themes": "8.10.3-snapshot.2+ccdf8f43b",
42
+ "@instructure/ui-utils": "8.10.3-snapshot.2+ccdf8f43b",
43
+ "@instructure/ui-view": "8.10.3-snapshot.2+ccdf8f43b",
44
+ "@instructure/uid": "8.10.3-snapshot.2+ccdf8f43b",
45
45
  "keycode": "^2",
46
46
  "prop-types": "^15"
47
47
  },
@@ -53,5 +53,5 @@
53
53
  "access": "public"
54
54
  },
55
55
  "sideEffects": false,
56
- "gitHead": "93b506fe0860718ebe2cc2729fd023e3e7489231"
56
+ "gitHead": "ccdf8f43b56a8edef32600281692dfeb436d5a01"
57
57
  }
@@ -90,6 +90,12 @@ class Alert extends Component<AlertProps> {
90
90
  warning: IconWarningBorderlessSolid
91
91
  }
92
92
 
93
+ ref: Element | null = null
94
+
95
+ handleRef = (el: Element | null) => {
96
+ this.ref = el
97
+ }
98
+
93
99
  handleTimeout = () => {
94
100
  // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'.
95
101
  if (this.props.timeout > 0) {
@@ -294,6 +300,7 @@ class Alert extends Component<AlertProps> {
294
300
  margin={this.props.margin}
295
301
  css={this.props.styles?.alert}
296
302
  onKeyUp={this.handleKeyUp}
303
+ elementRef={this.handleRef}
297
304
  >
298
305
  {this.renderIcon()}
299
306
  <div css={this.props.styles?.content}>{this.props.children}</div>
@@ -60,6 +60,8 @@ declare class Alert extends Component<AlertProps> {
60
60
  success: typeof IconCheckMarkSolid;
61
61
  warning: typeof IconWarningBorderlessSolid;
62
62
  };
63
+ ref: Element | null;
64
+ handleRef: (el: Element | null) => void;
63
65
  handleTimeout: () => void;
64
66
  clearTimeouts(): void;
65
67
  onExitTransition: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Alert/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQjC,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAK9B,OAAO,EAAa,GAAG,EAAwB,MAAM,sBAAsB,CAAA;AAM3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC;;;;GAIG;AACH,cACM,KAAM,SAAQ,SAAS,CAAC,UAAU,CAAC;IACvC,MAAM,CAAC,QAAQ,CAAC,WAAW,WAAU;IAErC,MAAM,CAAC,SAAS;;;;;;;;;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