@instructure/ui-alerts 8.10.1-snapshot.8 → 8.10.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 +8 -0
- package/es/Alert/index.js +7 -1
- package/lib/Alert/index.js +7 -1
- package/package.json +17 -18
- package/src/Alert/index.tsx +7 -0
- package/types/Alert/index.d.ts +2 -0
- package/types/Alert/index.d.ts.map +1 -1
- package/LICENSE.md +0 -27
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());
|
package/lib/Alert/index.js
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "8.10.2",
|
|
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.
|
|
28
|
-
"@instructure/ui-color-utils": "8.10.
|
|
29
|
-
"@instructure/ui-test-utils": "8.10.
|
|
27
|
+
"@instructure/ui-babel-preset": "8.10.2",
|
|
28
|
+
"@instructure/ui-color-utils": "8.10.2",
|
|
29
|
+
"@instructure/ui-test-utils": "8.10.2"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/runtime": "^7.13.10",
|
|
33
|
-
"@instructure/console": "8.10.
|
|
34
|
-
"@instructure/emotion": "8.10.
|
|
35
|
-
"@instructure/shared-types": "8.10.
|
|
36
|
-
"@instructure/ui-a11y-content": "8.10.
|
|
37
|
-
"@instructure/ui-buttons": "8.10.
|
|
38
|
-
"@instructure/ui-icons": "8.10.
|
|
39
|
-
"@instructure/ui-motion": "8.10.
|
|
40
|
-
"@instructure/ui-react-utils": "8.10.
|
|
41
|
-
"@instructure/ui-themes": "8.10.
|
|
42
|
-
"@instructure/ui-utils": "8.10.
|
|
43
|
-
"@instructure/ui-view": "8.10.
|
|
44
|
-
"@instructure/uid": "8.10.
|
|
33
|
+
"@instructure/console": "8.10.2",
|
|
34
|
+
"@instructure/emotion": "8.10.2",
|
|
35
|
+
"@instructure/shared-types": "8.10.2",
|
|
36
|
+
"@instructure/ui-a11y-content": "8.10.2",
|
|
37
|
+
"@instructure/ui-buttons": "8.10.2",
|
|
38
|
+
"@instructure/ui-icons": "8.10.2",
|
|
39
|
+
"@instructure/ui-motion": "8.10.2",
|
|
40
|
+
"@instructure/ui-react-utils": "8.10.2",
|
|
41
|
+
"@instructure/ui-themes": "8.10.2",
|
|
42
|
+
"@instructure/ui-utils": "8.10.2",
|
|
43
|
+
"@instructure/ui-view": "8.10.2",
|
|
44
|
+
"@instructure/uid": "8.10.2",
|
|
45
45
|
"keycode": "^2",
|
|
46
46
|
"prop-types": "^15"
|
|
47
47
|
},
|
|
@@ -52,6 +52,5 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
|
-
"sideEffects": false
|
|
56
|
-
"gitHead": "21f46f4e342898b019ab943a7e69a455621d9576"
|
|
55
|
+
"sideEffects": false
|
|
57
56
|
}
|
package/src/Alert/index.tsx
CHANGED
|
@@ -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>
|
package/types/Alert/index.d.ts
CHANGED
|
@@ -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;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;MAWlB;gBAGW,KAAK,KAAA;IAQjB,SAAS,UAAK;IAEd,SAAS;;;;;MAKR;IAED,aAAa,aAUZ;IAED,aAAa;IAKb,gBAAgB,aAIf;IAED,KAAK,aAQJ;IAID,SAAS,CAAC,CAAC,KAAA;IAIX,aAAa;IAUb,cAAc,CAAC,UAAU,KAAA;IAazB,6BAA6B;IAI7B,uBAAuB;IAevB,uBAAuB;IAcvB,wBAAwB,CAAC,GAAG,KAAA;IAW5B,uBAAuB;IAwBvB,WAAW,uBAOV;IAED,iBAAiB;IAajB,kBAAkB,CAAC,SAAS,KAAA;IAc5B,oBAAoB;IAKpB,UAAU;IAUV,iBAAiB;IAgBjB,WAAW;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Alert/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EA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# 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.
|