@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.
Files changed (336) hide show
  1. package/README.md +14 -4
  2. package/dist/charts/bar-chart-component.d.ts +24 -0
  3. package/dist/charts/bar-chart-component.js +123 -0
  4. package/dist/charts/bar-chart-component.js.map +1 -0
  5. package/dist/charts/chart-tooltip.d.ts +26 -0
  6. package/dist/charts/chart-tooltip.js +69 -0
  7. package/dist/charts/chart-tooltip.js.map +1 -0
  8. package/dist/charts/chart.d.ts +64 -0
  9. package/dist/charts/chart.js +285 -0
  10. package/dist/charts/chart.js.map +1 -0
  11. package/dist/charts/donut-chart.d.ts +21 -0
  12. package/dist/charts/donut-chart.js +96 -0
  13. package/dist/charts/donut-chart.js.map +1 -0
  14. package/dist/charts/index.d.ts +11 -0
  15. package/dist/charts/index.js +10 -0
  16. package/dist/charts/index.js.map +1 -0
  17. package/dist/charts/pipeline-overview.d.ts +76 -0
  18. package/dist/charts/pipeline-overview.js +372 -0
  19. package/dist/charts/pipeline-overview.js.map +1 -0
  20. package/dist/charts/sankey-chart.d.ts +52 -0
  21. package/dist/charts/sankey-chart.js +219 -0
  22. package/dist/charts/sankey-chart.js.map +1 -0
  23. package/dist/charts/top-line-metrics.d.ts +26 -0
  24. package/dist/charts/top-line-metrics.js +224 -0
  25. package/dist/charts/top-line-metrics.js.map +1 -0
  26. package/dist/charts/trend-area-chart.d.ts +21 -0
  27. package/dist/charts/trend-area-chart.js +150 -0
  28. package/dist/charts/trend-area-chart.js.map +1 -0
  29. package/dist/charts/volume-analysis-chart.d.ts +19 -0
  30. package/dist/charts/volume-analysis-chart.js +121 -0
  31. package/dist/charts/volume-analysis-chart.js.map +1 -0
  32. package/dist/components/activity-detail.d.ts +38 -0
  33. package/dist/components/activity-detail.js +163 -0
  34. package/dist/components/activity-detail.js.map +1 -0
  35. package/dist/components/activity-log.d.ts +21 -0
  36. package/dist/components/activity-log.js +61 -0
  37. package/dist/components/activity-log.js.map +1 -0
  38. package/dist/components/agent-popover.d.ts +71 -0
  39. package/dist/components/agent-popover.js +282 -0
  40. package/dist/components/agent-popover.js.map +1 -0
  41. package/dist/components/agent-widget.d.ts +24 -0
  42. package/dist/components/agent-widget.js +117 -0
  43. package/dist/components/agent-widget.js.map +1 -0
  44. package/dist/components/avatar.d.ts +13 -0
  45. package/dist/components/avatar.js +140 -0
  46. package/dist/components/avatar.js.map +1 -0
  47. package/dist/components/badge.d.ts +12 -0
  48. package/dist/components/badge.js +75 -0
  49. package/dist/components/badge.js.map +1 -0
  50. package/dist/components/button.d.ts +13 -0
  51. package/dist/components/button.js +83 -0
  52. package/dist/components/button.js.map +1 -0
  53. package/dist/components/card.d.ts +11 -0
  54. package/dist/components/card.js +119 -0
  55. package/dist/components/card.js.map +1 -0
  56. package/dist/components/contact-list.d.ts +34 -0
  57. package/dist/components/contact-list.js +84 -0
  58. package/dist/components/contact-list.js.map +1 -0
  59. package/dist/components/dashboard-cards.d.ts +10 -0
  60. package/dist/components/dashboard-cards.js +164 -0
  61. package/dist/components/dashboard-cards.js.map +1 -0
  62. package/dist/components/data-table-display.d.ts +19 -0
  63. package/dist/components/data-table-display.js +109 -0
  64. package/dist/components/data-table-display.js.map +1 -0
  65. package/dist/components/data-table-filter.d.ts +18 -0
  66. package/dist/components/data-table-filter.js +107 -0
  67. package/dist/components/data-table-filter.js.map +1 -0
  68. package/dist/components/data-table-quick-views.d.ts +13 -0
  69. package/dist/components/data-table-quick-views.js +90 -0
  70. package/dist/components/data-table-quick-views.js.map +1 -0
  71. package/dist/components/data-table-toolbar.d.ts +18 -0
  72. package/dist/components/data-table-toolbar.js +45 -0
  73. package/dist/components/data-table-toolbar.js.map +1 -0
  74. package/dist/components/data-table.d.ts +39 -0
  75. package/dist/components/data-table.js +821 -0
  76. package/dist/components/data-table.js.map +1 -0
  77. package/dist/components/detail-view.d.ts +44 -0
  78. package/dist/components/detail-view.js +165 -0
  79. package/dist/components/detail-view.js.map +1 -0
  80. package/dist/components/dialog.d.ts +19 -0
  81. package/dist/components/dialog.js +188 -0
  82. package/dist/components/dialog.js.map +1 -0
  83. package/dist/components/dropdown-menu.d.ts +27 -0
  84. package/dist/components/dropdown-menu.js +279 -0
  85. package/dist/components/dropdown-menu.js.map +1 -0
  86. package/dist/components/entity-panel.d.ts +69 -0
  87. package/dist/components/entity-panel.js +584 -0
  88. package/dist/components/entity-panel.js.map +1 -0
  89. package/dist/components/inbox-row.d.ts +27 -0
  90. package/dist/components/inbox-row.js +139 -0
  91. package/dist/components/inbox-row.js.map +1 -0
  92. package/dist/components/inbox-toolbar.d.ts +21 -0
  93. package/dist/components/inbox-toolbar.js +203 -0
  94. package/dist/components/inbox-toolbar.js.map +1 -0
  95. package/dist/components/input.d.ts +5 -0
  96. package/dist/components/input.js +50 -0
  97. package/dist/components/input.js.map +1 -0
  98. package/dist/components/insights-filter-bar.d.ts +21 -0
  99. package/dist/components/insights-filter-bar.js +99 -0
  100. package/dist/components/insights-filter-bar.js.map +1 -0
  101. package/dist/components/item-list-display.d.ts +22 -0
  102. package/dist/components/item-list-display.js +240 -0
  103. package/dist/components/item-list-display.js.map +1 -0
  104. package/dist/components/item-list-filter.d.ts +16 -0
  105. package/dist/components/item-list-filter.js +87 -0
  106. package/dist/components/item-list-filter.js.map +1 -0
  107. package/dist/components/item-list-toolbar.d.ts +25 -0
  108. package/dist/components/item-list-toolbar.js +79 -0
  109. package/dist/components/item-list-toolbar.js.map +1 -0
  110. package/dist/components/item-list.d.ts +20 -0
  111. package/dist/components/item-list.js +702 -0
  112. package/dist/components/item-list.js.map +1 -0
  113. package/dist/components/label.d.ts +6 -0
  114. package/dist/components/label.js +55 -0
  115. package/dist/components/label.js.map +1 -0
  116. package/dist/components/message.d.ts +23 -0
  117. package/dist/components/message.js +117 -0
  118. package/dist/components/message.js.map +1 -0
  119. package/dist/components/metric-card.d.ts +25 -0
  120. package/dist/components/metric-card.js +107 -0
  121. package/dist/components/metric-card.js.map +1 -0
  122. package/dist/components/performance-metrics-table.d.ts +38 -0
  123. package/dist/components/performance-metrics-table.js +342 -0
  124. package/dist/components/performance-metrics-table.js.map +1 -0
  125. package/dist/components/preview-list.d.ts +14 -0
  126. package/dist/components/preview-list.js +83 -0
  127. package/dist/components/preview-list.js.map +1 -0
  128. package/dist/components/progress.d.ts +6 -0
  129. package/dist/components/progress.js +69 -0
  130. package/dist/components/progress.js.map +1 -0
  131. package/dist/components/quick-action-chat-area.d.ts +24 -0
  132. package/dist/components/quick-action-chat-area.js +178 -0
  133. package/dist/components/quick-action-chat-area.js.map +1 -0
  134. package/dist/components/quick-action-modal.d.ts +30 -0
  135. package/dist/components/quick-action-modal.js +288 -0
  136. package/dist/components/quick-action-modal.js.map +1 -0
  137. package/dist/components/quick-action-sidebar-nav.d.ts +51 -0
  138. package/dist/components/quick-action-sidebar-nav.js +528 -0
  139. package/dist/components/quick-action-sidebar-nav.js.map +1 -0
  140. package/dist/components/recommended-actions-section.d.ts +23 -0
  141. package/dist/components/recommended-actions-section.js +215 -0
  142. package/dist/components/recommended-actions-section.js.map +1 -0
  143. package/dist/components/report-card.d.ts +26 -0
  144. package/dist/components/report-card.js +69 -0
  145. package/dist/components/report-card.js.map +1 -0
  146. package/dist/components/score-analysis-modal.d.ts +26 -0
  147. package/dist/components/score-analysis-modal.js +141 -0
  148. package/dist/components/score-analysis-modal.js.map +1 -0
  149. package/dist/components/score-breakdown.d.ts +17 -0
  150. package/dist/components/score-breakdown.js +162 -0
  151. package/dist/components/score-breakdown.js.map +1 -0
  152. package/dist/components/score-feedback.d.ts +40 -0
  153. package/dist/components/score-feedback.js +209 -0
  154. package/dist/components/score-feedback.js.map +1 -0
  155. package/dist/components/score-ring.d.ts +14 -0
  156. package/dist/components/score-ring.js +79 -0
  157. package/dist/components/score-ring.js.map +1 -0
  158. package/dist/components/scroll-area.d.ts +7 -0
  159. package/dist/components/scroll-area.js +101 -0
  160. package/dist/components/scroll-area.js.map +1 -0
  161. package/dist/components/select.d.ts +17 -0
  162. package/dist/components/select.js +228 -0
  163. package/dist/components/select.js.map +1 -0
  164. package/dist/components/separator.d.ts +6 -0
  165. package/dist/components/separator.js +61 -0
  166. package/dist/components/separator.js.map +1 -0
  167. package/dist/components/sheet.d.ts +16 -0
  168. package/dist/components/sheet.js +168 -0
  169. package/dist/components/sheet.js.map +1 -0
  170. package/dist/components/sidebar.d.ts +73 -0
  171. package/dist/components/sidebar.js +723 -0
  172. package/dist/components/sidebar.js.map +1 -0
  173. package/dist/components/signal-feedback-inline.d.ts +51 -0
  174. package/dist/components/signal-feedback-inline.js +548 -0
  175. package/dist/components/signal-feedback-inline.js.map +1 -0
  176. package/dist/components/simple-data-table.d.ts +15 -0
  177. package/dist/components/simple-data-table.js +91 -0
  178. package/dist/components/simple-data-table.js.map +1 -0
  179. package/dist/components/skeleton.d.ts +5 -0
  180. package/dist/components/skeleton.js +44 -0
  181. package/dist/components/skeleton.js.map +1 -0
  182. package/dist/components/status-badge.d.ts +10 -0
  183. package/dist/components/status-badge.js +82 -0
  184. package/dist/components/status-badge.js.map +1 -0
  185. package/dist/components/styled-bar-list.d.ts +20 -0
  186. package/dist/components/styled-bar-list.js +59 -0
  187. package/dist/components/styled-bar-list.js.map +1 -0
  188. package/dist/components/suggested-actions.d.ts +110 -0
  189. package/dist/components/suggested-actions.js +1538 -0
  190. package/dist/components/suggested-actions.js.map +1 -0
  191. package/dist/components/table.d.ts +12 -0
  192. package/dist/components/table.js +147 -0
  193. package/dist/components/table.js.map +1 -0
  194. package/dist/components/tabs.d.ts +14 -0
  195. package/dist/components/tabs.js +129 -0
  196. package/dist/components/tabs.js.map +1 -0
  197. package/dist/components/textarea.d.ts +5 -0
  198. package/dist/components/textarea.js +47 -0
  199. package/dist/components/textarea.js.map +1 -0
  200. package/dist/components/timeline-activity.d.ts +34 -0
  201. package/dist/components/timeline-activity.js +181 -0
  202. package/dist/components/timeline-activity.js.map +1 -0
  203. package/dist/components/tooltip.d.ts +9 -0
  204. package/dist/components/tooltip.js +93 -0
  205. package/dist/components/tooltip.js.map +1 -0
  206. package/dist/components/view-mode-toggle.d.ts +16 -0
  207. package/dist/components/view-mode-toggle.js +24 -0
  208. package/dist/components/view-mode-toggle.js.map +1 -0
  209. package/dist/hooks/use-mobile.d.ts +3 -0
  210. package/dist/hooks/use-mobile.js +21 -0
  211. package/dist/hooks/use-mobile.js.map +1 -0
  212. package/dist/index.d.ts +68 -1878
  213. package/dist/index.js +69 -10918
  214. package/dist/index.js.map +1 -1
  215. package/dist/lib/icons.d.ts +18 -0
  216. package/dist/lib/icons.js +21 -0
  217. package/dist/lib/icons.js.map +1 -0
  218. package/dist/lib/utils.d.ts +5 -0
  219. package/dist/lib/utils.js +9 -0
  220. package/dist/lib/utils.js.map +1 -0
  221. package/dist/prototype/index.d.ts +20 -0
  222. package/dist/prototype/index.js +8 -0
  223. package/dist/prototype/index.js.map +1 -0
  224. package/dist/prototype/prototype-accounts-view.d.ts +22 -0
  225. package/dist/prototype/prototype-accounts-view.js +70 -0
  226. package/dist/prototype/prototype-accounts-view.js.map +1 -0
  227. package/dist/prototype/prototype-admin-view.d.ts +21 -0
  228. package/dist/prototype/prototype-admin-view.js +53 -0
  229. package/dist/prototype/prototype-admin-view.js.map +1 -0
  230. package/dist/prototype/prototype-config.d.ts +226 -0
  231. package/dist/prototype/prototype-config.js +1 -0
  232. package/dist/prototype/prototype-config.js.map +1 -0
  233. package/dist/prototype/prototype-inbox-view.d.ts +48 -0
  234. package/dist/prototype/prototype-inbox-view.js +701 -0
  235. package/dist/prototype/prototype-inbox-view.js.map +1 -0
  236. package/dist/prototype/prototype-insights-view.d.ts +23 -0
  237. package/dist/prototype/prototype-insights-view.js +335 -0
  238. package/dist/prototype/prototype-insights-view.js.map +1 -0
  239. package/dist/prototype/prototype-shell.d.ts +40 -0
  240. package/dist/prototype/prototype-shell.js +190 -0
  241. package/dist/prototype/prototype-shell.js.map +1 -0
  242. package/dist/prototype/prototype-work-queue-view.d.ts +8 -0
  243. package/dist/prototype/prototype-work-queue-view.js +17 -0
  244. package/dist/prototype/prototype-work-queue-view.js.map +1 -0
  245. package/dist/three/agent-orb.d.ts +39 -0
  246. package/dist/three/agent-orb.js +500 -0
  247. package/dist/three/agent-orb.js.map +1 -0
  248. package/dist/three/index.d.ts +2 -0
  249. package/dist/three/index.js +2 -0
  250. package/dist/three/index.js.map +1 -0
  251. package/package.json +98 -17
  252. package/src/charts/bar-chart-component.tsx +150 -0
  253. package/src/charts/chart-tooltip.tsx +86 -0
  254. package/src/charts/chart.tsx +371 -0
  255. package/src/charts/donut-chart.tsx +112 -0
  256. package/src/charts/index.ts +13 -0
  257. package/src/charts/pipeline-overview.tsx +476 -0
  258. package/src/charts/sankey-chart.tsx +290 -0
  259. package/src/charts/top-line-metrics.tsx +261 -0
  260. package/src/charts/trend-area-chart.tsx +150 -0
  261. package/src/charts/volume-analysis-chart.tsx +124 -0
  262. package/src/components/activity-detail.tsx +233 -0
  263. package/src/components/activity-log.tsx +89 -0
  264. package/src/components/agent-popover.tsx +373 -0
  265. package/src/components/agent-widget.tsx +163 -0
  266. package/src/components/avatar.tsx +109 -0
  267. package/src/components/badge.tsx +48 -0
  268. package/src/components/button.tsx +59 -0
  269. package/src/components/card.tsx +92 -0
  270. package/src/components/contact-list.tsx +121 -0
  271. package/src/components/dashboard-cards.tsx +170 -0
  272. package/src/components/data-table-display.tsx +139 -0
  273. package/src/components/data-table-filter.tsx +138 -0
  274. package/src/components/data-table-quick-views.tsx +103 -0
  275. package/src/components/data-table-toolbar.tsx +56 -0
  276. package/src/components/data-table.tsx +915 -0
  277. package/src/components/detail-view.tsx +237 -0
  278. package/src/components/dialog.tsx +158 -0
  279. package/src/components/dropdown-menu.tsx +257 -0
  280. package/src/components/entity-panel.tsx +767 -0
  281. package/src/components/inbox-row.tsx +132 -0
  282. package/src/components/inbox-toolbar.tsx +213 -0
  283. package/src/components/input.tsx +21 -0
  284. package/src/components/insights-filter-bar.tsx +132 -0
  285. package/src/components/item-list-display.tsx +278 -0
  286. package/src/components/item-list-filter.tsx +118 -0
  287. package/src/components/item-list-toolbar.tsx +97 -0
  288. package/src/components/item-list.tsx +843 -0
  289. package/src/components/label.tsx +24 -0
  290. package/src/components/message.tsx +83 -0
  291. package/src/components/metric-card.tsx +178 -0
  292. package/src/components/performance-metrics-table.tsx +442 -0
  293. package/src/components/preview-list.tsx +62 -0
  294. package/src/components/progress.tsx +31 -0
  295. package/src/components/quick-action-chat-area.tsx +156 -0
  296. package/src/components/quick-action-modal.tsx +331 -0
  297. package/src/components/quick-action-sidebar-nav.tsx +592 -0
  298. package/src/components/recommended-actions-section.tsx +258 -0
  299. package/src/components/report-card.tsx +106 -0
  300. package/src/components/score-analysis-modal.tsx +172 -0
  301. package/src/components/score-breakdown.tsx +179 -0
  302. package/src/components/score-feedback.tsx +288 -0
  303. package/src/components/score-ring.tsx +87 -0
  304. package/src/components/scroll-area.tsx +58 -0
  305. package/src/components/select.tsx +190 -0
  306. package/src/components/separator.tsx +28 -0
  307. package/src/components/sheet.tsx +143 -0
  308. package/src/components/sidebar.tsx +726 -0
  309. package/src/components/signal-feedback-inline.tsx +591 -0
  310. package/src/components/simple-data-table.tsx +124 -0
  311. package/src/components/skeleton.tsx +15 -0
  312. package/src/components/status-badge.tsx +63 -0
  313. package/src/components/styled-bar-list.tsx +70 -0
  314. package/src/components/suggested-actions.tsx +1985 -0
  315. package/src/components/table.tsx +116 -0
  316. package/src/components/tabs.tsx +91 -0
  317. package/src/components/textarea.tsx +18 -0
  318. package/src/components/timeline-activity.tsx +234 -0
  319. package/src/components/tooltip.tsx +57 -0
  320. package/src/components/view-mode-toggle.tsx +39 -0
  321. package/src/hooks/use-mobile.ts +21 -0
  322. package/src/index.ts +77 -0
  323. package/src/lib/icons.ts +18 -0
  324. package/src/lib/utils.ts +6 -0
  325. package/src/prototype/index.ts +11 -0
  326. package/src/prototype/prototype-accounts-view.tsx +112 -0
  327. package/src/prototype/prototype-admin-view.tsx +67 -0
  328. package/src/prototype/prototype-config.ts +243 -0
  329. package/src/prototype/prototype-inbox-view.tsx +810 -0
  330. package/src/prototype/prototype-insights-view.tsx +379 -0
  331. package/src/prototype/prototype-shell.tsx +219 -0
  332. package/src/prototype/prototype-work-queue-view.tsx +30 -0
  333. package/src/styles/globals.css +299 -0
  334. package/src/three/agent-orb.tsx +557 -0
  335. package/src/three/index.ts +5 -0
  336. package/src/types/r3f.d.ts +8 -0
@@ -0,0 +1,59 @@
1
+ import * as React from "react"
2
+ import { Slot } from "radix-ui"
3
+ import { cva, type VariantProps } from "class-variance-authority"
4
+
5
+ import { cn } from "../lib/utils"
6
+
7
+ const buttonVariants = cva(
8
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default:
13
+ "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
14
+ destructive:
15
+ "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
16
+ outline:
17
+ "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
18
+ secondary:
19
+ "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
20
+ ghost:
21
+ "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
22
+ link: "text-primary underline-offset-4 hover:underline",
23
+ },
24
+ size: {
25
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
26
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
27
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
28
+ icon: "size-9",
29
+ },
30
+ },
31
+ defaultVariants: {
32
+ variant: "default",
33
+ size: "default",
34
+ },
35
+ }
36
+ )
37
+
38
+ function Button({
39
+ className,
40
+ variant,
41
+ size,
42
+ asChild = false,
43
+ ...props
44
+ }: React.ComponentProps<"button"> &
45
+ VariantProps<typeof buttonVariants> & {
46
+ asChild?: boolean
47
+ }) {
48
+ const Comp = asChild ? Slot.Root : "button"
49
+
50
+ return (
51
+ <Comp
52
+ data-slot="button"
53
+ className={cn(buttonVariants({ variant, size, className }))}
54
+ {...props}
55
+ />
56
+ )
57
+ }
58
+
59
+ export { Button, buttonVariants }
@@ -0,0 +1,92 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "../lib/utils"
4
+
5
+ function Card({ className, ...props }: React.ComponentProps<"div">) {
6
+ return (
7
+ <div
8
+ data-slot="card"
9
+ className={cn(
10
+ "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
11
+ className
12
+ )}
13
+ {...props}
14
+ />
15
+ )
16
+ }
17
+
18
+ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
19
+ return (
20
+ <div
21
+ data-slot="card-header"
22
+ className={cn(
23
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
24
+ className
25
+ )}
26
+ {...props}
27
+ />
28
+ )
29
+ }
30
+
31
+ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
32
+ return (
33
+ <div
34
+ data-slot="card-title"
35
+ className={cn("leading-none font-semibold", className)}
36
+ {...props}
37
+ />
38
+ )
39
+ }
40
+
41
+ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
42
+ return (
43
+ <div
44
+ data-slot="card-description"
45
+ className={cn("text-muted-foreground text-sm", className)}
46
+ {...props}
47
+ />
48
+ )
49
+ }
50
+
51
+ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
52
+ return (
53
+ <div
54
+ data-slot="card-action"
55
+ className={cn(
56
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
57
+ className
58
+ )}
59
+ {...props}
60
+ />
61
+ )
62
+ }
63
+
64
+ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
65
+ return (
66
+ <div
67
+ data-slot="card-content"
68
+ className={cn("px-6", className)}
69
+ {...props}
70
+ />
71
+ )
72
+ }
73
+
74
+ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
75
+ return (
76
+ <div
77
+ data-slot="card-footer"
78
+ className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
79
+ {...props}
80
+ />
81
+ )
82
+ }
83
+
84
+ export {
85
+ Card,
86
+ CardHeader,
87
+ CardFooter,
88
+ CardTitle,
89
+ CardAction,
90
+ CardDescription,
91
+ CardContent,
92
+ }
@@ -0,0 +1,121 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Plus, X } from "lucide-react"
5
+ import { Badge } from "./badge"
6
+ import { Button } from "./button"
7
+
8
+ export interface ContactChannel {
9
+ type: "linkedin" | "gmail" | "salesforce" | "phone" | "custom"
10
+ icon: React.ReactNode
11
+ label?: string
12
+ onClick?: () => void
13
+ }
14
+
15
+ export interface ContactItem {
16
+ id: string
17
+ name: string
18
+ role: string
19
+ badge?: {
20
+ label: string
21
+ color?: "indigo" | "green" | "amber" | "red" | "muted"
22
+ }
23
+ channels?: ContactChannel[]
24
+ action?: {
25
+ label: string
26
+ onClick?: () => void
27
+ }
28
+ description?: string
29
+ onDismiss?: () => void
30
+ }
31
+
32
+ export interface ContactListProps {
33
+ title?: string
34
+ count?: string
35
+ contacts: ContactItem[]
36
+ onAdd?: () => void
37
+ addLabel?: string
38
+ }
39
+
40
+ const badgeColors: Record<string, string> = {
41
+ indigo: "bg-indigo-50 text-indigo-700 border-indigo-200 dark:bg-indigo-900/30 dark:text-indigo-300 dark:border-indigo-800",
42
+ green: "bg-green-50 text-green-700 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-800",
43
+ amber: "bg-amber-50 text-amber-700 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800",
44
+ red: "bg-red-50 text-red-700 border-red-200 dark:bg-red-900/30 dark:text-red-300 dark:border-red-800",
45
+ muted: "bg-muted text-muted-foreground border-border",
46
+ }
47
+
48
+ function ContactRow({ contact }: { contact: ContactItem }) {
49
+ return (
50
+ <div className="flex items-center justify-between gap-3 group py-2.5 border-b border-border/30 last:border-0 hover:bg-muted/20 -mx-2 px-2 rounded-sm transition-colors">
51
+ <div className="flex items-center gap-2.5 min-w-0">
52
+ {contact.badge && (
53
+ <Badge
54
+ variant="outline"
55
+ className={`shadow-none px-2 py-0 text-[11px] font-medium shrink-0 ${badgeColors[contact.badge.color ?? "muted"]}`}
56
+ >
57
+ {contact.badge.label}
58
+ </Badge>
59
+ )}
60
+ <span className="font-medium text-sm text-foreground truncate">{contact.name}</span>
61
+ <span className="text-muted-foreground text-sm shrink-0">&middot;</span>
62
+ <span className="text-muted-foreground text-sm truncate">{contact.role}</span>
63
+ </div>
64
+
65
+ <div className="flex items-center gap-1 shrink-0">
66
+ {contact.channels?.map((ch, i) => (
67
+ <button
68
+ key={i}
69
+ onClick={ch.onClick}
70
+ className="h-7 w-7 flex items-center justify-center hover:bg-muted rounded-md transition-colors"
71
+ title={ch.label}
72
+ >
73
+ {ch.icon}
74
+ </button>
75
+ ))}
76
+ {contact.action && (
77
+ <Button
78
+ size="sm"
79
+ className="bg-foreground text-background hover:bg-foreground/90 h-6 text-[11px] font-medium shadow-none ml-1"
80
+ onClick={contact.action.onClick}
81
+ >
82
+ <Plus className="w-3 h-3 mr-1" />
83
+ {contact.action.label}
84
+ </Button>
85
+ )}
86
+ {contact.onDismiss && (
87
+ <button
88
+ onClick={contact.onDismiss}
89
+ className="h-6 w-6 flex items-center justify-center text-muted-foreground/40 hover:text-foreground hover:bg-muted rounded-md transition-colors opacity-0 group-hover:opacity-100"
90
+ >
91
+ <X className="w-3 h-3" />
92
+ </button>
93
+ )}
94
+ </div>
95
+ </div>
96
+ )
97
+ }
98
+
99
+ export function ContactList({ title, count, contacts, onAdd, addLabel }: ContactListProps) {
100
+ return (
101
+ <div className="space-y-3">
102
+ <div className="flex items-center justify-between">
103
+ <h3 className="text-sm font-semibold text-foreground">{title}</h3>
104
+ <div className="flex items-center gap-3">
105
+ {count && <span className="text-xs text-muted-foreground">{count}</span>}
106
+ {onAdd && (
107
+ <Button variant="ghost" size="sm" onClick={onAdd} className="h-7 text-xs font-medium hover:bg-muted/50">
108
+ <Plus className="w-3.5 h-3.5 mr-1" /> {addLabel ?? "Add"}
109
+ </Button>
110
+ )}
111
+ </div>
112
+ </div>
113
+
114
+ <div className="space-y-0">
115
+ {contacts.map((contact) => (
116
+ <ContactRow key={contact.id} contact={contact} />
117
+ ))}
118
+ </div>
119
+ </div>
120
+ )
121
+ }
@@ -0,0 +1,170 @@
1
+ import * as React from "react"
2
+ import { Card, CardHeader, CardTitle, CardContent } from "./card"
3
+ import { Button } from "./button"
4
+ import { Badge } from "./badge"
5
+ import { PreviewList, PreviewListItem } from "./preview-list"
6
+ import { Square, Clock, Video, CheckCircle2, CheckSquare, Eye } from "lucide-react"
7
+
8
+ export function TopTasksCard({ onViewAll }: { onViewAll?: () => void }) {
9
+ return (
10
+ <Card className="rounded-xl border border-border shadow-sm overflow-hidden gap-0 py-0">
11
+ <CardHeader className="flex flex-row items-center justify-between pt-4 pb-3 px-6 border-b border-border bg-muted/20">
12
+ <CardTitle className="text-sm font-bold tracking-tight">Top Tasks</CardTitle>
13
+ <Button
14
+ variant="ghost"
15
+ size="sm"
16
+ onClick={onViewAll}
17
+ className="text-xs h-7 text-brand-purple hover:text-brand-purple/80 hover:bg-brand-purple/10"
18
+ >
19
+ View all tasks &rarr;
20
+ </Button>
21
+ </CardHeader>
22
+ <CardContent className="p-0">
23
+ <PreviewList>
24
+ <PreviewListItem
25
+ icon={<Square className="w-4 h-4 text-muted-foreground hover:text-brand-purple transition-colors" />}
26
+ title="Follow up with Lunchclub"
27
+ subtitle="Churn Mitigation"
28
+ meta={
29
+ <>
30
+ <span className="text-[11px] font-medium text-muted-foreground">Due in 2h</span>
31
+ <Badge variant="destructive" className="text-[10px] px-2 py-0 h-4 uppercase tracking-wider rounded-full shadow-none font-bold bg-foreground text-background hover:bg-foreground/90">Urgent</Badge>
32
+ </>
33
+ }
34
+ onClick={onViewAll}
35
+ />
36
+ <PreviewListItem
37
+ icon={<Square className="w-4 h-4 text-muted-foreground hover:text-brand-purple transition-colors" />}
38
+ title="Outbound opportunity: CloudKitchen"
39
+ subtitle="Outbound"
40
+ meta={<span className="text-[11px] font-medium text-muted-foreground">Due tomorrow</span>}
41
+ onClick={onViewAll}
42
+ />
43
+ <PreviewListItem
44
+ icon={<Square className="w-4 h-4 text-muted-foreground hover:text-brand-purple transition-colors" />}
45
+ title="New CFO welcome: Loom"
46
+ subtitle="Relationship"
47
+ meta={<span className="text-[11px] font-medium text-muted-foreground">Due next week</span>}
48
+ onClick={onViewAll}
49
+ />
50
+ </PreviewList>
51
+ </CardContent>
52
+ </Card>
53
+ )
54
+ }
55
+
56
+ export function UpcomingMeetingsCard() {
57
+ return (
58
+ <Card className="rounded-xl border border-border shadow-sm overflow-hidden gap-0 py-0">
59
+ <CardHeader className="flex flex-row items-center justify-between pt-4 pb-3 px-6 border-b border-border bg-muted/20">
60
+ <CardTitle className="text-sm font-bold tracking-tight">Upcoming Meetings</CardTitle>
61
+ <Button variant="ghost" size="sm" className="text-xs h-7 text-brand-purple hover:text-brand-purple/80 hover:bg-brand-purple/10">
62
+ View all meetings &rarr;
63
+ </Button>
64
+ </CardHeader>
65
+ <CardContent className="p-0">
66
+ <PreviewList>
67
+ <PreviewListItem
68
+ icon={<Clock className="w-4 h-4 text-blue-500" />}
69
+ title="Q3 Review - Acme Corp"
70
+ subtitle="2:00 PM - 3:00 PM"
71
+ meta={<span className="text-[11px] font-medium text-blue-600 bg-blue-50 px-2 py-0.5 rounded-full">Starts in 10 mins</span>}
72
+ action={
73
+ <Button size="sm" variant="outline" className="h-7 text-xs shadow-sm bg-background hover:bg-muted">
74
+ <Video className="w-3.5 h-3.5 mr-1.5" /> Join
75
+ </Button>
76
+ }
77
+ />
78
+ <PreviewListItem
79
+ icon={<Clock className="w-4 h-4 text-blue-500" />}
80
+ title="Initial Sync - Initech"
81
+ subtitle="4:30 PM - 5:00 PM"
82
+ action={
83
+ <Button size="sm" variant="outline" className="h-7 text-xs shadow-sm bg-background hover:bg-muted">
84
+ <Video className="w-3.5 h-3.5 mr-1.5" /> Join
85
+ </Button>
86
+ }
87
+ />
88
+ </PreviewList>
89
+ </CardContent>
90
+ </Card>
91
+ )
92
+ }
93
+
94
+ export function RecentlyCompletedCard() {
95
+ return (
96
+ <Card className="rounded-xl border border-border shadow-sm overflow-hidden opacity-80 bg-muted/5 gap-0 py-0">
97
+ <CardHeader className="flex flex-row items-center justify-between pt-4 pb-3 px-6 border-b border-border bg-muted/10">
98
+ <CardTitle className="text-sm font-bold tracking-tight text-muted-foreground">Recently Completed</CardTitle>
99
+ </CardHeader>
100
+ <CardContent className="p-0">
101
+ <PreviewList>
102
+ <PreviewListItem
103
+ icon={<CheckCircle2 className="w-4 h-4 text-emerald-500" />}
104
+ title={<span className="text-muted-foreground font-medium">Sync - Globex Inc</span>}
105
+ subtitle="10:00 AM"
106
+ action={
107
+ <Button size="sm" variant="outline" className="h-7 text-xs shadow-sm bg-background hover:bg-muted">
108
+ <Eye className="w-3.5 h-3.5 mr-1.5" /> View
109
+ </Button>
110
+ }
111
+ />
112
+ <PreviewListItem
113
+ icon={<CheckCircle2 className="w-4 h-4 text-emerald-500" />}
114
+ title={<span className="text-muted-foreground font-medium">Check-in - Pied Piper</span>}
115
+ subtitle="9:00 AM"
116
+ action={
117
+ <Button size="sm" variant="outline" className="h-7 text-xs shadow-sm bg-background hover:bg-muted">
118
+ <Eye className="w-3.5 h-3.5 mr-1.5" /> View
119
+ </Button>
120
+ }
121
+ />
122
+ </PreviewList>
123
+ </CardContent>
124
+ </Card>
125
+ )
126
+ }
127
+
128
+ export function CheckInsCard() {
129
+ return (
130
+ <Card className="rounded-xl border border-border shadow-sm overflow-hidden gap-0 py-0">
131
+ <CardHeader className="flex flex-row items-center justify-between pt-4 pb-3 px-6 border-b border-border bg-muted/20">
132
+ <CardTitle className="text-sm font-bold tracking-tight">Today&apos;s Check-ins</CardTitle>
133
+ </CardHeader>
134
+ <CardContent className="p-0">
135
+ <PreviewList>
136
+ <PreviewListItem
137
+ icon={
138
+ <div className="w-8 h-8 rounded-full bg-emerald-100 flex items-center justify-center shrink-0">
139
+ <CheckSquare className="w-4 h-4 text-emerald-600" />
140
+ </div>
141
+ }
142
+ title="Morning Standup"
143
+ subtitle="9:00 AM"
144
+ meta={<Badge variant="secondary" className="bg-emerald-50 text-emerald-700 hover:bg-emerald-100 shadow-none border-transparent font-semibold text-[10px]">Done</Badge>}
145
+ action={
146
+ <Button size="sm" variant="outline" className="h-7 text-xs shadow-sm bg-background hover:bg-muted">
147
+ <Eye className="w-3.5 h-3.5 mr-1.5" /> View
148
+ </Button>
149
+ }
150
+ />
151
+ <PreviewListItem
152
+ icon={
153
+ <div className="w-8 h-8 rounded-full bg-muted flex items-center justify-center shrink-0">
154
+ <Clock className="w-4 h-4 text-muted-foreground" />
155
+ </div>
156
+ }
157
+ title="Evening Wrap-up"
158
+ subtitle="5:00 PM"
159
+ meta={<Badge variant="outline" className="text-muted-foreground shadow-none font-semibold text-[10px]">Pending</Badge>}
160
+ action={
161
+ <Button size="sm" variant="outline" className="h-7 text-xs shadow-sm bg-background hover:bg-muted">
162
+ <CheckSquare className="w-3.5 h-3.5 mr-1.5" /> Complete
163
+ </Button>
164
+ }
165
+ />
166
+ </PreviewList>
167
+ </CardContent>
168
+ </Card>
169
+ )
170
+ }
@@ -0,0 +1,139 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { ArrowDown, ArrowUp, ArrowUpDown, LayoutGrid } from "lucide-react"
5
+ import type { SortingState } from "@tanstack/react-table"
6
+
7
+ import { cn } from "../lib/utils"
8
+ import { Button } from "./button"
9
+ import {
10
+ DropdownMenu,
11
+ DropdownMenuContent,
12
+ DropdownMenuTrigger,
13
+ } from "./dropdown-menu"
14
+ import {
15
+ Select,
16
+ SelectContent,
17
+ SelectItem,
18
+ SelectTrigger,
19
+ SelectValue,
20
+ } from "./select"
21
+
22
+ export interface DataTableDisplayColumn {
23
+ id: string
24
+ label: string
25
+ visible: boolean
26
+ canHide: boolean
27
+ }
28
+
29
+ interface DataTableDisplayProps {
30
+ sorting: SortingState
31
+ onSortingChange: (next: SortingState) => void
32
+ columns: DataTableDisplayColumn[]
33
+ onToggleColumn: (columnId: string) => void
34
+ onReset: () => void
35
+ }
36
+
37
+ export function DataTableDisplay({
38
+ sorting,
39
+ onSortingChange,
40
+ columns,
41
+ onToggleColumn,
42
+ onReset,
43
+ }: DataTableDisplayProps) {
44
+ const sortableColumns = columns
45
+ const currentSortId = sorting[0]?.id ?? sortableColumns[0]?.id ?? ""
46
+ const isDescending = Boolean(sorting[0]?.desc)
47
+
48
+ return (
49
+ <DropdownMenu>
50
+ <DropdownMenuTrigger asChild>
51
+ <Button
52
+ variant="outline"
53
+ size="sm"
54
+ className="h-8 gap-2 rounded-md border-border/60 bg-background text-xs font-normal shadow-none hover:bg-muted/50"
55
+ >
56
+ <LayoutGrid className="h-3.5 w-3.5" />
57
+ Display
58
+ </Button>
59
+ </DropdownMenuTrigger>
60
+ <DropdownMenuContent align="end" className="w-[320px] p-4">
61
+ <div className="space-y-4">
62
+ <div className="space-y-2">
63
+ <span className="flex items-center gap-1.5 text-xs font-semibold text-foreground">
64
+ <ArrowUpDown className="h-3.5 w-3.5" />
65
+ Sorting
66
+ </span>
67
+ <div className="flex items-center gap-2">
68
+ <Select
69
+ value={currentSortId}
70
+ onValueChange={(value) =>
71
+ onSortingChange([{ id: value, desc: sorting[0]?.desc ?? false }])
72
+ }
73
+ >
74
+ <SelectTrigger className="h-8 w-full text-xs">
75
+ <SelectValue placeholder="Sort by..." />
76
+ </SelectTrigger>
77
+ <SelectContent>
78
+ {sortableColumns.map((column) => (
79
+ <SelectItem key={column.id} value={column.id} className="text-xs">
80
+ {column.label}
81
+ </SelectItem>
82
+ ))}
83
+ </SelectContent>
84
+ </Select>
85
+ <Button
86
+ variant="outline"
87
+ size="icon"
88
+ className="h-8 w-8 shrink-0"
89
+ onClick={() =>
90
+ onSortingChange([{ id: currentSortId, desc: !isDescending }])
91
+ }
92
+ disabled={!currentSortId}
93
+ >
94
+ {isDescending ? (
95
+ <ArrowDown className="h-3.5 w-3.5" />
96
+ ) : (
97
+ <ArrowUp className="h-3.5 w-3.5" />
98
+ )}
99
+ </Button>
100
+ </div>
101
+ </div>
102
+
103
+ <div className="space-y-2">
104
+ <span className="text-xs font-medium text-muted-foreground">
105
+ Display properties
106
+ </span>
107
+ <div className="flex flex-wrap gap-2">
108
+ {columns.map((column) => (
109
+ <button
110
+ key={column.id}
111
+ disabled={!column.canHide}
112
+ onClick={() => onToggleColumn(column.id)}
113
+ className={cn(
114
+ "rounded-md border px-2.5 py-1 text-[11px] font-medium transition-all",
115
+ column.visible
116
+ ? "border-brand-purple/30 bg-brand-purple/10 text-brand-purple"
117
+ : "border-border bg-muted/40 text-muted-foreground hover:bg-muted hover:text-foreground",
118
+ !column.canHide && "cursor-not-allowed opacity-50"
119
+ )}
120
+ >
121
+ {column.label}
122
+ </button>
123
+ ))}
124
+ </div>
125
+ </div>
126
+
127
+ <div className="mt-2 flex items-center justify-start border-t border-border pt-2">
128
+ <button
129
+ className="text-[10px] font-medium text-muted-foreground transition-colors hover:text-foreground"
130
+ onClick={onReset}
131
+ >
132
+ Reset
133
+ </button>
134
+ </div>
135
+ </div>
136
+ </DropdownMenuContent>
137
+ </DropdownMenu>
138
+ )
139
+ }