@brijbyte/agentic-ui 0.0.1 → 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 (135) hide show
  1. package/README.md +183 -111
  2. package/dist/accordion/accordion.css +6 -10
  3. package/dist/accordion/accordion.module.js.map +1 -1
  4. package/dist/alert-dialog/alert-dialog.css +84 -0
  5. package/dist/alert-dialog/alert-dialog.d.ts +44 -0
  6. package/dist/alert-dialog/alert-dialog.d.ts.map +1 -0
  7. package/dist/alert-dialog/alert-dialog.js +46 -0
  8. package/dist/alert-dialog/alert-dialog.js.map +1 -0
  9. package/dist/alert-dialog/alert-dialog.module.css.d.ts +2 -0
  10. package/dist/alert-dialog/alert-dialog.module.js +14 -0
  11. package/dist/alert-dialog/alert-dialog.module.js.map +1 -0
  12. package/dist/alert-dialog/index.d.ts +3 -0
  13. package/dist/alert-dialog/index.js +4 -0
  14. package/dist/alert-dialog/parts.d.ts +28 -0
  15. package/dist/alert-dialog/parts.d.ts.map +1 -0
  16. package/dist/alert-dialog/parts.js +62 -0
  17. package/dist/alert-dialog/parts.js.map +1 -0
  18. package/dist/badge/badge.css +3 -7
  19. package/dist/badge/badge.module.js.map +1 -1
  20. package/dist/button/button.css +14 -14
  21. package/dist/button/button.module.js.map +1 -1
  22. package/dist/card/card.css +5 -9
  23. package/dist/card/card.module.js.map +1 -1
  24. package/dist/checkbox/checkbox.css +3 -7
  25. package/dist/checkbox/checkbox.module.js.map +1 -1
  26. package/dist/collapsible/collapsible.css +7 -11
  27. package/dist/collapsible/collapsible.module.js.map +1 -1
  28. package/dist/context-menu/context-menu.css +151 -0
  29. package/dist/context-menu/context-menu.d.ts +36 -0
  30. package/dist/context-menu/context-menu.d.ts.map +1 -0
  31. package/dist/context-menu/context-menu.js +54 -0
  32. package/dist/context-menu/context-menu.js.map +1 -0
  33. package/dist/context-menu/context-menu.module.css.d.ts +2 -0
  34. package/dist/context-menu/context-menu.module.js +18 -0
  35. package/dist/context-menu/context-menu.module.js.map +1 -0
  36. package/dist/context-menu/index.d.ts +3 -0
  37. package/dist/context-menu/index.js +4 -0
  38. package/dist/context-menu/parts.d.ts +38 -0
  39. package/dist/context-menu/parts.d.ts.map +1 -0
  40. package/dist/context-menu/parts.js +91 -0
  41. package/dist/context-menu/parts.js.map +1 -0
  42. package/dist/dialog/dialog.css +27 -22
  43. package/dist/dialog/dialog.d.ts +8 -0
  44. package/dist/dialog/dialog.d.ts.map +1 -1
  45. package/dist/dialog/dialog.js +7 -4
  46. package/dist/dialog/dialog.js.map +1 -1
  47. package/dist/dialog/dialog.module.js +2 -0
  48. package/dist/dialog/dialog.module.js.map +1 -1
  49. package/dist/drawer/drawer.css +9 -13
  50. package/dist/drawer/drawer.module.js.map +1 -1
  51. package/dist/index.css +1630 -1353
  52. package/dist/index.d.ts +24 -18
  53. package/dist/index.js +10 -1
  54. package/dist/input/input.css +5 -9
  55. package/dist/input/input.module.js.map +1 -1
  56. package/dist/layer-order.css +22 -0
  57. package/dist/menu/menu.css +13 -17
  58. package/dist/menu/menu.module.js.map +1 -1
  59. package/dist/number-field/number-field.css +12 -16
  60. package/dist/number-field/number-field.module.js.map +1 -1
  61. package/dist/progress/progress.css +1 -5
  62. package/dist/progress/progress.module.js.map +1 -1
  63. package/dist/reset.css +6 -6
  64. package/dist/select/select.css +14 -16
  65. package/dist/select/select.d.ts +5 -2
  66. package/dist/select/select.d.ts.map +1 -1
  67. package/dist/select/select.js +11 -2
  68. package/dist/select/select.js.map +1 -1
  69. package/dist/select/select.module.js.map +1 -1
  70. package/dist/separator/separator.css +1 -5
  71. package/dist/separator/separator.module.js.map +1 -1
  72. package/dist/slider/index.d.ts +3 -0
  73. package/dist/slider/index.js +4 -0
  74. package/dist/slider/parts.d.ts +38 -0
  75. package/dist/slider/parts.d.ts.map +1 -0
  76. package/dist/slider/parts.js +69 -0
  77. package/dist/slider/parts.js.map +1 -0
  78. package/dist/slider/slider.css +97 -0
  79. package/dist/slider/slider.d.ts +38 -0
  80. package/dist/slider/slider.d.ts.map +1 -0
  81. package/dist/slider/slider.js +41 -0
  82. package/dist/slider/slider.js.map +1 -0
  83. package/dist/slider/slider.module.css.d.ts +2 -0
  84. package/dist/slider/slider.module.js +15 -0
  85. package/dist/slider/slider.module.js.map +1 -0
  86. package/dist/styles/reset.css +6 -6
  87. package/dist/styles/tokens.css +73 -71
  88. package/dist/switch/switch.css +2 -6
  89. package/dist/switch/switch.module.js.map +1 -1
  90. package/dist/tabs/tabs.css +5 -9
  91. package/dist/tabs/tabs.module.js.map +1 -1
  92. package/dist/tailwind-theme.css +23 -23
  93. package/dist/toast/toast.css +11 -15
  94. package/dist/toast/toast.module.js.map +1 -1
  95. package/dist/tokens.css +79 -75
  96. package/dist/tooltip/tooltip.css +7 -11
  97. package/dist/tooltip/tooltip.module.js.map +1 -1
  98. package/package.json +17 -1
  99. package/src/accordion/accordion.module.css +6 -20
  100. package/src/alert-dialog/alert-dialog.module.css +91 -0
  101. package/src/alert-dialog/alert-dialog.tsx +69 -0
  102. package/src/alert-dialog/index.ts +7 -0
  103. package/src/alert-dialog/parts.tsx +73 -0
  104. package/src/badge/badge.module.css +3 -13
  105. package/src/button/button.module.css +15 -51
  106. package/src/card/card.module.css +5 -16
  107. package/src/checkbox/checkbox.module.css +3 -14
  108. package/src/collapsible/collapsible.module.css +7 -20
  109. package/src/context-menu/context-menu.module.css +168 -0
  110. package/src/context-menu/context-menu.tsx +75 -0
  111. package/src/context-menu/index.ts +21 -0
  112. package/src/context-menu/parts.tsx +99 -0
  113. package/src/dialog/dialog.module.css +26 -33
  114. package/src/dialog/dialog.tsx +14 -1
  115. package/src/drawer/drawer.module.css +9 -58
  116. package/src/index.ts +48 -0
  117. package/src/input/input.module.css +5 -21
  118. package/src/menu/menu.module.css +13 -43
  119. package/src/number-field/number-field.module.css +12 -28
  120. package/src/progress/progress.module.css +1 -10
  121. package/src/select/select.module.css +14 -35
  122. package/src/select/select.tsx +14 -5
  123. package/src/separator/separator.module.css +1 -5
  124. package/src/slider/index.ts +14 -0
  125. package/src/slider/parts.tsx +90 -0
  126. package/src/slider/slider.module.css +110 -0
  127. package/src/slider/slider.tsx +68 -0
  128. package/src/styles/layer-order.css +22 -0
  129. package/src/styles/reset.css +6 -6
  130. package/src/styles/tailwind-theme.css +23 -23
  131. package/src/styles/tokens.css +79 -75
  132. package/src/switch/switch.module.css +2 -12
  133. package/src/tabs/tabs.module.css +5 -18
  134. package/src/toast/toast.module.css +11 -51
  135. package/src/tooltip/tooltip.module.css +7 -18
package/README.md CHANGED
@@ -1,17 +1,17 @@
1
1
  # @brijbyte/agentic-ui
2
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.
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
4
 
5
5
  ---
6
6
 
7
7
  ## Design philosophy
8
8
 
9
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.
10
+ - **Serif display font for headings.** Titles use a serif font stack ("New York" where available) with a graceful fallback chain.
11
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
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
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.
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
15
 
16
16
  ---
17
17
 
@@ -31,11 +31,6 @@ Peer dependencies: `react ^19`, `react-dom ^19`.
31
31
 
32
32
  **Option A — full bundle (simplest):** one import loads all tokens, resets, and component CSS:
33
33
 
34
- ```ts
35
- // main.tsx / entry.ts
36
- import "@brijbyte/agentic-ui/styles";
37
- ```
38
-
39
34
  ```css
40
35
  @import "@brijbyte/agentic-ui/styles";
41
36
  ```
@@ -60,6 +55,7 @@ Every component has a plain `/<name>.css` subpath export. The JS and CSS are alw
60
55
  /* app/globals.css */
61
56
  @import "tailwindcss";
62
57
 
58
+ /* tokens.css includes the layer order declaration */
63
59
  @import "@brijbyte/agentic-ui/tokens";
64
60
  @import "@brijbyte/agentic-ui/reset";
65
61
  @import "@brijbyte/agentic-ui/tailwind-theme";
@@ -69,16 +65,16 @@ Every component has a plain `/<name>.css` subpath export. The JS and CSS are alw
69
65
 
70
66
  After this, every token is available as a Tailwind utility class:
71
67
 
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)` |
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)` |
82
78
 
83
79
  Because `@theme inline` references live CSS variables (not baked-in values), **dark mode switches automatically** — no `dark:` prefix, no extra configuration.
84
80
 
@@ -86,24 +82,23 @@ Because `@theme inline` references live CSS variables (not baked-in values), **d
86
82
 
87
83
  ### CSS layer order
88
84
 
89
- Every component CSS module file begins with:
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:
90
88
 
91
89
  ```css
92
- @layer theme, base, components, utilities;
90
+ @import "@brijbyte/agentic-ui/layer-order";
91
+ @import "@brijbyte/agentic-ui/button.css";
93
92
  ```
94
93
 
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
94
  ```
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)
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
104
99
  ```
105
100
 
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.
101
+ CSS only honours the **first** time each layer name appears in an ordering statement — subsequent declarations from other files are harmless.
107
102
 
108
103
  ### Dark mode
109
104
 
@@ -111,8 +106,8 @@ Tokens adapt automatically via `prefers-color-scheme`. To override programmatica
111
106
 
112
107
  ```ts
113
108
  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
109
+ document.documentElement.dataset.theme = "dark"; // force dark
110
+ delete document.documentElement.dataset.theme; // follow OS
116
111
  ```
117
112
 
118
113
  ---
@@ -129,34 +124,45 @@ All tokens are CSS custom properties defined at `:root` under `@layer base`. Ove
129
124
  --font-sans -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial
130
125
  ```
131
126
 
132
- **`--font-display`** is used for `h1`–`h6` and prominent page titles.
127
+ **`--font-display`** is used for `h1`–`h6` and prominent page titles.
133
128
  **`--font-mono`** is used for all UI chrome — buttons, inputs, labels, badges, body text.
134
129
 
135
130
  ### Colour roles (semantic, light + dark)
136
131
 
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>`.
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 |
160
166
 
161
167
  ### Spacing
162
168
 
@@ -176,7 +182,7 @@ Theme-aware — defined inside the light/dark token blocks so they adapt automat
176
182
 
177
183
  `--shadow-xs/sm/md/lg/xl`, `--shadow-popover` (dropdown/tooltip), `--shadow-focus` (two-layer ring: offset gap + coloured ring), `--shadow-inset`.
178
184
 
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.
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.
180
186
 
181
187
  ### Animation
182
188
 
@@ -188,11 +194,11 @@ Theme-aware — defined inside the light/dark token blocks so they adapt automat
188
194
  --duration-slower 300ms
189
195
 
190
196
  /* 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) */
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) */
196
202
  ```
197
203
 
198
204
  ### Z-index scale
@@ -208,31 +214,36 @@ Theme-aware — defined inside the light/dark token blocks so they adapt automat
208
214
 
209
215
  CSS bundles
210
216
  @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)
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
213
220
  @brijbyte/agentic-ui/tailwind-theme ← @theme inline block for Tailwind v4
214
221
 
215
222
  Per-component JS (also exports <Name>Styles class-name map)
216
223
  @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
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
221
229
  @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
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
225
234
 
226
235
  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
+ @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
236
247
  ```
237
248
 
238
249
  ---
@@ -257,11 +268,13 @@ import { Button, Dialog, Input } from "@brijbyte/agentic-ui";
257
268
  | Import path | High-level wrapper | Styled parts |
258
269
  | --------------- | --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
259
270
  | `/accordion` | `Accordion` | `AccordionItemPart`, `AccordionHeader`, `AccordionTrigger`, `AccordionPanel` |
271
+ | `/alert-dialog` | `AlertDialog` | `AlertDialogBackdrop`, `AlertDialogPopup`, `AlertDialogTitle`, `AlertDialogDescription` |
260
272
  | `/badge` | `Badge` | — |
261
273
  | `/button` | `Button` | — |
262
274
  | `/card` | `Card`, `CardHeader`, `CardBody`, `CardFooter` | — |
263
275
  | `/checkbox` | `Checkbox` | `CheckboxRoot`, `CheckboxIndicator` |
264
276
  | `/collapsible` | `Collapsible` | `CollapsibleRoot`, `CollapsibleTrigger`, `CollapsiblePanel` |
277
+ | `/context-menu` | `ContextMenu` | `ContextMenuPopup`, `ContextMenuItem`, `ContextMenuSeparator`, `ContextMenuGroup`, `ContextMenuGroupLabel`, `ContextMenuSubmenuTrigger` |
265
278
  | `/dialog` | `Dialog` | `DialogBackdrop`, `DialogViewport`, `DialogPopup`, `DialogTitle`, `DialogDescription`, `DialogClose` |
266
279
  | `/drawer` | `Drawer` | `DrawerBackdrop`, `DrawerViewport`, `DrawerPopup`, `DrawerContent`, `DrawerTitle`, `DrawerDescription`, `DrawerClose`, `DrawerHandleBar`, `DrawerFooter` |
267
280
  | `/input` | `Input` | — |
@@ -270,6 +283,7 @@ import { Button, Dialog, Input } from "@brijbyte/agentic-ui";
270
283
  | `/progress` | `Progress` | `ProgressTrack`, `ProgressIndicator` |
271
284
  | `/select` | `Select` | `SelectTrigger`, `SelectValue`, `SelectPositioner`, `SelectPopup`, `SelectList`, `SelectItem`, `SelectItemText`, `SelectItemIndicator`, `SelectGroupContainer`, `SelectGroupLabel`, `SelectSeparator` |
272
285
  | `/separator` | `Separator` | — |
286
+ | `/slider` | `Slider` | `SliderControl`, `SliderTrack`, `SliderIndicator`, `SliderThumb`, `SliderLabel`, `SliderValue` |
273
287
  | `/switch` | `Switch` | `SwitchRoot`, `SwitchThumb` |
274
288
  | `/tabs` | `Tabs` | `TabsList`, `TabsTab`, `TabsPanel` |
275
289
  | `/toast` | `ToastViewport`, `ToastProvider`, `useToastManager` | `ToastRoot`, `ToastTitle`, `ToastDescription`, `ToastClose`, `ToastViewportPart` |
@@ -442,9 +456,7 @@ import { Checkbox, CheckboxRoot, CheckboxIndicator } from "@brijbyte/agentic-ui/
442
456
  // Composed — custom icon
443
457
  <label htmlFor="cb">
444
458
  <CheckboxRoot id="cb">
445
- <CheckboxIndicator>
446
- <StarIcon />
447
- </CheckboxIndicator>
459
+ <CheckboxIndicator><StarIcon /></CheckboxIndicator>
448
460
  </CheckboxRoot>
449
461
  Favourite
450
462
  </label>
@@ -483,6 +495,8 @@ import { Select } from "@brijbyte/agentic-ui/select";
483
495
  />
484
496
  ```
485
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
+
486
500
  ### Dialog
487
501
 
488
502
  ```tsx
@@ -513,12 +527,10 @@ import { Dialog } from "@brijbyte/agentic-ui/dialog";
513
527
  import { Drawer, DrawerClose } from "@brijbyte/agentic-ui/drawer";
514
528
 
515
529
  // sides: left | right (default) | top | bottom
516
- // Supports swipe-to-dismiss gestures on all sides.
517
530
  <Drawer
518
531
  side="right"
519
532
  trigger={<Button>Open</Button>}
520
533
  title="Settings"
521
- description="Configure your workspace."
522
534
  footer={
523
535
  <Button size="sm" render={<DrawerClose />}>
524
536
  Done
@@ -540,7 +552,7 @@ import { Tooltip } from "@brijbyte/agentic-ui/tooltip";
540
552
  </Tooltip>;
541
553
  ```
542
554
 
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.
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`.
544
556
 
545
557
  ### Tabs
546
558
 
@@ -563,7 +575,6 @@ The active tab is indicated by a 3px accent-coloured underline and full-brightne
563
575
  ```tsx
564
576
  import { Accordion } from "@brijbyte/agentic-ui/accordion";
565
577
 
566
- // multiple: true (default) allows multiple panels open at once
567
578
  <Accordion
568
579
  multiple={false}
569
580
  items={[
@@ -609,7 +620,7 @@ const items: MenuEntry[] = [
609
620
  />;
610
621
  ```
611
622
 
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.
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.
613
624
 
614
625
  ### NumberField
615
626
 
@@ -620,17 +631,14 @@ import { NumberField } from "@brijbyte/agentic-ui/number-field";
620
631
  <NumberField label="Price" defaultValue={9.99} step={0.01} format={{ style: "currency", currency: "USD" }} />
621
632
  ```
622
633
 
623
- Click-and-drag on the label (scrub area) to change the value. Supports `min`, `max`, `step`, locale-aware `format`, and `allowWheelScrub`.
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.
624
635
 
625
636
  ### Separator
626
637
 
627
638
  ```tsx
628
639
  import { Separator } from "@brijbyte/agentic-ui/separator";
629
640
 
630
- // Horizontal (default)
631
641
  <Separator />
632
-
633
- // Vertical — stretch to parent height
634
642
  <Separator orientation="vertical" style={{ height: "1rem" }} />
635
643
  ```
636
644
 
@@ -650,7 +658,7 @@ import { Progress } from "@brijbyte/agentic-ui/progress";
650
658
  ```tsx
651
659
  import { ToastProvider, ToastViewport, useToastManager } from "@brijbyte/agentic-ui/toast";
652
660
 
653
- // 1. Wrap your app — limit defaults to 3 (list) or 5 (stacked)
661
+ // 1. Wrap your app
654
662
  <ToastProvider variant="list">
655
663
  <App />
656
664
  <ToastViewport variant="list" />
@@ -667,7 +675,7 @@ function MyComponent() {
667
675
  }
668
676
  ```
669
677
 
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.
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.
671
679
 
672
680
  ```tsx
673
681
  <ToastProvider variant="stacked">
@@ -676,9 +684,79 @@ function MyComponent() {
676
684
  </ToastProvider>
677
685
  ```
678
686
 
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.
687
+ **`limit`** — maximum toasts shown simultaneously. Defaults to `3` (list) / `5` (stacked). Hard-capped at `5` (list) and `10` (stacked) to prevent viewport overflow.
680
688
 
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.
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
+ ```
682
760
 
683
761
  ---
684
762
 
@@ -695,25 +773,19 @@ pnpm dev # tsdown --watch
695
773
 
696
774
  ```
697
775
  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)
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)
705
784
  button/index.d.ts
706
- button/button.css ← Per-component plain CSS (no .module suffix)
707
- ← All 18 components follow the same pattern
785
+ button/button.css ← Per-component plain CSS
786
+ ← All 19 components follow the same pattern
708
787
  ```
709
788
 
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
789
  ### Why no CSS in JS?
718
790
 
719
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.
@@ -1,8 +1,6 @@
1
- @layer theme, base;
2
-
3
1
  @layer components {
4
2
  .root_XcG3ua {
5
- border: var(--border-width-base) solid var(--color-border-base);
3
+ border: var(--border-width-base) solid var(--color-line);
6
4
  border-radius: var(--radius-lg);
7
5
  flex-direction: column;
8
6
  gap: 0;
@@ -11,7 +9,7 @@
11
9
  }
12
10
 
13
11
  .item_XcG3ua {
14
- border-bottom: var(--border-width-base) solid var(--color-border-subtle);
12
+ border-bottom: var(--border-width-base) solid var(--color-line-subtle);
15
13
  }
16
14
 
17
15
  .item_XcG3ua:last-child {
@@ -31,7 +29,7 @@
31
29
  font-family: var(--font-mono);
32
30
  font-size: var(--font-size-sm);
33
31
  font-weight: var(--font-weight-medium);
34
- color: var(--color-text-primary);
32
+ color: var(--color-primary);
35
33
  cursor: pointer;
36
34
  text-align: left;
37
35
  transition: background-color var(--duration-fast) var(--easing-standard),
@@ -45,7 +43,7 @@
45
43
  }
46
44
 
47
45
  .trigger_XcG3ua:hover {
48
- background-color: var(--color-surface-hover);
46
+ background-color: var(--color-hover);
49
47
  }
50
48
 
51
49
  .trigger_XcG3ua:focus-visible {
@@ -58,7 +56,7 @@
58
56
  }
59
57
 
60
58
  .trigger-icon_XcG3ua {
61
- color: var(--color-text-tertiary);
59
+ color: var(--color-tertiary);
62
60
  transition: transform var(--duration-normal) var(--easing-standard);
63
61
  flex-shrink: 0;
64
62
  }
@@ -81,9 +79,7 @@
81
79
  padding: var(--space-2) var(--space-4) var(--space-4);
82
80
  font-family: var(--font-mono);
83
81
  font-size: var(--font-size-sm);
84
- color: var(--color-text-secondary);
82
+ color: var(--color-secondary);
85
83
  line-height: var(--line-height-relaxed);
86
84
  }
87
85
  }
88
-
89
- @layer utilities;
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.module.js","names":[],"sources":["../../src/accordion/accordion.module.css"],"sourcesContent":["@layer theme, base, components, utilities;\n\n@layer components {\n .root {\n display: flex;\n flex-direction: column;\n gap: 0;\n border: var(--border-width-base) solid var(--color-border-base);\n border-radius: var(--radius-lg);\n overflow: hidden;\n }\n\n .item {\n border-bottom: var(--border-width-base) solid var(--color-border-subtle);\n }\n\n .item:last-child {\n border-bottom: none;\n }\n\n .header {\n display: flex;\n align-items: center;\n }\n\n .trigger {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--space-2);\n padding: var(--space-3) var(--space-4);\n font-family: var(--font-mono);\n font-size: var(--font-size-sm);\n font-weight: var(--font-weight-medium);\n color: var(--color-text-primary);\n background: none;\n border: none;\n cursor: pointer;\n outline: none;\n text-align: left;\n transition:\n background-color var(--duration-fast) var(--easing-standard),\n color var(--duration-fast) var(--easing-standard);\n user-select: none;\n }\n\n .trigger:hover {\n background-color: var(--color-surface-hover);\n }\n\n .trigger:focus-visible {\n box-shadow: inset var(--shadow-focus);\n }\n\n .trigger[data-disabled] {\n opacity: 0.44;\n cursor: not-allowed;\n }\n\n .trigger-icon {\n color: var(--color-text-tertiary);\n flex-shrink: 0;\n transition: transform var(--duration-normal) var(--easing-standard);\n }\n\n .trigger[data-panel-open] .trigger-icon {\n transform: rotate(180deg);\n }\n\n .panel {\n height: var(--accordion-panel-height);\n overflow: hidden;\n transition: height var(--duration-normal) var(--easing-standard);\n }\n\n .panel[data-starting-style],\n .panel[data-ending-style] {\n height: 0;\n }\n\n .panel-content {\n padding: var(--space-2) var(--space-4) var(--space-4);\n font-family: var(--font-mono);\n font-size: var(--font-size-sm);\n color: var(--color-text-secondary);\n line-height: var(--line-height-relaxed);\n }\n}\n"],"mappings":";AAcA,IAAA,2BAAE;CAAA,UAAA;CAAA,QAAA;CAAA,SAAA;CAAA,iBAAA;CAAA,QAAA;CAAA,WAAA;CAAA,gBAAA;CAAA"}
1
+ {"version":3,"file":"accordion.module.js","names":[],"sources":["../../src/accordion/accordion.module.css"],"sourcesContent":["@layer components {\n .root {\n display: flex;\n flex-direction: column;\n gap: 0;\n border: var(--border-width-base) solid var(--color-line);\n border-radius: var(--radius-lg);\n overflow: hidden;\n }\n .item {\n border-bottom: var(--border-width-base) solid var(--color-line-subtle);\n }\n .item:last-child {\n border-bottom: none;\n }\n .header {\n display: flex;\n align-items: center;\n }\n .trigger {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--space-2);\n padding: var(--space-3) var(--space-4);\n font-family: var(--font-mono);\n font-size: var(--font-size-sm);\n font-weight: var(--font-weight-medium);\n color: var(--color-primary);\n background: none;\n border: none;\n cursor: pointer;\n outline: none;\n text-align: left;\n transition:\n background-color var(--duration-fast) var(--easing-standard),\n color var(--duration-fast) var(--easing-standard);\n user-select: none;\n }\n .trigger:hover {\n background-color: var(--color-hover);\n }\n .trigger:focus-visible {\n box-shadow: inset var(--shadow-focus);\n }\n .trigger[data-disabled] {\n opacity: 0.44;\n cursor: not-allowed;\n }\n .trigger-icon {\n color: var(--color-tertiary);\n flex-shrink: 0;\n transition: transform var(--duration-normal) var(--easing-standard);\n }\n .trigger[data-panel-open] .trigger-icon {\n transform: rotate(180deg);\n }\n .panel {\n height: var(--accordion-panel-height);\n overflow: hidden;\n transition: height var(--duration-normal) var(--easing-standard);\n }\n .panel[data-starting-style],\n .panel[data-ending-style] {\n height: 0;\n }\n .panel-content {\n padding: var(--space-2) var(--space-4) var(--space-4);\n font-family: var(--font-mono);\n font-size: var(--font-size-sm);\n color: var(--color-secondary);\n line-height: var(--line-height-relaxed);\n }\n}\n"],"mappings":";AAcA,IAAA,2BAAE;CAAA,UAAA;CAAA,QAAA;CAAA,SAAA;CAAA,iBAAA;CAAA,QAAA;CAAA,WAAA;CAAA,gBAAA;CAAA"}