@atlaskit/tabs 16.4.2 → 16.5.1

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/tabs
2
2
 
3
+ ## 16.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 16.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#149420](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/149420)
14
+ [`e775dd3c93d14`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e775dd3c93d14) -
15
+ Added ref forwarding to Tab component
16
+
3
17
  ## 16.4.2
4
18
 
5
19
  ### Patch Changes
@@ -4,8 +4,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = Tab;
8
- var _react = require("@emotion/react");
7
+ exports.default = void 0;
8
+ var _react = require("react");
9
+ var _react2 = require("@emotion/react");
9
10
  var _focusRing = _interopRequireDefault(require("@atlaskit/focus-ring"));
10
11
  var _primitives = require("@atlaskit/primitives");
11
12
  var _hooks = require("../hooks");
@@ -13,6 +14,7 @@ var _hooks = require("../hooks");
13
14
  * @jsxRuntime classic
14
15
  * @jsx jsx
15
16
  */
17
+
16
18
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
17
19
 
18
20
  /**
@@ -24,7 +26,7 @@ var _hooks = require("../hooks");
24
26
  * - [Code](https://atlassian.design/components/tabs/code)
25
27
  * - [Usage](https://atlassian.design/components/tabs/usage)
26
28
  */
27
- function Tab(_ref) {
29
+ var Tab = /*#__PURE__*/(0, _react.forwardRef)(function Tab(_ref, ref) {
28
30
  var children = _ref.children,
29
31
  testId = _ref.testId;
30
32
  var _useTab = (0, _hooks.useTab)(),
@@ -37,9 +39,9 @@ function Tab(_ref) {
37
39
  onKeyDown = _useTab.onKeyDown,
38
40
  role = _useTab.role,
39
41
  tabIndex = _useTab.tabIndex;
40
- return (0, _react.jsx)(_focusRing.default, {
42
+ return (0, _react2.jsx)(_focusRing.default, {
41
43
  isInset: true
42
- }, (0, _react.jsx)("div", {
44
+ }, (0, _react2.jsx)("div", {
43
45
  "data-testid": testId,
44
46
  onClick: onClick,
45
47
  id: id,
@@ -49,10 +51,12 @@ function Tab(_ref) {
49
51
  "aria-setsize": ariaSetsize,
50
52
  onKeyDown: onKeyDown,
51
53
  role: role,
52
- tabIndex: tabIndex
53
- }, (0, _react.jsx)(_primitives.Text, {
54
+ tabIndex: tabIndex,
55
+ ref: ref
56
+ }, (0, _react2.jsx)(_primitives.Text, {
54
57
  weight: "medium",
55
58
  color: "inherit",
56
59
  maxLines: 1
57
60
  }, children)));
58
- }
61
+ });
62
+ var _default = exports.default = Tab;
@@ -32,7 +32,7 @@ var tabsStyles = (0, _styles.getTabsStyles)();
32
32
  var analyticsAttributes = {
33
33
  componentName: 'tabs',
34
34
  packageName: "@atlaskit/tabs",
35
- packageVersion: "16.4.2"
35
+ packageVersion: "16.5.1"
36
36
  };
37
37
  var getTabPanelWithContext = function getTabPanelWithContext(_ref) {
38
38
  var tabPanel = _ref.tabPanel,
@@ -2,6 +2,8 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
+ import { forwardRef } from 'react';
6
+
5
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
8
  import { jsx } from '@emotion/react';
7
9
  import FocusRing from '@atlaskit/focus-ring';
@@ -16,10 +18,10 @@ import { useTab } from '../hooks';
16
18
  * - [Code](https://atlassian.design/components/tabs/code)
17
19
  * - [Usage](https://atlassian.design/components/tabs/usage)
18
20
  */
19
- export default function Tab({
21
+ const Tab = /*#__PURE__*/forwardRef(function Tab({
20
22
  children,
21
23
  testId
22
- }) {
24
+ }, ref) {
23
25
  const {
24
26
  onClick,
25
27
  id,
@@ -43,10 +45,12 @@ export default function Tab({
43
45
  "aria-setsize": ariaSetsize,
44
46
  onKeyDown: onKeyDown,
45
47
  role: role,
46
- tabIndex: tabIndex
48
+ tabIndex: tabIndex,
49
+ ref: ref
47
50
  }, jsx(Text, {
48
51
  weight: "medium",
49
52
  color: "inherit",
50
53
  maxLines: 1
51
54
  }, children)));
52
- }
55
+ });
56
+ export default Tab;
@@ -23,7 +23,7 @@ const tabsStyles = getTabsStyles();
23
23
  const analyticsAttributes = {
24
24
  componentName: 'tabs',
25
25
  packageName: "@atlaskit/tabs",
26
- packageVersion: "16.4.2"
26
+ packageVersion: "16.5.1"
27
27
  };
28
28
  const getTabPanelWithContext = ({
29
29
  tabPanel,
@@ -2,6 +2,8 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
+ import { forwardRef } from 'react';
6
+
5
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
8
  import { jsx } from '@emotion/react';
7
9
  import FocusRing from '@atlaskit/focus-ring';
@@ -16,7 +18,7 @@ import { useTab } from '../hooks';
16
18
  * - [Code](https://atlassian.design/components/tabs/code)
17
19
  * - [Usage](https://atlassian.design/components/tabs/usage)
18
20
  */
19
- export default function Tab(_ref) {
21
+ var Tab = /*#__PURE__*/forwardRef(function Tab(_ref, ref) {
20
22
  var children = _ref.children,
21
23
  testId = _ref.testId;
22
24
  var _useTab = useTab(),
@@ -41,10 +43,12 @@ export default function Tab(_ref) {
41
43
  "aria-setsize": ariaSetsize,
42
44
  onKeyDown: onKeyDown,
43
45
  role: role,
44
- tabIndex: tabIndex
46
+ tabIndex: tabIndex,
47
+ ref: ref
45
48
  }, jsx(Text, {
46
49
  weight: "medium",
47
50
  color: "inherit",
48
51
  maxLines: 1
49
52
  }, children)));
50
- }
53
+ });
54
+ export default Tab;
@@ -28,7 +28,7 @@ var tabsStyles = getTabsStyles();
28
28
  var analyticsAttributes = {
29
29
  componentName: 'tabs',
30
30
  packageName: "@atlaskit/tabs",
31
- packageVersion: "16.4.2"
31
+ packageVersion: "16.5.1"
32
32
  };
33
33
  var getTabPanelWithContext = function getTabPanelWithContext(_ref) {
34
34
  var tabPanel = _ref.tabPanel,
@@ -1,8 +1,4 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
6
2
  import { type TabProps } from '../types';
7
3
  /**
8
4
  * __Tab__
@@ -13,4 +9,5 @@ import { type TabProps } from '../types';
13
9
  * - [Code](https://atlassian.design/components/tabs/code)
14
10
  * - [Usage](https://atlassian.design/components/tabs/usage)
15
11
  */
16
- export default function Tab({ children, testId }: TabProps): jsx.JSX.Element;
12
+ declare const Tab: import("react").ForwardRefExoticComponent<TabProps & import("react").RefAttributes<HTMLDivElement>>;
13
+ export default Tab;
@@ -1,8 +1,4 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
6
2
  import { type TabProps } from '../types';
7
3
  /**
8
4
  * __Tab__
@@ -13,4 +9,5 @@ import { type TabProps } from '../types';
13
9
  * - [Code](https://atlassian.design/components/tabs/code)
14
10
  * - [Usage](https://atlassian.design/components/tabs/usage)
15
11
  */
16
- export default function Tab({ children, testId }: TabProps): jsx.JSX.Element;
12
+ declare const Tab: import("react").ForwardRefExoticComponent<TabProps & import("react").RefAttributes<HTMLDivElement>>;
13
+ export default Tab;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tabs",
3
- "version": "16.4.2",
3
+ "version": "16.5.1",
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/"
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/focus-ring": "^1.6.0",
37
37
  "@atlaskit/platform-feature-flags": "^0.3.0",
38
38
  "@atlaskit/primitives": "^12.2.0",
39
- "@atlaskit/theme": "^13.0.0",
39
+ "@atlaskit/theme": "^14.0.0",
40
40
  "@atlaskit/tokens": "^2.0.0",
41
41
  "@babel/runtime": "^7.0.0",
42
42
  "@emotion/react": "^11.7.1"
@@ -48,9 +48,9 @@
48
48
  "@af/accessibility-testing": "*",
49
49
  "@af/integration-testing": "*",
50
50
  "@af/visual-regression": "*",
51
- "@atlaskit/ds-lib": "^2.6.0",
51
+ "@atlaskit/ds-lib": "^3.1.0",
52
52
  "@atlaskit/ssr": "*",
53
- "@atlaskit/tooltip": "^18.7.0",
53
+ "@atlaskit/tooltip": "^18.8.0",
54
54
  "@atlaskit/visual-regression": "*",
55
55
  "@testing-library/react": "^12.1.5",
56
56
  "jscodeshift": "^0.13.0",