@docubook/create 1.12.0 → 1.13.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/package.json +1 -1
- package/src/dist/.vscode/card.code-snippets +52 -14
- package/src/dist/.vscode/table.code-snippets +10 -18
- package/src/dist/app/page.tsx +2 -2
- package/src/dist/components/context-popover.tsx +133 -0
- package/src/dist/components/docs-menu.tsx +39 -21
- package/src/dist/components/footer.tsx +4 -2
- package/src/dist/components/leftbar.tsx +10 -4
- package/src/dist/components/markdown/CardGroupMdx.tsx +1 -1
- package/src/dist/components/markdown/CardMdx.tsx +5 -4
- package/src/dist/components/markdown/FileTreeMdx.tsx +52 -33
- package/src/dist/components/markdown/KeyboardMdx.tsx +1 -1
- package/src/dist/components/markdown/NoteMdx.tsx +1 -1
- package/src/dist/components/markdown/StepperMdx.tsx +2 -2
- package/src/dist/components/markdown/TooltipsMdx.tsx +6 -3
- package/src/dist/components/navbar.tsx +3 -3
- package/src/dist/components/search.tsx +36 -4
- package/src/dist/components/sublink.tsx +7 -6
- package/src/dist/components/theme-toggle.tsx +10 -10
- package/src/dist/components/toc-observer.tsx +9 -9
- package/src/dist/contents/docs/{getting-started/changelog → changelog/version-1}/index.mdx +45 -3
- package/src/dist/contents/docs/components/accordion/index.mdx +86 -0
- package/src/dist/contents/docs/components/button/index.mdx +40 -0
- package/src/dist/contents/docs/{getting-started/components → components}/card/index.mdx +9 -11
- package/src/dist/contents/docs/{getting-started/components → components}/card-group/index.mdx +2 -4
- package/src/dist/contents/docs/{getting-started/components → components}/code-block/index.mdx +2 -4
- package/src/dist/contents/docs/{getting-started/components → components}/file-tree/index.mdx +3 -3
- package/src/dist/contents/docs/{getting-started/components → components}/index.mdx +1 -1
- package/src/dist/contents/docs/{getting-started/components → components}/keyboard/index.mdx +3 -3
- package/src/dist/contents/docs/{getting-started/components → components}/note/index.mdx +4 -6
- package/src/dist/contents/docs/{getting-started/components → components}/release-note/index.mdx +2 -2
- package/src/dist/contents/docs/{getting-started/components → components}/stepper/index.mdx +2 -4
- package/src/dist/contents/docs/{getting-started/components → components}/tabs/index.mdx +4 -4
- package/src/dist/contents/docs/{getting-started/components → components}/tooltips/index.mdx +1 -1
- package/src/dist/contents/docs/{getting-started/components → components}/youtube/index.mdx +7 -5
- package/src/dist/contents/docs/getting-started/customize/index.mdx +0 -2
- package/src/dist/contents/docs/getting-started/index.mdx +9 -0
- package/src/dist/contents/docs/getting-started/installation/index.mdx +1 -1
- package/src/dist/contents/docs/getting-started/introduction/index.mdx +1 -1
- package/src/dist/contents/docs/getting-started/quick-start-guide/index.mdx +78 -60
- package/src/dist/contents/docs/getting-started/theme-colors/coffee/index.mdx +167 -0
- package/src/dist/contents/docs/getting-started/theme-colors/default/index.mdx +163 -0
- package/src/dist/contents/docs/getting-started/theme-colors/freshlime/index.mdx +164 -0
- package/src/dist/contents/docs/getting-started/theme-colors/index.mdx +9 -0
- package/src/dist/contents/docs/getting-started/theme-colors/llms/index.mdx +66 -0
- package/src/dist/docu.json +56 -23
- package/src/dist/lib/routes-config.ts +8 -1
- package/src/dist/package.json +1 -1
- package/src/dist/styles/globals.css +50 -67
- package/src/dist/styles/syntax.css +24 -29
- package/src/dist/tailwind.config.ts +0 -1
- package/bun.lock +0 -102
- package/src/dist/.vscode/extensions.json +0 -3
- package/src/dist/contents/docs/getting-started/components/accordion/index.mdx +0 -72
- package/src/dist/contents/docs/getting-started/components/button/index.mdx +0 -42
- package/src/dist/styles/editor.css +0 -57
- /package/src/dist/contents/docs/{getting-started/components → components}/custom/index.mdx +0 -0
- /package/src/dist/contents/docs/{getting-started/components → components}/image/index.mdx +0 -0
- /package/src/dist/contents/docs/{getting-started/components → components}/link/index.mdx +0 -0
|
@@ -63,15 +63,15 @@ export function NavMenu({ isSheet = false }) {
|
|
|
63
63
|
const Comp = (
|
|
64
64
|
<Anchor
|
|
65
65
|
key={`${item.title}-${item.href}`}
|
|
66
|
-
activeClassName="
|
|
66
|
+
activeClassName="text-primary dark:text-accent md:font-semibold font-medium"
|
|
67
67
|
absolute
|
|
68
|
-
className="flex items-center gap-1
|
|
68
|
+
className="flex items-center gap-1 text-foreground/80 hover:text-foreground transition-colors"
|
|
69
69
|
href={item.href}
|
|
70
70
|
target={isExternal ? "_blank" : undefined}
|
|
71
71
|
rel={isExternal ? "noopener noreferrer" : undefined}
|
|
72
72
|
>
|
|
73
73
|
{item.title}
|
|
74
|
-
{isExternal && <ArrowUpRight className="w-4 h-4 text-
|
|
74
|
+
{isExternal && <ArrowUpRight className="w-4 h-4 text-foreground/80" />}
|
|
75
75
|
</Anchor>
|
|
76
76
|
);
|
|
77
77
|
return isSheet ? (
|
|
@@ -17,6 +17,23 @@ import {
|
|
|
17
17
|
import Anchor from "./anchor";
|
|
18
18
|
import { advanceSearch, cn } from "@/lib/utils";
|
|
19
19
|
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
20
|
+
import { page_routes } from "@/lib/routes-config";
|
|
21
|
+
|
|
22
|
+
// Define the ContextInfo type to match the one in routes-config
|
|
23
|
+
type ContextInfo = {
|
|
24
|
+
icon: string;
|
|
25
|
+
description: string;
|
|
26
|
+
title?: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
type SearchResult = {
|
|
30
|
+
title: string;
|
|
31
|
+
href: string;
|
|
32
|
+
noLink?: boolean;
|
|
33
|
+
items?: undefined;
|
|
34
|
+
score?: number;
|
|
35
|
+
context?: ContextInfo;
|
|
36
|
+
};
|
|
20
37
|
|
|
21
38
|
export default function Search() {
|
|
22
39
|
const router = useRouter();
|
|
@@ -39,10 +56,25 @@ export default function Search() {
|
|
|
39
56
|
};
|
|
40
57
|
}, []);
|
|
41
58
|
|
|
42
|
-
const filteredResults = useMemo(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
59
|
+
const filteredResults = useMemo<SearchResult[]>(() => {
|
|
60
|
+
const trimmedInput = searchedInput.trim();
|
|
61
|
+
|
|
62
|
+
// If search input is empty or less than 3 characters, show initial suggestions
|
|
63
|
+
if (trimmedInput.length < 3) {
|
|
64
|
+
return page_routes
|
|
65
|
+
.filter((route: { href: string }) => !route.href.endsWith('/')) // Filter out directory routes
|
|
66
|
+
.slice(0, 6) // Limit to 6 posts
|
|
67
|
+
.map((route: { title: string; href: string; noLink?: boolean; context?: ContextInfo }) => ({
|
|
68
|
+
title: route.title,
|
|
69
|
+
href: route.href,
|
|
70
|
+
noLink: route.noLink,
|
|
71
|
+
context: route.context
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// For search with 3 or more characters, use the advance search
|
|
76
|
+
return advanceSearch(trimmedInput) as unknown as SearchResult[];
|
|
77
|
+
}, [searchedInput]);
|
|
46
78
|
|
|
47
79
|
useEffect(() => {
|
|
48
80
|
setSelectedIndex(0);
|
|
@@ -54,9 +54,10 @@ export default function SubLink({
|
|
|
54
54
|
// Only apply active styles if it's an exact match and not a parent with active children
|
|
55
55
|
const Comp = useMemo(() => (
|
|
56
56
|
<Anchor
|
|
57
|
-
activeClassName={!hasActiveChild ? "text-primary font-medium" : ""}
|
|
57
|
+
activeClassName={!hasActiveChild ? "dark:text-accent text-primary font-medium" : ""}
|
|
58
58
|
href={fullHref}
|
|
59
59
|
className={cn(
|
|
60
|
+
"text-foreground/80 hover:text-foreground transition-colors",
|
|
60
61
|
hasActiveChild && "font-medium text-foreground"
|
|
61
62
|
)}
|
|
62
63
|
>
|
|
@@ -72,8 +73,8 @@ export default function SubLink({
|
|
|
72
73
|
)
|
|
73
74
|
) : (
|
|
74
75
|
<h4 className={cn(
|
|
75
|
-
"font-medium sm:text-sm",
|
|
76
|
-
hasActiveChild ? "text-foreground" : "text-
|
|
76
|
+
"font-medium sm:text-sm text-foreground/90 hover:text-foreground transition-colors",
|
|
77
|
+
hasActiveChild ? "text-foreground" : "text-foreground/80"
|
|
77
78
|
)}>
|
|
78
79
|
{title}
|
|
79
80
|
</h4>
|
|
@@ -93,7 +94,7 @@ export default function SubLink({
|
|
|
93
94
|
>
|
|
94
95
|
<div className="flex items-center justify-between w-full">
|
|
95
96
|
{titleOrLink}
|
|
96
|
-
<span className="ml-2">
|
|
97
|
+
<span className="ml-2 text-muted-foreground">
|
|
97
98
|
{!isOpen ? (
|
|
98
99
|
<ChevronRight className="h-[0.9rem] w-[0.9rem]" aria-hidden="true" />
|
|
99
100
|
) : (
|
|
@@ -111,8 +112,8 @@ export default function SubLink({
|
|
|
111
112
|
>
|
|
112
113
|
<div
|
|
113
114
|
className={cn(
|
|
114
|
-
"flex flex-col items-start sm:text-sm
|
|
115
|
-
level > 0 && "pl-4 border-l ml-1.5"
|
|
115
|
+
"flex flex-col items-start sm:text-sm text-foreground/80 ml-0.5 mt-2.5 gap-3 hover:[&_a]:text-foreground transition-colors",
|
|
116
|
+
level > 0 && "pl-4 border-l border-border ml-1.5"
|
|
116
117
|
)}
|
|
117
118
|
>
|
|
118
119
|
{items?.map((innerLink) => (
|
|
@@ -28,7 +28,7 @@ export function ModeToggle() {
|
|
|
28
28
|
setSelectedTheme(value);
|
|
29
29
|
}
|
|
30
30
|
}}
|
|
31
|
-
className="flex items-center gap-1 rounded-full border border-
|
|
31
|
+
className="flex items-center gap-1 rounded-full border border-border bg-background/50 p-1 transition-all"
|
|
32
32
|
>
|
|
33
33
|
<ToggleGroupItem
|
|
34
34
|
value="light"
|
|
@@ -36,11 +36,11 @@ export function ModeToggle() {
|
|
|
36
36
|
aria-label="Light Mode"
|
|
37
37
|
className={`rounded-full p-1 transition-all ${
|
|
38
38
|
selectedTheme === "light"
|
|
39
|
-
? "bg-
|
|
40
|
-
: "bg-transparent"
|
|
39
|
+
? "bg-primary text-primary-foreground"
|
|
40
|
+
: "bg-transparent hover:bg-muted/50"
|
|
41
41
|
}`}
|
|
42
42
|
>
|
|
43
|
-
<Sun className=
|
|
43
|
+
<Sun className="h-4 w-4" />
|
|
44
44
|
</ToggleGroupItem>
|
|
45
45
|
<ToggleGroupItem
|
|
46
46
|
value="system"
|
|
@@ -48,11 +48,11 @@ export function ModeToggle() {
|
|
|
48
48
|
aria-label="System Mode"
|
|
49
49
|
className={`rounded-full p-1 transition-all ${
|
|
50
50
|
selectedTheme === "system"
|
|
51
|
-
? "bg-
|
|
52
|
-
: "bg-transparent"
|
|
51
|
+
? "bg-primary text-primary-foreground"
|
|
52
|
+
: "bg-transparent hover:bg-muted/50"
|
|
53
53
|
}`}
|
|
54
54
|
>
|
|
55
|
-
<Monitor className=
|
|
55
|
+
<Monitor className="h-4 w-4" />
|
|
56
56
|
</ToggleGroupItem>
|
|
57
57
|
<ToggleGroupItem
|
|
58
58
|
value="dark"
|
|
@@ -60,11 +60,11 @@ export function ModeToggle() {
|
|
|
60
60
|
aria-label="Dark Mode"
|
|
61
61
|
className={`rounded-full p-1 transition-all ${
|
|
62
62
|
selectedTheme === "dark"
|
|
63
|
-
? "bg-
|
|
64
|
-
: "bg-transparent"
|
|
63
|
+
? "bg-primary text-primary-foreground"
|
|
64
|
+
: "bg-transparent hover:bg-muted/50"
|
|
65
65
|
}`}
|
|
66
66
|
>
|
|
67
|
-
<Moon className=
|
|
67
|
+
<Moon className="h-4 w-4" />
|
|
68
68
|
</ToggleGroupItem>
|
|
69
69
|
</ToggleGroup>
|
|
70
70
|
);
|
|
@@ -149,7 +149,7 @@ export default function TocObserver({
|
|
|
149
149
|
|
|
150
150
|
return (
|
|
151
151
|
<div className="relative">
|
|
152
|
-
<div className="relative text-sm text-
|
|
152
|
+
<div className="relative text-sm text-foreground/70 hover:text-foreground transition-colors">
|
|
153
153
|
<div className="flex flex-col gap-0">
|
|
154
154
|
{data.map(({ href, level, text }, index) => {
|
|
155
155
|
const id = href.slice(1);
|
|
@@ -172,7 +172,7 @@ export default function TocObserver({
|
|
|
172
172
|
{/* Vertical line */}
|
|
173
173
|
<div className={clsx(
|
|
174
174
|
"absolute left-0 top-0 h-full w-px",
|
|
175
|
-
isActive ? "bg-primary/20" : "bg-
|
|
175
|
+
isActive ? "bg-primary/20 dark:bg-primary/30" : "bg-border/50 dark:bg-border/50"
|
|
176
176
|
)}>
|
|
177
177
|
{isActive && (
|
|
178
178
|
<motion.div
|
|
@@ -187,11 +187,11 @@ export default function TocObserver({
|
|
|
187
187
|
{/* Horizontal line */}
|
|
188
188
|
<div className={clsx(
|
|
189
189
|
"absolute left-0 top-1/2 h-px w-6",
|
|
190
|
-
isActive ? "bg-primary/20" : "bg-
|
|
190
|
+
isActive ? "bg-primary/20 dark:bg-primary/30" : "bg-border/50 dark:bg-border/50"
|
|
191
191
|
)}>
|
|
192
192
|
{isActive && (
|
|
193
193
|
<motion.div
|
|
194
|
-
className="absolute left-0 top-0 h-full w-full bg-primary origin-left"
|
|
194
|
+
className="absolute left-0 top-0 h-full w-full bg-primary dark:bg-accent origin-left"
|
|
195
195
|
initial={{ scaleX: 0 }}
|
|
196
196
|
animate={{ scaleX: scrollProgress }}
|
|
197
197
|
transition={{ duration: 0.3, delay: 0.1 }}
|
|
@@ -207,8 +207,8 @@ export default function TocObserver({
|
|
|
207
207
|
className={clsx(
|
|
208
208
|
"relative flex items-center py-2 transition-colors",
|
|
209
209
|
{
|
|
210
|
-
"text-primary dark:text-primary
|
|
211
|
-
"text-
|
|
210
|
+
"text-primary dark:text-primary font-medium": isActive,
|
|
211
|
+
"text-muted-foreground hover:text-foreground dark:hover:text-foreground/90": !isActive,
|
|
212
212
|
}
|
|
213
213
|
)}
|
|
214
214
|
style={{
|
|
@@ -229,13 +229,13 @@ export default function TocObserver({
|
|
|
229
229
|
<div className={clsx(
|
|
230
230
|
"w-1.5 h-1.5 rounded-full transition-all duration-300 relative z-10",
|
|
231
231
|
{
|
|
232
|
-
"bg-primary scale-100": isActive,
|
|
233
|
-
"bg-
|
|
232
|
+
"bg-primary scale-100 dark:bg-primary/90": isActive,
|
|
233
|
+
"bg-muted-foreground/30 dark:bg-muted-foreground/30 scale-75 group-hover:scale-100 group-hover:bg-primary/50 dark:group-hover:bg-primary/50": !isActive,
|
|
234
234
|
}
|
|
235
235
|
)}>
|
|
236
236
|
{isActive && (
|
|
237
237
|
<motion.div
|
|
238
|
-
className="absolute inset-0 rounded-full bg-primary/20"
|
|
238
|
+
className="absolute inset-0 rounded-full bg-primary/20 dark:bg-primary/30"
|
|
239
239
|
initial={{ scale: 1 }}
|
|
240
240
|
animate={{ scale: 1.8 }}
|
|
241
241
|
transition={{
|
|
@@ -1,12 +1,54 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: Release Version 1.0+
|
|
3
3
|
description: List of latest changes and updates on DocuBook
|
|
4
4
|
date: 24-05-2025
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<Note type="note" title="Version History">
|
|
8
|
+
This changelog contains a list of all the changes made to the DocuBook template. It will be updated with each new release and will include information about new features, bug fixes, and other improvements.
|
|
9
|
+
</Note>
|
|
10
|
+
|
|
11
|
+
<div className="sr-only">
|
|
12
|
+
### v 1.13.5
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<Release version="1.13.5" date="2025-05-31" title="Add Theme schema for consistent theme">
|
|
16
|
+
<Changes type="added">
|
|
17
|
+
- Add Theme schema
|
|
18
|
+
- Add Freshlime theme
|
|
19
|
+
- Add Coffee theme
|
|
20
|
+
- Add llms context for generated theme with AI
|
|
21
|
+
</Changes>
|
|
22
|
+
<Changes type="improved">
|
|
23
|
+
- Markdown support for theme-colors
|
|
24
|
+
- consistent theme-colors page
|
|
25
|
+
- all components now consistent with theme-colors
|
|
26
|
+
- syntax with theme-colors
|
|
27
|
+
</Changes>
|
|
28
|
+
<Changes type="fixed">
|
|
29
|
+
- fix bug FileTree component
|
|
30
|
+
- fix issue markdown with theme-colors
|
|
31
|
+
</Changes>
|
|
32
|
+
</Release>
|
|
33
|
+
|
|
34
|
+
<div className="sr-only">
|
|
35
|
+
### v 1.13.0
|
|
36
|
+
</div>
|
|
8
37
|
|
|
9
|
-
|
|
38
|
+
<Release version="1.13.0" date="2025-05-29" title="Context Menu for organize file and folder">
|
|
39
|
+
<Changes type="added">
|
|
40
|
+
- New ContextMenu component for organizing file and folder
|
|
41
|
+
- Nested docs folder and file support with context menu
|
|
42
|
+
</Changes>
|
|
43
|
+
<Changes type="improved">
|
|
44
|
+
- improve routes-config with context menu
|
|
45
|
+
- improve docu.json with context menu
|
|
46
|
+
- improve leftbar with context menu
|
|
47
|
+
- improve docs-menu with context menu
|
|
48
|
+
- improve search dialog limit result to 6 post per suggestion
|
|
49
|
+
- improve search result typing 3 characters to show suggestion
|
|
50
|
+
</Changes>
|
|
51
|
+
</Release>
|
|
10
52
|
|
|
11
53
|
<div className="sr-only">
|
|
12
54
|
### v 1.12.0
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Accordion
|
|
3
|
+
description: A component used to create collapsible content that can be hidden and shown again.
|
|
4
|
+
date: 22-12-2024
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Preview
|
|
8
|
+
|
|
9
|
+
### Basic Usage
|
|
10
|
+
|
|
11
|
+
<Accordion title="Click to expand" defaultOpen={true}>
|
|
12
|
+
This is a simple accordion component that can be toggled by clicking the header. The content can include any valid React nodes, including text, components, and markdown.
|
|
13
|
+
</Accordion>
|
|
14
|
+
|
|
15
|
+
### With Code Block
|
|
16
|
+
|
|
17
|
+
<Accordion title="Code Example" className="mt-4">
|
|
18
|
+
```javascript:utils.js showLineNumbers
|
|
19
|
+
// Example of using the Accordion component
|
|
20
|
+
import Accordion from '@/components/markdown/AccordionMdx';
|
|
21
|
+
|
|
22
|
+
function Example() {
|
|
23
|
+
return (
|
|
24
|
+
<Accordion title="Click to see code">
|
|
25
|
+
<pre>
|
|
26
|
+
{`function greet() {\n console.log('Hello, world!');\n}`}
|
|
27
|
+
</pre>
|
|
28
|
+
</Accordion>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
</Accordion>
|
|
33
|
+
|
|
34
|
+
### With Markdown Content
|
|
35
|
+
|
|
36
|
+
<Accordion title="Markdown Example" className="mt-4">
|
|
37
|
+
## This is a markdown heading
|
|
38
|
+
|
|
39
|
+
- List item 1
|
|
40
|
+
- List item 2
|
|
41
|
+
- List item 3
|
|
42
|
+
|
|
43
|
+
You can include **bold** and *italic* text, [links](#), and other markdown elements.
|
|
44
|
+
</Accordion>
|
|
45
|
+
|
|
46
|
+
## Props
|
|
47
|
+
|
|
48
|
+
| Prop | Type | Default | Description |
|
|
49
|
+
|------|------|---------|-------------|
|
|
50
|
+
| `title` | string | - | **Required**. The text displayed in the accordion header. |
|
|
51
|
+
| `children` | ReactNode | null | The content to be displayed when the accordion is expanded. Can be plain text, markdown, or React components. |
|
|
52
|
+
| `defaultOpen` | boolean | false | When true, the accordion will be expanded by default. |
|
|
53
|
+
| `className` | string | undefined | Additional CSS classes to apply to the accordion container. |
|
|
54
|
+
|
|
55
|
+
## Output Markdown
|
|
56
|
+
|
|
57
|
+
<Tabs defaultValue="markdown" className="pt-5 pb-1">
|
|
58
|
+
<TabsList>
|
|
59
|
+
<TabsTrigger value="markdown">Markdown</TabsTrigger>
|
|
60
|
+
<TabsTrigger value="codeblock">Code Block</TabsTrigger>
|
|
61
|
+
</TabsList>
|
|
62
|
+
<TabsContent value="markdown">
|
|
63
|
+
```plaintext
|
|
64
|
+
<Accordion title="Markdown">
|
|
65
|
+
this is an example of plain text content from the accordion component and below is markdown ;
|
|
66
|
+
1. number one
|
|
67
|
+
2. number two
|
|
68
|
+
3. number three
|
|
69
|
+
</Accordion>
|
|
70
|
+
```
|
|
71
|
+
</TabsContent>
|
|
72
|
+
<TabsContent value="codeblock">
|
|
73
|
+
````plaintext
|
|
74
|
+
<Accordion title="Code Block" defaultOpen={true}>
|
|
75
|
+
```javascript:main.js showLineNumbers {3-4}
|
|
76
|
+
function isRocketAboutToCrash() {
|
|
77
|
+
// Check if the rocket is stable
|
|
78
|
+
if (!isStable()) {
|
|
79
|
+
NoCrash(); // Prevent the crash
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
</Accordion>
|
|
84
|
+
````
|
|
85
|
+
</TabsContent>
|
|
86
|
+
</Tabs>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Button
|
|
3
|
+
description: A component used to create buttons that can be used to trigger actions or navigate to other pages.
|
|
4
|
+
date: 14-12-2024
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Preview
|
|
8
|
+
|
|
9
|
+
<Button
|
|
10
|
+
text="Learn More"
|
|
11
|
+
href="https://learn.example.com"
|
|
12
|
+
icon="MoveUpRight"
|
|
13
|
+
size="md"
|
|
14
|
+
target="_blank"
|
|
15
|
+
variation="primary"
|
|
16
|
+
/>
|
|
17
|
+
|
|
18
|
+
## Props
|
|
19
|
+
|
|
20
|
+
| Prop | Type | Default | Description |
|
|
21
|
+
| ----------- | -------- | ----------- | -------------------------------------------- |
|
|
22
|
+
| `text` | string | undefined | The button text |
|
|
23
|
+
| `href` | string | **required**| The URL to navigate to |
|
|
24
|
+
| `icon` | string | undefined | Lucide icon name (e.g. "MoveUpRight") |
|
|
25
|
+
| `size` | string | "md" | Button size: `"sm"`, `"md"`, or `"lg"` |
|
|
26
|
+
| `target` | string | undefined | Link target (e.g. "_blank") |
|
|
27
|
+
| `variation` | string | "primary" | Button style: `"primary"`, `"accent"`, or `"outline"` |
|
|
28
|
+
|
|
29
|
+
## Output Markdown
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
<Button
|
|
33
|
+
text="Learn More"
|
|
34
|
+
href="https://learn.example.com"
|
|
35
|
+
icon="MoveUpRight"
|
|
36
|
+
size="md"
|
|
37
|
+
target="_blank"
|
|
38
|
+
variation="primary"
|
|
39
|
+
/>
|
|
40
|
+
```
|
|
@@ -4,13 +4,11 @@ description: A component used to create cards that can be used to display conten
|
|
|
4
4
|
date: 20-02-2025
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
The Card component is a component used to create cards that can be used to display content in a compact and organized way.
|
|
8
|
-
|
|
9
7
|
## Example
|
|
10
8
|
|
|
11
9
|
### Card with Link and icon
|
|
12
10
|
|
|
13
|
-
<Card title="Click on me" icon="Link" href="/docs/
|
|
11
|
+
<Card title="Click on me" icon="Link" href="/docs/components/card-group">
|
|
14
12
|
This is how you use a card with an icon and a link. Clicking on this card
|
|
15
13
|
brings you to the Card Group page.
|
|
16
14
|
</Card>
|
|
@@ -32,18 +30,18 @@ The Card component is a component used to create cards that can be used to displ
|
|
|
32
30
|
|
|
33
31
|
| Prop | Type | Default | Description |
|
|
34
32
|
| ------------- | -------- | ------- | ------------------------------------------------------- |
|
|
35
|
-
| `title` |
|
|
36
|
-
| `icon` |
|
|
37
|
-
| `href` |
|
|
38
|
-
| `horizontal` |
|
|
33
|
+
| `title` | string | null | The value of card title. |
|
|
34
|
+
| `icon` | string | null | The value of card icon render from lucide. |
|
|
35
|
+
| `href` | string | null | The value of card link url. |
|
|
36
|
+
| `horizontal` | boolean | undefined | horizontal layout for card. |
|
|
39
37
|
|
|
40
|
-
##
|
|
38
|
+
## Output Markdown
|
|
41
39
|
|
|
42
40
|
<Tabs defaultValue="link" className="pt-5 pb-1">
|
|
43
41
|
<TabsList>
|
|
44
|
-
<TabsTrigger value="link">
|
|
45
|
-
<TabsTrigger value="horizontal">
|
|
46
|
-
<TabsTrigger value="simple">
|
|
42
|
+
<TabsTrigger value="link">Link & Icon</TabsTrigger>
|
|
43
|
+
<TabsTrigger value="horizontal">Horizontal</TabsTrigger>
|
|
44
|
+
<TabsTrigger value="simple">Simple</TabsTrigger>
|
|
47
45
|
</TabsList>
|
|
48
46
|
<TabsContent value="link">
|
|
49
47
|
```markdown
|
package/src/dist/contents/docs/{getting-started/components → components}/card-group/index.mdx
RENAMED
|
@@ -4,8 +4,6 @@ description: A component used to create card groups that can be used to display
|
|
|
4
4
|
date: 20-02-2025
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
The CardGroup component is a component used to create card groups that can be used to display multiple cards in a compact and organized way.
|
|
8
|
-
|
|
9
7
|
## Preview
|
|
10
8
|
|
|
11
9
|
<CardGroup cols={2}>
|
|
@@ -27,9 +25,9 @@ The CardGroup component is a component used to create card groups that can be us
|
|
|
27
25
|
|
|
28
26
|
| Prop | Type | Default | Description |
|
|
29
27
|
| ------------- | -------- | ------- | ------------------------------------------------------- |
|
|
30
|
-
| `cols` |
|
|
28
|
+
| `cols` | number | {2} | By default 2 The number of columns per row |
|
|
31
29
|
|
|
32
|
-
##
|
|
30
|
+
## Output Markdown
|
|
33
31
|
|
|
34
32
|
```markdown
|
|
35
33
|
<CardGroup cols={2}>
|
package/src/dist/contents/docs/{getting-started/components → components}/code-block/index.mdx
RENAMED
|
@@ -4,8 +4,6 @@ description: A component used to display code snippets with optional line number
|
|
|
4
4
|
date: 14-12-2024
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
The Code Block component is a component used to display code snippets with optional line numbering and line highlighting.
|
|
8
|
-
|
|
9
7
|
## Preview
|
|
10
8
|
|
|
11
9
|
```javascript:main.js showLineNumbers {3-4}
|
|
@@ -19,7 +17,7 @@ function isRocketAboutToCrash() {
|
|
|
19
17
|
|
|
20
18
|
In this example, line numbers are displayed for lines 1 to 4. You can specify which lines to highlight using the format `{2,3-5}`.
|
|
21
19
|
|
|
22
|
-
##
|
|
20
|
+
## Output Markdown
|
|
23
21
|
|
|
24
22
|
You can directly use the following syntax to create a code block with line numbers and highlight specific lines:
|
|
25
23
|
|
|
@@ -34,7 +32,7 @@ function isRocketAboutToCrash() {
|
|
|
34
32
|
```
|
|
35
33
|
````
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
## Features
|
|
38
36
|
|
|
39
37
|
- **Line Numbers**: Enable line numbers by adding `showLineNumbers` after the opening backticks.
|
|
40
38
|
- **Highlight Lines**: Specify lines to highlight using curly braces (e.g., `{2,3-5}`).
|
package/src/dist/contents/docs/{getting-started/components → components}/file-tree/index.mdx
RENAMED
|
@@ -51,14 +51,14 @@ The root component that wraps the entire file tree.
|
|
|
51
51
|
|
|
52
52
|
| Prop | Type | Required | Description |
|
|
53
53
|
|----------|----------|----------|---------------------------------------|
|
|
54
|
-
| name | string | Yes | The name of the folder |
|
|
55
|
-
| children | ReactNode | No | Child elements (File or Folder) |
|
|
54
|
+
| `name` | string | Yes | The name of the folder |
|
|
55
|
+
| `children` | ReactNode | No | Child elements (File or Folder) |
|
|
56
56
|
|
|
57
57
|
### File
|
|
58
58
|
|
|
59
59
|
| Prop | Type | Required | Description |
|
|
60
60
|
|------|--------|----------|----------------------------|
|
|
61
|
-
| name | string | Yes | The name of the file |
|
|
61
|
+
| `name` | string | Yes | The name of the file |
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
## Examples
|
|
@@ -6,4 +6,4 @@ date: 29-11-2024
|
|
|
6
6
|
|
|
7
7
|
Explore the custom components we've defined for easy integration and development within your projects. Each component is designed to enhance your workflow and streamline your development process.
|
|
8
8
|
|
|
9
|
-
<Outlet path="
|
|
9
|
+
<Outlet path="components" />
|
|
@@ -49,9 +49,9 @@ Renders as: <Kbd show="custom">Custom</Kbd>
|
|
|
49
49
|
|
|
50
50
|
| Prop | Type | Default | Description |
|
|
51
51
|
|-----------|---------------------|------------|-------------|
|
|
52
|
-
| `show` |
|
|
53
|
-
| `type` |
|
|
54
|
-
| `children`|
|
|
52
|
+
| `show` | string | (required) | The key identifier (e.g., 'cmd', 'ctrl', 'a') |
|
|
53
|
+
| `type` | string | `window` | for device type `mac` or `window` | Platform style or custom content |
|
|
54
|
+
| `children`| ReactNode | - | Custom content to display (overrides automatic rendering) |
|
|
55
55
|
|
|
56
56
|
## Supported Keys
|
|
57
57
|
|
|
@@ -4,8 +4,6 @@ description: A component used to display different types of messages such as gen
|
|
|
4
4
|
date: 14-12-2024
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
The `Note` component allows you to display different types of messages such as general notes, warnings, or success notifications. Each type is styled accordingly, providing a clear visual cue to the user.
|
|
8
|
-
|
|
9
7
|
## Preview
|
|
10
8
|
|
|
11
9
|
<Note type="note" title="Note">
|
|
@@ -25,12 +23,12 @@ The `Note` component allows you to display different types of messages such as g
|
|
|
25
23
|
|
|
26
24
|
| Prop | Type | Default | Description |
|
|
27
25
|
| ------- | ---------------------------------------------- | ------- | ---------------------------------------- |
|
|
28
|
-
| `title` |
|
|
29
|
-
| `type` |
|
|
26
|
+
| `title` | string | "Note" | Sets the title of the note. |
|
|
27
|
+
| `type` | "note" "danger" "success" "warning" | undefined | Determines the visual style of the note. |
|
|
30
28
|
|
|
31
|
-
##
|
|
29
|
+
## Output Markdown
|
|
32
30
|
|
|
33
|
-
```
|
|
31
|
+
```markdown
|
|
34
32
|
<Note type="note" title="Note">
|
|
35
33
|
This is a general note to convey information to the user.
|
|
36
34
|
</Note>
|
package/src/dist/contents/docs/{getting-started/components → components}/release-note/index.mdx
RENAMED
|
@@ -10,7 +10,7 @@ The Release Note component makes it easy for you to write and display changelogs
|
|
|
10
10
|
|
|
11
11
|
Here is a basic example of using the Release Note component:
|
|
12
12
|
|
|
13
|
-
```
|
|
13
|
+
```markdown
|
|
14
14
|
<Release version="1.10.1" date="2025-05-24" title="Accessibility Improvements and Bug Fixes">
|
|
15
15
|
<Changes type="added">
|
|
16
16
|
- New feature to improve accessibility
|
|
@@ -49,7 +49,7 @@ The `Release` component is used to display key information about a release versi
|
|
|
49
49
|
| `date` | string | ❌ | Release date in a valid format (example: "2025-05-24") |
|
|
50
50
|
| `children` | ReactNode | ✅ | Child content, typically `Changes` components |
|
|
51
51
|
|
|
52
|
-
```
|
|
52
|
+
```markdown
|
|
53
53
|
<Release
|
|
54
54
|
version="1.10.1"
|
|
55
55
|
date="2025-05-24"
|
|
@@ -8,8 +8,6 @@ In this guide, we utilize a custom `Stepper` component, specifically designed fo
|
|
|
8
8
|
|
|
9
9
|
## Preview
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
11
|
<Stepper>
|
|
14
12
|
<StepperItem title="Step 1: Clone the DocuBook Repository">
|
|
15
13
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec interdum,
|
|
@@ -26,9 +24,9 @@ In this guide, we utilize a custom `Stepper` component, specifically designed fo
|
|
|
26
24
|
</StepperItem>
|
|
27
25
|
</Stepper>
|
|
28
26
|
|
|
29
|
-
##
|
|
27
|
+
## Output Markdown
|
|
30
28
|
|
|
31
|
-
```
|
|
29
|
+
```markdown
|
|
32
30
|
<Stepper>
|
|
33
31
|
<StepperItem title="Step 1: Clone the DocuBook Repository">
|
|
34
32
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec interdum,
|
|
@@ -38,12 +38,12 @@ The `Tabs` component allows you to organize content into multiple sections, enab
|
|
|
38
38
|
|
|
39
39
|
| Prop | Type | Default | Description |
|
|
40
40
|
| -------------- | -------- | ------- | ------------------------------------------------------ |
|
|
41
|
-
| `defaultValue` |
|
|
42
|
-
| `className` |
|
|
41
|
+
| `defaultValue` | string | null | The value of the tab that is selected by default. |
|
|
42
|
+
| `className` | string | null | Additional CSS classes for styling the Tabs component. |
|
|
43
43
|
|
|
44
|
-
##
|
|
44
|
+
## Output Markdown
|
|
45
45
|
|
|
46
|
-
````
|
|
46
|
+
````plaintext
|
|
47
47
|
<Tabs defaultValue="java" className="pt-5 pb-1">
|
|
48
48
|
<TabsList>
|
|
49
49
|
<TabsTrigger value="java">Java</TabsTrigger>
|
|
@@ -13,7 +13,7 @@ You can use tooltips in your Markdown content to provide additional information
|
|
|
13
13
|
|
|
14
14
|
What do you know about <Tooltip text="DocuBook" tip="npx @docubook/create@latest" /> ? Create interactive nested documentations using MDX.
|
|
15
15
|
|
|
16
|
-
###
|
|
16
|
+
### Output Markdown
|
|
17
17
|
|
|
18
18
|
The above Markdown is converted to:
|
|
19
19
|
|