@designa8/vibedesign-perplexity-internal-v1-2-176b 0.1.1 → 0.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @designa8/vibedesign-perplexity-internal-v1-2-176b
2
2
 
3
- Complete design system generated by Atoms Design, version **0.1.1**.
3
+ Complete design system generated by Atoms Design, version **0.1.2**.
4
4
  Tokens, atoms, molecules, organisms, and templates — import from the package root;
5
5
  never hardcode visual values in consumer code.
6
6
 
package/dist/index.cjs CHANGED
@@ -5389,6 +5389,7 @@ var NavbarDesktop = React55.forwardRef(
5389
5389
  actions,
5390
5390
  onSearch,
5391
5391
  onPreferences,
5392
+ showAccount = true,
5392
5393
  accountItems = DEFAULT_ACCOUNT,
5393
5394
  onAccountSelect,
5394
5395
  accountLabel = "Account menu",
@@ -5399,7 +5400,7 @@ var NavbarDesktop = React55.forwardRef(
5399
5400
  }, ref) => {
5400
5401
  const menuId = React55.useId();
5401
5402
  const [innerOpen, setInnerOpen] = React55.useState(false);
5402
- const open = menuOpen ?? innerOpen;
5403
+ const open = showAccount && (menuOpen ?? innerOpen);
5403
5404
  const setOpen = React55.useCallback(
5404
5405
  (v) => {
5405
5406
  if (menuOpen === void 0) setInnerOpen(v);
@@ -5485,27 +5486,29 @@ var NavbarDesktop = React55.forwardRef(
5485
5486
  }
5486
5487
  )
5487
5488
  ] }),
5488
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { "aria-hidden": "true", className: "mx-xs h-6 w-px bg-hairline" }),
5489
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5490
- IconButton,
5491
- {
5492
- ref: triggerRef,
5493
- icon: "user",
5494
- label: accountLabel,
5495
- variant: "soft",
5496
- pill: true,
5497
- "aria-haspopup": "menu",
5498
- "aria-expanded": open,
5499
- "aria-controls": menuId,
5500
- onClick: () => {
5501
- place();
5502
- setOpen(!open);
5489
+ showAccount ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
5490
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { "aria-hidden": "true", className: "mx-xs h-6 w-px bg-hairline" }),
5491
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5492
+ IconButton,
5493
+ {
5494
+ ref: triggerRef,
5495
+ icon: "user",
5496
+ label: accountLabel,
5497
+ variant: "soft",
5498
+ pill: true,
5499
+ "aria-haspopup": "menu",
5500
+ "aria-expanded": open,
5501
+ "aria-controls": menuId,
5502
+ onClick: () => {
5503
+ place();
5504
+ setOpen(!open);
5505
+ }
5503
5506
  }
5504
- }
5505
- )
5507
+ )
5508
+ ] }) : null
5506
5509
  ] })
5507
5510
  ] }),
5508
- mounted ? (0, import_react_dom6.createPortal)(
5511
+ mounted && showAccount ? (0, import_react_dom6.createPortal)(
5509
5512
  /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5510
5513
  "div",
5511
5514
  {
@@ -5899,6 +5902,7 @@ var NavigationMenuMobile = React59.forwardRef(
5899
5902
  onNavigate,
5900
5903
  open: openProp,
5901
5904
  onOpenChange,
5905
+ footer,
5902
5906
  expandedId: expandedProp,
5903
5907
  onExpandedIdChange,
5904
5908
  side = "left",
@@ -5958,6 +5962,7 @@ var NavigationMenuMobile = React59.forwardRef(
5958
5962
  onOpenChange: setOpen,
5959
5963
  side,
5960
5964
  headerStart: brand,
5965
+ footer,
5961
5966
  "aria-label": "Main menu",
5962
5967
  closeLabel: "Close menu",
5963
5968
  children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("nav", { "aria-label": "Main", className: "border-t border-hairline pt-sm", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("ul", { className: "flex flex-col gap-xxs", children: menu.map((m, i) => {
@@ -6046,39 +6051,73 @@ var NavigationMenu = React60.forwardRef(
6046
6051
  onPreferences,
6047
6052
  desktopActions,
6048
6053
  mobileActions,
6054
+ showAccount = true,
6049
6055
  accountItems,
6050
6056
  onAccountSelect,
6057
+ mobileOpen,
6058
+ onMobileOpenChange,
6059
+ mobileMenuFooter,
6051
6060
  className,
6061
+ onKeyDown,
6052
6062
  ...rest
6053
- }, ref) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { ref, className: ["w-full rounded-none", className].filter(Boolean).join(" "), ...rest, children: [
6054
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6055
- NavigationMenuDesktop,
6056
- {
6057
- menu,
6058
- logo,
6059
- brandName,
6060
- brandHref,
6061
- onNavigate,
6062
- onSearch,
6063
- onPreferences,
6064
- actions: desktopActions,
6065
- accountItems,
6066
- onAccountSelect
6067
- }
6068
- ) }),
6069
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6070
- NavigationMenuMobile,
6063
+ }, ref) => {
6064
+ const mobilePanelId = React60.useId();
6065
+ const drawerOpen = mobileOpen ?? false;
6066
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
6067
+ "div",
6071
6068
  {
6072
- menu,
6073
- logo,
6074
- brandName,
6075
- brandHref,
6076
- onNavigate,
6077
- onSearch,
6078
- actions: mobileActions
6069
+ ref,
6070
+ className: ["w-full rounded-none", className].filter(Boolean).join(" "),
6071
+ onKeyDown: (e) => {
6072
+ onKeyDown?.(e);
6073
+ if (e.key === "Escape" && drawerOpen) onMobileOpenChange?.(false);
6074
+ },
6075
+ ...rest,
6076
+ children: [
6077
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6078
+ NavigationMenuDesktop,
6079
+ {
6080
+ menu,
6081
+ logo,
6082
+ brandName,
6083
+ brandHref,
6084
+ onNavigate,
6085
+ onSearch,
6086
+ onPreferences,
6087
+ actions: desktopActions,
6088
+ showAccount,
6089
+ accountItems,
6090
+ onAccountSelect
6091
+ }
6092
+ ) }),
6093
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6094
+ "div",
6095
+ {
6096
+ id: mobilePanelId,
6097
+ className: "md:hidden",
6098
+ "aria-expanded": drawerOpen,
6099
+ "aria-controls": mobilePanelId,
6100
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6101
+ NavigationMenuMobile,
6102
+ {
6103
+ menu,
6104
+ logo,
6105
+ brandName,
6106
+ brandHref,
6107
+ onNavigate,
6108
+ onSearch,
6109
+ actions: mobileActions,
6110
+ open: mobileOpen,
6111
+ onOpenChange: onMobileOpenChange,
6112
+ footer: mobileMenuFooter
6113
+ }
6114
+ )
6115
+ }
6116
+ )
6117
+ ]
6079
6118
  }
6080
- ) })
6081
- ] })
6119
+ );
6120
+ }
6082
6121
  );
6083
6122
  NavigationMenu.displayName = "NavigationMenu";
6084
6123
 
package/dist/index.js CHANGED
@@ -5267,6 +5267,7 @@ var NavbarDesktop = React55.forwardRef(
5267
5267
  actions,
5268
5268
  onSearch,
5269
5269
  onPreferences,
5270
+ showAccount = true,
5270
5271
  accountItems = DEFAULT_ACCOUNT,
5271
5272
  onAccountSelect,
5272
5273
  accountLabel = "Account menu",
@@ -5277,7 +5278,7 @@ var NavbarDesktop = React55.forwardRef(
5277
5278
  }, ref) => {
5278
5279
  const menuId = React55.useId();
5279
5280
  const [innerOpen, setInnerOpen] = React55.useState(false);
5280
- const open = menuOpen ?? innerOpen;
5281
+ const open = showAccount && (menuOpen ?? innerOpen);
5281
5282
  const setOpen = React55.useCallback(
5282
5283
  (v) => {
5283
5284
  if (menuOpen === void 0) setInnerOpen(v);
@@ -5363,27 +5364,29 @@ var NavbarDesktop = React55.forwardRef(
5363
5364
  }
5364
5365
  )
5365
5366
  ] }),
5366
- /* @__PURE__ */ jsx55("span", { "aria-hidden": "true", className: "mx-xs h-6 w-px bg-hairline" }),
5367
- /* @__PURE__ */ jsx55(
5368
- IconButton,
5369
- {
5370
- ref: triggerRef,
5371
- icon: "user",
5372
- label: accountLabel,
5373
- variant: "soft",
5374
- pill: true,
5375
- "aria-haspopup": "menu",
5376
- "aria-expanded": open,
5377
- "aria-controls": menuId,
5378
- onClick: () => {
5379
- place();
5380
- setOpen(!open);
5367
+ showAccount ? /* @__PURE__ */ jsxs49(Fragment10, { children: [
5368
+ /* @__PURE__ */ jsx55("span", { "aria-hidden": "true", className: "mx-xs h-6 w-px bg-hairline" }),
5369
+ /* @__PURE__ */ jsx55(
5370
+ IconButton,
5371
+ {
5372
+ ref: triggerRef,
5373
+ icon: "user",
5374
+ label: accountLabel,
5375
+ variant: "soft",
5376
+ pill: true,
5377
+ "aria-haspopup": "menu",
5378
+ "aria-expanded": open,
5379
+ "aria-controls": menuId,
5380
+ onClick: () => {
5381
+ place();
5382
+ setOpen(!open);
5383
+ }
5381
5384
  }
5382
- }
5383
- )
5385
+ )
5386
+ ] }) : null
5384
5387
  ] })
5385
5388
  ] }),
5386
- mounted ? createPortal6(
5389
+ mounted && showAccount ? createPortal6(
5387
5390
  /* @__PURE__ */ jsx55(
5388
5391
  "div",
5389
5392
  {
@@ -5777,6 +5780,7 @@ var NavigationMenuMobile = React59.forwardRef(
5777
5780
  onNavigate,
5778
5781
  open: openProp,
5779
5782
  onOpenChange,
5783
+ footer,
5780
5784
  expandedId: expandedProp,
5781
5785
  onExpandedIdChange,
5782
5786
  side = "left",
@@ -5836,6 +5840,7 @@ var NavigationMenuMobile = React59.forwardRef(
5836
5840
  onOpenChange: setOpen,
5837
5841
  side,
5838
5842
  headerStart: brand,
5843
+ footer,
5839
5844
  "aria-label": "Main menu",
5840
5845
  closeLabel: "Close menu",
5841
5846
  children: /* @__PURE__ */ jsx59("nav", { "aria-label": "Main", className: "border-t border-hairline pt-sm", children: /* @__PURE__ */ jsx59("ul", { className: "flex flex-col gap-xxs", children: menu.map((m, i) => {
@@ -5924,39 +5929,73 @@ var NavigationMenu = React60.forwardRef(
5924
5929
  onPreferences,
5925
5930
  desktopActions,
5926
5931
  mobileActions,
5932
+ showAccount = true,
5927
5933
  accountItems,
5928
5934
  onAccountSelect,
5935
+ mobileOpen,
5936
+ onMobileOpenChange,
5937
+ mobileMenuFooter,
5929
5938
  className,
5939
+ onKeyDown,
5930
5940
  ...rest
5931
- }, ref) => /* @__PURE__ */ jsxs54("div", { ref, className: ["w-full rounded-none", className].filter(Boolean).join(" "), ...rest, children: [
5932
- /* @__PURE__ */ jsx60("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx60(
5933
- NavigationMenuDesktop,
5934
- {
5935
- menu,
5936
- logo,
5937
- brandName,
5938
- brandHref,
5939
- onNavigate,
5940
- onSearch,
5941
- onPreferences,
5942
- actions: desktopActions,
5943
- accountItems,
5944
- onAccountSelect
5945
- }
5946
- ) }),
5947
- /* @__PURE__ */ jsx60("div", { className: "md:hidden", children: /* @__PURE__ */ jsx60(
5948
- NavigationMenuMobile,
5941
+ }, ref) => {
5942
+ const mobilePanelId = React60.useId();
5943
+ const drawerOpen = mobileOpen ?? false;
5944
+ return /* @__PURE__ */ jsxs54(
5945
+ "div",
5949
5946
  {
5950
- menu,
5951
- logo,
5952
- brandName,
5953
- brandHref,
5954
- onNavigate,
5955
- onSearch,
5956
- actions: mobileActions
5947
+ ref,
5948
+ className: ["w-full rounded-none", className].filter(Boolean).join(" "),
5949
+ onKeyDown: (e) => {
5950
+ onKeyDown?.(e);
5951
+ if (e.key === "Escape" && drawerOpen) onMobileOpenChange?.(false);
5952
+ },
5953
+ ...rest,
5954
+ children: [
5955
+ /* @__PURE__ */ jsx60("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx60(
5956
+ NavigationMenuDesktop,
5957
+ {
5958
+ menu,
5959
+ logo,
5960
+ brandName,
5961
+ brandHref,
5962
+ onNavigate,
5963
+ onSearch,
5964
+ onPreferences,
5965
+ actions: desktopActions,
5966
+ showAccount,
5967
+ accountItems,
5968
+ onAccountSelect
5969
+ }
5970
+ ) }),
5971
+ /* @__PURE__ */ jsx60(
5972
+ "div",
5973
+ {
5974
+ id: mobilePanelId,
5975
+ className: "md:hidden",
5976
+ "aria-expanded": drawerOpen,
5977
+ "aria-controls": mobilePanelId,
5978
+ children: /* @__PURE__ */ jsx60(
5979
+ NavigationMenuMobile,
5980
+ {
5981
+ menu,
5982
+ logo,
5983
+ brandName,
5984
+ brandHref,
5985
+ onNavigate,
5986
+ onSearch,
5987
+ actions: mobileActions,
5988
+ open: mobileOpen,
5989
+ onOpenChange: onMobileOpenChange,
5990
+ footer: mobileMenuFooter
5991
+ }
5992
+ )
5993
+ }
5994
+ )
5995
+ ]
5957
5996
  }
5958
- ) })
5959
- ] })
5997
+ );
5998
+ }
5960
5999
  );
5961
6000
  NavigationMenu.displayName = "NavigationMenu";
5962
6001
 
package/dist/styles.css CHANGED
@@ -16,6 +16,7 @@
16
16
  --container-lg: 32rem;
17
17
  --container-xl: 36rem;
18
18
  --container-3xl: 48rem;
19
+ --container-4xl: 56rem;
19
20
  --radius-xs: 4px;
20
21
  --radius-sm: 6px;
21
22
  --radius-md: 8px;
@@ -750,6 +751,9 @@
750
751
  .max-w-3xl {
751
752
  max-width: var(--container-3xl);
752
753
  }
754
+ .max-w-4xl {
755
+ max-width: var(--container-4xl);
756
+ }
753
757
  .max-w-full {
754
758
  max-width: 100%;
755
759
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designa8/vibedesign-perplexity-internal-v1-2-176b",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Complete design system \"My Project perplexity-internal-v1\" generated by Atoms Design.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -34,6 +34,8 @@ export interface NavbarDesktopProps extends React.HTMLAttributes<HTMLElement> {
34
34
  actions?: React.ReactNode;
35
35
  onSearch?: () => void;
36
36
  onPreferences?: () => void;
37
+ /** Render the account button, its divider and its menu. Set false for public / marketing headers. */
38
+ showAccount?: boolean;
37
39
  /** Items in the account menu. */
38
40
  accountItems?: NavbarMenuItem[];
39
41
  onAccountSelect?: (value: string) => void;
@@ -64,6 +66,7 @@ export const NavbarDesktop = React.forwardRef<HTMLElement, NavbarDesktopProps>(
64
66
  actions,
65
67
  onSearch,
66
68
  onPreferences,
69
+ showAccount = true,
67
70
  accountItems = DEFAULT_ACCOUNT,
68
71
  onAccountSelect,
69
72
  accountLabel = "Account menu",
@@ -76,7 +79,7 @@ export const NavbarDesktop = React.forwardRef<HTMLElement, NavbarDesktopProps>(
76
79
  ) => {
77
80
  const menuId = React.useId();
78
81
  const [innerOpen, setInnerOpen] = React.useState(false);
79
- const open = menuOpen ?? innerOpen;
82
+ const open = showAccount && (menuOpen ?? innerOpen);
80
83
  const setOpen = React.useCallback(
81
84
  (v: boolean) => {
82
85
  if (menuOpen === undefined) setInnerOpen(v);
@@ -178,25 +181,29 @@ export const NavbarDesktop = React.forwardRef<HTMLElement, NavbarDesktopProps>(
178
181
  />
179
182
  </>
180
183
  )}
181
- <span aria-hidden="true" className="mx-xs h-6 w-px bg-hairline" />
182
- <IconButton
183
- ref={triggerRef}
184
- icon="user"
185
- label={accountLabel}
186
- variant="soft"
187
- pill
188
- aria-haspopup="menu"
189
- aria-expanded={open}
190
- aria-controls={menuId}
191
- onClick={() => {
192
- place();
193
- setOpen(!open);
194
- }}
195
- />
184
+ {showAccount ? (
185
+ <>
186
+ <span aria-hidden="true" className="mx-xs h-6 w-px bg-hairline" />
187
+ <IconButton
188
+ ref={triggerRef}
189
+ icon="user"
190
+ label={accountLabel}
191
+ variant="soft"
192
+ pill
193
+ aria-haspopup="menu"
194
+ aria-expanded={open}
195
+ aria-controls={menuId}
196
+ onClick={() => {
197
+ place();
198
+ setOpen(!open);
199
+ }}
200
+ />
201
+ </>
202
+ ) : null}
196
203
  </div>
197
204
  </div>
198
205
 
199
- {mounted
206
+ {mounted && showAccount
200
207
  ? createPortal(
201
208
  <div
202
209
  ref={panelRef}
@@ -16,8 +16,15 @@ export interface NavigationMenuProps extends React.HTMLAttributes<HTMLDivElement
16
16
  desktopActions?: React.ReactNode;
17
17
  /** Mobile bar right-side actions (defaults to Search). */
18
18
  mobileActions?: React.ReactNode;
19
+ /** Render the desktop account button and its menu. Set false for public / marketing headers. */
20
+ showAccount?: boolean;
19
21
  accountItems?: NavbarMenuItem[];
20
22
  onAccountSelect?: (value: string) => void;
23
+ /** Controlled mobile drawer state. */
24
+ mobileOpen?: boolean;
25
+ onMobileOpenChange?: (open: boolean) => void;
26
+ /** Pinned footer inside the mobile drawer, e.g. Sign in / Get started actions. */
27
+ mobileMenuFooter?: React.ReactNode;
21
28
  }
22
29
 
23
30
  export const NavigationMenu = React.forwardRef<HTMLDivElement, NavigationMenuProps>(
@@ -32,40 +39,67 @@ export const NavigationMenu = React.forwardRef<HTMLDivElement, NavigationMenuPro
32
39
  onPreferences,
33
40
  desktopActions,
34
41
  mobileActions,
42
+ showAccount = true,
35
43
  accountItems,
36
44
  onAccountSelect,
45
+ mobileOpen,
46
+ onMobileOpenChange,
47
+ mobileMenuFooter,
37
48
  className,
49
+ onKeyDown,
38
50
  ...rest
39
51
  },
40
52
  ref,
41
- ) => (
42
- <div ref={ref} className={["w-full rounded-none", className].filter(Boolean).join(" ")} {...rest}>
43
- <div className="hidden md:block">
44
- <NavigationMenuDesktop
45
- menu={menu}
46
- logo={logo}
47
- brandName={brandName}
48
- brandHref={brandHref}
49
- onNavigate={onNavigate}
50
- onSearch={onSearch}
51
- onPreferences={onPreferences}
52
- actions={desktopActions}
53
- accountItems={accountItems}
54
- onAccountSelect={onAccountSelect}
55
- />
56
- </div>
57
- <div className="md:hidden">
58
- <NavigationMenuMobile
59
- menu={menu}
60
- logo={logo}
61
- brandName={brandName}
62
- brandHref={brandHref}
63
- onNavigate={onNavigate}
64
- onSearch={onSearch}
65
- actions={mobileActions}
66
- />
53
+ ) => {
54
+ const mobilePanelId = React.useId();
55
+ const drawerOpen = mobileOpen ?? false;
56
+
57
+ return (
58
+ <div
59
+ ref={ref}
60
+ className={["w-full rounded-none", className].filter(Boolean).join(" ")}
61
+ onKeyDown={(e) => {
62
+ onKeyDown?.(e);
63
+ if (e.key === "Escape" && drawerOpen) onMobileOpenChange?.(false);
64
+ }}
65
+ {...rest}
66
+ >
67
+ <div className="hidden md:block">
68
+ <NavigationMenuDesktop
69
+ menu={menu}
70
+ logo={logo}
71
+ brandName={brandName}
72
+ brandHref={brandHref}
73
+ onNavigate={onNavigate}
74
+ onSearch={onSearch}
75
+ onPreferences={onPreferences}
76
+ actions={desktopActions}
77
+ showAccount={showAccount}
78
+ accountItems={accountItems}
79
+ onAccountSelect={onAccountSelect}
80
+ />
81
+ </div>
82
+ <div
83
+ id={mobilePanelId}
84
+ className="md:hidden"
85
+ aria-expanded={drawerOpen}
86
+ aria-controls={mobilePanelId}
87
+ >
88
+ <NavigationMenuMobile
89
+ menu={menu}
90
+ logo={logo}
91
+ brandName={brandName}
92
+ brandHref={brandHref}
93
+ onNavigate={onNavigate}
94
+ onSearch={onSearch}
95
+ actions={mobileActions}
96
+ open={mobileOpen}
97
+ onOpenChange={onMobileOpenChange}
98
+ footer={mobileMenuFooter}
99
+ />
100
+ </div>
67
101
  </div>
68
- </div>
69
- ),
102
+ );
103
+ },
70
104
  );
71
105
  NavigationMenu.displayName = "NavigationMenu";
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { NavigationMenu } from "./NavigationMenu";
3
+ import { Button } from "../Button";
3
4
  import type { NavigationMenuMobileEntry } from "../NavigationMenuMobile";
4
5
  import type { NavMenuColumn } from "../NavigationMenuDesktop";
5
6
 
@@ -31,21 +32,51 @@ const MENU: NavigationMenuMobileEntry[] = [
31
32
  col("Fields", "flask-conical", ["Science", "Technology", "Engineering", "Mathematics"]),
32
33
  ],
33
34
  },
34
- { id: "patents", label: "Patents", href: "#patents", icon: "layers" },
35
35
  ];
36
36
 
37
37
  export default function NavigationMenuPreview() {
38
38
  const [page, setPage] = React.useState("#discover");
39
+ const [mobileOpen, setMobileOpen] = React.useState(false);
40
+
41
+ const items = MENU.map((m) => ({ ...m, active: m.href === page }));
42
+ const navigate = (href: string, e: React.MouseEvent<HTMLAnchorElement>) => {
43
+ e.preventDefault();
44
+ setPage(href);
45
+ };
46
+
39
47
  return (
40
- <div className="w-full">
41
- <NavigationMenu
42
- menu={MENU.map((m) => ({ ...m, active: m.href === page }))}
43
- onNavigate={(href, e) => {
44
- e.preventDefault();
45
- setPage(href);
46
- }}
47
- />
48
- <div className="h-96 p-lg text-body-sm text-muted">Viewing {page.slice(1)}.</div>
48
+ <div className="w-full max-w-4xl mx-auto flex flex-col gap-lg p-lg">
49
+ <section className="flex flex-col gap-sm">
50
+ <p className="text-caption uppercase text-muted">Marketing header — no account control</p>
51
+ <div className="w-full overflow-hidden rounded-xl border border-hairline">
52
+ <NavigationMenu
53
+ menu={items.slice(0, 3)}
54
+ onNavigate={navigate}
55
+ showAccount={false}
56
+ desktopActions={<Button variant="primary" pill>Get started</Button>}
57
+ mobileActions={<Button variant="ghost" size="sm">Sign in</Button>}
58
+ mobileOpen={mobileOpen}
59
+ onMobileOpenChange={setMobileOpen}
60
+ mobileMenuFooter={
61
+ <div className="flex w-full flex-col gap-sm">
62
+ <Button variant="outline" fullWidth>Sign in</Button>
63
+ <Button variant="primary" fullWidth>Get started</Button>
64
+ </div>
65
+ }
66
+ />
67
+ </div>
68
+ </section>
69
+
70
+ <section className="flex flex-col gap-sm">
71
+ <p className="text-caption uppercase text-muted">Product header — account menu shown</p>
72
+ <div className="w-full overflow-hidden rounded-xl border border-hairline">
73
+ <NavigationMenu menu={items} onNavigate={navigate} />
74
+ </div>
75
+ </section>
76
+
77
+ <p className="text-body-sm text-muted">
78
+ Viewing {page.slice(1)}. Mobile drawer is {mobileOpen ? "open" : "closed"} — resize the pane to try it.
79
+ </p>
49
80
  </div>
50
81
  );
51
82
  }
@@ -22,6 +22,8 @@ export interface NavigationMenuMobileProps extends React.HTMLAttributes<HTMLElem
22
22
  /** Controlled drawer state. */
23
23
  open?: boolean;
24
24
  onOpenChange?: (open: boolean) => void;
25
+ /** Pinned footer inside the drawer (e.g. Sign in / Get started actions). */
26
+ footer?: React.ReactNode;
25
27
  /** Controlled expanded section (one at a time). */
26
28
  expandedId?: string | null;
27
29
  onExpandedIdChange?: (id: string | null) => void;
@@ -45,6 +47,7 @@ export const NavigationMenuMobile = React.forwardRef<HTMLElement, NavigationMenu
45
47
  onNavigate,
46
48
  open: openProp,
47
49
  onOpenChange,
50
+ footer,
48
51
  expandedId: expandedProp,
49
52
  onExpandedIdChange,
50
53
  side = "left",
@@ -107,6 +110,7 @@ export const NavigationMenuMobile = React.forwardRef<HTMLElement, NavigationMenu
107
110
  onOpenChange={setOpen}
108
111
  side={side}
109
112
  headerStart={brand}
113
+ footer={footer}
110
114
  aria-label="Main menu"
111
115
  closeLabel="Close menu"
112
116
  >
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { NavigationMenuMobile, type NavigationMenuMobileEntry } from "./NavigationMenuMobile";
3
+ import { Button } from "../Button";
3
4
 
4
5
  const links = (labels: string[]) => labels.map((l) => ({ label: l, href: `#${l.toLowerCase().replace(/\s+/g, "-")}` }));
5
6
 
@@ -35,6 +36,16 @@ export default function NavigationMenuMobilePreview() {
35
36
  onOpenChange={setOpen}
36
37
  expandedId={expanded}
37
38
  onExpandedIdChange={setExpanded}
39
+ footer={
40
+ <div className="flex w-full flex-col gap-sm">
41
+ <Button variant="outline" fullWidth>
42
+ Sign in
43
+ </Button>
44
+ <Button variant="primary" fullWidth>
45
+ Get started
46
+ </Button>
47
+ </div>
48
+ }
38
49
  onNavigate={(href, e) => {
39
50
  e.preventDefault();
40
51
  setPage(href);