@synerise/ds-alert 1.1.9 → 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,25 @@
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
+
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)
18
+
19
+ **Note:** Version bump only for package @synerise/ds-alert
20
+
21
+
22
+
23
+
24
+
6
25
  ## [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
26
 
8
27
  **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,
@@ -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;
@@ -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/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.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.4",
38
- "@synerise/ds-icon": "^1.6.0",
39
- "@synerise/ds-unordered-list": "^1.1.10",
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": "f7c362a4f370d86b51df9aba9e91ac8f7fe4ed8f"
49
+ "gitHead": "b35b1875727156fe9f5b3bad55aed5ca447c8c8d"
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 {};