@atlaskit/mobile-header 7.0.27 → 7.0.29
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 +12 -0
- package/dist/cjs/styled.js +2 -7
- package/dist/es2019/styled.js +2 -7
- package/dist/esm/styled.js +2 -7
- package/dist/types/styled.d.ts +24 -15
- package/dist/types-ts4.5/styled.d.ts +24 -15
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
package/dist/cjs/styled.js
CHANGED
|
@@ -9,8 +9,8 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
11
11
|
var _constants = require("@atlaskit/theme/constants");
|
|
12
|
-
var _templateObject, _templateObject2, _templateObject3; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
12
|
+
var _templateObject, _templateObject2, _templateObject3; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
14
14
|
// @atlaskit/navigation has a specific z-index, so we need to layer the header
|
|
15
15
|
// components relative to that.
|
|
16
16
|
var navLayer = _constants.layers.navigation();
|
|
@@ -27,7 +27,6 @@ var xPositioning = function xPositioning(_ref) {
|
|
|
27
27
|
(0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\tright: 0;\n\t\t\t\ttransform: translateX(", ");\n\t\t\t"])), isOpen ? '0' : '100vw') : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
28
28
|
(0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\tleft: 0;\n\t\t\t\ttransform: translateX(", ");\n\t\t\t"])), isOpen ? '0' : '-100vw');
|
|
29
29
|
};
|
|
30
|
-
|
|
31
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
32
31
|
var MobileNavSlider = exports.MobileNavSlider = _styled.default.div(
|
|
33
32
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
@@ -45,14 +44,12 @@ function (props) {
|
|
|
45
44
|
},
|
|
46
45
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
47
46
|
xPositioning);
|
|
48
|
-
|
|
49
47
|
// make space so content below doesn't slip beneath the header
|
|
50
48
|
// since the content is `position: fixed`
|
|
51
49
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
52
50
|
var MobilePageHeader = exports.MobilePageHeader = _styled.default.header({
|
|
53
51
|
height: "".concat(mobileHeaderHeight, "px")
|
|
54
52
|
});
|
|
55
|
-
|
|
56
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
57
54
|
var MobilePageHeaderContent = exports.MobilePageHeaderContent = _styled.default.div(function (props) {
|
|
58
55
|
return {
|
|
@@ -86,14 +83,12 @@ var opacityOut = (0, _react.keyframes)({
|
|
|
86
83
|
opacity: 0
|
|
87
84
|
}
|
|
88
85
|
});
|
|
89
|
-
|
|
90
86
|
// @atlaskit/blanket has a z-index *higher* than @atlaskit/navigation,
|
|
91
87
|
// so we can't display the AK blanket underneath the navigation.
|
|
92
88
|
// eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
93
89
|
var FakeBlanket = exports.FakeBlanket = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\tbackground: ", ";\n\tbottom: 0;\n\tleft: 0;\n\tposition: fixed;\n\tright: 0;\n\ttop: 0;\n\tz-index: ", ";\n\tanimation: ", " 0.2s ease-out;\n"])), "var(--ds-blanket, #050C1F75)", layers.blanket, function (p) {
|
|
94
90
|
return p.isOpen ? opacityIn : opacityOut;
|
|
95
91
|
});
|
|
96
|
-
|
|
97
92
|
// use proper h1 and header styles but for mobile we don't want a top margin
|
|
98
93
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
99
94
|
var PageHeading = exports.PageHeading = _styled.default.h1({
|
package/dist/es2019/styled.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
2
|
import { css, keyframes } from '@emotion/react';
|
|
3
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
5
|
import { layers as akLayers } from '@atlaskit/theme/constants';
|
|
6
6
|
// @atlaskit/navigation has a specific z-index, so we need to layer the header
|
|
@@ -26,7 +26,6 @@ css`
|
|
|
26
26
|
left: 0;
|
|
27
27
|
transform: translateX(${isOpen ? '0' : '-100vw'});
|
|
28
28
|
`;
|
|
29
|
-
|
|
30
29
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
31
30
|
export const MobileNavSlider = styled.div(
|
|
32
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
@@ -42,14 +41,12 @@ props => ({
|
|
|
42
41
|
}),
|
|
43
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
44
43
|
xPositioning);
|
|
45
|
-
|
|
46
44
|
// make space so content below doesn't slip beneath the header
|
|
47
45
|
// since the content is `position: fixed`
|
|
48
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
49
47
|
export const MobilePageHeader = styled.header({
|
|
50
48
|
height: `${mobileHeaderHeight}px`
|
|
51
49
|
});
|
|
52
|
-
|
|
53
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
54
51
|
export const MobilePageHeaderContent = styled.div(props => ({
|
|
55
52
|
alignItems: 'center',
|
|
@@ -81,7 +78,6 @@ const opacityOut = keyframes({
|
|
|
81
78
|
opacity: 0
|
|
82
79
|
}
|
|
83
80
|
});
|
|
84
|
-
|
|
85
81
|
// @atlaskit/blanket has a z-index *higher* than @atlaskit/navigation,
|
|
86
82
|
// so we can't display the AK blanket underneath the navigation.
|
|
87
83
|
// eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -95,7 +91,6 @@ export const FakeBlanket = styled.div`
|
|
|
95
91
|
z-index: ${layers.blanket};
|
|
96
92
|
animation: ${p => p.isOpen ? opacityIn : opacityOut} 0.2s ease-out;
|
|
97
93
|
`;
|
|
98
|
-
|
|
99
94
|
// use proper h1 and header styles but for mobile we don't want a top margin
|
|
100
95
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
101
96
|
export const PageHeading = styled.h1({
|
package/dist/esm/styled.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3;
|
|
3
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
4
4
|
import { css, keyframes } from '@emotion/react';
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
6
6
|
import styled from '@emotion/styled';
|
|
7
7
|
import { layers as akLayers } from '@atlaskit/theme/constants';
|
|
8
8
|
// @atlaskit/navigation has a specific z-index, so we need to layer the header
|
|
@@ -21,7 +21,6 @@ var xPositioning = function xPositioning(_ref) {
|
|
|
21
21
|
css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\tright: 0;\n\t\t\t\ttransform: translateX(", ");\n\t\t\t"])), isOpen ? '0' : '100vw') : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
22
22
|
css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t\tleft: 0;\n\t\t\t\ttransform: translateX(", ");\n\t\t\t"])), isOpen ? '0' : '-100vw');
|
|
23
23
|
};
|
|
24
|
-
|
|
25
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
26
25
|
export var MobileNavSlider = styled.div(
|
|
27
26
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
@@ -39,14 +38,12 @@ function (props) {
|
|
|
39
38
|
},
|
|
40
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
41
40
|
xPositioning);
|
|
42
|
-
|
|
43
41
|
// make space so content below doesn't slip beneath the header
|
|
44
42
|
// since the content is `position: fixed`
|
|
45
43
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
46
44
|
export var MobilePageHeader = styled.header({
|
|
47
45
|
height: "".concat(mobileHeaderHeight, "px")
|
|
48
46
|
});
|
|
49
|
-
|
|
50
47
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
51
48
|
export var MobilePageHeaderContent = styled.div(function (props) {
|
|
52
49
|
return {
|
|
@@ -80,14 +77,12 @@ var opacityOut = keyframes({
|
|
|
80
77
|
opacity: 0
|
|
81
78
|
}
|
|
82
79
|
});
|
|
83
|
-
|
|
84
80
|
// @atlaskit/blanket has a z-index *higher* than @atlaskit/navigation,
|
|
85
81
|
// so we can't display the AK blanket underneath the navigation.
|
|
86
82
|
// eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
87
83
|
export var FakeBlanket = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\tbackground: ", ";\n\tbottom: 0;\n\tleft: 0;\n\tposition: fixed;\n\tright: 0;\n\ttop: 0;\n\tz-index: ", ";\n\tanimation: ", " 0.2s ease-out;\n"])), "var(--ds-blanket, #050C1F75)", layers.blanket, function (p) {
|
|
88
84
|
return p.isOpen ? opacityIn : opacityOut;
|
|
89
85
|
});
|
|
90
|
-
|
|
91
86
|
// use proper h1 and header styles but for mobile we don't want a top margin
|
|
92
87
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
93
88
|
export var PageHeading = styled.h1({
|
package/dist/types/styled.d.ts
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
2
|
+
import { type Theme } from '@emotion/react';
|
|
3
|
+
import { type StyledComponent } from '@emotion/styled';
|
|
4
|
+
type StyledMobileNavSlider = StyledComponent<{
|
|
3
5
|
as?: React.ElementType;
|
|
6
|
+
theme?: Theme;
|
|
4
7
|
} & {
|
|
5
8
|
isOpen: boolean;
|
|
6
9
|
side: string;
|
|
7
10
|
topOffset: number | undefined;
|
|
8
|
-
},
|
|
9
|
-
export declare const
|
|
10
|
-
|
|
11
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
|
+
export declare const MobileNavSlider: StyledMobileNavSlider;
|
|
13
|
+
type StyledMobilePageHeader = StyledComponent<{
|
|
11
14
|
as?: React.ElementType;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
theme?: Theme;
|
|
16
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
17
|
+
export declare const MobilePageHeader: StyledMobilePageHeader;
|
|
18
|
+
type StyledMobilePageHeaderContent = StyledComponent<{
|
|
15
19
|
as?: React.ElementType;
|
|
20
|
+
theme?: Theme;
|
|
16
21
|
} & {
|
|
17
22
|
topOffset: number | undefined;
|
|
18
|
-
},
|
|
19
|
-
export declare const
|
|
20
|
-
|
|
23
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
+
export declare const MobilePageHeaderContent: StyledMobilePageHeaderContent;
|
|
25
|
+
type StyledFakeBlanket = StyledComponent<{
|
|
21
26
|
as?: React.ElementType;
|
|
27
|
+
theme?: Theme;
|
|
22
28
|
} & {
|
|
23
29
|
isOpen: boolean;
|
|
24
|
-
},
|
|
25
|
-
export declare const
|
|
26
|
-
|
|
30
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
31
|
+
export declare const FakeBlanket: StyledFakeBlanket;
|
|
32
|
+
type StyledPageHeading = StyledComponent<{
|
|
27
33
|
as?: React.ElementType;
|
|
28
|
-
|
|
34
|
+
theme?: Theme;
|
|
35
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
|
|
36
|
+
export declare const PageHeading: StyledPageHeading;
|
|
37
|
+
export {};
|
|
@@ -1,28 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
2
|
+
import { type Theme } from '@emotion/react';
|
|
3
|
+
import { type StyledComponent } from '@emotion/styled';
|
|
4
|
+
type StyledMobileNavSlider = StyledComponent<{
|
|
3
5
|
as?: React.ElementType;
|
|
6
|
+
theme?: Theme;
|
|
4
7
|
} & {
|
|
5
8
|
isOpen: boolean;
|
|
6
9
|
side: string;
|
|
7
10
|
topOffset: number | undefined;
|
|
8
|
-
},
|
|
9
|
-
export declare const
|
|
10
|
-
|
|
11
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
|
+
export declare const MobileNavSlider: StyledMobileNavSlider;
|
|
13
|
+
type StyledMobilePageHeader = StyledComponent<{
|
|
11
14
|
as?: React.ElementType;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
theme?: Theme;
|
|
16
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
17
|
+
export declare const MobilePageHeader: StyledMobilePageHeader;
|
|
18
|
+
type StyledMobilePageHeaderContent = StyledComponent<{
|
|
15
19
|
as?: React.ElementType;
|
|
20
|
+
theme?: Theme;
|
|
16
21
|
} & {
|
|
17
22
|
topOffset: number | undefined;
|
|
18
|
-
},
|
|
19
|
-
export declare const
|
|
20
|
-
|
|
23
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
+
export declare const MobilePageHeaderContent: StyledMobilePageHeaderContent;
|
|
25
|
+
type StyledFakeBlanket = StyledComponent<{
|
|
21
26
|
as?: React.ElementType;
|
|
27
|
+
theme?: Theme;
|
|
22
28
|
} & {
|
|
23
29
|
isOpen: boolean;
|
|
24
|
-
},
|
|
25
|
-
export declare const
|
|
26
|
-
|
|
30
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
31
|
+
export declare const FakeBlanket: StyledFakeBlanket;
|
|
32
|
+
type StyledPageHeading = StyledComponent<{
|
|
27
33
|
as?: React.ElementType;
|
|
28
|
-
|
|
34
|
+
theme?: Theme;
|
|
35
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
|
|
36
|
+
export declare const PageHeading: StyledPageHeading;
|
|
37
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/mobile-header",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.29",
|
|
4
4
|
"description": "A React component rendering a mobile header",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/button": "^23.9.0",
|
|
32
|
-
"@atlaskit/icon": "^
|
|
32
|
+
"@atlaskit/icon": "^31.0.0",
|
|
33
33
|
"@atlaskit/theme": "^21.0.0",
|
|
34
|
-
"@atlaskit/tokens": "^
|
|
34
|
+
"@atlaskit/tokens": "^11.0.0",
|
|
35
35
|
"@babel/runtime": "^7.0.0",
|
|
36
36
|
"@emotion/styled": "^11.0.0"
|
|
37
37
|
},
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"react": "^18.2.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@atlassian/a11y-jest-testing": "^0.
|
|
43
|
+
"@atlassian/a11y-jest-testing": "^0.10.0",
|
|
44
44
|
"@testing-library/react": "^16.3.0",
|
|
45
45
|
"@testing-library/user-event": "^14.4.3",
|
|
46
46
|
"react-dom": "^18.2.0",
|