@instructure/ui-tabs 8.11.2-snapshot.56 → 8.11.2-snapshot.69
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/Tabs/index.js +3 -3
- package/lib/Tabs/index.js +3 -3
- package/package.json +21 -21
- package/src/Tabs/index.tsx +3 -3
package/es/Tabs/index.js
CHANGED
|
@@ -39,7 +39,7 @@ import { Focusable } from '@instructure/ui-focusable';
|
|
|
39
39
|
import { getBoundingClientRect } from '@instructure/ui-dom-utils';
|
|
40
40
|
import { debounce } from '@instructure/debounce';
|
|
41
41
|
import { px } from '@instructure/ui-utils';
|
|
42
|
-
import {
|
|
42
|
+
import { textDirectionContextConsumer } from '@instructure/ui-i18n';
|
|
43
43
|
import { withStyle, jsx } from '@instructure/emotion';
|
|
44
44
|
import generateStyle from './styles';
|
|
45
45
|
import generateComponentTheme from './theme';
|
|
@@ -52,7 +52,7 @@ import { allowedProps, propTypes } from './props';
|
|
|
52
52
|
category: components
|
|
53
53
|
---
|
|
54
54
|
**/
|
|
55
|
-
let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
55
|
+
let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = textDirectionContextConsumer(), _dec3 = testable(), _dec(_class = _dec2(_class = _dec3(_class = (_temp = _class2 = class Tabs extends Component {
|
|
56
56
|
constructor(props) {
|
|
57
57
|
super(props);
|
|
58
58
|
this.ref = null;
|
|
@@ -215,7 +215,7 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = bid
|
|
|
215
215
|
if (this._tabList && this._tabListPosition && typeof this._tabList.scrollTo === 'function' // test for scrollTo support
|
|
216
216
|
) {
|
|
217
217
|
const dir = this.props.dir;
|
|
218
|
-
const isRtl = dir ===
|
|
218
|
+
const isRtl = dir === textDirectionContextConsumer.DIRECTION.rtl;
|
|
219
219
|
const tabPosition = getBoundingClientRect(activeTabEl);
|
|
220
220
|
const tabListPosition = this._tabListPosition;
|
|
221
221
|
const tabListBoundStart = isRtl ? tabListPosition.left + this.getOverlayWidth() : tabListPosition.left;
|
package/lib/Tabs/index.js
CHANGED
|
@@ -43,7 +43,7 @@ var _debounce = require("@instructure/debounce");
|
|
|
43
43
|
|
|
44
44
|
var _px = require("@instructure/ui-utils/lib/px.js");
|
|
45
45
|
|
|
46
|
-
var
|
|
46
|
+
var _textDirectionContextConsumer = require("@instructure/ui-i18n/lib/textDirectionContextConsumer.js");
|
|
47
47
|
|
|
48
48
|
var _emotion = require("@instructure/emotion");
|
|
49
49
|
|
|
@@ -66,7 +66,7 @@ var _dec, _dec2, _dec3, _class, _class2, _temp;
|
|
|
66
66
|
category: components
|
|
67
67
|
---
|
|
68
68
|
**/
|
|
69
|
-
let Tabs = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0,
|
|
69
|
+
let Tabs = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _textDirectionContextConsumer.textDirectionContextConsumer)(), _dec3 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_temp = _class2 = class Tabs extends _react.Component {
|
|
70
70
|
constructor(props) {
|
|
71
71
|
super(props);
|
|
72
72
|
this.ref = null;
|
|
@@ -229,7 +229,7 @@ let Tabs = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
|
|
|
229
229
|
if (this._tabList && this._tabListPosition && typeof this._tabList.scrollTo === 'function' // test for scrollTo support
|
|
230
230
|
) {
|
|
231
231
|
const dir = this.props.dir;
|
|
232
|
-
const isRtl = dir ===
|
|
232
|
+
const isRtl = dir === _textDirectionContextConsumer.textDirectionContextConsumer.DIRECTION.rtl;
|
|
233
233
|
const tabPosition = (0, _getBoundingClientRect.getBoundingClientRect)(activeTabEl);
|
|
234
234
|
const tabListPosition = this._tabListPosition;
|
|
235
235
|
const tabListBoundStart = isRtl ? tabListPosition.left + this.getOverlayWidth() : tabListPosition.left;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-tabs",
|
|
3
|
-
"version": "8.11.2-snapshot.
|
|
3
|
+
"version": "8.11.2-snapshot.69+10d1551b9",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -24,28 +24,28 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@instructure/ui-babel-preset": "8.11.2-snapshot.
|
|
28
|
-
"@instructure/ui-color-utils": "8.11.2-snapshot.
|
|
29
|
-
"@instructure/ui-test-locator": "8.11.2-snapshot.
|
|
30
|
-
"@instructure/ui-test-utils": "8.11.2-snapshot.
|
|
31
|
-
"@instructure/ui-themes": "8.11.2-snapshot.
|
|
27
|
+
"@instructure/ui-babel-preset": "8.11.2-snapshot.69+10d1551b9",
|
|
28
|
+
"@instructure/ui-color-utils": "8.11.2-snapshot.69+10d1551b9",
|
|
29
|
+
"@instructure/ui-test-locator": "8.11.2-snapshot.69+10d1551b9",
|
|
30
|
+
"@instructure/ui-test-utils": "8.11.2-snapshot.69+10d1551b9",
|
|
31
|
+
"@instructure/ui-themes": "8.11.2-snapshot.69+10d1551b9"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.13.10",
|
|
35
|
-
"@instructure/console": "8.11.2-snapshot.
|
|
36
|
-
"@instructure/debounce": "8.11.2-snapshot.
|
|
37
|
-
"@instructure/emotion": "8.11.2-snapshot.
|
|
38
|
-
"@instructure/shared-types": "8.11.2-snapshot.
|
|
39
|
-
"@instructure/ui-dom-utils": "8.11.2-snapshot.
|
|
40
|
-
"@instructure/ui-focusable": "8.11.2-snapshot.
|
|
41
|
-
"@instructure/ui-i18n": "8.11.2-snapshot.
|
|
42
|
-
"@instructure/ui-motion": "8.11.2-snapshot.
|
|
43
|
-
"@instructure/ui-prop-types": "8.11.2-snapshot.
|
|
44
|
-
"@instructure/ui-react-utils": "8.11.2-snapshot.
|
|
45
|
-
"@instructure/ui-testable": "8.11.2-snapshot.
|
|
46
|
-
"@instructure/ui-utils": "8.11.2-snapshot.
|
|
47
|
-
"@instructure/ui-view": "8.11.2-snapshot.
|
|
48
|
-
"@instructure/uid": "8.11.2-snapshot.
|
|
35
|
+
"@instructure/console": "8.11.2-snapshot.69+10d1551b9",
|
|
36
|
+
"@instructure/debounce": "8.11.2-snapshot.69+10d1551b9",
|
|
37
|
+
"@instructure/emotion": "8.11.2-snapshot.69+10d1551b9",
|
|
38
|
+
"@instructure/shared-types": "8.11.2-snapshot.69+10d1551b9",
|
|
39
|
+
"@instructure/ui-dom-utils": "8.11.2-snapshot.69+10d1551b9",
|
|
40
|
+
"@instructure/ui-focusable": "8.11.2-snapshot.69+10d1551b9",
|
|
41
|
+
"@instructure/ui-i18n": "8.11.2-snapshot.69+10d1551b9",
|
|
42
|
+
"@instructure/ui-motion": "8.11.2-snapshot.69+10d1551b9",
|
|
43
|
+
"@instructure/ui-prop-types": "8.11.2-snapshot.69+10d1551b9",
|
|
44
|
+
"@instructure/ui-react-utils": "8.11.2-snapshot.69+10d1551b9",
|
|
45
|
+
"@instructure/ui-testable": "8.11.2-snapshot.69+10d1551b9",
|
|
46
|
+
"@instructure/ui-utils": "8.11.2-snapshot.69+10d1551b9",
|
|
47
|
+
"@instructure/ui-view": "8.11.2-snapshot.69+10d1551b9",
|
|
48
|
+
"@instructure/uid": "8.11.2-snapshot.69+10d1551b9",
|
|
49
49
|
"keycode": "^2",
|
|
50
50
|
"prop-types": "^15"
|
|
51
51
|
},
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
58
|
"sideEffects": false,
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "10d1551b961c568d88c9c5f3393815f637662995"
|
|
60
60
|
}
|
package/src/Tabs/index.tsx
CHANGED
|
@@ -46,7 +46,7 @@ import { Focusable } from '@instructure/ui-focusable'
|
|
|
46
46
|
import { getBoundingClientRect } from '@instructure/ui-dom-utils'
|
|
47
47
|
import { debounce } from '@instructure/debounce'
|
|
48
48
|
import { px } from '@instructure/ui-utils'
|
|
49
|
-
import {
|
|
49
|
+
import { textDirectionContextConsumer } from '@instructure/ui-i18n'
|
|
50
50
|
|
|
51
51
|
import { withStyle, jsx } from '@instructure/emotion'
|
|
52
52
|
|
|
@@ -70,7 +70,7 @@ category: components
|
|
|
70
70
|
---
|
|
71
71
|
**/
|
|
72
72
|
@withStyle(generateStyle, generateComponentTheme)
|
|
73
|
-
@
|
|
73
|
+
@textDirectionContextConsumer()
|
|
74
74
|
@testable()
|
|
75
75
|
class Tabs extends Component<TabsProps> {
|
|
76
76
|
static readonly componentId = 'Tabs'
|
|
@@ -247,7 +247,7 @@ class Tabs extends Component<TabsProps> {
|
|
|
247
247
|
typeof this._tabList.scrollTo === 'function' // test for scrollTo support
|
|
248
248
|
) {
|
|
249
249
|
const { dir } = this.props
|
|
250
|
-
const isRtl = dir ===
|
|
250
|
+
const isRtl = dir === textDirectionContextConsumer.DIRECTION.rtl
|
|
251
251
|
|
|
252
252
|
const tabPosition = getBoundingClientRect(activeTabEl)
|
|
253
253
|
// @ts-expect-error ts-migrate(2339) FIXME: Property '_tabListPosition' does not exist on type... Remove this comment to see the full error message
|