@lssm/example.learning-journey-ui-onboarding 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 +486 -22
- package/.turbo/turbo-build.log +487 -24
- package/CHANGELOG.md +10 -10
- package/LICENSE +21 -0
- package/dist/OnboardingMiniApp.d.ts +17 -0
- package/dist/OnboardingMiniApp.d.ts.map +1 -0
- package/dist/OnboardingMiniApp.js +65 -0
- package/dist/OnboardingMiniApp.js.map +1 -0
- package/dist/components/CodeSnippet.d.ts +16 -0
- package/dist/components/CodeSnippet.d.ts.map +1 -0
- package/dist/{components-OUN5S2z0.mjs → components/CodeSnippet.js} +5 -2
- package/dist/components/CodeSnippet.js.map +1 -0
- package/dist/components/JourneyMap.d.ts +17 -0
- package/dist/components/JourneyMap.d.ts.map +1 -0
- package/dist/components/JourneyMap.js +49 -0
- package/dist/components/JourneyMap.js.map +1 -0
- package/dist/components/StepChecklist.d.ts +25 -0
- package/dist/components/StepChecklist.d.ts.map +1 -0
- package/dist/{JourneyMap-CZ47DksM.mjs → components/StepChecklist.js} +6 -46
- package/dist/components/StepChecklist.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-onboarding.docblock.d.ts +1 -0
- package/dist/docs/learning-journey-ui-onboarding.docblock.js +21 -0
- package/dist/docs/learning-journey-ui-onboarding.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 +4 -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-core/dist/utils.js +11 -0
- package/dist/libs/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/progress.js +24 -0
- package/dist/libs/ui-kit-web/dist/ui/progress.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 +181 -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 +163 -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 +92 -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 +98 -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 +29 -19
- package/tsconfig.tsbuildinfo +1 -1
- package/tsdown.config.js +14 -10
- package/dist/components/index.d.mts +0 -2
- package/dist/components/index.mjs +0 -4
- package/dist/index-BNYp4weX.d.mts +0 -33
- package/dist/index-BsbXKz4M.d.mts +0 -48
- package/dist/index.mjs +0 -110
- package/dist/views/index.d.mts +0 -2
- package/dist/views/index.mjs +0 -4
- package/dist/views-BS9u6UnM.mjs +0 -504
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../../../../libs/ui-kit-core/dist/utils.js"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n//#region src/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,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,24 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../ui-kit-core/dist/utils.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
7
|
+
|
|
8
|
+
//#region ../../libs/ui-kit-web/dist/ui/progress.js
|
|
9
|
+
function Progress({ className, value, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(ProgressPrimitive.Root, {
|
|
11
|
+
"data-slot": "progress",
|
|
12
|
+
className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
|
|
13
|
+
...props,
|
|
14
|
+
children: /* @__PURE__ */ jsx(ProgressPrimitive.Indicator, {
|
|
15
|
+
"data-slot": "progress-indicator",
|
|
16
|
+
className: "bg-primary h-full w-full flex-1 transition-all",
|
|
17
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Progress };
|
|
24
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","names":[],"sources":["../../../../../../../libs/ui-kit-web/dist/ui/progress.js"],"sourcesContent":["'use client';\n\nimport { cn } from \"../ui-kit-core/dist/utils.js\";\nimport \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\n\n//#region ui/progress.tsx\nfunction Progress({ className, value, ...props }) {\n\treturn /* @__PURE__ */ jsx(ProgressPrimitive.Root, {\n\t\t\"data-slot\": \"progress\",\n\t\tclassName: cn(\"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\", className),\n\t\t...props,\n\t\tchildren: /* @__PURE__ */ jsx(ProgressPrimitive.Indicator, {\n\t\t\t\"data-slot\": \"progress-indicator\",\n\t\t\tclassName: \"bg-primary h-full w-full flex-1 transition-all\",\n\t\t\tstyle: { transform: `translateX(-${100 - (value || 0)}%)` }\n\t\t})\n\t});\n}\n\n//#endregion\nexport { Progress };\n//# sourceMappingURL=progress.js.map"],"mappings":";;;;;;;;AAQA,SAAS,SAAS,EAAE,WAAW,OAAO,GAAG,SAAS;AACjD,QAAuB,oBAAI,kBAAkB,MAAM;EAClD,aAAa;EACb,WAAW,GAAG,kEAAkE,UAAU;EAC1F,GAAG;EACH,UAA0B,oBAAI,kBAAkB,WAAW;GAC1D,aAAa;GACb,WAAW;GACX,OAAO,EAAE,WAAW,eAAe,OAAO,SAAS,GAAG,KAAK;GAC3D,CAAC;EACF,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_runtime3 from "react/jsx-runtime";
|
|
2
|
+
import { LearningViewProps } from "@lssm/example.learning-journey-ui-shared";
|
|
3
|
+
|
|
4
|
+
//#region src/views/Overview.d.ts
|
|
5
|
+
interface OnboardingOverviewProps extends LearningViewProps {
|
|
6
|
+
onStart?: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare function Overview({
|
|
9
|
+
track,
|
|
10
|
+
progress,
|
|
11
|
+
onStart
|
|
12
|
+
}: OnboardingOverviewProps): react_jsx_runtime3.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":";;;;UAaU,uBAAA,SAAgC;;;AAAhC,iBAIM,QAAA,CAJkB;EAAA,KAAA;EAAQ,QAAA;EAAA;AAAiB,CAAA,EAQxD,uBARwD,CAAA,EAQjC,kBAAA,CAAA,GAAA,CAAA,OARiC"}
|
|
@@ -0,0 +1,181 @@
|
|
|
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 "../examples/learning-journey-ui-shared/dist/index.js";
|
|
6
|
+
import { Button } from "../libs/design-system/dist/components/atoms/Button.js";
|
|
7
|
+
import { Progress } from "../libs/ui-kit-web/dist/ui/progress.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
|
|
10
|
+
//#region src/views/Overview.tsx
|
|
11
|
+
function Overview({ track, progress, onStart }) {
|
|
12
|
+
const totalSteps = track.steps.length;
|
|
13
|
+
const completedSteps = progress.completedStepIds.length;
|
|
14
|
+
const percentComplete = totalSteps > 0 ? completedSteps / totalSteps * 100 : 0;
|
|
15
|
+
const isComplete = completedSteps === totalSteps;
|
|
16
|
+
const remainingSteps = totalSteps - completedSteps;
|
|
17
|
+
const estimatedMinutes = remainingSteps * 5;
|
|
18
|
+
const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0) + (track.completionRewards?.xpBonus ?? 0);
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
20
|
+
className: "space-y-6",
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ jsx(Card, {
|
|
23
|
+
className: "overflow-hidden bg-gradient-to-r from-blue-500/10 via-violet-500/10 to-purple-500/10",
|
|
24
|
+
children: /* @__PURE__ */ jsx(CardContent, {
|
|
25
|
+
className: "p-8",
|
|
26
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
className: "flex flex-col items-center gap-6 text-center md:flex-row md:text-left",
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsx("div", {
|
|
30
|
+
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",
|
|
31
|
+
children: isComplete ? "🎉" : "🚀"
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ jsxs("div", {
|
|
34
|
+
className: "flex-1",
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsx("h1", {
|
|
37
|
+
className: "text-2xl font-bold",
|
|
38
|
+
children: track.name
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ jsx("p", {
|
|
41
|
+
className: "text-muted-foreground mt-1 max-w-2xl",
|
|
42
|
+
children: track.description
|
|
43
|
+
}),
|
|
44
|
+
!isComplete && /* @__PURE__ */ jsxs("p", {
|
|
45
|
+
className: "text-muted-foreground mt-3 text-sm",
|
|
46
|
+
children: [
|
|
47
|
+
"⏱️ Estimated time:",
|
|
48
|
+
" ",
|
|
49
|
+
estimatedMinutes > 0 ? `~${estimatedMinutes} minutes` : "Less than a minute"
|
|
50
|
+
]
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
}),
|
|
54
|
+
!isComplete && /* @__PURE__ */ jsx(Button, {
|
|
55
|
+
size: "lg",
|
|
56
|
+
onClick: onStart,
|
|
57
|
+
children: completedSteps > 0 ? "Continue" : "Get Started"
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ jsxs("div", {
|
|
64
|
+
className: "grid gap-4 md:grid-cols-3",
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
67
|
+
className: "pb-2",
|
|
68
|
+
children: /* @__PURE__ */ jsx(CardTitle, {
|
|
69
|
+
className: "text-muted-foreground text-sm font-medium",
|
|
70
|
+
children: "Progress"
|
|
71
|
+
})
|
|
72
|
+
}), /* @__PURE__ */ jsxs(CardContent, { children: [
|
|
73
|
+
/* @__PURE__ */ jsxs("div", {
|
|
74
|
+
className: "text-3xl font-bold",
|
|
75
|
+
children: [Math.round(percentComplete), "%"]
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ jsx(Progress, {
|
|
78
|
+
value: percentComplete,
|
|
79
|
+
className: "mt-2 h-2"
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ jsxs("p", {
|
|
82
|
+
className: "text-muted-foreground mt-2 text-sm",
|
|
83
|
+
children: [
|
|
84
|
+
completedSteps,
|
|
85
|
+
" of ",
|
|
86
|
+
totalSteps,
|
|
87
|
+
" steps completed"
|
|
88
|
+
]
|
|
89
|
+
})
|
|
90
|
+
] })] }),
|
|
91
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
92
|
+
className: "pb-2",
|
|
93
|
+
children: /* @__PURE__ */ jsx(CardTitle, {
|
|
94
|
+
className: "text-muted-foreground text-sm font-medium",
|
|
95
|
+
children: "XP Earned"
|
|
96
|
+
})
|
|
97
|
+
}), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx("div", {
|
|
98
|
+
className: "text-3xl font-bold text-blue-500",
|
|
99
|
+
children: progress.xpEarned
|
|
100
|
+
}), /* @__PURE__ */ jsx(XpBar, {
|
|
101
|
+
current: progress.xpEarned,
|
|
102
|
+
max: totalXp,
|
|
103
|
+
showLabel: false,
|
|
104
|
+
size: "sm"
|
|
105
|
+
})] })] }),
|
|
106
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
107
|
+
className: "pb-2",
|
|
108
|
+
children: /* @__PURE__ */ jsx(CardTitle, {
|
|
109
|
+
className: "text-muted-foreground text-sm font-medium",
|
|
110
|
+
children: "Time Remaining"
|
|
111
|
+
})
|
|
112
|
+
}), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx("div", {
|
|
113
|
+
className: "text-3xl font-bold",
|
|
114
|
+
children: isComplete ? "✓" : `~${estimatedMinutes}m`
|
|
115
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
116
|
+
className: "text-muted-foreground mt-2 text-sm",
|
|
117
|
+
children: isComplete ? "All done!" : `${remainingSteps} steps to go`
|
|
118
|
+
})] })] })
|
|
119
|
+
]
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
122
|
+
className: "flex items-center gap-2",
|
|
123
|
+
children: [/* @__PURE__ */ jsx("span", { children: "📋" }), /* @__PURE__ */ jsx("span", { children: "Your Journey" })]
|
|
124
|
+
}) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", {
|
|
125
|
+
className: "space-y-3",
|
|
126
|
+
children: track.steps.map((step, index) => {
|
|
127
|
+
const isStepCompleted = progress.completedStepIds.includes(step.id);
|
|
128
|
+
const isCurrent = !isStepCompleted && track.steps.slice(0, index).every((s) => progress.completedStepIds.includes(s.id));
|
|
129
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
130
|
+
className: "flex items-center gap-4 rounded-lg border p-3",
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ jsx("div", {
|
|
133
|
+
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"}`,
|
|
134
|
+
children: isStepCompleted ? "✓" : index + 1
|
|
135
|
+
}),
|
|
136
|
+
/* @__PURE__ */ jsx("div", {
|
|
137
|
+
className: "min-w-0 flex-1",
|
|
138
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
139
|
+
className: `font-medium ${isStepCompleted ? "text-green-500" : isCurrent ? "text-foreground" : "text-muted-foreground"}`,
|
|
140
|
+
children: step.title
|
|
141
|
+
})
|
|
142
|
+
}),
|
|
143
|
+
step.xpReward && /* @__PURE__ */ jsxs("span", {
|
|
144
|
+
className: "text-muted-foreground text-sm",
|
|
145
|
+
children: [
|
|
146
|
+
"+",
|
|
147
|
+
step.xpReward,
|
|
148
|
+
" XP"
|
|
149
|
+
]
|
|
150
|
+
})
|
|
151
|
+
]
|
|
152
|
+
}, step.id);
|
|
153
|
+
})
|
|
154
|
+
}) })] }),
|
|
155
|
+
isComplete && /* @__PURE__ */ jsx(Card, {
|
|
156
|
+
className: "border-green-500/50 bg-green-500/5",
|
|
157
|
+
children: /* @__PURE__ */ jsxs(CardContent, {
|
|
158
|
+
className: "flex items-center gap-4 p-6",
|
|
159
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
160
|
+
className: "text-4xl",
|
|
161
|
+
children: "🎉"
|
|
162
|
+
}), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
163
|
+
className: "text-lg font-semibold text-green-500",
|
|
164
|
+
children: "Onboarding Complete!"
|
|
165
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
166
|
+
className: "text-muted-foreground",
|
|
167
|
+
children: [
|
|
168
|
+
"You've completed all ",
|
|
169
|
+
totalSteps,
|
|
170
|
+
" steps. Welcome aboard!"
|
|
171
|
+
]
|
|
172
|
+
})] })]
|
|
173
|
+
})
|
|
174
|
+
})
|
|
175
|
+
]
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
//#endregion
|
|
180
|
+
export { Overview };
|
|
181
|
+
//# 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 { Progress } from '@lssm/lib.ui-kit-web/ui/progress';\nimport { XpBar } from '@lssm/example.learning-journey-ui-shared';\nimport type { LearningViewProps } from '@lssm/example.learning-journey-ui-shared';\n\ninterface OnboardingOverviewProps extends LearningViewProps {\n onStart?: () => void;\n}\n\nexport function Overview({\n track,\n progress,\n onStart,\n}: OnboardingOverviewProps) {\n const totalSteps = track.steps.length;\n const completedSteps = progress.completedStepIds.length;\n const percentComplete =\n totalSteps > 0 ? (completedSteps / totalSteps) * 100 : 0;\n const isComplete = completedSteps === totalSteps;\n\n // Estimate time remaining (rough: 5 min per step)\n const remainingSteps = totalSteps - completedSteps;\n const estimatedMinutes = remainingSteps * 5;\n\n const totalXp =\n track.totalXp ??\n track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0) +\n (track.completionRewards?.xpBonus ?? 0);\n\n return (\n <div className=\"space-y-6\">\n {/* Welcome Banner */}\n <Card className=\"overflow-hidden bg-gradient-to-r from-blue-500/10 via-violet-500/10 to-purple-500/10\">\n <CardContent className=\"p-8\">\n <div className=\"flex flex-col items-center gap-6 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-blue-500 to-violet-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 max-w-2xl\">\n {track.description}\n </p>\n {!isComplete && (\n <p className=\"text-muted-foreground mt-3 text-sm\">\n ⏱️ Estimated time:{' '}\n {estimatedMinutes > 0\n ? `~${estimatedMinutes} minutes`\n : 'Less than a minute'}\n </p>\n )}\n </div>\n {!isComplete && (\n <Button size=\"lg\" onClick={onStart}>\n {completedSteps > 0 ? 'Continue' : 'Get Started'}\n </Button>\n )}\n </div>\n </CardContent>\n </Card>\n\n {/* Progress Overview */}\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 Progress\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"text-3xl font-bold\">\n {Math.round(percentComplete)}%\n </div>\n <Progress value={percentComplete} className=\"mt-2 h-2\" />\n <p className=\"text-muted-foreground mt-2 text-sm\">\n {completedSteps} of {totalSteps} steps completed\n </p>\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader className=\"pb-2\">\n <CardTitle className=\"text-muted-foreground text-sm font-medium\">\n XP Earned\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"text-3xl font-bold text-blue-500\">\n {progress.xpEarned}\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 Time Remaining\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"text-3xl font-bold\">\n {isComplete ? '✓' : `~${estimatedMinutes}m`}\n </div>\n <p className=\"text-muted-foreground mt-2 text-sm\">\n {isComplete ? 'All done!' : `${remainingSteps} steps to go`}\n </p>\n </CardContent>\n </Card>\n </div>\n\n {/* Step Preview */}\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <span>📋</span>\n <span>Your Journey</span>\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"space-y-3\">\n {track.steps.map((step, index) => {\n const isStepCompleted = progress.completedStepIds.includes(\n step.id\n );\n const isCurrent =\n !isStepCompleted &&\n track.steps\n .slice(0, index)\n .every((s) => progress.completedStepIds.includes(s.id));\n\n return (\n <div\n key={step.id}\n className=\"flex items-center gap-4 rounded-lg border p-3\"\n >\n <div\n className={`flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-sm font-semibold ${\n isStepCompleted\n ? 'bg-green-500 text-white'\n : isCurrent\n ? 'bg-blue-500 text-white'\n : 'bg-muted text-muted-foreground'\n }`}\n >\n {isStepCompleted ? '✓' : index + 1}\n </div>\n <div className=\"min-w-0 flex-1\">\n <p\n className={`font-medium ${\n isStepCompleted\n ? 'text-green-500'\n : isCurrent\n ? 'text-foreground'\n : 'text-muted-foreground'\n }`}\n >\n {step.title}\n </p>\n </div>\n {step.xpReward && (\n <span className=\"text-muted-foreground text-sm\">\n +{step.xpReward} XP\n </span>\n )}\n </div>\n );\n })}\n </div>\n </CardContent>\n </Card>\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 Onboarding Complete!\n </h3>\n <p className=\"text-muted-foreground\">\n You've completed all {totalSteps} steps. Welcome aboard!\n </p>\n </div>\n </CardContent>\n </Card>\n )}\n </div>\n );\n}\n"],"mappings":"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"}
|
|
@@ -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 ProgressView({
|
|
6
|
+
track,
|
|
7
|
+
progress
|
|
8
|
+
}: LearningViewProps): react_jsx_runtime4.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ProgressView as Progress, ProgressView };
|
|
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,YAAA;;;GAAkC,oBAAiB,kBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,163 @@
|
|
|
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 { Progress } from "../libs/ui-kit-web/dist/ui/progress.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
|
|
10
|
+
//#region src/views/Progress.tsx
|
|
11
|
+
function ProgressView({ track, progress }) {
|
|
12
|
+
const totalSteps = track.steps.length;
|
|
13
|
+
const completedSteps = progress.completedStepIds.length;
|
|
14
|
+
const percentComplete = totalSteps > 0 ? completedSteps / totalSteps * 100 : 0;
|
|
15
|
+
const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0) + (track.completionRewards?.xpBonus ?? 0);
|
|
16
|
+
const remainingSteps = totalSteps - completedSteps;
|
|
17
|
+
const estimatedMinutes = remainingSteps * 5;
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
19
|
+
className: "space-y-6",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
22
|
+
className: "flex items-center gap-2",
|
|
23
|
+
children: [/* @__PURE__ */ jsx("span", { children: "📈" }), /* @__PURE__ */ jsx("span", { children: "Your Progress" })]
|
|
24
|
+
}) }), /* @__PURE__ */ jsxs(CardContent, {
|
|
25
|
+
className: "space-y-6",
|
|
26
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
27
|
+
className: "flex items-center justify-center",
|
|
28
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
29
|
+
className: "relative flex h-40 w-40 items-center justify-center",
|
|
30
|
+
children: [/* @__PURE__ */ jsxs("svg", {
|
|
31
|
+
className: "absolute h-full w-full -rotate-90",
|
|
32
|
+
viewBox: "0 0 100 100",
|
|
33
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
34
|
+
cx: "50",
|
|
35
|
+
cy: "50",
|
|
36
|
+
r: "45",
|
|
37
|
+
fill: "none",
|
|
38
|
+
strokeWidth: "8",
|
|
39
|
+
className: "stroke-muted"
|
|
40
|
+
}), /* @__PURE__ */ jsx("circle", {
|
|
41
|
+
cx: "50",
|
|
42
|
+
cy: "50",
|
|
43
|
+
r: "45",
|
|
44
|
+
fill: "none",
|
|
45
|
+
strokeWidth: "8",
|
|
46
|
+
strokeLinecap: "round",
|
|
47
|
+
strokeDasharray: `${percentComplete * 2.83} 283`,
|
|
48
|
+
className: "stroke-blue-500 transition-all duration-500"
|
|
49
|
+
})]
|
|
50
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
51
|
+
className: "text-center",
|
|
52
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
53
|
+
className: "text-3xl font-bold",
|
|
54
|
+
children: [Math.round(percentComplete), "%"]
|
|
55
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
56
|
+
className: "text-muted-foreground text-sm",
|
|
57
|
+
children: "Complete"
|
|
58
|
+
})]
|
|
59
|
+
})]
|
|
60
|
+
})
|
|
61
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
62
|
+
className: "grid grid-cols-3 gap-4 text-center",
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
65
|
+
className: "text-2xl font-bold text-green-500",
|
|
66
|
+
children: completedSteps
|
|
67
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
68
|
+
className: "text-muted-foreground text-sm",
|
|
69
|
+
children: "Completed"
|
|
70
|
+
})] }),
|
|
71
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
72
|
+
className: "text-2xl font-bold text-orange-500",
|
|
73
|
+
children: remainingSteps
|
|
74
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
75
|
+
className: "text-muted-foreground text-sm",
|
|
76
|
+
children: "Remaining"
|
|
77
|
+
})] }),
|
|
78
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("div", {
|
|
79
|
+
className: "text-2xl font-bold",
|
|
80
|
+
children: [estimatedMinutes, "m"]
|
|
81
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
82
|
+
className: "text-muted-foreground text-sm",
|
|
83
|
+
children: "Est. Time"
|
|
84
|
+
})] })
|
|
85
|
+
]
|
|
86
|
+
})]
|
|
87
|
+
})] }),
|
|
88
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
89
|
+
className: "flex items-center gap-2",
|
|
90
|
+
children: [/* @__PURE__ */ jsx("span", { children: "⚡" }), /* @__PURE__ */ jsx("span", { children: "Experience Points" })]
|
|
91
|
+
}) }), /* @__PURE__ */ jsxs(CardContent, {
|
|
92
|
+
className: "space-y-4",
|
|
93
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
94
|
+
className: "flex items-baseline gap-2",
|
|
95
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
96
|
+
className: "text-3xl font-bold text-blue-500",
|
|
97
|
+
children: progress.xpEarned
|
|
98
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
99
|
+
className: "text-muted-foreground",
|
|
100
|
+
children: [
|
|
101
|
+
"/ ",
|
|
102
|
+
totalXp,
|
|
103
|
+
" XP"
|
|
104
|
+
]
|
|
105
|
+
})]
|
|
106
|
+
}), /* @__PURE__ */ jsx(XpBar, {
|
|
107
|
+
current: progress.xpEarned,
|
|
108
|
+
max: totalXp,
|
|
109
|
+
showLabel: false,
|
|
110
|
+
size: "lg"
|
|
111
|
+
})]
|
|
112
|
+
})] }),
|
|
113
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
114
|
+
className: "flex items-center gap-2",
|
|
115
|
+
children: [/* @__PURE__ */ jsx("span", { children: "🏅" }), /* @__PURE__ */ jsx("span", { children: "Achievements" })]
|
|
116
|
+
}) }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx(BadgeDisplay, {
|
|
117
|
+
badges: progress.badges,
|
|
118
|
+
size: "lg"
|
|
119
|
+
}), progress.badges.length === 0 && track.completionRewards?.badgeKey && /* @__PURE__ */ jsxs("p", {
|
|
120
|
+
className: "text-muted-foreground text-sm",
|
|
121
|
+
children: [
|
|
122
|
+
"Complete all steps to earn the \"",
|
|
123
|
+
track.completionRewards.badgeKey,
|
|
124
|
+
"\" badge!"
|
|
125
|
+
]
|
|
126
|
+
})] })] }),
|
|
127
|
+
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
128
|
+
className: "flex items-center gap-2",
|
|
129
|
+
children: [/* @__PURE__ */ jsx("span", { children: "📋" }), /* @__PURE__ */ jsx("span", { children: "Step Details" })]
|
|
130
|
+
}) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", {
|
|
131
|
+
className: "space-y-3",
|
|
132
|
+
children: track.steps.map((step, index) => {
|
|
133
|
+
const isCompleted = progress.completedStepIds.includes(step.id);
|
|
134
|
+
const stepProgress = isCompleted ? 100 : 0;
|
|
135
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
136
|
+
className: "space-y-1",
|
|
137
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
138
|
+
className: "flex items-center justify-between text-sm",
|
|
139
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
140
|
+
className: isCompleted ? "text-green-500" : "text-foreground",
|
|
141
|
+
children: [
|
|
142
|
+
index + 1,
|
|
143
|
+
". ",
|
|
144
|
+
step.title
|
|
145
|
+
]
|
|
146
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
147
|
+
className: isCompleted ? "text-green-500" : "text-muted-foreground",
|
|
148
|
+
children: isCompleted ? "✓" : "Pending"
|
|
149
|
+
})]
|
|
150
|
+
}), /* @__PURE__ */ jsx(Progress, {
|
|
151
|
+
value: stepProgress,
|
|
152
|
+
className: "h-1"
|
|
153
|
+
})]
|
|
154
|
+
}, step.id);
|
|
155
|
+
})
|
|
156
|
+
}) })] })
|
|
157
|
+
]
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
//#endregion
|
|
162
|
+
export { ProgressView as Progress, ProgressView };
|
|
163
|
+
//# sourceMappingURL=Progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.js","names":[],"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 { Progress } from '@lssm/lib.ui-kit-web/ui/progress';\nimport { XpBar, BadgeDisplay } from '@lssm/example.learning-journey-ui-shared';\nimport type { LearningViewProps } from '@lssm/example.learning-journey-ui-shared';\n\nexport function ProgressView({ track, progress }: LearningViewProps) {\n const totalSteps = track.steps.length;\n const completedSteps = progress.completedStepIds.length;\n const percentComplete =\n totalSteps > 0 ? (completedSteps / totalSteps) * 100 : 0;\n\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 remainingSteps = totalSteps - completedSteps;\n const estimatedMinutes = remainingSteps * 5;\n\n return (\n <div className=\"space-y-6\">\n {/* Main Progress */}\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <span>📈</span>\n <span>Your Progress</span>\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-6\">\n {/* Circular progress indicator */}\n <div className=\"flex items-center justify-center\">\n <div className=\"relative flex h-40 w-40 items-center justify-center\">\n <svg\n className=\"absolute h-full w-full -rotate-90\"\n viewBox=\"0 0 100 100\"\n >\n <circle\n cx=\"50\"\n cy=\"50\"\n r=\"45\"\n fill=\"none\"\n strokeWidth=\"8\"\n className=\"stroke-muted\"\n />\n <circle\n cx=\"50\"\n cy=\"50\"\n r=\"45\"\n fill=\"none\"\n strokeWidth=\"8\"\n strokeLinecap=\"round\"\n strokeDasharray={`${percentComplete * 2.83} 283`}\n className=\"stroke-blue-500 transition-all duration-500\"\n />\n </svg>\n <div className=\"text-center\">\n <div className=\"text-3xl font-bold\">\n {Math.round(percentComplete)}%\n </div>\n <div className=\"text-muted-foreground text-sm\">Complete</div>\n </div>\n </div>\n </div>\n\n {/* Stats row */}\n <div className=\"grid grid-cols-3 gap-4 text-center\">\n <div>\n <div className=\"text-2xl font-bold text-green-500\">\n {completedSteps}\n </div>\n <div className=\"text-muted-foreground text-sm\">Completed</div>\n </div>\n <div>\n <div className=\"text-2xl font-bold text-orange-500\">\n {remainingSteps}\n </div>\n <div className=\"text-muted-foreground text-sm\">Remaining</div>\n </div>\n <div>\n <div className=\"text-2xl font-bold\">{estimatedMinutes}m</div>\n <div className=\"text-muted-foreground text-sm\">Est. Time</div>\n </div>\n </div>\n </CardContent>\n </Card>\n\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-3xl font-bold text-blue-500\">\n {progress.xpEarned}\n </span>\n <span className=\"text-muted-foreground\">/ {totalXp} XP</span>\n </div>\n <XpBar\n current={progress.xpEarned}\n max={totalXp}\n showLabel={false}\n size=\"lg\"\n />\n </CardContent>\n </Card>\n\n {/* Badges */}\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <span>🏅</span>\n <span>Achievements</span>\n </CardTitle>\n </CardHeader>\n <CardContent>\n <BadgeDisplay badges={progress.badges} size=\"lg\" />\n {progress.badges.length === 0 &&\n track.completionRewards?.badgeKey && (\n <p className=\"text-muted-foreground text-sm\">\n Complete all steps to earn the \"\n {track.completionRewards.badgeKey}\" badge!\n </p>\n )}\n </CardContent>\n </Card>\n\n {/* Step-by-step breakdown */}\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <span>📋</span>\n <span>Step Details</span>\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"space-y-3\">\n {track.steps.map((step, index) => {\n const isCompleted = progress.completedStepIds.includes(step.id);\n const stepProgress = isCompleted ? 100 : 0;\n\n return (\n <div key={step.id} className=\"space-y-1\">\n <div className=\"flex items-center justify-between text-sm\">\n <span\n className={\n isCompleted ? 'text-green-500' : 'text-foreground'\n }\n >\n {index + 1}. {step.title}\n </span>\n <span\n className={\n isCompleted ? 'text-green-500' : 'text-muted-foreground'\n }\n >\n {isCompleted ? '✓' : 'Pending'}\n </span>\n </div>\n <Progress value={stepProgress} className=\"h-1\" />\n </div>\n );\n })}\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n\n// Re-export with correct name\nexport { ProgressView as Progress };\n"],"mappings":"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"}
|