@publish.os/nextjs 0.0.1-alpha.4 → 0.0.1-alpha.6
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 +1 -1
- package/dist/config/createNextConfig.js +3 -3
- package/dist/index.js +7 -5
- package/dist/kernel/components/blocks/color-palette.js +35 -4
- package/dist/kernel/components/blocks/design-system-preview.js +18 -17
- package/dist/kernel/components/blocks/link-playground.js +3 -3
- package/dist/kernel/components/blocks/logo-block.js +1 -1
- package/dist/kernel/components/blocks/nav-breadcrumb.js +2 -12
- package/dist/kernel/components/blocks/navbar.js +1 -1
- package/dist/kernel/components/blocks/navigation-progress-playground.js +2 -2
- package/dist/kernel/components/mdx/components/image.js +1 -1
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +3 -1
- package/dist/kernel/components/ui/breadcrumb-trail.js +1 -0
- package/dist/kernel/components/ui/breadcrumb.d.ts +1 -5
- package/dist/kernel/components/ui/breadcrumb.js +1 -16
- package/dist/kernel/components/ui/button-group.d.ts +2 -2
- package/dist/kernel/components/ui/button-group.js +2 -3
- package/dist/kernel/components/ui/button.d.ts +3 -4
- package/dist/kernel/components/ui/button.js +4 -12
- package/dist/kernel/components/ui/card.d.ts +1 -1
- package/dist/kernel/components/ui/menu.js +5 -5
- package/dist/kernel/components/ui/navigation-menu.js +2 -2
- package/dist/kernel/components/ui/popover.js +5 -11
- package/dist/kernel/components/ui/select.js +5 -5
- package/dist/kernel/components/ui/tag.d.ts +14 -0
- package/dist/kernel/components/ui/tag.js +76 -0
- package/dist/kernel/components/ui/text.d.ts +1 -1
- package/dist/kernel/components/ui/text.js +109 -106
- package/dist/kernel/components/ui/theme-toggle.js +1 -1
- package/dist/kernel/components/ui/tooltip.js +2 -2
- package/dist/kernel/defaults.registry.d.ts +63 -72
- package/dist/kernel/defaults.registry.js +62 -70
- package/dist/kernel/routes/agent/markdown.js +2 -2
- package/dist/kernel/routes/metadata/feed.js +2 -2
- package/dist/kernel/routes/metadata/llms.js +4 -2
- package/dist/kernel/routes/metadata/og-image.d.ts +1 -1
- package/dist/kernel/routes/metadata/robots.js +2 -2
- package/dist/kernel/routes/metadata/sitemap.js +2 -2
- package/dist/utils/cn.d.ts +1 -1
- package/package.json +4 -9
- package/release/package.json +4 -3
- package/release/release.json +5 -5
- package/release/{pnpm-lock.yaml → runtime-pnpm-lock.yaml} +348 -224
- package/dist/cache/tags.cjs +0 -79
- package/dist/cache/tags.d.cts +0 -13
- package/dist/config/createNextConfig.cjs +0 -52
- package/dist/config/createNextConfig.d.cts +0 -8
- package/dist/config.cjs +0 -78
- package/dist/config.d.cts +0 -101
- package/dist/config.d.ts +0 -101
- package/dist/config.js +0 -48
- package/dist/index.cjs +0 -1266
- package/dist/index.d.cts +0 -18
- package/dist/kernel/components/blocks/AgentActions.cjs +0 -425
- package/dist/kernel/components/blocks/AgentActions.d.cts +0 -52
- package/dist/kernel/components/blocks/animated-icon-swap.cjs +0 -101
- package/dist/kernel/components/blocks/animated-icon-swap.d.cts +0 -16
- package/dist/kernel/components/blocks/color-palette.cjs +0 -413
- package/dist/kernel/components/blocks/color-palette.d.cts +0 -7
- package/dist/kernel/components/blocks/design-system-preview.cjs +0 -592
- package/dist/kernel/components/blocks/design-system-preview.d.cts +0 -29
- package/dist/kernel/components/blocks/link-playground.cjs +0 -816
- package/dist/kernel/components/blocks/link-playground.d.cts +0 -5
- package/dist/kernel/components/blocks/logo-block.cjs +0 -156
- package/dist/kernel/components/blocks/logo-block.d.cts +0 -21
- package/dist/kernel/components/blocks/nav-breadcrumb.cjs +0 -122
- package/dist/kernel/components/blocks/nav-breadcrumb.d.cts +0 -11
- package/dist/kernel/components/blocks/navbar.cjs +0 -154
- package/dist/kernel/components/blocks/navbar.d.cts +0 -16
- package/dist/kernel/components/blocks/navigation-progress-playground.cjs +0 -735
- package/dist/kernel/components/blocks/navigation-progress-playground.d.cts +0 -5
- package/dist/kernel/components/blocks/navigation-progress.cjs +0 -270
- package/dist/kernel/components/blocks/navigation-progress.d.cts +0 -16
- package/dist/kernel/components/blocks/next-prev.cjs +0 -142
- package/dist/kernel/components/blocks/next-prev.d.cts +0 -11
- package/dist/kernel/components/blocks/page-list.cjs +0 -59
- package/dist/kernel/components/blocks/page-list.d.cts +0 -11
- package/dist/kernel/components/blocks/search.cjs +0 -717
- package/dist/kernel/components/blocks/search.d.cts +0 -77
- package/dist/kernel/components/blocks/sidebar-node.cjs +0 -309
- package/dist/kernel/components/blocks/sidebar-node.d.cts +0 -8
- package/dist/kernel/components/blocks/sidebar.cjs +0 -317
- package/dist/kernel/components/blocks/sidebar.d.cts +0 -33
- package/dist/kernel/components/blocks/theme-toggle.cjs +0 -31
- package/dist/kernel/components/blocks/theme-toggle.d.cts +0 -6
- package/dist/kernel/components/blocks/toc.cjs +0 -356
- package/dist/kernel/components/blocks/toc.d.cts +0 -10
- package/dist/kernel/components/mdx/components/blockquote.cjs +0 -66
- package/dist/kernel/components/mdx/components/blockquote.d.cts +0 -6
- package/dist/kernel/components/mdx/components/callout.cjs +0 -137
- package/dist/kernel/components/mdx/components/callout.d.cts +0 -18
- package/dist/kernel/components/mdx/components/code-block.cjs +0 -39
- package/dist/kernel/components/mdx/components/code-block.d.cts +0 -9
- package/dist/kernel/components/mdx/components/figure-caption.cjs +0 -63
- package/dist/kernel/components/mdx/components/figure-caption.d.cts +0 -6
- package/dist/kernel/components/mdx/components/figure.cjs +0 -78
- package/dist/kernel/components/mdx/components/figure.d.cts +0 -10
- package/dist/kernel/components/mdx/components/footnotes.cjs +0 -66
- package/dist/kernel/components/mdx/components/footnotes.d.cts +0 -6
- package/dist/kernel/components/mdx/components/heading-copy-link.cjs +0 -108
- package/dist/kernel/components/mdx/components/heading-copy-link.d.cts +0 -23
- package/dist/kernel/components/mdx/components/heading.cjs +0 -166
- package/dist/kernel/components/mdx/components/heading.d.cts +0 -8
- package/dist/kernel/components/mdx/components/hr.cjs +0 -34
- package/dist/kernel/components/mdx/components/hr.d.cts +0 -9
- package/dist/kernel/components/mdx/components/image-zoom.cjs +0 -49
- package/dist/kernel/components/mdx/components/image-zoom.d.cts +0 -10
- package/dist/kernel/components/mdx/components/image.cjs +0 -192
- package/dist/kernel/components/mdx/components/image.d.cts +0 -21
- package/dist/kernel/components/mdx/components/inline-code.cjs +0 -66
- package/dist/kernel/components/mdx/components/inline-code.d.cts +0 -6
- package/dist/kernel/components/mdx/components/kbd.cjs +0 -34
- package/dist/kernel/components/mdx/components/kbd.d.cts +0 -10
- package/dist/kernel/components/mdx/components/link.cjs +0 -49
- package/dist/kernel/components/mdx/components/link.d.cts +0 -11
- package/dist/kernel/components/mdx/components/paragraph.cjs +0 -87
- package/dist/kernel/components/mdx/components/paragraph.d.cts +0 -5
- package/dist/kernel/components/mdx/components/pre.cjs +0 -66
- package/dist/kernel/components/mdx/components/pre.d.cts +0 -6
- package/dist/kernel/components/mdx/components/strikethrough.cjs +0 -63
- package/dist/kernel/components/mdx/components/strikethrough.d.cts +0 -6
- package/dist/kernel/components/mdx/components/table.cjs +0 -59
- package/dist/kernel/components/mdx/components/table.d.cts +0 -10
- package/dist/kernel/components/mdx/components/task-list.cjs +0 -88
- package/dist/kernel/components/mdx/components/task-list.d.cts +0 -8
- package/dist/kernel/components/mdx/components/video-player.cjs +0 -173
- package/dist/kernel/components/mdx/components/video-player.d.cts +0 -18
- package/dist/kernel/components/mdx/components/video.cjs +0 -185
- package/dist/kernel/components/mdx/components/video.d.cts +0 -15
- package/dist/kernel/components/mdx/error-boundary.cjs +0 -62
- package/dist/kernel/components/mdx/error-boundary.d.cts +0 -8
- package/dist/kernel/components/mdx/error-fallback.cjs +0 -58
- package/dist/kernel/components/mdx/error-fallback.d.cts +0 -9
- package/dist/kernel/components/mdx/mdx.cjs +0 -141
- package/dist/kernel/components/mdx/mdx.d.cts +0 -22
- package/dist/kernel/components/mdx/rehype-heading-ids.cjs +0 -113
- package/dist/kernel/components/mdx/rehype-heading-ids.d.cts +0 -10
- package/dist/kernel/components/mdx/types.cjs +0 -18
- package/dist/kernel/components/mdx/types.d.cts +0 -18
- package/dist/kernel/components/ui/accordion.cjs +0 -104
- package/dist/kernel/components/ui/accordion.d.cts +0 -16
- package/dist/kernel/components/ui/badge.cjs +0 -75
- package/dist/kernel/components/ui/badge.d.cts +0 -12
- package/dist/kernel/components/ui/badge.d.ts +0 -12
- package/dist/kernel/components/ui/badge.js +0 -47
- package/dist/kernel/components/ui/breadcrumb-trail.cjs +0 -238
- package/dist/kernel/components/ui/breadcrumb-trail.d.cts +0 -13
- package/dist/kernel/components/ui/breadcrumb.cjs +0 -399
- package/dist/kernel/components/ui/breadcrumb.d.cts +0 -52
- package/dist/kernel/components/ui/button-group.cjs +0 -144
- package/dist/kernel/components/ui/button-group.d.cts +0 -19
- package/dist/kernel/components/ui/button.cjs +0 -147
- package/dist/kernel/components/ui/button.d.cts +0 -23
- package/dist/kernel/components/ui/card.cjs +0 -133
- package/dist/kernel/components/ui/card.d.cts +0 -17
- package/dist/kernel/components/ui/dialog.cjs +0 -149
- package/dist/kernel/components/ui/dialog.d.cts +0 -22
- package/dist/kernel/components/ui/drawer.cjs +0 -163
- package/dist/kernel/components/ui/drawer.d.cts +0 -24
- package/dist/kernel/components/ui/input.cjs +0 -96
- package/dist/kernel/components/ui/input.d.cts +0 -18
- package/dist/kernel/components/ui/kbd.cjs +0 -105
- package/dist/kernel/components/ui/kbd.d.cts +0 -13
- package/dist/kernel/components/ui/link.cjs +0 -253
- package/dist/kernel/components/ui/link.d.cts +0 -31
- package/dist/kernel/components/ui/menu.cjs +0 -301
- package/dist/kernel/components/ui/menu.d.cts +0 -70
- package/dist/kernel/components/ui/meta-key.cjs +0 -34
- package/dist/kernel/components/ui/meta-key.d.cts +0 -12
- package/dist/kernel/components/ui/navigation-menu.cjs +0 -253
- package/dist/kernel/components/ui/navigation-menu.d.cts +0 -47
- package/dist/kernel/components/ui/popover.cjs +0 -168
- package/dist/kernel/components/ui/popover.d.cts +0 -24
- package/dist/kernel/components/ui/progress.cjs +0 -112
- package/dist/kernel/components/ui/progress.d.cts +0 -16
- package/dist/kernel/components/ui/scroll-area.cjs +0 -413
- package/dist/kernel/components/ui/scroll-area.d.cts +0 -58
- package/dist/kernel/components/ui/select.cjs +0 -244
- package/dist/kernel/components/ui/select.d.cts +0 -40
- package/dist/kernel/components/ui/separator.cjs +0 -73
- package/dist/kernel/components/ui/separator.d.cts +0 -8
- package/dist/kernel/components/ui/table.cjs +0 -131
- package/dist/kernel/components/ui/table.d.cts +0 -11
- package/dist/kernel/components/ui/tabs.cjs +0 -450
- package/dist/kernel/components/ui/tabs.d.cts +0 -82
- package/dist/kernel/components/ui/text.cjs +0 -184
- package/dist/kernel/components/ui/text.d.cts +0 -17
- package/dist/kernel/components/ui/theme-toggle.cjs +0 -108
- package/dist/kernel/components/ui/theme-toggle.d.cts +0 -10
- package/dist/kernel/components/ui/toast.cjs +0 -154
- package/dist/kernel/components/ui/toast.d.cts +0 -26
- package/dist/kernel/components/ui/tooltip.cjs +0 -127
- package/dist/kernel/components/ui/tooltip.d.cts +0 -20
- package/dist/kernel/defaults.registry.cjs +0 -541
- package/dist/kernel/defaults.registry.d.cts +0 -469
- package/dist/kernel/routes/agent/markdown.cjs +0 -202
- package/dist/kernel/routes/agent/markdown.d.cts +0 -58
- package/dist/kernel/routes/layouts/group.cjs +0 -181
- package/dist/kernel/routes/layouts/group.d.cts +0 -20
- package/dist/kernel/routes/metadata/feed.cjs +0 -293
- package/dist/kernel/routes/metadata/feed.d.cts +0 -20
- package/dist/kernel/routes/metadata/llms.cjs +0 -239
- package/dist/kernel/routes/metadata/llms.d.cts +0 -26
- package/dist/kernel/routes/metadata/og-image.cjs +0 -630
- package/dist/kernel/routes/metadata/og-image.d.cts +0 -62
- package/dist/kernel/routes/metadata/robots.cjs +0 -148
- package/dist/kernel/routes/metadata/robots.d.cts +0 -6
- package/dist/kernel/routes/metadata/sitemap.cjs +0 -192
- package/dist/kernel/routes/metadata/sitemap.d.cts +0 -8
- package/dist/kernel/routes/pages/group.cjs +0 -263
- package/dist/kernel/routes/pages/group.d.cts +0 -17
- package/dist/kernel/routes/pages/leaf.cjs +0 -421
- package/dist/kernel/routes/pages/leaf.d.cts +0 -36
- package/dist/kernel/routes/pages/root.cjs +0 -229
- package/dist/kernel/routes/pages/root.d.cts +0 -16
- package/dist/keyboard-shortcuts.cjs +0 -345
- package/dist/keyboard-shortcuts.d.cts +0 -34
- package/dist/resolvers/manifest-resolver.cjs +0 -111
- package/dist/resolvers/manifest-resolver.d.cts +0 -13
- package/dist/search.cjs +0 -411
- package/dist/search.d.cts +0 -20
- package/dist/types.cjs +0 -30
- package/dist/types.d.cts +0 -269
- package/dist/utils/cn.cjs +0 -49
- package/dist/utils/cn.d.cts +0 -15
- package/dist/utils/heading-ids.cjs +0 -119
- package/dist/utils/heading-ids.d.cts +0 -15
- package/dist/utils/pretty-date.cjs +0 -55
- package/dist/utils/pretty-date.d.cts +0 -6
|
@@ -1,592 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/kernel/components/blocks/design-system-preview.tsx
|
|
32
|
-
var design_system_preview_exports = {};
|
|
33
|
-
__export(design_system_preview_exports, {
|
|
34
|
-
DesignSystemPreview: () => DesignSystemPreview
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(design_system_preview_exports);
|
|
37
|
-
var import_animated_icon_swap = require("./animated-icon-swap.js");
|
|
38
|
-
var import_color_palette = __toESM(require("./color-palette.js"), 1);
|
|
39
|
-
var import_inline_code = require("../mdx/components/inline-code.js");
|
|
40
|
-
var import_accordion = require("../ui/accordion.js");
|
|
41
|
-
var import_badge = require("../ui/badge.js");
|
|
42
|
-
var import_breadcrumb = require("../ui/breadcrumb.js");
|
|
43
|
-
var import_button = require("../ui/button.js");
|
|
44
|
-
var import_button_group = require("../ui/button-group.js");
|
|
45
|
-
var import_card = require("../ui/card.js");
|
|
46
|
-
var import_dialog = require("../ui/dialog.js");
|
|
47
|
-
var import_drawer = require("../ui/drawer.js");
|
|
48
|
-
var import_input = require("../ui/input.js");
|
|
49
|
-
var import_kbd = require("../ui/kbd.js");
|
|
50
|
-
var import_link = require("../ui/link.js");
|
|
51
|
-
var import_menu = require("../ui/menu.js");
|
|
52
|
-
var import_meta_key = require("../ui/meta-key.js");
|
|
53
|
-
var import_popover = require("../ui/popover.js");
|
|
54
|
-
var import_progress = require("../ui/progress.js");
|
|
55
|
-
var import_scroll_area = require("../ui/scroll-area.js");
|
|
56
|
-
var import_select = require("../ui/select.js");
|
|
57
|
-
var import_separator = require("../ui/separator.js");
|
|
58
|
-
var import_table = require("../ui/table.js");
|
|
59
|
-
var import_tabs = require("../ui/tabs.js");
|
|
60
|
-
var import_text = require("../ui/text.js");
|
|
61
|
-
var import_toast = require("../ui/toast.js");
|
|
62
|
-
var import_tooltip = require("../ui/tooltip.js");
|
|
63
|
-
var import_lucide_react = require("lucide-react");
|
|
64
|
-
var import_react = require("react");
|
|
65
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
66
|
-
var tabs = [
|
|
67
|
-
{ id: "tokens", label: "Tokens" },
|
|
68
|
-
{ id: "typography", label: "Typography" },
|
|
69
|
-
{ id: "ui", label: "UI" },
|
|
70
|
-
{ id: "mdx", label: "MDX" },
|
|
71
|
-
{ id: "blocks", label: "Blocks" }
|
|
72
|
-
];
|
|
73
|
-
var scrollRows = Array.from({ length: 8 }, (_, index) => ({
|
|
74
|
-
id: `row-${index + 1}`,
|
|
75
|
-
label: `Scrollable row ${index + 1}`
|
|
76
|
-
}));
|
|
77
|
-
function hasFixture(items, name) {
|
|
78
|
-
return items.some((item) => item.name === name);
|
|
79
|
-
}
|
|
80
|
-
function PreviewCell({
|
|
81
|
-
children,
|
|
82
|
-
name
|
|
83
|
-
}) {
|
|
84
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "relative flex min-h-72 items-center justify-center border-b border-r border-stroke-3 bg-surface-1 p-8", children: [
|
|
85
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "absolute left-4 top-4 text-xs font-medium text-foreground-3", children: name }),
|
|
86
|
-
children
|
|
87
|
-
] });
|
|
88
|
-
}
|
|
89
|
-
function TypographyPreview() {
|
|
90
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid border-l border-t border-stroke-3 md:grid-cols-2", children: [
|
|
91
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Headings", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3 text-foreground-1", children: [
|
|
92
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-4xl font-semibold tracking-tight", children: "Heading One" }),
|
|
93
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-2xl font-semibold tracking-tight", children: "Heading Two" }),
|
|
94
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "text-xl font-medium", children: "Heading Three" })
|
|
95
|
-
] }) }),
|
|
96
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Paragraph", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { className: "max-w-md text-foreground-2", children: "Good typography keeps dense documentation readable while leaving enough contrast for scanning headings, links, and inline code." }) }),
|
|
97
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Inline", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-sm leading-7 text-foreground-2", children: [
|
|
98
|
-
"A paragraph with ",
|
|
99
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "/ds", children: "a link" }),
|
|
100
|
-
",",
|
|
101
|
-
" ",
|
|
102
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_inline_code.InlineCode, { children: "code" }),
|
|
103
|
-
", and ",
|
|
104
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_kbd.Kbd, { children: "K" }),
|
|
105
|
-
"."
|
|
106
|
-
] }) }),
|
|
107
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Longform", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("blockquote", { className: "max-w-md border-l-2 border-accent-1 pl-4 text-sm leading-7 text-foreground-2", children: "The preview should reveal how content feels in real reading contexts, not only as isolated color chips." }) })
|
|
108
|
-
] });
|
|
109
|
-
}
|
|
110
|
-
function UiPreview({ items = [] }) {
|
|
111
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid border-l border-t border-stroke-3 md:grid-cols-2 xl:grid-cols-4", children: [
|
|
112
|
-
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: item.name, children: item.children }, item.name)),
|
|
113
|
-
!hasFixture(items, "Button") && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Button", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
|
|
114
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { children: "Primary" }),
|
|
115
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "secondary", children: "Secondary" }),
|
|
116
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { disabled: true, variant: "outline", children: "Disabled" })
|
|
117
|
-
] }) }),
|
|
118
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "ButtonGroup", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid gap-4", children: [
|
|
119
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button_group.ButtonGroup, { children: [
|
|
120
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "secondary", children: "Draft" }),
|
|
121
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "secondary", children: "Preview" }),
|
|
122
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "secondary", children: "Publish" })
|
|
123
|
-
] }),
|
|
124
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button_group.ButtonGroup, { children: [
|
|
125
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button_group.ButtonGroupText, { size: "sm", children: "v1.2.0" }),
|
|
126
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button_group.ButtonGroupSeparator, {}),
|
|
127
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "sm", variant: "outline", children: "Copy" })
|
|
128
|
-
] }),
|
|
129
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button_group.ButtonGroup, { orientation: "vertical", children: [
|
|
130
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "sm", variant: "secondary", children: "Move up" }),
|
|
131
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "sm", variant: "secondary", children: "Move down" })
|
|
132
|
-
] })
|
|
133
|
-
] }) }),
|
|
134
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Badge", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-wrap justify-center gap-2", children: [
|
|
135
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.Badge, { variant: "primary", children: "Primary" }),
|
|
136
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.Badge, { children: "Default" }),
|
|
137
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.Badge, { variant: "outline", children: "Outline" })
|
|
138
|
-
] }) }),
|
|
139
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Input", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
140
|
-
"label",
|
|
141
|
-
{
|
|
142
|
-
className: "grid w-full max-w-xs gap-2 text-sm text-foreground-2",
|
|
143
|
-
htmlFor: "design-system-preview-email",
|
|
144
|
-
children: [
|
|
145
|
-
"Email",
|
|
146
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
147
|
-
import_input.Input,
|
|
148
|
-
{
|
|
149
|
-
id: "design-system-preview-email",
|
|
150
|
-
placeholder: "name@example.com",
|
|
151
|
-
type: "email"
|
|
152
|
-
}
|
|
153
|
-
)
|
|
154
|
-
]
|
|
155
|
-
}
|
|
156
|
-
) }),
|
|
157
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Link", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
|
|
158
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "default", href: "#", variant: "link.standalone", children: "Default standalone" }),
|
|
159
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", href: "#", variant: "link.inline", children: "Accent inline" }),
|
|
160
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
161
|
-
import_link.Link,
|
|
162
|
-
{
|
|
163
|
-
color: "default",
|
|
164
|
-
href: "#",
|
|
165
|
-
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": "true", children: "\u2190" }),
|
|
166
|
-
variant: "link.standalone",
|
|
167
|
-
children: "Back to overview"
|
|
168
|
-
}
|
|
169
|
-
),
|
|
170
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
171
|
-
import_link.Link,
|
|
172
|
-
{
|
|
173
|
-
color: "accent",
|
|
174
|
-
href: "#",
|
|
175
|
-
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": "true", children: "\u2197" }),
|
|
176
|
-
variant: "link.standalone",
|
|
177
|
-
children: "External resource"
|
|
178
|
-
}
|
|
179
|
-
),
|
|
180
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", disabled: true, href: "#", variant: "link.standalone", children: "Disabled link" }),
|
|
181
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "#", size: "sm", variant: "button.primary", children: "Link as button" })
|
|
182
|
-
] }) }),
|
|
183
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Link colors", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
|
|
184
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "/ds", color: "green-300", children: "Docs" }),
|
|
185
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "/ds", color: "purple-800", children: "Purple link" }),
|
|
186
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "/ds", color: "accent-solid-hover", children: "Accent hover" }),
|
|
187
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "/ds", color: "foreground-3", children: "Foreground 3" }),
|
|
188
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "/ds", color: "--brand-link", children: "Brand var" }),
|
|
189
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "/ds", color: "var(--brand-link)", children: "Brand var" }),
|
|
190
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "/ds", color: "oklch(55% 0.18 280)", children: "Raw OKLCH" })
|
|
191
|
-
] }) }),
|
|
192
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Link Scale", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-start gap-2", children: [
|
|
193
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", href: "#", size: "xs", variant: "link.standalone", children: "Extra small link" }),
|
|
194
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", href: "#", size: "sm", variant: "link.standalone", children: "Small link" }),
|
|
195
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", href: "#", size: "md", variant: "link.standalone", children: "Medium link" }),
|
|
196
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", href: "#", size: "lg", variant: "link.standalone", children: "Large link" }),
|
|
197
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", href: "#", size: "xl", variant: "link.standalone", children: "Extra large link" })
|
|
198
|
-
] }) }),
|
|
199
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Link Inline", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "max-w-xs text-sm leading-7 text-foreground-2", children: [
|
|
200
|
-
"Start:",
|
|
201
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("ol", { className: "mt-2 list-decimal space-y-1 pl-6", children: [
|
|
202
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { children: [
|
|
203
|
-
"Connect a",
|
|
204
|
-
" ",
|
|
205
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", href: "#", variant: "link.inline", children: "custom domain" })
|
|
206
|
-
] }),
|
|
207
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { children: [
|
|
208
|
-
"Review the",
|
|
209
|
-
" ",
|
|
210
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "default", href: "#", variant: "link.inline", children: "deployment checklist" })
|
|
211
|
-
] })
|
|
212
|
-
] })
|
|
213
|
-
] }) }),
|
|
214
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Composed styles", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid w-full max-w-sm gap-5", children: [
|
|
215
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_breadcrumb.Breadcrumb, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_breadcrumb.BreadcrumbList, { children: [
|
|
216
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_breadcrumb.BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_breadcrumb.BreadcrumbLink, { href: "#", children: "Default" }) }),
|
|
217
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_breadcrumb.BreadcrumbSeparator, {}),
|
|
218
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_breadcrumb.BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_breadcrumb.BreadcrumbLink, { href: "#", variant: "link.standalone", children: "Link" }) }),
|
|
219
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_breadcrumb.BreadcrumbSeparator, {}),
|
|
220
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_breadcrumb.BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_breadcrumb.BreadcrumbLink, { href: "#", size: "sm", variant: "button.ghost", children: "Button" }) }),
|
|
221
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_breadcrumb.BreadcrumbSeparator, {}),
|
|
222
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_breadcrumb.BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_breadcrumb.BreadcrumbPage, { children: "Page" }) })
|
|
223
|
-
] }) }),
|
|
224
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
225
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "#", variant: "link.inline", children: "Link inline" }),
|
|
226
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "#", size: "sm", variant: "button.secondary", children: "Link button" }),
|
|
227
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "sm", variant: "secondary", children: "Button" })
|
|
228
|
-
] })
|
|
229
|
-
] }) }),
|
|
230
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Text", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "max-w-xs space-y-2", children: [
|
|
231
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { weight: "semibold", children: "Body text" }),
|
|
232
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { className: "text-foreground-2", size: "sm", children: "Supporting copy" }),
|
|
233
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { size: "xs", variant: "label", children: "Small interface text" }),
|
|
234
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { size: "xs", variant: "overline", children: "Overline" })
|
|
235
|
-
] }) }),
|
|
236
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Select", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.Select, { defaultValue: "docs", children: [
|
|
237
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.SelectTrigger, { className: "w-48", children: [
|
|
238
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectValue, { placeholder: "Choose section" }),
|
|
239
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectIcon, {})
|
|
240
|
-
] }),
|
|
241
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectPositioner, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectPopup, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.SelectList, { children: [
|
|
242
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.SelectItem, { value: "docs", children: [
|
|
243
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectItemIndicator, {}),
|
|
244
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectItemText, { children: "Docs" })
|
|
245
|
-
] }),
|
|
246
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.SelectItem, { value: "api", children: [
|
|
247
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectItemIndicator, {}),
|
|
248
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectItemText, { children: "API" })
|
|
249
|
-
] })
|
|
250
|
-
] }) }) }) })
|
|
251
|
-
] }) }),
|
|
252
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "ScrollArea", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
253
|
-
import_scroll_area.ScrollArea,
|
|
254
|
-
{
|
|
255
|
-
className: "h-36 w-56 border border-stroke-2",
|
|
256
|
-
contentClassName: "space-y-3 p-4 text-sm text-foreground-2",
|
|
257
|
-
mask: { height: 16 },
|
|
258
|
-
variant: "gradient",
|
|
259
|
-
children: scrollRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: row.label }, row.id))
|
|
260
|
-
}
|
|
261
|
-
) }),
|
|
262
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Tooltip", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tooltip.TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tooltip.Tooltip, { children: [
|
|
263
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tooltip.TooltipTrigger, { className: (0, import_button.buttonVariants)({ variant: "outline" }), children: "Hover" }),
|
|
264
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tooltip.TooltipPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tooltip.TooltipPositioner, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tooltip.TooltipPopup, { children: "Helpful detail" }) }) })
|
|
265
|
-
] }) }) }),
|
|
266
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Popover", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_popover.Popover, { children: [
|
|
267
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popover.PopoverTrigger, { className: (0, import_button.buttonVariants)({ variant: "outline" }), children: "Open" }),
|
|
268
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popover.PopoverPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popover.PopoverPositioner, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_popover.PopoverPopup, { children: [
|
|
269
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popover.PopoverTitle, { children: "Popover" }),
|
|
270
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { className: "mt-2 text-foreground-2", size: "sm", children: "Floating content with tokenized surface styles." })
|
|
271
|
-
] }) }) })
|
|
272
|
-
] }) }),
|
|
273
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Dialog", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dialog.Dialog, { children: [
|
|
274
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogTrigger, { className: (0, import_button.buttonVariants)({ variant: "outline" }), children: "Open dialog" }),
|
|
275
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dialog.DialogPortal, { children: [
|
|
276
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogBackdrop, {}),
|
|
277
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dialog.DialogPopup, { children: [
|
|
278
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogTitle, { children: "Dialog title" }),
|
|
279
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { className: "mt-2 text-foreground-2", size: "sm", children: "Accessible modal behavior is handled by Base UI." })
|
|
280
|
-
] })
|
|
281
|
-
] })
|
|
282
|
-
] }) }),
|
|
283
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Menu", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_menu.Menu, { children: [
|
|
284
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.MenuTrigger, { className: (0, import_button.buttonVariants)({ variant: "outline" }), children: "Actions" }),
|
|
285
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.MenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.MenuPositioner, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_menu.MenuPopup, { children: [
|
|
286
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.MenuItem, { children: "Copy link" }),
|
|
287
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.MenuItem, { children: "Open settings" })
|
|
288
|
-
] }) }) })
|
|
289
|
-
] }) }),
|
|
290
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Drawer", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_drawer.Drawer, { children: [
|
|
291
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drawer.DrawerTrigger, { className: (0, import_button.buttonVariants)({ variant: "outline" }), children: "Open drawer" }),
|
|
292
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drawer.DrawerPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drawer.DrawerViewport, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_drawer.DrawerPopup, { children: [
|
|
293
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drawer.DrawerTitle, { children: "Drawer" }),
|
|
294
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { className: "mt-2 text-foreground-2", size: "sm", children: "Responsive panel for contextual actions." })
|
|
295
|
-
] }) }) })
|
|
296
|
-
] }) }),
|
|
297
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Tabs base", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.Tabs, { className: "w-full max-w-xs", defaultValue: "one", variant: "base", children: [
|
|
298
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsList, { "aria-label": "Base tabs", children: [
|
|
299
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTab, { value: "one", children: "One" }),
|
|
300
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTab, { value: "two", children: "Two" })
|
|
301
|
-
] }),
|
|
302
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsPanel, { className: "mt-4 text-sm text-foreground-2", value: "one", children: "First panel" }),
|
|
303
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsPanel, { className: "mt-4 text-sm text-foreground-2", value: "two", children: "Second panel" })
|
|
304
|
-
] }) }),
|
|
305
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Tabs button", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.Tabs, { className: "w-full max-w-xs", defaultValue: "draft", variant: "button", children: [
|
|
306
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsList, { "aria-label": "Button tabs", children: [
|
|
307
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTab, { value: "draft", children: "Draft" }),
|
|
308
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTab, { value: "review", children: "Review" }),
|
|
309
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTab, { value: "live", children: "Live" })
|
|
310
|
-
] }),
|
|
311
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsPanel, { className: "mt-4 text-sm text-foreground-2", value: "draft", children: "Draft changes" }),
|
|
312
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsPanel, { className: "mt-4 text-sm text-foreground-2", value: "review", children: "Review queue" }),
|
|
313
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsPanel, { className: "mt-4 text-sm text-foreground-2", value: "live", children: "Live version" })
|
|
314
|
-
] }) }),
|
|
315
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Tabs underline", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
316
|
-
import_tabs.Tabs,
|
|
317
|
-
{
|
|
318
|
-
className: "w-full max-w-xs",
|
|
319
|
-
defaultValue: "overview",
|
|
320
|
-
indicatorColor: "accent",
|
|
321
|
-
variant: "underline",
|
|
322
|
-
children: [
|
|
323
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsList, { "aria-label": "Underline tabs", children: [
|
|
324
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTab, { value: "overview", children: "Overview" }),
|
|
325
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTab, { value: "activity", children: "Activity" }),
|
|
326
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTab, { value: "settings", children: "Settings" }),
|
|
327
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsIndicator, {})
|
|
328
|
-
] }),
|
|
329
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
330
|
-
import_tabs.TabsPanel,
|
|
331
|
-
{
|
|
332
|
-
className: "mt-4 text-sm text-foreground-2",
|
|
333
|
-
value: "overview",
|
|
334
|
-
children: "Publication summary"
|
|
335
|
-
}
|
|
336
|
-
),
|
|
337
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
338
|
-
import_tabs.TabsPanel,
|
|
339
|
-
{
|
|
340
|
-
className: "mt-4 text-sm text-foreground-2",
|
|
341
|
-
value: "activity",
|
|
342
|
-
children: "Recent updates"
|
|
343
|
-
}
|
|
344
|
-
),
|
|
345
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
346
|
-
import_tabs.TabsPanel,
|
|
347
|
-
{
|
|
348
|
-
className: "mt-4 text-sm text-foreground-2",
|
|
349
|
-
value: "settings",
|
|
350
|
-
children: "Project settings"
|
|
351
|
-
}
|
|
352
|
-
)
|
|
353
|
-
]
|
|
354
|
-
}
|
|
355
|
-
) }),
|
|
356
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "NavigationTabs", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid w-full max-w-sm gap-4", children: [
|
|
357
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.NavigationTabs, { defaultValue: "docs", variant: "base", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.NavigationTabsList, { "aria-label": "Base navigation tabs", children: [
|
|
358
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.NavigationTabsLink, { active: true, href: "#docs", value: "docs", children: "Docs" }),
|
|
359
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.NavigationTabsLink, { href: "#api", value: "api", children: "API" })
|
|
360
|
-
] }) }),
|
|
361
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.NavigationTabs, { defaultValue: "drafts", variant: "button", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.NavigationTabsList, { "aria-label": "Button navigation tabs", children: [
|
|
362
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.NavigationTabsLink, { active: true, href: "#drafts", value: "drafts", children: "Drafts" }),
|
|
363
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.NavigationTabsLink, { href: "#published", value: "published", children: "Published" })
|
|
364
|
-
] }) }),
|
|
365
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
366
|
-
import_tabs.NavigationTabs,
|
|
367
|
-
{
|
|
368
|
-
defaultValue: "overview",
|
|
369
|
-
indicatorColor: "foreground",
|
|
370
|
-
variant: "underline",
|
|
371
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.NavigationTabsList, { "aria-label": "Underline navigation tabs", children: [
|
|
372
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.NavigationTabsLink, { active: true, href: "#overview", value: "overview", children: "Overview" }),
|
|
373
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.NavigationTabsLink, { href: "#analytics", value: "analytics", children: "Analytics" }),
|
|
374
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.NavigationTabsIndicator, {})
|
|
375
|
-
] })
|
|
376
|
-
}
|
|
377
|
-
)
|
|
378
|
-
] }) }),
|
|
379
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Progress", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_progress.Progress, { className: "w-full max-w-xs", value: 64, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_progress.ProgressTrack, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_progress.ProgressIndicator, {}) }) }) }),
|
|
380
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Accordion", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_accordion.Accordion, { className: "w-full max-w-xs", defaultValue: ["one"], children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_accordion.AccordionItem, { value: "one", children: [
|
|
381
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_accordion.AccordionHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_accordion.AccordionTrigger, { children: "Section" }) }),
|
|
382
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_accordion.AccordionPanel, { children: "Expandable content preview." })
|
|
383
|
-
] }) }) }),
|
|
384
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "MetaKey", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
385
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_meta_key.MetaKey, {}),
|
|
386
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_kbd.Kbd, { children: "K" })
|
|
387
|
-
] }) }),
|
|
388
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Toast", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_toast.ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_toast.Toast, { className: "w-full max-w-xs", toast: { id: "preview" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_toast.ToastContent, { children: [
|
|
389
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_toast.ToastTitle, { children: "Saved" }),
|
|
390
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_toast.ToastDescription, { children: "Changes are ready to publish." })
|
|
391
|
-
] }) }) }) }),
|
|
392
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Kbd", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
393
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_kbd.Kbd, { children: "\u2318" }),
|
|
394
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_kbd.Kbd, { children: "K" }),
|
|
395
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_kbd.Kbd, { children: "Esc" })
|
|
396
|
-
] }) }),
|
|
397
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Card", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_card.Card, { className: "w-full max-w-xs", variant: "elevated", children: [
|
|
398
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_card.CardHeader, { children: [
|
|
399
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_card.CardTitle, { children: "Card title" }),
|
|
400
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_card.CardDescription, { children: "Uses surface, stroke, radius, and foreground tokens." })
|
|
401
|
-
] }),
|
|
402
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_card.CardContent, { children: [
|
|
403
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_separator.Separator, {}),
|
|
404
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-4 text-sm text-foreground-2", children: "Composable content." })
|
|
405
|
-
] })
|
|
406
|
-
] }) })
|
|
407
|
-
] });
|
|
408
|
-
}
|
|
409
|
-
function MdxPreview({ items = [] }) {
|
|
410
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid border-l border-t border-stroke-3 md:grid-cols-2 xl:grid-cols-4", children: [
|
|
411
|
-
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: item.name, children: item.children }, item.name)),
|
|
412
|
-
!hasFixture(items, "Link") && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Link", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
|
|
413
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "default", href: "/ds", variant: "link.standalone", children: "Default standalone" }),
|
|
414
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", href: "/ds", variant: "link.inline", children: "Accent inline" }),
|
|
415
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "/ds", size: "sm", variant: "button.primary", children: "Button link" })
|
|
416
|
-
] }) }),
|
|
417
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "MDX Links", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "max-w-md space-y-4 text-sm leading-7 text-foreground-2", children: [
|
|
418
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
|
|
419
|
-
"This MDX paragraph includes an",
|
|
420
|
-
" ",
|
|
421
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", href: "/ds", variant: "link.inline", children: "internal relative link" }),
|
|
422
|
-
", an",
|
|
423
|
-
" ",
|
|
424
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
425
|
-
import_link.Link,
|
|
426
|
-
{
|
|
427
|
-
color: "accent",
|
|
428
|
-
href: "https://example.com",
|
|
429
|
-
variant: "link.inline",
|
|
430
|
-
children: "external link"
|
|
431
|
-
}
|
|
432
|
-
),
|
|
433
|
-
", a",
|
|
434
|
-
" ",
|
|
435
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", href: "/ds", variant: "link.inline", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: "link with bold text" }) }),
|
|
436
|
-
", a",
|
|
437
|
-
" ",
|
|
438
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", href: "/ds", variant: "link.inline", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("em", { children: "link with italics" }) }),
|
|
439
|
-
", and a",
|
|
440
|
-
" ",
|
|
441
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", href: "/ds", variant: "link.inline", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_inline_code.InlineCode, { children: "linked inline code" }) }),
|
|
442
|
-
"."
|
|
443
|
-
] }),
|
|
444
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "text-lg font-medium leading-7 text-foreground-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", href: "/ds", variant: "link.standalone", children: "Linked heading" }) })
|
|
445
|
-
] }) }),
|
|
446
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Callout", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "max-w-xs rounded-card border border-stroke-2 bg-surface-2 p-4 text-sm leading-6 text-foreground-2", children: [
|
|
447
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-medium text-foreground-1", children: "Note" }),
|
|
448
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-1", children: "A compact MDX callout preview." })
|
|
449
|
-
] }) }),
|
|
450
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Table", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full max-w-xs", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_table.Table, { children: [
|
|
451
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table.TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_table.TableRow, { children: [
|
|
452
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table.TableHead, { children: "Token" }),
|
|
453
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table.TableHead, { children: "Use" })
|
|
454
|
-
] }) }),
|
|
455
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table.TableBody, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_table.TableRow, { children: [
|
|
456
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table.TableCell, { children: "surface-2" }),
|
|
457
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table.TableCell, { children: "Panels" })
|
|
458
|
-
] }) })
|
|
459
|
-
] }) }) }),
|
|
460
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Code", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { className: "max-w-xs overflow-auto rounded-codeblock border border-stroke-2 bg-surface-3 p-4 text-xs text-foreground-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children: `export const value = "publishOS";` }) }) })
|
|
461
|
-
] });
|
|
462
|
-
}
|
|
463
|
-
function CopyToClipboardPreview() {
|
|
464
|
-
const [copied, setCopied] = (0, import_react.useState)(false);
|
|
465
|
-
function handleCopy() {
|
|
466
|
-
void navigator.clipboard?.writeText("pnpm publish.os add block");
|
|
467
|
-
setCopied(true);
|
|
468
|
-
window.setTimeout(() => setCopied(false), 1200);
|
|
469
|
-
}
|
|
470
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
471
|
-
import_button.Button,
|
|
472
|
-
{
|
|
473
|
-
"aria-label": copied ? "Copied command" : "Copy command",
|
|
474
|
-
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
475
|
-
import_animated_icon_swap.AnimatedIconSwap,
|
|
476
|
-
{
|
|
477
|
-
active: copied,
|
|
478
|
-
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { "aria-hidden": "true" }),
|
|
479
|
-
defaultIcon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Copy, { "aria-hidden": "true" }),
|
|
480
|
-
size: 16
|
|
481
|
-
}
|
|
482
|
-
),
|
|
483
|
-
onClick: handleCopy,
|
|
484
|
-
variant: "secondary",
|
|
485
|
-
children: "Copy"
|
|
486
|
-
}
|
|
487
|
-
);
|
|
488
|
-
}
|
|
489
|
-
function BlocksPreview({
|
|
490
|
-
items = []
|
|
491
|
-
}) {
|
|
492
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid border-l border-t border-stroke-3", children: [
|
|
493
|
-
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
494
|
-
"section",
|
|
495
|
-
{
|
|
496
|
-
className: "border-b border-r border-stroke-3 bg-surface-1",
|
|
497
|
-
children: [
|
|
498
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "px-4 pt-4 text-xs font-medium text-foreground-3", children: item.name }),
|
|
499
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-8", children: item.children })
|
|
500
|
-
]
|
|
501
|
-
},
|
|
502
|
-
item.name
|
|
503
|
-
)),
|
|
504
|
-
!hasFixture(items, "Navbar") && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "border-b border-r border-stroke-3 bg-surface-1", children: [
|
|
505
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "px-4 pt-4 text-xs font-medium text-foreground-3", children: "Navbar" }),
|
|
506
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-8 border-y border-stroke-3 bg-surface-2 px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mx-auto flex max-w-6xl flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
|
|
507
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-sm font-medium text-foreground-1", children: "publishOS / Docs / Introduction" }),
|
|
508
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("nav", { className: "flex flex-wrap gap-4", children: [
|
|
509
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { active: true, color: "accent", href: "#", size: "sm", children: "Docs" }),
|
|
510
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "#", size: "sm", children: "Blog" }),
|
|
511
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "#", size: "sm", children: "Changelog" })
|
|
512
|
-
] })
|
|
513
|
-
] }) })
|
|
514
|
-
] }),
|
|
515
|
-
!hasFixture(items, "AnimatedIconSwap") && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "border-b border-r border-stroke-3 bg-surface-1 p-4", children: [
|
|
516
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "text-xs font-medium text-foreground-3", children: "AnimatedIconSwap" }),
|
|
517
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-8 flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CopyToClipboardPreview, {}) })
|
|
518
|
-
] }),
|
|
519
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "border-b border-r border-stroke-3 bg-surface-1 p-4", children: [
|
|
520
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "text-xs font-medium text-foreground-3", children: "Footer" }),
|
|
521
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-8 border-t border-stroke-3 py-6 text-sm text-foreground-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mx-auto flex max-w-6xl justify-between", children: [
|
|
522
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "publishOS" }),
|
|
523
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Docs, API, Status" })
|
|
524
|
-
] }) })
|
|
525
|
-
] })
|
|
526
|
-
] });
|
|
527
|
-
}
|
|
528
|
-
function ActivePanel({
|
|
529
|
-
blocks,
|
|
530
|
-
mdx,
|
|
531
|
-
tab,
|
|
532
|
-
ui
|
|
533
|
-
}) {
|
|
534
|
-
if (tab === "tokens") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_color_palette.default, {});
|
|
535
|
-
if (tab === "typography") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TypographyPreview, {});
|
|
536
|
-
if (tab === "ui") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UiPreview, { items: ui });
|
|
537
|
-
if (tab === "mdx") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MdxPreview, { items: mdx });
|
|
538
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BlocksPreview, { items: blocks });
|
|
539
|
-
}
|
|
540
|
-
function DesignSystemPreview({
|
|
541
|
-
blocks,
|
|
542
|
-
initialTab = "ui",
|
|
543
|
-
mdx,
|
|
544
|
-
tabComponents,
|
|
545
|
-
ui
|
|
546
|
-
}) {
|
|
547
|
-
const [activeTab, setActiveTab] = (0, import_react.useState)(initialTab);
|
|
548
|
-
const TabsRoot = tabComponents?.Tabs ?? import_tabs.Tabs;
|
|
549
|
-
const TabsListRoot = tabComponents?.TabsList ?? import_tabs.TabsList;
|
|
550
|
-
const TabsPanelRoot = tabComponents?.TabsPanel ?? import_tabs.TabsPanel;
|
|
551
|
-
const TabsTabRoot = tabComponents?.TabsTab ?? import_tabs.TabsTab;
|
|
552
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { className: "w-full text-foreground-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
553
|
-
TabsRoot,
|
|
554
|
-
{
|
|
555
|
-
className: "w-full",
|
|
556
|
-
onValueChange: (value) => setActiveTab(value),
|
|
557
|
-
value: activeTab,
|
|
558
|
-
children: [
|
|
559
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
560
|
-
TabsListRoot,
|
|
561
|
-
{
|
|
562
|
-
"aria-label": "Design system preview sections",
|
|
563
|
-
className: "mb-4",
|
|
564
|
-
children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
565
|
-
TabsTabRoot,
|
|
566
|
-
{
|
|
567
|
-
id: `design-system-tab-${tab.id}`,
|
|
568
|
-
value: tab.id,
|
|
569
|
-
children: tab.label
|
|
570
|
-
},
|
|
571
|
-
tab.id
|
|
572
|
-
))
|
|
573
|
-
}
|
|
574
|
-
),
|
|
575
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
576
|
-
TabsPanelRoot,
|
|
577
|
-
{
|
|
578
|
-
"aria-labelledby": `design-system-tab-${activeTab}`,
|
|
579
|
-
className: "overflow-hidden rounded-card border border-stroke-3 bg-surface-1",
|
|
580
|
-
id: `design-system-${activeTab}`,
|
|
581
|
-
value: activeTab,
|
|
582
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActivePanel, { blocks, mdx, tab: activeTab, ui })
|
|
583
|
-
}
|
|
584
|
-
)
|
|
585
|
-
]
|
|
586
|
-
}
|
|
587
|
-
) });
|
|
588
|
-
}
|
|
589
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
590
|
-
0 && (module.exports = {
|
|
591
|
-
DesignSystemPreview
|
|
592
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { Tabs, TabsList, TabsPanel, TabsTab } from '../ui/tabs.cjs';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
import 'class-variance-authority/types';
|
|
5
|
-
import '@base-ui/react/tabs';
|
|
6
|
-
import 'class-variance-authority';
|
|
7
|
-
import 'next/link';
|
|
8
|
-
|
|
9
|
-
type PreviewTab = "tokens" | "typography" | "ui" | "mdx" | "blocks";
|
|
10
|
-
type DesignSystemPreviewFixture = {
|
|
11
|
-
name: string;
|
|
12
|
-
children: ReactNode;
|
|
13
|
-
};
|
|
14
|
-
type DesignSystemPreviewTabs = {
|
|
15
|
-
Tabs?: typeof Tabs;
|
|
16
|
-
TabsList?: typeof TabsList;
|
|
17
|
-
TabsPanel?: typeof TabsPanel;
|
|
18
|
-
TabsTab?: typeof TabsTab;
|
|
19
|
-
};
|
|
20
|
-
type DesignSystemPreviewProps = {
|
|
21
|
-
blocks?: DesignSystemPreviewFixture[];
|
|
22
|
-
initialTab?: PreviewTab;
|
|
23
|
-
mdx?: DesignSystemPreviewFixture[];
|
|
24
|
-
tabComponents?: DesignSystemPreviewTabs;
|
|
25
|
-
ui?: DesignSystemPreviewFixture[];
|
|
26
|
-
};
|
|
27
|
-
declare function DesignSystemPreview({ blocks, initialTab, mdx, tabComponents, ui, }: DesignSystemPreviewProps): react_jsx_runtime.JSX.Element;
|
|
28
|
-
|
|
29
|
-
export { DesignSystemPreview, type DesignSystemPreviewFixture, type DesignSystemPreviewProps, type DesignSystemPreviewTabs, type PreviewTab };
|