@naeil/ui 0.1.0 → 0.3.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.
- package/CHANGELOG.md +18 -0
- package/DESIGN.md +186 -0
- package/LICENSE +21 -0
- package/README.md +85 -22
- package/THIRD_PARTY_NOTICES.md +49 -0
- package/dist/chunk-JBTDRVZ7.js +46 -0
- package/dist/chunk-QKVN6Q6C.js +438 -0
- package/dist/components/index.d.ts +87 -0
- package/dist/components/index.js +832 -0
- package/dist/components/ui/index.d.ts +105 -0
- package/dist/components/ui/index.js +736 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +7 -0
- package/dist/source/components/footer.d.ts +15 -0
- package/dist/source/components/footer.js +172 -0
- package/dist/source/components/index.d.ts +11 -0
- package/dist/source/components/index.js +26 -0
- package/dist/source/components/locale-switcher.d.ts +17 -0
- package/dist/source/components/locale-switcher.js +66 -0
- package/dist/source/components/logo.d.ts +9 -0
- package/dist/source/components/logo.js +52 -0
- package/dist/source/components/nav.d.ts +39 -0
- package/dist/source/components/nav.js +412 -0
- package/dist/source/components/theme-provider.d.ts +6 -0
- package/dist/source/components/theme-provider.js +45 -0
- package/dist/source/components/theme-toggle-icon.d.ts +5 -0
- package/dist/source/components/theme-toggle-icon.js +62 -0
- package/dist/source/components/theme-toggle.d.ts +5 -0
- package/dist/source/components/theme-toggle.js +34 -0
- package/dist/source/components/typography.d.ts +12 -0
- package/dist/source/components/typography.js +49 -0
- package/dist/source/components/ui/avatar.d.ts +14 -0
- package/dist/source/components/ui/avatar.js +137 -0
- package/dist/source/components/ui/badge.d.ts +13 -0
- package/dist/source/components/ui/badge.js +76 -0
- package/dist/source/components/ui/button.d.ts +14 -0
- package/dist/source/components/ui/button.js +88 -0
- package/dist/source/components/ui/card.d.ts +13 -0
- package/dist/source/components/ui/card.js +135 -0
- package/dist/source/components/ui/checkbox.d.ts +7 -0
- package/dist/source/components/ui/checkbox.js +58 -0
- package/dist/source/components/ui/dialog.d.ts +20 -0
- package/dist/source/components/ui/dialog.js +182 -0
- package/dist/source/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/source/components/ui/dropdown-menu.js +282 -0
- package/dist/source/components/ui/index.d.ts +19 -0
- package/dist/source/components/ui/index.js +131 -0
- package/dist/source/components/ui/input.d.ts +6 -0
- package/dist/source/components/ui/input.js +49 -0
- package/dist/source/components/ui/select.d.ts +16 -0
- package/dist/source/components/ui/select.js +197 -0
- package/dist/source/components/ui/sonner.d.ts +6 -0
- package/dist/source/components/ui/sonner.js +80 -0
- package/dist/source/components/ui/switch.d.ts +7 -0
- package/dist/source/components/ui/switch.js +54 -0
- package/dist/source/components/ui/tabs.d.ts +10 -0
- package/dist/source/components/ui/tabs.js +57 -0
- package/dist/source/components/ui/textarea.d.ts +6 -0
- package/dist/source/components/ui/textarea.js +46 -0
- package/dist/source/i18n/config.d.ts +6 -0
- package/dist/source/i18n/config.js +12 -0
- package/dist/source/i18n/routing.d.ts +371 -0
- package/dist/source/i18n/routing.js +17 -0
- package/dist/source/lib/design/modal-inert.d.ts +6 -0
- package/dist/source/lib/design/modal-inert.js +73 -0
- package/dist/source/lib/utils.d.ts +5 -0
- package/dist/source/lib/utils.js +8 -0
- package/dist/tokens.ts +217 -0
- package/docs/components/README.md +21 -0
- package/docs/components/avatar.md +47 -0
- package/docs/components/badge.md +29 -0
- package/docs/components/button.md +39 -0
- package/docs/components/card.md +32 -0
- package/docs/components/checkbox.md +35 -0
- package/docs/components/common.md +31 -0
- package/docs/components/composition.md +68 -0
- package/docs/components/dialog.md +41 -0
- package/docs/components/dropdown-menu.md +38 -0
- package/docs/components/input.md +32 -0
- package/docs/components/select.md +39 -0
- package/docs/components/sonner.md +37 -0
- package/docs/components/switch.md +33 -0
- package/docs/components/tabs.md +40 -0
- package/docs/components/textarea.md +35 -0
- package/docs/design/component-demand.md +30 -0
- package/docs/design/public-ui-final-verification.md +96 -0
- package/docs/design/public-ui-release-validation.md +86 -0
- package/docs/design/public-ui-stage3-verification.md +98 -0
- package/docs/design/public-ui-stage4-verification.md +129 -0
- package/docs/design/public-ui-support.md +40 -0
- package/docs/design/v2-migration.md +199 -0
- package/docs/package-release.md +89 -0
- package/licenses/Noto-Sans-JP-OFL.txt +93 -0
- package/licenses/Nunito-Sans-OFL.txt +93 -0
- package/licenses/Pretendard-OFL.txt +94 -0
- package/licenses/React-MIT.txt +21 -0
- package/licenses/Storybook-MIT.txt +21 -0
- package/licenses/popper-MIT.txt +25 -0
- package/licenses/react-remove-scroll-bar-MIT.txt +21 -0
- package/licenses/store2-MIT.txt +22 -0
- package/licenses/toggle-selection-MIT.txt +21 -0
- package/package.json +215 -26
- package/src/styles/components.css +276 -0
- package/src/styles/globals.css +18 -0
- package/src/styles/theme.css +293 -0
- package/messages/en.json +0 -221
- package/messages/ja.json +0 -221
- package/messages/ko.json +0 -221
- package/postcss.config.mjs +0 -7
- package/src/app/[locale]/(content)/baby-agent/page.tsx +0 -30
- package/src/app/[locale]/(content)/blog/page.tsx +0 -68
- package/src/app/[locale]/(content)/cc/page.tsx +0 -216
- package/src/app/[locale]/(content)/design/page.tsx +0 -703
- package/src/app/[locale]/(content)/layout.tsx +0 -7
- package/src/app/[locale]/(content)/pkm/page.tsx +0 -31
- package/src/app/[locale]/(content)/projects/page.tsx +0 -100
- package/src/app/[locale]/(content)/sa/page.tsx +0 -179
- package/src/app/[locale]/(landing)/page.tsx +0 -157
- package/src/app/[locale]/layout.tsx +0 -72
- package/src/app/[locale]/login/actions.ts +0 -10
- package/src/app/[locale]/login/oauth-buttons.tsx +0 -78
- package/src/app/[locale]/login/page.tsx +0 -85
- package/src/app/auth/callback/route.ts +0 -78
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +0 -32
- package/src/app/layout.tsx +0 -22
- package/src/app/sitemap.ts +0 -26
- package/src/components/accent-picker.tsx +0 -62
- package/src/components/auth-slot.tsx +0 -96
- package/src/components/footer-wrapper.tsx +0 -8
- package/src/components/footer.tsx +0 -193
- package/src/components/hero-scene.tsx +0 -948
- package/src/components/hero-section.tsx +0 -57
- package/src/components/locale-switcher.tsx +0 -74
- package/src/components/logo.tsx +0 -51
- package/src/components/nav-server-wrapper.tsx +0 -22
- package/src/components/nav-wrapper.tsx +0 -45
- package/src/components/nav.tsx +0 -550
- package/src/components/paraglider-cursor.tsx +0 -112
- package/src/components/project-layout.tsx +0 -194
- package/src/components/theme-provider.tsx +0 -10
- package/src/components/theme-toggle-icon.tsx +0 -62
- package/src/components/theme-toggle.tsx +0 -39
- package/src/components/typography.tsx +0 -27
- package/src/components/ui/avatar.tsx +0 -109
- package/src/components/ui/badge.tsx +0 -47
- package/src/components/ui/button.tsx +0 -65
- package/src/components/ui/card.tsx +0 -106
- package/src/components/ui/dialog.tsx +0 -158
- package/src/components/ui/dropdown-menu.tsx +0 -257
- package/src/components/ui/input.tsx +0 -21
- package/src/components/ui/sonner.tsx +0 -54
- package/src/components/workflow-diagram.tsx +0 -414
- package/src/i18n/config.ts +0 -8
- package/src/i18n/request.ts +0 -16
- package/src/i18n/routing.ts +0 -12
- package/src/lib/supabase/client.ts +0 -18
- package/src/lib/supabase/middleware.ts +0 -42
- package/src/lib/supabase/server.ts +0 -37
- package/src/lib/utils.ts +0 -6
- package/src/proxy.ts +0 -62
- package/src/tokens/.gitkeep +0 -0
- package/src/tokens/color.json +0 -56
- package/src/tokens/radius.json +0 -9
- package/src/tokens/semantic.json +0 -81
- package/src/tokens/shadow.json +0 -7
- package/src/tokens/spacing.json +0 -16
- package/src/tokens/typography.json +0 -34
- package/src/types/i18n.d.ts +0 -6
- package/src/utils/.gitkeep +0 -0
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { Badge } from "./ui/badge.js";
|
|
6
|
+
import Image from "next/image";
|
|
7
|
+
const PROJECTS = [
|
|
8
|
+
{
|
|
9
|
+
key: "cc",
|
|
10
|
+
href: "/cc",
|
|
11
|
+
accent: "oklch(0.704 0.140 181)",
|
|
12
|
+
icon: "/images/coral.png",
|
|
13
|
+
status: "active"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
key: "pkm",
|
|
17
|
+
href: "/pkm",
|
|
18
|
+
accent: "oklch(0.702 0.183 293)",
|
|
19
|
+
icon: "/images/jellyfish.png",
|
|
20
|
+
status: "coming"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
key: "naeilUi",
|
|
24
|
+
href: "/design",
|
|
25
|
+
accent: "oklch(0.623 0.214 259)",
|
|
26
|
+
icon: "/images/whale.png",
|
|
27
|
+
status: "active"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
key: "sa",
|
|
31
|
+
href: "/sa",
|
|
32
|
+
accent: "oklch(0.723 0.219 149)",
|
|
33
|
+
icon: "/images/fish.png",
|
|
34
|
+
status: "active"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
key: "babyAgent",
|
|
38
|
+
href: "/baby-agent",
|
|
39
|
+
accent: "oklch(0.769 0.188 70.08)",
|
|
40
|
+
icon: "/images/turtle.png",
|
|
41
|
+
status: "coming"
|
|
42
|
+
}
|
|
43
|
+
];
|
|
44
|
+
function Nav({
|
|
45
|
+
Link,
|
|
46
|
+
usePathname,
|
|
47
|
+
brandHref = "/",
|
|
48
|
+
brandExternal = false,
|
|
49
|
+
brandSlot,
|
|
50
|
+
projectsExternal = false,
|
|
51
|
+
externalBaseUrl = "https://naeil.dev",
|
|
52
|
+
currentProjectKey,
|
|
53
|
+
currentProjectHref,
|
|
54
|
+
subNav,
|
|
55
|
+
authSlot,
|
|
56
|
+
showProjects = true,
|
|
57
|
+
showBlog = true,
|
|
58
|
+
toolbarSlot
|
|
59
|
+
}) {
|
|
60
|
+
const t = useTranslations("nav");
|
|
61
|
+
const pt = useTranslations("projects");
|
|
62
|
+
const pathname = usePathname();
|
|
63
|
+
const [scrolled, setScrolled] = useState(false);
|
|
64
|
+
const [mobileOpen, setMobileOpen] = useState(false);
|
|
65
|
+
const [projectsOpen, setProjectsOpen] = useState(false);
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
const onScroll = () => setScrolled(window.scrollY > 16);
|
|
68
|
+
window.addEventListener("scroll", onScroll, { passive: true });
|
|
69
|
+
return () => window.removeEventListener("scroll", onScroll);
|
|
70
|
+
}, []);
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
setMobileOpen(false);
|
|
73
|
+
setProjectsOpen(false);
|
|
74
|
+
}, [pathname]);
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
document.body.style.overflow = mobileOpen ? "hidden" : "";
|
|
77
|
+
return () => {
|
|
78
|
+
document.body.style.overflow = "";
|
|
79
|
+
};
|
|
80
|
+
}, [mobileOpen]);
|
|
81
|
+
const linkClass = (href) => {
|
|
82
|
+
const isActive = pathname === href;
|
|
83
|
+
return [
|
|
84
|
+
"text-sm font-medium transition-colors",
|
|
85
|
+
isActive ? "text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
86
|
+
].join(" ");
|
|
87
|
+
};
|
|
88
|
+
const isProjectActive = pathname.startsWith("/projects") || pathname.startsWith("/cc") || pathname.startsWith("/pkm") || pathname.startsWith("/sa") || pathname.startsWith("/design");
|
|
89
|
+
function getProjectLink(project) {
|
|
90
|
+
if (currentProjectKey && project.key === currentProjectKey) {
|
|
91
|
+
return { href: currentProjectHref || "/", external: false };
|
|
92
|
+
}
|
|
93
|
+
if (projectsExternal) {
|
|
94
|
+
return { href: `${externalBaseUrl}${project.href}`, external: true };
|
|
95
|
+
}
|
|
96
|
+
return { href: project.href, external: false };
|
|
97
|
+
}
|
|
98
|
+
const brandContent = brandSlot != null ? brandSlot : /* @__PURE__ */ jsxs("span", { className: "text-foreground flex items-center gap-3 text-xl font-semibold tracking-tight", children: [
|
|
99
|
+
/* @__PURE__ */ jsx(Logo, { size: 28 }),
|
|
100
|
+
".naeil"
|
|
101
|
+
] });
|
|
102
|
+
const brandElement = brandExternal ? /* @__PURE__ */ jsx("a", { href: brandHref, children: brandContent }) : /* @__PURE__ */ jsx(Link, { href: brandHref, children: brandContent });
|
|
103
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
104
|
+
/* @__PURE__ */ jsx(
|
|
105
|
+
"nav",
|
|
106
|
+
{
|
|
107
|
+
className: [
|
|
108
|
+
"fixed top-0 z-50 w-full transition-[background-color,border-color] duration-300",
|
|
109
|
+
scrolled || mobileOpen ? "border-b border-border/40 bg-background/80 backdrop-blur-md" : "border-b border-transparent bg-transparent"
|
|
110
|
+
].join(" "),
|
|
111
|
+
children: /* @__PURE__ */ jsxs("div", { className: "mx-auto flex h-[58px] max-w-7xl items-center px-6", children: [
|
|
112
|
+
/* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center md:w-[200px]", children: brandElement }),
|
|
113
|
+
/* @__PURE__ */ jsxs("div", { className: "hidden flex-1 items-center gap-6 md:flex", children: [
|
|
114
|
+
showProjects && /* @__PURE__ */ jsxs("div", { className: "group relative", children: [
|
|
115
|
+
/* @__PURE__ */ jsxs(
|
|
116
|
+
"button",
|
|
117
|
+
{
|
|
118
|
+
className: [
|
|
119
|
+
"text-sm font-medium transition-colors",
|
|
120
|
+
isProjectActive ? "text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
121
|
+
].join(" "),
|
|
122
|
+
children: [
|
|
123
|
+
t("projects"),
|
|
124
|
+
/* @__PURE__ */ jsx(
|
|
125
|
+
"svg",
|
|
126
|
+
{
|
|
127
|
+
width: "10",
|
|
128
|
+
height: "10",
|
|
129
|
+
viewBox: "0 0 24 24",
|
|
130
|
+
fill: "none",
|
|
131
|
+
stroke: "currentColor",
|
|
132
|
+
strokeWidth: "2",
|
|
133
|
+
strokeLinecap: "round",
|
|
134
|
+
strokeLinejoin: "round",
|
|
135
|
+
className: "ml-1 inline-block transition-transform group-hover:rotate-180",
|
|
136
|
+
children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6" })
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
),
|
|
142
|
+
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute left-0 top-full pt-3 opacity-0 transition-opacity duration-150 group-hover:pointer-events-auto group-hover:opacity-100", children: /* @__PURE__ */ jsx("div", { className: "border-border/40 bg-background/95 w-[520px] rounded-xl border p-4 shadow-xl backdrop-blur-md", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-1", children: PROJECTS.map((project) => {
|
|
143
|
+
const { href, external } = getProjectLink(project);
|
|
144
|
+
const inner = /* @__PURE__ */ jsxs("div", { className: "hover:bg-muted/50 flex items-start gap-3.5 rounded-lg px-3 py-3 transition-colors", children: [
|
|
145
|
+
/* @__PURE__ */ jsx(
|
|
146
|
+
"div",
|
|
147
|
+
{
|
|
148
|
+
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border",
|
|
149
|
+
style: {
|
|
150
|
+
borderColor: `color-mix(in oklch, ${project.accent} 30%, transparent)`,
|
|
151
|
+
backgroundColor: `color-mix(in oklch, ${project.accent} 8%, transparent)`
|
|
152
|
+
},
|
|
153
|
+
children: /* @__PURE__ */ jsx(
|
|
154
|
+
Image,
|
|
155
|
+
{
|
|
156
|
+
src: project.icon,
|
|
157
|
+
alt: "",
|
|
158
|
+
width: 24,
|
|
159
|
+
height: 24,
|
|
160
|
+
className: "object-contain"
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
),
|
|
165
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 pt-0.5", children: [
|
|
166
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
167
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground text-sm font-medium", children: pt(`${project.key}.name`) }),
|
|
168
|
+
project.status === "coming" && /* @__PURE__ */ jsx(
|
|
169
|
+
Badge,
|
|
170
|
+
{
|
|
171
|
+
variant: "outline",
|
|
172
|
+
className: "text-muted-foreground px-1 py-0 text-[9px]",
|
|
173
|
+
children: pt("status.coming")
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
] }),
|
|
177
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-0.5 text-xs leading-snug", children: pt(`${project.key}.description`) })
|
|
178
|
+
] })
|
|
179
|
+
] });
|
|
180
|
+
if (external) {
|
|
181
|
+
return /* @__PURE__ */ jsx("a", { href, children: inner }, project.key);
|
|
182
|
+
}
|
|
183
|
+
return /* @__PURE__ */ jsx(Link, { href, children: inner }, project.key);
|
|
184
|
+
}) }) }) })
|
|
185
|
+
] }),
|
|
186
|
+
showBlog && /* @__PURE__ */ jsx(Fragment, { children: projectsExternal ? /* @__PURE__ */ jsx(
|
|
187
|
+
"a",
|
|
188
|
+
{
|
|
189
|
+
href: `${externalBaseUrl}/blog`,
|
|
190
|
+
className: "text-sm font-medium text-muted-foreground transition-colors hover:text-foreground",
|
|
191
|
+
children: t("blog")
|
|
192
|
+
}
|
|
193
|
+
) : /* @__PURE__ */ jsx(Link, { href: "/blog", className: linkClass("/blog"), children: t("blog") }) }),
|
|
194
|
+
subNav && subNav.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
195
|
+
/* @__PURE__ */ jsx("div", { className: "h-4 w-px bg-border/40" }),
|
|
196
|
+
subNav.map((item) => /* @__PURE__ */ jsx(
|
|
197
|
+
Link,
|
|
198
|
+
{
|
|
199
|
+
href: item.href,
|
|
200
|
+
className: linkClass(item.href),
|
|
201
|
+
children: item.label
|
|
202
|
+
},
|
|
203
|
+
item.href
|
|
204
|
+
))
|
|
205
|
+
] })
|
|
206
|
+
] }),
|
|
207
|
+
/* @__PURE__ */ jsxs("div", { className: "hidden items-center gap-3 md:flex", children: [
|
|
208
|
+
authSlot,
|
|
209
|
+
authSlot && toolbarSlot && /* @__PURE__ */ jsx("div", { className: "h-4 w-px bg-border/40" }),
|
|
210
|
+
toolbarSlot && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-4", children: toolbarSlot })
|
|
211
|
+
] }),
|
|
212
|
+
/* @__PURE__ */ jsx(
|
|
213
|
+
"button",
|
|
214
|
+
{
|
|
215
|
+
className: "text-muted-foreground hover:text-foreground ml-auto transition-colors md:hidden",
|
|
216
|
+
onClick: () => setMobileOpen(!mobileOpen),
|
|
217
|
+
"aria-label": "Menu",
|
|
218
|
+
children: mobileOpen ? /* @__PURE__ */ jsx(CloseIcon, {}) : /* @__PURE__ */ jsx(MenuIcon, {})
|
|
219
|
+
}
|
|
220
|
+
)
|
|
221
|
+
] })
|
|
222
|
+
}
|
|
223
|
+
),
|
|
224
|
+
mobileOpen && /* @__PURE__ */ jsx("div", { className: "bg-background/95 fixed inset-0 z-40 overflow-y-auto pt-[58px] backdrop-blur-md md:hidden", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col px-6 py-6", children: [
|
|
225
|
+
showProjects && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
226
|
+
/* @__PURE__ */ jsxs(
|
|
227
|
+
"button",
|
|
228
|
+
{
|
|
229
|
+
className: "text-foreground flex items-center justify-between py-3 text-base font-medium",
|
|
230
|
+
onClick: () => setProjectsOpen(!projectsOpen),
|
|
231
|
+
children: [
|
|
232
|
+
t("projects"),
|
|
233
|
+
/* @__PURE__ */ jsx(
|
|
234
|
+
"svg",
|
|
235
|
+
{
|
|
236
|
+
width: "14",
|
|
237
|
+
height: "14",
|
|
238
|
+
viewBox: "0 0 24 24",
|
|
239
|
+
fill: "none",
|
|
240
|
+
stroke: "currentColor",
|
|
241
|
+
strokeWidth: "2",
|
|
242
|
+
strokeLinecap: "round",
|
|
243
|
+
strokeLinejoin: "round",
|
|
244
|
+
className: [
|
|
245
|
+
"transition-transform duration-200",
|
|
246
|
+
projectsOpen ? "rotate-180" : ""
|
|
247
|
+
].join(" "),
|
|
248
|
+
children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6" })
|
|
249
|
+
}
|
|
250
|
+
)
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
),
|
|
254
|
+
projectsOpen && /* @__PURE__ */ jsx("div", { className: "mb-2 flex flex-col gap-1 pl-1", children: PROJECTS.map((project) => {
|
|
255
|
+
const { href, external } = getProjectLink(project);
|
|
256
|
+
const inner = /* @__PURE__ */ jsxs("div", { className: "hover:bg-muted/50 flex items-center gap-3 rounded-lg px-3 py-3 transition-colors", children: [
|
|
257
|
+
/* @__PURE__ */ jsx(
|
|
258
|
+
"div",
|
|
259
|
+
{
|
|
260
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border",
|
|
261
|
+
style: {
|
|
262
|
+
borderColor: `color-mix(in oklch, ${project.accent} 30%, transparent)`,
|
|
263
|
+
backgroundColor: `color-mix(in oklch, ${project.accent} 8%, transparent)`
|
|
264
|
+
},
|
|
265
|
+
children: /* @__PURE__ */ jsx(
|
|
266
|
+
Image,
|
|
267
|
+
{
|
|
268
|
+
src: project.icon,
|
|
269
|
+
alt: "",
|
|
270
|
+
width: 20,
|
|
271
|
+
height: 20,
|
|
272
|
+
className: "object-contain"
|
|
273
|
+
}
|
|
274
|
+
)
|
|
275
|
+
}
|
|
276
|
+
),
|
|
277
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
278
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground text-sm font-medium", children: pt(`${project.key}.name`) }),
|
|
279
|
+
project.status === "coming" && /* @__PURE__ */ jsx(
|
|
280
|
+
Badge,
|
|
281
|
+
{
|
|
282
|
+
variant: "outline",
|
|
283
|
+
className: "text-muted-foreground ml-2 px-1 py-0 text-[9px]",
|
|
284
|
+
children: pt("status.coming")
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
] })
|
|
288
|
+
] });
|
|
289
|
+
if (external) {
|
|
290
|
+
return /* @__PURE__ */ jsx(
|
|
291
|
+
"a",
|
|
292
|
+
{
|
|
293
|
+
href,
|
|
294
|
+
onClick: () => setMobileOpen(false),
|
|
295
|
+
children: inner
|
|
296
|
+
},
|
|
297
|
+
project.key
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
return /* @__PURE__ */ jsx(
|
|
301
|
+
Link,
|
|
302
|
+
{
|
|
303
|
+
href,
|
|
304
|
+
onClick: () => setMobileOpen(false),
|
|
305
|
+
children: inner
|
|
306
|
+
},
|
|
307
|
+
project.key
|
|
308
|
+
);
|
|
309
|
+
}) })
|
|
310
|
+
] }),
|
|
311
|
+
showBlog && /* @__PURE__ */ jsx(Fragment, { children: projectsExternal ? /* @__PURE__ */ jsx(
|
|
312
|
+
"a",
|
|
313
|
+
{
|
|
314
|
+
href: `${externalBaseUrl}/blog`,
|
|
315
|
+
className: "text-foreground border-border/40 border-t py-3 text-base font-medium",
|
|
316
|
+
onClick: () => setMobileOpen(false),
|
|
317
|
+
children: t("blog")
|
|
318
|
+
}
|
|
319
|
+
) : /* @__PURE__ */ jsx(
|
|
320
|
+
Link,
|
|
321
|
+
{
|
|
322
|
+
href: "/blog",
|
|
323
|
+
className: "text-foreground border-border/40 border-t py-3 text-base font-medium",
|
|
324
|
+
onClick: () => setMobileOpen(false),
|
|
325
|
+
children: t("blog")
|
|
326
|
+
}
|
|
327
|
+
) }),
|
|
328
|
+
subNav && subNav.length > 0 && /* @__PURE__ */ jsx("div", { className: "border-border/40 border-t", children: subNav.map((item) => /* @__PURE__ */ jsx(
|
|
329
|
+
Link,
|
|
330
|
+
{
|
|
331
|
+
href: item.href,
|
|
332
|
+
className: "text-foreground block py-3 text-base font-medium",
|
|
333
|
+
onClick: () => setMobileOpen(false),
|
|
334
|
+
children: item.label
|
|
335
|
+
},
|
|
336
|
+
item.href
|
|
337
|
+
)) }),
|
|
338
|
+
authSlot && /* @__PURE__ */ jsx("div", { className: "border-border/40 border-t pt-4", children: authSlot }),
|
|
339
|
+
toolbarSlot && /* @__PURE__ */ jsx("div", { className: "border-border/40 flex items-center gap-4 border-t pt-4 mt-2", children: toolbarSlot })
|
|
340
|
+
] }) })
|
|
341
|
+
] });
|
|
342
|
+
}
|
|
343
|
+
function Logo({
|
|
344
|
+
size = 20
|
|
345
|
+
}) {
|
|
346
|
+
const id = `naeil-nav-logo-${size}`;
|
|
347
|
+
return /* @__PURE__ */ jsxs(
|
|
348
|
+
"svg",
|
|
349
|
+
{
|
|
350
|
+
width: size,
|
|
351
|
+
height: size,
|
|
352
|
+
viewBox: "0 0 24 24",
|
|
353
|
+
fill: "none",
|
|
354
|
+
"aria-label": "naeil",
|
|
355
|
+
children: [
|
|
356
|
+
/* @__PURE__ */ jsx(
|
|
357
|
+
"path",
|
|
358
|
+
{
|
|
359
|
+
d: "M6 4 L6 16 L20 16",
|
|
360
|
+
stroke: "currentColor",
|
|
361
|
+
strokeWidth: "2",
|
|
362
|
+
strokeLinecap: "square",
|
|
363
|
+
strokeLinejoin: "miter"
|
|
364
|
+
}
|
|
365
|
+
),
|
|
366
|
+
/* @__PURE__ */ jsx("circle", { cx: "15", cy: "16", r: "3.5", fill: `url(#${id}-grad)`, mask: `url(#${id})` }),
|
|
367
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
368
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: `${id}-grad`, x1: "15", y1: "12.5", x2: "15", y2: "16", children: [
|
|
369
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#eab308" }),
|
|
370
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#dc2626" })
|
|
371
|
+
] }),
|
|
372
|
+
/* @__PURE__ */ jsx("mask", { id, children: /* @__PURE__ */ jsx("rect", { x: "0", y: "0", width: "24", height: "16", fill: "white" }) })
|
|
373
|
+
] })
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
function MenuIcon() {
|
|
379
|
+
return /* @__PURE__ */ jsx(
|
|
380
|
+
"svg",
|
|
381
|
+
{
|
|
382
|
+
width: "22",
|
|
383
|
+
height: "22",
|
|
384
|
+
viewBox: "0 0 24 24",
|
|
385
|
+
fill: "none",
|
|
386
|
+
stroke: "currentColor",
|
|
387
|
+
strokeWidth: "1.5",
|
|
388
|
+
strokeLinecap: "round",
|
|
389
|
+
strokeLinejoin: "round",
|
|
390
|
+
children: /* @__PURE__ */ jsx("path", { d: "M4 6h16M4 12h16M4 18h16" })
|
|
391
|
+
}
|
|
392
|
+
);
|
|
393
|
+
}
|
|
394
|
+
function CloseIcon() {
|
|
395
|
+
return /* @__PURE__ */ jsx(
|
|
396
|
+
"svg",
|
|
397
|
+
{
|
|
398
|
+
width: "22",
|
|
399
|
+
height: "22",
|
|
400
|
+
viewBox: "0 0 24 24",
|
|
401
|
+
fill: "none",
|
|
402
|
+
stroke: "currentColor",
|
|
403
|
+
strokeWidth: "1.5",
|
|
404
|
+
strokeLinecap: "round",
|
|
405
|
+
strokeLinejoin: "round",
|
|
406
|
+
children: /* @__PURE__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
407
|
+
}
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
export {
|
|
411
|
+
Nav
|
|
412
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ThemeProvider as ThemeProvider$1 } from 'next-themes';
|
|
3
|
+
|
|
4
|
+
declare function ThemeProvider({ children, ...props }: React.ComponentProps<typeof ThemeProvider$1>): react_jsx_runtime.JSX.Element;
|
|
5
|
+
|
|
6
|
+
export { ThemeProvider };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
33
|
+
import { jsx } from "react/jsx-runtime";
|
|
34
|
+
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
|
35
|
+
function ThemeProvider(_a) {
|
|
36
|
+
var _b = _a, {
|
|
37
|
+
children
|
|
38
|
+
} = _b, props = __objRest(_b, [
|
|
39
|
+
"children"
|
|
40
|
+
]);
|
|
41
|
+
return /* @__PURE__ */ jsx(NextThemesProvider, __spreadProps(__spreadValues({}, props), { children }));
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
ThemeProvider
|
|
45
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useTheme } from "next-themes";
|
|
4
|
+
import { useSyncExternalStore } from "react";
|
|
5
|
+
const emptySubscribe = () => () => {
|
|
6
|
+
};
|
|
7
|
+
function useIsMounted() {
|
|
8
|
+
return useSyncExternalStore(
|
|
9
|
+
emptySubscribe,
|
|
10
|
+
() => true,
|
|
11
|
+
() => false
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
function ThemeToggleIcon() {
|
|
15
|
+
const { resolvedTheme, setTheme } = useTheme();
|
|
16
|
+
const mounted = useIsMounted();
|
|
17
|
+
if (!mounted) {
|
|
18
|
+
return /* @__PURE__ */ jsx("div", { className: "h-4 w-4" });
|
|
19
|
+
}
|
|
20
|
+
const isDark = resolvedTheme === "dark";
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
"button",
|
|
23
|
+
{
|
|
24
|
+
onClick: () => setTheme(isDark ? "light" : "dark"),
|
|
25
|
+
className: "ui-control ui-focus inline-flex w-11 items-center justify-center text-muted-foreground hover:text-foreground",
|
|
26
|
+
"aria-label": isDark ? "Switch to light mode" : "Switch to dark mode",
|
|
27
|
+
children: isDark ? /* @__PURE__ */ jsxs(
|
|
28
|
+
"svg",
|
|
29
|
+
{
|
|
30
|
+
width: "16",
|
|
31
|
+
height: "16",
|
|
32
|
+
viewBox: "0 0 24 24",
|
|
33
|
+
fill: "none",
|
|
34
|
+
stroke: "currentColor",
|
|
35
|
+
strokeWidth: "1.5",
|
|
36
|
+
strokeLinecap: "round",
|
|
37
|
+
strokeLinejoin: "round",
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "5" }),
|
|
40
|
+
/* @__PURE__ */ jsx("path", { d: "M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42" })
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
) : /* @__PURE__ */ jsx(
|
|
44
|
+
"svg",
|
|
45
|
+
{
|
|
46
|
+
width: "16",
|
|
47
|
+
height: "16",
|
|
48
|
+
viewBox: "0 0 24 24",
|
|
49
|
+
fill: "none",
|
|
50
|
+
stroke: "currentColor",
|
|
51
|
+
strokeWidth: "1.5",
|
|
52
|
+
strokeLinecap: "round",
|
|
53
|
+
strokeLinejoin: "round",
|
|
54
|
+
children: /* @__PURE__ */ jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
ThemeToggleIcon
|
|
62
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useTheme } from "next-themes";
|
|
4
|
+
import { useSyncExternalStore } from "react";
|
|
5
|
+
import { Button } from "./ui/button.js";
|
|
6
|
+
const emptySubscribe = () => () => {
|
|
7
|
+
};
|
|
8
|
+
function useIsMounted() {
|
|
9
|
+
return useSyncExternalStore(
|
|
10
|
+
emptySubscribe,
|
|
11
|
+
() => true,
|
|
12
|
+
() => false
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
function ThemeToggle() {
|
|
16
|
+
const { resolvedTheme, setTheme } = useTheme();
|
|
17
|
+
const mounted = useIsMounted();
|
|
18
|
+
if (!mounted) {
|
|
19
|
+
return /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", className: "w-24", children: "\u2026" });
|
|
20
|
+
}
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
Button,
|
|
23
|
+
{
|
|
24
|
+
variant: "outline",
|
|
25
|
+
size: "sm",
|
|
26
|
+
className: "w-24",
|
|
27
|
+
onClick: () => setTheme(resolvedTheme === "dark" ? "light" : "dark"),
|
|
28
|
+
children: resolvedTheme === "dark" ? "\u2600\uFE0F Light" : "\u{1F319} Dark"
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
ThemeToggle
|
|
34
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
|
|
4
|
+
type HeadingProps = react.HTMLAttributes<HTMLHeadingElement> & {
|
|
5
|
+
children: react.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
declare const pageTitleClass = "text-foreground text-3xl font-semibold leading-tight";
|
|
8
|
+
declare const sectionTitleClass = "text-foreground text-xl font-semibold";
|
|
9
|
+
declare function PageTitle({ className, children, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function SectionTitle({ className, children, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { PageTitle, SectionTitle, pageTitleClass, sectionTitleClass };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
|
33
|
+
import { cn } from "../lib/utils.js";
|
|
34
|
+
const pageTitleClass = "text-foreground text-3xl font-semibold leading-tight";
|
|
35
|
+
const sectionTitleClass = "text-foreground text-xl font-semibold";
|
|
36
|
+
function PageTitle(_a) {
|
|
37
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
38
|
+
return /* @__PURE__ */ jsx("h1", __spreadProps(__spreadValues({ className: cn(pageTitleClass, className) }, props), { children }));
|
|
39
|
+
}
|
|
40
|
+
function SectionTitle(_c) {
|
|
41
|
+
var _d = _c, { className, children } = _d, props = __objRest(_d, ["className", "children"]);
|
|
42
|
+
return /* @__PURE__ */ jsx("h2", __spreadProps(__spreadValues({ className: cn(sectionTitleClass, className) }, props), { children }));
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
PageTitle,
|
|
46
|
+
SectionTitle,
|
|
47
|
+
pageTitleClass,
|
|
48
|
+
sectionTitleClass
|
|
49
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { Avatar as Avatar$1 } from 'radix-ui';
|
|
4
|
+
|
|
5
|
+
declare function Avatar({ className, size, ...props }: react.ComponentProps<typeof Avatar$1.Root> & {
|
|
6
|
+
size?: "default" | "sm" | "lg";
|
|
7
|
+
}): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function AvatarImage({ className, ...props }: react.ComponentProps<typeof Avatar$1.Image>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function AvatarFallback({ className, ...props }: react.ComponentProps<typeof Avatar$1.Fallback>): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function AvatarBadge({ className, ...props }: react.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
11
|
+
declare function AvatarGroup({ className, ...props }: react.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
12
|
+
declare function AvatarGroupCount({ className, ...props }: react.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|