@major-tech/ui 0.0.0-stage → 1.0.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 (495) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/THIRD_PARTY_NOTICES.md +27 -0
  3. package/dist/components/accordion.d.ts +33 -0
  4. package/dist/components/accordion.d.ts.map +1 -0
  5. package/dist/components/accordion.js +51 -0
  6. package/dist/components/accordion.js.map +1 -0
  7. package/dist/components/activity-chart.d.ts +26 -0
  8. package/dist/components/activity-chart.d.ts.map +1 -0
  9. package/dist/components/activity-chart.js +56 -0
  10. package/dist/components/activity-chart.js.map +1 -0
  11. package/dist/components/alert-dialog.d.ts +28 -0
  12. package/dist/components/alert-dialog.d.ts.map +1 -0
  13. package/dist/components/alert-dialog.js +51 -0
  14. package/dist/components/alert-dialog.js.map +1 -0
  15. package/dist/components/alert.d.ts +34 -0
  16. package/dist/components/alert.d.ts.map +1 -0
  17. package/dist/components/alert.js +59 -0
  18. package/dist/components/alert.js.map +1 -0
  19. package/dist/components/ask-user-question.d.ts +103 -0
  20. package/dist/components/ask-user-question.d.ts.map +1 -0
  21. package/dist/components/ask-user-question.js +401 -0
  22. package/dist/components/ask-user-question.js.map +1 -0
  23. package/dist/components/attachment-gallery.d.ts +137 -0
  24. package/dist/components/attachment-gallery.d.ts.map +1 -0
  25. package/dist/components/attachment-gallery.js +317 -0
  26. package/dist/components/attachment-gallery.js.map +1 -0
  27. package/dist/components/avatar.d.ts +37 -0
  28. package/dist/components/avatar.d.ts.map +1 -0
  29. package/dist/components/avatar.js +62 -0
  30. package/dist/components/avatar.js.map +1 -0
  31. package/dist/components/badge.d.ts +29 -0
  32. package/dist/components/badge.d.ts.map +1 -0
  33. package/dist/components/badge.js +50 -0
  34. package/dist/components/badge.js.map +1 -0
  35. package/dist/components/brand-tile.d.ts +33 -0
  36. package/dist/components/brand-tile.d.ts.map +1 -0
  37. package/dist/components/brand-tile.js +36 -0
  38. package/dist/components/brand-tile.js.map +1 -0
  39. package/dist/components/button.d.ts +51 -0
  40. package/dist/components/button.d.ts.map +1 -0
  41. package/dist/components/button.js +90 -0
  42. package/dist/components/button.js.map +1 -0
  43. package/dist/components/calendar.d.ts +18 -0
  44. package/dist/components/calendar.d.ts.map +1 -0
  45. package/dist/components/calendar.js +78 -0
  46. package/dist/components/calendar.js.map +1 -0
  47. package/dist/components/card.d.ts +18 -0
  48. package/dist/components/card.d.ts.map +1 -0
  49. package/dist/components/card.js +34 -0
  50. package/dist/components/card.js.map +1 -0
  51. package/dist/components/carousel.d.ts +48 -0
  52. package/dist/components/carousel.d.ts.map +1 -0
  53. package/dist/components/carousel.js +227 -0
  54. package/dist/components/carousel.js.map +1 -0
  55. package/dist/components/catalog-card.d.ts +29 -0
  56. package/dist/components/catalog-card.d.ts.map +1 -0
  57. package/dist/components/catalog-card.js +20 -0
  58. package/dist/components/catalog-card.js.map +1 -0
  59. package/dist/components/chart.d.ts +118 -0
  60. package/dist/components/chart.d.ts.map +1 -0
  61. package/dist/components/chart.js +209 -0
  62. package/dist/components/chart.js.map +1 -0
  63. package/dist/components/checkbox.d.ts +8 -0
  64. package/dist/components/checkbox.d.ts.map +1 -0
  65. package/dist/components/checkbox.js +14 -0
  66. package/dist/components/checkbox.js.map +1 -0
  67. package/dist/components/chip.d.ts +68 -0
  68. package/dist/components/chip.d.ts.map +1 -0
  69. package/dist/components/chip.js +100 -0
  70. package/dist/components/chip.js.map +1 -0
  71. package/dist/components/code-block.d.ts +99 -0
  72. package/dist/components/code-block.d.ts.map +1 -0
  73. package/dist/components/code-block.js +144 -0
  74. package/dist/components/code-block.js.map +1 -0
  75. package/dist/components/collapsible.d.ts +17 -0
  76. package/dist/components/collapsible.d.ts.map +1 -0
  77. package/dist/components/collapsible.js +25 -0
  78. package/dist/components/collapsible.js.map +1 -0
  79. package/dist/components/command.d.ts +51 -0
  80. package/dist/components/command.d.ts.map +1 -0
  81. package/dist/components/command.js +120 -0
  82. package/dist/components/command.js.map +1 -0
  83. package/dist/components/composer.d.ts +211 -0
  84. package/dist/components/composer.d.ts.map +1 -0
  85. package/dist/components/composer.js +605 -0
  86. package/dist/components/composer.js.map +1 -0
  87. package/dist/components/connector-request.d.ts +63 -0
  88. package/dist/components/connector-request.d.ts.map +1 -0
  89. package/dist/components/connector-request.js +57 -0
  90. package/dist/components/connector-request.js.map +1 -0
  91. package/dist/components/context-menu.d.ts +26 -0
  92. package/dist/components/context-menu.d.ts.map +1 -0
  93. package/dist/components/context-menu.js +33 -0
  94. package/dist/components/context-menu.js.map +1 -0
  95. package/dist/components/data-table.d.ts +61 -0
  96. package/dist/components/data-table.d.ts.map +1 -0
  97. package/dist/components/data-table.js +79 -0
  98. package/dist/components/data-table.js.map +1 -0
  99. package/dist/components/date-range-picker.d.ts +54 -0
  100. package/dist/components/date-range-picker.d.ts.map +1 -0
  101. package/dist/components/date-range-picker.js +451 -0
  102. package/dist/components/date-range-picker.js.map +1 -0
  103. package/dist/components/dialog.d.ts +46 -0
  104. package/dist/components/dialog.d.ts.map +1 -0
  105. package/dist/components/dialog.js +75 -0
  106. package/dist/components/dialog.js.map +1 -0
  107. package/dist/components/drawer.d.ts +85 -0
  108. package/dist/components/drawer.d.ts.map +1 -0
  109. package/dist/components/drawer.js +166 -0
  110. package/dist/components/drawer.js.map +1 -0
  111. package/dist/components/dropdown-menu.d.ts +77 -0
  112. package/dist/components/dropdown-menu.d.ts.map +1 -0
  113. package/dist/components/dropdown-menu.js +112 -0
  114. package/dist/components/dropdown-menu.js.map +1 -0
  115. package/dist/components/editor-tabs.d.ts +49 -0
  116. package/dist/components/editor-tabs.d.ts.map +1 -0
  117. package/dist/components/editor-tabs.js +157 -0
  118. package/dist/components/editor-tabs.js.map +1 -0
  119. package/dist/components/empty-state.d.ts +21 -0
  120. package/dist/components/empty-state.d.ts.map +1 -0
  121. package/dist/components/empty-state.js +14 -0
  122. package/dist/components/empty-state.js.map +1 -0
  123. package/dist/components/entity-card.d.ts +301 -0
  124. package/dist/components/entity-card.d.ts.map +1 -0
  125. package/dist/components/entity-card.js +392 -0
  126. package/dist/components/entity-card.js.map +1 -0
  127. package/dist/components/entity-row.d.ts +37 -0
  128. package/dist/components/entity-row.d.ts.map +1 -0
  129. package/dist/components/entity-row.js +65 -0
  130. package/dist/components/entity-row.js.map +1 -0
  131. package/dist/components/env-var-request.d.ts +51 -0
  132. package/dist/components/env-var-request.d.ts.map +1 -0
  133. package/dist/components/env-var-request.js +50 -0
  134. package/dist/components/env-var-request.js.map +1 -0
  135. package/dist/components/field.d.ts +30 -0
  136. package/dist/components/field.d.ts.map +1 -0
  137. package/dist/components/field.js +48 -0
  138. package/dist/components/field.js.map +1 -0
  139. package/dist/components/file-upload.d.ts +108 -0
  140. package/dist/components/file-upload.d.ts.map +1 -0
  141. package/dist/components/file-upload.js +217 -0
  142. package/dist/components/file-upload.js.map +1 -0
  143. package/dist/components/hover-card.d.ts +18 -0
  144. package/dist/components/hover-card.d.ts.map +1 -0
  145. package/dist/components/hover-card.js +84 -0
  146. package/dist/components/hover-card.js.map +1 -0
  147. package/dist/components/input-group.d.ts +29 -0
  148. package/dist/components/input-group.d.ts.map +1 -0
  149. package/dist/components/input-group.js +61 -0
  150. package/dist/components/input-group.js.map +1 -0
  151. package/dist/components/input.d.ts +9 -0
  152. package/dist/components/input.d.ts.map +1 -0
  153. package/dist/components/input.js +13 -0
  154. package/dist/components/input.js.map +1 -0
  155. package/dist/components/island.d.ts +18 -0
  156. package/dist/components/island.d.ts.map +1 -0
  157. package/dist/components/island.js +30 -0
  158. package/dist/components/island.js.map +1 -0
  159. package/dist/components/kbd.d.ts +7 -0
  160. package/dist/components/kbd.d.ts.map +1 -0
  161. package/dist/components/kbd.js +11 -0
  162. package/dist/components/kbd.js.map +1 -0
  163. package/dist/components/label.d.ts +8 -0
  164. package/dist/components/label.d.ts.map +1 -0
  165. package/dist/components/label.js +12 -0
  166. package/dist/components/label.js.map +1 -0
  167. package/dist/components/markdown.d.ts +24 -0
  168. package/dist/components/markdown.d.ts.map +1 -0
  169. package/dist/components/markdown.js +38 -0
  170. package/dist/components/markdown.js.map +1 -0
  171. package/dist/components/message.d.ts +38 -0
  172. package/dist/components/message.d.ts.map +1 -0
  173. package/dist/components/message.js +25 -0
  174. package/dist/components/message.js.map +1 -0
  175. package/dist/components/page-header.d.ts +31 -0
  176. package/dist/components/page-header.d.ts.map +1 -0
  177. package/dist/components/page-header.js +94 -0
  178. package/dist/components/page-header.js.map +1 -0
  179. package/dist/components/pagination.d.ts +22 -0
  180. package/dist/components/pagination.d.ts.map +1 -0
  181. package/dist/components/pagination.js +36 -0
  182. package/dist/components/pagination.js.map +1 -0
  183. package/dist/components/password-input.d.ts +5 -0
  184. package/dist/components/password-input.d.ts.map +1 -0
  185. package/dist/components/password-input.js +12 -0
  186. package/dist/components/password-input.js.map +1 -0
  187. package/dist/components/pepper.d.ts +92 -0
  188. package/dist/components/pepper.d.ts.map +1 -0
  189. package/dist/components/pepper.js +1279 -0
  190. package/dist/components/pepper.js.map +1 -0
  191. package/dist/components/permission-request.d.ts +53 -0
  192. package/dist/components/permission-request.d.ts.map +1 -0
  193. package/dist/components/permission-request.js +54 -0
  194. package/dist/components/permission-request.js.map +1 -0
  195. package/dist/components/popover.d.ts +42 -0
  196. package/dist/components/popover.d.ts.map +1 -0
  197. package/dist/components/popover.js +76 -0
  198. package/dist/components/popover.js.map +1 -0
  199. package/dist/components/progress.d.ts +9 -0
  200. package/dist/components/progress.d.ts.map +1 -0
  201. package/dist/components/progress.js +12 -0
  202. package/dist/components/progress.js.map +1 -0
  203. package/dist/components/progressive-blur.d.ts +31 -0
  204. package/dist/components/progressive-blur.d.ts.map +1 -0
  205. package/dist/components/progressive-blur.js +44 -0
  206. package/dist/components/progressive-blur.js.map +1 -0
  207. package/dist/components/radio-group.d.ts +8 -0
  208. package/dist/components/radio-group.d.ts.map +1 -0
  209. package/dist/components/radio-group.js +15 -0
  210. package/dist/components/radio-group.js.map +1 -0
  211. package/dist/components/request-card.d.ts +34 -0
  212. package/dist/components/request-card.d.ts.map +1 -0
  213. package/dist/components/request-card.js +50 -0
  214. package/dist/components/request-card.js.map +1 -0
  215. package/dist/components/resizable.d.ts +24 -0
  216. package/dist/components/resizable.d.ts.map +1 -0
  217. package/dist/components/resizable.js +40 -0
  218. package/dist/components/resizable.js.map +1 -0
  219. package/dist/components/responsive-overlay.d.ts +136 -0
  220. package/dist/components/responsive-overlay.d.ts.map +1 -0
  221. package/dist/components/responsive-overlay.js +302 -0
  222. package/dist/components/responsive-overlay.js.map +1 -0
  223. package/dist/components/scroll-shadows.d.ts +11 -0
  224. package/dist/components/scroll-shadows.d.ts.map +1 -0
  225. package/dist/components/scroll-shadows.js +53 -0
  226. package/dist/components/scroll-shadows.js.map +1 -0
  227. package/dist/components/search-field.d.ts +16 -0
  228. package/dist/components/search-field.d.ts.map +1 -0
  229. package/dist/components/search-field.js +50 -0
  230. package/dist/components/search-field.js.map +1 -0
  231. package/dist/components/searchable-select.d.ts +43 -0
  232. package/dist/components/searchable-select.d.ts.map +1 -0
  233. package/dist/components/searchable-select.js +39 -0
  234. package/dist/components/searchable-select.js.map +1 -0
  235. package/dist/components/select.d.ts +60 -0
  236. package/dist/components/select.d.ts.map +1 -0
  237. package/dist/components/select.js +94 -0
  238. package/dist/components/select.js.map +1 -0
  239. package/dist/components/separator.d.ts +7 -0
  240. package/dist/components/separator.d.ts.map +1 -0
  241. package/dist/components/separator.js +12 -0
  242. package/dist/components/separator.js.map +1 -0
  243. package/dist/components/settings-section.d.ts +41 -0
  244. package/dist/components/settings-section.d.ts.map +1 -0
  245. package/dist/components/settings-section.js +50 -0
  246. package/dist/components/settings-section.js.map +1 -0
  247. package/dist/components/sidebar-item.d.ts +41 -0
  248. package/dist/components/sidebar-item.d.ts.map +1 -0
  249. package/dist/components/sidebar-item.js +59 -0
  250. package/dist/components/sidebar-item.js.map +1 -0
  251. package/dist/components/skeleton.d.ts +7 -0
  252. package/dist/components/skeleton.d.ts.map +1 -0
  253. package/dist/components/skeleton.js +11 -0
  254. package/dist/components/skeleton.js.map +1 -0
  255. package/dist/components/slider.d.ts +10 -0
  256. package/dist/components/slider.d.ts.map +1 -0
  257. package/dist/components/slider.js +36 -0
  258. package/dist/components/slider.js.map +1 -0
  259. package/dist/components/sonner.d.ts +8 -0
  260. package/dist/components/sonner.d.ts.map +1 -0
  261. package/dist/components/sonner.js +21 -0
  262. package/dist/components/sonner.js.map +1 -0
  263. package/dist/components/spinner.d.ts +7 -0
  264. package/dist/components/spinner.d.ts.map +1 -0
  265. package/dist/components/spinner.js +12 -0
  266. package/dist/components/spinner.js.map +1 -0
  267. package/dist/components/stat-strip.d.ts +20 -0
  268. package/dist/components/stat-strip.d.ts.map +1 -0
  269. package/dist/components/stat-strip.js +11 -0
  270. package/dist/components/stat-strip.js.map +1 -0
  271. package/dist/components/status-dot.d.ts +25 -0
  272. package/dist/components/status-dot.d.ts.map +1 -0
  273. package/dist/components/status-dot.js +31 -0
  274. package/dist/components/status-dot.js.map +1 -0
  275. package/dist/components/subagent-run.d.ts +27 -0
  276. package/dist/components/subagent-run.d.ts.map +1 -0
  277. package/dist/components/subagent-run.js +38 -0
  278. package/dist/components/subagent-run.js.map +1 -0
  279. package/dist/components/switch.d.ts +8 -0
  280. package/dist/components/switch.d.ts.map +1 -0
  281. package/dist/components/switch.js +13 -0
  282. package/dist/components/switch.js.map +1 -0
  283. package/dist/components/system-notice.d.ts +34 -0
  284. package/dist/components/system-notice.d.ts.map +1 -0
  285. package/dist/components/system-notice.js +52 -0
  286. package/dist/components/system-notice.js.map +1 -0
  287. package/dist/components/table.d.ts +27 -0
  288. package/dist/components/table.d.ts.map +1 -0
  289. package/dist/components/table.js +37 -0
  290. package/dist/components/table.js.map +1 -0
  291. package/dist/components/tabs.d.ts +40 -0
  292. package/dist/components/tabs.d.ts.map +1 -0
  293. package/dist/components/tabs.js +52 -0
  294. package/dist/components/tabs.js.map +1 -0
  295. package/dist/components/textarea.d.ts +5 -0
  296. package/dist/components/textarea.d.ts.map +1 -0
  297. package/dist/components/textarea.js +9 -0
  298. package/dist/components/textarea.js.map +1 -0
  299. package/dist/components/thinking-indicator.d.ts +21 -0
  300. package/dist/components/thinking-indicator.d.ts.map +1 -0
  301. package/dist/components/thinking-indicator.js +136 -0
  302. package/dist/components/thinking-indicator.js.map +1 -0
  303. package/dist/components/thread-status.d.ts +25 -0
  304. package/dist/components/thread-status.d.ts.map +1 -0
  305. package/dist/components/thread-status.js +41 -0
  306. package/dist/components/thread-status.js.map +1 -0
  307. package/dist/components/todo-list.d.ts +52 -0
  308. package/dist/components/todo-list.d.ts.map +1 -0
  309. package/dist/components/todo-list.js +137 -0
  310. package/dist/components/todo-list.js.map +1 -0
  311. package/dist/components/toggle-group.d.ts +17 -0
  312. package/dist/components/toggle-group.d.ts.map +1 -0
  313. package/dist/components/toggle-group.js +26 -0
  314. package/dist/components/toggle-group.js.map +1 -0
  315. package/dist/components/toggle.d.ts +27 -0
  316. package/dist/components/toggle.d.ts.map +1 -0
  317. package/dist/components/toggle.js +44 -0
  318. package/dist/components/toggle.js.map +1 -0
  319. package/dist/components/tool-call.d.ts +60 -0
  320. package/dist/components/tool-call.d.ts.map +1 -0
  321. package/dist/components/tool-call.js +94 -0
  322. package/dist/components/tool-call.js.map +1 -0
  323. package/dist/components/tool-result.d.ts +127 -0
  324. package/dist/components/tool-result.d.ts.map +1 -0
  325. package/dist/components/tool-result.js +155 -0
  326. package/dist/components/tool-result.js.map +1 -0
  327. package/dist/components/tooltip.d.ts +18 -0
  328. package/dist/components/tooltip.d.ts.map +1 -0
  329. package/dist/components/tooltip.js +38 -0
  330. package/dist/components/tooltip.js.map +1 -0
  331. package/dist/components/trace.d.ts +38 -0
  332. package/dist/components/trace.d.ts.map +1 -0
  333. package/dist/components/trace.js +52 -0
  334. package/dist/components/trace.js.map +1 -0
  335. package/dist/components/turn-summary.d.ts +17 -0
  336. package/dist/components/turn-summary.d.ts.map +1 -0
  337. package/dist/components/turn-summary.js +19 -0
  338. package/dist/components/turn-summary.js.map +1 -0
  339. package/dist/components/usage-meter.d.ts +16 -0
  340. package/dist/components/usage-meter.d.ts.map +1 -0
  341. package/dist/components/usage-meter.js +10 -0
  342. package/dist/components/usage-meter.js.map +1 -0
  343. package/dist/components/view-switcher.d.ts +25 -0
  344. package/dist/components/view-switcher.d.ts.map +1 -0
  345. package/dist/components/view-switcher.js +196 -0
  346. package/dist/components/view-switcher.js.map +1 -0
  347. package/dist/docs/components/accordion.md +151 -0
  348. package/dist/docs/components/activity-chart.md +104 -0
  349. package/dist/docs/components/alert-dialog.md +216 -0
  350. package/dist/docs/components/alert.md +203 -0
  351. package/dist/docs/components/ask-user-question.md +429 -0
  352. package/dist/docs/components/attachment-gallery.md +377 -0
  353. package/dist/docs/components/avatar.md +197 -0
  354. package/dist/docs/components/badge.md +162 -0
  355. package/dist/docs/components/brand-tile.md +138 -0
  356. package/dist/docs/components/button.md +392 -0
  357. package/dist/docs/components/calendar.md +113 -0
  358. package/dist/docs/components/card.md +157 -0
  359. package/dist/docs/components/carousel.md +144 -0
  360. package/dist/docs/components/catalog-card.md +136 -0
  361. package/dist/docs/components/chart.md +608 -0
  362. package/dist/docs/components/checkbox.md +164 -0
  363. package/dist/docs/components/chip.md +411 -0
  364. package/dist/docs/components/code-block.md +389 -0
  365. package/dist/docs/components/collapsible.md +93 -0
  366. package/dist/docs/components/command.md +276 -0
  367. package/dist/docs/components/composer.md +1092 -0
  368. package/dist/docs/components/connector-request.md +497 -0
  369. package/dist/docs/components/context-menu.md +127 -0
  370. package/dist/docs/components/data-table.md +462 -0
  371. package/dist/docs/components/date-range-picker.md +425 -0
  372. package/dist/docs/components/dialog.md +263 -0
  373. package/dist/docs/components/drawer.md +505 -0
  374. package/dist/docs/components/dropdown-menu.md +336 -0
  375. package/dist/docs/components/editor-tabs.md +283 -0
  376. package/dist/docs/components/empty-state.md +134 -0
  377. package/dist/docs/components/entity-card.md +640 -0
  378. package/dist/docs/components/entity-row.md +291 -0
  379. package/dist/docs/components/env-var-request.md +223 -0
  380. package/dist/docs/components/field.md +272 -0
  381. package/dist/docs/components/file-upload.md +255 -0
  382. package/dist/docs/components/hover-card.md +335 -0
  383. package/dist/docs/components/input-group.md +134 -0
  384. package/dist/docs/components/input.md +97 -0
  385. package/dist/docs/components/island.md +97 -0
  386. package/dist/docs/components/kbd.md +91 -0
  387. package/dist/docs/components/markdown.md +180 -0
  388. package/dist/docs/components/message.md +336 -0
  389. package/dist/docs/components/page-header.md +203 -0
  390. package/dist/docs/components/pagination.md +211 -0
  391. package/dist/docs/components/password-input.md +68 -0
  392. package/dist/docs/components/pepper.md +238 -0
  393. package/dist/docs/components/permission-request.md +265 -0
  394. package/dist/docs/components/popover.md +206 -0
  395. package/dist/docs/components/progress.md +142 -0
  396. package/dist/docs/components/progressive-blur.md +195 -0
  397. package/dist/docs/components/radio-group.md +129 -0
  398. package/dist/docs/components/request-card.md +305 -0
  399. package/dist/docs/components/resizable.md +318 -0
  400. package/dist/docs/components/responsive-overlay.md +449 -0
  401. package/dist/docs/components/scroll-shadows.md +161 -0
  402. package/dist/docs/components/search-field.md +86 -0
  403. package/dist/docs/components/searchable-select.md +144 -0
  404. package/dist/docs/components/select.md +331 -0
  405. package/dist/docs/components/separator.md +80 -0
  406. package/dist/docs/components/settings-section.md +246 -0
  407. package/dist/docs/components/sidebar-item.md +307 -0
  408. package/dist/docs/components/skeleton.md +107 -0
  409. package/dist/docs/components/slider.md +171 -0
  410. package/dist/docs/components/sonner.md +122 -0
  411. package/dist/docs/components/spinner.md +112 -0
  412. package/dist/docs/components/stat-strip.md +85 -0
  413. package/dist/docs/components/status-dot.md +190 -0
  414. package/dist/docs/components/subagent-run.md +196 -0
  415. package/dist/docs/components/switch.md +91 -0
  416. package/dist/docs/components/system-notice.md +144 -0
  417. package/dist/docs/components/table.md +201 -0
  418. package/dist/docs/components/tabs.md +233 -0
  419. package/dist/docs/components/textarea.md +89 -0
  420. package/dist/docs/components/thinking-indicator.md +164 -0
  421. package/dist/docs/components/thread-status.md +143 -0
  422. package/dist/docs/components/todo-list.md +225 -0
  423. package/dist/docs/components/toggle-group.md +117 -0
  424. package/dist/docs/components/toggle.md +132 -0
  425. package/dist/docs/components/tool-call.md +237 -0
  426. package/dist/docs/components/tool-result.md +418 -0
  427. package/dist/docs/components/tooltip.md +136 -0
  428. package/dist/docs/components/trace.md +319 -0
  429. package/dist/docs/components/turn-summary.md +218 -0
  430. package/dist/docs/components/usage-meter.md +69 -0
  431. package/dist/docs/components/view-switcher.md +193 -0
  432. package/dist/docs/foundations/colors.md +83 -0
  433. package/dist/docs/foundations/elevation.md +19 -0
  434. package/dist/docs/foundations/iconography.md +34 -0
  435. package/dist/docs/foundations/layout.md +42 -0
  436. package/dist/docs/foundations/logo.md +111 -0
  437. package/dist/docs/foundations/motion.md +91 -0
  438. package/dist/docs/foundations/radius.md +13 -0
  439. package/dist/docs/foundations/spacing.md +23 -0
  440. package/dist/docs/foundations/typography.md +42 -0
  441. package/dist/docs/getting-started/installation.md +116 -0
  442. package/dist/docs/getting-started/releases.md +59 -0
  443. package/dist/docs/getting-started/theming.md +58 -0
  444. package/dist/docs/guidelines/accessibility.md +28 -0
  445. package/dist/docs/guidelines/content.md +36 -0
  446. package/dist/docs/guidelines/forms.md +36 -0
  447. package/dist/docs/guidelines/principles.md +30 -0
  448. package/dist/docs/hooks/use-is-mobile.md +134 -0
  449. package/dist/docs/index.md +182 -0
  450. package/dist/docs/overview.md +35 -0
  451. package/dist/docs/patterns/chat.md +477 -0
  452. package/dist/docs/patterns/index.md +13 -0
  453. package/dist/docs/patterns/login.md +311 -0
  454. package/dist/docs/patterns/share.md +415 -0
  455. package/dist/hooks/use-is-mobile.d.ts +9 -0
  456. package/dist/hooks/use-is-mobile.d.ts.map +1 -0
  457. package/dist/hooks/use-is-mobile.js +26 -0
  458. package/dist/hooks/use-is-mobile.js.map +1 -0
  459. package/dist/lib/cn.d.ts +4 -0
  460. package/dist/lib/cn.d.ts.map +1 -0
  461. package/dist/lib/cn.js +31 -0
  462. package/dist/lib/cn.js.map +1 -0
  463. package/dist/lib/code-language.d.ts +8 -0
  464. package/dist/lib/code-language.d.ts.map +1 -0
  465. package/dist/lib/code-language.js +48 -0
  466. package/dist/lib/code-language.js.map +1 -0
  467. package/dist/lib/date-range.d.ts +122 -0
  468. package/dist/lib/date-range.d.ts.map +1 -0
  469. package/dist/lib/date-range.js +281 -0
  470. package/dist/lib/date-range.js.map +1 -0
  471. package/dist/lib/major-tokens.d.ts +40 -0
  472. package/dist/lib/major-tokens.d.ts.map +1 -0
  473. package/dist/lib/major-tokens.js +602 -0
  474. package/dist/lib/major-tokens.js.map +1 -0
  475. package/dist/lib/markdown.d.ts +25 -0
  476. package/dist/lib/markdown.d.ts.map +1 -0
  477. package/dist/lib/markdown.js +87 -0
  478. package/dist/lib/markdown.js.map +1 -0
  479. package/dist/lib/overlay-portal-branch.d.ts +6 -0
  480. package/dist/lib/overlay-portal-branch.d.ts.map +1 -0
  481. package/dist/lib/overlay-portal-branch.js +15 -0
  482. package/dist/lib/overlay-portal-branch.js.map +1 -0
  483. package/dist/lib/pepper-matcap.d.ts +2 -0
  484. package/dist/lib/pepper-matcap.d.ts.map +1 -0
  485. package/dist/lib/pepper-matcap.js +4 -0
  486. package/dist/lib/pepper-matcap.js.map +1 -0
  487. package/dist/lib/scroll-fade.d.ts +28 -0
  488. package/dist/lib/scroll-fade.d.ts.map +1 -0
  489. package/dist/lib/scroll-fade.js +57 -0
  490. package/dist/lib/scroll-fade.js.map +1 -0
  491. package/dist/tailwind.css +7 -0
  492. package/dist/theme.css +428 -0
  493. package/package.json +145 -3
  494. package/tokens.json +841 -0
  495. package/README.md +0 -3
@@ -0,0 +1,233 @@
1
+ ---
2
+ name: Tabs
3
+ slug: tabs
4
+ description: "One of a few mutually exclusive options set in place, always one selected: Monthly · Annual, Production · Staging."
5
+ group: Navigation
6
+ layer: primitive
7
+ status: stable
8
+ since: 0.1.0
9
+ primitive: Tabs
10
+ import: import { Tabs, TabsList, TabsTrigger, TabsContent, TABS_LIST_VARIANTS, TABS_LIST_SIZES } from "@major-tech/ui/tabs";
11
+ source: packages/ui/src/components/tabs.tsx
12
+ ---
13
+
14
+ # Tabs
15
+
16
+ ## Usage
17
+
18
+ ### Values set in place
19
+
20
+ Two to four short, mutually exclusive values, always one selected. The track is secondary with a 3px inset and 28px segments; the selected segment is the white surface with shadow-card, never green. A count goes in `<b>` and renders faint.
21
+
22
+ Example: `basic`
23
+
24
+ ```tsx
25
+ import { Tabs, TabsList, TabsTrigger } from "@major-tech/ui/tabs";
26
+
27
+ export default function TabsBasic() {
28
+ return (
29
+ <>
30
+ <Tabs defaultValue="production">
31
+ <TabsList aria-label="Environment">
32
+ <TabsTrigger value="production">Production</TabsTrigger>
33
+ <TabsTrigger value="staging">Staging</TabsTrigger>
34
+ </TabsList>
35
+ </Tabs>
36
+ <Tabs defaultValue="active">
37
+ <TabsList aria-label="Member status">
38
+ <TabsTrigger value="active">
39
+ Active <b>12</b>
40
+ </TabsTrigger>
41
+ <TabsTrigger value="pending">
42
+ Pending <b>3</b>
43
+ </TabsTrigger>
44
+ <TabsTrigger value="external">
45
+ External <b>2</b>
46
+ </TabsTrigger>
47
+ <TabsTrigger value="removed" disabled>
48
+ Removed
49
+ </TabsTrigger>
50
+ </TabsList>
51
+ </Tabs>
52
+ </>
53
+ );
54
+ }
55
+ ```
56
+
57
+ ### With content
58
+
59
+ Each `TabsTrigger` value matches a `TabsContent`; the list and the content sit 8px apart. A Badge after a label explains the difference between values.
60
+
61
+ Example: `billing`
62
+
63
+ ```tsx
64
+ "use client";
65
+
66
+ import { BADGE_VARIANTS, Badge } from "@major-tech/ui/badge";
67
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@major-tech/ui/tabs";
68
+
69
+ export default function TabsBilling() {
70
+ return (
71
+ <Tabs defaultValue="annual" className="w-80">
72
+ <TabsList aria-label="Billing period">
73
+ <TabsTrigger value="monthly">Monthly</TabsTrigger>
74
+ <TabsTrigger value="annual">
75
+ Annual
76
+ <Badge variant={BADGE_VARIANTS.LIVE}>+20% credits</Badge>
77
+ </TabsTrigger>
78
+ </TabsList>
79
+ <TabsContent value="monthly" className="text-ui text-muted">
80
+ $25 billed every month.
81
+ </TabsContent>
82
+ <TabsContent value="annual" className="text-ui text-muted">
83
+ $240 billed once a year.
84
+ </TabsContent>
85
+ </Tabs>
86
+ );
87
+ }
88
+ ```
89
+
90
+ ### Small
91
+
92
+ 24px segments in 12px type: a view switch tucked under a page title, such as a connector's views.
93
+
94
+ Example: `small`
95
+
96
+ ```tsx
97
+ "use client";
98
+
99
+ import { TABS_LIST_SIZES, Tabs, TabsList, TabsTrigger } from "@major-tech/ui/tabs";
100
+
101
+ export default function TabsSmall() {
102
+ return (
103
+ <div className="flex flex-col gap-space-8">
104
+ <h2 className="m-0 text-editor-title text-ink">HubSpot</h2>
105
+ <Tabs defaultValue="overview">
106
+ <TabsList size={TABS_LIST_SIZES.SM} aria-label="Connector views">
107
+ <TabsTrigger value="overview">Overview</TabsTrigger>
108
+ <TabsTrigger value="tools">
109
+ Tools <b>24</b>
110
+ </TabsTrigger>
111
+ <TabsTrigger value="activity">Activity</TabsTrigger>
112
+ </TabsList>
113
+ </Tabs>
114
+ </div>
115
+ );
116
+ }
117
+ ```
118
+
119
+ ### Icons
120
+
121
+ An icon is 14px at either size. Alone, it names its tab with `aria-label` and shows the name in a Tooltip: a preview mode, a permission decision.
122
+
123
+ Example: `icons`
124
+
125
+ ```tsx
126
+ "use client";
127
+
128
+ import { Columns2, Eye, FileCode2 } from "lucide-react";
129
+ import { TABS_LIST_SIZES, Tabs, TabsList, TabsTrigger } from "@major-tech/ui/tabs";
130
+ import { Tooltip, TooltipContent, TooltipTrigger } from "@major-tech/ui/tooltip";
131
+
132
+ const MODES = [
133
+ { value: "code", label: "Code", icon: <FileCode2 /> },
134
+ { value: "split", label: "Split", icon: <Columns2 /> },
135
+ { value: "preview", label: "Preview", icon: <Eye /> },
136
+ ];
137
+
138
+ export default function TabsIcons() {
139
+ return (
140
+ <Tabs defaultValue="split">
141
+ <TabsList size={TABS_LIST_SIZES.SM} aria-label="Preview mode">
142
+ {MODES.map((mode) => (
143
+ <Tooltip key={mode.value}>
144
+ <TooltipTrigger render={<TabsTrigger value={mode.value} aria-label={mode.label} />}>
145
+ {mode.icon}
146
+ </TooltipTrigger>
147
+ <TooltipContent>{mode.label}</TooltipContent>
148
+ </Tooltip>
149
+ ))}
150
+ </TabsList>
151
+ </Tabs>
152
+ );
153
+ }
154
+ ```
155
+
156
+ ### Underline
157
+
158
+ Text tabs over a full-width rule, the selected one underlined in the accent: the categories of a gallery.
159
+
160
+ Example: `underline`
161
+
162
+ ```tsx
163
+ "use client";
164
+
165
+ import { TABS_LIST_VARIANTS, Tabs, TabsList, TabsTrigger } from "@major-tech/ui/tabs";
166
+
167
+ const CATEGORIES = ["Comms", "Operations", "Admin", "Growth", "Insights"];
168
+
169
+ export default function TabsUnderline() {
170
+ return (
171
+ <Tabs defaultValue={CATEGORIES[0]} className="w-full max-w-160">
172
+ <TabsList variant={TABS_LIST_VARIANTS.UNDERLINE} aria-label="Template categories">
173
+ {CATEGORIES.map((category) => (
174
+ <TabsTrigger key={category} value={category}>
175
+ {category}
176
+ </TabsTrigger>
177
+ ))}
178
+ </TabsList>
179
+ </Tabs>
180
+ );
181
+ }
182
+ ```
183
+
184
+ ### Guidelines
185
+
186
+ Do:
187
+
188
+ - Use it for a value set in place: Monthly · Annual, Production · Staging.
189
+ - Keep labels to one or two words, or an icon with its name in a Tooltip.
190
+ - Name the list with `aria-label`: “Billing period”.
191
+
192
+ Don't:
193
+
194
+ - Switching an editor's views: that's the ViewSwitcher. The strip above the editor is EditorTabs.
195
+ - More than four segments: use a Select.
196
+ - A green selected segment.
197
+
198
+ ## API
199
+
200
+ ```tsx
201
+ import { Tabs, TabsList, TabsTrigger, TabsContent, TABS_LIST_VARIANTS, TABS_LIST_SIZES } from "@major-tech/ui/tabs";
202
+ ```
203
+
204
+ ### `<Tabs />`
205
+
206
+ Base UI Tabs.Root props pass through (orientation…); `activateOnFocus` on TabsList selects a tab as the arrows reach it.
207
+
208
+ | Prop | Type | Default | Description |
209
+ | --- | --- | --- | --- |
210
+ | `value · onValueChange` | `string · (value, eventDetails) => void` | — | Controlled. |
211
+ | `defaultValue` | `string` | — | The tab selected on first render. With neither it nor `value`, the first enabled tab is selected and `onValueChange` fires once on mount. |
212
+
213
+ ### `<TabsList />`
214
+
215
+ | Prop | Type | Default | Description |
216
+ | --- | --- | --- | --- |
217
+ | `variant` | `"default" \| "underline"` | `"default"` | Segments on a track, or text tabs over a rule. `TABS_LIST_VARIANTS` holds the values. |
218
+ | `size` | `"default" \| "sm"` | `"default"` | 28px segments in 13px type, or 24px in 12px. `TABS_LIST_SIZES` holds the values. |
219
+
220
+ ### `<TabsTrigger /> · <TabsContent />`
221
+
222
+ | Prop | Type | Default | Description |
223
+ | --- | --- | --- | --- |
224
+ | `value`* | `string` | — | Pairs a trigger with its content. |
225
+ | `disabled` | `boolean` | `false` | On `TabsTrigger` only: 50% opacity and can't be picked; arrow keys still reach it. |
226
+
227
+ `*` marks a required prop.
228
+
229
+ ### Accessibility
230
+
231
+ - The WAI-ARIA tabs pattern from Base UI: arrow keys move between tabs and Enter or Space selects; the selected one is `aria-selected`.
232
+ - Selection is styled off `aria-selected` as well as `data-active`, so a trigger passed to `TooltipTrigger` as `render` still looks selected.
233
+ - Focus shows a 2px faint ring.
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: Textarea
3
+ slug: textarea
4
+ description: "The multi-line field: 76px tall at least, resizable vertically."
5
+ group: Inputs
6
+ layer: primitive
7
+ status: stable
8
+ since: 0.3.0
9
+ import: import { Textarea } from "@major-tech/ui/textarea";
10
+ source: packages/ui/src/components/textarea.tsx
11
+ ---
12
+
13
+ # Textarea
14
+
15
+ ## Usage
16
+
17
+ ### Longer text
18
+
19
+ The Input's frame with an 8px × 10px inset and 13px/1.55 text. It starts at 76px and people drag it taller; set `rows` only when the usual answer is longer.
20
+
21
+ Example: `basic`
22
+
23
+ ```tsx
24
+ import { Field, FieldDescription, FieldLabel } from "@major-tech/ui/field";
25
+ import { Textarea } from "@major-tech/ui/textarea";
26
+
27
+ export default function TextareaBasic() {
28
+ return (
29
+ <Field className="w-140 max-w-full">
30
+ <FieldLabel htmlFor="connector-description">Description</FieldLabel>
31
+ <Textarea
32
+ id="connector-description"
33
+ placeholder="Help builders and Major AI know how to use this connector."
34
+ aria-describedby="connector-description-hint"
35
+ />
36
+ <FieldDescription id="connector-description-hint">Shown to builders and to Major AI.</FieldDescription>
37
+ </Field>
38
+ );
39
+ }
40
+ ```
41
+
42
+ ### States
43
+
44
+ The same focus, error and disabled states as Input.
45
+
46
+ Example: `states`
47
+
48
+ ```tsx
49
+ import { Textarea } from "@major-tech/ui/textarea";
50
+
51
+ export default function TextareaStates() {
52
+ return (
53
+ <div className="flex w-96 max-w-full flex-col gap-space-12">
54
+ <Textarea
55
+ aria-label="Instructions"
56
+ defaultValue={"Write exactly one original, work-friendly joke.\nPut the punchline on its own line."}
57
+ />
58
+ <Textarea aria-label="Instructions" aria-invalid defaultValue="Too short" />
59
+ <Textarea aria-label="Instructions" disabled defaultValue="Managed by your admin." />
60
+ </div>
61
+ );
62
+ }
63
+ ```
64
+
65
+ ### Guidelines
66
+
67
+ - Use it for descriptions, instructions and notes: anything that can run past one line.
68
+ - Put it in a Field with a label; say in the hint who reads the text.
69
+ - A one-line value is an Input, even when it can be long (a URL).
70
+
71
+ ## API
72
+
73
+ ```tsx
74
+ import { Textarea } from "@major-tech/ui/textarea";
75
+ ```
76
+
77
+ ### `<Textarea />`
78
+
79
+ Accepts every native `<textarea>` attribute; `ref` goes to the textarea.
80
+
81
+ | Prop | Type | Default | Description |
82
+ | --- | --- | --- | --- |
83
+ | `rows` | `number` | — | Not set by default: the minimum height is 76px. |
84
+ | `aria-invalid` | `boolean` | — | Danger border and halo. |
85
+
86
+ ### Accessibility
87
+
88
+ - A native `<textarea>`: label it with FieldLabel `htmlFor`, and link hints with `aria-describedby`.
89
+ - It resizes vertically only, so it never breaks the form's columns.
@@ -0,0 +1,164 @@
1
+ ---
2
+ name: ThinkingIndicator
3
+ slug: thinking-indicator
4
+ description: "Major at work in the chat: its mark as glass cubes turning in 3D, beside what it is doing now, each label rolling into the next."
5
+ group: AI
6
+ layer: composed
7
+ status: beta
8
+ since: 0.4.0
9
+ import: import { ThinkingIndicator, ThinkingMark } from "@major-tech/ui/thinking-indicator";
10
+ source: packages/ui/src/components/thinking-indicator.tsx
11
+ ---
12
+
13
+ # ThinkingIndicator
14
+
15
+ ## Usage
16
+
17
+ ### While Major works
18
+
19
+ At the end of the turn Major is working on: the ThinkingMark beside a 13px shimmering label of what it is doing now. It rises in as it mounts; a new label rolls up into the old one's place.
20
+
21
+ Example: `turn`
22
+
23
+ ```tsx
24
+ "use client";
25
+
26
+ import { useEffect, useState } from "react";
27
+ import { ThinkingIndicator } from "@major-tech/ui/thinking-indicator";
28
+
29
+ /** What a real turn reports, in order; null is the turn's end. */
30
+ const TURN_STATUSES = [
31
+ "Understanding your request",
32
+ "Writing a response",
33
+ "Searching",
34
+ "Reading",
35
+ "Writing",
36
+ "Waiting for your approval",
37
+ "Executing",
38
+ "Deploying",
39
+ "Summarizing the conversation",
40
+ null,
41
+ ];
42
+
43
+ const STEP_DURATION_MS = 2200;
44
+
45
+ export default function ThinkingIndicatorTurn() {
46
+ const [stepIndex, setStepIndex] = useState(0);
47
+ const label = TURN_STATUSES[stepIndex];
48
+
49
+ useEffect(() => {
50
+ const interval = setInterval(() => setStepIndex((index) => (index + 1) % TURN_STATUSES.length), STEP_DURATION_MS);
51
+
52
+ return () => clearInterval(interval);
53
+ }, []);
54
+
55
+ return <div className="h-12 w-full max-w-96">{label && <ThinkingIndicator label={label} />}</div>;
56
+ }
57
+ ```
58
+
59
+ - Mount it while the turn runs and unmount it when it ends. When is the product's call: the web shows it 250ms after a turn starts, so a quick reply never flashes it, and keeps it 500ms after the turn ends.
60
+ - Change `label` as the turn moves on. Each label stays at least 700ms, so a tool that finishes in a few hundred ms never rolls a label in and straight back out.
61
+ - One indicator per chat, under the turn's last message.
62
+ - A 48px row: the 22px mark, 12px, then the label on one line, truncated.
63
+
64
+ ### Labels
65
+
66
+ A word or two of present tense, by what Major is doing now. The web derives it from the turn's latest activity.
67
+
68
+ - **Understanding your request**: the turn started, nothing happened yet.
69
+ - **Writing a response**: Major is thinking or writing.
70
+ - **Searching · Reading · Writing · Executing · Querying**: the tool it runs, by what the tool does (search, read, edit, run a command, query a database).
71
+ - **Validating · Deploying · Checking access · Setting things up · Delegating · Planning**: a check or test, a deploy, a permission, a setup, a subagent, a plan.
72
+ - **Waiting for your approval**: a permission request waits for the person.
73
+ - **Summarizing the conversation**: the context is being compacted.
74
+ - **Working on your request**: anything else.
75
+
76
+ ### The mark
77
+
78
+ ThinkingMark: the Major mark at 22px as seven bottle-green glass cubes, in CSS 3D. It sways, turns about the vertical, then turns about the diagonal it is symmetric about, every 7.2s, for as long as it is shown.
79
+
80
+ Example: `mark`
81
+
82
+ ```tsx
83
+ import { ThinkingMark } from "@major-tech/ui/thinking-indicator";
84
+
85
+ export default function ThinkingIndicatorMark() {
86
+ return <ThinkingMark />;
87
+ }
88
+ ```
89
+
90
+ - Its glass mixes the mark's own colours, `brand-deep` and `brand-mint`, the same in both themes.
91
+ - With reduced motion it holds its first frame.
92
+ - It means Major is working. Use the logo files for the brand everywhere else.
93
+
94
+ ### Another mark
95
+
96
+ A surface with a character of its own puts it in the mark's place with `mark`, in the same 22px slot: Pepper's chat shows Pepper keeping busy.
97
+
98
+ Example: `custom-mark`
99
+
100
+ ```tsx
101
+ "use client";
102
+
103
+ import { AVATAR_SIZES, Avatar, AvatarFallback } from "@major-tech/ui/avatar";
104
+ import { ThinkingIndicator } from "@major-tech/ui/thinking-indicator";
105
+
106
+ export default function ThinkingIndicatorCustomMark() {
107
+ return (
108
+ <ThinkingIndicator
109
+ label="Reading"
110
+ className="w-full max-w-96"
111
+ mark={
112
+ <Avatar size={AVATAR_SIZES.SM}>
113
+ <AvatarFallback>DJ</AvatarFallback>
114
+ </Avatar>
115
+ }
116
+ />
117
+ );
118
+ }
119
+ ```
120
+
121
+ ### Guidelines
122
+
123
+ Do:
124
+
125
+ - Say what Major is doing now, in present tense: “Searching”, “Writing a response”.
126
+ - Keep the indicator to the turn that is running.
127
+ - Show the turn's steps in a Trace above it; the indicator is the live line under them.
128
+
129
+ Don't:
130
+
131
+ - Name tools or internal ids in the label (“mcp__workspace__deploy_app”).
132
+ - Add a Spinner or a second working line next to it.
133
+ - Recolour the mark or use it as a logo.
134
+
135
+ ## API
136
+
137
+ ```tsx
138
+ import { ThinkingIndicator, ThinkingMark } from "@major-tech/ui/thinking-indicator";
139
+ ```
140
+
141
+ ### `<ThinkingIndicator />`
142
+
143
+ Also accepts native `<div>` attributes.
144
+
145
+ | Prop | Type | Default | Description |
146
+ | --- | --- | --- | --- |
147
+ | `label`* | `string` | — | What Major is doing now. Each label stays at least 700ms. |
148
+ | `mark` | `ReactNode` | `<ThinkingMark />` | Stands in for the ThinkingMark, for a surface with a character of its own. |
149
+
150
+ `*` marks a required prop.
151
+
152
+ ### `<ThinkingMark />`
153
+
154
+ Renders a 22px `<span>`; accepts native `<span>` attributes.
155
+
156
+ | Prop | Type | Default | Description |
157
+ | --- | --- | --- | --- |
158
+ | `className` | `string` | — | Placement only; the mark keeps its size. |
159
+
160
+ ### Accessibility
161
+
162
+ - The indicator is a polite live region (`role="status"`): screen readers read each new label once it settles, never the one rolling out.
163
+ - The mark and the rolling labels are decorative (`aria-hidden`); a hidden copy of the label is what is read.
164
+ - With reduced motion the mark holds still, the shimmer stops, and the indicator and its labels fade instead of rising and rolling.
@@ -0,0 +1,143 @@
1
+ ---
2
+ name: ThreadStatus
3
+ slug: thread-status
4
+ description: "A conversation's state at the start of its row: three pulsing dots while Major works, a green dot when it waits for you or has news."
5
+ group: AI
6
+ layer: composed
7
+ status: beta
8
+ since: 0.4.0
9
+ import: import { ThreadStatus, THREAD_STATUSES } from "@major-tech/ui/thread-status";
10
+ source: packages/ui/src/components/thread-status.tsx
11
+ ---
12
+
13
+ # ThreadStatus
14
+
15
+ ## Usage
16
+
17
+ ### States
18
+
19
+ The mark at the start of a conversation's row. Every state takes the same 10px slot, so titles line up whatever it shows.
20
+
21
+ Example: `states`
22
+
23
+ ```tsx
24
+ import { ThreadStatus, type ThreadStatusValue } from "@major-tech/ui/thread-status";
25
+
26
+ interface StateRow {
27
+ status: ThreadStatusValue;
28
+ label: string;
29
+ isActive?: boolean;
30
+ }
31
+
32
+ const STATES: StateRow[] = [
33
+ { status: "working", label: "Working" },
34
+ { status: "waiting", label: "Waiting for your input" },
35
+ { status: "unread", label: "Unread" },
36
+ { status: "idle", label: "Idle" },
37
+ { status: "idle", label: "Idle, open on screen", isActive: true },
38
+ ];
39
+
40
+ export default function ThreadStatusStates() {
41
+ return (
42
+ <div className="flex flex-col gap-space-12">
43
+ {STATES.map((state) => (
44
+ <div key={state.label} className="flex items-center gap-2.5 text-ui text-ink-2">
45
+ <ThreadStatus status={state.status} isActive={state.isActive} />
46
+ {state.label}
47
+ </div>
48
+ ))}
49
+ </div>
50
+ );
51
+ }
52
+ ```
53
+
54
+ - **working**: Major is working in the conversation. Three `link` dots in a 12px mark turn and pulse one after another.
55
+ - **waiting**: something in it waits for the person, a question, a permission or a connector. A 6px `link` dot.
56
+ - **unread**: Major replied since the person last opened it. The same 6px dot.
57
+ - **idle**: nothing new. A 4px dot in `ink` at 16%.
58
+ - **isActive**: the conversation open on screen never shows the waiting or unread dot, it has nothing new to tell; its idle dot is `chart-1`.
59
+
60
+ ### Beside a title
61
+
62
+ The sidebar's Pinned and Recent conversations: the mark, 10px, then the 13.5px title on one line.
63
+
64
+ Example: `in-a-list`
65
+
66
+ ```tsx
67
+ import { ThreadStatus, type ThreadStatusValue } from "@major-tech/ui/thread-status";
68
+ import { cn } from "@major-tech/ui/lib/cn";
69
+
70
+ interface Conversation {
71
+ id: string;
72
+ title: string;
73
+ status: ThreadStatusValue;
74
+ isActive?: boolean;
75
+ }
76
+
77
+ const CONVERSATIONS: Conversation[] = [
78
+ { id: "close", title: "Weekly finance close", status: "working" },
79
+ { id: "hubspot", title: "Sync HubSpot deals to Sheets", status: "waiting" },
80
+ { id: "standup", title: "Standup digest for #eng", status: "unread" },
81
+ { id: "support", title: "Draft support replies", status: "idle", isActive: true },
82
+ { id: "joke", title: "Daily joke in Slack", status: "idle" },
83
+ ];
84
+
85
+ export default function ThreadStatusInAList() {
86
+ return (
87
+ <div className="flex w-full max-w-60 flex-col gap-px rounded-lg bg-app-bg p-space-8">
88
+ {CONVERSATIONS.map((conversation) => (
89
+ <div key={conversation.id} className="flex min-w-0 items-center gap-2.5 py-1.5 pr-space-6 pl-space-8">
90
+ <ThreadStatus status={conversation.status} isActive={conversation.isActive} />
91
+ <span
92
+ className={cn(
93
+ "min-w-0 flex-1 truncate text-nav leading-5",
94
+ conversation.isActive ? "text-ink-strong" : "text-ink-nav",
95
+ )}
96
+ >
97
+ {conversation.title}
98
+ </span>
99
+ </div>
100
+ ))}
101
+ </div>
102
+ );
103
+ }
104
+ ```
105
+
106
+ - Waiting and unread look the same at the start of the row; a waiting row also counts its open questions at its end, where the time goes (a `COUNT_DESTRUCTIVE` Badge).
107
+ - A working row's time turns `link`, as the dots.
108
+ - The whole conversation row (the mark, the title, the agent under it, the time that gives way to Pin and a menu on hover) is not in the system yet: it is the Conversation row part on the playground's To review page.
109
+
110
+ ### Guidelines
111
+
112
+ Do:
113
+
114
+ - Give every row the mark, idle too, so the titles line up.
115
+ - Pass `isActive` for the conversation on screen, so it never flickers green at the end of a turn.
116
+ - Count a waiting row's open questions at its end, so the state isn't the dot alone.
117
+
118
+ Don't:
119
+
120
+ - Use it for anything but a conversation's state: a status is a StatusDot.
121
+ - Add a Spinner next to the working dots.
122
+ - Colour a row's title by its state.
123
+
124
+ ## API
125
+
126
+ ```tsx
127
+ import { ThreadStatus, THREAD_STATUSES } from "@major-tech/ui/thread-status";
128
+ ```
129
+
130
+ ### `<ThreadStatus />`
131
+
132
+ Renders a 10px `<span>`; accepts native `<span>` attributes. `THREAD_STATUSES` holds the states as constants.
133
+
134
+ | Prop | Type | Default | Description |
135
+ | --- | --- | --- | --- |
136
+ | `status` | `"working" \| "waiting" \| "unread" \| "idle"` | `"idle"` | The conversation's state. |
137
+ | `isActive` | `boolean` | `false` | The conversation is open on screen: no waiting or unread dot, a `chart-1` idle dot. |
138
+
139
+ ### Accessibility
140
+
141
+ - The working dots are an image labelled “Working”, and the waiting and unread dots “Waiting for your input” and “Unread” (`role="img"`). The idle dot is silent.
142
+ - With reduced motion the working dots hold still.
143
+ - Colour is never the only signal: the row's title and count say the rest.