carbon-react 104.58.7 → 105.0.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.
- package/esm/components/menu/menu-full-screen/menu-full-screen.component.js +2 -1
- package/esm/components/menu/menu.component.js +2 -1
- package/esm/components/menu/menu.context.d.ts +1 -0
- package/esm/components/menu/menu.context.js +2 -1
- package/esm/components/menu/menu.d.ts +1 -0
- package/esm/components/message/message-content/message-content.component.d.ts +3 -13
- package/esm/components/message/message-content/message-content.component.js +1 -12
- package/esm/components/message/message.component.js +1 -3
- package/esm/components/message/message.d.ts +1 -9
- package/esm/components/message/type-icon/type-icon.component.js +1 -1
- package/esm/components/message/type-icon/type-icon.style.js +1 -1
- package/esm/components/toast/toast.component.js +3 -3
- package/esm/components/toast/toast.config.js +1 -1
- package/esm/components/toast/toast.d.ts +4 -18
- package/esm/components/vertical-divider/index.d.ts +1 -2
- package/esm/components/vertical-divider/vertical-divider.component.d.ts +11 -9
- package/esm/components/vertical-divider/vertical-divider.component.js +1410 -25
- package/esm/components/vertical-divider/vertical-divider.style.d.ts +4 -2
- package/esm/components/vertical-divider/vertical-divider.style.js +1 -1
- package/lib/components/menu/menu-full-screen/menu-full-screen.component.js +2 -1
- package/lib/components/menu/menu.component.js +2 -1
- package/lib/components/menu/menu.context.d.ts +1 -0
- package/lib/components/menu/menu.context.js +2 -1
- package/lib/components/menu/menu.d.ts +1 -0
- package/lib/components/message/message-content/message-content.component.d.ts +3 -13
- package/lib/components/message/message-content/message-content.component.js +1 -12
- package/lib/components/message/message.component.js +1 -3
- package/lib/components/message/message.d.ts +1 -9
- package/lib/components/message/type-icon/type-icon.component.js +1 -1
- package/lib/components/message/type-icon/type-icon.style.js +1 -1
- package/lib/components/toast/toast.component.js +3 -3
- package/lib/components/toast/toast.config.js +1 -1
- package/lib/components/toast/toast.d.ts +4 -18
- package/lib/components/vertical-divider/index.d.ts +1 -2
- package/lib/components/vertical-divider/vertical-divider.component.d.ts +11 -9
- package/lib/components/vertical-divider/vertical-divider.component.js +1459 -28
- package/lib/components/vertical-divider/vertical-divider.style.d.ts +4 -2
- package/lib/components/vertical-divider/vertical-divider.style.js +1 -1
- package/package.json +1 -1
- package/esm/components/row/column/column.component.d.ts +0 -30
- package/esm/components/row/column/column.component.js +0 -72
- package/esm/components/row/column/column.d.ts +0 -22
- package/esm/components/row/column/column.style.d.ts +0 -2
- package/esm/components/row/column/column.style.js +0 -32
- package/esm/components/row/index.d.ts +0 -2
- package/esm/components/row/index.js +0 -2
- package/esm/components/row/row.component.d.ts +0 -24
- package/esm/components/row/row.component.js +0 -59
- package/esm/components/row/row.config.d.ts +0 -11
- package/esm/components/row/row.config.js +0 -12
- package/esm/components/row/row.d.ts +0 -27
- package/esm/components/row/row.style.d.ts +0 -2
- package/esm/components/row/row.style.js +0 -53
- package/esm/components/vertical-divider/vertical-divider.d.ts +0 -113
- package/lib/components/row/column/column.component.d.ts +0 -30
- package/lib/components/row/column/column.component.js +0 -87
- package/lib/components/row/column/column.d.ts +0 -22
- package/lib/components/row/column/column.style.d.ts +0 -2
- package/lib/components/row/column/column.style.js +0 -45
- package/lib/components/row/index.d.ts +0 -2
- package/lib/components/row/index.js +0 -23
- package/lib/components/row/package.json +0 -6
- package/lib/components/row/row.component.d.ts +0 -24
- package/lib/components/row/row.component.js +0 -73
- package/lib/components/row/row.config.d.ts +0 -11
- package/lib/components/row/row.config.js +0 -20
- package/lib/components/row/row.d.ts +0 -27
- package/lib/components/row/row.style.d.ts +0 -2
- package/lib/components/row/row.style.js +0 -71
- package/lib/components/vertical-divider/vertical-divider.d.ts +0 -113
|
@@ -98,7 +98,8 @@ const MenuFullscreen = ({
|
|
|
98
98
|
}, React.Children.map(children, (child, index) => /*#__PURE__*/React.createElement(MenuContext.Provider, {
|
|
99
99
|
value: {
|
|
100
100
|
inFullscreenView: true,
|
|
101
|
-
menuType
|
|
101
|
+
menuType,
|
|
102
|
+
inMenu: true
|
|
102
103
|
}
|
|
103
104
|
}, child, index < React.Children.count(children) - 1 && /*#__PURE__*/React.createElement(MenuDivider, null)))))))));
|
|
104
105
|
};
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
export default MessageContent;
|
|
2
|
-
declare function MessageContent({
|
|
3
|
-
variant: any;
|
|
2
|
+
declare function MessageContent({ title, children }: {
|
|
4
3
|
title: any;
|
|
5
|
-
transparent: any;
|
|
6
4
|
children: any;
|
|
7
5
|
}): JSX.Element;
|
|
8
6
|
declare namespace MessageContent {
|
|
9
|
-
namespace defaultProps {
|
|
10
|
-
const variant: string;
|
|
11
|
-
const transparent: boolean;
|
|
12
|
-
}
|
|
13
7
|
namespace propTypes {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
export const title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
17
|
-
const transparent_1: PropTypes.Requireable<boolean>;
|
|
18
|
-
export { transparent_1 as transparent };
|
|
19
|
-
export const children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
8
|
+
const title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
9
|
+
const children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
20
10
|
}
|
|
21
11
|
}
|
|
22
12
|
import PropTypes from "prop-types";
|
|
@@ -4,28 +4,17 @@ import Content from "../../content/content.component.js";
|
|
|
4
4
|
import MessageContentStyle from "./message-content.style";
|
|
5
5
|
|
|
6
6
|
const MessageContent = ({
|
|
7
|
-
variant,
|
|
8
7
|
title,
|
|
9
|
-
transparent,
|
|
10
8
|
children
|
|
11
9
|
}) => {
|
|
12
|
-
return /*#__PURE__*/React.createElement(MessageContentStyle, {
|
|
13
|
-
variant: variant,
|
|
14
|
-
transparent: transparent
|
|
15
|
-
}, /*#__PURE__*/React.createElement(Content, {
|
|
10
|
+
return /*#__PURE__*/React.createElement(MessageContentStyle, null, /*#__PURE__*/React.createElement(Content, {
|
|
16
11
|
title: title,
|
|
17
12
|
className: "message-content"
|
|
18
13
|
}, children));
|
|
19
14
|
};
|
|
20
15
|
|
|
21
|
-
MessageContent.defaultProps = {
|
|
22
|
-
variant: "info",
|
|
23
|
-
transparent: false
|
|
24
|
-
};
|
|
25
16
|
MessageContent.propTypes = {
|
|
26
|
-
variant: PropTypes.oneOf(["default", "error", "help", "info", "maintenance", "new", "success", "warning"]),
|
|
27
17
|
title: PropTypes.node,
|
|
28
|
-
transparent: PropTypes.bool,
|
|
29
18
|
children: PropTypes.node
|
|
30
19
|
};
|
|
31
20
|
export default MessageContent;
|
|
@@ -51,8 +51,6 @@ const Message = ({
|
|
|
51
51
|
variant: variant,
|
|
52
52
|
transparent: transparent
|
|
53
53
|
}), /*#__PURE__*/React.createElement(MessageContent, {
|
|
54
|
-
variant: variant,
|
|
55
|
-
transparent: transparent,
|
|
56
54
|
title: title
|
|
57
55
|
}, children), renderCloseIcon());
|
|
58
56
|
};
|
|
@@ -60,7 +58,7 @@ const Message = ({
|
|
|
60
58
|
Message.propTypes = { ...marginPropTypes,
|
|
61
59
|
|
|
62
60
|
/** set type of message based on new DLS standard */
|
|
63
|
-
variant: PropTypes.oneOf(["
|
|
61
|
+
variant: PropTypes.oneOf(["error", "info", "success", "warning"]),
|
|
64
62
|
|
|
65
63
|
/** set content to component */
|
|
66
64
|
children: PropTypes.node,
|
|
@@ -21,15 +21,7 @@ export interface MessageProps extends MarginProps {
|
|
|
21
21
|
/** set background to be invisible */
|
|
22
22
|
transparent?: boolean;
|
|
23
23
|
/** set type of message based on new DLS standard */
|
|
24
|
-
variant?:
|
|
25
|
-
| "default"
|
|
26
|
-
| "error"
|
|
27
|
-
| "help"
|
|
28
|
-
| "info"
|
|
29
|
-
| "maintenance"
|
|
30
|
-
| "new"
|
|
31
|
-
| "success"
|
|
32
|
-
| "warning";
|
|
24
|
+
variant?: "error" | "info" | "success" | "warning";
|
|
33
25
|
}
|
|
34
26
|
|
|
35
27
|
declare function Message(props: MessageProps): JSX.Element;
|
|
@@ -20,7 +20,7 @@ TypeIcon.defaultProps = {
|
|
|
20
20
|
transparent: false
|
|
21
21
|
};
|
|
22
22
|
TypeIcon.propTypes = {
|
|
23
|
-
variant: PropTypes.oneOf(["
|
|
23
|
+
variant: PropTypes.oneOf(["error", "info", "success", "warning"]),
|
|
24
24
|
transparent: PropTypes.bool
|
|
25
25
|
};
|
|
26
26
|
export default TypeIcon;
|
|
@@ -39,7 +39,7 @@ TypeIconStyle.defaultProps = {
|
|
|
39
39
|
transparent: false
|
|
40
40
|
};
|
|
41
41
|
TypeIconStyle.propTypes = {
|
|
42
|
-
variant: PropTypes.oneOf(["
|
|
42
|
+
variant: PropTypes.oneOf(["error", "info", "success", "warning"]),
|
|
43
43
|
border: PropTypes.bool,
|
|
44
44
|
transparent: PropTypes.bool
|
|
45
45
|
};
|
|
@@ -13,7 +13,7 @@ import Events from "../../__internal__/utils/helpers/events";
|
|
|
13
13
|
import useLocale from "../../hooks/__internal__/useLocale";
|
|
14
14
|
|
|
15
15
|
const Toast = ({
|
|
16
|
-
as = "
|
|
16
|
+
as = "success",
|
|
17
17
|
children,
|
|
18
18
|
className,
|
|
19
19
|
id,
|
|
@@ -109,10 +109,10 @@ const Toast = ({
|
|
|
109
109
|
|
|
110
110
|
Toast.propTypes = {
|
|
111
111
|
/** Customizes the appearance in the DLS theme */
|
|
112
|
-
variant: PropTypes.oneOf(["
|
|
112
|
+
variant: PropTypes.oneOf(["error", "info", "success", "warning"]),
|
|
113
113
|
|
|
114
114
|
/** Customizes the appearance in a legacy theme through colour (see the 'iconColorSets' for possible values) */
|
|
115
|
-
as: PropTypes.oneOf(["
|
|
115
|
+
as: PropTypes.oneOf(["error", "info", "success", "warning"]),
|
|
116
116
|
|
|
117
117
|
/** Custom className */
|
|
118
118
|
className: PropTypes.string,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// eslint-disable-next-line import/prefer-default-export
|
|
2
|
-
export const TOAST_COLORS = ["
|
|
2
|
+
export const TOAST_COLORS = ["error", "info", "success", "warning"];
|
|
@@ -1,28 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
|
+
type ToastVariants = "error" | "info" | "success" | "warning";
|
|
4
|
+
|
|
3
5
|
export interface ToastPropTypes {
|
|
4
6
|
/** The rendered children of the component. */
|
|
5
7
|
children: React.ReactNode;
|
|
6
8
|
/** Customizes the appearance in the DLS theme */
|
|
7
|
-
variant?:
|
|
8
|
-
| "default"
|
|
9
|
-
| "error"
|
|
10
|
-
| "help"
|
|
11
|
-
| "info"
|
|
12
|
-
| "maintenance"
|
|
13
|
-
| "new"
|
|
14
|
-
| "success"
|
|
15
|
-
| "warning";
|
|
9
|
+
variant?: ToastVariants;
|
|
16
10
|
/** Customizes the appearance in a legacy theme through colour (see the 'iconColorSets' for possible values) */
|
|
17
|
-
as?:
|
|
18
|
-
| "default"
|
|
19
|
-
| "error"
|
|
20
|
-
| "help"
|
|
21
|
-
| "info"
|
|
22
|
-
| "maintenance"
|
|
23
|
-
| "new"
|
|
24
|
-
| "success"
|
|
25
|
-
| "warning";
|
|
11
|
+
as?: ToastVariants;
|
|
26
12
|
/** Custom className */
|
|
27
13
|
className?: string;
|
|
28
14
|
/** Custom id */
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { default } from "./vertical-divider";
|
|
2
|
-
export * from "./vertical-divider";
|
|
1
|
+
export { default } from "./vertical-divider.component";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SpaceProps } from "styled-system";
|
|
3
|
+
declare type TintRange = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100;
|
|
4
|
+
export interface VerticalDividerPropTypes extends SpaceProps {
|
|
5
|
+
h?: number | string;
|
|
6
|
+
height?: number | string;
|
|
7
|
+
displayInline?: boolean;
|
|
8
|
+
/** the supported rage is 1-100 */
|
|
9
|
+
tint?: TintRange;
|
|
10
10
|
}
|
|
11
|
+
declare const VerticalDivider: ({ h, height, displayInline, tint, ...props }: VerticalDividerPropTypes) => JSX.Element;
|
|
12
|
+
export default VerticalDivider;
|