@contractspec/example.learning-journey-ui-coaching 1.57.0 → 1.59.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 -59
  2. package/.turbo/turbo-prebuild.log +1 -0
  3. package/CHANGELOG.md +35 -0
  4. package/dist/CoachingMiniApp.d.ts +4 -14
  5. package/dist/CoachingMiniApp.d.ts.map +1 -1
  6. package/dist/CoachingMiniApp.js +1056 -59
  7. package/dist/browser/CoachingMiniApp.js +1059 -0
  8. package/dist/browser/components/EngagementMeter.js +143 -0
  9. package/dist/browser/components/TipCard.js +89 -0
  10. package/dist/browser/components/TipFeed.js +90 -0
  11. package/dist/browser/components/index.js +320 -0
  12. package/dist/browser/docs/index.js +22 -0
  13. package/dist/browser/docs/learning-journey-ui-coaching.docblock.js +22 -0
  14. package/dist/browser/example.js +32 -0
  15. package/dist/browser/index.js +1118 -0
  16. package/dist/browser/views/Overview.js +303 -0
  17. package/dist/browser/views/Progress.js +344 -0
  18. package/dist/browser/views/Steps.js +159 -0
  19. package/dist/browser/views/Timeline.js +266 -0
  20. package/dist/browser/views/index.js +980 -0
  21. package/dist/components/EngagementMeter.d.ts +6 -15
  22. package/dist/components/EngagementMeter.d.ts.map +1 -1
  23. package/dist/components/EngagementMeter.js +143 -107
  24. package/dist/components/TipCard.d.ts +8 -18
  25. package/dist/components/TipCard.d.ts.map +1 -1
  26. package/dist/components/TipCard.js +86 -72
  27. package/dist/components/TipFeed.d.ts +7 -13
  28. package/dist/components/TipFeed.d.ts.map +1 -1
  29. package/dist/components/TipFeed.js +87 -62
  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 +320 -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-coaching.docblock.d.ts +2 -1
  37. package/dist/docs/learning-journey-ui-coaching.docblock.d.ts.map +1 -0
  38. package/dist/docs/learning-journey-ui-coaching.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 +1119 -14
  45. package/dist/node/CoachingMiniApp.js +1059 -0
  46. package/dist/node/components/EngagementMeter.js +143 -0
  47. package/dist/node/components/TipCard.js +89 -0
  48. package/dist/node/components/TipFeed.js +90 -0
  49. package/dist/node/components/index.js +320 -0
  50. package/dist/node/docs/index.js +22 -0
  51. package/dist/node/docs/learning-journey-ui-coaching.docblock.js +22 -0
  52. package/dist/node/example.js +32 -0
  53. package/dist/node/index.js +1118 -0
  54. package/dist/node/views/Overview.js +303 -0
  55. package/dist/node/views/Progress.js +344 -0
  56. package/dist/node/views/Steps.js +159 -0
  57. package/dist/node/views/Timeline.js +266 -0
  58. package/dist/node/views/index.js +980 -0
  59. package/dist/views/Overview.d.ts +4 -13
  60. package/dist/views/Overview.d.ts.map +1 -1
  61. package/dist/views/Overview.js +301 -148
  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 +342 -112
  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 +157 -66
  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 +264 -110
  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 +980 -5
  74. package/package.json +154 -38
  75. package/tsdown.config.js +1 -2
  76. package/.turbo/turbo-build$colon$bundle.log +0 -62
  77. package/dist/CoachingMiniApp.js.map +0 -1
  78. package/dist/components/EngagementMeter.js.map +0 -1
  79. package/dist/components/TipCard.js.map +0 -1
  80. package/dist/components/TipFeed.js.map +0 -1
  81. package/dist/docs/learning-journey-ui-coaching.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
@@ -1,16 +1,7 @@
1
- import { LearningViewProps } from "@contractspec/example.learning-journey-ui-shared";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
3
-
4
- //#region src/views/Overview.d.ts
1
+ import type { LearningViewProps } from '@contractspec/example.learning-journey-ui-shared';
5
2
  interface CoachingOverviewProps extends LearningViewProps {
6
- onStart?: () => void;
3
+ onStart?: () => void;
7
4
  }
8
- declare function Overview({
9
- track,
10
- progress,
11
- onStepComplete,
12
- onStart
13
- }: CoachingOverviewProps): react_jsx_runtime0.JSX.Element;
14
- //#endregion
15
- export { Overview };
5
+ export declare function Overview({ track, progress, onStepComplete, onStart, }: CoachingOverviewProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
16
7
  //# sourceMappingURL=Overview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Overview.d.ts","names":[],"sources":["../../src/views/Overview.tsx"],"mappings":";;;;UAgBU,qBAAA,SAA8B,iBAAA;EACtC,OAAA;AAAA;AAAA,iBAGc,QAAA,CAAA;EACd,KAAA;EACA,QAAA;EACA,cAAA;EACA;AAAA,GACC,qBAAA,GAAqB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"Overview.d.ts","sourceRoot":"","sources":["../../src/views/Overview.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAE1F,UAAU,qBAAsB,SAAQ,iBAAiB;IACvD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,QAAQ,EACR,cAAc,EACd,OAAO,GACR,EAAE,qBAAqB,2CAmIvB"}
@@ -1,151 +1,304 @@
1
- 'use client';
2
-
3
- import { TipCard } from "../components/TipCard.js";
4
- import { Card, CardContent, CardHeader, CardTitle } from "@contractspec/lib.ui-kit-web/ui/card";
5
- import { StreakCounter, XpBar } from "@contractspec/example.learning-journey-ui-shared";
1
+ // @bun
2
+ // src/components/TipCard.tsx
6
3
  import { Button } from "@contractspec/lib.design-system";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
-
9
- //#region src/views/Overview.tsx
10
- function Overview({ track, progress, onStepComplete, onStart }) {
11
- const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0);
12
- const completedSteps = progress.completedStepIds.length;
13
- const totalSteps = track.steps.length;
14
- const pendingSteps = totalSteps - completedSteps;
15
- const activeTips = track.steps.filter((s) => !progress.completedStepIds.includes(s.id)).slice(0, 3);
16
- return /* @__PURE__ */ jsxs("div", {
17
- className: "space-y-6",
18
- children: [
19
- /* @__PURE__ */ jsx(Card, {
20
- className: "overflow-hidden bg-gradient-to-br from-amber-500/10 via-orange-500/10 to-red-500/10",
21
- children: /* @__PURE__ */ jsx(CardContent, {
22
- className: "p-6",
23
- children: /* @__PURE__ */ jsxs("div", {
24
- className: "flex flex-col items-center gap-4 text-center md:flex-row md:text-left",
25
- children: [
26
- /* @__PURE__ */ jsx("div", {
27
- className: "flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br from-amber-500 to-orange-600 text-3xl shadow-lg",
28
- children: "💡"
29
- }),
30
- /* @__PURE__ */ jsxs("div", {
31
- className: "flex-1",
32
- children: [/* @__PURE__ */ jsx("h1", {
33
- className: "text-2xl font-bold",
34
- children: track.name
35
- }), /* @__PURE__ */ jsx("p", {
36
- className: "text-muted-foreground mt-1",
37
- children: track.description
38
- })]
39
- }),
40
- /* @__PURE__ */ jsx("div", {
41
- className: "flex items-center gap-4",
42
- children: /* @__PURE__ */ jsx(StreakCounter, {
43
- days: progress.streakDays,
44
- size: "lg"
45
- })
46
- })
47
- ]
48
- })
49
- })
50
- }),
51
- /* @__PURE__ */ jsxs("div", {
52
- className: "grid gap-4 md:grid-cols-3",
53
- children: [
54
- /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
55
- className: "pb-2",
56
- children: /* @__PURE__ */ jsx(CardTitle, {
57
- className: "text-muted-foreground text-sm font-medium",
58
- children: "Active Tips"
59
- })
60
- }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx("div", {
61
- className: "text-3xl font-bold text-amber-500",
62
- children: pendingSteps
63
- }), /* @__PURE__ */ jsx("p", {
64
- className: "text-muted-foreground text-sm",
65
- children: "tips for you today"
66
- })] })] }),
67
- /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
68
- className: "pb-2",
69
- children: /* @__PURE__ */ jsx(CardTitle, {
70
- className: "text-muted-foreground text-sm font-medium",
71
- children: "Tips Actioned"
72
- })
73
- }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx("div", {
74
- className: "text-3xl font-bold text-green-500",
75
- children: completedSteps
76
- }), /* @__PURE__ */ jsxs("p", {
77
- className: "text-muted-foreground text-sm",
78
- children: [
79
- "out of ",
80
- totalSteps,
81
- " total"
82
- ]
83
- })] })] }),
84
- /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
85
- className: "pb-2",
86
- children: /* @__PURE__ */ jsx(CardTitle, {
87
- className: "text-muted-foreground text-sm font-medium",
88
- children: "XP Earned"
89
- })
90
- }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx("div", {
91
- className: "text-3xl font-bold text-orange-500",
92
- children: progress.xpEarned
93
- }), /* @__PURE__ */ jsx(XpBar, {
94
- current: progress.xpEarned,
95
- max: totalXp,
96
- showLabel: false,
97
- size: "sm"
98
- })] })] })
99
- ]
100
- }),
101
- activeTips.length > 0 && /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsxs(CardHeader, {
102
- className: "flex flex-row items-center justify-between",
103
- children: [/* @__PURE__ */ jsxs(CardTitle, {
104
- className: "flex items-center gap-2",
105
- children: [/* @__PURE__ */ jsx("span", { children: "💡" }), /* @__PURE__ */ jsx("span", { children: "Tips for You" })]
106
- }), activeTips.length < pendingSteps && /* @__PURE__ */ jsxs(Button, {
107
- variant: "outline",
108
- size: "sm",
109
- onClick: onStart,
110
- children: [
111
- "View All (",
112
- pendingSteps,
113
- ")"
114
- ]
115
- })]
116
- }), /* @__PURE__ */ jsx(CardContent, {
117
- className: "space-y-3",
118
- children: activeTips.map((step) => /* @__PURE__ */ jsx(TipCard, {
119
- step,
120
- isCompleted: false,
121
- isCurrent: step.id === activeTips[0]?.id,
122
- onComplete: () => onStepComplete?.(step.id)
123
- }, step.id))
124
- })] }),
125
- pendingSteps === 0 && /* @__PURE__ */ jsx(Card, {
126
- className: "border-green-500/50 bg-green-500/5",
127
- children: /* @__PURE__ */ jsxs(CardContent, {
128
- className: "flex items-center gap-4 p-6",
129
- children: [/* @__PURE__ */ jsx("div", {
130
- className: "text-4xl",
131
- children: "🎉"
132
- }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
133
- className: "text-lg font-semibold text-green-500",
134
- children: "All Tips Actioned!"
135
- }), /* @__PURE__ */ jsxs("p", {
136
- className: "text-muted-foreground",
137
- children: [
138
- "Great job! You've addressed all ",
139
- totalSteps,
140
- " coaching tips."
141
- ]
142
- })] })]
143
- })
144
- })
145
- ]
146
- });
4
+ import { Card, CardContent } from "@contractspec/lib.ui-kit-web/ui/card";
5
+ import { cn } from "@contractspec/lib.ui-kit-web/ui/utils";
6
+ import { jsxDEV } from "react/jsx-dev-runtime";
7
+ "use client";
8
+ var TIP_ICONS = {
9
+ cash_buffer_too_high: "\uD83D\uDCB0",
10
+ no_savings_goal: "\uD83C\uDFAF",
11
+ irregular_savings: "\uD83D\uDCC5",
12
+ noise_late_evening: "\uD83D\uDD07",
13
+ guest_frequency_high: "\uD83D\uDC65",
14
+ shared_space_conflicts: "\uD83C\uDFE0",
15
+ default: "\uD83D\uDCA1"
16
+ };
17
+ function TipCard({
18
+ step,
19
+ isCompleted,
20
+ isCurrent,
21
+ onComplete,
22
+ onDismiss
23
+ }) {
24
+ const tipId = step.metadata?.tipId ?? "default";
25
+ const icon = TIP_ICONS[tipId] ?? TIP_ICONS.default;
26
+ return /* @__PURE__ */ jsxDEV(Card, {
27
+ className: cn("transition-all", isCompleted && "opacity-60", isCurrent && "ring-2 ring-amber-500"),
28
+ children: /* @__PURE__ */ jsxDEV(CardContent, {
29
+ className: "p-4",
30
+ children: /* @__PURE__ */ jsxDEV("div", {
31
+ className: "flex gap-4",
32
+ children: [
33
+ /* @__PURE__ */ jsxDEV("div", {
34
+ className: cn("flex h-12 w-12 shrink-0 items-center justify-center rounded-xl text-2xl", isCompleted ? "bg-green-500/10" : isCurrent ? "bg-amber-500/10" : "bg-muted"),
35
+ children: isCompleted ? "\u2713" : icon
36
+ }, undefined, false, undefined, this),
37
+ /* @__PURE__ */ jsxDEV("div", {
38
+ className: "min-w-0 flex-1",
39
+ children: [
40
+ /* @__PURE__ */ jsxDEV("div", {
41
+ className: "flex items-start justify-between gap-2",
42
+ children: [
43
+ /* @__PURE__ */ jsxDEV("h4", {
44
+ className: "font-semibold",
45
+ children: step.title
46
+ }, undefined, false, undefined, this),
47
+ step.xpReward && /* @__PURE__ */ jsxDEV("span", {
48
+ className: cn("shrink-0 rounded-full px-2 py-0.5 text-xs font-semibold", isCompleted ? "bg-green-500/10 text-green-500" : "bg-amber-500/10 text-amber-500"),
49
+ children: [
50
+ "+",
51
+ step.xpReward,
52
+ " XP"
53
+ ]
54
+ }, undefined, true, undefined, this)
55
+ ]
56
+ }, undefined, true, undefined, this),
57
+ /* @__PURE__ */ jsxDEV("p", {
58
+ className: "text-muted-foreground mt-1 text-sm",
59
+ children: step.description
60
+ }, undefined, false, undefined, this),
61
+ !isCompleted && /* @__PURE__ */ jsxDEV("div", {
62
+ className: "mt-3 flex flex-wrap gap-2",
63
+ children: [
64
+ /* @__PURE__ */ jsxDEV(Button, {
65
+ size: "sm",
66
+ onClick: onComplete,
67
+ children: "Take Action"
68
+ }, undefined, false, undefined, this),
69
+ /* @__PURE__ */ jsxDEV(Button, {
70
+ variant: "outline",
71
+ size: "sm",
72
+ onClick: onDismiss,
73
+ children: "Dismiss"
74
+ }, undefined, false, undefined, this)
75
+ ]
76
+ }, undefined, true, undefined, this),
77
+ isCompleted && /* @__PURE__ */ jsxDEV("p", {
78
+ className: "mt-2 text-sm text-green-500",
79
+ children: "\u2713 Tip acknowledged"
80
+ }, undefined, false, undefined, this)
81
+ ]
82
+ }, undefined, true, undefined, this)
83
+ ]
84
+ }, undefined, true, undefined, this)
85
+ }, undefined, false, undefined, this)
86
+ }, undefined, false, undefined, this);
147
87
  }
148
88
 
149
- //#endregion
150
- export { Overview };
151
- //# sourceMappingURL=Overview.js.map
89
+ // src/views/Overview.tsx
90
+ import { Button as Button2 } from "@contractspec/lib.design-system";
91
+ import {
92
+ Card as Card2,
93
+ CardContent as CardContent2,
94
+ CardHeader,
95
+ CardTitle
96
+ } from "@contractspec/lib.ui-kit-web/ui/card";
97
+ import {
98
+ XpBar,
99
+ StreakCounter
100
+ } from "@contractspec/example.learning-journey-ui-shared";
101
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
102
+ "use client";
103
+ function Overview({
104
+ track,
105
+ progress,
106
+ onStepComplete,
107
+ onStart
108
+ }) {
109
+ const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0);
110
+ const completedSteps = progress.completedStepIds.length;
111
+ const totalSteps = track.steps.length;
112
+ const pendingSteps = totalSteps - completedSteps;
113
+ const activeTips = track.steps.filter((s) => !progress.completedStepIds.includes(s.id)).slice(0, 3);
114
+ return /* @__PURE__ */ jsxDEV2("div", {
115
+ className: "space-y-6",
116
+ children: [
117
+ /* @__PURE__ */ jsxDEV2(Card2, {
118
+ className: "overflow-hidden bg-gradient-to-br from-amber-500/10 via-orange-500/10 to-red-500/10",
119
+ children: /* @__PURE__ */ jsxDEV2(CardContent2, {
120
+ className: "p-6",
121
+ children: /* @__PURE__ */ jsxDEV2("div", {
122
+ className: "flex flex-col items-center gap-4 text-center md:flex-row md:text-left",
123
+ children: [
124
+ /* @__PURE__ */ jsxDEV2("div", {
125
+ className: "flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br from-amber-500 to-orange-600 text-3xl shadow-lg",
126
+ children: "\uD83D\uDCA1"
127
+ }, undefined, false, undefined, this),
128
+ /* @__PURE__ */ jsxDEV2("div", {
129
+ className: "flex-1",
130
+ children: [
131
+ /* @__PURE__ */ jsxDEV2("h1", {
132
+ className: "text-2xl font-bold",
133
+ children: track.name
134
+ }, undefined, false, undefined, this),
135
+ /* @__PURE__ */ jsxDEV2("p", {
136
+ className: "text-muted-foreground mt-1",
137
+ children: track.description
138
+ }, undefined, false, undefined, this)
139
+ ]
140
+ }, undefined, true, undefined, this),
141
+ /* @__PURE__ */ jsxDEV2("div", {
142
+ className: "flex items-center gap-4",
143
+ children: /* @__PURE__ */ jsxDEV2(StreakCounter, {
144
+ days: progress.streakDays,
145
+ size: "lg"
146
+ }, undefined, false, undefined, this)
147
+ }, undefined, false, undefined, this)
148
+ ]
149
+ }, undefined, true, undefined, this)
150
+ }, undefined, false, undefined, this)
151
+ }, undefined, false, undefined, this),
152
+ /* @__PURE__ */ jsxDEV2("div", {
153
+ className: "grid gap-4 md:grid-cols-3",
154
+ children: [
155
+ /* @__PURE__ */ jsxDEV2(Card2, {
156
+ children: [
157
+ /* @__PURE__ */ jsxDEV2(CardHeader, {
158
+ className: "pb-2",
159
+ children: /* @__PURE__ */ jsxDEV2(CardTitle, {
160
+ className: "text-muted-foreground text-sm font-medium",
161
+ children: "Active Tips"
162
+ }, undefined, false, undefined, this)
163
+ }, undefined, false, undefined, this),
164
+ /* @__PURE__ */ jsxDEV2(CardContent2, {
165
+ children: [
166
+ /* @__PURE__ */ jsxDEV2("div", {
167
+ className: "text-3xl font-bold text-amber-500",
168
+ children: pendingSteps
169
+ }, undefined, false, undefined, this),
170
+ /* @__PURE__ */ jsxDEV2("p", {
171
+ className: "text-muted-foreground text-sm",
172
+ children: "tips for you today"
173
+ }, undefined, false, undefined, this)
174
+ ]
175
+ }, undefined, true, undefined, this)
176
+ ]
177
+ }, undefined, true, undefined, this),
178
+ /* @__PURE__ */ jsxDEV2(Card2, {
179
+ children: [
180
+ /* @__PURE__ */ jsxDEV2(CardHeader, {
181
+ className: "pb-2",
182
+ children: /* @__PURE__ */ jsxDEV2(CardTitle, {
183
+ className: "text-muted-foreground text-sm font-medium",
184
+ children: "Tips Actioned"
185
+ }, undefined, false, undefined, this)
186
+ }, undefined, false, undefined, this),
187
+ /* @__PURE__ */ jsxDEV2(CardContent2, {
188
+ children: [
189
+ /* @__PURE__ */ jsxDEV2("div", {
190
+ className: "text-3xl font-bold text-green-500",
191
+ children: completedSteps
192
+ }, undefined, false, undefined, this),
193
+ /* @__PURE__ */ jsxDEV2("p", {
194
+ className: "text-muted-foreground text-sm",
195
+ children: [
196
+ "out of ",
197
+ totalSteps,
198
+ " total"
199
+ ]
200
+ }, undefined, true, undefined, this)
201
+ ]
202
+ }, undefined, true, undefined, this)
203
+ ]
204
+ }, undefined, true, undefined, this),
205
+ /* @__PURE__ */ jsxDEV2(Card2, {
206
+ children: [
207
+ /* @__PURE__ */ jsxDEV2(CardHeader, {
208
+ className: "pb-2",
209
+ children: /* @__PURE__ */ jsxDEV2(CardTitle, {
210
+ className: "text-muted-foreground text-sm font-medium",
211
+ children: "XP Earned"
212
+ }, undefined, false, undefined, this)
213
+ }, undefined, false, undefined, this),
214
+ /* @__PURE__ */ jsxDEV2(CardContent2, {
215
+ children: [
216
+ /* @__PURE__ */ jsxDEV2("div", {
217
+ className: "text-3xl font-bold text-orange-500",
218
+ children: progress.xpEarned
219
+ }, undefined, false, undefined, this),
220
+ /* @__PURE__ */ jsxDEV2(XpBar, {
221
+ current: progress.xpEarned,
222
+ max: totalXp,
223
+ showLabel: false,
224
+ size: "sm"
225
+ }, undefined, false, undefined, this)
226
+ ]
227
+ }, undefined, true, undefined, this)
228
+ ]
229
+ }, undefined, true, undefined, this)
230
+ ]
231
+ }, undefined, true, undefined, this),
232
+ activeTips.length > 0 && /* @__PURE__ */ jsxDEV2(Card2, {
233
+ children: [
234
+ /* @__PURE__ */ jsxDEV2(CardHeader, {
235
+ className: "flex flex-row items-center justify-between",
236
+ children: [
237
+ /* @__PURE__ */ jsxDEV2(CardTitle, {
238
+ className: "flex items-center gap-2",
239
+ children: [
240
+ /* @__PURE__ */ jsxDEV2("span", {
241
+ children: "\uD83D\uDCA1"
242
+ }, undefined, false, undefined, this),
243
+ /* @__PURE__ */ jsxDEV2("span", {
244
+ children: "Tips for You"
245
+ }, undefined, false, undefined, this)
246
+ ]
247
+ }, undefined, true, undefined, this),
248
+ activeTips.length < pendingSteps && /* @__PURE__ */ jsxDEV2(Button2, {
249
+ variant: "outline",
250
+ size: "sm",
251
+ onClick: onStart,
252
+ children: [
253
+ "View All (",
254
+ pendingSteps,
255
+ ")"
256
+ ]
257
+ }, undefined, true, undefined, this)
258
+ ]
259
+ }, undefined, true, undefined, this),
260
+ /* @__PURE__ */ jsxDEV2(CardContent2, {
261
+ className: "space-y-3",
262
+ children: activeTips.map((step) => /* @__PURE__ */ jsxDEV2(TipCard, {
263
+ step,
264
+ isCompleted: false,
265
+ isCurrent: step.id === activeTips[0]?.id,
266
+ onComplete: () => onStepComplete?.(step.id)
267
+ }, step.id, false, undefined, this))
268
+ }, undefined, false, undefined, this)
269
+ ]
270
+ }, undefined, true, undefined, this),
271
+ pendingSteps === 0 && /* @__PURE__ */ jsxDEV2(Card2, {
272
+ className: "border-green-500/50 bg-green-500/5",
273
+ children: /* @__PURE__ */ jsxDEV2(CardContent2, {
274
+ className: "flex items-center gap-4 p-6",
275
+ children: [
276
+ /* @__PURE__ */ jsxDEV2("div", {
277
+ className: "text-4xl",
278
+ children: "\uD83C\uDF89"
279
+ }, undefined, false, undefined, this),
280
+ /* @__PURE__ */ jsxDEV2("div", {
281
+ children: [
282
+ /* @__PURE__ */ jsxDEV2("h3", {
283
+ className: "text-lg font-semibold text-green-500",
284
+ children: "All Tips Actioned!"
285
+ }, undefined, false, undefined, this),
286
+ /* @__PURE__ */ jsxDEV2("p", {
287
+ className: "text-muted-foreground",
288
+ children: [
289
+ "Great job! You've addressed all ",
290
+ totalSteps,
291
+ " coaching tips."
292
+ ]
293
+ }, undefined, true, undefined, this)
294
+ ]
295
+ }, undefined, true, undefined, this)
296
+ ]
297
+ }, undefined, true, undefined, this)
298
+ }, undefined, false, undefined, this)
299
+ ]
300
+ }, undefined, true, undefined, this);
301
+ }
302
+ export {
303
+ Overview
304
+ };
@@ -1,11 +1,4 @@
1
- import { LearningViewProps } from "@contractspec/example.learning-journey-ui-shared";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
3
-
4
- //#region src/views/Progress.d.ts
5
- declare function ProgressView({
6
- track,
7
- progress
8
- }: LearningViewProps): react_jsx_runtime0.JSX.Element;
9
- //#endregion
10
- export { ProgressView as Progress, ProgressView };
1
+ import type { LearningViewProps } from '@contractspec/example.learning-journey-ui-shared';
2
+ export declare function ProgressView({ track, progress }: LearningViewProps): import("react/jsx-runtime").JSX.Element;
3
+ export { ProgressView as Progress };
11
4
  //# sourceMappingURL=Progress.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.d.ts","names":[],"sources":["../../src/views/Progress.tsx"],"mappings":";;;;iBAgBgB,YAAA,CAAA;EAAe,KAAA;EAAO;AAAA,GAAY,iBAAA,GAAiB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../src/views/Progress.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAE1F,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAiJlE;AAED,OAAO,EAAE,YAAY,IAAI,QAAQ,EAAE,CAAC"}