@contractspec/example.learning-journey-ui-onboarding 1.57.0 → 1.58.0

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.
Files changed (87) hide show
  1. package/.turbo/turbo-build.log +58 -62
  2. package/.turbo/turbo-prebuild.log +1 -0
  3. package/CHANGELOG.md +19 -0
  4. package/dist/OnboardingMiniApp.d.ts +4 -14
  5. package/dist/OnboardingMiniApp.d.ts.map +1 -1
  6. package/dist/OnboardingMiniApp.js +991 -59
  7. package/dist/browser/OnboardingMiniApp.js +994 -0
  8. package/dist/browser/components/CodeSnippet.js +65 -0
  9. package/dist/browser/components/JourneyMap.js +59 -0
  10. package/dist/browser/components/StepChecklist.js +97 -0
  11. package/dist/browser/components/index.js +219 -0
  12. package/dist/browser/docs/index.js +22 -0
  13. package/dist/browser/docs/learning-journey-ui-onboarding.docblock.js +22 -0
  14. package/dist/browser/example.js +32 -0
  15. package/dist/browser/index.js +1116 -0
  16. package/dist/browser/views/Overview.js +240 -0
  17. package/dist/browser/views/Progress.js +275 -0
  18. package/dist/browser/views/Steps.js +192 -0
  19. package/dist/browser/views/Timeline.js +213 -0
  20. package/dist/browser/views/index.js +915 -0
  21. package/dist/components/CodeSnippet.d.ts +5 -13
  22. package/dist/components/CodeSnippet.d.ts.map +1 -1
  23. package/dist/components/CodeSnippet.js +63 -47
  24. package/dist/components/JourneyMap.d.ts +6 -14
  25. package/dist/components/JourneyMap.d.ts.map +1 -1
  26. package/dist/components/JourneyMap.js +57 -46
  27. package/dist/components/StepChecklist.d.ts +10 -22
  28. package/dist/components/StepChecklist.d.ts.map +1 -1
  29. package/dist/components/StepChecklist.js +95 -77
  30. package/dist/components/index.d.ts +4 -4
  31. package/dist/components/index.d.ts.map +1 -0
  32. package/dist/components/index.js +219 -4
  33. package/dist/docs/index.d.ts +2 -1
  34. package/dist/docs/index.d.ts.map +1 -0
  35. package/dist/docs/index.js +23 -1
  36. package/dist/docs/learning-journey-ui-onboarding.docblock.d.ts +2 -1
  37. package/dist/docs/learning-journey-ui-onboarding.docblock.d.ts.map +1 -0
  38. package/dist/docs/learning-journey-ui-onboarding.docblock.js +21 -18
  39. package/dist/example.d.ts +2 -6
  40. package/dist/example.d.ts.map +1 -1
  41. package/dist/example.js +31 -39
  42. package/dist/index.d.ts +6 -12
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +1117 -14
  45. package/dist/node/OnboardingMiniApp.js +994 -0
  46. package/dist/node/components/CodeSnippet.js +65 -0
  47. package/dist/node/components/JourneyMap.js +59 -0
  48. package/dist/node/components/StepChecklist.js +97 -0
  49. package/dist/node/components/index.js +219 -0
  50. package/dist/node/docs/index.js +22 -0
  51. package/dist/node/docs/learning-journey-ui-onboarding.docblock.js +22 -0
  52. package/dist/node/example.js +32 -0
  53. package/dist/node/index.js +1116 -0
  54. package/dist/node/views/Overview.js +240 -0
  55. package/dist/node/views/Progress.js +275 -0
  56. package/dist/node/views/Steps.js +192 -0
  57. package/dist/node/views/Timeline.js +213 -0
  58. package/dist/node/views/index.js +915 -0
  59. package/dist/views/Overview.d.ts +4 -12
  60. package/dist/views/Overview.d.ts.map +1 -1
  61. package/dist/views/Overview.js +238 -177
  62. package/dist/views/Progress.d.ts +3 -10
  63. package/dist/views/Progress.d.ts.map +1 -1
  64. package/dist/views/Progress.js +273 -158
  65. package/dist/views/Steps.d.ts +2 -11
  66. package/dist/views/Steps.d.ts.map +1 -1
  67. package/dist/views/Steps.js +188 -87
  68. package/dist/views/Timeline.d.ts +2 -10
  69. package/dist/views/Timeline.d.ts.map +1 -1
  70. package/dist/views/Timeline.js +211 -95
  71. package/dist/views/index.d.ts +5 -5
  72. package/dist/views/index.d.ts.map +1 -0
  73. package/dist/views/index.js +915 -5
  74. package/package.json +155 -39
  75. package/tsdown.config.js +1 -2
  76. package/.turbo/turbo-build$colon$bundle.log +0 -59
  77. package/dist/OnboardingMiniApp.js.map +0 -1
  78. package/dist/components/CodeSnippet.js.map +0 -1
  79. package/dist/components/JourneyMap.js.map +0 -1
  80. package/dist/components/StepChecklist.js.map +0 -1
  81. package/dist/docs/learning-journey-ui-onboarding.docblock.js.map +0 -1
  82. package/dist/example.js.map +0 -1
  83. package/dist/views/Overview.js.map +0 -1
  84. package/dist/views/Progress.js.map +0 -1
  85. package/dist/views/Steps.js.map +0 -1
  86. package/dist/views/Timeline.js.map +0 -1
  87. package/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,240 @@
1
+ // src/views/Overview.tsx
2
+ import { Button } from "@contractspec/lib.design-system";
3
+ import {
4
+ Card,
5
+ CardContent,
6
+ CardHeader,
7
+ CardTitle
8
+ } from "@contractspec/lib.ui-kit-web/ui/card";
9
+ import { Progress } from "@contractspec/lib.ui-kit-web/ui/progress";
10
+ import { XpBar } from "@contractspec/example.learning-journey-ui-shared";
11
+ import { jsxDEV } from "react/jsx-dev-runtime";
12
+ "use client";
13
+ function Overview({
14
+ track,
15
+ progress,
16
+ onStart
17
+ }) {
18
+ const totalSteps = track.steps.length;
19
+ const completedSteps = progress.completedStepIds.length;
20
+ const percentComplete = totalSteps > 0 ? completedSteps / totalSteps * 100 : 0;
21
+ const isComplete = completedSteps === totalSteps;
22
+ const remainingSteps = totalSteps - completedSteps;
23
+ const estimatedMinutes = remainingSteps * 5;
24
+ const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0) + (track.completionRewards?.xpBonus ?? 0);
25
+ return /* @__PURE__ */ jsxDEV("div", {
26
+ className: "space-y-6",
27
+ children: [
28
+ /* @__PURE__ */ jsxDEV(Card, {
29
+ className: "overflow-hidden bg-gradient-to-r from-blue-500/10 via-violet-500/10 to-purple-500/10",
30
+ children: /* @__PURE__ */ jsxDEV(CardContent, {
31
+ className: "p-8",
32
+ children: /* @__PURE__ */ jsxDEV("div", {
33
+ className: "flex flex-col items-center gap-6 text-center md:flex-row md:text-left",
34
+ children: [
35
+ /* @__PURE__ */ jsxDEV("div", {
36
+ className: "flex h-20 w-20 items-center justify-center rounded-2xl bg-gradient-to-br from-blue-500 to-violet-600 text-4xl shadow-lg",
37
+ children: isComplete ? "\uD83C\uDF89" : "\uD83D\uDE80"
38
+ }, undefined, false, undefined, this),
39
+ /* @__PURE__ */ jsxDEV("div", {
40
+ className: "flex-1",
41
+ children: [
42
+ /* @__PURE__ */ jsxDEV("h1", {
43
+ className: "text-2xl font-bold",
44
+ children: track.name
45
+ }, undefined, false, undefined, this),
46
+ /* @__PURE__ */ jsxDEV("p", {
47
+ className: "text-muted-foreground mt-1 max-w-2xl",
48
+ children: track.description
49
+ }, undefined, false, undefined, this),
50
+ !isComplete && /* @__PURE__ */ jsxDEV("p", {
51
+ className: "text-muted-foreground mt-3 text-sm",
52
+ children: [
53
+ "⏱️ Estimated time:",
54
+ " ",
55
+ estimatedMinutes > 0 ? `~${estimatedMinutes} minutes` : "Less than a minute"
56
+ ]
57
+ }, undefined, true, undefined, this)
58
+ ]
59
+ }, undefined, true, undefined, this),
60
+ !isComplete && /* @__PURE__ */ jsxDEV(Button, {
61
+ size: "lg",
62
+ onClick: onStart,
63
+ children: completedSteps > 0 ? "Continue" : "Get Started"
64
+ }, undefined, false, undefined, this)
65
+ ]
66
+ }, undefined, true, undefined, this)
67
+ }, undefined, false, undefined, this)
68
+ }, undefined, false, undefined, this),
69
+ /* @__PURE__ */ jsxDEV("div", {
70
+ className: "grid gap-4 md:grid-cols-3",
71
+ children: [
72
+ /* @__PURE__ */ jsxDEV(Card, {
73
+ children: [
74
+ /* @__PURE__ */ jsxDEV(CardHeader, {
75
+ className: "pb-2",
76
+ children: /* @__PURE__ */ jsxDEV(CardTitle, {
77
+ className: "text-muted-foreground text-sm font-medium",
78
+ children: "Progress"
79
+ }, undefined, false, undefined, this)
80
+ }, undefined, false, undefined, this),
81
+ /* @__PURE__ */ jsxDEV(CardContent, {
82
+ children: [
83
+ /* @__PURE__ */ jsxDEV("div", {
84
+ className: "text-3xl font-bold",
85
+ children: [
86
+ Math.round(percentComplete),
87
+ "%"
88
+ ]
89
+ }, undefined, true, undefined, this),
90
+ /* @__PURE__ */ jsxDEV(Progress, {
91
+ value: percentComplete,
92
+ className: "mt-2 h-2"
93
+ }, undefined, false, undefined, this),
94
+ /* @__PURE__ */ jsxDEV("p", {
95
+ className: "text-muted-foreground mt-2 text-sm",
96
+ children: [
97
+ completedSteps,
98
+ " of ",
99
+ totalSteps,
100
+ " steps completed"
101
+ ]
102
+ }, undefined, true, undefined, this)
103
+ ]
104
+ }, undefined, true, undefined, this)
105
+ ]
106
+ }, undefined, true, undefined, this),
107
+ /* @__PURE__ */ jsxDEV(Card, {
108
+ children: [
109
+ /* @__PURE__ */ jsxDEV(CardHeader, {
110
+ className: "pb-2",
111
+ children: /* @__PURE__ */ jsxDEV(CardTitle, {
112
+ className: "text-muted-foreground text-sm font-medium",
113
+ children: "XP Earned"
114
+ }, undefined, false, undefined, this)
115
+ }, undefined, false, undefined, this),
116
+ /* @__PURE__ */ jsxDEV(CardContent, {
117
+ children: [
118
+ /* @__PURE__ */ jsxDEV("div", {
119
+ className: "text-3xl font-bold text-blue-500",
120
+ children: progress.xpEarned
121
+ }, undefined, false, undefined, this),
122
+ /* @__PURE__ */ jsxDEV(XpBar, {
123
+ current: progress.xpEarned,
124
+ max: totalXp,
125
+ showLabel: false,
126
+ size: "sm"
127
+ }, undefined, false, undefined, this)
128
+ ]
129
+ }, undefined, true, undefined, this)
130
+ ]
131
+ }, undefined, true, undefined, this),
132
+ /* @__PURE__ */ jsxDEV(Card, {
133
+ children: [
134
+ /* @__PURE__ */ jsxDEV(CardHeader, {
135
+ className: "pb-2",
136
+ children: /* @__PURE__ */ jsxDEV(CardTitle, {
137
+ className: "text-muted-foreground text-sm font-medium",
138
+ children: "Time Remaining"
139
+ }, undefined, false, undefined, this)
140
+ }, undefined, false, undefined, this),
141
+ /* @__PURE__ */ jsxDEV(CardContent, {
142
+ children: [
143
+ /* @__PURE__ */ jsxDEV("div", {
144
+ className: "text-3xl font-bold",
145
+ children: isComplete ? "✓" : `~${estimatedMinutes}m`
146
+ }, undefined, false, undefined, this),
147
+ /* @__PURE__ */ jsxDEV("p", {
148
+ className: "text-muted-foreground mt-2 text-sm",
149
+ children: isComplete ? "All done!" : `${remainingSteps} steps to go`
150
+ }, undefined, false, undefined, this)
151
+ ]
152
+ }, undefined, true, undefined, this)
153
+ ]
154
+ }, undefined, true, undefined, this)
155
+ ]
156
+ }, undefined, true, undefined, this),
157
+ /* @__PURE__ */ jsxDEV(Card, {
158
+ children: [
159
+ /* @__PURE__ */ jsxDEV(CardHeader, {
160
+ children: /* @__PURE__ */ jsxDEV(CardTitle, {
161
+ className: "flex items-center gap-2",
162
+ children: [
163
+ /* @__PURE__ */ jsxDEV("span", {
164
+ children: "\uD83D\uDCCB"
165
+ }, undefined, false, undefined, this),
166
+ /* @__PURE__ */ jsxDEV("span", {
167
+ children: "Your Journey"
168
+ }, undefined, false, undefined, this)
169
+ ]
170
+ }, undefined, true, undefined, this)
171
+ }, undefined, false, undefined, this),
172
+ /* @__PURE__ */ jsxDEV(CardContent, {
173
+ children: /* @__PURE__ */ jsxDEV("div", {
174
+ className: "space-y-3",
175
+ children: track.steps.map((step, index) => {
176
+ const isStepCompleted = progress.completedStepIds.includes(step.id);
177
+ const isCurrent = !isStepCompleted && track.steps.slice(0, index).every((s) => progress.completedStepIds.includes(s.id));
178
+ return /* @__PURE__ */ jsxDEV("div", {
179
+ className: "flex items-center gap-4 rounded-lg border p-3",
180
+ children: [
181
+ /* @__PURE__ */ jsxDEV("div", {
182
+ className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-sm font-semibold ${isStepCompleted ? "bg-green-500 text-white" : isCurrent ? "bg-blue-500 text-white" : "bg-muted text-muted-foreground"}`,
183
+ children: isStepCompleted ? "✓" : index + 1
184
+ }, undefined, false, undefined, this),
185
+ /* @__PURE__ */ jsxDEV("div", {
186
+ className: "min-w-0 flex-1",
187
+ children: /* @__PURE__ */ jsxDEV("p", {
188
+ className: `font-medium ${isStepCompleted ? "text-green-500" : isCurrent ? "text-foreground" : "text-muted-foreground"}`,
189
+ children: step.title
190
+ }, undefined, false, undefined, this)
191
+ }, undefined, false, undefined, this),
192
+ step.xpReward && /* @__PURE__ */ jsxDEV("span", {
193
+ className: "text-muted-foreground text-sm",
194
+ children: [
195
+ "+",
196
+ step.xpReward,
197
+ " XP"
198
+ ]
199
+ }, undefined, true, undefined, this)
200
+ ]
201
+ }, step.id, true, undefined, this);
202
+ })
203
+ }, undefined, false, undefined, this)
204
+ }, undefined, false, undefined, this)
205
+ ]
206
+ }, undefined, true, undefined, this),
207
+ isComplete && /* @__PURE__ */ jsxDEV(Card, {
208
+ className: "border-green-500/50 bg-green-500/5",
209
+ children: /* @__PURE__ */ jsxDEV(CardContent, {
210
+ className: "flex items-center gap-4 p-6",
211
+ children: [
212
+ /* @__PURE__ */ jsxDEV("div", {
213
+ className: "text-4xl",
214
+ children: "\uD83C\uDF89"
215
+ }, undefined, false, undefined, this),
216
+ /* @__PURE__ */ jsxDEV("div", {
217
+ children: [
218
+ /* @__PURE__ */ jsxDEV("h3", {
219
+ className: "text-lg font-semibold text-green-500",
220
+ children: "Onboarding Complete!"
221
+ }, undefined, false, undefined, this),
222
+ /* @__PURE__ */ jsxDEV("p", {
223
+ className: "text-muted-foreground",
224
+ children: [
225
+ "You've completed all ",
226
+ totalSteps,
227
+ " steps. Welcome aboard!"
228
+ ]
229
+ }, undefined, true, undefined, this)
230
+ ]
231
+ }, undefined, true, undefined, this)
232
+ ]
233
+ }, undefined, true, undefined, this)
234
+ }, undefined, false, undefined, this)
235
+ ]
236
+ }, undefined, true, undefined, this);
237
+ }
238
+ export {
239
+ Overview
240
+ };
@@ -0,0 +1,275 @@
1
+ // src/views/Progress.tsx
2
+ import {
3
+ Card,
4
+ CardContent,
5
+ CardHeader,
6
+ CardTitle
7
+ } from "@contractspec/lib.ui-kit-web/ui/card";
8
+ import { Progress } from "@contractspec/lib.ui-kit-web/ui/progress";
9
+ import {
10
+ XpBar,
11
+ BadgeDisplay
12
+ } from "@contractspec/example.learning-journey-ui-shared";
13
+ import { jsxDEV } from "react/jsx-dev-runtime";
14
+ "use client";
15
+ function ProgressView({ track, progress }) {
16
+ const totalSteps = track.steps.length;
17
+ const completedSteps = progress.completedStepIds.length;
18
+ const percentComplete = totalSteps > 0 ? completedSteps / totalSteps * 100 : 0;
19
+ const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0) + (track.completionRewards?.xpBonus ?? 0);
20
+ const remainingSteps = totalSteps - completedSteps;
21
+ const estimatedMinutes = remainingSteps * 5;
22
+ return /* @__PURE__ */ jsxDEV("div", {
23
+ className: "space-y-6",
24
+ children: [
25
+ /* @__PURE__ */ jsxDEV(Card, {
26
+ children: [
27
+ /* @__PURE__ */ jsxDEV(CardHeader, {
28
+ children: /* @__PURE__ */ jsxDEV(CardTitle, {
29
+ className: "flex items-center gap-2",
30
+ children: [
31
+ /* @__PURE__ */ jsxDEV("span", {
32
+ children: "\uD83D\uDCC8"
33
+ }, undefined, false, undefined, this),
34
+ /* @__PURE__ */ jsxDEV("span", {
35
+ children: "Your Progress"
36
+ }, undefined, false, undefined, this)
37
+ ]
38
+ }, undefined, true, undefined, this)
39
+ }, undefined, false, undefined, this),
40
+ /* @__PURE__ */ jsxDEV(CardContent, {
41
+ className: "space-y-6",
42
+ children: [
43
+ /* @__PURE__ */ jsxDEV("div", {
44
+ className: "flex items-center justify-center",
45
+ children: /* @__PURE__ */ jsxDEV("div", {
46
+ className: "relative flex h-40 w-40 items-center justify-center",
47
+ children: [
48
+ /* @__PURE__ */ jsxDEV("svg", {
49
+ className: "absolute h-full w-full -rotate-90",
50
+ viewBox: "0 0 100 100",
51
+ children: [
52
+ /* @__PURE__ */ jsxDEV("circle", {
53
+ cx: "50",
54
+ cy: "50",
55
+ r: "45",
56
+ fill: "none",
57
+ strokeWidth: "8",
58
+ className: "stroke-muted"
59
+ }, undefined, false, undefined, this),
60
+ /* @__PURE__ */ jsxDEV("circle", {
61
+ cx: "50",
62
+ cy: "50",
63
+ r: "45",
64
+ fill: "none",
65
+ strokeWidth: "8",
66
+ strokeLinecap: "round",
67
+ strokeDasharray: `${percentComplete * 2.83} 283`,
68
+ className: "stroke-blue-500 transition-all duration-500"
69
+ }, undefined, false, undefined, this)
70
+ ]
71
+ }, undefined, true, undefined, this),
72
+ /* @__PURE__ */ jsxDEV("div", {
73
+ className: "text-center",
74
+ children: [
75
+ /* @__PURE__ */ jsxDEV("div", {
76
+ className: "text-3xl font-bold",
77
+ children: [
78
+ Math.round(percentComplete),
79
+ "%"
80
+ ]
81
+ }, undefined, true, undefined, this),
82
+ /* @__PURE__ */ jsxDEV("div", {
83
+ className: "text-muted-foreground text-sm",
84
+ children: "Complete"
85
+ }, undefined, false, undefined, this)
86
+ ]
87
+ }, undefined, true, undefined, this)
88
+ ]
89
+ }, undefined, true, undefined, this)
90
+ }, undefined, false, undefined, this),
91
+ /* @__PURE__ */ jsxDEV("div", {
92
+ className: "grid grid-cols-3 gap-4 text-center",
93
+ children: [
94
+ /* @__PURE__ */ jsxDEV("div", {
95
+ children: [
96
+ /* @__PURE__ */ jsxDEV("div", {
97
+ className: "text-2xl font-bold text-green-500",
98
+ children: completedSteps
99
+ }, undefined, false, undefined, this),
100
+ /* @__PURE__ */ jsxDEV("div", {
101
+ className: "text-muted-foreground text-sm",
102
+ children: "Completed"
103
+ }, undefined, false, undefined, this)
104
+ ]
105
+ }, undefined, true, undefined, this),
106
+ /* @__PURE__ */ jsxDEV("div", {
107
+ children: [
108
+ /* @__PURE__ */ jsxDEV("div", {
109
+ className: "text-2xl font-bold text-orange-500",
110
+ children: remainingSteps
111
+ }, undefined, false, undefined, this),
112
+ /* @__PURE__ */ jsxDEV("div", {
113
+ className: "text-muted-foreground text-sm",
114
+ children: "Remaining"
115
+ }, undefined, false, undefined, this)
116
+ ]
117
+ }, undefined, true, undefined, this),
118
+ /* @__PURE__ */ jsxDEV("div", {
119
+ children: [
120
+ /* @__PURE__ */ jsxDEV("div", {
121
+ className: "text-2xl font-bold",
122
+ children: [
123
+ estimatedMinutes,
124
+ "m"
125
+ ]
126
+ }, undefined, true, undefined, this),
127
+ /* @__PURE__ */ jsxDEV("div", {
128
+ className: "text-muted-foreground text-sm",
129
+ children: "Est. Time"
130
+ }, undefined, false, undefined, this)
131
+ ]
132
+ }, undefined, true, undefined, this)
133
+ ]
134
+ }, undefined, true, undefined, this)
135
+ ]
136
+ }, undefined, true, undefined, this)
137
+ ]
138
+ }, undefined, true, undefined, this),
139
+ /* @__PURE__ */ jsxDEV(Card, {
140
+ children: [
141
+ /* @__PURE__ */ jsxDEV(CardHeader, {
142
+ children: /* @__PURE__ */ jsxDEV(CardTitle, {
143
+ className: "flex items-center gap-2",
144
+ children: [
145
+ /* @__PURE__ */ jsxDEV("span", {
146
+ children: "⚡"
147
+ }, undefined, false, undefined, this),
148
+ /* @__PURE__ */ jsxDEV("span", {
149
+ children: "Experience Points"
150
+ }, undefined, false, undefined, this)
151
+ ]
152
+ }, undefined, true, undefined, this)
153
+ }, undefined, false, undefined, this),
154
+ /* @__PURE__ */ jsxDEV(CardContent, {
155
+ className: "space-y-4",
156
+ children: [
157
+ /* @__PURE__ */ jsxDEV("div", {
158
+ className: "flex items-baseline gap-2",
159
+ children: [
160
+ /* @__PURE__ */ jsxDEV("span", {
161
+ className: "text-3xl font-bold text-blue-500",
162
+ children: progress.xpEarned
163
+ }, undefined, false, undefined, this),
164
+ /* @__PURE__ */ jsxDEV("span", {
165
+ className: "text-muted-foreground",
166
+ children: [
167
+ "/ ",
168
+ totalXp,
169
+ " XP"
170
+ ]
171
+ }, undefined, true, undefined, this)
172
+ ]
173
+ }, undefined, true, undefined, this),
174
+ /* @__PURE__ */ jsxDEV(XpBar, {
175
+ current: progress.xpEarned,
176
+ max: totalXp,
177
+ showLabel: false,
178
+ size: "lg"
179
+ }, undefined, false, undefined, this)
180
+ ]
181
+ }, undefined, true, undefined, this)
182
+ ]
183
+ }, undefined, true, undefined, this),
184
+ /* @__PURE__ */ jsxDEV(Card, {
185
+ children: [
186
+ /* @__PURE__ */ jsxDEV(CardHeader, {
187
+ children: /* @__PURE__ */ jsxDEV(CardTitle, {
188
+ className: "flex items-center gap-2",
189
+ children: [
190
+ /* @__PURE__ */ jsxDEV("span", {
191
+ children: "\uD83C\uDFC5"
192
+ }, undefined, false, undefined, this),
193
+ /* @__PURE__ */ jsxDEV("span", {
194
+ children: "Achievements"
195
+ }, undefined, false, undefined, this)
196
+ ]
197
+ }, undefined, true, undefined, this)
198
+ }, undefined, false, undefined, this),
199
+ /* @__PURE__ */ jsxDEV(CardContent, {
200
+ children: [
201
+ /* @__PURE__ */ jsxDEV(BadgeDisplay, {
202
+ badges: progress.badges,
203
+ size: "lg"
204
+ }, undefined, false, undefined, this),
205
+ progress.badges.length === 0 && track.completionRewards?.badgeKey && /* @__PURE__ */ jsxDEV("p", {
206
+ className: "text-muted-foreground text-sm",
207
+ children: [
208
+ 'Complete all steps to earn the "',
209
+ track.completionRewards.badgeKey,
210
+ '" badge!'
211
+ ]
212
+ }, undefined, true, undefined, this)
213
+ ]
214
+ }, undefined, true, undefined, this)
215
+ ]
216
+ }, undefined, true, undefined, this),
217
+ /* @__PURE__ */ jsxDEV(Card, {
218
+ children: [
219
+ /* @__PURE__ */ jsxDEV(CardHeader, {
220
+ children: /* @__PURE__ */ jsxDEV(CardTitle, {
221
+ className: "flex items-center gap-2",
222
+ children: [
223
+ /* @__PURE__ */ jsxDEV("span", {
224
+ children: "\uD83D\uDCCB"
225
+ }, undefined, false, undefined, this),
226
+ /* @__PURE__ */ jsxDEV("span", {
227
+ children: "Step Details"
228
+ }, undefined, false, undefined, this)
229
+ ]
230
+ }, undefined, true, undefined, this)
231
+ }, undefined, false, undefined, this),
232
+ /* @__PURE__ */ jsxDEV(CardContent, {
233
+ children: /* @__PURE__ */ jsxDEV("div", {
234
+ className: "space-y-3",
235
+ children: track.steps.map((step, index) => {
236
+ const isCompleted = progress.completedStepIds.includes(step.id);
237
+ const stepProgress = isCompleted ? 100 : 0;
238
+ return /* @__PURE__ */ jsxDEV("div", {
239
+ className: "space-y-1",
240
+ children: [
241
+ /* @__PURE__ */ jsxDEV("div", {
242
+ className: "flex items-center justify-between text-sm",
243
+ children: [
244
+ /* @__PURE__ */ jsxDEV("span", {
245
+ className: isCompleted ? "text-green-500" : "text-foreground",
246
+ children: [
247
+ index + 1,
248
+ ". ",
249
+ step.title
250
+ ]
251
+ }, undefined, true, undefined, this),
252
+ /* @__PURE__ */ jsxDEV("span", {
253
+ className: isCompleted ? "text-green-500" : "text-muted-foreground",
254
+ children: isCompleted ? "✓" : "Pending"
255
+ }, undefined, false, undefined, this)
256
+ ]
257
+ }, undefined, true, undefined, this),
258
+ /* @__PURE__ */ jsxDEV(Progress, {
259
+ value: stepProgress,
260
+ className: "h-1"
261
+ }, undefined, false, undefined, this)
262
+ ]
263
+ }, step.id, true, undefined, this);
264
+ })
265
+ }, undefined, false, undefined, this)
266
+ }, undefined, false, undefined, this)
267
+ ]
268
+ }, undefined, true, undefined, this)
269
+ ]
270
+ }, undefined, true, undefined, this);
271
+ }
272
+ export {
273
+ ProgressView,
274
+ ProgressView as Progress
275
+ };