@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,40 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
|
+
import { Button } from "../ui/button";
|
|
4
|
+
import { Icon } from "./typography";
|
|
5
|
+
const sizeMap = {
|
|
6
|
+
xs: "icon-xs",
|
|
7
|
+
sm: "icon-sm",
|
|
8
|
+
md: "icon"
|
|
9
|
+
};
|
|
10
|
+
const iconSizeMap = {
|
|
11
|
+
xs: "xs",
|
|
12
|
+
sm: "sm",
|
|
13
|
+
md: "md"
|
|
14
|
+
};
|
|
15
|
+
function IconButton({
|
|
16
|
+
className,
|
|
17
|
+
icon,
|
|
18
|
+
label,
|
|
19
|
+
size = "sm",
|
|
20
|
+
variant = "ghost",
|
|
21
|
+
...props
|
|
22
|
+
}) {
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
Button,
|
|
25
|
+
{
|
|
26
|
+
"data-slot": "icon-button",
|
|
27
|
+
type: "button",
|
|
28
|
+
variant,
|
|
29
|
+
size: sizeMap[size],
|
|
30
|
+
"aria-label": label,
|
|
31
|
+
title: label,
|
|
32
|
+
className: cn("text-[var(--text-muted)]", className),
|
|
33
|
+
...props,
|
|
34
|
+
children: /* @__PURE__ */ jsx(Icon, { icon, size: iconSizeMap[size], className: "text-current" })
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
IconButton
|
|
40
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }var _tone = require('./tone'); _createStarExport(_tone);
|
|
2
|
+
var _spacing = require('./spacing'); _createStarExport(_spacing);
|
|
3
|
+
var _layout = require('./layout'); _createStarExport(_layout);
|
|
4
|
+
var _typography = require('./typography'); _createStarExport(_typography);
|
|
5
|
+
var _metric = require('./metric'); _createStarExport(_metric);
|
|
6
|
+
var _status = require('./status'); _createStarExport(_status);
|
|
7
|
+
var _keyvalue = require('./key-value'); _createStarExport(_keyvalue);
|
|
8
|
+
var _itemlist = require('./item-list'); _createStarExport(_itemlist);
|
|
9
|
+
var _activitylist = require('./activity-list'); _createStarExport(_activitylist);
|
|
10
|
+
var _progressring = require('./progress-ring'); _createStarExport(_progressring);
|
|
11
|
+
var _staleindicator = require('./stale-indicator'); _createStarExport(_staleindicator);
|
|
12
|
+
var _databoundary = require('./data-boundary'); _createStarExport(_databoundary);
|
|
13
|
+
var _emptystate = require('./empty-state'); _createStarExport(_emptystate);
|
|
14
|
+
var _skeletons = require('./skeletons'); _createStarExport(_skeletons);
|
|
15
|
+
var _iconbutton = require('./icon-button'); _createStarExport(_iconbutton);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { Tone, toneColor, toneDot, tonePill } from './tone.cjs';
|
|
2
|
+
export { Gap, gapClass } from './spacing.cjs';
|
|
3
|
+
export { Divider, DividerProps, Grid, GridProps, Inline, InlineProps, Section, SectionProps, Stack, StackProps, WidgetContent, WidgetContentProps } from './layout.cjs';
|
|
4
|
+
export { Heading, HeadingProps, Icon, IconProps, Text, TextProps } from './typography.cjs';
|
|
5
|
+
export { Metric, MetricCard, MetricCardProps, MetricGroup, MetricGroupProps, MetricProps, MetricTrend } from './metric.cjs';
|
|
6
|
+
export { Status, StatusProps } from './status.cjs';
|
|
7
|
+
export { KeyValue, KeyValueList, KeyValueListProps, KeyValueProps } from './key-value.cjs';
|
|
8
|
+
export { ItemList, ItemListItem, ItemListItemProps, ItemListProps } from './item-list.cjs';
|
|
9
|
+
export { ActivityList, ActivityListItem, ActivityListItemProps, ActivityListProps } from './activity-list.cjs';
|
|
10
|
+
export { ProgressRing, ProgressRingProps } from './progress-ring.cjs';
|
|
11
|
+
export { StaleIndicator, StaleIndicatorProps } from './stale-indicator.cjs';
|
|
12
|
+
export { DataBoundary, DataBoundaryProps, DataState } from './data-boundary.cjs';
|
|
13
|
+
export { EmptyState, EmptyStateProps } from './empty-state.cjs';
|
|
14
|
+
export { ActivitySkeleton, ListSkeleton, MetricSkeleton, SkeletonPatternProps } from './skeletons.cjs';
|
|
15
|
+
export { IconButton, IconButtonProps } from './icon-button.cjs';
|
|
16
|
+
import 'react/jsx-runtime';
|
|
17
|
+
import 'class-variance-authority/types';
|
|
18
|
+
import 'react';
|
|
19
|
+
import 'class-variance-authority';
|
|
20
|
+
import '../ui/separator.cjs';
|
|
21
|
+
import 'radix-ui';
|
|
22
|
+
import '../ui/item.cjs';
|
|
23
|
+
import '../ui/empty.cjs';
|
|
24
|
+
import '../ui/button.cjs';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { Tone, toneColor, toneDot, tonePill } from './tone.js';
|
|
2
|
+
export { Gap, gapClass } from './spacing.js';
|
|
3
|
+
export { Divider, DividerProps, Grid, GridProps, Inline, InlineProps, Section, SectionProps, Stack, StackProps, WidgetContent, WidgetContentProps } from './layout.js';
|
|
4
|
+
export { Heading, HeadingProps, Icon, IconProps, Text, TextProps } from './typography.js';
|
|
5
|
+
export { Metric, MetricCard, MetricCardProps, MetricGroup, MetricGroupProps, MetricProps, MetricTrend } from './metric.js';
|
|
6
|
+
export { Status, StatusProps } from './status.js';
|
|
7
|
+
export { KeyValue, KeyValueList, KeyValueListProps, KeyValueProps } from './key-value.js';
|
|
8
|
+
export { ItemList, ItemListItem, ItemListItemProps, ItemListProps } from './item-list.js';
|
|
9
|
+
export { ActivityList, ActivityListItem, ActivityListItemProps, ActivityListProps } from './activity-list.js';
|
|
10
|
+
export { ProgressRing, ProgressRingProps } from './progress-ring.js';
|
|
11
|
+
export { StaleIndicator, StaleIndicatorProps } from './stale-indicator.js';
|
|
12
|
+
export { DataBoundary, DataBoundaryProps, DataState } from './data-boundary.js';
|
|
13
|
+
export { EmptyState, EmptyStateProps } from './empty-state.js';
|
|
14
|
+
export { ActivitySkeleton, ListSkeleton, MetricSkeleton, SkeletonPatternProps } from './skeletons.js';
|
|
15
|
+
export { IconButton, IconButtonProps } from './icon-button.js';
|
|
16
|
+
import 'react/jsx-runtime';
|
|
17
|
+
import 'class-variance-authority/types';
|
|
18
|
+
import 'react';
|
|
19
|
+
import 'class-variance-authority';
|
|
20
|
+
import '../ui/separator.js';
|
|
21
|
+
import 'radix-ui';
|
|
22
|
+
import '../ui/item.js';
|
|
23
|
+
import '../ui/empty.js';
|
|
24
|
+
import '../ui/button.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./tone";
|
|
2
|
+
export * from "./spacing";
|
|
3
|
+
export * from "./layout";
|
|
4
|
+
export * from "./typography";
|
|
5
|
+
export * from "./metric";
|
|
6
|
+
export * from "./status";
|
|
7
|
+
export * from "./key-value";
|
|
8
|
+
export * from "./item-list";
|
|
9
|
+
export * from "./activity-list";
|
|
10
|
+
export * from "./progress-ring";
|
|
11
|
+
export * from "./stale-indicator";
|
|
12
|
+
export * from "./data-boundary";
|
|
13
|
+
export * from "./empty-state";
|
|
14
|
+
export * from "./skeletons";
|
|
15
|
+
export * from "./icon-button";
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');
|
|
2
|
+
var _utils = require('../../lib/utils');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _item = require('../ui/item');
|
|
11
|
+
function ItemListItem({
|
|
12
|
+
className,
|
|
13
|
+
leading,
|
|
14
|
+
primary,
|
|
15
|
+
secondary,
|
|
16
|
+
trailing,
|
|
17
|
+
actions,
|
|
18
|
+
variant = "default",
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
22
|
+
_item.Item,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "item-list-item",
|
|
25
|
+
variant,
|
|
26
|
+
size: "sm",
|
|
27
|
+
className: _utils.cn.call(void 0,
|
|
28
|
+
"gap-2 rounded-md bg-[var(--surface-flat)] p-2 transition-colors hover:bg-[var(--glass-hover)]",
|
|
29
|
+
className
|
|
30
|
+
),
|
|
31
|
+
...props,
|
|
32
|
+
children: [
|
|
33
|
+
leading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _item.ItemMedia, { className: "self-center", children: leading }),
|
|
34
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _item.ItemContent, { className: "gap-0.5", children: [
|
|
35
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _item.ItemTitle, { className: "truncate text-xs font-medium text-[var(--text-primary)]", children: primary }),
|
|
36
|
+
secondary && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _item.ItemDescription, { className: "line-clamp-1 text-xs text-[var(--text-muted)]", children: secondary })
|
|
37
|
+
] }),
|
|
38
|
+
trailing && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "shrink-0 text-[11px] tabular-nums text-[var(--text-muted)]", children: trailing }),
|
|
39
|
+
actions && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _item.ItemActions, { children: actions })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
function ItemList({
|
|
45
|
+
className,
|
|
46
|
+
overflowCount = 0,
|
|
47
|
+
children,
|
|
48
|
+
...props
|
|
49
|
+
}) {
|
|
50
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
"data-slot": "item-list",
|
|
54
|
+
role: "list",
|
|
55
|
+
className: _utils.cn.call(void 0, "flex min-w-0 flex-col gap-1", className),
|
|
56
|
+
...props,
|
|
57
|
+
children: [
|
|
58
|
+
children,
|
|
59
|
+
overflowCount > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "px-2 text-[11px] text-[var(--text-muted)]", children: [
|
|
60
|
+
"+",
|
|
61
|
+
overflowCount,
|
|
62
|
+
" more"
|
|
63
|
+
] })
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
exports.ItemList = ItemList; exports.ItemListItem = ItemListItem;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Item } from '../ui/item.cjs';
|
|
4
|
+
import 'class-variance-authority/types';
|
|
5
|
+
import 'class-variance-authority';
|
|
6
|
+
import '../ui/separator.cjs';
|
|
7
|
+
import 'radix-ui';
|
|
8
|
+
|
|
9
|
+
interface ItemListItemProps extends Omit<React.ComponentProps<typeof Item>, "children"> {
|
|
10
|
+
/** Leading media — an icon, avatar or status marker. */
|
|
11
|
+
leading?: React.ReactNode;
|
|
12
|
+
primary: React.ReactNode;
|
|
13
|
+
secondary?: React.ReactNode;
|
|
14
|
+
/** Trailing metadata (e.g. a timestamp or count). */
|
|
15
|
+
trailing?: React.ReactNode;
|
|
16
|
+
/** Trailing interactive actions (e.g. an IconButton). */
|
|
17
|
+
actions?: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
/** A single compact list row with optional media, text, metadata and actions. */
|
|
20
|
+
declare function ItemListItem({ className, leading, primary, secondary, trailing, actions, variant, ...props }: ItemListItemProps): react_jsx_runtime.JSX.Element;
|
|
21
|
+
interface ItemListProps extends React.ComponentProps<"div"> {
|
|
22
|
+
/** Count of items not shown; renders a "+N more" footer when > 0. */
|
|
23
|
+
overflowCount?: number;
|
|
24
|
+
}
|
|
25
|
+
/** A vertical stack of ItemListItem rows with a shared overflow footer. */
|
|
26
|
+
declare function ItemList({ className, overflowCount, children, ...props }: ItemListProps): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { ItemList, ItemListItem, type ItemListItemProps, type ItemListProps };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Item } from '../ui/item.js';
|
|
4
|
+
import 'class-variance-authority/types';
|
|
5
|
+
import 'class-variance-authority';
|
|
6
|
+
import '../ui/separator.js';
|
|
7
|
+
import 'radix-ui';
|
|
8
|
+
|
|
9
|
+
interface ItemListItemProps extends Omit<React.ComponentProps<typeof Item>, "children"> {
|
|
10
|
+
/** Leading media — an icon, avatar or status marker. */
|
|
11
|
+
leading?: React.ReactNode;
|
|
12
|
+
primary: React.ReactNode;
|
|
13
|
+
secondary?: React.ReactNode;
|
|
14
|
+
/** Trailing metadata (e.g. a timestamp or count). */
|
|
15
|
+
trailing?: React.ReactNode;
|
|
16
|
+
/** Trailing interactive actions (e.g. an IconButton). */
|
|
17
|
+
actions?: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
/** A single compact list row with optional media, text, metadata and actions. */
|
|
20
|
+
declare function ItemListItem({ className, leading, primary, secondary, trailing, actions, variant, ...props }: ItemListItemProps): react_jsx_runtime.JSX.Element;
|
|
21
|
+
interface ItemListProps extends React.ComponentProps<"div"> {
|
|
22
|
+
/** Count of items not shown; renders a "+N more" footer when > 0. */
|
|
23
|
+
overflowCount?: number;
|
|
24
|
+
}
|
|
25
|
+
/** A vertical stack of ItemListItem rows with a shared overflow footer. */
|
|
26
|
+
declare function ItemList({ className, overflowCount, children, ...props }: ItemListProps): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { ItemList, ItemListItem, type ItemListItemProps, type ItemListProps };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
|
+
import {
|
|
4
|
+
Item,
|
|
5
|
+
ItemActions,
|
|
6
|
+
ItemContent,
|
|
7
|
+
ItemDescription,
|
|
8
|
+
ItemMedia,
|
|
9
|
+
ItemTitle
|
|
10
|
+
} from "../ui/item";
|
|
11
|
+
function ItemListItem({
|
|
12
|
+
className,
|
|
13
|
+
leading,
|
|
14
|
+
primary,
|
|
15
|
+
secondary,
|
|
16
|
+
trailing,
|
|
17
|
+
actions,
|
|
18
|
+
variant = "default",
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ jsxs(
|
|
22
|
+
Item,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "item-list-item",
|
|
25
|
+
variant,
|
|
26
|
+
size: "sm",
|
|
27
|
+
className: cn(
|
|
28
|
+
"gap-2 rounded-md bg-[var(--surface-flat)] p-2 transition-colors hover:bg-[var(--glass-hover)]",
|
|
29
|
+
className
|
|
30
|
+
),
|
|
31
|
+
...props,
|
|
32
|
+
children: [
|
|
33
|
+
leading && /* @__PURE__ */ jsx(ItemMedia, { className: "self-center", children: leading }),
|
|
34
|
+
/* @__PURE__ */ jsxs(ItemContent, { className: "gap-0.5", children: [
|
|
35
|
+
/* @__PURE__ */ jsx(ItemTitle, { className: "truncate text-xs font-medium text-[var(--text-primary)]", children: primary }),
|
|
36
|
+
secondary && /* @__PURE__ */ jsx(ItemDescription, { className: "line-clamp-1 text-xs text-[var(--text-muted)]", children: secondary })
|
|
37
|
+
] }),
|
|
38
|
+
trailing && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[11px] tabular-nums text-[var(--text-muted)]", children: trailing }),
|
|
39
|
+
actions && /* @__PURE__ */ jsx(ItemActions, { children: actions })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
function ItemList({
|
|
45
|
+
className,
|
|
46
|
+
overflowCount = 0,
|
|
47
|
+
children,
|
|
48
|
+
...props
|
|
49
|
+
}) {
|
|
50
|
+
return /* @__PURE__ */ jsxs(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
"data-slot": "item-list",
|
|
54
|
+
role: "list",
|
|
55
|
+
className: cn("flex min-w-0 flex-col gap-1", className),
|
|
56
|
+
...props,
|
|
57
|
+
children: [
|
|
58
|
+
children,
|
|
59
|
+
overflowCount > 0 && /* @__PURE__ */ jsxs("span", { className: "px-2 text-[11px] text-[var(--text-muted)]", children: [
|
|
60
|
+
"+",
|
|
61
|
+
overflowCount,
|
|
62
|
+
" more"
|
|
63
|
+
] })
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
ItemList,
|
|
70
|
+
ItemListItem
|
|
71
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');
|
|
2
|
+
var _utils = require('../../lib/utils');
|
|
3
|
+
function KeyValue({ className, label, value, mono, ...props }) {
|
|
4
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
"data-slot": "key-value",
|
|
8
|
+
className: _utils.cn.call(void 0, "flex items-baseline justify-between gap-3", className),
|
|
9
|
+
...props,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "dt", { className: "shrink-0 truncate text-xs text-[var(--text-muted)]", children: label }),
|
|
12
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13
|
+
"dd",
|
|
14
|
+
{
|
|
15
|
+
className: _utils.cn.call(void 0,
|
|
16
|
+
"min-w-0 truncate text-right text-xs text-[var(--text-primary)]",
|
|
17
|
+
mono && "font-mono tabular-nums"
|
|
18
|
+
),
|
|
19
|
+
children: value
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
function KeyValueList({ className, ...props }) {
|
|
27
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
28
|
+
"dl",
|
|
29
|
+
{
|
|
30
|
+
"data-slot": "key-value-list",
|
|
31
|
+
className: _utils.cn.call(void 0, "flex flex-col gap-1.5", className),
|
|
32
|
+
...props
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
exports.KeyValue = KeyValue; exports.KeyValueList = KeyValueList;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
interface KeyValueProps extends React.ComponentProps<"div"> {
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
value: React.ReactNode;
|
|
7
|
+
/** Use mono + tabular numerals for the value (ids, counts, sizes). */
|
|
8
|
+
mono?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** A single label/value row rendered as a `dt`/`dd` pair. */
|
|
11
|
+
declare function KeyValue({ className, label, value, mono, ...props }: KeyValueProps): react_jsx_runtime.JSX.Element;
|
|
12
|
+
interface KeyValueListProps extends React.ComponentProps<"dl"> {
|
|
13
|
+
}
|
|
14
|
+
/** A vertical list of KeyValue rows. */
|
|
15
|
+
declare function KeyValueList({ className, ...props }: KeyValueListProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { KeyValue, KeyValueList, type KeyValueListProps, type KeyValueProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
interface KeyValueProps extends React.ComponentProps<"div"> {
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
value: React.ReactNode;
|
|
7
|
+
/** Use mono + tabular numerals for the value (ids, counts, sizes). */
|
|
8
|
+
mono?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** A single label/value row rendered as a `dt`/`dd` pair. */
|
|
11
|
+
declare function KeyValue({ className, label, value, mono, ...props }: KeyValueProps): react_jsx_runtime.JSX.Element;
|
|
12
|
+
interface KeyValueListProps extends React.ComponentProps<"dl"> {
|
|
13
|
+
}
|
|
14
|
+
/** A vertical list of KeyValue rows. */
|
|
15
|
+
declare function KeyValueList({ className, ...props }: KeyValueListProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { KeyValue, KeyValueList, type KeyValueListProps, type KeyValueProps };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
|
+
function KeyValue({ className, label, value, mono, ...props }) {
|
|
4
|
+
return /* @__PURE__ */ jsxs(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
"data-slot": "key-value",
|
|
8
|
+
className: cn("flex items-baseline justify-between gap-3", className),
|
|
9
|
+
...props,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ jsx("dt", { className: "shrink-0 truncate text-xs text-[var(--text-muted)]", children: label }),
|
|
12
|
+
/* @__PURE__ */ jsx(
|
|
13
|
+
"dd",
|
|
14
|
+
{
|
|
15
|
+
className: cn(
|
|
16
|
+
"min-w-0 truncate text-right text-xs text-[var(--text-primary)]",
|
|
17
|
+
mono && "font-mono tabular-nums"
|
|
18
|
+
),
|
|
19
|
+
children: value
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
function KeyValueList({ className, ...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsx(
|
|
28
|
+
"dl",
|
|
29
|
+
{
|
|
30
|
+
"data-slot": "key-value-list",
|
|
31
|
+
className: cn("flex flex-col gap-1.5", className),
|
|
32
|
+
...props
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
KeyValue,
|
|
38
|
+
KeyValueList
|
|
39
|
+
};
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');
|
|
2
|
+
var _classvarianceauthority = require('class-variance-authority');
|
|
3
|
+
var _utils = require('../../lib/utils');
|
|
4
|
+
var _separator = require('../ui/separator');
|
|
5
|
+
var _spacing = require('./spacing');
|
|
6
|
+
const widgetContentVariants = _classvarianceauthority.cva.call(void 0,
|
|
7
|
+
// Full-height frame with a container-query boundary so child components can
|
|
8
|
+
// respond to the widget's own size rather than the viewport.
|
|
9
|
+
"@container/widget flex h-full min-h-0 flex-col",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
padding: {
|
|
13
|
+
none: "p-0",
|
|
14
|
+
sm: "p-2",
|
|
15
|
+
md: "p-3",
|
|
16
|
+
lg: "p-4"
|
|
17
|
+
},
|
|
18
|
+
scroll: {
|
|
19
|
+
true: "overflow-auto",
|
|
20
|
+
false: "overflow-hidden"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: { padding: "md", scroll: false }
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
function WidgetContent({
|
|
27
|
+
className,
|
|
28
|
+
padding,
|
|
29
|
+
scroll,
|
|
30
|
+
glass = true,
|
|
31
|
+
...props
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
"data-slot": "widget-content",
|
|
37
|
+
className: _utils.cn.call(void 0, widgetContentVariants({ padding, scroll }), glass && "glass", className),
|
|
38
|
+
...props
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
const alignClass = {
|
|
43
|
+
start: "items-start",
|
|
44
|
+
center: "items-center",
|
|
45
|
+
end: "items-end",
|
|
46
|
+
stretch: "items-stretch"
|
|
47
|
+
};
|
|
48
|
+
const justifyClass = {
|
|
49
|
+
start: "justify-start",
|
|
50
|
+
center: "justify-center",
|
|
51
|
+
end: "justify-end",
|
|
52
|
+
between: "justify-between",
|
|
53
|
+
around: "justify-around"
|
|
54
|
+
};
|
|
55
|
+
function Stack({
|
|
56
|
+
className,
|
|
57
|
+
gap = "sm",
|
|
58
|
+
align,
|
|
59
|
+
justify,
|
|
60
|
+
fill = false,
|
|
61
|
+
scroll = false,
|
|
62
|
+
...props
|
|
63
|
+
}) {
|
|
64
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
"data-slot": "stack",
|
|
68
|
+
className: _utils.cn.call(void 0,
|
|
69
|
+
"flex flex-col",
|
|
70
|
+
_spacing.gapClass[gap],
|
|
71
|
+
align && alignClass[align],
|
|
72
|
+
justify && justifyClass[justify],
|
|
73
|
+
(fill || scroll) && "min-h-0 flex-1",
|
|
74
|
+
scroll && "overflow-auto",
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
...props
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
function Inline({
|
|
82
|
+
className,
|
|
83
|
+
gap = "sm",
|
|
84
|
+
align = "center",
|
|
85
|
+
justify,
|
|
86
|
+
wrap = false,
|
|
87
|
+
...props
|
|
88
|
+
}) {
|
|
89
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
"data-slot": "inline",
|
|
93
|
+
className: _utils.cn.call(void 0,
|
|
94
|
+
"flex flex-row",
|
|
95
|
+
_spacing.gapClass[gap],
|
|
96
|
+
alignClass[align],
|
|
97
|
+
justify && justifyClass[justify],
|
|
98
|
+
wrap ? "flex-wrap" : "min-w-0",
|
|
99
|
+
className
|
|
100
|
+
),
|
|
101
|
+
...props
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
const columnsClass = {
|
|
106
|
+
1: "grid-cols-1",
|
|
107
|
+
2: "grid-cols-2",
|
|
108
|
+
3: "grid-cols-3",
|
|
109
|
+
4: "grid-cols-4"
|
|
110
|
+
};
|
|
111
|
+
function Grid({
|
|
112
|
+
className,
|
|
113
|
+
columns = "auto",
|
|
114
|
+
gap = "sm",
|
|
115
|
+
minColumnWidth = 120,
|
|
116
|
+
style,
|
|
117
|
+
...props
|
|
118
|
+
}) {
|
|
119
|
+
const auto = columns === "auto";
|
|
120
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
"data-slot": "grid",
|
|
124
|
+
className: _utils.cn.call(void 0,
|
|
125
|
+
"grid",
|
|
126
|
+
_spacing.gapClass[gap],
|
|
127
|
+
!auto && columnsClass[columns],
|
|
128
|
+
className
|
|
129
|
+
),
|
|
130
|
+
style: auto ? {
|
|
131
|
+
gridTemplateColumns: `repeat(auto-fill, minmax(${minColumnWidth}px, 1fr))`,
|
|
132
|
+
...style
|
|
133
|
+
} : style,
|
|
134
|
+
...props
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
function Section({
|
|
139
|
+
className,
|
|
140
|
+
heading,
|
|
141
|
+
description,
|
|
142
|
+
action,
|
|
143
|
+
gap = "sm",
|
|
144
|
+
children,
|
|
145
|
+
...props
|
|
146
|
+
}) {
|
|
147
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
148
|
+
"section",
|
|
149
|
+
{
|
|
150
|
+
"data-slot": "section",
|
|
151
|
+
className: _utils.cn.call(void 0, "flex flex-col", _spacing.gapClass[gap], className),
|
|
152
|
+
...props,
|
|
153
|
+
children: [
|
|
154
|
+
(heading || action) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-2", children: [
|
|
155
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
156
|
+
heading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "truncate text-[11px] font-semibold uppercase tracking-wider text-[var(--text-muted)]", children: heading }),
|
|
157
|
+
description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "truncate text-xs text-[var(--text-muted)]", children: description })
|
|
158
|
+
] }),
|
|
159
|
+
action && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "shrink-0", children: action })
|
|
160
|
+
] }),
|
|
161
|
+
children
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
const dividerSpacing = { none: "my-0", sm: "my-1", md: "my-2" };
|
|
167
|
+
function Divider({
|
|
168
|
+
className,
|
|
169
|
+
orientation = "horizontal",
|
|
170
|
+
spacing = "sm",
|
|
171
|
+
...props
|
|
172
|
+
}) {
|
|
173
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
174
|
+
_separator.Separator,
|
|
175
|
+
{
|
|
176
|
+
"data-slot": "divider",
|
|
177
|
+
orientation,
|
|
178
|
+
className: _utils.cn.call(void 0,
|
|
179
|
+
orientation === "horizontal" ? dividerSpacing[spacing] : "mx-1",
|
|
180
|
+
className
|
|
181
|
+
),
|
|
182
|
+
...props
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
exports.Divider = Divider; exports.Grid = Grid; exports.Inline = Inline; exports.Section = Section; exports.Stack = Stack; exports.WidgetContent = WidgetContent;
|