@atlaskit/mobile-header 6.1.6 → 6.1.7
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 +6 -0
- package/dist/cjs/styled.js +8 -10
- package/dist/es2019/styled.js +6 -10
- package/dist/esm/styled.js +6 -10
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/mobile-header
|
|
2
2
|
|
|
3
|
+
## 6.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#61588](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61588) [`c2563e7fb1f5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c2563e7fb1f5) - Remove reliance on logic from the deprecated `@atlaskit/theme` package. Theming is still available via the `@atlaskit/tokens` package.
|
|
8
|
+
|
|
3
9
|
## 6.1.6
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/styled.js
CHANGED
|
@@ -8,12 +8,13 @@ exports.PageHeading = exports.MobilePageHeaderContent = exports.MobilePageHeader
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
|
|
11
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
12
|
+
var _constants = require("@atlaskit/theme/constants");
|
|
13
|
+
var _typography = require("@atlaskit/theme/typography");
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
14
15
|
// @atlaskit/navigation has a specific z-index, so we need to layer the header
|
|
15
16
|
// components relative to that.
|
|
16
|
-
var navLayer =
|
|
17
|
+
var navLayer = _constants.layers.navigation();
|
|
17
18
|
var layers = {
|
|
18
19
|
header: navLayer - 10,
|
|
19
20
|
blanket: navLayer - 5,
|
|
@@ -34,10 +35,7 @@ var MobileNavSlider = exports.MobileNavSlider = _styled.default.div(_templateObj
|
|
|
34
35
|
// make space so content below doesn't slip beneath the header
|
|
35
36
|
// since the content is `position: fixed`
|
|
36
37
|
var MobilePageHeader = exports.MobilePageHeader = _styled.default.header(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n height: ", "px;\n"])), mobileHeaderHeight);
|
|
37
|
-
var MobilePageHeaderContent = exports.MobilePageHeaderContent = _styled.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background-color: ", ";\n box-sizing: border-box;\n display: flex;\n height: ", "px;\n padding: ", ";\n position: fixed;\n top: ", "px;\n width: 100%;\n z-index: ", ";\n"])), (
|
|
38
|
-
light: _theme.colors.N20,
|
|
39
|
-
dark: _theme.colors.DN10
|
|
40
|
-
}), mobileHeaderHeight, "var(--ds-space-100, 8px)", function (props) {
|
|
38
|
+
var MobilePageHeaderContent = exports.MobilePageHeaderContent = _styled.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background-color: ", ";\n box-sizing: border-box;\n display: flex;\n height: ", "px;\n padding: ", ";\n position: fixed;\n top: ", "px;\n width: 100%;\n z-index: ", ";\n"])), "var(--ds-background-neutral, ".concat(_colors.N20, ")"), mobileHeaderHeight, "var(--ds-space-100, 8px)", function (props) {
|
|
41
39
|
return props.topOffset;
|
|
42
40
|
}, layers.header);
|
|
43
41
|
var opacityIn = (0, _react.keyframes)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n from { opacity: 0; }\n to { opacity: 1; }\n"])));
|
|
@@ -45,9 +43,9 @@ var opacityOut = (0, _react.keyframes)(_templateObject7 || (_templateObject7 = (
|
|
|
45
43
|
|
|
46
44
|
// @atlaskit/blanket has a z-index *higher* than @atlaskit/navigation,
|
|
47
45
|
// so we can't display the AK blanket underneath the navigation.
|
|
48
|
-
var FakeBlanket = exports.FakeBlanket = _styled.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n top: 0;\n z-index: ", ";\n animation: ", " 0.2s ease-out;\n"])),
|
|
46
|
+
var FakeBlanket = exports.FakeBlanket = _styled.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n top: 0;\n z-index: ", ";\n animation: ", " 0.2s ease-out;\n"])), "var(--ds-blanket, ".concat(_colors.N100A, ")"), layers.blanket, function (p) {
|
|
49
47
|
return p.isOpen ? opacityIn : opacityOut;
|
|
50
48
|
});
|
|
51
49
|
|
|
52
50
|
// use proper h1 and header styles but for mobile we don't want a top margin
|
|
53
|
-
var PageHeading = exports.PageHeading = _styled.default.h1(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n flex-grow: 1;\n margin-left: ", ";\n ", ";\n && {\n margin-top: 0;\n }\n"])), "var(--ds-space-100, 8px)",
|
|
51
|
+
var PageHeading = exports.PageHeading = _styled.default.h1(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n flex-grow: 1;\n margin-left: ", ";\n ", ";\n && {\n margin-top: 0;\n }\n"])), "var(--ds-space-100, 8px)", _typography.h500);
|
package/dist/es2019/styled.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { css, keyframes } from '@emotion/react';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { layers as akLayers, colors, themed, typography } from '@atlaskit/theme';
|
|
3
|
+
import { N100A, N20 } from '@atlaskit/theme/colors';
|
|
4
|
+
import { layers as akLayers } from '@atlaskit/theme/constants';
|
|
5
|
+
import { h500 } from '@atlaskit/theme/typography';
|
|
7
6
|
// @atlaskit/navigation has a specific z-index, so we need to layer the header
|
|
8
7
|
// components relative to that.
|
|
9
8
|
const navLayer = akLayers.navigation();
|
|
@@ -39,10 +38,7 @@ export const MobilePageHeader = styled.header`
|
|
|
39
38
|
`;
|
|
40
39
|
export const MobilePageHeaderContent = styled.div`
|
|
41
40
|
align-items: center;
|
|
42
|
-
background-color: ${
|
|
43
|
-
light: colors.N20,
|
|
44
|
-
dark: colors.DN10
|
|
45
|
-
})};
|
|
41
|
+
background-color: ${`var(--ds-background-neutral, ${N20})`};
|
|
46
42
|
box-sizing: border-box;
|
|
47
43
|
display: flex;
|
|
48
44
|
height: ${mobileHeaderHeight}px;
|
|
@@ -64,7 +60,7 @@ const opacityOut = keyframes`
|
|
|
64
60
|
// @atlaskit/blanket has a z-index *higher* than @atlaskit/navigation,
|
|
65
61
|
// so we can't display the AK blanket underneath the navigation.
|
|
66
62
|
export const FakeBlanket = styled.div`
|
|
67
|
-
background: ${
|
|
63
|
+
background: ${`var(--ds-blanket, ${N100A})`};
|
|
68
64
|
bottom: 0;
|
|
69
65
|
left: 0;
|
|
70
66
|
position: fixed;
|
|
@@ -78,7 +74,7 @@ export const FakeBlanket = styled.div`
|
|
|
78
74
|
export const PageHeading = styled.h1`
|
|
79
75
|
flex-grow: 1;
|
|
80
76
|
margin-left: ${"var(--ds-space-100, 8px)"};
|
|
81
|
-
${
|
|
77
|
+
${h500};
|
|
82
78
|
&& {
|
|
83
79
|
margin-top: 0;
|
|
84
80
|
}
|
package/dist/esm/styled.js
CHANGED
|
@@ -2,10 +2,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
3
3
|
import { css, keyframes } from '@emotion/react';
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { layers as akLayers, colors, themed, typography } from '@atlaskit/theme';
|
|
5
|
+
import { N100A, N20 } from '@atlaskit/theme/colors';
|
|
6
|
+
import { layers as akLayers } from '@atlaskit/theme/constants';
|
|
7
|
+
import { h500 } from '@atlaskit/theme/typography';
|
|
9
8
|
// @atlaskit/navigation has a specific z-index, so we need to layer the header
|
|
10
9
|
// components relative to that.
|
|
11
10
|
var navLayer = akLayers.navigation();
|
|
@@ -29,10 +28,7 @@ export var MobileNavSlider = styled.div(_templateObject3 || (_templateObject3 =
|
|
|
29
28
|
// make space so content below doesn't slip beneath the header
|
|
30
29
|
// since the content is `position: fixed`
|
|
31
30
|
export var MobilePageHeader = styled.header(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: ", "px;\n"])), mobileHeaderHeight);
|
|
32
|
-
export var MobilePageHeaderContent = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n align-items: center;\n background-color: ", ";\n box-sizing: border-box;\n display: flex;\n height: ", "px;\n padding: ", ";\n position: fixed;\n top: ", "px;\n width: 100%;\n z-index: ", ";\n"])),
|
|
33
|
-
light: colors.N20,
|
|
34
|
-
dark: colors.DN10
|
|
35
|
-
}), mobileHeaderHeight, "var(--ds-space-100, 8px)", function (props) {
|
|
31
|
+
export var MobilePageHeaderContent = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n align-items: center;\n background-color: ", ";\n box-sizing: border-box;\n display: flex;\n height: ", "px;\n padding: ", ";\n position: fixed;\n top: ", "px;\n width: 100%;\n z-index: ", ";\n"])), "var(--ds-background-neutral, ".concat(N20, ")"), mobileHeaderHeight, "var(--ds-space-100, 8px)", function (props) {
|
|
36
32
|
return props.topOffset;
|
|
37
33
|
}, layers.header);
|
|
38
34
|
var opacityIn = keyframes(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n from { opacity: 0; }\n to { opacity: 1; }\n"])));
|
|
@@ -40,9 +36,9 @@ var opacityOut = keyframes(_templateObject7 || (_templateObject7 = _taggedTempla
|
|
|
40
36
|
|
|
41
37
|
// @atlaskit/blanket has a z-index *higher* than @atlaskit/navigation,
|
|
42
38
|
// so we can't display the AK blanket underneath the navigation.
|
|
43
|
-
export var FakeBlanket = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background: ", ";\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n top: 0;\n z-index: ", ";\n animation: ", " 0.2s ease-out;\n"])),
|
|
39
|
+
export var FakeBlanket = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background: ", ";\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n top: 0;\n z-index: ", ";\n animation: ", " 0.2s ease-out;\n"])), "var(--ds-blanket, ".concat(N100A, ")"), layers.blanket, function (p) {
|
|
44
40
|
return p.isOpen ? opacityIn : opacityOut;
|
|
45
41
|
});
|
|
46
42
|
|
|
47
43
|
// use proper h1 and header styles but for mobile we don't want a top margin
|
|
48
|
-
export var PageHeading = styled.h1(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n flex-grow: 1;\n margin-left: ", ";\n ", ";\n && {\n margin-top: 0;\n }\n"])), "var(--ds-space-100, 8px)",
|
|
44
|
+
export var PageHeading = styled.h1(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n flex-grow: 1;\n margin-left: ", ";\n ", ";\n && {\n margin-top: 0;\n }\n"])), "var(--ds-space-100, 8px)", h500);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/mobile-header",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.7",
|
|
4
4
|
"description": "A React component rendering a mobile header",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@atlaskit/button": "^17.
|
|
33
|
+
"@atlaskit/button": "^17.1.0",
|
|
34
34
|
"@atlaskit/icon": "^22.0.0",
|
|
35
35
|
"@atlaskit/theme": "^12.6.0",
|
|
36
36
|
"@atlaskit/tokens": "^1.30.0",
|