@synerise/ds-status 1.3.31 → 1.3.33

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.3.33](https://github.com/Synerise/synerise-design/compare/@synerise/ds-status@1.3.32...@synerise/ds-status@1.3.33) (2026-08-11)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-status
9
+
10
+ ## [1.3.32](https://github.com/Synerise/synerise-design/compare/@synerise/ds-status@1.3.31...@synerise/ds-status@1.3.32) (2026-07-23)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-status
13
+
6
14
  ## [1.3.31](https://github.com/Synerise/synerise-design/compare/@synerise/ds-status@1.3.30...@synerise/ds-status@1.3.31) (2026-06-17)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-status
package/CLAUDE.md ADDED
@@ -0,0 +1,75 @@
1
+ # Status (`@synerise/ds-status`)
2
+
3
+ > A pill-shaped status badge component that wraps `@synerise/ds-tag` with a `STATUS_NEUTRAL` shape, supporting predefined semantic types and a `custom` type with arbitrary colour.
4
+
5
+ ## Package structure
6
+
7
+ ```
8
+ src/
9
+ Status.tsx — main component; forwardRef wrapper around Tag
10
+ Status.types.ts — StatusProps, StatusType
11
+ Status.styles.ts — StatusTag styled Tag with type-to-colour mapping
12
+ index.ts — public exports
13
+ __specs__/
14
+ Status.spec.tsx — Vitest tests
15
+ ```
16
+
17
+ ## Public exports
18
+
19
+ ### `Status` (default export)
20
+
21
+ `forwardRef<HTMLDivElement, StatusProps>` — ref targets the root `<div>`.
22
+
23
+ | Prop | Type | Default | Description |
24
+ |------|------|---------|-------------|
25
+ | `type` | `StatusType` | `'primary'` | Semantic type; controls border/text colour |
26
+ | `label` | `string` | — | **Required.** Text inside the badge |
27
+ | `color` | `string` | — | Custom colour (only effective when `type='custom'`) |
28
+ | `dashed` | `boolean` | — | Renders a dashed border instead of solid |
29
+ | `onClick` | `() => void` | — | Click handler |
30
+
31
+ `StatusProps` extends `WithHTMLAttributes<HTMLDivElement, ..>` — all standard HTML div attributes are forwarded to the root element.
32
+
33
+ ### `StatusType`
34
+
35
+ ```ts
36
+ type StatusType =
37
+ | 'primary' // blue-600
38
+ | 'success' // green-700
39
+ | 'warning' // yellow-700
40
+ | 'danger' // red-600
41
+ | 'info' // blue-600 (same as primary)
42
+ | 'disabled' // grey-500
43
+ | 'default' // grey-500
44
+ | 'custom'; // uses color prop
45
+ ```
46
+
47
+ ### `StatusProps`
48
+
49
+ Full props type, re-exported as a named type.
50
+
51
+ ## Usage patterns
52
+
53
+ ```tsx
54
+ import Status from '@synerise/ds-status';
55
+
56
+ <Status type="success" label="Active" />
57
+ <Status type="danger" label="Failed" onClick={handleClick} />
58
+ <Status type="custom" color="#FF5733" label="Custom" dashed />
59
+ ```
60
+
61
+ ## Styling
62
+
63
+ `StatusTag` in `Status.styles.ts` extends `@synerise/ds-tag`. The `typeColor` helper maps `type` to a `theme.palette` token. For `type='custom'`, `typeColor` returns `null` and no colour style is applied — the `color` prop is passed directly to `Tag`. Root element always receives `ds-status` class plus any passed `className`.
64
+
65
+ ## Key dependencies
66
+
67
+ - `@synerise/ds-tag` — base `Tag` component rendered with `shape={TagShape.STATUS_NEUTRAL}` and `asPill`
68
+ - `@synerise/ds-utils` — `WithHTMLAttributes` type helper
69
+
70
+ ## Implementation notes
71
+
72
+ - **`info` and `primary` both map to `blue-600`** — they are functionally identical in the current colour mapping.
73
+ - **`disabled` and `default` both map to `grey-500`** — functionally identical.
74
+ - **`custom` type**: pass `color` prop for the badge colour; without it the badge renders unstyled (no colour CSS applied).
75
+ - **Uses Vitest** for testing.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-status",
3
- "version": "1.3.31",
3
+ "version": "1.3.33",
4
4
  "description": "Status 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,8 +42,8 @@
41
42
  ],
42
43
  "types": "dist/index.d.ts",
43
44
  "dependencies": {
44
- "@synerise/ds-tag": "^1.4.31",
45
- "@synerise/ds-utils": "^1.10.1"
45
+ "@synerise/ds-tag": "^1.4.33",
46
+ "@synerise/ds-utils": "^1.10.2"
46
47
  },
47
48
  "peerDependencies": {
48
49
  "@synerise/ds-core": "*",
@@ -50,5 +51,5 @@
50
51
  "styled-components": "^5.3.3",
51
52
  "vitest": "4"
52
53
  },
53
- "gitHead": "d8c64070f58f14e3fb1bfbcbf00d1e3b8fd51eb8"
54
+ "gitHead": "6df24ed12cd5f276d8eccde730591807982e3385"
54
55
  }