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,245 @@
1
+ "use client";
2
+
3
+ // components/kit/variants/footer-aui-028.tsx
4
+ import { useId, useRef, useState } from "react";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ var cx = (...c) => c.filter(Boolean).join(" ");
7
+ var EASE = "ease-[cubic-bezier(.16,1,.3,1)]";
8
+ var ring = "outline-none focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-paper";
9
+ var step = (i) => ({ "--i": i });
10
+ var DEFAULT_COLUMNS = [
11
+ {
12
+ heading: "Product",
13
+ links: [
14
+ { label: "Dashboard", href: "#" },
15
+ { label: "Edge functions", href: "#" },
16
+ { label: "Pricing", href: "#" },
17
+ { label: "Enterprise", href: "#" }
18
+ ]
19
+ },
20
+ {
21
+ heading: "Developers",
22
+ links: [
23
+ { label: "Docs", href: "#" },
24
+ { label: "API reference", href: "#" },
25
+ { label: "SDKs", href: "#" },
26
+ { label: "Changelog", href: "#" }
27
+ ]
28
+ },
29
+ {
30
+ heading: "Company",
31
+ links: [
32
+ { label: "About", href: "#" },
33
+ { label: "Security", href: "#" },
34
+ { label: "Careers", href: "#" },
35
+ { label: "Contact", href: "#" }
36
+ ]
37
+ }
38
+ ];
39
+ var DEFAULT_UPTIME = Array.from({ length: 45 }, (_, i) => i === 11 ? 0.991 : i === 29 ? 0.997 : 1);
40
+ var DEFAULT_LANGUAGES = [
41
+ { value: "en", label: "English" },
42
+ { value: "de", label: "Deutsch" },
43
+ { value: "fr", label: "Fran\xE7ais" },
44
+ { value: "ja", label: "\u65E5\u672C\u8A9E" },
45
+ { value: "id", label: "Bahasa Indonesia" }
46
+ ];
47
+ var CSS = `
48
+ @keyframes aui-f28-rise { from { opacity: 0; transform: translateY(12px) } }
49
+ @keyframes aui-f28-bar { from { opacity: 0; transform: scaleY(.15) } }
50
+ @keyframes aui-f28-ping { 0% { opacity: .55; transform: scale(1) } 80%, 100% { opacity: 0; transform: scale(2.8) } }
51
+ @keyframes aui-f28-beat { 0%, 100% { opacity: 1; transform: scale(1) } 50% { opacity: .7; transform: scale(.8) } }
52
+ @keyframes aui-f28-fly { 0% { transform: none } 45% { opacity: 0; transform: translateY(-130%) } 46% { opacity: 0; transform: translateY(130%) } 100% { opacity: 1; transform: none } }
53
+ .aui-f28-in { animation: aui-f28-rise .65s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i, 0) * 55ms) }
54
+ .aui-f28-bar { transform-origin: bottom; animation: aui-f28-bar .6s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(300ms + var(--i, 0) * 14ms) }
55
+ .aui-f28-ping { animation: aui-f28-ping 2s cubic-bezier(.16,1,.3,1) infinite }
56
+ .aui-f28-beat { animation: aui-f28-beat 2s cubic-bezier(.16,1,.3,1) infinite }
57
+ .aui-f28-fly { animation: aui-f28-fly .7s cubic-bezier(.16,1,.3,1) }
58
+ @media (prefers-reduced-motion: reduce) {
59
+ .aui-f28-in, .aui-f28-bar, .aui-f28-beat, .aui-f28-fly { animation: none }
60
+ .aui-f28-ping { animation: none; opacity: 0 }
61
+ }
62
+ `;
63
+ function Mark() {
64
+ return /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-[15px] font-semibold tracking-[-0.03em] text-ink", children: [
65
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "grid h-7 w-7 place-items-center rounded-[8px] bg-ink text-paper", children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.9", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M2.5 10.5 6 7l2.5 2.5L13.5 4.5" }) }) }),
66
+ "Astabyte"
67
+ ] });
68
+ }
69
+ function scrollParent(el) {
70
+ for (let n = el?.parentElement; n; n = n.parentElement) {
71
+ const o = getComputedStyle(n).overflowY;
72
+ if ((o === "auto" || o === "scroll") && n.scrollHeight > n.clientHeight) return n;
73
+ }
74
+ return null;
75
+ }
76
+ var dayLabel = (daysAgo) => {
77
+ const d = /* @__PURE__ */ new Date();
78
+ d.setDate(d.getDate() - daysAgo);
79
+ return d.toLocaleDateString("en", { month: "short", day: "numeric" });
80
+ };
81
+ function StatusFooter({
82
+ brand = /* @__PURE__ */ jsx(Mark, {}),
83
+ tagline = "Deploy, observe and scale from one quiet dashboard.",
84
+ columns = DEFAULT_COLUMNS,
85
+ status = { label: "All systems normal", href: "#", live: true },
86
+ uptime = DEFAULT_UPTIME,
87
+ languages = DEFAULT_LANGUAGES,
88
+ language,
89
+ onLanguageChange,
90
+ onBackToTop,
91
+ legal,
92
+ className
93
+ }) {
94
+ const root = useRef(null);
95
+ const [own, setOwn] = useState(languages[0]?.value ?? "");
96
+ const [hover, setHover] = useState(null);
97
+ const [fly, setFly] = useState(0);
98
+ const langId = useId();
99
+ const lang = language ?? own;
100
+ const live = status.live ?? true;
101
+ const avg = uptime.length ? uptime.reduce((a, b) => a + b, 0) / uptime.length * 100 : 100;
102
+ const toTop = () => {
103
+ setFly((n) => n + 1);
104
+ if (onBackToTop) return onBackToTop();
105
+ const behavior = window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth";
106
+ const box = scrollParent(root.current);
107
+ if (box) box.scrollTo({ top: 0, behavior });
108
+ else window.scrollTo({ top: 0, behavior });
109
+ };
110
+ const pill = /* @__PURE__ */ jsxs(Fragment, { children: [
111
+ /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "relative flex h-2 w-2", children: [
112
+ live && /* @__PURE__ */ jsx("span", { className: "aui-f28-ping absolute inset-0 rounded-full bg-brand" }),
113
+ /* @__PURE__ */ jsx("span", { className: cx("relative h-2 w-2 rounded-full", live ? "aui-f28-beat bg-brand" : "bg-ink") })
114
+ ] }),
115
+ status.label,
116
+ status.href && /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": true, className: cx("h-3 w-3 text-mute transition-transform duration-300 group-hover/st:translate-x-0.5", EASE), fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "m6 4 4 4-4 4" }) })
117
+ ] });
118
+ const pillClass = cx("group/st inline-flex items-center gap-2 rounded-[6px] text-[13px] font-medium text-ink", ring);
119
+ const shown = hover ?? null;
120
+ return /* @__PURE__ */ jsxs("footer", { ref: root, className: cx("@container w-full bg-paper px-6 pb-6 pt-12 @min-[720px]:px-10", className), children: [
121
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-10 @min-[640px]:grid-cols-[minmax(0,1fr)_minmax(0,1.3fr)] @min-[640px]:gap-10", children: [
122
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col items-start", children: [
123
+ /* @__PURE__ */ jsx("div", { className: "aui-f28-in", style: step(0), children: brand }),
124
+ /* @__PURE__ */ jsx("p", { className: "aui-f28-in mt-4 max-w-[30ch] text-[14px] leading-relaxed text-mute", style: step(1), children: tagline }),
125
+ /* @__PURE__ */ jsxs(
126
+ "div",
127
+ {
128
+ className: "aui-f28-in mt-6 w-full max-w-[340px] rounded-[12px] bg-paper p-4 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_1px_2px_rgb(0_0_0/0.04),0_14px_32px_-20px_rgb(0_0_0/0.25)]",
129
+ style: step(2),
130
+ children: [
131
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
132
+ status.href ? /* @__PURE__ */ jsx("a", { href: status.href, className: pillClass, children: pill }) : /* @__PURE__ */ jsx("span", { role: "status", className: pillClass, children: pill }),
133
+ /* @__PURE__ */ jsxs("span", { className: "font-mono text-[11px] tabular-nums text-mute", children: [
134
+ avg.toFixed(2),
135
+ "%"
136
+ ] })
137
+ ] }),
138
+ /* @__PURE__ */ jsxs("div", { className: "relative mt-4", onPointerLeave: () => setHover(null), children: [
139
+ /* @__PURE__ */ jsx("div", { "aria-hidden": true, className: "flex h-7 items-end gap-[2px]", children: uptime.map((v, i) => /* @__PURE__ */ jsx(
140
+ "span",
141
+ {
142
+ onPointerEnter: () => setHover(i),
143
+ className: cx(
144
+ "aui-f28-bar h-full flex-1 rounded-[2px] transition-opacity duration-200",
145
+ v >= 1 ? "bg-brand" : "bg-ink/35",
146
+ shown !== null && shown !== i && "opacity-40"
147
+ ),
148
+ style: step(i)
149
+ },
150
+ i
151
+ )) }),
152
+ /* @__PURE__ */ jsxs("p", { className: "sr-only", children: [
153
+ avg.toFixed(2),
154
+ "% uptime over the last ",
155
+ uptime.length,
156
+ " days"
157
+ ] }),
158
+ /* @__PURE__ */ jsxs("div", { "aria-hidden": true, className: "mt-2 flex justify-between font-mono text-[10.5px] text-mute", children: [
159
+ /* @__PURE__ */ jsxs("span", { className: cx("transition-opacity duration-200", shown !== null && "opacity-0"), children: [
160
+ uptime.length,
161
+ " days ago"
162
+ ] }),
163
+ /* @__PURE__ */ jsx(
164
+ "span",
165
+ {
166
+ className: cx(
167
+ "absolute left-1/2 -translate-x-1/2 text-ink transition-[opacity,transform] duration-300",
168
+ EASE,
169
+ shown !== null ? "translate-y-0 opacity-100" : "translate-y-1 opacity-0"
170
+ ),
171
+ children: shown !== null && `${dayLabel(uptime.length - 1 - shown)} \xB7 ${uptime[shown] >= 1 ? "No incidents" : `${(uptime[shown] * 100).toFixed(1)}% up`}`
172
+ }
173
+ ),
174
+ /* @__PURE__ */ jsx("span", { className: cx("transition-opacity duration-200", shown !== null && "opacity-0"), children: "Today" })
175
+ ] })
176
+ ] })
177
+ ]
178
+ }
179
+ )
180
+ ] }),
181
+ /* @__PURE__ */ jsx("nav", { "aria-label": "Footer", className: "grid grid-cols-2 gap-x-6 gap-y-8 @min-[460px]:grid-cols-3", children: columns.map((c, ci) => /* @__PURE__ */ jsxs("div", { className: "aui-f28-in", style: step(2 + ci), children: [
182
+ /* @__PURE__ */ jsx("p", { className: "font-mono text-[11px] uppercase tracking-[0.08em] text-mute", children: c.heading }),
183
+ /* @__PURE__ */ jsx("ul", { className: "mt-4 flex flex-col gap-2.5", children: c.links.map((l) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("a", { href: l.href, className: cx("inline-block rounded-[4px] text-[13.5px] text-ink-2 transition-[color,transform] duration-300 hover:translate-x-0.5 hover:text-ink motion-reduce:hover:translate-x-0", EASE, ring), children: l.label }) }, l.label)) })
184
+ ] }, c.heading)) })
185
+ ] }),
186
+ /* @__PURE__ */ jsxs("div", { className: "aui-f28-in mt-12 flex flex-col-reverse gap-4 @min-[600px]:flex-row @min-[600px]:items-center @min-[600px]:justify-between", style: step(6), children: [
187
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-x-5 gap-y-1.5 text-[12px] text-mute", children: legal ?? /* @__PURE__ */ jsxs(Fragment, { children: [
188
+ /* @__PURE__ */ jsxs("span", { children: [
189
+ "\xA9 ",
190
+ (/* @__PURE__ */ new Date()).getFullYear(),
191
+ " Astabyte"
192
+ ] }),
193
+ /* @__PURE__ */ jsx("a", { href: "#", className: cx("rounded-[4px] transition-colors hover:text-ink", ring), children: "Privacy" }),
194
+ /* @__PURE__ */ jsx("a", { href: "#", className: cx("rounded-[4px] transition-colors hover:text-ink", ring), children: "Terms" }),
195
+ /* @__PURE__ */ jsx("a", { href: "#", className: cx("rounded-[4px] transition-colors hover:text-ink", ring), children: "DPA" })
196
+ ] }) }),
197
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
198
+ /* @__PURE__ */ jsxs("div", { className: "relative min-w-0 flex-1 @min-[600px]:flex-none", children: [
199
+ /* @__PURE__ */ jsx("label", { htmlFor: langId, className: "sr-only", children: "Language" }),
200
+ /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", "aria-hidden": true, className: "pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-mute", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
201
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "5.8" }),
202
+ /* @__PURE__ */ jsx("path", { d: "M2.2 8h11.6M8 2.2c1.7 1.6 2.5 3.5 2.5 5.8S9.7 12.2 8 13.8M8 2.2C6.3 3.8 5.5 5.7 5.5 8s.8 4.2 2.5 5.8" })
203
+ ] }),
204
+ /* @__PURE__ */ jsx(
205
+ "select",
206
+ {
207
+ id: langId,
208
+ value: lang,
209
+ onChange: (e) => {
210
+ setOwn(e.target.value);
211
+ onLanguageChange?.(e.target.value);
212
+ },
213
+ className: cx("h-9 w-full cursor-pointer appearance-none rounded-[8px] bg-paper-2 pl-8 pr-8 text-[12.5px] text-ink transition-shadow duration-300 hover:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)]", ring),
214
+ children: languages.map((l) => /* @__PURE__ */ jsx("option", { value: l.value, children: l.label }, l.value))
215
+ }
216
+ ),
217
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": true, className: "pointer-events-none absolute right-2.5 top-1/2 h-3 w-3 -translate-y-1/2 text-mute", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "m4 6 4 4 4-4" }) })
218
+ ] }),
219
+ /* @__PURE__ */ jsxs(
220
+ "button",
221
+ {
222
+ type: "button",
223
+ onClick: toTop,
224
+ className: cx(
225
+ "group/top inline-flex h-9 shrink-0 items-center whitespace-nowrap gap-2 rounded-[8px] bg-ink pl-3 pr-3.5 text-[12.5px] font-medium text-paper transition-transform duration-300 hover:-translate-y-px active:scale-[.96] motion-reduce:transition-none",
226
+ EASE,
227
+ ring
228
+ ),
229
+ children: [
230
+ /* @__PURE__ */ jsx("span", { className: "relative grid h-3.5 w-3.5 place-items-center overflow-hidden", children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": true, className: cx("h-3.5 w-3.5", fly > 0 && "aui-f28-fly"), fill: "none", stroke: "currentColor", strokeWidth: "1.9", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M8 13V3M4 7l4-4 4 4" }) }, fly) }),
231
+ "Back to top"
232
+ ]
233
+ }
234
+ )
235
+ ] })
236
+ ] }),
237
+ /* @__PURE__ */ jsx("style", { href: "asta-footer-aui-028", precedence: "asta", children: CSS })
238
+ ] });
239
+ }
240
+ var footer_aui_028_default = StatusFooter;
241
+
242
+ export {
243
+ StatusFooter,
244
+ footer_aui_028_default
245
+ };
@@ -0,0 +1,220 @@
1
+ "use client";
2
+
3
+ // components/kit/variants/navbar-aui-014.tsx
4
+ import { useCallback, useEffect, useId, useRef, useState } from "react";
5
+ import { Fragment, 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 CSS = `
11
+ @keyframes aui-014-rise { from { opacity: 0; transform: translateY(6px); } }
12
+ @keyframes aui-014-drop { from { opacity: 0; transform: translateY(-8px); } }
13
+ .aui-014-in { animation: aui-014-rise .55s ${EASE} both; animation-delay: calc(var(--i, 0) * 50ms); }
14
+ .aui-014-sheet { animation: aui-014-drop .45s ${EASE} both; }
15
+ @media (prefers-reduced-motion: reduce) { .aui-014-m, .aui-014-m * { animation: none !important; transition-duration: 0s !important; } }
16
+ `;
17
+ var resolve = (r) => r && "current" in r ? r.current : r ?? null;
18
+ var at = (n) => ({ "--i": n });
19
+ var Logo = () => /* @__PURE__ */ jsxs(Fragment, { children: [
20
+ /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 20 20", className: "h-5 w-5", "aria-hidden": true, children: [
21
+ /* @__PURE__ */ jsx("path", { d: "M4 3.5h8.5a3.5 3.5 0 0 1 0 7H4Z", fill: "currentColor" }),
22
+ /* @__PURE__ */ jsx("path", { d: "M4 10.5h6a3 3 0 0 1 0 6H4Z", fill: "var(--brand)" })
23
+ ] }),
24
+ "Astabyte"
25
+ ] });
26
+ var LINKS = [
27
+ { label: "Essays", href: "#" },
28
+ { label: "Interviews", href: "#" },
29
+ { label: "Archive", href: "#" },
30
+ { label: "About", href: "#" }
31
+ ];
32
+ var Arrow = ({ className = "" }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: cx("h-3.5 w-3.5", className), fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3.5 8h9M9 4.5 12.5 8 9 11.5" }) });
33
+ function Digit({ d, show = true }) {
34
+ return /* @__PURE__ */ jsx("span", { className: cx("relative inline-block h-[1.2em] overflow-hidden transition-[width,opacity] duration-500", TW_EASE, show ? "w-[0.62em] opacity-100" : "w-0 opacity-0"), children: /* @__PURE__ */ jsx("span", { className: cx("absolute inset-x-0 top-0 flex flex-col transition-transform duration-500", TW_EASE), style: { transform: `translateY(${-d * 1.2}em)` }, children: Array.from({ length: 10 }, (_, n) => /* @__PURE__ */ jsx("span", { className: "block h-[1.2em] leading-[1.2em]", children: n }, n)) }) });
35
+ }
36
+ function Percent({ value }) {
37
+ const v = Math.max(0, Math.min(100, value));
38
+ return /* @__PURE__ */ jsx("span", { className: "inline-flex items-center font-mono text-[12px] tabular-nums", "aria-label": `${v}% read`, children: /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "inline-flex items-start leading-[1.2em]", children: [
39
+ /* @__PURE__ */ jsx(Digit, { d: 1, show: v === 100 }),
40
+ /* @__PURE__ */ jsx(Digit, { d: Math.floor(v / 10) % 10, show: v >= 10 }),
41
+ /* @__PURE__ */ jsx(Digit, { d: v % 10 }),
42
+ /* @__PURE__ */ jsx("span", { children: "%" })
43
+ ] }) });
44
+ }
45
+ function AutoHideNavbar({
46
+ brand = /* @__PURE__ */ jsx(Logo, {}),
47
+ brandHref = "/",
48
+ links = LINKS,
49
+ cta = { label: "Subscribe", href: "#" },
50
+ scrollRoot,
51
+ title,
52
+ titleAt = 280,
53
+ progress = true,
54
+ offset = 64,
55
+ className
56
+ }) {
57
+ const [hidden, setHidden] = useState(false);
58
+ const [reading, setReading] = useState(false);
59
+ const [pct, setPct] = useState(0);
60
+ const [sheet, setSheet] = useState(false);
61
+ const [focused, setFocused] = useState(false);
62
+ const root = useRef(null);
63
+ const bar = useRef(null);
64
+ const burger = useRef(null);
65
+ const id = useId();
66
+ useEffect(() => {
67
+ const el = resolve(scrollRoot);
68
+ const target = el ?? window;
69
+ const pos = () => el ? el.scrollTop : window.scrollY;
70
+ const max = () => el ? el.scrollHeight - el.clientHeight : document.documentElement.scrollHeight - window.innerHeight;
71
+ let prev = pos();
72
+ let frame = 0;
73
+ const update = () => {
74
+ frame = 0;
75
+ const y = pos();
76
+ const dy = y - prev;
77
+ if (Math.abs(dy) > 4) {
78
+ setHidden(dy > 0 && y > offset);
79
+ prev = y;
80
+ }
81
+ if (y <= offset) setHidden(false);
82
+ setReading(y > titleAt);
83
+ const m = max();
84
+ const p = m > 0 ? Math.min(1, Math.max(0, y / m)) : 0;
85
+ setPct(Math.round(p * 100));
86
+ if (bar.current) bar.current.style.transform = `scaleX(${p})`;
87
+ };
88
+ const onScroll = () => {
89
+ if (!frame) frame = requestAnimationFrame(update);
90
+ };
91
+ frame = requestAnimationFrame(update);
92
+ target.addEventListener("scroll", onScroll, { passive: true });
93
+ return () => {
94
+ target.removeEventListener("scroll", onScroll);
95
+ cancelAnimationFrame(frame);
96
+ };
97
+ }, [scrollRoot, offset, titleAt]);
98
+ const close = useCallback((focus) => {
99
+ setSheet(false);
100
+ if (focus) burger.current?.focus();
101
+ }, []);
102
+ useEffect(() => {
103
+ if (!sheet) return;
104
+ const down = (e) => !root.current?.contains(e.target) && close(false);
105
+ const key = (e) => e.key === "Escape" && close(true);
106
+ document.addEventListener("pointerdown", down);
107
+ document.addEventListener("keydown", key);
108
+ return () => {
109
+ document.removeEventListener("pointerdown", down);
110
+ document.removeEventListener("keydown", key);
111
+ };
112
+ }, [sheet, close]);
113
+ const away = hidden && !sheet && !focused;
114
+ const swap = Boolean(title) && reading;
115
+ return /* @__PURE__ */ jsxs(
116
+ "header",
117
+ {
118
+ ref: root,
119
+ onFocus: (e) => e.target.matches(":focus-visible") && setFocused(true),
120
+ onBlur: (e) => !e.currentTarget.contains(e.relatedTarget) && setFocused(false),
121
+ className: cx(
122
+ "aui-014-m @container sticky top-0 z-30 w-full bg-paper/88 backdrop-blur-xl transition-transform duration-500",
123
+ TW_EASE,
124
+ // Slide up but leave the 2px progress bar peeking at the top.
125
+ away ? progress ? "-translate-y-[calc(100%-2px)]" : "-translate-y-full" : "translate-y-0",
126
+ className
127
+ ),
128
+ children: [
129
+ /* @__PURE__ */ jsx("style", { href: "asta-navbar-aui-014", precedence: "asta", children: CSS }),
130
+ /* @__PURE__ */ jsxs("div", { className: "mx-auto flex h-14 max-w-[1120px] items-center gap-5 px-4", children: [
131
+ /* @__PURE__ */ jsx("a", { href: brandHref, style: at(0), className: cx("aui-014-in flex shrink-0 items-center gap-2 rounded-md text-[15px] font-semibold tracking-[-0.02em] text-ink", FOCUS), children: brand }),
132
+ /* @__PURE__ */ jsxs("div", { className: "relative min-w-0 flex-1 self-stretch", children: [
133
+ /* @__PURE__ */ jsx("nav", { "aria-label": "Main", "aria-hidden": swap || void 0, inert: swap || void 0, className: "absolute inset-0 hidden items-center @min-[640px]:flex", children: /* @__PURE__ */ jsx("ul", { className: "flex items-center gap-px", children: links.map((l, n) => /* @__PURE__ */ jsx("li", { className: "aui-014-in", style: at(n + 1), children: /* @__PURE__ */ jsx(
134
+ "a",
135
+ {
136
+ href: l.href,
137
+ style: { transitionDelay: swap ? `${n * 30}ms` : `${120 + n * 40}ms` },
138
+ className: cx(
139
+ "flex h-8 items-center rounded-lg px-2.5 text-[14px] font-medium text-ink/70 transition-[color,background-color,opacity,transform] duration-500 hover:bg-paper-2 hover:text-ink",
140
+ TW_EASE,
141
+ FOCUS,
142
+ swap ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
143
+ ),
144
+ children: l.label
145
+ }
146
+ ) }, l.label)) }) }),
147
+ title && /* @__PURE__ */ jsxs(
148
+ "div",
149
+ {
150
+ "aria-hidden": !swap || void 0,
151
+ className: cx(
152
+ "absolute inset-0 flex items-center gap-3 transition-[opacity,transform] duration-500",
153
+ TW_EASE,
154
+ swap ? "translate-y-0 opacity-100 delay-150" : "pointer-events-none translate-y-2 opacity-0"
155
+ ),
156
+ children: [
157
+ /* @__PURE__ */ jsx("span", { className: "hidden shrink-0 font-mono text-[10.5px] uppercase tracking-[0.08em] text-mute @min-[480px]:inline", children: "Reading" }),
158
+ /* @__PURE__ */ jsx("span", { className: "truncate text-[14px] font-medium tracking-[-0.01em] text-ink", children: title }),
159
+ /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 rounded-[6px] bg-paper-2 px-1.5 py-0.5 text-ink-2 @min-[640px]:ml-0", children: /* @__PURE__ */ jsx(Percent, { value: pct }) })
160
+ ]
161
+ }
162
+ )
163
+ ] }),
164
+ /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1.5", children: [
165
+ /* @__PURE__ */ jsxs(
166
+ "a",
167
+ {
168
+ href: cta.href,
169
+ style: at(links.length + 1),
170
+ className: cx(
171
+ "aui-014-in group/cta hidden h-8 items-center gap-1 rounded-lg bg-ink pl-3 pr-2.5 text-[13px] font-medium text-paper transition-transform duration-300 hover:-translate-y-px active:translate-y-0 active:scale-[.97] @min-[640px]:inline-flex",
172
+ "focus-visible:ring-offset-2 focus-visible:ring-offset-paper",
173
+ TW_EASE,
174
+ FOCUS
175
+ ),
176
+ children: [
177
+ cta.label,
178
+ /* @__PURE__ */ jsx(Arrow, { className: cx("transition-transform duration-300 group-hover/cta:translate-x-0.5", TW_EASE) })
179
+ ]
180
+ }
181
+ ),
182
+ /* @__PURE__ */ jsxs(
183
+ "button",
184
+ {
185
+ ref: burger,
186
+ type: "button",
187
+ "aria-label": sheet ? "Close menu" : "Open menu",
188
+ "aria-expanded": sheet,
189
+ "aria-controls": id,
190
+ onClick: () => setSheet((v) => !v),
191
+ className: cx("relative flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-paper-2 @min-[640px]:hidden", FOCUS),
192
+ children: [
193
+ /* @__PURE__ */ jsx("span", { className: cx("absolute h-[1.5px] w-[18px] rounded-full bg-ink transition-transform duration-500", TW_EASE, sheet ? "rotate-45" : "-translate-y-1") }),
194
+ /* @__PURE__ */ jsx("span", { className: cx("absolute h-[1.5px] w-[18px] rounded-full bg-ink transition-transform duration-500", TW_EASE, sheet ? "-rotate-45" : "translate-y-1") })
195
+ ]
196
+ }
197
+ )
198
+ ] })
199
+ ] }),
200
+ progress && /* @__PURE__ */ jsx("div", { "aria-hidden": true, className: "h-[2px] w-full bg-[color-mix(in_srgb,var(--ink)_6%,transparent)]", children: /* @__PURE__ */ jsx("span", { ref: bar, style: { transform: "scaleX(0)" }, className: "block h-full w-full origin-left rounded-r-full bg-brand shadow-[0_0_10px_color-mix(in_srgb,var(--brand)_60%,transparent)]" }) }),
201
+ sheet && /* @__PURE__ */ jsxs("div", { id, className: "aui-014-sheet absolute inset-x-0 top-full bg-paper px-5 pb-6 pt-2 shadow-[0_24px_40px_-24px_rgb(0_0_0/0.3)] @min-[640px]:hidden", children: [
202
+ /* @__PURE__ */ jsx("ul", { className: "flex flex-col", children: links.map((l, n) => /* @__PURE__ */ jsx("li", { className: "aui-014-in", style: at(n), children: /* @__PURE__ */ jsxs("a", { href: l.href, onClick: () => close(false), className: cx("group/s flex h-12 items-center justify-between rounded-[10px] text-[20px] font-medium tracking-[-0.03em] text-ink", FOCUS), children: [
203
+ l.label,
204
+ /* @__PURE__ */ jsx(Arrow, { className: "h-4 w-4 text-mute transition-transform duration-300 group-hover/s:translate-x-0.5" })
205
+ ] }) }, l.label)) }),
206
+ /* @__PURE__ */ jsxs("a", { href: cta.href, style: at(links.length), className: cx("aui-014-in mt-4 flex h-10 items-center justify-center gap-1.5 rounded-lg bg-ink text-[14px] font-medium text-paper", FOCUS), children: [
207
+ cta.label,
208
+ /* @__PURE__ */ jsx(Arrow, {})
209
+ ] })
210
+ ] })
211
+ ]
212
+ }
213
+ );
214
+ }
215
+ var navbar_aui_014_default = AutoHideNavbar;
216
+
217
+ export {
218
+ AutoHideNavbar,
219
+ navbar_aui_014_default
220
+ };