@instructure/ui-view 8.11.2-snapshot.52 → 8.11.2-snapshot.64
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/View/index.js +2 -2
- package/es/View/props.js +2 -2
- package/lib/View/index.js +2 -2
- package/lib/View/props.js +2 -2
- package/package.json +14 -14
- package/src/View/index.tsx +2 -2
- package/src/View/props.ts +2 -2
- package/types/View/props.d.ts.map +1 -1
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';
|
|
@@ -47,7 +47,7 @@ API:
|
|
|
47
47
|
@module View
|
|
48
48
|
@tsProps
|
|
49
49
|
**/
|
|
50
|
-
let View = (_dec =
|
|
50
|
+
let View = (_dec = textDirectionContextConsumer(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = (_temp = _class2 = class View extends Component {
|
|
51
51
|
// TODO: Remove this code once all components are using passthroughProps in place
|
|
52
52
|
// of omitProps and have removed this function
|
|
53
53
|
// omitViewProps needs to be called on the composed View component so that the
|
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/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
|
|
|
@@ -46,7 +46,7 @@ API:
|
|
|
46
46
|
@module View
|
|
47
47
|
@tsProps
|
|
48
48
|
**/
|
|
49
|
-
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 {
|
|
50
50
|
// TODO: Remove this code once all components are using passthroughProps in place
|
|
51
51
|
// of omitProps and have removed this function
|
|
52
52
|
// omitViewProps needs to be called on the composed View component so that the
|
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.64+fa07135b5",
|
|
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.64+fa07135b5",
|
|
29
|
+
"@instructure/emotion": "8.11.2-snapshot.64+fa07135b5",
|
|
30
|
+
"@instructure/shared-types": "8.11.2-snapshot.64+fa07135b5",
|
|
31
|
+
"@instructure/ui-color-utils": "8.11.2-snapshot.64+fa07135b5",
|
|
32
|
+
"@instructure/ui-dom-utils": "8.11.2-snapshot.64+fa07135b5",
|
|
33
|
+
"@instructure/ui-i18n": "8.11.2-snapshot.64+fa07135b5",
|
|
34
|
+
"@instructure/ui-position": "8.11.2-snapshot.64+fa07135b5",
|
|
35
|
+
"@instructure/ui-prop-types": "8.11.2-snapshot.64+fa07135b5",
|
|
36
|
+
"@instructure/ui-react-utils": "8.11.2-snapshot.64+fa07135b5",
|
|
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.64+fa07135b5",
|
|
41
|
+
"@instructure/ui-test-utils": "8.11.2-snapshot.64+fa07135b5",
|
|
42
|
+
"@instructure/ui-themes": "8.11.2-snapshot.64+fa07135b5"
|
|
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": "fa07135b5601d3268295e5747f5950721a574d4f"
|
|
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,
|
|
@@ -51,7 +51,7 @@ API:
|
|
|
51
51
|
@module View
|
|
52
52
|
@tsProps
|
|
53
53
|
**/
|
|
54
|
-
@
|
|
54
|
+
@textDirectionContextConsumer()
|
|
55
55
|
@withStyle(generateStyle, generateComponentTheme)
|
|
56
56
|
class View extends Component<ViewProps> {
|
|
57
57
|
static componentId = 'View'
|
package/src/View/props.ts
CHANGED
|
@@ -26,8 +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 { textDirectionContextConsumer } from '@instructure/ui-i18n'
|
|
29
30
|
import type { Cursor } from '@instructure/ui-prop-types'
|
|
30
|
-
import { bidirectional } from '@instructure/ui-i18n'
|
|
31
31
|
import { ThemeablePropTypes } from '@instructure/emotion'
|
|
32
32
|
|
|
33
33
|
import type {
|
|
@@ -265,7 +265,7 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
265
265
|
focusColor: PropTypes.oneOf(['info', 'inverse', 'success', 'danger']),
|
|
266
266
|
shouldAnimateFocus: PropTypes.bool,
|
|
267
267
|
withVisualDebug: PropTypes.bool,
|
|
268
|
-
dir: PropTypes.oneOf(Object.values(
|
|
268
|
+
dir: PropTypes.oneOf(Object.values(textDirectionContextConsumer.DIRECTION))
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
// This variable will be attached as static property on the `View` component
|
|
@@ -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":"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