@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 +8 -0
- package/README.md +1 -5
- package/dist/Result.d.ts +2 -2
- package/dist/Result.js +36 -32
- package/dist/Result.styles.d.ts +8 -8
- package/dist/Result.styles.js +24 -20
- package/dist/Result.types.d.ts +1 -1
- package/dist/Result.types.js +1 -1
- package/dist/index.js +4 -1
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/package.json +7 -7
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 |
|
|
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 {
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
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:
|
|
7
|
+
iconColor: "blue-600"
|
|
10
8
|
},
|
|
11
9
|
warning: {
|
|
12
10
|
IconComponent: WarningL,
|
|
13
|
-
iconColor:
|
|
11
|
+
iconColor: "yellow-600"
|
|
14
12
|
},
|
|
15
13
|
error: {
|
|
16
14
|
IconComponent: WarningL,
|
|
17
|
-
iconColor:
|
|
15
|
+
iconColor: "red-600"
|
|
18
16
|
},
|
|
19
17
|
success: {
|
|
20
18
|
IconComponent: CheckL,
|
|
21
|
-
iconColor:
|
|
19
|
+
iconColor: "green-600"
|
|
22
20
|
},
|
|
23
21
|
progress: {
|
|
24
22
|
IconComponent: TimeL,
|
|
25
|
-
iconColor:
|
|
23
|
+
iconColor: "grey-600"
|
|
26
24
|
},
|
|
27
|
-
|
|
25
|
+
"no-results": {
|
|
28
26
|
IconComponent: InformationNoSearchResultL,
|
|
29
|
-
iconColor:
|
|
27
|
+
iconColor: "grey-600"
|
|
30
28
|
}
|
|
31
29
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
component:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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;
|
package/dist/Result.styles.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export declare const Title: import(
|
|
2
|
-
export declare const Description: import(
|
|
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(
|
|
6
|
-
export declare const PanelContainer: import(
|
|
7
|
-
export declare const ResultIconContainer: import(
|
|
8
|
-
export declare const StatusIconContainer: import(
|
|
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(
|
|
12
|
-
export declare const ResultContent: import(
|
|
11
|
+
export declare const ResultContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
12
|
+
export declare const ResultContent: import('styled-components').StyledComponent<"div", any, {}, never>;
|
package/dist/Result.styles.js
CHANGED
|
@@ -1,41 +1,45 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
import { ButtonStyles } from
|
|
3
|
-
import * as T from
|
|
4
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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;}"],
|
|
20
|
-
|
|
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
|
-
|
|
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:", ";"],
|
|
32
|
-
|
|
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
|
-
|
|
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
|
+
};
|
package/dist/Result.types.d.ts
CHANGED
package/dist/Result.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/index.js
CHANGED
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
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.
|
|
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": "
|
|
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": "
|
|
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.
|
|
39
|
-
"@synerise/ds-icon": "^1.
|
|
40
|
-
"@synerise/ds-typography": "^1.1.
|
|
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": "
|
|
47
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
48
48
|
}
|