@designa8/vibedesign-v6 1.20.20 → 2.1.2

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 (125) hide show
  1. package/README.md +1 -1
  2. package/dist/fonts/plusjakartasans/PlusJakartaSans-Italic[wght].ttf +0 -0
  3. package/dist/fonts/plusjakartasans/PlusJakartaSans[wght].ttf +0 -0
  4. package/dist/index.cjs +12027 -4942
  5. package/dist/index.js +12089 -5004
  6. package/dist/styles.css +1393 -97
  7. package/package.json +116 -1
  8. package/src/atoms/AgentQuestionCard/AgentQuestionCard.tsx +567 -0
  9. package/src/atoms/AgentQuestionCard/index.ts +6 -0
  10. package/src/atoms/AgentQuestionCard/preview.tsx +199 -0
  11. package/src/atoms/AppLayout/AppLayout.tsx +85 -22
  12. package/src/atoms/AppLayout/preview.tsx +4 -0
  13. package/src/atoms/AppSidebar/AppSidebar.tsx +224 -138
  14. package/src/atoms/AppSidebar/index.ts +1 -1
  15. package/src/atoms/AppSidebar/preview.tsx +61 -8
  16. package/src/atoms/AppSidebarMobile/AppSidebarMobile.tsx +242 -173
  17. package/src/atoms/AppSidebarMobile/preview.tsx +59 -89
  18. package/src/atoms/AuthLogin/AuthLogin.tsx +86 -49
  19. package/src/atoms/AuthLogin/preview.tsx +16 -0
  20. package/src/atoms/AuthSignUp/AuthSignUp.tsx +206 -126
  21. package/src/atoms/AuthSignUp/preview.tsx +10 -0
  22. package/src/atoms/BottomSheet/BottomSheet.tsx +199 -0
  23. package/src/atoms/BottomSheet/index.ts +2 -0
  24. package/src/atoms/BottomSheet/preview.tsx +50 -0
  25. package/src/atoms/Button/Button.tsx +19 -3
  26. package/src/atoms/Button/preview.tsx +2 -1
  27. package/src/atoms/ChatHistorySidebar/ChatHistorySidebar.tsx +160 -84
  28. package/src/atoms/ChatHistorySidebar/preview.tsx +81 -42
  29. package/src/atoms/ChatScreen/ChatScreen.tsx +298 -33
  30. package/src/atoms/ChatScreen/preview.tsx +54 -90
  31. package/src/atoms/Chip/Chip.tsx +81 -33
  32. package/src/atoms/Chip/preview.tsx +39 -21
  33. package/src/atoms/CodeEditor/CodeEditor.tsx +10 -4
  34. package/src/atoms/ComponentActionsSheet/ComponentActionsSheet.tsx +165 -0
  35. package/src/atoms/ComponentActionsSheet/index.ts +7 -0
  36. package/src/atoms/ComponentActionsSheet/preview.tsx +67 -0
  37. package/src/atoms/ComponentCard/ComponentCard.tsx +17 -35
  38. package/src/atoms/ComponentCard/preview.tsx +9 -9
  39. package/src/atoms/DesignSystemLoader/DesignSystemLoader.tsx +153 -0
  40. package/src/atoms/DesignSystemLoader/index.ts +2 -0
  41. package/src/atoms/DesignSystemLoader/preview.tsx +19 -0
  42. package/src/atoms/DesignSystemShowcase/DesignSystemShowcase.tsx +410 -0
  43. package/src/atoms/DesignSystemShowcase/index.ts +6 -0
  44. package/src/atoms/DesignSystemShowcase/preview.tsx +22 -0
  45. package/src/atoms/DesignTokensPanel/DesignTokensPanel.data.ts +254 -0
  46. package/src/atoms/DesignTokensPanel/DesignTokensPanel.tsx +946 -0
  47. package/src/atoms/DesignTokensPanel/index.ts +9 -0
  48. package/src/atoms/DesignTokensPanel/preview.tsx +39 -0
  49. package/src/atoms/ExpandableMessage/ExpandableMessage.tsx +239 -0
  50. package/src/atoms/ExpandableMessage/fix-link-note.txt +3 -0
  51. package/src/atoms/ExpandableMessage/index.ts +2 -0
  52. package/src/atoms/ExpandableMessage/markdown.tsx +310 -0
  53. package/src/atoms/ExpandableMessage/preview.tsx +83 -0
  54. package/src/atoms/ExportDesignMdModal/ExportDesignMdModal.tsx +6 -1
  55. package/src/atoms/FilterTabBar/FilterTabBar.tsx +2 -2
  56. package/src/atoms/FontCombobox/FontCombobox.tsx +655 -0
  57. package/src/atoms/FontCombobox/index.ts +6 -0
  58. package/src/atoms/FontCombobox/preview.tsx +111 -0
  59. package/src/atoms/HomePageTemplate/HomePageTemplate.tsx +894 -96
  60. package/src/atoms/HomePageTemplate/preview.tsx +4 -0
  61. package/src/atoms/Icon/Icon.tsx +17 -11
  62. package/src/atoms/Icon/icons.data.ts +34 -0
  63. package/src/atoms/Input/Input.tsx +37 -21
  64. package/src/atoms/LandingHero/LandingHero.tsx +545 -0
  65. package/src/atoms/LandingHero/index.ts +6 -0
  66. package/src/atoms/LandingHero/preview.tsx +88 -0
  67. package/src/atoms/MarketingFooter/MarketingFooter.tsx +215 -0
  68. package/src/atoms/MarketingFooter/index.ts +7 -0
  69. package/src/atoms/MarketingFooter/preview.tsx +28 -0
  70. package/src/atoms/MarketingNavbar/MarketingNavbar.tsx +451 -0
  71. package/src/atoms/MarketingNavbar/index.ts +7 -0
  72. package/src/atoms/MarketingNavbar/preview.tsx +109 -0
  73. package/src/atoms/Menu/Menu.tsx +1 -1
  74. package/src/atoms/MobileActionsDrawer/MobileActionsDrawer.tsx +548 -0
  75. package/src/atoms/MobileActionsDrawer/index.ts +9 -0
  76. package/src/atoms/MobileActionsDrawer/preview.tsx +109 -0
  77. package/src/atoms/Modal/Modal.tsx +77 -28
  78. package/src/atoms/PreviewDock/PreviewDock.tsx +119 -0
  79. package/src/atoms/PreviewDock/index.ts +2 -0
  80. package/src/atoms/PreviewDock/preview.tsx +30 -0
  81. package/src/atoms/PreviewToolbar/PreviewToolbar.tsx +47 -30
  82. package/src/atoms/PricingCard/PricingCard.tsx +15 -4
  83. package/src/atoms/PricingPageTemplate/PricingPageTemplate.tsx +109 -89
  84. package/src/atoms/ProjectSettingsModal/ProjectSettingsModal.tsx +314 -0
  85. package/src/atoms/ProjectSettingsModal/index.ts +2 -0
  86. package/src/atoms/ProjectSettingsModal/preview.tsx +130 -0
  87. package/src/atoms/ProjectSettingsModal/switch.snippet.txt +8 -0
  88. package/src/atoms/PromptInputBar/PromptInputBar.tsx +750 -302
  89. package/src/atoms/PromptInputBar/preview.tsx +64 -64
  90. package/src/atoms/SettingsPageTemplate/SettingsPageTemplate.tsx +272 -0
  91. package/src/atoms/SettingsPageTemplate/index.ts +2 -0
  92. package/src/atoms/SettingsPageTemplate/preview.tsx +29 -0
  93. package/src/atoms/SidebarUpgradeBanner/SidebarUpgradeBanner.tsx +178 -0
  94. package/src/atoms/SidebarUpgradeBanner/index.ts +2 -0
  95. package/src/atoms/SidebarUpgradeBanner/preview.tsx +47 -0
  96. package/src/atoms/SkeletonChip/SkeletonChip.tsx +198 -0
  97. package/src/atoms/SkeletonChip/index.ts +2 -0
  98. package/src/atoms/SkeletonChip/preview.tsx +44 -0
  99. package/src/atoms/TemplateHeader/TemplateHeader.tsx +129 -0
  100. package/src/atoms/TemplateHeader/index.ts +2 -0
  101. package/src/atoms/TemplateHeader/preview.tsx +39 -0
  102. package/src/atoms/TemplateHero/TemplateHero.tsx +286 -0
  103. package/src/atoms/TemplateHero/index.ts +2 -0
  104. package/src/atoms/TemplateHero/preview.tsx +32 -0
  105. package/src/atoms/TemplateSummary/TemplateSummary.tsx +85 -0
  106. package/src/atoms/TemplateSummary/index.ts +2 -0
  107. package/src/atoms/TemplateSummary/preview.tsx +10 -0
  108. package/src/atoms/Toast/Toast.tsx +178 -0
  109. package/src/atoms/Toast/index.ts +2 -0
  110. package/src/atoms/Toast/preview.tsx +100 -0
  111. package/src/atoms/TopNavbar/TopNavbar.tsx +145 -67
  112. package/src/atoms/TopNavbar/preview.tsx +13 -7
  113. package/src/atoms/TopupModal/TopupModal.tsx +94 -0
  114. package/src/atoms/TopupModal/index.ts +2 -0
  115. package/src/atoms/TopupModal/preview.tsx +22 -0
  116. package/src/atoms/UpgradeCard/UpgradeCard.tsx +124 -43
  117. package/src/atoms/UpgradeCard/index.ts +1 -1
  118. package/src/atoms/UpgradeCard/preview.tsx +7 -14
  119. package/src/atoms/UpgradeModal/UpgradeModal.tsx +192 -0
  120. package/src/atoms/UpgradeModal/index.ts +2 -0
  121. package/src/atoms/UpgradeModal/preview.tsx +41 -0
  122. package/src/index.ts +23 -0
  123. package/src/tokens.css +45 -7
  124. package/dist/fonts/inter/Inter-Italic[opsz,wght].ttf +0 -0
  125. package/dist/fonts/inter/Inter[opsz,wght].ttf +0 -0
@@ -1,118 +1,88 @@
1
1
  import React from "react";
2
2
  import { AppSidebarMobile } from "./AppSidebarMobile";
3
+ import type { MobileNavEntry } from "./AppSidebarMobile";
3
4
  import { Icon } from "../Icon";
4
5
 
5
- const ENTRIES = [
6
+ const entries: MobileNavEntry[] = [
6
7
  { id: "home", label: "Home", icon: <Icon name="home" /> },
7
8
  {
8
9
  id: "projects",
9
- label: "All projects",
10
+ label: "Projects",
10
11
  icon: <Icon name="folder" />,
11
12
  subItems: [
12
- { id: "p1", label: "Design system" },
13
- { id: "p2", label: "Landing page" },
14
- { id: "p3", label: "Dashboard" },
13
+ { id: "p-landing", label: "Landing page" },
14
+ { id: "p-dashboard", label: "Analytics dashboard" },
15
+ { id: "p-checkout", label: "Checkout flow" },
15
16
  ],
16
17
  },
17
18
  {
18
- id: "pinned",
19
- label: "Pinned",
20
- icon: <Icon name="star" />,
19
+ id: "templates",
20
+ label: "Templates",
21
+ icon: <Icon name="layout-template" />,
21
22
  alwaysExpanded: true,
22
23
  subItems: [
23
- { id: "pin1", label: "Weekly report" },
24
- { id: "pin2", label: "Roadmap" },
24
+ { id: "t-auth", label: "Auth screens" },
25
+ { id: "t-pricing", label: "Pricing page" },
25
26
  ],
26
27
  },
27
28
  ];
28
29
 
30
+ function PlaceholderContent({ note }: { note: string }) {
31
+ return (
32
+ <div className="space-y-sm p-md">
33
+ <p className="text-body-sm text-body">{note}</p>
34
+ <div className="h-24 rounded-lg bg-surface-soft" />
35
+ <div className="h-4 w-3/4 rounded-sm bg-surface-strong" />
36
+ <div className="h-4 w-1/2 rounded-sm bg-surface-strong" />
37
+ <div className="h-24 rounded-lg bg-surface-soft" />
38
+ </div>
39
+ );
40
+ }
41
+
29
42
  export default function Preview() {
30
- const [activeId, setActiveId] = React.useState("home");
31
- const [isDark, setIsDark] = React.useState(false);
43
+ const [open, setOpen] = React.useState(false);
44
+ const [activeId, setActiveId] = React.useState<string | undefined>("projects");
45
+ const [activeSubId, setActiveSubId] = React.useState<string | undefined>("p-dashboard");
46
+ const [dark, setDark] = React.useState(false);
47
+ const [log, setLog] = React.useState(
48
+ "Tap the menu — a drawer slides in from the left over this content; the bar stays the same height.",
49
+ );
32
50
 
33
51
  return (
34
- <div className="w-full max-w-3xl mx-auto p-lg space-y-lg">
35
- {/* Basic usage — no dark mode toggle */}
36
- <div className="rounded-xl bg-surface border border-hairline p-lg flex items-center justify-between gap-md">
37
- <div>
38
- <p className="text-body-sm font-weight-heading-sm text-ink mb-xs">Default (no toggle)</p>
39
- <p className="text-caption text-muted">Tap the hamburger to open the drawer. No dark-mode button shown.</p>
40
- </div>
52
+ <div className="w-full max-w-3xl mx-auto p-lg space-y-sm">
53
+ <p className="text-caption text-muted">
54
+ Header bar — menu left, brand centered, initials right, no bottom rule
55
+ </p>
56
+ <div className="w-full overflow-hidden rounded-lg border border-hairline bg-canvas">
41
57
  <AppSidebarMobile
42
- brandName="Atoms"
43
- entries={ENTRIES}
58
+ entries={entries}
59
+ open={open}
60
+ onOpenChange={setOpen}
44
61
  activeId={activeId}
45
- onSelect={setActiveId}
46
- workspaceName="Hello Designer"
47
- showShareCard
48
- showUpgradeCard
49
- userInitials="N"
50
- onInboxClick={() => {}}
51
- />
52
- </div>
53
-
54
- {/* With dark mode toggle + always-expanded "Pinned" group */}
55
- <div className="rounded-xl bg-surface border border-hairline p-lg flex items-center justify-between gap-md">
56
- <div>
57
- <p className="text-body-sm font-weight-heading-sm text-ink mb-xs">Always-expanded group + dark-mode toggle</p>
58
- <p className="text-caption text-muted">
59
- "Pinned" is always expanded and can&apos;t be collapsed; "All projects" still toggles via chevron.
60
- Currently: <strong>{isDark ? "dark" : "light"}</strong>
61
- </p>
62
- </div>
63
- <AppSidebarMobile
64
- brandName="Atoms"
65
- entries={ENTRIES}
66
- activeId={activeId}
67
- onSelect={setActiveId}
62
+ activeSubId={activeSubId}
63
+ onSelect={(id) => {
64
+ setActiveId(id);
65
+ setActiveSubId(undefined);
66
+ setLog(`Navigated to ${id}`);
67
+ }}
68
+ onSubSelect={(id) => {
69
+ setActiveSubId(id);
70
+ setActiveId(id.startsWith("p-") ? "projects" : "templates");
71
+ setLog(`Opened ${id}`);
72
+ }}
68
73
  defaultExpandedIds={["projects"]}
69
- workspaceName="Hello Designer"
74
+ workspaceName="Design Team"
70
75
  showShareCard
71
- showUpgradeCard
72
- userInitials="N"
73
- onInboxClick={() => {}}
74
- darkMode={isDark}
75
- onDarkModeToggle={() => setIsDark((d) => !d)}
76
+ userInitials="JD"
77
+ onInboxClick={() => setLog("Inbox opened")}
78
+ darkMode={dark}
79
+ onDarkModeToggle={() => setDark((d) => !d)}
80
+ userEmail="jordan@example.com"
81
+ onSettings={() => setLog("Opened user settings")}
82
+ onLogout={() => setLog("Logged out")}
83
+ onUpgradeClick={() => setLog("Upgrade clicked")}
76
84
  />
77
- </div>
78
-
79
- {/* Simulated mobile frame */}
80
- <div
81
- className="mx-auto rounded-xl overflow-hidden border border-hairline bg-surface-soft"
82
- style={{ width: "320px", height: "520px", position: "relative" }}
83
- >
84
- {/* Fake mobile top bar */}
85
- <div className="flex items-center justify-between px-md py-sm bg-canvas border-b border-hairline">
86
- <AppSidebarMobile
87
- brandName="Atoms"
88
- entries={ENTRIES}
89
- activeId={activeId}
90
- onSelect={setActiveId}
91
- defaultExpandedIds={["projects"]}
92
- workspaceName="Hello Designer"
93
- showShareCard
94
- showUpgradeCard
95
- userInitials="N"
96
- onInboxClick={() => {}}
97
- darkMode={isDark}
98
- onDarkModeToggle={() => setIsDark((d) => !d)}
99
- />
100
- <span className="text-body-sm font-weight-heading-sm text-ink">Atoms</span>
101
- <span
102
- className="flex items-center justify-center rounded-full bg-primary text-on-primary text-caption"
103
- style={{ width: "28px", height: "28px" }}
104
- >
105
- N
106
- </span>
107
- </div>
108
-
109
- {/* Placeholder content */}
110
- <div className="p-md space-y-sm">
111
- <div className="h-md rounded-md bg-surface-strong w-3/4" />
112
- <div className="h-sm rounded-md bg-surface-strong w-full" />
113
- <div className="h-sm rounded-md bg-surface-strong w-5/6" />
114
- <div className="h-sm rounded-md bg-surface-strong w-4/5" />
115
- </div>
85
+ <PlaceholderContent note={log} />
116
86
  </div>
117
87
  </div>
118
88
  );
@@ -10,12 +10,39 @@ export interface AuthLoginProps {
10
10
  loading?: boolean;
11
11
  /** Server-side error (e.g. invalid credentials). Rendered as a form-level alert above the submit button. */
12
12
  error?: string;
13
+ /** Optional legal copy (e.g. terms / privacy links) rendered under the "Sign up" line, inside the card. */
14
+ legalNote?: React.ReactNode;
13
15
  }
14
16
 
15
17
  const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
16
18
 
19
+ /**
20
+ * Google's brand mark is a fixed four-colour logo. The shared single-colour Icon
21
+ * atom cannot represent it, so it is drawn here with the google-* colour tokens.
22
+ */
23
+ const GoogleLogo = () => (
24
+ <svg aria-hidden="true" width="18" height="18" viewBox="0 0 24 24" className="shrink-0">
25
+ <path
26
+ d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
27
+ fill="var(--color-google-blue)"
28
+ />
29
+ <path
30
+ d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
31
+ fill="var(--color-google-green)"
32
+ />
33
+ <path
34
+ d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l3.66-2.84z"
35
+ fill="var(--color-google-yellow)"
36
+ />
37
+ <path
38
+ d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
39
+ fill="var(--color-google-red)"
40
+ />
41
+ </svg>
42
+ );
43
+
17
44
  export const AuthLogin = React.forwardRef<HTMLDivElement, AuthLoginProps>(
18
- ({ onLogin, onGoogleAuth, onSwitchToSignup, loading = false, error }, ref) => {
45
+ ({ onLogin, onGoogleAuth, onSwitchToSignup, loading = false, error, legalNote }, ref) => {
19
46
  const [email, setEmail] = useState("");
20
47
  const [password, setPassword] = useState("");
21
48
  const [showPassword, setShowPassword] = useState(false);
@@ -25,7 +52,10 @@ export const AuthLogin = React.forwardRef<HTMLDivElement, AuthLoginProps>(
25
52
  const emailId = useId();
26
53
  const passwordId = useId();
27
54
 
28
- const labelCls = "block text-body-sm font-weight-heading-sm text-ink mb-xs";
55
+ const labelCls = "block text-body-sm text-ink mb-xs";
56
+
57
+ const linkBtnCls =
58
+ "cursor-pointer rounded-sm text-primary transition duration-150 ease-out hover:text-primary-hover hover:underline active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue disabled:cursor-not-allowed disabled:opacity-50";
29
59
 
30
60
  const handleSubmit = (e: React.FormEvent) => {
31
61
  e.preventDefault();
@@ -58,13 +88,28 @@ export const AuthLogin = React.forwardRef<HTMLDivElement, AuthLoginProps>(
58
88
  onLogin?.({ email: trimmedEmail, password });
59
89
  };
60
90
 
91
+ const passwordToggle = (
92
+ <button
93
+ type="button"
94
+ aria-label={showPassword ? "Hide password" : "Show password"}
95
+ aria-pressed={showPassword}
96
+ onClick={() => setShowPassword((v) => !v)}
97
+ className="pointer-events-auto flex cursor-pointer items-center justify-center rounded-sm p-xxs text-muted transition duration-150 ease-out hover:text-ink active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue disabled:cursor-not-allowed disabled:opacity-50"
98
+ >
99
+ <Icon name={showPassword ? "eye-off-hide-password" : "eye-show-password"} size={16} />
100
+ </button>
101
+ );
102
+
61
103
  return (
62
104
  /* Full-width page background — fills the height of its column, content vertically centered */
63
105
  <div ref={ref} className="w-full min-h-full bg-surface p-xl flex flex-col justify-center">
64
106
  {/* Center column — limits content width on ultra-wide screens */}
65
107
  <div className="w-full max-w-3xl mx-auto flex justify-center">
66
108
  {/* Login card */}
67
- <div style={{ width: "min(100%, 24rem)" }} className="text-center">
109
+ <div
110
+ style={{ width: "min(100%, 26rem)" }}
111
+ className="rounded-xl border border-hairline bg-canvas p-xl text-center shadow-card"
112
+ >
68
113
  {/* Heading */}
69
114
  <h1 className="mb-xs text-heading-lg text-ink font-weight-heading-lg">
70
115
  Welcome back
@@ -74,28 +119,22 @@ export const AuthLogin = React.forwardRef<HTMLDivElement, AuthLoginProps>(
74
119
  </p>
75
120
 
76
121
  {/* OAuth */}
77
- <div className="space-y-sm text-left">
78
- <Button
79
- type="button"
80
- variant="secondary"
81
- size="lg"
82
- className="w-full justify-center"
83
- onClick={onGoogleAuth}
84
- >
85
- <svg aria-hidden="true" width="18" height="18" viewBox="0 0 24 24" className="shrink-0">
86
- <path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" fill="var(--color-google-blue)" />
87
- <path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="var(--color-google-green)" />
88
- <path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l3.66-2.84z" fill="var(--color-google-yellow)" />
89
- <path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="var(--color-google-red)" />
90
- </svg>
91
- Continue with Google
92
- </Button>
93
- </div>
122
+ <Button
123
+ type="button"
124
+ variant="secondary"
125
+ size="md"
126
+ className="w-full justify-center"
127
+ onClick={onGoogleAuth}
128
+ disabled={loading}
129
+ >
130
+ <GoogleLogo />
131
+ Continue with Google
132
+ </Button>
94
133
 
95
134
  {/* Divider */}
96
- <div className="my-xl flex items-center gap-base">
135
+ <div className="my-lg flex items-center gap-base">
97
136
  <div className="h-px flex-1 bg-hairline" />
98
- <span className="text-body-sm text-muted-soft">or</span>
137
+ <span className="text-caption text-muted-soft">or</span>
99
138
  <div className="h-px flex-1 bg-hairline" />
100
139
  </div>
101
140
 
@@ -108,7 +147,7 @@ export const AuthLogin = React.forwardRef<HTMLDivElement, AuthLoginProps>(
108
147
  type="email"
109
148
  autoComplete="email"
110
149
  required
111
- size="lg"
150
+ size="md"
112
151
  placeholder="you@company.com"
113
152
  value={email}
114
153
  onChange={(e) => {
@@ -116,15 +155,15 @@ export const AuthLogin = React.forwardRef<HTMLDivElement, AuthLoginProps>(
116
155
  if (emailError) setEmailError(null);
117
156
  }}
118
157
  error={emailError ?? undefined}
119
- leadingIcon={<Icon name="inbox-mail-tray" size={18} />}
158
+ leadingIcon={<Icon name="inbox-mail-tray" size={16} />}
120
159
  fullWidth
121
160
  />
122
161
  </div>
123
162
 
124
163
  <div>
125
164
  <div className="mb-xs flex items-center justify-between">
126
- <label htmlFor={passwordId} className={labelCls + " mb-0"}>Password</label>
127
- <a href="#" className="text-body-sm text-primary hover:underline">
165
+ <label htmlFor={passwordId} className="block text-body-sm text-ink">Password</label>
166
+ <a href="#" className={`text-body-sm ${linkBtnCls}`}>
128
167
  Forgot password?
129
168
  </a>
130
169
  </div>
@@ -132,7 +171,7 @@ export const AuthLogin = React.forwardRef<HTMLDivElement, AuthLoginProps>(
132
171
  id={passwordId}
133
172
  type={showPassword ? "text" : "password"}
134
173
  required
135
- size="lg"
174
+ size="md"
136
175
  autoComplete="current-password"
137
176
  placeholder="••••••••"
138
177
  value={password}
@@ -141,26 +180,17 @@ export const AuthLogin = React.forwardRef<HTMLDivElement, AuthLoginProps>(
141
180
  if (passwordError) setPasswordError(null);
142
181
  }}
143
182
  error={passwordError ?? undefined}
144
- leadingIcon={<Icon name="lock-padlock" size={18} />}
145
- trailingIcon={
146
- <Button
147
- type="button"
148
- variant="ghost"
149
- size="sm"
150
- aria-label={showPassword ? "Hide password" : "Show password"}
151
- aria-pressed={showPassword}
152
- onClick={() => setShowPassword((v) => !v)}
153
- className="pointer-events-auto p-0 h-auto min-w-0 border-transparent bg-transparent text-muted hover:text-ink hover:bg-transparent"
154
- >
155
- <Icon name={showPassword ? "eye-off-hide-password" : "eye-show-password"} size={18} />
156
- </Button>
157
- }
183
+ leadingIcon={<Icon name="lock-padlock" size={16} />}
184
+ trailingIcon={passwordToggle}
158
185
  fullWidth
159
186
  />
160
187
  </div>
161
188
 
162
189
  {error && error.trim().length > 0 && (
163
- <p role="alert" className="rounded-md px-base py-sm text-body-sm text-semantic-error">
190
+ <p
191
+ role="alert"
192
+ className="rounded-md bg-semantic-error-soft px-base py-sm text-body-sm text-semantic-error"
193
+ >
164
194
  {error}
165
195
  </p>
166
196
  )}
@@ -168,7 +198,7 @@ export const AuthLogin = React.forwardRef<HTMLDivElement, AuthLoginProps>(
168
198
  <Button
169
199
  type="submit"
170
200
  variant="primary"
171
- size="lg"
201
+ size="md"
172
202
  loading={loading}
173
203
  disabled={loading}
174
204
  className="w-full border-none"
@@ -176,20 +206,27 @@ export const AuthLogin = React.forwardRef<HTMLDivElement, AuthLoginProps>(
176
206
  backgroundImage: "linear-gradient(135deg, var(--color-primary), var(--color-primary-hover))",
177
207
  }}
178
208
  >
179
- {loading ? "Please wait…" : "Sign in"}
209
+ {loading ? "Please wait…" : "Login"}
180
210
  </Button>
181
211
  </form>
182
212
 
183
213
  {/* Footer */}
184
- <p className="mt-xl text-body-sm text-muted">
214
+ <p className="mt-lg text-body-sm text-muted">
185
215
  Don&rsquo;t have an account?{" "}
186
- <Button type="button" variant="ghost" size="sm"
216
+ <button
217
+ type="button"
187
218
  onClick={onSwitchToSignup}
188
- style={{ whiteSpace: "normal" }}
189
- className="text-primary hover:underline bg-transparent border-transparent p-0 h-auto">
219
+ disabled={loading}
220
+ className={`text-body-sm ${linkBtnCls}`}
221
+ >
190
222
  Sign up
191
- </Button>
223
+ </button>
192
224
  </p>
225
+
226
+ {/* Optional legal note */}
227
+ {legalNote ? (
228
+ <div className="mt-base text-body-sm text-muted-soft">{legalNote}</div>
229
+ ) : null}
193
230
  </div>
194
231
  </div>
195
232
  </div>
@@ -1,6 +1,9 @@
1
1
  import React, { useState } from "react";
2
2
  import { AuthLogin } from "./AuthLogin";
3
3
 
4
+ const linkCls =
5
+ "cursor-pointer rounded-xs text-primary transition duration-150 ease-out hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
6
+
4
7
  export default function AuthLoginPreview() {
5
8
  const [loading, setLoading] = useState(false);
6
9
 
@@ -16,6 +19,19 @@ export default function AuthLoginPreview() {
16
19
  onLogin={handleLogin}
17
20
  onGoogleAuth={() => alert("Continue with Google")}
18
21
  onSwitchToSignup={() => alert("Navigate to sign up")}
22
+ legalNote={
23
+ <>
24
+ By continuing you agree to our{" "}
25
+ <a href="#" className={linkCls}>
26
+ Terms
27
+ </a>{" "}
28
+ and{" "}
29
+ <a href="#" className={linkCls}>
30
+ Privacy Policy
31
+ </a>
32
+ .
33
+ </>
34
+ }
19
35
  />
20
36
  </div>
21
37
  );