@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,56 @@
1
+ import { Heading } from './chunk-WI547C47.js';
2
+ import { Card, CardHeader, CardContent } from './chunk-AH6YSYYT.js';
3
+ import { ZapIcon } from './chunk-FLF5AMNO.js';
4
+ import { SparklesIcon } from './chunk-CGUCH322.js';
5
+ import { SettingsIcon } from './chunk-OITJWGFV.js';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+
8
+ var defaultFeatures = [
9
+ {
10
+ title: "Customizable",
11
+ description: "Extensive customization options, allowing you to tailor every aspect to meet your specific needs.",
12
+ icon: /* @__PURE__ */ jsx(ZapIcon, { size: 24, "aria-hidden": true })
13
+ },
14
+ {
15
+ title: "You have full control",
16
+ description: "From design elements to functionality, you have complete control to create a unique and personalized experience.",
17
+ icon: /* @__PURE__ */ jsx(SettingsIcon, { size: 24, "aria-hidden": true })
18
+ },
19
+ {
20
+ title: "Powered By AI",
21
+ description: "Elements to functionality, you have complete control to create a unique experience.",
22
+ icon: /* @__PURE__ */ jsx(SparklesIcon, { size: 24, "aria-hidden": true })
23
+ }
24
+ ];
25
+ function FeatureGridBlock({
26
+ title = "Built to cover your needs",
27
+ description = "Libero sapiente aliquam quibusdam aspernatur, praesentium iusto repellendus.",
28
+ features = defaultFeatures,
29
+ className
30
+ } = {}) {
31
+ return /* @__PURE__ */ jsx("section", { className: className ?? "bg-background py-16 md:py-32 dark:bg-transparent", children: /* @__PURE__ */ jsxs("div", { className: "@container mx-auto max-w-5xl px-6", children: [
32
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
33
+ /* @__PURE__ */ jsx(Heading, { level: 2, size: "section", className: "text-4xl lg:text-5xl", children: title }),
34
+ /* @__PURE__ */ jsx("p", { className: "mt-4", children: description })
35
+ ] }),
36
+ /* @__PURE__ */ jsx(Card, { className: "lg:max-w-full lg:grid-cols-3 lg:divide-x lg:divide-y-0 mx-auto mt-8 grid max-w-sm divide-y overflow-hidden shadow-sm *:text-center md:mt-16", children: features.map((feature, i) => /* @__PURE__ */ jsxs("div", { className: "group shadow-sm", children: [
37
+ /* @__PURE__ */ jsxs(CardHeader, { className: "pb-4", children: [
38
+ /* @__PURE__ */ jsx(CardDecorator, { children: feature.icon }),
39
+ /* @__PURE__ */ jsx(Heading, { level: 3, size: "title", className: "mt-6 font-medium", children: feature.title })
40
+ ] }),
41
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("p", { className: "mt-4 text-sm", children: feature.description }) })
42
+ ] }, i)) })
43
+ ] }) });
44
+ }
45
+ var CardDecorator = ({ children }) => /* @__PURE__ */ jsxs("div", { className: "mask-radial-from-40% mask-radial-to-60% relative mx-auto size-36 duration-200 [--color-border:color-mix(in_oklab,var(--color-text-primary)10%,transparent)] group-hover:[--color-border:color-mix(in_oklab,var(--color-text-primary)20%,transparent)] dark:[--color-border:color-mix(in_oklab,var(--color-text-primary)15%,transparent)] dark:group-hover:[--color-border:color-mix(in_oklab,var(--color-text-primary)20%,transparent)]", children: [
46
+ /* @__PURE__ */ jsx(
47
+ "div",
48
+ {
49
+ "aria-hidden": true,
50
+ className: "absolute inset-0 bg-[linear-gradient(to_right,var(--color-border)_1px,transparent_1px),linear-gradient(to_bottom,var(--color-border)_1px,transparent_1px)] bg-[size:24px_24px] dark:opacity-50"
51
+ }
52
+ ),
53
+ /* @__PURE__ */ jsx("div", { className: "bg-background absolute inset-0 m-auto flex size-12 items-center justify-center border-l border-t", children })
54
+ ] });
55
+
56
+ export { FeatureGridBlock };
@@ -0,0 +1,85 @@
1
+ import { useSidebar, SidebarMenu, SidebarMenuItem, SidebarMenuButton } from './chunk-J2DCQDXO.js';
2
+ import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuGroup, DropdownMenuItem } from './chunk-CQEUNASC.js';
3
+ import { Avatar, AvatarImage, AvatarFallback } from './chunk-NAAU5IWU.js';
4
+ import { ChevronsUpDownIcon } from './chunk-SW6QPJM4.js';
5
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
+
7
+ function getInitials(name) {
8
+ return name.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2);
9
+ }
10
+ var EMPTY_ITEMS = [];
11
+ function NavUser({ user, items = EMPTY_ITEMS, footer }) {
12
+ const { isMobile } = useSidebar();
13
+ const initials = getInitials(user.name);
14
+ return /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxs(DropdownMenu, { children: [
15
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
16
+ SidebarMenuButton,
17
+ {
18
+ size: "lg",
19
+ className: "data-[state=open]:bg-surface-hover",
20
+ children: [
21
+ /* @__PURE__ */ jsxs(Avatar, { className: "h-8 w-8 rounded-lg", children: [
22
+ user.avatar && /* @__PURE__ */ jsx(AvatarImage, { src: user.avatar, alt: user.name }),
23
+ /* @__PURE__ */ jsx(AvatarFallback, { className: "rounded-lg text-xs", children: initials })
24
+ ] }),
25
+ /* @__PURE__ */ jsxs("div", { className: "grid flex-1 text-left text-sm leading-tight min-w-0", children: [
26
+ /* @__PURE__ */ jsx("span", { className: "truncate font-medium text-text-primary", children: user.name }),
27
+ /* @__PURE__ */ jsx("span", { className: "truncate text-xs text-text-tertiary", children: user.email })
28
+ ] }),
29
+ /* @__PURE__ */ jsx(
30
+ ChevronsUpDownIcon,
31
+ {
32
+ size: 16,
33
+ className: "ml-auto text-text-tertiary"
34
+ }
35
+ )
36
+ ]
37
+ }
38
+ ) }),
39
+ /* @__PURE__ */ jsxs(
40
+ DropdownMenuContent,
41
+ {
42
+ className: "w-[var(--radix-dropdown-menu-trigger-width)] min-w-56 rounded-lg",
43
+ side: isMobile ? "bottom" : "right",
44
+ align: "end",
45
+ sideOffset: 4,
46
+ children: [
47
+ /* @__PURE__ */ jsx(DropdownMenuLabel, { className: "p-0 font-normal", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-1.5 py-1.5", children: [
48
+ /* @__PURE__ */ jsxs(Avatar, { className: "h-8 w-8 rounded-lg", children: [
49
+ user.avatar && /* @__PURE__ */ jsx(AvatarImage, { src: user.avatar, alt: user.name }),
50
+ /* @__PURE__ */ jsx(AvatarFallback, { className: "rounded-lg text-xs", children: initials })
51
+ ] }),
52
+ /* @__PURE__ */ jsxs("div", { className: "grid flex-1 text-left text-sm leading-tight min-w-0", children: [
53
+ /* @__PURE__ */ jsx("span", { className: "truncate font-medium text-text-primary", children: user.name }),
54
+ /* @__PURE__ */ jsx("span", { className: "truncate text-xs text-text-tertiary", children: user.email })
55
+ ] })
56
+ ] }) }),
57
+ items.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
58
+ /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
59
+ /* @__PURE__ */ jsx(DropdownMenuGroup, { children: items.map((item) => /* @__PURE__ */ jsx(
60
+ DropdownMenuItem,
61
+ {
62
+ asChild: !!item.href,
63
+ onClick: item.onClick,
64
+ children: item.href ? /* @__PURE__ */ jsxs("a", { href: item.href, children: [
65
+ item.icon,
66
+ item.label
67
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
68
+ item.icon,
69
+ item.label
70
+ ] })
71
+ },
72
+ item.label
73
+ )) })
74
+ ] }),
75
+ !!footer && /* @__PURE__ */ jsxs(Fragment, { children: [
76
+ /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
77
+ footer
78
+ ] })
79
+ ]
80
+ }
81
+ )
82
+ ] }) }) });
83
+ }
84
+
85
+ export { NavUser };
@@ -0,0 +1,96 @@
1
+ import { MarketingShellPageKit } from './chunk-Z233ZQZE.js';
2
+ import { TeamBlock } from './chunk-VBZQ4DBE.js';
3
+ import { ContactBlock } from './chunk-U4GYSYGN.js';
4
+ import { FAQBlock } from './chunk-NEHCPO53.js';
5
+ import { CallToActionBlock } from './chunk-GJPTPLCQ.js';
6
+ import { Typography } from './chunk-N53OMWW2.js';
7
+ import { Card, CardHeader, CardTitle, CardContent } from './chunk-AH6YSYYT.js';
8
+ import { cn } from './chunk-QYZT24TS.js';
9
+ import React from 'react';
10
+ import { jsx, jsxs } from 'react/jsx-runtime';
11
+
12
+ var DEFAULT_SECTION_ORDER = [
13
+ "narrative",
14
+ "team",
15
+ "contact",
16
+ "faq",
17
+ "cta"
18
+ ];
19
+ var DEFAULTS_BY_VARIANT = {
20
+ "company-about": {
21
+ narrative: {
22
+ title: "Built by practitioners who ship with contracts first.",
23
+ description: "We partner with teams that need high-quality interfaces and predictable release confidence."
24
+ },
25
+ team: {
26
+ title: "Leadership team"
27
+ },
28
+ contact: null,
29
+ faq: {},
30
+ cta: {
31
+ title: "Interested in working together?",
32
+ description: "Share your route goals and we will propose a rollout plan.",
33
+ primaryAction: { label: "Talk to us", href: "/contact" }
34
+ }
35
+ },
36
+ "company-contact": {
37
+ narrative: {
38
+ title: "Talk to our delivery team",
39
+ description: "Tell us what you are building, we will recommend an implementation path."
40
+ },
41
+ team: null,
42
+ contact: {
43
+ title: "Contact request",
44
+ description: "We respond within one business day.",
45
+ submitLabel: "Send request"
46
+ },
47
+ faq: {},
48
+ cta: {
49
+ title: "Prefer self-serve?",
50
+ description: "Start with our templates and scale with support as needed.",
51
+ primaryAction: { label: "View templates", href: "/templates" }
52
+ }
53
+ }
54
+ };
55
+ var SECTION_CLASS = "mx-auto w-full max-w-6xl px-6";
56
+ function normalizeSectionOrder(sectionOrder) {
57
+ if (!sectionOrder || sectionOrder.length === 0) {
58
+ return DEFAULT_SECTION_ORDER;
59
+ }
60
+ return [...new Set(sectionOrder)];
61
+ }
62
+ function CompanySuitePageKit({
63
+ shell,
64
+ variant = "company-about",
65
+ sectionOrder,
66
+ narrative,
67
+ team,
68
+ contact,
69
+ faq,
70
+ cta,
71
+ className
72
+ }) {
73
+ const defaults = DEFAULTS_BY_VARIANT[variant];
74
+ const resolvedNarrative = narrative ?? defaults.narrative ?? { title: "Company overview" };
75
+ const resolvedTeam = team === void 0 ? defaults.team : team;
76
+ const resolvedContact = contact === void 0 ? defaults.contact : contact;
77
+ const resolvedFaq = faq === void 0 ? defaults.faq : faq;
78
+ const resolvedCta = cta === void 0 ? defaults.cta : cta;
79
+ const orderedSections = normalizeSectionOrder(sectionOrder);
80
+ const sectionById = {
81
+ narrative: resolvedNarrative === null ? null : /* @__PURE__ */ jsx("section", { "data-testid": "company-section-narrative", className: SECTION_CLASS, children: /* @__PURE__ */ jsxs(Card, { children: [
82
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: resolvedNarrative.title }) }),
83
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
84
+ resolvedNarrative.description ? /* @__PURE__ */ jsx(Typography, { variant: "muted", children: resolvedNarrative.description }) : null,
85
+ resolvedNarrative.content ? /* @__PURE__ */ jsx("div", { children: resolvedNarrative.content }) : null
86
+ ] })
87
+ ] }) }),
88
+ team: resolvedTeam === null ? null : /* @__PURE__ */ jsx("section", { "data-testid": "company-section-team", className: SECTION_CLASS, children: /* @__PURE__ */ jsx(TeamBlock, { ...resolvedTeam }) }),
89
+ contact: resolvedContact === null ? null : /* @__PURE__ */ jsx("section", { "data-testid": "company-section-contact", className: SECTION_CLASS, children: /* @__PURE__ */ jsx(ContactBlock, { ...resolvedContact }) }),
90
+ faq: resolvedFaq === null ? null : /* @__PURE__ */ jsx("section", { "data-testid": "company-section-faq", className: SECTION_CLASS, children: /* @__PURE__ */ jsx(FAQBlock, { ...resolvedFaq }) }),
91
+ cta: resolvedCta === null ? null : /* @__PURE__ */ jsx("section", { "data-testid": "company-section-cta", className: cn(SECTION_CLASS, "pb-16"), children: /* @__PURE__ */ jsx(CallToActionBlock, { ...resolvedCta }) })
92
+ };
93
+ return /* @__PURE__ */ jsx(MarketingShellPageKit, { ...shell, children: /* @__PURE__ */ jsx("div", { className: cn("space-y-10 pb-10", className), children: orderedSections.map((sectionId) => /* @__PURE__ */ jsx(React.Fragment, { children: sectionById[sectionId] }, sectionId)) }) });
94
+ }
95
+
96
+ export { CompanySuitePageKit };
@@ -0,0 +1,138 @@
1
+ import { MarketingShellPageKit } from './chunk-Z233ZQZE.js';
2
+ import { PricingBlock } from './chunk-VNNAL4A6.js';
3
+ import { FAQBlock } from './chunk-NEHCPO53.js';
4
+ import { CallToActionBlock } from './chunk-GJPTPLCQ.js';
5
+ import { ComparisonBlock } from './chunk-VZCB4APK.js';
6
+ import { Typography } from './chunk-N53OMWW2.js';
7
+ import { Heading } from './chunk-WI547C47.js';
8
+ import { Card, CardHeader, CardTitle, CardContent } from './chunk-AH6YSYYT.js';
9
+ import { Button } from './chunk-7KIDDF3I.js';
10
+ import { Badge } from './chunk-S4JAHKOP.js';
11
+ import { cn } from './chunk-QYZT24TS.js';
12
+ import React from 'react';
13
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
14
+
15
+ var STATE_BADGE_LABELS = {
16
+ "billing-toggle": "Billing toggle",
17
+ "loading-action": "Loading actions",
18
+ "empty-plan": "Empty plan state"
19
+ };
20
+ var EMPTY_PLAN_ACTIONS = [];
21
+ var EMPTY_PLANS = [];
22
+ var DEFAULT_COMPARISON = {};
23
+ var DEFAULT_FAQ = {};
24
+ var DEFAULT_CTA = {
25
+ title: "Need a custom rollout?",
26
+ description: "Talk to our team for multi-team migration and governance support.",
27
+ primaryAction: { label: "Contact sales", href: "/contact" }
28
+ };
29
+ var DEFAULT_EMPTY_STATE = {
30
+ title: "No plans available",
31
+ description: "Configure at least one plan to render pricing actions."
32
+ };
33
+ function PricingPageKit({
34
+ shell,
35
+ state = "default",
36
+ title = "Choose the plan that fits your team.",
37
+ description = "Use stable pricing blocks while keeping plan copy, links, and billing behavior app-owned.",
38
+ plans = EMPTY_PLANS,
39
+ billing,
40
+ comparison = DEFAULT_COMPARISON,
41
+ faq = DEFAULT_FAQ,
42
+ cta = DEFAULT_CTA,
43
+ planActions = EMPTY_PLAN_ACTIONS,
44
+ emptyState = DEFAULT_EMPTY_STATE,
45
+ loadingMessage = "Preparing checkout actions...",
46
+ className
47
+ }) {
48
+ const [selectedBilling, setSelectedBilling] = React.useState("monthly");
49
+ const supportsYearly = billing?.supportsYearly ?? true;
50
+ const monthlyLabel = billing?.monthlyLabel ?? "Monthly";
51
+ const yearlyLabel = billing?.yearlyLabel ?? "Yearly";
52
+ const yearlyBadgeLabel = billing?.yearlyBadgeLabel ?? "Save";
53
+ const isLoadingActions = state === "loading-action";
54
+ const shouldRenderEmpty = state === "empty-plan" || plans.length === 0;
55
+ return /* @__PURE__ */ jsx(MarketingShellPageKit, { ...shell, children: /* @__PURE__ */ jsxs("section", { className: cn("mx-auto w-full max-w-6xl space-y-8 px-6 pb-16", className), children: [
56
+ /* @__PURE__ */ jsxs("header", { className: "space-y-4", children: [
57
+ /* @__PURE__ */ jsx(Heading, { level: 2, children: title }),
58
+ /* @__PURE__ */ jsx(Typography, { variant: "muted", children: description }),
59
+ state !== "default" ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ jsx(Badge, { variant: "outline", children: STATE_BADGE_LABELS[state] }) }) : null
60
+ ] }),
61
+ state === "billing-toggle" ? /* @__PURE__ */ jsxs(Card, { "data-testid": "pricing-billing-controls", children: [
62
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Billing interval" }) }),
63
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
64
+ /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-2 rounded-md border border-border/70 bg-surface/60 p-1", children: [
65
+ /* @__PURE__ */ jsx(
66
+ Button,
67
+ {
68
+ type: "button",
69
+ size: "sm",
70
+ variant: selectedBilling === "monthly" ? "primary" : "ghost",
71
+ onClick: () => setSelectedBilling("monthly"),
72
+ children: monthlyLabel
73
+ }
74
+ ),
75
+ supportsYearly ? /* @__PURE__ */ jsxs(Fragment, { children: [
76
+ /* @__PURE__ */ jsx(
77
+ Button,
78
+ {
79
+ type: "button",
80
+ size: "sm",
81
+ variant: selectedBilling === "yearly" ? "primary" : "ghost",
82
+ onClick: () => setSelectedBilling("yearly"),
83
+ children: yearlyLabel
84
+ }
85
+ ),
86
+ /* @__PURE__ */ jsx(Badge, { variant: "accent", children: yearlyBadgeLabel })
87
+ ] }) : null
88
+ ] }),
89
+ billing?.note ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: billing.note }) : null
90
+ ] })
91
+ ] }) : null,
92
+ isLoadingActions ? /* @__PURE__ */ jsx(
93
+ "div",
94
+ {
95
+ "data-testid": "pricing-loading-action",
96
+ role: "status",
97
+ className: "rounded-md border border-border/70 bg-surface/70 px-4 py-3 text-sm text-text-secondary",
98
+ children: loadingMessage
99
+ }
100
+ ) : null,
101
+ shouldRenderEmpty ? /* @__PURE__ */ jsxs(Card, { "data-testid": "pricing-empty-state", children: [
102
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: emptyState.title }) }),
103
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(Typography, { variant: "muted", children: emptyState.description }) })
104
+ ] }) : /* @__PURE__ */ jsx(
105
+ PricingBlock,
106
+ {
107
+ title: "Pricing plans",
108
+ description: "All plans are rendered from declared data inputs.",
109
+ plans,
110
+ showBillingToggle: state === "billing-toggle" && supportsYearly
111
+ }
112
+ ),
113
+ planActions.length > 0 ? /* @__PURE__ */ jsxs(Card, { "data-testid": "pricing-plan-actions", children: [
114
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Checkout actions" }) }),
115
+ /* @__PURE__ */ jsx(CardContent, { className: "grid gap-3 sm:grid-cols-2", children: planActions.map((action) => {
116
+ const isDisabled = isLoadingActions || action.disabled;
117
+ return /* @__PURE__ */ jsxs("div", { className: "rounded-md border border-border/70 p-3", children: [
118
+ /* @__PURE__ */ jsx(
119
+ Button,
120
+ {
121
+ type: "button",
122
+ disabled: isDisabled,
123
+ onClick: action.onAction,
124
+ className: "w-full",
125
+ children: action.label
126
+ }
127
+ ),
128
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "mt-2 break-all text-text-tertiary", children: action.href })
129
+ ] }, action.id);
130
+ }) })
131
+ ] }) : null,
132
+ comparison === null ? null : /* @__PURE__ */ jsx("section", { children: /* @__PURE__ */ jsx(ComparisonBlock, { ...comparison }) }),
133
+ faq === null ? null : /* @__PURE__ */ jsx("section", { children: /* @__PURE__ */ jsx(FAQBlock, { ...faq }) }),
134
+ cta === null ? null : /* @__PURE__ */ jsx("section", { children: /* @__PURE__ */ jsx(CallToActionBlock, { ...cta }) })
135
+ ] }) });
136
+ }
137
+
138
+ export { PricingPageKit };
@@ -0,0 +1,70 @@
1
+ import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from './chunk-AH6YSYYT.js';
2
+ import { Alert, AlertTitle, AlertDescription } from './chunk-GJUR6HT3.js';
3
+ import { Button } from './chunk-7KIDDF3I.js';
4
+ import { LoaderCircleIcon } from './chunk-BRP6D56U.js';
5
+ import { useState } from 'react';
6
+ import { useStripe, useElements, PaymentElement } from '@stripe/react-stripe-js';
7
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
8
+
9
+ function CheckoutForm({ amount = 2e3, currency = "usd", returnUrl = "/settings/billing" }) {
10
+ const stripe = useStripe();
11
+ const elements = useElements();
12
+ const [message, setMessage] = useState(null);
13
+ const [isLoading, setIsLoading] = useState(false);
14
+ const handleSubmit = async (e) => {
15
+ e.preventDefault();
16
+ if (!stripe || !elements) {
17
+ return;
18
+ }
19
+ setIsLoading(true);
20
+ setMessage(null);
21
+ const { error } = await stripe.confirmPayment({
22
+ elements,
23
+ confirmParams: {
24
+ // Make sure to change this to your payment completion page
25
+ return_url: `${window.location.origin}${returnUrl}`
26
+ }
27
+ });
28
+ if (error.type === "card_error" || error.type === "validation_error") {
29
+ setMessage(error.message ?? "An unexpected error occurred.");
30
+ } else {
31
+ setMessage("An unexpected error occurred.");
32
+ }
33
+ setIsLoading(false);
34
+ };
35
+ return /* @__PURE__ */ jsxs(Card, { className: "w-full max-w-md", children: [
36
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
37
+ /* @__PURE__ */ jsx(CardTitle, { children: "Payment Details" }),
38
+ /* @__PURE__ */ jsxs(CardDescription, { children: [
39
+ "Complete your purchase of $",
40
+ amount / 100,
41
+ " ",
42
+ currency.toUpperCase(),
43
+ "."
44
+ ] })
45
+ ] }),
46
+ /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, children: [
47
+ /* @__PURE__ */ jsxs(CardContent, { className: "grid gap-6", children: [
48
+ /* @__PURE__ */ jsx(PaymentElement, { id: "payment-element", options: { layout: "tabs" } }),
49
+ !!message && /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
50
+ /* @__PURE__ */ jsx(AlertTitle, { children: "Error" }),
51
+ /* @__PURE__ */ jsx(AlertDescription, { children: message })
52
+ ] })
53
+ ] }),
54
+ /* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsx(
55
+ Button,
56
+ {
57
+ disabled: isLoading || !stripe || !elements,
58
+ className: "w-full",
59
+ type: "submit",
60
+ children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
61
+ /* @__PURE__ */ jsx(LoaderCircleIcon, { size: 16, className: "mr-2 animate-spin" }),
62
+ "Processing..."
63
+ ] }) : "Pay Now"
64
+ }
65
+ ) })
66
+ ] })
67
+ ] });
68
+ }
69
+
70
+ export { CheckoutForm };
@@ -0,0 +1,112 @@
1
+ import { StaggerChildren } from './chunk-DQPK2XRL.js';
2
+ import { Heading } from './chunk-WI547C47.js';
3
+ import { ScrollFadeIn } from './chunk-I23DDSU7.js';
4
+ import { Card, CardHeader, CardContent } from './chunk-AH6YSYYT.js';
5
+ import { SparklesIcon } from './chunk-CGUCH322.js';
6
+ import { RocketIcon } from './chunk-QPXTBZWN.js';
7
+ import { CheckIcon } from './chunk-CXACRCZ4.js';
8
+ import { AlertTriangleIcon } from './chunk-SXHYB7JB.js';
9
+ import { Badge } from './chunk-S4JAHKOP.js';
10
+ import { cn } from './chunk-QYZT24TS.js';
11
+ import { jsx, jsxs } from 'react/jsx-runtime';
12
+
13
+ var sectionStyles = [
14
+ { border: "border-destructive/30", badgeVariant: "destructive" },
15
+ { border: "border-accent/30", badgeVariant: "accent" },
16
+ { border: "border-success/30", badgeVariant: "accent" }
17
+ ];
18
+ var defaultSections = [
19
+ {
20
+ icon: /* @__PURE__ */ jsx(AlertTriangleIcon, { size: 20, "aria-hidden": true }),
21
+ label: "The Problem",
22
+ title: "Manual processes drain your team",
23
+ description: "Repetitive tasks consume valuable hours that could be spent on strategic work.",
24
+ bullets: [
25
+ "Hours lost to data entry and reporting",
26
+ "Inconsistent quality from manual processes",
27
+ "Scaling requires proportional headcount"
28
+ ]
29
+ },
30
+ {
31
+ icon: /* @__PURE__ */ jsx(SparklesIcon, { size: 20, "aria-hidden": true }),
32
+ label: "Our Solution",
33
+ title: "AI workers that integrate seamlessly",
34
+ description: "Purpose-built digital workers that slot into your existing workflows.",
35
+ bullets: [
36
+ "Trained on your specific business processes",
37
+ "Real-time monitoring and quality assurance",
38
+ "Seamless integration with existing tools"
39
+ ]
40
+ },
41
+ {
42
+ icon: /* @__PURE__ */ jsx(RocketIcon, { size: 20, "aria-hidden": true }),
43
+ label: "The Output",
44
+ title: "Measurable business impact",
45
+ description: "Concrete results from day one, with continuous improvement over time.",
46
+ bullets: [
47
+ "70% reduction in processing time",
48
+ "99.5% accuracy on routine tasks",
49
+ "ROI positive within 90 days"
50
+ ]
51
+ }
52
+ ];
53
+ function SolutionShowcaseBlock({
54
+ title = "How we deliver results",
55
+ description = "A proven three-stage approach that transforms how your team operates.",
56
+ badge,
57
+ sections = defaultSections,
58
+ className
59
+ }) {
60
+ return /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsx("section", { className: cn("py-16 md:py-32", className), children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-5xl px-6", children: [
61
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
62
+ !!badge && /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "mb-4", children: badge }),
63
+ /* @__PURE__ */ jsx(Heading, { level: 2, size: "section", className: "text-4xl lg:text-5xl", children: title }),
64
+ /* @__PURE__ */ jsx("p", { className: "mt-4 text-lg text-text-secondary", children: description })
65
+ ] }),
66
+ /* @__PURE__ */ jsx(StaggerChildren, { staggerMs: 120, className: "mt-12 flex flex-col gap-8 md:mt-16", children: sections.map((section, i) => {
67
+ const style = sectionStyles[i % sectionStyles.length];
68
+ return /* @__PURE__ */ jsxs(
69
+ Card,
70
+ {
71
+ className: cn(
72
+ "glass-panel border-l-4 p-6 sm:p-8",
73
+ style.border
74
+ ),
75
+ children: [
76
+ /* @__PURE__ */ jsxs(CardHeader, { className: "gap-4 p-0 pb-4", children: [
77
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
78
+ section.icon && /* @__PURE__ */ jsx("span", { className: "text-text-secondary", children: section.icon }),
79
+ /* @__PURE__ */ jsx(Badge, { variant: style.badgeVariant, children: section.label })
80
+ ] }),
81
+ /* @__PURE__ */ jsx(Heading, { level: 3, size: "subsection", className: "text-xl sm:text-2xl", children: section.title })
82
+ ] }),
83
+ /* @__PURE__ */ jsxs(CardContent, { className: "p-0", children: [
84
+ /* @__PURE__ */ jsx("p", { className: "text-text-secondary", children: section.description }),
85
+ /* @__PURE__ */ jsx("ul", { className: "mt-4 space-y-2", children: section.bullets.map((bullet, j) => /* @__PURE__ */ jsxs(
86
+ "li",
87
+ {
88
+ className: "flex items-start gap-2 text-sm text-text-secondary",
89
+ children: [
90
+ /* @__PURE__ */ jsx(
91
+ CheckIcon,
92
+ {
93
+ size: 16,
94
+ className: "mt-0.5 shrink-0 text-accent",
95
+ "aria-hidden": true
96
+ }
97
+ ),
98
+ /* @__PURE__ */ jsx("span", { children: bullet })
99
+ ]
100
+ },
101
+ j
102
+ )) })
103
+ ] })
104
+ ]
105
+ },
106
+ i
107
+ );
108
+ }) })
109
+ ] }) }) });
110
+ }
111
+
112
+ export { SolutionShowcaseBlock };
@@ -0,0 +1,28 @@
1
+ import { TwoFactorChallengeBlock } from './chunk-W7FXDRQJ.js';
2
+ import { TwoFactorSetupBlock } from './chunk-IXQGKJU4.js';
3
+ import { cn } from './chunk-QYZT24TS.js';
4
+ import { jsx, jsxs } from 'react/jsx-runtime';
5
+
6
+ function TwoFactorPageKit({
7
+ mode = "challenge",
8
+ challengeProps,
9
+ setupProps,
10
+ errorMessage,
11
+ className,
12
+ cardClassName
13
+ }) {
14
+ const pageContent = mode === "setup" ? /* @__PURE__ */ jsx(TwoFactorSetupBlock, { className: cn("w-full", cardClassName), ...setupProps }) : /* @__PURE__ */ jsx(TwoFactorChallengeBlock, { className: cn("w-full", cardClassName), ...challengeProps });
15
+ 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: [
16
+ errorMessage ? /* @__PURE__ */ jsx(
17
+ "div",
18
+ {
19
+ role: "alert",
20
+ className: "w-full max-w-sm rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
21
+ children: errorMessage
22
+ }
23
+ ) : null,
24
+ pageContent
25
+ ] }) });
26
+ }
27
+
28
+ export { TwoFactorPageKit };