@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.
Files changed (170) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/DESIGN.md +186 -0
  3. package/LICENSE +21 -0
  4. package/README.md +85 -22
  5. package/THIRD_PARTY_NOTICES.md +49 -0
  6. package/dist/chunk-JBTDRVZ7.js +46 -0
  7. package/dist/chunk-QKVN6Q6C.js +438 -0
  8. package/dist/components/index.d.ts +87 -0
  9. package/dist/components/index.js +832 -0
  10. package/dist/components/ui/index.d.ts +105 -0
  11. package/dist/components/ui/index.js +736 -0
  12. package/dist/lib/utils.d.ts +5 -0
  13. package/dist/lib/utils.js +7 -0
  14. package/dist/source/components/footer.d.ts +15 -0
  15. package/dist/source/components/footer.js +172 -0
  16. package/dist/source/components/index.d.ts +11 -0
  17. package/dist/source/components/index.js +26 -0
  18. package/dist/source/components/locale-switcher.d.ts +17 -0
  19. package/dist/source/components/locale-switcher.js +66 -0
  20. package/dist/source/components/logo.d.ts +9 -0
  21. package/dist/source/components/logo.js +52 -0
  22. package/dist/source/components/nav.d.ts +39 -0
  23. package/dist/source/components/nav.js +412 -0
  24. package/dist/source/components/theme-provider.d.ts +6 -0
  25. package/dist/source/components/theme-provider.js +45 -0
  26. package/dist/source/components/theme-toggle-icon.d.ts +5 -0
  27. package/dist/source/components/theme-toggle-icon.js +62 -0
  28. package/dist/source/components/theme-toggle.d.ts +5 -0
  29. package/dist/source/components/theme-toggle.js +34 -0
  30. package/dist/source/components/typography.d.ts +12 -0
  31. package/dist/source/components/typography.js +49 -0
  32. package/dist/source/components/ui/avatar.d.ts +14 -0
  33. package/dist/source/components/ui/avatar.js +137 -0
  34. package/dist/source/components/ui/badge.d.ts +13 -0
  35. package/dist/source/components/ui/badge.js +76 -0
  36. package/dist/source/components/ui/button.d.ts +14 -0
  37. package/dist/source/components/ui/button.js +88 -0
  38. package/dist/source/components/ui/card.d.ts +13 -0
  39. package/dist/source/components/ui/card.js +135 -0
  40. package/dist/source/components/ui/checkbox.d.ts +7 -0
  41. package/dist/source/components/ui/checkbox.js +58 -0
  42. package/dist/source/components/ui/dialog.d.ts +20 -0
  43. package/dist/source/components/ui/dialog.js +182 -0
  44. package/dist/source/components/ui/dropdown-menu.d.ts +28 -0
  45. package/dist/source/components/ui/dropdown-menu.js +282 -0
  46. package/dist/source/components/ui/index.d.ts +19 -0
  47. package/dist/source/components/ui/index.js +131 -0
  48. package/dist/source/components/ui/input.d.ts +6 -0
  49. package/dist/source/components/ui/input.js +49 -0
  50. package/dist/source/components/ui/select.d.ts +16 -0
  51. package/dist/source/components/ui/select.js +197 -0
  52. package/dist/source/components/ui/sonner.d.ts +6 -0
  53. package/dist/source/components/ui/sonner.js +80 -0
  54. package/dist/source/components/ui/switch.d.ts +7 -0
  55. package/dist/source/components/ui/switch.js +54 -0
  56. package/dist/source/components/ui/tabs.d.ts +10 -0
  57. package/dist/source/components/ui/tabs.js +57 -0
  58. package/dist/source/components/ui/textarea.d.ts +6 -0
  59. package/dist/source/components/ui/textarea.js +46 -0
  60. package/dist/source/i18n/config.d.ts +6 -0
  61. package/dist/source/i18n/config.js +12 -0
  62. package/dist/source/i18n/routing.d.ts +371 -0
  63. package/dist/source/i18n/routing.js +17 -0
  64. package/dist/source/lib/design/modal-inert.d.ts +6 -0
  65. package/dist/source/lib/design/modal-inert.js +73 -0
  66. package/dist/source/lib/utils.d.ts +5 -0
  67. package/dist/source/lib/utils.js +8 -0
  68. package/dist/tokens.ts +217 -0
  69. package/docs/components/README.md +21 -0
  70. package/docs/components/avatar.md +47 -0
  71. package/docs/components/badge.md +29 -0
  72. package/docs/components/button.md +39 -0
  73. package/docs/components/card.md +32 -0
  74. package/docs/components/checkbox.md +35 -0
  75. package/docs/components/common.md +31 -0
  76. package/docs/components/composition.md +68 -0
  77. package/docs/components/dialog.md +41 -0
  78. package/docs/components/dropdown-menu.md +38 -0
  79. package/docs/components/input.md +32 -0
  80. package/docs/components/select.md +39 -0
  81. package/docs/components/sonner.md +37 -0
  82. package/docs/components/switch.md +33 -0
  83. package/docs/components/tabs.md +40 -0
  84. package/docs/components/textarea.md +35 -0
  85. package/docs/design/component-demand.md +30 -0
  86. package/docs/design/public-ui-final-verification.md +96 -0
  87. package/docs/design/public-ui-release-validation.md +86 -0
  88. package/docs/design/public-ui-stage3-verification.md +98 -0
  89. package/docs/design/public-ui-stage4-verification.md +129 -0
  90. package/docs/design/public-ui-support.md +40 -0
  91. package/docs/design/v2-migration.md +199 -0
  92. package/docs/package-release.md +89 -0
  93. package/licenses/Noto-Sans-JP-OFL.txt +93 -0
  94. package/licenses/Nunito-Sans-OFL.txt +93 -0
  95. package/licenses/Pretendard-OFL.txt +94 -0
  96. package/licenses/React-MIT.txt +21 -0
  97. package/licenses/Storybook-MIT.txt +21 -0
  98. package/licenses/popper-MIT.txt +25 -0
  99. package/licenses/react-remove-scroll-bar-MIT.txt +21 -0
  100. package/licenses/store2-MIT.txt +22 -0
  101. package/licenses/toggle-selection-MIT.txt +21 -0
  102. package/package.json +215 -26
  103. package/src/styles/components.css +276 -0
  104. package/src/styles/globals.css +18 -0
  105. package/src/styles/theme.css +293 -0
  106. package/messages/en.json +0 -221
  107. package/messages/ja.json +0 -221
  108. package/messages/ko.json +0 -221
  109. package/postcss.config.mjs +0 -7
  110. package/src/app/[locale]/(content)/baby-agent/page.tsx +0 -30
  111. package/src/app/[locale]/(content)/blog/page.tsx +0 -68
  112. package/src/app/[locale]/(content)/cc/page.tsx +0 -216
  113. package/src/app/[locale]/(content)/design/page.tsx +0 -703
  114. package/src/app/[locale]/(content)/layout.tsx +0 -7
  115. package/src/app/[locale]/(content)/pkm/page.tsx +0 -31
  116. package/src/app/[locale]/(content)/projects/page.tsx +0 -100
  117. package/src/app/[locale]/(content)/sa/page.tsx +0 -179
  118. package/src/app/[locale]/(landing)/page.tsx +0 -157
  119. package/src/app/[locale]/layout.tsx +0 -72
  120. package/src/app/[locale]/login/actions.ts +0 -10
  121. package/src/app/[locale]/login/oauth-buttons.tsx +0 -78
  122. package/src/app/[locale]/login/page.tsx +0 -85
  123. package/src/app/auth/callback/route.ts +0 -78
  124. package/src/app/favicon.ico +0 -0
  125. package/src/app/globals.css +0 -32
  126. package/src/app/layout.tsx +0 -22
  127. package/src/app/sitemap.ts +0 -26
  128. package/src/components/accent-picker.tsx +0 -62
  129. package/src/components/auth-slot.tsx +0 -96
  130. package/src/components/footer-wrapper.tsx +0 -8
  131. package/src/components/footer.tsx +0 -193
  132. package/src/components/hero-scene.tsx +0 -948
  133. package/src/components/hero-section.tsx +0 -57
  134. package/src/components/locale-switcher.tsx +0 -74
  135. package/src/components/logo.tsx +0 -51
  136. package/src/components/nav-server-wrapper.tsx +0 -22
  137. package/src/components/nav-wrapper.tsx +0 -45
  138. package/src/components/nav.tsx +0 -550
  139. package/src/components/paraglider-cursor.tsx +0 -112
  140. package/src/components/project-layout.tsx +0 -194
  141. package/src/components/theme-provider.tsx +0 -10
  142. package/src/components/theme-toggle-icon.tsx +0 -62
  143. package/src/components/theme-toggle.tsx +0 -39
  144. package/src/components/typography.tsx +0 -27
  145. package/src/components/ui/avatar.tsx +0 -109
  146. package/src/components/ui/badge.tsx +0 -47
  147. package/src/components/ui/button.tsx +0 -65
  148. package/src/components/ui/card.tsx +0 -106
  149. package/src/components/ui/dialog.tsx +0 -158
  150. package/src/components/ui/dropdown-menu.tsx +0 -257
  151. package/src/components/ui/input.tsx +0 -21
  152. package/src/components/ui/sonner.tsx +0 -54
  153. package/src/components/workflow-diagram.tsx +0 -414
  154. package/src/i18n/config.ts +0 -8
  155. package/src/i18n/request.ts +0 -16
  156. package/src/i18n/routing.ts +0 -12
  157. package/src/lib/supabase/client.ts +0 -18
  158. package/src/lib/supabase/middleware.ts +0 -42
  159. package/src/lib/supabase/server.ts +0 -37
  160. package/src/lib/utils.ts +0 -6
  161. package/src/proxy.ts +0 -62
  162. package/src/tokens/.gitkeep +0 -0
  163. package/src/tokens/color.json +0 -56
  164. package/src/tokens/radius.json +0 -9
  165. package/src/tokens/semantic.json +0 -81
  166. package/src/tokens/shadow.json +0 -7
  167. package/src/tokens/spacing.json +0 -16
  168. package/src/tokens/typography.json +0 -34
  169. package/src/types/i18n.d.ts +0 -6
  170. package/src/utils/.gitkeep +0 -0
@@ -0,0 +1,438 @@
1
+ "use client";
2
+ import {
3
+ __objRest,
4
+ __spreadProps,
5
+ __spreadValues,
6
+ cn
7
+ } from "./chunk-JBTDRVZ7.js";
8
+
9
+ // src/components/ui/badge.tsx
10
+ import { cva } from "class-variance-authority";
11
+ import { Slot } from "radix-ui";
12
+ import { jsx } from "react/jsx-runtime";
13
+ var badgeVariants = cva(
14
+ "inline-flex items-center justify-center rounded-sm border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none ui-focus aria-invalid:border-error transition-colors overflow-hidden",
15
+ {
16
+ variants: {
17
+ variant: {
18
+ success: "bg-success-bg text-success border-transparent",
19
+ warning: "bg-warning-bg text-warning border-transparent",
20
+ error: "bg-error-bg text-error border-transparent",
21
+ info: "bg-info-bg text-info border-transparent",
22
+ default: "bg-primary text-primary-foreground border-transparent [a&]:hover:bg-primary/90",
23
+ secondary: "bg-secondary text-secondary-foreground border-transparent [a&]:hover:bg-secondary/80",
24
+ outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
25
+ destructive: "bg-destructive text-destructive-foreground border-transparent [a&]:hover:bg-destructive/90"
26
+ }
27
+ },
28
+ defaultVariants: {
29
+ variant: "default"
30
+ }
31
+ }
32
+ );
33
+ function Badge(_a) {
34
+ var _b = _a, {
35
+ className,
36
+ variant = "default",
37
+ asChild = false
38
+ } = _b, props = __objRest(_b, [
39
+ "className",
40
+ "variant",
41
+ "asChild"
42
+ ]);
43
+ const Comp = asChild ? Slot.Root : "span";
44
+ return /* @__PURE__ */ jsx(
45
+ Comp,
46
+ __spreadValues({
47
+ "data-slot": "badge",
48
+ "data-variant": variant,
49
+ className: cn(badgeVariants({ variant }), className)
50
+ }, props)
51
+ );
52
+ }
53
+
54
+ // src/components/ui/dropdown-menu.tsx
55
+ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
56
+ import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
57
+
58
+ // src/lib/design/modal-inert.ts
59
+ import { useEffect, useMemo, useState } from "react";
60
+ var ownershipKey = /* @__PURE__ */ Symbol.for("@naeil/ui/radix-hidden-inert/v1");
61
+ function ownershipFor(doc) {
62
+ var _a;
63
+ const shared = doc;
64
+ return (_a = shared[ownershipKey]) != null ? _a : shared[ownershipKey] = /* @__PURE__ */ new WeakMap();
65
+ }
66
+ function useRadixHiddenInert(content) {
67
+ useEffect(() => {
68
+ if (!content) return;
69
+ const doc = content.ownerDocument;
70
+ const ownership = ownershipFor(doc);
71
+ const held = /* @__PURE__ */ new Set();
72
+ function release(element) {
73
+ held.delete(element);
74
+ const state = ownership.get(element);
75
+ if (!state || --state.users > 0) return;
76
+ element.inert = state.original;
77
+ ownership.delete(element);
78
+ }
79
+ function sync() {
80
+ const hidden = (content == null ? void 0 : content.isConnected) && content.dataset.state === "open" ? [...doc.querySelectorAll('[data-aria-hidden="true"][aria-hidden="true"]')].filter((element) => !element.contains(content)) : [];
81
+ const desired = new Set(hidden);
82
+ for (const element of held) if (!desired.has(element)) release(element);
83
+ for (const element of desired) {
84
+ if (held.has(element)) continue;
85
+ let state = ownership.get(element);
86
+ if (!state) {
87
+ state = { users: 0, original: element.inert };
88
+ ownership.set(element, state);
89
+ }
90
+ state.users++;
91
+ held.add(element);
92
+ element.inert = true;
93
+ }
94
+ }
95
+ const observer = new MutationObserver(sync);
96
+ observer.observe(doc.body, {
97
+ subtree: true,
98
+ childList: true,
99
+ attributes: true,
100
+ attributeFilter: ["aria-hidden", "data-aria-hidden", "data-state"]
101
+ });
102
+ sync();
103
+ return () => {
104
+ observer.disconnect();
105
+ for (const element of held) release(element);
106
+ };
107
+ }, [content]);
108
+ }
109
+ function assignObjectRef(ref, node) {
110
+ ref.current = node;
111
+ }
112
+ function useOverlayRef(consumerRef) {
113
+ const [node, setNode] = useState(null);
114
+ const ref = useMemo(() => (value) => {
115
+ setNode(value);
116
+ const cleanup = typeof consumerRef === "function" ? consumerRef(value) : void 0;
117
+ if (consumerRef && typeof consumerRef !== "function") assignObjectRef(consumerRef, value);
118
+ return () => {
119
+ setNode(null);
120
+ if (typeof cleanup === "function") cleanup();
121
+ else if (typeof consumerRef === "function") consumerRef(null);
122
+ else if (consumerRef) assignObjectRef(consumerRef, null);
123
+ };
124
+ }, [consumerRef]);
125
+ return [node, ref];
126
+ }
127
+
128
+ // src/components/ui/dropdown-menu.tsx
129
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
130
+ function DropdownMenu(_a) {
131
+ var props = __objRest(_a, []);
132
+ return /* @__PURE__ */ jsx2(DropdownMenuPrimitive.Root, __spreadValues({ "data-slot": "dropdown-menu" }, props));
133
+ }
134
+ function DropdownMenuPortal(_a) {
135
+ var props = __objRest(_a, []);
136
+ return /* @__PURE__ */ jsx2(DropdownMenuPrimitive.Portal, __spreadValues({ "data-slot": "dropdown-menu-portal" }, props));
137
+ }
138
+ function DropdownMenuTrigger(_a) {
139
+ var props = __objRest(_a, []);
140
+ return /* @__PURE__ */ jsx2(
141
+ DropdownMenuPrimitive.Trigger,
142
+ __spreadValues({
143
+ "data-slot": "dropdown-menu-trigger"
144
+ }, props)
145
+ );
146
+ }
147
+ function DropdownMenuContent(_a) {
148
+ var _b = _a, {
149
+ ref,
150
+ className,
151
+ sideOffset = 4
152
+ } = _b, props = __objRest(_b, [
153
+ "ref",
154
+ "className",
155
+ "sideOffset"
156
+ ]);
157
+ const [content, contentRef] = useOverlayRef(ref);
158
+ useRadixHiddenInert(content);
159
+ return /* @__PURE__ */ jsx2(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx2(
160
+ DropdownMenuPrimitive.Content,
161
+ __spreadValues({
162
+ ref: contentRef,
163
+ "data-slot": "dropdown-menu-content",
164
+ sideOffset,
165
+ className: cn(
166
+ "ui-menu ui-popup z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border-strong p-1 shadow-md",
167
+ className
168
+ )
169
+ }, props)
170
+ ) });
171
+ }
172
+ function DropdownMenuGroup(_a) {
173
+ var props = __objRest(_a, []);
174
+ return /* @__PURE__ */ jsx2(DropdownMenuPrimitive.Group, __spreadValues({ "data-slot": "dropdown-menu-group" }, props));
175
+ }
176
+ function DropdownMenuItem(_a) {
177
+ var _b = _a, {
178
+ className,
179
+ inset,
180
+ variant = "default"
181
+ } = _b, props = __objRest(_b, [
182
+ "className",
183
+ "inset",
184
+ "variant"
185
+ ]);
186
+ return /* @__PURE__ */ jsx2(
187
+ DropdownMenuPrimitive.Item,
188
+ __spreadValues({
189
+ "data-slot": "dropdown-menu-item",
190
+ "data-inset": inset,
191
+ "data-variant": variant,
192
+ className: cn(
193
+ "focus:bg-surface-subtle data-[variant=destructive]:text-error data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-error data-[variant=destructive]:*:[svg]:!text-error [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-base outline-hidden select-none transition-colors duration-(--ui-motion-fast) data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
194
+ className
195
+ )
196
+ }, props)
197
+ );
198
+ }
199
+ function DropdownMenuCheckboxItem(_a) {
200
+ var _b = _a, {
201
+ className,
202
+ children,
203
+ checked
204
+ } = _b, props = __objRest(_b, [
205
+ "className",
206
+ "children",
207
+ "checked"
208
+ ]);
209
+ return /* @__PURE__ */ jsxs(
210
+ DropdownMenuPrimitive.CheckboxItem,
211
+ __spreadProps(__spreadValues({
212
+ "data-slot": "dropdown-menu-checkbox-item",
213
+ className: cn(
214
+ "focus:bg-surface-subtle relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-base outline-hidden select-none transition-colors duration-(--ui-motion-fast) data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
215
+ className
216
+ ),
217
+ checked
218
+ }, props), {
219
+ children: [
220
+ /* @__PURE__ */ jsx2("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx2(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx2(CheckIcon, { className: "size-4" }) }) }),
221
+ children
222
+ ]
223
+ })
224
+ );
225
+ }
226
+ function DropdownMenuRadioGroup(_a) {
227
+ var props = __objRest(_a, []);
228
+ return /* @__PURE__ */ jsx2(
229
+ DropdownMenuPrimitive.RadioGroup,
230
+ __spreadValues({
231
+ "data-slot": "dropdown-menu-radio-group"
232
+ }, props)
233
+ );
234
+ }
235
+ function DropdownMenuRadioItem(_a) {
236
+ var _b = _a, {
237
+ className,
238
+ children
239
+ } = _b, props = __objRest(_b, [
240
+ "className",
241
+ "children"
242
+ ]);
243
+ return /* @__PURE__ */ jsxs(
244
+ DropdownMenuPrimitive.RadioItem,
245
+ __spreadProps(__spreadValues({
246
+ "data-slot": "dropdown-menu-radio-item",
247
+ className: cn(
248
+ "focus:bg-surface-subtle relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-base outline-hidden select-none transition-colors duration-(--ui-motion-fast) data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
249
+ className
250
+ )
251
+ }, props), {
252
+ children: [
253
+ /* @__PURE__ */ jsx2("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx2(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx2(CircleIcon, { className: "size-2 fill-current" }) }) }),
254
+ children
255
+ ]
256
+ })
257
+ );
258
+ }
259
+ function DropdownMenuLabel(_a) {
260
+ var _b = _a, {
261
+ className,
262
+ inset
263
+ } = _b, props = __objRest(_b, [
264
+ "className",
265
+ "inset"
266
+ ]);
267
+ return /* @__PURE__ */ jsx2(
268
+ DropdownMenuPrimitive.Label,
269
+ __spreadValues({
270
+ "data-slot": "dropdown-menu-label",
271
+ "data-inset": inset,
272
+ className: cn(
273
+ "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
274
+ className
275
+ )
276
+ }, props)
277
+ );
278
+ }
279
+ function DropdownMenuSeparator(_a) {
280
+ var _b = _a, {
281
+ className
282
+ } = _b, props = __objRest(_b, [
283
+ "className"
284
+ ]);
285
+ return /* @__PURE__ */ jsx2(
286
+ DropdownMenuPrimitive.Separator,
287
+ __spreadValues({
288
+ "data-slot": "dropdown-menu-separator",
289
+ className: cn("bg-border-subtle -mx-1 my-1 h-px", className)
290
+ }, props)
291
+ );
292
+ }
293
+ function DropdownMenuShortcut(_a) {
294
+ var _b = _a, {
295
+ className
296
+ } = _b, props = __objRest(_b, [
297
+ "className"
298
+ ]);
299
+ return /* @__PURE__ */ jsx2(
300
+ "span",
301
+ __spreadValues({
302
+ "data-slot": "dropdown-menu-shortcut",
303
+ className: cn(
304
+ "text-muted-foreground ml-auto text-xs tracking-widest",
305
+ className
306
+ )
307
+ }, props)
308
+ );
309
+ }
310
+ function DropdownMenuSub(_a) {
311
+ var props = __objRest(_a, []);
312
+ return /* @__PURE__ */ jsx2(DropdownMenuPrimitive.Sub, __spreadValues({ "data-slot": "dropdown-menu-sub" }, props));
313
+ }
314
+ function DropdownMenuSubTrigger(_a) {
315
+ var _b = _a, {
316
+ className,
317
+ inset,
318
+ children
319
+ } = _b, props = __objRest(_b, [
320
+ "className",
321
+ "inset",
322
+ "children"
323
+ ]);
324
+ return /* @__PURE__ */ jsxs(
325
+ DropdownMenuPrimitive.SubTrigger,
326
+ __spreadProps(__spreadValues({
327
+ "data-slot": "dropdown-menu-sub-trigger",
328
+ "data-inset": inset,
329
+ className: cn(
330
+ "focus:bg-surface-subtle data-[state=open]:bg-surface-subtle [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-base outline-hidden select-none transition-colors duration-(--ui-motion-fast) data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
331
+ className
332
+ )
333
+ }, props), {
334
+ children: [
335
+ children,
336
+ /* @__PURE__ */ jsx2(ChevronRightIcon, { className: "ml-auto size-4" })
337
+ ]
338
+ })
339
+ );
340
+ }
341
+ function DropdownMenuSubContent(_a) {
342
+ var _b = _a, {
343
+ className
344
+ } = _b, props = __objRest(_b, [
345
+ "className"
346
+ ]);
347
+ return /* @__PURE__ */ jsx2(
348
+ DropdownMenuPrimitive.SubContent,
349
+ __spreadValues({
350
+ "data-slot": "dropdown-menu-sub-content",
351
+ className: cn(
352
+ "ui-menu ui-popup z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border border-border-strong p-1 shadow-lg",
353
+ className
354
+ )
355
+ }, props)
356
+ );
357
+ }
358
+
359
+ // src/components/ui/button.tsx
360
+ import { cva as cva2 } from "class-variance-authority";
361
+ import { Slot as Slot2 } from "radix-ui";
362
+ import { jsx as jsx3 } from "react/jsx-runtime";
363
+ var buttonVariants = cva2(
364
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap ui-control ui-focus rounded-md text-base font-medium transition-colors duration-(--ui-motion-fast) cursor-pointer disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 ui-focus aria-invalid:border-error",
365
+ {
366
+ variants: {
367
+ variant: {
368
+ default: "bg-primary text-primary-foreground hover:bg-primary-hover",
369
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 ",
370
+ outline: "border border-border-strong bg-background hover:bg-surface-subtle",
371
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
372
+ ghost: "hover:bg-surface-subtle",
373
+ link: "text-primary underline-offset-4 hover:underline"
374
+ },
375
+ size: {
376
+ default: "px-4 has-[>svg]:px-3",
377
+ xs: "gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
378
+ sm: "rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
379
+ lg: "rounded-md px-6 has-[>svg]:px-4",
380
+ icon: "",
381
+ "icon-xs": "rounded-md [&_svg:not([class*='size-'])]:size-3",
382
+ "icon-sm": "",
383
+ "icon-lg": ""
384
+ }
385
+ },
386
+ defaultVariants: {
387
+ variant: "default",
388
+ size: "default"
389
+ }
390
+ }
391
+ );
392
+ function Button(_a) {
393
+ var _b = _a, {
394
+ className,
395
+ variant = "default",
396
+ size = "default",
397
+ asChild = false
398
+ } = _b, props = __objRest(_b, [
399
+ "className",
400
+ "variant",
401
+ "size",
402
+ "asChild"
403
+ ]);
404
+ const Comp = asChild ? Slot2.Root : "button";
405
+ return /* @__PURE__ */ jsx3(
406
+ Comp,
407
+ __spreadValues({
408
+ "data-slot": "button",
409
+ "data-variant": variant,
410
+ "data-size": size,
411
+ className: cn(buttonVariants({ variant, size, className }))
412
+ }, props)
413
+ );
414
+ }
415
+
416
+ export {
417
+ badgeVariants,
418
+ Badge,
419
+ useRadixHiddenInert,
420
+ useOverlayRef,
421
+ DropdownMenu,
422
+ DropdownMenuPortal,
423
+ DropdownMenuTrigger,
424
+ DropdownMenuContent,
425
+ DropdownMenuGroup,
426
+ DropdownMenuItem,
427
+ DropdownMenuCheckboxItem,
428
+ DropdownMenuRadioGroup,
429
+ DropdownMenuRadioItem,
430
+ DropdownMenuLabel,
431
+ DropdownMenuSeparator,
432
+ DropdownMenuShortcut,
433
+ DropdownMenuSub,
434
+ DropdownMenuSubTrigger,
435
+ DropdownMenuSubContent,
436
+ buttonVariants,
437
+ Button
438
+ };
@@ -0,0 +1,87 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ThemeProvider as ThemeProvider$1 } from 'next-themes';
3
+ import * as React$1 from 'react';
4
+
5
+ interface NavProps {
6
+ /** Internal Link component (from consumer's next-intl routing) */
7
+ Link: React.ComponentType<React.ComponentPropsWithoutRef<"a"> & {
8
+ href: string;
9
+ }>;
10
+ /** Current pathname value (already resolved, not a hook) */
11
+ usePathname: () => string;
12
+ /** Where the .naeil logo links to. Default: "/" */
13
+ brandHref?: string;
14
+ /** Whether brandHref is external (renders <a>) or internal (renders Link). Default: false */
15
+ brandExternal?: boolean;
16
+ /** Custom brand content (replaces default Logo + ".naeil" text) */
17
+ brandSlot?: React.ReactNode;
18
+ /** When true, project links (except current) are rendered as external <a> to externalBaseUrl. Default: false */
19
+ projectsExternal?: boolean;
20
+ /** Base URL for external project links. Default: "https://naeil.dev" */
21
+ externalBaseUrl?: string;
22
+ /** Override href for the current project in the dropdown */
23
+ currentProjectKey?: string;
24
+ currentProjectHref?: string;
25
+ /** App-specific sub-navigation items after the project dropdown */
26
+ subNav?: Array<{
27
+ label: string;
28
+ href: string;
29
+ }>;
30
+ /** React node for auth UI (rendered in desktop right side + mobile bottom) */
31
+ authSlot?: React.ReactNode;
32
+ /** Show Projects dropdown in nav. Default: true */
33
+ showProjects?: boolean;
34
+ /** Show blog link in nav. Default: true */
35
+ showBlog?: boolean;
36
+ /** Right-side toolbar (theme toggle, locale switcher, etc.) */
37
+ toolbarSlot?: React.ReactNode;
38
+ }
39
+ declare function Nav({ Link, usePathname, brandHref, brandExternal, brandSlot, projectsExternal, externalBaseUrl, currentProjectKey, currentProjectHref, subNav, authSlot, showProjects, showBlog, toolbarSlot, }: NavProps): react_jsx_runtime.JSX.Element;
40
+
41
+ interface FooterProps {
42
+ /** Link component from consumer */
43
+ Link?: React.ComponentType<{
44
+ href: string;
45
+ children: React.ReactNode;
46
+ className?: string;
47
+ }>;
48
+ /** Whether links go to naeil.dev (external) or are internal. Default: false */
49
+ linksExternal?: boolean;
50
+ }
51
+ declare function Footer({ Link, linksExternal }: FooterProps): react_jsx_runtime.JSX.Element;
52
+
53
+ interface LocaleSwitcherProps {
54
+ /** Available locales */
55
+ locales: Array<{
56
+ code: string;
57
+ short: string;
58
+ full: string;
59
+ }>;
60
+ /** Current locale */
61
+ currentLocale: string;
62
+ /** Called when user selects a new locale */
63
+ onLocaleChange: (locale: string) => void;
64
+ }
65
+ declare function LocaleSwitcher({ locales, currentLocale, onLocaleChange, }: LocaleSwitcherProps): react_jsx_runtime.JSX.Element;
66
+
67
+ declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
68
+
69
+ declare function ThemeProvider({ children, ...props }: React.ComponentProps<typeof ThemeProvider$1>): react_jsx_runtime.JSX.Element;
70
+
71
+ declare function ThemeToggleIcon(): react_jsx_runtime.JSX.Element;
72
+
73
+ declare function Logo({ size, mono, className, }: {
74
+ size?: number;
75
+ mono?: boolean;
76
+ className?: string;
77
+ }): react_jsx_runtime.JSX.Element;
78
+
79
+ type HeadingProps = React$1.HTMLAttributes<HTMLHeadingElement> & {
80
+ children: React$1.ReactNode;
81
+ };
82
+ declare const pageTitleClass = "text-foreground text-3xl font-semibold leading-tight";
83
+ declare const sectionTitleClass = "text-foreground text-xl font-semibold";
84
+ declare function PageTitle({ className, children, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
85
+ declare function SectionTitle({ className, children, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
86
+
87
+ export { Footer, LocaleSwitcher, Logo, Nav, PageTitle, SectionTitle, ThemeProvider, ThemeToggle, ThemeToggleIcon, pageTitleClass, sectionTitleClass };