@designa8/vibedesign-v6 1.15.3 → 1.20.12

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 (63) hide show
  1. package/README.md +1 -1
  2. package/dist/index.cjs +3232 -1994
  3. package/dist/index.js +3242 -2004
  4. package/dist/styles.css +266 -28
  5. package/package.json +51 -1
  6. package/src/atoms/AppLayout/AppLayout.tsx +401 -395
  7. package/src/atoms/AppLayout/preview.tsx +29 -0
  8. package/src/atoms/AppSidebar/AppSidebar.tsx +182 -94
  9. package/src/atoms/AppSidebar/preview.tsx +20 -59
  10. package/src/atoms/AppSidebarMobile/AppSidebarMobile.tsx +27 -73
  11. package/src/atoms/AppSidebarMobile/preview.tsx +18 -18
  12. package/src/atoms/AuthLogin/AuthLogin.tsx +200 -0
  13. package/src/atoms/AuthLogin/index.ts +2 -0
  14. package/src/atoms/AuthLogin/preview.tsx +22 -0
  15. package/src/atoms/AuthScreen/AuthScreen.tsx +7 -7
  16. package/src/atoms/AuthSignUp/AuthSignUp.tsx +243 -0
  17. package/src/atoms/AuthSignUp/index.ts +2 -0
  18. package/src/atoms/AuthSignUp/preview.tsx +22 -0
  19. package/src/atoms/BillingToggle/BillingToggle.tsx +65 -0
  20. package/src/atoms/BillingToggle/index.ts +2 -0
  21. package/src/atoms/BillingToggle/preview.tsx +23 -0
  22. package/src/atoms/Button/Button.tsx +33 -17
  23. package/src/atoms/Button/preview.tsx +16 -0
  24. package/src/atoms/ChatHistorySidebar/ChatHistorySidebar.tsx +370 -0
  25. package/src/atoms/ChatHistorySidebar/index.ts +2 -0
  26. package/src/atoms/ChatHistorySidebar/preview.tsx +60 -0
  27. package/src/atoms/ChatScreen/ChatScreen.tsx +331 -134
  28. package/src/atoms/ChatScreen/preview.tsx +123 -2
  29. package/src/atoms/Checkbox/Checkbox.tsx +89 -0
  30. package/src/atoms/Checkbox/index.ts +2 -0
  31. package/src/atoms/Checkbox/preview.tsx +60 -0
  32. package/src/atoms/Dropdown/Dropdown.tsx +195 -0
  33. package/src/atoms/Dropdown/index.ts +2 -0
  34. package/src/atoms/Dropdown/preview.tsx +56 -0
  35. package/src/atoms/FaqAccordionItem/FaqAccordionItem.tsx +60 -0
  36. package/src/atoms/FaqAccordionItem/index.ts +2 -0
  37. package/src/atoms/FaqAccordionItem/preview.tsx +26 -0
  38. package/src/atoms/FilterTabBar/FilterTabBar.tsx +8 -22
  39. package/src/atoms/HomePageTemplate/HomePageTemplate.tsx +20 -33
  40. package/src/atoms/HomePageTemplate/preview.tsx +2 -2
  41. package/src/atoms/Icon/Icon.tsx +7 -5
  42. package/src/atoms/Icon/icons.data.ts +51 -0
  43. package/src/atoms/Input/Input.tsx +17 -9
  44. package/src/atoms/Input/preview.tsx +24 -25
  45. package/src/atoms/Menu/Menu.tsx +320 -0
  46. package/src/atoms/Menu/index.ts +2 -0
  47. package/src/atoms/Menu/preview.tsx +63 -0
  48. package/src/atoms/Modal/Modal.tsx +43 -37
  49. package/src/atoms/Modal/preview.tsx +13 -0
  50. package/src/atoms/NavItem/NavItem.tsx +33 -45
  51. package/src/atoms/NavItem/preview.tsx +21 -26
  52. package/src/atoms/PreviewToolbar/PreviewToolbar.tsx +144 -192
  53. package/src/atoms/PreviewToolbar/preview.tsx +24 -4
  54. package/src/atoms/PricingCard/PricingCard.tsx +164 -0
  55. package/src/atoms/PricingCard/index.ts +2 -0
  56. package/src/atoms/PricingCard/preview.tsx +45 -0
  57. package/src/atoms/PricingPageTemplate/PricingPageTemplate.tsx +219 -0
  58. package/src/atoms/PricingPageTemplate/index.ts +2 -0
  59. package/src/atoms/PricingPageTemplate/preview.tsx +10 -0
  60. package/src/atoms/PromptInputBar/PromptInputBar.tsx +117 -158
  61. package/src/atoms/WorkspaceMenu/WorkspaceMenu.tsx +41 -167
  62. package/src/index.ts +10 -0
  63. package/src/tokens.css +5 -0
@@ -1,11 +1,26 @@
1
1
  import React, { useState } from "react";
2
2
  import { PreviewToolbar, Viewport } from "./PreviewToolbar";
3
+ import type { MenuItem } from "../Menu";
3
4
 
4
5
  export default function PreviewToolbarPreview() {
5
6
  const [viewport, setViewport] = useState<Viewport>("desktop");
6
7
  const [darkMode, setDarkMode] = useState(false);
7
8
  const [inspecting, setInspecting] = useState(false);
8
9
  const [expanded, setExpanded] = useState(false);
10
+ const [lastAction, setLastAction] = useState("none");
11
+
12
+ const overflowItems: MenuItem[] = [
13
+ { id: "duplicate", label: "Duplicate", icon: "copy", onSelect: () => setLastAction("Duplicate") },
14
+ { id: "rename", label: "Rename", icon: "pencil-edit", onSelect: () => setLastAction("Rename") },
15
+ {
16
+ id: "delete",
17
+ label: "Delete",
18
+ icon: "trash-bin",
19
+ destructive: true,
20
+ withDividerBefore: true,
21
+ onSelect: () => setLastAction("Delete"),
22
+ },
23
+ ];
9
24
 
10
25
  return (
11
26
  <div className="w-full max-w-5xl mx-auto p-lg space-y-xl">
@@ -13,7 +28,7 @@ export default function PreviewToolbarPreview() {
13
28
  <div className="space-y-xxs">
14
29
  <p className="text-body-sm text-muted uppercase tracking-wide">Preview toolbar</p>
15
30
  <p className="text-body-sm text-muted">
16
- Interactive — click the viewport icons, toggle Dark mode, Inspect tokens, and the Expand button.
31
+ Interactive — click the viewport icons, toggle Dark mode, Inspect tokens, the Expand button, and the overflow menu.
17
32
  </p>
18
33
  </div>
19
34
 
@@ -30,7 +45,7 @@ export default function PreviewToolbarPreview() {
30
45
  expanded={expanded}
31
46
  onExpand={() => setExpanded((e) => !e)}
32
47
  onFullscreen={() => {}}
33
- onOverflow={() => {}}
48
+ overflowItems={overflowItems}
34
49
  />
35
50
  </div>
36
51
 
@@ -38,7 +53,8 @@ export default function PreviewToolbarPreview() {
38
53
  Active viewport: <strong className="text-ink">{viewport}</strong> ·
39
54
  Dark mode: <strong className="text-ink">{darkMode ? "on" : "off"}</strong> ·
40
55
  Inspecting: <strong className="text-ink">{inspecting ? "on" : "off"}</strong> ·
41
- Expanded: <strong className="text-ink">{expanded ? "on" : "off"}</strong>
56
+ Expanded: <strong className="text-ink">{expanded ? "on" : "off"}</strong> ·
57
+ Last overflow action: <strong className="text-ink">{lastAction}</strong>
42
58
  </p>
43
59
  </div>
44
60
 
@@ -58,6 +74,7 @@ export default function PreviewToolbarPreview() {
58
74
  inspecting
59
75
  modelLabel="Sonnet 4.6"
60
76
  kindLabel="ATOM"
77
+ overflowItems={overflowItems}
61
78
  className="w-full"
62
79
  />
63
80
  </div>
@@ -73,6 +90,7 @@ export default function PreviewToolbarPreview() {
73
90
  expanded
74
91
  modelLabel="Sonnet 4.6"
75
92
  kindLabel="ATOM"
93
+ overflowItems={overflowItems}
76
94
  />
77
95
  </div>
78
96
  </div>
@@ -86,6 +104,7 @@ export default function PreviewToolbarPreview() {
86
104
  inspecting
87
105
  modelLabel="Sonnet 4.6"
88
106
  kindLabel="ATOM"
107
+ overflowItems={overflowItems}
89
108
  />
90
109
  </div>
91
110
  </div>
@@ -95,10 +114,11 @@ export default function PreviewToolbarPreview() {
95
114
  <p className="text-body-sm text-muted font-weight-heading-sm">Dark mode active</p>
96
115
  <div className="flex items-start justify-center w-full bg-canvas rounded-xl p-xl border border-hairline">
97
116
  <PreviewToolbar
98
- viewport="sidebar"
117
+ viewport="desktop"
99
118
  darkMode
100
119
  kindLabel="ORGANISM"
101
120
  modelLabel="Haiku 3.5"
121
+ overflowItems={overflowItems}
102
122
  />
103
123
  </div>
104
124
  </div>
@@ -0,0 +1,164 @@
1
+ import React from "react";
2
+ import { Button } from "../Button";
3
+ import { Chip } from "../Chip";
4
+ import { Icon } from "../Icon";
5
+ import { Dropdown } from "../Dropdown";
6
+ import type { DropdownOption } from "../Dropdown";
7
+
8
+ export interface PricingCardCreditTier {
9
+ /** Unique value for this tier, e.g. "100". */
10
+ value: string;
11
+ /** Credits label, e.g. "100 credits". */
12
+ label: string;
13
+ /** Price for this tier, e.g. "$25 /mo". */
14
+ price: string;
15
+ /** Optional savings badge, e.g. "Save 2%". */
16
+ savingsLabel?: string;
17
+ }
18
+
19
+ export interface PricingCardProps extends React.HTMLAttributes<HTMLDivElement> {
20
+ /** Plan name, e.g. "Free", "Pro", "Enterprise". */
21
+ planName: string;
22
+ /** One-line description of who the plan is for. */
23
+ description: string;
24
+ /** Price to display, e.g. "$0", "$19", "Custom". */
25
+ price: string;
26
+ /** Unit shown after the price, e.g. "/ month". Omit for custom pricing. */
27
+ priceUnit?: string;
28
+ /** Small note under the price, e.g. "Billed monthly" or "Tailored to your needs". */
29
+ priceNote?: string;
30
+ /** Feature bullet list. */
31
+ features: string[];
32
+ /** Label for the primary CTA button. */
33
+ ctaLabel: string;
34
+ /** Called when the CTA button is clicked. */
35
+ onCtaClick?: () => void;
36
+ /** Small caption under the CTA, e.g. "No credit card required". */
37
+ ctaCaption?: string;
38
+ /** When true, renders the highlighted "most popular" treatment. */
39
+ highlighted?: boolean;
40
+ /** Label for the highlight badge. Only shown when highlighted is true. */
41
+ highlightLabel?: string;
42
+ /**
43
+ * Optional credit tiers. When provided, renders a Dropdown (below the
44
+ * price) letting the user pick a usage tier — e.g. "100 credits — $25/mo".
45
+ */
46
+ creditTiers?: PricingCardCreditTier[];
47
+ /** Currently selected credit tier value. Required when creditTiers is set. */
48
+ selectedCreditValue?: string;
49
+ /** Called when the user picks a different credit tier. */
50
+ onCreditChange?: (value: string) => void;
51
+ }
52
+
53
+ export const PricingCard = React.forwardRef<HTMLDivElement, PricingCardProps>(
54
+ (
55
+ {
56
+ planName,
57
+ description,
58
+ price,
59
+ priceUnit,
60
+ priceNote,
61
+ features,
62
+ ctaLabel,
63
+ onCtaClick,
64
+ ctaCaption,
65
+ highlighted = false,
66
+ highlightLabel = "Most popular",
67
+ creditTiers,
68
+ selectedCreditValue,
69
+ onCreditChange,
70
+ className,
71
+ ...rest
72
+ },
73
+ ref,
74
+ ) => {
75
+ const hasCreditTiers = !!creditTiers && creditTiers.length > 0;
76
+
77
+ const creditOptions: DropdownOption[] | undefined = hasCreditTiers
78
+ ? creditTiers!.map((tier) => ({
79
+ label: tier.label,
80
+ value: tier.value,
81
+ meta: tier.price,
82
+ badge: tier.savingsLabel,
83
+ }))
84
+ : undefined;
85
+
86
+ const selectedTier = hasCreditTiers
87
+ ? creditTiers!.find((tier) => tier.value === selectedCreditValue)
88
+ : undefined;
89
+
90
+ return (
91
+ <div
92
+ ref={ref}
93
+ className={[
94
+ "relative flex w-full flex-col rounded-xl border bg-canvas p-lg",
95
+ highlighted
96
+ ? "border-primary shadow-modal"
97
+ : "border-hairline shadow-card",
98
+ className,
99
+ ]
100
+ .filter(Boolean)
101
+ .join(" ")}
102
+ {...rest}
103
+ >
104
+ {highlighted && (
105
+ <div className="absolute -top-3.5 left-1/2 -translate-x-1/2">
106
+ <Chip label={highlightLabel} variant="primary" size="sm" className="uppercase tracking-wide" />
107
+ </div>
108
+ )}
109
+
110
+ <div className="flex flex-col gap-xxs">
111
+ <h3 className="text-heading-md text-ink">{planName}</h3>
112
+ <p className="text-body-sm text-muted">{description}</p>
113
+ </div>
114
+
115
+ <div className="mt-lg flex items-baseline gap-xs">
116
+ <span className="text-display-lg text-ink" style={{ lineHeight: 1 }}>
117
+ {selectedTier ? selectedTier.price.split("/")[0].trim() : price}
118
+ </span>
119
+ {priceUnit && !selectedTier && <span className="text-body-sm text-muted">{priceUnit}</span>}
120
+ </div>
121
+ {priceNote && !hasCreditTiers && <p className="mt-xs text-body-sm text-muted">{priceNote}</p>}
122
+
123
+ {hasCreditTiers && (
124
+ <div className="mt-md">
125
+ <Dropdown
126
+ options={creditOptions!}
127
+ value={selectedCreditValue}
128
+ onChange={(v) => onCreditChange?.(v)}
129
+ placeholder="Select credits"
130
+ />
131
+ </div>
132
+ )}
133
+
134
+ <div className="mt-lg border-t border-hairline pt-lg flex-1">
135
+ <ul className="flex flex-col gap-md" role="list">
136
+ {features.map((feature) => (
137
+ <li key={feature} className="flex items-start gap-sm">
138
+ <Icon
139
+ name="check-checkmark"
140
+ className="mt-0.5 size-4 flex-shrink-0 text-semantic-success"
141
+ />
142
+ <span className="text-body-sm text-body">{feature}</span>
143
+ </li>
144
+ ))}
145
+ </ul>
146
+ </div>
147
+
148
+ <div className="mt-lg flex flex-col items-center gap-sm">
149
+ <Button
150
+ variant={highlighted ? "primary" : "secondary"}
151
+ size="md"
152
+ onClick={onCtaClick}
153
+ className="w-full"
154
+ >
155
+ {ctaLabel}
156
+ </Button>
157
+ {ctaCaption && <span className="text-caption text-muted-soft">{ctaCaption}</span>}
158
+ </div>
159
+ </div>
160
+ );
161
+ },
162
+ );
163
+
164
+ PricingCard.displayName = "PricingCard";
@@ -0,0 +1,2 @@
1
+ export { PricingCard } from "./PricingCard";
2
+ export type { PricingCardProps, PricingCardCreditTier } from "./PricingCard";
@@ -0,0 +1,45 @@
1
+ import React, { useState } from "react";
2
+ import { PricingCard } from "./PricingCard";
3
+ import type { PricingCardCreditTier } from "./PricingCard";
4
+
5
+ const CREDIT_TIERS: PricingCardCreditTier[] = [
6
+ { value: "100", label: "100 credits", price: "$25 /mo" },
7
+ { value: "200", label: "200 credits", price: "$50 /mo" },
8
+ { value: "400", label: "400 credits", price: "$100 /mo" },
9
+ { value: "1200", label: "1,200 credits", price: "$294 /mo", savingsLabel: "Save 2%" },
10
+ { value: "2000", label: "2,000 credits", price: "$480 /mo", savingsLabel: "Save 4%" },
11
+ ];
12
+
13
+ export default function PricingCardPreview() {
14
+ const [credit, setCredit] = useState("100");
15
+
16
+ return (
17
+ <div className="w-full max-w-3xl mx-auto p-lg">
18
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-lg items-start">
19
+ <PricingCard
20
+ planName="Free"
21
+ description="For individuals getting started"
22
+ price="$0"
23
+ priceUnit="/ month"
24
+ features={["Up to 3 projects", "1,000 API requests / month", "Basic components", "Community support"]}
25
+ ctaLabel="Get started"
26
+ ctaCaption="No credit card required"
27
+ />
28
+ <PricingCard
29
+ planName="Pro"
30
+ description="For professionals and small teams"
31
+ price="$19"
32
+ priceUnit="/ month"
33
+ priceNote="Billed monthly"
34
+ features={["Unlimited projects", "All components & templates", "Priority email support", "Export design tokens"]}
35
+ ctaLabel="Start Pro trial"
36
+ ctaCaption="14-day free trial · No credit card required"
37
+ highlighted
38
+ creditTiers={CREDIT_TIERS}
39
+ selectedCreditValue={credit}
40
+ onCreditChange={setCredit}
41
+ />
42
+ </div>
43
+ </div>
44
+ );
45
+ }
@@ -0,0 +1,219 @@
1
+ import React from "react";
2
+ import { Button } from "../Button";
3
+ import { Chip } from "../Chip";
4
+ import { Icon } from "../Icon";
5
+ import { BillingToggle } from "../BillingToggle";
6
+ import type { BillingPeriod } from "../BillingToggle";
7
+ import { PricingCard } from "../PricingCard";
8
+ import type { PricingCardCreditTier } from "../PricingCard";
9
+ import { FaqAccordionItem } from "../FaqAccordionItem";
10
+
11
+ export interface PricingPlan {
12
+ id: string;
13
+ planName: string;
14
+ description: string;
15
+ monthlyPrice: string;
16
+ yearlyPrice: string;
17
+ priceUnit?: string;
18
+ priceNote?: string;
19
+ features: string[];
20
+ ctaLabel: string;
21
+ ctaCaption?: string;
22
+ highlighted?: boolean;
23
+ /** Optional usage-credit tiers rendered as a Dropdown on this plan's card. */
24
+ creditTiers?: PricingCardCreditTier[];
25
+ }
26
+
27
+ export interface PricingFaq {
28
+ question: string;
29
+ answer: string;
30
+ }
31
+
32
+ export interface PricingPageTemplateProps {
33
+ eyebrow?: string;
34
+ title?: string;
35
+ subtitle?: string;
36
+ plans?: PricingPlan[];
37
+ faqs?: PricingFaq[];
38
+ billingPeriod?: BillingPeriod;
39
+ onBillingPeriodChange?: (period: BillingPeriod) => void;
40
+ onPlanCtaClick?: (planId: string) => void;
41
+ onContactSupport?: () => void;
42
+ className?: string;
43
+ }
44
+
45
+ const CREDIT_TIERS: PricingCardCreditTier[] = [
46
+ { value: "100", label: "100 credits", price: "$25 /mo" },
47
+ { value: "200", label: "200 credits", price: "$50 /mo" },
48
+ { value: "400", label: "400 credits", price: "$100 /mo" },
49
+ { value: "800", label: "800 credits", price: "$200 /mo" },
50
+ { value: "1200", label: "1,200 credits", price: "$294 /mo", savingsLabel: "Save 2%" },
51
+ { value: "2000", label: "2,000 credits", price: "$480 /mo", savingsLabel: "Save 4%" },
52
+ { value: "3000", label: "3,000 credits", price: "$705 /mo", savingsLabel: "Save 6%" },
53
+ { value: "4000", label: "4,000 credits", price: "$920 /mo", savingsLabel: "Save 8%" },
54
+ { value: "5000", label: "5,000 credits", price: "$1,125 /mo", savingsLabel: "Save 10%" },
55
+ ];
56
+
57
+ const DEFAULT_PLANS: PricingPlan[] = [
58
+ {
59
+ id: "free",
60
+ planName: "Free",
61
+ description: "For individuals getting started",
62
+ monthlyPrice: "$0",
63
+ yearlyPrice: "$0",
64
+ priceUnit: "/ month",
65
+ features: [
66
+ "Up to 3 projects",
67
+ "1,000 API requests / month",
68
+ "Basic components",
69
+ "Community support",
70
+ "Public projects only",
71
+ ],
72
+ ctaLabel: "Get started",
73
+ ctaCaption: "No credit card required",
74
+ },
75
+ {
76
+ id: "pro",
77
+ planName: "Pro",
78
+ description: "For professionals and small teams",
79
+ monthlyPrice: "$25",
80
+ yearlyPrice: "$20",
81
+ priceUnit: "/ month",
82
+ priceNote: "Billed monthly",
83
+ features: [
84
+ "Unlimited projects",
85
+ "All components & templates",
86
+ "Priority email support",
87
+ "Private projects",
88
+ "Export design tokens",
89
+ ],
90
+ ctaLabel: "Start Pro trial",
91
+ ctaCaption: "14-day free trial · No credit card required",
92
+ highlighted: true,
93
+ creditTiers: CREDIT_TIERS,
94
+ },
95
+ ];
96
+
97
+ const DEFAULT_FAQS: PricingFaq[] = [
98
+ { question: "Can I change plans anytime?", answer: "Yes — upgrade, downgrade, or cancel your plan at any time from your account settings. Changes apply on your next billing cycle." },
99
+ { question: "Is there a free trial for Pro?", answer: "Pro includes a 14-day free trial, no credit card required. Cancel anytime during the trial at no charge." },
100
+ { question: "What payment methods do you accept?", answer: "We accept all major credit cards, plus invoicing for Enterprise plans." },
101
+ { question: "What happens if I exceed my API limit?", answer: "We'll notify you as you approach your limit. You can upgrade your plan at any time to raise it instantly." },
102
+ { question: "Do you offer refunds?", answer: "Yes, we offer a full refund within 14 days of purchase if you're not satisfied." },
103
+ ];
104
+
105
+ export const PricingPageTemplate = React.forwardRef<HTMLDivElement, PricingPageTemplateProps>(
106
+ (
107
+ {
108
+ eyebrow = "Pricing",
109
+ title = "Simple, transparent pricing",
110
+ subtitle = "Choose the plan that fits your workflow. Upgrade, downgrade, or cancel anytime.",
111
+ plans = DEFAULT_PLANS,
112
+ faqs = DEFAULT_FAQS,
113
+ billingPeriod,
114
+ onBillingPeriodChange,
115
+ onPlanCtaClick,
116
+ onContactSupport,
117
+ className,
118
+ },
119
+ ref,
120
+ ) => {
121
+ const [internalPeriod, setInternalPeriod] = React.useState<BillingPeriod>("monthly");
122
+ const period = billingPeriod ?? internalPeriod;
123
+
124
+ const handlePeriodChange = (next: BillingPeriod) => {
125
+ if (billingPeriod === undefined) setInternalPeriod(next);
126
+ onBillingPeriodChange?.(next);
127
+ };
128
+
129
+ const [openFaqIndex, setOpenFaqIndex] = React.useState<number | null>(0);
130
+
131
+ // Per-plan selected credit tier (only used by plans with creditTiers).
132
+ const [selectedCredits, setSelectedCredits] = React.useState<Record<string, string>>(() => {
133
+ const initial: Record<string, string> = {};
134
+ plans.forEach((plan) => {
135
+ if (plan.creditTiers && plan.creditTiers.length > 0) {
136
+ initial[plan.id] = plan.creditTiers[0].value;
137
+ }
138
+ });
139
+ return initial;
140
+ });
141
+
142
+ return (
143
+ <div
144
+ ref={ref}
145
+ className={["w-full bg-canvas", className].filter(Boolean).join(" ")}
146
+ >
147
+ <div className="w-full max-w-3xl mx-auto px-lg py-section flex flex-col items-center gap-xl">
148
+ {/* ── Header ── */}
149
+ <div className="flex flex-col items-center gap-md text-center">
150
+ <Chip label={eyebrow} variant="primary" size="sm" className="uppercase tracking-wide" />
151
+ <h1 className="text-display-lg text-ink">{title}</h1>
152
+ <p className="text-body-lg text-muted max-w-xl">{subtitle}</p>
153
+ </div>
154
+
155
+ {/* ── Billing toggle ── */}
156
+ <BillingToggle value={period} onChange={handlePeriodChange} />
157
+
158
+ {/* ── Pricing cards ── */}
159
+ <div className="w-full grid grid-cols-1 md:grid-cols-2 gap-lg items-start pt-md">
160
+ {plans.map((plan) => (
161
+ <PricingCard
162
+ key={plan.id}
163
+ planName={plan.planName}
164
+ description={plan.description}
165
+ price={period === "yearly" ? plan.yearlyPrice : plan.monthlyPrice}
166
+ priceUnit={plan.priceUnit}
167
+ priceNote={plan.priceNote}
168
+ features={plan.features}
169
+ ctaLabel={plan.ctaLabel}
170
+ ctaCaption={plan.ctaCaption}
171
+ highlighted={plan.highlighted}
172
+ creditTiers={plan.creditTiers}
173
+ selectedCreditValue={selectedCredits[plan.id]}
174
+ onCreditChange={(v) =>
175
+ setSelectedCredits((prev) => ({ ...prev, [plan.id]: v }))
176
+ }
177
+ onCtaClick={() => onPlanCtaClick?.(plan.id)}
178
+ />
179
+ ))}
180
+ </div>
181
+
182
+ {/* ── FAQ section ── */}
183
+ <div className="w-full rounded-xl border border-hairline bg-surface p-lg md:p-xl flex flex-col gap-lg">
184
+ <h2 className="text-heading-lg text-ink">Frequently asked questions</h2>
185
+
186
+ <div className="flex flex-col gap-sm">
187
+ {faqs.map((faq, idx) => (
188
+ <FaqAccordionItem
189
+ key={faq.question}
190
+ question={faq.question}
191
+ answer={faq.answer}
192
+ open={openFaqIndex === idx}
193
+ onToggle={() => setOpenFaqIndex(openFaqIndex === idx ? null : idx)}
194
+ />
195
+ ))}
196
+ </div>
197
+
198
+ <Button
199
+ type="button"
200
+ variant="ghost"
201
+ pushEffect={false}
202
+ onClick={onContactSupport}
203
+ className="!w-full !gap-sm !justify-center !text-muted !border-0"
204
+ >
205
+ <Icon name="help-question-circle" className="size-4 flex-shrink-0" />
206
+ <span className="text-body-sm">Still have questions?</span>
207
+ <span className="inline-flex items-center gap-xxs text-primary font-weight-heading-sm">
208
+ Contact our support team
209
+ <Icon name="external-link-arrow-up-right" className="size-3.5" />
210
+ </span>
211
+ </Button>
212
+ </div>
213
+ </div>
214
+ </div>
215
+ );
216
+ },
217
+ );
218
+
219
+ PricingPageTemplate.displayName = "PricingPageTemplate";
@@ -0,0 +1,2 @@
1
+ export { PricingPageTemplate } from "./PricingPageTemplate";
2
+ export type { PricingPageTemplateProps, PricingPlan, PricingFaq } from "./PricingPageTemplate";
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { PricingPageTemplate } from "./PricingPageTemplate";
3
+
4
+ export default function PricingPageTemplatePreview() {
5
+ return (
6
+ <div className="w-full">
7
+ <PricingPageTemplate />
8
+ </div>
9
+ );
10
+ }