@snap-rail/ui 0.0.0-stage → 0.1.1

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.
Files changed (62) hide show
  1. package/LICENSE +202 -0
  2. package/lib/charts.js +118 -0
  3. package/lib/contract.js +527 -0
  4. package/lib/fallback.js +399 -0
  5. package/lib/index.js +1282 -0
  6. package/lib/pages.js +68 -0
  7. package/lib/runtime.js +3003 -0
  8. package/lib/settings.js +2069 -0
  9. package/lib/skins.js +258 -0
  10. package/lib/slots.js +267 -0
  11. package/lib/types/charts.d.ts +62 -0
  12. package/lib/types/charts.js +41 -0
  13. package/lib/types/components/button.d.ts +39 -0
  14. package/lib/types/components/button.js +27 -0
  15. package/lib/types/components/controls.d.ts +66 -0
  16. package/lib/types/components/controls.js +66 -0
  17. package/lib/types/components/dialog.d.ts +58 -0
  18. package/lib/types/components/dialog.js +46 -0
  19. package/lib/types/components/feedback.d.ts +46 -0
  20. package/lib/types/components/feedback.js +20 -0
  21. package/lib/types/components/form.d.ts +31 -0
  22. package/lib/types/components/form.js +13 -0
  23. package/lib/types/components/index.d.ts +15 -0
  24. package/lib/types/components/index.js +15 -0
  25. package/lib/types/components/input.d.ts +40 -0
  26. package/lib/types/components/input.js +18 -0
  27. package/lib/types/components/layout.d.ts +103 -0
  28. package/lib/types/components/layout.js +80 -0
  29. package/lib/types/components/schema-form.d.ts +44 -0
  30. package/lib/types/components/schema-form.js +84 -0
  31. package/lib/types/components/surface.d.ts +49 -0
  32. package/lib/types/components/surface.js +59 -0
  33. package/lib/types/contract.d.ts +350 -0
  34. package/lib/types/contract.js +231 -0
  35. package/lib/types/fallback.d.ts +14 -0
  36. package/lib/types/fallback.js +50 -0
  37. package/lib/types/index.d.ts +19 -0
  38. package/lib/types/index.js +19 -0
  39. package/lib/types/pages.d.ts +40 -0
  40. package/lib/types/pages.js +69 -0
  41. package/lib/types/runtime.d.ts +93 -0
  42. package/lib/types/runtime.js +233 -0
  43. package/lib/types/settings-pages/appearance.d.ts +15 -0
  44. package/lib/types/settings-pages/appearance.js +128 -0
  45. package/lib/types/settings-pages/index.d.ts +3 -0
  46. package/lib/types/settings-pages/index.js +3 -0
  47. package/lib/types/settings-pages/plugin-feed.d.ts +17 -0
  48. package/lib/types/settings-pages/plugin-feed.js +66 -0
  49. package/lib/types/settings-pages/plugins.d.ts +21 -0
  50. package/lib/types/settings-pages/plugins.js +372 -0
  51. package/lib/types/settings.d.ts +59 -0
  52. package/lib/types/settings.js +176 -0
  53. package/lib/types/skins.d.ts +137 -0
  54. package/lib/types/skins.js +271 -0
  55. package/lib/types/slots.d.ts +69 -0
  56. package/lib/types/slots.js +210 -0
  57. package/lib/types/utils.d.ts +15 -0
  58. package/lib/types/utils.js +26 -0
  59. package/package.json +105 -3
  60. package/src/styles/base.css +329 -0
  61. package/src/styles/default.css +735 -0
  62. package/README.md +0 -3
@@ -0,0 +1,80 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn, part, space } from "../utils.js";
3
+ /** A vertical flow. */
4
+ export function Stack({ gap = 'md', padding, align, className, style, children }) {
5
+ return (_jsx("div", { ...part('stack', 'root'), className: cn('snap-stack', className), style: {
6
+ display: 'flex',
7
+ flexDirection: 'column',
8
+ gap: space(gap),
9
+ ...padding !== undefined ? { padding: space(padding) } : {},
10
+ ...align !== undefined ? { alignItems: align } : {},
11
+ ...style,
12
+ }, children: children }));
13
+ }
14
+ /** A horizontal flow. */
15
+ export function Row({ gap = 'sm', padding, align, justify, wrap = false, className, style, children }) {
16
+ return (_jsx("div", { ...part('row', 'root'), className: cn('snap-row', className), style: {
17
+ display: 'flex',
18
+ flexDirection: 'row',
19
+ gap: space(gap),
20
+ ...padding !== undefined ? { padding: space(padding) } : {},
21
+ ...align !== undefined ? { alignItems: align } : {},
22
+ ...justify !== undefined ? { justifyContent: justify } : {},
23
+ ...wrap ? { flexWrap: 'wrap' } : {},
24
+ ...style,
25
+ }, children: children }));
26
+ }
27
+ /** A responsive grid. */
28
+ export function Grid({ gap = 'md', padding, columns = 2, minColumnWidth, className, style, children }) {
29
+ const template = typeof columns === 'number'
30
+ ? `repeat(${columns}, minmax(0, 1fr))`
31
+ : columns;
32
+ return (_jsx("div", { ...part('grid', 'root'), className: cn('snap-grid', className), style: {
33
+ display: 'grid',
34
+ gap: space(gap),
35
+ gridTemplateColumns: minColumnWidth !== undefined
36
+ ? `repeat(auto-fit, minmax(${minColumnWidth}, 1fr))`
37
+ : template,
38
+ ...padding !== undefined ? { padding: space(padding) } : {},
39
+ ...style,
40
+ }, children: children }));
41
+ }
42
+ /** A two-pane split (sidebar + content, list + detail). */
43
+ export function Split({ start, end, gap = 'md', ratio = 'minmax(0, 2fr) minmax(0, 3fr)', className, style }) {
44
+ return (_jsxs("div", { ...part('split', 'root'), className: cn('snap-split', className), style: { display: 'grid', gridTemplateColumns: ratio, gap: space(gap), minHeight: 0, ...style }, children: [_jsx("div", { ...part('split', 'start'), style: { minWidth: 0, minHeight: 0 }, children: start }), _jsx("div", { ...part('split', 'end'), style: { minWidth: 0, minHeight: 0 }, children: end })] }));
45
+ }
46
+ /** The operator-window shell frame. */
47
+ export function AppShell({ header, sidebar, footer, className, style, children }) {
48
+ return (_jsxs("div", { ...part('app-shell', 'root'), className: cn('snap-app-shell', className), style: { display: 'flex', flexDirection: 'column', height: '100%', minHeight: 0, ...style }, children: [header !== undefined && _jsx("div", { ...part('app-shell', 'header'), style: { flexShrink: 0 }, children: header }), _jsxs("div", { style: { display: 'flex', flex: 1, minHeight: 0 }, children: [sidebar !== undefined && (_jsx("div", { ...part('app-shell', 'sidebar'), style: { flexShrink: 0, minHeight: 0 }, children: sidebar })), _jsx("div", { ...part('app-shell', 'main'), style: { flex: 1, minWidth: 0, minHeight: 0, overflow: 'auto' }, children: children })] }), footer !== undefined && _jsx("div", { ...part('app-shell', 'footer'), style: { flexShrink: 0 }, children: footer })] }));
49
+ }
50
+ /** A page body with its own header/actions anatomy. */
51
+ export function Page({ header, actions, title, titleExtra, description, className, style, children }) {
52
+ return (_jsxs("div", { ...part('page', 'root'), className: cn('snap-page', className), style: { display: 'flex', flexDirection: 'column', minHeight: 0, ...style }, children: [(header !== undefined || title !== undefined || description !== undefined || actions !== undefined) && (_jsxs("div", { ...part('page', 'header'), style: { display: 'flex', flexDirection: 'column', gap: space('sm'), flexShrink: 0 }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', gap: space('md') }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: space('sm') }, children: [title !== undefined && _jsx("div", { ...part('page', 'title'), children: title }), titleExtra !== undefined && _jsx("div", { ...part('page', 'title-extra'), children: titleExtra })] }), actions !== undefined && _jsx("div", { ...part('page', 'actions'), children: actions })] }), description !== undefined && _jsx("div", { ...part('page', 'description'), children: description }), header] })), _jsx("div", { ...part('page', 'body'), style: { display: 'flex', flexDirection: 'column', flex: 1, minHeight: 0 }, children: children })] }));
53
+ }
54
+ /** A titled content section. */
55
+ export function Section({ title, description, actions, className, style, children }) {
56
+ return (_jsxs("section", { ...part('section', 'root'), className: cn('snap-section', className), style: { display: 'flex', flexDirection: 'column', gap: space('sm'), ...style }, children: [(title !== undefined || actions !== undefined) && (_jsxs("div", { ...part('section', 'header'), style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: space('md') }, children: [_jsxs("div", { children: [title !== undefined && _jsx("div", { ...part('section', 'title'), children: title }), description !== undefined && _jsx("div", { children: description })] }), actions !== undefined && _jsx("div", { ...part('section', 'actions'), children: actions })] })), _jsx("div", { ...part('section', 'body'), children: children })] }));
57
+ }
58
+ /** A compact action bar. */
59
+ export function Toolbar({ start, end, className, style }) {
60
+ return (_jsxs("div", { ...part('toolbar', 'root'), className: cn('snap-toolbar', className), style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: space('sm'), ...style }, children: [_jsx("div", { ...part('toolbar', 'start'), style: { display: 'flex', alignItems: 'center', gap: space('sm'), minWidth: 0 }, children: start }), _jsx("div", { ...part('toolbar', 'end'), style: { display: 'flex', alignItems: 'center', gap: space('sm'), flexShrink: 0 }, children: end })] }));
61
+ }
62
+ /** A native scroll container with a stable anatomy. */
63
+ export function ScrollArea({ direction = 'vertical', className, style, children }) {
64
+ return (_jsx("div", { ...part('scroll-area', 'root'), className: cn('snap-scroll-area', className), style: {
65
+ overflowY: direction === 'horizontal' ? 'hidden' : 'auto',
66
+ overflowX: direction === 'vertical' ? 'hidden' : 'auto',
67
+ minHeight: 0,
68
+ ...style,
69
+ }, children: _jsx("div", { ...part('scroll-area', 'viewport'), children: children }) }));
70
+ }
71
+ /** A touch-friendly scroll container; pointer dragging pans the viewport. */
72
+ export function DragScroll({ direction = 'vertical', className, style, children }) {
73
+ return (_jsx("div", { ...part('drag-scroll', 'root'), className: cn('snap-drag-scroll', className), style: {
74
+ overflowY: direction === 'horizontal' ? 'hidden' : 'auto',
75
+ overflowX: direction === 'vertical' ? 'hidden' : 'auto',
76
+ minHeight: 0,
77
+ ...style,
78
+ }, children: _jsx("div", { ...part('drag-scroll', 'viewport'), children: children }) }));
79
+ }
80
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1,44 @@
1
+ /**
2
+ * A small JSON-Schema form renderer for driver dialect schemas. It covers the
3
+ * flat object shapes drivers commonly declare: string, number/integer,
4
+ * boolean, enum, and unions of literals. Nested objects/arrays fall back to a
5
+ * JSON textarea; a driver that needs a bespoke interaction should ship a
6
+ * registered component instead of growing this renderer.
7
+ *
8
+ * @module @snap-rail/ui/components/schema-form
9
+ */
10
+ import type { ReactNode } from 'react';
11
+ /** The JSON-Schema subset a driver dialect form uses. */
12
+ export interface JsonSchemaNode {
13
+ type?: string;
14
+ title?: string;
15
+ description?: string;
16
+ properties?: Readonly<Record<string, JsonSchemaNode>>;
17
+ required?: readonly string[];
18
+ enum?: readonly unknown[];
19
+ /** `z.toJSONSchema` projects a union of literals (`z.union([z.literal(1), …])`)
20
+ * as an `anyOf` of `const` branches instead of an `enum` — see
21
+ * {@link literalValuesOf}. */
22
+ anyOf?: readonly JsonSchemaNode[];
23
+ const?: unknown;
24
+ default?: unknown;
25
+ minimum?: number;
26
+ maximum?: number;
27
+ }
28
+ /** The closed literal set a property may take: its `enum`, or — for a union of
29
+ * scalar literals — the flattened `const` values of the `anyOf` branches, in
30
+ * declaration order. `undefined` when the property is not a closed literal set
31
+ * (open unions, non-scalar consts, absent both fields). */
32
+ export declare function literalValuesOf(property: JsonSchemaNode): readonly unknown[] | undefined;
33
+ /** Props of {@link SchemaForm}. */
34
+ export interface SchemaFormProps {
35
+ schema: JsonSchemaNode;
36
+ value: Readonly<Record<string, unknown>>;
37
+ onChange: (value: Record<string, unknown>) => void;
38
+ idPrefix?: string;
39
+ }
40
+ /** Render a flat JSON-Schema object as semantic fields. */
41
+ export declare function SchemaForm({ schema, value, onChange, idPrefix }: SchemaFormProps): ReactNode;
42
+ /** Normalize a driver's JSON Schema (which may carry `$schema`). */
43
+ export declare function schemaNodeOf(value: unknown): JsonSchemaNode;
44
+ //# sourceMappingURL=schema-form.d.ts.map
@@ -0,0 +1,84 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Field } from "./form.js";
3
+ import { Input, NumberInput, Textarea } from "./input.js";
4
+ import { Switch, TouchSelect } from "./controls.js";
5
+ /** The closed literal set a property may take: its `enum`, or — for a union of
6
+ * scalar literals — the flattened `const` values of the `anyOf` branches, in
7
+ * declaration order. `undefined` when the property is not a closed literal set
8
+ * (open unions, non-scalar consts, absent both fields). */
9
+ export function literalValuesOf(property) {
10
+ if (Array.isArray(property.enum))
11
+ return property.enum;
12
+ const branches = property.anyOf;
13
+ if (!Array.isArray(branches) || branches.length === 0)
14
+ return undefined;
15
+ const values = [];
16
+ for (const branch of branches) {
17
+ if (branch === null || typeof branch !== 'object' || branch.anyOf !== undefined)
18
+ return undefined;
19
+ if (!('const' in branch))
20
+ return undefined;
21
+ const value = branch.const;
22
+ if (typeof value !== 'string' && typeof value !== 'number' && typeof value !== 'boolean')
23
+ return undefined;
24
+ values.push(value);
25
+ }
26
+ return values;
27
+ }
28
+ function asRecord(value) {
29
+ return value !== null && typeof value === 'object' && !Array.isArray(value)
30
+ ? value
31
+ : {};
32
+ }
33
+ /** Render a flat JSON-Schema object as semantic fields. */
34
+ export function SchemaForm({ schema, value, onChange, idPrefix = 'schema' }) {
35
+ const properties = schema.properties ?? {};
36
+ const required = new Set(schema.required ?? []);
37
+ const update = (key, next) => {
38
+ onChange({ ...value, [key]: next });
39
+ };
40
+ return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 'var(--snap-space-md)' }, children: [Object.entries(properties).map(([key, property]) => {
41
+ const id = `${idPrefix}-${key}`;
42
+ const current = value[key] ?? property.default;
43
+ const label = property.title ?? key;
44
+ const common = {
45
+ label,
46
+ htmlFor: id,
47
+ ...(property.description !== undefined ? { help: property.description } : {}),
48
+ ...(required.has(key) ? { required: true } : {}),
49
+ };
50
+ const values = literalValuesOf(property);
51
+ if (values !== undefined) {
52
+ const options = values.map(item => ({ value: String(item), label: String(item) }));
53
+ return (_jsx(Field, { ...common, children: _jsx(TouchSelect, { ...current !== undefined ? { value: String(current) } : {}, options: options, onValueChange: next => {
54
+ update(key, values.find(item => String(item) === next) ?? next);
55
+ }, "aria-label": String(label) }) }, key));
56
+ }
57
+ if (property.type === 'boolean') {
58
+ return (_jsx(Field, { ...common, children: _jsx(Switch, { checked: current === true, onCheckedChange: next => update(key, next), label: current === true ? '开启' : '关闭' }) }, key));
59
+ }
60
+ if (property.type === 'number' || property.type === 'integer') {
61
+ return (_jsx(Field, { ...common, children: _jsx(NumberInput, { id: id, value: typeof current === 'number' ? current : '', ...property.minimum !== undefined ? { min: property.minimum } : {}, ...property.maximum !== undefined ? { max: property.maximum } : {}, onChange: event => {
62
+ const raw = event.target.value;
63
+ update(key, raw === '' ? undefined : Number(raw));
64
+ } }) }, key));
65
+ }
66
+ if (property.type === 'object' || property.type === 'array') {
67
+ return (_jsx(Field, { ...common, help: property.description ?? 'JSON 值', children: _jsx(Textarea, { id: id, rows: 4, defaultValue: JSON.stringify(current ?? (property.type === 'array' ? [] : {}), null, 2), onBlur: event => {
68
+ try {
69
+ update(key, JSON.parse(event.target.value));
70
+ }
71
+ catch {
72
+ // Keep the invalid draft in the textarea; the driver's
73
+ // schema rejects it on submit with a readable error.
74
+ }
75
+ } }) }, key));
76
+ }
77
+ return (_jsx(Field, { ...common, children: _jsx(Input, { id: id, value: typeof current === 'string' || typeof current === 'number' ? String(current) : '', onChange: event => update(key, event.target.value) }) }, key));
78
+ }), Object.keys(properties).length === 0 && (_jsx("span", { style: { color: 'var(--snap-color-muted)' }, children: "\u8BE5\u9A71\u52A8\u6CA1\u6709\u989D\u5916\u914D\u7F6E\u9879\u3002" }))] }));
79
+ }
80
+ /** Normalize a driver's JSON Schema (which may carry `$schema`). */
81
+ export function schemaNodeOf(value) {
82
+ return asRecord(value);
83
+ }
84
+ //# sourceMappingURL=schema-form.js.map
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Surface primitives: cards, panels, and tables. Their structure is semantic
3
+ * (headers/bodies/rows); skins own borders, density, hover, and empty states.
4
+ *
5
+ * @module @snap-rail/ui/components/surface
6
+ */
7
+ import type { HTMLAttributes, ReactNode, TdHTMLAttributes, ThHTMLAttributes } from 'react';
8
+ /** Props of {@link Card}. */
9
+ export interface CardProps extends HTMLAttributes<HTMLDivElement> {
10
+ children?: ReactNode;
11
+ }
12
+ /** A content card. */
13
+ export declare function Card({ className, children, ...props }: CardProps): ReactNode;
14
+ /** The card header region. */
15
+ export declare function CardHeader({ className, children, ...props }: HTMLAttributes<HTMLDivElement>): ReactNode;
16
+ /** The card title. */
17
+ export declare function CardTitle({ className, children, ...props }: HTMLAttributes<HTMLDivElement>): ReactNode;
18
+ /** The card description. */
19
+ export declare function CardDescription({ className, children, ...props }: HTMLAttributes<HTMLDivElement>): ReactNode;
20
+ /** The card body. */
21
+ export declare function CardContent({ className, children, ...props }: HTMLAttributes<HTMLDivElement>): ReactNode;
22
+ /** The card footer. */
23
+ export declare function CardFooter({ className, children, ...props }: HTMLAttributes<HTMLDivElement>): ReactNode;
24
+ /** Props of {@link Panel}. */
25
+ export interface PanelProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
26
+ title?: ReactNode;
27
+ actions?: ReactNode;
28
+ footer?: ReactNode;
29
+ }
30
+ /** A bounded panel with optional header/footer. */
31
+ export declare function Panel({ title, actions, footer, className, children, ...props }: PanelProps): ReactNode;
32
+ /** A semantic table. */
33
+ export declare function Table({ className, children, ...props }: HTMLAttributes<HTMLTableElement>): ReactNode;
34
+ /** The table head. */
35
+ export declare function TableHeader({ className, children, ...props }: HTMLAttributes<HTMLTableSectionElement>): ReactNode;
36
+ /** The table body. */
37
+ export declare function TableBody({ className, children, ...props }: HTMLAttributes<HTMLTableSectionElement>): ReactNode;
38
+ /** A table row. */
39
+ export declare function TableRow({ className, children, ...props }: HTMLAttributes<HTMLTableRowElement>): ReactNode;
40
+ /** A table header cell. */
41
+ export declare function TableHead({ className, children, ...props }: ThHTMLAttributes<HTMLTableCellElement>): ReactNode;
42
+ /** A table body cell. */
43
+ export declare function TableCell({ className, children, ...props }: TdHTMLAttributes<HTMLTableCellElement>): ReactNode;
44
+ /** A full-width empty row. */
45
+ export declare function TableEmpty({ colSpan, children }: {
46
+ colSpan: number;
47
+ children: ReactNode;
48
+ }): ReactNode;
49
+ //# sourceMappingURL=surface.d.ts.map
@@ -0,0 +1,59 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn, part } from "../utils.js";
3
+ /** A content card. */
4
+ export function Card({ className, children, ...props }) {
5
+ return _jsx("div", { ...part('card', 'root'), className: cn('snap-card', className), ...props, children: children });
6
+ }
7
+ /** The card header region. */
8
+ export function CardHeader({ className, children, ...props }) {
9
+ return _jsx("div", { ...part('card', 'header'), className: cn('snap-card-header', className), ...props, children: children });
10
+ }
11
+ /** The card title. */
12
+ export function CardTitle({ className, children, ...props }) {
13
+ return _jsx("div", { ...part('card', 'title'), className: cn('snap-card-title', className), ...props, children: children });
14
+ }
15
+ /** The card description. */
16
+ export function CardDescription({ className, children, ...props }) {
17
+ return _jsx("div", { ...part('card', 'description'), className: cn('snap-card-description', className), ...props, children: children });
18
+ }
19
+ /** The card body. */
20
+ export function CardContent({ className, children, ...props }) {
21
+ return _jsx("div", { ...part('card', 'body'), className: cn('snap-card-content', className), ...props, children: children });
22
+ }
23
+ /** The card footer. */
24
+ export function CardFooter({ className, children, ...props }) {
25
+ return _jsx("div", { ...part('card', 'footer'), className: cn('snap-card-footer', className), ...props, children: children });
26
+ }
27
+ /** A bounded panel with optional header/footer. */
28
+ export function Panel({ title, actions, footer, className, children, ...props }) {
29
+ return (_jsxs("div", { ...part('panel', 'root'), className: cn('snap-panel', className), ...props, children: [(title !== undefined || actions !== undefined) && (_jsxs("div", { ...part('panel', 'header'), className: "snap-panel-header", children: [_jsx("div", { ...part('panel', 'title'), children: title }), actions !== undefined && _jsx("div", { children: actions })] })), _jsx("div", { ...part('panel', 'body'), className: "snap-panel-body", children: children }), footer !== undefined && _jsx("div", { ...part('panel', 'footer'), className: "snap-panel-footer", children: footer })] }));
30
+ }
31
+ /** A semantic table. */
32
+ export function Table({ className, children, ...props }) {
33
+ return (_jsx("div", { ...part('table', 'root'), className: cn('snap-table', className), children: _jsx("table", { ...props, children: children }) }));
34
+ }
35
+ /** The table head. */
36
+ export function TableHeader({ className, children, ...props }) {
37
+ return _jsx("thead", { ...part('table', 'header'), className: cn('snap-table-header', className), ...props, children: children });
38
+ }
39
+ /** The table body. */
40
+ export function TableBody({ className, children, ...props }) {
41
+ return _jsx("tbody", { ...part('table', 'body'), className: cn('snap-table-body', className), ...props, children: children });
42
+ }
43
+ /** A table row. */
44
+ export function TableRow({ className, children, ...props }) {
45
+ return _jsx("tr", { ...part('table', 'row'), className: cn('snap-table-row', className), ...props, children: children });
46
+ }
47
+ /** A table header cell. */
48
+ export function TableHead({ className, children, ...props }) {
49
+ return _jsx("th", { ...part('table', 'head'), className: cn('snap-table-head', className), ...props, children: children });
50
+ }
51
+ /** A table body cell. */
52
+ export function TableCell({ className, children, ...props }) {
53
+ return _jsx("td", { ...part('table', 'cell'), className: cn('snap-table-cell', className), ...props, children: children });
54
+ }
55
+ /** A full-width empty row. */
56
+ export function TableEmpty({ colSpan, children }) {
57
+ return (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: colSpan, children: _jsx("div", { ...part('table', 'empty'), children: children }) }) }));
58
+ }
59
+ //# sourceMappingURL=surface.js.map