carbon-react 112.0.2 → 112.0.3

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.
@@ -5,11 +5,13 @@ export interface PageProps extends PaddingProps {
5
5
  title: React.ReactNode;
6
6
  /** This component supports children. */
7
7
  children: React.ReactNode;
8
+ /** The ARIA role to be applied to the component */
9
+ role?: string;
8
10
  /** @ignore @private */
9
11
  transitionName?: () => string;
10
12
  }
11
13
  declare const Page: {
12
- ({ title, children, ...rest }: PageProps): JSX.Element;
14
+ ({ role, title, children, ...rest }: PageProps): JSX.Element;
13
15
  displayName: string;
14
16
  };
15
17
  export default Page;
@@ -10,6 +10,7 @@ import { StyledPage, StyledPageContent } from "./page.style";
10
10
  import { filterStyledSystemPaddingProps } from "../../../style/utils";
11
11
 
12
12
  const Page = ({
13
+ role,
13
14
  title,
14
15
  children,
15
16
  ...rest
@@ -30,7 +31,8 @@ const Page = ({
30
31
  }, {
31
32
  nodeRef: styledPageNodeRef
32
33
  }, rest), /*#__PURE__*/React.createElement(StyledPage, _extends({}, tagComponent("page", rest), {
33
- ref: styledPageNodeRef
34
+ ref: styledPageNodeRef,
35
+ role: role
34
36
  }), /*#__PURE__*/React.createElement(FullScreenHeading, {
35
37
  hasContent: true
36
38
  }, title), /*#__PURE__*/React.createElement(StyledPageContent, _extends({
@@ -201,6 +203,7 @@ Page.propTypes = {
201
203
  "toString": PropTypes.func.isRequired,
202
204
  "valueOf": PropTypes.func.isRequired
203
205
  }), PropTypes.string]),
206
+ "role": PropTypes.string,
204
207
  "title": PropTypes.node,
205
208
  "transitionName": PropTypes.func
206
209
  };
@@ -1,3 +1,3 @@
1
- declare const StyledPage: import("styled-components").StyledComponent<"article", any, {}, never>;
1
+ declare const StyledPage: import("styled-components").StyledComponent<"div", any, {}, never>;
2
2
  declare const StyledPageContent: import("styled-components").StyledComponent<"div", any, {}, never>;
3
3
  export { StyledPage, StyledPageContent };
@@ -1,7 +1,7 @@
1
1
  import styled from "styled-components";
2
2
  import { padding } from "styled-system";
3
3
  import BaseTheme from "../../../style/themes/base";
4
- const StyledPage = styled.article`
4
+ const StyledPage = styled.div`
5
5
  width: 100%;
6
6
  height: 100%;
7
7
  `;
@@ -5,11 +5,13 @@ export interface PageProps extends PaddingProps {
5
5
  title: React.ReactNode;
6
6
  /** This component supports children. */
7
7
  children: React.ReactNode;
8
+ /** The ARIA role to be applied to the component */
9
+ role?: string;
8
10
  /** @ignore @private */
9
11
  transitionName?: () => string;
10
12
  }
11
13
  declare const Page: {
12
- ({ title, children, ...rest }: PageProps): JSX.Element;
14
+ ({ role, title, children, ...rest }: PageProps): JSX.Element;
13
15
  displayName: string;
14
16
  };
15
17
  export default Page;
@@ -30,6 +30,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
30
30
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
31
31
 
32
32
  const Page = ({
33
+ role,
33
34
  title,
34
35
  children,
35
36
  ...rest
@@ -50,7 +51,8 @@ const Page = ({
50
51
  }, {
51
52
  nodeRef: styledPageNodeRef
52
53
  }, rest), /*#__PURE__*/_react.default.createElement(_page.StyledPage, _extends({}, (0, _tags.default)("page", rest), {
53
- ref: styledPageNodeRef
54
+ ref: styledPageNodeRef,
55
+ role: role
54
56
  }), /*#__PURE__*/_react.default.createElement(_fullScreenHeading.default, {
55
57
  hasContent: true
56
58
  }, title), /*#__PURE__*/_react.default.createElement(_page.StyledPageContent, _extends({
@@ -221,6 +223,7 @@ Page.propTypes = {
221
223
  "toString": _propTypes.default.func.isRequired,
222
224
  "valueOf": _propTypes.default.func.isRequired
223
225
  }), _propTypes.default.string]),
226
+ "role": _propTypes.default.string,
224
227
  "title": _propTypes.default.node,
225
228
  "transitionName": _propTypes.default.func
226
229
  };
@@ -1,3 +1,3 @@
1
- declare const StyledPage: import("styled-components").StyledComponent<"article", any, {}, never>;
1
+ declare const StyledPage: import("styled-components").StyledComponent<"div", any, {}, never>;
2
2
  declare const StyledPageContent: import("styled-components").StyledComponent<"div", any, {}, never>;
3
3
  export { StyledPage, StyledPageContent };
@@ -13,7 +13,7 @@ var _base = _interopRequireDefault(require("../../../style/themes/base"));
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
- const StyledPage = _styledComponents.default.article`
16
+ const StyledPage = _styledComponents.default.div`
17
17
  width: 100%;
18
18
  height: 100%;
19
19
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "112.0.2",
3
+ "version": "112.0.3",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",