@sero-ai/ui 0.3.2 → 0.4.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 (169) hide show
  1. package/.turbo/turbo-build.log +615 -0
  2. package/.turbo/turbo-typecheck.log +1 -1
  3. package/CHANGELOG.md +58 -0
  4. package/dist/components/context-editor/CapabilitySection.cjs +57 -0
  5. package/dist/components/context-editor/CapabilitySection.d.cts +20 -0
  6. package/dist/components/context-editor/CapabilitySection.d.ts +20 -0
  7. package/dist/components/context-editor/CapabilitySection.js +57 -0
  8. package/dist/components/context-editor/ContextEditor.cjs +108 -0
  9. package/dist/components/context-editor/ContextEditor.d.cts +26 -0
  10. package/dist/components/context-editor/ContextEditor.d.ts +26 -0
  11. package/dist/components/context-editor/ContextEditor.js +108 -0
  12. package/dist/components/context-editor/PresetBar.cjs +71 -0
  13. package/dist/components/context-editor/PresetBar.d.cts +19 -0
  14. package/dist/components/context-editor/PresetBar.d.ts +19 -0
  15. package/dist/components/context-editor/PresetBar.js +71 -0
  16. package/dist/components/context-editor/SkillsSection.cjs +31 -0
  17. package/dist/components/context-editor/SkillsSection.d.cts +14 -0
  18. package/dist/components/context-editor/SkillsSection.d.ts +14 -0
  19. package/dist/components/context-editor/SkillsSection.js +31 -0
  20. package/dist/components/context-editor/SystemPromptSection.cjs +58 -0
  21. package/dist/components/context-editor/SystemPromptSection.d.cts +25 -0
  22. package/dist/components/context-editor/SystemPromptSection.d.ts +25 -0
  23. package/dist/components/context-editor/SystemPromptSection.js +58 -0
  24. package/dist/components/context-editor/ToolsSection.cjs +31 -0
  25. package/dist/components/context-editor/ToolsSection.d.cts +14 -0
  26. package/dist/components/context-editor/ToolsSection.d.ts +14 -0
  27. package/dist/components/context-editor/ToolsSection.js +31 -0
  28. package/dist/components/context-editor/index.cjs +8 -0
  29. package/dist/components/context-editor/index.d.cts +5 -0
  30. package/dist/components/context-editor/index.d.ts +5 -0
  31. package/dist/components/context-editor/index.js +8 -0
  32. package/dist/components/context-editor/parts.cjs +184 -0
  33. package/dist/components/context-editor/parts.d.cts +32 -0
  34. package/dist/components/context-editor/parts.d.ts +32 -0
  35. package/dist/components/context-editor/parts.js +184 -0
  36. package/dist/components/context-editor/use-context-editor-model.cjs +194 -0
  37. package/dist/components/context-editor/use-context-editor-model.d.cts +57 -0
  38. package/dist/components/context-editor/use-context-editor-model.d.ts +57 -0
  39. package/dist/components/context-editor/use-context-editor-model.js +194 -0
  40. package/dist/components/dashboard/activity-list.cjs +59 -0
  41. package/dist/components/dashboard/activity-list.d.cts +27 -0
  42. package/dist/components/dashboard/activity-list.d.ts +27 -0
  43. package/dist/components/dashboard/activity-list.js +59 -0
  44. package/dist/components/dashboard/catalog.cjs +1 -0
  45. package/dist/components/dashboard/catalog.d.cts +13 -0
  46. package/dist/components/dashboard/catalog.d.ts +13 -0
  47. package/dist/components/dashboard/catalog.js +0 -0
  48. package/dist/components/dashboard/catalog.json +312 -0
  49. package/dist/components/dashboard/data-boundary.cjs +29 -0
  50. package/dist/components/dashboard/data-boundary.d.cts +21 -0
  51. package/dist/components/dashboard/data-boundary.d.ts +21 -0
  52. package/dist/components/dashboard/data-boundary.js +29 -0
  53. package/dist/components/dashboard/empty-state.cjs +49 -0
  54. package/dist/components/dashboard/empty-state.d.cts +20 -0
  55. package/dist/components/dashboard/empty-state.d.ts +20 -0
  56. package/dist/components/dashboard/empty-state.js +49 -0
  57. package/dist/components/dashboard/icon-button.cjs +40 -0
  58. package/dist/components/dashboard/icon-button.d.cts +24 -0
  59. package/dist/components/dashboard/icon-button.d.ts +24 -0
  60. package/dist/components/dashboard/icon-button.js +40 -0
  61. package/dist/components/dashboard/index.cjs +15 -0
  62. package/dist/components/dashboard/index.d.cts +24 -0
  63. package/dist/components/dashboard/index.d.ts +24 -0
  64. package/dist/components/dashboard/index.js +15 -0
  65. package/dist/components/dashboard/item-list.cjs +71 -0
  66. package/dist/components/dashboard/item-list.d.cts +28 -0
  67. package/dist/components/dashboard/item-list.d.ts +28 -0
  68. package/dist/components/dashboard/item-list.js +71 -0
  69. package/dist/components/dashboard/key-value.cjs +39 -0
  70. package/dist/components/dashboard/key-value.d.cts +17 -0
  71. package/dist/components/dashboard/key-value.d.ts +17 -0
  72. package/dist/components/dashboard/key-value.js +39 -0
  73. package/dist/components/dashboard/layout.cjs +193 -0
  74. package/dist/components/dashboard/layout.d.cts +91 -0
  75. package/dist/components/dashboard/layout.d.ts +91 -0
  76. package/dist/components/dashboard/layout.js +193 -0
  77. package/dist/components/dashboard/metric.cjs +98 -0
  78. package/dist/components/dashboard/metric.d.cts +44 -0
  79. package/dist/components/dashboard/metric.d.ts +44 -0
  80. package/dist/components/dashboard/metric.js +98 -0
  81. package/dist/components/dashboard/progress-ring.cjs +77 -0
  82. package/dist/components/dashboard/progress-ring.d.cts +25 -0
  83. package/dist/components/dashboard/progress-ring.d.ts +25 -0
  84. package/dist/components/dashboard/progress-ring.js +77 -0
  85. package/dist/components/dashboard/skeletons.cjs +54 -0
  86. package/dist/components/dashboard/skeletons.d.cts +15 -0
  87. package/dist/components/dashboard/skeletons.d.ts +15 -0
  88. package/dist/components/dashboard/skeletons.js +54 -0
  89. package/dist/components/dashboard/spacing.cjs +10 -0
  90. package/dist/components/dashboard/spacing.d.cts +4 -0
  91. package/dist/components/dashboard/spacing.d.ts +4 -0
  92. package/dist/components/dashboard/spacing.js +10 -0
  93. package/dist/components/dashboard/stale-indicator.cjs +42 -0
  94. package/dist/components/dashboard/stale-indicator.d.cts +15 -0
  95. package/dist/components/dashboard/stale-indicator.d.ts +15 -0
  96. package/dist/components/dashboard/stale-indicator.js +42 -0
  97. package/dist/components/dashboard/status.cjs +66 -0
  98. package/dist/components/dashboard/status.d.cts +15 -0
  99. package/dist/components/dashboard/status.d.ts +15 -0
  100. package/dist/components/dashboard/status.js +66 -0
  101. package/dist/components/dashboard/tone.cjs +34 -0
  102. package/dist/components/dashboard/tone.d.cts +15 -0
  103. package/dist/components/dashboard/tone.d.ts +15 -0
  104. package/dist/components/dashboard/tone.js +34 -0
  105. package/dist/components/dashboard/typography.cjs +99 -0
  106. package/dist/components/dashboard/typography.d.cts +57 -0
  107. package/dist/components/dashboard/typography.d.ts +57 -0
  108. package/dist/components/dashboard/typography.js +99 -0
  109. package/dist/components/ui/badge.cjs +5 -1
  110. package/dist/components/ui/badge.d.cts +1 -1
  111. package/dist/components/ui/badge.d.ts +1 -1
  112. package/dist/components/ui/badge.js +5 -1
  113. package/dist/index.cjs +1 -0
  114. package/dist/index.d.cts +16 -0
  115. package/dist/index.d.ts +16 -0
  116. package/dist/index.js +1 -0
  117. package/dist/reference.cjs +1260 -0
  118. package/dist/reference.d.cts +11 -0
  119. package/dist/reference.d.ts +11 -0
  120. package/dist/reference.js +1230 -0
  121. package/dist/styles/glass-board.css +43 -0
  122. package/dist/styles/globals.css +59 -0
  123. package/package.json +16 -4
  124. package/scripts/ensure-pnpm-publish.mjs +23 -0
  125. package/scripts/smoke-dist.mjs +68 -0
  126. package/src/components/context-editor/CapabilitySection.tsx +85 -0
  127. package/src/components/context-editor/ContextEditor.tsx +138 -0
  128. package/src/components/context-editor/PresetBar.tsx +94 -0
  129. package/src/components/context-editor/SkillsSection.tsx +37 -0
  130. package/src/components/context-editor/SystemPromptSection.tsx +88 -0
  131. package/src/components/context-editor/ToolsSection.tsx +37 -0
  132. package/src/components/context-editor/index.ts +7 -0
  133. package/src/components/context-editor/parts.tsx +217 -0
  134. package/src/components/context-editor/use-context-editor-model.ts +296 -0
  135. package/src/components/dashboard/__tests__/catalog.test.ts +62 -0
  136. package/src/components/dashboard/__tests__/glass.test.tsx +42 -0
  137. package/src/components/dashboard/__tests__/state.test.tsx +127 -0
  138. package/src/components/dashboard/__tests__/variants.test.tsx +95 -0
  139. package/src/components/dashboard/activity-list.tsx +99 -0
  140. package/src/components/dashboard/catalog.json +312 -0
  141. package/src/components/dashboard/catalog.ts +29 -0
  142. package/src/components/dashboard/data-boundary.tsx +54 -0
  143. package/src/components/dashboard/empty-state.tsx +70 -0
  144. package/src/components/dashboard/icon-button.tsx +58 -0
  145. package/src/components/dashboard/index.ts +21 -0
  146. package/src/components/dashboard/item-list.tsx +106 -0
  147. package/src/components/dashboard/key-value.tsx +54 -0
  148. package/src/components/dashboard/layout.tsx +286 -0
  149. package/src/components/dashboard/metric.tsx +139 -0
  150. package/src/components/dashboard/progress-ring.tsx +100 -0
  151. package/src/components/dashboard/skeletons.tsx +73 -0
  152. package/src/components/dashboard/spacing.ts +14 -0
  153. package/src/components/dashboard/stale-indicator.tsx +55 -0
  154. package/src/components/dashboard/status.tsx +88 -0
  155. package/src/components/dashboard/tone.ts +48 -0
  156. package/src/components/dashboard/typography.tsx +151 -0
  157. package/src/components/reference/ActivityExample.tsx +68 -0
  158. package/src/components/reference/ResourceExample.tsx +78 -0
  159. package/src/components/reference/SchedulerExample.tsx +88 -0
  160. package/src/components/reference/StarterExample.tsx +48 -0
  161. package/src/components/reference/index.ts +10 -0
  162. package/src/components/ui/badge.tsx +6 -0
  163. package/src/index.ts +7 -0
  164. package/src/reference.ts +15 -0
  165. package/src/styles/glass-board.css +43 -0
  166. package/src/styles/globals.css +59 -0
  167. package/tsup.config.ts +18 -4
  168. package/tsup.reference.config.ts +15 -0
  169. package/vitest.config.ts +8 -0
@@ -0,0 +1,34 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});const toneColor = {
2
+ neutral: "text-[var(--text-muted)]",
3
+ success: "text-[var(--status-success)]",
4
+ warning: "text-[var(--status-warning)]",
5
+ error: "text-[var(--status-error)]",
6
+ info: "text-[var(--status-info)]"
7
+ };
8
+ const toneDot = {
9
+ neutral: "bg-[var(--text-muted)]",
10
+ success: "bg-[var(--status-success)]",
11
+ warning: "bg-[var(--status-warning)]",
12
+ error: "bg-[var(--status-error)]",
13
+ info: "bg-[var(--status-info)]"
14
+ };
15
+ const toneLabel = {
16
+ neutral: "Neutral",
17
+ success: "Success",
18
+ warning: "Warning",
19
+ error: "Error",
20
+ info: "Info"
21
+ };
22
+ const tonePill = {
23
+ neutral: "bg-[var(--surface-flat)] text-[var(--text-secondary)]",
24
+ success: "bg-[var(--status-success-muted)] text-[var(--status-success)]",
25
+ warning: "bg-[var(--status-warning-muted)] text-[var(--status-warning)]",
26
+ error: "bg-[var(--status-error-muted)] text-[var(--status-error)]",
27
+ info: "bg-[var(--status-info-muted)] text-[var(--status-info)]"
28
+ };
29
+
30
+
31
+
32
+
33
+
34
+ exports.toneColor = toneColor; exports.toneDot = toneDot; exports.toneLabel = toneLabel; exports.tonePill = tonePill;
@@ -0,0 +1,15 @@
1
+ type Tone = "neutral" | "success" | "warning" | "error" | "info";
2
+ /** Solid foreground colour for a tone (dots, icons, emphasised text). */
3
+ declare const toneColor: Record<Tone, string>;
4
+ /** Solid background colour for a tone (status dots). */
5
+ declare const toneDot: Record<Tone, string>;
6
+ /**
7
+ * Default accessible name for a tone, used as the text alternative when a
8
+ * status indicator carries no visible label. Generic by design — callers with
9
+ * a domain-specific meaning should pass their own `aria-label`.
10
+ */
11
+ declare const toneLabel: Record<Tone, string>;
12
+ /** Muted tinted background + matching text for a tone (pills, chips). */
13
+ declare const tonePill: Record<Tone, string>;
14
+
15
+ export { type Tone, toneColor, toneDot, toneLabel, tonePill };
@@ -0,0 +1,15 @@
1
+ type Tone = "neutral" | "success" | "warning" | "error" | "info";
2
+ /** Solid foreground colour for a tone (dots, icons, emphasised text). */
3
+ declare const toneColor: Record<Tone, string>;
4
+ /** Solid background colour for a tone (status dots). */
5
+ declare const toneDot: Record<Tone, string>;
6
+ /**
7
+ * Default accessible name for a tone, used as the text alternative when a
8
+ * status indicator carries no visible label. Generic by design — callers with
9
+ * a domain-specific meaning should pass their own `aria-label`.
10
+ */
11
+ declare const toneLabel: Record<Tone, string>;
12
+ /** Muted tinted background + matching text for a tone (pills, chips). */
13
+ declare const tonePill: Record<Tone, string>;
14
+
15
+ export { type Tone, toneColor, toneDot, toneLabel, tonePill };
@@ -0,0 +1,34 @@
1
+ const toneColor = {
2
+ neutral: "text-[var(--text-muted)]",
3
+ success: "text-[var(--status-success)]",
4
+ warning: "text-[var(--status-warning)]",
5
+ error: "text-[var(--status-error)]",
6
+ info: "text-[var(--status-info)]"
7
+ };
8
+ const toneDot = {
9
+ neutral: "bg-[var(--text-muted)]",
10
+ success: "bg-[var(--status-success)]",
11
+ warning: "bg-[var(--status-warning)]",
12
+ error: "bg-[var(--status-error)]",
13
+ info: "bg-[var(--status-info)]"
14
+ };
15
+ const toneLabel = {
16
+ neutral: "Neutral",
17
+ success: "Success",
18
+ warning: "Warning",
19
+ error: "Error",
20
+ info: "Info"
21
+ };
22
+ const tonePill = {
23
+ neutral: "bg-[var(--surface-flat)] text-[var(--text-secondary)]",
24
+ success: "bg-[var(--status-success-muted)] text-[var(--status-success)]",
25
+ warning: "bg-[var(--status-warning-muted)] text-[var(--status-warning)]",
26
+ error: "bg-[var(--status-error-muted)] text-[var(--status-error)]",
27
+ info: "bg-[var(--status-info-muted)] text-[var(--status-info)]"
28
+ };
29
+ export {
30
+ toneColor,
31
+ toneDot,
32
+ toneLabel,
33
+ tonePill
34
+ };
@@ -0,0 +1,99 @@
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 _tone = require('./tone');
5
+ const textVariants = _classvarianceauthority.cva.call(void 0, "min-w-0", {
6
+ variants: {
7
+ variant: {
8
+ body: "text-sm text-[var(--text-primary)]",
9
+ label: "text-[11px] font-semibold uppercase tracking-wider text-[var(--text-muted)]",
10
+ supporting: "text-xs text-[var(--text-secondary)]",
11
+ muted: "text-xs text-[var(--text-muted)]",
12
+ numeric: "text-sm font-semibold tabular-nums text-[var(--text-primary)]"
13
+ }
14
+ },
15
+ defaultVariants: { variant: "body" }
16
+ });
17
+ const clampClass = {
18
+ 1: "line-clamp-1",
19
+ 2: "line-clamp-2",
20
+ 3: "line-clamp-3"
21
+ };
22
+ function Text({
23
+ className,
24
+ variant,
25
+ truncate,
26
+ clamp,
27
+ tone,
28
+ ...props
29
+ }) {
30
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
31
+ "span",
32
+ {
33
+ "data-slot": "text",
34
+ className: _utils.cn.call(void 0,
35
+ textVariants({ variant }),
36
+ clamp ? clampClass[clamp] : truncate && "truncate",
37
+ tone && _tone.toneColor[tone],
38
+ className
39
+ ),
40
+ ...props
41
+ }
42
+ );
43
+ }
44
+ const headingSize = {
45
+ sm: "text-xs font-semibold",
46
+ md: "text-sm font-semibold",
47
+ lg: "text-base font-semibold"
48
+ };
49
+ function Heading({
50
+ className,
51
+ level = 2,
52
+ size = "md",
53
+ truncate,
54
+ ...props
55
+ }) {
56
+ const Tag = `h${level}`;
57
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
58
+ Tag,
59
+ {
60
+ "data-slot": "heading",
61
+ className: _utils.cn.call(void 0,
62
+ "leading-snug text-[var(--text-primary)]",
63
+ headingSize[size],
64
+ truncate && "truncate",
65
+ className
66
+ ),
67
+ ...props
68
+ }
69
+ );
70
+ }
71
+ const iconSize = {
72
+ xs: "size-3",
73
+ sm: "size-3.5",
74
+ md: "size-4",
75
+ lg: "size-5"
76
+ };
77
+ function Icon({ className, icon: IconCmp, size = "md", tone, label, ...props }) {
78
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
79
+ "span",
80
+ {
81
+ "data-slot": "icon",
82
+ role: label ? "img" : void 0,
83
+ "aria-label": label,
84
+ "aria-hidden": label ? void 0 : true,
85
+ className: _utils.cn.call(void 0,
86
+ "inline-flex shrink-0 items-center justify-center",
87
+ tone ? _tone.toneColor[tone] : "text-[var(--text-muted)]",
88
+ className
89
+ ),
90
+ ...props,
91
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, IconCmp, { className: iconSize[size] })
92
+ }
93
+ );
94
+ }
95
+
96
+
97
+
98
+
99
+ exports.Heading = Heading; exports.Icon = Icon; exports.Text = Text;
@@ -0,0 +1,57 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import * as React from 'react';
4
+ import { VariantProps } from 'class-variance-authority';
5
+ import { Tone } from './tone.cjs';
6
+
7
+ declare const textVariants: (props?: ({
8
+ variant?: "body" | "label" | "numeric" | "muted" | "supporting" | null | undefined;
9
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
10
+ interface TextProps extends Omit<React.ComponentProps<"span">, "color">, VariantProps<typeof textVariants> {
11
+ /** Truncate to a single line with an ellipsis. */
12
+ truncate?: boolean;
13
+ /** Clamp to N lines. Overrides `truncate`. */
14
+ clamp?: 1 | 2 | 3;
15
+ /** Semantic colour override (e.g. a numeric value that turns red on error). */
16
+ tone?: Tone;
17
+ asChild?: boolean;
18
+ }
19
+ /** Semantic text with truncation, line-clamp and optional tone. */
20
+ declare function Text({ className, variant, truncate, clamp, tone, ...props }: TextProps): react_jsx_runtime.JSX.Element;
21
+ declare const headingSize: {
22
+ readonly sm: "text-xs font-semibold";
23
+ readonly md: "text-sm font-semibold";
24
+ readonly lg: "text-base font-semibold";
25
+ };
26
+ interface HeadingProps extends React.ComponentProps<"h2"> {
27
+ /** HTML heading level for correct document semantics (1–4). */
28
+ level?: 1 | 2 | 3 | 4;
29
+ /** Visual size, decoupled from the semantic level. */
30
+ size?: keyof typeof headingSize;
31
+ truncate?: boolean;
32
+ }
33
+ /** Compact heading with correct HTML semantics decoupled from visual size. */
34
+ declare function Heading({ className, level, size, truncate, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
35
+ declare const iconSize: {
36
+ readonly xs: "size-3";
37
+ readonly sm: "size-3.5";
38
+ readonly md: "size-4";
39
+ readonly lg: "size-5";
40
+ };
41
+ interface IconProps extends React.ComponentProps<"span"> {
42
+ /** The icon component to render (e.g. a lucide-react icon). */
43
+ icon: React.ComponentType<{
44
+ className?: string;
45
+ }>;
46
+ size?: keyof typeof iconSize;
47
+ tone?: Tone;
48
+ /**
49
+ * Accessible label. When omitted the icon is decorative and hidden from
50
+ * assistive tech; when provided it is exposed as an image with this name.
51
+ */
52
+ label?: string;
53
+ }
54
+ /** Consistent icon wrapper for size, tone and accessibility. */
55
+ declare function Icon({ className, icon: IconCmp, size, tone, label, ...props }: IconProps): react_jsx_runtime.JSX.Element;
56
+
57
+ export { Heading, type HeadingProps, Icon, type IconProps, Text, type TextProps };
@@ -0,0 +1,57 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import * as React from 'react';
4
+ import { VariantProps } from 'class-variance-authority';
5
+ import { Tone } from './tone.js';
6
+
7
+ declare const textVariants: (props?: ({
8
+ variant?: "body" | "label" | "numeric" | "muted" | "supporting" | null | undefined;
9
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
10
+ interface TextProps extends Omit<React.ComponentProps<"span">, "color">, VariantProps<typeof textVariants> {
11
+ /** Truncate to a single line with an ellipsis. */
12
+ truncate?: boolean;
13
+ /** Clamp to N lines. Overrides `truncate`. */
14
+ clamp?: 1 | 2 | 3;
15
+ /** Semantic colour override (e.g. a numeric value that turns red on error). */
16
+ tone?: Tone;
17
+ asChild?: boolean;
18
+ }
19
+ /** Semantic text with truncation, line-clamp and optional tone. */
20
+ declare function Text({ className, variant, truncate, clamp, tone, ...props }: TextProps): react_jsx_runtime.JSX.Element;
21
+ declare const headingSize: {
22
+ readonly sm: "text-xs font-semibold";
23
+ readonly md: "text-sm font-semibold";
24
+ readonly lg: "text-base font-semibold";
25
+ };
26
+ interface HeadingProps extends React.ComponentProps<"h2"> {
27
+ /** HTML heading level for correct document semantics (1–4). */
28
+ level?: 1 | 2 | 3 | 4;
29
+ /** Visual size, decoupled from the semantic level. */
30
+ size?: keyof typeof headingSize;
31
+ truncate?: boolean;
32
+ }
33
+ /** Compact heading with correct HTML semantics decoupled from visual size. */
34
+ declare function Heading({ className, level, size, truncate, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
35
+ declare const iconSize: {
36
+ readonly xs: "size-3";
37
+ readonly sm: "size-3.5";
38
+ readonly md: "size-4";
39
+ readonly lg: "size-5";
40
+ };
41
+ interface IconProps extends React.ComponentProps<"span"> {
42
+ /** The icon component to render (e.g. a lucide-react icon). */
43
+ icon: React.ComponentType<{
44
+ className?: string;
45
+ }>;
46
+ size?: keyof typeof iconSize;
47
+ tone?: Tone;
48
+ /**
49
+ * Accessible label. When omitted the icon is decorative and hidden from
50
+ * assistive tech; when provided it is exposed as an image with this name.
51
+ */
52
+ label?: string;
53
+ }
54
+ /** Consistent icon wrapper for size, tone and accessibility. */
55
+ declare function Icon({ className, icon: IconCmp, size, tone, label, ...props }: IconProps): react_jsx_runtime.JSX.Element;
56
+
57
+ export { Heading, type HeadingProps, Icon, type IconProps, Text, type TextProps };
@@ -0,0 +1,99 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "../../lib/utils";
4
+ import { toneColor } from "./tone";
5
+ const textVariants = cva("min-w-0", {
6
+ variants: {
7
+ variant: {
8
+ body: "text-sm text-[var(--text-primary)]",
9
+ label: "text-[11px] font-semibold uppercase tracking-wider text-[var(--text-muted)]",
10
+ supporting: "text-xs text-[var(--text-secondary)]",
11
+ muted: "text-xs text-[var(--text-muted)]",
12
+ numeric: "text-sm font-semibold tabular-nums text-[var(--text-primary)]"
13
+ }
14
+ },
15
+ defaultVariants: { variant: "body" }
16
+ });
17
+ const clampClass = {
18
+ 1: "line-clamp-1",
19
+ 2: "line-clamp-2",
20
+ 3: "line-clamp-3"
21
+ };
22
+ function Text({
23
+ className,
24
+ variant,
25
+ truncate,
26
+ clamp,
27
+ tone,
28
+ ...props
29
+ }) {
30
+ return /* @__PURE__ */ jsx(
31
+ "span",
32
+ {
33
+ "data-slot": "text",
34
+ className: cn(
35
+ textVariants({ variant }),
36
+ clamp ? clampClass[clamp] : truncate && "truncate",
37
+ tone && toneColor[tone],
38
+ className
39
+ ),
40
+ ...props
41
+ }
42
+ );
43
+ }
44
+ const headingSize = {
45
+ sm: "text-xs font-semibold",
46
+ md: "text-sm font-semibold",
47
+ lg: "text-base font-semibold"
48
+ };
49
+ function Heading({
50
+ className,
51
+ level = 2,
52
+ size = "md",
53
+ truncate,
54
+ ...props
55
+ }) {
56
+ const Tag = `h${level}`;
57
+ return /* @__PURE__ */ jsx(
58
+ Tag,
59
+ {
60
+ "data-slot": "heading",
61
+ className: cn(
62
+ "leading-snug text-[var(--text-primary)]",
63
+ headingSize[size],
64
+ truncate && "truncate",
65
+ className
66
+ ),
67
+ ...props
68
+ }
69
+ );
70
+ }
71
+ const iconSize = {
72
+ xs: "size-3",
73
+ sm: "size-3.5",
74
+ md: "size-4",
75
+ lg: "size-5"
76
+ };
77
+ function Icon({ className, icon: IconCmp, size = "md", tone, label, ...props }) {
78
+ return /* @__PURE__ */ jsx(
79
+ "span",
80
+ {
81
+ "data-slot": "icon",
82
+ role: label ? "img" : void 0,
83
+ "aria-label": label,
84
+ "aria-hidden": label ? void 0 : true,
85
+ className: cn(
86
+ "inline-flex shrink-0 items-center justify-center",
87
+ tone ? toneColor[tone] : "text-[var(--text-muted)]",
88
+ className
89
+ ),
90
+ ...props,
91
+ children: /* @__PURE__ */ jsx(IconCmp, { className: iconSize[size] })
92
+ }
93
+ );
94
+ }
95
+ export {
96
+ Heading,
97
+ Icon,
98
+ Text
99
+ };
@@ -12,7 +12,11 @@ const badgeVariants = _classvarianceauthority.cva.call(void 0,
12
12
  destructive: "bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
13
13
  outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
14
14
  ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
15
- link: "text-primary underline-offset-4 [a&]:hover:underline"
15
+ link: "text-primary underline-offset-4 [a&]:hover:underline",
16
+ // Semantic status tones (error is covered by `destructive`).
17
+ success: "bg-[var(--status-success-muted)] text-[var(--status-success)]",
18
+ warning: "bg-[var(--status-warning-muted)] text-[var(--status-warning)]",
19
+ info: "bg-[var(--status-info-muted)] text-[var(--status-info)]"
16
20
  }
17
21
  },
18
22
  defaultVariants: {
@@ -4,7 +4,7 @@ import * as React from 'react';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const badgeVariants: (props?: ({
7
- variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
7
+ variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | "success" | "warning" | "info" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
10
10
  asChild?: boolean;
@@ -4,7 +4,7 @@ import * as React from 'react';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const badgeVariants: (props?: ({
7
- variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
7
+ variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | "success" | "warning" | "info" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
10
10
  asChild?: boolean;
@@ -12,7 +12,11 @@ const badgeVariants = cva(
12
12
  destructive: "bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
13
13
  outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
14
14
  ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
15
- link: "text-primary underline-offset-4 [a&]:hover:underline"
15
+ link: "text-primary underline-offset-4 [a&]:hover:underline",
16
+ // Semantic status tones (error is covered by `destructive`).
17
+ success: "bg-[var(--status-success-muted)] text-[var(--status-success)]",
18
+ warning: "bg-[var(--status-warning-muted)] text-[var(--status-warning)]",
19
+ info: "bg-[var(--status-info-muted)] text-[var(--status-info)]"
16
20
  }
17
21
  },
18
22
  defaultVariants: {
package/dist/index.cjs CHANGED
@@ -112,6 +112,7 @@ var _transcription = require('./components/ai-elements/transcription'); _createS
112
112
  var _voiceselectoraccent = require('./components/ai-elements/voice-selector-accent'); _createStarExport(_voiceselectoraccent);
113
113
  var _voiceselector = require('./components/ai-elements/voice-selector'); _createStarExport(_voiceselector);
114
114
  var _webpreview = require('./components/ai-elements/web-preview'); _createStarExport(_webpreview);
115
+ var _dashboard = require('./components/dashboard'); _createStarExport(_dashboard);
115
116
  var _availablemodelpicker = require('./components/model-selection/available-model-picker'); _createStarExport(_availablemodelpicker);
116
117
  var _modelwarninglist = require('./components/model-selection/model-warning-list'); _createStarExport(_modelwarninglist);
117
118
  var _thinkinglevelpicker = require('./components/model-selection/thinking-level-picker'); _createStarExport(_thinkinglevelpicker);
package/dist/index.d.cts CHANGED
@@ -113,6 +113,22 @@ export { Transcription, TranscriptionProps, TranscriptionSegment, TranscriptionS
113
113
  export { VoiceSelectorAccent, VoiceSelectorAccentProps, VoiceSelectorAccentValue } from './components/ai-elements/voice-selector-accent.cjs';
114
114
  export { VoiceSelector, VoiceSelectorAge, VoiceSelectorAgeProps, VoiceSelectorAttributes, VoiceSelectorAttributesProps, VoiceSelectorBullet, VoiceSelectorBulletProps, VoiceSelectorContent, VoiceSelectorContentProps, VoiceSelectorDescription, VoiceSelectorDescriptionProps, VoiceSelectorDialog, VoiceSelectorDialogProps, VoiceSelectorEmpty, VoiceSelectorEmptyProps, VoiceSelectorGender, VoiceSelectorGenderProps, VoiceSelectorGroup, VoiceSelectorGroupProps, VoiceSelectorInput, VoiceSelectorInputProps, VoiceSelectorItem, VoiceSelectorItemProps, VoiceSelectorList, VoiceSelectorListProps, VoiceSelectorName, VoiceSelectorNameProps, VoiceSelectorPreview, VoiceSelectorPreviewProps, VoiceSelectorProps, VoiceSelectorSeparator, VoiceSelectorSeparatorProps, VoiceSelectorShortcut, VoiceSelectorShortcutProps, VoiceSelectorTrigger, VoiceSelectorTriggerProps, useVoiceSelector } from './components/ai-elements/voice-selector.cjs';
115
115
  export { WebPreview, WebPreviewBody, WebPreviewBodyProps, WebPreviewConsole, WebPreviewConsoleProps, WebPreviewContextValue, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewNavigationButtonProps, WebPreviewNavigationProps, WebPreviewProps, WebPreviewUrl, WebPreviewUrlProps } from './components/ai-elements/web-preview.cjs';
116
+ export { Tone, toneColor, toneDot, toneLabel, tonePill } from './components/dashboard/tone.cjs';
117
+ export { Gap, gapClass } from './components/dashboard/spacing.cjs';
118
+ export { Divider, DividerProps, Grid, GridProps, Inline, InlineProps, Section, SectionProps, Stack, StackProps, WidgetContent, WidgetContentProps } from './components/dashboard/layout.cjs';
119
+ export { Heading, HeadingProps, Icon, IconProps, Text, TextProps } from './components/dashboard/typography.cjs';
120
+ export { Metric, MetricCard, MetricCardProps, MetricGroup, MetricGroupProps, MetricProps, MetricTrend } from './components/dashboard/metric.cjs';
121
+ export { Status, StatusProps } from './components/dashboard/status.cjs';
122
+ export { KeyValue, KeyValueList, KeyValueListProps, KeyValueProps } from './components/dashboard/key-value.cjs';
123
+ export { ItemList, ItemListItem, ItemListItemProps, ItemListProps } from './components/dashboard/item-list.cjs';
124
+ export { ActivityList, ActivityListItem, ActivityListItemProps, ActivityListProps } from './components/dashboard/activity-list.cjs';
125
+ export { ProgressRing, ProgressRingProps } from './components/dashboard/progress-ring.cjs';
126
+ export { StaleIndicator, StaleIndicatorProps } from './components/dashboard/stale-indicator.cjs';
127
+ export { DataBoundary, DataBoundaryProps, DataState } from './components/dashboard/data-boundary.cjs';
128
+ export { EmptyState, EmptyStateProps } from './components/dashboard/empty-state.cjs';
129
+ export { ActivitySkeleton, ListSkeleton, MetricSkeleton, SkeletonPatternProps } from './components/dashboard/skeletons.cjs';
130
+ export { IconButton, IconButtonProps } from './components/dashboard/icon-button.cjs';
131
+ export { DashboardComponentCatalogEntry } from './components/dashboard/catalog.cjs';
116
132
  export { AvailableModelPicker } from './components/model-selection/available-model-picker.cjs';
117
133
  export { ModelWarningList } from './components/model-selection/model-warning-list.cjs';
118
134
  export { ThinkingLevelPicker } from './components/model-selection/thinking-level-picker.cjs';
package/dist/index.d.ts CHANGED
@@ -113,6 +113,22 @@ export { Transcription, TranscriptionProps, TranscriptionSegment, TranscriptionS
113
113
  export { VoiceSelectorAccent, VoiceSelectorAccentProps, VoiceSelectorAccentValue } from './components/ai-elements/voice-selector-accent.js';
114
114
  export { VoiceSelector, VoiceSelectorAge, VoiceSelectorAgeProps, VoiceSelectorAttributes, VoiceSelectorAttributesProps, VoiceSelectorBullet, VoiceSelectorBulletProps, VoiceSelectorContent, VoiceSelectorContentProps, VoiceSelectorDescription, VoiceSelectorDescriptionProps, VoiceSelectorDialog, VoiceSelectorDialogProps, VoiceSelectorEmpty, VoiceSelectorEmptyProps, VoiceSelectorGender, VoiceSelectorGenderProps, VoiceSelectorGroup, VoiceSelectorGroupProps, VoiceSelectorInput, VoiceSelectorInputProps, VoiceSelectorItem, VoiceSelectorItemProps, VoiceSelectorList, VoiceSelectorListProps, VoiceSelectorName, VoiceSelectorNameProps, VoiceSelectorPreview, VoiceSelectorPreviewProps, VoiceSelectorProps, VoiceSelectorSeparator, VoiceSelectorSeparatorProps, VoiceSelectorShortcut, VoiceSelectorShortcutProps, VoiceSelectorTrigger, VoiceSelectorTriggerProps, useVoiceSelector } from './components/ai-elements/voice-selector.js';
115
115
  export { WebPreview, WebPreviewBody, WebPreviewBodyProps, WebPreviewConsole, WebPreviewConsoleProps, WebPreviewContextValue, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewNavigationButtonProps, WebPreviewNavigationProps, WebPreviewProps, WebPreviewUrl, WebPreviewUrlProps } from './components/ai-elements/web-preview.js';
116
+ export { Tone, toneColor, toneDot, toneLabel, tonePill } from './components/dashboard/tone.js';
117
+ export { Gap, gapClass } from './components/dashboard/spacing.js';
118
+ export { Divider, DividerProps, Grid, GridProps, Inline, InlineProps, Section, SectionProps, Stack, StackProps, WidgetContent, WidgetContentProps } from './components/dashboard/layout.js';
119
+ export { Heading, HeadingProps, Icon, IconProps, Text, TextProps } from './components/dashboard/typography.js';
120
+ export { Metric, MetricCard, MetricCardProps, MetricGroup, MetricGroupProps, MetricProps, MetricTrend } from './components/dashboard/metric.js';
121
+ export { Status, StatusProps } from './components/dashboard/status.js';
122
+ export { KeyValue, KeyValueList, KeyValueListProps, KeyValueProps } from './components/dashboard/key-value.js';
123
+ export { ItemList, ItemListItem, ItemListItemProps, ItemListProps } from './components/dashboard/item-list.js';
124
+ export { ActivityList, ActivityListItem, ActivityListItemProps, ActivityListProps } from './components/dashboard/activity-list.js';
125
+ export { ProgressRing, ProgressRingProps } from './components/dashboard/progress-ring.js';
126
+ export { StaleIndicator, StaleIndicatorProps } from './components/dashboard/stale-indicator.js';
127
+ export { DataBoundary, DataBoundaryProps, DataState } from './components/dashboard/data-boundary.js';
128
+ export { EmptyState, EmptyStateProps } from './components/dashboard/empty-state.js';
129
+ export { ActivitySkeleton, ListSkeleton, MetricSkeleton, SkeletonPatternProps } from './components/dashboard/skeletons.js';
130
+ export { IconButton, IconButtonProps } from './components/dashboard/icon-button.js';
131
+ export { DashboardComponentCatalogEntry } from './components/dashboard/catalog.js';
116
132
  export { AvailableModelPicker } from './components/model-selection/available-model-picker.js';
117
133
  export { ModelWarningList } from './components/model-selection/model-warning-list.js';
118
134
  export { ThinkingLevelPicker } from './components/model-selection/thinking-level-picker.js';
package/dist/index.js CHANGED
@@ -112,6 +112,7 @@ export * from "./components/ai-elements/transcription";
112
112
  export * from "./components/ai-elements/voice-selector-accent";
113
113
  export * from "./components/ai-elements/voice-selector";
114
114
  export * from "./components/ai-elements/web-preview";
115
+ export * from "./components/dashboard";
115
116
  export * from "./components/model-selection/available-model-picker";
116
117
  export * from "./components/model-selection/model-warning-list";
117
118
  export * from "./components/model-selection/thinking-level-picker";