fumadocs-ui 12.2.3 → 12.2.5
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/dist/{chunk-B2SICS6I.js → chunk-FOIG7ZU7.js} +1 -8
- package/dist/{chunk-G7WCPUM7.js → chunk-U2R7CI27.js} +12 -25
- package/dist/components/callout.d.ts +1 -1
- package/dist/components/dialog/search-algolia.js +1 -1
- package/dist/components/dialog/search-default.js +1 -1
- package/dist/components/dialog/search.js +1 -1
- package/dist/docs.client.js +1 -1
- package/dist/layout.client.js +1 -1
- package/package.json +4 -4
|
@@ -109,14 +109,7 @@ function NavBox({
|
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
111
|
function Title({ title, url = "/" }) {
|
|
112
|
-
return /* @__PURE__ */ jsx2(
|
|
113
|
-
Link,
|
|
114
|
-
{
|
|
115
|
-
href: url,
|
|
116
|
-
className: "inline-flex items-center gap-2.5 font-semibold [&_svg]:size-5",
|
|
117
|
-
children: title
|
|
118
|
-
}
|
|
119
|
-
);
|
|
112
|
+
return /* @__PURE__ */ jsx2(Link, { href: url, className: "inline-flex items-center gap-2.5 font-semibold", children: title });
|
|
120
113
|
}
|
|
121
114
|
|
|
122
115
|
// src/components/layout/link-item.tsx
|
|
@@ -17,26 +17,14 @@ import {
|
|
|
17
17
|
// src/components/dialog/search.tsx
|
|
18
18
|
import { FileTextIcon, HashIcon, TextIcon } from "lucide-react";
|
|
19
19
|
import { useRouter } from "next/navigation";
|
|
20
|
-
import { useMemo } from "react";
|
|
20
|
+
import { useMemo, useCallback } from "react";
|
|
21
21
|
|
|
22
22
|
// src/components/ui/command.tsx
|
|
23
23
|
import { Command as CommandPrimitive } from "cmdk";
|
|
24
24
|
import { Search } from "lucide-react";
|
|
25
25
|
import * as React from "react";
|
|
26
|
-
import { DialogClose } from "@radix-ui/react-dialog";
|
|
27
26
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
28
|
-
var
|
|
29
|
-
CommandPrimitive,
|
|
30
|
-
{
|
|
31
|
-
ref,
|
|
32
|
-
className: twMerge("flex max-h-[80vh] flex-col", className),
|
|
33
|
-
shouldFilter: false,
|
|
34
|
-
loop: true,
|
|
35
|
-
...props
|
|
36
|
-
}
|
|
37
|
-
));
|
|
38
|
-
Command.displayName = CommandPrimitive.displayName;
|
|
39
|
-
var CommandInput = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center gap-2 px-3", children: [
|
|
27
|
+
var CommandInput = React.forwardRef(({ className, onClose, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center gap-2 px-3", children: [
|
|
40
28
|
/* @__PURE__ */ jsx(Search, { className: "size-4 text-muted-foreground" }),
|
|
41
29
|
/* @__PURE__ */ jsx(
|
|
42
30
|
CommandPrimitive.Input,
|
|
@@ -50,8 +38,11 @@ var CommandInput = React.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
50
38
|
}
|
|
51
39
|
),
|
|
52
40
|
/* @__PURE__ */ jsx(
|
|
53
|
-
|
|
41
|
+
"button",
|
|
54
42
|
{
|
|
43
|
+
type: "button",
|
|
44
|
+
"aria-label": "Close Search",
|
|
45
|
+
onClick: onClose,
|
|
55
46
|
className: twMerge(
|
|
56
47
|
buttonVariants({
|
|
57
48
|
color: "outline",
|
|
@@ -125,20 +116,14 @@ var CommandItem = React.forwardRef(({ className, icon, nested = false, children,
|
|
|
125
116
|
}
|
|
126
117
|
));
|
|
127
118
|
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
128
|
-
var CommandDialog = React.forwardRef(({ footer,
|
|
119
|
+
var CommandDialog = React.forwardRef(({ footer, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
129
120
|
CommandPrimitive.Dialog,
|
|
130
121
|
{
|
|
131
122
|
ref,
|
|
132
123
|
shouldFilter: false,
|
|
133
124
|
loop: true,
|
|
134
|
-
contentClassName:
|
|
135
|
-
|
|
136
|
-
contentClassName
|
|
137
|
-
),
|
|
138
|
-
overlayClassName: twMerge(
|
|
139
|
-
"fixed inset-0 z-50 bg-background/50 backdrop-blur-sm data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in",
|
|
140
|
-
overlayClassName
|
|
141
|
-
),
|
|
125
|
+
contentClassName: "fixed left-1/2 top-[10vh] z-50 w-[98vw] max-w-screen-sm origin-left -translate-x-1/2 rounded-lg border bg-popover text-popover-foreground shadow-lg data-[state=closed]:animate-dialog-out data-[state=open]:animate-dialog-in",
|
|
126
|
+
overlayClassName: "fixed inset-0 z-50 bg-background/50 backdrop-blur-sm data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in",
|
|
142
127
|
...props,
|
|
143
128
|
children: [
|
|
144
129
|
children,
|
|
@@ -147,7 +132,6 @@ var CommandDialog = React.forwardRef(({ footer, contentClassName, overlayClassNa
|
|
|
147
132
|
}
|
|
148
133
|
));
|
|
149
134
|
CommandDialog.displayName = CommandPrimitive.Dialog.displayName;
|
|
150
|
-
var CommandDialogClose = DialogClose;
|
|
151
135
|
|
|
152
136
|
// src/components/dialog/search.tsx
|
|
153
137
|
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -201,6 +185,9 @@ function Search2({
|
|
|
201
185
|
{
|
|
202
186
|
value: search,
|
|
203
187
|
onValueChange: onSearchChange,
|
|
188
|
+
onClose: useCallback(() => {
|
|
189
|
+
setOpenSearch(false);
|
|
190
|
+
}, [setOpenSearch]),
|
|
204
191
|
placeholder: text.search
|
|
205
192
|
}
|
|
206
193
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
-
declare const Callout: React.ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "title" | "
|
|
4
|
+
declare const Callout: React.ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "title" | "icon" | "type"> & {
|
|
5
5
|
title?: ReactNode;
|
|
6
6
|
/**
|
|
7
7
|
* @defaultValue info
|
package/dist/docs.client.js
CHANGED
package/dist/layout.client.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.5",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"next-themes": "^0.3.0",
|
|
96
96
|
"react-medium-image-zoom": "^5.2.4",
|
|
97
97
|
"tailwind-merge": "^2.3.0",
|
|
98
|
-
"fumadocs-core": "12.2.
|
|
98
|
+
"fumadocs-core": "12.2.5"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@algolia/client-search": "^4.23.3",
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
"postcss-cli": "^11.0.0",
|
|
109
109
|
"postcss-lightningcss": "^1.0.0",
|
|
110
110
|
"tailwindcss": "^3.4.4",
|
|
111
|
-
"
|
|
112
|
-
"
|
|
111
|
+
"tsconfig": "0.0.0",
|
|
112
|
+
"eslint-config-custom": "0.0.0"
|
|
113
113
|
},
|
|
114
114
|
"peerDependencies": {
|
|
115
115
|
"next": ">= 14.1.0",
|