boltdocs 2.4.1 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/cache-3FOEPC2P.mjs +1 -0
- package/dist/chunk-ITFGVXPE.mjs +1 -0
- package/dist/chunk-TP5KMRD3.mjs +1 -0
- package/dist/chunk-UD2LQG2M.mjs +75 -0
- package/dist/chunk-Y4RE5KI7.mjs +1 -0
- package/dist/client/index.d.mts +1225 -14
- package/dist/client/index.d.ts +1225 -14
- package/dist/client/index.js +1 -1
- package/dist/client/index.mjs +1 -1
- package/dist/client/ssr.js +1 -1
- package/dist/client/ssr.mjs +1 -1
- package/dist/node/cli-entry.js +37 -35
- package/dist/node/cli-entry.mjs +1 -1
- package/dist/node/index.d.mts +263 -1
- package/dist/node/index.d.ts +263 -1
- package/dist/node/index.js +34 -32
- package/dist/node/index.mjs +1 -1
- package/dist/package-TWC3BMZ7.mjs +1 -0
- package/dist/search-dialog-YBM4GYDR.mjs +1 -0
- package/package.json +46 -76
- package/src/client/components/primitives/breadcrumbs.tsx +10 -10
- package/src/client/components/primitives/index.ts +17 -16
- package/src/client/components/primitives/menu.tsx +11 -14
- package/src/client/components/primitives/navbar.tsx +29 -29
- package/src/client/components/primitives/navigation-menu.tsx +7 -9
- package/src/client/components/primitives/on-this-page.tsx +16 -18
- package/src/client/components/primitives/page-nav.tsx +10 -13
- package/src/client/components/primitives/search-dialog.tsx +17 -19
- package/src/client/components/primitives/sidebar.tsx +8 -10
- package/src/client/components/primitives/tabs.tsx +10 -12
- package/src/client/components/primitives/tooltip.tsx +3 -5
- package/src/client/components/ui-base/breadcrumbs.tsx +12 -15
- package/src/client/components/ui-base/copy-markdown.tsx +8 -10
- package/src/client/components/ui-base/navbar.tsx +10 -10
- package/src/client/components/ui-base/on-this-page.tsx +13 -12
- package/src/client/components/ui-base/page-nav.tsx +15 -15
- package/src/client/components/ui-base/search-dialog.tsx +13 -20
- package/src/client/components/ui-base/sidebar.tsx +9 -9
- package/src/client/components/ui-base/tabs.tsx +6 -7
- package/src/client/components/ui-base/theme-toggle.tsx +11 -11
- package/src/client/hooks/index.ts +12 -12
- package/src/client/index.ts +34 -11
- package/src/node/config.ts +48 -6
- package/src/node/errors.ts +44 -0
- package/src/node/index.ts +29 -2
- package/src/node/mdx/index.ts +9 -2
- package/src/node/plugin/index.ts +72 -4
- package/src/node/plugins/index.ts +17 -0
- package/src/node/plugins/plugin-errors.ts +62 -0
- package/src/node/plugins/plugin-lifecycle.ts +117 -0
- package/src/node/plugins/plugin-sandbox.ts +59 -0
- package/src/node/plugins/plugin-store.ts +54 -0
- package/src/node/plugins/plugin-types.ts +107 -0
- package/src/node/plugins/plugin-validator.ts +105 -0
- package/src/node/routes/parser.ts +35 -5
- package/src/node/schema/config.ts +208 -0
- package/src/node/schema/frontmatter.ts +17 -0
- package/src/node/security/constants/index.ts +10 -0
- package/src/node/security/csp.ts +31 -0
- package/src/node/security/headers.ts +27 -0
- package/src/node/utils.ts +153 -5
- package/tsup.config.ts +0 -6
- package/dist/base-ui/index.d.mts +0 -25
- package/dist/base-ui/index.d.ts +0 -25
- package/dist/base-ui/index.js +0 -1
- package/dist/base-ui/index.mjs +0 -1
- package/dist/cache-P6WK424C.mjs +0 -1
- package/dist/chunk-2DI3OGHV.mjs +0 -1
- package/dist/chunk-2Z5T6EAU.mjs +0 -1
- package/dist/chunk-64AJ5QLT.mjs +0 -1
- package/dist/chunk-DDX52BX4.mjs +0 -1
- package/dist/chunk-HRZDSFR5.mjs +0 -1
- package/dist/chunk-JD3RSDE4.mjs +0 -1
- package/dist/chunk-JZXLCA2E.mjs +0 -1
- package/dist/chunk-NBCYHLAA.mjs +0 -1
- package/dist/chunk-PPVDMDEL.mjs +0 -1
- package/dist/chunk-T3W44KWY.mjs +0 -1
- package/dist/chunk-UBE4CKOA.mjs +0 -1
- package/dist/chunk-UWT4AJTH.mjs +0 -73
- package/dist/chunk-WWJ7WKDI.mjs +0 -1
- package/dist/chunk-Y4RRHPXC.mjs +0 -1
- package/dist/client/types.d.mts +0 -3
- package/dist/client/types.d.ts +0 -3
- package/dist/client/types.js +0 -1
- package/dist/client/types.mjs +0 -0
- package/dist/copy-markdown--9yjpbyy.d.mts +0 -15
- package/dist/copy-markdown-l2MYkcG7.d.ts +0 -15
- package/dist/hooks/index.d.mts +0 -137
- package/dist/hooks/index.d.ts +0 -137
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/index.mjs +0 -1
- package/dist/integrations/index.d.mts +0 -48
- package/dist/integrations/index.d.ts +0 -48
- package/dist/integrations/index.js +0 -1
- package/dist/integrations/index.mjs +0 -1
- package/dist/link-DfBwCeZc.d.mts +0 -68
- package/dist/link-DfBwCeZc.d.ts +0 -68
- package/dist/loading-BwUos0wZ.d.mts +0 -57
- package/dist/loading-nlnUD01v.d.ts +0 -57
- package/dist/mdx/index.d.mts +0 -178
- package/dist/mdx/index.d.ts +0 -178
- package/dist/mdx/index.js +0 -1
- package/dist/mdx/index.mjs +0 -1
- package/dist/primitives/index.d.mts +0 -292
- package/dist/primitives/index.d.ts +0 -292
- package/dist/primitives/index.js +0 -1
- package/dist/primitives/index.mjs +0 -1
- package/dist/search-dialog-OONKKC5H.mjs +0 -1
- package/dist/types-opDA2E9-.d.mts +0 -394
- package/dist/types-opDA2E9-.d.ts +0 -394
- package/dist/use-routes-DNwgTRpU.d.ts +0 -29
- package/dist/use-routes-DrT80Eom.d.mts +0 -29
|
@@ -8,7 +8,7 @@ import { ChevronRight } from 'lucide-react'
|
|
|
8
8
|
import { cn } from '../../utils/cn'
|
|
9
9
|
import type { ComponentBase } from './types'
|
|
10
10
|
|
|
11
|
-
export const
|
|
11
|
+
export const Breadcrumbs = ({
|
|
12
12
|
children,
|
|
13
13
|
className,
|
|
14
14
|
...props
|
|
@@ -26,7 +26,7 @@ export const BreadcrumbsRoot = ({
|
|
|
26
26
|
)
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
const BreadcrumbsItem = ({
|
|
30
30
|
children,
|
|
31
31
|
className,
|
|
32
32
|
...props
|
|
@@ -41,7 +41,7 @@ export const BreadcrumbsItem = ({
|
|
|
41
41
|
)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
const BreadcrumbsLink = ({
|
|
45
45
|
children,
|
|
46
46
|
href,
|
|
47
47
|
className,
|
|
@@ -62,7 +62,7 @@ export const BreadcrumbsLink = ({
|
|
|
62
62
|
)
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
const BreadcrumbsSeparator = ({ className }: ComponentBase) => {
|
|
66
66
|
return (
|
|
67
67
|
<ChevronRight
|
|
68
68
|
size={14}
|
|
@@ -71,9 +71,9 @@ export const BreadcrumbsSeparator = ({ className }: ComponentBase) => {
|
|
|
71
71
|
)
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
Breadcrumbs.Root = Breadcrumbs
|
|
77
|
+
Breadcrumbs.Item = BreadcrumbsItem
|
|
78
|
+
Breadcrumbs.Link = BreadcrumbsLink
|
|
79
|
+
Breadcrumbs.Separator = BreadcrumbsSeparator
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
export * from './navbar'
|
|
2
|
-
export * from './navigation-menu'
|
|
3
|
-
export * from './search-dialog'
|
|
4
|
-
export * from './on-this-page'
|
|
5
|
-
export * from './page-nav'
|
|
6
|
-
export * from './tabs'
|
|
7
|
-
export * from './sidebar'
|
|
8
|
-
export * from './breadcrumbs'
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export { Separator
|
|
1
|
+
export * as Navbar from './navbar'
|
|
2
|
+
export * as NavigationMenu from './navigation-menu'
|
|
3
|
+
export * as SearchDialog from './search-dialog'
|
|
4
|
+
export * as OnThisPage from './on-this-page'
|
|
5
|
+
export * as PageNav from './page-nav'
|
|
6
|
+
export * as Tabs from './tabs'
|
|
7
|
+
export * as Sidebar from './sidebar'
|
|
8
|
+
export * as Breadcrumbs from './breadcrumbs'
|
|
9
|
+
export { Button } from './button'
|
|
10
|
+
export { ButtonGroup } from './button-group'
|
|
11
|
+
export { Menu } from './menu'
|
|
12
|
+
export { Popover } from './popover'
|
|
13
|
+
export { Tooltip } from './tooltip'
|
|
14
|
+
export { Link } from './link'
|
|
15
|
+
export { Skeleton } from './skeleton'
|
|
16
|
+
export { Separator } from 'react-aria-components'
|
|
17
|
+
export { ToggleButton } from 'react-aria-components'
|
|
17
18
|
|
|
18
19
|
export { cn } from '../../utils/cn'
|
|
@@ -13,7 +13,7 @@ export interface MenuTriggerProps extends RAC.MenuTriggerProps {
|
|
|
13
13
|
placement?: PopoverProps['placement']
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
function MenuTrigger(props: MenuTriggerProps) {
|
|
17
17
|
const [trigger, menu] = (
|
|
18
18
|
React.Children.toArray(props.children) as React.ReactElement[]
|
|
19
19
|
).slice(0, 2)
|
|
@@ -30,7 +30,7 @@ export function MenuTrigger(props: MenuTriggerProps) {
|
|
|
30
30
|
/**
|
|
31
31
|
* SubmenuTrigger for nested menus.
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
function SubmenuTrigger(props: RAC.SubmenuTriggerProps) {
|
|
34
34
|
const [trigger, menu] = (
|
|
35
35
|
React.Children.toArray(props.children) as React.ReactElement[]
|
|
36
36
|
).slice(0, 2)
|
|
@@ -64,7 +64,7 @@ export function Menu<T extends object>(props: RAC.MenuProps<T>) {
|
|
|
64
64
|
/**
|
|
65
65
|
* MenuItem with support for selection states and submenus.
|
|
66
66
|
*/
|
|
67
|
-
|
|
67
|
+
function MenuItem(props: RAC.MenuItemProps) {
|
|
68
68
|
const textValue =
|
|
69
69
|
props.textValue ||
|
|
70
70
|
(typeof props.children === 'string' ? props.children : undefined)
|
|
@@ -123,7 +123,7 @@ export interface MenuSectionProps<T> extends RAC.MenuSectionProps<T> {
|
|
|
123
123
|
title?: string
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
function MenuSection<T extends object>({
|
|
127
127
|
title,
|
|
128
128
|
...props
|
|
129
129
|
}: MenuSectionProps<T>) {
|
|
@@ -145,7 +145,7 @@ export function MenuSection<T extends object>({
|
|
|
145
145
|
/**
|
|
146
146
|
* MenuSeparator for visual division.
|
|
147
147
|
*/
|
|
148
|
-
|
|
148
|
+
function MenuSeparator(props: RAC.SeparatorProps) {
|
|
149
149
|
return (
|
|
150
150
|
<RAC.Separator
|
|
151
151
|
{...props}
|
|
@@ -154,12 +154,9 @@ export function MenuSeparator(props: RAC.SeparatorProps) {
|
|
|
154
154
|
)
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
Section: MenuSection,
|
|
164
|
-
Separator: MenuSeparator,
|
|
165
|
-
}
|
|
157
|
+
Menu.Root = Menu
|
|
158
|
+
Menu.Item = MenuItem
|
|
159
|
+
Menu.Trigger = MenuTrigger
|
|
160
|
+
Menu.SubTrigger = SubmenuTrigger
|
|
161
|
+
Menu.Section = MenuSection
|
|
162
|
+
Menu.Separator = MenuSeparator
|
|
@@ -35,7 +35,7 @@ export interface NavbarSocialsProps extends ComponentBase {
|
|
|
35
35
|
link: string
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
export const
|
|
38
|
+
export const Navbar = ({
|
|
39
39
|
children,
|
|
40
40
|
className,
|
|
41
41
|
...props
|
|
@@ -53,7 +53,7 @@ export const NavbarRoot = ({
|
|
|
53
53
|
)
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
const NavbarContent = ({ children, className }: ComponentBase) => {
|
|
57
57
|
return (
|
|
58
58
|
<div
|
|
59
59
|
className={cn(
|
|
@@ -66,7 +66,7 @@ export const NavbarContent = ({ children, className }: ComponentBase) => {
|
|
|
66
66
|
)
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
const NavbarLeft = ({ children, className }: ComponentBase) => {
|
|
70
70
|
return (
|
|
71
71
|
<div
|
|
72
72
|
className={cn(
|
|
@@ -79,7 +79,7 @@ export const NavbarLeft = ({ children, className }: ComponentBase) => {
|
|
|
79
79
|
)
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
const NavbarRight = ({ children, className }: ComponentBase) => {
|
|
83
83
|
return (
|
|
84
84
|
<div
|
|
85
85
|
className={cn(
|
|
@@ -92,7 +92,7 @@ export const NavbarRight = ({ children, className }: ComponentBase) => {
|
|
|
92
92
|
)
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
const NavbarCenter = ({ children, className }: ComponentBase) => {
|
|
96
96
|
return (
|
|
97
97
|
<div
|
|
98
98
|
className={cn(
|
|
@@ -105,7 +105,7 @@ export const NavbarCenter = ({ children, className }: ComponentBase) => {
|
|
|
105
105
|
)
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
const NavbarLogo = ({
|
|
109
109
|
src,
|
|
110
110
|
alt,
|
|
111
111
|
width = 24,
|
|
@@ -130,7 +130,7 @@ export const NavbarLogo = ({
|
|
|
130
130
|
)
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
const NavbarTitle = ({ children, className }: ComponentBase) => {
|
|
134
134
|
return (
|
|
135
135
|
<Link href="/">
|
|
136
136
|
<span
|
|
@@ -145,7 +145,7 @@ export const NavbarTitle = ({ children, className }: ComponentBase) => {
|
|
|
145
145
|
)
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
const NavbarLinks = ({ children, className }: ComponentBase) => {
|
|
149
149
|
return (
|
|
150
150
|
<nav
|
|
151
151
|
className={cn(
|
|
@@ -158,7 +158,7 @@ export const NavbarLinks = ({ children, className }: ComponentBase) => {
|
|
|
158
158
|
)
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
const NavbarLink = ({
|
|
162
162
|
label,
|
|
163
163
|
href,
|
|
164
164
|
active,
|
|
@@ -188,7 +188,7 @@ export const NavbarLink = ({
|
|
|
188
188
|
)
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
|
|
191
|
+
const NavbarSearchTrigger = ({
|
|
192
192
|
className,
|
|
193
193
|
onPress,
|
|
194
194
|
}: NavbarSearchTriggerProps) => {
|
|
@@ -226,7 +226,7 @@ export const NavbarSearchTrigger = ({
|
|
|
226
226
|
)
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
|
|
229
|
+
const NavbarTheme = ({
|
|
230
230
|
className,
|
|
231
231
|
theme,
|
|
232
232
|
onThemeChange,
|
|
@@ -248,14 +248,14 @@ export const NavbarTheme = ({
|
|
|
248
248
|
)
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
|
|
251
|
+
const Icon = ({ name }: { name: BoltdocsSocialLink['icon'] }) => {
|
|
252
252
|
if (name === 'github') return <IconsSocials.Github />
|
|
253
253
|
if (name === 'discord') return <IconsSocials.Discord />
|
|
254
254
|
if (name === 'x') return <IconsSocials.XSocial />
|
|
255
255
|
if (name === 'bluesky') return <IconsSocials.Bluesky />
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
|
|
258
|
+
const NavbarSocials = ({
|
|
259
259
|
icon,
|
|
260
260
|
link,
|
|
261
261
|
className,
|
|
@@ -277,7 +277,7 @@ export const NavbarSocials = ({
|
|
|
277
277
|
)
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
|
|
280
|
+
const NavbarSplit = ({ className }: ComponentBase) => {
|
|
281
281
|
return (
|
|
282
282
|
<Separator
|
|
283
283
|
orientation="vertical"
|
|
@@ -286,18 +286,18 @@ export const NavbarSplit = ({ className }: ComponentBase) => {
|
|
|
286
286
|
)
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
289
|
+
Navbar.Root = Navbar
|
|
290
|
+
Navbar.Left = NavbarLeft
|
|
291
|
+
Navbar.Right = NavbarRight
|
|
292
|
+
Navbar.Center = NavbarCenter
|
|
293
|
+
Navbar.Logo = NavbarLogo
|
|
294
|
+
Navbar.Title = NavbarTitle
|
|
295
|
+
Navbar.Links = NavbarLinks
|
|
296
|
+
Navbar.Link = NavbarLink
|
|
297
|
+
Navbar.SearchTrigger = NavbarSearchTrigger
|
|
298
|
+
Navbar.Theme = NavbarTheme
|
|
299
|
+
Navbar.Socials = NavbarSocials
|
|
300
|
+
Navbar.Split = NavbarSplit
|
|
301
|
+
Navbar.Content = NavbarContent
|
|
302
|
+
|
|
303
|
+
export default Navbar
|
|
@@ -13,8 +13,8 @@ export interface NavigationMenuLinkProps
|
|
|
13
13
|
label: string
|
|
14
14
|
description?: string
|
|
15
15
|
children?:
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
| React.ReactNode
|
|
17
|
+
| ((opts: RAC.MenuItemRenderProps) => React.ReactNode)
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export type NavigationMenuComponent = CompoundComponent<
|
|
@@ -26,7 +26,7 @@ export type NavigationMenuComponent = CompoundComponent<
|
|
|
26
26
|
}
|
|
27
27
|
>
|
|
28
28
|
|
|
29
|
-
const
|
|
29
|
+
export const NavigationMenu = ({
|
|
30
30
|
children,
|
|
31
31
|
className,
|
|
32
32
|
...props
|
|
@@ -108,9 +108,7 @@ const NavigationMenuLink = ({
|
|
|
108
108
|
)
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
NavigationMenuLink,
|
|
116
|
-
}
|
|
111
|
+
NavigationMenu.Root = NavigationMenu
|
|
112
|
+
NavigationMenu.List = NavigationMenuList
|
|
113
|
+
NavigationMenu.Item = NavigationMenuItem
|
|
114
|
+
NavigationMenu.Link = NavigationMenuLink
|
|
@@ -10,8 +10,8 @@ import React, {
|
|
|
10
10
|
type RefObject,
|
|
11
11
|
} from 'react'
|
|
12
12
|
import scrollIntoView from 'scroll-into-view-if-needed'
|
|
13
|
-
import { cn } from '
|
|
14
|
-
import { useOnChange } from '
|
|
13
|
+
import { cn } from '@client/utils/cn'
|
|
14
|
+
import { useOnChange } from '@client/utils/use-on-change'
|
|
15
15
|
import type { ComponentBase } from './types'
|
|
16
16
|
import { getItemId, Observer } from './helpers/observer'
|
|
17
17
|
|
|
@@ -150,7 +150,7 @@ export function AnchorProvider({
|
|
|
150
150
|
return <ItemsContext.Provider value={items}>{children}</ItemsContext.Provider>
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
export const
|
|
153
|
+
export const OnThisPage = ({ children, className }: ComponentBase) => {
|
|
154
154
|
return (
|
|
155
155
|
<nav
|
|
156
156
|
className={cn(
|
|
@@ -165,7 +165,7 @@ export const OnThisPageRoot = ({ children, className }: ComponentBase) => {
|
|
|
165
165
|
)
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
|
|
168
|
+
const OnThisPageHeader = ({
|
|
169
169
|
children,
|
|
170
170
|
className,
|
|
171
171
|
...props
|
|
@@ -183,7 +183,7 @@ export const OnThisPageHeader = ({
|
|
|
183
183
|
)
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
const OnThisPageContent = ({
|
|
187
187
|
children,
|
|
188
188
|
className,
|
|
189
189
|
ref,
|
|
@@ -206,7 +206,7 @@ export const OnThisPageContent = ({
|
|
|
206
206
|
|
|
207
207
|
OnThisPageContent.displayName = 'OnThisPageContent'
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
const OnThisPageList = ({ children, className }: ComponentBase) => {
|
|
210
210
|
return (
|
|
211
211
|
<ul
|
|
212
212
|
className={cn(
|
|
@@ -219,7 +219,7 @@ export const OnThisPageList = ({ children, className }: ComponentBase) => {
|
|
|
219
219
|
)
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
|
|
222
|
+
const OnThisPageItem = ({
|
|
223
223
|
level,
|
|
224
224
|
children,
|
|
225
225
|
className,
|
|
@@ -227,7 +227,7 @@ export const OnThisPageItem = ({
|
|
|
227
227
|
return <li className={cn(level === 3 && 'pl-3', className)}>{children}</li>
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
|
|
230
|
+
const OnThisPageLink = ({
|
|
231
231
|
children,
|
|
232
232
|
href,
|
|
233
233
|
active,
|
|
@@ -281,7 +281,7 @@ export const OnThisPageLink = ({
|
|
|
281
281
|
)
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
|
|
284
|
+
const OnThisPageIndicator = ({
|
|
285
285
|
style,
|
|
286
286
|
className,
|
|
287
287
|
}: OnThisPageIndicatorProps) => {
|
|
@@ -296,12 +296,10 @@ export const OnThisPageIndicator = ({
|
|
|
296
296
|
)
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
OnThisPageIndicator,
|
|
307
|
-
}
|
|
299
|
+
OnThisPage.Root = OnThisPage
|
|
300
|
+
OnThisPage.Header = OnThisPageHeader
|
|
301
|
+
OnThisPage.Content = OnThisPageContent
|
|
302
|
+
OnThisPage.List = OnThisPageList
|
|
303
|
+
OnThisPage.Item = OnThisPageItem
|
|
304
|
+
OnThisPage.Link = OnThisPageLink
|
|
305
|
+
OnThisPage.Indicator = OnThisPageIndicator
|
|
@@ -8,7 +8,7 @@ export interface PageNavProps extends ComponentBase {
|
|
|
8
8
|
direction: 'prev' | 'next'
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export const
|
|
11
|
+
export const PageNav = ({ children, className }: ComponentBase) => {
|
|
12
12
|
return (
|
|
13
13
|
<nav
|
|
14
14
|
className={cn(
|
|
@@ -21,7 +21,7 @@ export const PageNavRoot = ({ children, className }: ComponentBase) => {
|
|
|
21
21
|
)
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
const PageNavLink = ({
|
|
25
25
|
children,
|
|
26
26
|
to,
|
|
27
27
|
direction,
|
|
@@ -50,7 +50,7 @@ export const PageNavLink = ({
|
|
|
50
50
|
)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
const PageNavTitle = ({ children, className }: ComponentBase) => {
|
|
54
54
|
return (
|
|
55
55
|
<span
|
|
56
56
|
className={cn(
|
|
@@ -63,7 +63,7 @@ export const PageNavTitle = ({ children, className }: ComponentBase) => {
|
|
|
63
63
|
)
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
const PageNavDescription = ({ children, className }: ComponentBase) => {
|
|
67
67
|
return (
|
|
68
68
|
<span
|
|
69
69
|
className={cn('text-base font-bold text-text-main truncate', className)}
|
|
@@ -73,15 +73,12 @@ export const PageNavDescription = ({ children, className }: ComponentBase) => {
|
|
|
73
73
|
)
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
const PageNavIcon = ({ children }: ComponentBase) => {
|
|
77
77
|
return <>{children}</>
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
Icon: PageNavIcon,
|
|
86
|
-
}),
|
|
87
|
-
}
|
|
80
|
+
PageNav.Root = PageNav
|
|
81
|
+
PageNav.Link = PageNavLink
|
|
82
|
+
PageNav.Title = PageNavTitle
|
|
83
|
+
PageNav.Description = PageNavDescription
|
|
84
|
+
PageNav.Icon = PageNavIcon
|
|
@@ -19,7 +19,7 @@ export interface SearchDialogItemIconProps {
|
|
|
19
19
|
className?: string
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export const
|
|
22
|
+
export const SearchDialog = ({
|
|
23
23
|
children,
|
|
24
24
|
isOpen,
|
|
25
25
|
onOpenChange,
|
|
@@ -50,7 +50,7 @@ export const SearchDialogRoot = ({
|
|
|
50
50
|
)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
const SearchDialogAutocomplete = <T extends object>({
|
|
54
54
|
children,
|
|
55
55
|
className,
|
|
56
56
|
onSelectionChange,
|
|
@@ -73,7 +73,7 @@ export const SearchDialogAutocomplete = <T extends object>({
|
|
|
73
73
|
)
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
const SearchDialogInput = ({
|
|
77
77
|
className,
|
|
78
78
|
...props
|
|
79
79
|
}: RAC.InputProps & { className?: string }) => {
|
|
@@ -98,7 +98,7 @@ export const SearchDialogInput = ({
|
|
|
98
98
|
)
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
const SearchDialogList = <T extends object>({
|
|
102
102
|
children,
|
|
103
103
|
className,
|
|
104
104
|
...props
|
|
@@ -113,7 +113,7 @@ export const SearchDialogList = <T extends object>({
|
|
|
113
113
|
)
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
const SearchDialogItemRoot = ({
|
|
117
117
|
children,
|
|
118
118
|
className,
|
|
119
119
|
...props
|
|
@@ -142,7 +142,7 @@ export const SearchDialogItemRoot = ({
|
|
|
142
142
|
)
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
const SearchDialogItemIcon = ({
|
|
146
146
|
isHeading,
|
|
147
147
|
className,
|
|
148
148
|
}: SearchDialogItemIconProps) => {
|
|
@@ -153,7 +153,7 @@ export const SearchDialogItemIcon = ({
|
|
|
153
153
|
)
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
const SearchDialogItemTitle = ({
|
|
157
157
|
children,
|
|
158
158
|
className,
|
|
159
159
|
}: ComponentBase) => {
|
|
@@ -166,7 +166,7 @@ export const SearchDialogItemTitle = ({
|
|
|
166
166
|
)
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
|
|
169
|
+
const SearchDialogItemBio = ({ children, className }: ComponentBase) => {
|
|
170
170
|
return (
|
|
171
171
|
<span
|
|
172
172
|
className={cn(
|
|
@@ -179,14 +179,12 @@ export const SearchDialogItemBio = ({ children, className }: ComponentBase) => {
|
|
|
179
179
|
)
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}),
|
|
192
|
-
}
|
|
182
|
+
SearchDialog.Root = SearchDialog
|
|
183
|
+
SearchDialog.Autocomplete = SearchDialogAutocomplete
|
|
184
|
+
SearchDialog.Input = SearchDialogInput
|
|
185
|
+
SearchDialog.List = SearchDialogList
|
|
186
|
+
SearchDialog.Item = Object.assign(SearchDialogItemRoot, {
|
|
187
|
+
Icon: SearchDialogItemIcon,
|
|
188
|
+
Title: SearchDialogItemTitle,
|
|
189
|
+
Bio: SearchDialogItemBio,
|
|
190
|
+
})
|
|
@@ -53,7 +53,7 @@ const Badge = ({ badge }: { badge: ComponentRoute['badge'] }) => {
|
|
|
53
53
|
)
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
export const
|
|
56
|
+
export const Sidebar = ({ children, className }: ComponentBase) => {
|
|
57
57
|
return (
|
|
58
58
|
<aside
|
|
59
59
|
className={cn(
|
|
@@ -69,7 +69,7 @@ export const SidebarRoot = ({ children, className }: ComponentBase) => {
|
|
|
69
69
|
)
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
const SidebarGroup = ({
|
|
73
73
|
children,
|
|
74
74
|
title,
|
|
75
75
|
icon: Icon,
|
|
@@ -106,11 +106,11 @@ export const SidebarGroup = ({
|
|
|
106
106
|
)
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
const SidebarGroupItem = ({ children, className }: ComponentBase) => {
|
|
110
110
|
return <div className={cn(className)}>{children}</div>
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
const SidebarLink = ({
|
|
114
114
|
label,
|
|
115
115
|
href,
|
|
116
116
|
active,
|
|
@@ -147,9 +147,7 @@ export const SidebarLink = ({
|
|
|
147
147
|
)
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
SidebarLink,
|
|
155
|
-
}
|
|
150
|
+
Sidebar.Root = Sidebar
|
|
151
|
+
Sidebar.Group = SidebarGroup
|
|
152
|
+
Sidebar.GroupItem = SidebarGroupItem
|
|
153
|
+
Sidebar.Link = SidebarLink
|
|
@@ -13,7 +13,7 @@ export interface TabsIndicatorProps extends ComponentBase {
|
|
|
13
13
|
style?: React.CSSProperties
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export const
|
|
16
|
+
export const Tabs = ({
|
|
17
17
|
children,
|
|
18
18
|
className = '',
|
|
19
19
|
...props
|
|
@@ -25,7 +25,7 @@ export const TabsRoot = ({
|
|
|
25
25
|
)
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
const TabsList = ({ children, className = '' }: ComponentBase) => {
|
|
29
29
|
return (
|
|
30
30
|
<div
|
|
31
31
|
role="tablist"
|
|
@@ -39,7 +39,7 @@ export const TabsList = ({ children, className = '' }: ComponentBase) => {
|
|
|
39
39
|
)
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
const TabsItem = ({
|
|
43
43
|
children,
|
|
44
44
|
id,
|
|
45
45
|
selected,
|
|
@@ -62,11 +62,11 @@ export const TabsItem = ({
|
|
|
62
62
|
)
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
const TabsContent = ({ children, className = '' }: ComponentBase) => {
|
|
66
66
|
return <div className={cn('p-4 outline-none', className)}>{children}</div>
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
const TabsIndicator = ({
|
|
70
70
|
className = '',
|
|
71
71
|
style,
|
|
72
72
|
}: TabsIndicatorProps) => {
|
|
@@ -81,10 +81,8 @@ export const TabsIndicator = ({
|
|
|
81
81
|
)
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
TabsIndicator,
|
|
90
|
-
}
|
|
84
|
+
Tabs.Root = Tabs
|
|
85
|
+
Tabs.List = TabsList
|
|
86
|
+
Tabs.Item = TabsItem
|
|
87
|
+
Tabs.Content = TabsContent
|
|
88
|
+
Tabs.Indicator = TabsIndicator
|