@handled-ai/design-system 0.3.0 → 0.4.2
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 +170 -4
- package/dist/index.js +946 -9
- package/dist/index.js.map +1 -1
- package/package.json +20 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
+
import { HTMLAttributes, ComponentProps } from 'react';
|
|
3
4
|
import { Avatar as Avatar$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1, Progress as Progress$1, ScrollArea as ScrollArea$1, Select as Select$1, Separator as Separator$1, Tooltip as Tooltip$1, Tabs as Tabs$1 } from 'radix-ui';
|
|
4
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
6
|
import { VariantProps } from 'class-variance-authority';
|
|
6
7
|
import * as RechartsPrimitive from 'recharts';
|
|
7
|
-
import { SortingState } from '@tanstack/react-table';
|
|
8
|
+
import { SortingState, ColumnDef } from '@tanstack/react-table';
|
|
8
9
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
9
10
|
import { LucideIcon } from 'lucide-react';
|
|
10
11
|
|
|
@@ -812,11 +813,13 @@ interface UserMenuItem {
|
|
|
812
813
|
}>;
|
|
813
814
|
destructive?: boolean;
|
|
814
815
|
}
|
|
816
|
+
type ActiveVariant = "default" | "gradient";
|
|
815
817
|
interface QuickActionSidebarNavProps extends React$1.ComponentProps<"aside"> {
|
|
816
818
|
brandLabel?: string;
|
|
817
819
|
brandSubtitle?: string;
|
|
818
820
|
navSections?: SidebarNavSection[];
|
|
819
821
|
activeItemId?: string;
|
|
822
|
+
activeVariant?: ActiveVariant;
|
|
820
823
|
onNavigate?: (itemId: string) => void;
|
|
821
824
|
user?: SidebarUserProfile;
|
|
822
825
|
userMenuItems?: UserMenuItem[];
|
|
@@ -824,7 +827,7 @@ interface QuickActionSidebarNavProps extends React$1.ComponentProps<"aside"> {
|
|
|
824
827
|
onCreateTask?: (draft: QuickActionTaskDraft) => void;
|
|
825
828
|
defaultCollapsed?: boolean;
|
|
826
829
|
}
|
|
827
|
-
declare function QuickActionSidebarNav({ className, brandLabel, brandSubtitle, navSections, activeItemId, onNavigate, user, userMenuItems, onUserMenuAction, onCreateTask, defaultCollapsed, ...props }: QuickActionSidebarNavProps): React$1.JSX.Element;
|
|
830
|
+
declare function QuickActionSidebarNav({ className, brandLabel, brandSubtitle, navSections, activeItemId, activeVariant, onNavigate, user, userMenuItems, onUserMenuAction, onCreateTask, defaultCollapsed, ...props }: QuickActionSidebarNavProps): React$1.JSX.Element;
|
|
828
831
|
|
|
829
832
|
interface RecommendedAction {
|
|
830
833
|
id: string;
|
|
@@ -1487,8 +1490,14 @@ interface PrototypeShellProps {
|
|
|
1487
1490
|
entityPanelChildren?: React$1.ReactNode | ((ctx: {
|
|
1488
1491
|
onClose: () => void;
|
|
1489
1492
|
}) => React$1.ReactNode);
|
|
1493
|
+
/**
|
|
1494
|
+
* Fired on every sidebar navigation click (both navigable and non-navigable views).
|
|
1495
|
+
* Useful for intercepting clicks on product-specific views like "settings"
|
|
1496
|
+
* that live outside the shell.
|
|
1497
|
+
*/
|
|
1498
|
+
onNavigate?: (viewId: string) => void;
|
|
1490
1499
|
}
|
|
1491
|
-
declare function PrototypeShell({ config, headerActions, entityPanelChildren, }: PrototypeShellProps): React$1.JSX.Element;
|
|
1500
|
+
declare function PrototypeShell({ config, headerActions, entityPanelChildren, onNavigate, }: PrototypeShellProps): React$1.JSX.Element;
|
|
1492
1501
|
|
|
1493
1502
|
interface PrototypeInboxViewProps extends InboxViewConfig {
|
|
1494
1503
|
/** Extra ReactNode rendered at the end of the header bar (e.g. exit button). */
|
|
@@ -1517,4 +1526,161 @@ interface PrototypeWorkQueueViewProps {
|
|
|
1517
1526
|
}
|
|
1518
1527
|
declare function PrototypeWorkQueueView({ headerActions, }: PrototypeWorkQueueViewProps): React$1.JSX.Element;
|
|
1519
1528
|
|
|
1520
|
-
|
|
1529
|
+
type MessageProps = HTMLAttributes<HTMLDivElement> & {
|
|
1530
|
+
from: "user" | "assistant";
|
|
1531
|
+
};
|
|
1532
|
+
declare const Message: ({ className, from, ...props }: MessageProps) => React$1.JSX.Element;
|
|
1533
|
+
declare const messageContentVariants: (props?: ({
|
|
1534
|
+
variant?: "flat" | "contained" | null | undefined;
|
|
1535
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1536
|
+
type MessageContentProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof messageContentVariants>;
|
|
1537
|
+
declare const MessageContent: ({ children, className, variant, ...props }: MessageContentProps) => React$1.JSX.Element;
|
|
1538
|
+
type MessageAvatarProps = ComponentProps<typeof Avatar> & {
|
|
1539
|
+
src?: string;
|
|
1540
|
+
name?: string;
|
|
1541
|
+
};
|
|
1542
|
+
declare const MessageAvatar: ({ src, name, className, children, ...props }: MessageAvatarProps) => React$1.JSX.Element;
|
|
1543
|
+
|
|
1544
|
+
type StatusType = "success" | "warning" | "error" | "neutral";
|
|
1545
|
+
interface StatusBadgeProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
1546
|
+
status: string;
|
|
1547
|
+
statusMap?: Record<string, StatusType>;
|
|
1548
|
+
}
|
|
1549
|
+
declare function StatusBadge({ status, statusMap, className, ...props }: StatusBadgeProps): React$1.JSX.Element;
|
|
1550
|
+
|
|
1551
|
+
interface SimpleDataTableProps<TData> {
|
|
1552
|
+
columns: ColumnDef<TData, any>[];
|
|
1553
|
+
data: TData[];
|
|
1554
|
+
onRowClick?: (row: TData) => void;
|
|
1555
|
+
emptyIcon?: React$1.ReactNode;
|
|
1556
|
+
emptyMessage?: string;
|
|
1557
|
+
emptyDescription?: string;
|
|
1558
|
+
className?: string;
|
|
1559
|
+
}
|
|
1560
|
+
declare function SimpleDataTable<TData>({ columns, data, onRowClick, emptyIcon, emptyMessage, emptyDescription, className, }: SimpleDataTableProps<TData>): React$1.JSX.Element;
|
|
1561
|
+
|
|
1562
|
+
type AgentOrbState = null | "thinking" | "listening" | "talking";
|
|
1563
|
+
interface AgentOrbProps {
|
|
1564
|
+
state?: AgentOrbState;
|
|
1565
|
+
colors?: [string, string];
|
|
1566
|
+
volumeMode?: "auto" | "manual";
|
|
1567
|
+
manualInput?: number;
|
|
1568
|
+
manualOutput?: number;
|
|
1569
|
+
inputVolumeRef?: React.RefObject<number>;
|
|
1570
|
+
outputVolumeRef?: React.RefObject<number>;
|
|
1571
|
+
getInputVolume?: () => number;
|
|
1572
|
+
getOutputVolume?: () => number;
|
|
1573
|
+
seed?: number;
|
|
1574
|
+
showGlow?: boolean;
|
|
1575
|
+
className?: string;
|
|
1576
|
+
}
|
|
1577
|
+
/**
|
|
1578
|
+
* Full AgentOrb with optional CSS glow wrapper.
|
|
1579
|
+
* Colors default to CSS `--primary` via computed style at mount time.
|
|
1580
|
+
*/
|
|
1581
|
+
declare function AgentOrb({ state, colors, volumeMode, manualInput, manualOutput, inputVolumeRef, outputVolumeRef, getInputVolume, getOutputVolume, seed, showGlow, className, }: AgentOrbProps): React$1.JSX.Element;
|
|
1582
|
+
interface AgentOrbCanvasProps {
|
|
1583
|
+
colors?: [string, string];
|
|
1584
|
+
seed?: number;
|
|
1585
|
+
agentState?: AgentOrbState;
|
|
1586
|
+
volumeMode?: "auto" | "manual";
|
|
1587
|
+
manualInput?: number;
|
|
1588
|
+
manualOutput?: number;
|
|
1589
|
+
inputVolumeRef?: React.RefObject<number>;
|
|
1590
|
+
outputVolumeRef?: React.RefObject<number>;
|
|
1591
|
+
getInputVolume?: () => number;
|
|
1592
|
+
getOutputVolume?: () => number;
|
|
1593
|
+
className?: string;
|
|
1594
|
+
resizeDebounce?: number;
|
|
1595
|
+
}
|
|
1596
|
+
declare function AgentOrbCanvas({ colors, seed, agentState, volumeMode, manualInput, manualOutput, inputVolumeRef, outputVolumeRef, getInputVolume, getOutputVolume, className, resizeDebounce, }: AgentOrbCanvasProps): React$1.JSX.Element;
|
|
1597
|
+
|
|
1598
|
+
type AgentWidgetStatus = "idle" | "connecting" | "connected" | "error";
|
|
1599
|
+
type AgentWidgetMode = "listening" | "speaking" | null;
|
|
1600
|
+
interface AgentWidgetMessage {
|
|
1601
|
+
from: "user" | "assistant";
|
|
1602
|
+
text: string;
|
|
1603
|
+
}
|
|
1604
|
+
interface AgentWidgetProps {
|
|
1605
|
+
status?: AgentWidgetStatus;
|
|
1606
|
+
mode?: AgentWidgetMode;
|
|
1607
|
+
messages?: AgentWidgetMessage[];
|
|
1608
|
+
onSendMessage?: (text: string) => void;
|
|
1609
|
+
onEndSession?: () => void;
|
|
1610
|
+
inputMode?: "voice" | "text" | "voice+text";
|
|
1611
|
+
visualSlot?: React$1.ReactNode;
|
|
1612
|
+
assistantAvatarSlot?: React$1.ReactNode;
|
|
1613
|
+
header?: React$1.ReactNode;
|
|
1614
|
+
footer?: React$1.ReactNode;
|
|
1615
|
+
className?: string;
|
|
1616
|
+
}
|
|
1617
|
+
declare function AgentWidget({ status, mode, messages, onSendMessage, onEndSession, inputMode, visualSlot, assistantAvatarSlot, header, footer, className, }: AgentWidgetProps): React$1.JSX.Element;
|
|
1618
|
+
|
|
1619
|
+
type AgentPopoverStep = string;
|
|
1620
|
+
interface AgentPopoverContextValue {
|
|
1621
|
+
step: AgentPopoverStep;
|
|
1622
|
+
setStep: (step: AgentPopoverStep) => void;
|
|
1623
|
+
}
|
|
1624
|
+
declare function useAgentPopover(): AgentPopoverContextValue;
|
|
1625
|
+
interface AgentPopoverProps {
|
|
1626
|
+
open: boolean;
|
|
1627
|
+
onOpenChange: (open: boolean) => void;
|
|
1628
|
+
defaultStep?: string;
|
|
1629
|
+
step?: string;
|
|
1630
|
+
onStepChange?: (step: string) => void;
|
|
1631
|
+
children: React$1.ReactNode;
|
|
1632
|
+
className?: string;
|
|
1633
|
+
}
|
|
1634
|
+
declare function AgentPopover({ open, onOpenChange, defaultStep, step: controlledStep, onStepChange, children, className, }: AgentPopoverProps): React$1.JSX.Element | null;
|
|
1635
|
+
type ConnectionStatus = "ready" | "connected" | "listening" | "speaking";
|
|
1636
|
+
interface AgentPopoverBrandingProps {
|
|
1637
|
+
title?: string;
|
|
1638
|
+
subtitle?: string;
|
|
1639
|
+
badge?: string;
|
|
1640
|
+
visualSlot?: React$1.ReactNode;
|
|
1641
|
+
statusIndicator?: ConnectionStatus;
|
|
1642
|
+
className?: string;
|
|
1643
|
+
}
|
|
1644
|
+
declare function AgentPopoverBranding({ title, subtitle, badge, visualSlot, statusIndicator, className, }: AgentPopoverBrandingProps): React$1.JSX.Element;
|
|
1645
|
+
interface AgentPopoverStepContentProps {
|
|
1646
|
+
step: string;
|
|
1647
|
+
children: React$1.ReactNode;
|
|
1648
|
+
className?: string;
|
|
1649
|
+
}
|
|
1650
|
+
declare function AgentPopoverStepContent({ step, children, className }: AgentPopoverStepContentProps): React$1.JSX.Element | null;
|
|
1651
|
+
interface AgentPopoverFormField {
|
|
1652
|
+
name: string;
|
|
1653
|
+
label: string;
|
|
1654
|
+
type?: "text" | "email" | "tel" | "textarea";
|
|
1655
|
+
placeholder?: string;
|
|
1656
|
+
required?: boolean;
|
|
1657
|
+
}
|
|
1658
|
+
interface AgentPopoverFormProps {
|
|
1659
|
+
fields?: AgentPopoverFormField[];
|
|
1660
|
+
submitLabel?: string;
|
|
1661
|
+
onSubmit?: (values: Record<string, string>) => void;
|
|
1662
|
+
className?: string;
|
|
1663
|
+
children?: React$1.ReactNode;
|
|
1664
|
+
}
|
|
1665
|
+
declare function AgentPopoverForm({ fields, submitLabel, onSubmit, className, children, }: AgentPopoverFormProps): React$1.JSX.Element;
|
|
1666
|
+
interface AgentPopoverOverviewProps {
|
|
1667
|
+
userSummary?: Record<string, string>;
|
|
1668
|
+
discussionPoints?: string[];
|
|
1669
|
+
actions?: React$1.ReactNode;
|
|
1670
|
+
className?: string;
|
|
1671
|
+
}
|
|
1672
|
+
declare function AgentPopoverOverview({ userSummary, discussionPoints, actions, className, }: AgentPopoverOverviewProps): React$1.JSX.Element;
|
|
1673
|
+
interface AgentPopoverChatProps {
|
|
1674
|
+
messages?: AgentWidgetMessage[];
|
|
1675
|
+
onSendMessage?: (text: string) => void;
|
|
1676
|
+
onEndSession?: () => void;
|
|
1677
|
+
inputMode?: "voice" | "text" | "voice+text";
|
|
1678
|
+
visualSlot?: React$1.ReactNode;
|
|
1679
|
+
assistantAvatarSlot?: React$1.ReactNode;
|
|
1680
|
+
status?: AgentWidgetStatus;
|
|
1681
|
+
mode?: AgentWidgetMode;
|
|
1682
|
+
className?: string;
|
|
1683
|
+
}
|
|
1684
|
+
declare function AgentPopoverChat({ messages, onSendMessage, onEndSession, inputMode, visualSlot, assistantAvatarSlot, status, mode, className, }: AgentPopoverChatProps): React$1.JSX.Element;
|
|
1685
|
+
|
|
1686
|
+
export { type AccountFilterTab, type AccountsViewConfig, type ActiveVariant, ActivityDetail, type ActivityDetailData, type ActivityDetailProps, type ActivityItem, ActivityLog, type ActivityLogItem, type ActivityLogProps, type ActivityParticipant, ActivityRow, type ActivityThreadMessage, AgentOrb, AgentOrbCanvas, type AgentOrbProps, type AgentOrbState, AgentPopover, AgentPopoverBranding, type AgentPopoverBrandingProps, AgentPopoverChat, type AgentPopoverChatProps, type AgentPopoverContextValue, AgentPopoverForm, type AgentPopoverFormField, type AgentPopoverFormProps, AgentPopoverOverview, type AgentPopoverOverviewProps, type AgentPopoverProps, type AgentPopoverStep, AgentPopoverStepContent, type AgentPopoverStepContentProps, AgentWidget, type AgentWidgetMessage, type AgentWidgetMode, type AgentWidgetProps, type AgentWidgetStatus, 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 ConnectionStatus, 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, Message, MessageAvatar, type MessageAvatarProps, MessageContent, type MessageContentProps, type MessageProps, 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, SimpleDataTable, type SimpleDataTableProps, Skeleton, type SourceDef, SourceList, StatusBadge, type StatusBadgeProps, type StatusType, 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, useAgentPopover, useIsMobile, useScoreFeedback, useSidebar, useSignalApproval };
|