@major-tech/ui 0.0.0-stage → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (495) hide show
  1. package/CHANGELOG.md +107 -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 +159 -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 +284 -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,171 @@
1
+ ---
2
+ name: Slider
3
+ slug: slider
4
+ description: A range for a number where the rough value matters more than the exact one.
5
+ group: Inputs
6
+ layer: primitive
7
+ status: stable
8
+ since: 0.1.0
9
+ primitive: Slider
10
+ import: import { Slider } from "@major-tech/ui/slider";
11
+ source: packages/ui/src/components/slider.tsx
12
+ ---
13
+
14
+ # Slider
15
+
16
+ ## Usage
17
+
18
+ ### A rough value, shown exactly
19
+
20
+ A 4px `secondary` track, link fill and a 16px surface thumb with a line ring. Lay it out as label (150px) · slider · value (64px, mono 12px): the row is yours to build, the Slider is only the track.
21
+
22
+ Example: `basic`
23
+
24
+ ```tsx
25
+ "use client";
26
+
27
+ import { useState } from "react";
28
+ import { Slider } from "@major-tech/ui/slider";
29
+
30
+ export default function SliderBasic() {
31
+ const [temperature, setTemperature] = useState([0.7]);
32
+ const [requestsPerMinute, setRequestsPerMinute] = useState([60]);
33
+
34
+ return (
35
+ <div className="flex w-135 max-w-full flex-col gap-space-16">
36
+ <div className="grid grid-cols-[9.375rem_minmax(0,1fr)_4rem] items-center gap-space-16">
37
+ <span id="temperature-label" className="text-ui text-ink">
38
+ Temperature
39
+ </span>
40
+ <Slider
41
+ aria-labelledby="temperature-label"
42
+ min={0}
43
+ max={2}
44
+ step={0.1}
45
+ value={temperature}
46
+ onValueChange={setTemperature}
47
+ />
48
+ <span className="text-right font-mono text-small text-muted">{temperature[0].toFixed(1)}</span>
49
+ </div>
50
+ <div className="grid grid-cols-[9.375rem_minmax(0,1fr)_4rem] items-center gap-space-16">
51
+ <span id="rate-limit-label" className="text-ui text-ink">
52
+ Requests per minute
53
+ </span>
54
+ <Slider aria-labelledby="rate-limit-label" value={requestsPerMinute} onValueChange={setRequestsPerMinute} />
55
+ <span className="text-right font-mono text-small text-muted">{requestsPerMinute[0]}/min</span>
56
+ </div>
57
+ </div>
58
+ );
59
+ }
60
+ ```
61
+
62
+ ### Range labels
63
+
64
+ Words for the ends under the track, in muted 12px, when they help people read the scale.
65
+
66
+ Example: `range-labels`
67
+
68
+ ```tsx
69
+ "use client";
70
+
71
+ import { useState } from "react";
72
+ import { Slider } from "@major-tech/ui/slider";
73
+
74
+ export default function SliderRangeLabels() {
75
+ const [retentionDays, setRetentionDays] = useState([30]);
76
+
77
+ return (
78
+ <div className="grid w-135 max-w-full grid-cols-[9.375rem_minmax(0,1fr)_4rem] items-start gap-space-16">
79
+ <span id="retention-label" className="text-ui text-ink">
80
+ Memory retention
81
+ </span>
82
+ <div className="flex flex-col gap-space-6 pt-px">
83
+ <Slider
84
+ aria-labelledby="retention-label"
85
+ min={1}
86
+ max={90}
87
+ value={retentionDays}
88
+ onValueChange={setRetentionDays}
89
+ />
90
+ <div className="flex justify-between text-small text-muted">
91
+ <span>Forget quickly</span>
92
+ <span>Remember long</span>
93
+ </div>
94
+ </div>
95
+ <span className="text-right font-mono text-small text-muted">{retentionDays[0]} days</span>
96
+ </div>
97
+ );
98
+ }
99
+ ```
100
+
101
+ ### Two thumbs
102
+
103
+ Values are arrays: one entry per thumb. Two entries make a range; the fill runs between them.
104
+
105
+ Example: `range`
106
+
107
+ ```tsx
108
+ "use client";
109
+
110
+ import { useState } from "react";
111
+ import { Slider } from "@major-tech/ui/slider";
112
+
113
+ function formatHour(hour: number) {
114
+ return `${String(hour).padStart(2, "0")}:00`;
115
+ }
116
+
117
+ export default function SliderRange() {
118
+ const [activeHours, setActiveHours] = useState([9, 17]);
119
+
120
+ return (
121
+ <div className="grid w-135 max-w-full grid-cols-[9.375rem_minmax(0,1fr)_7rem] items-center gap-space-16">
122
+ <span id="active-hours-label" className="text-ui text-ink">
123
+ Runs between
124
+ </span>
125
+ <Slider
126
+ aria-labelledby="active-hours-label"
127
+ min={0}
128
+ max={24}
129
+ value={activeHours}
130
+ onValueChange={setActiveHours}
131
+ />
132
+ <span className="text-right font-mono text-small text-muted">
133
+ {formatHour(activeHours[0])}–{formatHour(activeHours[1])}
134
+ </span>
135
+ </div>
136
+ );
137
+ }
138
+ ```
139
+
140
+ ### Guidelines
141
+
142
+ - Use it for model temperature, memory retention, rate limits: where the rough value matters more than the exact one.
143
+ - Always show the exact value beside it, with units (“60/min”, “30 days”).
144
+ - Pair it with an Input when people need to type an exact number.
145
+ - Save on release (`onValueCommitted`), not on every step.
146
+
147
+ ## API
148
+
149
+ ```tsx
150
+ import { Slider } from "@major-tech/ui/slider";
151
+ ```
152
+
153
+ ### `<Slider />`
154
+
155
+ Base UI `Slider.Root`: also `minStepsBetweenValues`, `disabled`, `name`.
156
+
157
+ | Prop | Type | Default | Description |
158
+ | --- | --- | --- | --- |
159
+ | `value / defaultValue` | `number[]` | — | One number per thumb. |
160
+ | `onValueChange` | `(value: number[], eventDetails) => void` | — | While dragging. |
161
+ | `onValueCommitted` | `(value: number[], eventDetails) => void` | — | On release: save here. |
162
+ | `min / max` | `number` | `0 / 100` | The ends of the track. |
163
+ | `step` | `number` | `1` | Values snap to it. |
164
+ | `largeStep` | `number` | `step × 10` | What Page Up/Down and Shift+arrow move. |
165
+ | `aria-label / aria-labelledby` | `string` | — | Names a single thumb. With two thumbs it names the slider: `aria-labelledby` also reaches each thumb, read with its value; with `aria-label` each thumb adds its place to it (“Price, minimum”, “Price, maximum”); with neither, “Minimum” and “Maximum”. |
166
+
167
+ ### Accessibility
168
+
169
+ - Each thumb is `role="slider"` with `aria-valuenow`, `min` and `max`; arrow keys step, Page Up/Down and Shift+arrow move ten steps (`largeStep`).
170
+ - Home and End jump to min and max.
171
+ - Point `aria-labelledby` at the visible label, or pass `aria-label`.
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: Sonner
3
+ slug: sonner
4
+ description: "Toasts: a short past-tense confirmation at the bottom centre after an action."
5
+ group: Feedback
6
+ layer: primitive
7
+ status: stable
8
+ since: 0.3.0
9
+ import: import { Toaster, toast } from "@major-tech/ui/sonner";
10
+ source: packages/ui/src/components/sonner.tsx
11
+ ---
12
+
13
+ # Sonner
14
+
15
+ ## Usage
16
+
17
+ ### Toasts
18
+
19
+ A short confirmation at the bottom centre after an action: panel text on the inverted tooltip fill, 13px, 7px corners, gone after 2.8s. Up to three stack. An optional 14px icon for results that matter, and one text action such as Undo.
20
+
21
+ Example: `toasts`
22
+
23
+ ```tsx
24
+ "use client";
25
+
26
+ import { Button } from "@major-tech/ui/button";
27
+ import { toast } from "@major-tech/ui/sonner";
28
+ import { Check } from "lucide-react";
29
+
30
+ const handleDisconnect = () => {
31
+ toast("GitHub disconnected", { action: { label: "Undo", onClick: () => toast("GitHub reconnected") } });
32
+ };
33
+
34
+ // <Toaster /> is mounted once at the root of the app; any component then calls toast().
35
+ export default function SonnerToasts() {
36
+ return (
37
+ <>
38
+ <Button variant="outline" onClick={() => toast("Saved as v5")}>
39
+ Save
40
+ </Button>
41
+ <Button variant="outline" onClick={() => toast("Link copied", { icon: <Check /> })}>
42
+ Copy link
43
+ </Button>
44
+ <Button variant="outline" onClick={handleDisconnect}>
45
+ Disconnect
46
+ </Button>
47
+ </>
48
+ );
49
+ }
50
+ ```
51
+
52
+ ### Alert or toast?
53
+
54
+ - A **toast** confirms what just happened, and disappears.
55
+ - An **Alert** says what is true now, and stays. Errors that need action are Alerts.
56
+
57
+ ### Guidelines
58
+
59
+ Do:
60
+
61
+ - Past tense, naming what happened: “Saved as v5”, “Link copied”, “GitHub connected”.
62
+ - Offer Undo in `action` after a reversible delete, instead of confirming first.
63
+ - One short line: the toast is gone in under three seconds.
64
+
65
+ Don't:
66
+
67
+ - “Successfully saved!”: no “successfully”, no exclamation marks.
68
+ - Errors that need action: those are Alerts.
69
+ - Anything the person must read later, or the only way to do something.
70
+
71
+ ## API
72
+
73
+ ```tsx
74
+ import { Toaster, toast } from "@major-tech/ui/sonner";
75
+ ```
76
+
77
+ `app/layout.tsx`:
78
+
79
+ ```tsx
80
+ import { Toaster } from "@major-tech/ui/sonner";
81
+
82
+ export default function RootLayout({ children }) {
83
+ return (
84
+ <html lang="en">
85
+ <body>
86
+ {children}
87
+ <Toaster />
88
+ </body>
89
+ </html>
90
+ );
91
+ }
92
+ ```
93
+
94
+ ### `<Toaster />`
95
+
96
+ sonner's Toaster with Major's position, duration and styling. Every other sonner prop passes through.
97
+
98
+ | Prop | Type | Default | Description |
99
+ | --- | --- | --- | --- |
100
+ | `position` | `Position` | `"bottom-center"` | Where toasts appear. |
101
+ | `duration` | `number` | `2800` | Milliseconds each toast stays. |
102
+ | `toastOptions` | `ToastOptions` | — | Replaces Major's unstyled toast classes: pass it only to restyle every toast. |
103
+
104
+ ### `toast(message, options?)`
105
+
106
+ sonner's toast, re-exported from `@major-tech/ui/sonner`. `toast.success`, `toast.error` and `toast.dismiss` work as in sonner.
107
+
108
+ | Prop | Type | Default | Description |
109
+ | --- | --- | --- | --- |
110
+ | `message`* | `ReactNode` | — | What happened, in the past tense. |
111
+ | `options.icon` | `ReactNode` | — | A leading 14px icon: `<Check />`. |
112
+ | `options.action` | `{ label: ReactNode; onClick: (event) => void }` | — | One text action, such as Undo. |
113
+ | `options.duration` | `number` | — | Override the 2.8s for this toast, in ms. |
114
+ | `options.id` | `string \| number` | — | Update or dismiss a specific toast. |
115
+
116
+ `*` marks a required prop.
117
+
118
+ ### Accessibility
119
+
120
+ - Toasts are announced through a polite live region.
121
+ - Hovering a toast pauses its timer. From the keyboard, Alt+T (Option+T on a Mac) moves focus to the toasts and pauses them; tabbing to one doesn't.
122
+ - Never put the only way to do something in a toast.
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: Spinner
3
+ slug: spinner
4
+ description: Work of unknown length, turning inside the control that started it.
5
+ group: Feedback
6
+ layer: primitive
7
+ status: stable
8
+ since: 0.1.0
9
+ import: import { Spinner } from "@major-tech/ui/spinner";
10
+ source: packages/ui/src/components/spinner.tsx
11
+ ---
12
+
13
+ # Spinner
14
+
15
+ ## Usage
16
+
17
+ ### In the control
18
+
19
+ The loader-circle, 14px at a 1.5 stroke, one turn every 0.9s. It turns inside the control that started the work, which stays disabled until it ends. Button's `loading` does this for you: the first icon becomes the spinner.
20
+
21
+ Example: `in-a-control`
22
+
23
+ ```tsx
24
+ import { Button } from "@major-tech/ui/button";
25
+ import { RefreshCw } from "lucide-react";
26
+
27
+ export default function SpinnerInAControl() {
28
+ return (
29
+ <>
30
+ <Button loading>Connecting…</Button>
31
+ <Button variant="outline" loading>
32
+ <RefreshCw />
33
+ Syncing…
34
+ </Button>
35
+ </>
36
+ );
37
+ }
38
+ ```
39
+
40
+ ### Beside a line of text
41
+
42
+ Work that no control started: a check that runs on its own, the next page of a list. The text says what is happening, in the present tense. Size the spinner with `size-*` to the text next to it: 14px beside `ui` text, 16px beside `body` text.
43
+
44
+ Example: `beside-text`
45
+
46
+ ```tsx
47
+ import { Spinner } from "@major-tech/ui/spinner";
48
+
49
+ export default function SpinnerBesideText() {
50
+ return (
51
+ <div className="flex flex-col gap-space-12">
52
+ <span className="flex items-center gap-space-6 text-ui text-muted">
53
+ <Spinner />
54
+ Checking the connection…
55
+ </span>
56
+ <span className="flex items-center gap-space-8 text-body text-muted">
57
+ <Spinner className="size-4" aria-label="Loading more runs" />
58
+ Loading more runs…
59
+ </span>
60
+ </div>
61
+ );
62
+ }
63
+ ```
64
+
65
+ ### Which one?
66
+
67
+ - Unknown length → Spinner, in the control or beside the text.
68
+ - Known amount → Progress.
69
+ - Content on its way, whose layout you know → Skeleton.
70
+ - A state that lasts (Live, Running) → StatusDot with `isPulsing`.
71
+
72
+ ### Guidelines
73
+
74
+ Do:
75
+
76
+ ```tsx
77
+ <Button loading>Publishing…</Button>
78
+ ```
79
+
80
+ - Present tense while working, past tense when done: “Publishing…” → “Published”.
81
+ - One spinner per piece of work, where it was started.
82
+ - Holds still with reduced motion; the words still say what’s happening.
83
+
84
+ Don't:
85
+
86
+ ```tsx
87
+ <Spinner className="size-8" />
88
+ ```
89
+
90
+ - A full-page or overlay spinner for one action: nothing else on the page locks.
91
+ - A spinner with no words near it.
92
+ - A spinner in place of a Skeleton when you know the layout.
93
+
94
+ ## API
95
+
96
+ ```tsx
97
+ import { Spinner } from "@major-tech/ui/spinner";
98
+ ```
99
+
100
+ ### `<Spinner />`
101
+
102
+ Lucide's `LoaderCircle`; also accepts native `<svg>` attributes.
103
+
104
+ | Prop | Type | Default | Description |
105
+ | --- | --- | --- | --- |
106
+ | `className` | `string` | — | Size it with `size-*`: 14px (`size-3.5`) by default. Colour comes from the text colour. |
107
+ | `aria-label` | `string` | `"Loading"` | What screen readers hear. Name the work when it has a name: “Loading more runs”. |
108
+
109
+ ### Accessibility
110
+
111
+ - Renders `role="status"` with the label “Loading”; a loading Button sets `aria-busy` instead.
112
+ - Stops turning under `prefers-reduced-motion`.
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: StatStrip
3
+ slug: stat-strip
4
+ description: A row of key numbers at the top of a page or chart.
5
+ group: Data
6
+ layer: composed
7
+ status: stable
8
+ since: 0.1.0
9
+ import: import { StatStrip } from "@major-tech/ui/stat-strip";
10
+ source: packages/ui/src/components/stat-strip.tsx
11
+ ---
12
+
13
+ # StatStrip
14
+
15
+ ## Usage
16
+
17
+ ### Key numbers
18
+
19
+ One card split into equal cells by line rules. Label 12px muted, value 20px semibold, an optional unit or total in 13px muted. A `hint` puts an info icon after the label with the explanation in a tooltip. On phones the cells wrap into two columns.
20
+
21
+ Example: `key-numbers`
22
+
23
+ ```tsx
24
+ import { StatStrip } from "@major-tech/ui/stat-strip";
25
+
26
+ export default function StatStripKeyNumbers() {
27
+ return (
28
+ <StatStrip
29
+ className="w-full"
30
+ stats={[
31
+ { label: "Spend", value: "$412.80", hint: "Model, compute and browser spend this period." },
32
+ { label: "Runs", value: "1,284", hint: "Every agent run, from any source." },
33
+ { label: "Storage", value: "1.4 GB", unit: "of 10 GB" },
34
+ { label: "Users", value: "37" },
35
+ { label: "Agents", value: "12", unit: "active" },
36
+ ]}
37
+ />
38
+ );
39
+ }
40
+ ```
41
+
42
+ ### Guidelines
43
+
44
+ Do:
45
+
46
+ - Three to five cells.
47
+ - Money in the organization's currency with two decimals: $22.34.
48
+ - A hint when a number needs explaining.
49
+
50
+ Don't:
51
+
52
+ - Colour values by status.
53
+ - Trend arrows or sparklines inside the cells.
54
+ - More than five numbers: that's a chart.
55
+
56
+ ## API
57
+
58
+ ```tsx
59
+ import { StatStrip } from "@major-tech/ui/stat-strip";
60
+ ```
61
+
62
+ ### `<StatStrip />`
63
+
64
+ | Prop | Type | Default | Description |
65
+ | --- | --- | --- | --- |
66
+ | `stats`* | `Stat[]` | — | One cell per number, in order. |
67
+ | `className` | `string` | — | On the card. |
68
+
69
+ `*` marks a required prop.
70
+
71
+ ### `Stat`
72
+
73
+ | Prop | Type | Default | Description |
74
+ | --- | --- | --- | --- |
75
+ | `label`* | `string` | — | 12px muted; also the cell's key. |
76
+ | `value`* | `ReactNode` | — | “1.4 GB”, “$22.34”. |
77
+ | `unit` | `ReactNode` | — | After the value, smaller: “runs”, “of 10 GB”. |
78
+ | `hint` | `ReactNode` | — | What the number means, in a tooltip on an info icon. |
79
+
80
+ `*` marks a required prop.
81
+
82
+ ### Accessibility
83
+
84
+ - The info icon is a button named “About {label}”; its tooltip opens on focus too.
85
+ - Labels are unique within a strip: they key the cells.
@@ -0,0 +1,190 @@
1
+ ---
2
+ name: StatusDot
3
+ slug: status-dot
4
+ description: "A 7px dot and a short label: healthy, needs attention, failing, paused."
5
+ group: Feedback
6
+ layer: primitive
7
+ status: stable
8
+ since: 0.3.0
9
+ import: import { StatusDot, STATUS_DOT_TONES } from "@major-tech/ui/status-dot";
10
+ source: packages/ui/src/components/status-dot.tsx
11
+ ---
12
+
13
+ # StatusDot
14
+
15
+ ## Usage
16
+
17
+ ### Tones
18
+
19
+ A 7px dot and a 13px `ink-2` label. The word carries the meaning.
20
+
21
+ Example: `tones`
22
+
23
+ ```tsx
24
+ import { StatusDot } from "@major-tech/ui/status-dot";
25
+
26
+ export default function StatusDotTones() {
27
+ return (
28
+ <>
29
+ <StatusDot tone="ok">Healthy</StatusDot>
30
+ <StatusDot tone="warn">Needs attention</StatusDot>
31
+ <StatusDot tone="danger">Failing</StatusDot>
32
+ <StatusDot tone="off">Paused</StatusDot>
33
+ </>
34
+ );
35
+ }
36
+ ```
37
+
38
+ - **ok** — Healthy, Live.
39
+ - **warn** — Needs attention.
40
+ - **danger** — Failing.
41
+ - **off** — Paused (faint).
42
+
43
+ ### Pulsing
44
+
45
+ `isPulsing` pings a ring out of the dot, once a second, while the state is happening right now. Any tone pulses; with reduced motion the dot holds still.
46
+
47
+ Example: `pulsing`
48
+
49
+ ```tsx
50
+ "use client";
51
+
52
+ import { useState } from "react";
53
+ import { STATUS_DOT_TONES, StatusDot, type StatusDotTone } from "@major-tech/ui/status-dot";
54
+ import { ToggleGroup, ToggleGroupItem } from "@major-tech/ui/toggle-group";
55
+
56
+ const MOMENTS = {
57
+ LIVE: "live",
58
+ RETRYING: "retrying",
59
+ FAILING: "failing",
60
+ WAKING: "waking",
61
+ } as const;
62
+
63
+ type Moment = (typeof MOMENTS)[keyof typeof MOMENTS];
64
+
65
+ /** Something happening right now, in each tone: one of them pulses at a time. */
66
+ const MOMENT_DOTS: Record<Moment, { tone: StatusDotTone; label: string }> = {
67
+ [MOMENTS.LIVE]: { tone: STATUS_DOT_TONES.OK, label: "Live" },
68
+ [MOMENTS.RETRYING]: { tone: STATUS_DOT_TONES.WARN, label: "Retrying" },
69
+ [MOMENTS.FAILING]: { tone: STATUS_DOT_TONES.DANGER, label: "Failing now" },
70
+ [MOMENTS.WAKING]: { tone: STATUS_DOT_TONES.OFF, label: "Waking up" },
71
+ };
72
+
73
+ const MOMENT_VALUES = Object.values(MOMENTS);
74
+
75
+ function checkIfMoment(value: string): value is Moment {
76
+ return MOMENT_VALUES.some((moment) => moment === value);
77
+ }
78
+
79
+ export default function StatusDotPulsing() {
80
+ const [moment, setMoment] = useState<Moment>(MOMENTS.LIVE);
81
+ const dot = MOMENT_DOTS[moment];
82
+
83
+ // A single choice: pressing the picked chip again keeps it.
84
+ const handleValueChange = (value: string[]) => {
85
+ const [next] = value;
86
+
87
+ if (next !== undefined && checkIfMoment(next)) {
88
+ setMoment(next);
89
+ }
90
+ };
91
+
92
+ return (
93
+ <div className="flex flex-col items-start gap-space-16">
94
+ <ToggleGroup value={[moment]} onValueChange={handleValueChange} aria-label="Tone">
95
+ {MOMENT_VALUES.map((value) => (
96
+ <ToggleGroupItem key={value} value={value}>
97
+ {MOMENT_DOTS[value].label}
98
+ </ToggleGroupItem>
99
+ ))}
100
+ </ToggleGroup>
101
+ <StatusDot tone={dot.tone} isPulsing>
102
+ {dot.label}
103
+ </StatusDot>
104
+ </div>
105
+ );
106
+ }
107
+ ```
108
+
109
+ - Pulse only what changes while you look: a live stream, a run in progress, a retry.
110
+ - One pulsing dot in view, two at most. A list of them is noise: pulse the row that’s live now.
111
+ - A settled state never pulses: Healthy, Failed, Paused.
112
+
113
+ ### In a list
114
+
115
+ The status of each row, at the end of the row or in its own column.
116
+
117
+ Example: `in-a-list`
118
+
119
+ ```tsx
120
+ import { StatusDot, type StatusDotTone } from "@major-tech/ui/status-dot";
121
+
122
+ interface Agent {
123
+ name: string;
124
+ tone: StatusDotTone;
125
+ status: string;
126
+ }
127
+
128
+ const AGENTS: Agent[] = [
129
+ { name: "Lead tracker", tone: "ok", status: "Healthy" },
130
+ { name: "Outbound sender", tone: "danger", status: "Failing" },
131
+ { name: "Standup notes", tone: "off", status: "Paused" },
132
+ ];
133
+
134
+ export default function StatusDotInAList() {
135
+ return (
136
+ <div className="flex w-80 flex-col divide-y divide-line rounded-xl border border-panel-edge bg-surface shadow-card">
137
+ {AGENTS.map((agent) => (
138
+ <div key={agent.name} className="flex items-center justify-between px-space-14 py-space-10">
139
+ <span className="text-ui-strong text-ink">{agent.name}</span>
140
+ <StatusDot tone={agent.tone}>{agent.status}</StatusDot>
141
+ </div>
142
+ ))}
143
+ </div>
144
+ );
145
+ }
146
+ ```
147
+
148
+ ### Guidelines
149
+
150
+ Do:
151
+
152
+ ```tsx
153
+ <StatusDot tone="warn">Needs attention</StatusDot>
154
+ ```
155
+
156
+ - Always pair a dot with its label.
157
+ - One or two words: what state the thing is in now.
158
+ - A version state (Live, Draft) is a Badge.
159
+
160
+ Don't:
161
+
162
+ ```tsx
163
+ <StatusDot tone="warn" />
164
+ ```
165
+
166
+ - A dot without words: colour is never the only carrier of meaning.
167
+ - Dots for things that are not a status: categories, owners.
168
+ - `danger` for something merely paused.
169
+
170
+ ## API
171
+
172
+ ```tsx
173
+ import { StatusDot, STATUS_DOT_TONES } from "@major-tech/ui/status-dot";
174
+ ```
175
+
176
+ ### `<StatusDot />`
177
+
178
+ Also accepts native `<span>` attributes. `STATUS_DOT_TONES` holds the tones as constants.
179
+
180
+ | Prop | Type | Default | Description |
181
+ | --- | --- | --- | --- |
182
+ | `tone` | `"ok" \| "warn" \| "danger" \| "off"` | `"ok"` | Dot colour: `ok`, `warn`, `danger`, or `faint` for `off`. |
183
+ | `isPulsing` | `boolean` | `false` | Pings a ring out of the dot while the state is happening right now. Holds still with reduced motion. |
184
+ | `children` | `ReactNode` | — | The label. Always give one. |
185
+
186
+ ### Accessibility
187
+
188
+ - The dot is an empty element; the label is what screen readers read.
189
+ - The pulse stops under `prefers-reduced-motion`; the label still says the state.
190
+ - Label contrast meets 4.5:1 in both themes.