@instructure/ui-link 8.10.1-snapshot.9 → 8.10.3-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 +8 -0
- package/es/Link/index.js +5 -1
- package/lib/Link/index.js +5 -1
- package/package.json +18 -18
- package/src/Link/index.tsx +5 -3
- package/src/Link/props.ts +1 -1
- package/types/Link/LinkLocator.d.ts +64 -64
- package/types/Link/index.d.ts +4 -2
- package/types/Link/index.d.ts.map +1 -1
- package/types/Link/props.d.ts +1 -1
- package/types/Link/props.d.ts.map +1 -1
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-link
|
|
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-link
|
|
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-link
|
package/es/Link/index.js
CHANGED
|
@@ -51,6 +51,8 @@ let Link = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
|
|
|
51
51
|
this.state = {
|
|
52
52
|
hasFocus: false
|
|
53
53
|
};
|
|
54
|
+
this._link = null;
|
|
55
|
+
this.ref = null;
|
|
54
56
|
|
|
55
57
|
this.makeStyleProps = () => {
|
|
56
58
|
return {
|
|
@@ -60,8 +62,10 @@ let Link = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
|
|
|
60
62
|
};
|
|
61
63
|
|
|
62
64
|
this.handleElementRef = el => {
|
|
63
|
-
const elementRef = this.props.elementRef;
|
|
65
|
+
const elementRef = this.props.elementRef; // TODO: deprecate _link? ref should be enough
|
|
66
|
+
|
|
64
67
|
this._link = el;
|
|
68
|
+
this.ref = el;
|
|
65
69
|
if (typeof elementRef === 'function') elementRef(el);
|
|
66
70
|
};
|
|
67
71
|
|
package/lib/Link/index.js
CHANGED
|
@@ -58,6 +58,8 @@ let Link = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
|
|
|
58
58
|
this.state = {
|
|
59
59
|
hasFocus: false
|
|
60
60
|
};
|
|
61
|
+
this._link = null;
|
|
62
|
+
this.ref = null;
|
|
61
63
|
|
|
62
64
|
this.makeStyleProps = () => {
|
|
63
65
|
return {
|
|
@@ -67,8 +69,10 @@ let Link = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
|
|
|
67
69
|
};
|
|
68
70
|
|
|
69
71
|
this.handleElementRef = el => {
|
|
70
|
-
const elementRef = this.props.elementRef;
|
|
72
|
+
const elementRef = this.props.elementRef; // TODO: deprecate _link? ref should be enough
|
|
73
|
+
|
|
71
74
|
this._link = el;
|
|
75
|
+
this.ref = el;
|
|
72
76
|
if (typeof elementRef === 'function') elementRef(el);
|
|
73
77
|
};
|
|
74
78
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-link",
|
|
3
|
-
"version": "8.10.
|
|
3
|
+
"version": "8.10.3-snapshot.10+cca148595",
|
|
4
4
|
"description": "A component for creating links",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,25 +25,25 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/console": "8.10.
|
|
29
|
-
"@instructure/emotion": "8.10.
|
|
30
|
-
"@instructure/shared-types": "8.10.
|
|
31
|
-
"@instructure/ui-a11y-utils": "8.10.
|
|
32
|
-
"@instructure/ui-color-utils": "8.10.
|
|
33
|
-
"@instructure/ui-dom-utils": "8.10.
|
|
34
|
-
"@instructure/ui-icons": "8.10.
|
|
35
|
-
"@instructure/ui-prop-types": "8.10.
|
|
36
|
-
"@instructure/ui-react-utils": "8.10.
|
|
37
|
-
"@instructure/ui-testable": "8.10.
|
|
38
|
-
"@instructure/ui-view": "8.10.
|
|
28
|
+
"@instructure/console": "8.10.3-snapshot.10+cca148595",
|
|
29
|
+
"@instructure/emotion": "8.10.3-snapshot.10+cca148595",
|
|
30
|
+
"@instructure/shared-types": "8.10.3-snapshot.10+cca148595",
|
|
31
|
+
"@instructure/ui-a11y-utils": "8.10.3-snapshot.10+cca148595",
|
|
32
|
+
"@instructure/ui-color-utils": "8.10.3-snapshot.10+cca148595",
|
|
33
|
+
"@instructure/ui-dom-utils": "8.10.3-snapshot.10+cca148595",
|
|
34
|
+
"@instructure/ui-icons": "8.10.3-snapshot.10+cca148595",
|
|
35
|
+
"@instructure/ui-prop-types": "8.10.3-snapshot.10+cca148595",
|
|
36
|
+
"@instructure/ui-react-utils": "8.10.3-snapshot.10+cca148595",
|
|
37
|
+
"@instructure/ui-testable": "8.10.3-snapshot.10+cca148595",
|
|
38
|
+
"@instructure/ui-view": "8.10.3-snapshot.10+cca148595",
|
|
39
39
|
"prop-types": "^15"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@instructure/ui-babel-preset": "8.10.
|
|
43
|
-
"@instructure/ui-test-locator": "8.10.
|
|
44
|
-
"@instructure/ui-test-queries": "8.10.
|
|
45
|
-
"@instructure/ui-test-utils": "8.10.
|
|
46
|
-
"@instructure/ui-themes": "8.10.
|
|
42
|
+
"@instructure/ui-babel-preset": "8.10.3-snapshot.10+cca148595",
|
|
43
|
+
"@instructure/ui-test-locator": "8.10.3-snapshot.10+cca148595",
|
|
44
|
+
"@instructure/ui-test-queries": "8.10.3-snapshot.10+cca148595",
|
|
45
|
+
"@instructure/ui-test-utils": "8.10.3-snapshot.10+cca148595",
|
|
46
|
+
"@instructure/ui-themes": "8.10.3-snapshot.10+cca148595"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": ">=16.8 <=17"
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false,
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "cca1485957b780165ac6b283afc28f4bba1eda06"
|
|
56
56
|
}
|
package/src/Link/index.tsx
CHANGED
|
@@ -67,6 +67,9 @@ class Link extends Component<LinkProps> {
|
|
|
67
67
|
|
|
68
68
|
state = { hasFocus: false }
|
|
69
69
|
|
|
70
|
+
_link: Element | null = null
|
|
71
|
+
ref: Element | null = null
|
|
72
|
+
|
|
70
73
|
componentDidMount() {
|
|
71
74
|
// @ts-expect-error ts-migrate(2722) FIXME: Cannot invoke an object which is possibly 'undefin... Remove this comment to see the full error message
|
|
72
75
|
this.props.makeStyles(this.makeStyleProps())
|
|
@@ -89,8 +92,9 @@ class Link extends Component<LinkProps> {
|
|
|
89
92
|
handleElementRef = (el) => {
|
|
90
93
|
const { elementRef } = this.props
|
|
91
94
|
|
|
92
|
-
//
|
|
95
|
+
// TODO: deprecate _link? ref should be enough
|
|
93
96
|
this._link = el
|
|
97
|
+
this.ref = el
|
|
94
98
|
if (typeof elementRef === 'function') elementRef(el)
|
|
95
99
|
}
|
|
96
100
|
|
|
@@ -164,12 +168,10 @@ class Link extends Component<LinkProps> {
|
|
|
164
168
|
}
|
|
165
169
|
|
|
166
170
|
get focused() {
|
|
167
|
-
// @ts-expect-error ts-migrate(2339) FIXME: Property '_link' does not exist on type 'Link'.
|
|
168
171
|
return isActiveElement(this._link)
|
|
169
172
|
}
|
|
170
173
|
|
|
171
174
|
get focusable() {
|
|
172
|
-
// @ts-expect-error ts-migrate(2554) FIXME: Expected 3 arguments, but got 1.
|
|
173
175
|
return findFocusable(this._link)
|
|
174
176
|
}
|
|
175
177
|
|
package/src/Link/props.ts
CHANGED
|
@@ -42,7 +42,7 @@ type LinkOwnProps = {
|
|
|
42
42
|
children: React.ReactNode
|
|
43
43
|
href?: string
|
|
44
44
|
color?: 'link' | 'link-inverse'
|
|
45
|
-
elementRef?: (
|
|
45
|
+
elementRef?: (element: Element | null) => void
|
|
46
46
|
as?: AsElementType
|
|
47
47
|
interaction?: 'enabled' | 'disabled'
|
|
48
48
|
margin?: Spacing
|
|
@@ -21,24 +21,28 @@ export declare const LinkLocator: {
|
|
|
21
21
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
22
22
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
23
23
|
} & {
|
|
24
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
25
|
+
highlight: boolean;
|
|
26
|
+
} | undefined) => string;
|
|
27
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
28
|
+
children: (selector: string) => Element[];
|
|
29
|
+
title: () => string | null | undefined;
|
|
30
|
+
id: () => string;
|
|
31
|
+
tagName: () => string;
|
|
32
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
33
|
+
getBoundingClientRect: () => DOMRect;
|
|
34
|
+
matches: (selector: string | undefined) => boolean;
|
|
24
35
|
visible: () => boolean;
|
|
25
36
|
value: () => string | null;
|
|
26
37
|
disabled: () => string | null;
|
|
27
38
|
role: () => string | null;
|
|
28
|
-
id: () => string;
|
|
29
39
|
label: () => string | null | undefined;
|
|
30
|
-
title: () => string | null | undefined;
|
|
31
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
32
|
-
highlight: boolean;
|
|
33
|
-
} | undefined) => string;
|
|
34
40
|
getId: () => string;
|
|
35
41
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
36
42
|
getOwnerDocument: () => Document;
|
|
37
43
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
38
44
|
getTagName: () => string;
|
|
39
|
-
tagName: () => string;
|
|
40
45
|
typeIn: (text: string) => Promise<void>;
|
|
41
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
42
46
|
getDOMNode: () => Element;
|
|
43
47
|
node: () => Element;
|
|
44
48
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -46,9 +50,8 @@ export declare const LinkLocator: {
|
|
|
46
50
|
} | undefined) => void;
|
|
47
51
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
48
52
|
getTextContent: () => string | null;
|
|
49
|
-
getParentNode: () =>
|
|
50
|
-
parent: () =>
|
|
51
|
-
getBoundingClientRect: () => DOMRect;
|
|
53
|
+
getParentNode: () => ParentNode | null;
|
|
54
|
+
parent: () => ParentNode | null;
|
|
52
55
|
rect: () => DOMRect;
|
|
53
56
|
hasClass: (classname: string) => boolean;
|
|
54
57
|
containsFocus: () => boolean;
|
|
@@ -60,19 +63,17 @@ export declare const LinkLocator: {
|
|
|
60
63
|
exists: () => boolean;
|
|
61
64
|
text: () => string | null;
|
|
62
65
|
empty: () => boolean;
|
|
63
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
64
66
|
descendants: (selector: string) => Element[];
|
|
65
|
-
ancestors: (selector: string) =>
|
|
67
|
+
ancestors: (selector: string) => ParentNode[];
|
|
66
68
|
attribute: (qualifiedName: string) => string | null;
|
|
67
69
|
style: (property: string) => string;
|
|
68
70
|
classNames: () => string[];
|
|
69
|
-
matches: (selector: string | undefined) => boolean;
|
|
70
71
|
checked: () => any;
|
|
71
72
|
selected: () => any;
|
|
72
73
|
readonly: () => any;
|
|
73
|
-
|
|
74
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
74
|
+
parents: (selector: string) => ParentNode[];
|
|
75
75
|
} & {
|
|
76
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
76
77
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
77
78
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
78
79
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -110,7 +111,6 @@ export declare const LinkLocator: {
|
|
|
110
111
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
111
112
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
112
113
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
113
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
114
114
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
115
115
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
116
116
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -162,24 +162,28 @@ export declare const LinkLocator: {
|
|
|
162
162
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
163
163
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
164
164
|
} & {
|
|
165
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
166
|
+
highlight: boolean;
|
|
167
|
+
} | undefined) => string;
|
|
168
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
169
|
+
children: (selector: string) => Element[];
|
|
170
|
+
title: () => string | null | undefined;
|
|
171
|
+
id: () => string;
|
|
172
|
+
tagName: () => string;
|
|
173
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
174
|
+
getBoundingClientRect: () => DOMRect;
|
|
175
|
+
matches: (selector: string | undefined) => boolean;
|
|
165
176
|
visible: () => boolean;
|
|
166
177
|
value: () => string | null;
|
|
167
178
|
disabled: () => string | null;
|
|
168
179
|
role: () => string | null;
|
|
169
|
-
id: () => string;
|
|
170
180
|
label: () => string | null | undefined;
|
|
171
|
-
title: () => string | null | undefined;
|
|
172
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
173
|
-
highlight: boolean;
|
|
174
|
-
} | undefined) => string;
|
|
175
181
|
getId: () => string;
|
|
176
182
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
177
183
|
getOwnerDocument: () => Document;
|
|
178
184
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
179
185
|
getTagName: () => string;
|
|
180
|
-
tagName: () => string;
|
|
181
186
|
typeIn: (text: string) => Promise<void>;
|
|
182
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
183
187
|
getDOMNode: () => Element;
|
|
184
188
|
node: () => Element;
|
|
185
189
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -187,9 +191,8 @@ export declare const LinkLocator: {
|
|
|
187
191
|
} | undefined) => void;
|
|
188
192
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
189
193
|
getTextContent: () => string | null;
|
|
190
|
-
getParentNode: () =>
|
|
191
|
-
parent: () =>
|
|
192
|
-
getBoundingClientRect: () => DOMRect;
|
|
194
|
+
getParentNode: () => ParentNode | null;
|
|
195
|
+
parent: () => ParentNode | null;
|
|
193
196
|
rect: () => DOMRect;
|
|
194
197
|
hasClass: (classname: string) => boolean;
|
|
195
198
|
containsFocus: () => boolean;
|
|
@@ -201,19 +204,17 @@ export declare const LinkLocator: {
|
|
|
201
204
|
exists: () => boolean;
|
|
202
205
|
text: () => string | null;
|
|
203
206
|
empty: () => boolean;
|
|
204
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
205
207
|
descendants: (selector: string) => Element[];
|
|
206
|
-
ancestors: (selector: string) =>
|
|
208
|
+
ancestors: (selector: string) => ParentNode[];
|
|
207
209
|
attribute: (qualifiedName: string) => string | null;
|
|
208
210
|
style: (property: string) => string;
|
|
209
211
|
classNames: () => string[];
|
|
210
|
-
matches: (selector: string | undefined) => boolean;
|
|
211
212
|
checked: () => any;
|
|
212
213
|
selected: () => any;
|
|
213
214
|
readonly: () => any;
|
|
214
|
-
|
|
215
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
215
|
+
parents: (selector: string) => ParentNode[];
|
|
216
216
|
} & {
|
|
217
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
217
218
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
218
219
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
219
220
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -251,7 +252,6 @@ export declare const LinkLocator: {
|
|
|
251
252
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
252
253
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
253
254
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
254
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
255
255
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
256
256
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
257
257
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -303,24 +303,28 @@ export declare const LinkLocator: {
|
|
|
303
303
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
304
304
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
305
305
|
} & {
|
|
306
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
307
|
+
highlight: boolean;
|
|
308
|
+
} | undefined) => string;
|
|
309
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
310
|
+
children: (selector: string) => Element[];
|
|
311
|
+
title: () => string | null | undefined;
|
|
312
|
+
id: () => string;
|
|
313
|
+
tagName: () => string;
|
|
314
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
315
|
+
getBoundingClientRect: () => DOMRect;
|
|
316
|
+
matches: (selector: string | undefined) => boolean;
|
|
306
317
|
visible: () => boolean;
|
|
307
318
|
value: () => string | null;
|
|
308
319
|
disabled: () => string | null;
|
|
309
320
|
role: () => string | null;
|
|
310
|
-
id: () => string;
|
|
311
321
|
label: () => string | null | undefined;
|
|
312
|
-
title: () => string | null | undefined;
|
|
313
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
314
|
-
highlight: boolean;
|
|
315
|
-
} | undefined) => string;
|
|
316
322
|
getId: () => string;
|
|
317
323
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
318
324
|
getOwnerDocument: () => Document;
|
|
319
325
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
320
326
|
getTagName: () => string;
|
|
321
|
-
tagName: () => string;
|
|
322
327
|
typeIn: (text: string) => Promise<void>;
|
|
323
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
324
328
|
getDOMNode: () => Element;
|
|
325
329
|
node: () => Element;
|
|
326
330
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -328,9 +332,8 @@ export declare const LinkLocator: {
|
|
|
328
332
|
} | undefined) => void;
|
|
329
333
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
330
334
|
getTextContent: () => string | null;
|
|
331
|
-
getParentNode: () =>
|
|
332
|
-
parent: () =>
|
|
333
|
-
getBoundingClientRect: () => DOMRect;
|
|
335
|
+
getParentNode: () => ParentNode | null;
|
|
336
|
+
parent: () => ParentNode | null;
|
|
334
337
|
rect: () => DOMRect;
|
|
335
338
|
hasClass: (classname: string) => boolean;
|
|
336
339
|
containsFocus: () => boolean;
|
|
@@ -342,19 +345,17 @@ export declare const LinkLocator: {
|
|
|
342
345
|
exists: () => boolean;
|
|
343
346
|
text: () => string | null;
|
|
344
347
|
empty: () => boolean;
|
|
345
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
346
348
|
descendants: (selector: string) => Element[];
|
|
347
|
-
ancestors: (selector: string) =>
|
|
349
|
+
ancestors: (selector: string) => ParentNode[];
|
|
348
350
|
attribute: (qualifiedName: string) => string | null;
|
|
349
351
|
style: (property: string) => string;
|
|
350
352
|
classNames: () => string[];
|
|
351
|
-
matches: (selector: string | undefined) => boolean;
|
|
352
353
|
checked: () => any;
|
|
353
354
|
selected: () => any;
|
|
354
355
|
readonly: () => any;
|
|
355
|
-
|
|
356
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
356
|
+
parents: (selector: string) => ParentNode[];
|
|
357
357
|
} & {
|
|
358
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
358
359
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
359
360
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
360
361
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -392,7 +393,6 @@ export declare const LinkLocator: {
|
|
|
392
393
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
393
394
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
394
395
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
395
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
396
396
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
397
397
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
398
398
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -444,24 +444,28 @@ export declare const LinkLocator: {
|
|
|
444
444
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
445
445
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
446
446
|
} & {
|
|
447
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
448
|
+
highlight: boolean;
|
|
449
|
+
} | undefined) => string;
|
|
450
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
451
|
+
children: (selector: string) => Element[];
|
|
452
|
+
title: () => string | null | undefined;
|
|
453
|
+
id: () => string;
|
|
454
|
+
tagName: () => string;
|
|
455
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
456
|
+
getBoundingClientRect: () => DOMRect;
|
|
457
|
+
matches: (selector: string | undefined) => boolean;
|
|
447
458
|
visible: () => boolean;
|
|
448
459
|
value: () => string | null;
|
|
449
460
|
disabled: () => string | null;
|
|
450
461
|
role: () => string | null;
|
|
451
|
-
id: () => string;
|
|
452
462
|
label: () => string | null | undefined;
|
|
453
|
-
title: () => string | null | undefined;
|
|
454
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
455
|
-
highlight: boolean;
|
|
456
|
-
} | undefined) => string;
|
|
457
463
|
getId: () => string;
|
|
458
464
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
459
465
|
getOwnerDocument: () => Document;
|
|
460
466
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
461
467
|
getTagName: () => string;
|
|
462
|
-
tagName: () => string;
|
|
463
468
|
typeIn: (text: string) => Promise<void>;
|
|
464
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
465
469
|
getDOMNode: () => Element;
|
|
466
470
|
node: () => Element;
|
|
467
471
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -469,9 +473,8 @@ export declare const LinkLocator: {
|
|
|
469
473
|
} | undefined) => void;
|
|
470
474
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
471
475
|
getTextContent: () => string | null;
|
|
472
|
-
getParentNode: () =>
|
|
473
|
-
parent: () =>
|
|
474
|
-
getBoundingClientRect: () => DOMRect;
|
|
476
|
+
getParentNode: () => ParentNode | null;
|
|
477
|
+
parent: () => ParentNode | null;
|
|
475
478
|
rect: () => DOMRect;
|
|
476
479
|
hasClass: (classname: string) => boolean;
|
|
477
480
|
containsFocus: () => boolean;
|
|
@@ -483,19 +486,17 @@ export declare const LinkLocator: {
|
|
|
483
486
|
exists: () => boolean;
|
|
484
487
|
text: () => string | null;
|
|
485
488
|
empty: () => boolean;
|
|
486
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
487
489
|
descendants: (selector: string) => Element[];
|
|
488
|
-
ancestors: (selector: string) =>
|
|
490
|
+
ancestors: (selector: string) => ParentNode[];
|
|
489
491
|
attribute: (qualifiedName: string) => string | null;
|
|
490
492
|
style: (property: string) => string;
|
|
491
493
|
classNames: () => string[];
|
|
492
|
-
matches: (selector: string | undefined) => boolean;
|
|
493
494
|
checked: () => any;
|
|
494
495
|
selected: () => any;
|
|
495
496
|
readonly: () => any;
|
|
496
|
-
|
|
497
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
497
|
+
parents: (selector: string) => ParentNode[];
|
|
498
498
|
} & {
|
|
499
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
499
500
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
500
501
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
501
502
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -533,7 +534,6 @@ export declare const LinkLocator: {
|
|
|
533
534
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
534
535
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
535
536
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
536
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
537
537
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
538
538
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
539
539
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
package/types/Link/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare class Link extends Component<LinkProps> {
|
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
href?: string | undefined;
|
|
15
15
|
color?: "link" | "link-inverse" | undefined;
|
|
16
|
-
elementRef?: ((
|
|
16
|
+
elementRef?: ((element: Element | null) => void) | undefined;
|
|
17
17
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
18
18
|
interaction?: "enabled" | "disabled" | undefined;
|
|
19
19
|
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
@@ -29,7 +29,7 @@ declare class Link extends Component<LinkProps> {
|
|
|
29
29
|
children: React.ReactNode;
|
|
30
30
|
href?: string | undefined;
|
|
31
31
|
color?: "link" | "link-inverse" | undefined;
|
|
32
|
-
elementRef?: ((
|
|
32
|
+
elementRef?: ((element: Element | null) => void) | undefined;
|
|
33
33
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
34
34
|
interaction?: "enabled" | "disabled" | undefined;
|
|
35
35
|
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
@@ -50,6 +50,8 @@ declare class Link extends Component<LinkProps> {
|
|
|
50
50
|
state: {
|
|
51
51
|
hasFocus: boolean;
|
|
52
52
|
};
|
|
53
|
+
_link: Element | null;
|
|
54
|
+
ref: Element | null;
|
|
53
55
|
componentDidMount(): void;
|
|
54
56
|
componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
|
|
55
57
|
makeStyleProps: () => LinkStyleProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Link/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAexC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAKrD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExD;;;;GAIG;AACH,cAEM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,QAAQ,CAAC,WAAW,UAAS;IAEpC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;MAMT;IAEV,KAAK;;MAAsB;IAE3B,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,cAAc,QAAO,cAAc,CAKlC;IAGD,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Link/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAexC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAKrD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExD;;;;GAIG;AACH,cAEM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,QAAQ,CAAC,WAAW,UAAS;IAEpC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;MAMT;IAEV,KAAK;;MAAsB;IAE3B,KAAK,EAAE,OAAO,GAAG,IAAI,CAAO;IAC5B,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,cAAc,QAAO,cAAc,CAKlC;IAGD,gBAAgB,oBAOf;IAGD,WAAW,uBAUV;IAGD,WAAW,uBAKV;IAGD,UAAU,uBAKT;IAED,IAAI,oBAAoB,YAgBvB;IAED,IAAI,OAAO,+DAYV;IAED,IAAI,WAAW,0DAEd;IAED,IAAI,OAAO,wEAEV;IAED,IAAI,OAAO,YAEV;IAED,IAAI,SAAS,cAEZ;IAED,IAAI,kBAAkB,YAErB;IAED,KAAK;IAKL,UAAU;IAaV,MAAM;CA+CP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
package/types/Link/props.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare type LinkOwnProps = {
|
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
href?: string;
|
|
7
7
|
color?: 'link' | 'link-inverse';
|
|
8
|
-
elementRef?: (
|
|
8
|
+
elementRef?: (element: Element | null) => void;
|
|
9
9
|
as?: AsElementType;
|
|
10
10
|
interaction?: 'enabled' | 'disabled';
|
|
11
11
|
margin?: Spacing;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Link/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACV,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAE7B,aAAK,YAAY,GAAG;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,cAAc,CAAA;IAC/B,UAAU,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Link/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACV,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAE7B,aAAK,YAAY,GAAG;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,cAAc,CAAA;IAC/B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,WAAW,CAAC,EAAE,SAAS,GAAG,UAAU,CAAA;IACpC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,GAAG,KAAK,CAAC,SAAS,CAAA;IACxD,aAAa,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc,GAAG,MAAM,GAAG,aAAa,CAAA;IACpE,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;CACjC,CAAA;AAED,oBAAY,cAAc,GAAG;IAC3B,oBAAoB,EAAE,OAAO,CAAA;IAC7B,kBAAkB,EAAE,OAAO,CAAA;CAC5B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,YAAY,CAAA;AAElC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;AAEpE,aAAK,SAAS,GAAG,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;AAEhD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAkEvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAenB,CAAA;AAED,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|