@sero-ai/ui 0.3.2 → 0.4.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/.turbo/turbo-build.log +628 -0
- package/.turbo/turbo-typecheck.log +1 -1
- package/CHANGELOG.md +38 -0
- package/dist/components/context-editor/CapabilitySection.cjs +57 -0
- package/dist/components/context-editor/CapabilitySection.d.cts +20 -0
- package/dist/components/context-editor/CapabilitySection.d.ts +20 -0
- package/dist/components/context-editor/CapabilitySection.js +57 -0
- package/dist/components/context-editor/ContextEditor.cjs +108 -0
- package/dist/components/context-editor/ContextEditor.d.cts +26 -0
- package/dist/components/context-editor/ContextEditor.d.ts +26 -0
- package/dist/components/context-editor/ContextEditor.js +108 -0
- package/dist/components/context-editor/PresetBar.cjs +71 -0
- package/dist/components/context-editor/PresetBar.d.cts +19 -0
- package/dist/components/context-editor/PresetBar.d.ts +19 -0
- package/dist/components/context-editor/PresetBar.js +71 -0
- package/dist/components/context-editor/SkillsSection.cjs +31 -0
- package/dist/components/context-editor/SkillsSection.d.cts +14 -0
- package/dist/components/context-editor/SkillsSection.d.ts +14 -0
- package/dist/components/context-editor/SkillsSection.js +31 -0
- package/dist/components/context-editor/SystemPromptSection.cjs +58 -0
- package/dist/components/context-editor/SystemPromptSection.d.cts +25 -0
- package/dist/components/context-editor/SystemPromptSection.d.ts +25 -0
- package/dist/components/context-editor/SystemPromptSection.js +58 -0
- package/dist/components/context-editor/ToolsSection.cjs +31 -0
- package/dist/components/context-editor/ToolsSection.d.cts +14 -0
- package/dist/components/context-editor/ToolsSection.d.ts +14 -0
- package/dist/components/context-editor/ToolsSection.js +31 -0
- package/dist/components/context-editor/index.cjs +8 -0
- package/dist/components/context-editor/index.d.cts +5 -0
- package/dist/components/context-editor/index.d.ts +5 -0
- package/dist/components/context-editor/index.js +8 -0
- package/dist/components/context-editor/parts.cjs +184 -0
- package/dist/components/context-editor/parts.d.cts +32 -0
- package/dist/components/context-editor/parts.d.ts +32 -0
- package/dist/components/context-editor/parts.js +184 -0
- package/dist/components/context-editor/use-context-editor-model.cjs +194 -0
- package/dist/components/context-editor/use-context-editor-model.d.cts +57 -0
- package/dist/components/context-editor/use-context-editor-model.d.ts +57 -0
- package/dist/components/context-editor/use-context-editor-model.js +194 -0
- package/dist/components/dashboard/activity-list.cjs +59 -0
- package/dist/components/dashboard/activity-list.d.cts +27 -0
- package/dist/components/dashboard/activity-list.d.ts +27 -0
- package/dist/components/dashboard/activity-list.js +59 -0
- package/dist/components/dashboard/catalog.cjs +322 -0
- package/dist/components/dashboard/catalog.d.cts +14 -0
- package/dist/components/dashboard/catalog.d.ts +14 -0
- package/dist/components/dashboard/catalog.js +322 -0
- package/dist/components/dashboard/data-boundary.cjs +29 -0
- package/dist/components/dashboard/data-boundary.d.cts +21 -0
- package/dist/components/dashboard/data-boundary.d.ts +21 -0
- package/dist/components/dashboard/data-boundary.js +29 -0
- package/dist/components/dashboard/empty-state.cjs +49 -0
- package/dist/components/dashboard/empty-state.d.cts +20 -0
- package/dist/components/dashboard/empty-state.d.ts +20 -0
- package/dist/components/dashboard/empty-state.js +49 -0
- package/dist/components/dashboard/icon-button.cjs +40 -0
- package/dist/components/dashboard/icon-button.d.cts +24 -0
- package/dist/components/dashboard/icon-button.d.ts +24 -0
- package/dist/components/dashboard/icon-button.js +40 -0
- package/dist/components/dashboard/index.cjs +15 -0
- package/dist/components/dashboard/index.d.cts +24 -0
- package/dist/components/dashboard/index.d.ts +24 -0
- package/dist/components/dashboard/index.js +15 -0
- package/dist/components/dashboard/item-list.cjs +71 -0
- package/dist/components/dashboard/item-list.d.cts +28 -0
- package/dist/components/dashboard/item-list.d.ts +28 -0
- package/dist/components/dashboard/item-list.js +71 -0
- package/dist/components/dashboard/key-value.cjs +39 -0
- package/dist/components/dashboard/key-value.d.cts +17 -0
- package/dist/components/dashboard/key-value.d.ts +17 -0
- package/dist/components/dashboard/key-value.js +39 -0
- package/dist/components/dashboard/layout.cjs +193 -0
- package/dist/components/dashboard/layout.d.cts +91 -0
- package/dist/components/dashboard/layout.d.ts +91 -0
- package/dist/components/dashboard/layout.js +193 -0
- package/dist/components/dashboard/metric.cjs +98 -0
- package/dist/components/dashboard/metric.d.cts +44 -0
- package/dist/components/dashboard/metric.d.ts +44 -0
- package/dist/components/dashboard/metric.js +98 -0
- package/dist/components/dashboard/progress-ring.cjs +77 -0
- package/dist/components/dashboard/progress-ring.d.cts +25 -0
- package/dist/components/dashboard/progress-ring.d.ts +25 -0
- package/dist/components/dashboard/progress-ring.js +77 -0
- package/dist/components/dashboard/skeletons.cjs +54 -0
- package/dist/components/dashboard/skeletons.d.cts +15 -0
- package/dist/components/dashboard/skeletons.d.ts +15 -0
- package/dist/components/dashboard/skeletons.js +54 -0
- package/dist/components/dashboard/spacing.cjs +10 -0
- package/dist/components/dashboard/spacing.d.cts +4 -0
- package/dist/components/dashboard/spacing.d.ts +4 -0
- package/dist/components/dashboard/spacing.js +10 -0
- package/dist/components/dashboard/stale-indicator.cjs +42 -0
- package/dist/components/dashboard/stale-indicator.d.cts +15 -0
- package/dist/components/dashboard/stale-indicator.d.ts +15 -0
- package/dist/components/dashboard/stale-indicator.js +42 -0
- package/dist/components/dashboard/status.cjs +62 -0
- package/dist/components/dashboard/status.d.cts +15 -0
- package/dist/components/dashboard/status.d.ts +15 -0
- package/dist/components/dashboard/status.js +62 -0
- package/dist/components/dashboard/tone.cjs +26 -0
- package/dist/components/dashboard/tone.d.cts +9 -0
- package/dist/components/dashboard/tone.d.ts +9 -0
- package/dist/components/dashboard/tone.js +26 -0
- package/dist/components/dashboard/typography.cjs +99 -0
- package/dist/components/dashboard/typography.d.cts +57 -0
- package/dist/components/dashboard/typography.d.ts +57 -0
- package/dist/components/dashboard/typography.js +99 -0
- package/dist/components/reference/ActivityExample.cjs +47 -0
- package/dist/components/reference/ActivityExample.d.cts +5 -0
- package/dist/components/reference/ActivityExample.d.ts +5 -0
- package/dist/components/reference/ActivityExample.js +47 -0
- package/dist/components/reference/ResourceExample.cjs +54 -0
- package/dist/components/reference/ResourceExample.d.cts +5 -0
- package/dist/components/reference/ResourceExample.d.ts +5 -0
- package/dist/components/reference/ResourceExample.js +54 -0
- package/dist/components/reference/SchedulerExample.cjs +68 -0
- package/dist/components/reference/SchedulerExample.d.cts +5 -0
- package/dist/components/reference/SchedulerExample.d.ts +5 -0
- package/dist/components/reference/SchedulerExample.js +68 -0
- package/dist/components/reference/StarterExample.cjs +34 -0
- package/dist/components/reference/StarterExample.d.cts +5 -0
- package/dist/components/reference/StarterExample.d.ts +5 -0
- package/dist/components/reference/StarterExample.js +34 -0
- package/dist/components/reference/index.cjs +10 -0
- package/dist/components/reference/index.d.cts +5 -0
- package/dist/components/reference/index.d.ts +5 -0
- package/dist/components/reference/index.js +10 -0
- package/dist/components/ui/badge.cjs +5 -1
- package/dist/components/ui/badge.d.cts +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.js +5 -1
- package/dist/dashboard-catalog.cjs +8 -0
- package/dist/dashboard-catalog.d.cts +1 -0
- package/dist/dashboard-catalog.d.ts +1 -0
- package/dist/dashboard-catalog.js +8 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +1 -0
- package/dist/reference.cjs +12 -0
- package/dist/reference.d.cts +5 -0
- package/dist/reference.d.ts +5 -0
- package/dist/reference.js +12 -0
- package/dist/styles/glass-board.css +43 -0
- package/dist/styles/globals.css +59 -0
- package/package.json +70 -41
- package/src/components/context-editor/CapabilitySection.tsx +85 -0
- package/src/components/context-editor/ContextEditor.tsx +138 -0
- package/src/components/context-editor/PresetBar.tsx +94 -0
- package/src/components/context-editor/SkillsSection.tsx +37 -0
- package/src/components/context-editor/SystemPromptSection.tsx +88 -0
- package/src/components/context-editor/ToolsSection.tsx +37 -0
- package/src/components/context-editor/index.ts +7 -0
- package/src/components/context-editor/parts.tsx +217 -0
- package/src/components/context-editor/use-context-editor-model.ts +296 -0
- package/src/components/dashboard/__tests__/catalog.test.ts +57 -0
- package/src/components/dashboard/__tests__/glass.test.tsx +42 -0
- package/src/components/dashboard/__tests__/state.test.tsx +110 -0
- package/src/components/dashboard/__tests__/variants.test.tsx +95 -0
- package/src/components/dashboard/activity-list.tsx +99 -0
- package/src/components/dashboard/catalog.ts +351 -0
- package/src/components/dashboard/data-boundary.tsx +54 -0
- package/src/components/dashboard/empty-state.tsx +70 -0
- package/src/components/dashboard/icon-button.tsx +58 -0
- package/src/components/dashboard/index.ts +21 -0
- package/src/components/dashboard/item-list.tsx +106 -0
- package/src/components/dashboard/key-value.tsx +54 -0
- package/src/components/dashboard/layout.tsx +286 -0
- package/src/components/dashboard/metric.tsx +139 -0
- package/src/components/dashboard/progress-ring.tsx +100 -0
- package/src/components/dashboard/skeletons.tsx +73 -0
- package/src/components/dashboard/spacing.ts +14 -0
- package/src/components/dashboard/stale-indicator.tsx +55 -0
- package/src/components/dashboard/status.tsx +75 -0
- package/src/components/dashboard/tone.ts +35 -0
- package/src/components/dashboard/typography.tsx +151 -0
- package/src/components/reference/ActivityExample.tsx +68 -0
- package/src/components/reference/ResourceExample.tsx +78 -0
- package/src/components/reference/SchedulerExample.tsx +88 -0
- package/src/components/reference/StarterExample.tsx +48 -0
- package/src/components/reference/index.ts +10 -0
- package/src/components/ui/badge.tsx +6 -0
- package/src/dashboard-catalog.ts +13 -0
- package/src/index.ts +5 -0
- package/src/reference.ts +15 -0
- package/src/styles/glass-board.css +43 -0
- package/src/styles/globals.css +59 -0
- package/tsup.config.ts +6 -2
- package/vitest.config.ts +8 -0
- package/LICENSE +0 -201
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');
|
|
2
|
+
var _utils = require('../../lib/utils');
|
|
3
|
+
var _typography = require('./typography');
|
|
4
|
+
var _tone = require('./tone');
|
|
5
|
+
function ActivityListItem({
|
|
6
|
+
className,
|
|
7
|
+
label,
|
|
8
|
+
timestamp,
|
|
9
|
+
detail,
|
|
10
|
+
tone = "neutral",
|
|
11
|
+
icon,
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
15
|
+
"li",
|
|
16
|
+
{
|
|
17
|
+
"data-slot": "activity-list-item",
|
|
18
|
+
className: _utils.cn.call(void 0, "flex items-start gap-2 py-1", className),
|
|
19
|
+
...props,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mt-1 flex size-3.5 shrink-0 items-center justify-center", children: icon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _typography.Icon, { icon, size: "xs", tone: tone === "neutral" ? void 0 : tone }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _utils.cn.call(void 0, "size-2 rounded-full", _tone.toneDot[tone]) }) }),
|
|
22
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
23
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-baseline justify-between gap-2", children: [
|
|
24
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate text-xs text-[var(--text-primary)]", children: label }),
|
|
25
|
+
timestamp && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "shrink-0 text-[11px] tabular-nums text-[var(--text-muted)]", children: timestamp })
|
|
26
|
+
] }),
|
|
27
|
+
detail && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-clamp-1 text-xs text-[var(--text-muted)]", children: detail })
|
|
28
|
+
] })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
function ActivityList({
|
|
34
|
+
className,
|
|
35
|
+
overflowCount = 0,
|
|
36
|
+
children,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
39
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
40
|
+
"ul",
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "activity-list",
|
|
43
|
+
className: _utils.cn.call(void 0, "flex min-w-0 flex-col", className),
|
|
44
|
+
...props,
|
|
45
|
+
children: [
|
|
46
|
+
children,
|
|
47
|
+
overflowCount > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "li", { className: "pl-5 pt-0.5 text-[11px] text-[var(--text-muted)]", children: [
|
|
48
|
+
"+",
|
|
49
|
+
overflowCount,
|
|
50
|
+
" more"
|
|
51
|
+
] })
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
exports.ActivityList = ActivityList; exports.ActivityListItem = ActivityListItem;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Tone } from './tone.cjs';
|
|
4
|
+
|
|
5
|
+
interface ActivityListItemProps extends Omit<React.ComponentProps<"li">, "title"> {
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
/** Pre-formatted timestamp, e.g. "08:00" or "in 2h". */
|
|
8
|
+
timestamp?: React.ReactNode;
|
|
9
|
+
/** Supporting detail under the label. */
|
|
10
|
+
detail?: React.ReactNode;
|
|
11
|
+
/** Status marker tone. Ignored when `icon` is provided. */
|
|
12
|
+
tone?: Tone;
|
|
13
|
+
/** Leading icon component, used instead of the status dot. */
|
|
14
|
+
icon?: React.ComponentType<{
|
|
15
|
+
className?: string;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
/** A single chronological event row. */
|
|
19
|
+
declare function ActivityListItem({ className, label, timestamp, detail, tone, icon, ...props }: ActivityListItemProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
interface ActivityListProps extends React.ComponentProps<"ul"> {
|
|
21
|
+
/** Count of events not shown; renders a "+N more" footer when > 0. */
|
|
22
|
+
overflowCount?: number;
|
|
23
|
+
}
|
|
24
|
+
/** A chronological list of ActivityListItem rows. */
|
|
25
|
+
declare function ActivityList({ className, overflowCount, children, ...props }: ActivityListProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { ActivityList, ActivityListItem, type ActivityListItemProps, type ActivityListProps };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Tone } from './tone.js';
|
|
4
|
+
|
|
5
|
+
interface ActivityListItemProps extends Omit<React.ComponentProps<"li">, "title"> {
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
/** Pre-formatted timestamp, e.g. "08:00" or "in 2h". */
|
|
8
|
+
timestamp?: React.ReactNode;
|
|
9
|
+
/** Supporting detail under the label. */
|
|
10
|
+
detail?: React.ReactNode;
|
|
11
|
+
/** Status marker tone. Ignored when `icon` is provided. */
|
|
12
|
+
tone?: Tone;
|
|
13
|
+
/** Leading icon component, used instead of the status dot. */
|
|
14
|
+
icon?: React.ComponentType<{
|
|
15
|
+
className?: string;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
/** A single chronological event row. */
|
|
19
|
+
declare function ActivityListItem({ className, label, timestamp, detail, tone, icon, ...props }: ActivityListItemProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
interface ActivityListProps extends React.ComponentProps<"ul"> {
|
|
21
|
+
/** Count of events not shown; renders a "+N more" footer when > 0. */
|
|
22
|
+
overflowCount?: number;
|
|
23
|
+
}
|
|
24
|
+
/** A chronological list of ActivityListItem rows. */
|
|
25
|
+
declare function ActivityList({ className, overflowCount, children, ...props }: ActivityListProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { ActivityList, ActivityListItem, type ActivityListItemProps, type ActivityListProps };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
|
+
import { Icon } from "./typography";
|
|
4
|
+
import { toneDot } from "./tone";
|
|
5
|
+
function ActivityListItem({
|
|
6
|
+
className,
|
|
7
|
+
label,
|
|
8
|
+
timestamp,
|
|
9
|
+
detail,
|
|
10
|
+
tone = "neutral",
|
|
11
|
+
icon,
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ jsxs(
|
|
15
|
+
"li",
|
|
16
|
+
{
|
|
17
|
+
"data-slot": "activity-list-item",
|
|
18
|
+
className: cn("flex items-start gap-2 py-1", className),
|
|
19
|
+
...props,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsx("span", { className: "mt-1 flex size-3.5 shrink-0 items-center justify-center", children: icon ? /* @__PURE__ */ jsx(Icon, { icon, size: "xs", tone: tone === "neutral" ? void 0 : tone }) : /* @__PURE__ */ jsx("span", { className: cn("size-2 rounded-full", toneDot[tone]) }) }),
|
|
22
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
23
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-baseline justify-between gap-2", children: [
|
|
24
|
+
/* @__PURE__ */ jsx("span", { className: "truncate text-xs text-[var(--text-primary)]", children: label }),
|
|
25
|
+
timestamp && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[11px] tabular-nums text-[var(--text-muted)]", children: timestamp })
|
|
26
|
+
] }),
|
|
27
|
+
detail && /* @__PURE__ */ jsx("span", { className: "line-clamp-1 text-xs text-[var(--text-muted)]", children: detail })
|
|
28
|
+
] })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
function ActivityList({
|
|
34
|
+
className,
|
|
35
|
+
overflowCount = 0,
|
|
36
|
+
children,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
39
|
+
return /* @__PURE__ */ jsxs(
|
|
40
|
+
"ul",
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "activity-list",
|
|
43
|
+
className: cn("flex min-w-0 flex-col", className),
|
|
44
|
+
...props,
|
|
45
|
+
children: [
|
|
46
|
+
children,
|
|
47
|
+
overflowCount > 0 && /* @__PURE__ */ jsxs("li", { className: "pl-5 pt-0.5 text-[11px] text-[var(--text-muted)]", children: [
|
|
48
|
+
"+",
|
|
49
|
+
overflowCount,
|
|
50
|
+
" more"
|
|
51
|
+
] })
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
ActivityList,
|
|
58
|
+
ActivityListItem
|
|
59
|
+
};
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});const dashboardComponentCatalog = [
|
|
2
|
+
// ── Layout and structure ──────────────────────────────────────
|
|
3
|
+
{
|
|
4
|
+
name: "WidgetContent",
|
|
5
|
+
category: "layout",
|
|
6
|
+
kind: "composite",
|
|
7
|
+
summary: "Full-height widget frame with standard padding and a container-query boundary.",
|
|
8
|
+
useWhen: "As the outermost element of every dashboard widget.",
|
|
9
|
+
related: ["Stack", "Inline"],
|
|
10
|
+
status: "stable",
|
|
11
|
+
example: '<WidgetContent><Stack gap="sm">\u2026</Stack></WidgetContent>'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: "Stack",
|
|
15
|
+
category: "layout",
|
|
16
|
+
kind: "composite",
|
|
17
|
+
summary: "Vertical layout with semantic spacing, alignment and optional scrolling.",
|
|
18
|
+
useWhen: "For the primary top-to-bottom content flow inside a widget.",
|
|
19
|
+
related: ["Inline", "WidgetContent"],
|
|
20
|
+
status: "stable",
|
|
21
|
+
example: '<Stack gap="sm" scroll>\u2026</Stack>'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "Inline",
|
|
25
|
+
category: "layout",
|
|
26
|
+
kind: "composite",
|
|
27
|
+
summary: "Horizontal layout with spacing, alignment, wrap and justify.",
|
|
28
|
+
useWhen: "For a row of items such as a header with a trailing action.",
|
|
29
|
+
related: ["Stack"],
|
|
30
|
+
status: "stable",
|
|
31
|
+
example: '<Inline justify="between" align="center">\u2026</Inline>'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "Grid",
|
|
35
|
+
category: "layout",
|
|
36
|
+
kind: "composite",
|
|
37
|
+
summary: "Responsive grid with bounded columns and gap.",
|
|
38
|
+
useWhen: "For metric and summary layouts that reflow by width.",
|
|
39
|
+
related: ["MetricGroup"],
|
|
40
|
+
status: "stable",
|
|
41
|
+
example: '<Grid columns="auto" minColumnWidth={120}>\u2026</Grid>'
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "Section",
|
|
45
|
+
category: "layout",
|
|
46
|
+
kind: "composite",
|
|
47
|
+
summary: "Compact section with optional heading, description and trailing action.",
|
|
48
|
+
useWhen: "To group related content under a labelled heading.",
|
|
49
|
+
related: ["Divider", "Heading"],
|
|
50
|
+
status: "stable",
|
|
51
|
+
example: '<Section heading="Summary" action={\u2026}>\u2026</Section>'
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "Divider",
|
|
55
|
+
category: "layout",
|
|
56
|
+
kind: "composite",
|
|
57
|
+
summary: "Compact horizontal or vertical divider built on Separator.",
|
|
58
|
+
useWhen: "To separate sections without a heavy border.",
|
|
59
|
+
related: ["Section"],
|
|
60
|
+
status: "stable",
|
|
61
|
+
example: '<Divider spacing="sm" />'
|
|
62
|
+
},
|
|
63
|
+
// ── Typography and media ──────────────────────────────────────
|
|
64
|
+
{
|
|
65
|
+
name: "Text",
|
|
66
|
+
category: "typography",
|
|
67
|
+
kind: "composite",
|
|
68
|
+
summary: "Semantic text variants (body, label, supporting, muted, numeric) with truncation.",
|
|
69
|
+
useWhen: "For any text, instead of ad-hoc font-size utilities.",
|
|
70
|
+
related: ["Heading"],
|
|
71
|
+
status: "stable",
|
|
72
|
+
example: '<Text variant="label">Jobs</Text>'
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "Heading",
|
|
76
|
+
category: "typography",
|
|
77
|
+
kind: "composite",
|
|
78
|
+
summary: "Compact heading levels and sizes that keep correct HTML semantics.",
|
|
79
|
+
useWhen: "For section and view titles.",
|
|
80
|
+
related: ["Section", "Text"],
|
|
81
|
+
status: "stable",
|
|
82
|
+
example: '<Heading level={2} size="md">Overview</Heading>'
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "Icon",
|
|
86
|
+
category: "typography",
|
|
87
|
+
kind: "composite",
|
|
88
|
+
summary: "Consistent icon wrapper for size, tone and accessibility.",
|
|
89
|
+
useWhen: "To render an icon component with a shared size and tone.",
|
|
90
|
+
related: ["IconButton"],
|
|
91
|
+
status: "stable",
|
|
92
|
+
example: '<Icon icon={Clock} size="sm" tone="warning" />'
|
|
93
|
+
},
|
|
94
|
+
// ── Data display ──────────────────────────────────────────────
|
|
95
|
+
{
|
|
96
|
+
name: "Metric",
|
|
97
|
+
category: "data-display",
|
|
98
|
+
kind: "composite",
|
|
99
|
+
summary: "Label + value with optional icon, supporting text and trend.",
|
|
100
|
+
useWhen: "To show a single number inline.",
|
|
101
|
+
related: ["MetricCard", "MetricGroup"],
|
|
102
|
+
status: "stable",
|
|
103
|
+
example: '<Metric label="Jobs" value={6} />'
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "MetricCard",
|
|
107
|
+
category: "data-display",
|
|
108
|
+
kind: "composite",
|
|
109
|
+
summary: "A contained surface for a Metric or compact summary.",
|
|
110
|
+
useWhen: "To give a metric its own bounded card.",
|
|
111
|
+
related: ["Metric", "MetricGroup"],
|
|
112
|
+
status: "stable",
|
|
113
|
+
example: '<MetricCard><Metric label="Jobs" value={6} /></MetricCard>'
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: "MetricGroup",
|
|
117
|
+
category: "data-display",
|
|
118
|
+
kind: "composite",
|
|
119
|
+
summary: "Arranges multiple metrics responsively in a bounded grid.",
|
|
120
|
+
useWhen: "To show several metrics that reflow by width.",
|
|
121
|
+
related: ["Metric", "Grid"],
|
|
122
|
+
status: "stable",
|
|
123
|
+
example: "<MetricGroup><Metric \u2026 /><Metric \u2026 /></MetricGroup>"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "Status",
|
|
127
|
+
category: "data-display",
|
|
128
|
+
kind: "composite",
|
|
129
|
+
summary: "Semantic status dot, label or pill with neutral/success/warning/error/info tones.",
|
|
130
|
+
useWhen: "To show a health or state indicator. Map domain status onto a tone.",
|
|
131
|
+
related: ["Badge"],
|
|
132
|
+
status: "stable",
|
|
133
|
+
example: '<Status tone="success">Active</Status>'
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: "Badge",
|
|
137
|
+
category: "data-display",
|
|
138
|
+
kind: "primitive",
|
|
139
|
+
summary: "Existing badge primitive, extended with success/warning/info tones.",
|
|
140
|
+
useWhen: "For compact counts, tags and category labels.",
|
|
141
|
+
related: ["Status"],
|
|
142
|
+
status: "stable",
|
|
143
|
+
example: '<Badge variant="success">Passed</Badge>'
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "KeyValue",
|
|
147
|
+
category: "data-display",
|
|
148
|
+
kind: "composite",
|
|
149
|
+
summary: "A single label/value row with predictable alignment and truncation.",
|
|
150
|
+
useWhen: "For metadata, totals and configuration summaries.",
|
|
151
|
+
related: ["KeyValueList"],
|
|
152
|
+
status: "stable",
|
|
153
|
+
example: '<KeyValue label="Region" value="eu-west-1" mono />'
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: "KeyValueList",
|
|
157
|
+
category: "data-display",
|
|
158
|
+
kind: "composite",
|
|
159
|
+
summary: "A vertical list of KeyValue rows.",
|
|
160
|
+
useWhen: "For a block of metadata pairs.",
|
|
161
|
+
related: ["KeyValue"],
|
|
162
|
+
status: "stable",
|
|
163
|
+
example: "<KeyValueList><KeyValue \u2026 /></KeyValueList>"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: "ItemList",
|
|
167
|
+
category: "data-display",
|
|
168
|
+
kind: "composite",
|
|
169
|
+
summary: "Compact rows with leading media, text, trailing metadata, actions and overflow.",
|
|
170
|
+
useWhen: "For entity lists (files, notes, results).",
|
|
171
|
+
related: ["ItemListItem", "ActivityList"],
|
|
172
|
+
status: "stable",
|
|
173
|
+
example: "<ItemList overflowCount={3}><ItemListItem \u2026 /></ItemList>"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "ItemListItem",
|
|
177
|
+
category: "data-display",
|
|
178
|
+
kind: "composite",
|
|
179
|
+
summary: "A single compact list row with media, primary/secondary text and actions.",
|
|
180
|
+
useWhen: "As the row inside an ItemList.",
|
|
181
|
+
related: ["ItemList"],
|
|
182
|
+
status: "stable",
|
|
183
|
+
example: '<ItemListItem primary="Report.pdf" trailing="2h" />'
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: "ActivityList",
|
|
187
|
+
category: "data-display",
|
|
188
|
+
kind: "composite",
|
|
189
|
+
summary: "A chronological list for recent events with a shared overflow footer.",
|
|
190
|
+
useWhen: "For time-ordered activity or upcoming events.",
|
|
191
|
+
related: ["ActivityListItem", "ItemList"],
|
|
192
|
+
status: "stable",
|
|
193
|
+
example: "<ActivityList><ActivityListItem \u2026 /></ActivityList>"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: "ActivityListItem",
|
|
197
|
+
category: "data-display",
|
|
198
|
+
kind: "composite",
|
|
199
|
+
summary: "An event row with a status marker or icon, label, timestamp and detail.",
|
|
200
|
+
useWhen: "As the row inside an ActivityList.",
|
|
201
|
+
related: ["ActivityList", "Status"],
|
|
202
|
+
status: "stable",
|
|
203
|
+
example: '<ActivityListItem label="Backup" timestamp="08:00" tone="success" />'
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: "ProgressRing",
|
|
207
|
+
category: "data-display",
|
|
208
|
+
kind: "composite",
|
|
209
|
+
summary: "Accessible circular progress / donut gauge, no charting dependency.",
|
|
210
|
+
useWhen: "For a bounded value such as a success rate or usage percentage.",
|
|
211
|
+
related: ["Metric"],
|
|
212
|
+
status: "stable",
|
|
213
|
+
example: '<ProgressRing value={75} label="Success rate" tone="success" />'
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: "StaleIndicator",
|
|
217
|
+
category: "data-display",
|
|
218
|
+
kind: "composite",
|
|
219
|
+
summary: "Compact hint that data may be out of date, with optional refresh action.",
|
|
220
|
+
useWhen: "When displayed data can lag its source.",
|
|
221
|
+
related: ["DataBoundary"],
|
|
222
|
+
status: "stable",
|
|
223
|
+
example: '<StaleIndicator lastUpdated="Updated 5m ago" onRefresh={\u2026} />'
|
|
224
|
+
},
|
|
225
|
+
// ── Runtime states and feedback ───────────────────────────────
|
|
226
|
+
{
|
|
227
|
+
name: "DataBoundary",
|
|
228
|
+
category: "state",
|
|
229
|
+
kind: "composite",
|
|
230
|
+
summary: "Selects presentation for loading / ready / empty / stale / error states.",
|
|
231
|
+
useWhen: "To switch a widget's content by data state without owning fetching.",
|
|
232
|
+
related: ["EmptyState", "MetricSkeleton", "StaleIndicator"],
|
|
233
|
+
status: "stable",
|
|
234
|
+
example: "<DataBoundary state={state} loading={\u2026} empty={\u2026} error={\u2026}>\u2026</DataBoundary>"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: "EmptyState",
|
|
238
|
+
category: "state",
|
|
239
|
+
kind: "composite",
|
|
240
|
+
summary: "Compact empty state built on the Empty primitives.",
|
|
241
|
+
useWhen: "When there is nothing to show yet.",
|
|
242
|
+
related: ["DataBoundary"],
|
|
243
|
+
status: "stable",
|
|
244
|
+
example: '<EmptyState icon={Inbox} title="No activity yet" />'
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
name: "Alert",
|
|
248
|
+
category: "state",
|
|
249
|
+
kind: "primitive",
|
|
250
|
+
summary: "Existing alert primitive for inline warnings and errors.",
|
|
251
|
+
useWhen: "For a persistent inline message inside a widget or view.",
|
|
252
|
+
related: ["DataBoundary"],
|
|
253
|
+
status: "stable",
|
|
254
|
+
example: '<Alert variant="destructive">Failed to load</Alert>'
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: "MetricSkeleton",
|
|
258
|
+
category: "state",
|
|
259
|
+
kind: "composite",
|
|
260
|
+
summary: "Loading placeholder for a row of metrics.",
|
|
261
|
+
useWhen: "As the `loading` fallback for metric layouts.",
|
|
262
|
+
related: ["DataBoundary", "ListSkeleton"],
|
|
263
|
+
status: "stable",
|
|
264
|
+
example: "<MetricSkeleton count={3} />"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: "ListSkeleton",
|
|
268
|
+
category: "state",
|
|
269
|
+
kind: "composite",
|
|
270
|
+
summary: "Loading placeholder for a list of rows.",
|
|
271
|
+
useWhen: "As the `loading` fallback for item lists.",
|
|
272
|
+
related: ["DataBoundary", "ItemList"],
|
|
273
|
+
status: "stable",
|
|
274
|
+
example: "<ListSkeleton count={4} />"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: "ActivitySkeleton",
|
|
278
|
+
category: "state",
|
|
279
|
+
kind: "composite",
|
|
280
|
+
summary: "Loading placeholder for an activity list.",
|
|
281
|
+
useWhen: "As the `loading` fallback for activity feeds.",
|
|
282
|
+
related: ["DataBoundary", "ActivityList"],
|
|
283
|
+
status: "stable",
|
|
284
|
+
example: "<ActivitySkeleton count={4} />"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
name: "Skeleton",
|
|
288
|
+
category: "state",
|
|
289
|
+
kind: "primitive",
|
|
290
|
+
summary: "Existing skeleton primitive for bespoke loading shapes.",
|
|
291
|
+
useWhen: "When the prebuilt skeleton patterns do not fit.",
|
|
292
|
+
related: ["MetricSkeleton", "ListSkeleton", "ActivitySkeleton"],
|
|
293
|
+
status: "stable",
|
|
294
|
+
example: '<Skeleton className="h-4 w-24" />'
|
|
295
|
+
},
|
|
296
|
+
// ── Actions ───────────────────────────────────────────────────
|
|
297
|
+
{
|
|
298
|
+
name: "Button",
|
|
299
|
+
category: "action",
|
|
300
|
+
kind: "primitive",
|
|
301
|
+
summary: "Existing button primitive, the standard text-action control.",
|
|
302
|
+
useWhen: "For a labelled action.",
|
|
303
|
+
related: ["IconButton"],
|
|
304
|
+
status: "stable",
|
|
305
|
+
example: '<Button size="sm">Open</Button>'
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
name: "IconButton",
|
|
309
|
+
category: "action",
|
|
310
|
+
kind: "composite",
|
|
311
|
+
summary: "Small icon-only button with a required accessible label.",
|
|
312
|
+
useWhen: "For a compact action such as refresh or dismiss.",
|
|
313
|
+
related: ["Button", "Icon"],
|
|
314
|
+
status: "stable",
|
|
315
|
+
example: '<IconButton icon={RotateCw} label="Refresh" size="xs" />'
|
|
316
|
+
}
|
|
317
|
+
];
|
|
318
|
+
var catalog_default = dashboardComponentCatalog;
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
exports.dashboardComponentCatalog = dashboardComponentCatalog; exports.default = catalog_default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface DashboardComponentCatalogEntry {
|
|
2
|
+
name: string;
|
|
3
|
+
category: "layout" | "typography" | "data-display" | "state" | "action" | "filter";
|
|
4
|
+
/** `primitive` = existing @sero-ai/ui primitive; `composite` = new dashboard component. */
|
|
5
|
+
kind: "primitive" | "composite";
|
|
6
|
+
summary: string;
|
|
7
|
+
useWhen: string;
|
|
8
|
+
related?: string[];
|
|
9
|
+
status: "stable" | "experimental";
|
|
10
|
+
example?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const dashboardComponentCatalog: DashboardComponentCatalogEntry[];
|
|
13
|
+
|
|
14
|
+
export { type DashboardComponentCatalogEntry, dashboardComponentCatalog, dashboardComponentCatalog as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface DashboardComponentCatalogEntry {
|
|
2
|
+
name: string;
|
|
3
|
+
category: "layout" | "typography" | "data-display" | "state" | "action" | "filter";
|
|
4
|
+
/** `primitive` = existing @sero-ai/ui primitive; `composite` = new dashboard component. */
|
|
5
|
+
kind: "primitive" | "composite";
|
|
6
|
+
summary: string;
|
|
7
|
+
useWhen: string;
|
|
8
|
+
related?: string[];
|
|
9
|
+
status: "stable" | "experimental";
|
|
10
|
+
example?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const dashboardComponentCatalog: DashboardComponentCatalogEntry[];
|
|
13
|
+
|
|
14
|
+
export { type DashboardComponentCatalogEntry, dashboardComponentCatalog, dashboardComponentCatalog as default };
|