@designa8/vibedesign-linear-internal-v1-2-176b 0.1.0 → 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-linear-internal-v1-2-176b
2
2
 
3
- Complete design system generated by Atoms Design, version **0.1.0**.
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
@@ -5941,6 +5941,20 @@ var import_react_dom8 = require("react-dom");
5941
5941
  var import_jsx_runtime57 = require("react/jsx-runtime");
5942
5942
  var cn44 = (...parts) => parts.filter(Boolean).join(" ");
5943
5943
  var panelMotion = "transition duration-200 ease-out data-[state=open]:translate-y-0 data-[state=open]:opacity-100 data-[state=closed]:pointer-events-none data-[state=closed]:invisible data-[state=closed]:-translate-y-1 data-[state=closed]:opacity-0";
5944
+ var useScrolled = (enabled, threshold = 16) => {
5945
+ const [scrolled, setScrolled] = React57.useState(false);
5946
+ React57.useEffect(() => {
5947
+ if (!enabled) {
5948
+ setScrolled(false);
5949
+ return;
5950
+ }
5951
+ const onScroll = () => setScrolled(window.scrollY > threshold);
5952
+ onScroll();
5953
+ window.addEventListener("scroll", onScroll, { passive: true });
5954
+ return () => window.removeEventListener("scroll", onScroll);
5955
+ }, [enabled, threshold]);
5956
+ return scrolled;
5957
+ };
5944
5958
  var NavigationMenuDesktop = React57.forwardRef(
5945
5959
  ({
5946
5960
  brandName = "Linear",
@@ -5951,6 +5965,8 @@ var NavigationMenuDesktop = React57.forwardRef(
5951
5965
  onNavigate,
5952
5966
  openId: openIdProp,
5953
5967
  onOpenIdChange,
5968
+ actions,
5969
+ transparent = false,
5954
5970
  className,
5955
5971
  ...rest
5956
5972
  }, ref) => {
@@ -5961,6 +5977,7 @@ var NavigationMenuDesktop = React57.forwardRef(
5961
5977
  const [rects, setRects] = React57.useState({});
5962
5978
  const triggerRefs = React57.useRef({});
5963
5979
  const panelRefs = React57.useRef({});
5980
+ const scrolled = useScrolled(transparent);
5964
5981
  React57.useEffect(() => setMounted(true), []);
5965
5982
  const setOpenId = React57.useCallback(
5966
5983
  (id) => {
@@ -6100,16 +6117,23 @@ var NavigationMenuDesktop = React57.forwardRef(
6100
6117
  item.id
6101
6118
  );
6102
6119
  };
6120
+ const solid = !transparent || scrolled;
6103
6121
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
6104
6122
  "header",
6105
6123
  {
6106
6124
  ref,
6107
- className: cn44("flex h-14 w-full items-center gap-base border-b border-hairline bg-canvas px-lg text-ink", className),
6125
+ style: transparent ? { zIndex: "var(--z-sticky, 1100)" } : void 0,
6126
+ className: cn44(
6127
+ "flex h-14 w-full items-center gap-sm border-b px-md text-ink transition-colors duration-200 ease-out",
6128
+ transparent && "sticky top-0",
6129
+ solid ? "border-hairline bg-canvas" : "border-transparent bg-transparent",
6130
+ className
6131
+ ),
6108
6132
  ...rest,
6109
6133
  children: [
6110
6134
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Logo, { name: brandName, href: brandHref, size: "md", className: "shrink-0" }),
6111
6135
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "flex h-5 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Divider, { orientation: "vertical" }) }),
6112
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("nav", { "aria-label": "Primary", className: "flex min-w-0 flex-1 items-center gap-xxs", children: items.map((item) => {
6136
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("nav", { "aria-label": "Primary", className: "flex min-w-0 flex-1 items-center gap-xxs overflow-hidden", children: items.map((item) => {
6113
6137
  const hasPanel = Boolean(item.menu?.length || item.columns?.length);
6114
6138
  const current = item.id === activeId;
6115
6139
  const open = openId === item.id;
@@ -6124,7 +6148,7 @@ var NavigationMenuDesktop = React57.forwardRef(
6124
6148
  setOpenId(null);
6125
6149
  },
6126
6150
  className: cn44(
6127
- "inline-flex h-8 shrink-0 items-center gap-sm whitespace-nowrap rounded-md px-md text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
6151
+ "inline-flex h-8 shrink-0 items-center gap-sm whitespace-nowrap rounded-md px-sm text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
6128
6152
  current ? "bg-surface-strong text-ink" : "text-body hover:bg-surface-soft hover:text-ink active:bg-surface-strong"
6129
6153
  ),
6130
6154
  children: [
@@ -6164,6 +6188,7 @@ var NavigationMenuDesktop = React57.forwardRef(
6164
6188
  item.id
6165
6189
  );
6166
6190
  }) }),
6191
+ actions !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex shrink-0 items-center gap-sm", children: actions }),
6167
6192
  mounted ? (0, import_react_dom8.createPortal)(
6168
6193
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_jsx_runtime57.Fragment, { children: items.filter((i) => i.menu?.length || i.columns?.length).map(renderPanel) }),
6169
6194
  document.body
@@ -6180,6 +6205,20 @@ var React58 = __toESM(require("react"));
6180
6205
  var import_jsx_runtime58 = require("react/jsx-runtime");
6181
6206
  var cn45 = (...parts) => parts.filter(Boolean).join(" ");
6182
6207
  var rowClass2 = "flex h-9 w-full items-center gap-sm rounded-md border border-transparent px-base text-left text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-blue";
6208
+ var useScrolled2 = (enabled, threshold = 16) => {
6209
+ const [scrolled, setScrolled] = React58.useState(false);
6210
+ React58.useEffect(() => {
6211
+ if (!enabled) {
6212
+ setScrolled(false);
6213
+ return;
6214
+ }
6215
+ const onScroll = () => setScrolled(window.scrollY > threshold);
6216
+ onScroll();
6217
+ window.addEventListener("scroll", onScroll, { passive: true });
6218
+ return () => window.removeEventListener("scroll", onScroll);
6219
+ }, [enabled, threshold]);
6220
+ return scrolled;
6221
+ };
6183
6222
  var NavigationMenuMobile = React58.forwardRef(
6184
6223
  ({
6185
6224
  brandName = "Linear",
@@ -6192,11 +6231,16 @@ var NavigationMenuMobile = React58.forwardRef(
6192
6231
  onOpenChange,
6193
6232
  sectionId: sectionProp,
6194
6233
  onSectionIdChange,
6234
+ actions,
6235
+ menuFooter,
6236
+ transparent = false,
6237
+ panelId: panelIdProp,
6238
+ trigger,
6195
6239
  className,
6196
6240
  ...rest
6197
6241
  }, ref) => {
6198
- const baseId = React58.useId();
6199
- const panelId = `${baseId}-panel`;
6242
+ const autoId = React58.useId();
6243
+ const panelId = panelIdProp ?? `${autoId}-panel`;
6200
6244
  const [innerOpen, setInnerOpen] = React58.useState(defaultOpen);
6201
6245
  const open = openProp ?? innerOpen;
6202
6246
  const setOpen = React58.useCallback(
@@ -6212,6 +6256,7 @@ var NavigationMenuMobile = React58.forwardRef(
6212
6256
  if (sectionProp === void 0) setInnerSection(id);
6213
6257
  onSectionIdChange?.(id);
6214
6258
  };
6259
+ const scrolled = useScrolled2(transparent);
6215
6260
  React58.useEffect(() => {
6216
6261
  if (!open) return;
6217
6262
  const onKey = (e) => {
@@ -6221,6 +6266,7 @@ var NavigationMenuMobile = React58.forwardRef(
6221
6266
  return () => document.removeEventListener("keydown", onKey);
6222
6267
  }, [open, setOpen]);
6223
6268
  const state = open ? "open" : "closed";
6269
+ const solid = !transparent || scrolled || open;
6224
6270
  const subLink = (link, tabbable) => {
6225
6271
  const current = link.href === activeHref;
6226
6272
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("li", { children: [
@@ -6249,22 +6295,31 @@ var NavigationMenuMobile = React58.forwardRef(
6249
6295
  {
6250
6296
  ref,
6251
6297
  "data-state": state,
6252
- className: cn45("w-full border-b border-hairline bg-canvas text-ink", className),
6298
+ style: transparent ? { zIndex: "var(--z-sticky, 1100)" } : void 0,
6299
+ className: cn45(
6300
+ "w-full border-b text-ink transition-colors duration-200 ease-out",
6301
+ transparent && "sticky top-0",
6302
+ solid ? "border-hairline bg-canvas" : "border-transparent bg-transparent",
6303
+ className
6304
+ ),
6253
6305
  ...rest,
6254
6306
  children: [
6255
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex h-14 items-center justify-between gap-sm px-base", children: [
6256
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Logo, { name: brandName, href: brandHref, size: "md" }),
6257
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6258
- IconButton,
6259
- {
6260
- icon: open ? "x" : "menu",
6261
- variant: "ghost",
6262
- "aria-label": open ? "Close menu" : "Open menu",
6263
- "aria-expanded": open,
6264
- "aria-controls": panelId,
6265
- onClick: () => setOpen(!open)
6266
- }
6267
- )
6307
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex h-14 min-w-0 items-center justify-between gap-sm px-base", children: [
6308
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Logo, { name: brandName, href: brandHref, size: "md", className: "shrink-0" }),
6309
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex min-w-0 flex-1 items-center justify-end gap-xs", children: [
6310
+ actions !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex shrink-0 items-center gap-xs", children: actions }),
6311
+ trigger ?? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6312
+ IconButton,
6313
+ {
6314
+ icon: open ? "x" : "menu",
6315
+ variant: "ghost",
6316
+ "aria-label": open ? "Close menu" : "Open menu",
6317
+ "aria-expanded": open,
6318
+ "aria-controls": panelId,
6319
+ onClick: () => setOpen(!open)
6320
+ }
6321
+ )
6322
+ ] })
6268
6323
  ] }),
6269
6324
  /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6270
6325
  "div",
@@ -6272,81 +6327,87 @@ var NavigationMenuMobile = React58.forwardRef(
6272
6327
  id: panelId,
6273
6328
  "data-state": state,
6274
6329
  "aria-hidden": open ? void 0 : true,
6275
- className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
6276
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6330
+ className: cn45(
6331
+ "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
6332
+ open && "bg-canvas"
6333
+ ),
6334
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
6277
6335
  "nav",
6278
6336
  {
6279
6337
  "aria-label": "Primary",
6280
6338
  "data-state": state,
6281
6339
  className: "border-t border-hairline px-sm py-sm transition duration-200 ease-out data-[state=open]:translate-y-0 data-[state=open]:opacity-100 data-[state=closed]:invisible data-[state=closed]:-translate-y-1 data-[state=closed]:opacity-0",
6282
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ul", { className: "flex flex-col gap-xxs", children: items.map((item) => {
6283
- const hasSub = Boolean(item.menu?.length || item.columns?.length);
6284
- if (!hasSub) {
6285
- const current = item.href === activeHref;
6286
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
6287
- "a",
6288
- {
6289
- href: item.href ?? "#",
6290
- tabIndex: open ? 0 : -1,
6291
- "aria-current": current ? "page" : void 0,
6292
- onClick: (e) => {
6293
- onNavigate?.({ label: item.label, href: item.href ?? "#" }, e);
6294
- setOpen(false);
6295
- },
6296
- className: cn45(
6297
- rowClass2,
6298
- current ? "bg-surface-strong text-ink" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
6299
- ),
6300
- children: [
6301
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: item.icon, size: 16, className: "text-body" }),
6302
- item.label
6303
- ]
6304
- }
6305
- ) }, item.id);
6306
- }
6307
- const expanded = section === item.id;
6308
- const subId = `${baseId}-${item.id}`;
6309
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("li", { children: [
6310
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6311
- Button,
6312
- {
6313
- variant: "item",
6314
- size: "lg",
6315
- tabIndex: open ? 0 : -1,
6316
- "aria-expanded": expanded,
6317
- "aria-controls": subId,
6318
- onClick: () => setSection(expanded ? null : item.id),
6319
- leadingIcon: item.icon ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: item.icon, size: 16, className: "text-body" }) : void 0,
6320
- trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6321
- Icon,
6322
- {
6323
- name: "chevron-down",
6324
- size: 16,
6325
- className: cn45("text-muted transition-transform duration-200 ease-out", expanded && "rotate-180")
6326
- }
6327
- ),
6328
- children: item.label
6329
- }
6330
- ),
6331
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6332
- "div",
6333
- {
6334
- id: subId,
6335
- role: "region",
6336
- "aria-label": item.label,
6337
- "data-state": expanded ? "open" : "closed",
6338
- className: "grid transition-[grid-template-rows,opacity] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=open]:opacity-100 data-[state=closed]:grid-rows-[0fr] data-[state=closed]:opacity-0",
6339
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "py-xs pl-lg", children: [
6340
- item.menu && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ul", { className: "flex flex-col gap-xxs", children: item.menu.map((l) => subLink(l, open && expanded)) }),
6341
- item.columns?.map((col) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "pb-xs", children: [
6342
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "px-base pb-xxs pt-sm text-caption text-muted", children: col.title }),
6343
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ul", { className: "flex flex-col gap-xxs", children: col.links.map((l) => subLink(l, open && expanded)) })
6344
- ] }, col.title))
6345
- ] }) })
6346
- }
6347
- )
6348
- ] }, item.id);
6349
- }) })
6340
+ children: [
6341
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ul", { className: "flex flex-col gap-xxs", children: items.map((item) => {
6342
+ const hasSub = Boolean(item.menu?.length || item.columns?.length);
6343
+ if (!hasSub) {
6344
+ const current = item.href === activeHref;
6345
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
6346
+ "a",
6347
+ {
6348
+ href: item.href ?? "#",
6349
+ tabIndex: open ? 0 : -1,
6350
+ "aria-current": current ? "page" : void 0,
6351
+ onClick: (e) => {
6352
+ onNavigate?.({ label: item.label, href: item.href ?? "#" }, e);
6353
+ setOpen(false);
6354
+ },
6355
+ className: cn45(
6356
+ rowClass2,
6357
+ current ? "bg-surface-strong text-ink" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
6358
+ ),
6359
+ children: [
6360
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: item.icon, size: 16, className: "text-body" }),
6361
+ item.label
6362
+ ]
6363
+ }
6364
+ ) }, item.id);
6365
+ }
6366
+ const expanded = section === item.id;
6367
+ const subId = `${autoId}-${item.id}`;
6368
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("li", { children: [
6369
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6370
+ Button,
6371
+ {
6372
+ variant: "item",
6373
+ size: "lg",
6374
+ tabIndex: open ? 0 : -1,
6375
+ "aria-expanded": expanded,
6376
+ "aria-controls": subId,
6377
+ onClick: () => setSection(expanded ? null : item.id),
6378
+ leadingIcon: item.icon ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: item.icon, size: 16, className: "text-body" }) : void 0,
6379
+ trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6380
+ Icon,
6381
+ {
6382
+ name: "chevron-down",
6383
+ size: 16,
6384
+ className: cn45("text-muted transition-transform duration-200 ease-out", expanded && "rotate-180")
6385
+ }
6386
+ ),
6387
+ children: item.label
6388
+ }
6389
+ ),
6390
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6391
+ "div",
6392
+ {
6393
+ id: subId,
6394
+ role: "region",
6395
+ "aria-label": item.label,
6396
+ "data-state": expanded ? "open" : "closed",
6397
+ className: "grid transition-[grid-template-rows,opacity] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=open]:opacity-100 data-[state=closed]:grid-rows-[0fr] data-[state=closed]:opacity-0",
6398
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "py-xs pl-lg", children: [
6399
+ item.menu && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ul", { className: "flex flex-col gap-xxs", children: item.menu.map((l) => subLink(l, open && expanded)) }),
6400
+ item.columns?.map((col) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "pb-xs", children: [
6401
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "px-base pb-xxs pt-sm text-caption text-muted", children: col.title }),
6402
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ul", { className: "flex flex-col gap-xxs", children: col.links.map((l) => subLink(l, open && expanded)) })
6403
+ ] }, col.title))
6404
+ ] }) })
6405
+ }
6406
+ )
6407
+ ] }, item.id);
6408
+ }) }),
6409
+ menuFooter !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-sm flex flex-col gap-xs border-t border-hairline px-base pb-xs pt-sm", children: menuFooter })
6410
+ ]
6350
6411
  }
6351
6412
  ) })
6352
6413
  }
@@ -6374,36 +6435,84 @@ var NavigationMenu = React59.forwardRef(
6374
6435
  onMobileOpenChange,
6375
6436
  mobileSectionId,
6376
6437
  onMobileSectionIdChange,
6438
+ actions,
6439
+ mobileActions,
6440
+ mobileMenuFooter,
6441
+ transparent = false,
6377
6442
  className
6378
- }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { ref, className: ["w-full rounded-none", className].filter(Boolean).join(" "), children: [
6379
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6380
- NavigationMenuDesktop,
6381
- {
6382
- brandName,
6383
- brandHref,
6384
- items,
6385
- activeId,
6386
- activeHref,
6387
- onNavigate,
6388
- openId,
6389
- onOpenIdChange
6390
- }
6391
- ) }),
6392
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6393
- NavigationMenuMobile,
6443
+ }, ref) => {
6444
+ const autoId = React59.useId();
6445
+ const panelId = `${autoId}-panel`;
6446
+ const [innerOpen, setInnerOpen] = React59.useState(false);
6447
+ const open = mobileOpen ?? innerOpen;
6448
+ const setMobileOpen = React59.useCallback(
6449
+ (next) => {
6450
+ if (mobileOpen === void 0) setInnerOpen(next);
6451
+ onMobileOpenChange?.(next);
6452
+ },
6453
+ [mobileOpen, onMobileOpenChange]
6454
+ );
6455
+ const closeAll = React59.useCallback(() => {
6456
+ onOpenIdChange?.(null);
6457
+ setMobileOpen(false);
6458
+ }, [onOpenIdChange, setMobileOpen]);
6459
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
6460
+ "div",
6394
6461
  {
6395
- brandName,
6396
- brandHref,
6397
- items,
6398
- activeHref,
6399
- onNavigate,
6400
- open: mobileOpen,
6401
- onOpenChange: onMobileOpenChange,
6402
- sectionId: mobileSectionId,
6403
- onSectionIdChange: onMobileSectionIdChange
6462
+ ref,
6463
+ onKeyDown: (event) => {
6464
+ if (event.key === "Escape") closeAll();
6465
+ },
6466
+ className: ["w-full rounded-none", className].filter(Boolean).join(" "),
6467
+ children: [
6468
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6469
+ NavigationMenuDesktop,
6470
+ {
6471
+ brandName,
6472
+ brandHref,
6473
+ items,
6474
+ activeId,
6475
+ activeHref,
6476
+ onNavigate,
6477
+ openId,
6478
+ onOpenIdChange,
6479
+ actions,
6480
+ transparent
6481
+ }
6482
+ ) }),
6483
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6484
+ NavigationMenuMobile,
6485
+ {
6486
+ brandName,
6487
+ brandHref,
6488
+ items,
6489
+ activeHref,
6490
+ onNavigate,
6491
+ open,
6492
+ onOpenChange: setMobileOpen,
6493
+ sectionId: mobileSectionId,
6494
+ onSectionIdChange: onMobileSectionIdChange,
6495
+ actions: mobileActions,
6496
+ menuFooter: mobileMenuFooter,
6497
+ transparent,
6498
+ panelId,
6499
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6500
+ IconButton,
6501
+ {
6502
+ icon: open ? "x" : "menu",
6503
+ variant: "ghost",
6504
+ "aria-label": open ? "Close menu" : "Open menu",
6505
+ "aria-expanded": open,
6506
+ "aria-controls": panelId,
6507
+ onClick: () => setMobileOpen(!open)
6508
+ }
6509
+ )
6510
+ }
6511
+ ) })
6512
+ ]
6404
6513
  }
6405
- ) })
6406
- ] })
6514
+ );
6515
+ }
6407
6516
  );
6408
6517
  NavigationMenu.displayName = "NavigationMenu";
6409
6518