@synerise/ds-alert 1.1.44 → 1.1.46
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/CHANGELOG.md +8 -0
- package/dist/Alert.d.ts +2 -3
- package/dist/Alert.js +31 -36
- package/dist/Alert.styles.d.ts +8 -8
- package/dist/Alert.styles.js +25 -24
- package/dist/Alert.types.d.ts +3 -3
- package/dist/Alert.types.js +1 -1
- package/dist/AlertInfo/AlertInfo.d.ts +2 -2
- package/dist/AlertInfo/AlertInfo.js +35 -44
- package/dist/AlertInfo/AlertInfo.styles.d.ts +6 -6
- package/dist/AlertInfo/AlertInfo.styles.js +25 -33
- package/dist/AlertInfo/AlertInfo.types.d.ts +1 -1
- package/dist/AlertInfo/AlertInfo.types.js +30 -8
- package/dist/BroadcastBar/BroadcastBar.d.ts +1 -1
- package/dist/BroadcastBar/BroadcastBar.js +5 -5
- package/dist/ColorSemantic/AlertSemanticColor.d.ts +2 -2
- package/dist/ColorSemantic/AlertSemanticColor.js +25 -33
- package/dist/ColorSemantic/AlertSemanticColor.styles.d.ts +3 -3
- package/dist/ColorSemantic/AlertSemanticColor.styles.js +16 -18
- package/dist/ColorSemantic/AlertSemanticColor.types.d.ts +1 -1
- package/dist/ColorSemantic/AlertSemanticColor.types.js +1 -1
- package/dist/IconAlert/IconAlert.d.ts +1 -1
- package/dist/IconAlert/IconAlert.js +5 -4
- package/dist/InlineAlert/InlineAlert.d.ts +2 -2
- package/dist/InlineAlert/InlineAlert.js +21 -24
- package/dist/InlineAlert/InlineAlert.styles.d.ts +3 -3
- package/dist/InlineAlert/InlineAlert.styles.js +13 -15
- package/dist/InlineAlert/InlineAlert.types.d.ts +1 -1
- package/dist/InlineAlert/InlineAlert.types.js +1 -1
- package/dist/SectionMessage/SectionMessage.d.ts +1 -1
- package/dist/SectionMessage/SectionMessage.js +5 -4
- package/dist/Toast/Toast.d.ts +2 -2
- package/dist/Toast/Toast.js +53 -77
- package/dist/Toast/Toast.styles.d.ts +20 -21
- package/dist/Toast/Toast.styles.js +80 -114
- package/dist/Toast/Toast.types.d.ts +2 -2
- package/dist/Toast/Toast.types.js +1 -1
- package/dist/assets/style/index-tn0RQdqM.css +0 -0
- package/dist/index.js +24 -19
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.1.46](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@1.1.45...@synerise/ds-alert@1.1.46) (2026-04-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-alert
|
|
9
|
+
|
|
10
|
+
## [1.1.45](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@1.1.44...@synerise/ds-alert@1.1.45) (2026-03-24)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @synerise/ds-alert
|
|
13
|
+
|
|
6
14
|
## [1.1.44](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@1.1.43...@synerise/ds-alert@1.1.44) (2026-03-20)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @synerise/ds-alert
|
package/dist/Alert.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import './style/index.less';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AlertSubComponents, Props } from './Alert.types';
|
|
4
3
|
/**
|
|
5
4
|
* @deprecated use `@synerise/ds-section-message` or `@synerise/ds-toast` instead
|
|
6
5
|
*/
|
package/dist/Alert.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
import React from
|
|
3
|
-
import Icon, {
|
|
4
|
-
import
|
|
5
|
-
import InlineAlert from
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Icon, { NotificationsM, Close2M, Check2M } from "@synerise/ds-icon";
|
|
4
|
+
import { AlertContent, AlertMessage, AlertDescription, AlertShowMore, AntdAlert } from "./Alert.styles.js";
|
|
5
|
+
import InlineAlert from "./InlineAlert/InlineAlert.js";
|
|
6
6
|
import "./style/index.css";
|
|
7
|
-
|
|
8
|
-
success:
|
|
9
|
-
warning:
|
|
10
|
-
error:
|
|
11
|
-
info:
|
|
7
|
+
const ICONS = {
|
|
8
|
+
success: /* @__PURE__ */ jsx(Check2M, {}),
|
|
9
|
+
warning: /* @__PURE__ */ jsx(Check2M, {}),
|
|
10
|
+
error: /* @__PURE__ */ jsx(Close2M, {}),
|
|
11
|
+
info: /* @__PURE__ */ jsx(NotificationsM, {})
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
onClick: onShowMore
|
|
28
|
-
}
|
|
13
|
+
const DEFAULT_ICON = /* @__PURE__ */ jsx(Check2M, {});
|
|
14
|
+
const Alert = (props) => {
|
|
15
|
+
const {
|
|
16
|
+
icon,
|
|
17
|
+
type,
|
|
18
|
+
message,
|
|
19
|
+
description,
|
|
20
|
+
showMoreLabel,
|
|
21
|
+
onShowMore
|
|
22
|
+
} = props;
|
|
23
|
+
const renderMessage = React.useMemo(() => {
|
|
24
|
+
return /* @__PURE__ */ jsxs(AlertContent, { children: [
|
|
25
|
+
message && /* @__PURE__ */ jsx(AlertMessage, { children: message }),
|
|
26
|
+
description && /* @__PURE__ */ jsx(AlertDescription, { children: description }),
|
|
27
|
+
onShowMore && showMoreLabel && /* @__PURE__ */ jsx(AlertShowMore, { onClick: onShowMore, children: showMoreLabel })
|
|
28
|
+
] });
|
|
29
29
|
}, [message, description, showMoreLabel, onShowMore]);
|
|
30
|
-
|
|
30
|
+
const renderIcon = React.useMemo(() => {
|
|
31
31
|
if (icon) {
|
|
32
32
|
return icon;
|
|
33
33
|
}
|
|
@@ -36,14 +36,9 @@ var Alert = function Alert(props) {
|
|
|
36
36
|
}
|
|
37
37
|
return DEFAULT_ICON;
|
|
38
38
|
}, [icon, type]);
|
|
39
|
-
return
|
|
40
|
-
className: "ds-alert",
|
|
41
|
-
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
42
|
-
component: renderIcon
|
|
43
|
-
}),
|
|
44
|
-
message: renderMessage,
|
|
45
|
-
description: null
|
|
46
|
-
}));
|
|
39
|
+
return /* @__PURE__ */ jsx(AntdAlert, { ...props, className: "ds-alert", icon: /* @__PURE__ */ jsx(Icon, { component: renderIcon }), message: renderMessage, description: null });
|
|
47
40
|
};
|
|
48
41
|
Alert.InlineAlert = InlineAlert;
|
|
49
|
-
export
|
|
42
|
+
export {
|
|
43
|
+
Alert as default
|
|
44
|
+
};
|
package/dist/Alert.styles.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export declare const AntdAlert: import(
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ThemeProps } from 'styled-components';
|
|
3
|
+
import { Props } from './Alert.types';
|
|
4
|
+
export declare const AntdAlert: import('styled-components').StyledComponent<(props: Props & {
|
|
5
5
|
message: React.ReactNode;
|
|
6
6
|
}) => React.JSX.Element, any, ThemeProps<Props>, never>;
|
|
7
|
-
export declare const AlertContent: import(
|
|
8
|
-
export declare const AlertMessage: import(
|
|
9
|
-
export declare const AlertDescription: import(
|
|
10
|
-
export declare const AlertShowMore: import(
|
|
7
|
+
export declare const AlertContent: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const AlertMessage: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
9
|
+
export declare const AlertDescription: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
10
|
+
export declare const AlertShowMore: import('styled-components').StyledComponent<"span", any, {}, never>;
|
package/dist/Alert.styles.js
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import styled, { css } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import Alert from "antd/lib/alert";
|
|
3
|
+
import styled, { css } from "styled-components";
|
|
4
|
+
const DARKER_COLORS = ["green", "yellow"];
|
|
5
|
+
const getColor = (props) => {
|
|
6
|
+
const {
|
|
7
|
+
color,
|
|
8
|
+
theme
|
|
9
|
+
} = props;
|
|
10
|
+
const hue = DARKER_COLORS.includes(color) ? "700" : "600";
|
|
11
|
+
return theme.palette[`${color}-${hue}`];
|
|
10
12
|
};
|
|
11
|
-
|
|
12
|
-
return /*#__PURE__*/React.createElement(Alert, props);
|
|
13
|
-
}).withConfig({
|
|
13
|
+
const AntdAlert = /* @__PURE__ */ styled((props) => /* @__PURE__ */ jsx(Alert, { ...props })).withConfig({
|
|
14
14
|
displayName: "Alertstyles__AntdAlert",
|
|
15
15
|
componentId: "sc-k5v82n-0"
|
|
16
|
-
})(["", ";", ";", ";"],
|
|
17
|
-
|
|
18
|
-
}, function (props) {
|
|
19
|
-
return (props.mode === 'background' || props.mode === 'clear' || !props.mode) && css(["&&&{box-shadow:none;}"]);
|
|
20
|
-
}, function (props) {
|
|
21
|
-
return (props.mode === 'outline' || props.mode === 'clear') && css(["&&&{background:transparent;}"]);
|
|
22
|
-
});
|
|
23
|
-
export var AlertContent = styled.div.withConfig({
|
|
16
|
+
})(["", ";", ";", ";"], (props) => Boolean(props.color) && css(["&&&{box-shadow:0 0 0 1px ", ";background-color:", ";color:", ";.ant-alert-icon{svg{color:", ";fill:", ";}}}"], props.theme.palette[`${props.color}-600`], props.theme.palette[`${props.color}-050`], getColor(props), getColor(props), getColor(props)), (props) => (props.mode === "background" || props.mode === "clear" || !props.mode) && css(["&&&{box-shadow:none;}"]), (props) => (props.mode === "outline" || props.mode === "clear") && css(["&&&{background:transparent;}"]));
|
|
17
|
+
const AlertContent = /* @__PURE__ */ styled.div.withConfig({
|
|
24
18
|
displayName: "Alertstyles__AlertContent",
|
|
25
19
|
componentId: "sc-k5v82n-1"
|
|
26
20
|
})(["display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;padding:3px 0;color:inherit;"]);
|
|
27
|
-
|
|
21
|
+
const AlertMessage = /* @__PURE__ */ styled.span.withConfig({
|
|
28
22
|
displayName: "Alertstyles__AlertMessage",
|
|
29
23
|
componentId: "sc-k5v82n-2"
|
|
30
24
|
})(["display:flex;font-size:16px;line-height:1.25;letter-spacing:-0.1px;font-weight:500;margin-bottom:2px;color:inherit;"]);
|
|
31
|
-
|
|
25
|
+
const AlertDescription = /* @__PURE__ */ styled.span.withConfig({
|
|
32
26
|
displayName: "Alertstyles__AlertDescription",
|
|
33
27
|
componentId: "sc-k5v82n-3"
|
|
34
28
|
})(["display:flex;font-size:13px;line-height:1.39;font-weight:normal;margin-bottom:2px;color:inherit;"]);
|
|
35
|
-
|
|
29
|
+
const AlertShowMore = /* @__PURE__ */ styled.span.withConfig({
|
|
36
30
|
displayName: "Alertstyles__AlertShowMore",
|
|
37
31
|
componentId: "sc-k5v82n-4"
|
|
38
|
-
})(["display:flex;font-size:13px;font-weight:500;color:inherit;text-decoration:underline;cursor:pointer;margin-top:6px;"]);
|
|
32
|
+
})(["display:flex;font-size:13px;font-weight:500;color:inherit;text-decoration:underline;cursor:pointer;margin-top:6px;"]);
|
|
33
|
+
export {
|
|
34
|
+
AlertContent,
|
|
35
|
+
AlertDescription,
|
|
36
|
+
AlertMessage,
|
|
37
|
+
AlertShowMore,
|
|
38
|
+
AntdAlert
|
|
39
|
+
};
|
package/dist/Alert.types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { AlertProps } from 'antd/lib/alert';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { default as InlineAlert } from './InlineAlert/InlineAlert';
|
|
4
4
|
export type AlertType = 'success' | 'warning' | 'error' | 'info';
|
|
5
5
|
export interface Props extends Omit<AlertProps, 'type' | 'message'> {
|
|
6
6
|
message?: React.ReactNode;
|
package/dist/Alert.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,55 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
text = _ref.text,
|
|
21
|
-
button = _ref.button,
|
|
22
|
-
fontSize = _ref.fontSize,
|
|
23
|
-
mode = _ref.mode;
|
|
24
|
-
var mapTypeToStatus = {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import Icon, { CheckL, CheckXl, WarningL, WarningXl } from "@synerise/ds-icon";
|
|
3
|
+
import { AlertWrapper, AlertIconContainer, StatusIconContainer, HeaderWrapper, TextWrapper, ButtonWrapper } from "./AlertInfo.styles.js";
|
|
4
|
+
import { AlertSize } from "./AlertInfo.types.js";
|
|
5
|
+
const mapSizeToPx = {
|
|
6
|
+
[AlertSize.SMALL]: 48,
|
|
7
|
+
[AlertSize.MEDIUM]: 96
|
|
8
|
+
};
|
|
9
|
+
const AlertInfo = ({
|
|
10
|
+
size = AlertSize.SMALL,
|
|
11
|
+
label,
|
|
12
|
+
labelPosition = "right",
|
|
13
|
+
type,
|
|
14
|
+
text,
|
|
15
|
+
button,
|
|
16
|
+
fontSize,
|
|
17
|
+
mode
|
|
18
|
+
}) => {
|
|
19
|
+
const mapTypeToStatus = {
|
|
25
20
|
warning: {
|
|
26
21
|
IconComponent: size === AlertSize.SMALL ? WarningL : WarningXl,
|
|
27
|
-
iconColor:
|
|
22
|
+
iconColor: "yellow-600"
|
|
28
23
|
},
|
|
29
24
|
error: {
|
|
30
25
|
IconComponent: size === AlertSize.SMALL ? WarningL : WarningXl,
|
|
31
|
-
iconColor:
|
|
26
|
+
iconColor: "red-600"
|
|
32
27
|
},
|
|
33
28
|
success: {
|
|
34
29
|
IconComponent: size === AlertSize.SMALL ? CheckL : CheckXl,
|
|
35
|
-
iconColor:
|
|
30
|
+
iconColor: "green-600"
|
|
36
31
|
}
|
|
37
32
|
};
|
|
38
|
-
|
|
39
|
-
IconComponent
|
|
40
|
-
iconContainerStyles
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}, text), /*#__PURE__*/React.createElement(S.TextWrapper, {
|
|
52
|
-
labelPosition: labelPosition
|
|
53
|
-
}, label), button && /*#__PURE__*/React.createElement(S.ButtonWrapper, null, button));
|
|
33
|
+
const {
|
|
34
|
+
IconComponent,
|
|
35
|
+
...iconContainerStyles
|
|
36
|
+
} = mapTypeToStatus[type];
|
|
37
|
+
return /* @__PURE__ */ jsxs(AlertWrapper, { mode, className: "ds-alert-info", labelPosition, children: [
|
|
38
|
+
/* @__PURE__ */ jsx(AlertIconContainer, { children: /* @__PURE__ */ jsx(StatusIconContainer, { ...iconContainerStyles, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(IconComponent, {}), size: mapSizeToPx[size] }) }) }),
|
|
39
|
+
text && /* @__PURE__ */ jsx(HeaderWrapper, { size, fontSize, children: text }),
|
|
40
|
+
/* @__PURE__ */ jsx(TextWrapper, { labelPosition, children: label }),
|
|
41
|
+
button && /* @__PURE__ */ jsx(ButtonWrapper, { children: button })
|
|
42
|
+
] });
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
AlertInfo as default
|
|
54
46
|
};
|
|
55
|
-
export default AlertInfo;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { AlertSize } from './AlertInfo.types';
|
|
2
|
-
export declare const TextWrapper: import(
|
|
2
|
+
export declare const TextWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
3
3
|
labelPosition: "bottom" | "right";
|
|
4
4
|
}, never>;
|
|
5
|
-
export declare const HeaderWrapper: import(
|
|
5
|
+
export declare const HeaderWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
6
6
|
fontSize?: AlertSize;
|
|
7
7
|
size?: AlertSize;
|
|
8
8
|
}, never>;
|
|
9
|
-
export declare const ButtonWrapper: import(
|
|
10
|
-
export declare const AlertWrapper: import(
|
|
9
|
+
export declare const ButtonWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
10
|
+
export declare const AlertWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
11
11
|
labelPosition: "bottom" | "right";
|
|
12
12
|
mode?: "absolute";
|
|
13
13
|
}, never>;
|
|
14
|
-
export declare const AlertIconContainer: import(
|
|
15
|
-
export declare const StatusIconContainer: import(
|
|
14
|
+
export declare const AlertIconContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
15
|
+
export declare const StatusIconContainer: import('styled-components').StyledComponent<"div", any, {
|
|
16
16
|
iconColor: string;
|
|
17
17
|
}, never>;
|
|
@@ -1,48 +1,40 @@
|
|
|
1
|
-
import styled, { css } from
|
|
2
|
-
import { IconContainer } from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
right:
|
|
7
|
-
bottom:
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
import { IconContainer } from "@synerise/ds-icon";
|
|
3
|
+
import { FontSize, AlertSize } from "./AlertInfo.types.js";
|
|
4
|
+
const FONT_SIZE_DEFAULT = 14;
|
|
5
|
+
const mapElementsPosition = {
|
|
6
|
+
right: "row",
|
|
7
|
+
bottom: "column"
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
const TextWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
10
10
|
displayName: "AlertInfostyles__TextWrapper",
|
|
11
11
|
componentId: "sc-a78l8a-0"
|
|
12
|
-
})(["display:flex;line-height:16px;max-width:440px;word-wrap:break-word;justify-content:", ";text-align:center;"],
|
|
13
|
-
|
|
14
|
-
});
|
|
15
|
-
export var HeaderWrapper = styled.div.withConfig({
|
|
12
|
+
})(["display:flex;line-height:16px;max-width:440px;word-wrap:break-word;justify-content:", ";text-align:center;"], (props) => props.labelPosition === "bottom" ? "center" : "flex-start");
|
|
13
|
+
const HeaderWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
16
14
|
displayName: "AlertInfostyles__HeaderWrapper",
|
|
17
15
|
componentId: "sc-a78l8a-1"
|
|
18
|
-
})(["display:flex;line-height:16px;color:", ";font-size:", "px;font-weight:500;margin-top:", ";padding:", ";"],
|
|
19
|
-
|
|
20
|
-
}, function (props) {
|
|
21
|
-
return props.fontSize ? FontSize[props.fontSize] : FONT_SIZE_DEFAULT;
|
|
22
|
-
}, function (props) {
|
|
23
|
-
return props.size === AlertSize.SMALL ? '0px' : '30px';
|
|
24
|
-
}, function (props) {
|
|
25
|
-
return props.fontSize === AlertSize.SMALL ? '4px 0 12px' : '8px 0 18px';
|
|
26
|
-
});
|
|
27
|
-
export var ButtonWrapper = styled.div.withConfig({
|
|
16
|
+
})(["display:flex;line-height:16px;color:", ";font-size:", "px;font-weight:500;margin-top:", ";padding:", ";"], (props) => props.theme.palette["grey-800"], (props) => props.fontSize ? FontSize[props.fontSize] : FONT_SIZE_DEFAULT, (props) => props.size === AlertSize.SMALL ? "0px" : "30px", (props) => props.fontSize === AlertSize.SMALL ? "4px 0 12px" : "8px 0 18px");
|
|
17
|
+
const ButtonWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
28
18
|
displayName: "AlertInfostyles__ButtonWrapper",
|
|
29
19
|
componentId: "sc-a78l8a-2"
|
|
30
20
|
})(["padding-top:12px;"]);
|
|
31
|
-
|
|
21
|
+
const AlertWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
32
22
|
displayName: "AlertInfostyles__AlertWrapper",
|
|
33
23
|
componentId: "sc-a78l8a-3"
|
|
34
|
-
})(["display:flex;flex-direction:", ";align-items:center;justify-content:center;", ";"],
|
|
35
|
-
|
|
36
|
-
}, function (props) {
|
|
37
|
-
return props.mode === 'absolute' && css(["position:absolute;top:50%;left:50%;"]);
|
|
38
|
-
});
|
|
39
|
-
export var AlertIconContainer = styled.div.withConfig({
|
|
24
|
+
})(["display:flex;flex-direction:", ";align-items:center;justify-content:center;", ";"], (props) => mapElementsPosition[props.labelPosition], (props) => props.mode === "absolute" && css(["position:absolute;top:50%;left:50%;"]));
|
|
25
|
+
const AlertIconContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
40
26
|
displayName: "AlertInfostyles__AlertIconContainer",
|
|
41
27
|
componentId: "sc-a78l8a-4"
|
|
42
28
|
})(["margin:0 0 12px;"]);
|
|
43
|
-
|
|
29
|
+
const StatusIconContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
44
30
|
displayName: "AlertInfostyles__StatusIconContainer",
|
|
45
31
|
componentId: "sc-a78l8a-5"
|
|
46
|
-
})(["width:40px;height:40px;border-radius:20px;text-align:center;display:flex;align-items:center;justify-content:center;margin:0 auto;&&{", "{fill:", ";}}"], IconContainer,
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
})(["width:40px;height:40px;border-radius:20px;text-align:center;display:flex;align-items:center;justify-content:center;margin:0 auto;&&{", "{fill:", ";}}"], IconContainer, (props) => props.theme.palette[props.iconColor]);
|
|
33
|
+
export {
|
|
34
|
+
AlertIconContainer,
|
|
35
|
+
AlertWrapper,
|
|
36
|
+
ButtonWrapper,
|
|
37
|
+
HeaderWrapper,
|
|
38
|
+
StatusIconContainer,
|
|
39
|
+
TextWrapper
|
|
40
|
+
};
|
|
@@ -1,8 +1,30 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
var AlertSize = /* @__PURE__ */ ((AlertSize2) => {
|
|
2
|
+
AlertSize2["SMALL"] = "small";
|
|
3
|
+
AlertSize2["MEDIUM"] = "medium";
|
|
4
|
+
return AlertSize2;
|
|
5
|
+
})(AlertSize || {});
|
|
6
|
+
const IconSize = {
|
|
7
|
+
[
|
|
8
|
+
"small"
|
|
9
|
+
/* SMALL */
|
|
10
|
+
]: 48,
|
|
11
|
+
[
|
|
12
|
+
"medium"
|
|
13
|
+
/* MEDIUM */
|
|
14
|
+
]: 96
|
|
15
|
+
};
|
|
16
|
+
const FontSize = {
|
|
17
|
+
[
|
|
18
|
+
"small"
|
|
19
|
+
/* SMALL */
|
|
20
|
+
]: 14,
|
|
21
|
+
[
|
|
22
|
+
"medium"
|
|
23
|
+
/* MEDIUM */
|
|
24
|
+
]: 18
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
AlertSize,
|
|
28
|
+
FontSize,
|
|
29
|
+
IconSize
|
|
30
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import BroadcastBar from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import BroadcastBar from "@synerise/ds-broadcast-bar";
|
|
2
|
+
import { default as default2 } from "@synerise/ds-broadcast-bar";
|
|
3
|
+
export {
|
|
4
|
+
default2 as default
|
|
5
|
+
};
|
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Icon, { NotificationsReceiveM, UpdateDataM, UserCheckM, HelpFillM, InfoFillM, WarningFillM, Check3M } from "@synerise/ds-icon";
|
|
4
|
+
import { Container, IconWrapper } from "./AlertSemanticColor.styles.js";
|
|
5
|
+
const ICONS = {
|
|
6
|
+
positive: /* @__PURE__ */ jsx(Check3M, {}),
|
|
7
|
+
notice: /* @__PURE__ */ jsx(WarningFillM, {}),
|
|
8
|
+
negative: /* @__PURE__ */ jsx(WarningFillM, {}),
|
|
9
|
+
informative: /* @__PURE__ */ jsx(InfoFillM, {}),
|
|
10
|
+
neutral: /* @__PURE__ */ jsx(HelpFillM, {}),
|
|
11
|
+
supply: /* @__PURE__ */ jsx(UserCheckM, {}),
|
|
12
|
+
service: /* @__PURE__ */ jsx(UpdateDataM, {}),
|
|
13
|
+
entity: /* @__PURE__ */ jsx(NotificationsReceiveM, {})
|
|
13
14
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
color = _ref.color,
|
|
23
|
-
mode = _ref.mode;
|
|
24
|
-
var renderIcon = React.useMemo(function () {
|
|
15
|
+
const DEFAULT_ICON = /* @__PURE__ */ jsx(WarningFillM, {});
|
|
16
|
+
const AlertSemanticColor = ({
|
|
17
|
+
icon,
|
|
18
|
+
type,
|
|
19
|
+
color,
|
|
20
|
+
mode
|
|
21
|
+
}) => {
|
|
22
|
+
const renderIcon = React.useMemo(() => {
|
|
25
23
|
if (icon) {
|
|
26
24
|
return icon;
|
|
27
25
|
}
|
|
@@ -30,14 +28,8 @@ var AlertSemanticColor = function AlertSemanticColor(_ref) {
|
|
|
30
28
|
}
|
|
31
29
|
return DEFAULT_ICON;
|
|
32
30
|
}, [icon, type]);
|
|
33
|
-
return
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
mode: mode,
|
|
38
|
-
color: color
|
|
39
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
40
|
-
component: renderIcon
|
|
41
|
-
})));
|
|
31
|
+
return /* @__PURE__ */ jsx(Container, { mode, color, children: /* @__PURE__ */ jsx(IconWrapper, { mode, color, children: /* @__PURE__ */ jsx(Icon, { component: renderIcon }) }) });
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
AlertSemanticColor as default
|
|
42
35
|
};
|
|
43
|
-
export default AlertSemanticColor;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const IconWrapper: import(
|
|
1
|
+
import { ColorType, ModeType } from './AlertSemanticColor.types';
|
|
2
|
+
export declare const IconWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
3
3
|
mode?: ModeType;
|
|
4
4
|
color?: ColorType;
|
|
5
5
|
}, never>;
|
|
6
|
-
export declare const Container: import(
|
|
6
|
+
export declare const Container: import('styled-components').StyledComponent<"div", any, {
|
|
7
7
|
mode?: ModeType;
|
|
8
8
|
color?: ColorType;
|
|
9
9
|
}, never>;
|
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
3
|
-
if (props.mode ===
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const getAlertIconColor = (props) => {
|
|
3
|
+
if (props.mode === "background" || props.mode === "shadow") {
|
|
4
4
|
return props.theme.palette.white;
|
|
5
5
|
}
|
|
6
|
-
return props.theme.palette[props.color
|
|
6
|
+
return props.theme.palette[`${props.color}-600`];
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
if (props.mode ===
|
|
10
|
-
return props.theme.palette[props.color
|
|
8
|
+
const getAlertColor = (props) => {
|
|
9
|
+
if (props.mode === "background" || props.mode === "shadow") {
|
|
10
|
+
return props.theme.palette[`${props.color}-600`];
|
|
11
11
|
}
|
|
12
|
-
if (props.mode ===
|
|
13
|
-
return props.theme.palette[props.color
|
|
12
|
+
if (props.mode === "background-outline") {
|
|
13
|
+
return props.theme.palette[`${props.color}-050`];
|
|
14
14
|
}
|
|
15
15
|
return props.theme.palette.white;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
18
18
|
displayName: "AlertSemanticColorstyles__IconWrapper",
|
|
19
19
|
componentId: "sc-1rxl2y2-0"
|
|
20
20
|
})(["display:flex;align-items:center;justify-content:center;margin-top:35px;svg{fill:", ";}"], getAlertIconColor);
|
|
21
|
-
|
|
21
|
+
const Container = /* @__PURE__ */ styled.div.withConfig({
|
|
22
22
|
displayName: "AlertSemanticColorstyles__Container",
|
|
23
23
|
componentId: "sc-1rxl2y2-1"
|
|
24
|
-
})(["width:100px;height:100px;align-items:center;justify-content:center;background-color:", ";border:1px solid ", ";border-radius:4px;-webkit-box-shadow:", ";box-shadow:", ";"], getAlertColor,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
return props.mode === 'shadow' ? "0px 16px 32px 5px " + props.theme.palette["grey-300"] : 'none';
|
|
30
|
-
});
|
|
24
|
+
})(["width:100px;height:100px;align-items:center;justify-content:center;background-color:", ";border:1px solid ", ";border-radius:4px;-webkit-box-shadow:", ";box-shadow:", ";"], getAlertColor, (props) => props.mode === "background-outline" ? props.theme.palette[`${props.color}-200`] : "none", (props) => props.mode === "shadow" ? `0px 16px 32px 5px ${props.theme.palette[`grey-300`]}` : "none", (props) => props.mode === "shadow" ? `0px 16px 32px 5px ${props.theme.palette[`grey-300`]}` : "none");
|
|
25
|
+
export {
|
|
26
|
+
Container,
|
|
27
|
+
IconWrapper
|
|
28
|
+
};
|