@instructure/ui-view 8.11.2-snapshot.7 → 8.11.2-snapshot.70
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/es/ContextView/index.js +1 -0
- package/es/View/index.js +8 -7
- package/es/View/props.js +2 -2
- package/es/package.json +1 -0
- package/lib/ContextView/index.js +1 -0
- package/lib/View/index.js +8 -7
- package/lib/View/props.js +2 -2
- package/package.json +14 -14
- package/src/ContextView/index.tsx +1 -0
- package/src/View/index.tsx +11 -8
- package/src/View/props.ts +9 -5
- package/types/ContextView/index.d.ts +1 -0
- package/types/ContextView/index.d.ts.map +1 -1
- package/types/View/index.d.ts +4 -5
- package/types/View/index.d.ts.map +1 -1
- package/types/View/props.d.ts +6 -3
- package/types/View/props.d.ts.map +1 -1
package/es/ContextView/index.js
CHANGED
|
@@ -37,6 +37,7 @@ import { propTypes, allowedProps } from './props';
|
|
|
37
37
|
---
|
|
38
38
|
category: components
|
|
39
39
|
---
|
|
40
|
+
@tsProps
|
|
40
41
|
**/
|
|
41
42
|
let ContextView = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = class ContextView extends Component {
|
|
42
43
|
constructor(...args) {
|
package/es/View/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var _dec, _dec2, _class, _class2, _temp;
|
|
|
30
30
|
/** @jsx jsx */
|
|
31
31
|
import { Component } from 'react';
|
|
32
32
|
import { getComputedStyle } from '@instructure/ui-dom-utils';
|
|
33
|
-
import {
|
|
33
|
+
import { textDirectionContextConsumer } from '@instructure/ui-i18n';
|
|
34
34
|
import { logError as error } from '@instructure/console';
|
|
35
35
|
import { getElementType, omitProps, pickProps, passthroughProps } from '@instructure/ui-react-utils';
|
|
36
36
|
import { jsx, withStyle } from '@instructure/emotion';
|
|
@@ -41,14 +41,13 @@ import { propTypes, allowedProps } from './props';
|
|
|
41
41
|
/**
|
|
42
42
|
---
|
|
43
43
|
category: components
|
|
44
|
-
|
|
45
44
|
---
|
|
46
45
|
API:
|
|
47
46
|
- [View](https://instructure.design/#View)
|
|
48
47
|
@module View
|
|
49
|
-
|
|
48
|
+
@tsProps
|
|
50
49
|
**/
|
|
51
|
-
let View = (_dec =
|
|
50
|
+
let View = (_dec = textDirectionContextConsumer(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = (_temp = _class2 = class View extends Component {
|
|
52
51
|
// TODO: Remove this code once all components are using passthroughProps in place
|
|
53
52
|
// of omitProps and have removed this function
|
|
54
53
|
// omitViewProps needs to be called on the composed View component so that the
|
|
@@ -61,10 +60,13 @@ let View = (_dec = bidirectional(), _dec2 = withStyle(generateStyle, generateCom
|
|
|
61
60
|
// @param props the object to process
|
|
62
61
|
// @param Component The component whose props are processed.
|
|
63
62
|
// Only needed for debug logging in non-production builds.
|
|
63
|
+
get _element() {
|
|
64
|
+
return this.ref;
|
|
65
|
+
}
|
|
66
|
+
|
|
64
67
|
constructor(props) {
|
|
65
68
|
super(props);
|
|
66
69
|
this.spanMarginVerified = void 0;
|
|
67
|
-
this._element = void 0;
|
|
68
70
|
this.ref = null;
|
|
69
71
|
|
|
70
72
|
this.handleElementRef = el => {
|
|
@@ -73,7 +75,6 @@ let View = (_dec = bidirectional(), _dec2 = withStyle(generateStyle, generateCom
|
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
this.ref = el;
|
|
76
|
-
this._element = el;
|
|
77
78
|
};
|
|
78
79
|
|
|
79
80
|
this.spanMarginVerified = false;
|
|
@@ -120,7 +121,7 @@ let View = (_dec = bidirectional(), _dec2 = withStyle(generateStyle, generateCom
|
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
return verticalMargin;
|
|
123
|
-
}(this.
|
|
124
|
+
}(this.ref, this.props.margin), `[View] display style is set to 'inline' and will allow for horizontal margins only.`);
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
|
package/es/View/props.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import PropTypes from 'prop-types';
|
|
25
25
|
import { cursor as cursorPropTypes } from '@instructure/ui-prop-types';
|
|
26
|
-
import {
|
|
26
|
+
import { textDirectionContextConsumer } from '@instructure/ui-i18n';
|
|
27
27
|
import { ThemeablePropTypes } from '@instructure/emotion';
|
|
28
28
|
const propTypes = {
|
|
29
29
|
as: PropTypes.elementType,
|
|
@@ -58,7 +58,7 @@ const propTypes = {
|
|
|
58
58
|
focusColor: PropTypes.oneOf(['info', 'inverse', 'success', 'danger']),
|
|
59
59
|
shouldAnimateFocus: PropTypes.bool,
|
|
60
60
|
withVisualDebug: PropTypes.bool,
|
|
61
|
-
dir: PropTypes.oneOf(Object.values(
|
|
61
|
+
dir: PropTypes.oneOf(Object.values(textDirectionContextConsumer.DIRECTION))
|
|
62
62
|
}; // This variable will be attached as static property on the `View` component
|
|
63
63
|
// so we don't rely on the `PropTypes` validators for our internal logic.
|
|
64
64
|
// This means on prod builds the consuming applications can safely delete propTypes.
|
package/es/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
package/lib/ContextView/index.js
CHANGED
|
@@ -27,6 +27,7 @@ var _dec, _class, _class2, _temp;
|
|
|
27
27
|
---
|
|
28
28
|
category: components
|
|
29
29
|
---
|
|
30
|
+
@tsProps
|
|
30
31
|
**/
|
|
31
32
|
let ContextView = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = class ContextView extends _react.Component {
|
|
32
33
|
constructor(...args) {
|
package/lib/View/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var _react = require("react");
|
|
|
13
13
|
|
|
14
14
|
var _getComputedStyle = require("@instructure/ui-dom-utils/lib/getComputedStyle.js");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _textDirectionContextConsumer = require("@instructure/ui-i18n/lib/textDirectionContextConsumer.js");
|
|
17
17
|
|
|
18
18
|
var _console = require("@instructure/console");
|
|
19
19
|
|
|
@@ -40,14 +40,13 @@ var _dec, _dec2, _class, _class2, _temp;
|
|
|
40
40
|
/**
|
|
41
41
|
---
|
|
42
42
|
category: components
|
|
43
|
-
|
|
44
43
|
---
|
|
45
44
|
API:
|
|
46
45
|
- [View](https://instructure.design/#View)
|
|
47
46
|
@module View
|
|
48
|
-
|
|
47
|
+
@tsProps
|
|
49
48
|
**/
|
|
50
|
-
let View = (_dec = (0,
|
|
49
|
+
let View = (_dec = (0, _textDirectionContextConsumer.textDirectionContextConsumer)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_temp = _class2 = class View extends _react.Component {
|
|
51
50
|
// TODO: Remove this code once all components are using passthroughProps in place
|
|
52
51
|
// of omitProps and have removed this function
|
|
53
52
|
// omitViewProps needs to be called on the composed View component so that the
|
|
@@ -60,10 +59,13 @@ let View = (_dec = (0, _bidirectional.bidirectional)(), _dec2 = (0, _emotion.wit
|
|
|
60
59
|
// @param props the object to process
|
|
61
60
|
// @param Component The component whose props are processed.
|
|
62
61
|
// Only needed for debug logging in non-production builds.
|
|
62
|
+
get _element() {
|
|
63
|
+
return this.ref;
|
|
64
|
+
}
|
|
65
|
+
|
|
63
66
|
constructor(props) {
|
|
64
67
|
super(props);
|
|
65
68
|
this.spanMarginVerified = void 0;
|
|
66
|
-
this._element = void 0;
|
|
67
69
|
this.ref = null;
|
|
68
70
|
|
|
69
71
|
this.handleElementRef = el => {
|
|
@@ -72,7 +74,6 @@ let View = (_dec = (0, _bidirectional.bidirectional)(), _dec2 = (0, _emotion.wit
|
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
this.ref = el;
|
|
75
|
-
this._element = el;
|
|
76
77
|
};
|
|
77
78
|
|
|
78
79
|
this.spanMarginVerified = false;
|
|
@@ -119,7 +120,7 @@ let View = (_dec = (0, _bidirectional.bidirectional)(), _dec2 = (0, _emotion.wit
|
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
return verticalMargin;
|
|
122
|
-
}(this.
|
|
123
|
+
}(this.ref, this.props.margin), `[View] display style is set to 'inline' and will allow for horizontal margins only.`);
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
126
|
|
package/lib/View/props.js
CHANGED
|
@@ -11,7 +11,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _cursor = require("@instructure/ui-prop-types/lib/cursor.js");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _textDirectionContextConsumer = require("@instructure/ui-i18n/lib/textDirectionContextConsumer.js");
|
|
15
15
|
|
|
16
16
|
var _emotion = require("@instructure/emotion");
|
|
17
17
|
|
|
@@ -71,7 +71,7 @@ const propTypes = {
|
|
|
71
71
|
focusColor: _propTypes.default.oneOf(['info', 'inverse', 'success', 'danger']),
|
|
72
72
|
shouldAnimateFocus: _propTypes.default.bool,
|
|
73
73
|
withVisualDebug: _propTypes.default.bool,
|
|
74
|
-
dir: _propTypes.default.oneOf(Object.values(
|
|
74
|
+
dir: _propTypes.default.oneOf(Object.values(_textDirectionContextConsumer.textDirectionContextConsumer.DIRECTION))
|
|
75
75
|
}; // This variable will be attached as static property on the `View` component
|
|
76
76
|
// so we don't rely on the `PropTypes` validators for our internal logic.
|
|
77
77
|
// This means on prod builds the consuming applications can safely delete propTypes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-view",
|
|
3
|
-
"version": "8.11.2-snapshot.
|
|
3
|
+
"version": "8.11.2-snapshot.70+9653a896e",
|
|
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.11.2-snapshot.
|
|
29
|
-
"@instructure/emotion": "8.11.2-snapshot.
|
|
30
|
-
"@instructure/shared-types": "8.11.2-snapshot.
|
|
31
|
-
"@instructure/ui-color-utils": "8.11.2-snapshot.
|
|
32
|
-
"@instructure/ui-dom-utils": "8.11.2-snapshot.
|
|
33
|
-
"@instructure/ui-i18n": "8.11.2-snapshot.
|
|
34
|
-
"@instructure/ui-position": "8.11.2-snapshot.
|
|
35
|
-
"@instructure/ui-prop-types": "8.11.2-snapshot.
|
|
36
|
-
"@instructure/ui-react-utils": "8.11.2-snapshot.
|
|
28
|
+
"@instructure/console": "8.11.2-snapshot.70+9653a896e",
|
|
29
|
+
"@instructure/emotion": "8.11.2-snapshot.70+9653a896e",
|
|
30
|
+
"@instructure/shared-types": "8.11.2-snapshot.70+9653a896e",
|
|
31
|
+
"@instructure/ui-color-utils": "8.11.2-snapshot.70+9653a896e",
|
|
32
|
+
"@instructure/ui-dom-utils": "8.11.2-snapshot.70+9653a896e",
|
|
33
|
+
"@instructure/ui-i18n": "8.11.2-snapshot.70+9653a896e",
|
|
34
|
+
"@instructure/ui-position": "8.11.2-snapshot.70+9653a896e",
|
|
35
|
+
"@instructure/ui-prop-types": "8.11.2-snapshot.70+9653a896e",
|
|
36
|
+
"@instructure/ui-react-utils": "8.11.2-snapshot.70+9653a896e",
|
|
37
37
|
"prop-types": "^15"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@instructure/ui-babel-preset": "8.11.2-snapshot.
|
|
41
|
-
"@instructure/ui-test-utils": "8.11.2-snapshot.
|
|
42
|
-
"@instructure/ui-themes": "8.11.2-snapshot.
|
|
40
|
+
"@instructure/ui-babel-preset": "8.11.2-snapshot.70+9653a896e",
|
|
41
|
+
"@instructure/ui-test-utils": "8.11.2-snapshot.70+9653a896e",
|
|
42
|
+
"@instructure/ui-themes": "8.11.2-snapshot.70+9653a896e"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8 <=17"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"sideEffects": false,
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "9653a896e80ba4d73335225e80807746a232d96d"
|
|
52
52
|
}
|
package/src/View/index.tsx
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
import { Component, ComponentType } from 'react'
|
|
27
27
|
|
|
28
28
|
import { getComputedStyle } from '@instructure/ui-dom-utils'
|
|
29
|
-
import {
|
|
29
|
+
import { textDirectionContextConsumer } from '@instructure/ui-i18n'
|
|
30
30
|
import { logError as error } from '@instructure/console'
|
|
31
31
|
import {
|
|
32
32
|
getElementType,
|
|
@@ -45,14 +45,13 @@ import type { ViewProps } from './props'
|
|
|
45
45
|
/**
|
|
46
46
|
---
|
|
47
47
|
category: components
|
|
48
|
-
|
|
49
48
|
---
|
|
50
49
|
API:
|
|
51
50
|
- [View](https://instructure.design/#View)
|
|
52
51
|
@module View
|
|
53
|
-
|
|
52
|
+
@tsProps
|
|
54
53
|
**/
|
|
55
|
-
@
|
|
54
|
+
@textDirectionContextConsumer()
|
|
56
55
|
@withStyle(generateStyle, generateComponentTheme)
|
|
57
56
|
class View extends Component<ViewProps> {
|
|
58
57
|
static componentId = 'View'
|
|
@@ -106,7 +105,13 @@ class View extends Component<ViewProps> {
|
|
|
106
105
|
}
|
|
107
106
|
|
|
108
107
|
private spanMarginVerified: boolean
|
|
109
|
-
|
|
108
|
+
get _element() {
|
|
109
|
+
console.warn(
|
|
110
|
+
'_element property is deprecated and will be removed in v9, please use ref instead'
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
return this.ref
|
|
114
|
+
}
|
|
110
115
|
|
|
111
116
|
constructor(props: ViewProps) {
|
|
112
117
|
super(props)
|
|
@@ -163,7 +168,7 @@ class View extends Component<ViewProps> {
|
|
|
163
168
|
}
|
|
164
169
|
|
|
165
170
|
return verticalMargin
|
|
166
|
-
})(this.
|
|
171
|
+
})(this.ref, this.props.margin),
|
|
167
172
|
`[View] display style is set to 'inline' and will allow for horizontal margins only.`
|
|
168
173
|
)
|
|
169
174
|
}
|
|
@@ -176,7 +181,6 @@ class View extends Component<ViewProps> {
|
|
|
176
181
|
this.props.elementRef(el)
|
|
177
182
|
}
|
|
178
183
|
this.ref = el
|
|
179
|
-
this._element = el
|
|
180
184
|
}
|
|
181
185
|
|
|
182
186
|
render() {
|
|
@@ -215,7 +219,6 @@ class View extends Component<ViewProps> {
|
|
|
215
219
|
{...passthroughProps(props)}
|
|
216
220
|
className={className}
|
|
217
221
|
css={styles?.view}
|
|
218
|
-
//@ts-expect-error TODO: null not assignable
|
|
219
222
|
style={styles?.inlineStyles}
|
|
220
223
|
ref={this.handleElementRef}
|
|
221
224
|
>
|
package/src/View/props.ts
CHANGED
|
@@ -26,7 +26,8 @@ import React from 'react'
|
|
|
26
26
|
import PropTypes from 'prop-types'
|
|
27
27
|
|
|
28
28
|
import { cursor as cursorPropTypes } from '@instructure/ui-prop-types'
|
|
29
|
-
import {
|
|
29
|
+
import { textDirectionContextConsumer } from '@instructure/ui-i18n'
|
|
30
|
+
import type { Cursor } from '@instructure/ui-prop-types'
|
|
30
31
|
import { ThemeablePropTypes } from '@instructure/emotion'
|
|
31
32
|
|
|
32
33
|
import type {
|
|
@@ -42,7 +43,8 @@ import type {
|
|
|
42
43
|
BorderRadii,
|
|
43
44
|
Shadow,
|
|
44
45
|
Stacking,
|
|
45
|
-
ComponentStyle
|
|
46
|
+
ComponentStyle,
|
|
47
|
+
StyleObject
|
|
46
48
|
} from '@instructure/emotion'
|
|
47
49
|
|
|
48
50
|
type ViewOwnProps = {
|
|
@@ -181,7 +183,7 @@ type ViewOwnProps = {
|
|
|
181
183
|
/**
|
|
182
184
|
* Specify a mouse cursor to use when hovering over the `<View />`
|
|
183
185
|
*/
|
|
184
|
-
cursor?:
|
|
186
|
+
cursor?: Cursor
|
|
185
187
|
}
|
|
186
188
|
|
|
187
189
|
type PropKeys = keyof ViewOwnProps
|
|
@@ -192,7 +194,9 @@ type ViewProps = ViewOwnProps &
|
|
|
192
194
|
|
|
193
195
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
194
196
|
|
|
195
|
-
type ViewStyle = ComponentStyle<'view'
|
|
197
|
+
type ViewStyle = ComponentStyle<'view'> & {
|
|
198
|
+
inlineStyles: StyleObject
|
|
199
|
+
}
|
|
196
200
|
|
|
197
201
|
const propTypes: PropValidators<PropKeys> = {
|
|
198
202
|
as: PropTypes.elementType,
|
|
@@ -261,7 +265,7 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
261
265
|
focusColor: PropTypes.oneOf(['info', 'inverse', 'success', 'danger']),
|
|
262
266
|
shouldAnimateFocus: PropTypes.bool,
|
|
263
267
|
withVisualDebug: PropTypes.bool,
|
|
264
|
-
dir: PropTypes.oneOf(Object.values(
|
|
268
|
+
dir: PropTypes.oneOf(Object.values(textDirectionContextConsumer.DIRECTION))
|
|
265
269
|
}
|
|
266
270
|
|
|
267
271
|
// This variable will be attached as static property on the `View` component
|
|
@@ -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;AAQrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C
|
|
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;AAQrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C;;;;;GAKG;AAEH,cACM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACnD,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,UAQ9B;IAED,MAAM;CA0DP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
package/types/View/index.d.ts
CHANGED
|
@@ -5,12 +5,11 @@ import type { ViewProps } from './props';
|
|
|
5
5
|
/**
|
|
6
6
|
---
|
|
7
7
|
category: components
|
|
8
|
-
|
|
9
8
|
---
|
|
10
9
|
API:
|
|
11
10
|
- [View](https://instructure.design/#View)
|
|
12
11
|
@module View
|
|
13
|
-
|
|
12
|
+
@tsProps
|
|
14
13
|
**/
|
|
15
14
|
declare class View extends Component<ViewProps> {
|
|
16
15
|
static componentId: string;
|
|
@@ -47,7 +46,7 @@ declare class View extends Component<ViewProps> {
|
|
|
47
46
|
borderRadius?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").BorderRadii | undefined;
|
|
48
47
|
shadow?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Shadow | undefined;
|
|
49
48
|
stacking?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Stacking | undefined;
|
|
50
|
-
cursor?:
|
|
49
|
+
cursor?: import("@instructure/ui-prop-types/types/cursor").Cursor | undefined;
|
|
51
50
|
})[];
|
|
52
51
|
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
53
52
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
@@ -82,7 +81,7 @@ declare class View extends Component<ViewProps> {
|
|
|
82
81
|
borderRadius?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").BorderRadii | undefined;
|
|
83
82
|
shadow?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Shadow | undefined;
|
|
84
83
|
stacking?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Stacking | undefined;
|
|
85
|
-
cursor?:
|
|
84
|
+
cursor?: import("@instructure/ui-prop-types/types/cursor").Cursor | undefined;
|
|
86
85
|
}>;
|
|
87
86
|
static defaultProps: {
|
|
88
87
|
readonly display: "auto";
|
|
@@ -97,7 +96,7 @@ declare class View extends Component<ViewProps> {
|
|
|
97
96
|
};
|
|
98
97
|
static omitViewProps: (props: Record<string, any>, Component: ComponentType<any>) => Record<string, any>;
|
|
99
98
|
private spanMarginVerified;
|
|
100
|
-
|
|
99
|
+
get _element(): Element | null;
|
|
101
100
|
constructor(props: ViewProps);
|
|
102
101
|
componentDidMount(): void;
|
|
103
102
|
componentDidUpdate(): void;
|
|
@@ -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;AAMrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC
|
|
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;AAMrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;;;;GAQG;AACH,cAEM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,WAAW,SAAS;IAC3B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;MAUT;IAgBV,MAAM,CAAC,aAAa,UACX,OAAO,MAAM,EAAE,GAAG,CAAC,aACf,cAAc,GAAG,CAAC,yBAiB9B;IAED,OAAO,CAAC,kBAAkB,CAAS;IACnC,IAAI,QAAQ,mBAMX;gBAEW,KAAK,EAAE,SAAS;IAK5B,iBAAiB;IAIjB,kBAAkB;IAoDlB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,gBAAgB,OAAQ,OAAO,GAAG,IAAI,UAKrC;IAED,MAAM;CA2CP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
package/types/View/props.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { Cursor } from '@instructure/ui-prop-types';
|
|
2
3
|
import type { AsElementType, OtherHTMLAttributes, PropValidators, ViewTheme } from '@instructure/shared-types';
|
|
3
|
-
import type { WithStyleProps, Spacing, BorderWidth, BorderRadii, Shadow, Stacking, ComponentStyle } from '@instructure/emotion';
|
|
4
|
+
import type { WithStyleProps, Spacing, BorderWidth, BorderRadii, Shadow, Stacking, ComponentStyle, StyleObject } from '@instructure/emotion';
|
|
4
5
|
declare type ViewOwnProps = {
|
|
5
6
|
/**
|
|
6
7
|
* The element to render as the component root, `span` by default
|
|
@@ -116,12 +117,14 @@ declare type ViewOwnProps = {
|
|
|
116
117
|
/**
|
|
117
118
|
* Specify a mouse cursor to use when hovering over the `<View />`
|
|
118
119
|
*/
|
|
119
|
-
cursor?:
|
|
120
|
+
cursor?: Cursor;
|
|
120
121
|
};
|
|
121
122
|
declare type PropKeys = keyof ViewOwnProps;
|
|
122
123
|
declare type ViewProps = ViewOwnProps & WithStyleProps<ViewTheme, ViewStyle> & OtherHTMLAttributes<ViewOwnProps>;
|
|
123
124
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
124
|
-
declare type ViewStyle = ComponentStyle<'view'
|
|
125
|
+
declare type ViewStyle = ComponentStyle<'view'> & {
|
|
126
|
+
inlineStyles: StyleObject;
|
|
127
|
+
};
|
|
125
128
|
declare const propTypes: PropValidators<PropKeys>;
|
|
126
129
|
declare const allowedProps: AllowedPropKeys;
|
|
127
130
|
export { propTypes, allowedProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/View/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/View/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAGxD,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,SAAS,EACV,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,WAAW,EACX,WAAW,EACX,MAAM,EACN,QAAQ,EACR,cAAc,EACd,WAAW,EACZ,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,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAA;IACxC,SAAS,EAAE,MAAM,GAAG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