carbon-react 102.22.0 → 102.22.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.
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
export default Loader;
|
|
2
|
-
declare function Loader({ isInsideButton, isActive, size, ...rest }: {
|
|
2
|
+
declare function Loader({ "aria-label": ariaLabel, isInsideButton, isActive, size, ...rest }: {
|
|
3
3
|
[x: string]: any;
|
|
4
|
+
"aria-label": any;
|
|
4
5
|
isInsideButton: any;
|
|
5
6
|
isActive: any;
|
|
6
7
|
size: any;
|
|
7
8
|
}): JSX.Element;
|
|
8
9
|
declare namespace Loader {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
const defaultProps: {
|
|
11
|
+
size: string;
|
|
12
|
+
isInsideButton: boolean;
|
|
13
|
+
isActive: boolean;
|
|
14
|
+
"aria-label": string;
|
|
15
|
+
};
|
|
16
|
+
const propTypes: {
|
|
17
|
+
/** Specify an aria-label for the Loader component */
|
|
18
|
+
"aria-label": PropTypes.Requireable<string>;
|
|
19
|
+
/** Size of the loader. */
|
|
20
|
+
size: PropTypes.Requireable<string>;
|
|
21
|
+
/** Applies white color. */
|
|
22
|
+
isInsideButton: PropTypes.Requireable<boolean>;
|
|
23
|
+
/** Applies slate color. Available only when isInsideButton is true. */
|
|
24
|
+
isActive: PropTypes.Requireable<boolean>;
|
|
25
|
+
};
|
|
22
26
|
}
|
|
23
27
|
import PropTypes from "prop-types";
|
|
@@ -26,12 +26,16 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
26
26
|
const marginPropTypes = (0, _utils.filterStyledSystemMarginProps)(_propTypes2.default.space);
|
|
27
27
|
|
|
28
28
|
const Loader = ({
|
|
29
|
+
"aria-label": ariaLabel,
|
|
29
30
|
isInsideButton,
|
|
30
31
|
isActive,
|
|
31
32
|
size,
|
|
32
33
|
...rest
|
|
33
34
|
}) => {
|
|
34
|
-
return /*#__PURE__*/_react.default.createElement(_loader.default, _extends({
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_loader.default, _extends({
|
|
36
|
+
"aria-label": ariaLabel,
|
|
37
|
+
role: "progressbar"
|
|
38
|
+
}, (0, _tags.default)("loader", rest), rest), /*#__PURE__*/_react.default.createElement(_loaderSquare.default, {
|
|
35
39
|
isInsideButton: isInsideButton,
|
|
36
40
|
isActive: isActive,
|
|
37
41
|
size: size
|
|
@@ -49,10 +53,14 @@ const Loader = ({
|
|
|
49
53
|
Loader.defaultProps = {
|
|
50
54
|
size: "medium",
|
|
51
55
|
isInsideButton: false,
|
|
52
|
-
isActive: true
|
|
56
|
+
isActive: true,
|
|
57
|
+
"aria-label": "loader"
|
|
53
58
|
};
|
|
54
59
|
Loader.propTypes = { ...marginPropTypes,
|
|
55
60
|
|
|
61
|
+
/** Specify an aria-label for the Loader component */
|
|
62
|
+
"aria-label": _propTypes.default.string,
|
|
63
|
+
|
|
56
64
|
/** Size of the loader. */
|
|
57
65
|
size: _propTypes.default.oneOf(["small", "medium", "large"]),
|
|
58
66
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { MarginProps } from "styled-system";
|
|
2
2
|
|
|
3
3
|
export interface LoaderProps extends MarginProps {
|
|
4
|
+
/** Specify an aria-label for the Loader component */
|
|
5
|
+
"aria-label"?: string;
|
|
4
6
|
/** Size of the loader. */
|
|
5
7
|
size?: "small" | "medium" | "large";
|
|
6
8
|
/** Applies white color. */
|