@brijbyte/agentic-ui 0.0.1-beta → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/README.md +736 -0
  2. package/dist/accordion/accordion.css +89 -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/badge/badge.css +70 -0
  17. package/dist/badge/badge.d.ts +20 -0
  18. package/dist/badge/badge.d.ts.map +1 -0
  19. package/dist/badge/badge.js +21 -0
  20. package/dist/badge/badge.js.map +1 -0
  21. package/dist/badge/badge.module.css.d.ts +2 -0
  22. package/dist/badge/badge.module.js +16 -0
  23. package/dist/badge/badge.module.js.map +1 -0
  24. package/dist/badge/index.d.ts +2 -0
  25. package/dist/badge/index.js +3 -0
  26. package/dist/button/button.css +242 -0
  27. package/dist/button/button.d.ts +28 -0
  28. package/dist/button/button.d.ts.map +1 -0
  29. package/dist/button/button.js +34 -0
  30. package/dist/button/button.js.map +1 -0
  31. package/dist/button/button.module.css.d.ts +2 -0
  32. package/dist/button/button.module.js +27 -0
  33. package/dist/button/button.module.js.map +1 -0
  34. package/dist/button/index.d.ts +2 -0
  35. package/dist/button/index.js +3 -0
  36. package/dist/card/card.css +68 -0
  37. package/dist/card/card.d.ts +41 -0
  38. package/dist/card/card.d.ts.map +1 -0
  39. package/dist/card/card.js +50 -0
  40. package/dist/card/card.js.map +1 -0
  41. package/dist/card/card.module.css.d.ts +2 -0
  42. package/dist/card/card.module.js +15 -0
  43. package/dist/card/card.module.js.map +1 -0
  44. package/dist/card/index.d.ts +2 -0
  45. package/dist/card/index.js +3 -0
  46. package/dist/checkbox/checkbox.css +76 -0
  47. package/dist/checkbox/checkbox.d.ts +29 -0
  48. package/dist/checkbox/checkbox.d.ts.map +1 -0
  49. package/dist/checkbox/checkbox.js +40 -0
  50. package/dist/checkbox/checkbox.js.map +1 -0
  51. package/dist/checkbox/checkbox.module.css.d.ts +2 -0
  52. package/dist/checkbox/checkbox.module.js +11 -0
  53. package/dist/checkbox/checkbox.module.js.map +1 -0
  54. package/dist/checkbox/index.d.ts +3 -0
  55. package/dist/checkbox/index.js +4 -0
  56. package/dist/checkbox/parts.d.ts +20 -0
  57. package/dist/checkbox/parts.d.ts.map +1 -0
  58. package/dist/checkbox/parts.js +51 -0
  59. package/dist/checkbox/parts.js.map +1 -0
  60. package/dist/collapsible/collapsible.css +92 -0
  61. package/dist/collapsible/collapsible.d.ts +24 -0
  62. package/dist/collapsible/collapsible.d.ts.map +1 -0
  63. package/dist/collapsible/collapsible.js +44 -0
  64. package/dist/collapsible/collapsible.js.map +1 -0
  65. package/dist/collapsible/collapsible.module.css.d.ts +2 -0
  66. package/dist/collapsible/collapsible.module.js +12 -0
  67. package/dist/collapsible/collapsible.module.js.map +1 -0
  68. package/dist/collapsible/index.d.ts +3 -0
  69. package/dist/collapsible/index.js +4 -0
  70. package/dist/collapsible/parts.d.ts +23 -0
  71. package/dist/collapsible/parts.d.ts.map +1 -0
  72. package/dist/collapsible/parts.js +44 -0
  73. package/dist/collapsible/parts.js.map +1 -0
  74. package/dist/dialog/dialog.css +120 -0
  75. package/dist/dialog/dialog.d.ts +32 -0
  76. package/dist/dialog/dialog.d.ts.map +1 -0
  77. package/dist/dialog/dialog.js +54 -0
  78. package/dist/dialog/dialog.js.map +1 -0
  79. package/dist/dialog/dialog.module.css.d.ts +2 -0
  80. package/dist/dialog/dialog.module.js +15 -0
  81. package/dist/dialog/dialog.module.js.map +1 -0
  82. package/dist/dialog/index.d.ts +3 -0
  83. package/dist/dialog/index.js +4 -0
  84. package/dist/dialog/parts.d.ts +38 -0
  85. package/dist/dialog/parts.d.ts.map +1 -0
  86. package/dist/dialog/parts.js +75 -0
  87. package/dist/dialog/parts.js.map +1 -0
  88. package/dist/drawer/drawer.css +257 -0
  89. package/dist/drawer/drawer.d.ts +38 -0
  90. package/dist/drawer/drawer.d.ts.map +1 -0
  91. package/dist/drawer/drawer.js +87 -0
  92. package/dist/drawer/drawer.js.map +1 -0
  93. package/dist/drawer/drawer.module.css.d.ts +2 -0
  94. package/dist/drawer/drawer.module.js +20 -0
  95. package/dist/drawer/drawer.module.js.map +1 -0
  96. package/dist/drawer/index.d.ts +3 -0
  97. package/dist/drawer/index.js +4 -0
  98. package/dist/drawer/parts.d.ts +58 -0
  99. package/dist/drawer/parts.d.ts.map +1 -0
  100. package/dist/drawer/parts.js +107 -0
  101. package/dist/drawer/parts.js.map +1 -0
  102. package/dist/index.css +2424 -0
  103. package/dist/index.d.ts +33 -0
  104. package/dist/index.js +53 -0
  105. package/dist/input/index.d.ts +2 -0
  106. package/dist/input/index.js +3 -0
  107. package/dist/input/input.css +107 -0
  108. package/dist/input/input.d.ts +17 -0
  109. package/dist/input/input.d.ts.map +1 -0
  110. package/dist/input/input.js +37 -0
  111. package/dist/input/input.js.map +1 -0
  112. package/dist/input/input.module.css.d.ts +2 -0
  113. package/dist/input/input.module.js +18 -0
  114. package/dist/input/input.module.js.map +1 -0
  115. package/dist/menu/index.d.ts +4 -0
  116. package/dist/menu/index.js +5 -0
  117. package/dist/menu/menu.css +158 -0
  118. package/dist/menu/menu.d.ts +50 -0
  119. package/dist/menu/menu.d.ts.map +1 -0
  120. package/dist/menu/menu.js +69 -0
  121. package/dist/menu/menu.js.map +1 -0
  122. package/dist/menu/menu.module.css.d.ts +2 -0
  123. package/dist/menu/menu.module.js +19 -0
  124. package/dist/menu/menu.module.js.map +1 -0
  125. package/dist/menu/menuitemshortcut.d.ts +9 -0
  126. package/dist/menu/menuitemshortcut.d.ts.map +1 -0
  127. package/dist/menu/menuitemshortcut.js +15 -0
  128. package/dist/menu/menuitemshortcut.js.map +1 -0
  129. package/dist/menu/parts.d.ts +39 -0
  130. package/dist/menu/parts.d.ts.map +1 -0
  131. package/dist/menu/parts.js +76 -0
  132. package/dist/menu/parts.js.map +1 -0
  133. package/dist/number-field/index.d.ts +3 -0
  134. package/dist/number-field/index.js +4 -0
  135. package/dist/number-field/number-field.css +115 -0
  136. package/dist/number-field/number-field.d.ts +31 -0
  137. package/dist/number-field/number-field.d.ts.map +1 -0
  138. package/dist/number-field/number-field.js +78 -0
  139. package/dist/number-field/number-field.js.map +1 -0
  140. package/dist/number-field/number-field.module.css.d.ts +2 -0
  141. package/dist/number-field/number-field.module.js +16 -0
  142. package/dist/number-field/number-field.module.js.map +1 -0
  143. package/dist/number-field/parts.d.ts +38 -0
  144. package/dist/number-field/parts.d.ts.map +1 -0
  145. package/dist/number-field/parts.js +74 -0
  146. package/dist/number-field/parts.js.map +1 -0
  147. package/dist/progress/index.d.ts +3 -0
  148. package/dist/progress/index.js +4 -0
  149. package/dist/progress/parts.d.ts +20 -0
  150. package/dist/progress/parts.d.ts.map +1 -0
  151. package/dist/progress/parts.js +42 -0
  152. package/dist/progress/parts.js.map +1 -0
  153. package/dist/progress/progress.css +75 -0
  154. package/dist/progress/progress.d.ts +27 -0
  155. package/dist/progress/progress.d.ts.map +1 -0
  156. package/dist/progress/progress.js +27 -0
  157. package/dist/progress/progress.js.map +1 -0
  158. package/dist/progress/progress.module.css.d.ts +2 -0
  159. package/dist/progress/progress.module.js +19 -0
  160. package/dist/progress/progress.module.js.map +1 -0
  161. package/dist/reset.css +91 -0
  162. package/dist/select/index.d.ts +3 -0
  163. package/dist/select/index.js +4 -0
  164. package/dist/select/parts.d.ts +65 -0
  165. package/dist/select/parts.d.ts.map +1 -0
  166. package/dist/select/parts.js +134 -0
  167. package/dist/select/parts.js.map +1 -0
  168. package/dist/select/select.css +159 -0
  169. package/dist/select/select.d.ts +38 -0
  170. package/dist/select/select.d.ts.map +1 -0
  171. package/dist/select/select.js +80 -0
  172. package/dist/select/select.js.map +1 -0
  173. package/dist/select/select.module.css.d.ts +2 -0
  174. package/dist/select/select.module.js +17 -0
  175. package/dist/select/select.module.js.map +1 -0
  176. package/dist/separator/index.d.ts +2 -0
  177. package/dist/separator/index.js +3 -0
  178. package/dist/separator/separator.css +20 -0
  179. package/dist/separator/separator.d.ts +16 -0
  180. package/dist/separator/separator.d.ts.map +1 -0
  181. package/dist/separator/separator.js +17 -0
  182. package/dist/separator/separator.js.map +1 -0
  183. package/dist/separator/separator.module.css.d.ts +2 -0
  184. package/dist/separator/separator.module.js +6 -0
  185. package/dist/separator/separator.module.js.map +1 -0
  186. package/dist/styles/reset.css +69 -0
  187. package/dist/styles/tokens.css +274 -0
  188. package/dist/switch/index.d.ts +3 -0
  189. package/dist/switch/index.js +4 -0
  190. package/dist/switch/parts.d.ts +18 -0
  191. package/dist/switch/parts.d.ts.map +1 -0
  192. package/dist/switch/parts.js +39 -0
  193. package/dist/switch/parts.js.map +1 -0
  194. package/dist/switch/switch.css +68 -0
  195. package/dist/switch/switch.d.ts +28 -0
  196. package/dist/switch/switch.d.ts.map +1 -0
  197. package/dist/switch/switch.js +26 -0
  198. package/dist/switch/switch.js.map +1 -0
  199. package/dist/switch/switch.module.css.d.ts +2 -0
  200. package/dist/switch/switch.module.js +11 -0
  201. package/dist/switch/switch.module.js.map +1 -0
  202. package/dist/tabs/index.d.ts +3 -0
  203. package/dist/tabs/index.js +4 -0
  204. package/dist/tabs/parts.d.ts +23 -0
  205. package/dist/tabs/parts.d.ts.map +1 -0
  206. package/dist/tabs/parts.js +48 -0
  207. package/dist/tabs/parts.js.map +1 -0
  208. package/dist/tabs/tabs.css +90 -0
  209. package/dist/tabs/tabs.d.ts +28 -0
  210. package/dist/tabs/tabs.d.ts.map +1 -0
  211. package/dist/tabs/tabs.js +30 -0
  212. package/dist/tabs/tabs.js.map +1 -0
  213. package/dist/tabs/tabs.module.css.d.ts +2 -0
  214. package/dist/tabs/tabs.module.js +11 -0
  215. package/dist/tabs/tabs.module.js.map +1 -0
  216. package/dist/tailwind-theme.css +142 -0
  217. package/dist/toast/index.d.ts +3 -0
  218. package/dist/toast/index.js +4 -0
  219. package/dist/toast/parts.d.ts +33 -0
  220. package/dist/toast/parts.d.ts.map +1 -0
  221. package/dist/toast/parts.js +62 -0
  222. package/dist/toast/parts.js.map +1 -0
  223. package/dist/toast/toast.css +211 -0
  224. package/dist/toast/toast.d.ts +43 -0
  225. package/dist/toast/toast.d.ts.map +1 -0
  226. package/dist/toast/toast.js +156 -0
  227. package/dist/toast/toast.js.map +1 -0
  228. package/dist/toast/toast.module.css.d.ts +2 -0
  229. package/dist/toast/toast.module.js +25 -0
  230. package/dist/toast/toast.module.js.map +1 -0
  231. package/dist/tokens.css +400 -0
  232. package/dist/tooltip/index.d.ts +3 -0
  233. package/dist/tooltip/index.js +4 -0
  234. package/dist/tooltip/parts.d.ts +23 -0
  235. package/dist/tooltip/parts.d.ts.map +1 -0
  236. package/dist/tooltip/parts.js +53 -0
  237. package/dist/tooltip/parts.js.map +1 -0
  238. package/dist/tooltip/tooltip.css +64 -0
  239. package/dist/tooltip/tooltip.d.ts +22 -0
  240. package/dist/tooltip/tooltip.d.ts.map +1 -0
  241. package/dist/tooltip/tooltip.js +23 -0
  242. package/dist/tooltip/tooltip.js.map +1 -0
  243. package/dist/tooltip/tooltip.module.css.d.ts +2 -0
  244. package/dist/tooltip/tooltip.module.js +10 -0
  245. package/dist/tooltip/tooltip.module.js.map +1 -0
  246. package/package.json +137 -4
  247. package/src/accordion/accordion.module.css +89 -0
  248. package/src/accordion/accordion.tsx +50 -0
  249. package/src/accordion/index.ts +6 -0
  250. package/src/accordion/parts.tsx +68 -0
  251. package/src/badge/badge.module.css +70 -0
  252. package/src/badge/badge.tsx +19 -0
  253. package/src/badge/index.ts +3 -0
  254. package/src/button/button.module.css +265 -0
  255. package/src/button/button.tsx +67 -0
  256. package/src/button/index.ts +3 -0
  257. package/src/card/card.module.css +67 -0
  258. package/src/card/card.tsx +54 -0
  259. package/src/card/index.ts +3 -0
  260. package/src/checkbox/checkbox.module.css +80 -0
  261. package/src/checkbox/checkbox.tsx +38 -0
  262. package/src/checkbox/index.ts +6 -0
  263. package/src/checkbox/parts.tsx +54 -0
  264. package/src/collapsible/collapsible.module.css +94 -0
  265. package/src/collapsible/collapsible.tsx +38 -0
  266. package/src/collapsible/index.ts +6 -0
  267. package/src/collapsible/parts.tsx +52 -0
  268. package/src/css.d.ts +8 -0
  269. package/src/dialog/dialog.module.css +123 -0
  270. package/src/dialog/dialog.tsx +60 -0
  271. package/src/dialog/index.ts +13 -0
  272. package/src/dialog/parts.tsx +96 -0
  273. package/src/drawer/drawer.module.css +289 -0
  274. package/src/drawer/drawer.tsx +96 -0
  275. package/src/drawer/index.ts +24 -0
  276. package/src/drawer/parts.tsx +122 -0
  277. package/src/index.ts +189 -0
  278. package/src/input/index.ts +3 -0
  279. package/src/input/input.module.css +109 -0
  280. package/src/input/input.tsx +39 -0
  281. package/src/menu/index.ts +7 -0
  282. package/src/menu/menu.module.css +172 -0
  283. package/src/menu/menu.tsx +108 -0
  284. package/src/menu/menuitemshortcut.tsx +9 -0
  285. package/src/menu/parts.tsx +90 -0
  286. package/src/number-field/index.ts +20 -0
  287. package/src/number-field/number-field.module.css +114 -0
  288. package/src/number-field/number-field.tsx +75 -0
  289. package/src/number-field/parts.tsx +91 -0
  290. package/src/progress/index.ts +6 -0
  291. package/src/progress/parts.tsx +51 -0
  292. package/src/progress/progress.module.css +70 -0
  293. package/src/progress/progress.tsx +42 -0
  294. package/src/select/index.ts +30 -0
  295. package/src/select/parts.tsx +171 -0
  296. package/src/select/select.module.css +167 -0
  297. package/src/select/select.tsx +89 -0
  298. package/src/separator/index.ts +3 -0
  299. package/src/separator/separator.module.css +18 -0
  300. package/src/separator/separator.tsx +20 -0
  301. package/src/styles/reset.css +91 -0
  302. package/src/styles/tailwind-theme.css +142 -0
  303. package/src/styles/tokens.css +400 -0
  304. package/src/switch/index.ts +6 -0
  305. package/src/switch/parts.tsx +44 -0
  306. package/src/switch/switch.module.css +67 -0
  307. package/src/switch/switch.tsx +33 -0
  308. package/src/tabs/index.ts +6 -0
  309. package/src/tabs/parts.tsx +48 -0
  310. package/src/tabs/tabs.module.css +92 -0
  311. package/src/tabs/tabs.tsx +48 -0
  312. package/src/toast/index.ts +6 -0
  313. package/src/toast/parts.tsx +76 -0
  314. package/src/toast/toast.module.css +252 -0
  315. package/src/toast/toast.tsx +129 -0
  316. package/src/tooltip/index.ts +6 -0
  317. package/src/tooltip/parts.tsx +62 -0
  318. package/src/tooltip/tooltip.module.css +67 -0
  319. package/src/tooltip/tooltip.tsx +30 -0
package/README.md ADDED
@@ -0,0 +1,736 @@
1
+ # @brijbyte/agentic-ui
2
+
3
+ A developer-focused React component library with a macOS/iOS-inspired aesthetic. 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 Apple's "New York" serif with a graceful fallback chain, giving the macOS/iOS native feel.
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`. Every module file begins with `@layer theme, base, components, utilities` — because bundlers like Vite can inject module CSS before the app's entry stylesheet loads. Without this per-file declaration the browser would see `@layer base` (from Tailwind's preflight) after `@layer components`, making preflight higher priority. The per-file declaration ensures the correct order is established whichever file the browser sees first.
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
+ ```ts
35
+ // main.tsx / entry.ts
36
+ import "@brijbyte/agentic-ui/styles";
37
+ ```
38
+
39
+ ```css
40
+ @import "@brijbyte/agentic-ui/styles";
41
+ ```
42
+
43
+ **Option B — per-component (smallest bundle):** import tokens + reset once, then add one `/<name>.css` import per component you actually use:
44
+
45
+ ```css
46
+ @import "@brijbyte/agentic-ui/tokens";
47
+ @import "@brijbyte/agentic-ui/reset";
48
+
49
+ /* One line per component you use */
50
+ @import "@brijbyte/agentic-ui/button.css";
51
+ @import "@brijbyte/agentic-ui/dialog.css";
52
+ @import "@brijbyte/agentic-ui/toast.css";
53
+ ```
54
+
55
+ 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.
56
+
57
+ ### With Tailwind v4
58
+
59
+ ```css
60
+ /* app/globals.css */
61
+ @import "tailwindcss";
62
+
63
+ @import "@brijbyte/agentic-ui/tokens";
64
+ @import "@brijbyte/agentic-ui/reset";
65
+ @import "@brijbyte/agentic-ui/tailwind-theme";
66
+ ```
67
+
68
+ `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.
69
+
70
+ After this, every token is available as a Tailwind utility class:
71
+
72
+ | Token | Tailwind class | CSS output |
73
+ | ---------------------- | -------------------------- | ---------------------------------------- |
74
+ | `--color-bg-base` | `bg-bg-base` | `background-color: var(--color-bg-base)` |
75
+ | `--color-text-primary` | `text-text-primary` | `color: var(--color-text-primary)` |
76
+ | `--color-border-base` | `border-border-base` | `border-color: var(--color-border-base)` |
77
+ | `--color-accent` | `bg-accent`, `text-accent` | references live CSS variable |
78
+ | `--font-mono` | `font-mono` | `font-family: var(--font-mono)` |
79
+ | `--font-display` | `font-display` | `font-family: var(--font-display)` |
80
+ | `--radius-md` | `rounded-md` | `border-radius: var(--radius-md)` |
81
+ | `--shadow-sm` | `shadow-sm` | `box-shadow: var(--shadow-sm)` |
82
+
83
+ Because `@theme inline` references live CSS variables (not baked-in values), **dark mode switches automatically** — no `dark:` prefix, no extra configuration.
84
+
85
+ > 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`).
86
+
87
+ ### CSS layer order
88
+
89
+ Every component CSS module file begins with:
90
+
91
+ ```css
92
+ @layer theme, base, components, utilities;
93
+ ```
94
+
95
+ This declaration appears at the top of each `.module.css` file rather than only in an entry stylesheet. The reason: bundlers like Vite inject CSS module files into the document asynchronously and potentially **before** the app's entry CSS (`styles.css`) loads. If a module file declares `@layer components { ... }` without first establishing the full order, the browser would later see `@layer base` from Tailwind's preflight and treat it as higher priority — causing preflight resets like `* { border: 0 solid }` to override component styles.
96
+
97
+ By placing the full layer declaration in every module file, the correct cascade order is fixed whichever file the browser processes first:
98
+
99
+ ```
100
+ @layer theme ← Tailwind defaults
101
+ @layer base ← tokens + element resets + Tailwind preflight (lowest priority)
102
+ @layer components ← component CSS modules (beat base)
103
+ @layer utilities ← Tailwind utilities (beat everything)
104
+ ```
105
+
106
+ Subsequent declarations of the same order (from `tailwindcss`, `tokens.css`, or other files) are harmless — CSS only honours the **first** time each layer name appears in an ordering statement.
107
+
108
+ ### Dark mode
109
+
110
+ Tokens adapt automatically via `prefers-color-scheme`. To override programmatically, set `data-theme` on `<html>`:
111
+
112
+ ```ts
113
+ document.documentElement.dataset.theme = "light"; // force light
114
+ document.documentElement.dataset.theme = "dark"; // follow OS again
115
+ delete document.documentElement.dataset.theme; // follow OS again
116
+ ```
117
+
118
+ ---
119
+
120
+ ## Design tokens
121
+
122
+ All tokens are CSS custom properties defined at `:root` under `@layer base`. Override any of them after importing the stylesheet.
123
+
124
+ ### Typography
125
+
126
+ ```css
127
+ --font-display "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif
128
+ --font-mono "Berkeley Mono", "JetBrains Mono", "Fira Code", "SF Mono", "Menlo", ui-monospace
129
+ --font-sans -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial
130
+ ```
131
+
132
+ **`--font-display`** is used for `h1`–`h6` and prominent page titles.
133
+ **`--font-mono`** is used for all UI chrome — buttons, inputs, labels, badges, body text.
134
+
135
+ ### Colour roles (semantic, light + dark)
136
+
137
+ Shadows are theme-aware — light mode uses low-opacity black shadows; dark mode automatically uses higher-opacity values so elevation is visible against dark surfaces.
138
+
139
+ | Token | Role |
140
+ | --------------------------------------------------------- | ------------------------------------------- |
141
+ | `--color-bg-base` | Page background |
142
+ | `--color-bg-elevated` | Cards, popovers |
143
+ | `--color-bg-overlay` | Backdrop-blurred surfaces |
144
+ | `--color-bg-sidebar` | Sidebar / navigation panels |
145
+ | `--color-surface-1/2/3` | Layered surface hierarchy |
146
+ | `--color-surface-hover/active/selected` | Interactive surface states |
147
+ | `--color-text-primary/secondary/tertiary/disabled` | Text hierarchy |
148
+ | `--color-text-on-accent` | Text on filled accent backgrounds |
149
+ | `--color-text-code` | Inline code text |
150
+ | `--color-border-base/strong/subtle` | Border hierarchy |
151
+ | `--color-accent` | macOS blue — solid interactive colour |
152
+ | `--color-accent-hover` | Accent on hover |
153
+ | `--color-accent-pressed` | Accent on press |
154
+ | `--color-accent-tint` | Subtle accent fill (badges, soft buttons) |
155
+ | `--color-accent-tint-hover` | Tint on hover |
156
+ | `--color-focus-ring` | Focus ring colour (semi-transparent accent) |
157
+ | `--color-success/warning/error/info-bg/border/text/solid` | Status colours |
158
+
159
+ Dark mode is handled by `@media (prefers-color-scheme: dark)` and `[data-theme="dark"]` on `<html>`.
160
+
161
+ ### Spacing
162
+
163
+ 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).
164
+
165
+ ### Border radius
166
+
167
+ `--radius-none`, `--radius-sm` (4px), `--radius-md` (6px), `--radius-lg` (8px), `--radius-xl` (10px), `--radius-2xl` (12px), `--radius-full` (9999px).
168
+
169
+ ### Border width
170
+
171
+ `--border-width-base` (1px), `--border-width-medium` (1.5px), `--border-width-thick` (2px).
172
+
173
+ ### Shadows
174
+
175
+ Theme-aware — defined inside the light/dark token blocks so they adapt automatically.
176
+
177
+ `--shadow-xs/sm/md/lg/xl`, `--shadow-popover` (dropdown/tooltip), `--shadow-focus` (two-layer ring: offset gap + coloured ring), `--shadow-inset`.
178
+
179
+ `--shadow-focus` uses a two-layer technique: `0 0 0 2px --color-bg-base, 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.
180
+
181
+ ### Animation
182
+
183
+ ```css
184
+ /* Durations */
185
+ --duration-fast 100ms
186
+ --duration-normal 150ms
187
+ --duration-slow 200ms
188
+ --duration-slower 300ms
189
+
190
+ /* Easings — use the right one for the job */
191
+ --easing-ease-out cubic-bezier(0, 0, 0.2, 1) /* entering elements — starts fast */
192
+ --easing-ease-in cubic-bezier(0.4, 0, 1, 1) /* exiting elements — ends fast */
193
+ --easing-standard cubic-bezier(0.4, 0, 0.2, 1) /* on-screen movement / morphing */
194
+ --easing-spring cubic-bezier(0.34, 1.56, 0.64, 1) /* playful / physics-based */
195
+ --easing-linear linear /* constant motion (spinners, progress) */
196
+ ```
197
+
198
+ ### Z-index scale
199
+
200
+ `--z-dropdown` (100), `--z-sticky` (200), `--z-overlay` (300), `--z-modal` (400), `--z-popover` (500), `--z-toast` (600), `--z-tooltip` (700).
201
+
202
+ ---
203
+
204
+ ## Package exports
205
+
206
+ ```
207
+ @brijbyte/agentic-ui ← barrel (all components + StylesObjects)
208
+
209
+ CSS bundles
210
+ @brijbyte/agentic-ui/styles ← full bundle: tokens + reset + all components
211
+ @brijbyte/agentic-ui/tokens ← CSS custom properties only (required)
212
+ @brijbyte/agentic-ui/reset ← element resets only (required)
213
+ @brijbyte/agentic-ui/tailwind-theme ← @theme inline block for Tailwind v4
214
+
215
+ Per-component JS (also exports <Name>Styles class-name map)
216
+ @brijbyte/agentic-ui/accordion @brijbyte/agentic-ui/menu
217
+ @brijbyte/agentic-ui/badge @brijbyte/agentic-ui/number-field
218
+ @brijbyte/agentic-ui/button @brijbyte/agentic-ui/progress
219
+ @brijbyte/agentic-ui/card @brijbyte/agentic-ui/select
220
+ @brijbyte/agentic-ui/checkbox @brijbyte/agentic-ui/separator
221
+ @brijbyte/agentic-ui/collapsible @brijbyte/agentic-ui/switch
222
+ @brijbyte/agentic-ui/dialog @brijbyte/agentic-ui/tabs
223
+ @brijbyte/agentic-ui/drawer @brijbyte/agentic-ui/toast
224
+ @brijbyte/agentic-ui/input @brijbyte/agentic-ui/tooltip
225
+
226
+ Per-component CSS (/<name>.css mirrors each JS subpath)
227
+ @brijbyte/agentic-ui/accordion.css @brijbyte/agentic-ui/menu.css
228
+ @brijbyte/agentic-ui/badge.css @brijbyte/agentic-ui/number-field.css
229
+ @brijbyte/agentic-ui/button.css @brijbyte/agentic-ui/progress.css
230
+ @brijbyte/agentic-ui/card.css @brijbyte/agentic-ui/select.css
231
+ @brijbyte/agentic-ui/checkbox.css @brijbyte/agentic-ui/separator.css
232
+ @brijbyte/agentic-ui/collapsible.css @brijbyte/agentic-ui/switch.css
233
+ @brijbyte/agentic-ui/dialog.css @brijbyte/agentic-ui/tabs.css
234
+ @brijbyte/agentic-ui/drawer.css @brijbyte/agentic-ui/toast.css
235
+ @brijbyte/agentic-ui/input.css @brijbyte/agentic-ui/tooltip.css
236
+ ```
237
+
238
+ ---
239
+
240
+ ## Components
241
+
242
+ Each component is available at its own deep-import path for tree-shaking:
243
+
244
+ ```ts
245
+ import { Button } from "@brijbyte/agentic-ui/button";
246
+ import { Dialog, DialogPopup, DialogTitle } from "@brijbyte/agentic-ui/dialog";
247
+ ```
248
+
249
+ Or import everything from the barrel (convenient for prototyping):
250
+
251
+ ```ts
252
+ import { Button, Dialog, Input } from "@brijbyte/agentic-ui";
253
+ ```
254
+
255
+ ### Component list
256
+
257
+ | Import path | High-level wrapper | Styled parts |
258
+ | --------------- | --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
259
+ | `/accordion` | `Accordion` | `AccordionItemPart`, `AccordionHeader`, `AccordionTrigger`, `AccordionPanel` |
260
+ | `/badge` | `Badge` | — |
261
+ | `/button` | `Button` | — |
262
+ | `/card` | `Card`, `CardHeader`, `CardBody`, `CardFooter` | — |
263
+ | `/checkbox` | `Checkbox` | `CheckboxRoot`, `CheckboxIndicator` |
264
+ | `/collapsible` | `Collapsible` | `CollapsibleRoot`, `CollapsibleTrigger`, `CollapsiblePanel` |
265
+ | `/dialog` | `Dialog` | `DialogBackdrop`, `DialogViewport`, `DialogPopup`, `DialogTitle`, `DialogDescription`, `DialogClose` |
266
+ | `/drawer` | `Drawer` | `DrawerBackdrop`, `DrawerViewport`, `DrawerPopup`, `DrawerContent`, `DrawerTitle`, `DrawerDescription`, `DrawerClose`, `DrawerHandleBar`, `DrawerFooter` |
267
+ | `/input` | `Input` | — |
268
+ | `/menu` | `Menu` | `MenuPositioner`, `MenuPopup`, `MenuItem`, `MenuSeparator`, `MenuGroupLabel`, `MenuArrow`, `MenuItemShortcut` |
269
+ | `/number-field` | `NumberField` | `NumberFieldGroup`, `NumberFieldInput`, `NumberFieldDecrement`, `NumberFieldIncrement`, `NumberFieldScrubArea`, `NumberFieldScrubAreaCursor` |
270
+ | `/progress` | `Progress` | `ProgressTrack`, `ProgressIndicator` |
271
+ | `/select` | `Select` | `SelectTrigger`, `SelectValue`, `SelectPositioner`, `SelectPopup`, `SelectList`, `SelectItem`, `SelectItemText`, `SelectItemIndicator`, `SelectGroupContainer`, `SelectGroupLabel`, `SelectSeparator` |
272
+ | `/separator` | `Separator` | — |
273
+ | `/switch` | `Switch` | `SwitchRoot`, `SwitchThumb` |
274
+ | `/tabs` | `Tabs` | `TabsList`, `TabsTab`, `TabsPanel` |
275
+ | `/toast` | `ToastViewport`, `ToastProvider`, `useToastManager` | `ToastRoot`, `ToastTitle`, `ToastDescription`, `ToastClose`, `ToastViewportPart` |
276
+ | `/tooltip` | `Tooltip` | `TooltipPositioner`, `TooltipPopup`, `TooltipArrow` |
277
+
278
+ Every deep-import path also exports a `<ComponentName>Styles` object — the CSS module class name map. See [Accessing class names](#accessing-class-names).
279
+
280
+ ---
281
+
282
+ ## Usage patterns
283
+
284
+ ### High-level wrapper (batteries included)
285
+
286
+ ```tsx
287
+ import "@brijbyte/agentic-ui/styles";
288
+ import { Button } from "@brijbyte/agentic-ui/button";
289
+ import { Dialog } from "@brijbyte/agentic-ui/dialog";
290
+
291
+ <Button variant="solid" tone="primary" size="md">Deploy</Button>
292
+
293
+ <Dialog
294
+ trigger={<Button>Open settings</Button>}
295
+ title="API Settings"
296
+ description="Configure your endpoint."
297
+ footer={<Button size="sm">Save</Button>}
298
+ >
299
+ <Input placeholder="https://api.example.com" />
300
+ </Dialog>
301
+ ```
302
+
303
+ ### Composed: raw base-ui root + styled parts
304
+
305
+ 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:
306
+
307
+ ```tsx
308
+ import * as BaseDialog from "@base-ui/react/dialog";
309
+ import { DialogBackdrop, DialogViewport, DialogPopup, DialogTitle, DialogClose } from "@brijbyte/agentic-ui/dialog";
310
+
311
+ <BaseDialog.Root open={open} onOpenChange={setOpen}>
312
+ <BaseDialog.Trigger render={<button>Open</button>} />
313
+ <BaseDialog.Portal>
314
+ <DialogBackdrop />
315
+ <BaseDialog.Viewport>
316
+ <DialogPopup>
317
+ <DialogTitle>Custom Dialog</DialogTitle>
318
+ <DialogClose aria-label="Close">✕</DialogClose>
319
+ {children}
320
+ </DialogPopup>
321
+ </BaseDialog.Viewport>
322
+ </BaseDialog.Portal>
323
+ </BaseDialog.Root>;
324
+ ```
325
+
326
+ The same pattern applies to every component with sub-parts.
327
+
328
+ ### Overriding component styles
329
+
330
+ 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.
331
+
332
+ ```tsx
333
+ <Button className="my-custom-button">Click</Button>
334
+ ```
335
+
336
+ ```css
337
+ /* utility class → beats @layer components */
338
+ .my-custom-button {
339
+ border-radius: 0;
340
+ }
341
+ ```
342
+
343
+ ### Overriding tokens
344
+
345
+ Re-declare any CSS variable after importing the library stylesheet:
346
+
347
+ ```css
348
+ @import "@brijbyte/agentic-ui/styles";
349
+
350
+ :root {
351
+ --font-mono: "Cascadia Code", monospace; /* swap the mono font */
352
+ --color-accent: #7c3aed; /* purple accent instead of blue */
353
+ --radius-md: 2px; /* sharper corners */
354
+ }
355
+ ```
356
+
357
+ ### Accessing class names
358
+
359
+ 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:
360
+
361
+ ```ts
362
+ import { ButtonStyles } from "@brijbyte/agentic-ui/button";
363
+
364
+ // In a test — assert a class was applied
365
+ expect(el.className).toContain(ButtonStyles.root);
366
+
367
+ // At runtime — read the hashed name
368
+ const solidClass = ButtonStyles["variant-solid"]; // → "variant-solid_a1b2c3d4"
369
+ ```
370
+
371
+ ---
372
+
373
+ ## Components reference
374
+
375
+ ### Button
376
+
377
+ ```tsx
378
+ import { Button } from "@brijbyte/agentic-ui/button";
379
+
380
+ // variant: solid | soft | outline | ghost
381
+ // tone: primary | secondary | destructive | success | warning
382
+ // size: xs | sm | md | lg
383
+ <Button variant="solid" tone="primary" size="md">Deploy</Button>
384
+ <Button variant="soft" tone="destructive">Delete</Button>
385
+ <Button variant="outline" size="sm" loading>Saving…</Button>
386
+ <Button variant="ghost" loading loadingText="Deploying…">Deploy</Button>
387
+ <Button variant="soft" nativeButton={false} render={<a href="/docs" />}>Docs</Button>
388
+ ```
389
+
390
+ **`variant`** controls visual shape — `solid` (filled), `soft` (tinted), `outline` (bordered), `ghost` (borderless).
391
+
392
+ **`tone`** controls semantic colour — any tone works with any variant:
393
+
394
+ | Tone | Use case |
395
+ | ------------- | ------------------------------- |
396
+ | `primary` | Default. Primary action |
397
+ | `secondary` | Neutral / less prominent action |
398
+ | `destructive` | Irreversible / dangerous action |
399
+ | `success` | Confirm / complete action |
400
+ | `warning` | Caution required |
401
+
402
+ **`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.
403
+
404
+ **`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.
405
+
406
+ **`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.
407
+
408
+ ### Badge
409
+
410
+ ```tsx
411
+ import { Badge } from "@brijbyte/agentic-ui/badge";
412
+
413
+ // variants: default | solid | soft | success | warning | error | info
414
+ <Badge variant="success" dot>Active</Badge>
415
+ <Badge variant="error">Failed</Badge>
416
+ ```
417
+
418
+ `dot` shows a small coloured dot before the label text.
419
+
420
+ ### Input
421
+
422
+ ```tsx
423
+ import { Input } from "@brijbyte/agentic-ui/input";
424
+
425
+ // sizes: sm | md | lg
426
+ <Input size="md" placeholder="Search…" leftAdornment={<SearchIcon />} />
427
+ <Input invalid defaultValue="bad-value" />
428
+ ```
429
+
430
+ `size` overrides the native HTML `size` attribute — it maps to height and font-size design tokens.
431
+
432
+ ### Checkbox
433
+
434
+ ```tsx
435
+ import { Checkbox, CheckboxRoot, CheckboxIndicator } from "@brijbyte/agentic-ui/checkbox";
436
+
437
+ // High-level
438
+ <Checkbox checked={val} onCheckedChange={(v) => setVal(v as boolean)}>
439
+ Accept terms
440
+ </Checkbox>
441
+
442
+ // Composed — custom icon
443
+ <label htmlFor="cb">
444
+ <CheckboxRoot id="cb">
445
+ <CheckboxIndicator>
446
+ <StarIcon />
447
+ </CheckboxIndicator>
448
+ </CheckboxRoot>
449
+ Favourite
450
+ </label>
451
+ ```
452
+
453
+ ### Switch
454
+
455
+ ```tsx
456
+ import { Switch } from "@brijbyte/agentic-ui/switch";
457
+
458
+ <Switch checked={enabled} onCheckedChange={(v) => setEnabled(v as boolean)}>
459
+ Enable notifications
460
+ </Switch>;
461
+ ```
462
+
463
+ ### Select
464
+
465
+ ```tsx
466
+ import { Select } from "@brijbyte/agentic-ui/select";
467
+
468
+ <Select
469
+ placeholder="Choose a model…"
470
+ options={[
471
+ { value: "claude-3-5-sonnet", label: "Claude 3.5 Sonnet" },
472
+ { value: "gpt-4o", label: "GPT-4o", disabled: true },
473
+ ]}
474
+ onValueChange={(v) => console.log(v)}
475
+ />
476
+
477
+ // With groups
478
+ <Select
479
+ groups={[
480
+ { label: "Anthropic", options: [{ value: "claude", label: "Claude" }] },
481
+ { label: "OpenAI", options: [{ value: "gpt", label: "GPT" }] },
482
+ ]}
483
+ />
484
+ ```
485
+
486
+ ### Dialog
487
+
488
+ ```tsx
489
+ import { Dialog } from "@brijbyte/agentic-ui/dialog";
490
+
491
+ <Dialog
492
+ trigger={<Button>Open</Button>}
493
+ title="Confirm deletion"
494
+ description="This cannot be undone."
495
+ footer={
496
+ <>
497
+ <Button variant="ghost" size="sm">
498
+ Cancel
499
+ </Button>
500
+ <Button variant="solid" tone="destructive" size="sm">
501
+ Delete
502
+ </Button>
503
+ </>
504
+ }
505
+ >
506
+ Optional body content
507
+ </Dialog>;
508
+ ```
509
+
510
+ ### Drawer
511
+
512
+ ```tsx
513
+ import { Drawer, DrawerClose } from "@brijbyte/agentic-ui/drawer";
514
+
515
+ // sides: left | right (default) | top | bottom
516
+ // Supports swipe-to-dismiss gestures on all sides.
517
+ <Drawer
518
+ side="right"
519
+ trigger={<Button>Open</Button>}
520
+ title="Settings"
521
+ description="Configure your workspace."
522
+ footer={
523
+ <Button size="sm" render={<DrawerClose />}>
524
+ Done
525
+ </Button>
526
+ }
527
+ >
528
+ Content goes here
529
+ </Drawer>;
530
+ ```
531
+
532
+ ### Tooltip
533
+
534
+ ```tsx
535
+ import { Tooltip } from "@brijbyte/agentic-ui/tooltip";
536
+
537
+ // side: top | bottom | left | right (default: "top")
538
+ <Tooltip content="Keyboard shortcut: ⌘K" side="bottom">
539
+ <Button variant="ghost">Open palette</Button>
540
+ </Tooltip>;
541
+ ```
542
+
543
+ Tooltips animate from their trigger's origin using Base UI's `--transform-origin` CSS variable. When the user moves quickly between multiple tooltips, subsequent ones appear instantly (no animation delay) via the `data-instant` attribute.
544
+
545
+ ### Tabs
546
+
547
+ ```tsx
548
+ import { Tabs } from "@brijbyte/agentic-ui/tabs";
549
+
550
+ <Tabs
551
+ items={[
552
+ { value: "overview", label: "Overview", content: <OverviewPanel /> },
553
+ { value: "api", label: "API", content: <ApiPanel /> },
554
+ { value: "old", label: "Legacy", content: null, disabled: true },
555
+ ]}
556
+ />;
557
+ ```
558
+
559
+ 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.
560
+
561
+ ### Accordion
562
+
563
+ ```tsx
564
+ import { Accordion } from "@brijbyte/agentic-ui/accordion";
565
+
566
+ // multiple: true (default) allows multiple panels open at once
567
+ <Accordion
568
+ multiple={false}
569
+ items={[
570
+ { value: "q1", header: "What is it?", content: "…" },
571
+ { value: "q2", header: "How does it work?", content: "…" },
572
+ ]}
573
+ />;
574
+ ```
575
+
576
+ ### Collapsible
577
+
578
+ ```tsx
579
+ import { Collapsible } from "@brijbyte/agentic-ui/collapsible";
580
+
581
+ <Collapsible trigger="Recovery keys" defaultOpen>
582
+ <div>alien-bean-pasta</div>
583
+ <div>wild-irish-burrito</div>
584
+ </Collapsible>;
585
+ ```
586
+
587
+ 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.
588
+
589
+ ### Menu
590
+
591
+ ```tsx
592
+ import { Menu } from "@brijbyte/agentic-ui/menu";
593
+ import type { MenuEntry } from "@brijbyte/agentic-ui/menu";
594
+
595
+ const items: MenuEntry[] = [
596
+ { label: "Edit", shortcut: "⌘E", onSelect: () => {} },
597
+ { label: "Rename", shortcut: "⌘R", onSelect: () => {} },
598
+ { type: "separator" },
599
+ { label: "Delete", onSelect: () => {}, disabled: true },
600
+ ];
601
+
602
+ <Menu
603
+ trigger={
604
+ <Button variant="outline" size="sm">
605
+ Actions ▾
606
+ </Button>
607
+ }
608
+ items={items}
609
+ />;
610
+ ```
611
+
612
+ Supports `type: "group"` entries with an optional `label` for grouped sections. The popup uses backdrop blur and the highlight uses inset rounded corners — matching macOS native menu aesthetics.
613
+
614
+ ### NumberField
615
+
616
+ ```tsx
617
+ import { NumberField } from "@brijbyte/agentic-ui/number-field";
618
+
619
+ <NumberField label="Quantity" defaultValue={1} min={0} max={100} />
620
+ <NumberField label="Price" defaultValue={9.99} step={0.01} format={{ style: "currency", currency: "USD" }} />
621
+ ```
622
+
623
+ Click-and-drag on the label (scrub area) to change the value. Supports `min`, `max`, `step`, locale-aware `format`, and `allowWheelScrub`.
624
+
625
+ ### Separator
626
+
627
+ ```tsx
628
+ import { Separator } from "@brijbyte/agentic-ui/separator";
629
+
630
+ // Horizontal (default)
631
+ <Separator />
632
+
633
+ // Vertical — stretch to parent height
634
+ <Separator orientation="vertical" style={{ height: "1rem" }} />
635
+ ```
636
+
637
+ ### Progress
638
+
639
+ ```tsx
640
+ import { Progress } from "@brijbyte/agentic-ui/progress";
641
+
642
+ // status: default | success | warning | error
643
+ // size: sm | md | lg
644
+ <Progress value={72} max={100} label="Uploading" showValue status="success" />
645
+ <Progress value={null} label="Loading…" /> {/* indeterminate — linear animation */}
646
+ ```
647
+
648
+ ### Toast
649
+
650
+ ```tsx
651
+ import { ToastProvider, ToastViewport, useToastManager } from "@brijbyte/agentic-ui/toast";
652
+
653
+ // 1. Wrap your app — limit defaults to 3 (list) or 5 (stacked)
654
+ <ToastProvider variant="list">
655
+ <App />
656
+ <ToastViewport variant="list" />
657
+ </ToastProvider>;
658
+
659
+ // 2. Trigger from anywhere
660
+ function MyComponent() {
661
+ const toast = useToastManager();
662
+ toast.add({
663
+ title: "Deployed",
664
+ description: "Your app is live.",
665
+ type: "success", // default | success | warning | error | info
666
+ });
667
+ }
668
+ ```
669
+
670
+ **`variant="stacked"`** — Sonner-style stacked toasts. Collapsed: toasts fan behind each other (scaled + nudged). Hover/focus expands the stack into a list. Hover gaps between toasts are filled so the stack doesn't collapse mid-hover.
671
+
672
+ ```tsx
673
+ <ToastProvider variant="stacked">
674
+ <App />
675
+ <ToastViewport variant="stacked" />
676
+ </ToastProvider>
677
+ ```
678
+
679
+ **`limit`** — maximum toasts shown simultaneously. Defaults to `3` for `list`, `5` for `stacked`. Hard-capped at `5` (list) and `10` (stacked) regardless of what is passed, to prevent viewport overflow.
680
+
681
+ Each toast type gets a subtle tinted background (`color-mix` of the status colour into the overlay) so variants are distinguishable without relying solely on the icon.
682
+
683
+ ---
684
+
685
+ ## Build system
686
+
687
+ Built with **[tsdown](https://tsdown.dev)** (powered by Rolldown + Lightning CSS).
688
+
689
+ ```bash
690
+ pnpm build # tsdown → dist/
691
+ pnpm dev # tsdown --watch
692
+ ```
693
+
694
+ ### Output
695
+
696
+ ```
697
+ dist/
698
+ index.js ← ESM barrel, no CSS imports
699
+ index.d.ts ← Type declarations
700
+ index.css ← All CSS: tokens + reset + every component
701
+ tokens.css ← Tokens only (for Tailwind setups)
702
+ reset.css ← Reset only (for Tailwind setups)
703
+ tailwind-theme.css ← @theme inline block for Tailwind v4
704
+ button/index.js ← Per-component ESM (no CSS imports)
705
+ button/index.d.ts
706
+ button/button.css ← Per-component plain CSS (no .module suffix)
707
+ … ← All 18 components follow the same pattern
708
+ ```
709
+
710
+ ### Two-pass build
711
+
712
+ The config runs two tsdown passes:
713
+
714
+ 1. **Pass 1** — JS + DTS + `dist/index.css` (all CSS bundled into one file).
715
+ 2. **Pass 2** — per-component split CSS. Each component's CSS is written to `dist/<name>/<Name>.css`. An `onSuccess` hook renames `*.module.css` output files to `*.css` (tsdown's CSS modules plugin requires `.module.css` source files, but consumers should see plain `.css`).
716
+
717
+ ### Why no CSS in JS?
718
+
719
+ `@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.
720
+
721
+ ---
722
+
723
+ ## Tooling
724
+
725
+ | Tool | Purpose |
726
+ | ------------------------------------- | ------------------------------------------ |
727
+ | `tsdown` | Library bundler (Rolldown + Lightning CSS) |
728
+ | `@typescript/native-preview` (`tsgo`) | Fast TypeScript type checking |
729
+ | `oxlint` | ESLint-compatible linter |
730
+ | `oxfmt` | Opinionated formatter |
731
+
732
+ ```bash
733
+ pnpm typecheck # tsgo --noEmit across all packages
734
+ pnpm lint # oxlint packages/agentic-ui/src apps/docs/src
735
+ pnpm format # oxfmt packages/agentic-ui/src apps/docs/src
736
+ ```