@brijbyte/agentic-ui 0.0.1-beta → 0.0.2

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 (375) hide show
  1. package/README.md +808 -0
  2. package/dist/accordion/accordion.css +85 -0
  3. package/dist/accordion/accordion.d.ts +28 -0
  4. package/dist/accordion/accordion.d.ts.map +1 -0
  5. package/dist/accordion/accordion.js +51 -0
  6. package/dist/accordion/accordion.js.map +1 -0
  7. package/dist/accordion/accordion.module.css.d.ts +2 -0
  8. package/dist/accordion/accordion.module.js +14 -0
  9. package/dist/accordion/accordion.module.js.map +1 -0
  10. package/dist/accordion/index.d.ts +3 -0
  11. package/dist/accordion/index.js +4 -0
  12. package/dist/accordion/parts.d.ts +28 -0
  13. package/dist/accordion/parts.d.ts.map +1 -0
  14. package/dist/accordion/parts.js +55 -0
  15. package/dist/accordion/parts.js.map +1 -0
  16. package/dist/alert-dialog/alert-dialog.css +84 -0
  17. package/dist/alert-dialog/alert-dialog.d.ts +44 -0
  18. package/dist/alert-dialog/alert-dialog.d.ts.map +1 -0
  19. package/dist/alert-dialog/alert-dialog.js +46 -0
  20. package/dist/alert-dialog/alert-dialog.js.map +1 -0
  21. package/dist/alert-dialog/alert-dialog.module.css.d.ts +2 -0
  22. package/dist/alert-dialog/alert-dialog.module.js +14 -0
  23. package/dist/alert-dialog/alert-dialog.module.js.map +1 -0
  24. package/dist/alert-dialog/index.d.ts +3 -0
  25. package/dist/alert-dialog/index.js +4 -0
  26. package/dist/alert-dialog/parts.d.ts +28 -0
  27. package/dist/alert-dialog/parts.d.ts.map +1 -0
  28. package/dist/alert-dialog/parts.js +62 -0
  29. package/dist/alert-dialog/parts.js.map +1 -0
  30. package/dist/badge/badge.css +66 -0
  31. package/dist/badge/badge.d.ts +20 -0
  32. package/dist/badge/badge.d.ts.map +1 -0
  33. package/dist/badge/badge.js +21 -0
  34. package/dist/badge/badge.js.map +1 -0
  35. package/dist/badge/badge.module.css.d.ts +2 -0
  36. package/dist/badge/badge.module.js +16 -0
  37. package/dist/badge/badge.module.js.map +1 -0
  38. package/dist/badge/index.d.ts +2 -0
  39. package/dist/badge/index.js +3 -0
  40. package/dist/button/button.css +242 -0
  41. package/dist/button/button.d.ts +28 -0
  42. package/dist/button/button.d.ts.map +1 -0
  43. package/dist/button/button.js +34 -0
  44. package/dist/button/button.js.map +1 -0
  45. package/dist/button/button.module.css.d.ts +2 -0
  46. package/dist/button/button.module.js +27 -0
  47. package/dist/button/button.module.js.map +1 -0
  48. package/dist/button/index.d.ts +2 -0
  49. package/dist/button/index.js +3 -0
  50. package/dist/card/card.css +64 -0
  51. package/dist/card/card.d.ts +41 -0
  52. package/dist/card/card.d.ts.map +1 -0
  53. package/dist/card/card.js +50 -0
  54. package/dist/card/card.js.map +1 -0
  55. package/dist/card/card.module.css.d.ts +2 -0
  56. package/dist/card/card.module.js +15 -0
  57. package/dist/card/card.module.js.map +1 -0
  58. package/dist/card/index.d.ts +2 -0
  59. package/dist/card/index.js +3 -0
  60. package/dist/checkbox/checkbox.css +72 -0
  61. package/dist/checkbox/checkbox.d.ts +29 -0
  62. package/dist/checkbox/checkbox.d.ts.map +1 -0
  63. package/dist/checkbox/checkbox.js +40 -0
  64. package/dist/checkbox/checkbox.js.map +1 -0
  65. package/dist/checkbox/checkbox.module.css.d.ts +2 -0
  66. package/dist/checkbox/checkbox.module.js +11 -0
  67. package/dist/checkbox/checkbox.module.js.map +1 -0
  68. package/dist/checkbox/index.d.ts +3 -0
  69. package/dist/checkbox/index.js +4 -0
  70. package/dist/checkbox/parts.d.ts +20 -0
  71. package/dist/checkbox/parts.d.ts.map +1 -0
  72. package/dist/checkbox/parts.js +51 -0
  73. package/dist/checkbox/parts.js.map +1 -0
  74. package/dist/collapsible/collapsible.css +88 -0
  75. package/dist/collapsible/collapsible.d.ts +24 -0
  76. package/dist/collapsible/collapsible.d.ts.map +1 -0
  77. package/dist/collapsible/collapsible.js +44 -0
  78. package/dist/collapsible/collapsible.js.map +1 -0
  79. package/dist/collapsible/collapsible.module.css.d.ts +2 -0
  80. package/dist/collapsible/collapsible.module.js +12 -0
  81. package/dist/collapsible/collapsible.module.js.map +1 -0
  82. package/dist/collapsible/index.d.ts +3 -0
  83. package/dist/collapsible/index.js +4 -0
  84. package/dist/collapsible/parts.d.ts +23 -0
  85. package/dist/collapsible/parts.d.ts.map +1 -0
  86. package/dist/collapsible/parts.js +44 -0
  87. package/dist/collapsible/parts.js.map +1 -0
  88. package/dist/context-menu/context-menu.css +151 -0
  89. package/dist/context-menu/context-menu.d.ts +36 -0
  90. package/dist/context-menu/context-menu.d.ts.map +1 -0
  91. package/dist/context-menu/context-menu.js +54 -0
  92. package/dist/context-menu/context-menu.js.map +1 -0
  93. package/dist/context-menu/context-menu.module.css.d.ts +2 -0
  94. package/dist/context-menu/context-menu.module.js +18 -0
  95. package/dist/context-menu/context-menu.module.js.map +1 -0
  96. package/dist/context-menu/index.d.ts +3 -0
  97. package/dist/context-menu/index.js +4 -0
  98. package/dist/context-menu/parts.d.ts +38 -0
  99. package/dist/context-menu/parts.d.ts.map +1 -0
  100. package/dist/context-menu/parts.js +91 -0
  101. package/dist/context-menu/parts.js.map +1 -0
  102. package/dist/dialog/dialog.css +125 -0
  103. package/dist/dialog/dialog.d.ts +40 -0
  104. package/dist/dialog/dialog.d.ts.map +1 -0
  105. package/dist/dialog/dialog.js +57 -0
  106. package/dist/dialog/dialog.js.map +1 -0
  107. package/dist/dialog/dialog.module.css.d.ts +2 -0
  108. package/dist/dialog/dialog.module.js +17 -0
  109. package/dist/dialog/dialog.module.js.map +1 -0
  110. package/dist/dialog/index.d.ts +3 -0
  111. package/dist/dialog/index.js +4 -0
  112. package/dist/dialog/parts.d.ts +38 -0
  113. package/dist/dialog/parts.d.ts.map +1 -0
  114. package/dist/dialog/parts.js +75 -0
  115. package/dist/dialog/parts.js.map +1 -0
  116. package/dist/drawer/drawer.css +253 -0
  117. package/dist/drawer/drawer.d.ts +38 -0
  118. package/dist/drawer/drawer.d.ts.map +1 -0
  119. package/dist/drawer/drawer.js +87 -0
  120. package/dist/drawer/drawer.js.map +1 -0
  121. package/dist/drawer/drawer.module.css.d.ts +2 -0
  122. package/dist/drawer/drawer.module.js +20 -0
  123. package/dist/drawer/drawer.module.js.map +1 -0
  124. package/dist/drawer/index.d.ts +3 -0
  125. package/dist/drawer/index.js +4 -0
  126. package/dist/drawer/parts.d.ts +58 -0
  127. package/dist/drawer/parts.d.ts.map +1 -0
  128. package/dist/drawer/parts.js +107 -0
  129. package/dist/drawer/parts.js.map +1 -0
  130. package/dist/index.css +2701 -0
  131. package/dist/index.d.ts +39 -0
  132. package/dist/index.js +62 -0
  133. package/dist/input/index.d.ts +2 -0
  134. package/dist/input/index.js +3 -0
  135. package/dist/input/input.css +103 -0
  136. package/dist/input/input.d.ts +17 -0
  137. package/dist/input/input.d.ts.map +1 -0
  138. package/dist/input/input.js +37 -0
  139. package/dist/input/input.js.map +1 -0
  140. package/dist/input/input.module.css.d.ts +2 -0
  141. package/dist/input/input.module.js +18 -0
  142. package/dist/input/input.module.js.map +1 -0
  143. package/dist/layer-order.css +22 -0
  144. package/dist/menu/index.d.ts +4 -0
  145. package/dist/menu/index.js +5 -0
  146. package/dist/menu/menu.css +154 -0
  147. package/dist/menu/menu.d.ts +50 -0
  148. package/dist/menu/menu.d.ts.map +1 -0
  149. package/dist/menu/menu.js +69 -0
  150. package/dist/menu/menu.js.map +1 -0
  151. package/dist/menu/menu.module.css.d.ts +2 -0
  152. package/dist/menu/menu.module.js +19 -0
  153. package/dist/menu/menu.module.js.map +1 -0
  154. package/dist/menu/menuitemshortcut.d.ts +9 -0
  155. package/dist/menu/menuitemshortcut.d.ts.map +1 -0
  156. package/dist/menu/menuitemshortcut.js +15 -0
  157. package/dist/menu/menuitemshortcut.js.map +1 -0
  158. package/dist/menu/parts.d.ts +39 -0
  159. package/dist/menu/parts.d.ts.map +1 -0
  160. package/dist/menu/parts.js +76 -0
  161. package/dist/menu/parts.js.map +1 -0
  162. package/dist/number-field/index.d.ts +3 -0
  163. package/dist/number-field/index.js +4 -0
  164. package/dist/number-field/number-field.css +111 -0
  165. package/dist/number-field/number-field.d.ts +31 -0
  166. package/dist/number-field/number-field.d.ts.map +1 -0
  167. package/dist/number-field/number-field.js +78 -0
  168. package/dist/number-field/number-field.js.map +1 -0
  169. package/dist/number-field/number-field.module.css.d.ts +2 -0
  170. package/dist/number-field/number-field.module.js +16 -0
  171. package/dist/number-field/number-field.module.js.map +1 -0
  172. package/dist/number-field/parts.d.ts +38 -0
  173. package/dist/number-field/parts.d.ts.map +1 -0
  174. package/dist/number-field/parts.js +74 -0
  175. package/dist/number-field/parts.js.map +1 -0
  176. package/dist/progress/index.d.ts +3 -0
  177. package/dist/progress/index.js +4 -0
  178. package/dist/progress/parts.d.ts +20 -0
  179. package/dist/progress/parts.d.ts.map +1 -0
  180. package/dist/progress/parts.js +42 -0
  181. package/dist/progress/parts.js.map +1 -0
  182. package/dist/progress/progress.css +71 -0
  183. package/dist/progress/progress.d.ts +27 -0
  184. package/dist/progress/progress.d.ts.map +1 -0
  185. package/dist/progress/progress.js +27 -0
  186. package/dist/progress/progress.js.map +1 -0
  187. package/dist/progress/progress.module.css.d.ts +2 -0
  188. package/dist/progress/progress.module.js +19 -0
  189. package/dist/progress/progress.module.js.map +1 -0
  190. package/dist/reset.css +91 -0
  191. package/dist/select/index.d.ts +3 -0
  192. package/dist/select/index.js +4 -0
  193. package/dist/select/parts.d.ts +65 -0
  194. package/dist/select/parts.d.ts.map +1 -0
  195. package/dist/select/parts.js +134 -0
  196. package/dist/select/parts.js.map +1 -0
  197. package/dist/select/select.css +157 -0
  198. package/dist/select/select.d.ts +41 -0
  199. package/dist/select/select.d.ts.map +1 -0
  200. package/dist/select/select.js +89 -0
  201. package/dist/select/select.js.map +1 -0
  202. package/dist/select/select.module.css.d.ts +2 -0
  203. package/dist/select/select.module.js +17 -0
  204. package/dist/select/select.module.js.map +1 -0
  205. package/dist/separator/index.d.ts +2 -0
  206. package/dist/separator/index.js +3 -0
  207. package/dist/separator/separator.css +16 -0
  208. package/dist/separator/separator.d.ts +16 -0
  209. package/dist/separator/separator.d.ts.map +1 -0
  210. package/dist/separator/separator.js +17 -0
  211. package/dist/separator/separator.js.map +1 -0
  212. package/dist/separator/separator.module.css.d.ts +2 -0
  213. package/dist/separator/separator.module.js +6 -0
  214. package/dist/separator/separator.module.js.map +1 -0
  215. package/dist/slider/index.d.ts +3 -0
  216. package/dist/slider/index.js +4 -0
  217. package/dist/slider/parts.d.ts +38 -0
  218. package/dist/slider/parts.d.ts.map +1 -0
  219. package/dist/slider/parts.js +69 -0
  220. package/dist/slider/parts.js.map +1 -0
  221. package/dist/slider/slider.css +97 -0
  222. package/dist/slider/slider.d.ts +38 -0
  223. package/dist/slider/slider.d.ts.map +1 -0
  224. package/dist/slider/slider.js +41 -0
  225. package/dist/slider/slider.js.map +1 -0
  226. package/dist/slider/slider.module.css.d.ts +2 -0
  227. package/dist/slider/slider.module.js +15 -0
  228. package/dist/slider/slider.module.js.map +1 -0
  229. package/dist/styles/reset.css +69 -0
  230. package/dist/styles/tokens.css +276 -0
  231. package/dist/switch/index.d.ts +3 -0
  232. package/dist/switch/index.js +4 -0
  233. package/dist/switch/parts.d.ts +18 -0
  234. package/dist/switch/parts.d.ts.map +1 -0
  235. package/dist/switch/parts.js +39 -0
  236. package/dist/switch/parts.js.map +1 -0
  237. package/dist/switch/switch.css +64 -0
  238. package/dist/switch/switch.d.ts +28 -0
  239. package/dist/switch/switch.d.ts.map +1 -0
  240. package/dist/switch/switch.js +26 -0
  241. package/dist/switch/switch.js.map +1 -0
  242. package/dist/switch/switch.module.css.d.ts +2 -0
  243. package/dist/switch/switch.module.js +11 -0
  244. package/dist/switch/switch.module.js.map +1 -0
  245. package/dist/tabs/index.d.ts +3 -0
  246. package/dist/tabs/index.js +4 -0
  247. package/dist/tabs/parts.d.ts +23 -0
  248. package/dist/tabs/parts.d.ts.map +1 -0
  249. package/dist/tabs/parts.js +48 -0
  250. package/dist/tabs/parts.js.map +1 -0
  251. package/dist/tabs/tabs.css +86 -0
  252. package/dist/tabs/tabs.d.ts +28 -0
  253. package/dist/tabs/tabs.d.ts.map +1 -0
  254. package/dist/tabs/tabs.js +30 -0
  255. package/dist/tabs/tabs.js.map +1 -0
  256. package/dist/tabs/tabs.module.css.d.ts +2 -0
  257. package/dist/tabs/tabs.module.js +11 -0
  258. package/dist/tabs/tabs.module.js.map +1 -0
  259. package/dist/tailwind-theme.css +142 -0
  260. package/dist/toast/index.d.ts +3 -0
  261. package/dist/toast/index.js +4 -0
  262. package/dist/toast/parts.d.ts +33 -0
  263. package/dist/toast/parts.d.ts.map +1 -0
  264. package/dist/toast/parts.js +62 -0
  265. package/dist/toast/parts.js.map +1 -0
  266. package/dist/toast/toast.css +207 -0
  267. package/dist/toast/toast.d.ts +43 -0
  268. package/dist/toast/toast.d.ts.map +1 -0
  269. package/dist/toast/toast.js +156 -0
  270. package/dist/toast/toast.js.map +1 -0
  271. package/dist/toast/toast.module.css.d.ts +2 -0
  272. package/dist/toast/toast.module.js +25 -0
  273. package/dist/toast/toast.module.js.map +1 -0
  274. package/dist/tokens.css +404 -0
  275. package/dist/tooltip/index.d.ts +3 -0
  276. package/dist/tooltip/index.js +4 -0
  277. package/dist/tooltip/parts.d.ts +23 -0
  278. package/dist/tooltip/parts.d.ts.map +1 -0
  279. package/dist/tooltip/parts.js +53 -0
  280. package/dist/tooltip/parts.js.map +1 -0
  281. package/dist/tooltip/tooltip.css +60 -0
  282. package/dist/tooltip/tooltip.d.ts +22 -0
  283. package/dist/tooltip/tooltip.d.ts.map +1 -0
  284. package/dist/tooltip/tooltip.js +23 -0
  285. package/dist/tooltip/tooltip.js.map +1 -0
  286. package/dist/tooltip/tooltip.module.css.d.ts +2 -0
  287. package/dist/tooltip/tooltip.module.js +10 -0
  288. package/dist/tooltip/tooltip.module.js.map +1 -0
  289. package/package.json +153 -4
  290. package/src/accordion/accordion.module.css +75 -0
  291. package/src/accordion/accordion.tsx +50 -0
  292. package/src/accordion/index.ts +6 -0
  293. package/src/accordion/parts.tsx +68 -0
  294. package/src/alert-dialog/alert-dialog.module.css +91 -0
  295. package/src/alert-dialog/alert-dialog.tsx +69 -0
  296. package/src/alert-dialog/index.ts +7 -0
  297. package/src/alert-dialog/parts.tsx +73 -0
  298. package/src/badge/badge.module.css +60 -0
  299. package/src/badge/badge.tsx +19 -0
  300. package/src/badge/index.ts +3 -0
  301. package/src/button/button.module.css +229 -0
  302. package/src/button/button.tsx +67 -0
  303. package/src/button/index.ts +3 -0
  304. package/src/card/card.module.css +56 -0
  305. package/src/card/card.tsx +54 -0
  306. package/src/card/index.ts +3 -0
  307. package/src/checkbox/checkbox.module.css +69 -0
  308. package/src/checkbox/checkbox.tsx +38 -0
  309. package/src/checkbox/index.ts +6 -0
  310. package/src/checkbox/parts.tsx +54 -0
  311. package/src/collapsible/collapsible.module.css +81 -0
  312. package/src/collapsible/collapsible.tsx +38 -0
  313. package/src/collapsible/index.ts +6 -0
  314. package/src/collapsible/parts.tsx +52 -0
  315. package/src/context-menu/context-menu.module.css +168 -0
  316. package/src/context-menu/context-menu.tsx +75 -0
  317. package/src/context-menu/index.ts +21 -0
  318. package/src/context-menu/parts.tsx +99 -0
  319. package/src/css.d.ts +8 -0
  320. package/src/dialog/dialog.module.css +116 -0
  321. package/src/dialog/dialog.tsx +73 -0
  322. package/src/dialog/index.ts +13 -0
  323. package/src/dialog/parts.tsx +96 -0
  324. package/src/drawer/drawer.module.css +240 -0
  325. package/src/drawer/drawer.tsx +96 -0
  326. package/src/drawer/index.ts +24 -0
  327. package/src/drawer/parts.tsx +122 -0
  328. package/src/index.ts +237 -0
  329. package/src/input/index.ts +3 -0
  330. package/src/input/input.module.css +93 -0
  331. package/src/input/input.tsx +39 -0
  332. package/src/menu/index.ts +7 -0
  333. package/src/menu/menu.module.css +142 -0
  334. package/src/menu/menu.tsx +108 -0
  335. package/src/menu/menuitemshortcut.tsx +9 -0
  336. package/src/menu/parts.tsx +90 -0
  337. package/src/number-field/index.ts +20 -0
  338. package/src/number-field/number-field.module.css +98 -0
  339. package/src/number-field/number-field.tsx +75 -0
  340. package/src/number-field/parts.tsx +91 -0
  341. package/src/progress/index.ts +6 -0
  342. package/src/progress/parts.tsx +51 -0
  343. package/src/progress/progress.module.css +61 -0
  344. package/src/progress/progress.tsx +42 -0
  345. package/src/select/index.ts +30 -0
  346. package/src/select/parts.tsx +171 -0
  347. package/src/select/select.module.css +146 -0
  348. package/src/select/select.tsx +98 -0
  349. package/src/separator/index.ts +3 -0
  350. package/src/separator/separator.module.css +14 -0
  351. package/src/separator/separator.tsx +20 -0
  352. package/src/slider/index.ts +14 -0
  353. package/src/slider/parts.tsx +90 -0
  354. package/src/slider/slider.module.css +110 -0
  355. package/src/slider/slider.tsx +68 -0
  356. package/src/styles/layer-order.css +22 -0
  357. package/src/styles/reset.css +91 -0
  358. package/src/styles/tailwind-theme.css +142 -0
  359. package/src/styles/tokens.css +404 -0
  360. package/src/switch/index.ts +6 -0
  361. package/src/switch/parts.tsx +44 -0
  362. package/src/switch/switch.module.css +57 -0
  363. package/src/switch/switch.tsx +33 -0
  364. package/src/tabs/index.ts +6 -0
  365. package/src/tabs/parts.tsx +48 -0
  366. package/src/tabs/tabs.module.css +79 -0
  367. package/src/tabs/tabs.tsx +48 -0
  368. package/src/toast/index.ts +6 -0
  369. package/src/toast/parts.tsx +76 -0
  370. package/src/toast/toast.module.css +212 -0
  371. package/src/toast/toast.tsx +129 -0
  372. package/src/tooltip/index.ts +6 -0
  373. package/src/tooltip/parts.tsx +62 -0
  374. package/src/tooltip/tooltip.module.css +56 -0
  375. package/src/tooltip/tooltip.tsx +30 -0
package/README.md ADDED
@@ -0,0 +1,808 @@
1
+ # @brijbyte/agentic-ui
2
+
3
+ A developer-focused React component library with an aesthetic loosely inspired by native desktop and mobile UI. Built on top of [`@base-ui/react`](https://base-ui.com) for accessible behaviour, styled with CSS modules under `@layer` rules so every component style is overridable downstream.
4
+
5
+ ---
6
+
7
+ ## Design philosophy
8
+
9
+ - **Monospace-first UI.** All chrome (buttons, labels, inputs, badges) uses a monospace font stack — feels native in developer tools and dashboards.
10
+ - **Serif display font for headings.** Titles use a serif font stack ("New York" where available) with a graceful fallback chain.
11
+ - **Semantic CSS custom properties.** Every visual value — colour, spacing, radius, shadow, easing — is a CSS variable. Dark mode and per-app theming are done by re-declaring variables, not by shipping a separate stylesheet.
12
+ - **Generic styled parts.** Every complex component exports both a high-level wrapper _and_ individual styled primitives. You can swap in a raw `@base-ui/react` root while keeping the styled children — or the other way around.
13
+ - **CSS-free JS output.** The built JavaScript never imports CSS. You import the stylesheet yourself, explicitly. This is standards-compliant and works with any bundler.
14
+ - **Layered component styles.** Component CSS modules live in `@layer components`. The layer order is `theme` (lowest) → `base` → `components` → `utilities` (highest). Declared once in `tokens.css` and exposed via `@brijbyte/agentic-ui/layer-order` — not repeated in every module file. Tokens in `@layer theme`; resets in `@layer base`; components beat both; Tailwind utilities beat everything.
15
+
16
+ ---
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ pnpm add @brijbyte/agentic-ui @base-ui/react react react-dom
22
+ ```
23
+
24
+ Peer dependencies: `react ^19`, `react-dom ^19`.
25
+
26
+ ---
27
+
28
+ ## CSS setup
29
+
30
+ ### Without Tailwind
31
+
32
+ **Option A — full bundle (simplest):** one import loads all tokens, resets, and component CSS:
33
+
34
+ ```css
35
+ @import "@brijbyte/agentic-ui/styles";
36
+ ```
37
+
38
+ **Option B — per-component (smallest bundle):** import tokens + reset once, then add one `/<name>.css` import per component you actually use:
39
+
40
+ ```css
41
+ @import "@brijbyte/agentic-ui/tokens";
42
+ @import "@brijbyte/agentic-ui/reset";
43
+
44
+ /* One line per component you use */
45
+ @import "@brijbyte/agentic-ui/button.css";
46
+ @import "@brijbyte/agentic-ui/dialog.css";
47
+ @import "@brijbyte/agentic-ui/toast.css";
48
+ ```
49
+
50
+ Every component has a plain `/<name>.css` subpath export. The JS and CSS are always separate explicit imports — the JS module never auto-injects CSS.
51
+
52
+ ### With Tailwind v4
53
+
54
+ ```css
55
+ /* app/globals.css */
56
+ @import "tailwindcss";
57
+
58
+ /* tokens.css includes the layer order declaration */
59
+ @import "@brijbyte/agentic-ui/tokens";
60
+ @import "@brijbyte/agentic-ui/reset";
61
+ @import "@brijbyte/agentic-ui/tailwind-theme";
62
+ ```
63
+
64
+ `tokens.css` declares `@layer theme, base, components, utilities` — the same order Tailwind v4 uses — so component styles in `@layer components` always beat preflight resets in `@layer base`, and Tailwind utilities in `@layer utilities` always beat component styles.
65
+
66
+ After this, every token is available as a Tailwind utility class:
67
+
68
+ | Token | Tailwind class | CSS output |
69
+ | ----------------- | -------------------------- | --------------------------------------- |
70
+ | `--color-canvas` | `bg-canvas` | `background-color: var(--color-canvas)` |
71
+ | `--color-primary` | `text-primary` | `color: var(--color-primary)` |
72
+ | `--color-line` | `border-line` | `border-color: var(--color-line)` |
73
+ | `--color-accent` | `bg-accent`, `text-accent` | references live CSS variable |
74
+ | `--font-mono` | `font-mono` | `font-family: var(--font-mono)` |
75
+ | `--font-display` | `font-display` | `font-family: var(--font-display)` |
76
+ | `--radius-md` | `rounded-md` | `border-radius: var(--radius-md)` |
77
+ | `--shadow-sm` | `shadow-sm` | `box-shadow: var(--shadow-sm)` |
78
+
79
+ Because `@theme inline` references live CSS variables (not baked-in values), **dark mode switches automatically** — no `dark:` prefix, no extra configuration.
80
+
81
+ > The `tailwind-theme` file contains `@theme inline {}` which is a Tailwind directive, not plain CSS. It must be processed by your Tailwind pipeline (`@tailwindcss/vite` or `@tailwindcss/postcss`).
82
+
83
+ ### CSS layer order
84
+
85
+ The cascade order `base → components → utilities` is declared in `tokens.css`, so importing tokens is sufficient in most setups.
86
+
87
+ If you're importing component CSS without tokens — for example, using a pre-built `button.css` in isolation — import `layer-order` first:
88
+
89
+ ```css
90
+ @import "@brijbyte/agentic-ui/layer-order";
91
+ @import "@brijbyte/agentic-ui/button.css";
92
+ ```
93
+
94
+ ```
95
+ @layer theme ← design tokens (CSS custom properties) ← lowest priority
96
+ @layer base ← element resets + Tailwind preflight ← beats theme
97
+ @layer components ← component CSS modules ← beats base
98
+ @layer utilities ← Tailwind utilities ← beats everything
99
+ ```
100
+
101
+ CSS only honours the **first** time each layer name appears in an ordering statement — subsequent declarations from other files are harmless.
102
+
103
+ ### Dark mode
104
+
105
+ Tokens adapt automatically via `prefers-color-scheme`. To override programmatically, set `data-theme` on `<html>`:
106
+
107
+ ```ts
108
+ document.documentElement.dataset.theme = "light"; // force light
109
+ document.documentElement.dataset.theme = "dark"; // force dark
110
+ delete document.documentElement.dataset.theme; // follow OS
111
+ ```
112
+
113
+ ---
114
+
115
+ ## Design tokens
116
+
117
+ All tokens are CSS custom properties defined at `:root` under `@layer base`. Override any of them after importing the stylesheet.
118
+
119
+ ### Typography
120
+
121
+ ```css
122
+ --font-display "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif
123
+ --font-mono "Berkeley Mono", "JetBrains Mono", "Fira Code", "SF Mono", "Menlo", ui-monospace
124
+ --font-sans -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial
125
+ ```
126
+
127
+ **`--font-display`** is used for `h1`–`h6` and prominent page titles.
128
+ **`--font-mono`** is used for all UI chrome — buttons, inputs, labels, badges, body text.
129
+
130
+ ### Colour roles (semantic, light + dark)
131
+
132
+ Token names describe **what the colour is**, not which CSS property it maps to. Tailwind's utility prefix (`bg-`, `text-`, `border-`) adds the property context — so `--color-canvas` becomes `bg-canvas`, `--color-primary` becomes `text-primary`, etc.
133
+
134
+ All tokens live in `@layer theme` — the lowest-priority layer. `@layer base` (resets) beats them, `@layer components` beats base, and `@layer utilities` beats everything. Any unlayered `:root` override also beats all layers without needing `!important`.
135
+
136
+ Shadows are theme-aware — light mode uses low-opacity black shadows; dark mode uses higher-opacity values so elevation is visible against dark surfaces.
137
+
138
+ | Token | Tailwind class | Role |
139
+ | --------------------------------------------------------- | -------------------- | ------------------------------------------- |
140
+ | `--color-canvas` | `bg-canvas` | Page background |
141
+ | `--color-elevated` | `bg-elevated` | Cards, popovers |
142
+ | `--color-sunken` | `bg-sunken` | Code blocks, inset areas |
143
+ | `--color-overlay` | `bg-overlay` | Backdrop-blurred surfaces |
144
+ | `--color-sidebar` | `bg-sidebar` | Sidebar / navigation panels |
145
+ | `--color-surface-1/2/3` | `bg-surface-1/2/3` | Layered surface hierarchy |
146
+ | `--color-hover` | `bg-hover` | Hovered interactive surface |
147
+ | `--color-active` | `bg-active` | Pressed interactive surface |
148
+ | `--color-selected` | `bg-selected` | Selected interactive surface |
149
+ | `--color-primary` | `text-primary` | Primary text |
150
+ | `--color-secondary` | `text-secondary` | Secondary text |
151
+ | `--color-tertiary` | `text-tertiary` | Tertiary / hint text |
152
+ | `--color-disabled` | `text-disabled` | Disabled text |
153
+ | `--color-inverse` | `text-inverse` | Text on inverse (dark) backgrounds |
154
+ | `--color-on-accent` | `text-on-accent` | Text on filled accent backgrounds |
155
+ | `--color-code` | `text-code` | Inline code text |
156
+ | `--color-line` | `border-line` | Base border |
157
+ | `--color-line-strong` | `border-line-strong` | Stronger border |
158
+ | `--color-line-subtle` | `border-line-subtle` | Subtle / decorative border |
159
+ | `--color-accent` | `bg-accent` | macOS blue — solid interactive colour |
160
+ | `--color-accent-hover` | — | Accent on hover |
161
+ | `--color-accent-pressed` | — | Accent on press |
162
+ | `--color-accent-tint` | `bg-accent-tint` | Subtle accent fill (badges, soft buttons) |
163
+ | `--color-accent-tint-hover` | — | Tint on hover |
164
+ | `--color-focus-ring` | — | Focus ring colour (semi-transparent accent) |
165
+ | `--color-success/warning/error/info-bg/border/text/solid` | — | Status colours |
166
+
167
+ ### Spacing
168
+
169
+ Full 4 px grid with no gaps. Tokens: `--space-px` (1px), `--space-0-5` (2px), `--space-1` (4px), `--space-1-5` (6px), `--space-2` (8px), `--space-2-5` (10px), `--space-3` (12px), `--space-4` (16px), `--space-5` (20px), `--space-6` (24px), `--space-7` (28px), `--space-8` (32px), `--space-9` (36px), `--space-10` (40px) … `--space-24` (96px).
170
+
171
+ ### Border radius
172
+
173
+ `--radius-none`, `--radius-sm` (4px), `--radius-md` (6px), `--radius-lg` (8px), `--radius-xl` (10px), `--radius-2xl` (12px), `--radius-full` (9999px).
174
+
175
+ ### Border width
176
+
177
+ `--border-width-base` (1px), `--border-width-medium` (1.5px), `--border-width-thick` (2px).
178
+
179
+ ### Shadows
180
+
181
+ Theme-aware — defined inside the light/dark token blocks so they adapt automatically.
182
+
183
+ `--shadow-xs/sm/md/lg/xl`, `--shadow-popover` (dropdown/tooltip), `--shadow-focus` (two-layer ring: offset gap + coloured ring), `--shadow-inset`.
184
+
185
+ `--shadow-focus` uses a two-layer technique: `0 0 0 2px --color-canvas, 0 0 0 4px --color-focus-ring`. The inner ring punches a gap in the page background colour, making the focus ring clearly visible on any background — light or dark.
186
+
187
+ ### Animation
188
+
189
+ ```css
190
+ /* Durations */
191
+ --duration-fast 100ms
192
+ --duration-normal 150ms
193
+ --duration-slow 200ms
194
+ --duration-slower 300ms
195
+
196
+ /* Easings — use the right one for the job */
197
+ --easing-ease-out cubic-bezier(0, 0, 0.2, 1) /* entering elements — starts fast */
198
+ --easing-ease-in cubic-bezier(0.4, 0, 1, 1) /* exiting elements — ends fast */
199
+ --easing-standard cubic-bezier(0.4, 0, 0.2, 1) /* on-screen movement / morphing */
200
+ --easing-spring cubic-bezier(0.34, 1.56, 0.64, 1) /* physics-based, slight overshoot */
201
+ --easing-linear linear /* constant motion (spinners, progress) */
202
+ ```
203
+
204
+ ### Z-index scale
205
+
206
+ `--z-dropdown` (100), `--z-sticky` (200), `--z-overlay` (300), `--z-modal` (400), `--z-popover` (500), `--z-toast` (600), `--z-tooltip` (700).
207
+
208
+ ---
209
+
210
+ ## Package exports
211
+
212
+ ```
213
+ @brijbyte/agentic-ui ← barrel (all components + StylesObjects)
214
+
215
+ CSS bundles
216
+ @brijbyte/agentic-ui/styles ← full bundle: tokens + reset + all components
217
+ @brijbyte/agentic-ui/layer-order ← layer order declaration only
218
+ @brijbyte/agentic-ui/tokens ← CSS custom properties (includes layer-order)
219
+ @brijbyte/agentic-ui/reset ← element resets
220
+ @brijbyte/agentic-ui/tailwind-theme ← @theme inline block for Tailwind v4
221
+
222
+ Per-component JS (also exports <Name>Styles class-name map)
223
+ @brijbyte/agentic-ui/accordion @brijbyte/agentic-ui/menu
224
+ @brijbyte/agentic-ui/alert-dialog @brijbyte/agentic-ui/number-field
225
+ @brijbyte/agentic-ui/badge @brijbyte/agentic-ui/progress
226
+ @brijbyte/agentic-ui/button @brijbyte/agentic-ui/select
227
+ @brijbyte/agentic-ui/card @brijbyte/agentic-ui/separator
228
+ @brijbyte/agentic-ui/checkbox @brijbyte/agentic-ui/slider
229
+ @brijbyte/agentic-ui/collapsible @brijbyte/agentic-ui/switch
230
+ @brijbyte/agentic-ui/context-menu @brijbyte/agentic-ui/tabs
231
+ @brijbyte/agentic-ui/dialog @brijbyte/agentic-ui/toast
232
+ @brijbyte/agentic-ui/drawer @brijbyte/agentic-ui/tooltip
233
+ @brijbyte/agentic-ui/input
234
+
235
+ Per-component CSS (/<name>.css mirrors each JS subpath)
236
+ @brijbyte/agentic-ui/accordion.css @brijbyte/agentic-ui/menu.css
237
+ @brijbyte/agentic-ui/alert-dialog.css @brijbyte/agentic-ui/number-field.css
238
+ @brijbyte/agentic-ui/badge.css @brijbyte/agentic-ui/progress.css
239
+ @brijbyte/agentic-ui/button.css @brijbyte/agentic-ui/select.css
240
+ @brijbyte/agentic-ui/card.css @brijbyte/agentic-ui/separator.css
241
+ @brijbyte/agentic-ui/checkbox.css @brijbyte/agentic-ui/slider.css
242
+ @brijbyte/agentic-ui/collapsible.css @brijbyte/agentic-ui/switch.css
243
+ @brijbyte/agentic-ui/context-menu.css @brijbyte/agentic-ui/tabs.css
244
+ @brijbyte/agentic-ui/dialog.css @brijbyte/agentic-ui/toast.css
245
+ @brijbyte/agentic-ui/drawer.css @brijbyte/agentic-ui/tooltip.css
246
+ @brijbyte/agentic-ui/input.css
247
+ ```
248
+
249
+ ---
250
+
251
+ ## Components
252
+
253
+ Each component is available at its own deep-import path for tree-shaking:
254
+
255
+ ```ts
256
+ import { Button } from "@brijbyte/agentic-ui/button";
257
+ import { Dialog, DialogPopup, DialogTitle } from "@brijbyte/agentic-ui/dialog";
258
+ ```
259
+
260
+ Or import everything from the barrel (convenient for prototyping):
261
+
262
+ ```ts
263
+ import { Button, Dialog, Input } from "@brijbyte/agentic-ui";
264
+ ```
265
+
266
+ ### Component list
267
+
268
+ | Import path | High-level wrapper | Styled parts |
269
+ | --------------- | --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
270
+ | `/accordion` | `Accordion` | `AccordionItemPart`, `AccordionHeader`, `AccordionTrigger`, `AccordionPanel` |
271
+ | `/alert-dialog` | `AlertDialog` | `AlertDialogBackdrop`, `AlertDialogPopup`, `AlertDialogTitle`, `AlertDialogDescription` |
272
+ | `/badge` | `Badge` | — |
273
+ | `/button` | `Button` | — |
274
+ | `/card` | `Card`, `CardHeader`, `CardBody`, `CardFooter` | — |
275
+ | `/checkbox` | `Checkbox` | `CheckboxRoot`, `CheckboxIndicator` |
276
+ | `/collapsible` | `Collapsible` | `CollapsibleRoot`, `CollapsibleTrigger`, `CollapsiblePanel` |
277
+ | `/context-menu` | `ContextMenu` | `ContextMenuPopup`, `ContextMenuItem`, `ContextMenuSeparator`, `ContextMenuGroup`, `ContextMenuGroupLabel`, `ContextMenuSubmenuTrigger` |
278
+ | `/dialog` | `Dialog` | `DialogBackdrop`, `DialogViewport`, `DialogPopup`, `DialogTitle`, `DialogDescription`, `DialogClose` |
279
+ | `/drawer` | `Drawer` | `DrawerBackdrop`, `DrawerViewport`, `DrawerPopup`, `DrawerContent`, `DrawerTitle`, `DrawerDescription`, `DrawerClose`, `DrawerHandleBar`, `DrawerFooter` |
280
+ | `/input` | `Input` | — |
281
+ | `/menu` | `Menu` | `MenuPositioner`, `MenuPopup`, `MenuItem`, `MenuSeparator`, `MenuGroupLabel`, `MenuArrow`, `MenuItemShortcut` |
282
+ | `/number-field` | `NumberField` | `NumberFieldGroup`, `NumberFieldInput`, `NumberFieldDecrement`, `NumberFieldIncrement`, `NumberFieldScrubArea`, `NumberFieldScrubAreaCursor` |
283
+ | `/progress` | `Progress` | `ProgressTrack`, `ProgressIndicator` |
284
+ | `/select` | `Select` | `SelectTrigger`, `SelectValue`, `SelectPositioner`, `SelectPopup`, `SelectList`, `SelectItem`, `SelectItemText`, `SelectItemIndicator`, `SelectGroupContainer`, `SelectGroupLabel`, `SelectSeparator` |
285
+ | `/separator` | `Separator` | — |
286
+ | `/slider` | `Slider` | `SliderControl`, `SliderTrack`, `SliderIndicator`, `SliderThumb`, `SliderLabel`, `SliderValue` |
287
+ | `/switch` | `Switch` | `SwitchRoot`, `SwitchThumb` |
288
+ | `/tabs` | `Tabs` | `TabsList`, `TabsTab`, `TabsPanel` |
289
+ | `/toast` | `ToastViewport`, `ToastProvider`, `useToastManager` | `ToastRoot`, `ToastTitle`, `ToastDescription`, `ToastClose`, `ToastViewportPart` |
290
+ | `/tooltip` | `Tooltip` | `TooltipPositioner`, `TooltipPopup`, `TooltipArrow` |
291
+
292
+ Every deep-import path also exports a `<ComponentName>Styles` object — the CSS module class name map. See [Accessing class names](#accessing-class-names).
293
+
294
+ ---
295
+
296
+ ## Usage patterns
297
+
298
+ ### High-level wrapper (batteries included)
299
+
300
+ ```tsx
301
+ import "@brijbyte/agentic-ui/styles";
302
+ import { Button } from "@brijbyte/agentic-ui/button";
303
+ import { Dialog } from "@brijbyte/agentic-ui/dialog";
304
+
305
+ <Button variant="solid" tone="primary" size="md">Deploy</Button>
306
+
307
+ <Dialog
308
+ trigger={<Button>Open settings</Button>}
309
+ title="API Settings"
310
+ description="Configure your endpoint."
311
+ footer={<Button size="sm">Save</Button>}
312
+ >
313
+ <Input placeholder="https://api.example.com" />
314
+ </Dialog>
315
+ ```
316
+
317
+ ### Composed: raw base-ui root + styled parts
318
+
319
+ Use a raw `@base-ui/react` Root for full control over behaviour (controlled state, custom refs, delays), while keeping all the pre-styled child parts:
320
+
321
+ ```tsx
322
+ import * as BaseDialog from "@base-ui/react/dialog";
323
+ import { DialogBackdrop, DialogViewport, DialogPopup, DialogTitle, DialogClose } from "@brijbyte/agentic-ui/dialog";
324
+
325
+ <BaseDialog.Root open={open} onOpenChange={setOpen}>
326
+ <BaseDialog.Trigger render={<button>Open</button>} />
327
+ <BaseDialog.Portal>
328
+ <DialogBackdrop />
329
+ <BaseDialog.Viewport>
330
+ <DialogPopup>
331
+ <DialogTitle>Custom Dialog</DialogTitle>
332
+ <DialogClose aria-label="Close">✕</DialogClose>
333
+ {children}
334
+ </DialogPopup>
335
+ </BaseDialog.Viewport>
336
+ </BaseDialog.Portal>
337
+ </BaseDialog.Root>;
338
+ ```
339
+
340
+ The same pattern applies to every component with sub-parts.
341
+
342
+ ### Overriding component styles
343
+
344
+ Every styled part accepts `className`. Add your own classes — they append after the built-in ones. Because component styles live in `@layer components`, any `@layer utilities` rule or unlayered rule you write will win in the cascade.
345
+
346
+ ```tsx
347
+ <Button className="my-custom-button">Click</Button>
348
+ ```
349
+
350
+ ```css
351
+ /* utility class → beats @layer components */
352
+ .my-custom-button {
353
+ border-radius: 0;
354
+ }
355
+ ```
356
+
357
+ ### Overriding tokens
358
+
359
+ Re-declare any CSS variable after importing the library stylesheet:
360
+
361
+ ```css
362
+ @import "@brijbyte/agentic-ui/styles";
363
+
364
+ :root {
365
+ --font-mono: "Cascadia Code", monospace; /* swap the mono font */
366
+ --color-accent: #7c3aed; /* purple accent instead of blue */
367
+ --radius-md: 2px; /* sharper corners */
368
+ }
369
+ ```
370
+
371
+ ### Accessing class names
372
+
373
+ Every deep-import path exports a `<ComponentName>Styles` object — the CSS module class name map. Keys are the local names from source, values are the hashed runtime names. Useful for tests, runtime class lookups, or extending styles:
374
+
375
+ ```ts
376
+ import { ButtonStyles } from "@brijbyte/agentic-ui/button";
377
+
378
+ // In a test — assert a class was applied
379
+ expect(el.className).toContain(ButtonStyles.root);
380
+
381
+ // At runtime — read the hashed name
382
+ const solidClass = ButtonStyles["variant-solid"]; // → "variant-solid_a1b2c3d4"
383
+ ```
384
+
385
+ ---
386
+
387
+ ## Components reference
388
+
389
+ ### Button
390
+
391
+ ```tsx
392
+ import { Button } from "@brijbyte/agentic-ui/button";
393
+
394
+ // variant: solid | soft | outline | ghost
395
+ // tone: primary | secondary | destructive | success | warning
396
+ // size: xs | sm | md | lg
397
+ <Button variant="solid" tone="primary" size="md">Deploy</Button>
398
+ <Button variant="soft" tone="destructive">Delete</Button>
399
+ <Button variant="outline" size="sm" loading>Saving…</Button>
400
+ <Button variant="ghost" loading loadingText="Deploying…">Deploy</Button>
401
+ <Button variant="soft" nativeButton={false} render={<a href="/docs" />}>Docs</Button>
402
+ ```
403
+
404
+ **`variant`** controls visual shape — `solid` (filled), `soft` (tinted), `outline` (bordered), `ghost` (borderless).
405
+
406
+ **`tone`** controls semantic colour — any tone works with any variant:
407
+
408
+ | Tone | Use case |
409
+ | ------------- | ------------------------------- |
410
+ | `primary` | Default. Primary action |
411
+ | `secondary` | Neutral / less prominent action |
412
+ | `destructive` | Irreversible / dangerous action |
413
+ | `success` | Confirm / complete action |
414
+ | `warning` | Caution required |
415
+
416
+ **`loading`** disables the button and shows a centred spinner. The button width stays stable — children are hidden with `visibility: hidden` so they still contribute to layout.
417
+
418
+ **`loadingText`** overrides the stable-width behaviour. When set, children swap to this text during loading (no spinner). Use when the loading state needs to communicate progress via text.
419
+
420
+ **`render`** passes through to `@base-ui/react` Button's `render` prop — use it to render an `<a>` or any custom element while keeping button behaviour. Set `nativeButton={false}` when rendering a non-`<button>` element.
421
+
422
+ ### Badge
423
+
424
+ ```tsx
425
+ import { Badge } from "@brijbyte/agentic-ui/badge";
426
+
427
+ // variants: default | solid | soft | success | warning | error | info
428
+ <Badge variant="success" dot>Active</Badge>
429
+ <Badge variant="error">Failed</Badge>
430
+ ```
431
+
432
+ `dot` shows a small coloured dot before the label text.
433
+
434
+ ### Input
435
+
436
+ ```tsx
437
+ import { Input } from "@brijbyte/agentic-ui/input";
438
+
439
+ // sizes: sm | md | lg
440
+ <Input size="md" placeholder="Search…" leftAdornment={<SearchIcon />} />
441
+ <Input invalid defaultValue="bad-value" />
442
+ ```
443
+
444
+ `size` overrides the native HTML `size` attribute — it maps to height and font-size design tokens.
445
+
446
+ ### Checkbox
447
+
448
+ ```tsx
449
+ import { Checkbox, CheckboxRoot, CheckboxIndicator } from "@brijbyte/agentic-ui/checkbox";
450
+
451
+ // High-level
452
+ <Checkbox checked={val} onCheckedChange={(v) => setVal(v as boolean)}>
453
+ Accept terms
454
+ </Checkbox>
455
+
456
+ // Composed — custom icon
457
+ <label htmlFor="cb">
458
+ <CheckboxRoot id="cb">
459
+ <CheckboxIndicator><StarIcon /></CheckboxIndicator>
460
+ </CheckboxRoot>
461
+ Favourite
462
+ </label>
463
+ ```
464
+
465
+ ### Switch
466
+
467
+ ```tsx
468
+ import { Switch } from "@brijbyte/agentic-ui/switch";
469
+
470
+ <Switch checked={enabled} onCheckedChange={(v) => setEnabled(v as boolean)}>
471
+ Enable notifications
472
+ </Switch>;
473
+ ```
474
+
475
+ ### Select
476
+
477
+ ```tsx
478
+ import { Select } from "@brijbyte/agentic-ui/select";
479
+
480
+ <Select
481
+ placeholder="Choose a model…"
482
+ options={[
483
+ { value: "claude-3-5-sonnet", label: "Claude 3.5 Sonnet" },
484
+ { value: "gpt-4o", label: "GPT-4o", disabled: true },
485
+ ]}
486
+ onValueChange={(v) => console.log(v)}
487
+ />
488
+
489
+ // With groups
490
+ <Select
491
+ groups={[
492
+ { label: "Anthropic", options: [{ value: "claude", label: "Claude" }] },
493
+ { label: "OpenAI", options: [{ value: "gpt", label: "GPT" }] },
494
+ ]}
495
+ />
496
+ ```
497
+
498
+ The trigger always displays the selected option's `label` (which can be any `ReactNode` — text, icons, etc.) rather than the raw `value` string. Label lookup is memoised.
499
+
500
+ ### Dialog
501
+
502
+ ```tsx
503
+ import { Dialog } from "@brijbyte/agentic-ui/dialog";
504
+
505
+ <Dialog
506
+ trigger={<Button>Open</Button>}
507
+ title="Confirm deletion"
508
+ description="This cannot be undone."
509
+ footer={
510
+ <>
511
+ <Button variant="ghost" size="sm">
512
+ Cancel
513
+ </Button>
514
+ <Button variant="solid" tone="destructive" size="sm">
515
+ Delete
516
+ </Button>
517
+ </>
518
+ }
519
+ >
520
+ Optional body content
521
+ </Dialog>;
522
+ ```
523
+
524
+ ### Drawer
525
+
526
+ ```tsx
527
+ import { Drawer, DrawerClose } from "@brijbyte/agentic-ui/drawer";
528
+
529
+ // sides: left | right (default) | top | bottom
530
+ <Drawer
531
+ side="right"
532
+ trigger={<Button>Open</Button>}
533
+ title="Settings"
534
+ footer={
535
+ <Button size="sm" render={<DrawerClose />}>
536
+ Done
537
+ </Button>
538
+ }
539
+ >
540
+ Content goes here
541
+ </Drawer>;
542
+ ```
543
+
544
+ ### Tooltip
545
+
546
+ ```tsx
547
+ import { Tooltip } from "@brijbyte/agentic-ui/tooltip";
548
+
549
+ // side: top | bottom | left | right (default: "top")
550
+ <Tooltip content="Keyboard shortcut: ⌘K" side="bottom">
551
+ <Button variant="ghost">Open palette</Button>
552
+ </Tooltip>;
553
+ ```
554
+
555
+ Tooltips spring open from the trigger's origin — Base UI sets `--transform-origin` to the trigger side so the scale animation radiates outward from the correct edge. Enter uses `--easing-spring` (overshoot + settle). Exit is a fast `ease-in` fade with no spring. When the user moves quickly between adjacent tooltips, subsequent ones appear instantly via `data-instant`.
556
+
557
+ ### Tabs
558
+
559
+ ```tsx
560
+ import { Tabs } from "@brijbyte/agentic-ui/tabs";
561
+
562
+ <Tabs
563
+ items={[
564
+ { value: "overview", label: "Overview", content: <OverviewPanel /> },
565
+ { value: "api", label: "API", content: <ApiPanel /> },
566
+ { value: "old", label: "Legacy", content: null, disabled: true },
567
+ ]}
568
+ />;
569
+ ```
570
+
571
+ The active tab is indicated by a 3px accent-coloured underline and full-brightness text vs dimmed inactive tabs. Tab panels fade in on switch.
572
+
573
+ ### Accordion
574
+
575
+ ```tsx
576
+ import { Accordion } from "@brijbyte/agentic-ui/accordion";
577
+
578
+ <Accordion
579
+ multiple={false}
580
+ items={[
581
+ { value: "q1", header: "What is it?", content: "…" },
582
+ { value: "q2", header: "How does it work?", content: "…" },
583
+ ]}
584
+ />;
585
+ ```
586
+
587
+ ### Collapsible
588
+
589
+ ```tsx
590
+ import { Collapsible } from "@brijbyte/agentic-ui/collapsible";
591
+
592
+ <Collapsible trigger="Recovery keys" defaultOpen>
593
+ <div>alien-bean-pasta</div>
594
+ <div>wild-irish-burrito</div>
595
+ </Collapsible>;
596
+ ```
597
+
598
+ When open, the trigger's bottom corners square off and connect flush with the content panel. When closing, the corners only round back after the panel has fully collapsed — no visible seam at any point during the animation.
599
+
600
+ ### Menu
601
+
602
+ ```tsx
603
+ import { Menu } from "@brijbyte/agentic-ui/menu";
604
+ import type { MenuEntry } from "@brijbyte/agentic-ui/menu";
605
+
606
+ const items: MenuEntry[] = [
607
+ { label: "Edit", shortcut: "⌘E", onSelect: () => {} },
608
+ { label: "Rename", shortcut: "⌘R", onSelect: () => {} },
609
+ { type: "separator" },
610
+ { label: "Delete", onSelect: () => {}, disabled: true },
611
+ ];
612
+
613
+ <Menu
614
+ trigger={
615
+ <Button variant="outline" size="sm">
616
+ Actions ▾
617
+ </Button>
618
+ }
619
+ items={items}
620
+ />;
621
+ ```
622
+
623
+ Supports `type: "group"` entries with an optional `label` for grouped sections. The popup uses backdrop blur and highlights use inset rounded corners — matching native context menu aesthetics.
624
+
625
+ ### NumberField
626
+
627
+ ```tsx
628
+ import { NumberField } from "@brijbyte/agentic-ui/number-field";
629
+
630
+ <NumberField label="Quantity" defaultValue={1} min={0} max={100} />
631
+ <NumberField label="Price" defaultValue={9.99} step={0.01} format={{ style: "currency", currency: "USD" }} />
632
+ ```
633
+
634
+ Click-and-drag on the label (scrub area) to change the value. Supports `min`, `max`, `step`, locale-aware `format`, and `allowWheelScrub`. The input and step buttons use a thin inset accent ring on focus rather than the standard offset focus ring.
635
+
636
+ ### Separator
637
+
638
+ ```tsx
639
+ import { Separator } from "@brijbyte/agentic-ui/separator";
640
+
641
+ <Separator />
642
+ <Separator orientation="vertical" style={{ height: "1rem" }} />
643
+ ```
644
+
645
+ ### Progress
646
+
647
+ ```tsx
648
+ import { Progress } from "@brijbyte/agentic-ui/progress";
649
+
650
+ // status: default | success | warning | error
651
+ // size: sm | md | lg
652
+ <Progress value={72} max={100} label="Uploading" showValue status="success" />
653
+ <Progress value={null} label="Loading…" /> {/* indeterminate — linear animation */}
654
+ ```
655
+
656
+ ### Toast
657
+
658
+ ```tsx
659
+ import { ToastProvider, ToastViewport, useToastManager } from "@brijbyte/agentic-ui/toast";
660
+
661
+ // 1. Wrap your app
662
+ <ToastProvider variant="list">
663
+ <App />
664
+ <ToastViewport variant="list" />
665
+ </ToastProvider>;
666
+
667
+ // 2. Trigger from anywhere
668
+ function MyComponent() {
669
+ const toast = useToastManager();
670
+ toast.add({
671
+ title: "Deployed",
672
+ description: "Your app is live.",
673
+ type: "success", // default | success | warning | error | info
674
+ });
675
+ }
676
+ ```
677
+
678
+ **`variant="stacked"`** — Sonner-style stacked toasts. Collapsed: toasts fan behind each other. Hover/focus expands the stack into a list. Gaps between toasts are covered by a pseudo-element so the stack doesn't collapse mid-hover.
679
+
680
+ ```tsx
681
+ <ToastProvider variant="stacked">
682
+ <App />
683
+ <ToastViewport variant="stacked" />
684
+ </ToastProvider>
685
+ ```
686
+
687
+ **`limit`** — maximum toasts shown simultaneously. Defaults to `3` (list) / `5` (stacked). Hard-capped at `5` (list) and `10` (stacked) to prevent viewport overflow.
688
+
689
+ Each toast type gets a subtle `color-mix` tinted background so variants are distinguishable without relying solely on the icon.
690
+
691
+ ### AlertDialog
692
+
693
+ ```tsx
694
+ import { AlertDialog } from "@brijbyte/agentic-ui/alert-dialog";
695
+
696
+ // 2 actions → side-by-side. Cancel (outline) + confirm (solid).
697
+ <AlertDialog
698
+ trigger={<Button variant="outline">Discard draft</Button>}
699
+ title="Discard draft?"
700
+ description="You can't undo this action."
701
+ actions={[
702
+ { label: "Cancel" },
703
+ { label: "Discard", primary: true, destructive: true },
704
+ ]}
705
+ />
706
+
707
+ // 3+ actions → all right-aligned in order.
708
+ <AlertDialog
709
+ title='Save "Untitled" before closing?'
710
+ actions={[
711
+ { label: "Don't Save", destructive: true },
712
+ { label: "Cancel" },
713
+ { label: "Save", primary: true },
714
+ ]}
715
+ />
716
+ ```
717
+
718
+ **`actions`** array — each entry: `label`, `onAction`, `primary` (solid variant), `destructive` (destructive tone). Actions are rendered right-aligned in the order given. `primary: true` → solid button. `destructive: true` → destructive tone.
719
+
720
+ Optional `icon` prop renders content above the title (e.g. an app icon or warning symbol).
721
+
722
+ ### ContextMenu
723
+
724
+ ```tsx
725
+ import { ContextMenu } from "@brijbyte/agentic-ui/context-menu";
726
+
727
+ <ContextMenu
728
+ items={[
729
+ { label: "Cut", shortcut: "⌘X" },
730
+ { label: "Copy", shortcut: "⌘C" },
731
+ { label: "Paste", shortcut: "⌘V", disabled: true },
732
+ { type: "separator" },
733
+ { label: "Select All", shortcut: "⌘A" },
734
+ ]}
735
+ >
736
+ <div>Right click me</div>
737
+ </ContextMenu>
738
+ ```
739
+
740
+ Activated by right-click or long press on the child element. Supports `items` with `label`, `shortcut`, `icon`, `onSelect`, and `disabled`. Use `type: "separator"` for dividers and `type: "group"` with nested `items` for logical sections.
741
+
742
+ For submenus, use the composed API with `ContextMenu.SubmenuRoot` + `ContextMenuSubmenuTrigger`:
743
+
744
+ ```tsx
745
+ import { ContextMenu as BaseContextMenu } from "@base-ui/react/context-menu";
746
+ import { ContextMenuPopup, ContextMenuItem, ContextMenuSubmenuTrigger } from "@brijbyte/agentic-ui/context-menu";
747
+
748
+ <BaseContextMenu.SubmenuRoot>
749
+ <ContextMenuSubmenuTrigger>Open With</ContextMenuSubmenuTrigger>
750
+ <BaseContextMenu.Portal>
751
+ <BaseContextMenu.Positioner alignOffset={-4} sideOffset={-4}>
752
+ <ContextMenuPopup>
753
+ <ContextMenuItem>VS Code</ContextMenuItem>
754
+ <ContextMenuItem>Zed</ContextMenuItem>
755
+ </ContextMenuPopup>
756
+ </BaseContextMenu.Positioner>
757
+ </BaseContextMenu.Portal>
758
+ </BaseContextMenu.SubmenuRoot>
759
+ ```
760
+
761
+ ---
762
+
763
+ ## Build system
764
+
765
+ Built with **[tsdown](https://tsdown.dev)** (powered by Rolldown + Lightning CSS).
766
+
767
+ ```bash
768
+ pnpm build # tsdown → dist/
769
+ pnpm dev # tsdown --watch
770
+ ```
771
+
772
+ ### Output
773
+
774
+ ```
775
+ dist/
776
+ index.js ← ESM barrel, no CSS imports
777
+ index.d.ts ← Type declarations
778
+ index.css ← All CSS: tokens + reset + every component
779
+ layer-order.css ← Layer order declaration only
780
+ tokens.css ← Tokens in @layer theme (includes layer-order)
781
+ reset.css ← Element resets in @layer base
782
+ tailwind-theme.css ← @theme inline block for Tailwind v4
783
+ button/index.js ← Per-component ESM (no CSS imports)
784
+ button/index.d.ts
785
+ button/button.css ← Per-component plain CSS
786
+ … ← All 19 components follow the same pattern
787
+ ```
788
+
789
+ ### Why no CSS in JS?
790
+
791
+ `@tsdown/css` with `inject: false` extracts all CSS to separate files and writes zero `import '…css'` statements into JS. Class name mappings from CSS modules are inlined into JS chunks as plain objects — the JS is self-contained, the CSS is an explicit dependency you control.
792
+
793
+ ---
794
+
795
+ ## Tooling
796
+
797
+ | Tool | Purpose |
798
+ | ------------------------------------- | ------------------------------------------ |
799
+ | `tsdown` | Library bundler (Rolldown + Lightning CSS) |
800
+ | `@typescript/native-preview` (`tsgo`) | Fast TypeScript type checking |
801
+ | `oxlint` | ESLint-compatible linter |
802
+ | `oxfmt` | Opinionated formatter |
803
+
804
+ ```bash
805
+ pnpm typecheck # tsgo --noEmit across all packages
806
+ pnpm lint # oxlint packages/agentic-ui/src apps/docs/src
807
+ pnpm format # oxfmt packages/agentic-ui/src apps/docs/src
808
+ ```