@vadimcomanescu/nadicode-design-system 2.0.8 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/.agents/skills/seed/SKILL.md +19 -10
  2. package/.agents/skills/seed/contract.md +9 -2
  3. package/.agents/skills/seed/references/blocks.md +5 -5
  4. package/.agents/skills/seed/references/components.md +2 -2
  5. package/.agents/skills/seed/references/nextjs.md +2 -2
  6. package/README.md +3 -3
  7. package/contracts/consumer-intent-map.json +1 -2
  8. package/contracts/release-governance-baseline.json +3 -37
  9. package/dist/catalog/catalog.d.ts +2220 -0
  10. package/dist/catalog/catalog.js +1913 -0
  11. package/dist/catalog/components.d.ts +201 -0
  12. package/dist/catalog/components.js +407 -0
  13. package/dist/catalog/types.d.ts +4 -0
  14. package/dist/catalog/types.js +1 -0
  15. package/dist/chunk-224KPIOG.js +60 -0
  16. package/dist/chunk-25BOZMXA.js +169 -0
  17. package/dist/chunk-32OLQ7FC.js +130 -0
  18. package/dist/chunk-3JJBJ4VR.js +47 -0
  19. package/dist/chunk-3U56FXYC.js +30 -0
  20. package/dist/chunk-4MWKE6F5.js +86 -0
  21. package/dist/chunk-6HGSU24S.js +94 -0
  22. package/dist/chunk-7IADIXDV.js +168 -0
  23. package/dist/chunk-7NS3VFD7.js +86 -0
  24. package/dist/chunk-7XLZCXUL.js +175 -0
  25. package/dist/chunk-ALA6OM7K.js +134 -0
  26. package/dist/chunk-AN5TW4AL.js +50 -0
  27. package/dist/chunk-AWZFQQGN.js +167 -0
  28. package/dist/chunk-BRCBJ3S4.js +42 -0
  29. package/dist/chunk-BRICSLHJ.js +30 -0
  30. package/dist/chunk-BYEHHZZN.js +115 -0
  31. package/dist/chunk-C33GUEDY.js +149 -0
  32. package/dist/chunk-CUDMDYKE.js +150 -0
  33. package/dist/chunk-CVTMWSNS.js +145 -0
  34. package/dist/chunk-DEZXWNYF.js +165 -0
  35. package/dist/chunk-DNJEVMDY.js +40 -0
  36. package/dist/chunk-DNJOBML6.js +66 -0
  37. package/dist/chunk-FTGFOK6T.js +69 -0
  38. package/dist/chunk-HFBJ6L6O.js +104 -0
  39. package/dist/chunk-HPTHS7SX.js +52 -0
  40. package/dist/chunk-KNR3WB5C.js +147 -0
  41. package/dist/chunk-KQ7ZC6EM.js +66 -0
  42. package/dist/chunk-LGW7FVG5.js +83 -0
  43. package/dist/chunk-LP6ZZYOQ.js +36 -0
  44. package/dist/chunk-LV4P7WVM.js +54 -0
  45. package/dist/chunk-MGSGCARB.js +164 -0
  46. package/dist/chunk-N3YFYMNZ.js +73 -0
  47. package/dist/chunk-Q5IYBNA7.js +56 -0
  48. package/dist/chunk-QJCE7NZF.js +85 -0
  49. package/dist/chunk-QW5II6YK.js +96 -0
  50. package/dist/chunk-RMGDDOCD.js +138 -0
  51. package/dist/chunk-RNCX4JIE.js +70 -0
  52. package/dist/chunk-RWCL5OPX.js +112 -0
  53. package/dist/chunk-S5OY2B63.js +28 -0
  54. package/dist/chunk-SIQNG72C.js +257 -0
  55. package/dist/chunk-SP7NIZFP.js +117 -0
  56. package/dist/chunk-SWRJWMGG.js +30 -0
  57. package/dist/chunk-TCQIJ3DO.js +85 -0
  58. package/dist/chunk-TPJ6JJ2F.js +290 -0
  59. package/dist/chunk-TUJZMJXW.js +72 -0
  60. package/dist/chunk-UR43ANYS.js +159 -0
  61. package/dist/chunk-VRGPG2YN.js +79 -0
  62. package/dist/chunk-WSBLCWY7.js +126 -0
  63. package/dist/chunk-XKKFSFYO.js +93 -0
  64. package/dist/chunk-XO7TBM47.js +32 -0
  65. package/dist/chunk-YDYDGG5K.js +132 -0
  66. package/dist/chunk-YMJOUYMT.js +171 -0
  67. package/dist/chunk-Z2WION42.js +32 -0
  68. package/dist/chunk-ZFKSVEYW.js +35 -0
  69. package/dist/components/blocks/AgentProfileGridBlock.js +8 -86
  70. package/dist/components/blocks/AgentRunOverviewBlock.js +8 -147
  71. package/dist/components/blocks/AgentWorkbenchBlock.js +15 -257
  72. package/dist/components/blocks/AudioVisualizerBlock.js +2 -50
  73. package/dist/components/blocks/AuthLayout.js +9 -73
  74. package/dist/components/blocks/BannerBlock.js +8 -66
  75. package/dist/components/blocks/BarChartBlock.js +5 -47
  76. package/dist/components/blocks/ChartBlock.js +7 -54
  77. package/dist/components/blocks/ChartCollectionBlock.js +11 -171
  78. package/dist/components/blocks/ChatLayout.js +12 -126
  79. package/dist/components/blocks/CreateBlock.js +9 -104
  80. package/dist/components/blocks/DataGridBlock.js +9 -117
  81. package/dist/components/blocks/DirectoryBlock.js +12 -85
  82. package/dist/components/blocks/FeatureGridBlock.js +6 -56
  83. package/dist/components/blocks/GalleryBlock.js +6 -69
  84. package/dist/components/blocks/HeroSectionBlock.js +10 -134
  85. package/dist/components/blocks/IntegrationsBlock.js +13 -94
  86. package/dist/components/blocks/InteractiveAreaChartBlock.js +5 -290
  87. package/dist/components/blocks/KanbanDemoBlock.js +8 -145
  88. package/dist/components/blocks/LogoCloud.js +4 -35
  89. package/dist/components/blocks/NavUser.js +5 -85
  90. package/dist/components/blocks/NotFoundBlock.js +8 -32
  91. package/dist/components/blocks/OnboardingBlock.js +7 -66
  92. package/dist/components/blocks/SettingsLayout.js +13 -86
  93. package/dist/components/blocks/SignUpBlock.js +8 -168
  94. package/dist/components/blocks/SolutionShowcaseBlock.js +11 -112
  95. package/dist/components/blocks/StatsBlock.js +6 -60
  96. package/dist/components/blocks/UsageDonutBlock.js +5 -79
  97. package/dist/components/blocks/WizardBlock.js +12 -93
  98. package/dist/components/blocks/user/InviteUserModal.js +10 -132
  99. package/dist/components/page-kits/AccountLockedPageKit.js +3 -40
  100. package/dist/components/page-kits/AgentsChatPageKit.js +11 -159
  101. package/dist/components/page-kits/AnalyticsPageKit.js +12 -150
  102. package/dist/components/page-kits/BlogContentPageKit.js +12 -167
  103. package/dist/components/page-kits/CheckoutPageKit.js +9 -83
  104. package/dist/components/page-kits/CompanySuitePageKit.js +9 -96
  105. package/dist/components/page-kits/DashboardPageKit.js +11 -149
  106. package/dist/components/page-kits/ErrorPageKit.js +5 -52
  107. package/dist/components/page-kits/KanbanBoardPageKit.js +7 -169
  108. package/dist/components/page-kits/LandingPageKit.js +11 -72
  109. package/dist/components/page-kits/LoginPageKit.js +3 -32
  110. package/dist/components/page-kits/OnboardingPageKit.js +6 -115
  111. package/dist/components/page-kits/PricingPageKit.js +12 -138
  112. package/dist/components/page-kits/ProfileSettingsPageKit.js +10 -164
  113. package/dist/components/page-kits/RecoveryPageKit.js +3 -42
  114. package/dist/components/page-kits/ResetPageKit.js +3 -36
  115. package/dist/components/page-kits/ServiceSuitePageKit.js +10 -175
  116. package/dist/components/page-kits/SignupPageKit.js +3 -30
  117. package/dist/components/page-kits/SuccessPageKit.js +4 -30
  118. package/dist/components/page-kits/TeamSettingsPageKit.js +9 -165
  119. package/dist/components/page-kits/TwoFactorPageKit.js +4 -28
  120. package/dist/components/page-kits/VerifyEmailPageKit.js +4 -30
  121. package/dist/components/page-kits/VoiceAgentsPageKit.js +13 -130
  122. package/dist/components/ui/CheckoutForm.js +5 -70
  123. package/eslint-rules/nadicode/config.js +1 -1
  124. package/eslint-rules/nadicode/data/catalog-names.json +93 -0
  125. package/eslint-rules/nadicode/index.js +2 -2
  126. package/eslint-rules/nadicode/rules/__tests__/require-catalog-component.test.js +77 -0
  127. package/eslint-rules/nadicode/rules/require-catalog-component.js +79 -0
  128. package/package.json +18 -25
  129. package/contracts/block-props-schemas.json +0 -2186
  130. package/contracts/component-props-schemas.json +0 -8322
  131. package/contracts/consumer-contract.json +0 -178
  132. package/contracts/page-kit-props-schemas.json +0 -1894
  133. package/contracts/public-surface-registry.json +0 -6162
  134. package/contracts/public-surface-registry.schema.json +0 -227
  135. package/contracts/spec-manifest.json +0 -46
  136. package/dist/catalog.json +0 -5221
  137. package/eslint-rules/nadicode/rules/no-forbidden-page-kit-import.js +0 -99
@@ -0,0 +1,147 @@
1
+ import { WorkflowGraph } from './chunk-VCCI3NRD.js';
2
+ import { Typography } from './chunk-N53OMWW2.js';
3
+ import { Heading } from './chunk-WI547C47.js';
4
+ import { ContextMeter } from './chunk-S2WSXZ7Y.js';
5
+ import { AgentMetricsCard } from './chunk-OCQB4IU7.js';
6
+ import { AgentTeamPanel } from './chunk-J3QL5UQ7.js';
7
+ import { cn } from './chunk-QYZT24TS.js';
8
+ import { jsxs, jsx } from 'react/jsx-runtime';
9
+
10
+ var defaultAgents = [
11
+ {
12
+ id: "orchestrator",
13
+ name: "Orchestrator",
14
+ role: "planner",
15
+ status: "active",
16
+ model: "Claude Opus 4",
17
+ currentAction: "Coordinating the next tool run",
18
+ tokenCount: 24800,
19
+ cost: 0.124,
20
+ elapsedMs: 312e3,
21
+ stepsCompleted: 4,
22
+ stepsTotal: 7,
23
+ toolCalls: [
24
+ { name: "dispatch_task", status: "done" },
25
+ { name: "plan_next", status: "running" }
26
+ ]
27
+ },
28
+ {
29
+ id: "coder",
30
+ name: "Coder",
31
+ role: "developer",
32
+ status: "active",
33
+ model: "Claude Sonnet 4",
34
+ currentAction: "Editing workflow graph routing",
35
+ tokenCount: 12450,
36
+ cost: 0.042,
37
+ elapsedMs: 154e3,
38
+ stepsCompleted: 3,
39
+ stepsTotal: 7,
40
+ toolCalls: [
41
+ { name: "search_web", status: "done" },
42
+ { name: "edit_file", status: "running" }
43
+ ]
44
+ },
45
+ {
46
+ id: "reviewer",
47
+ name: "Reviewer",
48
+ role: "qa",
49
+ status: "idle"
50
+ }
51
+ ];
52
+ var defaultMetrics = [
53
+ { label: "Active Agents", value: 2, trend: "flat" },
54
+ { label: "Tool Calls", value: 12, trend: "up" },
55
+ { label: "Latency", value: "1.2", unit: "s", trend: "down" },
56
+ { label: "Cost", value: "$0.18", trend: "down" }
57
+ ];
58
+ var defaultContext = {
59
+ used: 85e3,
60
+ total: 128e3,
61
+ breakdown: { system: 15, user: 35, assistant: 50 }
62
+ };
63
+ var defaultWorkflow = {
64
+ title: "Execution graph",
65
+ nodes: [
66
+ { id: "plan", label: "Planner", status: "done", type: "llm", duration: 2500 },
67
+ { id: "search", label: "Web Search", status: "done", type: "tool", duration: 1200 },
68
+ { id: "code", label: "Coder", status: "active", type: "llm" },
69
+ { id: "review", label: "Guardrail", status: "pending", type: "conditional" },
70
+ { id: "deploy", label: "Operator", status: "pending", type: "human" }
71
+ ],
72
+ edges: [
73
+ { from: "plan", to: "search", label: "queries" },
74
+ { from: "plan", to: "code" },
75
+ { from: "search", to: "code", label: "context" },
76
+ { from: "code", to: "review" },
77
+ { from: "review", to: "deploy", label: "approved" }
78
+ ]
79
+ };
80
+ function AgentRunOverviewBlock({
81
+ className,
82
+ title = "Runtime overview",
83
+ description = "A compact operator view of team health, context pressure, and workflow state.",
84
+ teamTitle = "Team",
85
+ metricsTitle = "Run metrics",
86
+ contextTitle = "Context window",
87
+ workflow = defaultWorkflow,
88
+ agents = defaultAgents,
89
+ metrics = defaultMetrics,
90
+ context = defaultContext,
91
+ ref,
92
+ ...props
93
+ }) {
94
+ return /* @__PURE__ */ jsxs(
95
+ "section",
96
+ {
97
+ ref,
98
+ className: cn("space-y-4", className),
99
+ ...props,
100
+ children: [
101
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
102
+ /* @__PURE__ */ jsx(Heading, { level: 2, size: "section", children: title }),
103
+ /* @__PURE__ */ jsx(Typography, { variant: "muted", children: description })
104
+ ] }),
105
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-4 xl:grid-cols-[320px_minmax(0,1fr)]", children: [
106
+ /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
107
+ /* @__PURE__ */ jsxs("div", { className: "surface-solid rounded-lg p-4", children: [
108
+ /* @__PURE__ */ jsx(Heading, { level: 4, size: "title", className: "mb-4", children: teamTitle }),
109
+ /* @__PURE__ */ jsx(AgentTeamPanel, { agents })
110
+ ] }),
111
+ /* @__PURE__ */ jsxs("div", { className: "surface-solid rounded-lg p-4", children: [
112
+ /* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-center justify-between gap-2", children: [
113
+ /* @__PURE__ */ jsx(Heading, { level: 4, size: "title", children: contextTitle }),
114
+ /* @__PURE__ */ jsxs("span", { className: "text-xs text-text-tertiary", children: [
115
+ context.used.toLocaleString(),
116
+ " / ",
117
+ context.total.toLocaleString()
118
+ ] })
119
+ ] }),
120
+ /* @__PURE__ */ jsx(
121
+ ContextMeter,
122
+ {
123
+ used: context.used,
124
+ total: context.total,
125
+ breakdown: context.breakdown,
126
+ size: "expanded"
127
+ }
128
+ )
129
+ ] })
130
+ ] }),
131
+ /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
132
+ /* @__PURE__ */ jsxs("div", { className: "surface-solid rounded-lg p-4", children: [
133
+ /* @__PURE__ */ jsx(Heading, { level: 4, size: "title", className: "mb-4", children: metricsTitle }),
134
+ /* @__PURE__ */ jsx(AgentMetricsCard, { metrics })
135
+ ] }),
136
+ /* @__PURE__ */ jsxs("div", { className: "surface-solid rounded-lg p-4", children: [
137
+ /* @__PURE__ */ jsx(Heading, { level: 4, size: "title", className: "mb-4", children: workflow.title ?? defaultWorkflow.title }),
138
+ /* @__PURE__ */ jsx(WorkflowGraph, { nodes: workflow.nodes, edges: workflow.edges })
139
+ ] })
140
+ ] })
141
+ ] })
142
+ ]
143
+ }
144
+ );
145
+ }
146
+
147
+ export { AgentRunOverviewBlock };
@@ -0,0 +1,66 @@
1
+ import { Typography } from './chunk-N53OMWW2.js';
2
+ import { Progress } from './chunk-JWQXBRE7.js';
3
+ import { Checkbox } from './chunk-756Q7AC5.js';
4
+ import { Card, CardHeader, CardTitle, CardContent } from './chunk-AH6YSYYT.js';
5
+ import { CheckIcon } from './chunk-CXACRCZ4.js';
6
+ import { cn } from './chunk-QYZT24TS.js';
7
+ import * as React from 'react';
8
+ import { useTranslations } from 'next-intl';
9
+ import { jsxs, jsx } from 'react/jsx-runtime';
10
+
11
+ var defaultSteps = [
12
+ { id: "account", title: "Create your account", description: "Sign up and verify your email address.", completed: true },
13
+ { id: "profile", title: "Complete your profile", description: "Add your name, avatar, and bio.", completed: true },
14
+ { id: "team", title: "Invite your team", description: "Add collaborators to your workspace.", completed: false },
15
+ { id: "project", title: "Create first project", description: "Set up your first design system project.", completed: false },
16
+ { id: "deploy", title: "Deploy to production", description: "Publish your component library.", completed: false }
17
+ ];
18
+ function OnboardingBlock({
19
+ steps = defaultSteps,
20
+ title = "Getting started",
21
+ onToggle,
22
+ className
23
+ }) {
24
+ const t = useTranslations("blocks.onboardingBlock");
25
+ const completedCount = React.useMemo(() => steps.filter((s) => s.completed).length, [steps]);
26
+ const progressPercent = steps.length > 0 ? Math.round(completedCount / steps.length * 100) : 0;
27
+ return /* @__PURE__ */ jsxs(Card, { className: cn("w-full max-w-lg", className), children: [
28
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
29
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
30
+ /* @__PURE__ */ jsx(CardTitle, { className: "text-text-primary", children: title }),
31
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-text-tertiary tabular-nums", children: [
32
+ completedCount,
33
+ "/",
34
+ steps.length
35
+ ] })
36
+ ] }),
37
+ /* @__PURE__ */ jsx(Progress, { value: progressPercent, "aria-label": t("onboardingProgress"), className: "mt-4" })
38
+ ] }),
39
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("ul", { className: "space-y-4", children: steps.map((step) => /* @__PURE__ */ jsxs("li", { className: "flex items-start gap-4", children: [
40
+ /* @__PURE__ */ jsx("div", { className: "pt-0.5", children: step.completed ? /* @__PURE__ */ jsx("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-success text-success-foreground", children: /* @__PURE__ */ jsx(CheckIcon, { size: 12 }) }) : /* @__PURE__ */ jsx(
41
+ Checkbox,
42
+ {
43
+ checked: step.completed,
44
+ onCheckedChange: (checked) => onToggle?.(step.id, checked === true),
45
+ "aria-label": step.title
46
+ }
47
+ ) }),
48
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
49
+ /* @__PURE__ */ jsx(
50
+ Typography,
51
+ {
52
+ variant: "small",
53
+ className: cn(
54
+ "font-medium",
55
+ step.completed ? "text-text-tertiary line-through" : "text-text-primary"
56
+ ),
57
+ children: step.title
58
+ }
59
+ ),
60
+ /* @__PURE__ */ jsx(Typography, { variant: "muted", className: "text-xs", children: step.description })
61
+ ] })
62
+ ] }, step.id)) }) })
63
+ ] });
64
+ }
65
+
66
+ export { OnboardingBlock };
@@ -0,0 +1,83 @@
1
+ import { MarketingShellPageKit } from './chunk-Z233ZQZE.js';
2
+ import { Typography } from './chunk-N53OMWW2.js';
3
+ import { FieldSet, Field, FieldLabel, FieldDescription } from './chunk-RX5EUODB.js';
4
+ import { Input } from './chunk-AP3XXYAY.js';
5
+ import { Card, CardHeader, CardTitle, CardContent } from './chunk-AH6YSYYT.js';
6
+ import { Alert, AlertTitle, AlertDescription } from './chunk-GJUR6HT3.js';
7
+ import { Button } from './chunk-7KIDDF3I.js';
8
+ import { cn } from './chunk-QYZT24TS.js';
9
+ import { jsx, jsxs } from 'react/jsx-runtime';
10
+
11
+ function CheckoutPageKit({
12
+ shell,
13
+ state = "default",
14
+ summary,
15
+ billingFields,
16
+ onBillingFieldChange,
17
+ onSubmit,
18
+ onRetry,
19
+ onContinue,
20
+ errorMessage,
21
+ successMessage = "Payment successful. Your subscription is now active.",
22
+ processingMessage = "Processing payment confirmation...",
23
+ className
24
+ }) {
25
+ const isBusy = state === "submitting" || state === "processing";
26
+ return /* @__PURE__ */ jsx(MarketingShellPageKit, { ...shell, children: /* @__PURE__ */ jsxs("section", { className: cn("mx-auto grid w-full max-w-6xl gap-6 px-6 pb-16 lg:grid-cols-[minmax(0,1.1fr)_420px]", className), children: [
27
+ /* @__PURE__ */ jsxs(Card, { children: [
28
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Checkout" }) }),
29
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
30
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "Complete billing details and confirm payment with app-owned checkout orchestration." }),
31
+ state === "processing" ? /* @__PURE__ */ jsxs(Alert, { children: [
32
+ /* @__PURE__ */ jsx(AlertTitle, { children: "Processing" }),
33
+ /* @__PURE__ */ jsx(AlertDescription, { children: processingMessage })
34
+ ] }) : null,
35
+ state === "error" ? /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
36
+ /* @__PURE__ */ jsx(AlertTitle, { children: "Payment failed" }),
37
+ /* @__PURE__ */ jsx(AlertDescription, { children: errorMessage ?? "Payment failed. Review billing details and retry." })
38
+ ] }) : null,
39
+ state === "success" ? /* @__PURE__ */ jsxs(Alert, { children: [
40
+ /* @__PURE__ */ jsx(AlertTitle, { children: "Payment complete" }),
41
+ /* @__PURE__ */ jsx(AlertDescription, { children: successMessage })
42
+ ] }) : null,
43
+ /* @__PURE__ */ jsx(FieldSet, { children: billingFields.map((field) => /* @__PURE__ */ jsxs(Field, { children: [
44
+ /* @__PURE__ */ jsxs(FieldLabel, { htmlFor: field.id, children: [
45
+ field.label,
46
+ field.required ? /* @__PURE__ */ jsx("span", { className: "ml-1 text-destructive", children: "*" }) : null
47
+ ] }),
48
+ /* @__PURE__ */ jsx(
49
+ Input,
50
+ {
51
+ id: field.id,
52
+ name: field.id,
53
+ type: field.type ?? "text",
54
+ value: field.value,
55
+ placeholder: field.placeholder,
56
+ required: field.required,
57
+ disabled: isBusy || state === "success",
58
+ onChange: (event) => onBillingFieldChange?.(field.id, event.target.value)
59
+ }
60
+ ),
61
+ field.description ? /* @__PURE__ */ jsx(FieldDescription, { children: field.description }) : null
62
+ ] }, field.id)) }),
63
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap justify-end gap-2", children: [
64
+ state === "error" ? /* @__PURE__ */ jsx(Button, { type: "button", onClick: onRetry, children: "Retry payment" }) : null,
65
+ state === "success" ? /* @__PURE__ */ jsx(Button, { type: "button", onClick: onContinue, children: "Continue" }) : null,
66
+ state !== "error" && state !== "success" ? /* @__PURE__ */ jsx(Button, { type: "button", disabled: isBusy, onClick: onSubmit, children: isBusy ? "Submitting..." : "Submit payment" }) : null
67
+ ] })
68
+ ] })
69
+ ] }),
70
+ /* @__PURE__ */ jsxs(Card, { children: [
71
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
72
+ /* @__PURE__ */ jsx(CardTitle, { children: summary.title }),
73
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: summary.amountLabel })
74
+ ] }),
75
+ /* @__PURE__ */ jsx(CardContent, { className: "space-y-3", children: summary.lineItems.map((lineItem) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 text-sm", children: [
76
+ /* @__PURE__ */ jsx("span", { className: "text-text-secondary", children: lineItem.label }),
77
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-text-primary", children: lineItem.value })
78
+ ] }, lineItem.id)) })
79
+ ] })
80
+ ] }) });
81
+ }
82
+
83
+ export { CheckoutPageKit };
@@ -0,0 +1,36 @@
1
+ import { ResetPasswordBlock } from './chunk-X6VXWEDO.js';
2
+ import { cn } from './chunk-QYZT24TS.js';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
+
5
+ function ResetPageKit({
6
+ onSubmit,
7
+ onBackToLogin,
8
+ title,
9
+ description,
10
+ errorMessage,
11
+ className,
12
+ cardClassName
13
+ }) {
14
+ return /* @__PURE__ */ jsx("section", { className: cn("min-h-dvh w-full bg-background px-4 py-12 md:px-8 md:py-20", className), children: /* @__PURE__ */ jsxs("div", { className: "mx-auto flex w-full max-w-5xl flex-col items-center justify-center gap-4", children: [
15
+ errorMessage ? /* @__PURE__ */ jsx(
16
+ "div",
17
+ {
18
+ role: "alert",
19
+ className: "w-full max-w-sm rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
20
+ children: errorMessage
21
+ }
22
+ ) : null,
23
+ /* @__PURE__ */ jsx(
24
+ ResetPasswordBlock,
25
+ {
26
+ className: cn("w-full", cardClassName),
27
+ onSubmit,
28
+ onBackToLogin,
29
+ title,
30
+ description
31
+ }
32
+ )
33
+ ] }) });
34
+ }
35
+
36
+ export { ResetPageKit };
@@ -0,0 +1,54 @@
1
+ import { BarChart } from './chunk-UWHKZX4Y.js';
2
+ import { ScrollFadeIn } from './chunk-I23DDSU7.js';
3
+ import { Card, CardHeader, CardTitle, CardDescription, CardContent } from './chunk-AH6YSYYT.js';
4
+ import { SmartphoneIcon } from './chunk-HNY45VUQ.js';
5
+ import { MonitorIcon } from './chunk-R5XP45PD.js';
6
+ import { cn } from './chunk-QYZT24TS.js';
7
+ import { jsx, jsxs } from 'react/jsx-runtime';
8
+
9
+ var defaultData = [
10
+ { month: "January", desktop: 186, mobile: 80 },
11
+ { month: "February", desktop: 305, mobile: 200 },
12
+ { month: "March", desktop: 237, mobile: 120 },
13
+ { month: "April", desktop: 73, mobile: 190 },
14
+ { month: "May", desktop: 209, mobile: 130 },
15
+ { month: "June", desktop: 214, mobile: 140 }
16
+ ];
17
+ var defaultConfig = {
18
+ desktop: {
19
+ label: "Desktop",
20
+ color: "rgb(var(--chart-1))",
21
+ icon: ({ ...props }) => /* @__PURE__ */ jsx(MonitorIcon, { size: 16, ...props })
22
+ },
23
+ mobile: {
24
+ label: "Mobile",
25
+ color: "rgb(var(--chart-2))",
26
+ icon: ({ ...props }) => /* @__PURE__ */ jsx(SmartphoneIcon, { size: 16, ...props })
27
+ }
28
+ };
29
+ function ChartBlock({
30
+ data = defaultData,
31
+ config = defaultConfig,
32
+ title = "Analytics",
33
+ description = "January - June 2024",
34
+ className
35
+ }) {
36
+ return /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsxs(Card, { className: cn(className), children: [
37
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
38
+ /* @__PURE__ */ jsx(CardTitle, { children: title }),
39
+ /* @__PURE__ */ jsx(CardDescription, { children: description })
40
+ ] }),
41
+ /* @__PURE__ */ jsx(CardContent, { children: data.length > 0 && /* @__PURE__ */ jsx(
42
+ BarChart,
43
+ {
44
+ data,
45
+ config,
46
+ indexKey: "month",
47
+ bars: ["desktop", "mobile"],
48
+ className: "min-h-[200px] w-full"
49
+ }
50
+ ) })
51
+ ] }) });
52
+ }
53
+
54
+ export { ChartBlock };
@@ -0,0 +1,164 @@
1
+ import { SettingsPageKit } from './chunk-RKQPU75I.js';
2
+ import { Typography } from './chunk-N53OMWW2.js';
3
+ import { Switch } from './chunk-R7N7YLFT.js';
4
+ import { Field, FieldLabel } from './chunk-RX5EUODB.js';
5
+ import { Input } from './chunk-AP3XXYAY.js';
6
+ import { Label } from './chunk-LIBXYD5Q.js';
7
+ import { Card, CardHeader, CardTitle, CardDescription, CardContent } from './chunk-AH6YSYYT.js';
8
+ import { Avatar, AvatarImage, AvatarFallback } from './chunk-NAAU5IWU.js';
9
+ import { Button } from './chunk-7KIDDF3I.js';
10
+ import { jsx, jsxs } from 'react/jsx-runtime';
11
+
12
+ var DEFAULT_SECTIONS = [{ id: "profile", label: "Profile" }];
13
+ var EMPTY_VALIDATION_ERRORS = {};
14
+ function renderProfileSection({
15
+ profileFields,
16
+ notificationPreferences,
17
+ avatar,
18
+ mode,
19
+ validationErrors,
20
+ onFieldChange,
21
+ onNotificationChange
22
+ }) {
23
+ const readOnlyMode = mode === "view";
24
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
25
+ /* @__PURE__ */ jsxs(Card, { children: [
26
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
27
+ /* @__PURE__ */ jsx(CardTitle, { children: "Avatar" }),
28
+ /* @__PURE__ */ jsx(CardDescription, { children: "Upload a profile image visible to your workspace." })
29
+ ] }),
30
+ /* @__PURE__ */ jsxs(CardContent, { className: "flex flex-wrap items-center gap-4", children: [
31
+ /* @__PURE__ */ jsxs(Avatar, { className: "h-14 w-14", children: [
32
+ /* @__PURE__ */ jsx(AvatarImage, { src: avatar?.src, alt: "Profile avatar" }),
33
+ /* @__PURE__ */ jsx(AvatarFallback, { children: avatar?.fallback ?? "U" })
34
+ ] }),
35
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
36
+ /* @__PURE__ */ jsx(
37
+ Button,
38
+ {
39
+ variant: "secondary",
40
+ onClick: avatar?.onUpload,
41
+ disabled: readOnlyMode || avatar?.status === "uploading",
42
+ children: avatar?.status === "uploading" ? "Uploading\u2026" : "Upload avatar"
43
+ }
44
+ ),
45
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", onClick: avatar?.onRemove, disabled: readOnlyMode, children: "Remove" })
46
+ ] })
47
+ ] }),
48
+ avatar?.errorMessage ? /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-destructive", children: avatar.errorMessage }) }) : null
49
+ ] }),
50
+ /* @__PURE__ */ jsxs(Card, { children: [
51
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
52
+ /* @__PURE__ */ jsx(CardTitle, { children: "Personal information" }),
53
+ /* @__PURE__ */ jsx(CardDescription, { children: "Control profile details used across your account." })
54
+ ] }),
55
+ /* @__PURE__ */ jsx(CardContent, { className: "space-y-4", children: profileFields.map((field) => {
56
+ const inputId = `profile-settings-field-${field.id}`;
57
+ const fieldError = validationErrors[field.id];
58
+ return /* @__PURE__ */ jsxs(Field, { children: [
59
+ /* @__PURE__ */ jsxs(FieldLabel, { htmlFor: inputId, children: [
60
+ field.label,
61
+ field.required ? " *" : ""
62
+ ] }),
63
+ /* @__PURE__ */ jsx(
64
+ Input,
65
+ {
66
+ id: inputId,
67
+ type: field.type ?? "text",
68
+ value: field.value,
69
+ placeholder: field.placeholder,
70
+ readOnly: readOnlyMode || field.readOnly,
71
+ disabled: readOnlyMode || field.readOnly,
72
+ onChange: (event) => onFieldChange?.(field.id, event.target.value)
73
+ }
74
+ ),
75
+ field.helperText ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-tertiary", children: field.helperText }) : null,
76
+ fieldError ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-destructive", children: fieldError }) : null
77
+ ] }, field.id);
78
+ }) })
79
+ ] }),
80
+ /* @__PURE__ */ jsxs(Card, { children: [
81
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
82
+ /* @__PURE__ */ jsx(CardTitle, { children: "Notification preferences" }),
83
+ /* @__PURE__ */ jsx(CardDescription, { children: "Set communication and security notification behavior." })
84
+ ] }),
85
+ /* @__PURE__ */ jsx(CardContent, { className: "space-y-4", children: notificationPreferences.map((preference) => /* @__PURE__ */ jsxs(
86
+ "div",
87
+ {
88
+ className: "flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border-subtle bg-surface-hover p-4",
89
+ children: [
90
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
91
+ /* @__PURE__ */ jsx(Label, { htmlFor: `profile-settings-pref-${preference.id}`, children: preference.label }),
92
+ preference.description ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: preference.description }) : null
93
+ ] }),
94
+ /* @__PURE__ */ jsx(
95
+ Switch,
96
+ {
97
+ id: `profile-settings-pref-${preference.id}`,
98
+ checked: preference.enabled,
99
+ disabled: readOnlyMode || preference.disabled,
100
+ onCheckedChange: (checked) => onNotificationChange?.(preference.id, checked),
101
+ "aria-label": preference.label
102
+ }
103
+ )
104
+ ]
105
+ },
106
+ preference.id
107
+ )) })
108
+ ] })
109
+ ] });
110
+ }
111
+ function ProfileSettingsPageKit({
112
+ title = "Profile settings",
113
+ description = "Manage profile details, avatar controls, and personal notification preferences.",
114
+ sections = DEFAULT_SECTIONS,
115
+ activeSectionId,
116
+ onSectionChange,
117
+ profileFields,
118
+ notificationPreferences,
119
+ avatar,
120
+ mode = "edit",
121
+ saveState = "default",
122
+ validationErrors = EMPTY_VALIDATION_ERRORS,
123
+ validationMessage,
124
+ fatalErrorMessage,
125
+ onFieldChange,
126
+ onNotificationChange,
127
+ onSave,
128
+ onDiscard,
129
+ renderAdditionalSection
130
+ }) {
131
+ const firstSectionId = sections[0]?.id ?? "profile";
132
+ const resolvedActiveSectionId = activeSectionId ?? firstSectionId;
133
+ return /* @__PURE__ */ jsx(
134
+ SettingsPageKit,
135
+ {
136
+ title,
137
+ description,
138
+ sections,
139
+ activeSectionId: resolvedActiveSectionId,
140
+ onSectionChange,
141
+ saveState,
142
+ validationMessage,
143
+ fatalErrorMessage,
144
+ onSave,
145
+ onDiscard,
146
+ renderSection: (section) => {
147
+ if (section.id === "profile") {
148
+ return renderProfileSection({
149
+ profileFields,
150
+ notificationPreferences,
151
+ avatar,
152
+ mode,
153
+ validationErrors,
154
+ onFieldChange,
155
+ onNotificationChange
156
+ });
157
+ }
158
+ return renderAdditionalSection ? renderAdditionalSection(section) : null;
159
+ }
160
+ }
161
+ );
162
+ }
163
+
164
+ export { ProfileSettingsPageKit };
@@ -0,0 +1,73 @@
1
+ import { LoginBlock } from './chunk-RGE5OQMZ.js';
2
+ import { StaggerChildren } from './chunk-DQPK2XRL.js';
3
+ import { Heading } from './chunk-WI547C47.js';
4
+ import { siteConfig } from './chunk-A7NUWD76.js';
5
+ import { AnimatedBackground } from './chunk-4GSFNJAJ.js';
6
+ import { useMotionConfig, m, motionSpring } from './chunk-PD2YEH3H.js';
7
+ import { SparklesIcon } from './chunk-CGUCH322.js';
8
+ import { cn } from './chunk-QYZT24TS.js';
9
+ import { jsxs, jsx } from 'react/jsx-runtime';
10
+
11
+ var FORM_ENTRANCE_Y = 12;
12
+ var VISUAL_STAGGER_MS = 100;
13
+ var defaultLabels = {
14
+ headline: "Build the future, faster.",
15
+ quote: "This library has saved me countless hours of work and helped me deliver stunning designs to my clients faster than ever before.",
16
+ quoteAttribution: "Sofia Davis, Lead Engineer"
17
+ };
18
+ function AuthLayout({
19
+ mode = "login",
20
+ action,
21
+ error,
22
+ googleAction,
23
+ labels: userLabels,
24
+ className
25
+ }) {
26
+ const motionConfig = useMotionConfig();
27
+ const labels = { ...defaultLabels, ...userLabels };
28
+ return /* @__PURE__ */ jsxs("div", { className: cn("w-full min-h-dvh lg:h-dvh lg:min-h-[800px] grid lg:grid-cols-2 overflow-hidden bg-background", className), children: [
29
+ /* @__PURE__ */ jsxs("div", { className: "hidden lg:flex relative h-full w-full flex-col bg-muted text-overlay-foreground dark:border-r border-border/50", children: [
30
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-surface-active" }),
31
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx(AnimatedBackground, {}) }),
32
+ /* @__PURE__ */ jsxs("div", { className: "relative z-20 flex items-center text-lg font-medium p-8", children: [
33
+ /* @__PURE__ */ jsx(SparklesIcon, { size: 24, className: "mr-2 text-accent" }),
34
+ siteConfig.name
35
+ ] }),
36
+ /* @__PURE__ */ jsxs(StaggerChildren, { staggerMs: VISUAL_STAGGER_MS, className: "relative z-20 m-auto max-w-lg text-center space-y-4", children: [
37
+ /* @__PURE__ */ jsx(Heading, { level: 2, size: "display", className: "font-bold bg-clip-text text-transparent bg-gradient-to-b from-overlay-foreground to-overlay-foreground/60 relative", children: labels.headline }),
38
+ /* @__PURE__ */ jsxs("blockquote", { className: "text-lg text-text-tertiary relative", children: [
39
+ /* @__PURE__ */ jsxs("p", { children: [
40
+ '"',
41
+ labels.quote,
42
+ '"'
43
+ ] }),
44
+ /* @__PURE__ */ jsx("footer", { className: "mt-2 text-sm", children: labels.quoteAttribution })
45
+ ] })
46
+ ] })
47
+ ] }),
48
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center p-8 bg-background relative overflow-y-auto", children: [
49
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-background via-background to-accent/5 pointer-events-none" }),
50
+ /* @__PURE__ */ jsx(
51
+ m.div,
52
+ {
53
+ initial: { opacity: 0, y: FORM_ENTRANCE_Y },
54
+ animate: { opacity: 1, y: 0 },
55
+ transition: { ...motionSpring.gentle, ...motionConfig },
56
+ className: "relative z-10 w-full max-w-sm",
57
+ children: /* @__PURE__ */ jsx(
58
+ LoginBlock,
59
+ {
60
+ className: "w-full",
61
+ type: mode === "signup" ? "signup" : "login",
62
+ action,
63
+ error,
64
+ googleAction
65
+ }
66
+ )
67
+ }
68
+ )
69
+ ] })
70
+ ] });
71
+ }
72
+
73
+ export { AuthLayout };