@ctrl-ui/react 0.8.7 → 0.8.9

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 (341) hide show
  1. package/dist/action-bar.d.ts +15 -7
  2. package/dist/action-bar.js +39 -19
  3. package/dist/activity.js +7 -15
  4. package/dist/audio-recorder.d.ts +14 -4
  5. package/dist/audio-recorder.js +82 -29
  6. package/dist/audio-visualizer.js +1 -1
  7. package/dist/blocks/coding-agent.js +39 -39
  8. package/dist/blocks/design-canvas.d.ts +5 -1
  9. package/dist/blocks/design-canvas.js +198 -92
  10. package/dist/blocks/discussion.d.ts +28 -0
  11. package/dist/blocks/discussion.js +67 -0
  12. package/dist/blocks/file-explorer-data.d.ts +1 -0
  13. package/dist/blocks/file-explorer-data.js +4 -1
  14. package/dist/blocks/file-explorer.d.ts +9 -1
  15. package/dist/blocks/file-explorer.js +461 -192
  16. package/dist/blocks/settings.d.ts +2 -1
  17. package/dist/blocks/settings.js +101 -79
  18. package/dist/blocks/team-chat.d.ts +12 -0
  19. package/dist/blocks/team-chat.js +26 -0
  20. package/dist/blocks/theme-toggle.js +23 -31
  21. package/dist/chat-composer-attachment.d.ts +4 -1
  22. package/dist/chat-composer-attachment.js +35 -10
  23. package/dist/chat-composer-editor/extensions/mention.d.ts +5 -1
  24. package/dist/chat-composer-editor/extensions/mention.js +59 -28
  25. package/dist/chat-composer-editor/ghost.js +2 -4
  26. package/dist/chat-composer-editor/types.d.ts +5 -0
  27. package/dist/chat-composer-editor.d.ts +1 -1
  28. package/dist/chat-composer-editor.js +57 -30
  29. package/dist/chat-composer.d.ts +13 -32
  30. package/dist/chat-composer.js +52 -12
  31. package/dist/chat-layout.d.ts +19 -0
  32. package/dist/chat-layout.js +91 -40
  33. package/dist/chat-message/social.d.ts +26 -0
  34. package/dist/chat-message/social.js +122 -0
  35. package/dist/chat-message.d.ts +28 -29
  36. package/dist/chat-message.js +106 -25
  37. package/dist/context.d.ts +2 -2
  38. package/dist/context.js +38 -23
  39. package/dist/dynamic-notification-canvas-loop.d.ts +24 -0
  40. package/dist/dynamic-notification-canvas-loop.js +113 -0
  41. package/dist/dynamic-notification-glass.js +23 -114
  42. package/dist/dynamic-notification-liquid.js +14 -118
  43. package/dist/dynamic-notification.d.ts +16 -8
  44. package/dist/dynamic-notification.js +85 -22
  45. package/dist/email/email-brand.d.ts +7 -4
  46. package/dist/email/email-brand.js +9 -6
  47. package/dist/email/email-code.d.ts +3 -2
  48. package/dist/email/email-code.js +11 -9
  49. package/dist/email/email-footer.d.ts +5 -3
  50. package/dist/email/email-footer.js +11 -5
  51. package/dist/email/email.d.ts +31 -9
  52. package/dist/email/email.js +50 -26
  53. package/dist/email/templates.d.ts +10 -9
  54. package/dist/email/templates.js +102 -38
  55. package/dist/email/theme.js +1 -1
  56. package/dist/environment-variables.d.ts +4 -2
  57. package/dist/environment-variables.js +52 -32
  58. package/dist/filter-bar/editor.js +20 -8
  59. package/dist/filter-bar/model.d.ts +1 -0
  60. package/dist/filter-bar/model.js +10 -1
  61. package/dist/filter-bar/motion.js +4 -4
  62. package/dist/filter-bar/parts.js +19 -8
  63. package/dist/filter-bar/types.d.ts +1 -0
  64. package/dist/filter-bar.js +19 -13
  65. package/dist/hooks/use-audio-recorder.js +12 -6
  66. package/dist/hooks/use-chat-composer.d.ts +19 -7
  67. package/dist/hooks/use-chat-composer.js +32 -5
  68. package/dist/hooks/use-chat-message.d.ts +28 -2
  69. package/dist/hooks/use-chat-message.js +41 -10
  70. package/dist/hooks/use-chat-thread-scroll.js +43 -7
  71. package/dist/hooks/use-color-area.d.ts +3 -3
  72. package/dist/hooks/use-color-area.js +13 -12
  73. package/dist/hooks/use-copy-to-clipboard.d.ts +2 -1
  74. package/dist/hooks/use-copy-to-clipboard.js +20 -20
  75. package/dist/hooks/use-dynamic-notification.d.ts +6 -2
  76. package/dist/hooks/use-dynamic-notification.js +26 -10
  77. package/dist/hooks/use-mobile.d.ts +3 -2
  78. package/dist/hooks/use-mobile.js +8 -4
  79. package/dist/hooks/use-textarea-trigger-menu.js +2 -1
  80. package/dist/hooks/use-trigger-menu.d.ts +54 -0
  81. package/dist/hooks/use-trigger-menu.js +102 -47
  82. package/dist/hooks/use-user-ask.d.ts +2 -0
  83. package/dist/hooks/use-user-ask.js +35 -41
  84. package/dist/inline-attachment.d.ts +6 -2
  85. package/dist/inline-attachment.js +36 -15
  86. package/dist/inline-citation.d.ts +12 -5
  87. package/dist/inline-citation.js +25 -16
  88. package/dist/knob-contracts/audio-recorder-knobs.d.ts +1 -1
  89. package/dist/knob-contracts/audio-recorder-knobs.js +2 -1
  90. package/dist/knob-contracts/audio-visualizer-knobs.d.ts +1 -1
  91. package/dist/knob-contracts/audio-visualizer-knobs.js +2 -1
  92. package/dist/knob-contracts/avatar-knobs.d.ts +1 -1
  93. package/dist/knob-contracts/avatar-knobs.js +6 -1
  94. package/dist/knob-contracts/badge-knobs.d.ts +1 -1
  95. package/dist/knob-contracts/badge-knobs.js +2 -1
  96. package/dist/knob-contracts/breadcrumb-knobs.d.ts +4 -0
  97. package/dist/knob-contracts/breadcrumb-knobs.js +8 -0
  98. package/dist/knob-contracts/button-knobs.d.ts +1 -1
  99. package/dist/knob-contracts/button-knobs.js +1 -0
  100. package/dist/knob-contracts/chat-message-knobs.d.ts +1 -1
  101. package/dist/knob-contracts/chat-message-knobs.js +8 -1
  102. package/dist/knob-contracts/code-diff-knobs.d.ts +1 -1
  103. package/dist/knob-contracts/code-diff-knobs.js +2 -0
  104. package/dist/knob-contracts/code-knobs.d.ts +1 -1
  105. package/dist/knob-contracts/code-knobs.js +2 -1
  106. package/dist/knob-contracts/dynamic-notification-knobs.d.ts +1 -1
  107. package/dist/knob-contracts/dynamic-notification-knobs.js +2 -0
  108. package/dist/knob-contracts/emoji-picker-knobs.d.ts +4 -0
  109. package/dist/knob-contracts/emoji-picker-knobs.js +10 -0
  110. package/dist/knob-contracts/field-knobs.d.ts +1 -1
  111. package/dist/knob-contracts/field-knobs.js +5 -1
  112. package/dist/knob-contracts/filter-bar-knobs.d.ts +1 -1
  113. package/dist/knob-contracts/filter-bar-knobs.js +1 -2
  114. package/dist/knob-contracts/markdown-knobs.d.ts +1 -1
  115. package/dist/knob-contracts/markdown-knobs.js +3 -1
  116. package/dist/knob-contracts/page-layout-knobs.d.ts +1 -1
  117. package/dist/knob-contracts/page-layout-knobs.js +2 -1
  118. package/dist/knob-contracts/popup-knobs.d.ts +1 -1
  119. package/dist/knob-contracts/popup-knobs.js +27 -0
  120. package/dist/knob-contracts/range-knobs.d.ts +1 -1
  121. package/dist/knob-contracts/range-knobs.js +1 -0
  122. package/dist/knob-contracts/rich-tooltip-knobs.d.ts +1 -1
  123. package/dist/knob-contracts/rich-tooltip-knobs.js +2 -1
  124. package/dist/knob-contracts/sidebar-knobs.d.ts +1 -1
  125. package/dist/knob-contracts/sidebar-knobs.js +27 -2
  126. package/dist/knob-contracts/spinner-knobs.d.ts +1 -1
  127. package/dist/knob-contracts/spinner-knobs.js +1 -1
  128. package/dist/knob-contracts/stepper-knobs.d.ts +1 -1
  129. package/dist/knob-contracts/stepper-knobs.js +4 -1
  130. package/dist/knob-contracts/switch-knobs.d.ts +1 -1
  131. package/dist/knob-contracts/switch-knobs.js +5 -0
  132. package/dist/knob-contracts/table-of-contents-knobs.d.ts +1 -1
  133. package/dist/knob-contracts/table-of-contents-knobs.js +2 -1
  134. package/dist/knob-contracts/tabs-knobs.d.ts +1 -1
  135. package/dist/knob-contracts/tabs-knobs.js +1 -0
  136. package/dist/knob-contracts/tree-knobs.d.ts +1 -1
  137. package/dist/knob-contracts/tree-knobs.js +2 -1
  138. package/dist/lib/cn.js +0 -4
  139. package/dist/lib/contrast.d.ts +1 -0
  140. package/dist/lib/contrast.js +17 -5
  141. package/dist/lib/dropzone-validation.js +41 -28
  142. package/dist/lib/env-file.d.ts +1 -1
  143. package/dist/lib/env-file.js +5 -5
  144. package/dist/lib/motion.d.ts +4 -0
  145. package/dist/lib/motion.js +15 -0
  146. package/dist/lib/trigger-detect.js +6 -8
  147. package/dist/markdown-block.js +2 -1
  148. package/dist/popup-parts.d.ts +8 -0
  149. package/dist/popup-parts.js +43 -0
  150. package/dist/source-badge.js +3 -1
  151. package/dist/styles/code.css +0 -2
  152. package/dist/styles/effects.css +6 -32
  153. package/dist/styles/index.css +10 -5
  154. package/dist/styles/recipes/accordion.css +9 -6
  155. package/dist/styles/recipes/action-bar.css +0 -15
  156. package/dist/styles/recipes/activity.css +5 -11
  157. package/dist/styles/recipes/alert.css +4 -4
  158. package/dist/styles/recipes/audio-recorder.css +15 -3
  159. package/dist/styles/recipes/audio-visualizer.css +13 -2
  160. package/dist/styles/recipes/avatar.css +78 -1
  161. package/dist/styles/recipes/badge.css +14 -4
  162. package/dist/styles/recipes/breadcrumb.css +77 -0
  163. package/dist/styles/recipes/button-group.css +5 -7
  164. package/dist/styles/recipes/button-states.css +66 -0
  165. package/dist/styles/recipes/button.css +24 -83
  166. package/dist/styles/recipes/calendar.css +17 -23
  167. package/dist/styles/recipes/card.css +2 -2
  168. package/dist/styles/recipes/chat-composer-attachment.css +9 -3
  169. package/dist/styles/recipes/chat-composer.css +7 -10
  170. package/dist/styles/recipes/chat-layout.css +35 -0
  171. package/dist/styles/recipes/chat-message-social.css +123 -0
  172. package/dist/styles/recipes/chat-message.css +157 -37
  173. package/dist/styles/recipes/choice.css +18 -21
  174. package/dist/styles/recipes/code-diff.css +46 -33
  175. package/dist/styles/recipes/code.css +36 -16
  176. package/dist/styles/recipes/collapsible.css +7 -2
  177. package/dist/styles/recipes/color-picker-details.css +3 -4
  178. package/dist/styles/recipes/color-picker-values.css +9 -8
  179. package/dist/styles/recipes/color-picker.css +11 -2
  180. package/dist/styles/recipes/context.css +3 -3
  181. package/dist/styles/recipes/dockable-panel.css +7 -4
  182. package/dist/styles/recipes/dropzone.css +7 -8
  183. package/dist/styles/recipes/dynamic-notification-input.css +8 -5
  184. package/dist/styles/recipes/dynamic-notification-motion.css +12 -21
  185. package/dist/styles/recipes/dynamic-notification.css +40 -26
  186. package/dist/styles/recipes/emoji-picker.css +132 -0
  187. package/dist/styles/recipes/empty.css +5 -4
  188. package/dist/styles/recipes/environment-variables.css +4 -15
  189. package/dist/styles/recipes/field-parts.css +30 -24
  190. package/dist/styles/recipes/field.css +61 -26
  191. package/dist/styles/recipes/filter-bar.css +18 -31
  192. package/dist/styles/recipes/gradient-editor.css +18 -7
  193. package/dist/styles/recipes/infinite-canvas.css +0 -1
  194. package/dist/styles/recipes/inline-attachment.css +3 -3
  195. package/dist/styles/recipes/inline-citation.css +10 -4
  196. package/dist/styles/recipes/item.css +23 -9
  197. package/dist/styles/recipes/markdown-block.css +5 -4
  198. package/dist/styles/recipes/markdown.css +68 -26
  199. package/dist/styles/recipes/morphing-panel.css +8 -8
  200. package/dist/styles/recipes/page-layout.css +20 -12
  201. package/dist/styles/recipes/pagination.css +4 -5
  202. package/dist/styles/recipes/phone-input.css +12 -8
  203. package/dist/styles/recipes/popup-controls.css +166 -33
  204. package/dist/styles/recipes/popup-drawer.css +3 -14
  205. package/dist/styles/recipes/popup-lists.css +128 -27
  206. package/dist/styles/recipes/popup-motion.css +4 -45
  207. package/dist/styles/recipes/popup-toast.css +55 -26
  208. package/dist/styles/recipes/popup.css +139 -141
  209. package/dist/styles/recipes/range.css +54 -18
  210. package/dist/styles/recipes/resizable.css +2 -7
  211. package/dist/styles/recipes/rich-tooltip.css +24 -34
  212. package/dist/styles/recipes/scroll-area.css +8 -1
  213. package/dist/styles/recipes/sidebar-menu.css +166 -34
  214. package/dist/styles/recipes/sidebar-parts.css +192 -0
  215. package/dist/styles/recipes/sidebar.css +188 -128
  216. package/dist/styles/recipes/source-badge.css +1 -1
  217. package/dist/styles/recipes/spinner.css +8 -1
  218. package/dist/styles/recipes/stepper.css +31 -13
  219. package/dist/styles/recipes/switch.css +68 -23
  220. package/dist/styles/recipes/table-of-contents.css +9 -1
  221. package/dist/styles/recipes/table.css +14 -10
  222. package/dist/styles/recipes/tabs.css +17 -12
  223. package/dist/styles/recipes/task-list.css +7 -14
  224. package/dist/styles/recipes/thread-rail.css +42 -19
  225. package/dist/styles/recipes/timeline.css +2 -0
  226. package/dist/styles/recipes/toolbar.css +27 -25
  227. package/dist/styles/recipes/track-highlight.css +10 -7
  228. package/dist/styles/recipes/tree.css +31 -4
  229. package/dist/styles/recipes/user-ask-details.css +0 -1
  230. package/dist/styles/recipes/user-ask.css +4 -4
  231. package/dist/styles/theme.css +37 -16
  232. package/dist/task-list.d.ts +4 -1
  233. package/dist/task-list.js +24 -8
  234. package/dist/thread-rail.d.ts +1 -1
  235. package/dist/thread-rail.js +61 -19
  236. package/dist/transcript-divider.js +2 -1
  237. package/dist/ui/alert.d.ts +3 -1
  238. package/dist/ui/alert.js +14 -8
  239. package/dist/ui/autocomplete.js +3 -1
  240. package/dist/ui/avatar.d.ts +8 -0
  241. package/dist/ui/avatar.js +23 -3
  242. package/dist/ui/badge.js +1 -1
  243. package/dist/ui/breadcrumb.d.ts +27 -0
  244. package/dist/ui/breadcrumb.js +88 -0
  245. package/dist/ui/button.d.ts +2 -1
  246. package/dist/ui/button.js +1 -1
  247. package/dist/ui/calendar.js +2 -2
  248. package/dist/ui/card.d.ts +3 -1
  249. package/dist/ui/card.js +12 -7
  250. package/dist/ui/checkbox.d.ts +2 -0
  251. package/dist/ui/code-diff.d.ts +1 -1
  252. package/dist/ui/code-diff.js +71 -27
  253. package/dist/ui/code.d.ts +5 -3
  254. package/dist/ui/code.js +26 -27
  255. package/dist/ui/color-picker.d.ts +5 -2
  256. package/dist/ui/color-picker.js +84 -36
  257. package/dist/ui/combobox-disabled-selection.d.ts +1 -2
  258. package/dist/ui/combobox-disabled-selection.js +7 -9
  259. package/dist/ui/combobox.js +13 -5
  260. package/dist/ui/command.d.ts +8 -2
  261. package/dist/ui/command.js +30 -14
  262. package/dist/ui/context-menu.js +3 -0
  263. package/dist/ui/dialog.d.ts +2 -1
  264. package/dist/ui/dialog.js +3 -22
  265. package/dist/ui/dockable-panel-geometry.d.ts +1 -0
  266. package/dist/ui/dockable-panel-geometry.js +7 -1
  267. package/dist/ui/dockable-panel.d.ts +9 -6
  268. package/dist/ui/dockable-panel.js +63 -23
  269. package/dist/ui/dropdown-menu.js +4 -3
  270. package/dist/ui/dropzone.d.ts +2 -2
  271. package/dist/ui/dropzone.js +75 -16
  272. package/dist/ui/emoji-picker.d.ts +18 -0
  273. package/dist/ui/emoji-picker.js +136 -0
  274. package/dist/ui/empty.d.ts +3 -1
  275. package/dist/ui/empty.js +12 -7
  276. package/dist/ui/gradient-editor.d.ts +1 -1
  277. package/dist/ui/gradient-editor.js +37 -21
  278. package/dist/ui/infinite-canvas.d.ts +3 -2
  279. package/dist/ui/infinite-canvas.js +63 -19
  280. package/dist/ui/input-group.d.ts +0 -3
  281. package/dist/ui/input-group.js +3 -13
  282. package/dist/ui/input-otp.d.ts +1 -1
  283. package/dist/ui/input-otp.js +32 -15
  284. package/dist/ui/input.js +4 -4
  285. package/dist/ui/item.d.ts +2 -1
  286. package/dist/ui/item.js +11 -7
  287. package/dist/ui/live-status.d.ts +7 -0
  288. package/dist/ui/live-status.js +17 -0
  289. package/dist/ui/markdown-elements.d.ts +6 -0
  290. package/dist/ui/markdown-elements.js +31 -1
  291. package/dist/ui/menubar.js +2 -2
  292. package/dist/ui/morphing-panel.js +2 -1
  293. package/dist/ui/native-select.d.ts +1 -1
  294. package/dist/ui/native-select.js +24 -11
  295. package/dist/ui/page-layout.d.ts +2 -2
  296. package/dist/ui/page-layout.js +2 -4
  297. package/dist/ui/pagination.d.ts +7 -5
  298. package/dist/ui/pagination.js +19 -13
  299. package/dist/ui/phone-input.d.ts +1 -0
  300. package/dist/ui/phone-input.js +56 -58
  301. package/dist/ui/radio-group.d.ts +2 -0
  302. package/dist/ui/resizable.d.ts +3 -2
  303. package/dist/ui/resizable.js +5 -3
  304. package/dist/ui/responsive-dialog.d.ts +1 -1
  305. package/dist/ui/responsive-dialog.js +4 -21
  306. package/dist/ui/rich-tooltip.d.ts +10 -4
  307. package/dist/ui/rich-tooltip.js +81 -33
  308. package/dist/ui/scroll-area.d.ts +1 -1
  309. package/dist/ui/scroll-area.js +43 -28
  310. package/dist/ui/sidebar-menu.d.ts +5 -1
  311. package/dist/ui/sidebar-menu.js +34 -34
  312. package/dist/ui/sidebar-provider.d.ts +10 -1
  313. package/dist/ui/sidebar-provider.js +38 -13
  314. package/dist/ui/sidebar-resize-rail.js +7 -3
  315. package/dist/ui/sidebar.d.ts +11 -6
  316. package/dist/ui/sidebar.js +48 -24
  317. package/dist/ui/slider.js +31 -22
  318. package/dist/ui/spinner.d.ts +3 -2
  319. package/dist/ui/spinner.js +3 -2
  320. package/dist/ui/stepper.d.ts +8 -1
  321. package/dist/ui/stepper.js +74 -25
  322. package/dist/ui/switch.d.ts +1 -0
  323. package/dist/ui/table-of-contents.d.ts +2 -2
  324. package/dist/ui/table-of-contents.js +20 -8
  325. package/dist/ui/table.js +4 -2
  326. package/dist/ui/textarea.d.ts +1 -1
  327. package/dist/ui/textarea.js +20 -9
  328. package/dist/ui/timeline.d.ts +3 -1
  329. package/dist/ui/timeline.js +17 -9
  330. package/dist/ui/toast.d.ts +11 -5
  331. package/dist/ui/toast.js +100 -54
  332. package/dist/ui/toolbar.d.ts +2 -1
  333. package/dist/ui/toolbar.js +3 -1
  334. package/dist/ui/tooltip.js +3 -20
  335. package/dist/ui/tree.js +120 -80
  336. package/dist/ui/trigger-menu.js +1 -0
  337. package/dist/user-ask.d.ts +10 -5
  338. package/dist/user-ask.js +31 -11
  339. package/package.json +5 -1
  340. package/dist/hooks/use-keyboard-navigation.d.ts +0 -3
  341. package/dist/hooks/use-keyboard-navigation.js +0 -22
@@ -201,6 +201,7 @@
201
201
  --duration-fast: 150ms;
202
202
  --duration-base: 200ms;
203
203
  --duration-slow: 300ms;
204
+ --duration-loop: 1000ms;
204
205
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
205
206
  --ease-emphasized: cubic-bezier(0.16, 1, 0.3, 1);
206
207
  --z-overlay: 70;
@@ -218,16 +219,21 @@
218
219
  --warning-text: var(--scale-yellow-11);
219
220
  --info-text: var(--scale-blue-11);
220
221
  --ring-opacity: 1;
221
- --focus-ring: var(--ring);
222
+ --focus-ring: oklch(from var(--ring) l c h / calc(alpha * 0.7));
222
223
  --focus-ring-width: 2px;
223
224
  --focus-ring-style: solid;
224
225
  --focus-ring-offset: 2px;
225
226
 
226
227
  --control-rim: var(--border);
227
228
  --control-rim-width: 1px;
229
+ --control-boundary: oklch(from var(--foreground) l c h / 0.6);
228
230
  --control-fill: oklch(from var(--card) l c h / 0.72);
229
231
  --hover-fill: oklch(from var(--foreground) l c h / 0.06);
230
232
  --active-fill: oklch(from var(--foreground) l c h / 0.08);
233
+ --image-outline: oklch(0 0 0 / 0.1);
234
+ --disabled-opacity: 0.45;
235
+ --touch-target: 44px;
236
+ --target-min: 24px;
231
237
 
232
238
  --text-micro: 0.625rem;
233
239
  --text-caption: 0.6875rem;
@@ -250,6 +256,7 @@
250
256
  --text-display--line-height: 1.1;
251
257
  --text-display--font-weight: 600;
252
258
  --text-display--letter-spacing: -0.026em;
259
+ --text-input-min: 16px;
253
260
 
254
261
  --corner-shape: round;
255
262
  --corner-radius-fit: 0.5;
@@ -320,7 +327,7 @@
320
327
  --sidebar-accent: var(--hover-fill);
321
328
  --sidebar-accent-foreground: var(--foreground);
322
329
  --sidebar-border: var(--border);
323
- --sidebar-ring: var(--ring);
330
+ --sidebar-ring: var(--focus-ring);
324
331
  }
325
332
 
326
333
  :where(.dark:root, .dark[data-skin], .dark [data-skin]) {
@@ -355,7 +362,6 @@
355
362
  --destructive: oklch(0.551 0.1799 32);
356
363
  --destructive-foreground: oklch(0.9645 0.008 84);
357
364
  --ring: oklch(0.66 0 0);
358
- --focus-ring: oklch(0.66 0 0);
359
365
  --shadow-color: oklch(0 0 0);
360
366
  --destructive-text: oklch(from var(--destructive) 0.78 c h);
361
367
  --shadow-highlight: oklch(1 0 0 / 0.055);
@@ -365,6 +371,7 @@
365
371
  --badge-fill-alpha: 0.2;
366
372
  --badge-border-alpha: 0.24;
367
373
  --badge-hover-alpha: 0.28;
374
+ --image-outline: oklch(1 0 0 / 0.1);
368
375
  }
369
376
 
370
377
  @custom-variant dark (&:is(.dark *));
@@ -379,7 +386,9 @@
379
386
  --duration-slow: 0ms !important;
380
387
  }
381
388
 
382
- :where(:root, :root *, [data-skin], [data-skin] *, [data-skin]::before, [data-skin]::after, [data-skin] *::before, [data-skin] *::after) {
389
+ :where(:root, :root *, [data-skin], [data-skin] *):where(:not([data-motion-essential], [data-motion-essential] *)),
390
+ :where(:root, :root *, [data-skin], [data-skin] *):where(:not([data-motion-essential], [data-motion-essential] *))::before,
391
+ :where(:root, :root *, [data-skin], [data-skin] *):where(:not([data-motion-essential], [data-motion-essential] *))::after {
383
392
  scroll-behavior: auto !important;
384
393
  transition-delay: 0ms !important;
385
394
  transition-duration: 0ms !important;
@@ -397,14 +406,9 @@
397
406
  --duration-slow: 0ms !important;
398
407
  }
399
408
 
400
- :where(
401
- [data-motion="reduced"],
402
- [data-motion="reduced"] *,
403
- [data-motion="reduced"]::before,
404
- [data-motion="reduced"]::after,
405
- [data-motion="reduced"] *::before,
406
- [data-motion="reduced"] *::after
407
- ) {
409
+ :where([data-motion="reduced"], [data-motion="reduced"] *):where(:not([data-motion-essential], [data-motion-essential] *)),
410
+ :where([data-motion="reduced"], [data-motion="reduced"] *):where(:not([data-motion-essential], [data-motion-essential] *))::before,
411
+ :where([data-motion="reduced"], [data-motion="reduced"] *):where(:not([data-motion-essential], [data-motion-essential] *))::after {
408
412
  scroll-behavior: auto !important;
409
413
  transition-delay: 0ms !important;
410
414
  transition-duration: 0ms !important;
@@ -414,6 +418,10 @@
414
418
  }
415
419
  /* biome-ignore-end lint/complexity/noImportantStyles: Reduced motion must override skin and inline motion. */
416
420
 
421
+ @theme static {
422
+ --breakpoint-lg: 64rem;
423
+ }
424
+
417
425
  @theme inline {
418
426
  --color-background: var(--background);
419
427
  --color-canvas: var(--canvas);
@@ -656,22 +664,35 @@
656
664
 
657
665
  @layer components {
658
666
  :where([data-control-family]):focus-visible,
659
- :where([data-control-family][data-control="true"]):has(:focus-visible) {
667
+ :where([data-control-family][data-control="true"]):has(:focus-visible),
668
+ :where([data-control-family][data-focus-ring="within"]):has(:focus-visible) {
660
669
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring);
661
670
  outline-offset: var(--focus-ring-offset);
662
671
  }
663
672
 
664
- :where([data-control-family][data-control="true"] [data-control-family]):focus-visible {
673
+ :where(
674
+ [data-control-family][data-control="true"] [data-control-family],
675
+ [data-control-family][data-focus-ring="within"] [data-control-family]
676
+ ):focus-visible {
665
677
  outline-width: 0;
666
678
  }
667
679
 
680
+ :where([data-control-family][data-highlighted]):focus-visible {
681
+ outline-offset: calc(var(--focus-ring-width) * -1);
682
+ }
683
+
668
684
  @media (forced-colors: active) {
669
685
  :where([data-control-family]):focus-visible,
670
- :where([data-control-family][data-control="true"]):has(:focus-visible) {
671
- outline-color: transparent;
686
+ :where([data-control-family][data-control="true"]):has(:focus-visible),
687
+ :where([data-control-family][data-focus-ring="within"]):has(:focus-visible) {
688
+ outline-color: Highlight;
672
689
  }
673
690
  }
674
691
 
692
+ :where([data-icon-dir="inline"]:dir(rtl)) {
693
+ scale: -1 1;
694
+ }
695
+
675
696
  :where([data-control-ui="chat-message"][data-slot="root"], [data-control-ui="chat-composer"][data-slot="root"]) {
676
697
  opacity: 1;
677
698
  filter: none;
@@ -3,13 +3,16 @@ import { TaskListKnobStyle } from "./knob-contracts/task-list-knobs.js";
3
3
  import { CSSProperties, ComponentProps, ReactNode } from "react";
4
4
  //#region src/task-list.d.ts
5
5
  export type TaskStatus = "pending" | "active" | "completed";
6
+ export type TaskStatusLabels = Record<TaskStatus, string>;
7
+ export declare const taskStatusLabels: TaskStatusLabels;
6
8
  export type TaskListProps = Omit<CollapsibleProps, "style"> & {
9
+ statusLabels?: Partial<TaskStatusLabels>;
7
10
  style?: CSSProperties & TaskListKnobStyle;
8
11
  };
9
12
  type TaskListStyleProps<Props, Style> = Omit<Props, "style"> & {
10
13
  style?: CSSProperties & Style;
11
14
  };
12
- export declare function TaskList({ className, children, ...props }: TaskListProps): import("react").JSX.Element;
15
+ export declare function TaskList({ statusLabels, className, children, ...props }: TaskListProps): import("react").JSX.Element;
13
16
  export type TaskListTriggerProps = TaskListStyleProps<ComponentProps<"button">, TaskListKnobStyle>;
14
17
  export declare function TaskListTrigger({ className, children, ...props }: TaskListTriggerProps): import("react").JSX.Element;
15
18
  export type TaskListProgressProps = TaskListStyleProps<ComponentProps<"span">, TaskListKnobStyle>;
package/dist/task-list.js CHANGED
@@ -1,10 +1,16 @@
1
1
  "use client";
2
2
  import { cn } from "./lib/cn.js";
3
+ import { LiveStatus } from "./ui/live-status.js";
3
4
  import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./ui/collapsible.js";
4
5
  import { createContext, useContext, useEffect, useId, useState } from "react";
5
6
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
7
  import { ChevronRight, CircleCheck, CircleDashed, Loader2 } from "lucide-react";
7
8
  //#region src/task-list.tsx
9
+ const taskStatusLabels = {
10
+ pending: "Pending",
11
+ active: "In progress",
12
+ completed: "Done"
13
+ };
8
14
  const TaskListContext = createContext(null);
9
15
  const TaskListRegistrationContext = createContext(null);
10
16
  function useTaskListContext() {
@@ -31,7 +37,7 @@ function currentTaskIndex(tasks) {
31
37
  if (pending !== -1) return pending;
32
38
  return tasks.length - 1;
33
39
  }
34
- function TaskList({ className, children, ...props }) {
40
+ function TaskList({ statusLabels, className, children, ...props }) {
35
41
  const [tasks, setTasks] = useState([]);
36
42
  const [registration] = useState(() => ({
37
43
  registerTask(entry) {
@@ -45,6 +51,11 @@ function TaskList({ className, children, ...props }) {
45
51
  const currentIndex = currentTaskIndex(tasks);
46
52
  const current = tasks[currentIndex];
47
53
  const allCompleted = total > 0 && tasks.every((task) => task.status === "completed");
54
+ const labels = {
55
+ ...taskStatusLabels,
56
+ ...statusLabels
57
+ };
58
+ const progressStatus = current?.status === "active" ? `${current.label}: ${labels.active}` : "";
48
59
  return /* @__PURE__ */ jsx(TaskListRegistrationContext.Provider, {
49
60
  value: registration,
50
61
  children: /* @__PURE__ */ jsx(TaskListContext.Provider, {
@@ -52,16 +63,17 @@ function TaskList({ className, children, ...props }) {
52
63
  total,
53
64
  current,
54
65
  currentNumber: total === 0 ? 0 : currentIndex + 1,
55
- allCompleted
66
+ allCompleted,
67
+ statusLabels: labels
56
68
  },
57
- children: /* @__PURE__ */ jsx(Collapsible, {
69
+ children: /* @__PURE__ */ jsxs(Collapsible, {
58
70
  "data-control-ui": "task-list",
59
71
  "data-control-family": "task-list",
60
72
  "data-slot": "root",
61
73
  "data-surface": "panel",
62
74
  className: cn("w-full overflow-hidden", className),
63
75
  ...props,
64
- children
76
+ children: [children, /* @__PURE__ */ jsx(LiveStatus, { message: progressStatus })]
65
77
  })
66
78
  })
67
79
  });
@@ -101,13 +113,15 @@ function TaskListProgress({ className, children, ...props }) {
101
113
  }
102
114
  function TaskListLabel({ className, children, ...props }) {
103
115
  const { current } = useTaskListContext();
116
+ const text = children ?? current?.label;
104
117
  return /* @__PURE__ */ jsx("span", {
105
118
  "data-control-ui": "task-list",
106
119
  "data-control-family": "task-list",
107
120
  "data-slot": "label",
121
+ title: typeof text === "string" ? text : void 0,
108
122
  className: cn("min-w-0 flex-1 truncate", className),
109
123
  ...props,
110
- children: children ?? current?.label
124
+ children: text
111
125
  });
112
126
  }
113
127
  function TaskListContent({ className, children, ...props }) {
@@ -145,7 +159,7 @@ function TaskListItem({ label, status = "pending", className, children, ...props
145
159
  className: cn("flex items-center", className),
146
160
  ...props,
147
161
  children: [/* @__PURE__ */ jsx(TaskListIndicator, { status }), /* @__PURE__ */ jsx("span", {
148
- className: "min-w-0 flex-1 truncate",
162
+ className: "min-w-0 flex-1 text-pretty",
149
163
  children: children ?? label
150
164
  })]
151
165
  });
@@ -157,6 +171,7 @@ const indicatorIcons = {
157
171
  };
158
172
  function TaskListIndicator({ status = "pending", className, ...props }) {
159
173
  const Icon = indicatorIcons[status];
174
+ const statusLabels = useContext(TaskListContext)?.statusLabels ?? taskStatusLabels;
160
175
  return /* @__PURE__ */ jsxs("span", {
161
176
  "data-control-ui": "task-list",
162
177
  "data-control-family": "task-list",
@@ -166,12 +181,13 @@ function TaskListIndicator({ status = "pending", className, ...props }) {
166
181
  ...props,
167
182
  children: [/* @__PURE__ */ jsx(Icon, {
168
183
  "aria-hidden": "true",
184
+ "data-motion-essential": status === "active" ? "" : void 0,
169
185
  className: "size-3.5"
170
186
  }), /* @__PURE__ */ jsx("span", {
171
187
  className: "sr-only",
172
- children: status
188
+ children: statusLabels[status]
173
189
  })]
174
190
  });
175
191
  }
176
192
  //#endregion
177
- export { TaskList, TaskListContent, TaskListIndicator, TaskListItem, TaskListLabel, TaskListProgress, TaskListTrigger };
193
+ export { TaskList, TaskListContent, TaskListIndicator, TaskListItem, TaskListLabel, TaskListProgress, TaskListTrigger, taskStatusLabels };
@@ -18,7 +18,7 @@ export declare function ThreadRailItem({ from, inView, active, index, className,
18
18
  export type ThreadRailLineProps = Omit<ComponentProps<"button">, "style"> & {
19
19
  style?: CSSProperties & ThreadRailKnobStyle;
20
20
  };
21
- export declare function ThreadRailLine({ className, ...props }: ThreadRailLineProps): import("react").JSX.Element;
21
+ export declare function ThreadRailLine({ className, onKeyDown, "aria-label": ariaLabel, ...props }: ThreadRailLineProps): import("react").JSX.Element;
22
22
  export type ThreadRailPopoverProps = Omit<ComponentProps<"div">, "style"> & {
23
23
  children?: ReactNode;
24
24
  style?: CSSProperties & ThreadRailKnobStyle;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { cn } from "./lib/cn.js";
3
- import { Children, cloneElement, createContext, isValidElement, useContext, useEffect, useLayoutEffect, useRef, useState } from "react";
3
+ import { Children, cloneElement, createContext, isValidElement, useContext, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/thread-rail.tsx
6
6
  const useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
@@ -16,11 +16,14 @@ function useItem() {
16
16
  if (!context) throw new Error("ThreadRail compound parts must be rendered inside <ThreadRailItem>.");
17
17
  return context;
18
18
  }
19
+ const LayerContext = createContext(null);
19
20
  function ThreadRail({ className, children, style, ...props }) {
20
21
  const [hovered, setHovered] = useState(0);
21
22
  const cardRef = useRef(null);
22
23
  const activeLayerRef = useRef(null);
23
24
  const [cardHeight, setCardHeight] = useState();
25
+ const baseId = useId();
26
+ const lines = useRef([]);
24
27
  const items = Children.toArray(children).filter((child) => isValidElement(child));
25
28
  const popovers = items.map((item) => {
26
29
  const popover = Children.toArray(item.props.children).find((child) => isValidElement(child) && child.type === ThreadRailPopover);
@@ -40,7 +43,10 @@ function ThreadRail({ className, children, style, ...props }) {
40
43
  return /* @__PURE__ */ jsx(RailContext.Provider, {
41
44
  value: {
42
45
  current: hovered,
43
- activate: setHovered
46
+ count: items.length,
47
+ activate: setHovered,
48
+ layerId: (index, part) => `${baseId}-${index}-${part}`,
49
+ lines
44
50
  },
45
51
  children: /* @__PURE__ */ jsxs("nav", {
46
52
  "data-control-ui": "thread-rail",
@@ -52,6 +58,7 @@ function ThreadRail({ className, children, style, ...props }) {
52
58
  ...props,
53
59
  children: [items.map((item, index) => cloneElement(item, { index })), /* @__PURE__ */ jsx("div", {
54
60
  ref: cardRef,
61
+ "aria-hidden": "true",
55
62
  "data-control-ui": "thread-rail",
56
63
  "data-control-family": "thread-rail",
57
64
  "data-slot": "popover",
@@ -61,14 +68,16 @@ function ThreadRail({ className, children, style, ...props }) {
61
68
  height: cardHeight
62
69
  },
63
70
  className: cn("pointer-events-none z-20 w-72 overflow-hidden", activePopover?.className),
64
- children: items.map((item, index) => /* @__PURE__ */ jsx("div", {
65
- "data-control-ui": "thread-rail",
66
- "data-control-family": "thread-rail",
67
- "data-slot": "popover-layer",
68
- ref: index === hovered ? activeLayerRef : void 0,
69
- "data-active": index === hovered ? "true" : void 0,
70
- className: "",
71
- children: popovers[index]?.children ?? null
71
+ children: items.map((item, index) => /* @__PURE__ */ jsx(LayerContext.Provider, {
72
+ value: index,
73
+ children: /* @__PURE__ */ jsx("div", {
74
+ "data-control-ui": "thread-rail",
75
+ "data-control-family": "thread-rail",
76
+ "data-slot": "popover-layer",
77
+ ref: index === hovered ? activeLayerRef : void 0,
78
+ "data-active": index === hovered ? "true" : void 0,
79
+ children: popovers[index]?.children ?? null
80
+ })
72
81
  }, item.key ?? index))
73
82
  })]
74
83
  })
@@ -81,7 +90,7 @@ function ThreadRailItem({ from = "user", inView = false, active = false, index =
81
90
  value: {
82
91
  index,
83
92
  inView: isInView,
84
- activate: rail.activate
93
+ active
85
94
  },
86
95
  children: /* @__PURE__ */ jsx("div", {
87
96
  "data-control-ui": "thread-rail",
@@ -97,38 +106,71 @@ function ThreadRailItem({ from = "user", inView = false, active = false, index =
97
106
  })
98
107
  });
99
108
  }
100
- function ThreadRailLine({ className, ...props }) {
101
- const { index, inView, activate } = useItem();
109
+ function rovingTarget(key, index, count) {
110
+ const last = count - 1;
111
+ return {
112
+ ArrowDown: Math.min(index + 1, last),
113
+ ArrowUp: Math.max(index - 1, 0),
114
+ Home: 0,
115
+ End: last
116
+ }[key];
117
+ }
118
+ function ThreadRailLine({ className, onKeyDown, "aria-label": ariaLabel, ...props }) {
119
+ const { index, active } = useItem();
120
+ const rail = useRail();
102
121
  return /* @__PURE__ */ jsx("button", {
122
+ ref: (node) => {
123
+ rail.lines.current[index] = node;
124
+ },
103
125
  "data-control-ui": "thread-rail",
104
126
  "data-control-family": "thread-rail",
105
127
  "data-slot": "line",
106
128
  type: "button",
107
- "aria-current": inView ? "location" : void 0,
108
- onMouseEnter: () => activate(index),
109
- onFocus: () => activate(index),
110
- className: cn("relative block cursor-pointer before:absolute before:-inset-y-1 before:inset-x-0 before:content-['']", className),
129
+ tabIndex: index === rail.current ? 0 : -1,
130
+ "aria-current": active ? "location" : void 0,
131
+ "aria-label": ariaLabel,
132
+ "aria-labelledby": ariaLabel === void 0 ? rail.layerId(index, "title") : void 0,
133
+ "aria-describedby": rail.layerId(index, "summary"),
134
+ onMouseEnter: () => rail.activate(index),
135
+ onFocus: () => rail.activate(index),
136
+ onKeyDown: (event) => {
137
+ onKeyDown?.(event);
138
+ const target = event.defaultPrevented ? void 0 : rovingTarget(event.key, index, rail.count);
139
+ if (target === void 0) return;
140
+ event.preventDefault();
141
+ rail.lines.current[target]?.focus();
142
+ },
143
+ className: cn("relative block cursor-pointer", className),
111
144
  ...props
112
145
  });
113
146
  }
114
147
  function ThreadRailPopover(_props) {
115
148
  return null;
116
149
  }
150
+ function useLayerId(part) {
151
+ const rail = useRail();
152
+ const layer = useContext(LayerContext);
153
+ return layer === null ? void 0 : rail.layerId(layer, part);
154
+ }
117
155
  function ThreadRailTitle({ className, ...props }) {
156
+ const id = useLayerId("title");
118
157
  return /* @__PURE__ */ jsx("div", {
158
+ id,
119
159
  "data-control-ui": "thread-rail",
120
160
  "data-control-family": "thread-rail",
121
161
  "data-slot": "title",
122
- className: cn("truncate", className),
162
+ className: cn("line-clamp-2 text-pretty", className),
123
163
  ...props
124
164
  });
125
165
  }
126
166
  function ThreadRailSummary({ className, ...props }) {
167
+ const id = useLayerId("summary");
127
168
  return /* @__PURE__ */ jsx("p", {
169
+ id,
128
170
  "data-control-ui": "thread-rail",
129
171
  "data-control-family": "thread-rail",
130
172
  "data-slot": "summary",
131
- className: cn("line-clamp-3", className),
173
+ className: cn("line-clamp-3 text-pretty", className),
132
174
  ...props
133
175
  });
134
176
  }
@@ -3,6 +3,7 @@ import { jsx } from "react/jsx-runtime";
3
3
  //#region src/transcript-divider.tsx
4
4
  function TranscriptDivider({ tone = "neutral", className, children, ...props }) {
5
5
  return /* @__PURE__ */ jsx("div", {
6
+ role: children == null ? "separator" : void 0,
6
7
  "data-control-ui": "transcript-divider",
7
8
  "data-control-family": "transcript-divider",
8
9
  "data-slot": "root",
@@ -17,7 +18,7 @@ function TranscriptDividerLabel({ className, ...props }) {
17
18
  "data-control-ui": "transcript-divider",
18
19
  "data-control-family": "transcript-divider",
19
20
  "data-slot": "label",
20
- className: cn("min-w-0 truncate", className),
21
+ className: cn("min-w-0 text-center text-pretty", className),
21
22
  ...props
22
23
  });
23
24
  }
@@ -1,3 +1,4 @@
1
+ import { RenderProp } from "../control-props.js";
1
2
  import { AlertKnobStyle } from "../knob-contracts/alert-knobs.js";
2
3
  import { CSSProperties, ComponentProps } from "react";
3
4
  //#region src/ui/alert.d.ts
@@ -9,12 +10,13 @@ export type AlertProps = Omit<ComponentProps<"div">, "style"> & {
9
10
  variant?: AlertVariant;
10
11
  };
11
12
  export type AlertTitleProps = Omit<ComponentProps<"div">, "style"> & {
13
+ render?: RenderProp<ComponentProps<"div">>;
12
14
  style?: CSSProperties & AlertKnobStyle;
13
15
  };
14
16
  export type AlertDescriptionProps = Omit<ComponentProps<"div">, "style"> & {
15
17
  style?: CSSProperties & AlertKnobStyle;
16
18
  };
17
19
  export declare function Alert({ variant, className, ...props }: AlertProps): import("react").JSX.Element;
18
- export declare function AlertTitle({ className, ...props }: AlertTitleProps): import("react").JSX.Element;
20
+ export declare function AlertTitle({ render, className, ...props }: AlertTitleProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
19
21
  export declare function AlertDescription({ className, ...props }: AlertDescriptionProps): import("react").JSX.Element;
20
22
  //#endregion
package/dist/ui/alert.js CHANGED
@@ -1,10 +1,12 @@
1
+ "use client";
1
2
  import { cn } from "../lib/cn.js";
2
3
  import { jsx } from "react/jsx-runtime";
4
+ import { useRender } from "@base-ui/react/use-render";
3
5
  //#region src/ui/alert.tsx
4
6
  const alertVariants = ["default", "destructive"];
5
7
  function Alert({ variant = "default", className, ...props }) {
6
8
  return /* @__PURE__ */ jsx("div", {
7
- role: "alert",
9
+ role: variant === "destructive" ? "alert" : "status",
8
10
  "data-control-ui": "alert",
9
11
  "data-control-family": "alert",
10
12
  "data-slot": "root",
@@ -14,13 +16,17 @@ function Alert({ variant = "default", className, ...props }) {
14
16
  ...props
15
17
  });
16
18
  }
17
- function AlertTitle({ className, ...props }) {
18
- return /* @__PURE__ */ jsx("div", {
19
- "data-control-ui": "alert",
20
- "data-control-family": "alert",
21
- "data-slot": "title",
22
- className: cn("col-start-2 min-w-0", className),
23
- ...props
19
+ function AlertTitle({ render, className, ...props }) {
20
+ return useRender({
21
+ defaultTagName: "div",
22
+ render,
23
+ props: {
24
+ ...props,
25
+ "data-control-ui": "alert",
26
+ "data-control-family": "alert",
27
+ "data-slot": "title",
28
+ className: cn("col-start-2 min-w-0", className)
29
+ }
24
30
  });
25
31
  }
26
32
  function AlertDescription({ className, ...props }) {
@@ -53,7 +53,7 @@ function AutocompleteInput({ size = "md", className, ...props }) {
53
53
  "data-size": size,
54
54
  className: cn("w-full min-w-0 disabled:cursor-not-allowed", className),
55
55
  ...props
56
- }), /* @__PURE__ */ jsx(AutocompleteClear, { className: "absolute right-1.5 top-1/2 -translate-y-1/2" })]
56
+ }), /* @__PURE__ */ jsx(AutocompleteClear, { className: "absolute end-1.5 top-1/2 -translate-y-1/2" })]
57
57
  });
58
58
  }
59
59
  function AutocompleteContent({ className, children, sideOffset = 6, ...props }) {
@@ -85,7 +85,9 @@ function AutocompleteContent({ className, children, sideOffset = 6, ...props })
85
85
  function AutocompleteList({ className, children, ...props }) {
86
86
  return /* @__PURE__ */ jsx(ScrollArea, {
87
87
  className: "w-full",
88
+ viewportClassName: "overscroll-contain",
88
89
  maxHeight: "min(18rem, var(--available-height))",
90
+ lockAxis: "x",
89
91
  children: /* @__PURE__ */ jsx(Autocomplete$1.List, {
90
92
  "data-control-ui": "autocomplete",
91
93
  "data-popup-kind": "autocomplete",
@@ -16,8 +16,16 @@ export type AvatarFallbackProps = Omit<ComponentProps<"span">, "style"> & {
16
16
  delay?: number;
17
17
  style?: CSSProperties & AvatarKnobStyle;
18
18
  };
19
+ export declare const avatarBadgeStatuses: readonly ["online", "away", "busy", "offline"];
20
+ export type AvatarBadgeStatus = (typeof avatarBadgeStatuses)[number];
21
+ export type AvatarBadgeProps = Omit<ComponentProps<"span">, "style"> & {
22
+ status?: AvatarBadgeStatus;
23
+ label?: string;
24
+ style?: CSSProperties & AvatarKnobStyle;
25
+ };
19
26
  export declare function Avatar({ className, ...props }: AvatarProps): import("react").JSX.Element;
20
27
  export declare function AvatarGroup({ className, ...props }: AvatarGroupProps): import("react").JSX.Element;
21
28
  export declare function AvatarImage({ className, ...props }: AvatarImageProps): import("react").JSX.Element;
22
29
  export declare function AvatarFallback({ className, ...props }: AvatarFallbackProps): import("react").JSX.Element;
30
+ export declare function AvatarBadge({ className, status, label, children, ...props }: AvatarBadgeProps): import("react").JSX.Element;
23
31
  //#endregion
package/dist/ui/avatar.js CHANGED
@@ -1,14 +1,20 @@
1
1
  "use client";
2
2
  import { cn } from "../lib/cn.js";
3
- import { jsx } from "react/jsx-runtime";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
5
5
  //#region src/ui/avatar.tsx
6
+ const avatarBadgeStatuses = [
7
+ "online",
8
+ "away",
9
+ "busy",
10
+ "offline"
11
+ ];
6
12
  function Avatar({ className, ...props }) {
7
13
  return /* @__PURE__ */ jsx(Avatar$1.Root, {
8
14
  "data-control-ui": "avatar",
9
15
  "data-control-family": "avatar",
10
16
  "data-slot": "root",
11
- className: cn("relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden align-middle", className),
17
+ className: cn("relative inline-flex shrink-0 select-none items-center justify-center align-middle", className),
12
18
  ...props
13
19
  });
14
20
  }
@@ -40,5 +46,19 @@ function AvatarFallback({ className, ...props }) {
40
46
  ...props
41
47
  });
42
48
  }
49
+ function AvatarBadge({ className, status, label, children, ...props }) {
50
+ return /* @__PURE__ */ jsxs("span", {
51
+ "data-control-ui": "avatar",
52
+ "data-control-family": "avatar",
53
+ "data-slot": "badge",
54
+ "data-status": status,
55
+ className: cn("absolute inline-flex items-center justify-center", className),
56
+ ...props,
57
+ children: [children, label ? /* @__PURE__ */ jsx("span", {
58
+ className: "sr-only",
59
+ children: label
60
+ }) : null]
61
+ });
62
+ }
43
63
  //#endregion
44
- export { Avatar, AvatarFallback, AvatarGroup, AvatarImage };
64
+ export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarImage, avatarBadgeStatuses };
package/dist/ui/badge.js CHANGED
@@ -27,7 +27,7 @@ function Badge({ variant = "default", size = "md", color, render, className, chi
27
27
  "data-variant": variant,
28
28
  "data-size": size,
29
29
  "data-color": resolvedColor,
30
- className: cn("inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap border font-medium [&>svg]:pointer-events-none [&>svg]:size-3", size === "sm" ? "text-micro" : "text-caption", className),
30
+ className: cn("inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap border font-medium [&>svg]:pointer-events-none [&>svg]:size-3", className),
31
31
  children
32
32
  }
33
33
  });
@@ -0,0 +1,27 @@
1
+ import { RenderProp } from "../control-props.js";
2
+ import { BreadcrumbKnobStyle } from "../knob-contracts/breadcrumb-knobs.js";
3
+ import { CSSProperties, ComponentProps } from "react";
4
+ //#region src/ui/breadcrumb.d.ts
5
+ export declare function Breadcrumb({ className, ...props }: ComponentProps<"nav"> & {
6
+ style?: CSSProperties & BreadcrumbKnobStyle;
7
+ }): import("react").JSX.Element;
8
+ export declare function BreadcrumbList({ className, ...props }: Omit<ComponentProps<"ol">, "style"> & {
9
+ style?: CSSProperties & BreadcrumbKnobStyle;
10
+ }): import("react").JSX.Element;
11
+ export declare function BreadcrumbItem({ className, ...props }: ComponentProps<"li"> & {
12
+ style?: CSSProperties & BreadcrumbKnobStyle;
13
+ }): import("react").JSX.Element;
14
+ export declare function BreadcrumbLink({ render, className, children, ...props }: ComponentProps<"a"> & {
15
+ render?: RenderProp<ComponentProps<"a">>;
16
+ }): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
17
+ export declare function BreadcrumbPage({ className, ...props }: Omit<ComponentProps<"span">, "style"> & {
18
+ style?: CSSProperties & BreadcrumbKnobStyle;
19
+ }): import("react").JSX.Element;
20
+ export declare function BreadcrumbSeparator({ children, className, ...props }: ComponentProps<"li"> & {
21
+ style?: CSSProperties & BreadcrumbKnobStyle;
22
+ }): import("react").JSX.Element;
23
+ export declare function BreadcrumbEllipsis({ label, className, ...props }: Omit<ComponentProps<"span">, "children"> & {
24
+ label?: string;
25
+ style?: CSSProperties & BreadcrumbKnobStyle;
26
+ }): import("react").JSX.Element;
27
+ //#endregion