@handled-ai/design-system 0.8.0 → 0.9.0
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/README.md +14 -4
- package/dist/charts/bar-chart-component.d.ts +24 -0
- package/dist/charts/bar-chart-component.js +123 -0
- package/dist/charts/bar-chart-component.js.map +1 -0
- package/dist/charts/chart-tooltip.d.ts +26 -0
- package/dist/charts/chart-tooltip.js +69 -0
- package/dist/charts/chart-tooltip.js.map +1 -0
- package/dist/charts/chart.d.ts +64 -0
- package/dist/charts/chart.js +285 -0
- package/dist/charts/chart.js.map +1 -0
- package/dist/charts/donut-chart.d.ts +21 -0
- package/dist/charts/donut-chart.js +96 -0
- package/dist/charts/donut-chart.js.map +1 -0
- package/dist/charts/index.d.ts +11 -0
- package/dist/charts/index.js +10 -0
- package/dist/charts/index.js.map +1 -0
- package/dist/charts/pipeline-overview.d.ts +76 -0
- package/dist/charts/pipeline-overview.js +372 -0
- package/dist/charts/pipeline-overview.js.map +1 -0
- package/dist/charts/sankey-chart.d.ts +52 -0
- package/dist/charts/sankey-chart.js +219 -0
- package/dist/charts/sankey-chart.js.map +1 -0
- package/dist/charts/top-line-metrics.d.ts +26 -0
- package/dist/charts/top-line-metrics.js +224 -0
- package/dist/charts/top-line-metrics.js.map +1 -0
- package/dist/charts/trend-area-chart.d.ts +21 -0
- package/dist/charts/trend-area-chart.js +150 -0
- package/dist/charts/trend-area-chart.js.map +1 -0
- package/dist/charts/volume-analysis-chart.d.ts +19 -0
- package/dist/charts/volume-analysis-chart.js +121 -0
- package/dist/charts/volume-analysis-chart.js.map +1 -0
- package/dist/components/activity-detail.d.ts +38 -0
- package/dist/components/activity-detail.js +163 -0
- package/dist/components/activity-detail.js.map +1 -0
- package/dist/components/activity-log.d.ts +21 -0
- package/dist/components/activity-log.js +61 -0
- package/dist/components/activity-log.js.map +1 -0
- package/dist/components/agent-popover.d.ts +71 -0
- package/dist/components/agent-popover.js +282 -0
- package/dist/components/agent-popover.js.map +1 -0
- package/dist/components/agent-widget.d.ts +24 -0
- package/dist/components/agent-widget.js +117 -0
- package/dist/components/agent-widget.js.map +1 -0
- package/dist/components/avatar.d.ts +13 -0
- package/dist/components/avatar.js +140 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +12 -0
- package/dist/components/badge.js +75 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/button.d.ts +13 -0
- package/dist/components/button.js +83 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/card.d.ts +11 -0
- package/dist/components/card.js +119 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/contact-list.d.ts +34 -0
- package/dist/components/contact-list.js +84 -0
- package/dist/components/contact-list.js.map +1 -0
- package/dist/components/dashboard-cards.d.ts +10 -0
- package/dist/components/dashboard-cards.js +164 -0
- package/dist/components/dashboard-cards.js.map +1 -0
- package/dist/components/data-table-display.d.ts +19 -0
- package/dist/components/data-table-display.js +109 -0
- package/dist/components/data-table-display.js.map +1 -0
- package/dist/components/data-table-filter.d.ts +18 -0
- package/dist/components/data-table-filter.js +107 -0
- package/dist/components/data-table-filter.js.map +1 -0
- package/dist/components/data-table-quick-views.d.ts +13 -0
- package/dist/components/data-table-quick-views.js +90 -0
- package/dist/components/data-table-quick-views.js.map +1 -0
- package/dist/components/data-table-toolbar.d.ts +18 -0
- package/dist/components/data-table-toolbar.js +45 -0
- package/dist/components/data-table-toolbar.js.map +1 -0
- package/dist/components/data-table.d.ts +39 -0
- package/dist/components/data-table.js +821 -0
- package/dist/components/data-table.js.map +1 -0
- package/dist/components/detail-view.d.ts +44 -0
- package/dist/components/detail-view.js +165 -0
- package/dist/components/detail-view.js.map +1 -0
- package/dist/components/dialog.d.ts +19 -0
- package/dist/components/dialog.js +188 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +27 -0
- package/dist/components/dropdown-menu.js +279 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/entity-panel.d.ts +69 -0
- package/dist/components/entity-panel.js +584 -0
- package/dist/components/entity-panel.js.map +1 -0
- package/dist/components/inbox-row.d.ts +27 -0
- package/dist/components/inbox-row.js +139 -0
- package/dist/components/inbox-row.js.map +1 -0
- package/dist/components/inbox-toolbar.d.ts +21 -0
- package/dist/components/inbox-toolbar.js +203 -0
- package/dist/components/inbox-toolbar.js.map +1 -0
- package/dist/components/input.d.ts +5 -0
- package/dist/components/input.js +50 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/insights-filter-bar.d.ts +21 -0
- package/dist/components/insights-filter-bar.js +99 -0
- package/dist/components/insights-filter-bar.js.map +1 -0
- package/dist/components/item-list-display.d.ts +22 -0
- package/dist/components/item-list-display.js +240 -0
- package/dist/components/item-list-display.js.map +1 -0
- package/dist/components/item-list-filter.d.ts +16 -0
- package/dist/components/item-list-filter.js +87 -0
- package/dist/components/item-list-filter.js.map +1 -0
- package/dist/components/item-list-toolbar.d.ts +25 -0
- package/dist/components/item-list-toolbar.js +79 -0
- package/dist/components/item-list-toolbar.js.map +1 -0
- package/dist/components/item-list.d.ts +20 -0
- package/dist/components/item-list.js +702 -0
- package/dist/components/item-list.js.map +1 -0
- package/dist/components/label.d.ts +6 -0
- package/dist/components/label.js +55 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/message.d.ts +23 -0
- package/dist/components/message.js +117 -0
- package/dist/components/message.js.map +1 -0
- package/dist/components/metric-card.d.ts +25 -0
- package/dist/components/metric-card.js +107 -0
- package/dist/components/metric-card.js.map +1 -0
- package/dist/components/performance-metrics-table.d.ts +38 -0
- package/dist/components/performance-metrics-table.js +342 -0
- package/dist/components/performance-metrics-table.js.map +1 -0
- package/dist/components/preview-list.d.ts +14 -0
- package/dist/components/preview-list.js +83 -0
- package/dist/components/preview-list.js.map +1 -0
- package/dist/components/progress.d.ts +6 -0
- package/dist/components/progress.js +69 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/quick-action-chat-area.d.ts +24 -0
- package/dist/components/quick-action-chat-area.js +178 -0
- package/dist/components/quick-action-chat-area.js.map +1 -0
- package/dist/components/quick-action-modal.d.ts +30 -0
- package/dist/components/quick-action-modal.js +288 -0
- package/dist/components/quick-action-modal.js.map +1 -0
- package/dist/components/quick-action-sidebar-nav.d.ts +51 -0
- package/dist/components/quick-action-sidebar-nav.js +528 -0
- package/dist/components/quick-action-sidebar-nav.js.map +1 -0
- package/dist/components/recommended-actions-section.d.ts +23 -0
- package/dist/components/recommended-actions-section.js +215 -0
- package/dist/components/recommended-actions-section.js.map +1 -0
- package/dist/components/report-card.d.ts +26 -0
- package/dist/components/report-card.js +69 -0
- package/dist/components/report-card.js.map +1 -0
- package/dist/components/score-analysis-modal.d.ts +26 -0
- package/dist/components/score-analysis-modal.js +141 -0
- package/dist/components/score-analysis-modal.js.map +1 -0
- package/dist/components/score-breakdown.d.ts +17 -0
- package/dist/components/score-breakdown.js +162 -0
- package/dist/components/score-breakdown.js.map +1 -0
- package/dist/components/score-feedback.d.ts +40 -0
- package/dist/components/score-feedback.js +209 -0
- package/dist/components/score-feedback.js.map +1 -0
- package/dist/components/score-ring.d.ts +14 -0
- package/dist/components/score-ring.js +79 -0
- package/dist/components/score-ring.js.map +1 -0
- package/dist/components/scroll-area.d.ts +7 -0
- package/dist/components/scroll-area.js +101 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.d.ts +17 -0
- package/dist/components/select.js +228 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +6 -0
- package/dist/components/separator.js +61 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sheet.d.ts +16 -0
- package/dist/components/sheet.js +168 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/sidebar.d.ts +73 -0
- package/dist/components/sidebar.js +723 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/signal-feedback-inline.d.ts +51 -0
- package/dist/components/signal-feedback-inline.js +548 -0
- package/dist/components/signal-feedback-inline.js.map +1 -0
- package/dist/components/simple-data-table.d.ts +15 -0
- package/dist/components/simple-data-table.js +91 -0
- package/dist/components/simple-data-table.js.map +1 -0
- package/dist/components/skeleton.d.ts +5 -0
- package/dist/components/skeleton.js +44 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/status-badge.d.ts +10 -0
- package/dist/components/status-badge.js +82 -0
- package/dist/components/status-badge.js.map +1 -0
- package/dist/components/styled-bar-list.d.ts +20 -0
- package/dist/components/styled-bar-list.js +59 -0
- package/dist/components/styled-bar-list.js.map +1 -0
- package/dist/components/suggested-actions.d.ts +110 -0
- package/dist/components/suggested-actions.js +1538 -0
- package/dist/components/suggested-actions.js.map +1 -0
- package/dist/components/table.d.ts +12 -0
- package/dist/components/table.js +147 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +14 -0
- package/dist/components/tabs.js +129 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +5 -0
- package/dist/components/textarea.js +47 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/timeline-activity.d.ts +34 -0
- package/dist/components/timeline-activity.js +181 -0
- package/dist/components/timeline-activity.js.map +1 -0
- package/dist/components/tooltip.d.ts +9 -0
- package/dist/components/tooltip.js +93 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/view-mode-toggle.d.ts +16 -0
- package/dist/components/view-mode-toggle.js +24 -0
- package/dist/components/view-mode-toggle.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +21 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/index.d.ts +68 -1878
- package/dist/index.js +69 -10918
- package/dist/index.js.map +1 -1
- package/dist/lib/icons.d.ts +18 -0
- package/dist/lib/icons.js +21 -0
- package/dist/lib/icons.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/prototype/index.d.ts +20 -0
- package/dist/prototype/index.js +8 -0
- package/dist/prototype/index.js.map +1 -0
- package/dist/prototype/prototype-accounts-view.d.ts +22 -0
- package/dist/prototype/prototype-accounts-view.js +70 -0
- package/dist/prototype/prototype-accounts-view.js.map +1 -0
- package/dist/prototype/prototype-admin-view.d.ts +21 -0
- package/dist/prototype/prototype-admin-view.js +53 -0
- package/dist/prototype/prototype-admin-view.js.map +1 -0
- package/dist/prototype/prototype-config.d.ts +226 -0
- package/dist/prototype/prototype-config.js +1 -0
- package/dist/prototype/prototype-config.js.map +1 -0
- package/dist/prototype/prototype-inbox-view.d.ts +48 -0
- package/dist/prototype/prototype-inbox-view.js +701 -0
- package/dist/prototype/prototype-inbox-view.js.map +1 -0
- package/dist/prototype/prototype-insights-view.d.ts +23 -0
- package/dist/prototype/prototype-insights-view.js +335 -0
- package/dist/prototype/prototype-insights-view.js.map +1 -0
- package/dist/prototype/prototype-shell.d.ts +40 -0
- package/dist/prototype/prototype-shell.js +190 -0
- package/dist/prototype/prototype-shell.js.map +1 -0
- package/dist/prototype/prototype-work-queue-view.d.ts +8 -0
- package/dist/prototype/prototype-work-queue-view.js +17 -0
- package/dist/prototype/prototype-work-queue-view.js.map +1 -0
- package/dist/three/agent-orb.d.ts +39 -0
- package/dist/three/agent-orb.js +500 -0
- package/dist/three/agent-orb.js.map +1 -0
- package/dist/three/index.d.ts +2 -0
- package/dist/three/index.js +2 -0
- package/dist/three/index.js.map +1 -0
- package/package.json +98 -17
- package/src/charts/bar-chart-component.tsx +150 -0
- package/src/charts/chart-tooltip.tsx +86 -0
- package/src/charts/chart.tsx +371 -0
- package/src/charts/donut-chart.tsx +112 -0
- package/src/charts/index.ts +13 -0
- package/src/charts/pipeline-overview.tsx +476 -0
- package/src/charts/sankey-chart.tsx +290 -0
- package/src/charts/top-line-metrics.tsx +261 -0
- package/src/charts/trend-area-chart.tsx +150 -0
- package/src/charts/volume-analysis-chart.tsx +124 -0
- package/src/components/activity-detail.tsx +233 -0
- package/src/components/activity-log.tsx +89 -0
- package/src/components/agent-popover.tsx +373 -0
- package/src/components/agent-widget.tsx +163 -0
- package/src/components/avatar.tsx +109 -0
- package/src/components/badge.tsx +48 -0
- package/src/components/button.tsx +59 -0
- package/src/components/card.tsx +92 -0
- package/src/components/contact-list.tsx +121 -0
- package/src/components/dashboard-cards.tsx +170 -0
- package/src/components/data-table-display.tsx +139 -0
- package/src/components/data-table-filter.tsx +138 -0
- package/src/components/data-table-quick-views.tsx +103 -0
- package/src/components/data-table-toolbar.tsx +56 -0
- package/src/components/data-table.tsx +915 -0
- package/src/components/detail-view.tsx +237 -0
- package/src/components/dialog.tsx +158 -0
- package/src/components/dropdown-menu.tsx +257 -0
- package/src/components/entity-panel.tsx +767 -0
- package/src/components/inbox-row.tsx +132 -0
- package/src/components/inbox-toolbar.tsx +213 -0
- package/src/components/input.tsx +21 -0
- package/src/components/insights-filter-bar.tsx +132 -0
- package/src/components/item-list-display.tsx +278 -0
- package/src/components/item-list-filter.tsx +118 -0
- package/src/components/item-list-toolbar.tsx +97 -0
- package/src/components/item-list.tsx +843 -0
- package/src/components/label.tsx +24 -0
- package/src/components/message.tsx +83 -0
- package/src/components/metric-card.tsx +178 -0
- package/src/components/performance-metrics-table.tsx +442 -0
- package/src/components/preview-list.tsx +62 -0
- package/src/components/progress.tsx +31 -0
- package/src/components/quick-action-chat-area.tsx +156 -0
- package/src/components/quick-action-modal.tsx +331 -0
- package/src/components/quick-action-sidebar-nav.tsx +592 -0
- package/src/components/recommended-actions-section.tsx +258 -0
- package/src/components/report-card.tsx +106 -0
- package/src/components/score-analysis-modal.tsx +172 -0
- package/src/components/score-breakdown.tsx +179 -0
- package/src/components/score-feedback.tsx +288 -0
- package/src/components/score-ring.tsx +87 -0
- package/src/components/scroll-area.tsx +58 -0
- package/src/components/select.tsx +190 -0
- package/src/components/separator.tsx +28 -0
- package/src/components/sheet.tsx +143 -0
- package/src/components/sidebar.tsx +726 -0
- package/src/components/signal-feedback-inline.tsx +591 -0
- package/src/components/simple-data-table.tsx +124 -0
- package/src/components/skeleton.tsx +15 -0
- package/src/components/status-badge.tsx +63 -0
- package/src/components/styled-bar-list.tsx +70 -0
- package/src/components/suggested-actions.tsx +1985 -0
- package/src/components/table.tsx +116 -0
- package/src/components/tabs.tsx +91 -0
- package/src/components/textarea.tsx +18 -0
- package/src/components/timeline-activity.tsx +234 -0
- package/src/components/tooltip.tsx +57 -0
- package/src/components/view-mode-toggle.tsx +39 -0
- package/src/hooks/use-mobile.ts +21 -0
- package/src/index.ts +77 -0
- package/src/lib/icons.ts +18 -0
- package/src/lib/utils.ts +6 -0
- package/src/prototype/index.ts +11 -0
- package/src/prototype/prototype-accounts-view.tsx +112 -0
- package/src/prototype/prototype-admin-view.tsx +67 -0
- package/src/prototype/prototype-config.ts +243 -0
- package/src/prototype/prototype-inbox-view.tsx +810 -0
- package/src/prototype/prototype-insights-view.tsx +379 -0
- package/src/prototype/prototype-shell.tsx +219 -0
- package/src/prototype/prototype-work-queue-view.tsx +30 -0
- package/src/styles/globals.css +299 -0
- package/src/three/agent-orb.tsx +557 -0
- package/src/three/index.ts +5 -0
- package/src/types/r3f.d.ts +8 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
|
|
5
|
+
import { cn } from "../lib/utils"
|
|
6
|
+
|
|
7
|
+
function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|
8
|
+
return (
|
|
9
|
+
<div
|
|
10
|
+
data-slot="table-container"
|
|
11
|
+
className="relative w-full overflow-x-auto"
|
|
12
|
+
>
|
|
13
|
+
<table
|
|
14
|
+
data-slot="table"
|
|
15
|
+
className={cn("w-full caption-bottom text-sm", className)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
|
|
23
|
+
return (
|
|
24
|
+
<thead
|
|
25
|
+
data-slot="table-header"
|
|
26
|
+
className={cn("[&_tr]:border-b", className)}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
|
|
33
|
+
return (
|
|
34
|
+
<tbody
|
|
35
|
+
data-slot="table-body"
|
|
36
|
+
className={cn("[&_tr:last-child]:border-0", className)}
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
|
|
43
|
+
return (
|
|
44
|
+
<tfoot
|
|
45
|
+
data-slot="table-footer"
|
|
46
|
+
className={cn(
|
|
47
|
+
"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
|
|
48
|
+
className
|
|
49
|
+
)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
|
|
56
|
+
return (
|
|
57
|
+
<tr
|
|
58
|
+
data-slot="table-row"
|
|
59
|
+
className={cn(
|
|
60
|
+
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
61
|
+
className
|
|
62
|
+
)}
|
|
63
|
+
{...props}
|
|
64
|
+
/>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
|
|
69
|
+
return (
|
|
70
|
+
<th
|
|
71
|
+
data-slot="table-head"
|
|
72
|
+
className={cn(
|
|
73
|
+
"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
74
|
+
className
|
|
75
|
+
)}
|
|
76
|
+
{...props}
|
|
77
|
+
/>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
|
|
82
|
+
return (
|
|
83
|
+
<td
|
|
84
|
+
data-slot="table-cell"
|
|
85
|
+
className={cn(
|
|
86
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
87
|
+
className
|
|
88
|
+
)}
|
|
89
|
+
{...props}
|
|
90
|
+
/>
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function TableCaption({
|
|
95
|
+
className,
|
|
96
|
+
...props
|
|
97
|
+
}: React.ComponentProps<"caption">) {
|
|
98
|
+
return (
|
|
99
|
+
<caption
|
|
100
|
+
data-slot="table-caption"
|
|
101
|
+
className={cn("text-muted-foreground mt-4 text-sm", className)}
|
|
102
|
+
{...props}
|
|
103
|
+
/>
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export {
|
|
108
|
+
Table,
|
|
109
|
+
TableHeader,
|
|
110
|
+
TableBody,
|
|
111
|
+
TableFooter,
|
|
112
|
+
TableHead,
|
|
113
|
+
TableRow,
|
|
114
|
+
TableCell,
|
|
115
|
+
TableCaption,
|
|
116
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
5
|
+
import { Tabs as TabsPrimitive } from "radix-ui"
|
|
6
|
+
|
|
7
|
+
import { cn } from "../lib/utils"
|
|
8
|
+
|
|
9
|
+
function Tabs({
|
|
10
|
+
className,
|
|
11
|
+
orientation = "horizontal",
|
|
12
|
+
...props
|
|
13
|
+
}: React.ComponentProps<typeof TabsPrimitive.Root>) {
|
|
14
|
+
return (
|
|
15
|
+
<TabsPrimitive.Root
|
|
16
|
+
data-slot="tabs"
|
|
17
|
+
data-orientation={orientation}
|
|
18
|
+
orientation={orientation}
|
|
19
|
+
className={cn(
|
|
20
|
+
"group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",
|
|
21
|
+
className
|
|
22
|
+
)}
|
|
23
|
+
{...props}
|
|
24
|
+
/>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const tabsListVariants = cva(
|
|
29
|
+
"rounded-lg p-[3px] group-data-[orientation=horizontal]/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",
|
|
30
|
+
{
|
|
31
|
+
variants: {
|
|
32
|
+
variant: {
|
|
33
|
+
default: "bg-muted",
|
|
34
|
+
line: "gap-1 bg-transparent",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
variant: "default",
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
function TabsList({
|
|
44
|
+
className,
|
|
45
|
+
variant = "default",
|
|
46
|
+
...props
|
|
47
|
+
}: React.ComponentProps<typeof TabsPrimitive.List> &
|
|
48
|
+
VariantProps<typeof tabsListVariants>) {
|
|
49
|
+
return (
|
|
50
|
+
<TabsPrimitive.List
|
|
51
|
+
data-slot="tabs-list"
|
|
52
|
+
data-variant={variant}
|
|
53
|
+
className={cn(tabsListVariants({ variant }), className)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function TabsTrigger({
|
|
60
|
+
className,
|
|
61
|
+
...props
|
|
62
|
+
}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
|
|
63
|
+
return (
|
|
64
|
+
<TabsPrimitive.Trigger
|
|
65
|
+
data-slot="tabs-trigger"
|
|
66
|
+
className={cn(
|
|
67
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
68
|
+
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent",
|
|
69
|
+
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 data-[state=active]:text-foreground",
|
|
70
|
+
"after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",
|
|
71
|
+
className
|
|
72
|
+
)}
|
|
73
|
+
{...props}
|
|
74
|
+
/>
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function TabsContent({
|
|
79
|
+
className,
|
|
80
|
+
...props
|
|
81
|
+
}: React.ComponentProps<typeof TabsPrimitive.Content>) {
|
|
82
|
+
return (
|
|
83
|
+
<TabsPrimitive.Content
|
|
84
|
+
data-slot="tabs-content"
|
|
85
|
+
className={cn("flex-1 outline-none", className)}
|
|
86
|
+
{...props}
|
|
87
|
+
/>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
import { cn } from "../lib/utils"
|
|
4
|
+
|
|
5
|
+
function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
|
6
|
+
return (
|
|
7
|
+
<textarea
|
|
8
|
+
data-slot="textarea"
|
|
9
|
+
className={cn(
|
|
10
|
+
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
11
|
+
className
|
|
12
|
+
)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { Textarea }
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { cn } from "../lib/utils"
|
|
5
|
+
import { ChevronDown, ChevronUp, ExternalLink } from "lucide-react"
|
|
6
|
+
|
|
7
|
+
export interface TimelineEvent {
|
|
8
|
+
id: string
|
|
9
|
+
icon: React.ReactNode
|
|
10
|
+
title: React.ReactNode
|
|
11
|
+
time: string
|
|
12
|
+
preview?: React.ReactNode
|
|
13
|
+
email?: {
|
|
14
|
+
from: string
|
|
15
|
+
fromEmail?: string
|
|
16
|
+
to: string
|
|
17
|
+
cc?: string
|
|
18
|
+
bcc?: string
|
|
19
|
+
date?: string
|
|
20
|
+
subject?: string
|
|
21
|
+
body: React.ReactNode
|
|
22
|
+
}
|
|
23
|
+
content?: React.ReactNode
|
|
24
|
+
source?: {
|
|
25
|
+
label: string
|
|
26
|
+
url: string
|
|
27
|
+
}
|
|
28
|
+
defaultExpanded?: boolean
|
|
29
|
+
isInteractive?: boolean
|
|
30
|
+
onSourceClick?: () => void
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface TimelineActivityProps {
|
|
34
|
+
events: TimelineEvent[]
|
|
35
|
+
className?: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function TimelineActivity({ events, className }: TimelineActivityProps) {
|
|
39
|
+
return (
|
|
40
|
+
<div className={cn("space-y-0", className)}>
|
|
41
|
+
{events.map((event, index) => (
|
|
42
|
+
<TimelineItem
|
|
43
|
+
key={event.id}
|
|
44
|
+
event={event}
|
|
45
|
+
isLast={index === events.length - 1}
|
|
46
|
+
/>
|
|
47
|
+
))}
|
|
48
|
+
</div>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function TimelineItem({ event, isLast }: { event: TimelineEvent; isLast: boolean }) {
|
|
53
|
+
const [expanded, setExpanded] = React.useState(event.defaultExpanded ?? false)
|
|
54
|
+
const [showAllRecipients, setShowAllRecipients] = React.useState(false)
|
|
55
|
+
const hasContent = !!event.content
|
|
56
|
+
const hasEmail = !!event.email
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<div className="group relative flex gap-3.5">
|
|
60
|
+
{!isLast && (
|
|
61
|
+
<div className="absolute left-[9px] top-5 bottom-[-6px] w-px bg-border/60" />
|
|
62
|
+
)}
|
|
63
|
+
|
|
64
|
+
<div className="relative z-10 mt-1 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-background">
|
|
65
|
+
<div className="flex h-4.5 w-4.5 items-center justify-center rounded-full border border-border/60 bg-background text-muted-foreground ring-4 ring-background">
|
|
66
|
+
{event.icon}
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div className="flex-1 pb-5 pt-0.5">
|
|
71
|
+
<div className="flex min-w-0 flex-col gap-1 sm:flex-row sm:items-start sm:justify-between">
|
|
72
|
+
<div className="pr-4 text-[13px] leading-relaxed text-foreground">
|
|
73
|
+
{event.title}
|
|
74
|
+
</div>
|
|
75
|
+
<span className="mt-0.5 shrink-0 whitespace-nowrap text-[11px] text-muted-foreground/70">
|
|
76
|
+
{event.time}
|
|
77
|
+
</span>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
{(hasContent || hasEmail) && (
|
|
81
|
+
<div className="mt-2">
|
|
82
|
+
{event.isInteractive ? (
|
|
83
|
+
hasEmail ? (
|
|
84
|
+
<div className="overflow-hidden rounded-md border border-border/80 bg-muted/20">
|
|
85
|
+
<div
|
|
86
|
+
className={cn(
|
|
87
|
+
"px-3 py-2.5 text-sm",
|
|
88
|
+
!expanded && "cursor-pointer hover:bg-muted/30 transition-colors"
|
|
89
|
+
)}
|
|
90
|
+
onClick={() => !expanded && setExpanded(true)}
|
|
91
|
+
>
|
|
92
|
+
{expanded && event.email ? (
|
|
93
|
+
<div className="space-y-3">
|
|
94
|
+
<div>
|
|
95
|
+
<div className="flex items-center justify-between gap-4">
|
|
96
|
+
<div className="flex min-w-0 items-baseline gap-1.5">
|
|
97
|
+
<span className="font-semibold text-foreground text-[13px] whitespace-nowrap">{event.email.from}</span>
|
|
98
|
+
{event.email.fromEmail && (
|
|
99
|
+
<span className="text-muted-foreground/60 text-xs truncate">{event.email.fromEmail}</span>
|
|
100
|
+
)}
|
|
101
|
+
</div>
|
|
102
|
+
{event.email.date && (
|
|
103
|
+
<span className="shrink-0 text-xs text-muted-foreground/50 whitespace-nowrap">{event.email.date}</span>
|
|
104
|
+
)}
|
|
105
|
+
</div>
|
|
106
|
+
<div className="mt-0.5 flex items-center gap-1 text-xs text-muted-foreground">
|
|
107
|
+
<span className="truncate">
|
|
108
|
+
To {event.email.to}
|
|
109
|
+
{!showAllRecipients && (event.email.cc || event.email.bcc) ? (
|
|
110
|
+
<>, ...</>
|
|
111
|
+
) : null}
|
|
112
|
+
{showAllRecipients && event.email.cc ? (
|
|
113
|
+
<>, {event.email.cc}</>
|
|
114
|
+
) : null}
|
|
115
|
+
{showAllRecipients && event.email.bcc ? (
|
|
116
|
+
<> <span className="text-muted-foreground/40">bcc</span> {event.email.bcc}</>
|
|
117
|
+
) : null}
|
|
118
|
+
</span>
|
|
119
|
+
{(event.email.cc || event.email.bcc) && (
|
|
120
|
+
<button
|
|
121
|
+
type="button"
|
|
122
|
+
onClick={(e) => {
|
|
123
|
+
e.stopPropagation()
|
|
124
|
+
setShowAllRecipients((prev) => !prev)
|
|
125
|
+
}}
|
|
126
|
+
className="shrink-0 text-muted-foreground/40 hover:text-muted-foreground transition-colors"
|
|
127
|
+
>
|
|
128
|
+
<ChevronDown className={cn("h-3 w-3 transition-transform", showAllRecipients && "rotate-180")} />
|
|
129
|
+
</button>
|
|
130
|
+
)}
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<div className="whitespace-pre-line text-sm leading-relaxed text-foreground/90">
|
|
135
|
+
{event.email.body}
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<button
|
|
139
|
+
onClick={(e) => {
|
|
140
|
+
e.stopPropagation()
|
|
141
|
+
setExpanded(false)
|
|
142
|
+
}}
|
|
143
|
+
className="mt-2 flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground"
|
|
144
|
+
>
|
|
145
|
+
Show less <ChevronUp className="h-3 w-3" />
|
|
146
|
+
</button>
|
|
147
|
+
</div>
|
|
148
|
+
) : (
|
|
149
|
+
<div className="flex items-center justify-between gap-2 text-muted-foreground">
|
|
150
|
+
<span className="line-clamp-1 pr-3 text-[13px]">
|
|
151
|
+
<span className="text-muted-foreground">{event.email?.from}</span>
|
|
152
|
+
<span className="mx-1.5 text-muted-foreground/40">·</span>
|
|
153
|
+
{event.email?.subject ? (
|
|
154
|
+
<>
|
|
155
|
+
<span className="text-muted-foreground">{event.email.subject}</span>
|
|
156
|
+
<span className="mx-1.5 text-muted-foreground/40">·</span>
|
|
157
|
+
</>
|
|
158
|
+
) : null}
|
|
159
|
+
<span className="text-muted-foreground">{event.preview}</span>
|
|
160
|
+
</span>
|
|
161
|
+
<button className="flex shrink-0 items-center gap-1 text-[11px] font-semibold uppercase tracking-wider transition-colors hover:text-foreground">
|
|
162
|
+
Expand <ChevronDown className="h-3 w-3" />
|
|
163
|
+
</button>
|
|
164
|
+
</div>
|
|
165
|
+
)}
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
) : (
|
|
169
|
+
<div className="overflow-hidden rounded-md border border-border/80 bg-muted/20">
|
|
170
|
+
<div
|
|
171
|
+
className={cn(
|
|
172
|
+
"px-3 py-2.5 text-sm",
|
|
173
|
+
!expanded && "cursor-pointer hover:bg-muted/30 transition-colors"
|
|
174
|
+
)}
|
|
175
|
+
onClick={() => !expanded && setExpanded(true)}
|
|
176
|
+
>
|
|
177
|
+
{expanded ? (
|
|
178
|
+
<div className="space-y-2">
|
|
179
|
+
{event.content}
|
|
180
|
+
<div className="mt-2 flex items-center gap-3">
|
|
181
|
+
{event.source ? (
|
|
182
|
+
event.onSourceClick ? (
|
|
183
|
+
<button
|
|
184
|
+
type="button"
|
|
185
|
+
onClick={(e) => { e.stopPropagation(); event.onSourceClick?.(); }}
|
|
186
|
+
className="mr-auto inline-flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground"
|
|
187
|
+
>
|
|
188
|
+
Open in {event.source.label}
|
|
189
|
+
<ExternalLink className="h-3 w-3" />
|
|
190
|
+
</button>
|
|
191
|
+
) : (
|
|
192
|
+
<a
|
|
193
|
+
href={event.source.url}
|
|
194
|
+
target="_blank"
|
|
195
|
+
rel="noreferrer noopener"
|
|
196
|
+
className="mr-auto inline-flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground"
|
|
197
|
+
>
|
|
198
|
+
Open in {event.source.label}
|
|
199
|
+
<ExternalLink className="h-3 w-3" />
|
|
200
|
+
</a>
|
|
201
|
+
)
|
|
202
|
+
) : null}
|
|
203
|
+
<button
|
|
204
|
+
onClick={(e) => { e.stopPropagation(); setExpanded(false); }}
|
|
205
|
+
className="flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground"
|
|
206
|
+
>
|
|
207
|
+
Show less <ChevronUp className="h-3 w-3" />
|
|
208
|
+
</button>
|
|
209
|
+
</div>
|
|
210
|
+
</div>
|
|
211
|
+
) : (
|
|
212
|
+
<div className="flex items-center justify-between gap-2 text-muted-foreground">
|
|
213
|
+
<span className="line-clamp-1 pr-3">
|
|
214
|
+
{event.preview ?? event.content}
|
|
215
|
+
</span>
|
|
216
|
+
<button className="flex shrink-0 items-center gap-1 text-[11px] font-semibold uppercase tracking-wider transition-colors hover:text-foreground">
|
|
217
|
+
Expand <ChevronDown className="h-3 w-3" />
|
|
218
|
+
</button>
|
|
219
|
+
</div>
|
|
220
|
+
)}
|
|
221
|
+
</div>
|
|
222
|
+
</div>
|
|
223
|
+
)
|
|
224
|
+
) : (
|
|
225
|
+
<div className="pr-2 text-sm leading-relaxed text-muted-foreground">
|
|
226
|
+
{event.content}
|
|
227
|
+
</div>
|
|
228
|
+
)}
|
|
229
|
+
</div>
|
|
230
|
+
)}
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
)
|
|
234
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { Tooltip as TooltipPrimitive } from "radix-ui"
|
|
5
|
+
|
|
6
|
+
import { cn } from "../lib/utils"
|
|
7
|
+
|
|
8
|
+
function TooltipProvider({
|
|
9
|
+
delayDuration = 0,
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
|
|
12
|
+
return (
|
|
13
|
+
<TooltipPrimitive.Provider
|
|
14
|
+
data-slot="tooltip-provider"
|
|
15
|
+
delayDuration={delayDuration}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function Tooltip({
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Root>) {
|
|
24
|
+
return <TooltipPrimitive.Root data-slot="tooltip" {...props} />
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function TooltipTrigger({
|
|
28
|
+
...props
|
|
29
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
|
|
30
|
+
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function TooltipContent({
|
|
34
|
+
className,
|
|
35
|
+
sideOffset = 0,
|
|
36
|
+
children,
|
|
37
|
+
...props
|
|
38
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
|
|
39
|
+
return (
|
|
40
|
+
<TooltipPrimitive.Portal>
|
|
41
|
+
<TooltipPrimitive.Content
|
|
42
|
+
data-slot="tooltip-content"
|
|
43
|
+
sideOffset={sideOffset}
|
|
44
|
+
className={cn(
|
|
45
|
+
"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
46
|
+
className
|
|
47
|
+
)}
|
|
48
|
+
{...props}
|
|
49
|
+
>
|
|
50
|
+
{children}
|
|
51
|
+
<TooltipPrimitive.Arrow className="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
|
|
52
|
+
</TooltipPrimitive.Content>
|
|
53
|
+
</TooltipPrimitive.Portal>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { cn } from "../lib/utils"
|
|
5
|
+
|
|
6
|
+
export interface ViewMode {
|
|
7
|
+
id: string
|
|
8
|
+
icon: React.ReactNode
|
|
9
|
+
label: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ViewModeToggleProps {
|
|
13
|
+
modes: ViewMode[]
|
|
14
|
+
activeMode: string
|
|
15
|
+
onModeChange: (modeId: string) => void
|
|
16
|
+
className?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function ViewModeToggle({ modes, activeMode, onModeChange, className }: ViewModeToggleProps) {
|
|
20
|
+
return (
|
|
21
|
+
<div className={cn("flex items-center rounded-lg bg-muted p-0.5 gap-0.5", className)}>
|
|
22
|
+
{modes.map((mode) => (
|
|
23
|
+
<button
|
|
24
|
+
key={mode.id}
|
|
25
|
+
onClick={() => onModeChange(mode.id)}
|
|
26
|
+
title={mode.label}
|
|
27
|
+
className={cn(
|
|
28
|
+
"h-7 w-8 flex items-center justify-center rounded-md transition-all",
|
|
29
|
+
activeMode === mode.id
|
|
30
|
+
? "bg-background shadow-sm text-foreground"
|
|
31
|
+
: "text-muted-foreground hover:text-foreground hover:bg-muted/80"
|
|
32
|
+
)}
|
|
33
|
+
>
|
|
34
|
+
{mode.icon}
|
|
35
|
+
</button>
|
|
36
|
+
))}
|
|
37
|
+
</div>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
const MOBILE_BREAKPOINT = 768;
|
|
4
|
+
|
|
5
|
+
export function useIsMobile() {
|
|
6
|
+
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(
|
|
7
|
+
undefined,
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
React.useEffect(() => {
|
|
11
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
12
|
+
const onChange = () => {
|
|
13
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
14
|
+
};
|
|
15
|
+
mql.addEventListener("change", onChange);
|
|
16
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
17
|
+
return () => mql.removeEventListener("change", onChange);
|
|
18
|
+
}, []);
|
|
19
|
+
|
|
20
|
+
return !!isMobile;
|
|
21
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @handled-ai/design-system
|
|
3
|
+
* UI components and utilities (shadcn-style, New York)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// Utilities
|
|
7
|
+
export { cn } from "./lib/utils"
|
|
8
|
+
export { BRAND_ICONS } from "./lib/icons"
|
|
9
|
+
|
|
10
|
+
// Hooks
|
|
11
|
+
export { useIsMobile } from "./hooks/use-mobile"
|
|
12
|
+
|
|
13
|
+
// Components (light — no recharts/nivo/three transitive deps)
|
|
14
|
+
export * from "./components/activity-detail"
|
|
15
|
+
export * from "./components/activity-log"
|
|
16
|
+
export * from "./components/agent-popover"
|
|
17
|
+
export * from "./components/agent-widget"
|
|
18
|
+
export * from "./components/avatar"
|
|
19
|
+
export * from "./components/badge"
|
|
20
|
+
export * from "./components/button"
|
|
21
|
+
export * from "./components/card"
|
|
22
|
+
export * from "./components/contact-list"
|
|
23
|
+
export * from "./components/dashboard-cards"
|
|
24
|
+
export * from "./components/data-table"
|
|
25
|
+
export * from "./components/data-table-display"
|
|
26
|
+
export * from "./components/data-table-filter"
|
|
27
|
+
export * from "./components/data-table-quick-views"
|
|
28
|
+
export * from "./components/data-table-toolbar"
|
|
29
|
+
export * from "./components/detail-view"
|
|
30
|
+
export * from "./components/dialog"
|
|
31
|
+
export * from "./components/dropdown-menu"
|
|
32
|
+
export * from "./components/entity-panel"
|
|
33
|
+
export * from "./components/inbox-row"
|
|
34
|
+
export * from "./components/inbox-toolbar"
|
|
35
|
+
export * from "./components/input"
|
|
36
|
+
export * from "./components/insights-filter-bar"
|
|
37
|
+
export * from "./components/item-list"
|
|
38
|
+
export * from "./components/item-list-display"
|
|
39
|
+
export * from "./components/item-list-filter"
|
|
40
|
+
export * from "./components/item-list-toolbar"
|
|
41
|
+
export * from "./components/label"
|
|
42
|
+
export * from "./components/message"
|
|
43
|
+
export * from "./components/metric-card"
|
|
44
|
+
export * from "./components/performance-metrics-table"
|
|
45
|
+
export * from "./components/preview-list"
|
|
46
|
+
export * from "./components/progress"
|
|
47
|
+
export * from "./components/quick-action-chat-area"
|
|
48
|
+
export {
|
|
49
|
+
QuickActionModal,
|
|
50
|
+
type QuickActionPriority,
|
|
51
|
+
type QuickActionTaskDraft,
|
|
52
|
+
type QuickActionTemplate,
|
|
53
|
+
} from "./components/quick-action-modal"
|
|
54
|
+
export * from "./components/quick-action-sidebar-nav"
|
|
55
|
+
export * from "./components/recommended-actions-section"
|
|
56
|
+
export * from "./components/report-card"
|
|
57
|
+
export * from "./components/score-analysis-modal"
|
|
58
|
+
export * from "./components/score-breakdown"
|
|
59
|
+
export * from "./components/score-feedback"
|
|
60
|
+
export * from "./components/score-ring"
|
|
61
|
+
export * from "./components/scroll-area"
|
|
62
|
+
export * from "./components/select"
|
|
63
|
+
export * from "./components/separator"
|
|
64
|
+
export * from "./components/sheet"
|
|
65
|
+
export * from "./components/sidebar"
|
|
66
|
+
export * from "./components/signal-feedback-inline"
|
|
67
|
+
export * from "./components/simple-data-table"
|
|
68
|
+
export * from "./components/skeleton"
|
|
69
|
+
export * from "./components/status-badge"
|
|
70
|
+
export * from "./components/styled-bar-list"
|
|
71
|
+
export * from "./components/suggested-actions"
|
|
72
|
+
export * from "./components/table"
|
|
73
|
+
export * from "./components/tabs"
|
|
74
|
+
export * from "./components/textarea"
|
|
75
|
+
export * from "./components/timeline-activity"
|
|
76
|
+
export * from "./components/tooltip"
|
|
77
|
+
export * from "./components/view-mode-toggle"
|
package/src/lib/icons.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const SUPABASE_ICONS = "https://bqvtedneuaozpgcgcxow.supabase.co/storage/v1/object/public/media/Icons";
|
|
2
|
+
|
|
3
|
+
export const BRAND_ICONS = {
|
|
4
|
+
gdoc: `${SUPABASE_ICONS}/gdoc.a1.svg`,
|
|
5
|
+
gmail: {
|
|
6
|
+
icon: `${SUPABASE_ICONS}/gmail.icon.a1.svg`,
|
|
7
|
+
logo: `${SUPABASE_ICONS}/gmail.logo.a2.svg`,
|
|
8
|
+
},
|
|
9
|
+
gong: `${SUPABASE_ICONS}/gong.icon.a1.png`,
|
|
10
|
+
google: `${SUPABASE_ICONS}/google.icon.a1.svg`,
|
|
11
|
+
hubspot: `${SUPABASE_ICONS}/hubspot.icon.a1.svg`,
|
|
12
|
+
linkedin: `${SUPABASE_ICONS}/linkedin.icon.a1.svg`,
|
|
13
|
+
microsoft: `${SUPABASE_ICONS}/microsoft.icon.a1.svg`,
|
|
14
|
+
outlook: `${SUPABASE_ICONS}/outlook.icon.a2.svg`,
|
|
15
|
+
salesforce: `${SUPABASE_ICONS}/salesforce.icon.a1.svg`,
|
|
16
|
+
slack: `${SUPABASE_ICONS}/slack.icon.a1.svg`,
|
|
17
|
+
zendesk: `${SUPABASE_ICONS}/zendesk.icon.a1.svg`,
|
|
18
|
+
} as const;
|