@atlaskit/page-header 10.3.2 → 10.3.3

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,11 @@
1
1
  # @atlaskit/page-header
2
2
 
3
+ ## 10.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`74c1b81a476`](https://bitbucket.org/atlassian/atlassian-frontend/commits/74c1b81a476) - Replaces use of `gridSize` with space tokens. There is no expected visual change.
8
+
3
9
  ## 10.3.2
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -10,4 +10,4 @@ yarn add @atlaskit/page-header
10
10
 
11
11
  ## Usage
12
12
 
13
- Detailed docs and example usage can be found [here](https://atlaskit.atlassian.com/packages/core/page-header).
13
+ Detailed docs and example usage can be found [here](https://atlassian.design/components/page-header).
@@ -1,20 +1,15 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _styled = require("./styled");
13
-
14
10
  // TODO: Remove this eslint-disable when prop names have been renamed.
15
11
  // This rule is here as prop name changes are a major as they are used
16
12
  // by our consumers. This can be done in the next lite-mode conversion.
17
-
18
13
  /* eslint-disable @repo/internal/react/boolean-prop-naming-convention */
19
14
 
20
15
  /**
@@ -29,15 +24,15 @@ var _styled = require("./styled");
29
24
  */
30
25
  var PageHeader = function PageHeader(_ref) {
31
26
  var innerRef = _ref.innerRef,
32
- breadcrumbs = _ref.breadcrumbs,
33
- actions = _ref.actions,
34
- bottomBar = _ref.bottomBar,
35
- children = _ref.children,
36
- id = _ref.id,
37
- _ref$disableTitleStyl = _ref.disableTitleStyles,
38
- disableTitleStyles = _ref$disableTitleStyl === void 0 ? false : _ref$disableTitleStyl,
39
- _ref$truncateTitle = _ref.truncateTitle,
40
- truncateTitle = _ref$truncateTitle === void 0 ? false : _ref$truncateTitle;
27
+ breadcrumbs = _ref.breadcrumbs,
28
+ actions = _ref.actions,
29
+ bottomBar = _ref.bottomBar,
30
+ children = _ref.children,
31
+ id = _ref.id,
32
+ _ref$disableTitleStyl = _ref.disableTitleStyles,
33
+ disableTitleStyles = _ref$disableTitleStyl === void 0 ? false : _ref$disableTitleStyl,
34
+ _ref$truncateTitle = _ref.truncateTitle,
35
+ truncateTitle = _ref$truncateTitle === void 0 ? false : _ref$truncateTitle;
41
36
  return /*#__PURE__*/_react.default.createElement(_styled.OuterWrapper, null, breadcrumbs, /*#__PURE__*/_react.default.createElement(_styled.TitleWrapper, {
42
37
  truncateTitle: truncateTitle
43
38
  }, /*#__PURE__*/_react.default.createElement(_styled.TitleContainer, {
@@ -48,6 +43,5 @@ var PageHeader = function PageHeader(_ref) {
48
43
  id: id
49
44
  }, children)), actions && /*#__PURE__*/_react.default.createElement(_styled.ActionsWrapper, null, actions)), bottomBar && /*#__PURE__*/_react.default.createElement(_styled.BottomBarWrapper, null, " ", bottomBar, " "));
50
45
  };
51
-
52
46
  var _default = PageHeader;
53
47
  exports.default = _default;
@@ -1,40 +1,31 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.TitleWrapper = exports.TitleContainer = exports.StyledTitleWrapper = exports.OuterWrapper = exports.BottomBarWrapper = exports.ActionsWrapper = void 0;
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _react2 = require("@emotion/react");
13
-
14
- var _constants = require("@atlaskit/theme/constants");
15
-
16
10
  var _typography = require("@atlaskit/theme/typography");
17
-
18
11
  // TODO: Remove this eslint-disable when prop names have been renamed.
19
12
  // This rule is here as prop name changes are a major as they are used
20
13
  // by our consumers. The prop name concerned here is truncateTitle.
21
14
  // This can be done in the next lite-mode conversion.
22
-
23
15
  /* eslint-disable @repo/internal/react/boolean-prop-naming-convention */
24
-
25
16
  /** @jsx jsx */
26
- var gridSize = (0, _constants.gridSize)();
17
+
27
18
  var truncateStyles = (0, _react2.css)({
28
19
  overflowX: 'hidden',
29
20
  textOverflow: 'ellipsis',
30
21
  whiteSpace: 'nowrap'
31
22
  });
32
23
  var outerStyles = (0, _react2.css)({
33
- margin: "".concat(gridSize * 3, "px 0 ").concat(gridSize * 2, "px 0")
24
+ margin: "var(--ds-space-300, 24px)".concat(" 0 ", "var(--ds-space-200, 16px)", " 0")
34
25
  });
35
26
  var styledTitleStyles = (0, _react2.css)({
36
27
  marginTop: 0,
37
- lineHeight: "".concat(gridSize * 4, "px"),
28
+ lineHeight: "var(--ds-font-lineHeight-500, 32px)",
38
29
  outline: 'none'
39
30
  });
40
31
  var titleWrapperStyles = (0, _react2.css)({
@@ -48,15 +39,15 @@ var titleWrapperTruncateStyles = (0, _react2.css)({
48
39
  var titleContainerStyles = (0, _react2.css)({
49
40
  minWidth: 0,
50
41
  maxWidth: '100%',
51
- marginBottom: "".concat(gridSize, "px"),
42
+ marginBottom: "var(--ds-space-100, 8px)",
52
43
  flex: '1 0 auto',
53
44
  flexShrink: undefined
54
45
  });
55
46
  var actionStyles = (0, _react2.css)({
56
47
  maxWidth: '100%',
57
- marginBottom: "".concat(gridSize, "px"),
48
+ marginBottom: "var(--ds-space-100, 8px)",
58
49
  marginLeft: 'auto',
59
- paddingLeft: "".concat(gridSize * 4, "px"),
50
+ paddingLeft: "var(--ds-space-400, 32px)",
60
51
  flex: '0 0 auto',
61
52
  whiteSpace: 'nowrap',
62
53
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
@@ -68,8 +59,9 @@ var titleContainerTruncateStyles = (0, _react2.css)({
68
59
  flexShrink: 1
69
60
  });
70
61
  var bottomBarStyles = (0, _react2.css)({
71
- marginTop: "".concat(gridSize * 2, "px")
62
+ marginTop: "var(--ds-space-200, 16px)"
72
63
  });
64
+
73
65
  /**
74
66
  * __Outer wrapper__
75
67
  *
@@ -77,18 +69,16 @@ var bottomBarStyles = (0, _react2.css)({
77
69
  * the BottomBar and its Breadcrumbs.
78
70
  *
79
71
  */
80
-
81
72
  var OuterWrapper = function OuterWrapper(_ref) {
82
73
  var children = _ref.children;
83
74
  return (0, _react2.jsx)("div", {
84
75
  css: outerStyles
85
76
  }, children);
86
- }; // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
87
-
77
+ };
88
78
 
79
+ // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
89
80
  exports.OuterWrapper = OuterWrapper;
90
81
  var h700Styles = (0, _react2.css)((0, _typography.h700)());
91
-
92
82
  /**
93
83
  * __Styled title wrapper__
94
84
  *
@@ -97,8 +87,8 @@ var h700Styles = (0, _react2.css)((0, _typography.h700)());
97
87
  */
98
88
  var StyledTitleWrapper = /*#__PURE__*/_react.default.forwardRef(function (_ref2, ref) {
99
89
  var children = _ref2.children,
100
- id = _ref2.id,
101
- truncateTitle = _ref2.truncateTitle;
90
+ id = _ref2.id,
91
+ truncateTitle = _ref2.truncateTitle;
102
92
  return (0, _react2.jsx)("h1", {
103
93
  css: [h700Styles, styledTitleStyles, truncateTitle && truncateStyles],
104
94
  ref: ref,
@@ -106,9 +96,7 @@ var StyledTitleWrapper = /*#__PURE__*/_react.default.forwardRef(function (_ref2,
106
96
  id: id
107
97
  }, children);
108
98
  });
109
-
110
99
  exports.StyledTitleWrapper = StyledTitleWrapper;
111
-
112
100
  /**
113
101
  * __Title wrapper__
114
102
  *
@@ -117,59 +105,52 @@ exports.StyledTitleWrapper = StyledTitleWrapper;
117
105
  */
118
106
  var TitleWrapper = function TitleWrapper(_ref3) {
119
107
  var children = _ref3.children,
120
- truncateTitle = _ref3.truncateTitle;
108
+ truncateTitle = _ref3.truncateTitle;
121
109
  return (0, _react2.jsx)("div", {
122
110
  css: [titleWrapperStyles, truncateTitle && titleWrapperTruncateStyles]
123
111
  }, children);
124
112
  };
113
+
125
114
  /**
126
115
  * Title container
127
116
  *
128
117
  * A title container is a container that wraps around the title and its styles (if applied).
129
118
  *
130
119
  */
131
-
132
-
133
120
  exports.TitleWrapper = TitleWrapper;
134
-
135
121
  var TitleContainer = function TitleContainer(_ref4) {
136
122
  var children = _ref4.children,
137
- truncateTitle = _ref4.truncateTitle;
123
+ truncateTitle = _ref4.truncateTitle;
138
124
  return (0, _react2.jsx)("div", {
139
125
  css: [titleContainerStyles, truncateTitle && titleContainerTruncateStyles]
140
126
  }, children);
141
127
  };
128
+
142
129
  /**
143
130
  * __Actions wrapper__
144
131
  *
145
132
  * An actions wrapper is a wrapper for the actions, which appear on the top right of the PageHeader component.
146
133
  *
147
134
  */
148
-
149
-
150
135
  exports.TitleContainer = TitleContainer;
151
-
152
136
  var ActionsWrapper = function ActionsWrapper(_ref5) {
153
137
  var children = _ref5.children;
154
138
  return (0, _react2.jsx)("div", {
155
139
  css: actionStyles
156
140
  }, children);
157
141
  };
142
+
158
143
  /**
159
144
  * __Bottom bar wrapper__
160
145
  *
161
146
  * A bottom bar wrapper is a wrapper for the bottom bar, which appears at the bottom of the PageHeader component.
162
147
  *
163
148
  */
164
-
165
-
166
149
  exports.ActionsWrapper = ActionsWrapper;
167
-
168
150
  var BottomBarWrapper = function BottomBarWrapper(_ref6) {
169
151
  var children = _ref6.children;
170
152
  return (0, _react2.jsx)("div", {
171
153
  css: bottomBarStyles
172
154
  }, children);
173
155
  };
174
-
175
156
  exports.BottomBarWrapper = BottomBarWrapper;
package/dist/cjs/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -11,5 +10,4 @@ Object.defineProperty(exports, "default", {
11
10
  return _PageHeader.default;
12
11
  }
13
12
  });
14
-
15
13
  var _PageHeader = _interopRequireDefault(require("./PageHeader"));
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/page-header",
3
- "version": "10.3.2",
3
+ "version": "10.3.3",
4
4
  "sideEffects": false
5
5
  }
@@ -1,11 +1,9 @@
1
1
  // TODO: Remove this eslint-disable when prop names have been renamed.
2
2
  // This rule is here as prop name changes are a major as they are used
3
3
  // by our consumers. This can be done in the next lite-mode conversion.
4
-
5
4
  /* eslint-disable @repo/internal/react/boolean-prop-naming-convention */
6
5
  import React from 'react';
7
6
  import { ActionsWrapper, BottomBarWrapper, OuterWrapper, StyledTitleWrapper, TitleContainer, TitleWrapper } from './styled';
8
-
9
7
  /**
10
8
  * __Page header__
11
9
  *
@@ -36,5 +34,4 @@ const PageHeader = ({
36
34
  id: id
37
35
  }, children)), actions && /*#__PURE__*/React.createElement(ActionsWrapper, null, actions)), bottomBar && /*#__PURE__*/React.createElement(BottomBarWrapper, null, " ", bottomBar, " "));
38
36
  };
39
-
40
37
  export default PageHeader;
@@ -2,26 +2,23 @@
2
2
  // This rule is here as prop name changes are a major as they are used
3
3
  // by our consumers. The prop name concerned here is truncateTitle.
4
4
  // This can be done in the next lite-mode conversion.
5
-
6
5
  /* eslint-disable @repo/internal/react/boolean-prop-naming-convention */
7
-
8
6
  /** @jsx jsx */
7
+
9
8
  import React from 'react';
10
9
  import { css, jsx } from '@emotion/react';
11
- import { gridSize as getGridSize } from '@atlaskit/theme/constants';
12
10
  import { h700 } from '@atlaskit/theme/typography';
13
- const gridSize = getGridSize();
14
11
  const truncateStyles = css({
15
12
  overflowX: 'hidden',
16
13
  textOverflow: 'ellipsis',
17
14
  whiteSpace: 'nowrap'
18
15
  });
19
16
  const outerStyles = css({
20
- margin: `${gridSize * 3}px 0 ${gridSize * 2}px 0`
17
+ margin: `${"var(--ds-space-300, 24px)"} 0 ${"var(--ds-space-200, 16px)"} 0`
21
18
  });
22
19
  const styledTitleStyles = css({
23
20
  marginTop: 0,
24
- lineHeight: `${gridSize * 4}px`,
21
+ lineHeight: "var(--ds-font-lineHeight-500, 32px)",
25
22
  outline: 'none'
26
23
  });
27
24
  const titleWrapperStyles = css({
@@ -35,15 +32,15 @@ const titleWrapperTruncateStyles = css({
35
32
  const titleContainerStyles = css({
36
33
  minWidth: 0,
37
34
  maxWidth: '100%',
38
- marginBottom: `${gridSize}px`,
35
+ marginBottom: "var(--ds-space-100, 8px)",
39
36
  flex: '1 0 auto',
40
37
  flexShrink: undefined
41
38
  });
42
39
  const actionStyles = css({
43
40
  maxWidth: '100%',
44
- marginBottom: `${gridSize}px`,
41
+ marginBottom: "var(--ds-space-100, 8px)",
45
42
  marginLeft: 'auto',
46
- paddingLeft: `${gridSize * 4}px`,
43
+ paddingLeft: "var(--ds-space-400, 32px)",
47
44
  flex: '0 0 auto',
48
45
  whiteSpace: 'nowrap',
49
46
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
@@ -55,8 +52,9 @@ const titleContainerTruncateStyles = css({
55
52
  flexShrink: 1
56
53
  });
57
54
  const bottomBarStyles = css({
58
- marginTop: `${gridSize * 2}px`
55
+ marginTop: "var(--ds-space-200, 16px)"
59
56
  });
57
+
60
58
  /**
61
59
  * __Outer wrapper__
62
60
  *
@@ -64,17 +62,16 @@ const bottomBarStyles = css({
64
62
  * the BottomBar and its Breadcrumbs.
65
63
  *
66
64
  */
67
-
68
65
  export const OuterWrapper = ({
69
66
  children
70
67
  }) => {
71
68
  return jsx("div", {
72
69
  css: outerStyles
73
70
  }, children);
74
- }; // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
71
+ };
75
72
 
73
+ // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
76
74
  const h700Styles = css(h700());
77
-
78
75
  /**
79
76
  * __Styled title wrapper__
80
77
  *
@@ -93,7 +90,6 @@ export const StyledTitleWrapper = /*#__PURE__*/React.forwardRef(({
93
90
  id: id
94
91
  }, children);
95
92
  });
96
-
97
93
  /**
98
94
  * __Title wrapper__
99
95
  *
@@ -108,13 +104,13 @@ export const TitleWrapper = ({
108
104
  css: [titleWrapperStyles, truncateTitle && titleWrapperTruncateStyles]
109
105
  }, children);
110
106
  };
107
+
111
108
  /**
112
109
  * Title container
113
110
  *
114
111
  * A title container is a container that wraps around the title and its styles (if applied).
115
112
  *
116
113
  */
117
-
118
114
  export const TitleContainer = ({
119
115
  children,
120
116
  truncateTitle
@@ -123,13 +119,13 @@ export const TitleContainer = ({
123
119
  css: [titleContainerStyles, truncateTitle && titleContainerTruncateStyles]
124
120
  }, children);
125
121
  };
122
+
126
123
  /**
127
124
  * __Actions wrapper__
128
125
  *
129
126
  * An actions wrapper is a wrapper for the actions, which appear on the top right of the PageHeader component.
130
127
  *
131
128
  */
132
-
133
129
  export const ActionsWrapper = ({
134
130
  children
135
131
  }) => {
@@ -137,13 +133,13 @@ export const ActionsWrapper = ({
137
133
  css: actionStyles
138
134
  }, children);
139
135
  };
136
+
140
137
  /**
141
138
  * __Bottom bar wrapper__
142
139
  *
143
140
  * A bottom bar wrapper is a wrapper for the bottom bar, which appears at the bottom of the PageHeader component.
144
141
  *
145
142
  */
146
-
147
143
  export const BottomBarWrapper = ({
148
144
  children
149
145
  }) => {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/page-header",
3
- "version": "10.3.2",
3
+ "version": "10.3.3",
4
4
  "sideEffects": false
5
5
  }
@@ -1,11 +1,9 @@
1
1
  // TODO: Remove this eslint-disable when prop names have been renamed.
2
2
  // This rule is here as prop name changes are a major as they are used
3
3
  // by our consumers. This can be done in the next lite-mode conversion.
4
-
5
4
  /* eslint-disable @repo/internal/react/boolean-prop-naming-convention */
6
5
  import React from 'react';
7
6
  import { ActionsWrapper, BottomBarWrapper, OuterWrapper, StyledTitleWrapper, TitleContainer, TitleWrapper } from './styled';
8
-
9
7
  /**
10
8
  * __Page header__
11
9
  *
@@ -18,15 +16,15 @@ import { ActionsWrapper, BottomBarWrapper, OuterWrapper, StyledTitleWrapper, Tit
18
16
  */
19
17
  var PageHeader = function PageHeader(_ref) {
20
18
  var innerRef = _ref.innerRef,
21
- breadcrumbs = _ref.breadcrumbs,
22
- actions = _ref.actions,
23
- bottomBar = _ref.bottomBar,
24
- children = _ref.children,
25
- id = _ref.id,
26
- _ref$disableTitleStyl = _ref.disableTitleStyles,
27
- disableTitleStyles = _ref$disableTitleStyl === void 0 ? false : _ref$disableTitleStyl,
28
- _ref$truncateTitle = _ref.truncateTitle,
29
- truncateTitle = _ref$truncateTitle === void 0 ? false : _ref$truncateTitle;
19
+ breadcrumbs = _ref.breadcrumbs,
20
+ actions = _ref.actions,
21
+ bottomBar = _ref.bottomBar,
22
+ children = _ref.children,
23
+ id = _ref.id,
24
+ _ref$disableTitleStyl = _ref.disableTitleStyles,
25
+ disableTitleStyles = _ref$disableTitleStyl === void 0 ? false : _ref$disableTitleStyl,
26
+ _ref$truncateTitle = _ref.truncateTitle,
27
+ truncateTitle = _ref$truncateTitle === void 0 ? false : _ref$truncateTitle;
30
28
  return /*#__PURE__*/React.createElement(OuterWrapper, null, breadcrumbs, /*#__PURE__*/React.createElement(TitleWrapper, {
31
29
  truncateTitle: truncateTitle
32
30
  }, /*#__PURE__*/React.createElement(TitleContainer, {
@@ -37,5 +35,4 @@ var PageHeader = function PageHeader(_ref) {
37
35
  id: id
38
36
  }, children)), actions && /*#__PURE__*/React.createElement(ActionsWrapper, null, actions)), bottomBar && /*#__PURE__*/React.createElement(BottomBarWrapper, null, " ", bottomBar, " "));
39
37
  };
40
-
41
38
  export default PageHeader;
@@ -2,26 +2,23 @@
2
2
  // This rule is here as prop name changes are a major as they are used
3
3
  // by our consumers. The prop name concerned here is truncateTitle.
4
4
  // This can be done in the next lite-mode conversion.
5
-
6
5
  /* eslint-disable @repo/internal/react/boolean-prop-naming-convention */
7
-
8
6
  /** @jsx jsx */
7
+
9
8
  import React from 'react';
10
9
  import { css, jsx } from '@emotion/react';
11
- import { gridSize as getGridSize } from '@atlaskit/theme/constants';
12
10
  import { h700 } from '@atlaskit/theme/typography';
13
- var gridSize = getGridSize();
14
11
  var truncateStyles = css({
15
12
  overflowX: 'hidden',
16
13
  textOverflow: 'ellipsis',
17
14
  whiteSpace: 'nowrap'
18
15
  });
19
16
  var outerStyles = css({
20
- margin: "".concat(gridSize * 3, "px 0 ").concat(gridSize * 2, "px 0")
17
+ margin: "var(--ds-space-300, 24px)".concat(" 0 ", "var(--ds-space-200, 16px)", " 0")
21
18
  });
22
19
  var styledTitleStyles = css({
23
20
  marginTop: 0,
24
- lineHeight: "".concat(gridSize * 4, "px"),
21
+ lineHeight: "var(--ds-font-lineHeight-500, 32px)",
25
22
  outline: 'none'
26
23
  });
27
24
  var titleWrapperStyles = css({
@@ -35,15 +32,15 @@ var titleWrapperTruncateStyles = css({
35
32
  var titleContainerStyles = css({
36
33
  minWidth: 0,
37
34
  maxWidth: '100%',
38
- marginBottom: "".concat(gridSize, "px"),
35
+ marginBottom: "var(--ds-space-100, 8px)",
39
36
  flex: '1 0 auto',
40
37
  flexShrink: undefined
41
38
  });
42
39
  var actionStyles = css({
43
40
  maxWidth: '100%',
44
- marginBottom: "".concat(gridSize, "px"),
41
+ marginBottom: "var(--ds-space-100, 8px)",
45
42
  marginLeft: 'auto',
46
- paddingLeft: "".concat(gridSize * 4, "px"),
43
+ paddingLeft: "var(--ds-space-400, 32px)",
47
44
  flex: '0 0 auto',
48
45
  whiteSpace: 'nowrap',
49
46
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
@@ -55,8 +52,9 @@ var titleContainerTruncateStyles = css({
55
52
  flexShrink: 1
56
53
  });
57
54
  var bottomBarStyles = css({
58
- marginTop: "".concat(gridSize * 2, "px")
55
+ marginTop: "var(--ds-space-200, 16px)"
59
56
  });
57
+
60
58
  /**
61
59
  * __Outer wrapper__
62
60
  *
@@ -64,16 +62,15 @@ var bottomBarStyles = css({
64
62
  * the BottomBar and its Breadcrumbs.
65
63
  *
66
64
  */
67
-
68
65
  export var OuterWrapper = function OuterWrapper(_ref) {
69
66
  var children = _ref.children;
70
67
  return jsx("div", {
71
68
  css: outerStyles
72
69
  }, children);
73
- }; // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
70
+ };
74
71
 
72
+ // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
75
73
  var h700Styles = css(h700());
76
-
77
74
  /**
78
75
  * __Styled title wrapper__
79
76
  *
@@ -82,8 +79,8 @@ var h700Styles = css(h700());
82
79
  */
83
80
  export var StyledTitleWrapper = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
84
81
  var children = _ref2.children,
85
- id = _ref2.id,
86
- truncateTitle = _ref2.truncateTitle;
82
+ id = _ref2.id,
83
+ truncateTitle = _ref2.truncateTitle;
87
84
  return jsx("h1", {
88
85
  css: [h700Styles, styledTitleStyles, truncateTitle && truncateStyles],
89
86
  ref: ref,
@@ -91,7 +88,6 @@ export var StyledTitleWrapper = /*#__PURE__*/React.forwardRef(function (_ref2, r
91
88
  id: id
92
89
  }, children);
93
90
  });
94
-
95
91
  /**
96
92
  * __Title wrapper__
97
93
  *
@@ -100,45 +96,45 @@ export var StyledTitleWrapper = /*#__PURE__*/React.forwardRef(function (_ref2, r
100
96
  */
101
97
  export var TitleWrapper = function TitleWrapper(_ref3) {
102
98
  var children = _ref3.children,
103
- truncateTitle = _ref3.truncateTitle;
99
+ truncateTitle = _ref3.truncateTitle;
104
100
  return jsx("div", {
105
101
  css: [titleWrapperStyles, truncateTitle && titleWrapperTruncateStyles]
106
102
  }, children);
107
103
  };
104
+
108
105
  /**
109
106
  * Title container
110
107
  *
111
108
  * A title container is a container that wraps around the title and its styles (if applied).
112
109
  *
113
110
  */
114
-
115
111
  export var TitleContainer = function TitleContainer(_ref4) {
116
112
  var children = _ref4.children,
117
- truncateTitle = _ref4.truncateTitle;
113
+ truncateTitle = _ref4.truncateTitle;
118
114
  return jsx("div", {
119
115
  css: [titleContainerStyles, truncateTitle && titleContainerTruncateStyles]
120
116
  }, children);
121
117
  };
118
+
122
119
  /**
123
120
  * __Actions wrapper__
124
121
  *
125
122
  * An actions wrapper is a wrapper for the actions, which appear on the top right of the PageHeader component.
126
123
  *
127
124
  */
128
-
129
125
  export var ActionsWrapper = function ActionsWrapper(_ref5) {
130
126
  var children = _ref5.children;
131
127
  return jsx("div", {
132
128
  css: actionStyles
133
129
  }, children);
134
130
  };
131
+
135
132
  /**
136
133
  * __Bottom bar wrapper__
137
134
  *
138
135
  * A bottom bar wrapper is a wrapper for the bottom bar, which appears at the bottom of the PageHeader component.
139
136
  *
140
137
  */
141
-
142
138
  export var BottomBarWrapper = function BottomBarWrapper(_ref6) {
143
139
  var children = _ref6.children;
144
140
  return jsx("div", {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/page-header",
3
- "version": "10.3.2",
3
+ "version": "10.3.3",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/page-header",
3
- "version": "10.3.2",
3
+ "version": "10.3.3",
4
4
  "description": "A page header defines the top of a page. It contains a title and can be optionally combined with breadcrumbs buttons, search, and filters.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,19 +12,10 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.0 <4.5": {
17
- "*": [
18
- "dist/types-ts4.0/*",
19
- "dist/types-ts4.0/index.d.ts"
20
- ]
21
- }
22
- },
23
15
  "sideEffects": false,
24
16
  "atlaskit:src": "src/index.tsx",
25
17
  "homepage": "https://atlassian.design/components/page-header",
26
18
  "atlassian": {
27
- "disableProductCI": true,
28
19
  "team": "Design System Team",
29
20
  "releaseModel": "scheduled",
30
21
  "website": {
@@ -34,6 +25,7 @@
34
25
  },
35
26
  "dependencies": {
36
27
  "@atlaskit/theme": "^12.2.0",
28
+ "@atlaskit/tokens": "^1.2.5",
37
29
  "@babel/runtime": "^7.0.0",
38
30
  "@emotion/react": "^11.7.1"
39
31
  },
@@ -43,13 +35,13 @@
43
35
  },
44
36
  "devDependencies": {
45
37
  "@atlaskit/breadcrumbs": "^11.7.0",
46
- "@atlaskit/button": "^16.3.0",
38
+ "@atlaskit/button": "^16.5.0",
47
39
  "@atlaskit/docs": "*",
48
40
  "@atlaskit/ds-lib": "^2.0.1",
49
41
  "@atlaskit/inline-edit": "^12.2.0",
50
42
  "@atlaskit/page": "^12.2.0",
51
43
  "@atlaskit/section-message": "^6.3.0",
52
- "@atlaskit/select": "^15.7.0",
44
+ "@atlaskit/select": "^16.1.0",
53
45
  "@atlaskit/ssr": "*",
54
46
  "@atlaskit/textfield": "^5.3.0",
55
47
  "@atlaskit/visual-regression": "*",
@@ -71,9 +63,11 @@
71
63
  "@repo/internal": {
72
64
  "dom-events": "use-bind-event-listener",
73
65
  "analytics": "analytics-next",
66
+ "design-tokens": [
67
+ "color"
68
+ ],
74
69
  "theming": [
75
- "react-context",
76
- "tokens"
70
+ "react-context"
77
71
  ],
78
72
  "styling": [
79
73
  "static",
package/report.api.md CHANGED
@@ -1,24 +1,24 @@
1
- ## API Report File for "@atlaskit/page-header".
1
+ <!-- API Report Version: 2.3 -->
2
2
 
3
- > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
3
+ ## API Report File for "@atlaskit/page-header"
4
4
 
5
- [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
5
+ > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
6
+ > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
+
8
+ ### Table of contents
9
+
10
+ - [Main Entry Types](#main-entry-types)
11
+
12
+ ### Main Entry Types
13
+
14
+ <!--SECTION START: Main Entry Types-->
6
15
 
7
16
  ```ts
8
17
  import { ReactElement } from 'react';
9
18
  import { ReactNode } from 'react';
10
19
 
11
- /**
12
- * __Page header__
13
- *
14
- * A page header defines the top of a page. It contains a title and can be optionally combined with
15
- * breadcrumbs buttons, search, and filters.
16
- *
17
- * - [Examples](https://atlassian.design/components/page-header/examples)
18
- * - [Code](https://atlassian.design/components/page-header/code)
19
- * - [Usage](https://atlassian.design/components/page-header/usage)
20
- */
21
- declare const PageHeader: ({
20
+ // @public
21
+ const PageHeader: ({
22
22
  innerRef,
23
23
  breadcrumbs,
24
24
  actions,
@@ -30,40 +30,19 @@ declare const PageHeader: ({
30
30
  }: PageHeaderProps) => JSX.Element;
31
31
  export default PageHeader;
32
32
 
33
- declare type PageHeaderProps = {
34
- /**
35
- * Contents of the action bar to be rendered next to the page title.
36
- */
33
+ // @public (undocumented)
34
+ type PageHeaderProps = {
37
35
  actions?: ReactElement;
38
- /**
39
- * Contents of the action bar to be rendered next to the page title. Typically a button group.
40
- */
41
36
  bottomBar?: ReactElement;
42
- /**
43
- * Page breadcrumbs to be rendered above the title.
44
- */
45
37
  breadcrumbs?: ReactElement;
46
- /**
47
- * Contents of the bottom bar to be rendered below the page title. Typically contains a search bar and/or filters.
48
- */
49
38
  children?: ReactNode;
50
- /**
51
- * Content of the page title. The text wraps by default.
52
- */
53
39
  disableTitleStyles?: boolean;
54
- /**
55
- * Returns the inner ref to the DOM element of the title. This is exposed so the focus can be set.
56
- */
57
40
  innerRef?: (element: HTMLElement) => void;
58
- /**
59
- * Prevent the title from wrapping across lines. This should be avoided.
60
- */
61
41
  truncateTitle?: boolean;
62
- /**
63
- * Used as id of inner h1 tag. This is exposed so the header text can be used as label of other element by aria-labeledby
64
- */
65
42
  id?: string;
66
43
  };
67
44
 
68
- export {};
45
+ // (No @packageDocumentation comment for this package)
69
46
  ```
47
+
48
+ <!--SECTION END: Main Entry Types-->
@@ -1,47 +0,0 @@
1
- import { ReactElement, ReactNode } from 'react';
2
- export declare type PageHeaderProps = {
3
- /**
4
- * Contents of the action bar to be rendered next to the page title.
5
- */
6
- actions?: ReactElement;
7
- /**
8
- * Contents of the action bar to be rendered next to the page title. Typically a button group.
9
- */
10
- bottomBar?: ReactElement;
11
- /**
12
- * Page breadcrumbs to be rendered above the title.
13
- */
14
- breadcrumbs?: ReactElement;
15
- /**
16
- * Contents of the bottom bar to be rendered below the page title. Typically contains a search bar and/or filters.
17
- */
18
- children?: ReactNode;
19
- /**
20
- * Content of the page title. The text wraps by default.
21
- */
22
- disableTitleStyles?: boolean;
23
- /**
24
- * Returns the inner ref to the DOM element of the title. This is exposed so the focus can be set.
25
- */
26
- innerRef?: (element: HTMLElement) => void;
27
- /**
28
- * Prevent the title from wrapping across lines. This should be avoided.
29
- */
30
- truncateTitle?: boolean;
31
- /**
32
- * Used as id of inner h1 tag. This is exposed so the header text can be used as label of other element by aria-labeledby
33
- */
34
- id?: string;
35
- };
36
- /**
37
- * __Page header__
38
- *
39
- * A page header defines the top of a page. It contains a title and can be optionally combined with
40
- * breadcrumbs buttons, search, and filters.
41
- *
42
- * - [Examples](https://atlassian.design/components/page-header/examples)
43
- * - [Code](https://atlassian.design/components/page-header/code)
44
- * - [Usage](https://atlassian.design/components/page-header/usage)
45
- */
46
- declare const PageHeader: ({ innerRef, breadcrumbs, actions, bottomBar, children, id, disableTitleStyles, truncateTitle, }: PageHeaderProps) => JSX.Element;
47
- export default PageHeader;
@@ -1,54 +0,0 @@
1
- /** @jsx jsx */
2
- import React from 'react';
3
- /**
4
- * __Outer wrapper__
5
- *
6
- * An outer wrapper that is the outermost component of the PageHeader component. It wraps around the PageHeader, its Actions,
7
- * the BottomBar and its Breadcrumbs.
8
- *
9
- */
10
- export declare const OuterWrapper: React.FC<React.ReactNode>;
11
- interface StyledTitleWrapperProps {
12
- children?: React.ReactNode;
13
- id?: string;
14
- truncateTitle?: boolean;
15
- }
16
- /**
17
- * __Styled title wrapper__
18
- *
19
- * A styled title wrapper is a wrapper around the title that controls its the styles exclusively.
20
- *
21
- */
22
- export declare const StyledTitleWrapper: React.ForwardRefExoticComponent<StyledTitleWrapperProps & React.RefAttributes<HTMLHeadingElement>>;
23
- interface TitleProps {
24
- truncateTitle?: boolean;
25
- }
26
- /**
27
- * __Title wrapper__
28
- *
29
- * A title wrapper is a wrapper around the title and the actions.
30
- *
31
- */
32
- export declare const TitleWrapper: React.FC<TitleProps>;
33
- /**
34
- * Title container
35
- *
36
- * A title container is a container that wraps around the title and its styles (if applied).
37
- *
38
- */
39
- export declare const TitleContainer: React.FC<TitleProps>;
40
- /**
41
- * __Actions wrapper__
42
- *
43
- * An actions wrapper is a wrapper for the actions, which appear on the top right of the PageHeader component.
44
- *
45
- */
46
- export declare const ActionsWrapper: React.FC;
47
- /**
48
- * __Bottom bar wrapper__
49
- *
50
- * A bottom bar wrapper is a wrapper for the bottom bar, which appears at the bottom of the PageHeader component.
51
- *
52
- */
53
- export declare const BottomBarWrapper: React.FC;
54
- export {};
@@ -1 +0,0 @@
1
- export { default } from './PageHeader';