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;
|
|
@@ -9,80 +9,19 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
9
9
|
|
|
10
10
|
var _styledSystem = require("styled-system");
|
|
11
11
|
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
|
-
var _propTypes2 = _interopRequireDefault(require("@styled-system/prop-types"));
|
|
15
|
-
|
|
16
12
|
var _base = _interopRequireDefault(require("../../style/themes/base"));
|
|
17
13
|
|
|
18
14
|
var _buttonTypes = _interopRequireDefault(require("./button-types.style"));
|
|
19
15
|
|
|
20
16
|
var _icon = _interopRequireDefault(require("../icon/icon.style"));
|
|
21
17
|
|
|
22
|
-
var _button = require("./button.config");
|
|
23
|
-
|
|
24
|
-
var _iconConfig = require("../icon/icon-config");
|
|
25
|
-
|
|
26
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
19
|
|
|
28
20
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
29
21
|
|
|
30
22
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
${_styledSystem.space}
|
|
34
|
-
${({
|
|
35
|
-
disabled,
|
|
36
|
-
noWrap
|
|
37
|
-
}) => (0, _styledComponents.css)`
|
|
38
|
-
align-items: center;
|
|
39
|
-
cursor: ${disabled ? "not-allowed" : "pointer"};
|
|
40
|
-
display: inline-flex;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
flex-flow: wrap;
|
|
43
|
-
border-radius: 0;
|
|
44
|
-
|
|
45
|
-
${noWrap && (0, _styledComponents.css)`
|
|
46
|
-
white-space: nowrap;
|
|
47
|
-
`}
|
|
48
|
-
justify-content: center;
|
|
49
|
-
vertical-align: middle;
|
|
50
|
-
outline-offset: 0;
|
|
51
|
-
${stylingForType}
|
|
52
|
-
`}
|
|
53
|
-
|
|
54
|
-
${({
|
|
55
|
-
fullWidth
|
|
56
|
-
}) => fullWidth && (0, _styledComponents.css)`
|
|
57
|
-
width: 100%;
|
|
58
|
-
`}
|
|
59
|
-
|
|
60
|
-
${({
|
|
61
|
-
iconOnly,
|
|
62
|
-
iconPosition
|
|
63
|
-
}) => (0, _styledComponents.css)`
|
|
64
|
-
${_icon.default} {
|
|
65
|
-
margin-left: ${!iconOnly && iconPosition === "after" ? "var(--spacing100)" : "0px"};
|
|
66
|
-
margin-right: ${!iconOnly && iconPosition === "before" ? "var(--spacing100)" : "0px"};
|
|
67
|
-
margin-bottom: ${iconOnly ? "1px" : "0px"};
|
|
68
|
-
height: ${additionalIconStyle};
|
|
69
|
-
svg {
|
|
70
|
-
margin-top: 0;
|
|
71
|
-
}
|
|
72
|
-
${iconOnly && "margin-left: auto; margin-right: auto"}
|
|
73
|
-
}
|
|
74
|
-
`}
|
|
75
|
-
`;
|
|
76
|
-
const StyledButtonSubtext = _styledComponents.default.span`
|
|
77
|
-
font-size: 14px;
|
|
78
|
-
font-weight: 400;
|
|
79
|
-
display: block;
|
|
80
|
-
`;
|
|
81
|
-
exports.StyledButtonSubtext = StyledButtonSubtext;
|
|
82
|
-
|
|
83
|
-
function additionalIconStyle({
|
|
84
|
-
iconType
|
|
85
|
-
}) {
|
|
24
|
+
function additionalIconStyle(iconType) {
|
|
86
25
|
if (iconType === "services") return "6px";
|
|
87
26
|
return "16px";
|
|
88
27
|
}
|
|
@@ -112,7 +51,7 @@ function stylingForIconOnly(size) {
|
|
|
112
51
|
function stylingForType({
|
|
113
52
|
iconOnly,
|
|
114
53
|
disabled,
|
|
115
|
-
buttonType,
|
|
54
|
+
buttonType = "secondary",
|
|
116
55
|
size,
|
|
117
56
|
destructive
|
|
118
57
|
}) {
|
|
@@ -145,47 +84,59 @@ function stylingForType({
|
|
|
145
84
|
`;
|
|
146
85
|
}
|
|
147
86
|
|
|
148
|
-
StyledButton
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
/** The text the button displays */
|
|
161
|
-
children: _propTypes.default.node.isRequired,
|
|
162
|
-
|
|
163
|
-
/** Apply destructive style to the button */
|
|
164
|
-
destructive: _propTypes.default.bool,
|
|
165
|
-
|
|
166
|
-
/** Apply disabled state to the button */
|
|
167
|
-
disabled: _propTypes.default.bool,
|
|
168
|
-
|
|
169
|
-
/** Apply fullWidth style to the button */
|
|
170
|
-
fullWidth: _propTypes.default.bool,
|
|
171
|
-
|
|
172
|
-
/** Apply iconOnly to display button with the icon only */
|
|
173
|
-
iconOnly: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string]),
|
|
174
|
-
|
|
175
|
-
/** Defines an Icon position within the button */
|
|
176
|
-
iconPosition: _propTypes.default.oneOf([..._button.BUTTON_ICON_POSITIONS, ""]),
|
|
177
|
-
|
|
178
|
-
/** Defines an Icon type within the button (see Icon for options) */
|
|
179
|
-
iconType: _propTypes.default.oneOf([..._iconConfig.ICONS, ""]),
|
|
87
|
+
const StyledButton = _styledComponents.default.button`
|
|
88
|
+
${_styledSystem.space}
|
|
89
|
+
${({
|
|
90
|
+
disabled,
|
|
91
|
+
noWrap
|
|
92
|
+
}) => (0, _styledComponents.css)`
|
|
93
|
+
align-items: center;
|
|
94
|
+
cursor: ${disabled ? "not-allowed" : "pointer"};
|
|
95
|
+
display: inline-flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
flex-flow: wrap;
|
|
98
|
+
border-radius: 0;
|
|
180
99
|
|
|
181
|
-
|
|
182
|
-
|
|
100
|
+
${noWrap && (0, _styledComponents.css)`
|
|
101
|
+
white-space: nowrap;
|
|
102
|
+
`}
|
|
103
|
+
justify-content: center;
|
|
104
|
+
vertical-align: middle;
|
|
105
|
+
outline-offset: 0;
|
|
106
|
+
${stylingForType}
|
|
107
|
+
`}
|
|
183
108
|
|
|
184
|
-
|
|
185
|
-
|
|
109
|
+
${({
|
|
110
|
+
fullWidth
|
|
111
|
+
}) => fullWidth && (0, _styledComponents.css)`
|
|
112
|
+
width: 100%;
|
|
113
|
+
`}
|
|
186
114
|
|
|
187
|
-
|
|
188
|
-
|
|
115
|
+
${({
|
|
116
|
+
iconOnly,
|
|
117
|
+
iconPosition,
|
|
118
|
+
iconType
|
|
119
|
+
}) => (0, _styledComponents.css)`
|
|
120
|
+
${_icon.default} {
|
|
121
|
+
margin-left: ${!iconOnly && iconPosition === "after" ? "var(--spacing100)" : "0px"};
|
|
122
|
+
margin-right: ${!iconOnly && iconPosition === "before" ? "var(--spacing100)" : "0px"};
|
|
123
|
+
margin-bottom: ${iconOnly ? "1px" : "0px"};
|
|
124
|
+
height: ${additionalIconStyle(iconType)};
|
|
125
|
+
svg {
|
|
126
|
+
margin-top: 0;
|
|
127
|
+
}
|
|
128
|
+
${iconOnly && "margin-left: auto; margin-right: auto"}
|
|
129
|
+
}
|
|
130
|
+
`}
|
|
131
|
+
`;
|
|
132
|
+
const StyledButtonSubtext = _styledComponents.default.span`
|
|
133
|
+
font-size: 14px;
|
|
134
|
+
font-weight: 400;
|
|
135
|
+
display: block;
|
|
136
|
+
`;
|
|
137
|
+
exports.StyledButtonSubtext = StyledButtonSubtext;
|
|
138
|
+
StyledButton.defaultProps = {
|
|
139
|
+
theme: _base.default
|
|
189
140
|
};
|
|
190
141
|
var _default = StyledButton;
|
|
191
142
|
exports.default = _default;
|
|
@@ -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: {
|
|
@@ -45,6 +45,8 @@ const MultiActionButton = ({
|
|
|
45
45
|
children,
|
|
46
46
|
text,
|
|
47
47
|
subtext,
|
|
48
|
+
"data-element": dataElement,
|
|
49
|
+
"data-role": dataRole,
|
|
48
50
|
...rest
|
|
49
51
|
}) => {
|
|
50
52
|
if (!deprecatedWarnTriggered && as) {
|
|
@@ -159,7 +161,6 @@ const MultiActionButton = ({
|
|
|
159
161
|
disabled,
|
|
160
162
|
displayed: showAdditionalButtons,
|
|
161
163
|
onTouchStart: showButtons,
|
|
162
|
-
onClick: rest.onClick,
|
|
163
164
|
onFocus: focusMainButton,
|
|
164
165
|
onBlur: () => {
|
|
165
166
|
isMainButtonFocused.current = false;
|
|
@@ -167,7 +168,8 @@ const MultiActionButton = ({
|
|
|
167
168
|
onKeyDown: handleMainButtonKeyDown,
|
|
168
169
|
buttonType: buttonType || as,
|
|
169
170
|
size,
|
|
170
|
-
subtext
|
|
171
|
+
subtext,
|
|
172
|
+
...(0, _utils.filterOutStyledSystemSpacingProps)(rest)
|
|
171
173
|
};
|
|
172
174
|
|
|
173
175
|
if (!disabled) {
|
|
@@ -211,8 +213,8 @@ const MultiActionButton = ({
|
|
|
211
213
|
onMouseLeave: hideButtons,
|
|
212
214
|
ref: ref,
|
|
213
215
|
"data-component": "multi-action-button",
|
|
214
|
-
"data-element":
|
|
215
|
-
"data-role":
|
|
216
|
+
"data-element": dataElement,
|
|
217
|
+
"data-role": dataRole,
|
|
216
218
|
align: align,
|
|
217
219
|
displayed: showAdditionalButtons
|
|
218
220
|
}, (0, _utils.filterStyledSystemMarginProps)(rest)), /*#__PURE__*/_react.default.createElement(_button.default, _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,34 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
4
|
+
value: true,
|
|
5
5
|
});
|
|
6
|
+
|
|
6
7
|
exports.default = void 0;
|
|
7
8
|
|
|
8
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
11
|
|
|
10
|
-
var _checkableInputSvgWrapper = _interopRequireDefault(
|
|
12
|
+
var _checkableInputSvgWrapper = _interopRequireDefault(
|
|
13
|
+
require("../../__internal__/checkable-input/checkable-input-svg-wrapper.style")
|
|
14
|
+
);
|
|
11
15
|
|
|
12
|
-
function _interopRequireDefault(obj) {
|
|
16
|
+
function _interopRequireDefault(obj) {
|
|
17
|
+
return obj && obj.__esModule ? obj : { default: obj };
|
|
18
|
+
}
|
|
13
19
|
|
|
14
20
|
const RadioButtonSvg = () => {
|
|
15
|
-
return /*#__PURE__*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
return /*#__PURE__*/ _react.default.createElement(
|
|
22
|
+
_checkableInputSvgWrapper.default,
|
|
23
|
+
null,
|
|
24
|
+
/*#__PURE__*/ _react.default.createElement(
|
|
25
|
+
"svg",
|
|
26
|
+
{
|
|
27
|
+
focusable: "false",
|
|
28
|
+
viewBox: "0 0 15 15",
|
|
29
|
+
},
|
|
30
|
+
/*#__PURE__*/ _react.default.createElement(
|
|
31
|
+
"g",
|
|
32
|
+
{
|
|
33
|
+
stroke: "none",
|
|
34
|
+
strokeWidth: "1",
|
|
35
|
+
fill: "none",
|
|
36
|
+
fillRule: "evenodd",
|
|
37
|
+
},
|
|
38
|
+
/*#__PURE__*/ _react.default.createElement("circle", {
|
|
39
|
+
className: "radio-button-check",
|
|
40
|
+
fill: "#FFFFFF",
|
|
41
|
+
cx: "7.5",
|
|
42
|
+
cy: "7.5",
|
|
43
|
+
r: "5",
|
|
44
|
+
})
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
);
|
|
30
48
|
};
|
|
31
49
|
|
|
32
|
-
var _default = /*#__PURE__*/_react.default.memo(RadioButtonSvg, () => true);
|
|
50
|
+
var _default = /*#__PURE__*/ _react.default.memo(RadioButtonSvg, () => true);
|
|
33
51
|
|
|
34
|
-
exports.default = _default;
|
|
52
|
+
exports.default = _default;
|
|
@@ -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: {
|
|
@@ -61,6 +61,8 @@ const SplitButton = ({
|
|
|
61
61
|
size = "medium",
|
|
62
62
|
subtext,
|
|
63
63
|
text,
|
|
64
|
+
"data-element": dataElement,
|
|
65
|
+
"data-role": dataRole,
|
|
64
66
|
...rest
|
|
65
67
|
}) => {
|
|
66
68
|
if (!deprecatedWarnTriggered && as) {
|
|
@@ -145,7 +147,8 @@ const SplitButton = ({
|
|
|
145
147
|
iconType,
|
|
146
148
|
onClick,
|
|
147
149
|
size,
|
|
148
|
-
subtext
|
|
150
|
+
subtext,
|
|
151
|
+
...(0, _utils.filterOutStyledSystemSpacingProps)(rest)
|
|
149
152
|
};
|
|
150
153
|
}
|
|
151
154
|
|
|
@@ -173,8 +176,8 @@ const SplitButton = ({
|
|
|
173
176
|
function componentTags() {
|
|
174
177
|
return {
|
|
175
178
|
"data-component": "split-button",
|
|
176
|
-
"data-element":
|
|
177
|
-
"data-role":
|
|
179
|
+
"data-element": dataElement,
|
|
180
|
+
"data-role": dataRole
|
|
178
181
|
};
|
|
179
182
|
}
|
|
180
183
|
|
|
@@ -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>;
|
|
@@ -5,21 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
|
|
10
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
9
|
|
|
12
10
|
var _base = _interopRequireDefault(require("../../style/themes/base"));
|
|
13
11
|
|
|
14
12
|
var _color = require("../../style/utils/color");
|
|
15
13
|
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
16
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const pointerColor = (type, theme, bgColor) => {
|
|
20
|
+
const pointerColor = (theme, bgColor, type) => {
|
|
23
21
|
if (bgColor) return (0, _color.toColor)(theme, bgColor);
|
|
24
22
|
return type === "error" ? "var(--colorsSemanticNegative500)" : "var(--colorsSemanticNeutral500)";
|
|
25
23
|
};
|
|
@@ -38,7 +36,7 @@ const StyledTooltipPointer = _styledComponents.default.div`
|
|
|
38
36
|
${position === "top" && (0, _styledComponents.css)`
|
|
39
37
|
border-left: 8px solid transparent;
|
|
40
38
|
border-right: 8px solid transparent;
|
|
41
|
-
border-top: 8px solid ${pointerColor(
|
|
39
|
+
border-top: 8px solid ${pointerColor(theme, bgColor, type)};
|
|
42
40
|
bottom: calc(-1 * var(--spacing100));
|
|
43
41
|
@-moz-document url-prefix() {
|
|
44
42
|
bottom: -7px;
|
|
@@ -48,7 +46,7 @@ const StyledTooltipPointer = _styledComponents.default.div`
|
|
|
48
46
|
${position === "bottom" && (0, _styledComponents.css)`
|
|
49
47
|
border-left: 8px solid transparent;
|
|
50
48
|
border-right: 8px solid transparent;
|
|
51
|
-
border-bottom: 8px solid ${pointerColor(
|
|
49
|
+
border-bottom: 8px solid ${pointerColor(theme, bgColor, type)};
|
|
52
50
|
top: calc(-1 * var(--spacing100));
|
|
53
51
|
@-moz-document url-prefix() {
|
|
54
52
|
top: -7px;
|
|
@@ -58,7 +56,7 @@ const StyledTooltipPointer = _styledComponents.default.div`
|
|
|
58
56
|
${position === "right" && (0, _styledComponents.css)`
|
|
59
57
|
border-top: 8px solid transparent;
|
|
60
58
|
border-bottom: 8px solid transparent;
|
|
61
|
-
border-right: 8px solid ${pointerColor(
|
|
59
|
+
border-right: 8px solid ${pointerColor(theme, bgColor, type)};
|
|
62
60
|
left: calc(-1 * var(--spacing100));
|
|
63
61
|
@-moz-document url-prefix() {
|
|
64
62
|
left: -7px;
|
|
@@ -68,7 +66,7 @@ const StyledTooltipPointer = _styledComponents.default.div`
|
|
|
68
66
|
${position === "left" && (0, _styledComponents.css)`
|
|
69
67
|
border-top: 8px solid transparent;
|
|
70
68
|
border-bottom: 8px solid transparent;
|
|
71
|
-
border-left: 8px solid ${pointerColor(
|
|
69
|
+
border-left: 8px solid ${pointerColor(theme, bgColor, type)};
|
|
72
70
|
right: calc(-1 * var(--spacing100));
|
|
73
71
|
@-moz-document url-prefix() {
|
|
74
72
|
right: -7px;
|
|
@@ -80,11 +78,5 @@ StyledTooltipPointer.defaultProps = {
|
|
|
80
78
|
theme: _base.default,
|
|
81
79
|
position: "top"
|
|
82
80
|
};
|
|
83
|
-
StyledTooltipPointer.propTypes = {
|
|
84
|
-
position: _propTypes.default.oneOf(["bottom", "left", "right", "top"]),
|
|
85
|
-
theme: _propTypes.default.object,
|
|
86
|
-
type: _propTypes.default.string,
|
|
87
|
-
bgColor: _propTypes.default.string
|
|
88
|
-
};
|
|
89
81
|
var _default = StyledTooltipPointer;
|
|
90
82
|
exports.default = _default;
|