carbon-react 105.1.2 → 105.2.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/esm/__internal__/tooltip-provider/index.d.ts +19 -24
- package/esm/__internal__/tooltip-provider/index.js +0 -10
- package/esm/components/app-wrapper/app-wrapper.component.d.ts +4 -0
- package/esm/components/badge/badge.style.d.ts +4 -2
- package/esm/components/button/button-types.style.d.ts +1 -2
- package/esm/components/button/button-types.style.js +3 -1
- package/esm/components/button/button.component.d.ts +67 -36
- package/esm/components/button/button.component.js +3314 -165
- package/esm/components/button/button.config.d.ts +4 -3
- package/esm/components/button/button.style.d.ts +6 -8
- package/esm/components/button/button.style.js +51 -95
- package/esm/components/button/index.d.ts +2 -2
- package/esm/components/duelling-picklist/picklist-group/picklist-group.style.d.ts +1 -2
- package/esm/components/duelling-picklist/picklist-item/picklist-item.style.d.ts +1 -2
- package/esm/components/heading/heading.component.d.ts +5 -0
- package/esm/components/icon/index.d.ts +1 -0
- package/esm/components/multi-action-button/multi-action-button.component.d.ts +3 -1
- package/esm/components/multi-action-button/multi-action-button.component.js +7 -5
- package/esm/components/multi-action-button/multi-action-button.d.ts +4 -2
- package/esm/components/multi-step-wizard/multi-step-wizard.d.ts +22 -0
- package/esm/components/multi-step-wizard/step/step.d.ts +6 -0
- package/esm/components/multi-step-wizard/step/step.style.d.ts +4 -2
- package/esm/components/radio-button/radio-button-svg.component.js +29 -16
- package/esm/components/scrollable-list/scrollable-list.component.d.ts +8 -0
- package/esm/components/split-button/split-button-toggle.style.d.ts +2 -6
- package/esm/components/split-button/split-button.component.d.ts +3 -1
- package/esm/components/split-button/split-button.component.js +7 -4
- package/esm/components/split-button/split-button.d.ts +5 -2
- package/esm/components/tooltip/index.d.ts +2 -1
- package/esm/components/tooltip/tooltip-pointer.style.d.ts +10 -1
- package/esm/components/tooltip/tooltip-pointer.style.js +5 -12
- package/esm/components/tooltip/tooltip.component.d.ts +33 -2
- package/esm/components/tooltip/tooltip.component.js +255 -110
- package/esm/components/tooltip/tooltip.config.d.ts +2 -1
- package/esm/components/tooltip/tooltip.style.d.ts +7 -2
- package/esm/components/tooltip/tooltip.style.js +7 -21
- package/esm/components/typography/typography.component.d.ts +1 -1
- package/esm/locales/en-gb.d.ts +3 -5
- package/esm/locales/en-gb.js +5 -4
- package/esm/locales/index.d.ts +1 -1
- package/esm/locales/index.js +2 -0
- package/esm/locales/locale.d.ts +99 -105
- package/esm/locales/locale.js +1 -0
- package/esm/locales/pl-pl.d.ts +3 -5
- package/esm/locales/pl-pl.js +5 -4
- package/lib/__internal__/tooltip-provider/index.d.ts +19 -24
- package/lib/__internal__/tooltip-provider/index.js +1 -12
- package/lib/components/app-wrapper/app-wrapper.component.d.ts +4 -0
- package/lib/components/badge/badge.style.d.ts +4 -2
- package/lib/components/button/button-types.style.d.ts +1 -2
- package/lib/components/button/button-types.style.js +0 -1
- package/lib/components/button/button.component.d.ts +67 -36
- package/lib/components/button/button.component.js +3381 -172
- package/lib/components/button/button.config.d.ts +4 -3
- package/lib/components/button/button.style.d.ts +6 -8
- package/lib/components/button/button.style.js +52 -101
- package/lib/components/button/index.d.ts +2 -2
- package/lib/components/duelling-picklist/picklist-group/picklist-group.style.d.ts +1 -2
- package/lib/components/duelling-picklist/picklist-item/picklist-item.style.d.ts +1 -2
- package/lib/components/heading/heading.component.d.ts +5 -0
- package/lib/components/icon/index.d.ts +1 -0
- package/lib/components/multi-action-button/multi-action-button.component.d.ts +3 -1
- package/lib/components/multi-action-button/multi-action-button.component.js +6 -4
- package/lib/components/multi-action-button/multi-action-button.d.ts +4 -2
- package/lib/components/multi-step-wizard/multi-step-wizard.d.ts +22 -0
- package/lib/components/multi-step-wizard/step/step.d.ts +6 -0
- package/lib/components/multi-step-wizard/step/step.style.d.ts +4 -2
- package/lib/components/radio-button/radio-button-svg.component.js +38 -20
- package/lib/components/scrollable-list/scrollable-list.component.d.ts +8 -0
- package/lib/components/split-button/split-button-toggle.style.d.ts +2 -6
- package/lib/components/split-button/split-button.component.d.ts +3 -1
- package/lib/components/split-button/split-button.component.js +6 -3
- package/lib/components/split-button/split-button.d.ts +5 -2
- package/lib/components/tooltip/index.d.ts +2 -1
- package/lib/components/tooltip/tooltip-pointer.style.d.ts +10 -1
- package/lib/components/tooltip/tooltip-pointer.style.js +7 -15
- package/lib/components/tooltip/tooltip.component.d.ts +33 -2
- package/lib/components/tooltip/tooltip.component.js +221 -130
- package/lib/components/tooltip/tooltip.config.d.ts +2 -1
- package/lib/components/tooltip/tooltip.style.d.ts +7 -2
- package/lib/components/tooltip/tooltip.style.js +7 -22
- package/lib/components/typography/typography.component.d.ts +1 -1
- package/lib/locales/en-gb.d.ts +3 -5
- package/lib/locales/en-gb.js +2 -1
- package/lib/locales/index.d.ts +1 -1
- package/lib/locales/index.js +23 -0
- package/lib/locales/locale.d.ts +99 -105
- package/lib/locales/locale.js +5 -0
- package/lib/locales/package.json +6 -0
- package/lib/locales/pl-pl.d.ts +3 -5
- package/lib/locales/pl-pl.js +2 -1
- package/package.json +7 -4
- package/esm/components/button/button.d.ts +0 -85
- package/esm/components/tooltip/tooltip.d.ts +0 -40
- package/lib/components/button/button.d.ts +0 -85
- package/lib/components/tooltip/tooltip.d.ts +0 -40
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export const
|
|
3
|
-
export const
|
|
1
|
+
import { ButtonTypes } from "./button.component";
|
|
2
|
+
export declare const BUTTON_VARIANTS: ButtonTypes[];
|
|
3
|
+
export declare const BUTTON_SIZES: string[];
|
|
4
|
+
export declare const BUTTON_ICON_POSITIONS: string[];
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare const StyledButton: import("styled-components").StyledComponent<"button", any, {
|
|
4
|
-
iconOnly
|
|
5
|
-
disabled: any;
|
|
6
|
-
buttonType: any;
|
|
7
|
-
size: any;
|
|
8
|
-
destructive: any;
|
|
1
|
+
import { SpaceProps } from "styled-system";
|
|
2
|
+
import { ButtonProps } from "./button.component";
|
|
3
|
+
declare const StyledButton: import("styled-components").StyledComponent<"button", any, SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & Omit<ButtonProps, "as"> & {
|
|
4
|
+
iconOnly?: boolean | undefined;
|
|
9
5
|
}, never>;
|
|
6
|
+
export declare const StyledButtonSubtext: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
7
|
+
export default StyledButton;
|
|
@@ -1,65 +1,10 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import { space } from "styled-system";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import propTypes from "@styled-system/prop-types";
|
|
5
3
|
import BaseTheme from "../../style/themes/base";
|
|
6
4
|
import buttonTypes from "./button-types.style";
|
|
7
5
|
import StyledIcon from "../icon/icon.style";
|
|
8
|
-
import { BUTTON_ICON_POSITIONS, BUTTON_SIZES, BUTTON_VARIANTS } from "./button.config";
|
|
9
|
-
import { ICONS } from "../icon/icon-config";
|
|
10
|
-
const StyledButton = styled.button`
|
|
11
|
-
${space}
|
|
12
|
-
${({
|
|
13
|
-
disabled,
|
|
14
|
-
noWrap
|
|
15
|
-
}) => css`
|
|
16
|
-
align-items: center;
|
|
17
|
-
cursor: ${disabled ? "not-allowed" : "pointer"};
|
|
18
|
-
display: inline-flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
flex-flow: wrap;
|
|
21
|
-
border-radius: 0;
|
|
22
|
-
|
|
23
|
-
${noWrap && css`
|
|
24
|
-
white-space: nowrap;
|
|
25
|
-
`}
|
|
26
|
-
justify-content: center;
|
|
27
|
-
vertical-align: middle;
|
|
28
|
-
outline-offset: 0;
|
|
29
|
-
${stylingForType}
|
|
30
|
-
`}
|
|
31
|
-
|
|
32
|
-
${({
|
|
33
|
-
fullWidth
|
|
34
|
-
}) => fullWidth && css`
|
|
35
|
-
width: 100%;
|
|
36
|
-
`}
|
|
37
6
|
|
|
38
|
-
|
|
39
|
-
iconOnly,
|
|
40
|
-
iconPosition
|
|
41
|
-
}) => css`
|
|
42
|
-
${StyledIcon} {
|
|
43
|
-
margin-left: ${!iconOnly && iconPosition === "after" ? "var(--spacing100)" : "0px"};
|
|
44
|
-
margin-right: ${!iconOnly && iconPosition === "before" ? "var(--spacing100)" : "0px"};
|
|
45
|
-
margin-bottom: ${iconOnly ? "1px" : "0px"};
|
|
46
|
-
height: ${additionalIconStyle};
|
|
47
|
-
svg {
|
|
48
|
-
margin-top: 0;
|
|
49
|
-
}
|
|
50
|
-
${iconOnly && "margin-left: auto; margin-right: auto"}
|
|
51
|
-
}
|
|
52
|
-
`}
|
|
53
|
-
`;
|
|
54
|
-
export const StyledButtonSubtext = styled.span`
|
|
55
|
-
font-size: 14px;
|
|
56
|
-
font-weight: 400;
|
|
57
|
-
display: block;
|
|
58
|
-
`;
|
|
59
|
-
|
|
60
|
-
function additionalIconStyle({
|
|
61
|
-
iconType
|
|
62
|
-
}) {
|
|
7
|
+
function additionalIconStyle(iconType) {
|
|
63
8
|
if (iconType === "services") return "6px";
|
|
64
9
|
return "16px";
|
|
65
10
|
}
|
|
@@ -89,7 +34,7 @@ function stylingForIconOnly(size) {
|
|
|
89
34
|
function stylingForType({
|
|
90
35
|
iconOnly,
|
|
91
36
|
disabled,
|
|
92
|
-
buttonType,
|
|
37
|
+
buttonType = "secondary",
|
|
93
38
|
size,
|
|
94
39
|
destructive
|
|
95
40
|
}) {
|
|
@@ -122,46 +67,57 @@ function stylingForType({
|
|
|
122
67
|
`;
|
|
123
68
|
}
|
|
124
69
|
|
|
125
|
-
StyledButton
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
/** The text the button displays */
|
|
138
|
-
children: PropTypes.node.isRequired,
|
|
139
|
-
|
|
140
|
-
/** Apply destructive style to the button */
|
|
141
|
-
destructive: PropTypes.bool,
|
|
142
|
-
|
|
143
|
-
/** Apply disabled state to the button */
|
|
144
|
-
disabled: PropTypes.bool,
|
|
145
|
-
|
|
146
|
-
/** Apply fullWidth style to the button */
|
|
147
|
-
fullWidth: PropTypes.bool,
|
|
148
|
-
|
|
149
|
-
/** Apply iconOnly to display button with the icon only */
|
|
150
|
-
iconOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
151
|
-
|
|
152
|
-
/** Defines an Icon position within the button */
|
|
153
|
-
iconPosition: PropTypes.oneOf([...BUTTON_ICON_POSITIONS, ""]),
|
|
154
|
-
|
|
155
|
-
/** Defines an Icon type within the button (see Icon for options) */
|
|
156
|
-
iconType: PropTypes.oneOf([...ICONS, ""]),
|
|
70
|
+
const StyledButton = styled.button`
|
|
71
|
+
${space}
|
|
72
|
+
${({
|
|
73
|
+
disabled,
|
|
74
|
+
noWrap
|
|
75
|
+
}) => css`
|
|
76
|
+
align-items: center;
|
|
77
|
+
cursor: ${disabled ? "not-allowed" : "pointer"};
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
flex-flow: wrap;
|
|
81
|
+
border-radius: 0;
|
|
157
82
|
|
|
158
|
-
|
|
159
|
-
|
|
83
|
+
${noWrap && css`
|
|
84
|
+
white-space: nowrap;
|
|
85
|
+
`}
|
|
86
|
+
justify-content: center;
|
|
87
|
+
vertical-align: middle;
|
|
88
|
+
outline-offset: 0;
|
|
89
|
+
${stylingForType}
|
|
90
|
+
`}
|
|
160
91
|
|
|
161
|
-
|
|
162
|
-
|
|
92
|
+
${({
|
|
93
|
+
fullWidth
|
|
94
|
+
}) => fullWidth && css`
|
|
95
|
+
width: 100%;
|
|
96
|
+
`}
|
|
163
97
|
|
|
164
|
-
|
|
165
|
-
|
|
98
|
+
${({
|
|
99
|
+
iconOnly,
|
|
100
|
+
iconPosition,
|
|
101
|
+
iconType
|
|
102
|
+
}) => css`
|
|
103
|
+
${StyledIcon} {
|
|
104
|
+
margin-left: ${!iconOnly && iconPosition === "after" ? "var(--spacing100)" : "0px"};
|
|
105
|
+
margin-right: ${!iconOnly && iconPosition === "before" ? "var(--spacing100)" : "0px"};
|
|
106
|
+
margin-bottom: ${iconOnly ? "1px" : "0px"};
|
|
107
|
+
height: ${additionalIconStyle(iconType)};
|
|
108
|
+
svg {
|
|
109
|
+
margin-top: 0;
|
|
110
|
+
}
|
|
111
|
+
${iconOnly && "margin-left: auto; margin-right: auto"}
|
|
112
|
+
}
|
|
113
|
+
`}
|
|
114
|
+
`;
|
|
115
|
+
export const StyledButtonSubtext = styled.span`
|
|
116
|
+
font-size: 14px;
|
|
117
|
+
font-weight: 400;
|
|
118
|
+
display: block;
|
|
119
|
+
`;
|
|
120
|
+
StyledButton.defaultProps = {
|
|
121
|
+
theme: BaseTheme
|
|
166
122
|
};
|
|
167
123
|
export default StyledButton;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from "./button";
|
|
2
|
-
export
|
|
1
|
+
export { default, ButtonWithForwardRef } from "./button.component";
|
|
2
|
+
export type { ButtonProps } from "./button.component";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export const StyledGroupWrapper: import("styled-components").StyledComponent<"li", any, {}, never>;
|
|
2
2
|
export const StyledPicklistGroupUl: import("styled-components").StyledComponent<"ul", any, {}, never>;
|
|
3
3
|
export const StyledPicklistGroup: import("styled-components").StyledComponent<"li", any, {}, never>;
|
|
4
|
-
export const StyledGroupButton: import("styled-components").StyledComponent<
|
|
5
|
-
import { ButtonWithForwardRef } from "../../button/button";
|
|
4
|
+
export const StyledGroupButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export const StyledPicklistItem: import("styled-components").StyledComponent<"li", any, {}, never>;
|
|
2
|
-
export const StyledButton: import("styled-components").StyledComponent<
|
|
2
|
+
export const StyledButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
3
3
|
export const StyledLockIcon: import("styled-components").StyledComponent<typeof Icon, any, {}, never>;
|
|
4
|
-
import { ButtonWithForwardRef } from "../../button/button";
|
|
5
4
|
import Icon from "../../icon";
|
|
@@ -44,6 +44,11 @@ declare class Heading extends React.Component<any, any, any> {
|
|
|
44
44
|
* @return {Object} JSX
|
|
45
45
|
*/
|
|
46
46
|
get pills(): Object;
|
|
47
|
+
/**
|
|
48
|
+
* @method render
|
|
49
|
+
* @return {Object} JSX
|
|
50
|
+
*/
|
|
51
|
+
render(): Object;
|
|
47
52
|
}
|
|
48
53
|
declare namespace Heading {
|
|
49
54
|
namespace propTypes {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default MultiActionButton;
|
|
2
|
-
declare function MultiActionButton({ align, disabled, as, buttonType, size, children, text, subtext, ...rest }: {
|
|
2
|
+
declare function MultiActionButton({ align, disabled, as, buttonType, size, children, text, subtext, "data-element": dataElement, "data-role": dataRole, ...rest }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
align?: string | undefined;
|
|
5
5
|
disabled: any;
|
|
@@ -9,6 +9,8 @@ declare function MultiActionButton({ align, disabled, as, buttonType, size, chil
|
|
|
9
9
|
children: any;
|
|
10
10
|
text: any;
|
|
11
11
|
subtext: any;
|
|
12
|
+
"data-element": any;
|
|
13
|
+
"data-role": any;
|
|
12
14
|
}): JSX.Element;
|
|
13
15
|
declare namespace MultiActionButton {
|
|
14
16
|
const propTypes: {
|
|
@@ -7,7 +7,7 @@ import { StyledMultiActionButton, StyledButtonChildrenContainer } from "./multi-
|
|
|
7
7
|
import Button, { ButtonWithForwardRef } from "../button";
|
|
8
8
|
import Events from "../../__internal__/utils/helpers/events";
|
|
9
9
|
import Popover from "../../__internal__/popover";
|
|
10
|
-
import { filterStyledSystemMarginProps } from "../../style/utils";
|
|
10
|
+
import { filterStyledSystemMarginProps, filterOutStyledSystemSpacingProps } from "../../style/utils";
|
|
11
11
|
import { defaultFocusableSelectors } from "../../__internal__/focus-trap/focus-trap-utils";
|
|
12
12
|
import Logger from "../../__internal__/utils/logger";
|
|
13
13
|
const marginPropTypes = filterStyledSystemMarginProps(styledSystemPropTypes.space);
|
|
@@ -22,6 +22,8 @@ const MultiActionButton = ({
|
|
|
22
22
|
children,
|
|
23
23
|
text,
|
|
24
24
|
subtext,
|
|
25
|
+
"data-element": dataElement,
|
|
26
|
+
"data-role": dataRole,
|
|
25
27
|
...rest
|
|
26
28
|
}) => {
|
|
27
29
|
if (!deprecatedWarnTriggered && as) {
|
|
@@ -133,7 +135,6 @@ const MultiActionButton = ({
|
|
|
133
135
|
disabled,
|
|
134
136
|
displayed: showAdditionalButtons,
|
|
135
137
|
onTouchStart: showButtons,
|
|
136
|
-
onClick: rest.onClick,
|
|
137
138
|
onFocus: focusMainButton,
|
|
138
139
|
onBlur: () => {
|
|
139
140
|
isMainButtonFocused.current = false;
|
|
@@ -141,7 +142,8 @@ const MultiActionButton = ({
|
|
|
141
142
|
onKeyDown: handleMainButtonKeyDown,
|
|
142
143
|
buttonType: buttonType || as,
|
|
143
144
|
size,
|
|
144
|
-
subtext
|
|
145
|
+
subtext,
|
|
146
|
+
...filterOutStyledSystemSpacingProps(rest)
|
|
145
147
|
};
|
|
146
148
|
|
|
147
149
|
if (!disabled) {
|
|
@@ -185,8 +187,8 @@ const MultiActionButton = ({
|
|
|
185
187
|
onMouseLeave: hideButtons,
|
|
186
188
|
ref: ref,
|
|
187
189
|
"data-component": "multi-action-button",
|
|
188
|
-
"data-element":
|
|
189
|
-
"data-role":
|
|
190
|
+
"data-element": dataElement,
|
|
191
|
+
"data-role": dataRole,
|
|
190
192
|
align: align,
|
|
191
193
|
displayed: showAdditionalButtons
|
|
192
194
|
}, filterStyledSystemMarginProps(rest)), /*#__PURE__*/React.createElement(Button, _extends({
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SplitButtonProps } from "../split-button";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
export interface MultiActionButtonProps extends SplitButtonProps {
|
|
4
4
|
/** Button type: "primary" | "secondary" | "tertiary" */
|
|
5
5
|
buttonType?: "primary" | "secondary" | "tertiary";
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
declare function MultiActionButton(props: MultiActionButtonProps): JSX.Element;
|
|
9
|
+
|
|
8
10
|
export default MultiActionButton;
|
|
@@ -8,6 +8,21 @@ declare class MultiStepWizard extends React.Component<any, any, any> {
|
|
|
8
8
|
* @return {void}
|
|
9
9
|
*/
|
|
10
10
|
getChildContext(): void;
|
|
11
|
+
/**
|
|
12
|
+
* A lifecycle method that is called before initial render.
|
|
13
|
+
* Can set up state of component without causing a re-render.
|
|
14
|
+
*
|
|
15
|
+
* @method componentWillMount
|
|
16
|
+
*/
|
|
17
|
+
UNSAFE_componentWillMount(): void;
|
|
18
|
+
/**
|
|
19
|
+
* A lifecycle method to update the currentStep state when a new valid value has been specified.
|
|
20
|
+
*
|
|
21
|
+
* @method componentWillReceiveProps
|
|
22
|
+
* @param {Object} props The new props passed down to the component
|
|
23
|
+
* @return {void}
|
|
24
|
+
*/
|
|
25
|
+
UNSAFE_componentWillReceiveProps(nextProps: any): void;
|
|
11
26
|
/**
|
|
12
27
|
* Validate step props
|
|
13
28
|
*
|
|
@@ -50,6 +65,13 @@ declare class MultiStepWizard extends React.Component<any, any, any> {
|
|
|
50
65
|
* @return {Object} JSX
|
|
51
66
|
*/
|
|
52
67
|
get wizardStepsHTML(): Object;
|
|
68
|
+
/**
|
|
69
|
+
* Renders the component.
|
|
70
|
+
*
|
|
71
|
+
* @method render
|
|
72
|
+
* @return {Object} JSX
|
|
73
|
+
*/
|
|
74
|
+
render(): Object;
|
|
53
75
|
}
|
|
54
76
|
declare namespace MultiStepWizard {
|
|
55
77
|
namespace propTypes {
|
|
@@ -124,6 +124,12 @@ declare class Step extends React.Component<any, any, any> {
|
|
|
124
124
|
* @return {String}
|
|
125
125
|
*/
|
|
126
126
|
get mainClasses(): string;
|
|
127
|
+
/**
|
|
128
|
+
* Renders the component.
|
|
129
|
+
*
|
|
130
|
+
* @method render
|
|
131
|
+
*/
|
|
132
|
+
render(): JSX.Element;
|
|
127
133
|
}
|
|
128
134
|
declare namespace Step {
|
|
129
135
|
namespace propTypes {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export const StyledStep: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export const StyledStepContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export const StyledStepButton: import("styled-components").StyledComponent<
|
|
3
|
+
export const StyledStepButton: import("styled-components").StyledComponent<{
|
|
4
|
+
({ size, subtext, as, children, forwardRef, "aria-label": ariaLabel, disabled, destructive, buttonType: buttonTypeProp, iconType, iconPosition, href, m, px, noWrap, target, rel, iconTooltipMessage, iconTooltipPosition, fullWidth, ...rest }: import("../../button").ButtonProps): JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
}, any, {}, never>;
|
|
4
7
|
export const StyledStepIndicatorBar: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
8
|
export const StyledStepIndicatorBackground: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
9
|
export const StyledStepIndicatorIconContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
10
|
export const StepIndicatorIconPlaceholder: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
11
|
export const StepIndicatorIconContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
12
|
export const StyledStepIndicatorIcon: import("styled-components").StyledComponent<typeof Icon, any, {}, never>;
|
|
10
|
-
import Button from "../../button";
|
|
11
13
|
import Icon from "../../icon";
|
|
@@ -1,22 +1,35 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
2
3
|
import StyledCheckableInputSvgWrapper from "../../__internal__/checkable-input/checkable-input-svg-wrapper.style";
|
|
3
4
|
|
|
4
5
|
const RadioButtonSvg = () => {
|
|
5
|
-
return /*#__PURE__*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
return /*#__PURE__*/ React.createElement(
|
|
7
|
+
StyledCheckableInputSvgWrapper,
|
|
8
|
+
null,
|
|
9
|
+
/*#__PURE__*/ React.createElement(
|
|
10
|
+
"svg",
|
|
11
|
+
{
|
|
12
|
+
focusable: "false",
|
|
13
|
+
viewBox: "0 0 15 15",
|
|
14
|
+
},
|
|
15
|
+
/*#__PURE__*/ React.createElement(
|
|
16
|
+
"g",
|
|
17
|
+
{
|
|
18
|
+
stroke: "none",
|
|
19
|
+
strokeWidth: "1",
|
|
20
|
+
fill: "none",
|
|
21
|
+
fillRule: "evenodd",
|
|
22
|
+
},
|
|
23
|
+
/*#__PURE__*/ React.createElement("circle", {
|
|
24
|
+
className: "radio-button-check",
|
|
25
|
+
fill: "#FFFFFF",
|
|
26
|
+
cx: "7.5",
|
|
27
|
+
cy: "7.5",
|
|
28
|
+
r: "5",
|
|
29
|
+
})
|
|
30
|
+
)
|
|
31
|
+
)
|
|
32
|
+
);
|
|
20
33
|
};
|
|
21
34
|
|
|
22
|
-
export default /*#__PURE__*/React.memo(RadioButtonSvg, () => true);
|
|
35
|
+
export default /*#__PURE__*/ React.memo(RadioButtonSvg, () => true);
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
export default ScrollableList;
|
|
2
2
|
declare class ScrollableList extends React.Component<any, any, any> {
|
|
3
3
|
constructor(props: any);
|
|
4
|
+
state: {
|
|
5
|
+
selectedItem: number;
|
|
6
|
+
};
|
|
4
7
|
blockOptionsHover: boolean;
|
|
5
8
|
scrollBox: React.RefObject<any>;
|
|
9
|
+
UNSAFE_componentWillReceiveProps(nextProps: any): void;
|
|
10
|
+
componentDidUpdate(prevProps: any): void;
|
|
11
|
+
componentDidMount(): void;
|
|
12
|
+
componentWillUnmount(): void;
|
|
6
13
|
updateScroll(item: any): void;
|
|
7
14
|
setScrollTop({ item, children, listHeight, itemHeight }: {
|
|
8
15
|
item: any;
|
|
@@ -28,6 +35,7 @@ declare class ScrollableList extends React.Component<any, any, any> {
|
|
|
28
35
|
};
|
|
29
36
|
}) => void;
|
|
30
37
|
handleKeyDown: (e: any) => void;
|
|
38
|
+
render(): JSX.Element;
|
|
31
39
|
}
|
|
32
40
|
declare namespace ScrollableList {
|
|
33
41
|
namespace propTypes {
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
export default StyledSplitButtonToggle;
|
|
2
|
-
declare const StyledSplitButtonToggle: import("styled-components").StyledComponent<"button", any, {
|
|
3
|
-
iconOnly
|
|
4
|
-
disabled: any;
|
|
5
|
-
buttonType: any;
|
|
6
|
-
size: any;
|
|
7
|
-
destructive: any;
|
|
2
|
+
declare const StyledSplitButtonToggle: import("styled-components").StyledComponent<"button", any, import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & Omit<import("../button").ButtonProps, "as"> & {
|
|
3
|
+
iconOnly?: boolean | undefined;
|
|
8
4
|
}, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default SplitButton;
|
|
2
|
-
declare function SplitButton({ align, as, buttonType, children, disabled, iconPosition, iconType, onClick, size, subtext, text, ...rest }: {
|
|
2
|
+
declare function SplitButton({ align, as, buttonType, children, disabled, iconPosition, iconType, onClick, size, subtext, text, "data-element": dataElement, "data-role": dataRole, ...rest }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
align?: string | undefined;
|
|
5
5
|
as: any;
|
|
@@ -12,6 +12,8 @@ declare function SplitButton({ align, as, buttonType, children, disabled, iconPo
|
|
|
12
12
|
size?: string | undefined;
|
|
13
13
|
subtext: any;
|
|
14
14
|
text: any;
|
|
15
|
+
"data-element": any;
|
|
16
|
+
"data-role": any;
|
|
15
17
|
}): JSX.Element;
|
|
16
18
|
declare namespace SplitButton {
|
|
17
19
|
const propTypes: {
|
|
@@ -12,7 +12,7 @@ import StyledSplitButtonChildrenContainer from "./split-button-children.style";
|
|
|
12
12
|
import Events from "../../__internal__/utils/helpers/events";
|
|
13
13
|
import guid from "../../__internal__/utils/helpers/guid";
|
|
14
14
|
import Popover from "../../__internal__/popover";
|
|
15
|
-
import { filterStyledSystemMarginProps } from "../../style/utils";
|
|
15
|
+
import { filterStyledSystemMarginProps, filterOutStyledSystemSpacingProps } from "../../style/utils";
|
|
16
16
|
import { baseTheme } from "../../style/themes";
|
|
17
17
|
import { defaultFocusableSelectors } from "../../__internal__/focus-trap/focus-trap-utils";
|
|
18
18
|
import Logger from "../../__internal__/utils/logger";
|
|
@@ -32,6 +32,8 @@ const SplitButton = ({
|
|
|
32
32
|
size = "medium",
|
|
33
33
|
subtext,
|
|
34
34
|
text,
|
|
35
|
+
"data-element": dataElement,
|
|
36
|
+
"data-role": dataRole,
|
|
35
37
|
...rest
|
|
36
38
|
}) => {
|
|
37
39
|
if (!deprecatedWarnTriggered && as) {
|
|
@@ -114,7 +116,8 @@ const SplitButton = ({
|
|
|
114
116
|
iconType,
|
|
115
117
|
onClick,
|
|
116
118
|
size,
|
|
117
|
-
subtext
|
|
119
|
+
subtext,
|
|
120
|
+
...filterOutStyledSystemSpacingProps(rest)
|
|
118
121
|
};
|
|
119
122
|
}
|
|
120
123
|
|
|
@@ -142,8 +145,8 @@ const SplitButton = ({
|
|
|
142
145
|
function componentTags() {
|
|
143
146
|
return {
|
|
144
147
|
"data-component": "split-button",
|
|
145
|
-
"data-element":
|
|
146
|
-
"data-role":
|
|
148
|
+
"data-element": dataElement,
|
|
149
|
+
"data-role": dataRole
|
|
147
150
|
};
|
|
148
151
|
}
|
|
149
152
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { MarginProps } from "styled-system";
|
|
2
3
|
|
|
3
|
-
export interface SplitButtonProps
|
|
4
|
+
export interface SplitButtonProps
|
|
5
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
6
|
+
MarginProps {
|
|
4
7
|
/** Set align of the rendered content */
|
|
5
8
|
align?: "left" | "right";
|
|
6
9
|
/** Button type: "primary" | "secondary" for legacy theme */
|
|
@@ -23,6 +26,6 @@ export interface SplitButtonProps {
|
|
|
23
26
|
text: string;
|
|
24
27
|
}
|
|
25
28
|
|
|
26
|
-
declare
|
|
29
|
+
declare function SplitButton(props: SplitButtonProps): JSX.Element;
|
|
27
30
|
|
|
28
31
|
export default SplitButton;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from "./tooltip";
|
|
1
|
+
export { default } from "./tooltip.component";
|
|
2
|
+
export type { TooltipProps } from "./tooltip.component";
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
import { Placement } from "tippy.js";
|
|
2
|
+
interface StyledTooltipPointer {
|
|
3
|
+
/** Sets position of the tooltip */
|
|
4
|
+
position?: Placement;
|
|
5
|
+
/** Defines the message type */
|
|
6
|
+
type?: string;
|
|
7
|
+
/** Override background color of the Tooltip, provide any color from palette or any valid css color value. */
|
|
8
|
+
bgColor?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const StyledTooltipPointer: import("styled-components").StyledComponent<"div", any, StyledTooltipPointer, never>;
|
|
1
11
|
export default StyledTooltipPointer;
|
|
2
|
-
declare const StyledTooltipPointer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import PropTypes from "prop-types";
|
|
2
1
|
import styled, { css } from "styled-components";
|
|
3
2
|
import baseTheme from "../../style/themes/base";
|
|
4
3
|
import { toColor } from "../../style/utils/color";
|
|
5
4
|
|
|
6
|
-
const pointerColor = (
|
|
5
|
+
const pointerColor = (theme, bgColor, type) => {
|
|
7
6
|
if (bgColor) return toColor(theme, bgColor);
|
|
8
7
|
return type === "error" ? "var(--colorsSemanticNegative500)" : "var(--colorsSemanticNeutral500)";
|
|
9
8
|
};
|
|
@@ -22,7 +21,7 @@ const StyledTooltipPointer = styled.div`
|
|
|
22
21
|
${position === "top" && css`
|
|
23
22
|
border-left: 8px solid transparent;
|
|
24
23
|
border-right: 8px solid transparent;
|
|
25
|
-
border-top: 8px solid ${pointerColor(
|
|
24
|
+
border-top: 8px solid ${pointerColor(theme, bgColor, type)};
|
|
26
25
|
bottom: calc(-1 * var(--spacing100));
|
|
27
26
|
@-moz-document url-prefix() {
|
|
28
27
|
bottom: -7px;
|
|
@@ -32,7 +31,7 @@ const StyledTooltipPointer = styled.div`
|
|
|
32
31
|
${position === "bottom" && css`
|
|
33
32
|
border-left: 8px solid transparent;
|
|
34
33
|
border-right: 8px solid transparent;
|
|
35
|
-
border-bottom: 8px solid ${pointerColor(
|
|
34
|
+
border-bottom: 8px solid ${pointerColor(theme, bgColor, type)};
|
|
36
35
|
top: calc(-1 * var(--spacing100));
|
|
37
36
|
@-moz-document url-prefix() {
|
|
38
37
|
top: -7px;
|
|
@@ -42,7 +41,7 @@ const StyledTooltipPointer = styled.div`
|
|
|
42
41
|
${position === "right" && css`
|
|
43
42
|
border-top: 8px solid transparent;
|
|
44
43
|
border-bottom: 8px solid transparent;
|
|
45
|
-
border-right: 8px solid ${pointerColor(
|
|
44
|
+
border-right: 8px solid ${pointerColor(theme, bgColor, type)};
|
|
46
45
|
left: calc(-1 * var(--spacing100));
|
|
47
46
|
@-moz-document url-prefix() {
|
|
48
47
|
left: -7px;
|
|
@@ -52,7 +51,7 @@ const StyledTooltipPointer = styled.div`
|
|
|
52
51
|
${position === "left" && css`
|
|
53
52
|
border-top: 8px solid transparent;
|
|
54
53
|
border-bottom: 8px solid transparent;
|
|
55
|
-
border-left: 8px solid ${pointerColor(
|
|
54
|
+
border-left: 8px solid ${pointerColor(theme, bgColor, type)};
|
|
56
55
|
right: calc(-1 * var(--spacing100));
|
|
57
56
|
@-moz-document url-prefix() {
|
|
58
57
|
right: -7px;
|
|
@@ -64,10 +63,4 @@ StyledTooltipPointer.defaultProps = {
|
|
|
64
63
|
theme: baseTheme,
|
|
65
64
|
position: "top"
|
|
66
65
|
};
|
|
67
|
-
StyledTooltipPointer.propTypes = {
|
|
68
|
-
position: PropTypes.oneOf(["bottom", "left", "right", "top"]),
|
|
69
|
-
theme: PropTypes.object,
|
|
70
|
-
type: PropTypes.string,
|
|
71
|
-
bgColor: PropTypes.string
|
|
72
|
-
};
|
|
73
66
|
export default StyledTooltipPointer;
|
|
@@ -1,3 +1,34 @@
|
|
|
1
|
-
export default Tooltip;
|
|
2
|
-
declare const Tooltip: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
3
1
|
import React from "react";
|
|
2
|
+
import { TooltipPositions } from "./tooltip.config";
|
|
3
|
+
export declare type InputSizes = "small" | "medium" | "large";
|
|
4
|
+
export interface TooltipProps {
|
|
5
|
+
/** The message to be displayed within the tooltip */
|
|
6
|
+
message: React.ReactNode;
|
|
7
|
+
/** The id attribute to use for the tooltip */
|
|
8
|
+
id?: string;
|
|
9
|
+
/** Whether to to show the Tooltip */
|
|
10
|
+
isVisible?: boolean;
|
|
11
|
+
/** Sets position of the tooltip */
|
|
12
|
+
position?: TooltipPositions;
|
|
13
|
+
/** Defines the message type */
|
|
14
|
+
type?: string;
|
|
15
|
+
/** Children elements */
|
|
16
|
+
children: React.ReactElement;
|
|
17
|
+
/** Defines the size of the tooltip content */
|
|
18
|
+
size?: "medium" | "large";
|
|
19
|
+
/** Override background color of the Tooltip, provide any color from palette or any valid css color value. */
|
|
20
|
+
bgColor?: string;
|
|
21
|
+
/** Override font color of the Tooltip, provide any color from palette or any valid css color value. */
|
|
22
|
+
fontColor?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Overrides the default flip behaviour of the Tooltip,
|
|
25
|
+
* must be an array containing some or all of ["top", "bottom", "left", "right"]
|
|
26
|
+
* (see https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements)
|
|
27
|
+
*/
|
|
28
|
+
flipOverrides?: TooltipPositions[];
|
|
29
|
+
target?: Element;
|
|
30
|
+
isPartOfInput?: boolean;
|
|
31
|
+
inputSize?: InputSizes;
|
|
32
|
+
}
|
|
33
|
+
export declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement | null>>;
|
|
34
|
+
export default Tooltip;
|