@designa8/vibedesign-v6 1.20.19 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/fonts/plusjakartasans/PlusJakartaSans-Italic[wght].ttf +0 -0
- package/dist/fonts/plusjakartasans/PlusJakartaSans[wght].ttf +0 -0
- package/dist/index.cjs +12027 -4942
- package/dist/index.js +12089 -5004
- package/dist/styles.css +1393 -97
- package/package.json +116 -1
- package/src/atoms/AgentQuestionCard/AgentQuestionCard.tsx +567 -0
- package/src/atoms/AgentQuestionCard/index.ts +6 -0
- package/src/atoms/AgentQuestionCard/preview.tsx +199 -0
- package/src/atoms/AppLayout/AppLayout.tsx +85 -22
- package/src/atoms/AppLayout/preview.tsx +4 -0
- package/src/atoms/AppSidebar/AppSidebar.tsx +222 -137
- package/src/atoms/AppSidebar/preview.tsx +61 -8
- package/src/atoms/AppSidebarMobile/AppSidebarMobile.tsx +241 -169
- package/src/atoms/AppSidebarMobile/preview.tsx +59 -89
- package/src/atoms/AuthLogin/AuthLogin.tsx +86 -49
- package/src/atoms/AuthLogin/preview.tsx +16 -0
- package/src/atoms/AuthSignUp/AuthSignUp.tsx +206 -126
- package/src/atoms/AuthSignUp/preview.tsx +10 -0
- package/src/atoms/BillingToggle/BillingToggle.tsx +2 -2
- package/src/atoms/BottomSheet/BottomSheet.tsx +199 -0
- package/src/atoms/BottomSheet/index.ts +2 -0
- package/src/atoms/BottomSheet/preview.tsx +50 -0
- package/src/atoms/Button/Button.tsx +19 -3
- package/src/atoms/Button/preview.tsx +2 -1
- package/src/atoms/ChatHistorySidebar/ChatHistorySidebar.tsx +160 -84
- package/src/atoms/ChatHistorySidebar/preview.tsx +81 -42
- package/src/atoms/ChatScreen/ChatScreen.tsx +298 -33
- package/src/atoms/ChatScreen/preview.tsx +54 -90
- package/src/atoms/Chip/Chip.tsx +81 -33
- package/src/atoms/Chip/preview.tsx +39 -21
- package/src/atoms/CodeEditor/CodeEditor.tsx +10 -4
- package/src/atoms/ComponentActionsSheet/ComponentActionsSheet.tsx +165 -0
- package/src/atoms/ComponentActionsSheet/index.ts +7 -0
- package/src/atoms/ComponentActionsSheet/preview.tsx +67 -0
- package/src/atoms/ComponentCard/ComponentCard.tsx +17 -35
- package/src/atoms/ComponentCard/preview.tsx +9 -9
- package/src/atoms/DesignSystemLoader/DesignSystemLoader.tsx +153 -0
- package/src/atoms/DesignSystemLoader/index.ts +2 -0
- package/src/atoms/DesignSystemLoader/preview.tsx +19 -0
- package/src/atoms/DesignSystemShowcase/DesignSystemShowcase.tsx +410 -0
- package/src/atoms/DesignSystemShowcase/index.ts +6 -0
- package/src/atoms/DesignSystemShowcase/preview.tsx +22 -0
- package/src/atoms/DesignTokensPanel/DesignTokensPanel.data.ts +254 -0
- package/src/atoms/DesignTokensPanel/DesignTokensPanel.tsx +946 -0
- package/src/atoms/DesignTokensPanel/index.ts +9 -0
- package/src/atoms/DesignTokensPanel/preview.tsx +39 -0
- package/src/atoms/ExpandableMessage/ExpandableMessage.tsx +239 -0
- package/src/atoms/ExpandableMessage/fix-link-note.txt +3 -0
- package/src/atoms/ExpandableMessage/index.ts +2 -0
- package/src/atoms/ExpandableMessage/markdown.tsx +310 -0
- package/src/atoms/ExpandableMessage/preview.tsx +83 -0
- package/src/atoms/FilterTabBar/FilterTabBar.tsx +2 -2
- package/src/atoms/FontCombobox/FontCombobox.tsx +655 -0
- package/src/atoms/FontCombobox/index.ts +6 -0
- package/src/atoms/FontCombobox/preview.tsx +111 -0
- package/src/atoms/HomePageTemplate/HomePageTemplate.tsx +894 -96
- package/src/atoms/HomePageTemplate/preview.tsx +4 -0
- package/src/atoms/Icon/Icon.tsx +17 -11
- package/src/atoms/Icon/icons.data.ts +34 -0
- package/src/atoms/Input/Input.tsx +37 -21
- package/src/atoms/LandingHero/LandingHero.tsx +545 -0
- package/src/atoms/LandingHero/index.ts +6 -0
- package/src/atoms/LandingHero/preview.tsx +88 -0
- package/src/atoms/MarketingFooter/MarketingFooter.tsx +215 -0
- package/src/atoms/MarketingFooter/index.ts +7 -0
- package/src/atoms/MarketingFooter/preview.tsx +28 -0
- package/src/atoms/MarketingNavbar/MarketingNavbar.tsx +451 -0
- package/src/atoms/MarketingNavbar/index.ts +7 -0
- package/src/atoms/MarketingNavbar/preview.tsx +109 -0
- package/src/atoms/MobileActionsDrawer/MobileActionsDrawer.tsx +548 -0
- package/src/atoms/MobileActionsDrawer/index.ts +9 -0
- package/src/atoms/MobileActionsDrawer/preview.tsx +109 -0
- package/src/atoms/Modal/Modal.tsx +77 -28
- package/src/atoms/PreviewDock/PreviewDock.tsx +119 -0
- package/src/atoms/PreviewDock/index.ts +2 -0
- package/src/atoms/PreviewDock/preview.tsx +30 -0
- package/src/atoms/PreviewToolbar/PreviewToolbar.tsx +47 -30
- package/src/atoms/PricingCard/PricingCard.tsx +15 -4
- package/src/atoms/PricingPageTemplate/PricingPageTemplate.tsx +109 -89
- package/src/atoms/ProjectSettingsModal/ProjectSettingsModal.tsx +314 -0
- package/src/atoms/ProjectSettingsModal/index.ts +2 -0
- package/src/atoms/ProjectSettingsModal/preview.tsx +130 -0
- package/src/atoms/ProjectSettingsModal/switch.snippet.txt +8 -0
- package/src/atoms/PromptInputBar/PromptInputBar.tsx +750 -302
- package/src/atoms/PromptInputBar/preview.tsx +64 -64
- package/src/atoms/SettingsPageTemplate/SettingsPageTemplate.tsx +272 -0
- package/src/atoms/SettingsPageTemplate/index.ts +2 -0
- package/src/atoms/SettingsPageTemplate/preview.tsx +29 -0
- package/src/atoms/SidebarUpgradeBanner/SidebarUpgradeBanner.tsx +178 -0
- package/src/atoms/SidebarUpgradeBanner/index.ts +2 -0
- package/src/atoms/SidebarUpgradeBanner/preview.tsx +47 -0
- package/src/atoms/SkeletonChip/SkeletonChip.tsx +198 -0
- package/src/atoms/SkeletonChip/index.ts +2 -0
- package/src/atoms/SkeletonChip/preview.tsx +44 -0
- package/src/atoms/TemplateHeader/TemplateHeader.tsx +129 -0
- package/src/atoms/TemplateHeader/index.ts +2 -0
- package/src/atoms/TemplateHeader/preview.tsx +39 -0
- package/src/atoms/TemplateHero/TemplateHero.tsx +286 -0
- package/src/atoms/TemplateHero/index.ts +2 -0
- package/src/atoms/TemplateHero/preview.tsx +32 -0
- package/src/atoms/TemplateSummary/TemplateSummary.tsx +85 -0
- package/src/atoms/TemplateSummary/index.ts +2 -0
- package/src/atoms/TemplateSummary/preview.tsx +10 -0
- package/src/atoms/Toast/Toast.tsx +178 -0
- package/src/atoms/Toast/index.ts +2 -0
- package/src/atoms/Toast/preview.tsx +100 -0
- package/src/atoms/TopNavbar/TopNavbar.tsx +145 -67
- package/src/atoms/TopNavbar/preview.tsx +13 -7
- package/src/atoms/TopupModal/TopupModal.tsx +94 -0
- package/src/atoms/TopupModal/index.ts +2 -0
- package/src/atoms/TopupModal/preview.tsx +22 -0
- package/src/atoms/UpgradeCard/UpgradeCard.tsx +124 -43
- package/src/atoms/UpgradeCard/index.ts +1 -1
- package/src/atoms/UpgradeCard/preview.tsx +7 -14
- package/src/atoms/UpgradeModal/UpgradeModal.tsx +192 -0
- package/src/atoms/UpgradeModal/index.ts +2 -0
- package/src/atoms/UpgradeModal/preview.tsx +41 -0
- package/src/index.ts +23 -0
- package/src/tokens.css +45 -7
- package/dist/fonts/inter/Inter-Italic[opsz,wght].ttf +0 -0
- package/dist/fonts/inter/Inter[opsz,wght].ttf +0 -0
|
@@ -4,13 +4,14 @@ import { Button } from "../Button";
|
|
|
4
4
|
import { Icon } from "../Icon";
|
|
5
5
|
import type { NavEntry } from "./AppSidebar";
|
|
6
6
|
|
|
7
|
-
/* ─── Scenario A: Full sidebar with dark mode + account menu
|
|
7
|
+
/* ─── Scenario A: Full sidebar with dark mode + account menu + upgrade ──── */
|
|
8
8
|
|
|
9
9
|
function FullSidebarDemo() {
|
|
10
10
|
const [collapsed, setCollapsed] = React.useState(false);
|
|
11
11
|
const [activeId, setActiveId] = React.useState("projects");
|
|
12
12
|
const [activeSubId, setActiveSubId] = React.useState<string | undefined>("proj-alpha");
|
|
13
13
|
const [darkMode, setDarkMode] = React.useState(false);
|
|
14
|
+
const [upgradeClicks, setUpgradeClicks] = React.useState(0);
|
|
14
15
|
const [subItems, setSubItems] = React.useState([
|
|
15
16
|
{ id: "proj-alpha", label: "Alpha", icon: <Icon name="file-document" className="size-[14px]" /> },
|
|
16
17
|
{ id: "proj-beta", label: "Beta", icon: <Icon name="file-document" className="size-[14px]" /> },
|
|
@@ -38,7 +39,7 @@ function FullSidebarDemo() {
|
|
|
38
39
|
return (
|
|
39
40
|
<div>
|
|
40
41
|
<p className="text-caption text-muted mb-sm">
|
|
41
|
-
Full footer · click
|
|
42
|
+
Full footer · click "Upgrade to Pro" or the avatar (email header + User Settings + Logout) · dark mode toggle
|
|
42
43
|
</p>
|
|
43
44
|
<div
|
|
44
45
|
className="relative flex bg-canvas rounded-xl border border-hairline shadow-card overflow-hidden"
|
|
@@ -53,12 +54,11 @@ function FullSidebarDemo() {
|
|
|
53
54
|
onSubSelect={setActiveSubId}
|
|
54
55
|
collapsed={collapsed}
|
|
55
56
|
onCollapsedChange={setCollapsed}
|
|
56
|
-
|
|
57
|
-
showShareCard
|
|
58
|
-
showUpgradeCard
|
|
57
|
+
onUpgradeClick={() => setUpgradeClicks((c) => c + 1)}
|
|
59
58
|
userInitials="O"
|
|
60
59
|
userEmail="ofer@example.com"
|
|
61
60
|
onLogout={() => alert("Logged out")}
|
|
61
|
+
onSettings={() => alert("Open user settings")}
|
|
62
62
|
onInboxClick={() => {}}
|
|
63
63
|
darkMode={darkMode}
|
|
64
64
|
onDarkModeToggle={() => setDarkMode((d) => !d)}
|
|
@@ -72,6 +72,9 @@ function FullSidebarDemo() {
|
|
|
72
72
|
Active: <strong>{activeId}</strong>
|
|
73
73
|
{activeSubId && <> › <strong>{activeSubId}</strong></>}
|
|
74
74
|
</p>
|
|
75
|
+
<p className="text-caption text-muted-soft text-center">
|
|
76
|
+
Upgrade clicked {upgradeClicks} time{upgradeClicks === 1 ? "" : "s"}.
|
|
77
|
+
</p>
|
|
75
78
|
{subItems.length === 0 && (
|
|
76
79
|
<p className="text-caption text-semantic-error">All projects deleted</p>
|
|
77
80
|
)}
|
|
@@ -96,7 +99,56 @@ function FullSidebarDemo() {
|
|
|
96
99
|
);
|
|
97
100
|
}
|
|
98
101
|
|
|
99
|
-
/* ─── Scenario B:
|
|
102
|
+
/* ─── Scenario B: Loading state — nav entries still fetching async ─────── */
|
|
103
|
+
|
|
104
|
+
function LoadingSidebarDemo() {
|
|
105
|
+
const [loading, setLoading] = React.useState(true);
|
|
106
|
+
const [collapsed, setCollapsed] = React.useState(false);
|
|
107
|
+
const [activeId, setActiveId] = React.useState("home");
|
|
108
|
+
|
|
109
|
+
const entries: NavEntry[] = [
|
|
110
|
+
{ id: "home", label: "Home", icon: <Icon name="home" className="size-[18px]" /> },
|
|
111
|
+
{ id: "search", label: "Search", icon: <Icon name="search-magnifier" className="size-[18px]" /> },
|
|
112
|
+
{ id: "starred", label: "Starred", icon: <Icon name="star" className="size-[18px]" /> },
|
|
113
|
+
{ id: "settings", label: "Settings", icon: <Icon name="settings-gear" className="size-[18px]" /> },
|
|
114
|
+
];
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<div>
|
|
118
|
+
<div className="flex items-center justify-between gap-md mb-sm">
|
|
119
|
+
<p className="text-caption text-muted">
|
|
120
|
+
Loading state — nav entries pending an async request (shimmer swaps for real rows when done)
|
|
121
|
+
</p>
|
|
122
|
+
<Button variant="secondary" size="sm" onClick={() => setLoading((l) => !l)}>
|
|
123
|
+
{loading ? "Finish loading" : "Reload nav"}
|
|
124
|
+
</Button>
|
|
125
|
+
</div>
|
|
126
|
+
<div
|
|
127
|
+
className="relative flex bg-canvas rounded-xl border border-hairline shadow-card overflow-hidden"
|
|
128
|
+
style={{ height: "420px" }}
|
|
129
|
+
>
|
|
130
|
+
<AppSidebar
|
|
131
|
+
brandName="Lovable"
|
|
132
|
+
entries={entries}
|
|
133
|
+
loading={loading}
|
|
134
|
+
activeId={activeId}
|
|
135
|
+
onSelect={setActiveId}
|
|
136
|
+
collapsed={collapsed}
|
|
137
|
+
onCollapsedChange={setCollapsed}
|
|
138
|
+
userInitials="O"
|
|
139
|
+
onInboxClick={() => {}}
|
|
140
|
+
/>
|
|
141
|
+
<div className="flex-1 flex items-center justify-center bg-surface-soft">
|
|
142
|
+
<p className="text-body-sm text-muted">
|
|
143
|
+
{loading ? "Fetching nav items…" : "Nav loaded"}
|
|
144
|
+
</p>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* ─── Scenario C: Minimal sidebar — no footer content at all ───────────── */
|
|
100
152
|
|
|
101
153
|
function MinimalSidebarDemo() {
|
|
102
154
|
const entries: NavEntry[] = [
|
|
@@ -110,7 +162,7 @@ function MinimalSidebarDemo() {
|
|
|
110
162
|
return (
|
|
111
163
|
<div>
|
|
112
164
|
<p className="text-caption text-muted mb-sm">
|
|
113
|
-
Minimal footer — no
|
|
165
|
+
Minimal footer — no upgrade card, no avatar, no inbox (footer collapses to nothing)
|
|
114
166
|
</p>
|
|
115
167
|
<div
|
|
116
168
|
className="relative flex bg-canvas rounded-xl border border-hairline shadow-card overflow-hidden"
|
|
@@ -130,7 +182,7 @@ function MinimalSidebarDemo() {
|
|
|
130
182
|
);
|
|
131
183
|
}
|
|
132
184
|
|
|
133
|
-
/* ─── Scenario
|
|
185
|
+
/* ─── Scenario D: Partial footer — avatar (no menu) + inbox + dark toggle ─ */
|
|
134
186
|
|
|
135
187
|
function PartialFooterDemo() {
|
|
136
188
|
const [darkMode, setDarkMode] = React.useState(false);
|
|
@@ -174,6 +226,7 @@ export default function AppSidebarPreview() {
|
|
|
174
226
|
return (
|
|
175
227
|
<div className="w-full max-w-4xl mx-auto p-lg space-y-xl">
|
|
176
228
|
<FullSidebarDemo />
|
|
229
|
+
<LoadingSidebarDemo />
|
|
177
230
|
<PartialFooterDemo />
|
|
178
231
|
<MinimalSidebarDemo />
|
|
179
232
|
</div>
|