carbon-react 112.0.1 → 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.
- package/esm/components/pages/page/page.component.d.ts +3 -1
- package/esm/components/pages/page/page.component.js +4 -1
- package/esm/components/pages/page/page.style.d.ts +1 -1
- package/esm/components/pages/page/page.style.js +1 -1
- package/esm/components/textbox/__internal__/prefix.style.d.ts +4 -1
- package/esm/components/textbox/__internal__/prefix.style.js +8 -1
- package/esm/components/textbox/textbox.component.js +2 -1
- package/lib/components/pages/page/page.component.d.ts +3 -1
- package/lib/components/pages/page/page.component.js +4 -1
- package/lib/components/pages/page/page.style.d.ts +1 -1
- package/lib/components/pages/page/page.style.js +1 -1
- package/lib/components/textbox/__internal__/prefix.style.d.ts +4 -1
- package/lib/components/textbox/__internal__/prefix.style.js +9 -1
- package/lib/components/textbox/textbox.component.js +2 -1
- package/package.json +1 -1
|
@@ -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<"
|
|
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,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { TextboxProps } from "../textbox.component";
|
|
2
|
+
declare const StyledPrefix: import("styled-components").StyledComponent<"span", any, {
|
|
3
|
+
size: NonNullable<TextboxProps["size"]>;
|
|
4
|
+
}, never>;
|
|
2
5
|
export default StyledPrefix;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
+
import InputSizes from "../../../__internal__/input/input-sizes.style";
|
|
2
3
|
const StyledPrefix = styled.span`
|
|
3
4
|
align-self: center;
|
|
4
5
|
font-weight: 900;
|
|
5
|
-
margin-
|
|
6
|
+
margin-left: ${({
|
|
7
|
+
size
|
|
8
|
+
}) => InputSizes[size].horizontalPadding}; // margin must match the original component padding
|
|
9
|
+
|
|
10
|
+
&& + input {
|
|
11
|
+
padding-left: var(--spacing100);
|
|
12
|
+
}
|
|
6
13
|
`;
|
|
7
14
|
export default StyledPrefix;
|
|
@@ -114,7 +114,8 @@ const Textbox = ({
|
|
|
114
114
|
positionedChildren: positionedChildren,
|
|
115
115
|
hasIcon: hasIconInside
|
|
116
116
|
}, leftChildren, prefix && /*#__PURE__*/React.createElement(StyledPrefix, {
|
|
117
|
-
"data-element": "textbox-prefix"
|
|
117
|
+
"data-element": "textbox-prefix",
|
|
118
|
+
size: size
|
|
118
119
|
}, prefix), /*#__PURE__*/React.createElement(Input, _extends({}, required && {
|
|
119
120
|
required
|
|
120
121
|
}, {
|
|
@@ -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<"
|
|
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.
|
|
16
|
+
const StyledPage = _styledComponents.default.div`
|
|
17
17
|
width: 100%;
|
|
18
18
|
height: 100%;
|
|
19
19
|
`;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { TextboxProps } from "../textbox.component";
|
|
2
|
+
declare const StyledPrefix: import("styled-components").StyledComponent<"span", any, {
|
|
3
|
+
size: NonNullable<TextboxProps["size"]>;
|
|
4
|
+
}, never>;
|
|
2
5
|
export default StyledPrefix;
|
|
@@ -7,12 +7,20 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
|
|
10
|
+
var _inputSizes = _interopRequireDefault(require("../../../__internal__/input/input-sizes.style"));
|
|
11
|
+
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
13
|
|
|
12
14
|
const StyledPrefix = _styledComponents.default.span`
|
|
13
15
|
align-self: center;
|
|
14
16
|
font-weight: 900;
|
|
15
|
-
margin-
|
|
17
|
+
margin-left: ${({
|
|
18
|
+
size
|
|
19
|
+
}) => _inputSizes.default[size].horizontalPadding}; // margin must match the original component padding
|
|
20
|
+
|
|
21
|
+
&& + input {
|
|
22
|
+
padding-left: var(--spacing100);
|
|
23
|
+
}
|
|
16
24
|
`;
|
|
17
25
|
var _default = StyledPrefix;
|
|
18
26
|
exports.default = _default;
|
|
@@ -144,7 +144,8 @@ const Textbox = ({
|
|
|
144
144
|
positionedChildren: positionedChildren,
|
|
145
145
|
hasIcon: hasIconInside
|
|
146
146
|
}, leftChildren, prefix && /*#__PURE__*/_react.default.createElement(_prefix.default, {
|
|
147
|
-
"data-element": "textbox-prefix"
|
|
147
|
+
"data-element": "textbox-prefix",
|
|
148
|
+
size: size
|
|
148
149
|
}, prefix), /*#__PURE__*/_react.default.createElement(_input.Input, _extends({}, required && {
|
|
149
150
|
required
|
|
150
151
|
}, {
|