@synerise/ds-result 1.0.65 → 1.0.66

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,10 @@
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.66](https://github.com/Synerise/synerise-design/compare/@synerise/ds-result@1.0.65...@synerise/ds-result@1.0.66) (2026-07-23)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-result
9
+
6
10
  ## [1.0.65](https://github.com/Synerise/synerise-design/compare/@synerise/ds-result@1.0.64...@synerise/ds-result@1.0.65) (2026-07-16)
7
11
 
8
12
  **Note:** Version bump only for package @synerise/ds-result
package/CLAUDE.md ADDED
@@ -0,0 +1,87 @@
1
+ # Result (`@synerise/ds-result`)
2
+
3
+ > A status/feedback display component that renders a typed icon, title, description, optional custom panel, and optional action buttons.
4
+
5
+ ## Package structure
6
+
7
+ ```
8
+ src/
9
+ Result.tsx — main component; contains mapTypeToStatus icon/colour mapping
10
+ Result.types.ts — ResultProps
11
+ Result.styles.ts — styled-components
12
+ index.ts — public exports
13
+ __specs__/
14
+ Result.spec.tsx — Vitest tests
15
+ ```
16
+
17
+ ## Public exports
18
+
19
+ ### `Result` (default export)
20
+
21
+ | Prop | Type | Default | Description |
22
+ |------|------|---------|-------------|
23
+ | `type` | `'info' \| 'warning' \| 'error' \| 'success' \| 'progress' \| 'no-results'` | — | **Required.** Determines the icon and icon colour |
24
+ | `title` | `string \| ReactNode` | — | Heading text |
25
+ | `description` | `string \| ReactNode` | — | Body text |
26
+ | `buttons` | `ReactNode` | — | Action buttons rendered below description |
27
+ | `panel` | `ReactNode` | — | Custom content block (e.g. image, list) |
28
+ | `customIcon` | `ReactElement` | — | Replaces the built-in type icon |
29
+ | `className` | `string` | — | Added to the root `ds-result` container |
30
+ | `noSearchResults` | `boolean` | — | **@deprecated** — use `type="no-results"` instead |
31
+
32
+ ### `ResultProps`
33
+
34
+ The full props type, re-exported as a named type.
35
+
36
+ ## Icon mapping
37
+
38
+ | `type` | Icon | Colour |
39
+ |--------|------|--------|
40
+ | `info` | `InfoL` | `blue-600` |
41
+ | `warning` | `WarningL` | `yellow-600` |
42
+ | `error` | `WarningL` | `red-600` |
43
+ | `success` | `CheckL` | `green-600` |
44
+ | `progress` | `TimeL` | `grey-600` |
45
+ | `no-results` | `InformationNoSearchResultL` | `grey-600` |
46
+
47
+ ## Usage patterns
48
+
49
+ ```tsx
50
+ import Result from '@synerise/ds-result';
51
+
52
+ // Minimal
53
+ <Result type="success" title="Done!" />
54
+
55
+ // Full
56
+ <Result
57
+ type="error"
58
+ title="Something went wrong"
59
+ description="Please try again later."
60
+ customIcon={<MyIcon />}
61
+ panel={<img src=".." />}
62
+ buttons={
63
+ <>
64
+ <Button type="secondary">Cancel</Button>
65
+ <Button type="primary">Retry</Button>
66
+ </>
67
+ }
68
+ />
69
+ ```
70
+
71
+ ## Styling
72
+
73
+ Styles live in `Result.styles.ts`. Uses `@synerise/ds-core` theme tokens for colours (`theme.palette[iconColor]`). Layout is a centred flex column with `gap: 24px`, `max-width: 440px`, `padding: 24px 0`.
74
+
75
+ ## Key dependencies
76
+
77
+ - `@synerise/ds-icon` — renders the typed icon and wraps `customIcon`
78
+ - `@synerise/ds-typography` — `Description` styled component and `h500` macro for the title
79
+ - `@synerise/ds-button` — `ButtonStyles.Button.AntdButton` targeted in `ButtonContainer` for button spacing
80
+
81
+ ## Implementation notes
82
+
83
+ - **`closable` and `onClose` are not implemented**: the README API table and usage example document both, but neither prop exists in `ResultProps` or is used in `Result.tsx` — they are silently dropped.
84
+ - **Icon size bug**: `size={mapTypeToStatus['no-results'] ? 48 : 24}` — the value `mapTypeToStatus['no-results']` is always a truthy object, so **all** icons render at size 48, not just `no-results`. The intended expression is `type === 'no-results' ? 48 : 24`.
85
+ - **`noSearchResults` is `@deprecated`**: use `type="no-results"` instead. The prop is accepted but has no effect on rendering (it was presumably the predecessor of the `no-results` type).
86
+ - **Uses Vitest** for testing.
87
+ - Root element always has class `ds-result` plus any passed `className`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-result",
3
- "version": "1.0.65",
3
+ "version": "1.0.66",
4
4
  "description": "Result UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -17,6 +17,7 @@
17
17
  "files": [
18
18
  "/dist",
19
19
  "CHANGELOG.md",
20
+ "CLAUDE.md",
20
21
  "README.md",
21
22
  "package.json",
22
23
  "LICENSE.md"
@@ -41,9 +42,9 @@
41
42
  ],
42
43
  "types": "dist/index.d.ts",
43
44
  "dependencies": {
44
- "@synerise/ds-button": "^1.5.34",
45
- "@synerise/ds-icon": "^1.18.4",
46
- "@synerise/ds-typography": "^1.1.26"
45
+ "@synerise/ds-button": "^1.5.35",
46
+ "@synerise/ds-icon": "^1.18.5",
47
+ "@synerise/ds-typography": "^1.1.27"
47
48
  },
48
49
  "peerDependencies": {
49
50
  "@synerise/ds-core": "*",
@@ -51,5 +52,5 @@
51
52
  "styled-components": "^5.3.3",
52
53
  "vitest": "4"
53
54
  },
54
- "gitHead": "a81ab6519d49a3dea9c0cfebcdc9104cbb4f4226"
55
+ "gitHead": "d0a43cc43d8528a36f105aceea52ab470edb71d9"
55
56
  }