@synerise/ds-alert 1.1.10 → 1.1.11

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,17 @@
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.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@1.1.10...@synerise/ds-alert@1.1.11) (2025-07-24)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **result:** fix styles to match figma ([1b17374](https://github.com/Synerise/synerise-design/commit/1b173747daf73f5a768241a3116ba7b3c7c90eb1))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [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
18
 
8
19
  **Note:** Version bump only for package @synerise/ds-alert
package/dist/Alert.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import React from 'react';
2
2
  import { type AlertSubComponents, type Props } from './Alert.types';
3
3
  import './style/index.less';
4
+ /**
5
+ * @deprecated use `@synerise/ds-section-message` or `@synerise/ds-toast` instead
6
+ */
4
7
  declare const Alert: React.FC<Props> & AlertSubComponents;
5
8
  export default Alert;
package/dist/Alert.js CHANGED
@@ -11,6 +11,10 @@ var ICONS = {
11
11
  info: /*#__PURE__*/React.createElement(NotificationsM, null)
12
12
  };
13
13
  var DEFAULT_ICON = /*#__PURE__*/React.createElement(Check2M, null);
14
+
15
+ /**
16
+ * @deprecated use `@synerise/ds-section-message` or `@synerise/ds-toast` instead
17
+ */
14
18
  var Alert = function Alert(props) {
15
19
  var icon = props.icon,
16
20
  type = props.type,
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
+ import { type ThemeProps } from 'styled-components';
2
3
  import { type Props } from './Alert.types';
3
4
  export declare const AntdAlert: import("styled-components").StyledComponent<(props: Props & {
4
5
  message: React.ReactNode;
5
- }) => React.JSX.Element, any, {}, never>;
6
+ }) => React.JSX.Element, any, ThemeProps<Props>, never>;
6
7
  export declare const AlertContent: import("styled-components").StyledComponent<"div", any, {}, never>;
7
8
  export declare const AlertMessage: import("styled-components").StyledComponent<"span", any, {}, never>;
8
9
  export declare const AlertDescription: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -1,4 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type AlertInfoProps } from './AlertInfo.types';
3
+ /**
4
+ * @deprecated use `@synerise/ds-result` instead
5
+ */
3
6
  declare const AlertInfo: React.FC<AlertInfoProps>;
4
7
  export default AlertInfo;
@@ -6,6 +6,10 @@ import Icon, { CheckL, CheckXl, WarningL, WarningXl } from '@synerise/ds-icon';
6
6
  import * as S from './AlertInfo.styles';
7
7
  import { AlertSize } from './AlertInfo.types';
8
8
  var mapSizeToPx = (_mapSizeToPx = {}, _mapSizeToPx[AlertSize.SMALL] = 48, _mapSizeToPx[AlertSize.MEDIUM] = 96, _mapSizeToPx);
9
+
10
+ /**
11
+ * @deprecated use `@synerise/ds-result` instead
12
+ */
9
13
  var AlertInfo = function AlertInfo(_ref) {
10
14
  var _ref$size = _ref.size,
11
15
  size = _ref$size === void 0 ? AlertSize.SMALL : _ref$size,
@@ -1,18 +1,17 @@
1
1
  import { AlertSize } from './AlertInfo.types';
2
2
  export declare const TextWrapper: import("styled-components").StyledComponent<"div", any, {
3
- labelPosition: 'bottom' | 'right';
3
+ labelPosition: "bottom" | "right";
4
4
  }, never>;
5
5
  export declare const HeaderWrapper: import("styled-components").StyledComponent<"div", any, {
6
- fontSize?: AlertSize | undefined;
7
- size?: AlertSize | undefined;
6
+ fontSize?: AlertSize;
7
+ size?: AlertSize;
8
8
  }, never>;
9
9
  export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
10
10
  export declare const AlertWrapper: import("styled-components").StyledComponent<"div", any, {
11
- labelPosition: 'bottom' | 'right';
12
- mode?: "absolute" | undefined;
11
+ labelPosition: "bottom" | "right";
12
+ mode?: "absolute";
13
13
  }, never>;
14
14
  export declare const AlertIconContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
15
15
  export declare const StatusIconContainer: import("styled-components").StyledComponent<"div", any, {
16
16
  iconColor: string;
17
- background: string;
18
17
  }, never>;
@@ -18,7 +18,7 @@ export var HeaderWrapper = styled.div.withConfig({
18
18
  })(["display:flex;line-height:16px;color:", ";font-size:", "px;font-weight:500;margin-top:", ";padding:", ";"], function (props) {
19
19
  return props.theme.palette['grey-800'];
20
20
  }, function (props) {
21
- return FontSize[props.fontSize] || FONT_SIZE_DEFAULT;
21
+ return props.fontSize ? FontSize[props.fontSize] : FONT_SIZE_DEFAULT;
22
22
  }, function (props) {
23
23
  return props.size === AlertSize.SMALL ? '0px' : '30px';
24
24
  }, function (props) {
@@ -43,8 +43,6 @@ export var AlertIconContainer = styled.div.withConfig({
43
43
  export var StatusIconContainer = styled.div.withConfig({
44
44
  displayName: "AlertInfostyles__StatusIconContainer",
45
45
  componentId: "sc-a78l8a-5"
46
- })(["background-color:", ";width:40px;height:40px;border-radius:20px;text-align:center;display:flex;align-items:center;justify-content:center;margin:0 auto;&&{", "{fill:", ";}}"], function (props) {
47
- return props.theme.palette[props.background];
48
- }, IconContainer, function (props) {
46
+ })(["width:40px;height:40px;border-radius:20px;text-align:center;display:flex;align-items:center;justify-content:center;margin:0 auto;&&{", "{fill:", ";}}"], IconContainer, function (props) {
49
47
  return props.theme.palette[props.iconColor];
50
48
  });
@@ -1,14 +1,14 @@
1
- import type React from 'react';
1
+ import type { ReactNode } from 'react';
2
2
  export type AlertInfoProps = {
3
3
  size?: AlertSize;
4
4
  fontSize?: AlertSize;
5
- text?: string | React.ReactNode;
6
- button?: string | React.ReactNode;
7
- label?: string | React.ReactNode;
5
+ text?: ReactNode;
6
+ button?: ReactNode;
7
+ label?: ReactNode;
8
8
  labelPosition?: 'bottom' | 'right';
9
9
  mode?: 'absolute';
10
10
  customIcon?: React.ReactElement;
11
- type: string | 'warning' | 'error' | 'success';
11
+ type: 'warning' | 'error' | 'success';
12
12
  };
13
13
  export declare enum AlertSize {
14
14
  SMALL = "small",
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { type Props } from './BroadcastBar.types';
3
- declare const BroadcastBar: React.FC<Props>;
3
+ declare const BroadcastBar: ({ icon, type, description, button, withEmphasis, withLink, color, withClose, textButton, onCloseClick, text, }: Props) => React.JSX.Element;
4
4
  export default BroadcastBar;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useMemo } from 'react';
2
2
  import Icon, { Check3M, CloseM, ErrorFillM, WarningFillM } from '@synerise/ds-icon';
3
3
  import * as S from './BroadcastBar.styles';
4
4
  var ICONS = {
@@ -19,7 +19,7 @@ var BroadcastBar = function BroadcastBar(_ref) {
19
19
  textButton = _ref.textButton,
20
20
  onCloseClick = _ref.onCloseClick,
21
21
  text = _ref.text;
22
- var renderMessage = React.useMemo(function () {
22
+ var renderMessage = useMemo(function () {
23
23
  return /*#__PURE__*/React.createElement(S.AlertContent, {
24
24
  color: color,
25
25
  withLink: withLink
@@ -35,7 +35,7 @@ var BroadcastBar = function BroadcastBar(_ref) {
35
35
  emphasis: withEmphasis
36
36
  }, text), withEmphasis)));
37
37
  }, [description, withEmphasis, withLink, text, color]);
38
- var renderIcon = React.useMemo(function () {
38
+ var renderIcon = useMemo(function () {
39
39
  if (icon) {
40
40
  return icon;
41
41
  }
@@ -3,47 +3,47 @@ import Button from '@synerise/ds-button';
3
3
  import { type ColorType } from './BroadcastBar.types';
4
4
  export declare const AlertContent: import("styled-components").StyledComponent<"div", any, {
5
5
  withLink?: React.ReactNode;
6
- color?: ColorType | undefined;
6
+ color?: ColorType;
7
7
  }, never>;
8
8
  export declare const AllContent: import("styled-components").StyledComponent<"div", any, {
9
- color?: ColorType | undefined;
9
+ color?: ColorType;
10
10
  close?: boolean | React.ReactNode;
11
11
  }, never>;
12
12
  export declare const Text: import("styled-components").StyledComponent<"div", any, {
13
- color?: ColorType | undefined;
13
+ color?: ColorType;
14
14
  }, never>;
15
15
  export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {
16
- color?: ColorType | undefined;
16
+ color?: ColorType;
17
17
  }, never>;
18
18
  export declare const IconCloseWrapper: import("styled-components").StyledComponent<"div", any, {
19
- color?: ColorType | undefined;
19
+ color?: ColorType;
20
20
  }, never>;
21
21
  export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", any, {
22
- color?: ColorType | undefined;
22
+ color?: ColorType;
23
23
  }, never>;
24
24
  export declare const BroadcastButton: import("styled-components").StyledComponent<typeof Button, any, {
25
- color?: ColorType | undefined;
25
+ color?: ColorType;
26
26
  }, never>;
27
27
  export declare const ButtonCloseWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
28
28
  export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {
29
- color?: ColorType | undefined;
29
+ color?: ColorType;
30
30
  }, never>;
31
31
  export declare const Container: import("styled-components").StyledComponent<"div", any, {
32
- color?: ColorType | undefined;
32
+ color?: ColorType;
33
33
  }, never>;
34
34
  export declare const WrapperSectionMessage: import("styled-components").StyledComponent<"div", any, {
35
- color?: ColorType | undefined;
35
+ color?: ColorType;
36
36
  }, never>;
37
37
  export declare const AlertDescription: import("styled-components").StyledComponent<"span", any, {
38
- color?: ColorType | undefined;
38
+ color?: ColorType;
39
39
  }, never>;
40
40
  export declare const EmphasisWrapper: import("styled-components").StyledComponent<"span", any, {
41
- color?: ColorType | undefined;
41
+ color?: ColorType;
42
42
  }, never>;
43
43
  export declare const WrapperText: import("styled-components").StyledComponent<"span", any, {
44
44
  emphasis?: boolean | React.ReactNode;
45
45
  }, never>;
46
46
  export declare const LinkWrapper: import("styled-components").StyledComponent<"span", any, {
47
- color?: ColorType | undefined;
47
+ color?: ColorType;
48
48
  }, never>;
49
49
  export declare const Link: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -1,15 +1,15 @@
1
1
  import { type AlertProps } from 'antd/lib/alert';
2
- import type React from 'react';
2
+ import { type ReactNode } from 'react';
3
3
  export type BroadcastBarTypes = 'success' | 'warning' | 'negative';
4
4
  export type ColorType = 'red' | 'green' | 'yellow';
5
5
  export interface Props extends Omit<AlertProps, 'type' | 'message'> {
6
- type: string | BroadcastBarTypes;
6
+ type: BroadcastBarTypes;
7
7
  color?: ColorType;
8
- button?: boolean | React.ReactNode;
9
- withEmphasis?: React.ReactNode;
10
- withLink?: React.ReactNode;
11
- withClose?: React.ReactNode;
8
+ button?: boolean | ReactNode;
9
+ withEmphasis?: ReactNode;
10
+ withLink?: ReactNode;
11
+ withClose?: ReactNode;
12
12
  onCloseClick?: () => void;
13
13
  textButton?: string;
14
- text?: string | React.ReactNode;
14
+ text?: ReactNode;
15
15
  }
@@ -1,4 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type Props } from './AlertSemanticColor.types';
3
+ /**
4
+ * @deprecated
5
+ */
3
6
  declare const AlertSemanticColor: React.FC<Props>;
4
7
  export default AlertSemanticColor;
@@ -12,6 +12,10 @@ var ICONS = {
12
12
  entity: /*#__PURE__*/React.createElement(NotificationsReceiveM, null)
13
13
  };
14
14
  var DEFAULT_ICON = /*#__PURE__*/React.createElement(WarningFillM, null);
15
+
16
+ /**
17
+ * @deprecated
18
+ */
15
19
  var AlertSemanticColor = function AlertSemanticColor(_ref) {
16
20
  var icon = _ref.icon,
17
21
  type = _ref.type,
@@ -1,9 +1,9 @@
1
1
  import { type ColorType, type ModeType } from './AlertSemanticColor.types';
2
2
  export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {
3
- mode?: ModeType | undefined;
4
- color?: ColorType | undefined;
3
+ mode?: ModeType;
4
+ color?: ColorType;
5
5
  }, never>;
6
6
  export declare const Container: import("styled-components").StyledComponent<"div", any, {
7
- mode?: ModeType | undefined;
8
- color?: ColorType | undefined;
7
+ mode?: ModeType;
8
+ color?: ColorType;
9
9
  }, never>;
@@ -2,8 +2,8 @@ import { type IconAlertType } from './IconAlert.types';
2
2
  export declare const Message: import("styled-components").StyledComponent<"span", any, {}, never>;
3
3
  export declare const IconAlertWrapper: import("styled-components").StyledComponent<"span", any, {
4
4
  type: IconAlertType;
5
- hoverButton?: boolean | undefined;
6
- disabled?: boolean | undefined;
5
+ hoverButton?: boolean;
6
+ disabled?: boolean;
7
7
  }, never>;
8
8
  export declare const EmphasisWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
9
9
  export declare const LinkWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -1,4 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type InlineAlertProps } from './InlineAlert.types';
3
+ /**
4
+ * @deprecated use `@synerise/ds-inline-alert` instead
5
+ */
3
6
  declare const InlineAlert: ({ type, message }: InlineAlertProps) => React.JSX.Element;
4
7
  export default InlineAlert;
@@ -7,6 +7,10 @@ var ICONS = {
7
7
  warning: /*#__PURE__*/React.createElement(WarningFillM, null),
8
8
  info: /*#__PURE__*/React.createElement(InfoFillM, null)
9
9
  };
10
+
11
+ /**
12
+ * @deprecated use `@synerise/ds-inline-alert` instead
13
+ */
10
14
  var InlineAlert = function InlineAlert(_ref) {
11
15
  var _ref$type = _ref.type,
12
16
  type = _ref$type === void 0 ? 'warning' : _ref$type,
@@ -4,62 +4,62 @@ import { type Keyframes } from 'styled-components';
4
4
  import { type ColorIconType, type ColorType, type CustomColorType } from './Toast.types';
5
5
  export declare const closingAnimation: () => Keyframes;
6
6
  export declare const AlertContent: import("styled-components").StyledComponent<"div", any, {
7
- hasBottomMargin?: boolean | undefined;
7
+ hasBottomMargin?: boolean;
8
8
  }, never>;
9
9
  export declare const AllContent: import("styled-components").StyledComponent<"div", any, {}, never>;
10
10
  export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {
11
- colorIcon?: ColorIconType | undefined;
12
- customColorIcon?: CustomColorType | undefined;
11
+ colorIcon?: ColorIconType;
12
+ customColorIcon?: CustomColorType;
13
13
  }, never>;
14
14
  export declare const IconCloseWrapper: import("styled-components").StyledComponent<"div", any, {
15
- customColorText?: CustomColorType | undefined;
16
- color?: ColorType | undefined;
15
+ customColorText?: CustomColorType;
16
+ color?: ColorType;
17
17
  }, never>;
18
18
  export declare const IconExpanderWrapper: import("styled-components").StyledComponent<"div", any, {
19
- customColorText?: CustomColorType | undefined;
20
- color?: ColorType | undefined;
21
- expanded?: boolean | undefined;
19
+ customColorText?: CustomColorType;
20
+ color?: ColorType;
21
+ expanded?: boolean;
22
22
  }, never>;
23
23
  export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
24
24
  export declare const FirstButtonWrapper: import("styled-components").StyledComponent<"div", any, {
25
- customColorText?: CustomColorType | undefined;
26
- color?: ColorType | undefined;
25
+ customColorText?: CustomColorType;
26
+ color?: ColorType;
27
27
  }, never>;
28
28
  export declare const NumberWrapper: import("styled-components").StyledComponent<"div", any, {
29
- customColorText?: CustomColorType | undefined;
30
- color?: ColorType | undefined;
29
+ customColorText?: CustomColorType;
30
+ color?: ColorType;
31
31
  }, never>;
32
32
  export declare const ListWrapper: import("styled-components").StyledComponent<"div", any, {
33
- visible?: boolean | undefined;
33
+ visible?: boolean;
34
34
  description?: ReactNode;
35
35
  }, never>;
36
36
  export declare const IconOrderWrapper: import("styled-components").StyledComponent<"div", any, {
37
- customColorText?: CustomColorType | undefined;
38
- color?: ColorType | undefined;
37
+ customColorText?: CustomColorType;
38
+ color?: ColorType;
39
39
  }, never>;
40
40
  export declare const OrderWrapper: import("styled-components").StyledComponent<"div", any, {
41
- customColorText?: CustomColorType | undefined;
42
- color?: ColorType | undefined;
41
+ customColorText?: CustomColorType;
42
+ color?: ColorType;
43
43
  }, never>;
44
44
  export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
45
45
  export declare const AnimationContainer: import("styled-components").StyledComponent<"div", any, {
46
- show?: boolean | undefined;
46
+ show?: boolean;
47
47
  }, never>;
48
48
  export declare const Container: import("styled-components").StyledComponent<"div", any, {
49
- color?: ColorType | undefined;
50
- customColor?: CustomColorType | undefined;
49
+ color?: ColorType;
50
+ customColor?: CustomColorType;
51
51
  }, never>;
52
52
  export declare const WrapperSectionMessage: import("styled-components").StyledComponent<"div", any, {}, never>;
53
53
  export declare const AlertMessage: import("styled-components").StyledComponent<"div", any, {
54
- noToastContent?: boolean | undefined;
55
- customColorText?: CustomColorType | undefined;
56
- color?: ColorType | undefined;
57
- hasClose?: boolean | undefined;
58
- hasExpander?: boolean | undefined;
54
+ noToastContent?: boolean;
55
+ customColorText?: CustomColorType;
56
+ color?: ColorType;
57
+ hasClose?: boolean;
58
+ hasExpander?: boolean;
59
59
  }, never>;
60
60
  export declare const AlertDescription: import("styled-components").StyledComponent<"div", any, {
61
- customColorText?: CustomColorType | undefined;
62
- color?: ColorType | undefined;
63
- button?: boolean | undefined;
64
- expandedContent?: boolean | undefined;
61
+ customColorText?: CustomColorType;
62
+ color?: ColorType;
63
+ button?: boolean;
64
+ expandedContent?: boolean;
65
65
  }, never>;
@@ -67,9 +67,9 @@ export var IconWrapper = styled.div.withConfig({
67
67
  displayName: "Toaststyles__IconWrapper",
68
68
  componentId: "sc-q5tn0-2"
69
69
  })(["margin:12px;display:flex;svg{color:", ";fill:", ";}"], function (props) {
70
- return props.customColorIcon ? props.theme.palette[props.customColorIcon + "-600"] : getColorIcon;
70
+ return props.customColorIcon ? props.theme.palette[props.customColorIcon + "-600"] : getColorIcon(props);
71
71
  }, function (props) {
72
- return props.customColorIcon ? props.theme.palette[props.customColorIcon + "-600"] : getColorIcon;
72
+ return props.customColorIcon ? props.theme.palette[props.customColorIcon + "-600"] : getColorIcon(props);
73
73
  });
74
74
  export var IconCloseWrapper = styled.div.withConfig({
75
75
  displayName: "Toaststyles__IconCloseWrapper",
@@ -80,7 +80,7 @@ export var IconCloseWrapper = styled.div.withConfig({
80
80
  export var IconExpanderWrapper = styled.div.withConfig({
81
81
  displayName: "Toaststyles__IconExpanderWrapper",
82
82
  componentId: "sc-q5tn0-4"
83
- })(["cursor:pointer;svg{fill:", ";transition:transform 0.1s linear;transform:rotateZ( ", " );}"], function (props) {
83
+ })(["cursor:pointer;svg{fill:", ";transition:transform 0.1s linear;transform:rotateZ(", ");}"], function (props) {
84
84
  return props.customColorText ? props.theme.palette[props.customColorText + "-600"] : getColorText(props);
85
85
  }, function (props) {
86
86
  return props.expanded ? '180deg' : '0deg';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-alert",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "Alert UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,10 +34,10 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-button": "^1.4.5",
38
- "@synerise/ds-icon": "^1.6.1",
39
- "@synerise/ds-unordered-list": "^1.1.11",
40
- "@synerise/ds-utils": "^1.3.1",
37
+ "@synerise/ds-button": "^1.4.6",
38
+ "@synerise/ds-icon": "^1.6.2",
39
+ "@synerise/ds-unordered-list": "^1.1.12",
40
+ "@synerise/ds-utils": "^1.4.0",
41
41
  "animate.css": "^4.1.1"
42
42
  },
43
43
  "peerDependencies": {
@@ -46,5 +46,5 @@
46
46
  "react": ">=16.9.0 <= 18.3.1",
47
47
  "styled-components": "^5.3.3"
48
48
  },
49
- "gitHead": "4e851d649cb25346f2f8e0575dde91cc50f43bc4"
49
+ "gitHead": "b35b1875727156fe9f5b3bad55aed5ca447c8c8d"
50
50
  }