@handled-ai/design-system 0.2.1 → 0.3.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.
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ import { VariantProps } from 'class-variance-authority';
6
6
  import * as RechartsPrimitive from 'recharts';
7
7
  import { SortingState } from '@tanstack/react-table';
8
8
  import * as LabelPrimitive from '@radix-ui/react-label';
9
+ import { LucideIcon } from 'lucide-react';
9
10
 
10
11
  declare function cn(...inputs: ClassValue[]): string;
11
12
 
@@ -811,11 +812,13 @@ interface UserMenuItem {
811
812
  }>;
812
813
  destructive?: boolean;
813
814
  }
815
+ type ActiveVariant = "default" | "gradient";
814
816
  interface QuickActionSidebarNavProps extends React$1.ComponentProps<"aside"> {
815
817
  brandLabel?: string;
816
818
  brandSubtitle?: string;
817
819
  navSections?: SidebarNavSection[];
818
820
  activeItemId?: string;
821
+ activeVariant?: ActiveVariant;
819
822
  onNavigate?: (itemId: string) => void;
820
823
  user?: SidebarUserProfile;
821
824
  userMenuItems?: UserMenuItem[];
@@ -823,7 +826,7 @@ interface QuickActionSidebarNavProps extends React$1.ComponentProps<"aside"> {
823
826
  onCreateTask?: (draft: QuickActionTaskDraft) => void;
824
827
  defaultCollapsed?: boolean;
825
828
  }
826
- declare function QuickActionSidebarNav({ className, brandLabel, brandSubtitle, navSections, activeItemId, onNavigate, user, userMenuItems, onUserMenuAction, onCreateTask, defaultCollapsed, ...props }: QuickActionSidebarNavProps): React$1.JSX.Element;
829
+ declare function QuickActionSidebarNav({ className, brandLabel, brandSubtitle, navSections, activeItemId, activeVariant, onNavigate, user, userMenuItems, onUserMenuAction, onCreateTask, defaultCollapsed, ...props }: QuickActionSidebarNavProps): React$1.JSX.Element;
827
830
 
828
831
  interface RecommendedAction {
829
832
  id: string;
@@ -1328,4 +1331,198 @@ interface VolumeAnalysisChartProps {
1328
1331
  }
1329
1332
  declare function VolumeAnalysisChart({ data, dataKeys, height, xAxisKey, stacked, title, subtitle, className, }: VolumeAnalysisChartProps): React$1.JSX.Element;
1330
1333
 
1331
- export { ActivityDetail, type ActivityDetailData, type ActivityDetailProps, type ActivityItem, ActivityLog, type ActivityLogItem, type ActivityLogProps, type ActivityParticipant, ActivityRow, type ActivityThreadMessage, type AssigneeFilter, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BarChartComponent, type BarChartComponentProps, type BarSeries, Button, CHART_CURSOR_STYLE, CHART_TOOLTIP_STYLE, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, type ChartTooltipEntry, CheckInsCard, Citation, ConnectedApps, type ContactChannel, type ContactItem, ContactList, type ContactListProps, DataTable, DataTableDisplay, type DataTableDisplayColumn, DataTableFilter, type DataTableFilterCategory, type DataTableQuickViewValue, DataTableQuickViews, DataTableToolbar, DetailViewHeader, DetailViewSummary, DetailViewThread, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DonutChart, type DonutChartProps, type DonutSegment, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EntityActivityItem, EntityDetails, type EntityMetadataField, EntityMetadataGrid, EntityPanel, type EntityPanelBrandIcons, EntityPanelHeader, EntityPanelTabs, EntitySection, type GroupedListGroup, GroupedListView, type GroupedListViewProps, type InboxFilterCategory, InboxGroupHeader, InboxRow, type InboxRowProps, InboxToolbar, type InboxToolbarProps, Input, ItemList, ItemListDisplay, type ItemListDisplayState, ItemListFilter, type ItemListFilterCategory, type ItemListGrouping, type ItemListQuickView, ItemListToolbar, type ItemListViewMode, Label, MetricCard, type MetricCardData, type MetricCardProps, type MetricDataPoint, PerformanceMetricsTable, type PerformanceMetricsTableRow, type PerformanceMetricsTableSortOption, type PipelineFilterBreakdown, PipelineOverview, type PipelineOverviewProps, type PipelineStage, type PipelineStageMetrics, type PipelineStageTiming, PotentialContacts, PreviewList, PreviewListItem, type PreviewListItemProps, Progress, QuickActionChatArea, QuickActionModal, type QuickActionPriority$1 as QuickActionPriority, QuickActionSidebarNav, type QuickActionSubmitPayload, type QuickActionTaskDraft, type QuickActionTemplate, RecentActivity, RecentlyCompletedCard, type RecommendedAction, RecommendedActionsSection, ReportCard, type ReportCardProps, SankeyChart, type SankeyData, type SankeyDropOff, type SankeyHoverCardData, type SankeyLink, type SankeyNode, type SankeyStageMetrics, ScoreAnalysisModal, type ScoreAnalysisModalProps, ScoreAnalysisPanel, ScoreBreakdown, type ScoreBreakdownProps, type ScoreFactor, ScoreFeedback, ScoreRing, type ScoreRingProps, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, type SidebarNavItem, type SidebarNavSection, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, type SidebarUserProfile, SignalApproval, Actions as SignalApprovalActions, Gate as SignalApprovalGate, Root as SignalApprovalRoot, SimpleChartTooltip, type SimpleChartTooltipProps, Skeleton, type SourceDef, SourceList, type StyledBarItem, StyledBarList, type StyledBarListProps, type SuggestedAction, type SuggestedActionCallMeta, type SuggestedActionEmailMeta, type SuggestedActionFollowUp, type SuggestedActionReplyTo, type SuggestedActionThreadMessage, type SuggestedActionTicket, SuggestedActions, type SuggestedActionsIconMap, type SuggestedActionsProps, type SuggestedContact, SystemActivity, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThreadMessage, TimelineActivity, type TimelineActivityProps, type TimelineEvent, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopLineMetrics, type TopLineMetricsProps, TopTasksCard, TrendAreaChart, type TrendAreaChartProps, type TrendSeries, UpcomingMeetingsCard, type UserMenuItem, type ViewMode, ViewModeToggle, type ViewModeToggleProps, VolumeAnalysisChart, type VolumeAnalysisChartProps, type VolumeDataKey, badgeVariants, buttonVariants, cn, getScoreColor, tabsListVariants, useIsMobile, useScoreFeedback, useSidebar, useSignalApproval };
1334
+ interface PrototypeBrandConfig {
1335
+ name: string;
1336
+ logo?: string;
1337
+ assistantName?: string;
1338
+ }
1339
+ interface QueueItem {
1340
+ id: string;
1341
+ title: string;
1342
+ details: string;
1343
+ statusColor: string;
1344
+ time: string;
1345
+ company: string;
1346
+ tag1: string;
1347
+ }
1348
+ interface SignalScoreData {
1349
+ score: number;
1350
+ factors: ScoreFactor[];
1351
+ whyNow: string;
1352
+ evidence: string[];
1353
+ confidence: number;
1354
+ }
1355
+ interface InboxDetailSections {
1356
+ signalBrief?: boolean;
1357
+ suggestedActions?: boolean;
1358
+ timeline?: boolean;
1359
+ }
1360
+ interface InboxViewConfig {
1361
+ items: QueueItem[];
1362
+ filterCategories?: InboxFilterCategory[];
1363
+ detailSections?: InboxDetailSections;
1364
+ accountContacts?: SuggestedContact[];
1365
+ emailSignature?: string;
1366
+ buildSuggestedActions?: (item: QueueItem) => SuggestedAction[];
1367
+ buildSourceItems?: (item: QueueItem) => SourceDef[];
1368
+ getSignalScore?: (company: string) => SignalScoreData;
1369
+ getTimelineEvents?: (item: QueueItem) => TimelineEvent[];
1370
+ iconMap?: Record<string, string>;
1371
+ }
1372
+ interface InsightsViewConfig {
1373
+ tabs?: {
1374
+ overview?: boolean;
1375
+ analytics?: boolean;
1376
+ };
1377
+ coaching?: {
1378
+ enabled?: boolean;
1379
+ message?: string;
1380
+ };
1381
+ metrics?: MetricCardProps[];
1382
+ expandedMetrics?: MetricCardProps[];
1383
+ dashboardCards?: {
1384
+ topTasks?: boolean;
1385
+ upcomingMeetings?: boolean;
1386
+ recentlyCompleted?: boolean;
1387
+ checkIns?: boolean;
1388
+ };
1389
+ analytics?: {
1390
+ pipeline?: {
1391
+ stages: PipelineStage[];
1392
+ stageMetrics: Record<string, PipelineStageMetrics>;
1393
+ stageTimings: (PipelineStageTiming | null)[];
1394
+ filterBreakdowns?: Record<string, Record<string, Record<string, number>>>;
1395
+ };
1396
+ volumeChart?: {
1397
+ data: Record<string, unknown>[];
1398
+ dataKeys: Array<{
1399
+ key: string;
1400
+ color: string;
1401
+ }>;
1402
+ filterOptions?: Array<{
1403
+ label: string;
1404
+ value: string;
1405
+ }>;
1406
+ };
1407
+ donutChart?: {
1408
+ data: Array<{
1409
+ name: string;
1410
+ value: number;
1411
+ color: string;
1412
+ }>;
1413
+ centerLabel?: number;
1414
+ };
1415
+ trendChart?: {
1416
+ data: Record<string, unknown>[];
1417
+ series: Array<{
1418
+ dataKey: string;
1419
+ color: string;
1420
+ }>;
1421
+ xAxisKey?: string;
1422
+ height?: number;
1423
+ toggleOptions?: string[];
1424
+ };
1425
+ barChart?: {
1426
+ data: Record<string, unknown>[];
1427
+ bars: Array<{
1428
+ dataKey: string;
1429
+ color: string;
1430
+ name: string;
1431
+ icon?: LucideIcon;
1432
+ }>;
1433
+ };
1434
+ barList?: {
1435
+ data: Array<{
1436
+ name: string;
1437
+ value: number;
1438
+ }>;
1439
+ valueFormatter?: (v: number) => string;
1440
+ };
1441
+ };
1442
+ }
1443
+ interface AccountFilterTab {
1444
+ label: string;
1445
+ count?: number;
1446
+ variant?: "default" | "attention" | "ghost";
1447
+ }
1448
+ interface AccountsViewConfig {
1449
+ filterTabs?: AccountFilterTab[];
1450
+ }
1451
+ interface WorkQueueViewConfig {
1452
+ [key: string]: unknown;
1453
+ }
1454
+ interface EntityPanelSection {
1455
+ type: "details" | "contacts" | "recentActivity" | "connectedApps" | "systemActivity";
1456
+ props?: Record<string, unknown>;
1457
+ }
1458
+ interface EntityPanelConfig {
1459
+ sections?: EntityPanelSection[];
1460
+ icons?: Record<string, string>;
1461
+ }
1462
+ interface PrototypeConfig {
1463
+ brand?: PrototypeBrandConfig;
1464
+ sidebar: SidebarNavSection[];
1465
+ views: {
1466
+ inbox?: InboxViewConfig;
1467
+ insights?: InsightsViewConfig;
1468
+ accounts?: AccountsViewConfig;
1469
+ workQueue?: WorkQueueViewConfig;
1470
+ };
1471
+ defaultView: string;
1472
+ entityPanel?: EntityPanelConfig;
1473
+ /** Sidebar item IDs that trigger view navigation. Defaults to keys of `views`. */
1474
+ navigableViews?: string[];
1475
+ }
1476
+
1477
+ interface PrototypeShellProps {
1478
+ config: PrototypeConfig;
1479
+ /**
1480
+ * Optional ReactNode rendered in the header area of each view.
1481
+ * Useful for adding an "Exit Preview" button in the design system showcase.
1482
+ */
1483
+ headerActions?: React$1.ReactNode;
1484
+ /**
1485
+ * Custom content to render inside the EntityPanel.
1486
+ * When provided, overrides the default section-based rendering.
1487
+ * Receives `onClose` so children can close the panel.
1488
+ */
1489
+ entityPanelChildren?: React$1.ReactNode | ((ctx: {
1490
+ onClose: () => void;
1491
+ }) => React$1.ReactNode);
1492
+ /**
1493
+ * Fired on every sidebar navigation click (both navigable and non-navigable views).
1494
+ * Useful for intercepting clicks on product-specific views like "settings"
1495
+ * that live outside the shell.
1496
+ */
1497
+ onNavigate?: (viewId: string) => void;
1498
+ }
1499
+ declare function PrototypeShell({ config, headerActions, entityPanelChildren, onNavigate, }: PrototypeShellProps): React$1.JSX.Element;
1500
+
1501
+ interface PrototypeInboxViewProps extends InboxViewConfig {
1502
+ /** Extra ReactNode rendered at the end of the header bar (e.g. exit button). */
1503
+ headerActions?: React$1.ReactNode;
1504
+ onOpenEntityPanel?: () => void;
1505
+ onOpenRecentActivity?: () => void;
1506
+ onNavigateToInbox?: () => void;
1507
+ }
1508
+ declare function PrototypeInboxView({ items, filterCategories, detailSections, accountContacts, emailSignature, buildSuggestedActions: buildSuggestedActionsProp, buildSourceItems: buildSourceItemsProp, getSignalScore: getSignalScoreProp, getTimelineEvents, iconMap, headerActions, onOpenEntityPanel, onOpenRecentActivity, }: PrototypeInboxViewProps): React$1.JSX.Element;
1509
+
1510
+ interface PrototypeInsightsViewProps extends InsightsViewConfig {
1511
+ assistantName?: string;
1512
+ headerActions?: React$1.ReactNode;
1513
+ onNavigateToInbox?: () => void;
1514
+ }
1515
+ declare function PrototypeInsightsView({ tabs, coaching, metrics, expandedMetrics, dashboardCards, analytics, assistantName, headerActions, onNavigateToInbox, }: PrototypeInsightsViewProps): React$1.JSX.Element;
1516
+
1517
+ interface PrototypeAccountsViewProps extends AccountsViewConfig {
1518
+ headerActions?: React$1.ReactNode;
1519
+ onRowClick?: () => void;
1520
+ }
1521
+ declare function PrototypeAccountsView({ filterTabs, headerActions, onRowClick, }: PrototypeAccountsViewProps): React$1.JSX.Element;
1522
+
1523
+ interface PrototypeWorkQueueViewProps {
1524
+ headerActions?: React$1.ReactNode;
1525
+ }
1526
+ declare function PrototypeWorkQueueView({ headerActions, }: PrototypeWorkQueueViewProps): React$1.JSX.Element;
1527
+
1528
+ export { type AccountFilterTab, type AccountsViewConfig, type ActiveVariant, ActivityDetail, type ActivityDetailData, type ActivityDetailProps, type ActivityItem, ActivityLog, type ActivityLogItem, type ActivityLogProps, type ActivityParticipant, ActivityRow, type ActivityThreadMessage, type AssigneeFilter, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BarChartComponent, type BarChartComponentProps, type BarSeries, Button, CHART_CURSOR_STYLE, CHART_TOOLTIP_STYLE, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, type ChartTooltipEntry, CheckInsCard, Citation, ConnectedApps, type ContactChannel, type ContactItem, ContactList, type ContactListProps, DataTable, DataTableDisplay, type DataTableDisplayColumn, DataTableFilter, type DataTableFilterCategory, type DataTableQuickViewValue, DataTableQuickViews, DataTableToolbar, DetailViewHeader, DetailViewSummary, DetailViewThread, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DonutChart, type DonutChartProps, type DonutSegment, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EntityActivityItem, EntityDetails, type EntityMetadataField, EntityMetadataGrid, EntityPanel, type EntityPanelBrandIcons, type EntityPanelConfig, EntityPanelHeader, type EntityPanelSection, EntityPanelTabs, EntitySection, type GroupedListGroup, GroupedListView, type GroupedListViewProps, type InboxDetailSections, type InboxFilterCategory, InboxGroupHeader, InboxRow, type InboxRowProps, InboxToolbar, type InboxToolbarProps, type InboxViewConfig, Input, type InsightsViewConfig, ItemList, ItemListDisplay, type ItemListDisplayState, ItemListFilter, type ItemListFilterCategory, type ItemListGrouping, type ItemListQuickView, ItemListToolbar, type ItemListViewMode, Label, MetricCard, type MetricCardData, type MetricCardProps, type MetricDataPoint, PerformanceMetricsTable, type PerformanceMetricsTableRow, type PerformanceMetricsTableSortOption, type PipelineFilterBreakdown, PipelineOverview, type PipelineOverviewProps, type PipelineStage, type PipelineStageMetrics, type PipelineStageTiming, PotentialContacts, PreviewList, PreviewListItem, type PreviewListItemProps, Progress, PrototypeAccountsView, type PrototypeAccountsViewProps, type PrototypeBrandConfig, type PrototypeConfig, PrototypeInboxView, type PrototypeInboxViewProps, PrototypeInsightsView, type PrototypeInsightsViewProps, PrototypeShell, type PrototypeShellProps, PrototypeWorkQueueView, type PrototypeWorkQueueViewProps, type QueueItem, QuickActionChatArea, QuickActionModal, type QuickActionPriority$1 as QuickActionPriority, QuickActionSidebarNav, type QuickActionSubmitPayload, type QuickActionTaskDraft, type QuickActionTemplate, RecentActivity, RecentlyCompletedCard, type RecommendedAction, RecommendedActionsSection, ReportCard, type ReportCardProps, SankeyChart, type SankeyData, type SankeyDropOff, type SankeyHoverCardData, type SankeyLink, type SankeyNode, type SankeyStageMetrics, ScoreAnalysisModal, type ScoreAnalysisModalProps, ScoreAnalysisPanel, ScoreBreakdown, type ScoreBreakdownProps, type ScoreFactor, ScoreFeedback, ScoreRing, type ScoreRingProps, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, type SidebarNavItem, type SidebarNavSection, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, type SidebarUserProfile, SignalApproval, Actions as SignalApprovalActions, Gate as SignalApprovalGate, Root as SignalApprovalRoot, type SignalScoreData, SimpleChartTooltip, type SimpleChartTooltipProps, Skeleton, type SourceDef, SourceList, type StyledBarItem, StyledBarList, type StyledBarListProps, type SuggestedAction, type SuggestedActionCallMeta, type SuggestedActionEmailMeta, type SuggestedActionFollowUp, type SuggestedActionReplyTo, type SuggestedActionThreadMessage, type SuggestedActionTicket, SuggestedActions, type SuggestedActionsIconMap, type SuggestedActionsProps, type SuggestedContact, SystemActivity, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThreadMessage, TimelineActivity, type TimelineActivityProps, type TimelineEvent, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopLineMetrics, type TopLineMetricsProps, TopTasksCard, TrendAreaChart, type TrendAreaChartProps, type TrendSeries, UpcomingMeetingsCard, type UserMenuItem, type ViewMode, ViewModeToggle, type ViewModeToggleProps, VolumeAnalysisChart, type VolumeAnalysisChartProps, type VolumeDataKey, type WorkQueueViewConfig, badgeVariants, buttonVariants, cn, getScoreColor, tabsListVariants, useIsMobile, useScoreFeedback, useSidebar, useSignalApproval };