@instructure/ui-view 8.10.1 → 8.10.3-snapshot.3
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 +4 -0
- package/LICENSE.md +27 -0
- package/es/ContextView/index.js +35 -24
- package/es/View/index.js +2 -0
- package/lib/ContextView/index.js +35 -24
- package/lib/View/index.js +2 -0
- package/package.json +15 -14
- package/src/ContextView/index.tsx +8 -2
- package/src/ContextView/props.ts +1 -1
- package/src/View/index.tsx +6 -2
- package/src/View/props.ts +7 -3
- package/types/ContextView/index.d.ts +4 -2
- package/types/ContextView/index.d.ts.map +1 -1
- package/types/ContextView/props.d.ts +1 -1
- package/types/ContextView/props.d.ts.map +1 -1
- package/types/View/index.d.ts +6 -5
- package/types/View/index.d.ts.map +1 -1
- package/types/View/props.d.ts +2 -2
- package/types/View/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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-view
|
|
9
|
+
|
|
6
10
|
## [8.10.1](https://github.com/instructure/instructure-ui/compare/v8.10.0...v8.10.1) (2021-10-01)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @instructure/ui-view
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
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.
|
package/es/ContextView/index.js
CHANGED
|
@@ -39,38 +39,49 @@ category: components
|
|
|
39
39
|
---
|
|
40
40
|
**/
|
|
41
41
|
let ContextView = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = class ContextView extends Component {
|
|
42
|
+
constructor(...args) {
|
|
43
|
+
super(...args);
|
|
44
|
+
this.ref = null;
|
|
45
|
+
|
|
46
|
+
this.handleRef = el => {
|
|
47
|
+
var _this$props$elementRe, _this$props;
|
|
48
|
+
|
|
49
|
+
this.ref = el;
|
|
50
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
42
54
|
componentDidMount() {
|
|
43
|
-
var _this$props$makeStyle, _this$
|
|
55
|
+
var _this$props$makeStyle, _this$props2;
|
|
44
56
|
|
|
45
|
-
(_this$props$makeStyle = (_this$
|
|
57
|
+
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
|
46
58
|
}
|
|
47
59
|
|
|
48
60
|
componentDidUpdate() {
|
|
49
|
-
var _this$props$makeStyle2, _this$
|
|
61
|
+
var _this$props$makeStyle2, _this$props3;
|
|
50
62
|
|
|
51
|
-
(_this$props$makeStyle2 = (_this$
|
|
63
|
+
(_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
|
|
52
64
|
}
|
|
53
65
|
|
|
54
66
|
render() {
|
|
55
|
-
const _this$
|
|
56
|
-
as = _this$
|
|
57
|
-
background = _this$
|
|
58
|
-
children = _this$
|
|
59
|
-
debug = _this$
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
styles = _this$props3.styles;
|
|
67
|
+
const _this$props4 = this.props,
|
|
68
|
+
as = _this$props4.as,
|
|
69
|
+
background = _this$props4.background,
|
|
70
|
+
children = _this$props4.children,
|
|
71
|
+
debug = _this$props4.debug,
|
|
72
|
+
height = _this$props4.height,
|
|
73
|
+
width = _this$props4.width,
|
|
74
|
+
maxHeight = _this$props4.maxHeight,
|
|
75
|
+
maxWidth = _this$props4.maxWidth,
|
|
76
|
+
minHeight = _this$props4.minHeight,
|
|
77
|
+
minWidth = _this$props4.minWidth,
|
|
78
|
+
margin = _this$props4.margin,
|
|
79
|
+
padding = _this$props4.padding,
|
|
80
|
+
shadow = _this$props4.shadow,
|
|
81
|
+
stacking = _this$props4.stacking,
|
|
82
|
+
style = _this$props4.style,
|
|
83
|
+
textAlign = _this$props4.textAlign,
|
|
84
|
+
styles = _this$props4.styles;
|
|
74
85
|
return jsx(View, Object.assign({}, omitProps(this.props, ContextView.allowedProps), {
|
|
75
86
|
css: styles === null || styles === void 0 ? void 0 : styles.contextView,
|
|
76
87
|
style: style,
|
|
@@ -78,7 +89,7 @@ let ContextView = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
|
|
|
78
89
|
display: "inline-block",
|
|
79
90
|
as: as,
|
|
80
91
|
withVisualDebug: debug,
|
|
81
|
-
elementRef:
|
|
92
|
+
elementRef: this.handleRef,
|
|
82
93
|
margin: margin,
|
|
83
94
|
stacking: stacking
|
|
84
95
|
}), jsx(View, {
|
package/es/View/index.js
CHANGED
|
@@ -68,12 +68,14 @@ let View = (_dec = bidirectional(), _dec2 = withStyle(generateStyle, generateCom
|
|
|
68
68
|
super(props);
|
|
69
69
|
this.spanMarginVerified = void 0;
|
|
70
70
|
this._element = void 0;
|
|
71
|
+
this.ref = null;
|
|
71
72
|
|
|
72
73
|
this.handleElementRef = el => {
|
|
73
74
|
if (typeof this.props.elementRef === 'function') {
|
|
74
75
|
this.props.elementRef(el);
|
|
75
76
|
}
|
|
76
77
|
|
|
78
|
+
this.ref = el;
|
|
77
79
|
this._element = el;
|
|
78
80
|
};
|
|
79
81
|
|
package/lib/ContextView/index.js
CHANGED
|
@@ -29,38 +29,49 @@ category: components
|
|
|
29
29
|
---
|
|
30
30
|
**/
|
|
31
31
|
let ContextView = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = class ContextView extends _react.Component {
|
|
32
|
+
constructor(...args) {
|
|
33
|
+
super(...args);
|
|
34
|
+
this.ref = null;
|
|
35
|
+
|
|
36
|
+
this.handleRef = el => {
|
|
37
|
+
var _this$props$elementRe, _this$props;
|
|
38
|
+
|
|
39
|
+
this.ref = el;
|
|
40
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
32
44
|
componentDidMount() {
|
|
33
|
-
var _this$props$makeStyle, _this$
|
|
45
|
+
var _this$props$makeStyle, _this$props2;
|
|
34
46
|
|
|
35
|
-
(_this$props$makeStyle = (_this$
|
|
47
|
+
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
|
36
48
|
}
|
|
37
49
|
|
|
38
50
|
componentDidUpdate() {
|
|
39
|
-
var _this$props$makeStyle2, _this$
|
|
51
|
+
var _this$props$makeStyle2, _this$props3;
|
|
40
52
|
|
|
41
|
-
(_this$props$makeStyle2 = (_this$
|
|
53
|
+
(_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
|
|
42
54
|
}
|
|
43
55
|
|
|
44
56
|
render() {
|
|
45
|
-
const _this$
|
|
46
|
-
as = _this$
|
|
47
|
-
background = _this$
|
|
48
|
-
children = _this$
|
|
49
|
-
debug = _this$
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
styles = _this$props3.styles;
|
|
57
|
+
const _this$props4 = this.props,
|
|
58
|
+
as = _this$props4.as,
|
|
59
|
+
background = _this$props4.background,
|
|
60
|
+
children = _this$props4.children,
|
|
61
|
+
debug = _this$props4.debug,
|
|
62
|
+
height = _this$props4.height,
|
|
63
|
+
width = _this$props4.width,
|
|
64
|
+
maxHeight = _this$props4.maxHeight,
|
|
65
|
+
maxWidth = _this$props4.maxWidth,
|
|
66
|
+
minHeight = _this$props4.minHeight,
|
|
67
|
+
minWidth = _this$props4.minWidth,
|
|
68
|
+
margin = _this$props4.margin,
|
|
69
|
+
padding = _this$props4.padding,
|
|
70
|
+
shadow = _this$props4.shadow,
|
|
71
|
+
stacking = _this$props4.stacking,
|
|
72
|
+
style = _this$props4.style,
|
|
73
|
+
textAlign = _this$props4.textAlign,
|
|
74
|
+
styles = _this$props4.styles;
|
|
64
75
|
return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _omitProps.omitProps)(this.props, ContextView.allowedProps), {
|
|
65
76
|
css: styles === null || styles === void 0 ? void 0 : styles.contextView,
|
|
66
77
|
style: style,
|
|
@@ -68,7 +79,7 @@ let ContextView = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defaul
|
|
|
68
79
|
display: "inline-block",
|
|
69
80
|
as: as,
|
|
70
81
|
withVisualDebug: debug,
|
|
71
|
-
elementRef:
|
|
82
|
+
elementRef: this.handleRef,
|
|
72
83
|
margin: margin,
|
|
73
84
|
stacking: stacking
|
|
74
85
|
}), (0, _emotion.jsx)(_View.View, {
|
package/lib/View/index.js
CHANGED
|
@@ -67,12 +67,14 @@ let View = (_dec = (0, _bidirectional.bidirectional)(), _dec2 = (0, _emotion.wit
|
|
|
67
67
|
super(props);
|
|
68
68
|
this.spanMarginVerified = void 0;
|
|
69
69
|
this._element = void 0;
|
|
70
|
+
this.ref = null;
|
|
70
71
|
|
|
71
72
|
this.handleElementRef = el => {
|
|
72
73
|
if (typeof this.props.elementRef === 'function') {
|
|
73
74
|
this.props.elementRef(el);
|
|
74
75
|
}
|
|
75
76
|
|
|
77
|
+
this.ref = el;
|
|
76
78
|
this._element = el;
|
|
77
79
|
};
|
|
78
80
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-view",
|
|
3
|
-
"version": "8.10.
|
|
3
|
+
"version": "8.10.3-snapshot.3+2ee813492",
|
|
4
4
|
"description": "A component for basic styles including spacing, sizing, borders, display, positioning, and focus states.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,21 +25,21 @@
|
|
|
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-color-utils": "8.10.
|
|
32
|
-
"@instructure/ui-dom-utils": "8.10.
|
|
33
|
-
"@instructure/ui-i18n": "8.10.
|
|
34
|
-
"@instructure/ui-position": "8.10.
|
|
35
|
-
"@instructure/ui-prop-types": "8.10.
|
|
36
|
-
"@instructure/ui-react-utils": "8.10.
|
|
28
|
+
"@instructure/console": "8.10.3-snapshot.3+2ee813492",
|
|
29
|
+
"@instructure/emotion": "8.10.3-snapshot.3+2ee813492",
|
|
30
|
+
"@instructure/shared-types": "8.10.3-snapshot.3+2ee813492",
|
|
31
|
+
"@instructure/ui-color-utils": "8.10.3-snapshot.3+2ee813492",
|
|
32
|
+
"@instructure/ui-dom-utils": "8.10.3-snapshot.3+2ee813492",
|
|
33
|
+
"@instructure/ui-i18n": "8.10.3-snapshot.3+2ee813492",
|
|
34
|
+
"@instructure/ui-position": "8.10.3-snapshot.3+2ee813492",
|
|
35
|
+
"@instructure/ui-prop-types": "8.10.3-snapshot.3+2ee813492",
|
|
36
|
+
"@instructure/ui-react-utils": "8.10.3-snapshot.3+2ee813492",
|
|
37
37
|
"prop-types": "^15"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@instructure/ui-babel-preset": "8.10.
|
|
41
|
-
"@instructure/ui-test-utils": "8.10.
|
|
42
|
-
"@instructure/ui-themes": "8.10.
|
|
40
|
+
"@instructure/ui-babel-preset": "8.10.3-snapshot.3+2ee813492",
|
|
41
|
+
"@instructure/ui-test-utils": "8.10.3-snapshot.3+2ee813492",
|
|
42
|
+
"@instructure/ui-themes": "8.10.3-snapshot.3+2ee813492"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8 <=17"
|
|
@@ -47,5 +47,6 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"sideEffects": false
|
|
50
|
+
"sideEffects": false,
|
|
51
|
+
"gitHead": "2ee8134925b02efbc5d39662a8b1edb2c83a420d"
|
|
51
52
|
}
|
|
@@ -70,13 +70,19 @@ class ContextView extends Component<
|
|
|
70
70
|
this.props.makeStyles?.()
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
ref: Element | null = null
|
|
74
|
+
|
|
75
|
+
handleRef = (el: Element | null) => {
|
|
76
|
+
this.ref = el
|
|
77
|
+
this.props.elementRef?.(el)
|
|
78
|
+
}
|
|
79
|
+
|
|
73
80
|
render() {
|
|
74
81
|
const {
|
|
75
82
|
as,
|
|
76
83
|
background,
|
|
77
84
|
children,
|
|
78
85
|
debug,
|
|
79
|
-
elementRef,
|
|
80
86
|
height,
|
|
81
87
|
width,
|
|
82
88
|
maxHeight,
|
|
@@ -101,7 +107,7 @@ class ContextView extends Component<
|
|
|
101
107
|
display="inline-block"
|
|
102
108
|
as={as}
|
|
103
109
|
withVisualDebug={debug}
|
|
104
|
-
elementRef={
|
|
110
|
+
elementRef={this.handleRef}
|
|
105
111
|
margin={margin}
|
|
106
112
|
stacking={stacking}
|
|
107
113
|
>
|
package/src/ContextView/props.ts
CHANGED
package/src/View/index.tsx
CHANGED
|
@@ -109,7 +109,7 @@ class View extends Component<ViewProps & OtherHTMLAttributes<ViewProps>> {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
private spanMarginVerified: boolean
|
|
112
|
-
private _element?:
|
|
112
|
+
private _element?: Element | null
|
|
113
113
|
|
|
114
114
|
constructor(props: ViewProps) {
|
|
115
115
|
super(props)
|
|
@@ -172,12 +172,16 @@ class View extends Component<ViewProps & OtherHTMLAttributes<ViewProps>> {
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
ref: Element | null = null
|
|
176
|
+
|
|
177
|
+
handleElementRef = (el: Element | null) => {
|
|
176
178
|
if (typeof this.props.elementRef === 'function') {
|
|
177
179
|
this.props.elementRef(el)
|
|
178
180
|
}
|
|
181
|
+
this.ref = el
|
|
179
182
|
this._element = el
|
|
180
183
|
}
|
|
184
|
+
|
|
181
185
|
render() {
|
|
182
186
|
const {
|
|
183
187
|
children,
|
package/src/View/props.ts
CHANGED
|
@@ -29,7 +29,11 @@ import { cursor as cursorPropTypes } from '@instructure/ui-prop-types'
|
|
|
29
29
|
import { bidirectional } from '@instructure/ui-i18n'
|
|
30
30
|
import { ThemeablePropTypes } from '@instructure/emotion'
|
|
31
31
|
|
|
32
|
-
import type {
|
|
32
|
+
import type {
|
|
33
|
+
AsElementType,
|
|
34
|
+
PropValidators,
|
|
35
|
+
ViewTheme
|
|
36
|
+
} from '@instructure/shared-types'
|
|
33
37
|
import type {
|
|
34
38
|
WithStyleProps,
|
|
35
39
|
Spacing,
|
|
@@ -48,7 +52,7 @@ type ViewOwnProps = {
|
|
|
48
52
|
/**
|
|
49
53
|
* provides a reference to the underlying html element
|
|
50
54
|
*/
|
|
51
|
-
elementRef?: (element:
|
|
55
|
+
elementRef?: (element: Element | null) => void
|
|
52
56
|
/**
|
|
53
57
|
* By default the display prop is 'auto', meaning it takes on the
|
|
54
58
|
* display rules of the html element it's rendered as (see `as` prop).
|
|
@@ -139,7 +143,7 @@ type ViewOwnProps = {
|
|
|
139
143
|
* Activate a dotted outline around the component to make building your
|
|
140
144
|
* layout easier
|
|
141
145
|
*/
|
|
142
|
-
withVisualDebug
|
|
146
|
+
withVisualDebug?: boolean
|
|
143
147
|
|
|
144
148
|
dir?: 'ltr' | 'rtl'
|
|
145
149
|
/**
|
|
@@ -12,7 +12,7 @@ declare class ContextView extends Component<ContextViewProps & OtherHTMLAttribut
|
|
|
12
12
|
static readonly componentId = "ContextView";
|
|
13
13
|
static allowedProps: readonly (keyof {
|
|
14
14
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
15
|
-
elementRef?: ((
|
|
15
|
+
elementRef?: ((element: Element | null) => void) | undefined;
|
|
16
16
|
height?: string | number | undefined;
|
|
17
17
|
width?: string | number | undefined;
|
|
18
18
|
maxHeight?: string | number | undefined;
|
|
@@ -31,7 +31,7 @@ declare class ContextView extends Component<ContextViewProps & OtherHTMLAttribut
|
|
|
31
31
|
})[];
|
|
32
32
|
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
33
33
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
34
|
-
elementRef?: ((
|
|
34
|
+
elementRef?: ((element: Element | null) => void) | undefined;
|
|
35
35
|
height?: string | number | undefined;
|
|
36
36
|
width?: string | number | undefined;
|
|
37
37
|
maxHeight?: string | number | undefined;
|
|
@@ -62,6 +62,8 @@ declare class ContextView extends Component<ContextViewProps & OtherHTMLAttribut
|
|
|
62
62
|
};
|
|
63
63
|
componentDidMount(): void;
|
|
64
64
|
componentDidUpdate(): void;
|
|
65
|
+
ref: Element | null;
|
|
66
|
+
handleRef: (el: Element | null) => void;
|
|
65
67
|
render(): jsx.JSX.Element;
|
|
66
68
|
}
|
|
67
69
|
export default ContextView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ContextView/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AAEf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAa,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAO/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C;;;;GAIG;AAEH,cACM,WAAY,SAAQ,SAAS,CACjC,gBAAgB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CACzD;IACC,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAgB;IAC3C,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;MAWlB;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,MAAM;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ContextView/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AAEf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAa,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAO/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C;;;;GAIG;AAEH,cACM,WAAY,SAAQ,SAAS,CACjC,gBAAgB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CACzD;IACC,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAgB;IAC3C,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;MAWlB;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAG9B;IAED,MAAM;CA0DP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -4,7 +4,7 @@ import type { PlacementPropValues } from '@instructure/ui-position';
|
|
|
4
4
|
import type { Shadow, Spacing, Stacking, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
5
5
|
declare type ContextViewOwnProps = {
|
|
6
6
|
as?: AsElementType;
|
|
7
|
-
elementRef?: (
|
|
7
|
+
elementRef?: (element: Element | null) => void;
|
|
8
8
|
height?: string | number;
|
|
9
9
|
width?: string | number;
|
|
10
10
|
maxHeight?: string | number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/ContextView/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,gBAAgB,EACjB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EACV,MAAM,EACN,OAAO,EACP,QAAQ,EACR,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAE7B,aAAK,mBAAmB,GAAG;IACzB,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,UAAU,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/ContextView/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,gBAAgB,EACjB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EACV,MAAM,EACN,OAAO,EACP,QAAQ,EACR,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAE7B,aAAK,mBAAmB,GAAG;IACzB,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,KAAK,CAAC,EAAE,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|
|
|
17
17
|
static componentId: string;
|
|
18
18
|
static allowedProps: readonly (keyof {
|
|
19
19
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
20
|
-
elementRef?: ((element:
|
|
20
|
+
elementRef?: ((element: Element | null) => void) | undefined;
|
|
21
21
|
display: "auto" | "inline" | "block" | "inline-block" | "flex" | "inline-flex";
|
|
22
22
|
overflowX: "auto" | "hidden" | "visible";
|
|
23
23
|
overflowY: "auto" | "hidden" | "visible";
|
|
@@ -40,7 +40,7 @@ declare class View extends Component<ViewProps & OtherHTMLAttributes<ViewProps>>
|
|
|
40
40
|
focusPosition: "offset" | "inset";
|
|
41
41
|
focusColor: "info" | "success" | "danger" | "inverse";
|
|
42
42
|
shouldAnimateFocus: boolean;
|
|
43
|
-
withVisualDebug
|
|
43
|
+
withVisualDebug?: boolean | undefined;
|
|
44
44
|
dir?: "ltr" | "rtl" | undefined;
|
|
45
45
|
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
46
46
|
padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
@@ -52,7 +52,7 @@ declare class View extends Component<ViewProps & OtherHTMLAttributes<ViewProps>>
|
|
|
52
52
|
})[];
|
|
53
53
|
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
54
54
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
55
|
-
elementRef?: ((element:
|
|
55
|
+
elementRef?: ((element: Element | null) => void) | undefined;
|
|
56
56
|
display: "auto" | "inline" | "block" | "inline-block" | "flex" | "inline-flex";
|
|
57
57
|
overflowX: "auto" | "hidden" | "visible";
|
|
58
58
|
overflowY: "auto" | "hidden" | "visible";
|
|
@@ -75,7 +75,7 @@ declare class View extends Component<ViewProps & OtherHTMLAttributes<ViewProps>>
|
|
|
75
75
|
focusPosition: "offset" | "inset";
|
|
76
76
|
focusColor: "info" | "success" | "danger" | "inverse";
|
|
77
77
|
shouldAnimateFocus: boolean;
|
|
78
|
-
withVisualDebug
|
|
78
|
+
withVisualDebug?: boolean | undefined;
|
|
79
79
|
dir?: "ltr" | "rtl" | undefined;
|
|
80
80
|
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
81
81
|
padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
@@ -110,7 +110,8 @@ declare class View extends Component<ViewProps & OtherHTMLAttributes<ViewProps>>
|
|
|
110
110
|
constructor(props: ViewProps);
|
|
111
111
|
componentDidMount(): void;
|
|
112
112
|
componentDidUpdate(): void;
|
|
113
|
-
|
|
113
|
+
ref: Element | null;
|
|
114
|
+
handleElementRef: (el: Element | null) => void;
|
|
114
115
|
render(): jsx.JSX.Element;
|
|
115
116
|
}
|
|
116
117
|
export default View;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/View/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAWhD,OAAO,EAAE,GAAG,EAAa,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAMpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;;;;;GASG;AACH,cAEM,IAAK,SAAQ,SAAS,CAAC,SAAS,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACtE,MAAM,CAAC,WAAW,SAAS;IAC3B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;MAUT;IAUV;;;;;;;OAOG;IACH,MAAM,CAAC,aAAa,UACX,OAAO,MAAM,EAAE,GAAG,CAAC,aACf,cAAc,GAAG,CAAC,yBAiB9B;IAED,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/View/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAWhD,OAAO,EAAE,GAAG,EAAa,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAMpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;;;;;GASG;AACH,cAEM,IAAK,SAAQ,SAAS,CAAC,SAAS,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACtE,MAAM,CAAC,WAAW,SAAS;IAC3B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;MAUT;IAUV;;;;;;;OAOG;IACH,MAAM,CAAC,aAAa,UACX,OAAO,MAAM,EAAE,GAAG,CAAC,aACf,cAAc,GAAG,CAAC,yBAiB9B;IAED,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,CAAgB;gBAErB,KAAK,EAAE,SAAS;IAK5B,iBAAiB;IAIjB,kBAAkB;IAoDlB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,gBAAgB,OAAQ,OAAO,GAAG,IAAI,UAMrC;IAED,MAAM;CA4CP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
package/types/View/props.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ declare type ViewOwnProps = {
|
|
|
9
9
|
/**
|
|
10
10
|
* provides a reference to the underlying html element
|
|
11
11
|
*/
|
|
12
|
-
elementRef?: (element:
|
|
12
|
+
elementRef?: (element: Element | null) => void;
|
|
13
13
|
/**
|
|
14
14
|
* By default the display prop is 'auto', meaning it takes on the
|
|
15
15
|
* display rules of the html element it's rendered as (see `as` prop).
|
|
@@ -81,7 +81,7 @@ declare type ViewOwnProps = {
|
|
|
81
81
|
* Activate a dotted outline around the component to make building your
|
|
82
82
|
* layout easier
|
|
83
83
|
*/
|
|
84
|
-
withVisualDebug
|
|
84
|
+
withVisualDebug?: boolean;
|
|
85
85
|
dir?: 'ltr' | 'rtl';
|
|
86
86
|
/**
|
|
87
87
|
* Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/View/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/View/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACV,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,WAAW,EACX,WAAW,EACX,MAAM,EACN,QAAQ,EACR,cAAc,EACf,MAAM,sBAAsB,CAAA;AAE7B,aAAK,YAAY,GAAG;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,cAAc,GAAG,MAAM,GAAG,aAAa,CAAA;IAC9E,SAAS,EAA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