@handled-ai/design-system 0.3.0 → 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
@@ -812,11 +812,13 @@ interface UserMenuItem {
812
812
  }>;
813
813
  destructive?: boolean;
814
814
  }
815
+ type ActiveVariant = "default" | "gradient";
815
816
  interface QuickActionSidebarNavProps extends React$1.ComponentProps<"aside"> {
816
817
  brandLabel?: string;
817
818
  brandSubtitle?: string;
818
819
  navSections?: SidebarNavSection[];
819
820
  activeItemId?: string;
821
+ activeVariant?: ActiveVariant;
820
822
  onNavigate?: (itemId: string) => void;
821
823
  user?: SidebarUserProfile;
822
824
  userMenuItems?: UserMenuItem[];
@@ -824,7 +826,7 @@ interface QuickActionSidebarNavProps extends React$1.ComponentProps<"aside"> {
824
826
  onCreateTask?: (draft: QuickActionTaskDraft) => void;
825
827
  defaultCollapsed?: boolean;
826
828
  }
827
- 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;
828
830
 
829
831
  interface RecommendedAction {
830
832
  id: string;
@@ -1487,8 +1489,14 @@ interface PrototypeShellProps {
1487
1489
  entityPanelChildren?: React$1.ReactNode | ((ctx: {
1488
1490
  onClose: () => void;
1489
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;
1490
1498
  }
1491
- declare function PrototypeShell({ config, headerActions, entityPanelChildren, }: PrototypeShellProps): React$1.JSX.Element;
1499
+ declare function PrototypeShell({ config, headerActions, entityPanelChildren, onNavigate, }: PrototypeShellProps): React$1.JSX.Element;
1492
1500
 
1493
1501
  interface PrototypeInboxViewProps extends InboxViewConfig {
1494
1502
  /** Extra ReactNode rendered at the end of the header bar (e.g. exit button). */
@@ -1517,4 +1525,4 @@ interface PrototypeWorkQueueViewProps {
1517
1525
  }
1518
1526
  declare function PrototypeWorkQueueView({ headerActions, }: PrototypeWorkQueueViewProps): React$1.JSX.Element;
1519
1527
 
1520
- export { type AccountFilterTab, type AccountsViewConfig, 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 };
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 };
package/dist/index.js CHANGED
@@ -5878,8 +5878,11 @@ function NavItemRow({
5878
5878
  item,
5879
5879
  isActive,
5880
5880
  isCollapsed,
5881
+ activeVariant = "default",
5881
5882
  onClick
5882
5883
  }) {
5884
+ const activeClasses = activeVariant === "gradient" ? "bg-gradient-to-r from-primary/10 to-transparent text-primary" : "bg-sidebar-accent text-sidebar-accent-foreground";
5885
+ const iconActiveClasses = activeVariant === "gradient" ? "text-primary" : "";
5883
5886
  const content = /* @__PURE__ */ React52.createElement(
5884
5887
  "button",
5885
5888
  {
@@ -5888,10 +5891,10 @@ function NavItemRow({
5888
5891
  className: cn(
5889
5892
  "flex w-full items-center gap-3 rounded-lg text-sm font-medium transition-colors",
5890
5893
  isCollapsed ? "justify-center p-2" : "px-3 py-2",
5891
- isActive ? "bg-sidebar-accent text-sidebar-accent-foreground" : "text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent"
5894
+ isActive ? activeClasses : "text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent"
5892
5895
  )
5893
5896
  },
5894
- /* @__PURE__ */ React52.createElement(item.icon, { className: cn("shrink-0", isCollapsed ? "w-5 h-5" : "w-4 h-4") }),
5897
+ /* @__PURE__ */ React52.createElement(item.icon, { className: cn("shrink-0", isCollapsed ? "w-5 h-5" : "w-4 h-4", isActive && iconActiveClasses) }),
5895
5898
  !isCollapsed && /* @__PURE__ */ React52.createElement("span", { className: "flex-1 truncate text-left" }, item.label)
5896
5899
  );
5897
5900
  if (isCollapsed) {
@@ -5903,6 +5906,7 @@ function NavSection({
5903
5906
  section,
5904
5907
  activeItemId,
5905
5908
  isCollapsed,
5909
+ activeVariant = "default",
5906
5910
  onNavigate
5907
5911
  }) {
5908
5912
  var _a;
@@ -5932,6 +5936,7 @@ function NavSection({
5932
5936
  item,
5933
5937
  isActive: activeItemId === item.id,
5934
5938
  isCollapsed,
5939
+ activeVariant,
5935
5940
  onClick: () => onNavigate == null ? void 0 : onNavigate(item.id)
5936
5941
  }
5937
5942
  )), !isCollapsed && section.moreItems && section.moreItems.length > 0 && /* @__PURE__ */ React52.createElement(DropdownMenu, null, /* @__PURE__ */ React52.createElement(DropdownMenuTrigger, { className: "flex items-center gap-3 w-full px-3 py-2 rounded-lg text-sm font-medium text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent transition-colors outline-none" }, /* @__PURE__ */ React52.createElement(MoreHorizontal, { className: "shrink-0 w-4 h-4" }), /* @__PURE__ */ React52.createElement("span", { className: "flex-1 text-left" }, "More")), /* @__PURE__ */ React52.createElement(DropdownMenuContent, { align: "start", side: "bottom", className: "w-48" }, section.moreItems.map((item) => /* @__PURE__ */ React52.createElement(
@@ -5950,6 +5955,7 @@ function NavSection({
5950
5955
  item,
5951
5956
  isActive: activeItemId === item.id,
5952
5957
  isCollapsed,
5958
+ activeVariant,
5953
5959
  onClick: () => onNavigate == null ? void 0 : onNavigate(item.id)
5954
5960
  }
5955
5961
  )))));
@@ -5961,6 +5967,7 @@ function QuickActionSidebarNav(_a) {
5961
5967
  brandSubtitle = "Placeholder",
5962
5968
  navSections = DEFAULT_NAV_SECTIONS,
5963
5969
  activeItemId = "inbox",
5970
+ activeVariant = "default",
5964
5971
  onNavigate,
5965
5972
  user = DEFAULT_USER,
5966
5973
  userMenuItems = DEFAULT_USER_MENU,
@@ -5973,6 +5980,7 @@ function QuickActionSidebarNav(_a) {
5973
5980
  "brandSubtitle",
5974
5981
  "navSections",
5975
5982
  "activeItemId",
5983
+ "activeVariant",
5976
5984
  "onNavigate",
5977
5985
  "user",
5978
5986
  "userMenuItems",
@@ -6024,6 +6032,7 @@ function QuickActionSidebarNav(_a) {
6024
6032
  section,
6025
6033
  activeItemId,
6026
6034
  isCollapsed,
6035
+ activeVariant,
6027
6036
  onNavigate
6028
6037
  }
6029
6038
  ));
@@ -9346,7 +9355,8 @@ var DEFAULT_ENTITY_SECTIONS = [
9346
9355
  function PrototypeShell({
9347
9356
  config,
9348
9357
  headerActions,
9349
- entityPanelChildren
9358
+ entityPanelChildren,
9359
+ onNavigate
9350
9360
  }) {
9351
9361
  var _a, _b, _c, _d, _e, _f, _g;
9352
9362
  const [currentView, setCurrentView] = React52.useState(config.defaultView);
@@ -9365,8 +9375,9 @@ function PrototypeShell({
9365
9375
  if (navigableViews.includes(id)) {
9366
9376
  setCurrentView(id);
9367
9377
  }
9378
+ onNavigate == null ? void 0 : onNavigate(id);
9368
9379
  },
9369
- [navigableViews]
9380
+ [navigableViews, onNavigate]
9370
9381
  );
9371
9382
  const handleOpenEntityPanel = React52.useCallback(() => setIsEntityPanelOpen(true), []);
9372
9383
  const handleOpenRecentActivity = React52.useCallback(() => {