aravint-ui-navigation 1.0.55 → 1.0.58

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/Readme.md CHANGED
@@ -150,6 +150,28 @@ export default function ApprovalTracker() {
150
150
  }
151
151
  ```
152
152
 
153
+ For workflows that provide a status for each step, pass `key`, `label`, and
154
+ `status` instead. In this form, `currentStep` is not required:
155
+
156
+ ```tsx
157
+ const steps = [
158
+ { key: "initiated", label: "Re-Initiated", status: "pending" },
159
+ { key: "enggManager", num: 1, label: "Engineering manager", status: "completed" },
160
+ { key: "buManager", num: 2, label: "BU Manager", status: "completed" },
161
+ {
162
+ key: "mfgPe",
163
+ num: 3,
164
+ label: "Manufacturing Process Engineer",
165
+ status: "rejected",
166
+ date: "01-10-2026",
167
+ time: "12:42PM",
168
+ },
169
+ { key: "cfoApproval", num: 4, label: "CFO approval", status: "pending" },
170
+ ];
171
+
172
+ <Stepper steps={steps} />
173
+ ```
174
+
153
175
  ---
154
176
 
155
177
  ## Props
@@ -157,7 +179,7 @@ export default function ApprovalTracker() {
157
179
  | Prop | Type | Default | Description |
158
180
  |------|------|---------|-------------|
159
181
  | `steps` | `StepItem[]` | **Required** | List of workflow steps. |
160
- | `currentStep` | `number` | **Required** | Current active step (starts from `1`). |
182
+ | `currentStep` | `number` | Optional for status-based steps | Current active step for legacy steps (starts from `1`). |
161
183
  | `completedColor` | `string` | `#059669` | Color of completed steps. |
162
184
  | `activeColor` | `string` | `#059669` | Color of the active step. |
163
185
  | `pendingColor` | `string` | `#9ca3af` | Color of pending steps. |
@@ -167,17 +189,31 @@ export default function ApprovalTracker() {
167
189
 
168
190
  ---
169
191
 
170
- ## StepItem
192
+ ## Step Types
171
193
 
172
194
  ```ts
173
- interface StepItem {
195
+ interface LegacyStepItem {
174
196
  id: string;
175
197
  title: string;
176
198
  date?: string;
177
199
  time?: string;
178
200
  }
201
+
202
+ interface WorkflowStepItem {
203
+ key: string;
204
+ num?: number;
205
+ label: string;
206
+ status: "completed" | "active" | "current" | "pending" | "rejected";
207
+ date?: string;
208
+ time?: string;
209
+ }
210
+
211
+ type StepItem = LegacyStepItem | WorkflowStepItem;
179
212
  ```
180
213
 
214
+ `WorkflowStepItem.status` takes precedence over `currentStep`. `active` is
215
+ optional for workflows that distinguish an in-progress step from `pending`.
216
+
181
217
  ---
182
218
 
183
219
  ## Example