@dilipod/ui 0.4.21 → 0.4.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dilipod/ui",
3
- "version": "0.4.21",
3
+ "version": "0.4.22",
4
4
  "description": "Dilipod Design System - Shared UI components and styles",
5
5
  "author": "Dilipod <hello@dilipod.com>",
6
6
  "license": "MIT",
@@ -150,6 +150,9 @@ export function ImpactMetricsForm({
150
150
  // Net annual savings
151
151
  const netAnnualSavings = laborSavingsPerYear - workerCostPerYear
152
152
 
153
+ // ROI percentage: net savings relative to worker cost
154
+ const roiPercentage = workerCostPerYear > 0 ? (netAnnualSavings / workerCostPerYear) * 100 : 0
155
+
153
156
  return (
154
157
  <Card className={cn("border-[var(--cyan)]/20 bg-gradient-to-br from-white to-[var(--cyan)]/5", className)}>
155
158
  <CardContent className="p-5">
@@ -274,17 +277,25 @@ export function ImpactMetricsForm({
274
277
  €{netAnnualSavings.toLocaleString(undefined, { maximumFractionDigits: 0 })}
275
278
  </p>
276
279
  <p className="text-xs text-muted-foreground mt-0.5">
277
- €{laborSavingsPerYear.toLocaleString(undefined, { maximumFractionDigits: 0 })} − €{workerCostPerYear}
280
+ €{laborSavingsPerYear.toLocaleString(undefined, { maximumFractionDigits: 0 })} <span className="opacity-60">labor saved</span> − €{workerCostPerYear} <span className="opacity-60">worker cost</span>
278
281
  </p>
279
282
  </div>
280
283
  </div>
281
284
 
282
- {/* Implied frequency indicator */}
283
- {impliedFrequencyPerYear > 0 && (
284
- <p className="text-xs text-muted-foreground mt-4 pt-3 border-t border-border/50">
285
- Implied: ~{impliedFrequencyPerMonth}×/month ({impliedFrequencyPerYear}×/year)
285
+ {/* ROI & Implied frequency */}
286
+ <div className="mt-4 pt-3 border-t border-border/50 flex items-center justify-between">
287
+ <p className={cn(
288
+ "text-sm",
289
+ roiPercentage > 0 ? "font-bold text-[var(--cyan)]" : "text-muted-foreground"
290
+ )}>
291
+ ROI: {roiPercentage >= 0 ? '+' : ''}{roiPercentage.toLocaleString(undefined, { maximumFractionDigits: 0 })}%
286
292
  </p>
287
- )}
293
+ {impliedFrequencyPerYear > 0 && (
294
+ <p className="text-xs text-muted-foreground">
295
+ Implied: ~{impliedFrequencyPerMonth}×/month ({impliedFrequencyPerYear}×/year)
296
+ </p>
297
+ )}
298
+ </div>
288
299
  </CardContent>
289
300
  </Card>
290
301
  )
@@ -105,6 +105,9 @@ function ScenarioCard({
105
105
  <Icon size={16} weight="fill" className={config.color} />
106
106
  </div>
107
107
  <div className="flex-1 min-w-0 pt-0.5">
108
+ <div className="flex items-center gap-2 mb-1.5">
109
+ <Badge variant="outline" size="sm" className="font-medium">{config.label}</Badge>
110
+ </div>
108
111
  <p className="text-sm text-[var(--black)]">
109
112
  <span className="font-medium">When:</span> {scenario.situation}
110
113
  </p>
@@ -97,7 +97,7 @@ export interface SimWorkflow {
97
97
  }>
98
98
  }
99
99
 
100
- export type WorkflowTemplate = 'blank' | 'request_analyzer' | 'documentation_updater' | 'execution_monitor' | 'usage_reporter' | 'custom'
100
+ export type WorkflowTemplate = 'blank' | 'request_analyzer' | 'knowledge_builder' | 'execution_monitor' | 'usage_reporter' | 'custom'
101
101
 
102
102
  export interface WorkflowViewerProps {
103
103
  /** The workflow definition to display */