@designa8/vibedesign-v6 1.15.3 → 1.20.13

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 (65) hide show
  1. package/README.md +6 -32
  2. package/dist/index.cjs +3232 -2143
  3. package/dist/index.js +3242 -2153
  4. package/dist/styles.css +266 -28
  5. package/package.json +52 -2
  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/ExportDesignMdModal/ExportDesignMdModal.tsx +46 -185
  36. package/src/atoms/ExportDesignMdModal/preview.tsx +24 -8
  37. package/src/atoms/FaqAccordionItem/FaqAccordionItem.tsx +60 -0
  38. package/src/atoms/FaqAccordionItem/index.ts +2 -0
  39. package/src/atoms/FaqAccordionItem/preview.tsx +26 -0
  40. package/src/atoms/FilterTabBar/FilterTabBar.tsx +8 -22
  41. package/src/atoms/HomePageTemplate/HomePageTemplate.tsx +20 -33
  42. package/src/atoms/HomePageTemplate/preview.tsx +2 -2
  43. package/src/atoms/Icon/Icon.tsx +7 -5
  44. package/src/atoms/Icon/icons.data.ts +53 -0
  45. package/src/atoms/Input/Input.tsx +17 -9
  46. package/src/atoms/Input/preview.tsx +24 -25
  47. package/src/atoms/Menu/Menu.tsx +320 -0
  48. package/src/atoms/Menu/index.ts +2 -0
  49. package/src/atoms/Menu/preview.tsx +63 -0
  50. package/src/atoms/Modal/Modal.tsx +43 -37
  51. package/src/atoms/Modal/preview.tsx +13 -0
  52. package/src/atoms/NavItem/NavItem.tsx +33 -45
  53. package/src/atoms/NavItem/preview.tsx +21 -26
  54. package/src/atoms/PreviewToolbar/PreviewToolbar.tsx +144 -192
  55. package/src/atoms/PreviewToolbar/preview.tsx +24 -4
  56. package/src/atoms/PricingCard/PricingCard.tsx +164 -0
  57. package/src/atoms/PricingCard/index.ts +2 -0
  58. package/src/atoms/PricingCard/preview.tsx +45 -0
  59. package/src/atoms/PricingPageTemplate/PricingPageTemplate.tsx +219 -0
  60. package/src/atoms/PricingPageTemplate/index.ts +2 -0
  61. package/src/atoms/PricingPageTemplate/preview.tsx +10 -0
  62. package/src/atoms/PromptInputBar/PromptInputBar.tsx +117 -158
  63. package/src/atoms/WorkspaceMenu/WorkspaceMenu.tsx +41 -167
  64. package/src/index.ts +10 -0
  65. package/src/tokens.css +5 -0
@@ -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
+ }