@synerise/ds-stepper 1.0.53 → 1.0.55

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.55](https://github.com/Synerise/synerise-design/compare/@synerise/ds-stepper@1.0.54...@synerise/ds-stepper@1.0.55) (2026-07-23)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-stepper
9
+
10
+ ## [1.0.54](https://github.com/Synerise/synerise-design/compare/@synerise/ds-stepper@1.0.53...@synerise/ds-stepper@1.0.54) (2026-06-17)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-stepper
13
+
6
14
  ## [1.0.53](https://github.com/Synerise/synerise-design/compare/@synerise/ds-stepper@1.0.52...@synerise/ds-stepper@1.0.53) (2026-06-11)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-stepper
package/CLAUDE.md ADDED
@@ -0,0 +1,96 @@
1
+ # Stepper (`@synerise/ds-stepper`)
2
+
3
+ > A horizontal or vertical step indicator with collapsible step content, status states (active/done/warning/validated), and animated height transitions.
4
+
5
+ ## Package structure
6
+
7
+ ```
8
+ src/
9
+ Stepper.tsx — main component; clones children to inject size/orientation; renders StepDividers between horizontal steps
10
+ Stepper.types.ts — StepperProps, StepperOrientation, StepperSize, ORIENTATIONS constant
11
+ Stepper.styles.ts — StepperWrapper, StepDivider
12
+ index.ts — public exports (Stepper default + StepperProps type)
13
+ Step/
14
+ Step.tsx — step item; handles active/done/warning/validated states, AnimateHeight, tooltip icon
15
+ Step.types.ts — StepProps
16
+ Step.styles.ts — Step, StepWrapper, StepPrefix, StepNumber, StepName, StepLabel, StepContent
17
+ ```
18
+
19
+ ## Public exports
20
+
21
+ ### `Stepper` (default export)
22
+
23
+ | Prop | Type | Default | Description |
24
+ |------|------|---------|-------------|
25
+ | `orientation` | `'horizontal' \| 'vertical' \| string` | `'horizontal'` | Layout direction |
26
+ | `size` | `'small' \| 'default' \| string` | `'default'` | Passed to each Step via `cloneElement` |
27
+ | `style` | `CSSProperties` | — | Inline styles on the root wrapper |
28
+ | `children` | `ReactNode` | — | `Stepper.Step` children |
29
+
30
+ Has static property:
31
+ - `Stepper.Step` — the step sub-component (see below)
32
+
33
+ ### `Stepper.Step`
34
+
35
+ Not separately exported from `index.ts`; access via `Stepper.Step`. `StepProps` is also not exported.
36
+
37
+ | Prop | Type | Default | Description |
38
+ |------|------|---------|-------------|
39
+ | `label` | `string \| ReactNode` | — (required) | Step label text |
40
+ | `stepNumber` | `number` | — (required) | Displayed inside the step circle (unless `done && !validated`) |
41
+ | `active` | `boolean` | — | Current active step; expands content and changes circle style |
42
+ | `done` | `boolean` | — | Completed state; shows green checkmark |
43
+ | `warning` | `boolean` | — | Warning state; yellow circle + overrides `done` checkmark to yellow |
44
+ | `validated` | `boolean` | — | Error/invalid state; red circle (highest visual priority) |
45
+ | `tooltip` | `string \| ReactNode` | — | Warning icon with tooltip shown only when `active` |
46
+ | `onClick` | `() => void` | — | Makes step clickable; shows pointer cursor |
47
+ | `children` | `ReactNode` | — | Content shown when step is active (animated height) |
48
+ | `size` | `StepperSize` | `'default'` | Injected by parent via `cloneElement` — do not pass manually |
49
+ | `orientation` | `StepperOrientation` | `'horizontal'` | Injected by parent via `cloneElement` — do not pass manually |
50
+
51
+ ### `StepperProps`
52
+
53
+ Type re-export.
54
+
55
+ ## Usage patterns
56
+
57
+ ```tsx
58
+ import Stepper from '@synerise/ds-stepper';
59
+
60
+ // Horizontal (default)
61
+ <Stepper>
62
+ <Stepper.Step stepNumber={1} label="Details" done />
63
+ <Stepper.Step stepNumber={2} label="Settings" active>
64
+ <p>Step content here</p>
65
+ </Stepper.Step>
66
+ <Stepper.Step stepNumber={3} label="Review" />
67
+ </Stepper>
68
+
69
+ // Vertical with click handlers
70
+ <Stepper orientation="vertical">
71
+ <Stepper.Step stepNumber={1} label="Step A" active={step === 0} done={step > 0} onClick={() => setStep(0)}>
72
+ ..
73
+ </Stepper.Step>
74
+ </Stepper>
75
+ ```
76
+
77
+ ## Styling
78
+
79
+ `Stepper.styles.ts` and `Step/Step.styles.ts`. All colours come from `theme.palette`. Status colours: `validated` → `red-600`, `warning` → `yellow-600`, `done` → `green-600`, `active` → `grey-700`. Priority order (highest wins visually): `validated > warning > done > active`.
80
+
81
+ `size='small'` with `orientation='horizontal'`: step labels have `max-width: 0; opacity: 0` (hidden) except for the active step, which reveals to `max-width: 100px`. Useful for compact nav bars.
82
+
83
+ ## Key dependencies
84
+
85
+ - `react-animate-height` — animates `height: 0 ↔ auto` for step content collapse/expand
86
+ - `@synerise/ds-icon` — `CheckS` (done state), `WarningFillS` (tooltip icon)
87
+ - `@synerise/ds-tooltip` — label tooltip (always present, triggers on hover) and warning tooltip
88
+
89
+ ## Implementation notes
90
+
91
+ - **`cloneElement` injects `size` and `orientation`** — the parent `Stepper` maps over `children` and calls `cloneElement(child, { size, orientation })`. Users should not pass these props to `Stepper.Step` directly.
92
+ - **`StepDivider` is horizontal-only** — dividers between steps are rendered only when `orientation === 'horizontal'`. There is a `@ts-expect-error` in `Stepper.tsx` for accessing `children.length`.
93
+ - **`wasActive` state** — `Step` tracks whether it was recently active to control `transition-delay` direction (expand vs collapse).
94
+ - **Active step label uses `::before` pseudo-element** — the bold active label is implemented via `data-label` attribute + CSS `content: attr(data-label)` on `::before`, making the actual `<span>` invisible. This prevents layout shifts when the font-weight changes.
95
+ - **`StepProps` not exported** — `StepProps` is not in `index.ts`; consumers cannot type-check `Stepper.Step` props without a deep import.
96
+ - **Uses Vitest**.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-stepper",
3
- "version": "1.0.53",
3
+ "version": "1.0.55",
4
4
  "description": "Stepper 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-icon": "^1.18.3",
45
- "@synerise/ds-tooltip": "^1.5.2",
45
+ "@synerise/ds-icon": "^1.18.5",
46
+ "@synerise/ds-tooltip": "^1.5.4",
46
47
  "react-animate-height": "^2.0.23"
47
48
  },
48
49
  "peerDependencies": {
@@ -51,5 +52,5 @@
51
52
  "styled-components": "^5.3.3",
52
53
  "vitest": "4"
53
54
  },
54
- "gitHead": "fe3379f50afdce6d8c61a2222ebbf03324107c95"
55
+ "gitHead": "d0a43cc43d8528a36f105aceea52ab470edb71d9"
55
56
  }