@atlaskit/heading 1.1.4 → 1.2.1
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/heading.js +1 -1
- 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/heading-context.d.ts +2 -1
- package/package.json +2 -2
- package/report.api.md +2 -0
- package/tmp/api-report-tmp.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/heading
|
|
2
2
|
|
|
3
|
+
## 1.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e0460d5d989`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e0460d5d989) - Usages of `process` are now guarded by a `typeof` check.
|
|
8
|
+
|
|
9
|
+
## 1.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`261420360ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/261420360ec) - Upgrades component types to support React 18.
|
|
14
|
+
|
|
3
15
|
## 1.1.4
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/heading.js
CHANGED
|
@@ -111,7 +111,7 @@ var Heading = function Heading(_ref) {
|
|
|
111
111
|
as = _ref.as,
|
|
112
112
|
_ref$color = _ref.color,
|
|
113
113
|
color = _ref$color === void 0 ? 'default' : _ref$color;
|
|
114
|
-
if (process.env.NODE_ENV !== 'production' && as && typeof as !== 'string') {
|
|
114
|
+
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && as && typeof as !== 'string') {
|
|
115
115
|
throw new Error('`as` prop should be a string.');
|
|
116
116
|
}
|
|
117
117
|
var hLevel = (0, _headingContext.useHeadingElement)();
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/heading.js
CHANGED
|
@@ -105,7 +105,7 @@ const Heading = ({
|
|
|
105
105
|
as,
|
|
106
106
|
color = 'default'
|
|
107
107
|
}) => {
|
|
108
|
-
if (process.env.NODE_ENV !== 'production' && as && typeof as !== 'string') {
|
|
108
|
+
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && as && typeof as !== 'string') {
|
|
109
109
|
throw new Error('`as` prop should be a string.');
|
|
110
110
|
}
|
|
111
111
|
const hLevel = useHeadingElement();
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/heading.js
CHANGED
|
@@ -105,7 +105,7 @@ var Heading = function Heading(_ref) {
|
|
|
105
105
|
as = _ref.as,
|
|
106
106
|
_ref$color = _ref.color,
|
|
107
107
|
color = _ref$color === void 0 ? 'default' : _ref$color;
|
|
108
|
-
if (process.env.NODE_ENV !== 'production' && as && typeof as !== 'string') {
|
|
108
|
+
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && as && typeof as !== 'string') {
|
|
109
109
|
throw new Error('`as` prop should be a string.');
|
|
110
110
|
}
|
|
111
111
|
var hLevel = useHeadingElement();
|
package/dist/esm/version.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
2
|
declare type HeadingElement = 1 | 2 | 3 | 4 | 5 | 6;
|
|
3
3
|
export declare const useHeadingElement: () => HeadingElement;
|
|
4
4
|
export interface HeadingContextProps {
|
|
@@ -6,6 +6,7 @@ export interface HeadingContextProps {
|
|
|
6
6
|
* Optional - only apply this value if the intent is to reset the heading context outside the normal content flow, for example inside a `section`.
|
|
7
7
|
*/
|
|
8
8
|
value?: HeadingElement;
|
|
9
|
+
children: ReactNode;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
12
|
* __Heading context__
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/heading",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
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",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@atlaskit/button": "^16.
|
|
40
|
+
"@atlaskit/button": "^16.6.0",
|
|
41
41
|
"@atlaskit/docs": "*",
|
|
42
42
|
"@atlaskit/ds-explorations": "*",
|
|
43
43
|
"@atlaskit/ds-lib": "^2.0.1",
|
package/report.api.md
CHANGED