@atlaskit/page-header 10.2.2 → 10.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 +22 -0
- package/__perf__/default.tsx +2 -1
- package/dist/cjs/PageHeader/styled.js +18 -18
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/PageHeader/styled.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/PageHeader/styled.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +21 -17
- package/report.api.md +67 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/page-header
|
|
2
2
|
|
|
3
|
+
## 10.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`ae50e8dea70`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ae50e8dea70) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 10.2.4
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
18
|
+
|
|
19
|
+
## 10.2.3
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
24
|
+
|
|
3
25
|
## 10.2.2
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/__perf__/default.tsx
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import Breadcrumbs, { BreadcrumbsItem } from '@atlaskit/breadcrumbs';
|
|
4
|
+
import __noop from '@atlaskit/ds-lib/noop';
|
|
4
5
|
|
|
5
6
|
import PageHeader from '../src';
|
|
6
7
|
|
|
7
8
|
const breadcrumbs = (
|
|
8
|
-
<Breadcrumbs onExpand={
|
|
9
|
+
<Breadcrumbs onExpand={__noop}>
|
|
9
10
|
<BreadcrumbsItem text="Some project" key="Some project" />
|
|
10
11
|
<BreadcrumbsItem text="Parent page" key="Parent page" />
|
|
11
12
|
</Breadcrumbs>
|
|
@@ -5,11 +5,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.TitleWrapper = exports.TitleContainer = exports.StyledTitleWrapper = exports.OuterWrapper = exports.BottomBarWrapper = exports.ActionsWrapper = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
13
13
|
|
|
14
14
|
var _constants = require("@atlaskit/theme/constants");
|
|
15
15
|
|
|
@@ -24,35 +24,35 @@ var _typography = require("@atlaskit/theme/typography");
|
|
|
24
24
|
|
|
25
25
|
/** @jsx jsx */
|
|
26
26
|
var gridSize = (0, _constants.gridSize)();
|
|
27
|
-
var truncateStyles = (0,
|
|
27
|
+
var truncateStyles = (0, _react2.css)({
|
|
28
28
|
overflowX: 'hidden',
|
|
29
29
|
textOverflow: 'ellipsis',
|
|
30
30
|
whiteSpace: 'nowrap'
|
|
31
31
|
});
|
|
32
|
-
var outerStyles = (0,
|
|
32
|
+
var outerStyles = (0, _react2.css)({
|
|
33
33
|
margin: "".concat(gridSize * 3, "px 0 ").concat(gridSize * 2, "px 0")
|
|
34
34
|
});
|
|
35
|
-
var styledTitleStyles = (0,
|
|
35
|
+
var styledTitleStyles = (0, _react2.css)({
|
|
36
36
|
marginTop: 0,
|
|
37
37
|
lineHeight: "".concat(gridSize * 4, "px"),
|
|
38
38
|
outline: 'none'
|
|
39
39
|
});
|
|
40
|
-
var titleWrapperStyles = (0,
|
|
40
|
+
var titleWrapperStyles = (0, _react2.css)({
|
|
41
41
|
display: 'flex',
|
|
42
42
|
alignItems: 'flex-start',
|
|
43
43
|
flexWrap: 'wrap'
|
|
44
44
|
});
|
|
45
|
-
var titleWrapperTruncateStyles = (0,
|
|
45
|
+
var titleWrapperTruncateStyles = (0, _react2.css)({
|
|
46
46
|
flexWrap: 'nowrap'
|
|
47
47
|
});
|
|
48
|
-
var titleContainerStyles = (0,
|
|
48
|
+
var titleContainerStyles = (0, _react2.css)({
|
|
49
49
|
minWidth: 0,
|
|
50
50
|
maxWidth: '100%',
|
|
51
51
|
marginBottom: "".concat(gridSize, "px"),
|
|
52
52
|
flex: '1 0 auto',
|
|
53
53
|
flexShrink: undefined
|
|
54
54
|
});
|
|
55
|
-
var actionStyles = (0,
|
|
55
|
+
var actionStyles = (0, _react2.css)({
|
|
56
56
|
maxWidth: '100%',
|
|
57
57
|
marginBottom: "".concat(gridSize, "px"),
|
|
58
58
|
marginLeft: 'auto',
|
|
@@ -64,10 +64,10 @@ var actionStyles = (0, _core.css)({
|
|
|
64
64
|
textAlign: 'right'
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
|
-
var titleContainerTruncateStyles = (0,
|
|
67
|
+
var titleContainerTruncateStyles = (0, _react2.css)({
|
|
68
68
|
flexShrink: 1
|
|
69
69
|
});
|
|
70
|
-
var bottomBarStyles = (0,
|
|
70
|
+
var bottomBarStyles = (0, _react2.css)({
|
|
71
71
|
marginTop: "".concat(gridSize * 2, "px")
|
|
72
72
|
});
|
|
73
73
|
/**
|
|
@@ -80,14 +80,14 @@ var bottomBarStyles = (0, _core.css)({
|
|
|
80
80
|
|
|
81
81
|
var OuterWrapper = function OuterWrapper(_ref) {
|
|
82
82
|
var children = _ref.children;
|
|
83
|
-
return (0,
|
|
83
|
+
return (0, _react2.jsx)("div", {
|
|
84
84
|
css: outerStyles
|
|
85
85
|
}, children);
|
|
86
86
|
}; // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
87
87
|
|
|
88
88
|
|
|
89
89
|
exports.OuterWrapper = OuterWrapper;
|
|
90
|
-
var h700Styles = (0,
|
|
90
|
+
var h700Styles = (0, _react2.css)((0, _typography.h700)());
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* __Styled title wrapper__
|
|
@@ -99,7 +99,7 @@ var StyledTitleWrapper = /*#__PURE__*/_react.default.forwardRef(function (_ref2,
|
|
|
99
99
|
var children = _ref2.children,
|
|
100
100
|
id = _ref2.id,
|
|
101
101
|
truncateTitle = _ref2.truncateTitle;
|
|
102
|
-
return (0,
|
|
102
|
+
return (0, _react2.jsx)("h1", {
|
|
103
103
|
css: [h700Styles, styledTitleStyles, truncateTitle && truncateStyles],
|
|
104
104
|
ref: ref,
|
|
105
105
|
tabIndex: -1,
|
|
@@ -118,7 +118,7 @@ exports.StyledTitleWrapper = StyledTitleWrapper;
|
|
|
118
118
|
var TitleWrapper = function TitleWrapper(_ref3) {
|
|
119
119
|
var children = _ref3.children,
|
|
120
120
|
truncateTitle = _ref3.truncateTitle;
|
|
121
|
-
return (0,
|
|
121
|
+
return (0, _react2.jsx)("div", {
|
|
122
122
|
css: [titleWrapperStyles, truncateTitle && titleWrapperTruncateStyles]
|
|
123
123
|
}, children);
|
|
124
124
|
};
|
|
@@ -135,7 +135,7 @@ exports.TitleWrapper = TitleWrapper;
|
|
|
135
135
|
var TitleContainer = function TitleContainer(_ref4) {
|
|
136
136
|
var children = _ref4.children,
|
|
137
137
|
truncateTitle = _ref4.truncateTitle;
|
|
138
|
-
return (0,
|
|
138
|
+
return (0, _react2.jsx)("div", {
|
|
139
139
|
css: [titleContainerStyles, truncateTitle && titleContainerTruncateStyles]
|
|
140
140
|
}, children);
|
|
141
141
|
};
|
|
@@ -151,7 +151,7 @@ exports.TitleContainer = TitleContainer;
|
|
|
151
151
|
|
|
152
152
|
var ActionsWrapper = function ActionsWrapper(_ref5) {
|
|
153
153
|
var children = _ref5.children;
|
|
154
|
-
return (0,
|
|
154
|
+
return (0, _react2.jsx)("div", {
|
|
155
155
|
css: actionStyles
|
|
156
156
|
}, children);
|
|
157
157
|
};
|
|
@@ -167,7 +167,7 @@ exports.ActionsWrapper = ActionsWrapper;
|
|
|
167
167
|
|
|
168
168
|
var BottomBarWrapper = function BottomBarWrapper(_ref6) {
|
|
169
169
|
var children = _ref6.children;
|
|
170
|
-
return (0,
|
|
170
|
+
return (0, _react2.jsx)("div", {
|
|
171
171
|
css: bottomBarStyles
|
|
172
172
|
}, children);
|
|
173
173
|
};
|
package/dist/cjs/version.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
/** @jsx jsx */
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import { css, jsx } from '@emotion/
|
|
10
|
+
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
12
12
|
import { h700 } from '@atlaskit/theme/typography';
|
|
13
13
|
const gridSize = getGridSize();
|
package/dist/es2019/version.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
/** @jsx jsx */
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import { css, jsx } from '@emotion/
|
|
10
|
+
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
12
12
|
import { h700 } from '@atlaskit/theme/typography';
|
|
13
13
|
var gridSize = getGridSize();
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/page-header",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.0",
|
|
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/"
|
|
7
7
|
},
|
|
8
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
9
|
"author": "Atlassian Pty Ltd",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "dist/cjs/index.js",
|
|
@@ -17,38 +17,38 @@
|
|
|
17
17
|
"homepage": "https://atlassian.design/components/page-header",
|
|
18
18
|
"atlassian": {
|
|
19
19
|
"team": "Design System Team",
|
|
20
|
-
"inPublicMirror": true,
|
|
21
20
|
"releaseModel": "scheduled",
|
|
22
21
|
"website": {
|
|
23
|
-
"name": "Page header"
|
|
22
|
+
"name": "Page header",
|
|
23
|
+
"category": "Components"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaskit/theme": "^12.
|
|
27
|
+
"@atlaskit/theme": "^12.2.0",
|
|
28
28
|
"@babel/runtime": "^7.0.0",
|
|
29
|
-
"@emotion/
|
|
29
|
+
"@emotion/react": "^11.7.1"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": "^16.8.0",
|
|
33
33
|
"react-dom": "^16.8.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@atlaskit/breadcrumbs": "^11.
|
|
37
|
-
"@atlaskit/
|
|
38
|
-
"@atlaskit/button": "^16.1.0",
|
|
36
|
+
"@atlaskit/breadcrumbs": "^11.7.0",
|
|
37
|
+
"@atlaskit/button": "^16.3.0",
|
|
39
38
|
"@atlaskit/docs": "*",
|
|
40
|
-
"@atlaskit/
|
|
41
|
-
"@atlaskit/
|
|
42
|
-
"@atlaskit/
|
|
43
|
-
"@atlaskit/
|
|
39
|
+
"@atlaskit/ds-lib": "^2.0.1",
|
|
40
|
+
"@atlaskit/inline-edit": "^12.2.0",
|
|
41
|
+
"@atlaskit/page": "^12.2.0",
|
|
42
|
+
"@atlaskit/section-message": "^6.2.0",
|
|
43
|
+
"@atlaskit/select": "^15.7.0",
|
|
44
44
|
"@atlaskit/ssr": "*",
|
|
45
|
-
"@atlaskit/textfield": "^5.
|
|
45
|
+
"@atlaskit/textfield": "^5.2.0",
|
|
46
46
|
"@atlaskit/visual-regression": "*",
|
|
47
47
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
48
48
|
"enzyme": "^3.10.0",
|
|
49
49
|
"react-dom": "^16.8.0",
|
|
50
50
|
"react-test-renderer": "^16.8.0",
|
|
51
|
-
"typescript": "3.
|
|
51
|
+
"typescript": "4.3.5"
|
|
52
52
|
},
|
|
53
53
|
"keywords": [
|
|
54
54
|
"atlaskit",
|
|
@@ -60,12 +60,16 @@
|
|
|
60
60
|
"import-structure": "atlassian-conventions"
|
|
61
61
|
},
|
|
62
62
|
"@repo/internal": {
|
|
63
|
+
"dom-events": "use-bind-event-listener",
|
|
63
64
|
"analytics": "analytics-next",
|
|
64
65
|
"theming": [
|
|
65
|
-
"
|
|
66
|
+
"react-context",
|
|
66
67
|
"tokens"
|
|
67
68
|
],
|
|
68
|
-
"styling":
|
|
69
|
+
"styling": [
|
|
70
|
+
"static",
|
|
71
|
+
"emotion"
|
|
72
|
+
],
|
|
69
73
|
"design-system": "v1",
|
|
70
74
|
"deprecation": "no-deprecated-imports"
|
|
71
75
|
}
|
package/report.api.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/page-header"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { ReactElement } from 'react';
|
|
7
|
+
import { ReactNode } from 'react';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* __Page header__
|
|
11
|
+
*
|
|
12
|
+
* A page header defines the top of a page. It contains a title and can be optionally combined with
|
|
13
|
+
* breadcrumbs buttons, search, and filters.
|
|
14
|
+
*
|
|
15
|
+
* - [Examples](https://atlassian.design/components/page-header/examples)
|
|
16
|
+
* - [Code](https://atlassian.design/components/page-header/code)
|
|
17
|
+
* - [Usage](https://atlassian.design/components/page-header/usage)
|
|
18
|
+
*/
|
|
19
|
+
declare const PageHeader: ({
|
|
20
|
+
innerRef,
|
|
21
|
+
breadcrumbs,
|
|
22
|
+
actions,
|
|
23
|
+
bottomBar,
|
|
24
|
+
children,
|
|
25
|
+
id,
|
|
26
|
+
disableTitleStyles,
|
|
27
|
+
truncateTitle,
|
|
28
|
+
}: PageHeaderProps) => JSX.Element;
|
|
29
|
+
export default PageHeader;
|
|
30
|
+
|
|
31
|
+
declare type PageHeaderProps = {
|
|
32
|
+
/**
|
|
33
|
+
* Contents of the action bar to be rendered next to the page title.
|
|
34
|
+
*/
|
|
35
|
+
actions?: ReactElement;
|
|
36
|
+
/**
|
|
37
|
+
* Contents of the action bar to be rendered next to the page title. Typically a button group.
|
|
38
|
+
*/
|
|
39
|
+
bottomBar?: ReactElement;
|
|
40
|
+
/**
|
|
41
|
+
* Page breadcrumbs to be rendered above the title.
|
|
42
|
+
*/
|
|
43
|
+
breadcrumbs?: ReactElement;
|
|
44
|
+
/**
|
|
45
|
+
* Contents of the bottom bar to be rendered below the page title. Typically contains a search bar and/or filters.
|
|
46
|
+
*/
|
|
47
|
+
children?: ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Content of the page title. The text wraps by default.
|
|
50
|
+
*/
|
|
51
|
+
disableTitleStyles?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Returns the inner ref to the DOM element of the title. This is exposed so the focus can be set.
|
|
54
|
+
*/
|
|
55
|
+
innerRef?: (element: HTMLElement) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Prevent the title from wrapping across lines. This should be avoided.
|
|
58
|
+
*/
|
|
59
|
+
truncateTitle?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* 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
|
|
62
|
+
*/
|
|
63
|
+
id?: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export {};
|
|
67
|
+
```
|