@atlaskit/heading 0.1.15 → 0.1.17
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 +13 -0
- package/dist/cjs/heading.js +15 -15
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/heading.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/heading.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types-ts4.0/heading.d.ts +20 -0
- package/dist/types-ts4.0/index.d.ts +2 -0
- package/dist/types-ts4.0/types.d.ts +26 -0
- package/dist/types-ts4.0/utils.d.ts +1 -0
- package/package.json +13 -5
- package/report.api.md +13 -39
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/heading
|
|
2
2
|
|
|
3
|
+
## 0.1.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
|
|
8
|
+
|
|
9
|
+
## 0.1.16
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`30b11aab9fb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/30b11aab9fb) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 0.1.15
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/cjs/heading.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
9
|
|
|
10
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
11
|
|
|
@@ -25,59 +25,59 @@ var levelMap = {
|
|
|
25
25
|
h200: 'div',
|
|
26
26
|
h100: 'div'
|
|
27
27
|
};
|
|
28
|
-
var headingResetStyles = (0,
|
|
28
|
+
var headingResetStyles = (0, _react.css)({
|
|
29
29
|
margin: 0
|
|
30
30
|
});
|
|
31
|
-
var h900Styles = (0,
|
|
31
|
+
var h900Styles = (0, _react.css)({
|
|
32
32
|
fontSize: 35,
|
|
33
33
|
fontWeight: 500,
|
|
34
34
|
letterSpacing: '-0.01em',
|
|
35
35
|
lineHeight: (0, _utils.lh)(35, 40)
|
|
36
36
|
});
|
|
37
|
-
var h800Styles = (0,
|
|
37
|
+
var h800Styles = (0, _react.css)({
|
|
38
38
|
fontSize: 29,
|
|
39
39
|
fontWeight: 600,
|
|
40
40
|
letterSpacing: '-0.01em',
|
|
41
41
|
lineHeight: (0, _utils.lh)(29, 32)
|
|
42
42
|
});
|
|
43
|
-
var h700Styles = (0,
|
|
43
|
+
var h700Styles = (0, _react.css)({
|
|
44
44
|
fontSize: 24,
|
|
45
45
|
fontWeight: 500,
|
|
46
46
|
letterSpacing: '-0.01em',
|
|
47
47
|
lineHeight: (0, _utils.lh)(24, 28)
|
|
48
48
|
});
|
|
49
|
-
var h600Styles = (0,
|
|
49
|
+
var h600Styles = (0, _react.css)({
|
|
50
50
|
fontSize: 20,
|
|
51
51
|
fontWeight: 500,
|
|
52
52
|
letterSpacing: '-0.008em',
|
|
53
53
|
lineHeight: (0, _utils.lh)(20, 24)
|
|
54
54
|
});
|
|
55
|
-
var h500Styles = (0,
|
|
55
|
+
var h500Styles = (0, _react.css)({
|
|
56
56
|
fontSize: 16,
|
|
57
57
|
fontWeight: 600,
|
|
58
58
|
letterSpacing: '-0.006em',
|
|
59
59
|
lineHeight: (0, _utils.lh)(16, 20)
|
|
60
60
|
});
|
|
61
|
-
var h400Styles = (0,
|
|
61
|
+
var h400Styles = (0, _react.css)({
|
|
62
62
|
fontSize: 14,
|
|
63
63
|
fontWeight: 600,
|
|
64
64
|
letterSpacing: '-0.003em',
|
|
65
65
|
lineHeight: (0, _utils.lh)(14, 16)
|
|
66
66
|
});
|
|
67
|
-
var h300Styles = (0,
|
|
67
|
+
var h300Styles = (0, _react.css)({
|
|
68
68
|
fontSize: 12,
|
|
69
69
|
fontWeight: 600,
|
|
70
70
|
letterSpacing: 0,
|
|
71
71
|
lineHeight: (0, _utils.lh)(12, 16),
|
|
72
72
|
textTransform: 'uppercase'
|
|
73
73
|
});
|
|
74
|
-
var h200Styles = (0,
|
|
74
|
+
var h200Styles = (0, _react.css)({
|
|
75
75
|
fontSize: 12,
|
|
76
76
|
fontWeight: 600,
|
|
77
77
|
letterSpacing: 0,
|
|
78
78
|
lineHeight: (0, _utils.lh)(12, 16)
|
|
79
79
|
});
|
|
80
|
-
var h100Styles = (0,
|
|
80
|
+
var h100Styles = (0, _react.css)({
|
|
81
81
|
fontSize: 11,
|
|
82
82
|
fontWeight: 700,
|
|
83
83
|
letterSpacing: 0,
|
|
@@ -95,13 +95,13 @@ var styleMap = {
|
|
|
95
95
|
h100: h100Styles
|
|
96
96
|
};
|
|
97
97
|
var colorStyleMap = {
|
|
98
|
-
default: (0,
|
|
98
|
+
default: (0, _react.css)({
|
|
99
99
|
color: "var(--ds-text, ".concat(_colors.N800, ")")
|
|
100
100
|
}),
|
|
101
|
-
inverse: (0,
|
|
101
|
+
inverse: (0, _react.css)({
|
|
102
102
|
color: "var(--ds-text-inverse, ".concat(_colors.N0, ")")
|
|
103
103
|
}),
|
|
104
|
-
subtlest: (0,
|
|
104
|
+
subtlest: (0, _react.css)({
|
|
105
105
|
color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")")
|
|
106
106
|
})
|
|
107
107
|
};
|
|
@@ -136,7 +136,7 @@ var Heading = function Heading(_ref) {
|
|
|
136
136
|
|
|
137
137
|
var Markup = as || levelMap[level];
|
|
138
138
|
var isSubtleHeading = level === 'h200' || level === 'h100';
|
|
139
|
-
return (0,
|
|
139
|
+
return (0, _react.jsx)(Markup, {
|
|
140
140
|
id: id,
|
|
141
141
|
"data-testid": testId,
|
|
142
142
|
css: [headingResetStyles, styleMap[level], color === 'inverse' && colorStyleMap.inverse, color === 'default' && isSubtleHeading && colorStyleMap.subtlest, color === 'default' && !isSubtleHeading && colorStyleMap.default]
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/heading.js
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/heading.js
CHANGED
package/dist/esm/version.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import type { HeadingProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* __Heading__
|
|
6
|
+
*
|
|
7
|
+
* A heading is a typography component used to display text in different sizes and formats.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
*
|
|
11
|
+
* ```jsx
|
|
12
|
+
* import Heading from '@atlaskit/heading';
|
|
13
|
+
*
|
|
14
|
+
* const H100 = () => (
|
|
15
|
+
* <Heading level="h100">h100</Heading>
|
|
16
|
+
* );
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare const Heading: FC<HeadingProps>;
|
|
20
|
+
export default Heading;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare type HeadingProps = {
|
|
3
|
+
/**
|
|
4
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
5
|
+
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
6
|
+
* serving as a hook for automated tests
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The text of the heading
|
|
11
|
+
*/
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* The headling level as defined by by the ADG
|
|
15
|
+
*/
|
|
16
|
+
level: 'h900' | 'h800' | 'h700' | 'h600' | 'h500' | 'h400' | 'h300' | 'h200' | 'h100';
|
|
17
|
+
id?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Allows the component to be rendered as the specified DOM Element
|
|
20
|
+
*/
|
|
21
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'span';
|
|
22
|
+
/**
|
|
23
|
+
* Text color of the heading.
|
|
24
|
+
*/
|
|
25
|
+
color?: 'inverse' | 'default';
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const lh: (sizePx: number, lineHeightPx: number) => number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/heading",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "A heading is a typography component used to display text in different sizes and formats.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -20,16 +20,23 @@
|
|
|
20
20
|
"module": "dist/esm/index.js",
|
|
21
21
|
"module:es2019": "dist/es2019/index.js",
|
|
22
22
|
"types": "dist/types/index.d.ts",
|
|
23
|
+
"typesVersions": {
|
|
24
|
+
">=4.0 <4.5": {
|
|
25
|
+
"*": [
|
|
26
|
+
"dist/types-ts4.0/*"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
23
30
|
"sideEffects": false,
|
|
24
31
|
"atlaskit:src": "src/index.tsx",
|
|
25
32
|
"af:exports": {
|
|
26
33
|
".": "./src/index.tsx"
|
|
27
34
|
},
|
|
28
35
|
"dependencies": {
|
|
29
|
-
"@atlaskit/theme": "^12.
|
|
36
|
+
"@atlaskit/theme": "^12.2.0",
|
|
30
37
|
"@atlaskit/tokens": "^0.10.0",
|
|
31
38
|
"@babel/runtime": "^7.0.0",
|
|
32
|
-
"@emotion/
|
|
39
|
+
"@emotion/react": "^11.7.1"
|
|
33
40
|
},
|
|
34
41
|
"peerDependencies": {
|
|
35
42
|
"react": "^16.8.0"
|
|
@@ -37,13 +44,14 @@
|
|
|
37
44
|
"devDependencies": {
|
|
38
45
|
"@atlaskit/button": "^16.3.0",
|
|
39
46
|
"@atlaskit/docs": "*",
|
|
47
|
+
"@atlaskit/ds-lib": "^2.0.1",
|
|
40
48
|
"@atlaskit/ssr": "*",
|
|
41
49
|
"@atlaskit/visual-regression": "*",
|
|
42
50
|
"@atlaskit/webdriver-runner": "*",
|
|
43
51
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
44
|
-
"@testing-library/react": "^
|
|
52
|
+
"@testing-library/react": "^12.1.5",
|
|
45
53
|
"react-dom": "^16.8.0",
|
|
46
|
-
"typescript": "4.
|
|
54
|
+
"typescript": "4.5.5",
|
|
47
55
|
"wait-for-expect": "^1.2.0"
|
|
48
56
|
},
|
|
49
57
|
"techstack": {
|
package/report.api.md
CHANGED
|
@@ -1,45 +1,25 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/heading"
|
|
1
|
+
## API Report File for "@atlaskit/heading"
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
4
8
|
|
|
5
9
|
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
```ts
|
|
8
12
|
import { FC } from 'react';
|
|
9
13
|
import { ReactNode } from 'react';
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
* A heading is a typography component used to display text in different sizes and formats.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
*
|
|
18
|
-
* ```jsx
|
|
19
|
-
* import Heading from '@atlaskit/heading';
|
|
20
|
-
*
|
|
21
|
-
* const H100 = () => (
|
|
22
|
-
* <Heading level="h100">h100</Heading>
|
|
23
|
-
* );
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
declare const Heading: FC<HeadingProps>;
|
|
15
|
+
// @public
|
|
16
|
+
const Heading: FC<HeadingProps>;
|
|
27
17
|
export default Heading;
|
|
28
18
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
* A `testId` prop is provided for specified elements, which is a unique
|
|
32
|
-
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
33
|
-
* serving as a hook for automated tests
|
|
34
|
-
*/
|
|
19
|
+
// @public (undocumented)
|
|
20
|
+
export type HeadingProps = {
|
|
35
21
|
testId?: string;
|
|
36
|
-
/**
|
|
37
|
-
* The text of the heading
|
|
38
|
-
*/
|
|
39
22
|
children: ReactNode;
|
|
40
|
-
/**
|
|
41
|
-
* The headling level as defined by by the ADG
|
|
42
|
-
*/
|
|
43
23
|
level:
|
|
44
24
|
| 'h900'
|
|
45
25
|
| 'h800'
|
|
@@ -51,15 +31,9 @@ export declare type HeadingProps = {
|
|
|
51
31
|
| 'h200'
|
|
52
32
|
| 'h100';
|
|
53
33
|
id?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Allows the component to be rendered as the specified DOM Element
|
|
56
|
-
*/
|
|
57
34
|
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'span';
|
|
58
|
-
/**
|
|
59
|
-
* Text color of the heading.
|
|
60
|
-
*/
|
|
61
35
|
color?: 'inverse' | 'default';
|
|
62
36
|
};
|
|
63
37
|
|
|
64
|
-
|
|
65
|
-
|
|
38
|
+
// (No @packageDocumentation comment for this package)
|
|
39
|
+
```
|