@handled-ai/design-system 0.9.24 → 0.9.26

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.
@@ -3,6 +3,7 @@
3
3
  import * as React from "react"
4
4
  import {
5
5
  ArrowLeft,
6
+ ArrowUpDown,
6
7
  ChevronDown,
7
8
  ChevronRight,
8
9
  Filter,
@@ -19,6 +20,13 @@ import {
19
20
  Tag,
20
21
  } from "lucide-react"
21
22
 
23
+ import {
24
+ DropdownMenu,
25
+ DropdownMenuContent,
26
+ DropdownMenuRadioGroup,
27
+ DropdownMenuRadioItem,
28
+ DropdownMenuTrigger,
29
+ } from "../components/dropdown-menu"
22
30
  import { Button } from "../components/button"
23
31
  import { Badge } from "../components/badge"
24
32
  import { Input } from "../components/input"
@@ -424,6 +432,9 @@ export function PrototypeInboxView({
424
432
  hideApproveButton,
425
433
  signalBriefCopy,
426
434
  renderDetailExtra,
435
+ sortOptions,
436
+ activeSortId,
437
+ onSortChange,
427
438
  }: PrototypeInboxViewProps) {
428
439
  const [inboxViewMode, setInboxViewMode] = React.useState<"inbox" | "list" | "detail">(
429
440
  defaultViewMode === "list" ? "list" : defaultViewMode === "split" ? "inbox" : "inbox"
@@ -583,7 +594,12 @@ export function PrototypeInboxView({
583
594
  const renderInboxRow = React.useCallback(
584
595
  (item: QueueItem) => (
585
596
  <>
586
- <span className={`h-2 w-2 shrink-0 rounded-full ${item.statusColor === "red" ? "bg-[#f43f5e]" : "bg-[#3b82f6]"}`} />
597
+ <span className={`h-2 w-2 shrink-0 rounded-full ${
598
+ item.statusColor === "red" ? "bg-[#f43f5e]"
599
+ : item.statusColor === "yellow" || item.statusColor === "amber" || item.statusColor === "orange" ? "bg-[#eab308]"
600
+ : item.statusColor === "green" ? "bg-[#22c55e]"
601
+ : "bg-[#9ca3af]"
602
+ }`} />
587
603
  <span className="w-[80px] shrink-0 font-mono text-xs text-muted-foreground/80">{item.id}</span>
588
604
  <span className="shrink-0 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground whitespace-nowrap">{item.tag1}</span>
589
605
  <span className="min-w-0 flex-1 truncate text-sm font-semibold text-foreground">{item.title}</span>
@@ -744,6 +760,26 @@ export function PrototypeInboxView({
744
760
  onChange={(e: React.ChangeEvent<HTMLInputElement>) => setSplitViewSearch(e.target.value)}
745
761
  />
746
762
  </div>
763
+ {sortOptions && sortOptions.length > 0 && (
764
+ <DropdownMenu>
765
+ <DropdownMenuTrigger asChild>
766
+ <Button variant="outline" size="sm" className="h-8 text-xs font-medium rounded-md shadow-none gap-1.5">
767
+ <ArrowUpDown className="w-3.5 h-3.5" />
768
+ {sortOptions.find(o => o.id === activeSortId)?.label ?? 'Sort'}
769
+ <ChevronDown className="w-3 h-3" />
770
+ </Button>
771
+ </DropdownMenuTrigger>
772
+ <DropdownMenuContent align="end">
773
+ <DropdownMenuRadioGroup value={activeSortId ?? ''} onValueChange={(val) => onSortChange?.(val)}>
774
+ {sortOptions.map(option => (
775
+ <DropdownMenuRadioItem key={option.id} value={option.id}>
776
+ {option.label}
777
+ </DropdownMenuRadioItem>
778
+ ))}
779
+ </DropdownMenuRadioGroup>
780
+ </DropdownMenuContent>
781
+ </DropdownMenu>
782
+ )}
747
783
  {!hideAccountsButton && (
748
784
  <Button variant="outline" size="sm" className="h-8 text-xs font-medium rounded-md shadow-none">
749
785
  <Building className="w-3.5 h-3.5 mr-1.5" /> {accountDetailsLabel ?? "Accounts"}
@@ -805,7 +841,12 @@ export function PrototypeInboxView({
805
841
  <span className="ml-auto shrink-0 text-[10px] font-medium text-muted-foreground/80">{item.time}</span>
806
842
  </div>
807
843
  <div className="flex items-start gap-2 mt-2">
808
- <span className={`w-1.5 h-1.5 rounded-full shrink-0 mt-1.5 ${item.statusColor === "red" ? "bg-[#f43f5e]" : "bg-[#3b82f6]"}`} />
844
+ <span className={`w-1.5 h-1.5 rounded-full shrink-0 mt-1.5 ${
845
+ item.statusColor === "red" ? "bg-[#f43f5e]"
846
+ : item.statusColor === "yellow" || item.statusColor === "amber" || item.statusColor === "orange" ? "bg-[#eab308]"
847
+ : item.statusColor === "green" ? "bg-[#22c55e]"
848
+ : "bg-[#9ca3af]"
849
+ }`} />
809
850
  <span className="text-xs text-muted-foreground leading-tight">{item.details}</span>
810
851
  </div>
811
852
  {buildEntityChips && (() => {