@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 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
@@ -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)();
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/heading",
3
- "version": "1.1.4",
3
+ "version": "1.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -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();
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/heading",
3
- "version": "1.1.4",
3
+ "version": "1.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -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();
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/heading",
3
- "version": "1.1.4",
3
+ "version": "1.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -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.4",
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.5.0",
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
@@ -24,6 +24,8 @@ export default Heading;
24
24
 
25
25
  // @public (undocumented)
26
26
  interface HeadingContextProps {
27
+ // (undocumented)
28
+ children: ReactNode;
27
29
  value?: HeadingElement;
28
30
  }
29
31
 
@@ -13,6 +13,8 @@ export default Heading;
13
13
 
14
14
  // @public (undocumented)
15
15
  interface HeadingContextProps {
16
+ // (undocumented)
17
+ children: ReactNode;
16
18
  value?: HeadingElement;
17
19
  }
18
20