@tonycodes-ui/mortar 0.0.0-stage → 0.12.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/AGENTS.md +10 -0
- package/CHANGELOG.md +268 -0
- package/CONTRIBUTING.md +60 -0
- package/DESIGN.md +51 -0
- package/LICENSE +21 -0
- package/README.md +155 -2
- package/TESTING.md +83 -0
- package/baseline-policy.json +16 -0
- package/bin/mortar.mjs +258 -0
- package/catalog.json +9900 -0
- package/cli/audit.mjs +943 -0
- package/cli/data.mjs +176 -0
- package/cli/mcp.mjs +216 -0
- package/cli/migrations.mjs +128 -0
- package/cli/packet.mjs +267 -0
- package/cli/search.mjs +246 -0
- package/cli/tools.mjs +229 -0
- package/design-principles.json +30 -0
- package/dist/agent-data.json +1 -0
- package/dist/application.d.ts +340 -0
- package/dist/application.js +240 -0
- package/dist/auth.d.ts +121 -0
- package/dist/auth.js +97 -0
- package/dist/brand.d.ts +69 -0
- package/dist/brand.js +266 -0
- package/dist/calendar.d.ts +75 -0
- package/dist/calendar.js +310 -0
- package/dist/choice.d.ts +36 -0
- package/dist/choice.js +36 -0
- package/dist/composer.d.ts +28 -0
- package/dist/composer.js +47 -0
- package/dist/display.d.ts +136 -0
- package/dist/display.js +75 -0
- package/dist/docs.d.ts +145 -0
- package/dist/docs.js +141 -0
- package/dist/ecommerce.d.ts +261 -0
- package/dist/ecommerce.js +177 -0
- package/dist/feedback.d.ts +80 -0
- package/dist/feedback.js +98 -0
- package/dist/foundation.d.ts +42 -0
- package/dist/foundation.js +121 -0
- package/dist/heading.d.ts +5 -0
- package/dist/heading.js +9 -0
- package/dist/icons.d.ts +50 -0
- package/dist/icons.js +70 -0
- package/dist/illustration.d.ts +47 -0
- package/dist/illustration.js +47 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +18 -0
- package/dist/inspection.d.ts +24 -0
- package/dist/inspection.js +14 -0
- package/dist/internal.d.ts +514 -0
- package/dist/internal.js +332 -0
- package/dist/layout.d.ts +107 -0
- package/dist/layout.js +66 -0
- package/dist/marketing-sections.d.ts +161 -0
- package/dist/marketing-sections.js +58 -0
- package/dist/marketing.d.ts +277 -0
- package/dist/marketing.js +163 -0
- package/dist/navigation.d.ts +35 -0
- package/dist/navigation.js +44 -0
- package/dist/primitives.d.ts +258 -0
- package/dist/primitives.js +244 -0
- package/dist/showcase.d.ts +29 -0
- package/dist/showcase.js +10 -0
- package/dist/workspace.d.ts +80 -0
- package/dist/workspace.js +48 -0
- package/docs/agents.md +127 -0
- package/docs/auth-flows.md +71 -0
- package/docs/migrating-to-0.6.md +94 -0
- package/docs/theming.md +170 -0
- package/package.json +94 -4
- package/skills/mortar/SKILL.md +36 -0
- package/src/application.css +1487 -0
- package/src/application.tsx +1413 -0
- package/src/auth.tsx +452 -0
- package/src/brand.ts +335 -0
- package/src/calendar.css +468 -0
- package/src/calendar.tsx +868 -0
- package/src/choice.tsx +240 -0
- package/src/composer.tsx +158 -0
- package/src/data.css +690 -0
- package/src/display.tsx +452 -0
- package/src/docs.css +704 -0
- package/src/docs.tsx +737 -0
- package/src/ecommerce.css +810 -0
- package/src/ecommerce.tsx +1033 -0
- package/src/feedback.tsx +388 -0
- package/src/foundation.css +1867 -0
- package/src/foundation.tsx +227 -0
- package/src/heading.ts +13 -0
- package/src/icons.tsx +237 -0
- package/src/illustration.tsx +169 -0
- package/src/index.ts +233 -0
- package/src/inspection.tsx +91 -0
- package/src/internal.tsx +700 -0
- package/src/layout.tsx +342 -0
- package/src/marketing-sections.tsx +621 -0
- package/src/marketing.css +2579 -0
- package/src/marketing.tsx +1235 -0
- package/src/navigation.tsx +118 -0
- package/src/overlays.css +350 -0
- package/src/primitives.tsx +1135 -0
- package/src/showcase.tsx +120 -0
- package/src/tokens.css +449 -0
- package/src/workspace.tsx +333 -0
- package/styles.css +56 -0
package/dist/icons.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Decorative SVG on the 20×20 grid. Hidden from assistive technology unless
|
|
4
|
+
* `decorative` is false; meaning is carried by surrounding text.
|
|
5
|
+
*/
|
|
6
|
+
export function Icon({ className, viewBox = "0 0 20 20", fill = "none", stroke, strokeWidth, decorative = true, focusable = false, children, }) {
|
|
7
|
+
return (_jsx("svg", { className: className, viewBox: viewBox, fill: fill ?? undefined, stroke: stroke, strokeWidth: strokeWidth, "aria-hidden": decorative ? "true" : undefined, focusable: decorative && !focusable ? "false" : undefined, children: children }));
|
|
8
|
+
}
|
|
9
|
+
/** Round-capped currentColor stroke. */
|
|
10
|
+
function Stroke({ d, width, fill, join = true, }) {
|
|
11
|
+
return (_jsx("path", { d: d, fill: fill, stroke: "currentColor", strokeWidth: width, strokeLinecap: "round", strokeLinejoin: join ? "round" : undefined }));
|
|
12
|
+
}
|
|
13
|
+
export function ChevronDown() {
|
|
14
|
+
return (_jsx(Icon, { children: _jsx(Stroke, { d: "m6 8 4 4 4-4", width: "1.5" }) }));
|
|
15
|
+
}
|
|
16
|
+
export function ChevronLeft() {
|
|
17
|
+
return (_jsx(Icon, { children: _jsx(Stroke, { d: "m12 5-5 5 5 5", width: "1.75" }) }));
|
|
18
|
+
}
|
|
19
|
+
export function ChevronRight() {
|
|
20
|
+
return (_jsx(Icon, { children: _jsx(Stroke, { d: "m8 5 5 5-5 5", width: "1.75" }) }));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Check mark. The three call sites predate this module and differ:
|
|
24
|
+
* `option` (listbox/combobox selected option), `list` (CheckList, 16×16 grid,
|
|
25
|
+
* fill on the path) and `step` (ProgressSteps circles: stroke on the svg,
|
|
26
|
+
* heavier weight, not aria-hidden because its marker span already is).
|
|
27
|
+
*/
|
|
28
|
+
export function Check({ variant = "option", className, }) {
|
|
29
|
+
if (variant === "list")
|
|
30
|
+
return (_jsx(Icon, { viewBox: "0 0 16 16", fill: null, children: _jsx(Stroke, { d: "M3.5 8.5 6.5 11.5 12.5 4.5", width: "1.75", fill: "none" }) }));
|
|
31
|
+
if (variant === "step")
|
|
32
|
+
return (_jsx(Icon, { stroke: "currentColor", strokeWidth: "2.5", decorative: false, children: _jsx("path", { d: "M5 10.5l3.5 3.5L15 7", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
33
|
+
return (_jsx(Icon, { className: className, children: _jsx(Stroke, { d: "m5 10 3.5 3.5L15 7", width: "1.75" }) }));
|
|
34
|
+
}
|
|
35
|
+
export function Close() {
|
|
36
|
+
return (_jsx(Icon, { children: _jsx(Stroke, { d: "m5 5 10 10M15 5 5 15", width: "1.75", join: false }) }));
|
|
37
|
+
}
|
|
38
|
+
export function ArrowUp() {
|
|
39
|
+
return (_jsx(Icon, { children: _jsx(Stroke, { d: "M10 15V5m0 0-4 4m4-4 4 4", width: "1.75" }) }));
|
|
40
|
+
}
|
|
41
|
+
export function ArrowDown() {
|
|
42
|
+
return (_jsx(Icon, { children: _jsx(Stroke, { d: "M10 5v10m0 0-4-4m4 4 4-4", width: "1.75" }) }));
|
|
43
|
+
}
|
|
44
|
+
export function Star() {
|
|
45
|
+
return (_jsx(Icon, { fill: null, children: _jsx("path", { d: "M10 1.8l2.5 5.3 5.8.7-4.3 4 1.1 5.7L10 14.7l-5.1 2.8 1.1-5.7-4.3-4 5.8-.7z", fill: "currentColor" }) }));
|
|
46
|
+
}
|
|
47
|
+
export function Paperclip() {
|
|
48
|
+
return (_jsx(Icon, { children: _jsx(Stroke, { d: "M7 10.5l5-5a2.5 2.5 0 0 1 3.5 3.5l-6.5 6.5a4 4 0 0 1-5.7-5.7l6.2-6.2", width: "1.5" }) }));
|
|
49
|
+
}
|
|
50
|
+
/** Generic person silhouette for avatars without a photo (24×24 grid, filled). */
|
|
51
|
+
export function Person({ className }) {
|
|
52
|
+
return (_jsx(Icon, { className: className, viewBox: "0 0 24 24", fill: "currentColor", focusable: true, children: _jsx("path", { d: "M24 20.993V24H0v-2.996A14.977 14.977 0 0 1 12.004 15c4.904 0 9.26 2.354 11.996 5.993zM16.002 8.999a4 4 0 1 1-8 0 4 4 0 0 1 8 0z" }) }));
|
|
53
|
+
}
|
|
54
|
+
/** Table sort indicator; the active direction's chevron is marked data-active. */
|
|
55
|
+
export function SortArrows({ direction, }) {
|
|
56
|
+
return (_jsxs(Icon, { viewBox: "0 0 12 12", fill: null, children: [_jsx("path", { d: "M3.5 4.5 6 2l2.5 2.5", "data-active": direction === "ascending" || undefined }), _jsx("path", { d: "M3.5 7.5 6 10l2.5-2.5", "data-active": direction === "descending" || undefined })] }));
|
|
57
|
+
}
|
|
58
|
+
const EYE = "M1.75 10S4.75 4.25 10 4.25 18.25 10 18.25 10 15.25 15.75 10 15.75 1.75 10 1.75 10zM10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z";
|
|
59
|
+
/** Open eye: shown while a password is hidden. */
|
|
60
|
+
export function Eye() {
|
|
61
|
+
return (_jsx(Icon, { children: _jsx(Stroke, { d: EYE, width: "1.5" }) }));
|
|
62
|
+
}
|
|
63
|
+
/** Struck-through eye: shown while a password is visible. */
|
|
64
|
+
export function EyeOff() {
|
|
65
|
+
return (_jsx(Icon, { children: _jsx(Stroke, { d: EYE + "M3 3l14 14", width: "1.5" }) }));
|
|
66
|
+
}
|
|
67
|
+
/** Hollow circle: a requirement that is not met yet. */
|
|
68
|
+
export function Circle() {
|
|
69
|
+
return (_jsx(Icon, { children: _jsx(Stroke, { d: "M10 15a5 5 0 1 0 0-10 5 5 0 0 0 0 10z", width: "1.5" }) }));
|
|
70
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** A point in the drawing, in the illustration's viewBox units. */
|
|
2
|
+
export interface NetworkNode {
|
|
3
|
+
id: string;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
/** Short text drawn under the node. */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** accent: the brand's accent fill, to pick out a node. */
|
|
9
|
+
tone?: "default" | "accent";
|
|
10
|
+
}
|
|
11
|
+
/** A straight connection between two node ids. */
|
|
12
|
+
export interface NetworkConnection {
|
|
13
|
+
from: string;
|
|
14
|
+
to: string;
|
|
15
|
+
/** Whether a signal travels from `from` to `to`. Default true. */
|
|
16
|
+
signal?: boolean;
|
|
17
|
+
/** Seconds for this signal to cross; defaults to the illustration's duration. */
|
|
18
|
+
duration?: number;
|
|
19
|
+
/** Seconds before this signal starts; defaults to an even stagger. */
|
|
20
|
+
delay?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A lightweight network drawing: nodes and connections supplied as data, with
|
|
24
|
+
* optional signals travelling along the connections. Decorative unless it has
|
|
25
|
+
* a label. The animation is illustrative: it never represents live activity.
|
|
26
|
+
*/
|
|
27
|
+
export declare function NetworkIllustration({ nodes, connections, width, height, label, description, motion, duration, paused, onPausedChange, id, className, }: {
|
|
28
|
+
nodes: NetworkNode[];
|
|
29
|
+
connections: NetworkConnection[];
|
|
30
|
+
/** Width of the viewBox; the drawing scales to its container. */
|
|
31
|
+
width?: number;
|
|
32
|
+
/** Height of the viewBox. */
|
|
33
|
+
height?: number;
|
|
34
|
+
/** Makes the drawing informative: an image with this accessible name. Omitted, it is decorative and hidden from assistive technology. */
|
|
35
|
+
label?: string;
|
|
36
|
+
/** With a label, a longer description of what the drawing shows. */
|
|
37
|
+
description?: string;
|
|
38
|
+
/** auto: signals travel where connections carry one, with a pause control. static: the same drawing without motion. */
|
|
39
|
+
motion?: "auto" | "static";
|
|
40
|
+
/** Seconds for a signal to cross a connection. */
|
|
41
|
+
duration?: number;
|
|
42
|
+
/** Whether the user has paused the animation; pass with onPausedChange to control it or share it between illustrations. */
|
|
43
|
+
paused?: boolean;
|
|
44
|
+
onPausedChange?: (paused: boolean) => void;
|
|
45
|
+
id?: string;
|
|
46
|
+
className?: string;
|
|
47
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from "react";
|
|
3
|
+
import { componentRoot, cx, useDomId, usePlayback } from "./internal.js";
|
|
4
|
+
const NODE_RADIUS = 8;
|
|
5
|
+
const SIGNAL_RADIUS = 4;
|
|
6
|
+
/**
|
|
7
|
+
* A lightweight network drawing: nodes and connections supplied as data, with
|
|
8
|
+
* optional signals travelling along the connections. Decorative unless it has
|
|
9
|
+
* a label. The animation is illustrative: it never represents live activity.
|
|
10
|
+
*/
|
|
11
|
+
export function NetworkIllustration({ nodes, connections, width = 480, height = 320, label, description, motion = "auto", duration = 3, paused, onPausedChange, id, className, }) {
|
|
12
|
+
const ref = useRef(null);
|
|
13
|
+
const titleId = useDomId("m-network-title");
|
|
14
|
+
const descId = useDomId("m-network-desc");
|
|
15
|
+
const byId = new Map(nodes.map((node) => [node.id, node]));
|
|
16
|
+
const links = connections.flatMap((connection) => {
|
|
17
|
+
const from = byId.get(connection.from);
|
|
18
|
+
const to = byId.get(connection.to);
|
|
19
|
+
return from && to ? [{ ...connection, a: from, b: to }] : [];
|
|
20
|
+
});
|
|
21
|
+
const carriers = links.filter((link) => link.signal !== false);
|
|
22
|
+
const animated = motion === "auto" && carriers.length > 0;
|
|
23
|
+
const { reason, reduced, userPaused, toggle } = usePlayback(ref, {
|
|
24
|
+
paused,
|
|
25
|
+
onPausedChange,
|
|
26
|
+
enabled: animated,
|
|
27
|
+
});
|
|
28
|
+
const informative = Boolean(label);
|
|
29
|
+
return (_jsxs("div", { ref: ref, id: id, className: cx("m-network", className), ...componentRoot("NetworkIllustration"), "data-motion": motion === "static" ? "static" : undefined, "data-paused": animated ? (reason ?? undefined) : undefined, children: [_jsxs("svg", { viewBox: `0 0 ${width} ${height}`, ...(informative
|
|
30
|
+
? {
|
|
31
|
+
role: "img",
|
|
32
|
+
"aria-labelledby": titleId,
|
|
33
|
+
"aria-describedby": description ? descId : undefined,
|
|
34
|
+
}
|
|
35
|
+
: { "aria-hidden": true, focusable: false }), children: [informative && _jsx("title", { id: titleId, children: label }), informative && description && _jsx("desc", { id: descId, children: description }), links.map((link, index) => (_jsx("line", { className: "m-network-link", x1: link.a.x, y1: link.a.y, x2: link.b.x, y2: link.b.y }, `${link.from}:${link.to}:${index}`))), animated &&
|
|
36
|
+
!reduced &&
|
|
37
|
+
carriers.map((link, index) => {
|
|
38
|
+
const time = link.duration ?? duration;
|
|
39
|
+
const delay = link.delay ?? -((index * time) / carriers.length);
|
|
40
|
+
return (_jsx("circle", { className: "m-network-signal", r: SIGNAL_RADIUS, style: {
|
|
41
|
+
"--m-signal-from": `${link.a.x}px ${link.a.y}px`,
|
|
42
|
+
"--m-signal-to": `${link.b.x}px ${link.b.y}px`,
|
|
43
|
+
animationDuration: `${time}s`,
|
|
44
|
+
animationDelay: delay ? `${delay}s` : undefined,
|
|
45
|
+
} }, `${link.from}:${link.to}:${index}`));
|
|
46
|
+
}), nodes.map((node) => (_jsx("circle", { className: "m-network-node", cx: node.x, cy: node.y, r: NODE_RADIUS, "data-tone": node.tone === "accent" ? "accent" : undefined }, node.id))), nodes.map((node) => node.label && (_jsx("text", { className: "m-network-label", x: node.x, y: node.y + NODE_RADIUS + 16, textAnchor: "middle", children: node.label }, node.id)))] }), animated && !reduced && (_jsx("button", { type: "button", className: "m-network-toggle", onClick: toggle, children: userPaused ? "Play animation" : "Pause animation" }))] }));
|
|
47
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export { ThemeProvider, AppearanceControl } from "./foundation.js";
|
|
2
|
+
export type { BrandDefinition, BrandAppearanceTokens } from "./brand.js";
|
|
3
|
+
export type { ThemeProviderProps, Appearance, Brand, Density, } from "./foundation.js";
|
|
4
|
+
export { Button, ButtonGroup, ActionLink, Input, Select, TextArea, Checkbox, Fieldset, RadioGroup, Switch, Badge, Tabs, Modal, Dropdown, Notice, EmptyState, ErrorSummary, } from "./primitives.js";
|
|
5
|
+
export type { ButtonProps, ButtonGroupItem, DropdownItem, ErrorSummaryItem, InputProps, LinkAction, Tone, } from "./primitives.js";
|
|
6
|
+
export { AppShell, PageHeading, MetricGroup, DataTable, Table, Pagination, SettingsSection, ActivityFeed, SignInPanel, Sidebar, Navbar, StackedShell, Breadcrumbs, ProgressSteps, TabNav, ActionPanel, } from "./application.js";
|
|
7
|
+
export type { AppShellProps, NavigationItem, DataTableProps, DataTableColumn, TableSort, SortDirection, SignInProvider, SidebarProps, BreadcrumbItem, ProgressStep, TabNavItem, StackedShellProps, NavbarProps, BreadcrumbsProps, TabNavProps, ProgressStepsProps, ActionPanelProps, PageHeadingProps, MetricGroupProps, TableProps, PaginationProps, SettingsSectionProps, ActivityFeedProps, SignInPanelProps, } from "./application.js";
|
|
8
|
+
export { AuthLayout, ProviderButtons, PasswordInput, CodeInput, } from "./auth.js";
|
|
9
|
+
export type { AuthLayoutProps, ProviderButtonsProps, PasswordInputProps, PasswordRequirement, PasswordStrength, CodeInputProps, } from "./auth.js";
|
|
10
|
+
export { MarketingHeader, MarketingPage, Hero, FeatureGrid, FeatureSection, ProcessSteps, Testimonial, LogoCloud, Pricing, FAQ, CallToAction, Footer, HeaderSection, ContentSection, } from "./marketing.js";
|
|
11
|
+
export type { PricingPlan, PricingExtra, HeaderLink, FlyoutItem, } from "./marketing.js";
|
|
12
|
+
export { SegmentedControl, CodeBlock, PreviewFrame } from "./inspection.js";
|
|
13
|
+
export { Avatar, AvatarGroup, Kbd, ProgressBar, FilterChip, CheckList, DescriptionList, GridList, AttachmentList, } from "./display.js";
|
|
14
|
+
export type { GridListItem, Attachment, AvatarProps, AvatarGroupProps, KbdProps, ProgressBarProps, FilterChipProps, CheckListProps, DescriptionListProps, GridListProps, AttachmentListProps, } from "./display.js";
|
|
15
|
+
export { Stack, Container, Text, Section, Divider, Card, MediaObject, SectionHeading, Prose, } from "./layout.js";
|
|
16
|
+
export type { SectionTone, StackProps, ContainerProps, TextProps, SectionProps, DividerProps, CardProps, MediaObjectProps, SectionHeadingProps, ProseProps, } from "./layout.js";
|
|
17
|
+
export { MockWindow, ChatPreview } from "./showcase.js";
|
|
18
|
+
export type { ChatMessage } from "./showcase.js";
|
|
19
|
+
export { Toast, Toaster, ConfirmDialog, SaveBar, Banner } from "./feedback.js";
|
|
20
|
+
export type { ToastItem, ToastAction } from "./feedback.js";
|
|
21
|
+
export { SlideOver, CommandPalette, StackedList } from "./workspace.js";
|
|
22
|
+
export type { CommandItem, StackedListItem, SlideOverProps, CommandPaletteProps, StackedListProps, } from "./workspace.js";
|
|
23
|
+
export { BentoGrid, StatGroup, TestimonialGrid, PlanComparison, PostList, TeamGrid, ContactSection, Newsletter, NotFound, } from "./marketing-sections.js";
|
|
24
|
+
export { DocsShell, SearchTrigger, SearchDialog, Steps, Callout, FileTree, CodeTabs, Release, ApiEndpoint, PageFeedback, PagerLinks, LinkCards, } from "./docs.js";
|
|
25
|
+
export type { DocsShellProps, FileNode } from "./docs.js";
|
|
26
|
+
export { Listbox, Combobox } from "./choice.js";
|
|
27
|
+
export type { ChoiceOption } from "./choice.js";
|
|
28
|
+
export { Calendar } from "./calendar.js";
|
|
29
|
+
export type { CalendarEvent, CalendarView, CalendarProps } from "./calendar.js";
|
|
30
|
+
export { ProductList, ProductOverview, ShoppingCart, OrderSummary, ProductQuickView, ProductFilters, ProductReviews, OrderHistory, } from "./ecommerce.js";
|
|
31
|
+
export type { ProductImage, ProductCard, ProductOption, CartItem, FilterFacet, Review, Order, ProductListProps, ProductOverviewProps, ShoppingCartProps, } from "./ecommerce.js";
|
|
32
|
+
export { CommentComposer } from "./composer.js";
|
|
33
|
+
export type { LinkItem, ItemGroup } from "./navigation.js";
|
|
34
|
+
export type { HeadingLevel } from "./heading.js";
|
|
35
|
+
export { NetworkIllustration } from "./illustration.js";
|
|
36
|
+
export type { NetworkNode, NetworkConnection } from "./illustration.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { ThemeProvider, AppearanceControl } from "./foundation.js";
|
|
2
|
+
export { Button, ButtonGroup, ActionLink, Input, Select, TextArea, Checkbox, Fieldset, RadioGroup, Switch, Badge, Tabs, Modal, Dropdown, Notice, EmptyState, ErrorSummary, } from "./primitives.js";
|
|
3
|
+
export { AppShell, PageHeading, MetricGroup, DataTable, Table, Pagination, SettingsSection, ActivityFeed, SignInPanel, Sidebar, Navbar, StackedShell, Breadcrumbs, ProgressSteps, TabNav, ActionPanel, } from "./application.js";
|
|
4
|
+
export { AuthLayout, ProviderButtons, PasswordInput, CodeInput, } from "./auth.js";
|
|
5
|
+
export { MarketingHeader, MarketingPage, Hero, FeatureGrid, FeatureSection, ProcessSteps, Testimonial, LogoCloud, Pricing, FAQ, CallToAction, Footer, HeaderSection, ContentSection, } from "./marketing.js";
|
|
6
|
+
export { SegmentedControl, CodeBlock, PreviewFrame } from "./inspection.js";
|
|
7
|
+
export { Avatar, AvatarGroup, Kbd, ProgressBar, FilterChip, CheckList, DescriptionList, GridList, AttachmentList, } from "./display.js";
|
|
8
|
+
export { Stack, Container, Text, Section, Divider, Card, MediaObject, SectionHeading, Prose, } from "./layout.js";
|
|
9
|
+
export { MockWindow, ChatPreview } from "./showcase.js";
|
|
10
|
+
export { Toast, Toaster, ConfirmDialog, SaveBar, Banner } from "./feedback.js";
|
|
11
|
+
export { SlideOver, CommandPalette, StackedList } from "./workspace.js";
|
|
12
|
+
export { BentoGrid, StatGroup, TestimonialGrid, PlanComparison, PostList, TeamGrid, ContactSection, Newsletter, NotFound, } from "./marketing-sections.js";
|
|
13
|
+
export { DocsShell, SearchTrigger, SearchDialog, Steps, Callout, FileTree, CodeTabs, Release, ApiEndpoint, PageFeedback, PagerLinks, LinkCards, } from "./docs.js";
|
|
14
|
+
export { Listbox, Combobox } from "./choice.js";
|
|
15
|
+
export { Calendar } from "./calendar.js";
|
|
16
|
+
export { ProductList, ProductOverview, ShoppingCart, OrderSummary, ProductQuickView, ProductFilters, ProductReviews, OrderHistory, } from "./ecommerce.js";
|
|
17
|
+
export { CommentComposer } from "./composer.js";
|
|
18
|
+
export { NetworkIllustration } from "./illustration.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare function SegmentedControl({ label, value, options, onChange, className, }: {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
options: {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}[];
|
|
8
|
+
onChange: (value: string) => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
/** A scrollable code sample in a figure; the caption names the figure. */
|
|
12
|
+
export declare function CodeBlock({ code, label, className, }: {
|
|
13
|
+
code: string;
|
|
14
|
+
/** Visible caption, and the figure's accessible name. */
|
|
15
|
+
label?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
export declare function PreviewFrame({ label, src, id, className, }: {
|
|
19
|
+
/** Accessible name of the section and the frame. */
|
|
20
|
+
label: string;
|
|
21
|
+
src: string;
|
|
22
|
+
id?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { KitLink } from "./navigation.js";
|
|
3
|
+
import { componentRoot, cx, useComponentName } from "./internal.js";
|
|
4
|
+
export function SegmentedControl({ label, value, options, onChange, className, }) {
|
|
5
|
+
const name = useComponentName("SegmentedControl");
|
|
6
|
+
return (_jsx("div", { ...componentRoot(name), className: cx("m-segmented", className), role: "group", "aria-label": label, children: options.map((option) => (_jsx("button", { type: "button", "aria-pressed": value === option.value, onClick: () => onChange(option.value), children: option.label }, option.value))) }));
|
|
7
|
+
}
|
|
8
|
+
/** A scrollable code sample in a figure; the caption names the figure. */
|
|
9
|
+
export function CodeBlock({ code, label = "Code", className, }) {
|
|
10
|
+
return (_jsxs("figure", { ...componentRoot("CodeBlock"), className: cx("m-code-block", className), children: [_jsx("figcaption", { children: label }), _jsx("pre", { tabIndex: 0, children: _jsx("code", { children: code }) })] }));
|
|
11
|
+
}
|
|
12
|
+
export function PreviewFrame({ label, src, id, className, }) {
|
|
13
|
+
return (_jsxs("section", { id: id, ...componentRoot("PreviewFrame"), className: cx("m-preview-frame", className), "aria-label": label, children: [_jsx(KitLink, { href: src, target: "_blank", rel: "noopener noreferrer", children: "Open full preview" }), _jsx("iframe", { title: label, src: src, sandbox: "allow-scripts", referrerPolicy: "no-referrer" })] }));
|
|
14
|
+
}
|