@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,39 @@
1
+ "use client";
2
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import { Check, ChevronDown } from "lucide-react";
5
+ import { cn } from "../lib/cn.js";
6
+ import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "./command.js";
7
+ import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
8
+ import { SELECT_TRIGGER_SIZES, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, getSelectTriggerClassName, } from "./select.js";
9
+ /**
10
+ * Past this many options a plain list stops being scannable and people scroll for a name they already know: the
11
+ * select grows a search line. The default for `threshold`.
12
+ */
13
+ export const SEARCHABLE_SELECT_THRESHOLD = 10;
14
+ /**
15
+ * A Select that grows a search line once its list is too long to scan: up to `threshold` options (ten by default) it
16
+ * is a Select; past that the same field opens a Popover with a Command. Either way it looks like the Select, and its list stops at 300px.
17
+ */
18
+ export function SearchableSelect({ options, value, onValueChange, placeholder, searchPlaceholder = placeholder, emptyText = "No matches.", threshold = SEARCHABLE_SELECT_THRESHOLD, size = SELECT_TRIGGER_SIZES.DEFAULT, disabled = false, id, "aria-label": ariaLabel, className, listClassName = "max-h-75", }) {
19
+ const [isOpen, setIsOpen] = useState(false);
20
+ const selected = options.find((option) => option.value === value);
21
+ if (options.length <= threshold) {
22
+ const items = options.map((option) => ({
23
+ value: option.value,
24
+ label: (_jsxs("span", { className: "flex items-center gap-space-4", children: [option.label, option.icon] })),
25
+ }));
26
+ const handleValueChange = (next) => {
27
+ if (next !== null) {
28
+ onValueChange(next);
29
+ }
30
+ };
31
+ return (_jsxs(Select, { items: items, value: value, disabled: disabled, onValueChange: handleValueChange, children: [_jsx(SelectTrigger, { id: id, size: size, className: className, "aria-label": ariaLabel, children: _jsx(SelectValue, { placeholder: placeholder }) }), _jsx(SelectContent, { className: listClassName, children: items.map((item) => (_jsx(SelectItem, { value: item.value, children: item.label }, item.value))) })] }));
32
+ }
33
+ const handleSelect = (next) => {
34
+ onValueChange(next);
35
+ setIsOpen(false);
36
+ };
37
+ return (_jsxs(Popover, { open: isOpen, onOpenChange: setIsOpen, children: [_jsxs(PopoverTrigger, { "data-slot": "searchable-select-trigger", render: _jsx("button", { id: id, type: "button", disabled: disabled, "aria-label": ariaLabel, className: cn(getSelectTriggerClassName(size), "min-w-0", className) }), children: [_jsxs("span", { className: cn("flex min-w-0 items-center gap-space-4", !selected && "text-muted"), children: [_jsx("span", { className: "truncate", children: selected?.label ?? placeholder }), selected?.icon] }), _jsx(ChevronDown, { className: "size-3.5 shrink-0 text-muted" })] }), _jsx(PopoverContent, { align: "start", className: "w-72 min-w-(--anchor-width) overflow-hidden p-0", children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: searchPlaceholder, "aria-label": searchPlaceholder }), _jsxs(CommandList, { className: listClassName, children: [_jsx(CommandEmpty, { children: emptyText }), _jsx(CommandGroup, { children: options.map((option) => (_jsxs(CommandItem, { value: option.value, keywords: [option.label], onSelect: () => handleSelect(option.value), children: [_jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-space-4", children: [_jsx("span", { className: "truncate", children: option.label }), option.icon] }), option.value === value && (_jsx("span", { className: "flex text-link", children: _jsx(Check, {}) }))] }, option.value))) })] })] }) })] }));
38
+ }
39
+ //# sourceMappingURL=searchable-select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchable-select.js","sourceRoot":"","sources":["../../src/components/searchable-select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAe,CAAC;AAC5G,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAe,CAAC;AACxE,OAAO,EACL,oBAAoB,EACpB,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,EACX,yBAAyB,GAC1B,MAAM,aAAc,CAAC;AAEtB;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AAa,aACnC,KAAC,YAAY,cAAE,SAAS,GAAgB,EACxC,KAAC,YAAY,cACV,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,MAAC,WAAW,IAEV,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,QAAQ,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EACxB,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,aAE1C,gBAAM,SAAS,EAAC,8CAA8C,aAC5D,eAAM,SAAS,EAAC,UAAU,YAAE,MAAM,CAAC,KAAK,GAAQ,EAC/C,MAAM,CAAC,IAAI,IACP,EAEN,MAAM,CAAC,KAAK,KAAK,KAAK,IAAI,CACzB,eAAM,SAAS,EAAC,gBAAgB,YAC9B,KAAC,KAAK,KAAG,GACJ,CACR,KAdI,MAAM,CAAC,KAAK,CAeL,CACf,CAAC,GACW,IACH,IACN,GACK,IACT,CACX,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport { useState, type ReactNode } from \"react\";\nimport { Check, ChevronDown } from \"lucide-react\";\nimport { cn } from \"../lib/cn.ts\";\nimport { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from \"./command.tsx\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover.tsx\";\nimport {\n SELECT_TRIGGER_SIZES,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n getSelectTriggerClassName,\n} from \"./select.tsx\";\n\n/**\n * Past this many options a plain list stops being scannable and people scroll for a name they already know: the\n * select grows a search line. The default for `threshold`.\n */\nexport const SEARCHABLE_SELECT_THRESHOLD = 10;\n\nexport interface SearchableSelectOption {\n value: string;\n label: string;\n /** After the label: a lock on a private channel. The search reads the label only. */\n icon?: ReactNode;\n}\n\ntype SelectTriggerSize = (typeof SELECT_TRIGGER_SIZES)[keyof typeof SELECT_TRIGGER_SIZES];\n\nexport interface SearchableSelectProps {\n options: SearchableSelectOption[];\n /** The chosen option's value; null while nothing is chosen. */\n value: string | null;\n onValueChange: (value: string) => void;\n /** On the trigger while nothing is chosen, and in the search line unless `searchPlaceholder` is set. */\n placeholder: string;\n searchPlaceholder?: string;\n /** Shown in the search list when nothing matches. */\n emptyText?: string;\n /** Past this many options the field grows a search line. Default: `SEARCHABLE_SELECT_THRESHOLD` (10). */\n threshold?: number;\n size?: SelectTriggerSize;\n disabled?: boolean;\n /** For a `<Label htmlFor>`. */\n id?: string;\n \"aria-label\"?: string;\n /** On the trigger: its width. */\n className?: string;\n /** On either list: its height cap, `max-h-*`. Default: 300px. */\n listClassName?: string;\n}\n\n/**\n * A Select that grows a search line once its list is too long to scan: up to `threshold` options (ten by default) it\n * is a Select; past that the same field opens a Popover with a Command. Either way it looks like the Select, and its list stops at 300px.\n */\nexport function SearchableSelect({\n options,\n value,\n onValueChange,\n placeholder,\n searchPlaceholder = placeholder,\n emptyText = \"No matches.\",\n threshold = SEARCHABLE_SELECT_THRESHOLD,\n size = SELECT_TRIGGER_SIZES.DEFAULT,\n disabled = false,\n id,\n \"aria-label\": ariaLabel,\n className,\n listClassName = \"max-h-75\",\n}: SearchableSelectProps) {\n const [isOpen, setIsOpen] = useState(false);\n const selected = options.find((option) => option.value === value);\n\n if (options.length <= threshold) {\n const items = options.map((option) => ({\n value: option.value,\n label: (\n <span className=\"flex items-center gap-space-4\">\n {option.label}\n {option.icon}\n </span>\n ),\n }));\n\n const handleValueChange = (next: string | null) => {\n if (next !== null) {\n onValueChange(next);\n }\n };\n\n return (\n <Select items={items} value={value} disabled={disabled} onValueChange={handleValueChange}>\n <SelectTrigger id={id} size={size} className={className} aria-label={ariaLabel}>\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent className={listClassName}>\n {items.map((item) => (\n <SelectItem key={item.value} value={item.value}>\n {item.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n );\n }\n\n const handleSelect = (next: string) => {\n onValueChange(next);\n setIsOpen(false);\n };\n\n return (\n <Popover open={isOpen} onOpenChange={setIsOpen}>\n <PopoverTrigger\n data-slot=\"searchable-select-trigger\"\n render={\n <button\n id={id}\n type=\"button\"\n disabled={disabled}\n aria-label={ariaLabel}\n className={cn(getSelectTriggerClassName(size), \"min-w-0\", className)}\n />\n }\n >\n <span className={cn(\"flex min-w-0 items-center gap-space-4\", !selected && \"text-muted\")}>\n <span className=\"truncate\">{selected?.label ?? placeholder}</span>\n {selected?.icon}\n </span>\n <ChevronDown className=\"size-3.5 shrink-0 text-muted\" />\n </PopoverTrigger>\n\n <PopoverContent align=\"start\" className=\"w-72 min-w-(--anchor-width) overflow-hidden p-0\">\n {/* An item's value is the option's (two options can share a name); it is found by its label. */}\n <Command>\n <CommandInput placeholder={searchPlaceholder} aria-label={searchPlaceholder} />\n <CommandList className={listClassName}>\n <CommandEmpty>{emptyText}</CommandEmpty>\n <CommandGroup>\n {options.map((option) => (\n <CommandItem\n key={option.value}\n value={option.value}\n keywords={[option.label]}\n onSelect={() => handleSelect(option.value)}\n >\n <span className=\"flex min-w-0 flex-1 items-center gap-space-4\">\n <span className=\"truncate\">{option.label}</span>\n {option.icon}\n </span>\n {/* In a span: the row tints its own icons ink-2, and the check is link green. */}\n {option.value === value && (\n <span className=\"flex text-link\">\n <Check />\n </span>\n )}\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n}\n"]}
@@ -0,0 +1,60 @@
1
+ import { type ReactNode } from "react";
2
+ import { Select as SelectPrimitive } from "@base-ui/react/select";
3
+ export declare const SELECT_TRIGGER_SIZES: {
4
+ /** 30px: in rows and tables. */
5
+ readonly SM: "sm";
6
+ /** 32px: the editor inspector. */
7
+ readonly MD: "md";
8
+ /** 34px: forms, beside Medium buttons and inputs. */
9
+ readonly DEFAULT: "default";
10
+ };
11
+ type SelectTriggerSize = (typeof SELECT_TRIGGER_SIZES)[keyof typeof SELECT_TRIGGER_SIZES];
12
+ export declare const SELECT_TRIGGER_VARIANTS: {
13
+ /** The field: a bordered box, for forms, tables and the inspector. */
14
+ readonly DEFAULT: "default";
15
+ /** No box: muted 12px text, 28px tall at any size, filled on hover and while open. The composer's settings row. */
16
+ readonly GHOST: "ghost";
17
+ };
18
+ type SelectTriggerVariant = (typeof SELECT_TRIGGER_VARIANTS)[keyof typeof SELECT_TRIGGER_VARIANTS];
19
+ /**
20
+ * A field that opens the menu sheet with the current option checked. Always this, never the browser's native list.
21
+ * Pass the options' labels as `items` (`{ value, label }[]` or a `{ [value]: label }` record) so the trigger shows the
22
+ * picked label rather than its value.
23
+ */
24
+ declare const Select: typeof SelectPrimitive.Root;
25
+ /** Options under one `SelectLabel`: the label must sit inside a group. */
26
+ declare function SelectGroup(props: SelectPrimitive.Group.Props): import("react").JSX.Element;
27
+ /** The picked option's label inside the trigger (from the root's `items`); `placeholder` while nothing is picked. */
28
+ declare function SelectValue(props: SelectPrimitive.Value.Props): import("react").JSX.Element;
29
+ /**
30
+ * The field's look, also for a trigger that opens a menu rather than a list of options (a filter
31
+ * beside a select), so the two read as one row of fields.
32
+ */
33
+ export declare function getSelectTriggerClassName(size?: SelectTriggerSize, variant?: SelectTriggerVariant): string;
34
+ /**
35
+ * The field: the value and a chevron. `size` by placement: 34px in forms (default), 32px, 30px in rows and tables.
36
+ * `variant="ghost"` drops the box for a quiet row of settings.
37
+ */
38
+ declare function SelectTrigger({ className, size, variant, children, ...props }: SelectPrimitive.Trigger.Props & {
39
+ size?: SelectTriggerSize;
40
+ variant?: SelectTriggerVariant;
41
+ }): import("react").JSX.Element;
42
+ type SelectContentProps = SelectPrimitive.Popup.Props & Pick<SelectPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" | "collisionPadding">;
43
+ /**
44
+ * The menu sheet, 6px under the field, aligned to its start and at least as wide. It never covers the field (Base UI's
45
+ * `alignItemWithTrigger` is off), keeping 10px from the window's edges.
46
+ */
47
+ declare function SelectContent({ className, children, side, sideOffset, align, alignOffset, collisionPadding, onPointerMove, onKeyDown, ...props }: SelectContentProps): import("react").JSX.Element;
48
+ /** A section header inside the sheet, 12px `muted`. It labels its `SelectGroup`, so it goes inside one. */
49
+ declare function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props): import("react").JSX.Element;
50
+ type SelectItemProps = SelectPrimitive.Item.Props & {
51
+ /** A leading icon, e.g. for roles. Only the label shows in the trigger. */
52
+ icon?: ReactNode;
53
+ /** A second line in `muted` for options that need explaining ("Can change it"). */
54
+ description?: ReactNode;
55
+ };
56
+ /** One option: a 32px row (44px with a description), a `link` check on the current one. */
57
+ declare function SelectItem({ className, children, icon, description, ...props }: SelectItemProps): import("react").JSX.Element;
58
+ declare function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props): import("react").JSX.Element;
59
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };
60
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIlE,eAAO,MAAM,oBAAoB;IAC/B,gCAAgC;;IAEhC,kCAAkC;;IAElC,qDAAqD;;CAE7C,CAAC;AAEX,KAAK,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAE1F,eAAO,MAAM,uBAAuB;IAClC,sEAAsE;;IAEtE,mHAAmH;;CAE3G,CAAC;AAEX,KAAK,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAqBnG;;;;GAIG;AACH,QAAA,MAAM,MAAM,6BAAuB,CAAC;AAEpC,0EAA0E;AAC1E,iBAAS,WAAW,CAA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EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAsBxF;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,SAAS,CAAC,KAAK,+BAQhF;AAED,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,94 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import { Select as SelectPrimitive } from "@base-ui/react/select";
5
+ import { Check, ChevronDown } from "lucide-react";
6
+ import { cn } from "../lib/cn.js";
7
+ export const SELECT_TRIGGER_SIZES = {
8
+ /** 30px: in rows and tables. */
9
+ SM: "sm",
10
+ /** 32px: the editor inspector. */
11
+ MD: "md",
12
+ /** 34px: forms, beside Medium buttons and inputs. */
13
+ DEFAULT: "default",
14
+ };
15
+ export const SELECT_TRIGGER_VARIANTS = {
16
+ /** The field: a bordered box, for forms, tables and the inspector. */
17
+ DEFAULT: "default",
18
+ /** No box: muted 12px text, 28px tall at any size, filled on hover and while open. The composer's settings row. */
19
+ GHOST: "ghost",
20
+ };
21
+ /**
22
+ * Collision handling as before the move to Base UI: flip above the field when there's no room below, slide along to
23
+ * stay on screen, never move to another axis.
24
+ */
25
+ const COLLISION_AVOIDANCE = { side: "flip", align: "shift", fallbackAxisSide: "none" };
26
+ const TRIGGER_SIZE_CLASSES = {
27
+ [SELECT_TRIGGER_SIZES.SM]: "h-7.5 min-w-26",
28
+ [SELECT_TRIGGER_SIZES.MD]: "h-8 min-w-26",
29
+ [SELECT_TRIGGER_SIZES.DEFAULT]: "h-8.5 min-w-45",
30
+ };
31
+ /** Laid over the field's classes and its size: what a variant takes away or changes. */
32
+ const TRIGGER_VARIANT_CLASSES = {
33
+ [SELECT_TRIGGER_VARIANTS.DEFAULT]: "",
34
+ [SELECT_TRIGGER_VARIANTS.GHOST]: "h-7 min-w-0 gap-space-4 border-0 bg-transparent pr-space-6 pl-space-8 text-small font-medium text-muted hover:bg-hover hover:text-ink data-popup-open:bg-hover data-popup-open:text-ink",
35
+ };
36
+ /**
37
+ * A field that opens the menu sheet with the current option checked. Always this, never the browser's native list.
38
+ * Pass the options' labels as `items` (`{ value, label }[]` or a `{ [value]: label }` record) so the trigger shows the
39
+ * picked label rather than its value.
40
+ */
41
+ const Select = SelectPrimitive.Root;
42
+ /** Options under one `SelectLabel`: the label must sit inside a group. */
43
+ function SelectGroup(props) {
44
+ return _jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
45
+ }
46
+ /** The picked option's label inside the trigger (from the root's `items`); `placeholder` while nothing is picked. */
47
+ function SelectValue(props) {
48
+ return _jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
49
+ }
50
+ /**
51
+ * The field's look, also for a trigger that opens a menu rather than a list of options (a filter
52
+ * beside a select), so the two read as one row of fields.
53
+ */
54
+ export function getSelectTriggerClassName(size = SELECT_TRIGGER_SIZES.DEFAULT, variant = SELECT_TRIGGER_VARIANTS.DEFAULT) {
55
+ return cn("flex w-fit cursor-pointer items-center justify-between gap-space-8 whitespace-nowrap rounded-md border border-line bg-surface px-space-10 text-left font-sans text-ui text-ink outline-none transition-[border-color,box-shadow] duration-120", "hover:border-faint focus-visible:border-faint focus-visible:ring-2 focus-visible:ring-secondary aria-expanded:border-faint aria-expanded:ring-2 aria-expanded:ring-secondary", "disabled:cursor-default disabled:opacity-50 data-[placeholder]:text-muted *:data-[slot=select-value]:truncate", TRIGGER_SIZE_CLASSES[size], TRIGGER_VARIANT_CLASSES[variant]);
56
+ }
57
+ /**
58
+ * The field: the value and a chevron. `size` by placement: 34px in forms (default), 32px, 30px in rows and tables.
59
+ * `variant="ghost"` drops the box for a quiet row of settings.
60
+ */
61
+ function SelectTrigger({ className, size = SELECT_TRIGGER_SIZES.DEFAULT, variant = SELECT_TRIGGER_VARIANTS.DEFAULT, children, ...props }) {
62
+ return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, "data-variant": variant, className: cn(getSelectTriggerClassName(size, variant), className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { render: (props) => (_jsx(ChevronDown, { ...props, className: "size-3.5 shrink-0 text-muted", children: null })) })] }));
63
+ }
64
+ /**
65
+ * The menu sheet, 6px under the field, aligned to its start and at least as wide. It never covers the field (Base UI's
66
+ * `alignItemWithTrigger` is off), keeping 10px from the window's edges.
67
+ */
68
+ function SelectContent({ className, children, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, collisionPadding = 10, onPointerMove, onKeyDown, ...props }) {
69
+ // The checked option is highlighted on open. Nothing looks hovered until the person moves the
70
+ // pointer or uses the keyboard: the selected option shows only its check.
71
+ const [hasInteracted, setHasInteracted] = useState(false);
72
+ const handlePointerMove = (event) => {
73
+ setHasInteracted(true);
74
+ onPointerMove?.(event);
75
+ };
76
+ const handleKeyDown = (event) => {
77
+ setHasInteracted(true);
78
+ onKeyDown?.(event);
79
+ };
80
+ return (_jsx(SelectPrimitive.Portal, { children: _jsx(SelectPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, collisionPadding: collisionPadding, collisionAvoidance: COLLISION_AVOIDANCE, alignItemWithTrigger: false, className: "isolate z-50 outline-none", children: _jsx(SelectPrimitive.Popup, { "data-slot": "select-content", "data-interacted": hasInteracted || undefined, onPointerMove: handlePointerMove, onKeyDown: handleKeyDown, className: cn("relative z-50 max-h-(--available-height) min-w-(--anchor-width) animate-pop-in overflow-y-auto rounded-xl border border-panel-edge bg-surface p-space-6 text-ink shadow-pop outline-none", className), ...props, children: _jsx(SelectPrimitive.List, { className: "flex flex-col", children: children }) }) }) }));
81
+ }
82
+ /** A section header inside the sheet, 12px `muted`. It labels its `SelectGroup`, so it goes inside one. */
83
+ function SelectLabel({ className, ...props }) {
84
+ return (_jsx(SelectPrimitive.GroupLabel, { "data-slot": "select-label", className: cn("px-space-8 pb-space-4 pt-space-2 text-small text-muted", className), ...props }));
85
+ }
86
+ /** One option: a 32px row (44px with a description), a `link` check on the current one. */
87
+ function SelectItem({ className, children, icon, description, ...props }) {
88
+ return (_jsxs(SelectPrimitive.Item, { "data-slot": "select-item", className: cn("relative flex w-full cursor-pointer select-none items-center gap-space-10 rounded-row px-space-8 text-ui text-ink outline-none", description ? "min-h-11" : "min-h-8", "[[data-interacted]_&]:data-[highlighted]:bg-hover data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>svg]:text-ink-2", className), ...props, children: [icon, _jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx(SelectPrimitive.ItemText, { children: children }), description && _jsx("span", { className: "text-small text-muted", children: description })] }), _jsx(SelectPrimitive.ItemIndicator, { className: "text-link", children: _jsx(Check, {}) })] }));
89
+ }
90
+ function SelectSeparator({ className, ...props }) {
91
+ return (_jsx(SelectPrimitive.Separator, { "data-slot": "select-separator", className: cn("mx-space-8 my-1.25 h-px bg-line", className), ...props }));
92
+ }
93
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };
94
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,gCAAgC;IAChC,EAAE,EAAE,IAAI;IACR,kCAAkC;IAClC,EAAE,EAAE,IAAI;IACR,qDAAq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vE,EACP,KAAC,eAAe,CAAC,aAAa,IAAC,SAAS,EAAC,WAAW,YAClD,KAAC,KAAK,KAAG,GACqB,IACX,CACxB,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAmC;IAC/E,OAAO,CACL,KAAC,eAAe,CAAC,SAAS,iBACd,kBAAkB,EAC5B,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,SAAS,CAAC,KACvD,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC","sourcesContent":["\"use client\";\n\nimport { useState, type ReactNode } from \"react\";\nimport { Select as SelectPrimitive } from \"@base-ui/react/select\";\nimport { Check, ChevronDown } from \"lucide-react\";\nimport { cn } from \"../lib/cn.ts\";\n\nexport const SELECT_TRIGGER_SIZES = {\n /** 30px: in rows and tables. */\n SM: \"sm\",\n /** 32px: the editor inspector. */\n MD: \"md\",\n /** 34px: forms, beside Medium buttons and inputs. */\n DEFAULT: \"default\",\n} as const;\n\ntype SelectTriggerSize = (typeof SELECT_TRIGGER_SIZES)[keyof typeof SELECT_TRIGGER_SIZES];\n\nexport const SELECT_TRIGGER_VARIANTS = {\n /** The field: a bordered box, for forms, tables and the inspector. */\n DEFAULT: \"default\",\n /** No box: muted 12px text, 28px tall at any size, filled on hover and while open. The composer's settings row. */\n GHOST: \"ghost\",\n} as const;\n\ntype SelectTriggerVariant = (typeof SELECT_TRIGGER_VARIANTS)[keyof typeof SELECT_TRIGGER_VARIANTS];\n\n/**\n * Collision handling as before the move to Base UI: flip above the field when there's no room below, slide along to\n * stay on screen, never move to another axis.\n */\nconst COLLISION_AVOIDANCE = { side: \"flip\", align: \"shift\", fallbackAxisSide: \"none\" } as const;\n\nconst TRIGGER_SIZE_CLASSES = {\n [SELECT_TRIGGER_SIZES.SM]: \"h-7.5 min-w-26\",\n [SELECT_TRIGGER_SIZES.MD]: \"h-8 min-w-26\",\n [SELECT_TRIGGER_SIZES.DEFAULT]: \"h-8.5 min-w-45\",\n} satisfies Record<SelectTriggerSize, string>;\n\n/** Laid over the field's classes and its size: what a variant takes away or changes. */\nconst TRIGGER_VARIANT_CLASSES = {\n [SELECT_TRIGGER_VARIANTS.DEFAULT]: \"\",\n [SELECT_TRIGGER_VARIANTS.GHOST]:\n \"h-7 min-w-0 gap-space-4 border-0 bg-transparent pr-space-6 pl-space-8 text-small font-medium text-muted hover:bg-hover hover:text-ink data-popup-open:bg-hover data-popup-open:text-ink\",\n} satisfies Record<SelectTriggerVariant, string>;\n\n/**\n * A field that opens the menu sheet with the current option checked. Always this, never the browser's native list.\n * Pass the options' labels as `items` (`{ value, label }[]` or a `{ [value]: label }` record) so the trigger shows the\n * picked label rather than its value.\n */\nconst Select = SelectPrimitive.Root;\n\n/** Options under one `SelectLabel`: the label must sit inside a group. */\nfunction SelectGroup(props: SelectPrimitive.Group.Props) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\n/** The picked option's label inside the trigger (from the root's `items`); `placeholder` while nothing is picked. */\nfunction SelectValue(props: SelectPrimitive.Value.Props) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\n/**\n * The field's look, also for a trigger that opens a menu rather than a list of options (a filter\n * beside a select), so the two read as one row of fields.\n */\nexport function getSelectTriggerClassName(\n size: SelectTriggerSize = SELECT_TRIGGER_SIZES.DEFAULT,\n variant: SelectTriggerVariant = SELECT_TRIGGER_VARIANTS.DEFAULT\n) {\n return cn(\n \"flex w-fit cursor-pointer items-center justify-between gap-space-8 whitespace-nowrap rounded-md border border-line bg-surface px-space-10 text-left font-sans text-ui text-ink outline-none transition-[border-color,box-shadow] duration-120\",\n \"hover:border-faint focus-visible:border-faint focus-visible:ring-2 focus-visible:ring-secondary aria-expanded:border-faint aria-expanded:ring-2 aria-expanded:ring-secondary\",\n \"disabled:cursor-default disabled:opacity-50 data-[placeholder]:text-muted *:data-[slot=select-value]:truncate\",\n TRIGGER_SIZE_CLASSES[size],\n TRIGGER_VARIANT_CLASSES[variant]\n );\n}\n\n/**\n * The field: the value and a chevron. `size` by placement: 34px in forms (default), 32px, 30px in rows and tables.\n * `variant=\"ghost\"` drops the box for a quiet row of settings.\n */\nfunction SelectTrigger({\n className,\n size = SELECT_TRIGGER_SIZES.DEFAULT,\n variant = SELECT_TRIGGER_VARIANTS.DEFAULT,\n children,\n ...props\n}: SelectPrimitive.Trigger.Props & { size?: SelectTriggerSize; variant?: SelectTriggerVariant }) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n data-variant={variant}\n className={cn(getSelectTriggerClassName(size, variant), className)}\n {...props}\n >\n {children}\n {/* Base UI's icon brings a \"▼\" text child; the chevron is drawn without it. */}\n <SelectPrimitive.Icon\n render={(props) => (\n <ChevronDown {...props} className=\"size-3.5 shrink-0 text-muted\">\n {null}\n </ChevronDown>\n )}\n />\n </SelectPrimitive.Trigger>\n );\n}\n\ntype SelectContentProps = SelectPrimitive.Popup.Props &\n Pick<SelectPrimitive.Positioner.Props, \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"collisionPadding\">;\n\n/**\n * The menu sheet, 6px under the field, aligned to its start and at least as wide. It never covers the field (Base UI's\n * `alignItemWithTrigger` is off), keeping 10px from the window's edges.\n */\nfunction SelectContent({\n className,\n children,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n collisionPadding = 10,\n onPointerMove,\n onKeyDown,\n ...props\n}: SelectContentProps) {\n // The checked option is highlighted on open. Nothing looks hovered until the person moves the\n // pointer or uses the keyboard: the selected option shows only its check.\n const [hasInteracted, setHasInteracted] = useState(false);\n\n const handlePointerMove: SelectContentProps[\"onPointerMove\"] = (event) => {\n setHasInteracted(true);\n onPointerMove?.(event);\n };\n\n const handleKeyDown: SelectContentProps[\"onKeyDown\"] = (event) => {\n setHasInteracted(true);\n onKeyDown?.(event);\n };\n\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n collisionPadding={collisionPadding}\n collisionAvoidance={COLLISION_AVOIDANCE}\n alignItemWithTrigger={false}\n className=\"isolate z-50 outline-none\"\n >\n <SelectPrimitive.Popup\n data-slot=\"select-content\"\n data-interacted={hasInteracted || undefined}\n onPointerMove={handlePointerMove}\n onKeyDown={handleKeyDown}\n className={cn(\n \"relative z-50 max-h-(--available-height) min-w-(--anchor-width) animate-pop-in overflow-y-auto rounded-xl border border-panel-edge bg-surface p-space-6 text-ink shadow-pop outline-none\",\n className\n )}\n {...props}\n >\n <SelectPrimitive.List className=\"flex flex-col\">{children}</SelectPrimitive.List>\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n );\n}\n\n/** A section header inside the sheet, 12px `muted`. It labels its `SelectGroup`, so it goes inside one. */\nfunction SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props) {\n return (\n <SelectPrimitive.GroupLabel\n data-slot=\"select-label\"\n className={cn(\"px-space-8 pb-space-4 pt-space-2 text-small text-muted\", className)}\n {...props}\n />\n );\n}\n\ntype SelectItemProps = SelectPrimitive.Item.Props & {\n /** A leading icon, e.g. for roles. Only the label shows in the trigger. */\n icon?: ReactNode;\n /** A second line in `muted` for options that need explaining (\"Can change it\"). */\n description?: ReactNode;\n};\n\n/** One option: a 32px row (44px with a description), a `link` check on the current one. */\nfunction SelectItem({ className, children, icon, description, ...props }: SelectItemProps) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"relative flex w-full cursor-pointer select-none items-center gap-space-10 rounded-row px-space-8 text-ui text-ink outline-none\",\n description ? \"min-h-11\" : \"min-h-8\",\n \"[[data-interacted]_&]:data-[highlighted]:bg-hover data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>svg]:text-ink-2\",\n className\n )}\n {...props}\n >\n {icon}\n <span className=\"flex min-w-0 flex-1 flex-col\">\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n {description && <span className=\"text-small text-muted\">{description}</span>}\n </span>\n <SelectPrimitive.ItemIndicator className=\"text-link\">\n <Check />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"mx-space-8 my-1.25 h-px bg-line\", className)}\n {...props}\n />\n );\n}\n\nexport { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };\n"]}
@@ -0,0 +1,7 @@
1
+ import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
2
+ /**
3
+ * A 1px `line` rule, horizontal or vertical. Lay siblings out with gaps, and use a Separator only where a visible
4
+ * rule carries meaning.
5
+ */
6
+ export declare function Separator({ className, orientation, ...props }: SeparatorPrimitive.Props): import("react").JSX.Element;
7
+ //# sourceMappingURL=separator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAG3E;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,WAA0B,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,KAAK,+BAYtG"}
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
4
+ import { cn } from "../lib/cn.js";
5
+ /**
6
+ * A 1px `line` rule, horizontal or vertical. Lay siblings out with gaps, and use a Separator only where a visible
7
+ * rule carries meaning.
8
+ */
9
+ export function Separator({ className, orientation = "horizontal", ...props }) {
10
+ return (_jsx(SeparatorPrimitive, { "data-slot": "separator", orientation: orientation, className: cn("shrink-0 bg-line data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", className), ...props }));
11
+ }
12
+ //# sourceMappingURL=separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.js","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,WAAW,GAAG,YAAY,EAAE,GAAG,KAAK,EAA4B;IACrG,OAAO,CACL,KAAC,kBAAkB,iBACP,WAAW,EACrB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,EAAE,CACX,8JAA8J,EAC9J,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport { Separator as SeparatorPrimitive } from \"@base-ui/react/separator\";\nimport { cn } from \"../lib/cn.ts\";\n\n/**\n * A 1px `line` rule, horizontal or vertical. Lay siblings out with gaps, and use a Separator only where a visible\n * rule carries meaning.\n */\nexport function Separator({ className, orientation = \"horizontal\", ...props }: SeparatorPrimitive.Props) {\n return (\n <SeparatorPrimitive\n data-slot=\"separator\"\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-line data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px\",\n className\n )}\n {...props}\n />\n );\n}\n"]}
@@ -0,0 +1,41 @@
1
+ import { type ComponentProps, type PropsWithChildren, type ReactNode } from "react";
2
+ export interface SettingsSectionProps extends Omit<ComponentProps<"section">, "title"> {
3
+ /** 14px semibold heading. */
4
+ title?: ReactNode;
5
+ /** A `muted` line under the heading. */
6
+ description?: ReactNode;
7
+ /** A control beside the title that scopes the whole card (an environment switch). */
8
+ action?: ReactNode;
9
+ /** Destructive actions: a red edge around the card. */
10
+ danger?: boolean;
11
+ }
12
+ /**
13
+ * The building block of settings and configuration pages: a card with an optional heading and SettingsRows.
14
+ * Settings save as you go.
15
+ */
16
+ declare function SettingsSection({ title, description, action, danger, className, children, ...props }: SettingsSectionProps): import("react").JSX.Element;
17
+ export interface SettingsRowProps extends Omit<ComponentProps<"div">, "children"> {
18
+ /** 14px `ink`. */
19
+ label: ReactNode;
20
+ /** 13px `muted` under the label. */
21
+ description?: ReactNode;
22
+ /** One control: Switch, Select, Input, Button. */
23
+ control?: ReactNode;
24
+ /** Full-width content under the label row: a list, a table, a form. */
25
+ children?: ReactNode;
26
+ }
27
+ /** A row of a SettingsSection: label and description on the left, one control on the right. */
28
+ declare function SettingsRow({ label, description, control, children, className, ...props }: SettingsRowProps): import("react").JSX.Element;
29
+ export interface SettingsDangerButtonProps extends PropsWithChildren {
30
+ onClick: () => void;
31
+ /** Arms the button: the first click swaps in this label, the second runs `onClick`. Omit when the action opens its own confirmation. */
32
+ confirmText?: string;
33
+ disabled?: boolean;
34
+ }
35
+ /**
36
+ * A Danger zone action: full width, soft red, solid red while it waits for its confirming click. Arming swaps the label
37
+ * on the same button, so keyboard focus stays on it, and a polite live region announces the new label.
38
+ */
39
+ declare function SettingsDangerButton({ onClick, confirmText, disabled, children }: SettingsDangerButtonProps): import("react").JSX.Element;
40
+ export { SettingsSection, SettingsRow, SettingsDangerButton };
41
+ //# sourceMappingURL=settings-section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../src/components/settings-section.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+B,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,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oB,EAAE,CAAC"}
@@ -0,0 +1,50 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useEffect, useRef, useState } from "react";
4
+ import { cn } from "../lib/cn.js";
5
+ import { BUTTON_VARIANTS, Button } from "./button.js";
6
+ /**
7
+ * The building block of settings and configuration pages: a card with an optional heading and SettingsRows.
8
+ * Settings save as you go.
9
+ */
10
+ function SettingsSection({ title, description, action, danger = false, className, children, ...props }) {
11
+ const isHeaderVisible = Boolean(title || description);
12
+ return (_jsxs("section", { "data-slot": "settings-section", "data-danger": danger || undefined, className: cn("w-full overflow-hidden rounded-xl border border-panel-edge bg-surface shadow-card", danger && "border-danger/35", className), ...props, children: [isHeaderVisible && (_jsxs("header", { className: "flex flex-wrap items-center gap-space-12 px-4.5 pb-space-10 pt-space-16", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [title && _jsx("h3", { className: "text-body font-semibold leading-auto text-ink", children: title }), description && _jsx("p", { className: "mt-space-4 text-ui text-muted", children: description })] }), action] })), _jsx("div", { className: "[&>[data-slot=settings-row]:first-child]:border-t-0", children: children })] }));
13
+ }
14
+ /** A row of a SettingsSection: label and description on the left, one control on the right. */
15
+ function SettingsRow({ label, description, control, children, className, ...props }) {
16
+ return (_jsxs("div", { "data-slot": "settings-row", className: cn("flex flex-col gap-space-12 border-t border-line px-4.5 py-space-12", className), ...props, children: [_jsxs("div", { className: "flex min-h-9 flex-wrap items-center justify-between gap-x-space-16 gap-y-space-8", children: [_jsxs("div", { className: "flex min-w-0 flex-[1_1_15rem] flex-col gap-space-2", children: [_jsx("span", { className: "text-body leading-auto text-ink", children: label }), description && _jsx("span", { className: "text-ui text-muted", children: description })] }), control && _jsx("div", { className: "flex max-w-full shrink-0 items-center gap-space-8 md:max-w-[50%]", children: control })] }), children] }));
17
+ }
18
+ /**
19
+ * A Danger zone action: full width, soft red, solid red while it waits for its confirming click. Arming swaps the label
20
+ * on the same button, so keyboard focus stays on it, and a polite live region announces the new label.
21
+ */
22
+ function SettingsDangerButton({ onClick, confirmText, disabled = false, children }) {
23
+ const [isArmed, setIsArmed] = useState(false);
24
+ const buttonRef = useRef(null);
25
+ const isConfirmable = Boolean(confirmText);
26
+ // Any press elsewhere disarms it. A listener rather than blur: Safari never focuses a clicked button.
27
+ useEffect(() => {
28
+ if (!isArmed) {
29
+ return;
30
+ }
31
+ const handlePointerDown = (event) => {
32
+ if (!buttonRef.current?.contains(event.target)) {
33
+ setIsArmed(false);
34
+ }
35
+ };
36
+ document.addEventListener("pointerdown", handlePointerDown);
37
+ return () => document.removeEventListener("pointerdown", handlePointerDown);
38
+ }, [isArmed]);
39
+ const handleClick = () => {
40
+ if (isConfirmable && !isArmed) {
41
+ setIsArmed(true);
42
+ return;
43
+ }
44
+ setIsArmed(false);
45
+ onClick();
46
+ };
47
+ return (_jsxs(_Fragment, { children: [_jsx(Button, { ref: buttonRef, variant: isArmed ? BUTTON_VARIANTS.DESTRUCTIVE : BUTTON_VARIANTS.DESTRUCTIVE_SOFT, disabled: disabled, onClick: handleClick, className: "w-full", children: isArmed ? confirmText : children }), isConfirmable && (_jsx("span", { "aria-live": "polite", className: "sr-only", children: isArmed ? confirmText : "" }))] }));
48
+ }
49
+ export { SettingsSection, SettingsRow, SettingsDangerButton };
50
+ //# sourceMappingURL=settings-section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-section.js","sourceRoot":"","sources":["../../src/components/settings-section.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAA+D,MAAM,OAAO,CAAC;AACjH,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,aAAc,CAAC;AAavD;;;GAGG;AACH,SAAS,eAAe,CAAC,EACvB,KAAK,EACL,WAAW,EACX,MAAM,EACN,MAAM,GAAG,KAAK,EAC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AgB,QAAQ,EAAC,SAAS,EAAC,SAAS,YACzC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,GACtB,CACR,IACA,CACJ,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC","sourcesContent":["\"use client\";\n\nimport { useEffect, useRef, useState, type ComponentProps, type PropsWithChildren, type ReactNode } from \"react\";\nimport { cn } from \"../lib/cn.ts\";\nimport { BUTTON_VARIANTS, Button } from \"./button.tsx\";\n\nexport interface SettingsSectionProps extends Omit<ComponentProps<\"section\">, \"title\"> {\n /** 14px semibold heading. */\n title?: ReactNode;\n /** A `muted` line under the heading. */\n description?: ReactNode;\n /** A control beside the title that scopes the whole card (an environment switch). */\n action?: ReactNode;\n /** Destructive actions: a red edge around the card. */\n danger?: boolean;\n}\n\n/**\n * The building block of settings and configuration pages: a card with an optional heading and SettingsRows.\n * Settings save as you go.\n */\nfunction SettingsSection({\n title,\n description,\n action,\n danger = false,\n className,\n children,\n ...props\n}: SettingsSectionProps) {\n const isHeaderVisible = Boolean(title || description);\n\n return (\n <section\n data-slot=\"settings-section\"\n data-danger={danger || undefined}\n className={cn(\n \"w-full overflow-hidden rounded-xl border border-panel-edge bg-surface shadow-card\",\n danger && \"border-danger/35\",\n className\n )}\n {...props}\n >\n {isHeaderVisible && (\n <header className=\"flex flex-wrap items-center gap-space-12 px-4.5 pb-space-10 pt-space-16\">\n <div className=\"min-w-0 flex-1\">\n {title && <h3 className=\"text-body font-semibold leading-auto text-ink\">{title}</h3>}\n {description && <p className=\"mt-space-4 text-ui text-muted\">{description}</p>}\n </div>\n {action}\n </header>\n )}\n <div className=\"[&>[data-slot=settings-row]:first-child]:border-t-0\">{children}</div>\n </section>\n );\n}\n\nexport interface SettingsRowProps extends Omit<ComponentProps<\"div\">, \"children\"> {\n /** 14px `ink`. */\n label: ReactNode;\n /** 13px `muted` under the label. */\n description?: ReactNode;\n /** One control: Switch, Select, Input, Button. */\n control?: ReactNode;\n /** Full-width content under the label row: a list, a table, a form. */\n children?: ReactNode;\n}\n\n/** A row of a SettingsSection: label and description on the left, one control on the right. */\nfunction SettingsRow({ label, description, control, children, className, ...props }: SettingsRowProps) {\n return (\n <div\n data-slot=\"settings-row\"\n className={cn(\"flex flex-col gap-space-12 border-t border-line px-4.5 py-space-12\", className)}\n {...props}\n >\n {/* Wraps instead of stacking: a switch stays on the right on phones, a wide input drops below. */}\n <div className=\"flex min-h-9 flex-wrap items-center justify-between gap-x-space-16 gap-y-space-8\">\n <div className=\"flex min-w-0 flex-[1_1_15rem] flex-col gap-space-2\">\n <span className=\"text-body leading-auto text-ink\">{label}</span>\n {description && <span className=\"text-ui text-muted\">{description}</span>}\n </div>\n {control && <div className=\"flex max-w-full shrink-0 items-center gap-space-8 md:max-w-[50%]\">{control}</div>}\n </div>\n {children}\n </div>\n );\n}\n\nexport interface SettingsDangerButtonProps extends PropsWithChildren {\n onClick: () => void;\n /** Arms the button: the first click swaps in this label, the second runs `onClick`. Omit when the action opens its own confirmation. */\n confirmText?: string;\n disabled?: boolean;\n}\n\n/**\n * A Danger zone action: full width, soft red, solid red while it waits for its confirming click. Arming swaps the label\n * on the same button, so keyboard focus stays on it, and a polite live region announces the new label.\n */\nfunction SettingsDangerButton({ onClick, confirmText, disabled = false, children }: SettingsDangerButtonProps) {\n const [isArmed, setIsArmed] = useState(false);\n const buttonRef = useRef<HTMLButtonElement>(null);\n const isConfirmable = Boolean(confirmText);\n\n // Any press elsewhere disarms it. A listener rather than blur: Safari never focuses a clicked button.\n useEffect(() => {\n if (!isArmed) {\n return;\n }\n\n const handlePointerDown = (event: PointerEvent) => {\n if (!buttonRef.current?.contains(event.target as Node)) {\n setIsArmed(false);\n }\n };\n\n document.addEventListener(\"pointerdown\", handlePointerDown);\n\n return () => document.removeEventListener(\"pointerdown\", handlePointerDown);\n }, [isArmed]);\n\n const handleClick = () => {\n if (isConfirmable && !isArmed) {\n setIsArmed(true);\n\n return;\n }\n\n setIsArmed(false);\n onClick();\n };\n\n return (\n <>\n <Button\n ref={buttonRef}\n variant={isArmed ? BUTTON_VARIANTS.DESTRUCTIVE : BUTTON_VARIANTS.DESTRUCTIVE_SOFT}\n disabled={disabled}\n onClick={handleClick}\n className=\"w-full\"\n >\n {isArmed ? confirmText : children}\n </Button>\n {/* Always rendered, so screen readers are listening before the label changes. */}\n {isConfirmable && (\n <span aria-live=\"polite\" className=\"sr-only\">\n {isArmed ? confirmText : \"\"}\n </span>\n )}\n </>\n );\n}\n\nexport { SettingsSection, SettingsRow, SettingsDangerButton };\n"]}
@@ -0,0 +1,41 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ import { useRender } from "@base-ui/react/use-render";
3
+ export type SidebarItemProps = useRender.ComponentProps<"button"> & {
4
+ /** Marks the row as the current page: the white `selected` surface, never green. One per sidebar. */
5
+ isActive?: boolean;
6
+ };
7
+ /**
8
+ * A row in the home or settings sidebar. Put the icon first and the label in a `<span>`; trailing meta (a badge,
9
+ * ⌘K, a chevron, an age) goes after it with `ml-auto`.
10
+ */
11
+ export declare function SidebarItem({ className, render, isActive, ref, ...props }: SidebarItemProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
12
+ export interface SidebarSectionProps {
13
+ /** The heading in 14px `muted`: "Recent conversations", "Account". */
14
+ title: ReactNode;
15
+ /** Small icon buttons on the right of the heading. */
16
+ actions?: ReactNode;
17
+ className?: string;
18
+ children?: ReactNode;
19
+ }
20
+ /** A titled run of sidebar rows. */
21
+ export declare function SidebarSection({ title, actions, className, children }: SidebarSectionProps): import("react").JSX.Element;
22
+ export type SidebarGroupProps = ComponentProps<"div"> & {
23
+ isExpanded: boolean;
24
+ };
25
+ /**
26
+ * The block an expanded nav group sits in: the parent row, then its children in a `SidebarGroupList`. Expanded, it
27
+ * takes a soft tint.
28
+ */
29
+ export declare function SidebarGroup({ isExpanded, className, ...props }: SidebarGroupProps): import("react").JSX.Element;
30
+ /** The children of a group, inset from its edges so the selected child reads as a pill inside it. */
31
+ export declare function SidebarGroupList({ className, ...props }: ComponentProps<"ul">): import("react").JSX.Element;
32
+ export type SidebarSubItemProps = SidebarItemProps & {
33
+ /** The last child: its branch stops instead of running on to the next sibling. */
34
+ isLast?: boolean;
35
+ };
36
+ /**
37
+ * A child row. Its branch is drawn inside the row, so a selected child's pill sits over it: a rounded ┗ reaching 6px
38
+ * up into the row above, and the trunk running on to the next sibling.
39
+ */
40
+ export declare function SidebarSubItem({ isLast, className, ...props }: SidebarSubItemProps): import("react").JSX.Element;
41
+ //# sourceMappingURL=sidebar-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-item.d.ts","sourceRoot":"","sources":["../../src/components/sidebar-item.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAmBtD,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IAClE,qGAAqG;IACrG,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,QAAgB,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,8FAcnG;AAED,MAAM,WAAW,mBAAmB;IAClC,sEAAsE;IACtE,KAAK,EAAE,SAAS,CAAC;IACjB,sDAAsD;IACtD,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,oCAAoC;AACpC,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BAU1F;AAED,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,UAAU,EAAE,OAAO,CAAA;CAAE,CAAC;AAEhF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,+BASlF;AAED,qGAAqG;AACrG,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,+BAE7E;AAED,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG;IACnD,kFAAkF;IAClF,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,MAAc,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,+BAa1F"}
@@ -0,0 +1,59 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { mergeProps } from "@base-ui/react/merge-props";
4
+ import { useRender } from "@base-ui/react/use-render";
5
+ import { cn } from "../lib/cn.js";
6
+ /*
7
+ * The sidebar sits on `app-bg`, which `hover` equals, so its rows, groups and tree lines tint the ink instead:
8
+ * hover 6%, an open group 5%, the tree line 22%.
9
+ */
10
+ /**
11
+ * One row size for every sidebar, home and settings alike: 32px rows with 20px icons (the spec says 18px; the
12
+ * prototype's read better), in `ink-2` so they sit a step quieter than the label. Nested rows (SidebarSubItem) take
13
+ * 16px icons.
14
+ */
15
+ const SIDEBAR_ITEM_CLASSES = [
16
+ "group/sidebar-item flex h-8 w-full min-w-0 cursor-pointer items-center gap-2.25 rounded-row px-space-8 text-left font-sans text-nav text-ink-nav outline-none transition-colors duration-120",
17
+ "hover:bg-ink/6 focus-visible:ring-2 focus-visible:ring-faint [&>svg]:size-5 [&>svg]:shrink-0 [&>svg]:stroke-[1.5] [&>svg]:text-ink-2",
18
+ "aria-[current=page]:bg-selected aria-[current=page]:font-medium aria-[current=page]:text-ink-strong aria-[current=page]:shadow-card aria-[current=page]:ring-1 aria-[current=page]:ring-inset aria-[current=page]:ring-selected-edge",
19
+ ];
20
+ /**
21
+ * A row in the home or settings sidebar. Put the icon first and the label in a `<span>`; trailing meta (a badge,
22
+ * ⌘K, a chevron, an age) goes after it with `ml-auto`.
23
+ */
24
+ export function SidebarItem({ className, render, isActive = false, ref, ...props }) {
25
+ return useRender({
26
+ defaultTagName: "button",
27
+ render,
28
+ state: { slot: "sidebar-item" },
29
+ ref,
30
+ props: mergeProps({
31
+ "aria-current": isActive ? "page" : undefined,
32
+ className: cn(SIDEBAR_ITEM_CLASSES, "[&>span:first-of-type]:truncate", className),
33
+ }, props),
34
+ });
35
+ }
36
+ /** A titled run of sidebar rows. */
37
+ export function SidebarSection({ title, actions, className, children }) {
38
+ return (_jsxs("div", { "data-slot": "sidebar-section", className: cn("flex flex-col gap-px", className), children: [_jsxs("div", { className: "mb-1 flex h-7 shrink-0 items-center justify-between pr-space-2 pl-space-8 text-body text-muted", children: [_jsx("span", { className: "truncate", children: title }), actions && _jsx("span", { className: "flex gap-space-2", children: actions })] }), children] }));
39
+ }
40
+ /**
41
+ * The block an expanded nav group sits in: the parent row, then its children in a `SidebarGroupList`. Expanded, it
42
+ * takes a soft tint.
43
+ */
44
+ export function SidebarGroup({ isExpanded, className, ...props }) {
45
+ return (_jsx("div", { "data-slot": "sidebar-group", "data-expanded": isExpanded, className: cn("flex flex-col gap-px rounded-lg transition-colors duration-200", isExpanded && "bg-ink/5", className), ...props }));
46
+ }
47
+ /** The children of a group, inset from its edges so the selected child reads as a pill inside it. */
48
+ export function SidebarGroupList({ className, ...props }) {
49
+ return _jsx("ul", { className: cn("flex flex-col gap-px px-space-4 pt-px pb-space-4", className), ...props });
50
+ }
51
+ /**
52
+ * A child row. Its branch is drawn inside the row, so a selected child's pill sits over it: a rounded ┗ reaching 6px
53
+ * up into the row above, and the trunk running on to the next sibling.
54
+ */
55
+ export function SidebarSubItem({ isLast = false, className, ...props }) {
56
+ return (_jsx(SidebarItem, { className: cn("relative pl-7.5 [&>svg]:size-4", "before:pointer-events-none before:absolute before:-top-1.5 before:left-2.75 before:h-[calc(50%+0.375rem)] before:w-3 before:rounded-bl-row before:border-b before:border-l before:border-ink/22", !isLast &&
57
+ "after:pointer-events-none after:absolute after:top-1/2 after:-bottom-0.5 after:left-2.75 after:border-l after:border-ink/22", className), ...props }));
58
+ }
59
+ //# sourceMappingURL=sidebar-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-item.js","sourceRoot":"","sources":["../../src/components/sidebar-item.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,oBAAoB,GAAG;IAC3B,8LAA8L;IAC9L,sIAAsI;IACtI,sOAAsO;CACvO,CAAC;AAOF;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,KAAK,EAAoB;IAClG,OAAO,SAAS,CAAC;QACf,cAAc,EAAE,QAAQ;QACxB,MAAM;QACN,KAAK,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE;QAC/B,GAAG;QACH,KAAK,EAAE,UAAU,CACf;YACE,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YAC7C,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE,iCAAiC,EAAE,SAAS,CAAC;SAClF,EACD,KAAK,CACN;KACF,CAAC,CAAC;AACL,CAAC;AAWD,oCAAoC;AACpC,MAAM,UAAU,cAAc,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAuB;IACzF,OAAO,CACL,4BAAe,iBAAiB,EAAC,SAAS,EAAE,EAAE,CAAC,sBAAsB,EAAE,SAAS,CAAC,aAC/E,eAAK,SAAS,EAAC,gGAAgG,aAC7G,eAAM,SAAS,EAAC,UAAU,YAAE,KAAK,GAAQ,EACxC,OAAO,IAAI,eAAM,SAAS,EAAC,kBAAkB,YAAE,OAAO,GAAQ,IAC3D,EACL,QAAQ,IACL,CACP,CAAC;AACJ,CAAC;AAID;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,EAAqB;IACjF,OAAO,CACL,2BACY,eAAe,mBACV,UAAU,EACzB,SAAS,EAAE,EAAE,CAAC,gEAAgE,EAAE,UAAU,IAAI,UAAU,EAAE,SAAS,CAAC,KAChH,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,qGAAqG;AACrG,MAAM,UAAU,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAwB;IAC5E,OAAO,aAAI,SAAS,EAAE,EAAE,CAAC,kDAAkD,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AACzG,CAAC;AAOD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,MAAM,GAAG,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAuB;IACzF,OAAO,CACL,KAAC,WAAW,IACV,SAAS,EAAE,EAAE,CACX,gCAAgC,EAChC,iMAAiM,EACjM,CAAC,MAAM;YACL,6HAA6H,EAC/H,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport type { ComponentProps, ReactNode } from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { cn } from \"../lib/cn.ts\";\n\n/*\n * The sidebar sits on `app-bg`, which `hover` equals, so its rows, groups and tree lines tint the ink instead:\n * hover 6%, an open group 5%, the tree line 22%.\n */\n\n/**\n * One row size for every sidebar, home and settings alike: 32px rows with 20px icons (the spec says 18px; the\n * prototype's read better), in `ink-2` so they sit a step quieter than the label. Nested rows (SidebarSubItem) take\n * 16px icons.\n */\nconst SIDEBAR_ITEM_CLASSES = [\n \"group/sidebar-item flex h-8 w-full min-w-0 cursor-pointer items-center gap-2.25 rounded-row px-space-8 text-left font-sans text-nav text-ink-nav outline-none transition-colors duration-120\",\n \"hover:bg-ink/6 focus-visible:ring-2 focus-visible:ring-faint [&>svg]:size-5 [&>svg]:shrink-0 [&>svg]:stroke-[1.5] [&>svg]:text-ink-2\",\n \"aria-[current=page]:bg-selected aria-[current=page]:font-medium aria-[current=page]:text-ink-strong aria-[current=page]:shadow-card aria-[current=page]:ring-1 aria-[current=page]:ring-inset aria-[current=page]:ring-selected-edge\",\n];\n\nexport type SidebarItemProps = useRender.ComponentProps<\"button\"> & {\n /** Marks the row as the current page: the white `selected` surface, never green. One per sidebar. */\n isActive?: boolean;\n};\n\n/**\n * A row in the home or settings sidebar. Put the icon first and the label in a `<span>`; trailing meta (a badge,\n * ⌘K, a chevron, an age) goes after it with `ml-auto`.\n */\nexport function SidebarItem({ className, render, isActive = false, ref, ...props }: SidebarItemProps) {\n return useRender({\n defaultTagName: \"button\",\n render,\n state: { slot: \"sidebar-item\" },\n ref,\n props: mergeProps<\"button\">(\n {\n \"aria-current\": isActive ? \"page\" : undefined,\n className: cn(SIDEBAR_ITEM_CLASSES, \"[&>span:first-of-type]:truncate\", className),\n },\n props\n ),\n });\n}\n\nexport interface SidebarSectionProps {\n /** The heading in 14px `muted`: \"Recent conversations\", \"Account\". */\n title: ReactNode;\n /** Small icon buttons on the right of the heading. */\n actions?: ReactNode;\n className?: string;\n children?: ReactNode;\n}\n\n/** A titled run of sidebar rows. */\nexport function SidebarSection({ title, actions, className, children }: SidebarSectionProps) {\n return (\n <div data-slot=\"sidebar-section\" className={cn(\"flex flex-col gap-px\", className)}>\n <div className=\"mb-1 flex h-7 shrink-0 items-center justify-between pr-space-2 pl-space-8 text-body text-muted\">\n <span className=\"truncate\">{title}</span>\n {actions && <span className=\"flex gap-space-2\">{actions}</span>}\n </div>\n {children}\n </div>\n );\n}\n\nexport type SidebarGroupProps = ComponentProps<\"div\"> & { isExpanded: boolean };\n\n/**\n * The block an expanded nav group sits in: the parent row, then its children in a `SidebarGroupList`. Expanded, it\n * takes a soft tint.\n */\nexport function SidebarGroup({ isExpanded, className, ...props }: SidebarGroupProps) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-expanded={isExpanded}\n className={cn(\"flex flex-col gap-px rounded-lg transition-colors duration-200\", isExpanded && \"bg-ink/5\", className)}\n {...props}\n />\n );\n}\n\n/** The children of a group, inset from its edges so the selected child reads as a pill inside it. */\nexport function SidebarGroupList({ className, ...props }: ComponentProps<\"ul\">) {\n return <ul className={cn(\"flex flex-col gap-px px-space-4 pt-px pb-space-4\", className)} {...props} />;\n}\n\nexport type SidebarSubItemProps = SidebarItemProps & {\n /** The last child: its branch stops instead of running on to the next sibling. */\n isLast?: boolean;\n};\n\n/**\n * A child row. Its branch is drawn inside the row, so a selected child's pill sits over it: a rounded ┗ reaching 6px\n * up into the row above, and the trunk running on to the next sibling.\n */\nexport function SidebarSubItem({ isLast = false, className, ...props }: SidebarSubItemProps) {\n return (\n <SidebarItem\n className={cn(\n \"relative pl-7.5 [&>svg]:size-4\",\n \"before:pointer-events-none before:absolute before:-top-1.5 before:left-2.75 before:h-[calc(50%+0.375rem)] before:w-3 before:rounded-bl-row before:border-b before:border-l before:border-ink/22\",\n !isLast &&\n \"after:pointer-events-none after:absolute after:top-1/2 after:-bottom-0.5 after:left-2.75 after:border-l after:border-ink/22\",\n className\n )}\n {...props}\n />\n );\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import type { ComponentProps } from "react";
2
+ /**
3
+ * A placeholder bar in the layout of what's coming, shimmering every 1.6s (not with reduced motion).
4
+ * A 9px text line by default; size it with `h-*` and `w-*`, round it with `rounded-*`.
5
+ */
6
+ export declare function Skeleton({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
7
+ //# sourceMappingURL=skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../src/components/skeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,+BAEtE"}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cn } from "../lib/cn.js";
4
+ /**
5
+ * A placeholder bar in the layout of what's coming, shimmering every 1.6s (not with reduced motion).
6
+ * A 9px text line by default; size it with `h-*` and `w-*`, round it with `rounded-*`.
7
+ */
8
+ export function Skeleton({ className, ...props }) {
9
+ return _jsx("div", { "data-slot": "skeleton", className: cn("skeleton-shimmer h-2.25 rounded-md", className), ...props });
10
+ }
11
+ //# sourceMappingURL=skeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../../src/components/skeleton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAyB;IACrE,OAAO,2BAAe,UAAU,EAAC,SAAS,EAAE,EAAE,CAAC,oCAAoC,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AACjH,CAAC","sourcesContent":["\"use client\";\n\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"../lib/cn.ts\";\n\n/**\n * A placeholder bar in the layout of what's coming, shimmering every 1.6s (not with reduced motion).\n * A 9px text line by default; size it with `h-*` and `w-*`, round it with `rounded-*`.\n */\nexport function Skeleton({ className, ...props }: ComponentProps<\"div\">) {\n return <div data-slot=\"skeleton\" className={cn(\"skeleton-shimmer h-2.25 rounded-md\", className)} {...props} />;\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import { Slider as SliderPrimitive } from "@base-ui/react/slider";
2
+ /**
3
+ * A range where the rough value matters more than the exact one (temperature, retention, rate limits).
4
+ * Values are arrays, one thumb per entry; show the exact value beside it. With one thumb, `aria-label`
5
+ * or `aria-labelledby` names the thumb, which is what assistive tech reads as the slider. `onValueChange` fires while
6
+ * dragging, `onValueCommitted` once on release. Page Up/Down and Shift+arrow move ten steps.
7
+ */
8
+ declare function Slider({ className, defaultValue, value, min, max, step, largeStep, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }: SliderPrimitive.Root.Props<number[]>): import("react").JSX.Element;
9
+ export { Slider };
10
+ //# sourceMappingURL=slider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../src/components/slider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AASlE;;;;;GAKG;AACH,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,YAAY,EACZ,KAAK,EACL,GAAO,EACP,GAAS,EACT,IAAQ,EACR,SAAqB,EACrB,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,+BA4CtC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}