@synerise/ds-section-message 1.0.1 → 1.0.3

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.0.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-section-message@1.0.2...@synerise/ds-section-message@1.0.3) (2025-07-24)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-section-message
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.0.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-section-message@1.0.1...@synerise/ds-section-message@1.0.2) (2025-07-18)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **section-message:** revert wrappers in styles ([e26723d](https://github.com/Synerise/synerise-design/commit/e26723d10590617cbf620dd9e62650f7aeb44299))
20
+
21
+
22
+
23
+
24
+
6
25
  ## 1.0.1 (2025-07-17)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-section-message
@@ -0,0 +1,5 @@
1
+ import React, { type ReactNode } from 'react';
2
+ import { type SectionType } from './SectionMessage.types';
3
+ export declare const ICONS: Record<SectionType, ReactNode>;
4
+ export declare const DEFAULT_ICON: React.JSX.Element;
5
+ export declare const SECTION_TYPES: readonly ["positive", "notice", "negative", "neutral", "supply", "service", "entity"];
@@ -9,4 +9,5 @@ export var ICONS = {
9
9
  service: /*#__PURE__*/React.createElement(UpdateDataM, null),
10
10
  entity: /*#__PURE__*/React.createElement(NotificationsReceiveM, null)
11
11
  };
12
- export var DEFAULT_ICON = /*#__PURE__*/React.createElement(WarningFillM, null);
12
+ export var DEFAULT_ICON = /*#__PURE__*/React.createElement(WarningFillM, null);
13
+ export var SECTION_TYPES = ['positive', 'notice', 'negative', 'neutral', 'supply', 'service', 'entity'];
@@ -3,8 +3,9 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
3
3
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useMemo } from 'react';
5
5
  import Icon, { CloseM } from '@synerise/ds-icon';
6
+ import { DEFAULT_ICON, ICONS } from './SectionMessage.const';
6
7
  import * as S from './SectionMessage.styles';
7
- import { DEFAULT_ICON, ICONS } from './utils/utils';
8
+ import { isSectionType } from './SectionMessage.utils';
8
9
  var SectionMessage = function SectionMessage(_ref) {
9
10
  var icon = _ref.icon,
10
11
  type = _ref.type,
@@ -35,7 +36,7 @@ var SectionMessage = function SectionMessage(_ref) {
35
36
  if (icon) {
36
37
  return icon;
37
38
  }
38
- if (ICONS[type]) {
39
+ if (isSectionType(type)) {
39
40
  return ICONS[type];
40
41
  }
41
42
  return DEFAULT_ICON;
@@ -6,15 +6,15 @@ export declare const AlertContent: import("styled-components").StyledComponent<"
6
6
  export declare const AllContent: import("styled-components").StyledComponent<"div", any, {}, never>;
7
7
  export declare const Text: import("styled-components").StyledComponent<"div", any, {}, never>;
8
8
  export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {
9
- color?: ColorType | undefined;
10
- customColorIcon?: CustomColorType | undefined;
9
+ color?: ColorType;
10
+ customColorIcon?: CustomColorType;
11
11
  }, never>;
12
12
  export declare const IconCloseWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
13
13
  export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
14
14
  export declare const SuffixWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
15
15
  export declare const Container: import("styled-components").StyledComponent<"div", any, {
16
- color?: ColorType | undefined;
17
- customColor?: CustomColorType | undefined;
16
+ color?: ColorType;
17
+ customColor?: CustomColorType;
18
18
  }, never>;
19
19
  export declare const WrapperSectionMessage: import("styled-components").StyledComponent<"div", any, {}, never>;
20
20
  export declare const AlertMessage: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -22,3 +22,7 @@ export declare const AlertDescription: import("styled-components").StyledCompone
22
22
  export declare const EmphasisWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
23
23
  export declare const LinkWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
24
24
  export declare const AlertShowMore: import("styled-components").StyledComponent<"span", any, {}, never>;
25
+ export declare const NumberWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
26
+ export declare const IconOrderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
27
+ export declare const OrderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
28
+ export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -70,4 +70,36 @@ export var LinkWrapper = styled.span.withConfig({
70
70
  export var AlertShowMore = styled.span.withConfig({
71
71
  displayName: "SectionMessagestyles__AlertShowMore",
72
72
  componentId: "sc-1qohcjm-13"
73
- })(["display:flex;font-size:13px;font-weight:500;color:inherit;text-decoration:underline;cursor:pointer;margin-top:6px;"]);
73
+ })(["display:flex;font-size:13px;font-weight:500;color:inherit;text-decoration:underline;cursor:pointer;margin-top:6px;"]);
74
+ export var NumberWrapper = styled.div.withConfig({
75
+ displayName: "SectionMessagestyles__NumberWrapper",
76
+ componentId: "sc-1qohcjm-14"
77
+ })(["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) {
78
+ return props.theme.palette['grey-400'];
79
+ }, function (props) {
80
+ return props.theme.palette['grey-400'];
81
+ }, function (props) {
82
+ return props.theme.palette['grey-700'];
83
+ });
84
+ export var IconOrderWrapper = styled.div.withConfig({
85
+ displayName: "SectionMessagestyles__IconOrderWrapper",
86
+ componentId: "sc-1qohcjm-15"
87
+ })(["display:none;margin:-4px 0;svg{fill:", ";}&:hover{svg{fill:", ";cursor:pointer;}}"], function (props) {
88
+ return props.theme.palette['grey-700'];
89
+ }, function (props) {
90
+ return props.theme.palette['blue-600'];
91
+ });
92
+ export var OrderWrapper = styled.div.withConfig({
93
+ displayName: "SectionMessagestyles__OrderWrapper",
94
+ componentId: "sc-1qohcjm-16"
95
+ })(["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) {
96
+ return props.theme.palette['grey-400'];
97
+ }, function (props) {
98
+ return props.theme.palette['grey-700'];
99
+ });
100
+ export var Wrapper = styled.div.withConfig({
101
+ displayName: "SectionMessagestyles__Wrapper",
102
+ componentId: "sc-1qohcjm-17"
103
+ })(["margin-top:10px;color:", ";"], function (props) {
104
+ return props.theme.palette['grey-700'];
105
+ });
@@ -1,8 +1,9 @@
1
1
  import type { ReactElement, ReactNode } from 'react';
2
2
  import type { WithHTMLAttributes } from '@synerise/ds-utils';
3
+ import { type SECTION_TYPES } from './SectionMessage.const';
3
4
  export type CustomColorType = 'blue' | 'grey' | 'red' | 'green' | 'yellow' | 'pink' | 'mars' | 'orange' | 'fern' | 'cyan' | 'purple' | 'violet';
4
5
  export type ColorType = 'grey' | 'red' | 'green' | 'yellow' | 'violet' | 'purple' | 'cyan';
5
- export type SectionType = 'positive' | 'notice' | 'negative' | 'neutral' | 'supply' | 'service' | 'entity';
6
+ export type SectionType = (typeof SECTION_TYPES)[number];
6
7
  export type SectionMessageProps = WithHTMLAttributes<HTMLDivElement, {
7
8
  message?: ReactNode;
8
9
  type: string | SectionType;
@@ -0,0 +1,2 @@
1
+ import { type SectionType } from './SectionMessage.types';
2
+ export declare const isSectionType: (type: string) => type is SectionType;
@@ -0,0 +1,4 @@
1
+ import { SECTION_TYPES } from './SectionMessage.const';
2
+ export var isSectionType = function isSectionType(type) {
3
+ return SECTION_TYPES.includes(type);
4
+ };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export { default } from './SectionMessage';
2
- export type { SectionMessageProps } from './SectionMessage.types';
2
+ export type { SectionMessageProps, SectionType, ColorType, CustomColorType, } from './SectionMessage.types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-section-message",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "SectionMessage UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,13 +34,13 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-icon": "^1.6.1",
38
- "@synerise/ds-utils": "^1.3.0"
37
+ "@synerise/ds-icon": "^1.6.2",
38
+ "@synerise/ds-utils": "^1.4.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@synerise/ds-core": "*",
42
42
  "react": ">=16.9.0 <= 18.3.1",
43
43
  "styled-components": "^5.3.3"
44
44
  },
45
- "gitHead": "4e851d649cb25346f2f8e0575dde91cc50f43bc4"
45
+ "gitHead": "b35b1875727156fe9f5b3bad55aed5ca447c8c8d"
46
46
  }
@@ -1,4 +0,0 @@
1
- import React, { type ReactNode } from 'react';
2
- import { type SectionType } from '../SectionMessage.types';
3
- export declare const ICONS: Record<SectionType, ReactNode>;
4
- export declare const DEFAULT_ICON: React.JSX.Element;