@instructure/ui-dialog 8.11.2-snapshot.7 → 8.12.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/CHANGELOG.md +6 -0
- package/es/Dialog/index.js +6 -5
- package/es/package.json +1 -0
- package/lib/Dialog/index.js +6 -5
- package/package.json +11 -12
- package/src/Dialog/index.tsx +7 -4
- package/types/Dialog/index.d.ts +1 -1
- package/types/Dialog/index.d.ts.map +1 -1
- package/LICENSE.md +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.12.0](https://github.com/instructure/instructure-ui/compare/v8.11.1...v8.12.0) (2021-11-17)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **ui-dialog,ui-drawer-layout:** fix Dialog role attribute ([2681e14](https://github.com/instructure/instructure-ui/commit/2681e145ad469e1396536d3e9eed75a19995eb8a))
|
|
11
|
+
|
|
6
12
|
## [8.11.1](https://github.com/instructure/instructure-ui/compare/v8.11.0...v8.11.1) (2021-10-19)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @instructure/ui-dialog
|
package/es/Dialog/index.js
CHANGED
|
@@ -44,12 +44,9 @@ class Dialog extends Component {
|
|
|
44
44
|
this._raf = [];
|
|
45
45
|
this._focusRegion = null;
|
|
46
46
|
this.ref = null;
|
|
47
|
-
this._root = null;
|
|
48
47
|
|
|
49
48
|
this.getRef = el => {
|
|
50
|
-
const elementRef = this.props.elementRef;
|
|
51
|
-
|
|
52
|
-
this._root = el;
|
|
49
|
+
const elementRef = this.props.elementRef;
|
|
53
50
|
this.ref = el;
|
|
54
51
|
|
|
55
52
|
if (typeof elementRef === 'function') {
|
|
@@ -58,6 +55,10 @@ class Dialog extends Component {
|
|
|
58
55
|
};
|
|
59
56
|
}
|
|
60
57
|
|
|
58
|
+
get _root() {
|
|
59
|
+
return this.ref;
|
|
60
|
+
}
|
|
61
|
+
|
|
61
62
|
componentDidMount() {
|
|
62
63
|
if (this.props.open) {
|
|
63
64
|
this.open();
|
|
@@ -141,7 +142,7 @@ class Dialog extends Component {
|
|
|
141
142
|
let contentElement = findDOMNode(this.props.contentElement);
|
|
142
143
|
|
|
143
144
|
if (!contentElement) {
|
|
144
|
-
contentElement = findDOMNode(this.
|
|
145
|
+
contentElement = findDOMNode(this.ref);
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
return contentElement;
|
package/es/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
package/lib/Dialog/index.js
CHANGED
|
@@ -42,12 +42,9 @@ class Dialog extends _react.Component {
|
|
|
42
42
|
this._raf = [];
|
|
43
43
|
this._focusRegion = null;
|
|
44
44
|
this.ref = null;
|
|
45
|
-
this._root = null;
|
|
46
45
|
|
|
47
46
|
this.getRef = el => {
|
|
48
|
-
const elementRef = this.props.elementRef;
|
|
49
|
-
|
|
50
|
-
this._root = el;
|
|
47
|
+
const elementRef = this.props.elementRef;
|
|
51
48
|
this.ref = el;
|
|
52
49
|
|
|
53
50
|
if (typeof elementRef === 'function') {
|
|
@@ -56,6 +53,10 @@ class Dialog extends _react.Component {
|
|
|
56
53
|
};
|
|
57
54
|
}
|
|
58
55
|
|
|
56
|
+
get _root() {
|
|
57
|
+
return this.ref;
|
|
58
|
+
}
|
|
59
|
+
|
|
59
60
|
componentDidMount() {
|
|
60
61
|
if (this.props.open) {
|
|
61
62
|
this.open();
|
|
@@ -139,7 +140,7 @@ class Dialog extends _react.Component {
|
|
|
139
140
|
let contentElement = (0, _findDOMNode.findDOMNode)(this.props.contentElement);
|
|
140
141
|
|
|
141
142
|
if (!contentElement) {
|
|
142
|
-
contentElement = (0, _findDOMNode.findDOMNode)(this.
|
|
143
|
+
contentElement = (0, _findDOMNode.findDOMNode)(this.ref);
|
|
143
144
|
}
|
|
144
145
|
|
|
145
146
|
return contentElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-dialog",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.12.0",
|
|
4
4
|
"description": "A utility component for managing keyboard accessibility and screen reader behavior",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/shared-types": "8.
|
|
29
|
-
"@instructure/ui-a11y-utils": "8.
|
|
30
|
-
"@instructure/ui-dom-utils": "8.
|
|
31
|
-
"@instructure/ui-react-utils": "8.
|
|
32
|
-
"@instructure/ui-testable": "8.
|
|
28
|
+
"@instructure/shared-types": "8.12.0",
|
|
29
|
+
"@instructure/ui-a11y-utils": "8.12.0",
|
|
30
|
+
"@instructure/ui-dom-utils": "8.12.0",
|
|
31
|
+
"@instructure/ui-react-utils": "8.12.0",
|
|
32
|
+
"@instructure/ui-testable": "8.12.0",
|
|
33
33
|
"prop-types": "^15"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@instructure/console": "8.
|
|
37
|
-
"@instructure/ui-babel-preset": "8.
|
|
38
|
-
"@instructure/ui-prop-types": "8.
|
|
39
|
-
"@instructure/ui-test-utils": "8.
|
|
36
|
+
"@instructure/console": "8.12.0",
|
|
37
|
+
"@instructure/ui-babel-preset": "8.12.0",
|
|
38
|
+
"@instructure/ui-prop-types": "8.12.0",
|
|
39
|
+
"@instructure/ui-test-utils": "8.12.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": ">=16.8 <=17"
|
|
@@ -44,6 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"sideEffects": false
|
|
48
|
-
"gitHead": "2681e145ad469e1396536d3e9eed75a19995eb8a"
|
|
47
|
+
"sideEffects": false
|
|
49
48
|
}
|
package/src/Dialog/index.tsx
CHANGED
|
@@ -66,8 +66,13 @@ class Dialog extends Component<DialogProps> {
|
|
|
66
66
|
_raf: RequestAnimationFrameType[] = []
|
|
67
67
|
_focusRegion = null
|
|
68
68
|
ref: Element | null = null
|
|
69
|
-
_root
|
|
69
|
+
get _root() {
|
|
70
|
+
console.warn(
|
|
71
|
+
'_root property is deprecated and will be removed in v9, please use ref instead'
|
|
72
|
+
)
|
|
70
73
|
|
|
74
|
+
return this.ref
|
|
75
|
+
}
|
|
71
76
|
componentDidMount() {
|
|
72
77
|
if (this.props.open) {
|
|
73
78
|
this.open()
|
|
@@ -157,8 +162,6 @@ class Dialog extends Component<DialogProps> {
|
|
|
157
162
|
getRef = (el: Element | null) => {
|
|
158
163
|
const { elementRef } = this.props
|
|
159
164
|
|
|
160
|
-
// TODO: deprecate _root? ref should be enough
|
|
161
|
-
this._root = el
|
|
162
165
|
this.ref = el
|
|
163
166
|
|
|
164
167
|
if (typeof elementRef === 'function') {
|
|
@@ -170,7 +173,7 @@ class Dialog extends Component<DialogProps> {
|
|
|
170
173
|
let contentElement = findDOMNode(this.props.contentElement)
|
|
171
174
|
|
|
172
175
|
if (!contentElement) {
|
|
173
|
-
contentElement = findDOMNode(this.
|
|
176
|
+
contentElement = findDOMNode(this.ref)
|
|
174
177
|
}
|
|
175
178
|
|
|
176
179
|
return contentElement
|
package/types/Dialog/index.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ declare class Dialog extends Component<DialogProps> {
|
|
|
63
63
|
_raf: RequestAnimationFrameType[];
|
|
64
64
|
_focusRegion: null;
|
|
65
65
|
ref: Element | null;
|
|
66
|
-
_root: Element | null;
|
|
66
|
+
get _root(): Element | null;
|
|
67
67
|
componentDidMount(): void;
|
|
68
68
|
componentDidUpdate(prevProps: any): void;
|
|
69
69
|
componentWillUnmount(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Dialog/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIxC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAK1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C;;;;;GAKG;AAEH,cAAM,MAAO,SAAQ,SAAS,CAAC,WAAW,CAAC;IACzC,MAAM,CAAC,QAAQ,CAAC,WAAW,YAAW;IAEtC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;;;MAeT;IAEV,SAAS,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,EAAE,CAAK;IAC/C,IAAI,EAAE,yBAAyB,EAAE,CAAK;IACtC,YAAY,OAAO;IACnB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAC1B,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Dialog/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIxC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAK1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C;;;;;GAKG;AAEH,cAAM,MAAO,SAAQ,SAAS,CAAC,WAAW,CAAC;IACzC,MAAM,CAAC,QAAQ,CAAC,WAAW,YAAW;IAEtC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;;;MAeT;IAEV,SAAS,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,EAAE,CAAK;IAC/C,IAAI,EAAE,yBAAyB,EAAE,CAAK;IACtC,YAAY,OAAO;IACnB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAC1B,IAAI,KAAK,mBAMR;IACD,iBAAiB;IAOjB,kBAAkB,CAAC,SAAS,KAAA;IAe5B,oBAAoB;IAWpB,IAAI;IAyBJ,KAAK;IAOL,KAAK;IAYL,IAAI;IASJ,MAAM,OAAQ,OAAO,GAAG,IAAI,UAQ3B;IAED,IAAI,cAAc,wCAQjB;IAED,IAAI,OAAO,qBAOV;IAED,MAAM;CAmBP;AAED,eAAe,MAAM,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
package/LICENSE.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
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.
|