@synerise/ds-result 1.0.47 → 1.0.49

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.0.49](https://github.com/Synerise/synerise-design/compare/@synerise/ds-result@1.0.48...@synerise/ds-result@1.0.49) (2026-03-24)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-result
9
+
10
+ ## [1.0.48](https://github.com/Synerise/synerise-design/compare/@synerise/ds-result@1.0.47...@synerise/ds-result@1.0.48) (2026-03-20)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-result
13
+
6
14
  ## [1.0.47](https://github.com/Synerise/synerise-design/compare/@synerise/ds-result@1.0.46...@synerise/ds-result@1.0.47) (2026-03-09)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-result
package/README.md CHANGED
@@ -22,7 +22,6 @@ import Result from '@synerise/ds-result'
22
22
  type="success"
23
23
  title="Chicken has been successfully cooked"
24
24
  description="Would you like to cook any other chickens?"
25
- onClose={() => console.log('close button was clicked')}
26
25
  buttons={(
27
26
  <>
28
27
  <Button type="secondary">
@@ -36,7 +35,6 @@ import Result from '@synerise/ds-result'
36
35
  panel={(
37
36
  <span>Some content, for example a picture of cooked chicken</span>
38
37
  )}
39
- closable
40
38
  />
41
39
 
42
40
  ```
@@ -50,11 +48,9 @@ import Result from '@synerise/ds-result'
50
48
  | Property | Description | Type | Default |
51
49
  | --------------- | ------------------------------------------------------------------------ | -------------------------------------------------------------------- | ------- |
52
50
  | type | type of result | `info` / `warning` / `error` / `success` / `progress` / `no-results` | - |
53
- | closable | whether or not to show X button to close | boolean | - |
54
51
  | title | title text | string / React.ReactNode | - |
55
52
  | description | description text | string / React.ReactNode | - |
56
- | onClose | event called when clicked on close button | () => void | - |
57
53
  | buttons | render buttons | React.ReactNode | - |
58
54
  | panel | render custom panel | React.ReactNode | - |
59
55
  | customIcon | render custom icon in place of type icon | React.ReactElement | - |
60
- | noSearchResults | use only in search results (renders with smaller space between elements) | boolean | - |
56
+ | noSearchResults | **Deprecated** use `type="no-results"` instead | boolean | - |
package/dist/Result.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type ResultProps } from './Result.types';
1
+ import { default as React } from 'react';
2
+ import { ResultProps } from './Result.types';
3
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,51 +1,55 @@
1
- var _excluded = ["IconComponent"];
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
- import React from 'react';
4
- import Icon, { CheckL, InfoL, InformationNoSearchResultL, TimeL, WarningL } from '@synerise/ds-icon';
5
- import * as S from './Result.styles';
6
- var mapTypeToStatus = {
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import Icon, { InformationNoSearchResultL, TimeL, CheckL, WarningL, InfoL } from "@synerise/ds-icon";
3
+ import { ResultContainer, ResultIconContainer, StatusIconContainer, ResultContent, Title, Description, PanelContainer, ButtonContainer } from "./Result.styles.js";
4
+ const mapTypeToStatus = {
7
5
  info: {
8
6
  IconComponent: InfoL,
9
- iconColor: 'blue-600'
7
+ iconColor: "blue-600"
10
8
  },
11
9
  warning: {
12
10
  IconComponent: WarningL,
13
- iconColor: 'yellow-600'
11
+ iconColor: "yellow-600"
14
12
  },
15
13
  error: {
16
14
  IconComponent: WarningL,
17
- iconColor: 'red-600'
15
+ iconColor: "red-600"
18
16
  },
19
17
  success: {
20
18
  IconComponent: CheckL,
21
- iconColor: 'green-600'
19
+ iconColor: "green-600"
22
20
  },
23
21
  progress: {
24
22
  IconComponent: TimeL,
25
- iconColor: 'grey-600'
23
+ iconColor: "grey-600"
26
24
  },
27
- 'no-results': {
25
+ "no-results": {
28
26
  IconComponent: InformationNoSearchResultL,
29
- iconColor: 'grey-600'
27
+ iconColor: "grey-600"
30
28
  }
31
29
  };
32
- var Result = function Result(_ref) {
33
- var className = _ref.className,
34
- type = _ref.type,
35
- title = _ref.title,
36
- description = _ref.description,
37
- panel = _ref.panel,
38
- buttons = _ref.buttons,
39
- customIcon = _ref.customIcon;
40
- var _mapTypeToStatus$type = mapTypeToStatus[type],
41
- IconComponent = _mapTypeToStatus$type.IconComponent,
42
- iconContainerStyles = _objectWithoutPropertiesLoose(_mapTypeToStatus$type, _excluded);
43
- return /*#__PURE__*/React.createElement(S.ResultContainer, {
44
- className: "ds-result " + (className || '')
45
- }, /*#__PURE__*/React.createElement(S.ResultIconContainer, null, customIcon || /*#__PURE__*/React.createElement(S.StatusIconContainer, iconContainerStyles, /*#__PURE__*/React.createElement(Icon, {
46
- component: /*#__PURE__*/React.createElement(IconComponent, null),
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));
30
+ const Result = ({
31
+ className,
32
+ type,
33
+ title,
34
+ description,
35
+ panel,
36
+ buttons,
37
+ customIcon
38
+ }) => {
39
+ const {
40
+ IconComponent,
41
+ ...iconContainerStyles
42
+ } = mapTypeToStatus[type];
43
+ return /* @__PURE__ */ jsxs(ResultContainer, { className: `ds-result ${className || ""}`, children: [
44
+ /* @__PURE__ */ jsx(ResultIconContainer, { children: customIcon || /* @__PURE__ */ jsx(StatusIconContainer, { ...iconContainerStyles, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(IconComponent, {}), size: mapTypeToStatus["no-results"] ? 48 : 24, color: iconContainerStyles.iconColor }) }) }),
45
+ (title || description) && /* @__PURE__ */ jsxs(ResultContent, { children: [
46
+ title && /* @__PURE__ */ jsx(Title, { children: title }),
47
+ description && /* @__PURE__ */ jsx(Description, { children: description })
48
+ ] }),
49
+ panel && /* @__PURE__ */ jsx(PanelContainer, { children: panel }),
50
+ buttons && /* @__PURE__ */ jsx(ButtonContainer, { children: buttons })
51
+ ] });
52
+ };
53
+ export {
54
+ Result as default
50
55
  };
51
- export default Result;
@@ -1,12 +1,12 @@
1
- export declare const Title: import("styled-components").StyledComponent<"h4", any, {}, never>;
2
- export declare const Description: import("styled-components").StyledComponent<"div", any, {
1
+ export declare const Title: import('styled-components').StyledComponent<"h4", any, {}, never>;
2
+ export declare const Description: import('styled-components').StyledComponent<"div", any, {
3
3
  disabled?: boolean;
4
4
  }, never>;
5
- export declare const ButtonContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export declare const PanelContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
7
- export declare const ResultIconContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
8
- export declare const StatusIconContainer: import("styled-components").StyledComponent<"div", any, {
5
+ export declare const ButtonContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
6
+ export declare const PanelContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
7
+ export declare const ResultIconContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
8
+ export declare const StatusIconContainer: import('styled-components').StyledComponent<"div", any, {
9
9
  iconColor: string;
10
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>;
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,41 +1,45 @@
1
- import styled from 'styled-components';
2
- import { ButtonStyles } from '@synerise/ds-button';
3
- import * as T from '@synerise/ds-typography';
4
- export var Title = styled.h4.withConfig({
1
+ import styled from "styled-components";
2
+ import { ButtonStyles } from "@synerise/ds-button";
3
+ import * as T from "@synerise/ds-typography";
4
+ const Title = /* @__PURE__ */ styled.h4.withConfig({
5
5
  displayName: "Resultstyles__Title",
6
6
  componentId: "sc-wep21m-0"
7
7
  })(["", ";margin:0;text-align:center;word-break:break-word;"], T.macro.h500);
8
- export var Description = styled(T.Description).withConfig({
8
+ const Description = /* @__PURE__ */ styled(T.Description).withConfig({
9
9
  displayName: "Resultstyles__Description",
10
10
  componentId: "sc-wep21m-1"
11
11
  })(["padding:0;text-align:center;"]);
12
- export var ButtonContainer = styled.div.withConfig({
12
+ const ButtonContainer = /* @__PURE__ */ styled.div.withConfig({
13
13
  displayName: "Resultstyles__ButtonContainer",
14
14
  componentId: "sc-wep21m-2"
15
15
  })(["text-align:center;width:100%;", "{margin:0 4px;&:first-of-type{margin-left:0;}&:last-of-type{margin-right:0;}}"], ButtonStyles.Button.AntdButton);
16
- export var PanelContainer = styled.div.withConfig({
16
+ const PanelContainer = /* @__PURE__ */ styled.div.withConfig({
17
17
  displayName: "Resultstyles__PanelContainer",
18
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) {
20
- return props.theme.palette.white;
21
- }, function (props) {
22
- return props.theme.palette['grey-300'];
23
- });
24
- export var ResultIconContainer = styled.div.withConfig({
19
+ })(["width:100%;&&&{textarea{max-height:234px;background-color:", ";}}.ant-list{border:1px solid ", ";border-radius:3px;padding:8px;}"], (props) => props.theme.palette.white, (props) => props.theme.palette["grey-300"]);
20
+ const ResultIconContainer = /* @__PURE__ */ styled.div.withConfig({
25
21
  displayName: "Resultstyles__ResultIconContainer",
26
22
  componentId: "sc-wep21m-4"
27
23
  })([""]);
28
- export var StatusIconContainer = styled.div.withConfig({
24
+ const StatusIconContainer = /* @__PURE__ */ styled.div.withConfig({
29
25
  displayName: "Resultstyles__StatusIconContainer",
30
26
  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) {
32
- return props.theme.palette[props.iconColor];
33
- });
34
- export var ResultContainer = styled.div.withConfig({
27
+ })(["width:40px;height:40px;border-radius:20px;text-align:center;display:flex;align-items:center;justify-content:center;margin:0 auto;color:", ";"], (props) => props.theme.palette[props.iconColor]);
28
+ const ResultContainer = /* @__PURE__ */ styled.div.withConfig({
35
29
  displayName: "Resultstyles__ResultContainer",
36
30
  componentId: "sc-wep21m-6"
37
31
  })(["display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;gap:24px;max-width:440px;padding:24px 0;margin:auto;"]);
38
- export var ResultContent = styled.div.withConfig({
32
+ const ResultContent = /* @__PURE__ */ styled.div.withConfig({
39
33
  displayName: "Resultstyles__ResultContent",
40
34
  componentId: "sc-wep21m-7"
41
- })(["display:flex;flex-direction:column;align-items:center;gap:8px;"]);
35
+ })(["display:flex;flex-direction:column;align-items:center;gap:8px;"]);
36
+ export {
37
+ ButtonContainer,
38
+ Description,
39
+ PanelContainer,
40
+ ResultContainer,
41
+ ResultContent,
42
+ ResultIconContainer,
43
+ StatusIconContainer,
44
+ Title
45
+ };
@@ -1,4 +1,4 @@
1
- import type React from 'react';
1
+ import { default as React } from 'react';
2
2
  export type ResultProps = {
3
3
  className?: string;
4
4
  title?: string | React.ReactNode;
@@ -1 +1 @@
1
- export {};
1
+
package/dist/index.js CHANGED
@@ -1 +1,4 @@
1
- export { default } from './Result';
1
+ import { default as default2 } from "./Result.js";
2
+ export {
3
+ default2 as default
4
+ };
package/dist/modules.d.js CHANGED
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
1
+ import "@testing-library/jest-dom";
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-result",
3
- "version": "1.0.47",
3
+ "version": "1.0.49",
4
4
  "description": "Result UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -16,10 +16,10 @@
16
16
  "access": "public"
17
17
  },
18
18
  "scripts": {
19
- "build": "pnpm run build:js && pnpm run build:css && pnpm run defs",
19
+ "build": "vite build",
20
20
  "build:css": "node ../../../scripts/style/less.js",
21
21
  "build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
22
- "build:watch": "pnpm run build:js -- --watch",
22
+ "build:watch": "vite build --watch",
23
23
  "defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
24
24
  "pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
25
25
  "prepublish": "pnpm run build",
@@ -35,14 +35,14 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-button": "^1.5.16",
39
- "@synerise/ds-icon": "^1.14.1",
40
- "@synerise/ds-typography": "^1.1.11"
38
+ "@synerise/ds-button": "^1.5.18",
39
+ "@synerise/ds-icon": "^1.15.1",
40
+ "@synerise/ds-typography": "^1.1.13"
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": "8dfafc5d7278f09d430f1e7499782d05c76b47c0"
47
+ "gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
48
48
  }