@atlaskit/tabs 13.2.13 → 13.3.0
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 +10 -0
- package/dist/cjs/components/tab-list.js +5 -5
- package/dist/cjs/components/tab-panel.js +2 -2
- package/dist/cjs/components/tab.js +2 -2
- package/dist/cjs/components/tabs.js +7 -7
- package/dist/cjs/internal/styles.js +34 -29
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/tab-list.js +1 -1
- package/dist/es2019/components/tab-panel.js +1 -1
- package/dist/es2019/components/tab.js +1 -1
- package/dist/es2019/components/tabs.js +2 -2
- package/dist/es2019/internal/styles.js +15 -13
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/tab-list.js +1 -1
- package/dist/esm/components/tab-panel.js +1 -1
- package/dist/esm/components/tab.js +1 -1
- package/dist/esm/components/tabs.js +2 -2
- package/dist/esm/internal/styles.js +33 -29
- package/dist/esm/version.json +1 -1
- package/dist/types/components/tab-list.d.ts +2 -2
- package/dist/types/components/tab-panel.d.ts +3 -2
- package/dist/types/components/tab.d.ts +3 -2
- package/dist/types/components/tabs.d.ts +2 -2
- package/dist/types/internal/styles.d.ts +3 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/tabs
|
|
2
2
|
|
|
3
|
+
## 13.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`7ec1c1a023f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7ec1c1a023f) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 13.2.13
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -11,7 +11,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
|
|
12
12
|
var _react = require("react");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _react2 = require("@emotion/react");
|
|
15
15
|
|
|
16
16
|
var _components = _interopRequireDefault(require("@atlaskit/theme/components"));
|
|
17
17
|
|
|
@@ -87,7 +87,7 @@ var TabListWithMode = function TabListWithMode(props) {
|
|
|
87
87
|
var tab = _ref.tab,
|
|
88
88
|
isSelected = _ref.isSelected,
|
|
89
89
|
index = _ref.index;
|
|
90
|
-
return (0,
|
|
90
|
+
return (0, _react2.jsx)(_context.TabContext.Provider, {
|
|
91
91
|
value: {
|
|
92
92
|
onClick: function onClick() {
|
|
93
93
|
return onChange(index);
|
|
@@ -106,7 +106,7 @@ var TabListWithMode = function TabListWithMode(props) {
|
|
|
106
106
|
}, tab);
|
|
107
107
|
}, [length, onKeyDown, onChange, tabsId]);
|
|
108
108
|
return (// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
109
|
-
(0,
|
|
109
|
+
(0, _react2.jsx)("div", {
|
|
110
110
|
role: "tablist",
|
|
111
111
|
css: styles,
|
|
112
112
|
ref: ref
|
|
@@ -131,9 +131,9 @@ var TabListWithMode = function TabListWithMode(props) {
|
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
var TabList = function TabList(props) {
|
|
134
|
-
return (0,
|
|
134
|
+
return (0, _react2.jsx)(_components.default.Consumer, null, function (_ref2) {
|
|
135
135
|
var mode = _ref2.mode;
|
|
136
|
-
return (0,
|
|
136
|
+
return (0, _react2.jsx)(TabListWithMode, (0, _extends2.default)({}, props, {
|
|
137
137
|
mode: mode
|
|
138
138
|
}));
|
|
139
139
|
});
|
|
@@ -9,7 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
13
|
|
|
14
14
|
var _hooks = require("../hooks");
|
|
15
15
|
|
|
@@ -29,7 +29,7 @@ var TabPanel = function TabPanel(_ref) {
|
|
|
29
29
|
var children = _ref.children,
|
|
30
30
|
testId = _ref.testId;
|
|
31
31
|
var tabPanelAttributes = (0, _hooks.useTabPanel)();
|
|
32
|
-
return (0,
|
|
32
|
+
return (0, _react.jsx)("div", (0, _extends2.default)({
|
|
33
33
|
"data-testid": testId
|
|
34
34
|
}, tabPanelAttributes), children);
|
|
35
35
|
};
|
|
@@ -9,7 +9,7 @@ exports.default = Tab;
|
|
|
9
9
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
13
|
|
|
14
14
|
var _hooks = require("../hooks");
|
|
15
15
|
|
|
@@ -28,7 +28,7 @@ function Tab(_ref) {
|
|
|
28
28
|
var children = _ref.children,
|
|
29
29
|
testId = _ref.testId;
|
|
30
30
|
var tabAttributes = (0, _hooks.useTab)();
|
|
31
|
-
return (0,
|
|
31
|
+
return (0, _react.jsx)("div", (0, _extends2.default)({
|
|
32
32
|
"data-testid": testId
|
|
33
33
|
}, tabAttributes), children);
|
|
34
34
|
}
|
|
@@ -17,7 +17,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
17
17
|
|
|
18
18
|
var _react = require("react");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _react2 = require("@emotion/react");
|
|
21
21
|
|
|
22
22
|
var _usePlatformLeafEventHandler = require("@atlaskit/analytics-next/usePlatformLeafEventHandler");
|
|
23
23
|
|
|
@@ -36,7 +36,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
36
36
|
var analyticsAttributes = {
|
|
37
37
|
componentName: 'tabs',
|
|
38
38
|
packageName: "@atlaskit/tabs",
|
|
39
|
-
packageVersion: "13.
|
|
39
|
+
packageVersion: "13.3.0"
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
var getTabPanelWithContext = function getTabPanelWithContext(_ref) {
|
|
@@ -45,7 +45,7 @@ var getTabPanelWithContext = function getTabPanelWithContext(_ref) {
|
|
|
45
45
|
isSelected = _ref.isSelected,
|
|
46
46
|
tabsId = _ref.tabsId;
|
|
47
47
|
return (// Ensure tabPanel exists in case it has been removed
|
|
48
|
-
tabPanel && (0,
|
|
48
|
+
tabPanel && (0, _react2.jsx)(_context.TabPanelContext.Provider, {
|
|
49
49
|
value: {
|
|
50
50
|
role: 'tabpanel',
|
|
51
51
|
id: "".concat(tabsId, "-").concat(index, "-tab"),
|
|
@@ -125,10 +125,10 @@ var TabsWithMode = function TabsWithMode(props) {
|
|
|
125
125
|
return (0, _styles.getTabsStyles)(mode);
|
|
126
126
|
}, [mode]);
|
|
127
127
|
return (// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
128
|
-
(0,
|
|
128
|
+
(0, _react2.jsx)("div", {
|
|
129
129
|
"data-testid": testId,
|
|
130
130
|
css: tabsStyles
|
|
131
|
-
}, (0,
|
|
131
|
+
}, (0, _react2.jsx)(_context.TabListContext.Provider, {
|
|
132
132
|
value: {
|
|
133
133
|
selected: selected,
|
|
134
134
|
onChange: onChangeAnalytics,
|
|
@@ -149,9 +149,9 @@ var TabsWithMode = function TabsWithMode(props) {
|
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
var Tabs = function Tabs(props) {
|
|
152
|
-
return (0,
|
|
152
|
+
return (0, _react2.jsx)(_components.default.Consumer, null, function (_ref2) {
|
|
153
153
|
var mode = _ref2.mode;
|
|
154
|
-
return (0,
|
|
154
|
+
return (0, _react2.jsx)(TabsWithMode, (0, _extends2.default)({}, props, {
|
|
155
155
|
mode: mode
|
|
156
156
|
}));
|
|
157
157
|
});
|
|
@@ -9,6 +9,8 @@ exports.getTabsStyles = exports.getTabStyles = exports.getTabListStyles = void 0
|
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
|
+
|
|
12
14
|
var _constants = require("@atlaskit/theme/constants");
|
|
13
15
|
|
|
14
16
|
var _colors = require("./colors");
|
|
@@ -51,22 +53,23 @@ var getTabPanelStyles = function getTabPanelStyles(mode) {
|
|
|
51
53
|
};
|
|
52
54
|
|
|
53
55
|
var getTabsStyles = function getTabsStyles(mode) {
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
56
|
+
return (// eslint-disable-next-line @repo/internal/styles/no-exported-styles
|
|
57
|
+
(0, _react.css)({
|
|
58
|
+
display: 'flex',
|
|
59
|
+
maxWidth: '100%',
|
|
60
|
+
minHeight: '0%',
|
|
61
|
+
flexBasis: '100%',
|
|
62
|
+
flexDirection: 'column',
|
|
63
|
+
flexGrow: 1,
|
|
64
|
+
'& [role="tabpanel"]': getTabPanelStyles(mode),
|
|
65
|
+
// The hidden attribute doesn't work on flex elements
|
|
66
|
+
// Change display to be none
|
|
67
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
68
|
+
'& > [hidden]': {
|
|
69
|
+
display: 'none'
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
);
|
|
70
73
|
};
|
|
71
74
|
|
|
72
75
|
exports.getTabsStyles = getTabsStyles;
|
|
@@ -82,19 +85,21 @@ var tabLineStyles = {
|
|
|
82
85
|
};
|
|
83
86
|
|
|
84
87
|
var getTabListStyles = function getTabListStyles(mode) {
|
|
85
|
-
return
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
88
|
+
return (// eslint-disable-next-line @repo/internal/styles/no-exported-styles
|
|
89
|
+
(0, _react.css)({
|
|
90
|
+
display: 'flex',
|
|
91
|
+
margin: 0,
|
|
92
|
+
padding: 0,
|
|
93
|
+
position: 'relative',
|
|
94
|
+
'& [role="tab"]': getTabStyles(mode),
|
|
95
|
+
fontWeight: 500,
|
|
96
|
+
'&::before': _objectSpread(_objectSpread({}, tabLineStyles), {}, {
|
|
97
|
+
height: underlineHeight,
|
|
98
|
+
// This line is not a border so the selected line is visible in high contrast mode
|
|
99
|
+
backgroundColor: (0, _colors.getTabLineColor)(mode).lineColor
|
|
100
|
+
})
|
|
101
|
+
})
|
|
102
|
+
);
|
|
98
103
|
};
|
|
99
104
|
|
|
100
105
|
exports.getTabListStyles = getTabListStyles;
|
package/dist/cjs/version.json
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { Children, createRef, useCallback, useMemo } from 'react';
|
|
5
|
-
import { jsx } from '@emotion/
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
6
6
|
import GlobalTheme from '@atlaskit/theme/components';
|
|
7
7
|
import { useTabList } from '../hooks';
|
|
8
8
|
import { TabContext } from '../internal/context';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { jsx } from '@emotion/
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
5
5
|
import { useTabPanel } from '../hooks';
|
|
6
6
|
|
|
7
7
|
// Note this is not being memoized as children is an unstable reference
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { Children, useCallback, useMemo, useRef, useState } from 'react';
|
|
5
|
-
import { jsx } from '@emotion/
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
6
6
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
|
|
7
7
|
import GlobalTheme from '@atlaskit/theme/components';
|
|
8
8
|
import { TabListContext, TabPanelContext } from '../internal/context';
|
|
@@ -11,7 +11,7 @@ import { onMouseDownBlur } from '../internal/utils';
|
|
|
11
11
|
const analyticsAttributes = {
|
|
12
12
|
componentName: 'tabs',
|
|
13
13
|
packageName: "@atlaskit/tabs",
|
|
14
|
-
packageVersion: "13.
|
|
14
|
+
packageVersion: "13.3.0"
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
const getTabPanelWithContext = ({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
1
2
|
import { borderRadius as getBorderRadius, gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
2
3
|
import { getTabColors, getTabLineColor, getTabPanelFocusColor } from './colors';
|
|
3
4
|
const borderRadius = getBorderRadius();
|
|
@@ -32,18 +33,18 @@ const getTabPanelStyles = mode => ({
|
|
|
32
33
|
...highContrastFocusRing
|
|
33
34
|
});
|
|
34
35
|
|
|
35
|
-
export const getTabsStyles = mode =>
|
|
36
|
+
export const getTabsStyles = mode => // eslint-disable-next-line @repo/internal/styles/no-exported-styles
|
|
37
|
+
css({
|
|
36
38
|
display: 'flex',
|
|
39
|
+
maxWidth: '100%',
|
|
40
|
+
minHeight: '0%',
|
|
37
41
|
flexBasis: '100%',
|
|
38
42
|
flexDirection: 'column',
|
|
39
43
|
flexGrow: 1,
|
|
40
|
-
maxWidth: '100%',
|
|
41
|
-
minHeight: '0%'
|
|
42
|
-
/* Same Firefox bug as above */
|
|
43
|
-
,
|
|
44
44
|
'& [role="tabpanel"]': getTabPanelStyles(mode),
|
|
45
45
|
// The hidden attribute doesn't work on flex elements
|
|
46
46
|
// Change display to be none
|
|
47
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
47
48
|
'& > [hidden]': {
|
|
48
49
|
display: 'none'
|
|
49
50
|
}
|
|
@@ -58,18 +59,19 @@ const tabLineStyles = {
|
|
|
58
59
|
left: tabLeftRightPadding,
|
|
59
60
|
right: tabLeftRightPadding
|
|
60
61
|
};
|
|
61
|
-
export const getTabListStyles = mode =>
|
|
62
|
-
|
|
62
|
+
export const getTabListStyles = mode => // eslint-disable-next-line @repo/internal/styles/no-exported-styles
|
|
63
|
+
css({
|
|
63
64
|
display: 'flex',
|
|
64
|
-
fontWeight: 500,
|
|
65
|
-
padding: 0,
|
|
66
65
|
margin: 0,
|
|
66
|
+
padding: 0,
|
|
67
|
+
position: 'relative',
|
|
68
|
+
'& [role="tab"]': getTabStyles(mode),
|
|
69
|
+
fontWeight: 500,
|
|
67
70
|
'&::before': { ...tabLineStyles,
|
|
71
|
+
height: underlineHeight,
|
|
68
72
|
// This line is not a border so the selected line is visible in high contrast mode
|
|
69
|
-
backgroundColor: getTabLineColor(mode).lineColor
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
'& [role="tab"]': getTabStyles(mode)
|
|
73
|
+
backgroundColor: getTabLineColor(mode).lineColor
|
|
74
|
+
}
|
|
73
75
|
});
|
|
74
76
|
export const getTabStyles = mode => {
|
|
75
77
|
const colors = getTabColors(mode);
|
package/dist/es2019/version.json
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { Children, createRef, useCallback, useMemo } from 'react';
|
|
5
|
-
import { jsx } from '@emotion/
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
6
6
|
import GlobalTheme from '@atlaskit/theme/components';
|
|
7
7
|
import { useTabList } from '../hooks';
|
|
8
8
|
import { TabContext } from '../internal/context';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { jsx } from '@emotion/
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
5
5
|
import { useTabPanel } from '../hooks';
|
|
6
6
|
|
|
7
7
|
// Note this is not being memoized as children is an unstable reference
|
|
@@ -9,7 +9,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
9
9
|
|
|
10
10
|
/** @jsx jsx */
|
|
11
11
|
import { Children, useCallback, useMemo, useRef, useState } from 'react';
|
|
12
|
-
import { jsx } from '@emotion/
|
|
12
|
+
import { jsx } from '@emotion/react';
|
|
13
13
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
|
|
14
14
|
import GlobalTheme from '@atlaskit/theme/components';
|
|
15
15
|
import { TabListContext, TabPanelContext } from '../internal/context';
|
|
@@ -18,7 +18,7 @@ import { onMouseDownBlur } from '../internal/utils';
|
|
|
18
18
|
var analyticsAttributes = {
|
|
19
19
|
componentName: 'tabs',
|
|
20
20
|
packageName: "@atlaskit/tabs",
|
|
21
|
-
packageVersion: "13.
|
|
21
|
+
packageVersion: "13.3.0"
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
var getTabPanelWithContext = function getTabPanelWithContext(_ref) {
|
|
@@ -4,6 +4,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
4
4
|
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
|
|
7
|
+
import { css } from '@emotion/react';
|
|
7
8
|
import { borderRadius as getBorderRadius, gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
8
9
|
import { getTabColors, getTabLineColor, getTabPanelFocusColor } from './colors';
|
|
9
10
|
var borderRadius = getBorderRadius();
|
|
@@ -40,22 +41,23 @@ var getTabPanelStyles = function getTabPanelStyles(mode) {
|
|
|
40
41
|
};
|
|
41
42
|
|
|
42
43
|
export var getTabsStyles = function getTabsStyles(mode) {
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
44
|
+
return (// eslint-disable-next-line @repo/internal/styles/no-exported-styles
|
|
45
|
+
css({
|
|
46
|
+
display: 'flex',
|
|
47
|
+
maxWidth: '100%',
|
|
48
|
+
minHeight: '0%',
|
|
49
|
+
flexBasis: '100%',
|
|
50
|
+
flexDirection: 'column',
|
|
51
|
+
flexGrow: 1,
|
|
52
|
+
'& [role="tabpanel"]': getTabPanelStyles(mode),
|
|
53
|
+
// The hidden attribute doesn't work on flex elements
|
|
54
|
+
// Change display to be none
|
|
55
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
56
|
+
'& > [hidden]': {
|
|
57
|
+
display: 'none'
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
);
|
|
59
61
|
};
|
|
60
62
|
var tabLineStyles = {
|
|
61
63
|
content: '""',
|
|
@@ -68,19 +70,21 @@ var tabLineStyles = {
|
|
|
68
70
|
right: tabLeftRightPadding
|
|
69
71
|
};
|
|
70
72
|
export var getTabListStyles = function getTabListStyles(mode) {
|
|
71
|
-
return
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
73
|
+
return (// eslint-disable-next-line @repo/internal/styles/no-exported-styles
|
|
74
|
+
css({
|
|
75
|
+
display: 'flex',
|
|
76
|
+
margin: 0,
|
|
77
|
+
padding: 0,
|
|
78
|
+
position: 'relative',
|
|
79
|
+
'& [role="tab"]': getTabStyles(mode),
|
|
80
|
+
fontWeight: 500,
|
|
81
|
+
'&::before': _objectSpread(_objectSpread({}, tabLineStyles), {}, {
|
|
82
|
+
height: underlineHeight,
|
|
83
|
+
// This line is not a border so the selected line is visible in high contrast mode
|
|
84
|
+
backgroundColor: getTabLineColor(mode).lineColor
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
);
|
|
84
88
|
};
|
|
85
89
|
export var getTabStyles = function getTabStyles(mode) {
|
|
86
90
|
var colors = getTabColors(mode);
|
package/dist/esm/version.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
2
|
import { TabListProps } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* __TabList__
|
|
@@ -9,5 +9,5 @@ import { TabListProps } from '../types';
|
|
|
9
9
|
* - [Code](https://atlassian.design/components/tabs/code)
|
|
10
10
|
* - [Usage](https://atlassian.design/components/tabs/usage)
|
|
11
11
|
*/
|
|
12
|
-
export declare const TabList: (props: TabListProps) => JSX.Element;
|
|
12
|
+
export declare const TabList: (props: TabListProps) => jsx.JSX.Element;
|
|
13
13
|
export default TabList;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
2
3
|
import { TabPanelProps } from '../types';
|
|
3
4
|
/**
|
|
4
5
|
* __TabPanel__
|
|
@@ -9,5 +10,5 @@ import { TabPanelProps } from '../types';
|
|
|
9
10
|
* - [Code](https://atlassian.design/components/tabs/code)
|
|
10
11
|
* - [Usage](https://atlassian.design/components/tabs/usage)
|
|
11
12
|
*/
|
|
12
|
-
declare const TabPanel: ({ children, testId }: TabPanelProps) => JSX.Element;
|
|
13
|
+
declare const TabPanel: ({ children, testId }: TabPanelProps) => jsx.JSX.Element;
|
|
13
14
|
export default TabPanel;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
2
3
|
import { TabProps } from '../types';
|
|
3
4
|
/**
|
|
4
5
|
* __Tab__
|
|
@@ -9,4 +10,4 @@ import { TabProps } from '../types';
|
|
|
9
10
|
* - [Code](https://atlassian.design/components/tabs/code)
|
|
10
11
|
* - [Usage](https://atlassian.design/components/tabs/usage)
|
|
11
12
|
*/
|
|
12
|
-
export default function Tab({ children, testId }: TabProps): JSX.Element;
|
|
13
|
+
export default function Tab({ children, testId }: TabProps): jsx.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
2
|
import { TabsProps } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* __Tabs__
|
|
@@ -9,5 +9,5 @@ import { TabsProps } from '../types';
|
|
|
9
9
|
* - [Code](https://atlassian.design/components/tabs/code)
|
|
10
10
|
* - [Usage](https://atlassian.design/components/tabs/usage)
|
|
11
11
|
*/
|
|
12
|
-
export declare const Tabs: (props: TabsProps) => JSX.Element;
|
|
12
|
+
export declare const Tabs: (props: TabsProps) => jsx.JSX.Element;
|
|
13
13
|
export default Tabs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CSSObject } from '@emotion/
|
|
1
|
+
import { CSSObject, SerializedStyles } from '@emotion/react';
|
|
2
2
|
import { ThemeModes } from '@atlaskit/theme/types';
|
|
3
|
-
export declare const getTabsStyles: (mode: ThemeModes) =>
|
|
4
|
-
export declare const getTabListStyles: (mode: ThemeModes) =>
|
|
3
|
+
export declare const getTabsStyles: (mode: ThemeModes) => SerializedStyles;
|
|
4
|
+
export declare const getTabListStyles: (mode: ThemeModes) => SerializedStyles;
|
|
5
5
|
export declare const getTabStyles: (mode: ThemeModes) => CSSObject;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tabs",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.3.0",
|
|
4
4
|
"description": "Tabs are used to organize content by grouping similar information on the same page.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
27
27
|
"@atlaskit/codemod-utils": "^4.1.0",
|
|
28
|
-
"@atlaskit/theme": "^12.
|
|
28
|
+
"@atlaskit/theme": "^12.2.0",
|
|
29
29
|
"@atlaskit/tokens": "^0.10.0",
|
|
30
30
|
"@babel/runtime": "^7.0.0",
|
|
31
|
-
"@emotion/
|
|
31
|
+
"@emotion/react": "^11.7.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "^16.8.0"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/button": "^16.3.0",
|
|
38
38
|
"@atlaskit/docs": "*",
|
|
39
39
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
40
|
-
"@atlaskit/section-message": "^6.
|
|
40
|
+
"@atlaskit/section-message": "^6.2.0",
|
|
41
41
|
"@atlaskit/spinner": "^15.1.0",
|
|
42
42
|
"@atlaskit/ssr": "*",
|
|
43
43
|
"@atlaskit/tooltip": "^17.5.0",
|