carbon-react 102.20.1 → 102.22.2
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/README.md +1 -1
- package/lib/__internal__/popover/popover.component.js +2 -6
- package/lib/components/heading/heading.style.d.ts +1 -2
- package/lib/components/hr/hr.component.d.ts +8 -12
- package/lib/components/hr/hr.component.js +677 -32
- package/lib/components/hr/hr.style.d.ts +2 -1
- package/lib/components/hr/index.d.ts +1 -1
- package/lib/components/loader/loader.component.d.ts +18 -14
- package/lib/components/loader/loader.component.js +10 -2
- package/lib/components/loader/loader.d.ts +2 -0
- package/lib/components/multi-action-button/multi-action-button.style.js +12 -16
- package/lib/components/navigation-bar/index.d.ts +1 -2
- package/lib/components/navigation-bar/navigation-bar.component.d.ts +17 -12
- package/lib/components/navigation-bar/navigation-bar.component.js +5403 -33
- package/lib/components/navigation-bar/navigation-bar.style.d.ts +10 -1
- package/lib/components/portal/portal.js +3 -6
- package/lib/components/split-button/split-button-children.style.js +7 -7
- package/lib/components/split-button/split-button-toggle.style.js +16 -7
- package/lib/components/split-button/split-button.style.js +1 -3
- package/lib/components/tooltip/tooltip.component.js +3 -7
- package/lib/hooks/__internal__/useIsAboveBreakpoint/index.d.ts +1 -1
- package/lib/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.d.ts +7 -5
- package/lib/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.js +11 -36
- package/lib/style/themes/base/index.d.ts +6 -1
- package/lib/style/themes/sage/index.d.ts +6 -0
- package/package.json +2 -2
- package/lib/components/hr/hr.d.ts +0 -12
- package/lib/components/navigation-bar/navigation-bar.d.ts +0 -15
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { MarginProps } from "styled-system";
|
|
2
|
+
declare const StyledHr: import("styled-components").StyledComponent<"hr", any, MarginProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>, never>;
|
|
1
3
|
export default StyledHr;
|
|
2
|
-
declare const StyledHr: import("styled-components").StyledComponent<"hr", any, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from "./hr";
|
|
1
|
+
export { default } from "./hr.component";
|
|
@@ -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. */
|
|
@@ -36,27 +36,24 @@ const StyledMultiActionButton = _styledComponents.default.div`
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
&:focus {
|
|
39
|
-
border: 3px solid
|
|
40
|
-
theme
|
|
41
|
-
}) => theme.colors.focus};
|
|
39
|
+
border: 3px solid var(--colorsSemanticFocus500);
|
|
42
40
|
outline: none;
|
|
43
41
|
margin: -1px;
|
|
44
42
|
}
|
|
45
43
|
|
|
46
44
|
${({
|
|
47
|
-
displayed
|
|
48
|
-
theme
|
|
45
|
+
displayed
|
|
49
46
|
}) => displayed && (0, _styledComponents.css)`
|
|
50
|
-
background-color:
|
|
51
|
-
border-color:
|
|
47
|
+
background-color: var(--colorsActionMajor700);
|
|
48
|
+
border-color: var(--colorsActionMajor700);
|
|
52
49
|
|
|
53
50
|
&,
|
|
54
51
|
${_icon.default} {
|
|
55
|
-
color:
|
|
52
|
+
color: var(--colorsActionMajorYang100);
|
|
56
53
|
}
|
|
57
54
|
|
|
58
55
|
&:focus {
|
|
59
|
-
border-color:
|
|
56
|
+
border-color: var(--colorsSemanticFocus500);
|
|
60
57
|
margin: 0 -1px;
|
|
61
58
|
}
|
|
62
59
|
`}
|
|
@@ -68,12 +65,13 @@ const StyledButtonChildrenContainer = _styledComponents.default.div`
|
|
|
68
65
|
theme,
|
|
69
66
|
align
|
|
70
67
|
}) => (0, _styledComponents.css)`
|
|
71
|
-
background-color:
|
|
68
|
+
background-color: var(--colorsActionMajorYang100);
|
|
72
69
|
min-width: ${({
|
|
73
70
|
minWidth
|
|
74
71
|
}) => minWidth}px;
|
|
75
72
|
white-space: nowrap;
|
|
76
73
|
z-index: ${theme.zIndex.popover};
|
|
74
|
+
box-shadow: var(--boxShadow100);
|
|
77
75
|
|
|
78
76
|
${_icon.default} {
|
|
79
77
|
margin-left: 0;
|
|
@@ -81,20 +79,18 @@ const StyledButtonChildrenContainer = _styledComponents.default.div`
|
|
|
81
79
|
}
|
|
82
80
|
|
|
83
81
|
${_button.default} {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
color: ${theme.colors.white};
|
|
82
|
+
border: 1px solid var(--colorsActionMajorTransparent);
|
|
83
|
+
color: var(--colorsActionMajor500);
|
|
87
84
|
display: block;
|
|
88
85
|
margin-left: 0;
|
|
89
|
-
margin-top: 3px;
|
|
90
|
-
margin-bottom: 3px;
|
|
91
86
|
min-width: 100%;
|
|
92
87
|
text-align: ${align};
|
|
93
88
|
z-index: ${theme.zIndex.overlay};
|
|
94
89
|
|
|
95
90
|
&:focus,
|
|
96
91
|
&:hover {
|
|
97
|
-
background-color:
|
|
92
|
+
background-color: var(--colorsActionMajor600);
|
|
93
|
+
color: var(--colorsActionMajorYang100);
|
|
98
94
|
}
|
|
99
95
|
|
|
100
96
|
& + & {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { default } from "./navigation-bar";
|
|
2
|
-
export * from "./navigation-bar";
|
|
1
|
+
export { default } from "./navigation-bar.component";
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
children
|
|
7
|
-
ariaLabel
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { PaddingProps, FlexboxProps } from "styled-system";
|
|
3
|
+
export declare type StickyPosition = "top" | "bottom";
|
|
4
|
+
export declare type NavigationType = "light" | "dark" | "white" | "black";
|
|
5
|
+
export interface NavigationBarProps extends PaddingProps, FlexboxProps {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
/** Color scheme of navigation component */
|
|
9
|
+
navigationType?: NavigationType;
|
|
10
|
+
/** If 'true' the children will not be visible */
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
/** Defines the position of sticky navigation bar */
|
|
13
|
+
stickyPosition?: StickyPosition;
|
|
14
|
+
/** Defines the offset of sticky navigation bar */
|
|
15
|
+
stickyOffset?: string;
|
|
13
16
|
}
|
|
17
|
+
export declare const NavigationBar: ({ navigationType, isLoading, children, ariaLabel, stickyOffset, stickyPosition, ...props }: NavigationBarProps) => JSX.Element;
|
|
18
|
+
export default NavigationBar;
|