asta-ui 0.3.0 → 0.4.0

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 (179) hide show
  1. package/dist/accordion.js +1 -1
  2. package/dist/base/card-checkout.js +1 -1
  3. package/dist/base/footer-aui-025.d.ts +2 -0
  4. package/dist/base/footer-aui-025.js +9 -0
  5. package/dist/base/footer-aui-026.d.ts +2 -0
  6. package/dist/base/footer-aui-026.js +9 -0
  7. package/dist/base/footer-aui-027.d.ts +2 -0
  8. package/dist/base/footer-aui-027.js +9 -0
  9. package/dist/base/footer-aui-028.d.ts +2 -0
  10. package/dist/base/footer-aui-028.js +9 -0
  11. package/dist/base/navbar-aui-009.d.ts +2 -0
  12. package/dist/base/navbar-aui-009.js +9 -0
  13. package/dist/base/navbar-aui-010.d.ts +2 -0
  14. package/dist/base/navbar-aui-010.js +9 -0
  15. package/dist/base/navbar-aui-011.d.ts +2 -0
  16. package/dist/base/navbar-aui-011.js +9 -0
  17. package/dist/base/navbar-aui-012.d.ts +2 -0
  18. package/dist/base/navbar-aui-012.js +9 -0
  19. package/dist/base/navbar-aui-013.d.ts +2 -0
  20. package/dist/base/navbar-aui-013.js +9 -0
  21. package/dist/base/navbar-aui-014.d.ts +2 -0
  22. package/dist/base/navbar-aui-014.js +9 -0
  23. package/dist/base/now-playing.js +1 -1
  24. package/dist/base/payment-received.js +1 -1
  25. package/dist/base/pricing-aui-021.d.ts +2 -0
  26. package/dist/base/pricing-aui-021.js +9 -0
  27. package/dist/base/pricing-aui-022.d.ts +2 -0
  28. package/dist/base/pricing-aui-022.js +9 -0
  29. package/dist/base/pricing-aui-023.d.ts +2 -0
  30. package/dist/base/pricing-aui-023.js +9 -0
  31. package/dist/base/pricing-aui-024.d.ts +2 -0
  32. package/dist/base/pricing-aui-024.js +9 -0
  33. package/dist/base/sign-in-aui-015.d.ts +2 -0
  34. package/dist/base/sign-in-aui-015.js +9 -0
  35. package/dist/base/sign-in-aui-016.d.ts +2 -0
  36. package/dist/base/sign-in-aui-016.js +9 -0
  37. package/dist/base/sign-in-aui-017.d.ts +2 -0
  38. package/dist/base/sign-in-aui-017.js +9 -0
  39. package/dist/base/sign-in-aui-018.d.ts +2 -0
  40. package/dist/base/sign-in-aui-018.js +9 -0
  41. package/dist/base/sign-in-aui-019.d.ts +2 -0
  42. package/dist/base/sign-in-aui-019.js +9 -0
  43. package/dist/base/sign-in-aui-020.d.ts +2 -0
  44. package/dist/base/sign-in-aui-020.js +9 -0
  45. package/dist/base/spinner.js +1 -1
  46. package/dist/base.js +124 -4
  47. package/dist/card-checkout.js +1 -1
  48. package/dist/chunk-2SQQFICY.js +493 -0
  49. package/dist/{chunk-QJXPS55V.js → chunk-5TSQZY34.js} +1 -1
  50. package/dist/chunk-5U4H2CXC.js +308 -0
  51. package/dist/chunk-5WGDQ62P.js +122 -0
  52. package/dist/chunk-6B6NTRMC.js +293 -0
  53. package/dist/chunk-6NNHSXFD.js +539 -0
  54. package/dist/chunk-746WX2DF.js +480 -0
  55. package/dist/chunk-7GKCX4IE.js +636 -0
  56. package/dist/chunk-7SNVRPED.js +223 -0
  57. package/dist/chunk-BGVAXPHD.js +305 -0
  58. package/dist/chunk-F526V5BA.js +254 -0
  59. package/dist/chunk-LPTY5WXM.js +231 -0
  60. package/dist/chunk-MDI73RL6.js +245 -0
  61. package/dist/chunk-MUDW65ZT.js +220 -0
  62. package/dist/chunk-NZRQL3SA.js +201 -0
  63. package/dist/chunk-OFYGJUKP.js +278 -0
  64. package/dist/{chunk-NDBLIYMX.js → chunk-OKCSTMX3.js} +2 -2
  65. package/dist/chunk-P37H477M.js +236 -0
  66. package/dist/chunk-QSLS3ENY.js +469 -0
  67. package/dist/chunk-RRHQBGRO.js +327 -0
  68. package/dist/{chunk-2OGTIQVU.js → chunk-UEOEWP7L.js} +1 -1
  69. package/dist/{chunk-BP3LXM3X.js → chunk-UTGEGGSE.js} +1 -1
  70. package/dist/chunk-WNPMHOXE.js +136 -0
  71. package/dist/chunk-WTNNS7AX.js +362 -0
  72. package/dist/{chunk-AS6RA64I.js → chunk-XTP6ITUJ.js} +3 -1
  73. package/dist/footer-aui-025.d.ts +2 -0
  74. package/dist/footer-aui-025.js +9 -0
  75. package/dist/footer-aui-026.d.ts +2 -0
  76. package/dist/footer-aui-026.js +9 -0
  77. package/dist/footer-aui-027.d.ts +2 -0
  78. package/dist/footer-aui-027.js +9 -0
  79. package/dist/footer-aui-028.d.ts +2 -0
  80. package/dist/footer-aui-028.js +9 -0
  81. package/dist/index.js +125 -5
  82. package/dist/navbar-aui-009.d.ts +2 -0
  83. package/dist/navbar-aui-009.js +9 -0
  84. package/dist/navbar-aui-010.d.ts +2 -0
  85. package/dist/navbar-aui-010.js +9 -0
  86. package/dist/navbar-aui-011.d.ts +2 -0
  87. package/dist/navbar-aui-011.js +9 -0
  88. package/dist/navbar-aui-012.d.ts +2 -0
  89. package/dist/navbar-aui-012.js +9 -0
  90. package/dist/navbar-aui-013.d.ts +2 -0
  91. package/dist/navbar-aui-013.js +9 -0
  92. package/dist/navbar-aui-014.d.ts +2 -0
  93. package/dist/navbar-aui-014.js +9 -0
  94. package/dist/now-playing.js +1 -1
  95. package/dist/payment-received.js +1 -1
  96. package/dist/pricing-aui-021.d.ts +2 -0
  97. package/dist/pricing-aui-021.js +9 -0
  98. package/dist/pricing-aui-022.d.ts +2 -0
  99. package/dist/pricing-aui-022.js +9 -0
  100. package/dist/pricing-aui-023.d.ts +2 -0
  101. package/dist/pricing-aui-023.js +9 -0
  102. package/dist/pricing-aui-024.d.ts +2 -0
  103. package/dist/pricing-aui-024.js +9 -0
  104. package/dist/sign-in-aui-015.d.ts +2 -0
  105. package/dist/sign-in-aui-015.js +9 -0
  106. package/dist/sign-in-aui-016.d.ts +2 -0
  107. package/dist/sign-in-aui-016.js +9 -0
  108. package/dist/sign-in-aui-017.d.ts +2 -0
  109. package/dist/sign-in-aui-017.js +9 -0
  110. package/dist/sign-in-aui-018.d.ts +2 -0
  111. package/dist/sign-in-aui-018.js +9 -0
  112. package/dist/sign-in-aui-019.d.ts +2 -0
  113. package/dist/sign-in-aui-019.js +9 -0
  114. package/dist/sign-in-aui-020.d.ts +2 -0
  115. package/dist/sign-in-aui-020.js +9 -0
  116. package/dist/spinner.js +1 -1
  117. package/dist/types/components/kit/variants/footer-aui-025.d.ts +22 -0
  118. package/dist/types/components/kit/variants/footer-aui-026.d.ts +21 -0
  119. package/dist/types/components/kit/variants/footer-aui-027.d.ts +36 -0
  120. package/dist/types/components/kit/variants/footer-aui-028.d.ts +34 -0
  121. package/dist/types/components/kit/variants/navbar-aui-009.d.ts +62 -0
  122. package/dist/types/components/kit/variants/navbar-aui-010.d.ts +30 -0
  123. package/dist/types/components/kit/variants/navbar-aui-011.d.ts +65 -0
  124. package/dist/types/components/kit/variants/navbar-aui-012.d.ts +50 -0
  125. package/dist/types/components/kit/variants/navbar-aui-013.d.ts +70 -0
  126. package/dist/types/components/kit/variants/navbar-aui-014.d.ts +31 -0
  127. package/dist/types/components/kit/variants/pricing-aui-021.d.ts +30 -0
  128. package/dist/types/components/kit/variants/pricing-aui-022.d.ts +34 -0
  129. package/dist/types/components/kit/variants/pricing-aui-023.d.ts +26 -0
  130. package/dist/types/components/kit/variants/pricing-aui-024.d.ts +29 -0
  131. package/dist/types/components/kit/variants/sign-in-aui-015.d.ts +21 -0
  132. package/dist/types/components/kit/variants/sign-in-aui-016.d.ts +28 -0
  133. package/dist/types/components/kit/variants/sign-in-aui-017.d.ts +21 -0
  134. package/dist/types/components/kit/variants/sign-in-aui-018.d.ts +22 -0
  135. package/dist/types/components/kit/variants/sign-in-aui-019.d.ts +22 -0
  136. package/dist/types/components/kit/variants/sign-in-aui-020.d.ts +27 -0
  137. package/dist/types/packages/asta-ui/src/base/footer-aui-025.d.ts +2 -0
  138. package/dist/types/packages/asta-ui/src/base/footer-aui-026.d.ts +2 -0
  139. package/dist/types/packages/asta-ui/src/base/footer-aui-027.d.ts +2 -0
  140. package/dist/types/packages/asta-ui/src/base/footer-aui-028.d.ts +2 -0
  141. package/dist/types/packages/asta-ui/src/base/navbar-aui-009.d.ts +2 -0
  142. package/dist/types/packages/asta-ui/src/base/navbar-aui-010.d.ts +2 -0
  143. package/dist/types/packages/asta-ui/src/base/navbar-aui-011.d.ts +2 -0
  144. package/dist/types/packages/asta-ui/src/base/navbar-aui-012.d.ts +2 -0
  145. package/dist/types/packages/asta-ui/src/base/navbar-aui-013.d.ts +2 -0
  146. package/dist/types/packages/asta-ui/src/base/navbar-aui-014.d.ts +2 -0
  147. package/dist/types/packages/asta-ui/src/base/pricing-aui-021.d.ts +2 -0
  148. package/dist/types/packages/asta-ui/src/base/pricing-aui-022.d.ts +2 -0
  149. package/dist/types/packages/asta-ui/src/base/pricing-aui-023.d.ts +2 -0
  150. package/dist/types/packages/asta-ui/src/base/pricing-aui-024.d.ts +2 -0
  151. package/dist/types/packages/asta-ui/src/base/sign-in-aui-015.d.ts +2 -0
  152. package/dist/types/packages/asta-ui/src/base/sign-in-aui-016.d.ts +2 -0
  153. package/dist/types/packages/asta-ui/src/base/sign-in-aui-017.d.ts +2 -0
  154. package/dist/types/packages/asta-ui/src/base/sign-in-aui-018.d.ts +2 -0
  155. package/dist/types/packages/asta-ui/src/base/sign-in-aui-019.d.ts +2 -0
  156. package/dist/types/packages/asta-ui/src/base/sign-in-aui-020.d.ts +2 -0
  157. package/dist/types/packages/asta-ui/src/base.d.ts +40 -0
  158. package/dist/types/packages/asta-ui/src/footer-aui-025.d.ts +2 -0
  159. package/dist/types/packages/asta-ui/src/footer-aui-026.d.ts +2 -0
  160. package/dist/types/packages/asta-ui/src/footer-aui-027.d.ts +2 -0
  161. package/dist/types/packages/asta-ui/src/footer-aui-028.d.ts +2 -0
  162. package/dist/types/packages/asta-ui/src/index.d.ts +40 -0
  163. package/dist/types/packages/asta-ui/src/navbar-aui-009.d.ts +2 -0
  164. package/dist/types/packages/asta-ui/src/navbar-aui-010.d.ts +2 -0
  165. package/dist/types/packages/asta-ui/src/navbar-aui-011.d.ts +2 -0
  166. package/dist/types/packages/asta-ui/src/navbar-aui-012.d.ts +2 -0
  167. package/dist/types/packages/asta-ui/src/navbar-aui-013.d.ts +2 -0
  168. package/dist/types/packages/asta-ui/src/navbar-aui-014.d.ts +2 -0
  169. package/dist/types/packages/asta-ui/src/pricing-aui-021.d.ts +2 -0
  170. package/dist/types/packages/asta-ui/src/pricing-aui-022.d.ts +2 -0
  171. package/dist/types/packages/asta-ui/src/pricing-aui-023.d.ts +2 -0
  172. package/dist/types/packages/asta-ui/src/pricing-aui-024.d.ts +2 -0
  173. package/dist/types/packages/asta-ui/src/sign-in-aui-015.d.ts +2 -0
  174. package/dist/types/packages/asta-ui/src/sign-in-aui-016.d.ts +2 -0
  175. package/dist/types/packages/asta-ui/src/sign-in-aui-017.d.ts +2 -0
  176. package/dist/types/packages/asta-ui/src/sign-in-aui-018.d.ts +2 -0
  177. package/dist/types/packages/asta-ui/src/sign-in-aui-019.d.ts +2 -0
  178. package/dist/types/packages/asta-ui/src/sign-in-aui-020.d.ts +2 -0
  179. package/package.json +1 -1
@@ -0,0 +1,636 @@
1
+ "use client";
2
+
3
+ // components/kit/variants/navbar-aui-013.tsx
4
+ import { Fragment, useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
5
+ import { Fragment as Fragment2, jsx, jsxs } from "react/jsx-runtime";
6
+ var cx = (...c) => c.filter(Boolean).join(" ");
7
+ var EASE = "cubic-bezier(.16,1,.3,1)";
8
+ var TW_EASE = "ease-[cubic-bezier(.16,1,.3,1)]";
9
+ var FOCUS = "outline-none focus-visible:ring-2 focus-visible:ring-brand/50";
10
+ var RING = "shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)]";
11
+ var ELEVATED = "shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_9%,transparent),0_16px_36px_-12px_rgb(0_0_0/0.22)]";
12
+ var HATCH = "bg-[repeating-linear-gradient(135deg,color-mix(in_srgb,var(--ink)_4%,transparent)_0_1px,transparent_1px_7px)]";
13
+ var CSS = `
14
+ @keyframes aui-013-rise { from { opacity: 0; transform: translateY(6px); } }
15
+ @keyframes aui-013-pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
16
+ @keyframes aui-013-up { from { opacity: 0; transform: translateY(100%); } }
17
+ @keyframes aui-013-down { from { opacity: 0; transform: translateY(-100%); } }
18
+ @keyframes aui-013-vp-in { from { opacity: 0; transform: translateY(-4px) scale(.96); } }
19
+ @keyframes aui-013-vp-out { to { opacity: 0; transform: translateY(-4px) scale(.96); } }
20
+ @keyframes aui-013-from-l { from { opacity: 0; transform: translateX(-28px); } }
21
+ @keyframes aui-013-from-r { from { opacity: 0; transform: translateX(28px); } }
22
+ @keyframes aui-013-to-l { to { opacity: 0; transform: translateX(-28px); } }
23
+ @keyframes aui-013-to-r { to { opacity: 0; transform: translateX(28px); } }
24
+ .aui-013-in { animation: aui-013-rise .55s ${EASE} both; animation-delay: calc(var(--i, 0) * 50ms); }
25
+ .aui-013-pop { animation: aui-013-pop .3s ${EASE} both; transform-origin: top right; }
26
+ .aui-013-up { animation: aui-013-up .5s ${EASE} both; }
27
+ .aui-013-down { animation: aui-013-down .5s ${EASE} both; }
28
+ .aui-013-vp { transform-origin: top center; }
29
+ .aui-013-vp[data-state=open] { animation: aui-013-vp-in .26s ${EASE}; }
30
+ .aui-013-vp[data-state=closed] { animation: aui-013-vp-out .16s ease-in forwards; }
31
+ .aui-013-c[data-motion=from-start] { animation: aui-013-from-l .3s ${EASE}; }
32
+ .aui-013-c[data-motion=from-end] { animation: aui-013-from-r .3s ${EASE}; }
33
+ .aui-013-c[data-motion=to-start] { animation: aui-013-to-l .3s ${EASE} forwards; }
34
+ .aui-013-c[data-motion=to-end] { animation: aui-013-to-r .3s ${EASE} forwards; }
35
+ .aui-013-t { animation: aui-013-rise .45s ${EASE} both; animation-delay: calc(40ms + var(--i, 0) * 40ms); }
36
+ @media (prefers-reduced-motion: reduce) { .aui-013-m, .aui-013-m * { animation: none !important; transition-duration: 0s !important; } .aui-013-vp[data-state=closed] { visibility: hidden; } }
37
+ `;
38
+ var isMac = () => typeof navigator === "undefined" || /Mac|iPhone|iPad/.test(navigator.platform);
39
+ var reduced = () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
40
+ var at = (n) => ({ "--i": n });
41
+ var PATHS = {
42
+ rocket: "M9.5 2.5c2.5 0 4 1.5 4 4L9 11 5 7ZM5 7 2.5 7.5 4.5 5.5M9 11l-.5 2.5 2-2M5.5 10.5 3 13",
43
+ download: "M8 2.5v8M4.5 7 8 10.5 11.5 7M3 13.5h10",
44
+ palette: "M8 13.5a5.5 5.5 0 1 1 5.5-5.5c0 1.5-1.2 2-2.5 2H9.5a1 1 0 0 0-.7 1.7c.5.6.1 1.8-.8 1.8ZM5 7.5h.01M7.5 5h.01M10.5 6h.01",
45
+ token: "M8 2.5 13.5 5.5v5L8 13.5 2.5 10.5v-5ZM8 8v5.5M8 8l5.5-2.5M8 8 2.5 5.5",
46
+ layers: "M8 2.5 13.5 5.5 8 8.5 2.5 5.5ZM2.5 8.5 8 11.5l5.5-3M2.5 11 8 14l5.5-3",
47
+ access: "M8 4.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM3 6l5 1 5-1M8 7v3l-2 4M8 10l2 4",
48
+ form: "M2.5 4h11v3h-11ZM2.5 9.5h7v3h-7ZM11.5 11h2",
49
+ overlay: "M2.5 3.5h8v7h-8ZM5.5 6.5h8v7h-8Z",
50
+ compass: "M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11ZM10.5 5.5 9 9l-3.5 1.5L7 7Z",
51
+ table: "M2.5 3.5h11v9h-11ZM2.5 6.5h11M2.5 9.5h11M6.5 6.5v6",
52
+ bell: "M4 11.5V7a4 4 0 0 1 8 0v4.5l1 1.5H3l1-1.5ZM6.5 14a1.6 1.6 0 0 0 3 0",
53
+ layout: "M2.5 3h11v10h-11ZM2.5 6h11M6 6v7"
54
+ };
55
+ var Glyph = ({ name }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: PATHS[name] }) });
56
+ var Badge = ({ icon, size = "h-7 w-7" }) => /* @__PURE__ */ jsx("span", { className: cx("grid shrink-0 place-items-center rounded-[7px] bg-paper text-brand shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_2px_7px_rgb(0_0_0/0.05)]", size), children: /* @__PURE__ */ jsx(Glyph, { name: icon }) });
57
+ var Logo = () => /* @__PURE__ */ jsxs(Fragment2, { children: [
58
+ /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 20 20", className: "h-5 w-5", "aria-hidden": true, children: [
59
+ /* @__PURE__ */ jsx("path", { d: "M10 2 17 6v8l-7 4-7-4V6Z", fill: "currentColor" }),
60
+ /* @__PURE__ */ jsx("path", { d: "M10 6.5 13.5 8.5v3L10 13.5 6.5 11.5v-3Z", fill: "var(--brand)" })
61
+ ] }),
62
+ /* @__PURE__ */ jsx("span", { children: "Astabyte" }),
63
+ /* @__PURE__ */ jsx("span", { className: "font-normal text-mute", children: "/" }),
64
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-ink-2", children: "Docs" })
65
+ ] });
66
+ var SECTIONS = [
67
+ {
68
+ label: "Guides",
69
+ menu: {
70
+ type: "columns",
71
+ columns: [
72
+ {
73
+ heading: "Getting started",
74
+ items: [
75
+ { title: "Introduction", description: "What Astabyte UI is for", href: "#", icon: "rocket" },
76
+ { title: "Installation", description: "One package, no config", href: "#", icon: "download" },
77
+ { title: "Theming", description: "Swap tokens per page", href: "#", icon: "palette" }
78
+ ]
79
+ },
80
+ {
81
+ heading: "Core concepts",
82
+ items: [
83
+ { title: "Tokens", description: "Colour, type and space", href: "#", icon: "token" },
84
+ { title: "Composition", description: "Slots over props", href: "#", icon: "layers" },
85
+ { title: "Accessibility", description: "What we test, and how", href: "#", icon: "access" }
86
+ ]
87
+ }
88
+ ],
89
+ cta: { eyebrow: "v3.2 \xB7 Nov 2026", title: "Tokens renamed, one command to migrate", label: "Read the release", href: "#" }
90
+ }
91
+ },
92
+ {
93
+ label: "Components",
94
+ menu: {
95
+ type: "grid",
96
+ items: [
97
+ { title: "Forms", description: "Input, select, combobox", href: "#", icon: "form", meta: "14" },
98
+ { title: "Overlays", description: "Dialog, popover, sheet", href: "#", icon: "overlay", meta: "8" },
99
+ { title: "Navigation", description: "Tabs, menu, breadcrumb", href: "#", icon: "compass", meta: "9" },
100
+ { title: "Data display", description: "Table, list, stat", href: "#", icon: "table", meta: "11" },
101
+ { title: "Feedback", description: "Toast, alert, progress", href: "#", icon: "bell", meta: "6" },
102
+ { title: "Layout", description: "Stack, grid, container", href: "#", icon: "layout", meta: "5" }
103
+ ]
104
+ }
105
+ },
106
+ { label: "API", href: "#" },
107
+ { label: "Changelog", href: "#", fresh: true }
108
+ ];
109
+ var DATES = { "v3.2": "Nov 2026", "v3.1": "Aug 2026", "v2.9": "Mar 2026" };
110
+ var SearchIcon = () => /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", className: "h-4 w-4 shrink-0", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", "aria-hidden": true, children: [
111
+ /* @__PURE__ */ jsx("circle", { cx: "7", cy: "7", r: "4.5" }),
112
+ /* @__PURE__ */ jsx("path", { d: "m10.5 10.5 3 3" })
113
+ ] });
114
+ var RepoIcon = () => /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
115
+ /* @__PURE__ */ jsx("circle", { cx: "4.5", cy: "3.5", r: "1.6" }),
116
+ /* @__PURE__ */ jsx("circle", { cx: "4.5", cy: "12.5", r: "1.6" }),
117
+ /* @__PURE__ */ jsx("circle", { cx: "11.5", cy: "5.5", r: "1.6" }),
118
+ /* @__PURE__ */ jsx("path", { d: "M4.5 5.1v5.8M11.5 7.1c0 2.4-2 3-4.5 3.3-1.4.2-2.5.7-2.5 1.6" })
119
+ ] });
120
+ var Chevron = ({ className = "" }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: cx("h-3.5 w-3.5", className), fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m6 4 4 4-4 4" }) });
121
+ function Rolling({ value, dir }) {
122
+ return /* @__PURE__ */ jsx("span", { className: "relative inline-flex h-[1.25em] overflow-hidden", children: /* @__PURE__ */ jsx("span", { className: cx("inline-block leading-[1.25em]", dir > 0 ? "aui-013-up" : "aui-013-down"), children: value }, value) });
123
+ }
124
+ function VersionMenu({ versions, dates, value, onChange, align = "right" }) {
125
+ const [open, setOpen] = useState(false);
126
+ const [dir, setDir] = useState(1);
127
+ const root = useRef(null);
128
+ const trigger = useRef(null);
129
+ const id = useId();
130
+ const close = useCallback((focus) => {
131
+ setOpen(false);
132
+ if (focus) trigger.current?.focus();
133
+ }, []);
134
+ useEffect(() => {
135
+ if (!open) return;
136
+ root.current?.querySelector('[aria-selected="true"]')?.focus();
137
+ const down = (e) => !root.current?.contains(e.target) && close(false);
138
+ const key = (e) => e.key === "Escape" && close(true);
139
+ document.addEventListener("pointerdown", down);
140
+ document.addEventListener("keydown", key);
141
+ return () => {
142
+ document.removeEventListener("pointerdown", down);
143
+ document.removeEventListener("keydown", key);
144
+ };
145
+ }, [open, close]);
146
+ const choose = (v) => {
147
+ if (v !== value) setDir(versions.indexOf(v) < versions.indexOf(value) ? 1 : -1);
148
+ onChange(v);
149
+ close(true);
150
+ };
151
+ const keys = (e) => {
152
+ const items = Array.from(e.currentTarget.querySelectorAll('[role="option"]'));
153
+ const i = items.indexOf(document.activeElement);
154
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
155
+ e.preventDefault();
156
+ items[(i + (e.key === "ArrowDown" ? 1 : -1) + items.length) % items.length]?.focus();
157
+ } else if (e.key === "Tab") close(false);
158
+ };
159
+ return /* @__PURE__ */ jsxs("div", { ref: root, className: "relative", children: [
160
+ /* @__PURE__ */ jsxs(
161
+ "button",
162
+ {
163
+ ref: trigger,
164
+ type: "button",
165
+ "aria-label": `Version ${value}`,
166
+ "aria-haspopup": "listbox",
167
+ "aria-expanded": open,
168
+ "aria-controls": id,
169
+ onClick: () => setOpen((v) => !v),
170
+ className: cx("group/v flex h-8 items-center gap-1 rounded-lg pl-2.5 pr-1.5 font-mono text-[12px] text-ink transition-colors hover:bg-paper-2 aria-expanded:bg-paper-2", RING, FOCUS),
171
+ children: [
172
+ /* @__PURE__ */ jsx(Rolling, { value, dir }),
173
+ /* @__PURE__ */ jsx(Chevron, { className: cx("rotate-90 text-mute transition-transform duration-300 group-aria-expanded/v:-rotate-90", TW_EASE) })
174
+ ]
175
+ }
176
+ ),
177
+ open && /* @__PURE__ */ jsx("ul", { id, role: "listbox", "aria-label": "Version", onKeyDown: keys, className: cx("aui-013-pop absolute top-[calc(100%+6px)] z-50 w-[200px] rounded-[8px] bg-paper p-1.5", ELEVATED, align === "right" ? "right-0" : "left-0"), children: versions.map((v, n) => /* @__PURE__ */ jsxs(
178
+ "li",
179
+ {
180
+ role: "option",
181
+ tabIndex: -1,
182
+ "aria-selected": v === value,
183
+ onClick: () => choose(v),
184
+ onKeyDown: (e) => {
185
+ if (e.key === "Enter" || e.key === " ") {
186
+ e.preventDefault();
187
+ choose(v);
188
+ }
189
+ },
190
+ className: "flex cursor-pointer items-center gap-2 rounded-[6px] px-2.5 py-2 text-[13px] text-ink outline-none transition-colors hover:bg-paper-2 focus-visible:bg-paper-2",
191
+ children: [
192
+ /* @__PURE__ */ jsx("span", { className: cx("h-1.5 w-1.5 rounded-full", v === value ? "bg-brand" : "bg-transparent") }),
193
+ /* @__PURE__ */ jsx("span", { className: "font-mono text-[12.5px]", children: v }),
194
+ n === 0 && /* @__PURE__ */ jsx("span", { className: "rounded-[4px] bg-[color-mix(in_srgb,var(--brand)_12%,transparent)] px-1.5 text-[10.5px] font-medium leading-[18px] text-brand", children: "Latest" }),
195
+ /* @__PURE__ */ jsx("span", { className: "ml-auto text-[11.5px] text-mute", children: dates[v] })
196
+ ]
197
+ },
198
+ v
199
+ )) })
200
+ ] });
201
+ }
202
+ var tile = cx(
203
+ "group/t relative flex flex-col overflow-hidden rounded-[6px] p-3.5 transition-[opacity,box-shadow] duration-300",
204
+ "shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_7%,transparent)] hover:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_15%,transparent)]",
205
+ "group-has-[a:hover]/m:opacity-65 hover:!opacity-100",
206
+ FOCUS
207
+ );
208
+ function Panel({ menu }) {
209
+ if (menu.type === "grid")
210
+ return /* @__PURE__ */ jsx("div", { className: "group/m grid w-[min(600px,calc(100cqw-24px))] grid-cols-3 gap-2 p-2", children: menu.items.map((it, n) => /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("a", { href: it.href, style: at(n), className: cx(tile, HATCH, "aui-013-t h-[112px] justify-between"), children: [
211
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "pointer-events-none absolute inset-0 bg-linear-to-b from-transparent from-40% to-[color-mix(in_srgb,var(--brand)_8%,transparent)] opacity-0 transition-opacity duration-500 group-hover/t:opacity-100" }),
212
+ /* @__PURE__ */ jsxs("span", { className: "relative flex items-start justify-between", children: [
213
+ it.icon && /* @__PURE__ */ jsx(Badge, { icon: it.icon }),
214
+ it.meta && /* @__PURE__ */ jsx("span", { className: "font-mono text-[11px] tabular-nums text-mute", children: it.meta })
215
+ ] }),
216
+ /* @__PURE__ */ jsxs("span", { className: "relative", children: [
217
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 text-[14px] font-medium text-ink", children: [
218
+ it.title,
219
+ /* @__PURE__ */ jsx(Chevron, { className: cx("-translate-x-0.5 text-mute transition-[translate,color] duration-300 group-hover/t:translate-x-0 group-hover/t:text-ink", TW_EASE) })
220
+ ] }),
221
+ it.description && /* @__PURE__ */ jsx("span", { className: "mt-0.5 block text-[12px] text-mute", children: it.description })
222
+ ] })
223
+ ] }) }, it.title)) });
224
+ return /* @__PURE__ */ jsxs("div", { className: "group/m grid w-[min(620px,calc(100cqw-24px))] grid-cols-[1fr_1fr_180px] gap-2 p-2", children: [
225
+ menu.columns.map((c, ci) => /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-0.5 pt-1.5", children: [
226
+ /* @__PURE__ */ jsx("span", { className: "mb-1 px-2.5 font-mono text-[10.5px] uppercase tracking-[0.08em] text-mute", children: c.heading }),
227
+ c.items.map((it, n) => /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
228
+ "a",
229
+ {
230
+ href: it.href,
231
+ style: at(ci * 3 + n),
232
+ className: cx(
233
+ "aui-013-t flex items-center gap-2.5 rounded-[8px] px-2.5 py-2 transition-[background-color,opacity] duration-200 hover:bg-paper-2 group-has-[a:hover]/m:opacity-65 hover:!opacity-100",
234
+ FOCUS
235
+ ),
236
+ children: [
237
+ it.icon && /* @__PURE__ */ jsx(Badge, { icon: it.icon }),
238
+ /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col", children: [
239
+ /* @__PURE__ */ jsx("span", { className: "text-[13.5px] font-medium leading-tight text-ink", children: it.title }),
240
+ it.description && /* @__PURE__ */ jsx("span", { className: "truncate text-[12px] leading-snug text-mute", children: it.description })
241
+ ] })
242
+ ]
243
+ }
244
+ ) }, it.title))
245
+ ] }, c.heading)),
246
+ /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
247
+ "a",
248
+ {
249
+ href: menu.cta.href,
250
+ style: at(6),
251
+ className: cx(
252
+ "aui-013-t group/t relative flex min-h-[176px] flex-col justify-between overflow-hidden rounded-[6px] bg-ink p-4 text-paper transition-opacity duration-300 group-has-[a:hover]/m:opacity-75 hover:!opacity-100",
253
+ FOCUS
254
+ ),
255
+ children: [
256
+ /* @__PURE__ */ jsx("span", { className: "font-mono text-[10.5px] uppercase tracking-[0.08em] text-brand", children: menu.cta.eyebrow }),
257
+ /* @__PURE__ */ jsx("pre", { "aria-hidden": true, className: cx("absolute right-3 top-9 font-mono text-[10px] leading-[1.6] text-paper/30 transition-transform duration-700 group-hover/t:-translate-y-1", TW_EASE), children: "- color.fg\n+ ink\n- color.bg\n+ paper" }),
258
+ /* @__PURE__ */ jsxs("span", { className: "relative", children: [
259
+ /* @__PURE__ */ jsx("span", { className: "block text-[14.5px] font-medium leading-tight tracking-[-0.02em]", children: menu.cta.title }),
260
+ /* @__PURE__ */ jsxs("span", { className: "mt-3 flex items-center gap-1 text-[13px] font-medium", children: [
261
+ menu.cta.label,
262
+ /* @__PURE__ */ jsx(Chevron, { className: cx("transition-transform duration-300 group-hover/t:translate-x-0.5", TW_EASE) })
263
+ ] })
264
+ ] })
265
+ ]
266
+ }
267
+ ) })
268
+ ] });
269
+ }
270
+ var flat = (m) => m.type === "grid" ? m.items : m.columns.flatMap((c) => c.items);
271
+ function useMega(labels, root, openOnMount, delay = 700) {
272
+ const [m, setM] = useState({ value: "", last: "", dir: "" });
273
+ const timer = useRef(void 0);
274
+ const hoverAt = useRef(0);
275
+ const current = useRef("");
276
+ const wasOpen = useRef(false);
277
+ const panelRef = useRef(null);
278
+ const innerRef = useRef(null);
279
+ const triggers = useRef(/* @__PURE__ */ new Map());
280
+ const open = (v) => {
281
+ clearTimeout(timer.current);
282
+ setM((p) => p.value === v ? p : { value: v, last: v, dir: p.value ? labels.indexOf(v) > labels.indexOf(p.value) ? "from-end" : "from-start" : "" });
283
+ };
284
+ const close = useCallback((focus = false) => {
285
+ clearTimeout(timer.current);
286
+ if (focus) triggers.current.get(current.current)?.focus();
287
+ setM((p) => p.value ? { ...p, value: "", dir: "" } : p);
288
+ }, []);
289
+ const later = () => {
290
+ clearTimeout(timer.current);
291
+ timer.current = setTimeout(() => close(), 150);
292
+ };
293
+ const cancel = () => clearTimeout(timer.current);
294
+ useEffect(() => {
295
+ current.current = m.value;
296
+ if (!m.value) return;
297
+ const down = (e) => !root.current?.contains(e.target) && close();
298
+ const key = (e) => e.key === "Escape" && close(true);
299
+ const focus = (e) => !root.current?.contains(e.target) && close();
300
+ document.addEventListener("pointerdown", down);
301
+ document.addEventListener("keydown", key);
302
+ document.addEventListener("focusin", focus);
303
+ return () => {
304
+ document.removeEventListener("pointerdown", down);
305
+ document.removeEventListener("keydown", key);
306
+ document.removeEventListener("focusin", focus);
307
+ };
308
+ }, [m.value, root, close]);
309
+ useEffect(() => () => clearTimeout(timer.current), []);
310
+ useEffect(() => {
311
+ if (!openOnMount) return;
312
+ const t = setTimeout(() => setM({ value: openOnMount, last: openOnMount, dir: "" }), delay);
313
+ return () => clearTimeout(t);
314
+ }, [openOnMount, delay]);
315
+ useLayoutEffect(() => {
316
+ const box = panelRef.current;
317
+ const el = innerRef.current?.firstElementChild;
318
+ if (!box || !el || !m.value) {
319
+ wasOpen.current = false;
320
+ return;
321
+ }
322
+ const fit = (instant) => {
323
+ if (instant) box.style.transition = "none";
324
+ box.style.width = `${el.offsetWidth}px`;
325
+ box.style.height = `${el.offsetHeight}px`;
326
+ if (instant) {
327
+ void box.offsetWidth;
328
+ box.style.transition = "";
329
+ }
330
+ };
331
+ fit(!wasOpen.current);
332
+ wasOpen.current = true;
333
+ const ro = new ResizeObserver(() => fit(true));
334
+ ro.observe(el);
335
+ return () => ro.disconnect();
336
+ }, [m.value]);
337
+ const register = (label) => (el) => {
338
+ if (el) triggers.current.set(label, el);
339
+ else triggers.current.delete(label);
340
+ };
341
+ const enter = (label, mouse) => {
342
+ if (!mouse) return;
343
+ if (current.current !== label) hoverAt.current = Date.now();
344
+ open(label);
345
+ };
346
+ const click = (label) => m.value === label && Date.now() - hoverAt.current > 400 ? close() : open(label);
347
+ const focusFirst = () => requestAnimationFrame(() => panelRef.current?.querySelector("a")?.focus());
348
+ const triggerKeys = (label, e) => {
349
+ if (e.key === "ArrowDown" || e.key === "Tab" && !e.shiftKey && m.value === label) {
350
+ e.preventDefault();
351
+ open(label);
352
+ focusFirst();
353
+ }
354
+ };
355
+ const panelKeys = (e) => {
356
+ const first = panelRef.current?.querySelector("a");
357
+ if (e.key === "Tab" && e.shiftKey && e.target === first) {
358
+ e.preventDefault();
359
+ triggers.current.get(current.current)?.focus();
360
+ }
361
+ };
362
+ const ended = (e) => {
363
+ if (e.target === e.currentTarget) setM((p) => p.value ? p : { ...p, last: "" });
364
+ };
365
+ return { m, panelRef, innerRef, close, later, cancel, register, enter, click, triggerKeys, panelKeys, ended };
366
+ }
367
+ function DocsNavbar({
368
+ shortcut = true,
369
+ brand = /* @__PURE__ */ jsx(Logo, {}),
370
+ brandHref = "/",
371
+ sections = SECTIONS,
372
+ defaultSection = 0,
373
+ onNavigate,
374
+ versions = ["v3.2", "v3.1", "v2.9"],
375
+ versionDates = DATES,
376
+ defaultVersion,
377
+ onVersionChange,
378
+ onSearch,
379
+ repoHref = "#",
380
+ repoLabel = "12.4k",
381
+ openOnMount,
382
+ className
383
+ }) {
384
+ const [active, setActive] = useState(defaultSection);
385
+ const [hover, setHover] = useState(null);
386
+ const [version, setVersion] = useState(defaultVersion ?? versions[0] ?? "");
387
+ const [sheet, setSheet] = useState(false);
388
+ const [section, setSection] = useState(null);
389
+ const [mac] = useState(isMac);
390
+ const root = useRef(null);
391
+ const { panelRef: megaPanel, innerRef: megaInner, ...mega } = useMega(sections.map((x) => x.label), root, openOnMount, 700);
392
+ const value = mega.m.value;
393
+ const lastMenu = sections.find((x) => x.label === mega.m.last)?.menu;
394
+ const row = useRef(null);
395
+ const mark = useRef(null);
396
+ const burger = useRef(null);
397
+ const anim = useRef(null);
398
+ const openIndex = sections.findIndex((s) => s.label === value);
399
+ const target = hover ?? (openIndex >= 0 ? openIndex : active);
400
+ const targetRef = useRef(target);
401
+ const ids = useId();
402
+ const place = useCallback((animate) => {
403
+ const r = row.current;
404
+ const el = mark.current;
405
+ if (!r || !el) return;
406
+ const a = r.querySelectorAll("[data-glide]")[targetRef.current];
407
+ if (!a || a.offsetWidth === 0) {
408
+ el.style.opacity = "0";
409
+ return;
410
+ }
411
+ const rr = r.getBoundingClientRect();
412
+ const ar = a.getBoundingClientRect();
413
+ const to = { x: ar.left - rr.left + 10, w: ar.width - 20 };
414
+ let from = null;
415
+ if (el.style.opacity === "1") {
416
+ const m = el.getBoundingClientRect();
417
+ from = { x: m.left - rr.left, w: m.width };
418
+ }
419
+ anim.current?.cancel();
420
+ el.style.width = `${to.w}px`;
421
+ el.style.transform = `translateX(${to.x}px)`;
422
+ el.style.opacity = "1";
423
+ if (!animate || !from || from.w === 0 || reduced()) return;
424
+ anim.current = el.animate([{ transform: `translateX(${from.x}px) scaleX(${from.w / to.w})` }, { transform: `translateX(${to.x}px) scaleX(1)` }], { duration: 480, easing: EASE });
425
+ }, []);
426
+ useLayoutEffect(() => {
427
+ targetRef.current = target;
428
+ place(true);
429
+ }, [target, place]);
430
+ useEffect(() => {
431
+ const r = row.current;
432
+ if (!r) return;
433
+ const ro = new ResizeObserver(() => place(false));
434
+ ro.observe(r);
435
+ return () => ro.disconnect();
436
+ }, [place]);
437
+ useEffect(() => () => anim.current?.cancel(), []);
438
+ useEffect(() => {
439
+ if (!onSearch || !shortcut) return;
440
+ const key = (e) => {
441
+ if (e.key.toLowerCase() === "k" && (e.metaKey || e.ctrlKey)) {
442
+ e.preventDefault();
443
+ onSearch();
444
+ }
445
+ };
446
+ document.addEventListener("keydown", key);
447
+ return () => document.removeEventListener("keydown", key);
448
+ }, [onSearch, shortcut]);
449
+ const close = useCallback((focus) => {
450
+ setSheet(false);
451
+ if (focus) burger.current?.focus();
452
+ }, []);
453
+ useEffect(() => {
454
+ if (!sheet) return;
455
+ const down = (e) => !root.current?.contains(e.target) && close(false);
456
+ const key = (e) => e.key === "Escape" && close(true);
457
+ document.addEventListener("pointerdown", down);
458
+ document.addEventListener("keydown", key);
459
+ return () => {
460
+ document.removeEventListener("pointerdown", down);
461
+ document.removeEventListener("keydown", key);
462
+ };
463
+ }, [sheet, close]);
464
+ const go = (n, e) => {
465
+ setActive(n);
466
+ onNavigate?.(n, e);
467
+ };
468
+ const pickVersion = (v) => {
469
+ setVersion(v);
470
+ onVersionChange?.(v);
471
+ };
472
+ const pill = (on) => cx(
473
+ "group/p flex h-8 items-center gap-1 rounded-lg px-2.5 text-[14px] font-medium transition-colors duration-200 hover:bg-paper-2 hover:text-ink aria-expanded:bg-paper-2 aria-expanded:text-ink",
474
+ FOCUS,
475
+ on ? "text-ink" : "text-ink/70"
476
+ );
477
+ return /* @__PURE__ */ jsxs("header", { ref: root, className: cx("aui-013-m @container sticky top-0 z-30 w-full bg-paper shadow-[0_1px_0_color-mix(in_srgb,var(--ink)_9%,transparent)]", className), children: [
478
+ /* @__PURE__ */ jsx("style", { href: "asta-navbar-aui-013", precedence: "asta", children: CSS }),
479
+ /* @__PURE__ */ jsxs("div", { ref: row, className: "relative mx-auto flex h-14 max-w-[1120px] items-center gap-4 px-4", children: [
480
+ /* @__PURE__ */ jsx("a", { href: brandHref, style: at(0), className: cx("aui-013-in flex shrink-0 items-center gap-1.5 rounded-md text-[15px] font-semibold tracking-[-0.02em] text-ink", FOCUS), children: brand }),
481
+ /* @__PURE__ */ jsx("nav", { "aria-label": "Sections", className: "hidden @min-[640px]:block", children: /* @__PURE__ */ jsx("ul", { className: "flex items-center gap-px", onPointerLeave: () => setHover(null), children: sections.map((s, n) => /* @__PURE__ */ jsx("li", { className: "aui-013-in", style: at(n + 1), onPointerEnter: () => setHover(n), children: s.menu ? /* @__PURE__ */ jsx(Fragment2, { children: /* @__PURE__ */ jsxs(
482
+ "button",
483
+ {
484
+ ref: mega.register(s.label),
485
+ type: "button",
486
+ "aria-expanded": value === s.label,
487
+ "aria-controls": `${ids}-m${n}`,
488
+ onPointerEnter: (e) => mega.enter(s.label, e.pointerType === "mouse"),
489
+ onPointerLeave: (e) => e.pointerType === "mouse" && mega.later(),
490
+ onClick: () => mega.click(s.label),
491
+ onKeyDown: (e) => mega.triggerKeys(s.label, e),
492
+ "data-glide": true,
493
+ className: cx(pill(n === active), "pr-2"),
494
+ children: [
495
+ s.label,
496
+ /* @__PURE__ */ jsx(Chevron, { className: cx("rotate-90 text-mute transition-transform duration-300 group-aria-expanded/p:-rotate-90", TW_EASE) })
497
+ ]
498
+ }
499
+ ) }) : /* @__PURE__ */ jsxs("a", { href: s.href, "data-glide": true, "aria-current": n === active ? "page" : void 0, onClick: (e) => go(n, e), className: pill(n === active), children: [
500
+ s.label,
501
+ s.fresh && /* @__PURE__ */ jsx("span", { "aria-label": "new", className: "h-1.5 w-1.5 rounded-full bg-brand" })
502
+ ] }) }, s.label)) }) }),
503
+ /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-x-0 top-full z-40 hidden justify-center pt-1.5 @min-[640px]:flex", children: mega.m.last && /* @__PURE__ */ jsx(
504
+ "div",
505
+ {
506
+ ref: megaPanel,
507
+ "data-state": value ? "open" : "closed",
508
+ onPointerEnter: mega.cancel,
509
+ onPointerLeave: (e) => e.pointerType === "mouse" && mega.later(),
510
+ onClick: (e) => e.target.closest("a") && mega.close(),
511
+ onKeyDown: mega.panelKeys,
512
+ onAnimationEnd: mega.ended,
513
+ className: cx(
514
+ "aui-013-vp pointer-events-auto relative overflow-hidden rounded-[8px] bg-paper",
515
+ ELEVATED,
516
+ "transition-[width,height] duration-300 data-[state=closed]:pointer-events-none",
517
+ TW_EASE
518
+ ),
519
+ children: /* @__PURE__ */ jsx("div", { ref: megaInner, id: `${ids}-m${sections.findIndex((x) => x.label === mega.m.last)}`, "data-motion": mega.m.dir || void 0, className: "aui-013-c absolute left-0 top-0", children: lastMenu && /* @__PURE__ */ jsx(Panel, { menu: lastMenu }) }, mega.m.last)
520
+ }
521
+ ) }),
522
+ /* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-1.5", children: [
523
+ /* @__PURE__ */ jsxs(
524
+ "button",
525
+ {
526
+ type: "button",
527
+ onClick: onSearch,
528
+ "aria-label": "Search docs",
529
+ style: at(sections.length + 1),
530
+ className: cx(
531
+ "aui-013-in group/s flex h-8 items-center gap-2 rounded-lg text-mute transition-colors duration-200 hover:bg-paper-2 hover:text-ink",
532
+ "w-8 justify-center @min-[920px]:w-44 @min-[920px]:justify-start @min-[920px]:bg-paper-2 @min-[920px]:px-2.5",
533
+ FOCUS
534
+ ),
535
+ children: [
536
+ /* @__PURE__ */ jsx("span", { className: cx("transition-transform duration-300 group-hover/s:scale-110", TW_EASE), children: /* @__PURE__ */ jsx(SearchIcon, {}) }),
537
+ /* @__PURE__ */ jsx("span", { className: "hidden text-[13px] @min-[920px]:inline", children: "Search\u2026" }),
538
+ /* @__PURE__ */ jsx("kbd", { className: cx("ml-auto hidden rounded-[5px] bg-paper px-1.5 py-0.5 font-sans text-[11px] text-mute @min-[920px]:inline", RING), children: mac ? "\u2318K" : "Ctrl K" })
539
+ ]
540
+ }
541
+ ),
542
+ /* @__PURE__ */ jsx("div", { className: "aui-013-in hidden @min-[640px]:block", style: at(sections.length + 2), children: /* @__PURE__ */ jsx(VersionMenu, { versions, dates: versionDates, value: version, onChange: pickVersion }) }),
543
+ /* @__PURE__ */ jsxs(
544
+ "a",
545
+ {
546
+ href: repoHref,
547
+ "aria-label": repoLabel ? `Source repository, ${repoLabel} stars` : "Source repository",
548
+ style: at(sections.length + 3),
549
+ className: cx("aui-013-in hidden h-8 items-center gap-1.5 rounded-lg px-2 text-[12.5px] text-ink/70 transition-colors hover:bg-paper-2 hover:text-ink @min-[780px]:flex", FOCUS),
550
+ children: [
551
+ /* @__PURE__ */ jsx(RepoIcon, {}),
552
+ repoLabel && /* @__PURE__ */ jsx("span", { className: "tabular-nums", children: repoLabel })
553
+ ]
554
+ }
555
+ ),
556
+ /* @__PURE__ */ jsxs(
557
+ "button",
558
+ {
559
+ ref: burger,
560
+ type: "button",
561
+ "aria-label": sheet ? "Close menu" : "Open menu",
562
+ "aria-expanded": sheet,
563
+ "aria-controls": `${ids}-sheet`,
564
+ onClick: () => setSheet((v) => !v),
565
+ className: cx("relative flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-paper-2 @min-[640px]:hidden", FOCUS),
566
+ children: [
567
+ /* @__PURE__ */ jsx("span", { className: cx("absolute h-[1.5px] w-4 rounded-full bg-ink transition-transform duration-500", TW_EASE, sheet ? "rotate-45" : "-translate-y-[3.5px]") }),
568
+ /* @__PURE__ */ jsx("span", { className: cx("absolute h-[1.5px] w-4 rounded-full bg-ink transition-transform duration-500", TW_EASE, sheet ? "-rotate-45" : "translate-y-[3.5px]") })
569
+ ]
570
+ }
571
+ )
572
+ ] }),
573
+ /* @__PURE__ */ jsx("span", { ref: mark, "aria-hidden": true, style: { opacity: 0 }, className: "pointer-events-none absolute -bottom-px left-0 hidden h-[2px] origin-left rounded-full bg-brand transition-opacity duration-300 @min-[640px]:block" })
574
+ ] }),
575
+ sheet && /* @__PURE__ */ jsxs("nav", { id: `${ids}-sheet`, "aria-label": "Sections", className: "aui-013-pop absolute inset-x-0 top-full max-h-[70vh] overflow-y-auto bg-paper pb-4 shadow-[0_24px_40px_-24px_rgb(0_0_0/0.3)] @min-[640px]:hidden", children: [
576
+ sections.map(
577
+ (s, n) => s.menu ? /* @__PURE__ */ jsxs("div", { className: "aui-013-in shadow-[0_1px_0_color-mix(in_srgb,var(--ink)_7%,transparent)]", style: at(n), children: [
578
+ /* @__PURE__ */ jsxs(
579
+ "button",
580
+ {
581
+ type: "button",
582
+ "aria-expanded": section === s.label,
583
+ onClick: () => setSection((x) => x === s.label ? null : s.label),
584
+ className: cx("flex h-12 w-full items-center justify-between px-4 text-[16px] font-medium text-ink", FOCUS),
585
+ children: [
586
+ s.label,
587
+ /* @__PURE__ */ jsx(Chevron, { className: cx("text-mute transition-transform duration-300", TW_EASE, section === s.label ? "-rotate-90" : "rotate-90") })
588
+ ]
589
+ }
590
+ ),
591
+ /* @__PURE__ */ jsx("div", { className: cx("grid transition-[grid-template-rows] duration-500", TW_EASE, section === s.label ? "grid-rows-[1fr]" : "grid-rows-[0fr]"), children: /* @__PURE__ */ jsxs("ul", { className: "overflow-hidden px-2", inert: section !== s.label || void 0, children: [
592
+ flat(s.menu).map((t) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("a", { href: t.href, onClick: () => close(false), className: cx("flex items-center gap-3 rounded-[8px] px-2 py-2 hover:bg-paper-2", FOCUS), children: [
593
+ t.icon && /* @__PURE__ */ jsx(Badge, { icon: t.icon }),
594
+ /* @__PURE__ */ jsxs("span", { className: "flex flex-col", children: [
595
+ /* @__PURE__ */ jsx("span", { className: "text-[14px] font-medium text-ink", children: t.title }),
596
+ t.description && /* @__PURE__ */ jsx("span", { className: "text-[12px] text-mute", children: t.description })
597
+ ] })
598
+ ] }) }, t.title)),
599
+ /* @__PURE__ */ jsx("li", { "aria-hidden": true, className: "h-2" })
600
+ ] }) })
601
+ ] }, s.label) : /* @__PURE__ */ jsxs(
602
+ "a",
603
+ {
604
+ href: s.href,
605
+ "aria-current": n === active ? "page" : void 0,
606
+ onClick: (e) => {
607
+ go(n, e);
608
+ close(false);
609
+ },
610
+ style: at(n),
611
+ className: cx("aui-013-in flex h-12 items-center gap-2 px-4 text-[16px] font-medium text-ink shadow-[0_1px_0_color-mix(in_srgb,var(--ink)_7%,transparent)]", FOCUS),
612
+ children: [
613
+ s.label,
614
+ s.fresh && /* @__PURE__ */ jsx("span", { className: "rounded-[4px] bg-[color-mix(in_srgb,var(--brand)_12%,transparent)] px-1.5 text-[10.5px] font-medium leading-[18px] text-brand", children: "New" })
615
+ ]
616
+ },
617
+ s.label
618
+ )
619
+ ),
620
+ /* @__PURE__ */ jsxs("div", { className: "aui-013-in mt-4 flex items-center gap-2 px-4", style: at(sections.length), children: [
621
+ /* @__PURE__ */ jsx(VersionMenu, { versions, dates: versionDates, value: version, onChange: pickVersion, align: "left" }),
622
+ /* @__PURE__ */ jsxs("a", { href: repoHref, className: cx("ml-auto flex h-8 items-center gap-2 rounded-lg px-3 text-[13px] font-medium text-ink", RING, FOCUS), children: [
623
+ /* @__PURE__ */ jsx(RepoIcon, {}),
624
+ "Source ",
625
+ repoLabel && /* @__PURE__ */ jsx("span", { className: "text-mute", children: repoLabel })
626
+ ] })
627
+ ] })
628
+ ] })
629
+ ] });
630
+ }
631
+ var navbar_aui_013_default = DocsNavbar;
632
+
633
+ export {
634
+ DocsNavbar,
635
+ navbar_aui_013_default
636
+ };