@sero-ai/ui 0.4.0 → 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 (60) hide show
  1. package/.turbo/turbo-build.log +311 -324
  2. package/CHANGELOG.md +22 -2
  3. package/LICENSE +201 -0
  4. package/dist/components/dashboard/catalog.cjs +1 -322
  5. package/dist/components/dashboard/catalog.d.cts +1 -2
  6. package/dist/components/dashboard/catalog.d.ts +1 -2
  7. package/dist/components/dashboard/catalog.js +0 -322
  8. package/dist/components/dashboard/catalog.json +312 -0
  9. package/dist/components/dashboard/index.d.cts +1 -1
  10. package/dist/components/dashboard/index.d.ts +1 -1
  11. package/dist/components/dashboard/status.cjs +6 -2
  12. package/dist/components/dashboard/status.js +7 -3
  13. package/dist/components/dashboard/tone.cjs +9 -1
  14. package/dist/components/dashboard/tone.d.cts +7 -1
  15. package/dist/components/dashboard/tone.d.ts +7 -1
  16. package/dist/components/dashboard/tone.js +8 -0
  17. package/dist/index.d.cts +2 -1
  18. package/dist/index.d.ts +2 -1
  19. package/dist/reference.cjs +1251 -3
  20. package/dist/reference.d.cts +11 -5
  21. package/dist/reference.d.ts +11 -5
  22. package/dist/reference.js +1224 -6
  23. package/package.json +52 -69
  24. package/scripts/ensure-pnpm-publish.mjs +23 -0
  25. package/scripts/smoke-dist.mjs +68 -0
  26. package/src/components/dashboard/__tests__/catalog.test.ts +7 -2
  27. package/src/components/dashboard/__tests__/state.test.tsx +19 -2
  28. package/src/components/dashboard/catalog.json +312 -0
  29. package/src/components/dashboard/catalog.ts +6 -328
  30. package/src/components/dashboard/index.ts +2 -2
  31. package/src/components/dashboard/status.tsx +15 -2
  32. package/src/components/dashboard/tone.ts +13 -0
  33. package/src/index.ts +3 -1
  34. package/tsup.config.ts +13 -3
  35. package/tsup.reference.config.ts +15 -0
  36. package/dist/components/reference/ActivityExample.cjs +0 -47
  37. package/dist/components/reference/ActivityExample.d.cts +0 -5
  38. package/dist/components/reference/ActivityExample.d.ts +0 -5
  39. package/dist/components/reference/ActivityExample.js +0 -47
  40. package/dist/components/reference/ResourceExample.cjs +0 -54
  41. package/dist/components/reference/ResourceExample.d.cts +0 -5
  42. package/dist/components/reference/ResourceExample.d.ts +0 -5
  43. package/dist/components/reference/ResourceExample.js +0 -54
  44. package/dist/components/reference/SchedulerExample.cjs +0 -68
  45. package/dist/components/reference/SchedulerExample.d.cts +0 -5
  46. package/dist/components/reference/SchedulerExample.d.ts +0 -5
  47. package/dist/components/reference/SchedulerExample.js +0 -68
  48. package/dist/components/reference/StarterExample.cjs +0 -34
  49. package/dist/components/reference/StarterExample.d.cts +0 -5
  50. package/dist/components/reference/StarterExample.d.ts +0 -5
  51. package/dist/components/reference/StarterExample.js +0 -34
  52. package/dist/components/reference/index.cjs +0 -10
  53. package/dist/components/reference/index.d.cts +0 -5
  54. package/dist/components/reference/index.d.ts +0 -5
  55. package/dist/components/reference/index.js +0 -10
  56. package/dist/dashboard-catalog.cjs +0 -8
  57. package/dist/dashboard-catalog.d.cts +0 -1
  58. package/dist/dashboard-catalog.d.ts +0 -1
  59. package/dist/dashboard-catalog.js +0 -8
  60. package/src/dashboard-catalog.ts +0 -13
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../../lib/utils";
3
- import { toneColor, toneDot, tonePill } from "./tone";
3
+ import { toneColor, toneDot, toneLabel, tonePill } from "./tone";
4
4
  function Status({
5
5
  className,
6
6
  tone = "neutral",
@@ -10,6 +10,8 @@ function Status({
10
10
  ...props
11
11
  }) {
12
12
  const hasLabel = children != null && children !== "";
13
+ const hasAccessibleName = props["aria-label"] != null || props["aria-labelledby"] != null;
14
+ const hiddenLabel = !hasLabel && !hasAccessibleName ? /* @__PURE__ */ jsx("span", { className: "sr-only", children: toneLabel[tone] }) : null;
13
15
  if (variant === "pill") {
14
16
  return /* @__PURE__ */ jsxs(
15
17
  "span",
@@ -24,7 +26,8 @@ function Status({
24
26
  ...props,
25
27
  children: [
26
28
  /* @__PURE__ */ jsx("span", { className: cn("size-1.5 shrink-0 rounded-full", toneDot[tone]) }),
27
- children
29
+ children,
30
+ hiddenLabel
28
31
  ]
29
32
  }
30
33
  );
@@ -52,7 +55,8 @@ function Status({
52
55
  )
53
56
  }
54
57
  ),
55
- children
58
+ children,
59
+ hiddenLabel
56
60
  ]
57
61
  }
58
62
  );
@@ -12,6 +12,13 @@ const toneDot = {
12
12
  error: "bg-[var(--status-error)]",
13
13
  info: "bg-[var(--status-info)]"
14
14
  };
15
+ const toneLabel = {
16
+ neutral: "Neutral",
17
+ success: "Success",
18
+ warning: "Warning",
19
+ error: "Error",
20
+ info: "Info"
21
+ };
15
22
  const tonePill = {
16
23
  neutral: "bg-[var(--surface-flat)] text-[var(--text-secondary)]",
17
24
  success: "bg-[var(--status-success-muted)] text-[var(--status-success)]",
@@ -23,4 +30,5 @@ const tonePill = {
23
30
 
24
31
 
25
32
 
26
- exports.toneColor = toneColor; exports.toneDot = toneDot; exports.tonePill = tonePill;
33
+
34
+ exports.toneColor = toneColor; exports.toneDot = toneDot; exports.toneLabel = toneLabel; exports.tonePill = tonePill;
@@ -3,7 +3,13 @@ type Tone = "neutral" | "success" | "warning" | "error" | "info";
3
3
  declare const toneColor: Record<Tone, string>;
4
4
  /** Solid background colour for a tone (status dots). */
5
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>;
6
12
  /** Muted tinted background + matching text for a tone (pills, chips). */
7
13
  declare const tonePill: Record<Tone, string>;
8
14
 
9
- export { type Tone, toneColor, toneDot, tonePill };
15
+ export { type Tone, toneColor, toneDot, toneLabel, tonePill };
@@ -3,7 +3,13 @@ type Tone = "neutral" | "success" | "warning" | "error" | "info";
3
3
  declare const toneColor: Record<Tone, string>;
4
4
  /** Solid background colour for a tone (status dots). */
5
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>;
6
12
  /** Muted tinted background + matching text for a tone (pills, chips). */
7
13
  declare const tonePill: Record<Tone, string>;
8
14
 
9
- export { type Tone, toneColor, toneDot, tonePill };
15
+ export { type Tone, toneColor, toneDot, toneLabel, tonePill };
@@ -12,6 +12,13 @@ const toneDot = {
12
12
  error: "bg-[var(--status-error)]",
13
13
  info: "bg-[var(--status-info)]"
14
14
  };
15
+ const toneLabel = {
16
+ neutral: "Neutral",
17
+ success: "Success",
18
+ warning: "Warning",
19
+ error: "Error",
20
+ info: "Info"
21
+ };
15
22
  const tonePill = {
16
23
  neutral: "bg-[var(--surface-flat)] text-[var(--text-secondary)]",
17
24
  success: "bg-[var(--status-success-muted)] text-[var(--status-success)]",
@@ -22,5 +29,6 @@ const tonePill = {
22
29
  export {
23
30
  toneColor,
24
31
  toneDot,
32
+ toneLabel,
25
33
  tonePill
26
34
  };
package/dist/index.d.cts CHANGED
@@ -113,7 +113,7 @@ 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, tonePill } from './components/dashboard/tone.cjs';
116
+ export { Tone, toneColor, toneDot, toneLabel, tonePill } from './components/dashboard/tone.cjs';
117
117
  export { Gap, gapClass } from './components/dashboard/spacing.cjs';
118
118
  export { Divider, DividerProps, Grid, GridProps, Inline, InlineProps, Section, SectionProps, Stack, StackProps, WidgetContent, WidgetContentProps } from './components/dashboard/layout.cjs';
119
119
  export { Heading, HeadingProps, Icon, IconProps, Text, TextProps } from './components/dashboard/typography.cjs';
@@ -128,6 +128,7 @@ export { DataBoundary, DataBoundaryProps, DataState } from './components/dashboa
128
128
  export { EmptyState, EmptyStateProps } from './components/dashboard/empty-state.cjs';
129
129
  export { ActivitySkeleton, ListSkeleton, MetricSkeleton, SkeletonPatternProps } from './components/dashboard/skeletons.cjs';
130
130
  export { IconButton, IconButtonProps } from './components/dashboard/icon-button.cjs';
131
+ export { DashboardComponentCatalogEntry } from './components/dashboard/catalog.cjs';
131
132
  export { AvailableModelPicker } from './components/model-selection/available-model-picker.cjs';
132
133
  export { ModelWarningList } from './components/model-selection/model-warning-list.cjs';
133
134
  export { ThinkingLevelPicker } from './components/model-selection/thinking-level-picker.cjs';
package/dist/index.d.ts CHANGED
@@ -113,7 +113,7 @@ 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, tonePill } from './components/dashboard/tone.js';
116
+ export { Tone, toneColor, toneDot, toneLabel, tonePill } from './components/dashboard/tone.js';
117
117
  export { Gap, gapClass } from './components/dashboard/spacing.js';
118
118
  export { Divider, DividerProps, Grid, GridProps, Inline, InlineProps, Section, SectionProps, Stack, StackProps, WidgetContent, WidgetContentProps } from './components/dashboard/layout.js';
119
119
  export { Heading, HeadingProps, Icon, IconProps, Text, TextProps } from './components/dashboard/typography.js';
@@ -128,6 +128,7 @@ export { DataBoundary, DataBoundaryProps, DataState } from './components/dashboa
128
128
  export { EmptyState, EmptyStateProps } from './components/dashboard/empty-state.js';
129
129
  export { ActivitySkeleton, ListSkeleton, MetricSkeleton, SkeletonPatternProps } from './components/dashboard/skeletons.js';
130
130
  export { IconButton, IconButtonProps } from './components/dashboard/icon-button.js';
131
+ export { DashboardComponentCatalogEntry } from './components/dashboard/catalog.js';
131
132
  export { AvailableModelPicker } from './components/model-selection/available-model-picker.js';
132
133
  export { ModelWarningList } from './components/model-selection/model-warning-list.js';
133
134
  export { ThinkingLevelPicker } from './components/model-selection/thinking-level-picker.js';