@synerise/ds-result 1.0.16 → 1.0.18

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.18](https://github.com/Synerise/synerise-design/compare/@synerise/ds-result@1.0.17...@synerise/ds-result@1.0.18) (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.0.17](https://github.com/Synerise/synerise-design/compare/@synerise/ds-result@1.0.16...@synerise/ds-result@1.0.17) (2025-07-17)
18
+
19
+ **Note:** Version bump only for package @synerise/ds-result
20
+
21
+
22
+
23
+
24
+
6
25
  ## [1.0.16](https://github.com/Synerise/synerise-design/compare/@synerise/ds-result@1.0.15...@synerise/ds-result@1.0.16) (2025-07-15)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-result
package/dist/Result.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { type ResultProps } from './Result.types';
3
- declare const Result: React.FC<ResultProps>;
3
+ declare const Result: ({ className, type, title, description, panel, buttons, customIcon, }: ResultProps) => React.JSX.Element;
4
4
  export default Result;
package/dist/Result.js CHANGED
@@ -1,33 +1,28 @@
1
1
  var _excluded = ["IconComponent"];
2
2
  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; }
3
3
  import React from 'react';
4
- import Icon, { CheckM, HourglassM, InfoM, InformationNoSearchResultL, WarningM } from '@synerise/ds-icon';
4
+ import Icon, { CheckL, InfoL, InformationNoSearchResultL, TimeL, WarningL } from '@synerise/ds-icon';
5
5
  import * as S from './Result.styles';
6
6
  var mapTypeToStatus = {
7
7
  info: {
8
- IconComponent: InfoM,
9
- iconColor: 'blue-600',
10
- background: 'blue-050'
8
+ IconComponent: InfoL,
9
+ iconColor: 'blue-600'
11
10
  },
12
11
  warning: {
13
- IconComponent: WarningM,
14
- iconColor: 'yellow-600',
15
- background: 'yellow-100'
12
+ IconComponent: WarningL,
13
+ iconColor: 'yellow-600'
16
14
  },
17
15
  error: {
18
- IconComponent: WarningM,
19
- iconColor: 'red-600',
20
- background: 'red-100'
16
+ IconComponent: WarningL,
17
+ iconColor: 'red-600'
21
18
  },
22
19
  success: {
23
- IconComponent: CheckM,
24
- iconColor: 'green-600',
25
- background: 'green-100'
20
+ IconComponent: CheckL,
21
+ iconColor: 'green-600'
26
22
  },
27
23
  progress: {
28
- IconComponent: HourglassM,
29
- iconColor: 'grey-600',
30
- background: 'grey-100'
24
+ IconComponent: TimeL,
25
+ iconColor: 'grey-600'
31
26
  },
32
27
  'no-results': {
33
28
  IconComponent: InformationNoSearchResultL,
@@ -41,19 +36,16 @@ var Result = function Result(_ref) {
41
36
  description = _ref.description,
42
37
  panel = _ref.panel,
43
38
  buttons = _ref.buttons,
44
- _ref$customIcon = _ref.customIcon,
45
- customIcon = _ref$customIcon === void 0 ? null : _ref$customIcon,
46
- _ref$noSearchResults = _ref.noSearchResults,
47
- noSearchResults = _ref$noSearchResults === void 0 ? false : _ref$noSearchResults;
39
+ customIcon = _ref.customIcon;
48
40
  var _mapTypeToStatus$type = mapTypeToStatus[type],
49
41
  IconComponent = _mapTypeToStatus$type.IconComponent,
50
42
  iconContainerStyles = _objectWithoutPropertiesLoose(_mapTypeToStatus$type, _excluded);
51
43
  return /*#__PURE__*/React.createElement(S.ResultContainer, {
52
- className: "ds-result " + (className || ''),
53
- noSearchResults: noSearchResults
54
- }, /*#__PURE__*/React.createElement(S.MainPanel, null, /*#__PURE__*/React.createElement(S.ResultIconContainer, null, customIcon || /*#__PURE__*/React.createElement(S.StatusIconContainer, iconContainerStyles, /*#__PURE__*/React.createElement(Icon, {
44
+ className: "ds-result " + (className || '')
45
+ }, /*#__PURE__*/React.createElement(S.ResultIconContainer, null, customIcon || /*#__PURE__*/React.createElement(S.StatusIconContainer, iconContainerStyles, /*#__PURE__*/React.createElement(Icon, {
55
46
  component: /*#__PURE__*/React.createElement(IconComponent, null),
56
- size: mapTypeToStatus['no-results'] ? 48 : 24
57
- }))), title && /*#__PURE__*/React.createElement(S.Title, null, title), description && /*#__PURE__*/React.createElement(S.Description, null, description), panel && /*#__PURE__*/React.createElement(S.PanelContainer, null, panel), buttons && /*#__PURE__*/React.createElement(S.ButtonContainer, null, buttons)));
47
+ size: mapTypeToStatus['no-results'] ? 48 : 24,
48
+ color: iconContainerStyles.iconColor
49
+ }))), (title || description) && /*#__PURE__*/React.createElement(S.ResultContent, null, title && /*#__PURE__*/React.createElement(S.Title, null, title), description && /*#__PURE__*/React.createElement(S.Description, null, description)), panel && /*#__PURE__*/React.createElement(S.PanelContainer, null, panel), buttons && /*#__PURE__*/React.createElement(S.ButtonContainer, null, buttons));
58
50
  };
59
51
  export default Result;
@@ -1,15 +1,12 @@
1
- export declare const MainPanel: import("styled-components").StyledComponent<"div", any, {}, never>;
2
1
  export declare const Title: import("styled-components").StyledComponent<"h4", any, {}, never>;
3
2
  export declare const Description: import("styled-components").StyledComponent<"div", any, {
4
- disabled?: boolean | undefined;
3
+ disabled?: boolean;
5
4
  }, never>;
6
5
  export declare const ButtonContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
7
6
  export declare const PanelContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
8
7
  export declare const ResultIconContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
9
8
  export declare const StatusIconContainer: import("styled-components").StyledComponent<"div", any, {
10
9
  iconColor: string;
11
- background: string;
12
- }, never>;
13
- export declare const ResultContainer: import("styled-components").StyledComponent<"div", any, {
14
- noSearchResults: boolean;
15
10
  }, never>;
11
+ export declare const ResultContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
12
+ export declare const ResultContent: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,45 +1,41 @@
1
- import styled, { css } from 'styled-components';
1
+ import styled from 'styled-components';
2
2
  import { ButtonStyles } from '@synerise/ds-button';
3
3
  import * as T from '@synerise/ds-typography';
4
- export var MainPanel = styled.div.withConfig({
5
- displayName: "Resultstyles__MainPanel",
6
- componentId: "sc-wep21m-0"
7
- })(["display:flex;flex-direction:column;align-items:center;justify-content:center;> div:last-of-type{margin-bottom:0;}"]);
8
4
  export var Title = styled.h4.withConfig({
9
5
  displayName: "Resultstyles__Title",
10
- componentId: "sc-wep21m-1"
11
- })(["", ";margin:0 0 24px;text-align:center;word-break:break-word;"], T.macro.h500);
6
+ componentId: "sc-wep21m-0"
7
+ })(["", ";margin:0;text-align:center;word-break:break-word;"], T.macro.h500);
12
8
  export var Description = styled(T.Description).withConfig({
13
9
  displayName: "Resultstyles__Description",
14
- componentId: "sc-wep21m-2"
15
- })(["padding:0;text-align:center;margin:0 0 24px;"]);
10
+ componentId: "sc-wep21m-1"
11
+ })(["padding:0;text-align:center;"]);
16
12
  export var ButtonContainer = styled.div.withConfig({
17
13
  displayName: "Resultstyles__ButtonContainer",
18
- componentId: "sc-wep21m-3"
14
+ componentId: "sc-wep21m-2"
19
15
  })(["text-align:center;width:100%;", "{margin:0 4px;&:first-of-type{margin-left:0;}&:last-of-type{margin-right:0;}}"], ButtonStyles.Button.AntdButton);
20
16
  export var PanelContainer = styled.div.withConfig({
21
17
  displayName: "Resultstyles__PanelContainer",
22
- componentId: "sc-wep21m-4"
23
- })(["margin:0 0 24px;width:100%;&&&{textarea{max-height:234px;background-color:", ";}}.ant-list{border:1px solid ", ";border-radius:3px;padding:8px;}"], function (props) {
18
+ componentId: "sc-wep21m-3"
19
+ })(["width:100%;&&&{textarea{max-height:234px;background-color:", ";}}.ant-list{border:1px solid ", ";border-radius:3px;padding:8px;}"], function (props) {
24
20
  return props.theme.palette.white;
25
21
  }, function (props) {
26
22
  return props.theme.palette['grey-300'];
27
23
  });
28
24
  export var ResultIconContainer = styled.div.withConfig({
29
25
  displayName: "Resultstyles__ResultIconContainer",
30
- componentId: "sc-wep21m-5"
31
- })(["margin:0 0 24px;"]);
26
+ componentId: "sc-wep21m-4"
27
+ })([""]);
32
28
  export var StatusIconContainer = styled.div.withConfig({
33
29
  displayName: "Resultstyles__StatusIconContainer",
34
- componentId: "sc-wep21m-6"
35
- })(["background-color:", ";width:40px;height:40px;border-radius:20px;text-align:center;display:flex;align-items:center;justify-content:center;margin:0 auto;color:", ";"], function (props) {
36
- return props.theme.palette[props.background];
37
- }, function (props) {
30
+ componentId: "sc-wep21m-5"
31
+ })(["width:40px;height:40px;border-radius:20px;text-align:center;display:flex;align-items:center;justify-content:center;margin:0 auto;color:", ";"], function (props) {
38
32
  return props.theme.palette[props.iconColor];
39
33
  });
40
34
  export var ResultContainer = styled.div.withConfig({
41
35
  displayName: "Resultstyles__ResultContainer",
36
+ componentId: "sc-wep21m-6"
37
+ })(["display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;gap:24px;max-width:440px;"]);
38
+ export var ResultContent = styled.div.withConfig({
39
+ displayName: "Resultstyles__ResultContent",
42
40
  componentId: "sc-wep21m-7"
43
- })(["width:100%;padding:24px;position:relative;", ""], function (props) {
44
- return props.noSearchResults && css(["", "{margin:0 0 16px;}", "{margin:0 0 16px;}", "{margin:0 0 16px;font-size:14px;line-height:1.43;color:", ";}"], ResultIconContainer, Title, Description, props.theme.palette['grey-600']);
45
- });
41
+ })(["display:flex;flex-direction:column;align-items:center;gap:8px;"]);
@@ -2,10 +2,11 @@ import type React from 'react';
2
2
  export type ResultProps = {
3
3
  className?: string;
4
4
  title?: string | React.ReactNode;
5
- type: string | 'info' | 'warning' | 'error' | 'success' | 'progress' | 'no-results';
5
+ type: 'info' | 'warning' | 'error' | 'success' | 'progress' | 'no-results';
6
6
  description?: string | React.ReactNode;
7
7
  buttons?: React.ReactNode;
8
8
  panel?: React.ReactNode;
9
9
  customIcon?: React.ReactElement;
10
+ /** @deprecated */
10
11
  noSearchResults?: boolean;
11
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-result",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "Result UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,15 +34,15 @@
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-typography": "^1.0.15",
40
- "@synerise/ds-utils": "^1.3.1"
37
+ "@synerise/ds-button": "^1.4.6",
38
+ "@synerise/ds-icon": "^1.6.2",
39
+ "@synerise/ds-typography": "^1.0.17",
40
+ "@synerise/ds-utils": "^1.4.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@synerise/ds-core": "*",
44
44
  "react": ">=16.9.0 <= 18.3.1",
45
45
  "styled-components": "^5.3.3"
46
46
  },
47
- "gitHead": "f7c362a4f370d86b51df9aba9e91ac8f7fe4ed8f"
47
+ "gitHead": "b35b1875727156fe9f5b3bad55aed5ca447c8c8d"
48
48
  }