carbon-react 102.13.0 → 102.15.0
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/lib/__internal__/input/input-presentation.style.d.ts +0 -1
- package/lib/__internal__/input/input-presentation.style.js +15 -23
- package/lib/__internal__/input/input-sizes.style.d.ts +0 -15
- package/lib/__internal__/input/input-sizes.style.js +6 -15
- package/lib/__internal__/input/input.style.js +7 -20
- package/lib/__internal__/input-icon-toggle/input-icon-toggle.style.js +2 -2
- package/lib/components/card/card-column/card-column.style.js +2 -6
- package/lib/components/card/card-footer/card-footer.style.js +2 -3
- package/lib/components/card/card-row/card-row.style.js +1 -3
- package/lib/components/card/card.style.js +5 -12
- package/lib/components/dialog-full-screen/dialog-full-screen.component.js +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export const StyledInputPresentationContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export default InputPresentationStyle;
|
|
3
3
|
declare const InputPresentationStyle: import("styled-components").StyledComponent<"div", any, {
|
|
4
|
-
theme: any;
|
|
5
4
|
error: any;
|
|
6
5
|
warning: any;
|
|
7
6
|
info: any;
|
|
@@ -9,8 +9,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var _base = _interopRequireDefault(require("../../style/themes/base"));
|
|
13
|
-
|
|
14
12
|
var _inputSizes = _interopRequireDefault(require("./input-sizes.style"));
|
|
15
13
|
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -30,9 +28,7 @@ exports.StyledInputPresentationContainer = StyledInputPresentationContainer;
|
|
|
30
28
|
const InputPresentationStyle = _styledComponents.default.div`
|
|
31
29
|
align-items: stretch;
|
|
32
30
|
background: #fff;
|
|
33
|
-
border: 1px solid
|
|
34
|
-
theme
|
|
35
|
-
}) => theme.colors.border};
|
|
31
|
+
border: 1px solid var(--colorsUtilityMajor300);
|
|
36
32
|
box-sizing: border-box;
|
|
37
33
|
cursor: text;
|
|
38
34
|
display: flex;
|
|
@@ -50,20 +46,19 @@ const InputPresentationStyle = _styledComponents.default.div`
|
|
|
50
46
|
}) => _inputSizes.default[size].horizontalPadding};
|
|
51
47
|
|
|
52
48
|
${({
|
|
53
|
-
disabled
|
|
54
|
-
theme
|
|
49
|
+
disabled
|
|
55
50
|
}) => disabled && (0, _styledComponents.css)`
|
|
56
|
-
background:
|
|
57
|
-
border-color:
|
|
51
|
+
background: var(--colorsUtilityDisabled400);
|
|
52
|
+
border-color: var(--colorsUtilityDisabled600);
|
|
58
53
|
cursor: not-allowed;
|
|
59
54
|
`}
|
|
60
55
|
|
|
61
56
|
${({
|
|
62
57
|
hasFocus,
|
|
63
|
-
|
|
64
|
-
}) => hasFocus && (0, _styledComponents.css)`
|
|
65
|
-
|
|
66
|
-
outline: 3px solid
|
|
58
|
+
disabled
|
|
59
|
+
}) => hasFocus && !disabled && (0, _styledComponents.css)`
|
|
60
|
+
& {
|
|
61
|
+
outline: 3px solid var(--colorsSemanticFocus500);
|
|
67
62
|
z-index: 2;
|
|
68
63
|
}
|
|
69
64
|
`}
|
|
@@ -71,11 +66,10 @@ const InputPresentationStyle = _styledComponents.default.div`
|
|
|
71
66
|
${stylingForValidations}
|
|
72
67
|
|
|
73
68
|
${({
|
|
74
|
-
readOnly
|
|
75
|
-
theme
|
|
69
|
+
readOnly
|
|
76
70
|
}) => readOnly && (0, _styledComponents.css)`
|
|
77
|
-
background-color:
|
|
78
|
-
border-color:
|
|
71
|
+
background-color: var(--colorsUtilityReadOnly400);
|
|
72
|
+
border-color: var(--colorsUtilityReadOnly600);
|
|
79
73
|
`}
|
|
80
74
|
|
|
81
75
|
${({
|
|
@@ -91,7 +85,6 @@ const InputPresentationStyle = _styledComponents.default.div`
|
|
|
91
85
|
`;
|
|
92
86
|
|
|
93
87
|
function stylingForValidations({
|
|
94
|
-
theme,
|
|
95
88
|
error,
|
|
96
89
|
warning,
|
|
97
90
|
info,
|
|
@@ -104,11 +97,11 @@ function stylingForValidations({
|
|
|
104
97
|
}
|
|
105
98
|
|
|
106
99
|
if (error) {
|
|
107
|
-
validationColor =
|
|
100
|
+
validationColor = "var(--colorsSemanticNegative500)";
|
|
108
101
|
} else if (warning) {
|
|
109
|
-
validationColor =
|
|
102
|
+
validationColor = "var(--colorsSemanticCaution500)";
|
|
110
103
|
} else if (info) {
|
|
111
|
-
validationColor =
|
|
104
|
+
validationColor = "var(--colorsSemanticInfo500)";
|
|
112
105
|
} else {
|
|
113
106
|
return "";
|
|
114
107
|
}
|
|
@@ -121,8 +114,7 @@ function stylingForValidations({
|
|
|
121
114
|
}
|
|
122
115
|
|
|
123
116
|
InputPresentationStyle.defaultProps = {
|
|
124
|
-
size: "medium"
|
|
125
|
-
theme: _base.default
|
|
117
|
+
size: "medium"
|
|
126
118
|
};
|
|
127
119
|
InputPresentationStyle.propTypes = {
|
|
128
120
|
align: _propTypes.default.string,
|
|
@@ -1,34 +1,19 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
2
|
namespace small {
|
|
3
3
|
const height: string;
|
|
4
|
-
const verticalPadding: string;
|
|
5
4
|
const horizontalPadding: string;
|
|
6
|
-
const tooltipVerticalOffset: number;
|
|
7
|
-
const tooltipHorizontalOffset: number;
|
|
8
5
|
}
|
|
9
6
|
namespace medium {
|
|
10
7
|
const height_1: string;
|
|
11
8
|
export { height_1 as height };
|
|
12
|
-
const verticalPadding_1: string;
|
|
13
|
-
export { verticalPadding_1 as verticalPadding };
|
|
14
9
|
const horizontalPadding_1: string;
|
|
15
10
|
export { horizontalPadding_1 as horizontalPadding };
|
|
16
|
-
const tooltipVerticalOffset_1: number;
|
|
17
|
-
export { tooltipVerticalOffset_1 as tooltipVerticalOffset };
|
|
18
|
-
const tooltipHorizontalOffset_1: number;
|
|
19
|
-
export { tooltipHorizontalOffset_1 as tooltipHorizontalOffset };
|
|
20
11
|
}
|
|
21
12
|
namespace large {
|
|
22
13
|
const height_2: string;
|
|
23
14
|
export { height_2 as height };
|
|
24
|
-
const verticalPadding_2: string;
|
|
25
|
-
export { verticalPadding_2 as verticalPadding };
|
|
26
15
|
const horizontalPadding_2: string;
|
|
27
16
|
export { horizontalPadding_2 as horizontalPadding };
|
|
28
|
-
const tooltipVerticalOffset_2: number;
|
|
29
|
-
export { tooltipVerticalOffset_2 as tooltipVerticalOffset };
|
|
30
|
-
const tooltipHorizontalOffset_2: number;
|
|
31
|
-
export { tooltipHorizontalOffset_2 as tooltipHorizontalOffset };
|
|
32
17
|
}
|
|
33
18
|
}
|
|
34
19
|
export default _default;
|
|
@@ -6,25 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _default = {
|
|
8
8
|
small: {
|
|
9
|
-
height: "
|
|
10
|
-
|
|
11
|
-
horizontalPadding: "8px",
|
|
12
|
-
tooltipVerticalOffset: 3,
|
|
13
|
-
tooltipHorizontalOffset: 1
|
|
9
|
+
height: "var(--sizing400)",
|
|
10
|
+
horizontalPadding: "var(--spacing100)"
|
|
14
11
|
},
|
|
15
12
|
medium: {
|
|
16
|
-
height: "
|
|
17
|
-
|
|
18
|
-
horizontalPadding: "11px",
|
|
19
|
-
tooltipVerticalOffset: 6,
|
|
20
|
-
tooltipHorizontalOffset: 4
|
|
13
|
+
height: "var(--sizing500)",
|
|
14
|
+
horizontalPadding: "var(--spacing150)"
|
|
21
15
|
},
|
|
22
16
|
large: {
|
|
23
|
-
height: "
|
|
24
|
-
|
|
25
|
-
horizontalPadding: "13px",
|
|
26
|
-
tooltipVerticalOffset: 10,
|
|
27
|
-
tooltipHorizontalOffset: 6
|
|
17
|
+
height: "var(--sizing600)",
|
|
18
|
+
horizontalPadding: "var(--spacing200)"
|
|
28
19
|
}
|
|
29
20
|
};
|
|
30
21
|
exports.default = _default;
|
|
@@ -9,8 +9,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var _base = _interopRequireDefault(require("../../style/themes/base"));
|
|
13
|
-
|
|
14
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
13
|
|
|
16
14
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
@@ -20,13 +18,9 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
20
18
|
const StyledInput = _styledComponents.default.input`
|
|
21
19
|
background: transparent;
|
|
22
20
|
border: none;
|
|
23
|
-
color:
|
|
24
|
-
theme
|
|
25
|
-
}) => theme.text.color};
|
|
21
|
+
color: var(--colorsUtilityYin090);
|
|
26
22
|
flex-grow: 1;
|
|
27
|
-
font-size:
|
|
28
|
-
theme
|
|
29
|
-
}) => theme.text.size};
|
|
23
|
+
font-size: var(--fontSizes100);
|
|
30
24
|
outline: none;
|
|
31
25
|
padding: 0;
|
|
32
26
|
margin: 0;
|
|
@@ -44,29 +38,22 @@ const StyledInput = _styledComponents.default.input`
|
|
|
44
38
|
`}
|
|
45
39
|
|
|
46
40
|
&::placeholder {
|
|
47
|
-
color:
|
|
48
|
-
theme
|
|
49
|
-
}) => theme.text.placeholder};
|
|
41
|
+
color: var(--colorsUtilityYin030);
|
|
50
42
|
}
|
|
51
43
|
|
|
52
44
|
${({
|
|
53
|
-
disabled
|
|
54
|
-
theme
|
|
45
|
+
disabled
|
|
55
46
|
}) => disabled && (0, _styledComponents.css)`
|
|
56
|
-
color:
|
|
47
|
+
color: var(--colorsUtilityYin030);
|
|
57
48
|
cursor: not-allowed;
|
|
58
49
|
`}
|
|
59
50
|
|
|
60
51
|
${({
|
|
61
|
-
readOnly
|
|
62
|
-
theme
|
|
52
|
+
readOnly
|
|
63
53
|
}) => readOnly && (0, _styledComponents.css)`
|
|
64
|
-
color:
|
|
54
|
+
color: var(--colorsActionMinorYin090);
|
|
65
55
|
`}
|
|
66
56
|
`;
|
|
67
|
-
StyledInput.defaultProps = {
|
|
68
|
-
theme: _base.default
|
|
69
|
-
};
|
|
70
57
|
StyledInput.propTypes = {
|
|
71
58
|
disabled: _propTypes.default.bool
|
|
72
59
|
};
|
|
@@ -39,8 +39,8 @@ const InputIconToggleStyle = _styledComponents.default.span.attrs(({
|
|
|
39
39
|
${({
|
|
40
40
|
size
|
|
41
41
|
}) => (0, _styledComponents.css)`
|
|
42
|
-
margin-right:
|
|
43
|
-
margin-left:
|
|
42
|
+
margin-right: calc(-1 * ${_inputSizes.default[size].horizontalPadding});
|
|
43
|
+
margin-left: calc(-1 * ${_inputSizes.default[size].horizontalPadding});
|
|
44
44
|
width: ${_inputSizes.default[size].height};
|
|
45
45
|
`}
|
|
46
46
|
|
|
@@ -9,8 +9,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var _base = _interopRequireDefault(require("../../../style/themes/base"));
|
|
13
|
-
|
|
14
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
13
|
|
|
16
14
|
const StyledCardColumn = _styledComponents.default.div`
|
|
@@ -20,12 +18,10 @@ const StyledCardColumn = _styledComponents.default.div`
|
|
|
20
18
|
}) => align};
|
|
21
19
|
`;
|
|
22
20
|
StyledCardColumn.propTypes = {
|
|
23
|
-
align: _propTypes.default.oneOf(["center", "left", "right"])
|
|
24
|
-
theme: _propTypes.default.object
|
|
21
|
+
align: _propTypes.default.oneOf(["center", "left", "right"])
|
|
25
22
|
};
|
|
26
23
|
StyledCardColumn.defaultProps = {
|
|
27
|
-
align: "center"
|
|
28
|
-
theme: _base.default
|
|
24
|
+
align: "center"
|
|
29
25
|
};
|
|
30
26
|
var _default = StyledCardColumn;
|
|
31
27
|
exports.default = _default;
|
|
@@ -38,11 +38,10 @@ const StyledCardFooter = _styledComponents.default.div`
|
|
|
38
38
|
|
|
39
39
|
${({
|
|
40
40
|
spacing,
|
|
41
|
-
theme,
|
|
42
41
|
variant
|
|
43
42
|
}) => (0, _styledComponents.css)`
|
|
44
|
-
background-color: ${variant === "transparent" ? "transparent" :
|
|
45
|
-
border-top:
|
|
43
|
+
background-color: ${variant === "transparent" ? "transparent" : "var(--colorsUtilityMajor025)"};
|
|
44
|
+
border-top: var(--colorsUtilityMajor100);
|
|
46
45
|
border-top-width: 1px;
|
|
47
46
|
border-top-style: solid;
|
|
48
47
|
font-size: 14px;
|
|
@@ -13,8 +13,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _base = _interopRequireDefault(require("../../../style/themes/base"));
|
|
15
15
|
|
|
16
|
-
var _card = require("../card.config");
|
|
17
|
-
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
|
|
20
18
|
const StyledCardRow = _styledComponents.default.div`
|
|
@@ -22,7 +20,7 @@ const StyledCardRow = _styledComponents.default.div`
|
|
|
22
20
|
display: flex;
|
|
23
21
|
`;
|
|
24
22
|
StyledCardRow.propTypes = {
|
|
25
|
-
|
|
23
|
+
theme: _propTypes.default.object
|
|
26
24
|
};
|
|
27
25
|
StyledCardRow.defaultProps = {
|
|
28
26
|
theme: _base.default
|
|
@@ -31,13 +31,12 @@ const StyledCard = _styledComponents.default.div`
|
|
|
31
31
|
cardWidth,
|
|
32
32
|
interactive,
|
|
33
33
|
draggable,
|
|
34
|
-
spacing
|
|
35
|
-
theme
|
|
34
|
+
spacing
|
|
36
35
|
}) => (0, _styledComponents.css)`
|
|
37
|
-
background-color:
|
|
36
|
+
background-color: var(--colorsUtilityYang100);
|
|
38
37
|
border: none;
|
|
39
|
-
box-shadow:
|
|
40
|
-
color:
|
|
38
|
+
box-shadow: var(--boxShadow050);
|
|
39
|
+
color: var(--colorsUtilityYin090);
|
|
41
40
|
margin: 25px;
|
|
42
41
|
padding: ${paddingSizes[spacing]};
|
|
43
42
|
transition: all 0.3s ease-in-out;
|
|
@@ -51,7 +50,7 @@ const StyledCard = _styledComponents.default.div`
|
|
|
51
50
|
|
|
52
51
|
:hover,
|
|
53
52
|
:focus {
|
|
54
|
-
box-shadow:
|
|
53
|
+
box-shadow: var(--boxShadow100);
|
|
55
54
|
}
|
|
56
55
|
`}
|
|
57
56
|
|
|
@@ -59,11 +58,6 @@ const StyledCard = _styledComponents.default.div`
|
|
|
59
58
|
cursor: move;
|
|
60
59
|
`}
|
|
61
60
|
|
|
62
|
-
/* Fix for IE specific box-shadow display */
|
|
63
|
-
@media all and (-ms-high-contrast: none) {
|
|
64
|
-
box-shadow: ${theme.shadows.cardsIE};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
61
|
::-moz-focus-inner {
|
|
68
62
|
border: 0;
|
|
69
63
|
}
|
|
@@ -75,7 +69,6 @@ StyledCard.defaultProps = {
|
|
|
75
69
|
theme: _base.default
|
|
76
70
|
};
|
|
77
71
|
StyledCard.propTypes = {
|
|
78
|
-
border: _propTypes.default.bool,
|
|
79
72
|
cardWidth: _propTypes.default.string,
|
|
80
73
|
interactive: _propTypes.default.bool,
|
|
81
74
|
draggable: _propTypes.default.bool,
|
|
@@ -95,6 +95,7 @@ const DialogFullScreen = ({
|
|
|
95
95
|
focusFirstElement: focusFirstElement,
|
|
96
96
|
wrapperRef: dialogRef
|
|
97
97
|
}, /*#__PURE__*/_react.default.createElement(_dialogFullScreen.default, {
|
|
98
|
+
"aria-modal": true,
|
|
98
99
|
"aria-describedby": ariaDescribedBy,
|
|
99
100
|
"aria-label": ariaLabel,
|
|
100
101
|
"aria-labelledby": ariaLabelledBy || "carbon-dialog-title",
|