blodemd 0.0.15 → 0.2.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/README.md +26 -1
- package/dist/cli.mjs +217 -217
- package/dist/cli.mjs.map +1 -1
- package/package.json +3 -36
- package/dev-server/app/[[...slug]]/page.tsx +0 -140
- package/dev-server/app/blodemd-dev/invalidate/route.ts +0 -12
- package/dev-server/app/blodemd-dev/static/[...path]/route.ts +0 -32
- package/dev-server/app/blodemd-dev/version/route.ts +0 -14
- package/dev-server/app/blodemd-internal/proxy/route.ts +0 -86
- package/dev-server/app/error.tsx +0 -24
- package/dev-server/app/favicon.ico +0 -0
- package/dev-server/app/globals.css +0 -4
- package/dev-server/app/layout.tsx +0 -38
- package/dev-server/app/not-found.tsx +0 -18
- package/dev-server/app/search/route.ts +0 -17
- package/dev-server/components/dev-reload-script.tsx +0 -86
- package/dev-server/components/providers.tsx +0 -15
- package/dev-server/lib/dev-state.ts +0 -8
- package/dev-server/lib/local-content-source.ts +0 -103
- package/dev-server/lib/local-runtime.tsx +0 -555
- package/dev-server/next-env.d.ts +0 -5
- package/dev-server/next.config.js +0 -54
- package/dev-server/package.json +0 -61
- package/dev-server/postcss.config.mjs +0 -7
- package/dev-server/public/glide-variable.woff2 +0 -0
- package/dev-server/tsconfig.json +0 -50
- package/docs/app/globals.css +0 -471
- package/docs/components/animate-ui/primitives/buttons/button.tsx +0 -14
- package/docs/components/api/api-playground.tsx +0 -467
- package/docs/components/api/api-reference.tsx +0 -157
- package/docs/components/content/collection-index.tsx +0 -114
- package/docs/components/docs/contextual-menu.tsx +0 -495
- package/docs/components/docs/copy-page-menu.tsx +0 -364
- package/docs/components/docs/doc-header.tsx +0 -223
- package/docs/components/docs/doc-shell.tsx +0 -355
- package/docs/components/docs/doc-sidebar.tsx +0 -256
- package/docs/components/docs/doc-toc.tsx +0 -46
- package/docs/components/docs/mobile-nav.tsx +0 -195
- package/docs/components/docs/sidebar-active-highlight.tsx +0 -34
- package/docs/components/docs/sidebar-scroll-area.tsx +0 -63
- package/docs/components/git/repo-picker.tsx +0 -529
- package/docs/components/icons/doc-icon.tsx +0 -96
- package/docs/components/mdx/accordion.tsx +0 -83
- package/docs/components/mdx/agent-instructions.tsx +0 -17
- package/docs/components/mdx/badge.tsx +0 -79
- package/docs/components/mdx/callout.tsx +0 -88
- package/docs/components/mdx/card.tsx +0 -110
- package/docs/components/mdx/code-block.tsx +0 -80
- package/docs/components/mdx/code-group.tsx +0 -203
- package/docs/components/mdx/color.tsx +0 -87
- package/docs/components/mdx/columns.tsx +0 -25
- package/docs/components/mdx/expandable.tsx +0 -45
- package/docs/components/mdx/field-layout.tsx +0 -77
- package/docs/components/mdx/frame.tsx +0 -23
- package/docs/components/mdx/get-text-content.ts +0 -18
- package/docs/components/mdx/icon.tsx +0 -12
- package/docs/components/mdx/iframe.tsx +0 -62
- package/docs/components/mdx/index.tsx +0 -121
- package/docs/components/mdx/installer.tsx +0 -20
- package/docs/components/mdx/panel.tsx +0 -11
- package/docs/components/mdx/param-field.tsx +0 -56
- package/docs/components/mdx/preview.tsx +0 -36
- package/docs/components/mdx/prompt.tsx +0 -63
- package/docs/components/mdx/request-example.tsx +0 -27
- package/docs/components/mdx/response-field.tsx +0 -42
- package/docs/components/mdx/steps.tsx +0 -92
- package/docs/components/mdx/tabs.tsx +0 -193
- package/docs/components/mdx/tile.tsx +0 -43
- package/docs/components/mdx/tooltip.tsx +0 -71
- package/docs/components/mdx/tree.tsx +0 -120
- package/docs/components/mdx/type-table.tsx +0 -71
- package/docs/components/mdx/update.tsx +0 -44
- package/docs/components/mdx/video.tsx +0 -45
- package/docs/components/mdx/view.tsx +0 -66
- package/docs/components/posthog-provider.tsx +0 -42
- package/docs/components/providers.tsx +0 -15
- package/docs/components/tenant-analytics.tsx +0 -49
- package/docs/components/third-parties.tsx +0 -32
- package/docs/components/ui/badge.tsx +0 -61
- package/docs/components/ui/breadcrumb.tsx +0 -112
- package/docs/components/ui/button-group.tsx +0 -83
- package/docs/components/ui/button.tsx +0 -65
- package/docs/components/ui/card.tsx +0 -92
- package/docs/components/ui/command.tsx +0 -167
- package/docs/components/ui/copy-button.tsx +0 -129
- package/docs/components/ui/dialog.tsx +0 -146
- package/docs/components/ui/field.tsx +0 -237
- package/docs/components/ui/input.tsx +0 -23
- package/docs/components/ui/kbd.tsx +0 -98
- package/docs/components/ui/label.tsx +0 -22
- package/docs/components/ui/morph-icon.tsx +0 -79
- package/docs/components/ui/popover.tsx +0 -267
- package/docs/components/ui/search-dialog.tsx +0 -431
- package/docs/components/ui/search.tsx +0 -101
- package/docs/components/ui/separator.tsx +0 -26
- package/docs/components/ui/sheet.tsx +0 -133
- package/docs/components/ui/sidebar.tsx +0 -758
- package/docs/components/ui/skeleton.tsx +0 -11
- package/docs/components/ui/switch.tsx +0 -32
- package/docs/components/ui/tabs.tsx +0 -138
- package/docs/components/ui/theme-toggle.tsx +0 -62
- package/docs/components/ui/tooltip.tsx +0 -53
- package/docs/components/web-mcp.tsx +0 -115
- package/docs/lib/agent-skills.ts +0 -48
- package/docs/lib/api-client.ts +0 -72
- package/docs/lib/config.ts +0 -6
- package/docs/lib/content-root.ts +0 -33
- package/docs/lib/content-source.ts +0 -70
- package/docs/lib/contextual-options.ts +0 -222
- package/docs/lib/dashboard-session.ts +0 -167
- package/docs/lib/db.ts +0 -13
- package/docs/lib/docs-collection.ts +0 -7
- package/docs/lib/docs-runtime.tsx +0 -745
- package/docs/lib/edge-config.ts +0 -95
- package/docs/lib/env.ts +0 -23
- package/docs/lib/etag.ts +0 -22
- package/docs/lib/github-install.ts +0 -33
- package/docs/lib/llms-full.ts +0 -82
- package/docs/lib/marketing-markdown.ts +0 -79
- package/docs/lib/marketing-site.ts +0 -31
- package/docs/lib/mdx.ts +0 -98
- package/docs/lib/navigation.ts +0 -288
- package/docs/lib/openapi-proxy.ts +0 -88
- package/docs/lib/openapi.ts +0 -158
- package/docs/lib/platform-config.ts +0 -6
- package/docs/lib/project-authz.ts +0 -46
- package/docs/lib/routes.ts +0 -103
- package/docs/lib/server-cache.ts +0 -83
- package/docs/lib/shiki.ts +0 -44
- package/docs/lib/supabase.ts +0 -37
- package/docs/lib/tenancy.ts +0 -364
- package/docs/lib/tenant-headers.ts +0 -43
- package/docs/lib/tenant-static.ts +0 -705
- package/docs/lib/tenant-utility-context.ts +0 -62
- package/docs/lib/tenants.ts +0 -72
- package/docs/lib/theme.ts +0 -29
- package/docs/lib/time-ago.ts +0 -24
- package/docs/lib/toc.ts +0 -2
- package/docs/lib/use-mobile.ts +0 -19
- package/docs/lib/use-tab-observer.ts +0 -71
- package/docs/lib/utils.ts +0 -5
- package/packages/@repo/common/dist/index.d.ts +0 -16
- package/packages/@repo/common/dist/index.d.ts.map +0 -1
- package/packages/@repo/common/dist/index.js +0 -84
- package/packages/@repo/common/package.json +0 -34
- package/packages/@repo/common/src/index.ts +0 -101
- package/packages/@repo/contracts/dist/analytics.d.ts +0 -21
- package/packages/@repo/contracts/dist/analytics.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/analytics.js +0 -18
- package/packages/@repo/contracts/dist/dates.d.ts +0 -4
- package/packages/@repo/contracts/dist/dates.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/dates.js +0 -2
- package/packages/@repo/contracts/dist/deployment.d.ts +0 -71
- package/packages/@repo/contracts/dist/deployment.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/deployment.js +0 -46
- package/packages/@repo/contracts/dist/domain.d.ts +0 -94
- package/packages/@repo/contracts/dist/domain.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/domain.js +0 -36
- package/packages/@repo/contracts/dist/git.d.ts +0 -28
- package/packages/@repo/contracts/dist/git.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/git.js +0 -24
- package/packages/@repo/contracts/dist/ids.d.ts +0 -14
- package/packages/@repo/contracts/dist/ids.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/ids.js +0 -11
- package/packages/@repo/contracts/dist/index.d.ts +0 -11
- package/packages/@repo/contracts/dist/index.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/index.js +0 -12
- package/packages/@repo/contracts/dist/pagination.d.ts +0 -23
- package/packages/@repo/contracts/dist/pagination.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/pagination.js +0 -15
- package/packages/@repo/contracts/dist/project.d.ts +0 -42
- package/packages/@repo/contracts/dist/project.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/project.js +0 -25
- package/packages/@repo/contracts/dist/tenant.d.ts +0 -147
- package/packages/@repo/contracts/dist/tenant.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/tenant.js +0 -58
- package/packages/@repo/contracts/dist/user.d.ts +0 -9
- package/packages/@repo/contracts/dist/user.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/user.js +0 -9
- package/packages/@repo/contracts/package.json +0 -37
- package/packages/@repo/contracts/src/analytics.ts +0 -33
- package/packages/@repo/contracts/src/dates.ts +0 -4
- package/packages/@repo/contracts/src/deployment.ts +0 -73
- package/packages/@repo/contracts/src/domain.ts +0 -51
- package/packages/@repo/contracts/src/git.ts +0 -31
- package/packages/@repo/contracts/src/ids.ts +0 -23
- package/packages/@repo/contracts/src/index.ts +0 -12
- package/packages/@repo/contracts/src/pagination.ts +0 -21
- package/packages/@repo/contracts/src/project.ts +0 -32
- package/packages/@repo/contracts/src/tenant.ts +0 -94
- package/packages/@repo/contracts/src/user.ts +0 -12
- package/packages/@repo/models/dist/docs-config.d.ts +0 -961
- package/packages/@repo/models/dist/docs-config.d.ts.map +0 -1
- package/packages/@repo/models/dist/docs-config.js +0 -531
- package/packages/@repo/models/dist/index.d.ts +0 -3
- package/packages/@repo/models/dist/index.d.ts.map +0 -1
- package/packages/@repo/models/dist/index.js +0 -3
- package/packages/@repo/models/dist/tenant.d.ts +0 -37
- package/packages/@repo/models/dist/tenant.d.ts.map +0 -1
- package/packages/@repo/models/dist/tenant.js +0 -1
- package/packages/@repo/models/package.json +0 -37
- package/packages/@repo/models/src/docs-config.ts +0 -629
- package/packages/@repo/models/src/index.ts +0 -3
- package/packages/@repo/models/src/tenant.ts +0 -44
- package/packages/@repo/prebuild/dist/index.d.ts +0 -2
- package/packages/@repo/prebuild/dist/index.d.ts.map +0 -1
- package/packages/@repo/prebuild/dist/index.js +0 -2
- package/packages/@repo/prebuild/dist/openapi.d.ts +0 -43
- package/packages/@repo/prebuild/dist/openapi.d.ts.map +0 -1
- package/packages/@repo/prebuild/dist/openapi.js +0 -86
- package/packages/@repo/prebuild/package.json +0 -39
- package/packages/@repo/prebuild/src/index.ts +0 -2
- package/packages/@repo/prebuild/src/openapi.ts +0 -154
- package/packages/@repo/previewing/dist/blob-source.d.ts +0 -16
- package/packages/@repo/previewing/dist/blob-source.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/blob-source.js +0 -128
- package/packages/@repo/previewing/dist/config-loader.d.ts +0 -134
- package/packages/@repo/previewing/dist/config-loader.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/config-loader.js +0 -231
- package/packages/@repo/previewing/dist/constants.d.ts +0 -15
- package/packages/@repo/previewing/dist/constants.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/constants.js +0 -14
- package/packages/@repo/previewing/dist/content-index.d.ts +0 -7
- package/packages/@repo/previewing/dist/content-index.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/content-index.js +0 -291
- package/packages/@repo/previewing/dist/content-source.d.ts +0 -12
- package/packages/@repo/previewing/dist/content-source.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/content-source.js +0 -1
- package/packages/@repo/previewing/dist/fs-source.d.ts +0 -11
- package/packages/@repo/previewing/dist/fs-source.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/fs-source.js +0 -71
- package/packages/@repo/previewing/dist/index.d.ts +0 -16
- package/packages/@repo/previewing/dist/index.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/index.js +0 -13
- package/packages/@repo/previewing/dist/markdown/agent-markdown.d.ts +0 -3
- package/packages/@repo/previewing/dist/markdown/agent-markdown.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/markdown/agent-markdown.js +0 -176
- package/packages/@repo/previewing/dist/markdown/format.d.ts +0 -8
- package/packages/@repo/previewing/dist/markdown/format.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/markdown/format.js +0 -43
- package/packages/@repo/previewing/dist/markdown/links.d.ts +0 -3
- package/packages/@repo/previewing/dist/markdown/links.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/markdown/links.js +0 -31
- package/packages/@repo/previewing/dist/openapi-pages.d.ts +0 -7
- package/packages/@repo/previewing/dist/openapi-pages.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/openapi-pages.js +0 -200
- package/packages/@repo/previewing/dist/search-index.d.ts +0 -4
- package/packages/@repo/previewing/dist/search-index.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/search-index.js +0 -23
- package/packages/@repo/previewing/dist/serialization.d.ts +0 -13
- package/packages/@repo/previewing/dist/serialization.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/serialization.js +0 -108
- package/packages/@repo/previewing/dist/toc-index.d.ts +0 -5
- package/packages/@repo/previewing/dist/toc-index.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/toc-index.js +0 -53
- package/packages/@repo/previewing/dist/types.d.ts +0 -92
- package/packages/@repo/previewing/dist/types.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/types.js +0 -1
- package/packages/@repo/previewing/dist/utility-index.d.ts +0 -7
- package/packages/@repo/previewing/dist/utility-index.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/utility-index.js +0 -201
- package/packages/@repo/previewing/package.json +0 -41
- package/packages/@repo/previewing/src/blob-source.ts +0 -185
- package/packages/@repo/previewing/src/config-loader.ts +0 -316
- package/packages/@repo/previewing/src/constants.ts +0 -16
- package/packages/@repo/previewing/src/content-index.ts +0 -384
- package/packages/@repo/previewing/src/content-source.ts +0 -12
- package/packages/@repo/previewing/src/fs-source.ts +0 -103
- package/packages/@repo/previewing/src/index.ts +0 -71
- package/packages/@repo/previewing/src/markdown/agent-markdown.ts +0 -254
- package/packages/@repo/previewing/src/markdown/format.ts +0 -63
- package/packages/@repo/previewing/src/markdown/links.ts +0 -46
- package/packages/@repo/previewing/src/openapi-pages.ts +0 -319
- package/packages/@repo/previewing/src/search-index.ts +0 -38
- package/packages/@repo/previewing/src/serialization.ts +0 -191
- package/packages/@repo/previewing/src/toc-index.ts +0 -72
- package/packages/@repo/previewing/src/types.ts +0 -105
- package/packages/@repo/previewing/src/utility-index.ts +0 -304
- package/packages/@repo/validation/dist/index.d.ts +0 -12
- package/packages/@repo/validation/dist/index.d.ts.map +0 -1
- package/packages/@repo/validation/dist/index.js +0 -30
- package/packages/@repo/validation/package.json +0 -38
- package/packages/@repo/validation/src/blodemd-docs-schema.json +0 -3575
- package/packages/@repo/validation/src/index.ts +0 -59
- package/scripts/prepare-package.mjs +0 -53
- package/scripts/repo-packages.mjs +0 -8
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { isValidElement, useCallback, useMemo, useState } from "react";
|
|
4
|
-
import type { MouseEvent, ReactElement, ReactNode } from "react";
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils";
|
|
7
|
-
|
|
8
|
-
interface ViewItemProps {
|
|
9
|
-
title: string;
|
|
10
|
-
icon?: ReactNode;
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const View = ({ children }: ViewItemProps) => children as ReactElement;
|
|
15
|
-
|
|
16
|
-
interface ViewGroupProps {
|
|
17
|
-
children: ReactNode;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const ViewGroup = ({ children }: ViewGroupProps) => {
|
|
21
|
-
const items = useMemo(() => {
|
|
22
|
-
const nodes = Array.isArray(children) ? children : [children];
|
|
23
|
-
return nodes.filter(
|
|
24
|
-
(child): child is ReactElement<ViewItemProps> =>
|
|
25
|
-
isValidElement<ViewItemProps>(child) && child.type === View
|
|
26
|
-
);
|
|
27
|
-
}, [children]);
|
|
28
|
-
|
|
29
|
-
const [active, setActive] = useState(0);
|
|
30
|
-
|
|
31
|
-
const handleSelect = useCallback((event: MouseEvent<HTMLButtonElement>) => {
|
|
32
|
-
const index = Number(event.currentTarget.dataset.index ?? "0");
|
|
33
|
-
setActive(index);
|
|
34
|
-
}, []);
|
|
35
|
-
|
|
36
|
-
if (!items.length) {
|
|
37
|
-
return children as ReactElement;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<div className="my-4">
|
|
42
|
-
<div className="mb-4 flex flex-wrap gap-2">
|
|
43
|
-
{items.map((item, index) => (
|
|
44
|
-
<button
|
|
45
|
-
className={cn(
|
|
46
|
-
"inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm font-medium transition-colors",
|
|
47
|
-
index === active
|
|
48
|
-
? "bg-primary text-primary-foreground"
|
|
49
|
-
: "bg-muted text-muted-foreground hover:text-foreground"
|
|
50
|
-
)}
|
|
51
|
-
data-index={index}
|
|
52
|
-
key={item.props.title}
|
|
53
|
-
onClick={handleSelect}
|
|
54
|
-
type="button"
|
|
55
|
-
>
|
|
56
|
-
{item.props.icon ? (
|
|
57
|
-
<span className="shrink-0">{item.props.icon}</span>
|
|
58
|
-
) : null}
|
|
59
|
-
{item.props.title}
|
|
60
|
-
</button>
|
|
61
|
-
))}
|
|
62
|
-
</div>
|
|
63
|
-
<div>{items[active]}</div>
|
|
64
|
-
</div>
|
|
65
|
-
);
|
|
66
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { usePathname, useSearchParams } from "next/navigation";
|
|
4
|
-
import posthogJs from "posthog-js";
|
|
5
|
-
import { useEffect } from "react";
|
|
6
|
-
|
|
7
|
-
const DEFAULT_POSTHOG_HOST = "https://us.i.posthogJs.com";
|
|
8
|
-
|
|
9
|
-
interface PostHogProviderProps {
|
|
10
|
-
projectKey: string;
|
|
11
|
-
host?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const PostHogProvider = ({ projectKey, host }: PostHogProviderProps) => {
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
if (!projectKey) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
if (posthogJs.__loaded) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
posthogJs.init(projectKey, {
|
|
23
|
-
api_host: host || DEFAULT_POSTHOG_HOST,
|
|
24
|
-
capture_pageleave: true,
|
|
25
|
-
capture_pageview: false,
|
|
26
|
-
person_profiles: "identified_only",
|
|
27
|
-
});
|
|
28
|
-
}, [projectKey, host]);
|
|
29
|
-
|
|
30
|
-
const pathname = usePathname();
|
|
31
|
-
const searchParams = useSearchParams();
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
if (!(pathname && posthogJs.__loaded)) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const query = searchParams?.toString();
|
|
37
|
-
const url = query ? `${pathname}?${query}` : pathname;
|
|
38
|
-
posthogJs.capture("$pageview", { $current_url: url });
|
|
39
|
-
}, [pathname, searchParams]);
|
|
40
|
-
|
|
41
|
-
return null;
|
|
42
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { ThemeProvider } from "next-themes";
|
|
4
|
-
|
|
5
|
-
export const Providers = ({ children }: { children: React.ReactNode }) => (
|
|
6
|
-
<ThemeProvider
|
|
7
|
-
attribute="class"
|
|
8
|
-
defaultTheme="system"
|
|
9
|
-
disableTransitionOnChange
|
|
10
|
-
enableColorScheme
|
|
11
|
-
storageKey="theme"
|
|
12
|
-
>
|
|
13
|
-
{children}
|
|
14
|
-
</ThemeProvider>
|
|
15
|
-
);
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { GoogleAnalytics } from "@next/third-parties/google";
|
|
2
|
-
import { headers } from "next/headers";
|
|
3
|
-
import Script from "next/script";
|
|
4
|
-
import { Suspense } from "react";
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
decodeTenantAnalyticsHeader,
|
|
8
|
-
TENANT_HEADERS,
|
|
9
|
-
} from "@/lib/tenant-headers";
|
|
10
|
-
|
|
11
|
-
import { PostHogProvider } from "./posthog-provider";
|
|
12
|
-
|
|
13
|
-
// Consent Mode v2 default-denied bootstrap. Replace with a real CMP when ready.
|
|
14
|
-
const CONSENT_DEFAULTS_SCRIPT = `window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('consent','default',{ad_storage:'denied',ad_user_data:'denied',ad_personalization:'denied',analytics_storage:'denied',wait_for_update:500});`;
|
|
15
|
-
|
|
16
|
-
export const TenantAnalytics = async () => {
|
|
17
|
-
if (process.env.VERCEL_ENV !== "production") {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const headerStore = await headers();
|
|
22
|
-
const analytics = decodeTenantAnalyticsHeader(
|
|
23
|
-
headerStore.get(TENANT_HEADERS.ANALYTICS)
|
|
24
|
-
);
|
|
25
|
-
if (!analytics) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<>
|
|
31
|
-
{analytics.ga4?.measurementId ? (
|
|
32
|
-
<>
|
|
33
|
-
<Script id="ga-consent-defaults" strategy="afterInteractive">
|
|
34
|
-
{CONSENT_DEFAULTS_SCRIPT}
|
|
35
|
-
</Script>
|
|
36
|
-
<GoogleAnalytics gaId={analytics.ga4.measurementId} />
|
|
37
|
-
</>
|
|
38
|
-
) : null}
|
|
39
|
-
{analytics.posthog?.projectKey ? (
|
|
40
|
-
<Suspense fallback={null}>
|
|
41
|
-
<PostHogProvider
|
|
42
|
-
host={analytics.posthog.host}
|
|
43
|
-
projectKey={analytics.posthog.projectKey}
|
|
44
|
-
/>
|
|
45
|
-
</Suspense>
|
|
46
|
-
) : null}
|
|
47
|
-
</>
|
|
48
|
-
);
|
|
49
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { GoogleAnalytics } from "@next/third-parties/google";
|
|
4
|
-
import { SpeedInsights } from "@vercel/speed-insights/next";
|
|
5
|
-
import { usePathname } from "next/navigation";
|
|
6
|
-
|
|
7
|
-
const PRIVATE_PATH_PREFIXES = ["/app", "/oauth"];
|
|
8
|
-
const DEFAULT_BLODEMD_GA_ID = "G-WE1RCNSC4E";
|
|
9
|
-
const BLODEMD_GA_ID =
|
|
10
|
-
process.env.NEXT_PUBLIC_BLODEMD_GA_ID?.trim() || DEFAULT_BLODEMD_GA_ID;
|
|
11
|
-
|
|
12
|
-
const isPrivatePath = (pathname: string | null) => {
|
|
13
|
-
if (!pathname) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
return PRIVATE_PATH_PREFIXES.some(
|
|
17
|
-
(prefix) => pathname === prefix || pathname.startsWith(`${prefix}/`)
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const ThirdParties = () => {
|
|
22
|
-
const pathname = usePathname();
|
|
23
|
-
if (isPrivatePath(pathname)) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
return (
|
|
27
|
-
<>
|
|
28
|
-
<SpeedInsights />
|
|
29
|
-
{BLODEMD_GA_ID ? <GoogleAnalytics gaId={BLODEMD_GA_ID} /> : null}
|
|
30
|
-
</>
|
|
31
|
-
);
|
|
32
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
|
-
import type { VariantProps } from "class-variance-authority";
|
|
5
|
-
import type * as React from "react";
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils";
|
|
8
|
-
|
|
9
|
-
const badgeVariants = cva(
|
|
10
|
-
"inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border border-transparent px-2 py-0.5 font-medium text-xs transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
11
|
-
{
|
|
12
|
-
defaultVariants: {
|
|
13
|
-
variant: "default",
|
|
14
|
-
},
|
|
15
|
-
variants: {
|
|
16
|
-
variant: {
|
|
17
|
-
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
18
|
-
destructive:
|
|
19
|
-
"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
|
|
20
|
-
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
21
|
-
link: "text-primary underline-offset-4 [a&]:hover:underline",
|
|
22
|
-
outline:
|
|
23
|
-
"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
24
|
-
secondary:
|
|
25
|
-
"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
26
|
-
success:
|
|
27
|
-
"bg-green-50 text-green-700 dark:bg-green-950 dark:text-green-300 [a&]:hover:bg-green-50/80 dark:[a&]:hover:bg-green-950/80",
|
|
28
|
-
warning:
|
|
29
|
-
"bg-yellow-50 text-yellow-700 dark:bg-yellow-950 dark:text-yellow-300 [a&]:hover:bg-yellow-50/80 dark:[a&]:hover:bg-yellow-950/80",
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
type BadgeProps = React.ComponentProps<"span"> &
|
|
36
|
-
VariantProps<typeof badgeVariants> & { asChild?: boolean };
|
|
37
|
-
|
|
38
|
-
const Badge = ({
|
|
39
|
-
className,
|
|
40
|
-
variant = "default",
|
|
41
|
-
asChild = false,
|
|
42
|
-
children,
|
|
43
|
-
...props
|
|
44
|
-
}: BadgeProps) =>
|
|
45
|
-
useRender({
|
|
46
|
-
defaultTagName: "span",
|
|
47
|
-
props: mergeProps<"span">(
|
|
48
|
-
{
|
|
49
|
-
className: cn(badgeVariants({ variant }), className),
|
|
50
|
-
},
|
|
51
|
-
asChild ? props : { ...props, children }
|
|
52
|
-
),
|
|
53
|
-
render: asChild ? (children as React.ReactElement) : undefined,
|
|
54
|
-
state: {
|
|
55
|
-
slot: "badge",
|
|
56
|
-
variant,
|
|
57
|
-
},
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
export { Badge, badgeVariants };
|
|
61
|
-
export type { BadgeProps };
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
-
import { ChevronRight, MoreHorizontal } from "blode-icons-react";
|
|
4
|
-
import type * as React from "react";
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils";
|
|
7
|
-
|
|
8
|
-
const Breadcrumb = ({ ...props }: React.ComponentProps<"nav">) => (
|
|
9
|
-
<nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
const BreadcrumbList = ({
|
|
13
|
-
className,
|
|
14
|
-
...props
|
|
15
|
-
}: React.ComponentProps<"ol">) => (
|
|
16
|
-
<ol
|
|
17
|
-
className={cn(
|
|
18
|
-
"flex flex-wrap items-center gap-1.5 break-words text-muted-foreground text-sm sm:gap-2.5",
|
|
19
|
-
className
|
|
20
|
-
)}
|
|
21
|
-
data-slot="breadcrumb-list"
|
|
22
|
-
{...props}
|
|
23
|
-
/>
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
const BreadcrumbItem = ({
|
|
27
|
-
className,
|
|
28
|
-
...props
|
|
29
|
-
}: React.ComponentProps<"li">) => (
|
|
30
|
-
<li
|
|
31
|
-
className={cn("inline-flex items-center gap-1.5", className)}
|
|
32
|
-
data-slot="breadcrumb-item"
|
|
33
|
-
{...props}
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
const BreadcrumbLink = ({
|
|
38
|
-
asChild,
|
|
39
|
-
className,
|
|
40
|
-
children,
|
|
41
|
-
...props
|
|
42
|
-
}: React.ComponentProps<"a"> & {
|
|
43
|
-
asChild?: boolean;
|
|
44
|
-
}) =>
|
|
45
|
-
useRender({
|
|
46
|
-
defaultTagName: "a",
|
|
47
|
-
props: mergeProps<"a">(
|
|
48
|
-
{
|
|
49
|
-
className: cn("transition-colors hover:text-foreground", className),
|
|
50
|
-
},
|
|
51
|
-
asChild ? props : { ...props, children }
|
|
52
|
-
),
|
|
53
|
-
render: asChild ? (children as React.ReactElement) : undefined,
|
|
54
|
-
state: {
|
|
55
|
-
slot: "breadcrumb-link",
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
const BreadcrumbPage = ({
|
|
60
|
-
className,
|
|
61
|
-
...props
|
|
62
|
-
}: React.ComponentProps<"span">) => (
|
|
63
|
-
<span
|
|
64
|
-
aria-current="page"
|
|
65
|
-
aria-disabled="true"
|
|
66
|
-
className={cn("font-normal text-foreground", className)}
|
|
67
|
-
data-slot="breadcrumb-page"
|
|
68
|
-
{...props}
|
|
69
|
-
/>
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
const BreadcrumbSeparator = ({
|
|
73
|
-
children,
|
|
74
|
-
className,
|
|
75
|
-
...props
|
|
76
|
-
}: React.ComponentProps<"li">) => (
|
|
77
|
-
<li
|
|
78
|
-
aria-hidden="true"
|
|
79
|
-
className={cn("[&>svg]:size-3.5", className)}
|
|
80
|
-
data-slot="breadcrumb-separator"
|
|
81
|
-
role="presentation"
|
|
82
|
-
{...props}
|
|
83
|
-
>
|
|
84
|
-
{children ?? <ChevronRight />}
|
|
85
|
-
</li>
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
const BreadcrumbEllipsis = ({
|
|
89
|
-
className,
|
|
90
|
-
...props
|
|
91
|
-
}: React.ComponentProps<"span">) => (
|
|
92
|
-
<span
|
|
93
|
-
aria-hidden="true"
|
|
94
|
-
className={cn("flex size-9 items-center justify-center", className)}
|
|
95
|
-
data-slot="breadcrumb-ellipsis"
|
|
96
|
-
role="presentation"
|
|
97
|
-
{...props}
|
|
98
|
-
>
|
|
99
|
-
<MoreHorizontal className="size-4" />
|
|
100
|
-
<span className="sr-only">More</span>
|
|
101
|
-
</span>
|
|
102
|
-
);
|
|
103
|
-
|
|
104
|
-
export {
|
|
105
|
-
Breadcrumb,
|
|
106
|
-
BreadcrumbList,
|
|
107
|
-
BreadcrumbItem,
|
|
108
|
-
BreadcrumbLink,
|
|
109
|
-
BreadcrumbPage,
|
|
110
|
-
BreadcrumbSeparator,
|
|
111
|
-
BreadcrumbEllipsis,
|
|
112
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
|
-
import type { VariantProps } from "class-variance-authority";
|
|
5
|
-
|
|
6
|
-
import { Separator } from "@/components/ui/separator";
|
|
7
|
-
import { cn } from "@/lib/utils";
|
|
8
|
-
|
|
9
|
-
const buttonGroupVariants = cva(
|
|
10
|
-
"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
11
|
-
{
|
|
12
|
-
defaultVariants: {
|
|
13
|
-
orientation: "horizontal",
|
|
14
|
-
},
|
|
15
|
-
variants: {
|
|
16
|
-
orientation: {
|
|
17
|
-
horizontal:
|
|
18
|
-
"*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",
|
|
19
|
-
vertical:
|
|
20
|
-
"flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0",
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
const ButtonGroup = ({
|
|
27
|
-
className,
|
|
28
|
-
orientation,
|
|
29
|
-
...props
|
|
30
|
-
}: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>) => (
|
|
31
|
-
<div
|
|
32
|
-
className={cn(buttonGroupVariants({ orientation }), className)}
|
|
33
|
-
data-orientation={orientation}
|
|
34
|
-
data-slot="button-group"
|
|
35
|
-
role="group"
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
const ButtonGroupText = ({
|
|
41
|
-
className,
|
|
42
|
-
render,
|
|
43
|
-
...props
|
|
44
|
-
}: useRender.ComponentProps<"div">) =>
|
|
45
|
-
useRender({
|
|
46
|
-
defaultTagName: "div",
|
|
47
|
-
props: mergeProps<"div">(
|
|
48
|
-
{
|
|
49
|
-
className: cn(
|
|
50
|
-
"flex items-center gap-2 rounded-lg border bg-muted px-2.5 font-medium text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
|
|
51
|
-
className
|
|
52
|
-
),
|
|
53
|
-
},
|
|
54
|
-
props
|
|
55
|
-
),
|
|
56
|
-
render,
|
|
57
|
-
state: {
|
|
58
|
-
slot: "button-group-text",
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
const ButtonGroupSeparator = ({
|
|
63
|
-
className,
|
|
64
|
-
orientation = "vertical",
|
|
65
|
-
...props
|
|
66
|
-
}: React.ComponentProps<typeof Separator>) => (
|
|
67
|
-
<Separator
|
|
68
|
-
className={cn(
|
|
69
|
-
"relative self-stretch bg-input data-horizontal:mx-px data-vertical:my-px data-vertical:h-auto data-horizontal:w-auto",
|
|
70
|
-
className
|
|
71
|
-
)}
|
|
72
|
-
data-slot="button-group-separator"
|
|
73
|
-
orientation={orientation}
|
|
74
|
-
{...props}
|
|
75
|
-
/>
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
export {
|
|
79
|
-
ButtonGroup,
|
|
80
|
-
ButtonGroupSeparator,
|
|
81
|
-
ButtonGroupText,
|
|
82
|
-
buttonGroupVariants,
|
|
83
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
import type { VariantProps } from "class-variance-authority";
|
|
3
|
-
import { Slot } from "radix-ui";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils";
|
|
7
|
-
|
|
8
|
-
const buttonVariants = cva(
|
|
9
|
-
"inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
10
|
-
{
|
|
11
|
-
defaultVariants: {
|
|
12
|
-
size: "default",
|
|
13
|
-
variant: "default",
|
|
14
|
-
},
|
|
15
|
-
variants: {
|
|
16
|
-
size: {
|
|
17
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
18
|
-
icon: "size-9",
|
|
19
|
-
"icon-lg": "size-10",
|
|
20
|
-
"icon-sm": "size-8",
|
|
21
|
-
"icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
22
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
23
|
-
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
24
|
-
xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
25
|
-
},
|
|
26
|
-
variant: {
|
|
27
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
28
|
-
destructive:
|
|
29
|
-
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
30
|
-
ghost:
|
|
31
|
-
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
32
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
33
|
-
outline:
|
|
34
|
-
"border bg-background hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
35
|
-
secondary:
|
|
36
|
-
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
const Button = ({
|
|
43
|
-
className,
|
|
44
|
-
variant = "default",
|
|
45
|
-
size = "default",
|
|
46
|
-
asChild = false,
|
|
47
|
-
...props
|
|
48
|
-
}: React.ComponentProps<"button"> &
|
|
49
|
-
VariantProps<typeof buttonVariants> & {
|
|
50
|
-
asChild?: boolean;
|
|
51
|
-
}) => {
|
|
52
|
-
const Comp = asChild ? Slot.Root : "button";
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<Comp
|
|
56
|
-
data-slot="button"
|
|
57
|
-
data-variant={variant}
|
|
58
|
-
data-size={size}
|
|
59
|
-
className={cn(buttonVariants({ className, size, variant }))}
|
|
60
|
-
{...props}
|
|
61
|
-
/>
|
|
62
|
-
);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export { Button, buttonVariants };
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import type * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/utils";
|
|
4
|
-
|
|
5
|
-
const Card = ({
|
|
6
|
-
className,
|
|
7
|
-
size = "default",
|
|
8
|
-
...props
|
|
9
|
-
}: React.ComponentProps<"div"> & { size?: "default" | "sm" }) => (
|
|
10
|
-
<div
|
|
11
|
-
className={cn(
|
|
12
|
-
"group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-card-foreground text-sm ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 has-data-[slot=card-footer]:pb-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
|
|
13
|
-
className
|
|
14
|
-
)}
|
|
15
|
-
data-size={size}
|
|
16
|
-
data-slot="card"
|
|
17
|
-
{...props}
|
|
18
|
-
/>
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
const CardHeader = ({ className, ...props }: React.ComponentProps<"div">) => (
|
|
22
|
-
<div
|
|
23
|
-
className={cn(
|
|
24
|
-
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",
|
|
25
|
-
className
|
|
26
|
-
)}
|
|
27
|
-
data-slot="card-header"
|
|
28
|
-
{...props}
|
|
29
|
-
/>
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
const CardTitle = ({ className, ...props }: React.ComponentProps<"div">) => (
|
|
33
|
-
<div
|
|
34
|
-
className={cn(
|
|
35
|
-
"font-medium text-base leading-snug group-data-[size=sm]/card:text-sm",
|
|
36
|
-
className
|
|
37
|
-
)}
|
|
38
|
-
data-slot="card-title"
|
|
39
|
-
{...props}
|
|
40
|
-
/>
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
const CardDescription = ({
|
|
44
|
-
className,
|
|
45
|
-
...props
|
|
46
|
-
}: React.ComponentProps<"div">) => (
|
|
47
|
-
<div
|
|
48
|
-
className={cn("text-muted-foreground text-sm", className)}
|
|
49
|
-
data-slot="card-description"
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
const CardAction = ({ className, ...props }: React.ComponentProps<"div">) => (
|
|
55
|
-
<div
|
|
56
|
-
className={cn(
|
|
57
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
58
|
-
className
|
|
59
|
-
)}
|
|
60
|
-
data-slot="card-action"
|
|
61
|
-
{...props}
|
|
62
|
-
/>
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
const CardContent = ({ className, ...props }: React.ComponentProps<"div">) => (
|
|
66
|
-
<div
|
|
67
|
-
className={cn("px-4 group-data-[size=sm]/card:px-3", className)}
|
|
68
|
-
data-slot="card-content"
|
|
69
|
-
{...props}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
const CardFooter = ({ className, ...props }: React.ComponentProps<"div">) => (
|
|
74
|
-
<div
|
|
75
|
-
className={cn(
|
|
76
|
-
"flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3",
|
|
77
|
-
className
|
|
78
|
-
)}
|
|
79
|
-
data-slot="card-footer"
|
|
80
|
-
{...props}
|
|
81
|
-
/>
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
export {
|
|
85
|
-
Card,
|
|
86
|
-
CardHeader,
|
|
87
|
-
CardFooter,
|
|
88
|
-
CardTitle,
|
|
89
|
-
CardAction,
|
|
90
|
-
CardDescription,
|
|
91
|
-
CardContent,
|
|
92
|
-
};
|