@synerise/ds-alert 1.1.9 → 1.1.10

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 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.10](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@1.1.9...@synerise/ds-alert@1.1.10) (2025-07-17)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-alert
9
+
10
+
11
+
12
+
13
+
6
14
  ## [1.1.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@1.1.8...@synerise/ds-alert@1.1.9) (2025-07-15)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-alert
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
- import { type Props } from './SectionMessage.types';
3
- declare const SectionMessage: ({ icon, type, message, description, showMoreLabel, onShowMore, onClose, suffixel, moreButtons, withEmphasis, withLink, unorderedList, color, withClose, customColor, customColorIcon, customIcon, }: Props) => React.JSX.Element;
1
+ import SectionMessage from '@synerise/ds-section-message';
2
+ /** @deprecated use `@synerise/ds-section-message` instead */
4
3
  export default SectionMessage;
@@ -1,66 +1,4 @@
1
- import React, { useMemo } from 'react';
2
- import Icon, { Check3M, CloseM, HelpFillM, NotificationsReceiveM, UpdateDataM, UserUpM, WarningFillM } from '@synerise/ds-icon';
3
- import * as S from './SectionMessage.styles';
4
- var ICONS = {
5
- positive: /*#__PURE__*/React.createElement(Check3M, null),
6
- notice: /*#__PURE__*/React.createElement(WarningFillM, null),
7
- negative: /*#__PURE__*/React.createElement(WarningFillM, null),
8
- neutral: /*#__PURE__*/React.createElement(HelpFillM, null),
9
- supply: /*#__PURE__*/React.createElement(UserUpM, null),
10
- service: /*#__PURE__*/React.createElement(UpdateDataM, null),
11
- entity: /*#__PURE__*/React.createElement(NotificationsReceiveM, null)
12
- };
13
- var DEFAULT_ICON = /*#__PURE__*/React.createElement(WarningFillM, null);
14
- var SectionMessage = function SectionMessage(_ref) {
15
- var icon = _ref.icon,
16
- type = _ref.type,
17
- message = _ref.message,
18
- description = _ref.description,
19
- showMoreLabel = _ref.showMoreLabel,
20
- onShowMore = _ref.onShowMore,
21
- onClose = _ref.onClose,
22
- suffixel = _ref.suffixel,
23
- moreButtons = _ref.moreButtons,
24
- withEmphasis = _ref.withEmphasis,
25
- withLink = _ref.withLink,
26
- unorderedList = _ref.unorderedList,
27
- color = _ref.color,
28
- withClose = _ref.withClose,
29
- customColor = _ref.customColor,
30
- customColorIcon = _ref.customColorIcon,
31
- customIcon = _ref.customIcon;
32
- var renderMessage = useMemo(function () {
33
- return /*#__PURE__*/React.createElement(S.AlertContent, {
34
- withLink: withLink
35
- }, message && /*#__PURE__*/React.createElement(S.AlertMessage, null, message), /*#__PURE__*/React.createElement(S.Text, null, description && /*#__PURE__*/React.createElement(S.AlertDescription, null, description), withLink && /*#__PURE__*/React.createElement(S.LinkWrapper, null, withLink), withEmphasis && !withLink && /*#__PURE__*/React.createElement(S.EmphasisWrapper, null, withEmphasis)), onShowMore && showMoreLabel && /*#__PURE__*/React.createElement(S.AlertShowMore, {
36
- onClick: onShowMore
37
- }, showMoreLabel), moreButtons, unorderedList && !moreButtons && unorderedList);
38
- }, [message, description, showMoreLabel, onShowMore, moreButtons, withEmphasis, withLink, unorderedList]);
39
- var renderIcon = useMemo(function () {
40
- if (icon) {
41
- return icon;
42
- }
43
- if (ICONS[type]) {
44
- return ICONS[type];
45
- }
46
- return DEFAULT_ICON;
47
- }, [icon, type]);
48
- var handleClose = function handleClose() {
49
- onClose && onClose();
50
- };
51
- return /*#__PURE__*/React.createElement(S.Container, {
52
- "data-testid": "ds-section-message-" + type,
53
- color: color,
54
- customColor: customColor
55
- }, /*#__PURE__*/React.createElement(S.WrapperSectionMessage, null, /*#__PURE__*/React.createElement(S.AllContent, null, /*#__PURE__*/React.createElement(S.IconWrapper, {
56
- color: color,
57
- customColorIcon: customColorIcon
58
- }, customIcon || /*#__PURE__*/React.createElement(Icon, {
59
- component: renderIcon
60
- })), renderMessage), /*#__PURE__*/React.createElement(S.ButtonWrapper, null, suffixel && /*#__PURE__*/React.createElement(S.SuffixWrapper, null, suffixel), withClose && /*#__PURE__*/React.createElement(S.IconCloseWrapper, {
61
- onClick: handleClose
62
- }, /*#__PURE__*/React.createElement(Icon, {
63
- component: /*#__PURE__*/React.createElement(CloseM, null)
64
- })))));
65
- };
1
+ import SectionMessage from '@synerise/ds-section-message';
2
+
3
+ /** @deprecated use `@synerise/ds-section-message` instead */
66
4
  export default SectionMessage;
package/dist/index.d.ts CHANGED
@@ -1,16 +1,14 @@
1
1
  import * as MainAlertStyles from './Alert.styles';
2
2
  import * as IconAlertStyles from './IconAlert/IconAlert.styles';
3
- import * as SectionMessageStyles from './SectionMessage/SectionMessage.styles';
4
3
  import * as ToastStyles from './Toast/Toast.styles';
5
4
  export { default } from './Alert';
6
5
  export declare const AlertStyles: {
7
6
  Alert: typeof MainAlertStyles;
8
- SectionMessage: typeof SectionMessageStyles;
9
7
  Toast: typeof ToastStyles;
10
8
  IconAlert: typeof IconAlertStyles;
11
9
  };
10
+ /** @deprecated use `@synerise/ds-section-message` instead */
12
11
  export { default as SectionMessage } from './SectionMessage/SectionMessage';
13
- export type { Props as SectionMessageProps, ColorType as SectionMessageColorType, AlertTypes as SectionMessageAlertTypes, } from './SectionMessage/SectionMessage.types';
14
12
  export { default as Toast } from './Toast/Toast';
15
13
  export { default as BroadcastBar } from './BroadcastBar/BroadcastBar';
16
14
  export { default as IconAlert } from './IconAlert/IconAlert';
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import * as MainAlertStyles from './Alert.styles';
2
2
  import * as IconAlertStyles from './IconAlert/IconAlert.styles';
3
- import * as SectionMessageStyles from './SectionMessage/SectionMessage.styles';
4
3
  import * as ToastStyles from './Toast/Toast.styles';
5
4
  export { default } from './Alert';
6
5
  export var AlertStyles = {
7
6
  Alert: MainAlertStyles,
8
- SectionMessage: SectionMessageStyles,
9
7
  Toast: ToastStyles,
10
8
  IconAlert: IconAlertStyles
11
9
  };
10
+
11
+ /** @deprecated use `@synerise/ds-section-message` instead */
12
12
  export { default as SectionMessage } from './SectionMessage/SectionMessage';
13
13
  export { default as Toast } from './Toast/Toast';
14
14
  export { default as BroadcastBar } from './BroadcastBar/BroadcastBar';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-alert",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "description": "Alert UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,9 +34,9 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-button": "^1.4.4",
38
- "@synerise/ds-icon": "^1.6.0",
39
- "@synerise/ds-unordered-list": "^1.1.10",
37
+ "@synerise/ds-button": "^1.4.5",
38
+ "@synerise/ds-icon": "^1.6.1",
39
+ "@synerise/ds-unordered-list": "^1.1.11",
40
40
  "@synerise/ds-utils": "^1.3.1",
41
41
  "animate.css": "^4.1.1"
42
42
  },
@@ -46,5 +46,5 @@
46
46
  "react": ">=16.9.0 <= 18.3.1",
47
47
  "styled-components": "^5.3.3"
48
48
  },
49
- "gitHead": "f7c362a4f370d86b51df9aba9e91ac8f7fe4ed8f"
49
+ "gitHead": "4e851d649cb25346f2f8e0575dde91cc50f43bc4"
50
50
  }
@@ -1,30 +0,0 @@
1
- import type React from 'react';
2
- import { type ColorType, type CustomColorType } from './SectionMessage.types';
3
- export declare const AlertContent: import("styled-components").StyledComponent<"div", any, {
4
- withLink?: React.ReactNode;
5
- }, never>;
6
- export declare const AllContent: import("styled-components").StyledComponent<"div", any, {}, never>;
7
- export declare const Text: import("styled-components").StyledComponent<"div", any, {}, never>;
8
- export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {
9
- color?: ColorType | undefined;
10
- customColorIcon?: CustomColorType | undefined;
11
- }, never>;
12
- export declare const IconCloseWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
13
- export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
14
- export declare const FirstButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
15
- export declare const NumberWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
16
- export declare const ButtonsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
17
- export declare const SuffixWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
18
- export declare const IconOrderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
19
- export declare const OrderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
20
- export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
21
- export declare const Container: import("styled-components").StyledComponent<"div", any, {
22
- color?: ColorType | undefined;
23
- customColor?: CustomColorType | undefined;
24
- }, never>;
25
- export declare const WrapperSectionMessage: import("styled-components").StyledComponent<"div", any, {}, never>;
26
- export declare const AlertMessage: import("styled-components").StyledComponent<"span", any, {}, never>;
27
- export declare const AlertDescription: import("styled-components").StyledComponent<"span", any, {}, never>;
28
- export declare const EmphasisWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
29
- export declare const LinkWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
30
- export declare const AlertShowMore: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -1,115 +0,0 @@
1
- import styled from 'styled-components';
2
- export var AlertContent = styled.div.withConfig({
3
- displayName: "SectionMessagestyles__AlertContent",
4
- componentId: "sc-1kuq4h0-0"
5
- })(["display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;padding:", ";"], function (props) {
6
- return props.withLink ? '12px 0 11px' : '12px 0';
7
- });
8
- export var AllContent = styled.div.withConfig({
9
- displayName: "SectionMessagestyles__AllContent",
10
- componentId: "sc-1kuq4h0-1"
11
- })(["display:flex;color:inherit;"]);
12
- export var Text = styled.div.withConfig({
13
- displayName: "SectionMessagestyles__Text",
14
- componentId: "sc-1kuq4h0-2"
15
- })(["display:flex;"]);
16
- export var IconWrapper = styled.div.withConfig({
17
- displayName: "SectionMessagestyles__IconWrapper",
18
- componentId: "sc-1kuq4h0-3"
19
- })(["margin:10px 12px;display:flex;svg{color:", ";fill:", ";}"], function (props) {
20
- return props.customColorIcon ? props.theme.palette[props.customColorIcon + "-600"] : props.theme.palette[props.color + "-600"];
21
- }, function (props) {
22
- return props.customColorIcon ? props.theme.palette[props.customColorIcon + "-600"] : props.theme.palette[props.color + "-600"];
23
- });
24
- export var IconCloseWrapper = styled.div.withConfig({
25
- displayName: "SectionMessagestyles__IconCloseWrapper",
26
- componentId: "sc-1kuq4h0-4"
27
- })(["margin:3px 5px 2px;cursor:pointer;svg{fill:", ";}"], function (props) {
28
- return props.theme.palette['grey-700'];
29
- });
30
- export var ButtonWrapper = styled.div.withConfig({
31
- displayName: "SectionMessagestyles__ButtonWrapper",
32
- componentId: "sc-1kuq4h0-5"
33
- })(["padding:6px 8px 0 8px;display:flex;"]);
34
- export var FirstButtonWrapper = styled.div.withConfig({
35
- displayName: "SectionMessagestyles__FirstButtonWrapper",
36
- componentId: "sc-1kuq4h0-6"
37
- })(["margin-right:8px;"]);
38
- export var NumberWrapper = styled.div.withConfig({
39
- displayName: "SectionMessagestyles__NumberWrapper",
40
- componentId: "sc-1kuq4h0-7"
41
- })(["margin-left:4px;color:", ";cursor:pointer;&:hover{background-image:linear-gradient( to right,", " 20%,rgba(255,255,255,0) 10% );background-color:transparent;background-position:bottom left;background-size:5px 1px;background-repeat:repeat-x;color:", ";}"], function (props) {
42
- return props.theme.palette['grey-400'];
43
- }, function (props) {
44
- return props.theme.palette['grey-400'];
45
- }, function (props) {
46
- return props.theme.palette['grey-700'];
47
- });
48
- export var ButtonsWrapper = styled.div.withConfig({
49
- displayName: "SectionMessagestyles__ButtonsWrapper",
50
- componentId: "sc-1kuq4h0-8"
51
- })(["padding:16px 0 0 0;display:flex;"]);
52
- export var SuffixWrapper = styled.div.withConfig({
53
- displayName: "SectionMessagestyles__SuffixWrapper",
54
- componentId: "sc-1kuq4h0-9"
55
- })(["display:flex;"]);
56
- export var IconOrderWrapper = styled.div.withConfig({
57
- displayName: "SectionMessagestyles__IconOrderWrapper",
58
- componentId: "sc-1kuq4h0-10"
59
- })(["display:none;margin:-4px 0;svg{fill:", ";}&:hover{svg{fill:", ";cursor:pointer;}}"], function (props) {
60
- return props.theme.palette['grey-700'];
61
- }, function (props) {
62
- return props.theme.palette['blue-600'];
63
- });
64
- export var OrderWrapper = styled.div.withConfig({
65
- displayName: "SectionMessagestyles__OrderWrapper",
66
- componentId: "sc-1kuq4h0-11"
67
- })(["display:flex;&:hover{", "{display:block;}", "{background-image:linear-gradient( to right,", " 20%,rgba(255,255,255,0) 10% );background-color:transparent;background-position:bottom left;background-size:5px 1px;background-repeat:repeat-x;color:", ";}}"], IconOrderWrapper, NumberWrapper, function (props) {
68
- return props.theme.palette['grey-400'];
69
- }, function (props) {
70
- return props.theme.palette['grey-700'];
71
- });
72
- export var Wrapper = styled.div.withConfig({
73
- displayName: "SectionMessagestyles__Wrapper",
74
- componentId: "sc-1kuq4h0-12"
75
- })(["margin-top:10px;color:", ";"], function (props) {
76
- return props.theme.palette['grey-700'];
77
- });
78
- export var Container = styled.div.withConfig({
79
- displayName: "SectionMessagestyles__Container",
80
- componentId: "sc-1kuq4h0-13"
81
- })(["width:100%;align-items:center;justify-content:center;background-color:", ";border:1px solid ", ";border-top:2px solid ", ";border-radius:2px;"], function (props) {
82
- return props.customColor ? props.theme.palette[props.customColor + "-050"] : props.theme.palette[props.color + "-050"];
83
- }, function (props) {
84
- return props.customColor ? props.theme.palette[props.customColor + "-200"] : props.theme.palette[props.color + "-200"];
85
- }, function (props) {
86
- return props.customColor ? props.theme.palette[props.customColor + "-600"] : props.theme.palette[props.color + "-600"];
87
- });
88
- export var WrapperSectionMessage = styled.div.withConfig({
89
- displayName: "SectionMessagestyles__WrapperSectionMessage",
90
- componentId: "sc-1kuq4h0-14"
91
- })(["display:flex;font-size:13px;color:inherit;justify-content:space-between;"]);
92
- export var AlertMessage = styled.span.withConfig({
93
- displayName: "SectionMessagestyles__AlertMessage",
94
- componentId: "sc-1kuq4h0-15"
95
- })(["font-size:13px;line-height:1.39;font-weight:500;max-width:400px;overflow:hidden;text-overflow:ellipsis;color:", ";"], function (props) {
96
- return props.theme.palette['grey-700'];
97
- });
98
- export var AlertDescription = styled.span.withConfig({
99
- displayName: "SectionMessagestyles__AlertDescription",
100
- componentId: "sc-1kuq4h0-16"
101
- })(["display:flex;font-size:13px;line-height:1.39;font-weight:normal;padding-right:3px;margin-top:2px;color:", ";"], function (props) {
102
- return props.theme.palette['grey-700'];
103
- });
104
- export var EmphasisWrapper = styled.span.withConfig({
105
- displayName: "SectionMessagestyles__EmphasisWrapper",
106
- componentId: "sc-1kuq4h0-17"
107
- })(["display:flex;font-size:13px;line-height:1.39;font-weight:500;margin-top:2px;color:inherit;"]);
108
- export var LinkWrapper = styled.span.withConfig({
109
- displayName: "SectionMessagestyles__LinkWrapper",
110
- componentId: "sc-1kuq4h0-18"
111
- })(["display:flex;font-size:13px;line-height:1.5;font-weight:400;margin-top:2px;color:inherit;text-decoration:underline;cursor:pointer;a{color:inherit;}"]);
112
- export var AlertShowMore = styled.span.withConfig({
113
- displayName: "SectionMessagestyles__AlertShowMore",
114
- componentId: "sc-1kuq4h0-19"
115
- })(["display:flex;font-size:13px;font-weight:500;color:inherit;text-decoration:underline;cursor:pointer;margin-top:6px;"]);
@@ -1,25 +0,0 @@
1
- import { type AlertProps } from 'antd/lib/alert';
2
- import type React from 'react';
3
- import { type AlertType } from '../ColorSemantic/AlertSemanticColor.types';
4
- export type AlertTypes = Exclude<AlertType, 'informative'>;
5
- export type CustomColorType = 'blue' | 'grey' | 'red' | 'green' | 'yellow' | 'pink' | 'mars' | 'orange' | 'fern' | 'cyan' | 'purple' | 'violet';
6
- export type ColorType = 'grey' | 'red' | 'green' | 'yellow' | 'violet' | 'purple' | 'cyan';
7
- export type ModeType = 'background' | 'background-outline' | 'outline' | 'clear';
8
- export interface Props extends Omit<AlertProps, 'type' | 'message'> {
9
- message?: React.ReactNode;
10
- type: string | AlertTypes;
11
- customColor?: CustomColorType;
12
- customColorIcon?: CustomColorType;
13
- color?: ColorType;
14
- mode?: ModeType;
15
- showMoreLabel?: React.ReactNode;
16
- onShowMore?: () => void;
17
- onClose?: () => void;
18
- suffixel?: React.ReactNode;
19
- moreButtons?: boolean | React.ReactNode;
20
- withEmphasis?: React.ReactNode;
21
- withLink?: React.ReactNode;
22
- unorderedList?: React.ReactNode;
23
- withClose?: React.ReactNode;
24
- customIcon?: React.ReactElement;
25
- }
@@ -1 +0,0 @@
1
- export {};