opin-ui 0.0.1

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 (243) hide show
  1. package/README.md +5 -0
  2. package/css/aspen.css +39 -0
  3. package/css/black.css +39 -0
  4. package/css/catppuccin.css +49 -0
  5. package/css/dusk.css +47 -0
  6. package/css/emerald.css +39 -0
  7. package/css/generated/docs.css +1 -0
  8. package/css/generated/flux.css +1 -0
  9. package/css/generated/home.css +1 -0
  10. package/css/generated/notebook.css +1 -0
  11. package/css/generated/shared.css +1 -0
  12. package/css/lib/base.css +314 -0
  13. package/css/lib/default-colors.css +51 -0
  14. package/css/lib/shiki.css +108 -0
  15. package/css/neutral.css +7 -0
  16. package/css/ocean.css +44 -0
  17. package/css/preset-legacy.css +43 -0
  18. package/css/preset.css +11 -0
  19. package/css/purple.css +39 -0
  20. package/css/ruby.css +39 -0
  21. package/css/shadcn.css +36 -0
  22. package/css/solar.css +75 -0
  23. package/css/style.css +9 -0
  24. package/css/vitepress.css +65 -0
  25. package/dist/.translations/index.d.ts +49 -0
  26. package/dist/.translations/keys.js +49 -0
  27. package/dist/_virtual/_rolldown/runtime.js +13 -0
  28. package/dist/components/accordion.d.ts +23 -0
  29. package/dist/components/accordion.js +68 -0
  30. package/dist/components/banner.d.ts +33 -0
  31. package/dist/components/banner.js +85 -0
  32. package/dist/components/callout.d.ts +41 -0
  33. package/dist/components/callout.js +53 -0
  34. package/dist/components/card.d.ts +19 -0
  35. package/dist/components/card.js +38 -0
  36. package/dist/components/codeblock.d.ts +61 -0
  37. package/dist/components/codeblock.js +173 -0
  38. package/dist/components/codeblock.rsc.d.ts +20 -0
  39. package/dist/components/codeblock.rsc.js +22 -0
  40. package/dist/components/dialog/search-algolia.d.ts +36 -0
  41. package/dist/components/dialog/search-algolia.js +64 -0
  42. package/dist/components/dialog/search-default.d.ts +36 -0
  43. package/dist/components/dialog/search-default.js +58 -0
  44. package/dist/components/dialog/search-orama.d.ts +43 -0
  45. package/dist/components/dialog/search-orama.js +69 -0
  46. package/dist/components/dialog/search.d.ts +112 -0
  47. package/dist/components/dialog/search.js +350 -0
  48. package/dist/components/dynamic-codeblock.core.d.ts +34 -0
  49. package/dist/components/dynamic-codeblock.core.js +51 -0
  50. package/dist/components/dynamic-codeblock.d.ts +9 -0
  51. package/dist/components/dynamic-codeblock.js +17 -0
  52. package/dist/components/files.d.ts +34 -0
  53. package/dist/components/files.js +40 -0
  54. package/dist/components/github-info.d.ts +35 -0
  55. package/dist/components/github-info.js +75 -0
  56. package/dist/components/heading.d.ts +13 -0
  57. package/dist/components/heading.js +38 -0
  58. package/dist/components/image-zoom.d.ts +23 -0
  59. package/dist/components/image-zoom.js +32 -0
  60. package/dist/components/image-zoom2.css +71 -0
  61. package/dist/components/inline-toc.d.ts +14 -0
  62. package/dist/components/inline-toc.js +28 -0
  63. package/dist/components/sidebar/base.d.ts +131 -0
  64. package/dist/components/sidebar/base.js +274 -0
  65. package/dist/components/sidebar/link-item.d.ts +22 -0
  66. package/dist/components/sidebar/link-item.js +38 -0
  67. package/dist/components/sidebar/page-tree.d.ts +28 -0
  68. package/dist/components/sidebar/page-tree.js +71 -0
  69. package/dist/components/sidebar/tabs/dropdown.d.ts +16 -0
  70. package/dist/components/sidebar/tabs/dropdown.js +71 -0
  71. package/dist/components/sidebar/tabs/index.d.ts +11 -0
  72. package/dist/components/sidebar/tabs/index.js +46 -0
  73. package/dist/components/steps.d.ts +15 -0
  74. package/dist/components/steps.js +16 -0
  75. package/dist/components/tabs.d.ts +49 -0
  76. package/dist/components/tabs.js +88 -0
  77. package/dist/components/toc/clerk.d.ts +20 -0
  78. package/dist/components/toc/clerk.js +226 -0
  79. package/dist/components/toc/default.d.ts +23 -0
  80. package/dist/components/toc/default.js +259 -0
  81. package/dist/components/toc/index.d.ts +19 -0
  82. package/dist/components/toc/index.js +45 -0
  83. package/dist/components/type-table.d.ts +43 -0
  84. package/dist/components/type-table.js +117 -0
  85. package/dist/components/ui/accordion.d.ts +30 -0
  86. package/dist/components/ui/accordion.js +42 -0
  87. package/dist/components/ui/button.d.ts +11 -0
  88. package/dist/components/ui/button.js +20 -0
  89. package/dist/components/ui/collapsible.d.ts +15 -0
  90. package/dist/components/ui/collapsible.js +21 -0
  91. package/dist/components/ui/navigation-menu.d.ts +30 -0
  92. package/dist/components/ui/navigation-menu.js +41 -0
  93. package/dist/components/ui/popover.d.ts +15 -0
  94. package/dist/components/ui/popover.js +20 -0
  95. package/dist/components/ui/scroll-area.d.ts +22 -0
  96. package/dist/components/ui/scroll-area.js +34 -0
  97. package/dist/components/ui/tabs.d.ts +36 -0
  98. package/dist/components/ui/tabs.js +77 -0
  99. package/dist/contexts/i18n.d.ts +41 -0
  100. package/dist/contexts/i18n.js +37 -0
  101. package/dist/contexts/search.d.ts +73 -0
  102. package/dist/contexts/search.js +68 -0
  103. package/dist/contexts/tree.d.ts +20 -0
  104. package/dist/contexts/tree.js +38 -0
  105. package/dist/i18n.d.ts +16 -0
  106. package/dist/i18n.js +38 -0
  107. package/dist/layouts/docs/client.d.ts +34 -0
  108. package/dist/layouts/docs/client.js +92 -0
  109. package/dist/layouts/docs/index.d.ts +44 -0
  110. package/dist/layouts/docs/index.js +22 -0
  111. package/dist/layouts/docs/page/index.d.ts +115 -0
  112. package/dist/layouts/docs/page/index.js +124 -0
  113. package/dist/layouts/docs/page/slots/breadcrumb.d.ts +13 -0
  114. package/dist/layouts/docs/page/slots/breadcrumb.js +44 -0
  115. package/dist/layouts/docs/page/slots/container.d.ts +6 -0
  116. package/dist/layouts/docs/page/slots/container.js +17 -0
  117. package/dist/layouts/docs/page/slots/footer.d.ts +22 -0
  118. package/dist/layouts/docs/page/slots/footer.js +56 -0
  119. package/dist/layouts/docs/page/slots/toc.d.ts +62 -0
  120. package/dist/layouts/docs/page/slots/toc.js +182 -0
  121. package/dist/layouts/docs/slots/container.d.ts +6 -0
  122. package/dist/layouts/docs/slots/container.js +36 -0
  123. package/dist/layouts/docs/slots/header.d.ts +6 -0
  124. package/dist/layouts/docs/slots/header.js +38 -0
  125. package/dist/layouts/docs/slots/sidebar.d.ts +29 -0
  126. package/dist/layouts/docs/slots/sidebar.js +326 -0
  127. package/dist/layouts/flux/index.d.ts +73 -0
  128. package/dist/layouts/flux/index.js +146 -0
  129. package/dist/layouts/flux/page/index.d.ts +102 -0
  130. package/dist/layouts/flux/page/index.js +104 -0
  131. package/dist/layouts/flux/page/slots/breadcrumb.d.ts +13 -0
  132. package/dist/layouts/flux/page/slots/breadcrumb.js +44 -0
  133. package/dist/layouts/flux/page/slots/container.d.ts +6 -0
  134. package/dist/layouts/flux/page/slots/container.js +17 -0
  135. package/dist/layouts/flux/page/slots/footer.d.ts +22 -0
  136. package/dist/layouts/flux/page/slots/footer.js +56 -0
  137. package/dist/layouts/flux/page/slots/toc.d.ts +38 -0
  138. package/dist/layouts/flux/page/slots/toc.js +181 -0
  139. package/dist/layouts/flux/slots/container.d.ts +6 -0
  140. package/dist/layouts/flux/slots/container.js +13 -0
  141. package/dist/layouts/flux/slots/sidebar.d.ts +22 -0
  142. package/dist/layouts/flux/slots/sidebar.js +237 -0
  143. package/dist/layouts/flux/slots/tab-dropdown.d.ts +16 -0
  144. package/dist/layouts/flux/slots/tab-dropdown.js +85 -0
  145. package/dist/layouts/home/index.d.ts +28 -0
  146. package/dist/layouts/home/index.js +40 -0
  147. package/dist/layouts/home/navbar.d.ts +10 -0
  148. package/dist/layouts/home/navbar.js +34 -0
  149. package/dist/layouts/home/not-found.d.ts +7 -0
  150. package/dist/layouts/home/not-found.js +41 -0
  151. package/dist/layouts/home/slots/container.d.ts +6 -0
  152. package/dist/layouts/home/slots/container.js +13 -0
  153. package/dist/layouts/home/slots/header.d.ts +9 -0
  154. package/dist/layouts/home/slots/header.js +239 -0
  155. package/dist/layouts/notebook/client.d.ts +36 -0
  156. package/dist/layouts/notebook/client.js +69 -0
  157. package/dist/layouts/notebook/index.d.ts +37 -0
  158. package/dist/layouts/notebook/index.js +22 -0
  159. package/dist/layouts/notebook/page/index.d.ts +115 -0
  160. package/dist/layouts/notebook/page/index.js +124 -0
  161. package/dist/layouts/notebook/page/slots/breadcrumb.d.ts +13 -0
  162. package/dist/layouts/notebook/page/slots/breadcrumb.js +44 -0
  163. package/dist/layouts/notebook/page/slots/container.d.ts +6 -0
  164. package/dist/layouts/notebook/page/slots/container.js +17 -0
  165. package/dist/layouts/notebook/page/slots/footer.d.ts +22 -0
  166. package/dist/layouts/notebook/page/slots/footer.js +56 -0
  167. package/dist/layouts/notebook/page/slots/toc.d.ts +62 -0
  168. package/dist/layouts/notebook/page/slots/toc.js +181 -0
  169. package/dist/layouts/notebook/slots/container.d.ts +6 -0
  170. package/dist/layouts/notebook/slots/container.js +38 -0
  171. package/dist/layouts/notebook/slots/header.d.ts +6 -0
  172. package/dist/layouts/notebook/slots/header.js +194 -0
  173. package/dist/layouts/notebook/slots/sidebar.d.ts +30 -0
  174. package/dist/layouts/notebook/slots/sidebar.js +298 -0
  175. package/dist/layouts/shared/client.d.ts +44 -0
  176. package/dist/layouts/shared/client.js +84 -0
  177. package/dist/layouts/shared/index.d.ts +178 -0
  178. package/dist/layouts/shared/index.js +98 -0
  179. package/dist/layouts/shared/page-actions.d.ts +35 -0
  180. package/dist/layouts/shared/page-actions.js +195 -0
  181. package/dist/layouts/shared/slots/language-select.d.ts +18 -0
  182. package/dist/layouts/shared/slots/language-select.js +43 -0
  183. package/dist/layouts/shared/slots/search-trigger.d.ts +22 -0
  184. package/dist/layouts/shared/slots/search-trigger.js +53 -0
  185. package/dist/layouts/shared/slots/theme-switch.d.ts +13 -0
  186. package/dist/layouts/shared/slots/theme-switch.js +65 -0
  187. package/dist/legacy/layout.d.ts +36 -0
  188. package/dist/legacy/layout.js +44 -0
  189. package/dist/legacy/sidebar.d.ts +17 -0
  190. package/dist/legacy/sidebar.js +33 -0
  191. package/dist/mdx.d.ts +45 -0
  192. package/dist/mdx.js +70 -0
  193. package/dist/mdx.server.d.ts +15 -0
  194. package/dist/mdx.server.js +20 -0
  195. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/controlled.d.ts +31 -0
  196. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/controlled.js +461 -0
  197. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/index.d.ts +2 -0
  198. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/uncontrolled.d.ts +7 -0
  199. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/uncontrolled.js +17 -0
  200. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/adjust-svg-ids.js +53 -0
  201. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/compute-positioned-style.js +25 -0
  202. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/element-tests.js +12 -0
  203. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/get-div-img-style.js +45 -0
  204. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/get-img-alt.js +8 -0
  205. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/get-img-object-fit-style.js +55 -0
  206. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/get-img-regular-style.js +21 -0
  207. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/get-img-src.js +14 -0
  208. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/get-modal-img-transform.js +22 -0
  209. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/get-scale.js +27 -0
  210. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/get-style-ghost.js +31 -0
  211. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/get-style-modal-img.js +75 -0
  212. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/get-target-dimension.js +4 -0
  213. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/parse-position.js +7 -0
  214. package/dist/node_modules/.bun/react-medium-image-zoom@5.4.8_7492c01c6988791b/node_modules/react-medium-image-zoom/dist/utils/test-has-scalable-src.js +5 -0
  215. package/dist/og/takumi.d.ts +21 -0
  216. package/dist/og/takumi.js +91 -0
  217. package/dist/og.d.ts +22 -0
  218. package/dist/og.js +91 -0
  219. package/dist/page.d.ts +35 -0
  220. package/dist/page.js +33 -0
  221. package/dist/provider/base.d.ts +49 -0
  222. package/dist/provider/base.js +32 -0
  223. package/dist/provider/next.d.ts +20 -0
  224. package/dist/provider/next.js +17 -0
  225. package/dist/provider/react-router.d.ts +20 -0
  226. package/dist/provider/react-router.js +17 -0
  227. package/dist/provider/tanstack.d.ts +20 -0
  228. package/dist/provider/tanstack.js +17 -0
  229. package/dist/provider/waku.d.ts +20 -0
  230. package/dist/provider/waku.js +17 -0
  231. package/dist/style.css +3534 -0
  232. package/dist/tailwind/typography.d.ts +2 -0
  233. package/dist/tailwind/typography.js +2 -0
  234. package/dist/utils/cn.js +2 -0
  235. package/dist/utils/merge-refs.js +11 -0
  236. package/dist/utils/urls.js +15 -0
  237. package/dist/utils/use-copy-button.d.ts +6 -0
  238. package/dist/utils/use-copy-button.js +26 -0
  239. package/dist/utils/use-footer-items.d.ts +9 -0
  240. package/dist/utils/use-footer-items.js +24 -0
  241. package/dist/utils/use-is-scroll-top.d.ts +8 -0
  242. package/dist/utils/use-is-scroll-top.js +20 -0
  243. package/package.json +200 -0
@@ -0,0 +1,181 @@
1
+ "use client";
2
+ import { cn } from "../../../../utils/cn.js";
3
+ import { TOCScrollArea, toc_exports, useItems, useTOCItems } from "../../../../components/toc/index.js";
4
+ import { default_exports } from "../../../../components/toc/default.js";
5
+ import { clerk_exports } from "../../../../components/toc/clerk.js";
6
+ import { useTreePath } from "../../../../contexts/tree.js";
7
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../../components/ui/collapsible.js";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { ChevronDown } from "lucide-react";
10
+ import { createContext, use, useEffect, useEffectEvent, useMemo, useRef, useState } from "react";
11
+ import { useTranslations } from "@fuma-translate/react";
12
+ import { createPortal } from "react-dom";
13
+ import { AnimatePresence, motion } from "motion/react";
14
+ //#region src/layouts/flux/page/slots/toc.tsx
15
+ const TocPopoverContext = createContext(null);
16
+ const { TOCProvider } = toc_exports;
17
+ function TOC({ container, trigger, content, header, footer, style = "normal", list }) {
18
+ const items = useTOCItems();
19
+ const { TOCItems, TOCEmpty, TOCItem } = style === "clerk" ? clerk_exports : default_exports;
20
+ if (items.length === 0 && !header && !footer) return;
21
+ return /* @__PURE__ */ jsxs(PageTOCPopover, {
22
+ ...container,
23
+ children: [/* @__PURE__ */ jsxs(PageTOCPopoverContent, {
24
+ ...content,
25
+ children: [
26
+ header,
27
+ /* @__PURE__ */ jsx(TOCScrollArea, { children: /* @__PURE__ */ jsxs(TOCItems, {
28
+ ...list,
29
+ children: [items.length === 0 && /* @__PURE__ */ jsx(TOCEmpty, {}), items.map((item) => /* @__PURE__ */ jsx(TOCItem, { item }, item.url))]
30
+ }) }),
31
+ footer
32
+ ]
33
+ }), /* @__PURE__ */ jsx(PageTOCPopoverTrigger, { ...trigger })]
34
+ });
35
+ }
36
+ function PageTOCPopover(props) {
37
+ const [container, setContainer] = useState(null);
38
+ useEffect(() => {
39
+ const element = document.getElementById("flux-layout-slot");
40
+ if (!element) return;
41
+ setContainer(element);
42
+ }, []);
43
+ if (!container) return;
44
+ return createPortal(/* @__PURE__ */ jsx(PageTOCPopoverPhysical, { ...props }), container);
45
+ }
46
+ function PageTOCPopoverPhysical({ className, children, ...rest }) {
47
+ const ref = useRef(null);
48
+ const [open, setOpen] = useState(false);
49
+ const onClick = useEffectEvent((e) => {
50
+ if (!open) return;
51
+ if (ref.current && !ref.current.contains(e.target)) setOpen(false);
52
+ });
53
+ useEffect(() => {
54
+ window.addEventListener("click", onClick);
55
+ return () => {
56
+ window.removeEventListener("click", onClick);
57
+ };
58
+ }, []);
59
+ return /* @__PURE__ */ jsx(TocPopoverContext, {
60
+ value: useMemo(() => ({
61
+ open,
62
+ setOpen
63
+ }), [setOpen, open]),
64
+ children: /* @__PURE__ */ jsx(Collapsible, {
65
+ open,
66
+ onOpenChange: setOpen,
67
+ "data-toc-popover": "",
68
+ className: cn("relative h-9 animate-fd-fade-in", className),
69
+ ...rest,
70
+ children: /* @__PURE__ */ jsx("header", {
71
+ ref,
72
+ className: cn("absolute w-full bottom-0 border rounded-xl transition-colors bg-fd-secondary text-fd-secondary-foreground backdrop-blur-sm", open && "shadow-lg bg-fd-popover/80 text-fd-popover-foreground"),
73
+ children
74
+ })
75
+ })
76
+ });
77
+ }
78
+ function PageTOCPopoverTrigger({ className, ...props }) {
79
+ const t = useTranslations({ note: "table of contents" });
80
+ const { open } = use(TocPopoverContext);
81
+ const items = useItems();
82
+ const selectedIdx = items.findIndex((item) => item.active);
83
+ const path = useTreePath().at(-1);
84
+ const spanProps = {
85
+ transition: { duration: .1 },
86
+ initial: {
87
+ opacity: 0,
88
+ y: 10
89
+ },
90
+ animate: {
91
+ opacity: 1,
92
+ y: 0
93
+ },
94
+ exit: {
95
+ opacity: 0,
96
+ y: -10
97
+ },
98
+ className: cn(open && "text-fd-popover-foreground")
99
+ };
100
+ return /* @__PURE__ */ jsxs(CollapsibleTrigger, {
101
+ className: cn("flex w-full h-8.5 items-center text-sm text-fd-muted-foreground gap-2.5 px-2 text-start focus-visible:outline-none [&_svg]:size-4", className),
102
+ "data-toc-popover-trigger": "",
103
+ ...props,
104
+ children: [
105
+ /* @__PURE__ */ jsx(ProgressCircle, {
106
+ value: (items.findLastIndex((item) => item.active) + 1) / Math.max(1, items.length),
107
+ max: 1,
108
+ className: cn("shrink-0", open && "text-fd-primary")
109
+ }),
110
+ /* @__PURE__ */ jsx(AnimatePresence, {
111
+ mode: "wait",
112
+ children: items[selectedIdx] && !open ? /* @__PURE__ */ jsx(motion.span, {
113
+ ...spanProps,
114
+ children: items[selectedIdx].original.title
115
+ }, selectedIdx) : path ? /* @__PURE__ */ jsx(motion.span, {
116
+ ...spanProps,
117
+ children: path.name
118
+ }, path.$id ?? ":pathId") : /* @__PURE__ */ jsx(motion.span, {
119
+ ...spanProps,
120
+ children: t("On this page")
121
+ }, ":toc")
122
+ }),
123
+ /* @__PURE__ */ jsx(ChevronDown, { className: cn("ms-auto shrink-0 transition-transform", open && "rotate-180") })
124
+ ]
125
+ });
126
+ }
127
+ function clamp(input, min, max) {
128
+ if (input < min) return min;
129
+ if (input > max) return max;
130
+ return input;
131
+ }
132
+ function ProgressCircle({ value, strokeWidth = 1.5, size = 18, min = 0, max = 100, style, ...restSvgProps }) {
133
+ const normalizedValue = clamp(value, min, max);
134
+ const radius = size / 2 - strokeWidth;
135
+ const circumference = 2 * Math.PI * radius;
136
+ const progress = normalizedValue / max * circumference;
137
+ const circleProps = {
138
+ cx: size / 2,
139
+ cy: size / 2,
140
+ r: radius,
141
+ fill: "none",
142
+ strokeWidth
143
+ };
144
+ return /* @__PURE__ */ jsxs("svg", {
145
+ role: "progressbar",
146
+ viewBox: `0 0 ${size} ${size}`,
147
+ "aria-valuenow": normalizedValue,
148
+ "aria-valuemin": min,
149
+ "aria-valuemax": max,
150
+ style: {
151
+ width: size,
152
+ height: size,
153
+ ...style
154
+ },
155
+ ...restSvgProps,
156
+ children: [/* @__PURE__ */ jsx("circle", {
157
+ ...circleProps,
158
+ className: "stroke-current/25"
159
+ }), /* @__PURE__ */ jsx("circle", {
160
+ ...circleProps,
161
+ stroke: "currentColor",
162
+ strokeDasharray: circumference,
163
+ strokeDashoffset: circumference - progress,
164
+ strokeLinecap: "round",
165
+ transform: `rotate(-90 ${size / 2} ${size / 2})`,
166
+ className: "transition-all"
167
+ })]
168
+ });
169
+ }
170
+ function PageTOCPopoverContent(props) {
171
+ return /* @__PURE__ */ jsx(CollapsibleContent, {
172
+ "data-toc-popover-content": "",
173
+ ...props,
174
+ children: /* @__PURE__ */ jsx("div", {
175
+ className: "flex flex-col px-2 max-h-[50vh]",
176
+ children: props.children
177
+ })
178
+ });
179
+ }
180
+ //#endregion
181
+ export { TOC, TOCProvider };
@@ -0,0 +1,6 @@
1
+ import { ComponentProps } from "react";
2
+
3
+ //#region src/layouts/flux/slots/container.d.ts
4
+ declare function Container(props: ComponentProps<'div'>): import("react").JSX.Element;
5
+ //#endregion
6
+ export { Container };
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { cn } from "../../../utils/cn.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/layouts/flux/slots/container.tsx
5
+ function Container(props) {
6
+ return /* @__PURE__ */ jsx("div", {
7
+ id: "nd-flux-layout",
8
+ ...props,
9
+ className: cn("flex flex-col items-center pb-24 overflow-x-clip", props.className)
10
+ });
11
+ }
12
+ //#endregion
13
+ export { Container };
@@ -0,0 +1,22 @@
1
+ import { SidebarProviderProps as SidebarProviderProps$1, useSidebar as useSidebar$1 } from "../../../components/sidebar/base.js";
2
+ import { SidebarPageTreeComponents } from "../../../components/sidebar/page-tree.js";
3
+ import { ComponentProps, ReactNode } from "react";
4
+
5
+ //#region src/layouts/flux/slots/sidebar.d.ts
6
+ interface SidebarProps extends ComponentProps<'aside'> {
7
+ components?: Partial<SidebarPageTreeComponents>;
8
+ banner?: ReactNode;
9
+ footer?: ReactNode;
10
+ }
11
+ type SidebarProviderProps = SidebarProviderProps$1;
12
+ declare const useSidebar: typeof useSidebar$1;
13
+ declare function SidebarProvider(props: SidebarProviderProps): import("react").JSX.Element;
14
+ declare function Sidebar({
15
+ footer,
16
+ banner,
17
+ components,
18
+ ...rest
19
+ }: SidebarProps): import("react").JSX.Element;
20
+ declare function SidebarTrigger(props: ComponentProps<'button'>): import("react").JSX.Element;
21
+ //#endregion
22
+ export { Sidebar, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarTrigger, useSidebar };
@@ -0,0 +1,237 @@
1
+ "use client";
2
+ import { cn } from "../../../utils/cn.js";
3
+ import { mergeRefs } from "../../../utils/merge-refs.js";
4
+ import { SidebarFolder as SidebarFolder$1, SidebarFolderContent as SidebarFolderContent$1, SidebarFolderLink as SidebarFolderLink$1, SidebarFolderTrigger as SidebarFolderTrigger$1, SidebarItem as SidebarItem$1, SidebarProvider as SidebarProvider$1, SidebarSeparator as SidebarSeparator$1, SidebarViewport, base_exports, useFolder, useFolderDepth } from "../../../components/sidebar/base.js";
5
+ import { createPageTreeRenderer } from "../../../components/sidebar/page-tree.js";
6
+ import { createLinkItemRenderer } from "../../../components/sidebar/link-item.js";
7
+ import { useFluxLayout } from "../index.js";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { SidebarIcon, XIcon } from "lucide-react";
10
+ import { cva } from "class-variance-authority";
11
+ import { useEffect, useEffectEvent, useRef, useState } from "react";
12
+ import { AnimatePresence, motion } from "motion/react";
13
+ import { RemoveScroll } from "react-remove-scroll";
14
+ //#region src/layouts/flux/slots/sidebar.tsx
15
+ const MotionSidebarItem = motion.create(SidebarItem$1);
16
+ const MotionSidebarFolderTrigger = motion.create(SidebarFolderTrigger$1);
17
+ const MotionSidebarFolderLink = motion.create(SidebarFolderLink$1);
18
+ const MotionSidebarFolderContent = motion.create(SidebarFolderContent$1);
19
+ const itemVariants = cva("relative flex flex-row items-center gap-2 rounded-lg p-2 text-start text-fd-muted-foreground wrap-anywhere [&_svg]:size-4 [&_svg]:shrink-0", { variants: {
20
+ variant: {
21
+ link: "transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none data-[active=true]:bg-fd-primary/10 data-[active=true]:text-fd-primary data-[active=true]:hover:transition-colors",
22
+ button: "transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none"
23
+ },
24
+ highlight: { true: "data-[active=true]:before:content-[''] data-[active=true]:before:bg-fd-primary data-[active=true]:before:absolute data-[active=true]:before:w-px data-[active=true]:before:inset-y-2.5 data-[active=true]:before:start-2.5" }
25
+ } });
26
+ function getItemOffset(depth) {
27
+ return `calc(${2 + 3 * depth} * var(--spacing))`;
28
+ }
29
+ const { useSidebar } = base_exports;
30
+ function SidebarProvider(props) {
31
+ return /* @__PURE__ */ jsx(SidebarProvider$1, { ...props });
32
+ }
33
+ function Sidebar({ footer, banner, components, ...rest }) {
34
+ const { menuItems } = useFluxLayout();
35
+ return /* @__PURE__ */ jsxs(SidebarContent, {
36
+ ...rest,
37
+ children: [
38
+ /* @__PURE__ */ jsx("div", {
39
+ className: "flex flex-col gap-3 p-4 pb-2 empty:hidden",
40
+ children: banner
41
+ }),
42
+ /* @__PURE__ */ jsxs(SidebarViewport, {
43
+ viewport: { className: "*:gap-0!" },
44
+ children: [menuItems.filter((v) => v.type !== "icon").map((item, i, list) => /* @__PURE__ */ jsx(SidebarLinkItem, {
45
+ item,
46
+ className: cn(i === list.length - 1 && "mb-4")
47
+ }, i)), /* @__PURE__ */ jsx(SidebarPageTree, { ...components })]
48
+ }),
49
+ footer
50
+ ]
51
+ });
52
+ }
53
+ function SidebarTrigger(props) {
54
+ const { open, setOpen } = useSidebar();
55
+ return /* @__PURE__ */ jsx("button", {
56
+ onClick: () => setOpen((prev) => !prev),
57
+ ...props,
58
+ children: /* @__PURE__ */ jsx(AnimatePresence, {
59
+ mode: "wait",
60
+ children: /* @__PURE__ */ jsx(motion.span, {
61
+ transition: { duration: .2 },
62
+ initial: {
63
+ y: "100%",
64
+ opacity: 0
65
+ },
66
+ animate: {
67
+ y: 0,
68
+ opacity: 1
69
+ },
70
+ exit: {
71
+ y: "100%",
72
+ opacity: 0
73
+ },
74
+ children: open ? /* @__PURE__ */ jsx(XIcon, {}) : /* @__PURE__ */ jsx(SidebarIcon, {})
75
+ }, open ? "open" : "closed")
76
+ })
77
+ });
78
+ }
79
+ function SidebarContent({ ref: refProp, className, children, ...props }) {
80
+ const ref = useRef(null);
81
+ const [blockScroll, setBlockScroll] = useState(false);
82
+ const { open, setOpen } = useSidebar();
83
+ const listener = useEffectEvent((e) => {
84
+ if (open && e.key === "Escape") {
85
+ setOpen(false);
86
+ e.preventDefault();
87
+ }
88
+ });
89
+ useEffect(() => {
90
+ window.addEventListener("keydown", listener);
91
+ return () => {
92
+ window.removeEventListener("keydown", listener);
93
+ };
94
+ }, []);
95
+ if (open && !blockScroll) setBlockScroll(true);
96
+ return /* @__PURE__ */ jsx(RemoveScroll, {
97
+ enabled: blockScroll,
98
+ children: /* @__PURE__ */ jsx(motion.div, {
99
+ className: cn("fixed inset-0 py-10 z-30 backdrop-blur-md bg-fd-background/60", !open && "pointer-events-none"),
100
+ initial: "hide",
101
+ variants: {
102
+ show: { opacity: 1 },
103
+ hide: { opacity: 0 }
104
+ },
105
+ animate: open ? "show" : "hide",
106
+ exit: "hide",
107
+ onClick: () => {
108
+ setOpen(false);
109
+ },
110
+ onAnimationComplete: (definition) => {
111
+ if (definition === "hide") setBlockScroll(false);
112
+ },
113
+ children: /* @__PURE__ */ jsx(motion.div, {
114
+ className: "absolute top-0 min-h-0 inset-x-0 bottom-26 overflow-y-auto fd-scroll-container pr-(--removed-body-scroll-bar-size,0) py-16 mask-[linear-gradient(to_bottom,transparent,white_--spacing(14),white_calc(100%---spacing(14)),transparent)] lg:text-sm",
115
+ variants: {
116
+ show: {
117
+ y: 0,
118
+ opacity: 1
119
+ },
120
+ hide: {
121
+ y: "80%",
122
+ opacity: 0
123
+ }
124
+ },
125
+ transition: {
126
+ duration: .4,
127
+ ease: [
128
+ .16,
129
+ 1,
130
+ .3,
131
+ 1
132
+ ]
133
+ },
134
+ children: /* @__PURE__ */ jsx(motion.aside, {
135
+ id: "nd-sidebar",
136
+ ref: mergeRefs(ref, refProp),
137
+ className: cn("mx-auto sm:max-w-[400px]", className),
138
+ onClick: (e) => e.stopPropagation(),
139
+ ...props,
140
+ children
141
+ })
142
+ })
143
+ })
144
+ });
145
+ }
146
+ function SidebarFolder(props) {
147
+ return /* @__PURE__ */ jsx(SidebarFolder$1, { ...props });
148
+ }
149
+ function SidebarSeparator({ className, style, children, ...props }) {
150
+ const depth = useFolderDepth();
151
+ return /* @__PURE__ */ jsx(SidebarSeparator$1, {
152
+ className: cn("inline-flex items-center gap-2 mb-1.5 px-2 mt-6 empty:mb-0 [&_svg]:size-4 [&_svg]:shrink-0", depth === 0 && "first:mt-0", className),
153
+ style: {
154
+ paddingInlineStart: getItemOffset(depth),
155
+ ...style
156
+ },
157
+ ...props,
158
+ children
159
+ });
160
+ }
161
+ function SidebarItem({ className, style, children, ...props }) {
162
+ const depth = useFolderDepth();
163
+ return /* @__PURE__ */ jsx(MotionSidebarItem, {
164
+ className: cn(itemVariants({
165
+ variant: "link",
166
+ highlight: depth >= 1
167
+ }), className),
168
+ style: {
169
+ paddingInlineStart: getItemOffset(depth),
170
+ ...style
171
+ },
172
+ ...props,
173
+ children
174
+ });
175
+ }
176
+ function SidebarFolderTrigger({ className, style, ...props }) {
177
+ const { depth, collapsible } = useFolder();
178
+ return /* @__PURE__ */ jsx(MotionSidebarFolderTrigger, {
179
+ className: cn(itemVariants({ variant: collapsible ? "button" : null }), "w-full", className),
180
+ style: {
181
+ paddingInlineStart: getItemOffset(depth - 1),
182
+ ...style
183
+ },
184
+ ...props,
185
+ children: props.children
186
+ });
187
+ }
188
+ function SidebarFolderLink({ className, style, ...props }) {
189
+ const depth = useFolderDepth();
190
+ return /* @__PURE__ */ jsx(MotionSidebarFolderLink, {
191
+ className: cn(itemVariants({
192
+ variant: "link",
193
+ highlight: depth > 1
194
+ }), "w-full", className),
195
+ style: {
196
+ paddingInlineStart: getItemOffset(depth - 1),
197
+ ...style
198
+ },
199
+ ...props,
200
+ children: props.children
201
+ });
202
+ }
203
+ function SidebarFolderContent({ className, children, ...props }) {
204
+ const depth = useFolderDepth();
205
+ const { open } = useFolder();
206
+ return /* @__PURE__ */ jsx(MotionSidebarFolderContent, {
207
+ className: cn("relative", depth === 1 && "before:content-[''] before:absolute before:w-px before:inset-y-1 before:bg-fd-border before:start-2.5", className),
208
+ ...props,
209
+ children: /* @__PURE__ */ jsx(motion.div, {
210
+ initial: "hide",
211
+ animate: open ? "show" : "hide",
212
+ exit: "hide",
213
+ variants: {
214
+ show: { opacity: 1 },
215
+ hide: { opacity: 0 }
216
+ },
217
+ children
218
+ })
219
+ });
220
+ }
221
+ const SidebarPageTree = createPageTreeRenderer({
222
+ SidebarFolder,
223
+ SidebarFolderContent,
224
+ SidebarSeparator,
225
+ SidebarFolderLink,
226
+ SidebarFolderTrigger,
227
+ SidebarItem
228
+ });
229
+ const SidebarLinkItem = createLinkItemRenderer({
230
+ SidebarFolder,
231
+ SidebarFolderContent,
232
+ SidebarFolderLink,
233
+ SidebarFolderTrigger,
234
+ SidebarItem
235
+ });
236
+ //#endregion
237
+ export { Sidebar, SidebarProvider, SidebarTrigger, useSidebar };
@@ -0,0 +1,16 @@
1
+ import { LayoutTab } from "../../shared/index.js";
2
+ import { ComponentProps, ReactNode } from "react";
3
+
4
+ //#region src/layouts/flux/slots/tab-dropdown.d.ts
5
+ interface TabDropdownProps extends ComponentProps<'button'> {
6
+ placeholder?: ReactNode;
7
+ tabs: LayoutTab[];
8
+ }
9
+ declare function TabDropdown({
10
+ tabs,
11
+ placeholder,
12
+ className,
13
+ ...props
14
+ }: TabDropdownProps): import("react").JSX.Element;
15
+ //#endregion
16
+ export { TabDropdown, TabDropdownProps };
@@ -0,0 +1,85 @@
1
+ "use client";
2
+ import { cn } from "../../../utils/cn.js";
3
+ import { Popover, PopoverContent, PopoverTrigger } from "../../../components/ui/popover.js";
4
+ import { isLayoutTabActive } from "../../shared/index.js";
5
+ import Link from "fumadocs-core/link";
6
+ import { usePathname } from "fumadocs-core/framework";
7
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
+ import { Check, ChevronsUpDown } from "lucide-react";
9
+ import { useMemo, useState } from "react";
10
+ import { AnimatePresence, motion } from "motion/react";
11
+ //#region src/layouts/flux/slots/tab-dropdown.tsx
12
+ function TabDropdown({ tabs, placeholder, className, ...props }) {
13
+ const [open, setOpen] = useState(false);
14
+ const pathname = usePathname();
15
+ const selectedIdx = useMemo(() => {
16
+ return tabs.findLastIndex((item) => isLayoutTabActive(item, pathname));
17
+ }, [tabs, pathname]);
18
+ const selected = selectedIdx !== -1 ? tabs[selectedIdx] : void 0;
19
+ const onClick = () => {
20
+ setOpen(false);
21
+ };
22
+ const item = selected ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
23
+ className: "size-4.5 shrink-0 empty:hidden",
24
+ children: selected.icon
25
+ }), /* @__PURE__ */ jsx("p", {
26
+ className: "font-medium",
27
+ children: selected.title
28
+ })] }) : placeholder;
29
+ return /* @__PURE__ */ jsxs(Popover, {
30
+ open,
31
+ onOpenChange: setOpen,
32
+ children: [item && /* @__PURE__ */ jsxs(PopoverTrigger, {
33
+ className: cn("flex items-center gap-2 rounded-xl overflow-hidden p-1.5 border shadow-sm text-sm text-start transition-colors hover:bg-fd-accent hover:text-fd-accent-foreground data-[state=open]:bg-fd-accent data-[state=open]:text-fd-accent-foreground", className),
34
+ ...props,
35
+ children: [/* @__PURE__ */ jsx(AnimatePresence, {
36
+ mode: "popLayout",
37
+ children: /* @__PURE__ */ jsx(motion.span, {
38
+ className: "flex w-full min-w-0 overflow-hidden items-center text-nowrap gap-1.5",
39
+ initial: {
40
+ opacity: 0,
41
+ y: "100%"
42
+ },
43
+ animate: {
44
+ opacity: 1,
45
+ y: 0
46
+ },
47
+ exit: {
48
+ opacity: 0,
49
+ y: "-100%"
50
+ },
51
+ children: item
52
+ }, selectedIdx)
53
+ }), /* @__PURE__ */ jsx(ChevronsUpDown, { className: "shrink-0 ms-auto size-4 text-fd-muted-foreground" })]
54
+ }), /* @__PURE__ */ jsx(PopoverContent, {
55
+ align: "start",
56
+ className: "flex flex-col gap-1 max-w-svw p-1 fd-scroll-container",
57
+ children: tabs.map((item, i) => {
58
+ const isActive = i === selectedIdx;
59
+ if (!isActive && item.unlisted) return;
60
+ return /* @__PURE__ */ jsxs(Link, {
61
+ href: item.url,
62
+ onClick,
63
+ ...item.props,
64
+ className: cn("flex items-center gap-1.5 rounded-lg p-1.5 hover:bg-fd-accent hover:text-fd-accent-foreground", item.props?.className),
65
+ children: [
66
+ /* @__PURE__ */ jsx("div", {
67
+ className: "shrink-0 mb-auto size-4.5 empty:hidden",
68
+ children: item.icon
69
+ }),
70
+ /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
71
+ className: "text-sm font-medium leading-none",
72
+ children: item.title
73
+ }), /* @__PURE__ */ jsx("p", {
74
+ className: "text-[0.8125rem] text-fd-muted-foreground mt-1 empty:hidden",
75
+ children: item.description
76
+ })] }),
77
+ /* @__PURE__ */ jsx(Check, { className: cn("shrink-0 ms-auto size-3.5 text-fd-primary", !isActive && "invisible") })
78
+ ]
79
+ }, item.url);
80
+ })
81
+ })]
82
+ });
83
+ }
84
+ //#endregion
85
+ export { TabDropdown };
@@ -0,0 +1,28 @@
1
+ import { BaseSlots, BaseSlotsProps } from "../shared/client.js";
2
+ import { BaseLayoutProps, LinkItemType, NavOptions } from "../shared/index.js";
3
+ import { ComponentProps, FC } from "react";
4
+
5
+ //#region src/layouts/home/index.d.ts
6
+ interface HomeLayoutProps extends BaseLayoutProps, ComponentProps<'main'> {
7
+ nav?: Nav;
8
+ slots?: Partial<HomeSlots>;
9
+ }
10
+ interface Nav extends NavOptions {
11
+ /**
12
+ * Open mobile menu when hovering the trigger
13
+ */
14
+ enableHoverToOpen?: boolean;
15
+ }
16
+ interface HomeSlots extends BaseSlots {
17
+ header: FC<ComponentProps<'header'>>;
18
+ container: FC<ComponentProps<'main'>>;
19
+ }
20
+ declare function useHomeLayout(): {
21
+ props: BaseSlotsProps<HomeLayoutProps>;
22
+ navItems: LinkItemType[];
23
+ menuItems: LinkItemType[];
24
+ slots: HomeSlots;
25
+ };
26
+ declare function HomeLayout(props: HomeLayoutProps): import("react").JSX.Element;
27
+ //#endregion
28
+ export { HomeLayout, HomeLayoutProps, HomeSlots, useHomeLayout };
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ import { baseSlots } from "../shared/client.js";
3
+ import { useLinkItems } from "../shared/index.js";
4
+ import { Container } from "./slots/container.js";
5
+ import { Header } from "./slots/header.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { createContext, use } from "react";
8
+ //#region src/layouts/home/index.tsx
9
+ const LayoutContext = createContext(null);
10
+ function useHomeLayout() {
11
+ const context = use(LayoutContext);
12
+ if (!context) throw new Error("Please use this component under <HomeLayout /> (`opin-ui/layouts/home`).");
13
+ return context;
14
+ }
15
+ const { useProvider } = baseSlots({ useProps() {
16
+ return useHomeLayout().props;
17
+ } });
18
+ function HomeLayout(props) {
19
+ const { nav: { enabled: navEnabled = true } = {}, slots: defaultSlots, children, i18n: _i18n, githubUrl: _githubUrl, links: _links, themeSwitch: _themeSwitch, searchToggle: _searchToggle, ...rest } = props;
20
+ const { baseSlots, baseProps } = useProvider(props);
21
+ const linkItems = useLinkItems(props);
22
+ const slots = {
23
+ ...baseSlots,
24
+ header: defaultSlots?.header ?? Header,
25
+ container: defaultSlots?.container ?? Container
26
+ };
27
+ return /* @__PURE__ */ jsx(LayoutContext, {
28
+ value: {
29
+ props: baseProps,
30
+ slots,
31
+ ...linkItems
32
+ },
33
+ children: /* @__PURE__ */ jsxs(slots.container, {
34
+ ...rest,
35
+ children: [navEnabled && /* @__PURE__ */ jsx(slots.header, {}), children]
36
+ })
37
+ });
38
+ }
39
+ //#endregion
40
+ export { HomeLayout, useHomeLayout };
@@ -0,0 +1,10 @@
1
+ import { NavigationMenuContentProps, NavigationMenuItem, NavigationMenuTriggerProps } from "../../components/ui/navigation-menu.js";
2
+ import { LinkProps } from "fumadocs-core/link";
3
+
4
+ //#region src/layouts/home/navbar.d.ts
5
+ declare const NavbarMenu: typeof NavigationMenuItem;
6
+ declare function NavbarMenuContent(props: NavigationMenuContentProps): import("react").JSX.Element;
7
+ declare function NavbarMenuTrigger(props: NavigationMenuTriggerProps): import("react").JSX.Element;
8
+ declare function NavbarMenuLink(props: LinkProps): import("react").JSX.Element;
9
+ //#endregion
10
+ export { NavbarMenu, NavbarMenuContent, NavbarMenuLink, NavbarMenuTrigger };
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { cn } from "../../utils/cn.js";
3
+ import { NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuTrigger } from "../../components/ui/navigation-menu.js";
4
+ import { navItemVariants } from "./slots/header.js";
5
+ import Link from "fumadocs-core/link";
6
+ import { jsx } from "react/jsx-runtime";
7
+ //#region src/layouts/home/navbar.tsx
8
+ const NavbarMenu = NavigationMenuItem;
9
+ function NavbarMenuContent(props) {
10
+ return /* @__PURE__ */ jsx(NavigationMenuContent, {
11
+ ...props,
12
+ className: cn("grid grid-cols-1 gap-2 p-4 md:grid-cols-2 lg:grid-cols-3", props.className),
13
+ children: props.children
14
+ });
15
+ }
16
+ function NavbarMenuTrigger(props) {
17
+ return /* @__PURE__ */ jsx(NavigationMenuTrigger, {
18
+ ...props,
19
+ className: cn(navItemVariants(), "text-sm rounded-md", props.className),
20
+ children: props.children
21
+ });
22
+ }
23
+ function NavbarMenuLink(props) {
24
+ return /* @__PURE__ */ jsx(NavigationMenuLink, {
25
+ asChild: true,
26
+ children: /* @__PURE__ */ jsx(Link, {
27
+ ...props,
28
+ className: cn("flex flex-col gap-2 rounded-lg border bg-fd-card p-3 transition-colors hover:bg-fd-accent/80 hover:text-fd-accent-foreground", props.className),
29
+ children: props.children
30
+ })
31
+ });
32
+ }
33
+ //#endregion
34
+ export { NavbarMenu, NavbarMenuContent, NavbarMenuLink, NavbarMenuTrigger };