@lssm/example.learning-journey-ui-gamified 0.0.0-canary-20251217080011 → 0.0.0-canary-20251219202229
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/.turbo/turbo-build$colon$bundle.log +483 -22
- package/.turbo/turbo-build.log +484 -24
- package/CHANGELOG.md +9 -9
- package/LICENSE +21 -0
- package/dist/GamifiedMiniApp.d.ts +17 -0
- package/dist/GamifiedMiniApp.d.ts.map +1 -0
- package/dist/GamifiedMiniApp.js +65 -0
- package/dist/GamifiedMiniApp.js.map +1 -0
- package/dist/components/DayCalendar.d.ts +16 -0
- package/dist/components/DayCalendar.d.ts.map +1 -0
- package/dist/components/DayCalendar.js +33 -0
- package/dist/components/DayCalendar.js.map +1 -0
- package/dist/components/FlashCard.d.ts +19 -0
- package/dist/components/FlashCard.d.ts.map +1 -0
- package/dist/components/FlashCard.js +80 -0
- package/dist/components/FlashCard.js.map +1 -0
- package/dist/components/MasteryRing.d.ts +18 -0
- package/dist/components/MasteryRing.d.ts.map +1 -0
- package/dist/components/MasteryRing.js +82 -0
- package/dist/components/MasteryRing.js.map +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +5 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/docs/learning-journey-ui-gamified.docblock.d.ts +1 -0
- package/dist/docs/learning-journey-ui-gamified.docblock.js +21 -0
- package/dist/docs/learning-journey-ui-gamified.docblock.js.map +1 -0
- package/dist/{index.d.mts → example.d.ts} +2 -18
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +35 -0
- package/dist/example.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/BadgeDisplay.js +45 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/BadgeDisplay.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/StreakCounter.js +46 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/StreakCounter.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/ViewTabs.js +49 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/ViewTabs.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/XpBar.js +47 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/XpBar.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/index.js +4 -0
- package/dist/examples/learning-journey-ui-shared/dist/docs/index.js +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/docs/learning-journey-ui-shared.docblock.js +21 -0
- package/dist/examples/learning-journey-ui-shared/dist/docs/learning-journey-ui-shared.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/hooks/index.js +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/hooks/useLearningProgress.js +74 -0
- package/dist/examples/learning-journey-ui-shared/dist/hooks/useLearningProgress.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/index.js +8 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/index.js +24 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/meta.docs.js +29 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/presentations.js +72 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/registry.js +45 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/registry.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +80 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +57 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +357 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +79 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +84 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +45 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +40 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +69 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +62 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +155 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +101 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech-contracts.docs.js +96 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +6 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/_virtual/rolldown_runtime.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/components/atoms/Button.js +34 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/components/atoms/Button.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +56 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +14 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/progress.js +24 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/progress.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/utils.js +11 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/utils.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +11 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +14 -0
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +17 -0
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/index.js +25 -0
- package/dist/libs/contracts/dist/docs/meta.docs.js +30 -0
- package/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
- package/dist/libs/contracts/dist/docs/presentations.js +72 -0
- package/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
- package/dist/libs/contracts/dist/docs/registry.js +45 -0
- package/dist/libs/contracts/dist/docs/registry.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +81 -0
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +58 -0
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +17 -0
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +358 -0
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +38 -0
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +17 -0
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +21 -0
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +49 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +80 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +85 -0
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +46 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +68 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +41 -0
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +70 -0
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +48 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +63 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +156 -0
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +21 -0
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +102 -0
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +21 -0
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech-contracts.docs.js +97 -0
- package/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
- package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +6 -0
- package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js.map +1 -0
- package/dist/libs/design-system/dist/components/atoms/Button.js +34 -0
- package/dist/libs/design-system/dist/components/atoms/Button.js.map +1 -0
- package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +56 -0
- package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js.map +1 -0
- package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +14 -0
- package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js.map +1 -0
- package/dist/libs/ui-kit-web/dist/ui/card.js +37 -0
- package/dist/libs/ui-kit-web/dist/ui/card.js.map +1 -0
- package/dist/libs/ui-kit-web/dist/ui/utils.js +11 -0
- package/dist/libs/ui-kit-web/dist/ui/utils.js.map +1 -0
- package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +11 -0
- package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js.map +1 -0
- package/dist/views/Overview.d.ts +15 -0
- package/dist/views/Overview.d.ts.map +1 -0
- package/dist/views/Overview.js +164 -0
- package/dist/views/Overview.js.map +1 -0
- package/dist/views/Progress.d.ts +11 -0
- package/dist/views/Progress.d.ts.map +1 -0
- package/dist/views/Progress.js +145 -0
- package/dist/views/Progress.js.map +1 -0
- package/dist/views/Steps.d.ts +12 -0
- package/dist/views/Steps.d.ts.map +1 -0
- package/dist/views/Steps.js +56 -0
- package/dist/views/Steps.js.map +1 -0
- package/dist/views/Timeline.d.ts +11 -0
- package/dist/views/Timeline.d.ts.map +1 -0
- package/dist/views/Timeline.js +133 -0
- package/dist/views/Timeline.js.map +1 -0
- package/dist/views/index.d.ts +5 -0
- package/dist/views/index.js +6 -0
- package/package.json +28 -18
- package/tsconfig.tsbuildinfo +1 -1
- package/tsdown.config.js +14 -10
- package/dist/DayCalendar-Cha869Bi.mjs +0 -178
- package/dist/components/index.d.mts +0 -2
- package/dist/components/index.mjs +0 -4
- package/dist/components-kh0CpIG2.mjs +0 -1
- package/dist/index-Bc83ZTkD.d.mts +0 -33
- package/dist/index-C7CBKOil.d.mts +0 -44
- package/dist/index.mjs +0 -110
- package/dist/views/index.d.mts +0 -2
- package/dist/views/index.mjs +0 -4
- package/dist/views-B-DapxWu.mjs +0 -467
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { cn, init_utils } from "../ui-kit-core/dist/utils.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
6
|
+
|
|
7
|
+
//#region ../../libs/design-system/dist/ui-kit-web/dist/ui/button.js
|
|
8
|
+
init_utils();
|
|
9
|
+
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-hidden focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
13
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
14
|
+
outline: "border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
15
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
16
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
17
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
21
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
22
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
23
|
+
icon: "size-9"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "default",
|
|
28
|
+
size: "default"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const Button = React$1.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
32
|
+
if (asChild) return /* @__PURE__ */ jsx(Slot, {
|
|
33
|
+
"data-slot": "button",
|
|
34
|
+
className: cn(buttonVariants({
|
|
35
|
+
variant,
|
|
36
|
+
size,
|
|
37
|
+
className
|
|
38
|
+
})),
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
return /* @__PURE__ */ jsx("button", {
|
|
42
|
+
ref,
|
|
43
|
+
"data-slot": "button",
|
|
44
|
+
className: cn(buttonVariants({
|
|
45
|
+
variant,
|
|
46
|
+
size,
|
|
47
|
+
className
|
|
48
|
+
})),
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
Button.displayName = "Button";
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
export { Button };
|
|
56
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","names":[],"sources":["../../../../../../../../../libs/design-system/dist/ui-kit-web/dist/ui/button.js"],"sourcesContent":["import { cn, init_utils } from \"../ui-kit-core/dist/utils.js\";\nimport * as React$1 from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { cva } from \"class-variance-authority\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n//#region ../ui-kit-web/dist/ui/button.js\ninit_utils();\nconst buttonVariants = cva(\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-hidden focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\", {\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n\t\t\tdestructive: \"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n\t\t\toutline: \"border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50\",\n\t\t\tsecondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n\t\t\tghost: \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n\t\t\tlink: \"text-primary underline-offset-4 hover:underline\"\n\t\t},\n\t\tsize: {\n\t\t\tdefault: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n\t\t\tsm: \"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5\",\n\t\t\tlg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n\t\t\ticon: \"size-9\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t\tsize: \"default\"\n\t}\n});\nconst Button = React$1.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {\n\tif (asChild) return /* @__PURE__ */ jsx(Slot, {\n\t\t\"data-slot\": \"button\",\n\t\tclassName: cn(buttonVariants({\n\t\t\tvariant,\n\t\t\tsize,\n\t\t\tclassName\n\t\t})),\n\t\t...props\n\t});\n\treturn /* @__PURE__ */ jsx(\"button\", {\n\t\tref,\n\t\t\"data-slot\": \"button\",\n\t\tclassName: cn(buttonVariants({\n\t\t\tvariant,\n\t\t\tsize,\n\t\t\tclassName\n\t\t})),\n\t\t...props\n\t});\n});\nButton.displayName = \"Button\";\n\n//#endregion\nexport { Button, buttonVariants };\n//# sourceMappingURL=button.js.map"],"mappings":";;;;;;;AAOA,YAAY;AACZ,MAAM,iBAAiB,IAAI,icAAic;CAC3d,UAAU;EACT,SAAS;GACR,SAAS;GACT,aAAa;GACb,SAAS;GACT,WAAW;GACX,OAAO;GACP,MAAM;GACN;EACD,MAAM;GACL,SAAS;GACT,IAAI;GACJ,IAAI;GACJ,MAAM;GACN;EACD;CACD,iBAAiB;EAChB,SAAS;EACT,MAAM;EACN;CACD,CAAC;AACF,MAAM,SAAS,QAAQ,YAAY,EAAE,WAAW,SAAS,MAAM,UAAU,OAAO,GAAG,SAAS,QAAQ;AACnG,KAAI,QAAS,QAAuB,oBAAI,MAAM;EAC7C,aAAa;EACb,WAAW,GAAG,eAAe;GAC5B;GACA;GACA;GACA,CAAC,CAAC;EACH,GAAG;EACH,CAAC;AACF,QAAuB,oBAAI,UAAU;EACpC;EACA,aAAa;EACb,WAAW,GAAG,eAAe;GAC5B;GACA;GACA;GACA,CAAC,CAAC;EACH,GAAG;EACH,CAAC;EACD;AACF,OAAO,cAAc"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __esmMin } from "../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
|
|
5
|
+
//#region ../../libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js
|
|
6
|
+
function cn(...inputs) {
|
|
7
|
+
return twMerge(clsx(inputs));
|
|
8
|
+
}
|
|
9
|
+
var init_utils = __esmMin((() => {}));
|
|
10
|
+
init_utils();
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { cn, init_utils };
|
|
14
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../../../../../../../../libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js"],"sourcesContent":["import { __esmMin } from \"../../../../_virtual/rolldown_runtime.js\";\nimport { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n//#region ../ui-kit-web/dist/ui-kit-core/dist/utils.js\nfunction cn(...inputs) {\n\treturn twMerge(clsx(inputs));\n}\nvar init_utils = __esmMin((() => {}));\n\n//#endregion\ninit_utils();\nexport { cn, init_utils };\n//# sourceMappingURL=utils.js.map"],"mappings":";;;;;AAKA,SAAS,GAAG,GAAG,QAAQ;AACtB,QAAO,QAAQ,KAAK,OAAO,CAAC;;AAE7B,IAAI,aAAa,gBAAgB,IAAI;AAGrC,YAAY"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { cn } from "../ui-kit-core/dist/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region ../../libs/ui-kit-web/dist/ui/card.js
|
|
6
|
+
function Card({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx("div", {
|
|
8
|
+
"data-slot": "card",
|
|
9
|
+
className: cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-2xs", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function CardHeader({ className, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx("div", {
|
|
15
|
+
"data-slot": "card-header",
|
|
16
|
+
className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function CardTitle({ className, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx("div", {
|
|
22
|
+
"data-slot": "card-title",
|
|
23
|
+
className: cn("leading-none font-semibold", className),
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function CardContent({ className, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx("div", {
|
|
29
|
+
"data-slot": "card-content",
|
|
30
|
+
className: cn("px-6", className),
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Card, CardContent, CardHeader, CardTitle };
|
|
37
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","names":[],"sources":["../../../../../../../libs/ui-kit-web/dist/ui/card.js"],"sourcesContent":["import { cn } from \"../ui-kit-core/dist/utils.js\";\nimport \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n\n//#region ui/card.tsx\nfunction Card({ className, ...props }) {\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\t\"data-slot\": \"card\",\n\t\tclassName: cn(\"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-2xs\", className),\n\t\t...props\n\t});\n}\nfunction CardHeader({ className, ...props }) {\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\t\"data-slot\": \"card-header\",\n\t\tclassName: cn(\"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\", className),\n\t\t...props\n\t});\n}\nfunction CardTitle({ className, ...props }) {\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\t\"data-slot\": \"card-title\",\n\t\tclassName: cn(\"leading-none font-semibold\", className),\n\t\t...props\n\t});\n}\nfunction CardDescription({ className, ...props }) {\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\t\"data-slot\": \"card-description\",\n\t\tclassName: cn(\"text-muted-foreground text-sm\", className),\n\t\t...props\n\t});\n}\nfunction CardAction({ className, ...props }) {\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\t\"data-slot\": \"card-action\",\n\t\tclassName: cn(\"col-start-2 row-span-2 row-start-1 self-start justify-self-end\", className),\n\t\t...props\n\t});\n}\nfunction CardContent({ className, ...props }) {\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\t\"data-slot\": \"card-content\",\n\t\tclassName: cn(\"px-6\", className),\n\t\t...props\n\t});\n}\nfunction CardFooter({ className, ...props }) {\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\t\"data-slot\": \"card-footer\",\n\t\tclassName: cn(\"flex items-center px-6 [.border-t]:pt-6\", className),\n\t\t...props\n\t});\n}\n\n//#endregion\nexport { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };\n//# sourceMappingURL=card.js.map"],"mappings":";;;;;AAKA,SAAS,KAAK,EAAE,WAAW,GAAG,SAAS;AACtC,QAAuB,oBAAI,OAAO;EACjC,aAAa;EACb,WAAW,GAAG,sFAAsF,UAAU;EAC9G,GAAG;EACH,CAAC;;AAEH,SAAS,WAAW,EAAE,WAAW,GAAG,SAAS;AAC5C,QAAuB,oBAAI,OAAO;EACjC,aAAa;EACb,WAAW,GAAG,8JAA8J,UAAU;EACtL,GAAG;EACH,CAAC;;AAEH,SAAS,UAAU,EAAE,WAAW,GAAG,SAAS;AAC3C,QAAuB,oBAAI,OAAO;EACjC,aAAa;EACb,WAAW,GAAG,8BAA8B,UAAU;EACtD,GAAG;EACH,CAAC;;AAgBH,SAAS,YAAY,EAAE,WAAW,GAAG,SAAS;AAC7C,QAAuB,oBAAI,OAAO;EACjC,aAAa;EACb,WAAW,GAAG,QAAQ,UAAU;EAChC,GAAG;EACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
|
|
4
|
+
//#region ../../libs/ui-kit-web/dist/ui/utils.js
|
|
5
|
+
function cn(...inputs) {
|
|
6
|
+
return twMerge(clsx(inputs));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { cn };
|
|
11
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../../../../../libs/ui-kit-web/dist/ui/utils.js"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n//#region ui/utils.ts\nfunction cn(...inputs) {\n\treturn twMerge(clsx(inputs));\n}\n\n//#endregion\nexport { cn };\n//# sourceMappingURL=utils.js.map"],"mappings":";;;;AAIA,SAAS,GAAG,GAAG,QAAQ;AACtB,QAAO,QAAQ,KAAK,OAAO,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
|
|
4
|
+
//#region ../../libs/ui-kit-web/dist/ui-kit-core/dist/utils.js
|
|
5
|
+
function cn(...inputs) {
|
|
6
|
+
return twMerge(clsx(inputs));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { cn };
|
|
11
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../../../../../../libs/ui-kit-web/dist/ui-kit-core/dist/utils.js"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n//#region ../ui-kit-core/dist/utils.js\nfunction cn(...inputs) {\n\treturn twMerge(clsx(inputs));\n}\n\n//#endregion\nexport { cn };\n//# sourceMappingURL=utils.js.map"],"mappings":";;;;AAIA,SAAS,GAAG,GAAG,QAAQ;AACtB,QAAO,QAAQ,KAAK,OAAO,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
2
|
+
import { LearningViewProps } from "@lssm/example.learning-journey-ui-shared";
|
|
3
|
+
|
|
4
|
+
//#region src/views/Overview.d.ts
|
|
5
|
+
interface GamifiedOverviewProps extends LearningViewProps {
|
|
6
|
+
onStart?: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare function Overview({
|
|
9
|
+
track,
|
|
10
|
+
progress,
|
|
11
|
+
onStart
|
|
12
|
+
}: GamifiedOverviewProps): react_jsx_runtime2.JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Overview };
|
|
15
|
+
//# sourceMappingURL=Overview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Overview.d.ts","names":[],"sources":["../../src/views/Overview.tsx"],"sourcesContent":[],"mappings":";;;;UAgBU,qBAAA,SAA8B;;;AAA9B,iBAIM,QAAA,CAJgB;EAAA,KAAQ;EAAA,QAAA;EAAA;AAAiB,CAAA,EAIF,qBAJE,CAAA,EAImB,kBAAA,CAAA,GAAA,CAAA,OAJnB"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Card, CardContent, CardHeader, CardTitle } from "../libs/ui-kit-web/dist/ui/card.js";
|
|
4
|
+
import { XpBar } from "../examples/learning-journey-ui-shared/dist/components/XpBar.js";
|
|
5
|
+
import { StreakCounter } from "../examples/learning-journey-ui-shared/dist/components/StreakCounter.js";
|
|
6
|
+
import { BadgeDisplay } from "../examples/learning-journey-ui-shared/dist/components/BadgeDisplay.js";
|
|
7
|
+
import "../examples/learning-journey-ui-shared/dist/index.js";
|
|
8
|
+
import { Button } from "../libs/design-system/dist/components/atoms/Button.js";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
|
|
11
|
+
//#region src/views/Overview.tsx
|
|
12
|
+
function Overview({ track, progress, onStart }) {
|
|
13
|
+
const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0) + (track.completionRewards?.xpBonus ?? 0);
|
|
14
|
+
const completedSteps = progress.completedStepIds.length;
|
|
15
|
+
const totalSteps = track.steps.length;
|
|
16
|
+
const isComplete = completedSteps === totalSteps;
|
|
17
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
18
|
+
className: "space-y-6",
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Card, {
|
|
21
|
+
className: "overflow-hidden bg-gradient-to-br from-violet-500/10 via-purple-500/10 to-fuchsia-500/10",
|
|
22
|
+
children: /* @__PURE__ */ jsx(CardContent, {
|
|
23
|
+
className: "p-6",
|
|
24
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
25
|
+
className: "flex flex-col items-center gap-4 text-center md:flex-row md:text-left",
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsx("div", {
|
|
28
|
+
className: "flex h-20 w-20 items-center justify-center rounded-2xl bg-gradient-to-br from-violet-500 to-purple-600 text-4xl shadow-lg",
|
|
29
|
+
children: isComplete ? "🏆" : "🎯"
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ jsxs("div", {
|
|
32
|
+
className: "flex-1",
|
|
33
|
+
children: [/* @__PURE__ */ jsx("h1", {
|
|
34
|
+
className: "text-2xl font-bold",
|
|
35
|
+
children: track.name
|
|
36
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
37
|
+
className: "text-muted-foreground mt-1",
|
|
38
|
+
children: track.description
|
|
39
|
+
})]
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsx("div", {
|
|
42
|
+
className: "flex items-center gap-3",
|
|
43
|
+
children: /* @__PURE__ */ jsx(StreakCounter, {
|
|
44
|
+
days: progress.streakDays,
|
|
45
|
+
size: "lg"
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ jsxs("div", {
|
|
53
|
+
className: "grid gap-4 md:grid-cols-3",
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
56
|
+
className: "pb-2",
|
|
57
|
+
children: /* @__PURE__ */ jsx(CardTitle, {
|
|
58
|
+
className: "text-muted-foreground text-sm font-medium",
|
|
59
|
+
children: "XP Progress"
|
|
60
|
+
})
|
|
61
|
+
}), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx("div", {
|
|
62
|
+
className: "text-3xl font-bold text-violet-500",
|
|
63
|
+
children: progress.xpEarned.toLocaleString()
|
|
64
|
+
}), /* @__PURE__ */ jsx(XpBar, {
|
|
65
|
+
current: progress.xpEarned,
|
|
66
|
+
max: totalXp,
|
|
67
|
+
showLabel: false,
|
|
68
|
+
size: "sm"
|
|
69
|
+
})] })] }),
|
|
70
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
71
|
+
className: "pb-2",
|
|
72
|
+
children: /* @__PURE__ */ jsx(CardTitle, {
|
|
73
|
+
className: "text-muted-foreground text-sm font-medium",
|
|
74
|
+
children: "Steps Completed"
|
|
75
|
+
})
|
|
76
|
+
}), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsxs("div", {
|
|
77
|
+
className: "text-3xl font-bold",
|
|
78
|
+
children: [
|
|
79
|
+
completedSteps,
|
|
80
|
+
" ",
|
|
81
|
+
/* @__PURE__ */ jsxs("span", {
|
|
82
|
+
className: "text-muted-foreground text-lg",
|
|
83
|
+
children: ["/ ", totalSteps]
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
87
|
+
className: "bg-muted mt-2 h-2 w-full overflow-hidden rounded-full",
|
|
88
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
89
|
+
className: "h-full bg-green-500 transition-all duration-500",
|
|
90
|
+
style: { width: `${completedSteps / totalSteps * 100}%` }
|
|
91
|
+
})
|
|
92
|
+
})] })] }),
|
|
93
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
94
|
+
className: "pb-2",
|
|
95
|
+
children: /* @__PURE__ */ jsx(CardTitle, {
|
|
96
|
+
className: "text-muted-foreground text-sm font-medium",
|
|
97
|
+
children: "Badges Earned"
|
|
98
|
+
})
|
|
99
|
+
}), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(BadgeDisplay, {
|
|
100
|
+
badges: progress.badges,
|
|
101
|
+
size: "lg"
|
|
102
|
+
}) })] })
|
|
103
|
+
]
|
|
104
|
+
}),
|
|
105
|
+
!isComplete && /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
106
|
+
className: "flex items-center gap-2",
|
|
107
|
+
children: [/* @__PURE__ */ jsx("span", { children: "🎯" }), /* @__PURE__ */ jsx("span", { children: "Next Challenge" })]
|
|
108
|
+
}) }), /* @__PURE__ */ jsx(CardContent, { children: (() => {
|
|
109
|
+
const nextStep = track.steps.find((s) => !progress.completedStepIds.includes(s.id));
|
|
110
|
+
if (!nextStep) return null;
|
|
111
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
112
|
+
className: "flex items-center justify-between gap-4",
|
|
113
|
+
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
114
|
+
className: "font-semibold",
|
|
115
|
+
children: nextStep.title
|
|
116
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
117
|
+
className: "text-muted-foreground text-sm",
|
|
118
|
+
children: nextStep.description
|
|
119
|
+
})] }), /* @__PURE__ */ jsxs("div", {
|
|
120
|
+
className: "flex items-center gap-3",
|
|
121
|
+
children: [nextStep.xpReward && /* @__PURE__ */ jsxs("span", {
|
|
122
|
+
className: "rounded-full bg-green-500/10 px-3 py-1 text-sm font-semibold text-green-500",
|
|
123
|
+
children: [
|
|
124
|
+
"+",
|
|
125
|
+
nextStep.xpReward,
|
|
126
|
+
" XP"
|
|
127
|
+
]
|
|
128
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
129
|
+
onClick: onStart,
|
|
130
|
+
children: "Start"
|
|
131
|
+
})]
|
|
132
|
+
})]
|
|
133
|
+
});
|
|
134
|
+
})() })] }),
|
|
135
|
+
isComplete && /* @__PURE__ */ jsx(Card, {
|
|
136
|
+
className: "border-green-500/50 bg-green-500/5",
|
|
137
|
+
children: /* @__PURE__ */ jsxs(CardContent, {
|
|
138
|
+
className: "flex items-center gap-4 p-6",
|
|
139
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
140
|
+
className: "text-4xl",
|
|
141
|
+
children: "🎉"
|
|
142
|
+
}), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
143
|
+
className: "text-lg font-semibold text-green-500",
|
|
144
|
+
children: "Track Complete!"
|
|
145
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
146
|
+
className: "text-muted-foreground",
|
|
147
|
+
children: [
|
|
148
|
+
"You've mastered all ",
|
|
149
|
+
totalSteps,
|
|
150
|
+
" challenges and earned",
|
|
151
|
+
" ",
|
|
152
|
+
progress.xpEarned,
|
|
153
|
+
" XP."
|
|
154
|
+
]
|
|
155
|
+
})] })]
|
|
156
|
+
})
|
|
157
|
+
})
|
|
158
|
+
]
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
//#endregion
|
|
163
|
+
export { Overview };
|
|
164
|
+
//# sourceMappingURL=Overview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Overview.js","names":[],"sources":["../../src/views/Overview.tsx"],"sourcesContent":["'use client';\n\nimport { Button } from '@lssm/lib.design-system';\nimport {\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n} from '@lssm/lib.ui-kit-web/ui/card';\nimport {\n XpBar,\n StreakCounter,\n BadgeDisplay,\n} from '@lssm/example.learning-journey-ui-shared';\nimport type { LearningViewProps } from '@lssm/example.learning-journey-ui-shared';\n\ninterface GamifiedOverviewProps extends LearningViewProps {\n onStart?: () => void;\n}\n\nexport function Overview({ track, progress, onStart }: GamifiedOverviewProps) {\n const totalXp =\n track.totalXp ??\n track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0) +\n (track.completionRewards?.xpBonus ?? 0);\n\n const completedSteps = progress.completedStepIds.length;\n const totalSteps = track.steps.length;\n const isComplete = completedSteps === totalSteps;\n\n return (\n <div className=\"space-y-6\">\n {/* Hero Card */}\n <Card className=\"overflow-hidden bg-gradient-to-br from-violet-500/10 via-purple-500/10 to-fuchsia-500/10\">\n <CardContent className=\"p-6\">\n <div className=\"flex flex-col items-center gap-4 text-center md:flex-row md:text-left\">\n <div className=\"flex h-20 w-20 items-center justify-center rounded-2xl bg-gradient-to-br from-violet-500 to-purple-600 text-4xl shadow-lg\">\n {isComplete ? '🏆' : '🎯'}\n </div>\n <div className=\"flex-1\">\n <h1 className=\"text-2xl font-bold\">{track.name}</h1>\n <p className=\"text-muted-foreground mt-1\">{track.description}</p>\n </div>\n <div className=\"flex items-center gap-3\">\n <StreakCounter days={progress.streakDays} size=\"lg\" />\n </div>\n </div>\n </CardContent>\n </Card>\n\n {/* Stats Grid */}\n <div className=\"grid gap-4 md:grid-cols-3\">\n <Card>\n <CardHeader className=\"pb-2\">\n <CardTitle className=\"text-muted-foreground text-sm font-medium\">\n XP Progress\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"text-3xl font-bold text-violet-500\">\n {progress.xpEarned.toLocaleString()}\n </div>\n <XpBar\n current={progress.xpEarned}\n max={totalXp}\n showLabel={false}\n size=\"sm\"\n />\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader className=\"pb-2\">\n <CardTitle className=\"text-muted-foreground text-sm font-medium\">\n Steps Completed\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"text-3xl font-bold\">\n {completedSteps}{' '}\n <span className=\"text-muted-foreground text-lg\">\n / {totalSteps}\n </span>\n </div>\n <div className=\"bg-muted mt-2 h-2 w-full overflow-hidden rounded-full\">\n <div\n className=\"h-full bg-green-500 transition-all duration-500\"\n style={{ width: `${(completedSteps / totalSteps) * 100}%` }}\n />\n </div>\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader className=\"pb-2\">\n <CardTitle className=\"text-muted-foreground text-sm font-medium\">\n Badges Earned\n </CardTitle>\n </CardHeader>\n <CardContent>\n <BadgeDisplay badges={progress.badges} size=\"lg\" />\n </CardContent>\n </Card>\n </div>\n\n {/* Next Step Preview */}\n {!isComplete && (\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <span>🎯</span>\n <span>Next Challenge</span>\n </CardTitle>\n </CardHeader>\n <CardContent>\n {(() => {\n const nextStep = track.steps.find(\n (s) => !progress.completedStepIds.includes(s.id)\n );\n if (!nextStep) return null;\n\n return (\n <div className=\"flex items-center justify-between gap-4\">\n <div>\n <h3 className=\"font-semibold\">{nextStep.title}</h3>\n <p className=\"text-muted-foreground text-sm\">\n {nextStep.description}\n </p>\n </div>\n <div className=\"flex items-center gap-3\">\n {nextStep.xpReward && (\n <span className=\"rounded-full bg-green-500/10 px-3 py-1 text-sm font-semibold text-green-500\">\n +{nextStep.xpReward} XP\n </span>\n )}\n <Button onClick={onStart}>Start</Button>\n </div>\n </div>\n );\n })()}\n </CardContent>\n </Card>\n )}\n\n {/* Completion Message */}\n {isComplete && (\n <Card className=\"border-green-500/50 bg-green-500/5\">\n <CardContent className=\"flex items-center gap-4 p-6\">\n <div className=\"text-4xl\">🎉</div>\n <div>\n <h3 className=\"text-lg font-semibold text-green-500\">\n Track Complete!\n </h3>\n <p className=\"text-muted-foreground\">\n You've mastered all {totalSteps} challenges and earned{' '}\n {progress.xpEarned} XP.\n </p>\n </div>\n </CardContent>\n </Card>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAoBA,SAAgB,SAAS,EAAE,OAAO,UAAU,WAAkC;CAC5E,MAAM,UACJ,MAAM,WACN,MAAM,MAAM,QAAQ,KAAK,MAAM,OAAO,EAAE,YAAY,IAAI,EAAE,IACvD,MAAM,mBAAmB,WAAW;CAEzC,MAAM,iBAAiB,SAAS,iBAAiB;CACjD,MAAM,aAAa,MAAM,MAAM;CAC/B,MAAM,aAAa,mBAAmB;AAEtC,QACE,qBAAC;EAAI,WAAU;;GAEb,oBAAC;IAAK,WAAU;cACd,oBAAC;KAAY,WAAU;eACrB,qBAAC;MAAI,WAAU;;OACb,oBAAC;QAAI,WAAU;kBACZ,aAAa,OAAO;SACjB;OACN,qBAAC;QAAI,WAAU;mBACb,oBAAC;SAAG,WAAU;mBAAsB,MAAM;UAAU,EACpD,oBAAC;SAAE,WAAU;mBAA8B,MAAM;UAAgB;SAC7D;OACN,oBAAC;QAAI,WAAU;kBACb,oBAAC;SAAc,MAAM,SAAS;SAAY,MAAK;UAAO;SAClD;;OACF;MACM;KACT;GAGP,qBAAC;IAAI,WAAU;;KACb,qBAAC,mBACC,oBAAC;MAAW,WAAU;gBACpB,oBAAC;OAAU,WAAU;iBAA4C;QAErD;OACD,EACb,qBAAC,0BACC,oBAAC;MAAI,WAAU;gBACZ,SAAS,SAAS,gBAAgB;OAC/B,EACN,oBAAC;MACC,SAAS,SAAS;MAClB,KAAK;MACL,WAAW;MACX,MAAK;OACL,IACU,IACT;KAEP,qBAAC,mBACC,oBAAC;MAAW,WAAU;gBACpB,oBAAC;OAAU,WAAU;iBAA4C;QAErD;OACD,EACb,qBAAC,0BACC,qBAAC;MAAI,WAAU;;OACZ;OAAgB;OACjB,qBAAC;QAAK,WAAU;mBAAgC,MAC3C;SACE;;OACH,EACN,oBAAC;MAAI,WAAU;gBACb,oBAAC;OACC,WAAU;OACV,OAAO,EAAE,OAAO,GAAI,iBAAiB,aAAc,IAAI,IAAI;QAC3D;OACE,IACM,IACT;KAEP,qBAAC,mBACC,oBAAC;MAAW,WAAU;gBACpB,oBAAC;OAAU,WAAU;iBAA4C;QAErD;OACD,EACb,oBAAC,yBACC,oBAAC;MAAa,QAAQ,SAAS;MAAQ,MAAK;OAAO,GACvC,IACT;;KACH;GAGL,CAAC,cACA,qBAAC,mBACC,oBAAC,wBACC,qBAAC;IAAU,WAAU;eACnB,oBAAC,oBAAK,OAAS,EACf,oBAAC,oBAAK,mBAAqB;KACjB,GACD,EACb,oBAAC,gCACS;IACN,MAAM,WAAW,MAAM,MAAM,MAC1B,MAAM,CAAC,SAAS,iBAAiB,SAAS,EAAE,GAAG,CACjD;AACD,QAAI,CAAC,SAAU,QAAO;AAEtB,WACE,qBAAC;KAAI,WAAU;gBACb,qBAAC,oBACC,oBAAC;MAAG,WAAU;gBAAiB,SAAS;OAAW,EACnD,oBAAC;MAAE,WAAU;gBACV,SAAS;OACR,IACA,EACN,qBAAC;MAAI,WAAU;iBACZ,SAAS,YACR,qBAAC;OAAK,WAAU;;QAA8E;QAC1F,SAAS;QAAS;;QACf,EAET,oBAAC;OAAO,SAAS;iBAAS;QAAc;OACpC;MACF;OAEN,GACQ,IACT;GAIR,cACC,oBAAC;IAAK,WAAU;cACd,qBAAC;KAAY,WAAU;gBACrB,oBAAC;MAAI,WAAU;gBAAW;OAAQ,EAClC,qBAAC,oBACC,oBAAC;MAAG,WAAU;gBAAuC;OAEhD,EACL,qBAAC;MAAE,WAAU;;OAAwB;OACd;OAAW;OAAuB;OACtD,SAAS;OAAS;;OACjB,IACA;MACM;KACT;;GAEL"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
2
|
+
import { LearningViewProps } from "@lssm/example.learning-journey-ui-shared";
|
|
3
|
+
|
|
4
|
+
//#region src/views/Progress.d.ts
|
|
5
|
+
declare function Progress({
|
|
6
|
+
track,
|
|
7
|
+
progress
|
|
8
|
+
}: LearningViewProps): react_jsx_runtime4.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Progress };
|
|
11
|
+
//# sourceMappingURL=Progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.d.ts","names":[],"sources":["../../src/views/Progress.tsx"],"sourcesContent":[],"mappings":";;;;iBAYgB,QAAA;;;GAA8B,oBAAiB,kBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Card, CardContent, CardHeader, CardTitle } from "../libs/ui-kit-web/dist/ui/card.js";
|
|
4
|
+
import { XpBar } from "../examples/learning-journey-ui-shared/dist/components/XpBar.js";
|
|
5
|
+
import { BadgeDisplay } from "../examples/learning-journey-ui-shared/dist/components/BadgeDisplay.js";
|
|
6
|
+
import "../examples/learning-journey-ui-shared/dist/index.js";
|
|
7
|
+
import { MasteryRing } from "../components/MasteryRing.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
|
|
10
|
+
//#region src/views/Progress.tsx
|
|
11
|
+
function Progress({ track, progress }) {
|
|
12
|
+
const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0) + (track.completionRewards?.xpBonus ?? 0);
|
|
13
|
+
const completedSteps = progress.completedStepIds.length;
|
|
14
|
+
const totalSteps = track.steps.length;
|
|
15
|
+
const percentComplete = totalSteps > 0 ? completedSteps / totalSteps * 100 : 0;
|
|
16
|
+
const surfaces = /* @__PURE__ */ new Map();
|
|
17
|
+
track.steps.forEach((step) => {
|
|
18
|
+
const surface = step.metadata?.surface ?? "general";
|
|
19
|
+
const current = surfaces.get(surface) ?? {
|
|
20
|
+
total: 0,
|
|
21
|
+
completed: 0
|
|
22
|
+
};
|
|
23
|
+
surfaces.set(surface, {
|
|
24
|
+
total: current.total + 1,
|
|
25
|
+
completed: current.completed + (progress.completedStepIds.includes(step.id) ? 1 : 0)
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
const surfaceColors = [
|
|
29
|
+
"green",
|
|
30
|
+
"blue",
|
|
31
|
+
"violet",
|
|
32
|
+
"orange"
|
|
33
|
+
];
|
|
34
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
35
|
+
className: "space-y-6",
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
38
|
+
className: "flex items-center gap-2",
|
|
39
|
+
children: [/* @__PURE__ */ jsx("span", { children: "⚡" }), /* @__PURE__ */ jsx("span", { children: "Experience Points" })]
|
|
40
|
+
}) }), /* @__PURE__ */ jsxs(CardContent, {
|
|
41
|
+
className: "space-y-4",
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ jsxs("div", {
|
|
44
|
+
className: "flex items-baseline gap-2",
|
|
45
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
46
|
+
className: "text-4xl font-bold text-violet-500",
|
|
47
|
+
children: progress.xpEarned.toLocaleString()
|
|
48
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
49
|
+
className: "text-muted-foreground",
|
|
50
|
+
children: [
|
|
51
|
+
"/ ",
|
|
52
|
+
totalXp.toLocaleString(),
|
|
53
|
+
" XP"
|
|
54
|
+
]
|
|
55
|
+
})]
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsx(XpBar, {
|
|
58
|
+
current: progress.xpEarned,
|
|
59
|
+
max: totalXp,
|
|
60
|
+
showLabel: false,
|
|
61
|
+
size: "lg"
|
|
62
|
+
}),
|
|
63
|
+
track.completionRewards?.xpBonus && percentComplete < 100 && /* @__PURE__ */ jsxs("p", {
|
|
64
|
+
className: "text-muted-foreground text-sm",
|
|
65
|
+
children: [
|
|
66
|
+
"🎁 Complete all steps for a",
|
|
67
|
+
" ",
|
|
68
|
+
/* @__PURE__ */ jsxs("span", {
|
|
69
|
+
className: "font-semibold text-green-500",
|
|
70
|
+
children: [
|
|
71
|
+
"+",
|
|
72
|
+
track.completionRewards.xpBonus,
|
|
73
|
+
" XP"
|
|
74
|
+
]
|
|
75
|
+
}),
|
|
76
|
+
" ",
|
|
77
|
+
"bonus!"
|
|
78
|
+
]
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
})] }),
|
|
82
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
83
|
+
className: "flex items-center gap-2",
|
|
84
|
+
children: [/* @__PURE__ */ jsx("span", { children: "🎯" }), /* @__PURE__ */ jsx("span", { children: "Skill Mastery" })]
|
|
85
|
+
}) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: "flex flex-wrap justify-center gap-6",
|
|
87
|
+
children: [Array.from(surfaces.entries()).map(([surface, data], index) => /* @__PURE__ */ jsx(MasteryRing, {
|
|
88
|
+
label: surface.charAt(0).toUpperCase() + surface.slice(1),
|
|
89
|
+
percentage: data.completed / data.total * 100,
|
|
90
|
+
color: surfaceColors[index % surfaceColors.length],
|
|
91
|
+
size: "lg"
|
|
92
|
+
}, surface)), /* @__PURE__ */ jsx(MasteryRing, {
|
|
93
|
+
label: "Overall",
|
|
94
|
+
percentage: percentComplete,
|
|
95
|
+
color: "violet",
|
|
96
|
+
size: "lg"
|
|
97
|
+
})]
|
|
98
|
+
}) })] }),
|
|
99
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
100
|
+
className: "flex items-center gap-2",
|
|
101
|
+
children: [/* @__PURE__ */ jsx("span", { children: "🏅" }), /* @__PURE__ */ jsx("span", { children: "Badges Earned" })]
|
|
102
|
+
}) }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx(BadgeDisplay, {
|
|
103
|
+
badges: progress.badges,
|
|
104
|
+
size: "lg",
|
|
105
|
+
maxVisible: 10
|
|
106
|
+
}), progress.badges.length === 0 && /* @__PURE__ */ jsx("p", {
|
|
107
|
+
className: "text-muted-foreground text-sm",
|
|
108
|
+
children: "Complete the track to earn your first badge!"
|
|
109
|
+
})] })] }),
|
|
110
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
111
|
+
className: "flex items-center gap-2",
|
|
112
|
+
children: [/* @__PURE__ */ jsx("span", { children: "📊" }), /* @__PURE__ */ jsx("span", { children: "Step Breakdown" })]
|
|
113
|
+
}) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", {
|
|
114
|
+
className: "space-y-2",
|
|
115
|
+
children: track.steps.map((step) => {
|
|
116
|
+
const isCompleted = progress.completedStepIds.includes(step.id);
|
|
117
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
118
|
+
className: "flex items-center justify-between rounded-lg border p-3",
|
|
119
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
120
|
+
className: "flex items-center gap-3",
|
|
121
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
122
|
+
className: isCompleted ? "text-green-500" : "text-muted-foreground",
|
|
123
|
+
children: isCompleted ? "✓" : "○"
|
|
124
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
125
|
+
className: isCompleted ? "text-foreground" : "text-muted-foreground",
|
|
126
|
+
children: step.title
|
|
127
|
+
})]
|
|
128
|
+
}), step.xpReward && /* @__PURE__ */ jsxs("span", {
|
|
129
|
+
className: `text-sm font-medium ${isCompleted ? "text-green-500" : "text-muted-foreground"}`,
|
|
130
|
+
children: [
|
|
131
|
+
isCompleted ? "+" : "",
|
|
132
|
+
step.xpReward,
|
|
133
|
+
" XP"
|
|
134
|
+
]
|
|
135
|
+
})]
|
|
136
|
+
}, step.id);
|
|
137
|
+
})
|
|
138
|
+
}) })] })
|
|
139
|
+
]
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
//#endregion
|
|
144
|
+
export { Progress };
|
|
145
|
+
//# sourceMappingURL=Progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.js","names":["surfaceColors: ('green' | 'blue' | 'violet' | 'orange')[]"],"sources":["../../src/views/Progress.tsx"],"sourcesContent":["'use client';\n\nimport {\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n} from '@lssm/lib.ui-kit-web/ui/card';\nimport { XpBar, BadgeDisplay } from '@lssm/example.learning-journey-ui-shared';\nimport { MasteryRing } from '../components/MasteryRing';\nimport type { LearningViewProps } from '@lssm/example.learning-journey-ui-shared';\n\nexport function Progress({ track, progress }: LearningViewProps) {\n const totalXp =\n track.totalXp ??\n track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0) +\n (track.completionRewards?.xpBonus ?? 0);\n\n const completedSteps = progress.completedStepIds.length;\n const totalSteps = track.steps.length;\n const percentComplete =\n totalSteps > 0 ? (completedSteps / totalSteps) * 100 : 0;\n\n // Group steps by metadata surface for mastery rings\n const surfaces = new Map<string, { total: number; completed: number }>();\n track.steps.forEach((step) => {\n const surface = (step.metadata?.surface as string) ?? 'general';\n const current = surfaces.get(surface) ?? { total: 0, completed: 0 };\n surfaces.set(surface, {\n total: current.total + 1,\n completed:\n current.completed +\n (progress.completedStepIds.includes(step.id) ? 1 : 0),\n });\n });\n\n const surfaceColors: ('green' | 'blue' | 'violet' | 'orange')[] = [\n 'green',\n 'blue',\n 'violet',\n 'orange',\n ];\n\n return (\n <div className=\"space-y-6\">\n {/* XP Progress */}\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <span>⚡</span>\n <span>Experience Points</span>\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n <div className=\"flex items-baseline gap-2\">\n <span className=\"text-4xl font-bold text-violet-500\">\n {progress.xpEarned.toLocaleString()}\n </span>\n <span className=\"text-muted-foreground\">\n / {totalXp.toLocaleString()} XP\n </span>\n </div>\n <XpBar\n current={progress.xpEarned}\n max={totalXp}\n showLabel={false}\n size=\"lg\"\n />\n\n {track.completionRewards?.xpBonus && percentComplete < 100 && (\n <p className=\"text-muted-foreground text-sm\">\n 🎁 Complete all steps for a{' '}\n <span className=\"font-semibold text-green-500\">\n +{track.completionRewards.xpBonus} XP\n </span>{' '}\n bonus!\n </p>\n )}\n </CardContent>\n </Card>\n\n {/* Mastery Rings */}\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <span>🎯</span>\n <span>Skill Mastery</span>\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"flex flex-wrap justify-center gap-6\">\n {Array.from(surfaces.entries()).map(([surface, data], index) => (\n <MasteryRing\n key={surface}\n label={surface.charAt(0).toUpperCase() + surface.slice(1)}\n percentage={(data.completed / data.total) * 100}\n color={surfaceColors[index % surfaceColors.length]}\n size=\"lg\"\n />\n ))}\n <MasteryRing\n label=\"Overall\"\n percentage={percentComplete}\n color=\"violet\"\n size=\"lg\"\n />\n </div>\n </CardContent>\n </Card>\n\n {/* Badges */}\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <span>🏅</span>\n <span>Badges Earned</span>\n </CardTitle>\n </CardHeader>\n <CardContent>\n <BadgeDisplay badges={progress.badges} size=\"lg\" maxVisible={10} />\n {progress.badges.length === 0 && (\n <p className=\"text-muted-foreground text-sm\">\n Complete the track to earn your first badge!\n </p>\n )}\n </CardContent>\n </Card>\n\n {/* Step Breakdown */}\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <span>📊</span>\n <span>Step Breakdown</span>\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"space-y-2\">\n {track.steps.map((step) => {\n const isCompleted = progress.completedStepIds.includes(step.id);\n return (\n <div\n key={step.id}\n className=\"flex items-center justify-between rounded-lg border p-3\"\n >\n <div className=\"flex items-center gap-3\">\n <span\n className={\n isCompleted ? 'text-green-500' : 'text-muted-foreground'\n }\n >\n {isCompleted ? '✓' : '○'}\n </span>\n <span\n className={\n isCompleted\n ? 'text-foreground'\n : 'text-muted-foreground'\n }\n >\n {step.title}\n </span>\n </div>\n {step.xpReward && (\n <span\n className={`text-sm font-medium ${isCompleted ? 'text-green-500' : 'text-muted-foreground'}`}\n >\n {isCompleted ? '+' : ''}\n {step.xpReward} XP\n </span>\n )}\n </div>\n );\n })}\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAYA,SAAgB,SAAS,EAAE,OAAO,YAA+B;CAC/D,MAAM,UACJ,MAAM,WACN,MAAM,MAAM,QAAQ,KAAK,MAAM,OAAO,EAAE,YAAY,IAAI,EAAE,IACvD,MAAM,mBAAmB,WAAW;CAEzC,MAAM,iBAAiB,SAAS,iBAAiB;CACjD,MAAM,aAAa,MAAM,MAAM;CAC/B,MAAM,kBACJ,aAAa,IAAK,iBAAiB,aAAc,MAAM;CAGzD,MAAM,2BAAW,IAAI,KAAmD;AACxE,OAAM,MAAM,SAAS,SAAS;EAC5B,MAAM,UAAW,KAAK,UAAU,WAAsB;EACtD,MAAM,UAAU,SAAS,IAAI,QAAQ,IAAI;GAAE,OAAO;GAAG,WAAW;GAAG;AACnE,WAAS,IAAI,SAAS;GACpB,OAAO,QAAQ,QAAQ;GACvB,WACE,QAAQ,aACP,SAAS,iBAAiB,SAAS,KAAK,GAAG,GAAG,IAAI;GACtD,CAAC;GACF;CAEF,MAAMA,gBAA4D;EAChE;EACA;EACA;EACA;EACD;AAED,QACE,qBAAC;EAAI,WAAU;;GAEb,qBAAC,mBACC,oBAAC,wBACC,qBAAC;IAAU,WAAU;eACnB,oBAAC,oBAAK,MAAQ,EACd,oBAAC,oBAAK,sBAAwB;KACpB,GACD,EACb,qBAAC;IAAY,WAAU;;KACrB,qBAAC;MAAI,WAAU;iBACb,oBAAC;OAAK,WAAU;iBACb,SAAS,SAAS,gBAAgB;QAC9B,EACP,qBAAC;OAAK,WAAU;;QAAwB;QACnC,QAAQ,gBAAgB;QAAC;;QACvB;OACH;KACN,oBAAC;MACC,SAAS,SAAS;MAClB,KAAK;MACL,WAAW;MACX,MAAK;OACL;KAED,MAAM,mBAAmB,WAAW,kBAAkB,OACrD,qBAAC;MAAE,WAAU;;OAAgC;OACf;OAC5B,qBAAC;QAAK,WAAU;;SAA+B;SAC3C,MAAM,kBAAkB;SAAQ;;SAC7B;OAAC;OAAI;;OAEV;;KAEM,IACT;GAGP,qBAAC,mBACC,oBAAC,wBACC,qBAAC;IAAU,WAAU;eACnB,oBAAC,oBAAK,OAAS,EACf,oBAAC,oBAAK,kBAAoB;KAChB,GACD,EACb,oBAAC,yBACC,qBAAC;IAAI,WAAU;eACZ,MAAM,KAAK,SAAS,SAAS,CAAC,CAAC,KAAK,CAAC,SAAS,OAAO,UACpD,oBAAC;KAEC,OAAO,QAAQ,OAAO,EAAE,CAAC,aAAa,GAAG,QAAQ,MAAM,EAAE;KACzD,YAAa,KAAK,YAAY,KAAK,QAAS;KAC5C,OAAO,cAAc,QAAQ,cAAc;KAC3C,MAAK;OAJA,QAKL,CACF,EACF,oBAAC;KACC,OAAM;KACN,YAAY;KACZ,OAAM;KACN,MAAK;MACL;KACE,GACM,IACT;GAGP,qBAAC,mBACC,oBAAC,wBACC,qBAAC;IAAU,WAAU;eACnB,oBAAC,oBAAK,OAAS,EACf,oBAAC,oBAAK,kBAAoB;KAChB,GACD,EACb,qBAAC,0BACC,oBAAC;IAAa,QAAQ,SAAS;IAAQ,MAAK;IAAK,YAAY;KAAM,EAClE,SAAS,OAAO,WAAW,KAC1B,oBAAC;IAAE,WAAU;cAAgC;KAEzC,IAEM,IACT;GAGP,qBAAC,mBACC,oBAAC,wBACC,qBAAC;IAAU,WAAU;eACnB,oBAAC,oBAAK,OAAS,EACf,oBAAC,oBAAK,mBAAqB;KACjB,GACD,EACb,oBAAC,yBACC,oBAAC;IAAI,WAAU;cACZ,MAAM,MAAM,KAAK,SAAS;KACzB,MAAM,cAAc,SAAS,iBAAiB,SAAS,KAAK,GAAG;AAC/D,YACE,qBAAC;MAEC,WAAU;iBAEV,qBAAC;OAAI,WAAU;kBACb,oBAAC;QACC,WACE,cAAc,mBAAmB;kBAGlC,cAAc,MAAM;SAChB,EACP,oBAAC;QACC,WACE,cACI,oBACA;kBAGL,KAAK;SACD;QACH,EACL,KAAK,YACJ,qBAAC;OACC,WAAW,uBAAuB,cAAc,mBAAmB;;QAElE,cAAc,MAAM;QACpB,KAAK;QAAS;;QACV;QA3BJ,KAAK,GA6BN;MAER;KACE,GACM,IACT;;GACH"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
2
|
+
import { LearningViewProps } from "@lssm/example.learning-journey-ui-shared";
|
|
3
|
+
|
|
4
|
+
//#region src/views/Steps.d.ts
|
|
5
|
+
declare function Steps({
|
|
6
|
+
track,
|
|
7
|
+
progress,
|
|
8
|
+
onStepComplete
|
|
9
|
+
}: LearningViewProps): react_jsx_runtime5.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Steps };
|
|
12
|
+
//# sourceMappingURL=Steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Steps.d.ts","names":[],"sources":["../../src/views/Steps.tsx"],"sourcesContent":[],"mappings":";;;;iBAKgB,KAAA;;;;GAA2C,oBAAiB,kBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { FlashCard } from "../components/FlashCard.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/views/Steps.tsx
|
|
7
|
+
function Steps({ track, progress, onStepComplete }) {
|
|
8
|
+
const currentStepIndex = track.steps.findIndex((s) => !progress.completedStepIds.includes(s.id));
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
10
|
+
className: "space-y-6",
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ jsxs("div", {
|
|
13
|
+
className: "text-center",
|
|
14
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
15
|
+
className: "text-xl font-bold",
|
|
16
|
+
children: "Complete Your Challenges"
|
|
17
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
18
|
+
className: "text-muted-foreground",
|
|
19
|
+
children: "Tap each card to reveal the action, then mark as complete"
|
|
20
|
+
})]
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ jsx("div", {
|
|
23
|
+
className: "grid gap-4 md:grid-cols-2",
|
|
24
|
+
children: track.steps.map((step, index) => {
|
|
25
|
+
return /* @__PURE__ */ jsx(FlashCard, {
|
|
26
|
+
step,
|
|
27
|
+
isCompleted: progress.completedStepIds.includes(step.id),
|
|
28
|
+
isCurrent: index === currentStepIndex,
|
|
29
|
+
onComplete: () => onStepComplete?.(step.id)
|
|
30
|
+
}, step.id);
|
|
31
|
+
})
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ jsxs("div", {
|
|
34
|
+
className: "text-muted-foreground text-center text-sm",
|
|
35
|
+
children: [
|
|
36
|
+
progress.completedStepIds.length,
|
|
37
|
+
" of ",
|
|
38
|
+
track.steps.length,
|
|
39
|
+
" completed",
|
|
40
|
+
track.completionRewards?.xpBonus && /* @__PURE__ */ jsxs("span", {
|
|
41
|
+
className: "ml-2 text-green-500",
|
|
42
|
+
children: [
|
|
43
|
+
"(+",
|
|
44
|
+
track.completionRewards.xpBonus,
|
|
45
|
+
" XP bonus on completion)"
|
|
46
|
+
]
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
export { Steps };
|
|
56
|
+
//# sourceMappingURL=Steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Steps.js","names":[],"sources":["../../src/views/Steps.tsx"],"sourcesContent":["'use client';\n\nimport { FlashCard } from '../components/FlashCard';\nimport type { LearningViewProps } from '@lssm/example.learning-journey-ui-shared';\n\nexport function Steps({ track, progress, onStepComplete }: LearningViewProps) {\n const currentStepIndex = track.steps.findIndex(\n (s) => !progress.completedStepIds.includes(s.id)\n );\n\n return (\n <div className=\"space-y-6\">\n {/* Header */}\n <div className=\"text-center\">\n <h2 className=\"text-xl font-bold\">Complete Your Challenges</h2>\n <p className=\"text-muted-foreground\">\n Tap each card to reveal the action, then mark as complete\n </p>\n </div>\n\n {/* Card Stack */}\n <div className=\"grid gap-4 md:grid-cols-2\">\n {track.steps.map((step, index) => {\n const isCompleted = progress.completedStepIds.includes(step.id);\n const isCurrent = index === currentStepIndex;\n\n return (\n <FlashCard\n key={step.id}\n step={step}\n isCompleted={isCompleted}\n isCurrent={isCurrent}\n onComplete={() => onStepComplete?.(step.id)}\n />\n );\n })}\n </div>\n\n {/* Progress Summary */}\n <div className=\"text-muted-foreground text-center text-sm\">\n {progress.completedStepIds.length} of {track.steps.length} completed\n {track.completionRewards?.xpBonus && (\n <span className=\"ml-2 text-green-500\">\n (+{track.completionRewards.xpBonus} XP bonus on completion)\n </span>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;AAKA,SAAgB,MAAM,EAAE,OAAO,UAAU,kBAAqC;CAC5E,MAAM,mBAAmB,MAAM,MAAM,WAClC,MAAM,CAAC,SAAS,iBAAiB,SAAS,EAAE,GAAG,CACjD;AAED,QACE,qBAAC;EAAI,WAAU;;GAEb,qBAAC;IAAI,WAAU;eACb,oBAAC;KAAG,WAAU;eAAoB;MAA6B,EAC/D,oBAAC;KAAE,WAAU;eAAwB;MAEjC;KACA;GAGN,oBAAC;IAAI,WAAU;cACZ,MAAM,MAAM,KAAK,MAAM,UAAU;AAIhC,YACE,oBAAC;MAEO;MACN,aAPgB,SAAS,iBAAiB,SAAS,KAAK,GAAG;MAQ3D,WAPc,UAAU;MAQxB,kBAAkB,iBAAiB,KAAK,GAAG;QAJtC,KAAK,GAKV;MAEJ;KACE;GAGN,qBAAC;IAAI,WAAU;;KACZ,SAAS,iBAAiB;KAAO;KAAK,MAAM,MAAM;KAAO;KACzD,MAAM,mBAAmB,WACxB,qBAAC;MAAK,WAAU;;OAAsB;OACjC,MAAM,kBAAkB;OAAQ;;OAC9B;;KAEL;;GACF"}
|