carbon-react 152.2.1 → 152.3.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/__internal__/ai-icon/ai-icon.component.d.ts +4 -0
- package/esm/__internal__/ai-icon/ai-icon.component.js +28 -0
- package/esm/__internal__/ai-icon/index.d.ts +1 -0
- package/esm/__internal__/ai-icon/index.js +1 -0
- package/esm/__internal__/utils/helpers/events/events.d.ts +1 -1
- package/esm/components/button/button-types.style.js +11 -1
- package/esm/components/button/button.component.js +1 -1
- package/esm/components/hr/hr.style.js +1 -1
- package/esm/components/image/image.style.d.ts +1 -1
- package/esm/components/message/message.component.d.ts +5 -1
- package/esm/components/message/message.component.js +38 -24
- package/esm/components/message/message.style.d.ts +4 -1
- package/esm/components/message/message.style.js +39 -13
- package/esm/components/split-button/split-button-toggle.style.d.ts +1 -0
- package/esm/components/split-button/split-button-toggle.style.js +30 -2
- package/esm/components/split-button/split-button.component.d.ts +2 -0
- package/esm/components/split-button/split-button.component.js +4 -0
- package/esm/components/time/index.d.ts +1 -1
- package/esm/components/time/time.component.js +16 -1
- package/esm/components/toast/toast.component.js +2 -1
- package/esm/components/toast/toast.style.d.ts +2 -3
- package/esm/components/toast/toast.style.js +1 -2
- package/esm/components/typography/typography.style.d.ts +1 -1
- package/esm/locales/en-gb.js +2 -1
- package/esm/locales/locale.d.ts +1 -0
- package/lib/__internal__/ai-icon/ai-icon.component.d.ts +4 -0
- package/lib/__internal__/ai-icon/ai-icon.component.js +36 -0
- package/lib/__internal__/ai-icon/index.d.ts +1 -0
- package/lib/__internal__/ai-icon/index.js +13 -0
- package/lib/__internal__/ai-icon/package.json +6 -0
- package/lib/__internal__/utils/helpers/events/events.d.ts +1 -1
- package/lib/components/button/button-types.style.js +11 -1
- package/lib/components/button/button.component.js +1 -1
- package/lib/components/hr/hr.style.js +1 -1
- package/lib/components/image/image.style.d.ts +1 -1
- package/lib/components/message/message.component.d.ts +5 -1
- package/lib/components/message/message.component.js +38 -24
- package/lib/components/message/message.style.d.ts +4 -1
- package/lib/components/message/message.style.js +38 -13
- package/lib/components/split-button/split-button-toggle.style.d.ts +1 -0
- package/lib/components/split-button/split-button-toggle.style.js +30 -2
- package/lib/components/split-button/split-button.component.d.ts +2 -0
- package/lib/components/split-button/split-button.component.js +4 -0
- package/lib/components/time/index.d.ts +1 -1
- package/lib/components/time/time.component.js +15 -0
- package/lib/components/toast/toast.component.js +2 -1
- package/lib/components/toast/toast.style.d.ts +2 -3
- package/lib/components/toast/toast.style.js +0 -7
- package/lib/components/typography/typography.style.d.ts +1 -1
- package/lib/locales/en-gb.js +2 -1
- package/lib/locales/locale.d.ts +1 -0
- package/package.json +15 -15
- package/esm/components/message/__internal__/message-content/message-content.component.d.ts +0 -9
- package/esm/components/message/__internal__/message-content/message-content.component.js +0 -19
- package/esm/components/message/__internal__/message-content/message-content.style.d.ts +0 -3
- package/esm/components/message/__internal__/message-content/message-content.style.js +0 -12
- package/esm/components/message/__internal__/type-icon/type-icon.component.d.ts +0 -8
- package/esm/components/message/__internal__/type-icon/type-icon.component.js +0 -20
- package/esm/components/message/__internal__/type-icon/type-icon.style.d.ts +0 -7
- package/esm/components/message/__internal__/type-icon/type-icon.style.js +0 -38
- package/lib/components/message/__internal__/message-content/message-content.component.d.ts +0 -9
- package/lib/components/message/__internal__/message-content/message-content.component.js +0 -26
- package/lib/components/message/__internal__/message-content/message-content.style.d.ts +0 -3
- package/lib/components/message/__internal__/message-content/message-content.style.js +0 -19
- package/lib/components/message/__internal__/type-icon/type-icon.component.d.ts +0 -8
- package/lib/components/message/__internal__/type-icon/type-icon.component.js +0 -27
- package/lib/components/message/__internal__/type-icon/type-icon.style.d.ts +0 -7
- package/lib/components/message/__internal__/type-icon/type-icon.style.js +0 -46
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _content = _interopRequireDefault(require("../../../content"));
|
|
9
|
-
var _messageContent = _interopRequireDefault(require("./message-content.style"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
const MessageContent = ({
|
|
12
|
-
title,
|
|
13
|
-
children,
|
|
14
|
-
showCloseIcon,
|
|
15
|
-
reduceLeftPadding
|
|
16
|
-
}) => {
|
|
17
|
-
return /*#__PURE__*/_react.default.createElement(_messageContent.default, {
|
|
18
|
-
showCloseIcon: showCloseIcon,
|
|
19
|
-
reduceLeftPadding: reduceLeftPadding,
|
|
20
|
-
"data-element": "message-content",
|
|
21
|
-
"data-role": "message-content"
|
|
22
|
-
}, /*#__PURE__*/_react.default.createElement(_content.default, {
|
|
23
|
-
title: title
|
|
24
|
-
}, children));
|
|
25
|
-
};
|
|
26
|
-
var _default = exports.default = MessageContent;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
const MessageContentStyle = _styledComponents.default.div`
|
|
10
|
-
padding: 15px ${({
|
|
11
|
-
showCloseIcon
|
|
12
|
-
}) => showCloseIcon ? "50px" : "20px"} 15px
|
|
13
|
-
${({
|
|
14
|
-
reduceLeftPadding
|
|
15
|
-
}) => reduceLeftPadding ? "10px" : "20px"};
|
|
16
|
-
white-space: pre-wrap;
|
|
17
|
-
flex: 1;
|
|
18
|
-
`;
|
|
19
|
-
var _default = exports.default = MessageContentStyle;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { MessageVariant } from "../../message.component";
|
|
3
|
-
export interface TypeIconProps {
|
|
4
|
-
transparent?: boolean;
|
|
5
|
-
variant: MessageVariant;
|
|
6
|
-
}
|
|
7
|
-
declare const TypeIcon: ({ variant, transparent }: TypeIconProps) => React.JSX.Element;
|
|
8
|
-
export default TypeIcon;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _typeIcon = _interopRequireDefault(require("./type-icon.style"));
|
|
9
|
-
var _icon = _interopRequireDefault(require("../../../icon"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
const TypeIcon = ({
|
|
12
|
-
variant,
|
|
13
|
-
transparent
|
|
14
|
-
}) => {
|
|
15
|
-
function iconToRender() {
|
|
16
|
-
if (variant === "neutral") return "info";
|
|
17
|
-
if (variant === "success") return "tick_circle";
|
|
18
|
-
return variant;
|
|
19
|
-
}
|
|
20
|
-
return /*#__PURE__*/_react.default.createElement(_typeIcon.default, {
|
|
21
|
-
variant: variant,
|
|
22
|
-
transparent: transparent
|
|
23
|
-
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
24
|
-
type: iconToRender()
|
|
25
|
-
}));
|
|
26
|
-
};
|
|
27
|
-
var _default = exports.default = TypeIcon;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MessageVariant } from "../../message.component";
|
|
2
|
-
declare type TypeIconStyleProps = {
|
|
3
|
-
transparent?: boolean;
|
|
4
|
-
variant: MessageVariant;
|
|
5
|
-
};
|
|
6
|
-
declare const TypeIconStyle: import("styled-components").StyledComponent<"div", any, TypeIconStyleProps, never>;
|
|
7
|
-
export default TypeIconStyle;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
-
const messageVariants = {
|
|
11
|
-
error: "var(--colorsSemanticNegative500)",
|
|
12
|
-
info: "var(--colorsSemanticInfo500)",
|
|
13
|
-
success: "var(--colorsSemanticPositive500)",
|
|
14
|
-
warning: "var(--colorsSemanticCaution500)",
|
|
15
|
-
neutral: "var(--colorsSemanticNeutral500)",
|
|
16
|
-
notification: "var(--colorsSemanticInfo500)"
|
|
17
|
-
};
|
|
18
|
-
const TypeIconStyle = _styledComponents.default.div`
|
|
19
|
-
align-items: center;
|
|
20
|
-
background-color: ${({
|
|
21
|
-
variant
|
|
22
|
-
}) => messageVariants[variant]};
|
|
23
|
-
display: flex;
|
|
24
|
-
justify-content: center;
|
|
25
|
-
line-height: 100%;
|
|
26
|
-
min-width: 30px;
|
|
27
|
-
text-align: center;
|
|
28
|
-
span {
|
|
29
|
-
&:before {
|
|
30
|
-
color: var(--colorsUtilityYang100);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
${({
|
|
35
|
-
transparent,
|
|
36
|
-
variant
|
|
37
|
-
}) => transparent && (0, _styledComponents.css)`
|
|
38
|
-
background-color: transparent;
|
|
39
|
-
span {
|
|
40
|
-
&:before {
|
|
41
|
-
color: ${messageVariants[variant]};
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
`}
|
|
45
|
-
`;
|
|
46
|
-
var _default = exports.default = TypeIconStyle;
|