@ctrl-ui/react 0.8.6 → 0.8.8

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 (376) 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 +54 -57
  8. package/dist/blocks/design-canvas-data.d.ts +32 -0
  9. package/dist/blocks/design-canvas-data.js +100 -0
  10. package/dist/blocks/design-canvas-inspector.d.ts +8 -0
  11. package/dist/blocks/design-canvas-inspector.js +238 -0
  12. package/dist/blocks/design-canvas.d.ts +21 -0
  13. package/dist/blocks/design-canvas.js +452 -0
  14. package/dist/blocks/discussion.d.ts +28 -0
  15. package/dist/blocks/discussion.js +67 -0
  16. package/dist/blocks/file-explorer-data.d.ts +1 -0
  17. package/dist/blocks/file-explorer-data.js +4 -1
  18. package/dist/blocks/file-explorer.d.ts +9 -1
  19. package/dist/blocks/file-explorer.js +461 -192
  20. package/dist/blocks/settings.d.ts +2 -1
  21. package/dist/blocks/settings.js +101 -79
  22. package/dist/blocks/team-chat.d.ts +12 -0
  23. package/dist/blocks/team-chat.js +26 -0
  24. package/dist/blocks/theme-toggle.js +23 -31
  25. package/dist/chat-composer-attachment.d.ts +12 -3
  26. package/dist/chat-composer-attachment.js +61 -19
  27. package/dist/chat-composer-editor/extensions/mention.d.ts +5 -1
  28. package/dist/chat-composer-editor/extensions/mention.js +58 -27
  29. package/dist/chat-composer-editor/ghost.js +2 -4
  30. package/dist/chat-composer-editor/types.d.ts +5 -0
  31. package/dist/chat-composer-editor.d.ts +1 -1
  32. package/dist/chat-composer-editor.js +71 -28
  33. package/dist/chat-composer.d.ts +13 -32
  34. package/dist/chat-composer.js +54 -13
  35. package/dist/chat-layout.d.ts +19 -0
  36. package/dist/chat-layout.js +96 -32
  37. package/dist/chat-message/social.d.ts +26 -0
  38. package/dist/chat-message/social.js +122 -0
  39. package/dist/chat-message.d.ts +28 -29
  40. package/dist/chat-message.js +106 -25
  41. package/dist/context.d.ts +2 -2
  42. package/dist/context.js +38 -23
  43. package/dist/dynamic-notification-canvas-loop.d.ts +24 -0
  44. package/dist/dynamic-notification-canvas-loop.js +113 -0
  45. package/dist/dynamic-notification-glass.js +23 -114
  46. package/dist/dynamic-notification-liquid.js +14 -118
  47. package/dist/dynamic-notification.d.ts +16 -8
  48. package/dist/dynamic-notification.js +85 -22
  49. package/dist/email/email-brand.d.ts +7 -4
  50. package/dist/email/email-brand.js +9 -6
  51. package/dist/email/email-code.d.ts +3 -2
  52. package/dist/email/email-code.js +11 -9
  53. package/dist/email/email-footer.d.ts +5 -3
  54. package/dist/email/email-footer.js +11 -5
  55. package/dist/email/email.d.ts +31 -9
  56. package/dist/email/email.js +50 -26
  57. package/dist/email/templates.d.ts +10 -9
  58. package/dist/email/templates.js +102 -38
  59. package/dist/email/theme.js +1 -1
  60. package/dist/environment-variables.d.ts +4 -2
  61. package/dist/environment-variables.js +52 -32
  62. package/dist/filter-bar/context.d.ts +32 -0
  63. package/dist/filter-bar/context.js +11 -0
  64. package/dist/filter-bar/editor.d.ts +14 -0
  65. package/dist/filter-bar/editor.js +216 -0
  66. package/dist/filter-bar/model.d.ts +10 -0
  67. package/dist/filter-bar/model.js +57 -0
  68. package/dist/filter-bar/motion.d.ts +10 -0
  69. package/dist/filter-bar/motion.js +84 -0
  70. package/dist/filter-bar/parts.d.ts +19 -0
  71. package/dist/filter-bar/parts.js +244 -0
  72. package/dist/filter-bar/types.d.ts +54 -0
  73. package/dist/filter-bar/types.js +0 -0
  74. package/dist/filter-bar.d.ts +27 -0
  75. package/dist/filter-bar.js +310 -0
  76. package/dist/hooks/use-audio-recorder.js +12 -6
  77. package/dist/hooks/use-chat-composer.d.ts +21 -7
  78. package/dist/hooks/use-chat-composer.js +32 -5
  79. package/dist/hooks/use-chat-message.d.ts +28 -2
  80. package/dist/hooks/use-chat-message.js +41 -10
  81. package/dist/hooks/use-chat-thread-scroll.js +43 -7
  82. package/dist/hooks/use-color-area.d.ts +3 -3
  83. package/dist/hooks/use-color-area.js +13 -12
  84. package/dist/hooks/use-copy-to-clipboard.d.ts +2 -1
  85. package/dist/hooks/use-copy-to-clipboard.js +20 -20
  86. package/dist/hooks/use-dropzone.d.ts +7 -4
  87. package/dist/hooks/use-dropzone.js +34 -3
  88. package/dist/hooks/use-dynamic-notification.d.ts +6 -2
  89. package/dist/hooks/use-dynamic-notification.js +26 -10
  90. package/dist/hooks/use-mobile.d.ts +3 -2
  91. package/dist/hooks/use-mobile.js +8 -4
  92. package/dist/hooks/use-textarea-trigger-menu.js +2 -1
  93. package/dist/hooks/use-trigger-menu.d.ts +54 -0
  94. package/dist/hooks/use-trigger-menu.js +102 -47
  95. package/dist/hooks/use-user-ask.d.ts +2 -0
  96. package/dist/hooks/use-user-ask.js +35 -41
  97. package/dist/inline-attachment.d.ts +6 -2
  98. package/dist/inline-attachment.js +44 -29
  99. package/dist/inline-citation.d.ts +12 -5
  100. package/dist/inline-citation.js +25 -16
  101. package/dist/knob-contracts/audio-recorder-knobs.d.ts +1 -1
  102. package/dist/knob-contracts/audio-recorder-knobs.js +2 -1
  103. package/dist/knob-contracts/audio-visualizer-knobs.d.ts +1 -1
  104. package/dist/knob-contracts/audio-visualizer-knobs.js +2 -1
  105. package/dist/knob-contracts/avatar-knobs.d.ts +1 -1
  106. package/dist/knob-contracts/avatar-knobs.js +6 -1
  107. package/dist/knob-contracts/badge-knobs.d.ts +1 -1
  108. package/dist/knob-contracts/badge-knobs.js +2 -1
  109. package/dist/knob-contracts/breadcrumb-knobs.d.ts +4 -0
  110. package/dist/knob-contracts/breadcrumb-knobs.js +8 -0
  111. package/dist/knob-contracts/button-knobs.d.ts +1 -1
  112. package/dist/knob-contracts/button-knobs.js +1 -0
  113. package/dist/knob-contracts/chat-layout-knobs.d.ts +1 -1
  114. package/dist/knob-contracts/chat-layout-knobs.js +2 -1
  115. package/dist/knob-contracts/chat-message-knobs.d.ts +1 -1
  116. package/dist/knob-contracts/chat-message-knobs.js +8 -1
  117. package/dist/knob-contracts/choice-knobs.d.ts +1 -1
  118. package/dist/knob-contracts/choice-knobs.js +1 -0
  119. package/dist/knob-contracts/code-diff-knobs.d.ts +1 -1
  120. package/dist/knob-contracts/code-diff-knobs.js +2 -0
  121. package/dist/knob-contracts/code-knobs.d.ts +1 -1
  122. package/dist/knob-contracts/code-knobs.js +2 -1
  123. package/dist/knob-contracts/collapsible-knobs.d.ts +1 -1
  124. package/dist/knob-contracts/collapsible-knobs.js +1 -1
  125. package/dist/knob-contracts/dynamic-notification-knobs.d.ts +1 -1
  126. package/dist/knob-contracts/dynamic-notification-knobs.js +2 -0
  127. package/dist/knob-contracts/emoji-picker-knobs.d.ts +4 -0
  128. package/dist/knob-contracts/emoji-picker-knobs.js +10 -0
  129. package/dist/knob-contracts/field-knobs.d.ts +1 -1
  130. package/dist/knob-contracts/field-knobs.js +5 -1
  131. package/dist/knob-contracts/filter-bar-knobs.d.ts +4 -0
  132. package/dist/knob-contracts/filter-bar-knobs.js +15 -0
  133. package/dist/knob-contracts/infinite-canvas-knobs.d.ts +1 -1
  134. package/dist/knob-contracts/infinite-canvas-knobs.js +3 -0
  135. package/dist/knob-contracts/markdown-knobs.d.ts +1 -1
  136. package/dist/knob-contracts/markdown-knobs.js +3 -1
  137. package/dist/knob-contracts/page-layout-knobs.d.ts +1 -1
  138. package/dist/knob-contracts/page-layout-knobs.js +4 -1
  139. package/dist/knob-contracts/popup-knobs.d.ts +1 -1
  140. package/dist/knob-contracts/popup-knobs.js +28 -0
  141. package/dist/knob-contracts/range-knobs.d.ts +1 -1
  142. package/dist/knob-contracts/range-knobs.js +1 -0
  143. package/dist/knob-contracts/rich-tooltip-knobs.d.ts +1 -1
  144. package/dist/knob-contracts/rich-tooltip-knobs.js +2 -1
  145. package/dist/knob-contracts/sidebar-knobs.d.ts +1 -1
  146. package/dist/knob-contracts/sidebar-knobs.js +27 -2
  147. package/dist/knob-contracts/spinner-knobs.d.ts +1 -1
  148. package/dist/knob-contracts/spinner-knobs.js +1 -1
  149. package/dist/knob-contracts/stepper-knobs.d.ts +1 -1
  150. package/dist/knob-contracts/stepper-knobs.js +4 -1
  151. package/dist/knob-contracts/switch-knobs.d.ts +1 -1
  152. package/dist/knob-contracts/switch-knobs.js +5 -0
  153. package/dist/knob-contracts/table-of-contents-knobs.d.ts +1 -1
  154. package/dist/knob-contracts/table-of-contents-knobs.js +4 -5
  155. package/dist/knob-contracts/tabs-knobs.d.ts +1 -1
  156. package/dist/knob-contracts/tabs-knobs.js +1 -0
  157. package/dist/knob-contracts/tree-knobs.d.ts +1 -1
  158. package/dist/knob-contracts/tree-knobs.js +2 -1
  159. package/dist/lib/cn.js +0 -4
  160. package/dist/lib/contrast.d.ts +1 -0
  161. package/dist/lib/contrast.js +17 -5
  162. package/dist/lib/dropzone-validation.js +41 -28
  163. package/dist/lib/env-file.d.ts +1 -1
  164. package/dist/lib/env-file.js +5 -5
  165. package/dist/lib/motion.d.ts +4 -0
  166. package/dist/lib/motion.js +15 -0
  167. package/dist/lib/trigger-detect.js +6 -8
  168. package/dist/markdown-block.js +13 -8
  169. package/dist/popup-parts.d.ts +8 -0
  170. package/dist/popup-parts.js +43 -0
  171. package/dist/scripts/contrast-eval.js +5 -4
  172. package/dist/source-badge.js +3 -1
  173. package/dist/styles/code.css +0 -2
  174. package/dist/styles/effects.css +6 -32
  175. package/dist/styles/index.css +14 -8
  176. package/dist/styles/recipes/accordion.css +9 -6
  177. package/dist/styles/recipes/action-bar.css +0 -15
  178. package/dist/styles/recipes/activity.css +5 -11
  179. package/dist/styles/recipes/alert.css +4 -4
  180. package/dist/styles/recipes/audio-recorder.css +15 -3
  181. package/dist/styles/recipes/audio-visualizer.css +13 -2
  182. package/dist/styles/recipes/avatar.css +78 -1
  183. package/dist/styles/recipes/badge.css +14 -4
  184. package/dist/styles/recipes/breadcrumb.css +77 -0
  185. package/dist/styles/recipes/button-group.css +6 -8
  186. package/dist/styles/recipes/button-states.css +66 -0
  187. package/dist/styles/recipes/button.css +26 -85
  188. package/dist/styles/recipes/calendar.css +17 -23
  189. package/dist/styles/recipes/card.css +2 -2
  190. package/dist/styles/recipes/chat-composer-attachment.css +9 -3
  191. package/dist/styles/recipes/chat-composer.css +21 -16
  192. package/dist/styles/recipes/chat-layout.css +64 -2
  193. package/dist/styles/recipes/chat-message-social.css +123 -0
  194. package/dist/styles/recipes/chat-message.css +157 -37
  195. package/dist/styles/recipes/choice.css +25 -21
  196. package/dist/styles/recipes/code-diff.css +51 -26
  197. package/dist/styles/recipes/code.css +44 -18
  198. package/dist/styles/recipes/collapsible.css +43 -1
  199. package/dist/styles/recipes/color-picker-details.css +3 -4
  200. package/dist/styles/recipes/color-picker-values.css +9 -8
  201. package/dist/styles/recipes/color-picker.css +23 -4
  202. package/dist/styles/recipes/context.css +3 -3
  203. package/dist/styles/recipes/dockable-panel.css +18 -7
  204. package/dist/styles/recipes/dropzone.css +7 -8
  205. package/dist/styles/recipes/dynamic-notification-input.css +8 -5
  206. package/dist/styles/recipes/dynamic-notification-motion.css +12 -21
  207. package/dist/styles/recipes/dynamic-notification.css +40 -26
  208. package/dist/styles/recipes/emoji-picker.css +132 -0
  209. package/dist/styles/recipes/empty.css +5 -4
  210. package/dist/styles/recipes/environment-variables.css +4 -15
  211. package/dist/styles/recipes/field-parts.css +89 -21
  212. package/dist/styles/recipes/field.css +83 -26
  213. package/dist/styles/recipes/filter-bar.css +161 -0
  214. package/dist/styles/recipes/gradient-editor.css +18 -7
  215. package/dist/styles/recipes/infinite-canvas.css +51 -4
  216. package/dist/styles/recipes/inline-attachment.css +9 -4
  217. package/dist/styles/recipes/inline-citation.css +10 -4
  218. package/dist/styles/recipes/item.css +23 -9
  219. package/dist/styles/recipes/markdown-block.css +5 -4
  220. package/dist/styles/recipes/markdown.css +68 -26
  221. package/dist/styles/recipes/morphing-panel.css +8 -8
  222. package/dist/styles/recipes/page-layout.css +36 -10
  223. package/dist/styles/recipes/pagination.css +5 -6
  224. package/dist/styles/recipes/phone-input.css +12 -8
  225. package/dist/styles/recipes/popup-controls.css +175 -26
  226. package/dist/styles/recipes/popup-drawer.css +35 -44
  227. package/dist/styles/recipes/popup-lists.css +139 -29
  228. package/dist/styles/recipes/popup-motion.css +4 -45
  229. package/dist/styles/recipes/popup-toast.css +55 -26
  230. package/dist/styles/recipes/popup.css +149 -153
  231. package/dist/styles/recipes/range.css +55 -19
  232. package/dist/styles/recipes/resizable.css +36 -7
  233. package/dist/styles/recipes/rich-tooltip.css +24 -34
  234. package/dist/styles/recipes/scroll-area.css +8 -1
  235. package/dist/styles/recipes/sidebar-menu.css +149 -34
  236. package/dist/styles/recipes/sidebar-parts.css +154 -0
  237. package/dist/styles/recipes/sidebar.css +187 -128
  238. package/dist/styles/recipes/source-badge.css +1 -1
  239. package/dist/styles/recipes/spinner.css +12 -1
  240. package/dist/styles/recipes/stepper.css +31 -13
  241. package/dist/styles/recipes/switch.css +68 -23
  242. package/dist/styles/recipes/table-of-contents.css +49 -41
  243. package/dist/styles/recipes/table.css +14 -10
  244. package/dist/styles/recipes/tabs.css +38 -12
  245. package/dist/styles/recipes/task-list.css +7 -14
  246. package/dist/styles/recipes/thread-rail.css +42 -19
  247. package/dist/styles/recipes/timeline.css +2 -0
  248. package/dist/styles/recipes/toolbar.css +27 -25
  249. package/dist/styles/recipes/track-highlight.css +12 -8
  250. package/dist/styles/recipes/transcript-divider.css +2 -2
  251. package/dist/styles/recipes/tree.css +31 -4
  252. package/dist/styles/recipes/user-ask-details.css +0 -1
  253. package/dist/styles/recipes/user-ask.css +4 -4
  254. package/dist/styles/theme.css +287 -107
  255. package/dist/task-list.d.ts +4 -1
  256. package/dist/task-list.js +24 -8
  257. package/dist/thread-rail.d.ts +1 -1
  258. package/dist/thread-rail.js +61 -19
  259. package/dist/transcript-divider.js +2 -1
  260. package/dist/ui/alert.d.ts +3 -1
  261. package/dist/ui/alert.js +14 -8
  262. package/dist/ui/autocomplete.js +7 -1
  263. package/dist/ui/avatar.d.ts +8 -0
  264. package/dist/ui/avatar.js +23 -3
  265. package/dist/ui/badge.js +1 -1
  266. package/dist/ui/breadcrumb.d.ts +27 -0
  267. package/dist/ui/breadcrumb.js +88 -0
  268. package/dist/ui/button.d.ts +2 -1
  269. package/dist/ui/button.js +1 -1
  270. package/dist/ui/calendar.js +2 -2
  271. package/dist/ui/card.d.ts +3 -1
  272. package/dist/ui/card.js +12 -7
  273. package/dist/ui/checkbox-group.js +1 -1
  274. package/dist/ui/checkbox.d.ts +2 -0
  275. package/dist/ui/code-diff.d.ts +1 -1
  276. package/dist/ui/code-diff.js +71 -27
  277. package/dist/ui/code.d.ts +5 -3
  278. package/dist/ui/code.js +27 -28
  279. package/dist/ui/color-picker.d.ts +5 -2
  280. package/dist/ui/color-picker.js +84 -36
  281. package/dist/ui/combobox-disabled-selection.d.ts +1 -2
  282. package/dist/ui/combobox-disabled-selection.js +7 -8
  283. package/dist/ui/combobox.d.ts +5 -23
  284. package/dist/ui/combobox.js +36 -16
  285. package/dist/ui/command.d.ts +8 -2
  286. package/dist/ui/command.js +39 -15
  287. package/dist/ui/context-menu.js +3 -0
  288. package/dist/ui/dialog.d.ts +2 -1
  289. package/dist/ui/dialog.js +3 -22
  290. package/dist/ui/dockable-panel-geometry.d.ts +1 -0
  291. package/dist/ui/dockable-panel-geometry.js +7 -1
  292. package/dist/ui/dockable-panel.d.ts +9 -6
  293. package/dist/ui/dockable-panel.js +81 -33
  294. package/dist/ui/drawer.d.ts +7 -4
  295. package/dist/ui/drawer.js +35 -22
  296. package/dist/ui/dropdown-menu.js +4 -3
  297. package/dist/ui/dropzone.d.ts +5 -3
  298. package/dist/ui/dropzone.js +78 -17
  299. package/dist/ui/emoji-picker.d.ts +18 -0
  300. package/dist/ui/emoji-picker.js +136 -0
  301. package/dist/ui/empty.d.ts +3 -1
  302. package/dist/ui/empty.js +12 -7
  303. package/dist/ui/field.js +1 -1
  304. package/dist/ui/gradient-editor.d.ts +1 -1
  305. package/dist/ui/gradient-editor.js +37 -21
  306. package/dist/ui/infinite-canvas.d.ts +13 -1
  307. package/dist/ui/infinite-canvas.js +139 -20
  308. package/dist/ui/input-group.d.ts +2 -4
  309. package/dist/ui/input-group.js +13 -14
  310. package/dist/ui/input-otp.d.ts +1 -1
  311. package/dist/ui/input-otp.js +32 -15
  312. package/dist/ui/input.js +11 -2
  313. package/dist/ui/item.d.ts +2 -1
  314. package/dist/ui/item.js +11 -7
  315. package/dist/ui/live-status.d.ts +7 -0
  316. package/dist/ui/live-status.js +17 -0
  317. package/dist/ui/markdown-elements.d.ts +6 -0
  318. package/dist/ui/markdown-elements.js +42 -9
  319. package/dist/ui/menubar.js +2 -2
  320. package/dist/ui/morphing-panel.js +2 -1
  321. package/dist/ui/native-select.d.ts +1 -1
  322. package/dist/ui/native-select.js +24 -11
  323. package/dist/ui/number-field.d.ts +1 -1
  324. package/dist/ui/number-field.js +13 -2
  325. package/dist/ui/page-layout.d.ts +2 -2
  326. package/dist/ui/page-layout.js +2 -4
  327. package/dist/ui/pagination.d.ts +7 -5
  328. package/dist/ui/pagination.js +19 -13
  329. package/dist/ui/phone-input.d.ts +1 -0
  330. package/dist/ui/phone-input.js +56 -58
  331. package/dist/ui/radio-group.d.ts +3 -0
  332. package/dist/ui/radio-group.js +11 -1
  333. package/dist/ui/resizable.d.ts +20 -2
  334. package/dist/ui/resizable.js +130 -8
  335. package/dist/ui/responsive-dialog.d.ts +1 -1
  336. package/dist/ui/responsive-dialog.js +9 -23
  337. package/dist/ui/rich-tooltip.d.ts +10 -4
  338. package/dist/ui/rich-tooltip.js +81 -33
  339. package/dist/ui/scroll-area.d.ts +4 -1
  340. package/dist/ui/scroll-area.js +44 -28
  341. package/dist/ui/select.d.ts +2 -1
  342. package/dist/ui/select.js +57 -32
  343. package/dist/ui/sidebar-menu.d.ts +5 -1
  344. package/dist/ui/sidebar-menu.js +31 -33
  345. package/dist/ui/sidebar-provider.d.ts +10 -1
  346. package/dist/ui/sidebar-provider.js +38 -13
  347. package/dist/ui/sidebar-resize-rail.js +7 -3
  348. package/dist/ui/sidebar.d.ts +11 -6
  349. package/dist/ui/sidebar.js +46 -23
  350. package/dist/ui/slider.js +31 -22
  351. package/dist/ui/spinner.d.ts +3 -2
  352. package/dist/ui/spinner.js +3 -2
  353. package/dist/ui/stepper.d.ts +8 -1
  354. package/dist/ui/stepper.js +74 -25
  355. package/dist/ui/switch.d.ts +1 -0
  356. package/dist/ui/table-of-contents.d.ts +5 -4
  357. package/dist/ui/table-of-contents.js +143 -52
  358. package/dist/ui/table.js +15 -9
  359. package/dist/ui/textarea.d.ts +1 -1
  360. package/dist/ui/textarea.js +20 -9
  361. package/dist/ui/timeline.d.ts +3 -1
  362. package/dist/ui/timeline.js +17 -9
  363. package/dist/ui/toast.d.ts +11 -5
  364. package/dist/ui/toast.js +100 -54
  365. package/dist/ui/toggle.d.ts +1 -1
  366. package/dist/ui/toggle.js +2 -1
  367. package/dist/ui/toolbar.d.ts +3 -2
  368. package/dist/ui/toolbar.js +4 -2
  369. package/dist/ui/tooltip.js +3 -20
  370. package/dist/ui/tree.js +120 -80
  371. package/dist/ui/trigger-menu.js +7 -2
  372. package/dist/user-ask.d.ts +10 -5
  373. package/dist/user-ask.js +31 -11
  374. package/package.json +5 -1
  375. package/dist/hooks/use-keyboard-navigation.d.ts +0 -3
  376. package/dist/hooks/use-keyboard-navigation.js +0 -22
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";
3
+ import { useRender } from "@base-ui/react/use-render";
2
4
  import { jsx } from "react/jsx-runtime";
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",
@@ -120,6 +122,10 @@ function AutocompleteItem({ className, children, disabled, ...props }) {
120
122
  className: cn(popupItemStructureClasses, className),
121
123
  ...props,
122
124
  children: /* @__PURE__ */ jsx("span", {
125
+ "data-control-ui": "autocomplete",
126
+ "data-control-family": "popup",
127
+ "data-popup-kind": "autocomplete",
128
+ "data-slot": "item-text",
123
129
  className: "flex min-w-0 flex-1 items-center truncate",
124
130
  children
125
131
  })
@@ -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
@@ -0,0 +1,88 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.js";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { ChevronRight, MoreHorizontal } from "lucide-react";
6
+ //#region src/ui/breadcrumb.tsx
7
+ function Breadcrumb({ className, ...props }) {
8
+ return /* @__PURE__ */ jsx("nav", {
9
+ "aria-label": "Breadcrumb",
10
+ "data-control-ui": "breadcrumb",
11
+ "data-control-family": "breadcrumb",
12
+ "data-slot": "root",
13
+ className,
14
+ ...props
15
+ });
16
+ }
17
+ function BreadcrumbList({ className, ...props }) {
18
+ return /* @__PURE__ */ jsx("ol", {
19
+ "data-control-ui": "breadcrumb",
20
+ "data-control-family": "breadcrumb",
21
+ "data-slot": "list",
22
+ className: cn("flex flex-wrap items-center break-words", className),
23
+ ...props
24
+ });
25
+ }
26
+ function BreadcrumbItem({ className, ...props }) {
27
+ return /* @__PURE__ */ jsx("li", {
28
+ "data-control-ui": "breadcrumb",
29
+ "data-control-family": "breadcrumb",
30
+ "data-slot": "item",
31
+ className: cn("inline-flex items-center", className),
32
+ ...props
33
+ });
34
+ }
35
+ function BreadcrumbLink({ render, className, children, ...props }) {
36
+ return useRender({
37
+ defaultTagName: "a",
38
+ render,
39
+ props: {
40
+ ...props,
41
+ "data-control-ui": "breadcrumb",
42
+ "data-control-family": "breadcrumb",
43
+ "data-slot": "link",
44
+ className,
45
+ children
46
+ }
47
+ });
48
+ }
49
+ function BreadcrumbPage({ className, ...props }) {
50
+ return /* @__PURE__ */ jsx("span", {
51
+ "data-control-ui": "breadcrumb",
52
+ "data-control-family": "breadcrumb",
53
+ "data-slot": "page",
54
+ "aria-current": "page",
55
+ className,
56
+ ...props
57
+ });
58
+ }
59
+ function BreadcrumbSeparator({ children, className, ...props }) {
60
+ return /* @__PURE__ */ jsx("li", {
61
+ "data-control-ui": "breadcrumb",
62
+ "data-control-family": "breadcrumb",
63
+ "data-slot": "separator",
64
+ role: "presentation",
65
+ "aria-hidden": "true",
66
+ className: cn("[&>svg]:size-3.5", className),
67
+ ...props,
68
+ children: children ?? /* @__PURE__ */ jsx(ChevronRight, { "data-icon-dir": "inline" })
69
+ });
70
+ }
71
+ function BreadcrumbEllipsis({ label = "Show hidden breadcrumbs", className, ...props }) {
72
+ return /* @__PURE__ */ jsxs("span", {
73
+ "data-control-ui": "breadcrumb",
74
+ "data-control-family": "breadcrumb",
75
+ "data-slot": "ellipsis",
76
+ className: cn("flex items-center justify-center", className),
77
+ ...props,
78
+ children: [/* @__PURE__ */ jsx(MoreHorizontal, {
79
+ "aria-hidden": "true",
80
+ className: "size-4"
81
+ }), /* @__PURE__ */ jsx("span", {
82
+ className: "sr-only",
83
+ children: label
84
+ })]
85
+ });
86
+ }
87
+ //#endregion
88
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
@@ -23,12 +23,13 @@ export type ButtonProps = ComponentProps<"button"> & ButtonAppearanceProps & {
23
23
  disabled: boolean;
24
24
  }>;
25
25
  nativeButton?: boolean;
26
+ focusableWhenDisabled?: boolean;
26
27
  };
27
28
  export type ButtonLinkProps = ComponentProps<"a"> & ButtonAppearanceProps & {
28
29
  render?: RenderProp<ComponentProps<"a">>;
29
30
  };
30
31
  export type ButtonLabelProps = ComponentProps<"label"> & ButtonAppearanceProps;
31
- export declare const buttonStructureClasses = "relative isolate inline-flex shrink-0 items-center justify-center overflow-visible whitespace-nowrap";
32
+ export declare const buttonStructureClasses = "isolate inline-flex shrink-0 items-center justify-center overflow-visible whitespace-nowrap";
32
33
  export declare const buttonTrackStructureClasses = "data-[track=hover]:relative data-[track=hover]:isolate [&_[data-track-item]]:[isolation:auto]";
33
34
  export declare const buttonContentClasses = "relative z-[1] inline-flex min-w-0 items-center justify-center gap-[inherit]";
34
35
  export declare function Button({ variant, size, tone, active, iconOnly, shape, type, disabled, render, nativeButton, className, children, ...props }: ButtonProps): import("react").JSX.Element;
package/dist/ui/button.js CHANGED
@@ -9,7 +9,7 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
9
  //#region src/ui/button.tsx
10
10
  const ButtonTrackContext = createContext(false);
11
11
  const buttonShapes = ["default", "circle"];
12
- const buttonStructureClasses = "relative isolate inline-flex shrink-0 items-center justify-center overflow-visible whitespace-nowrap";
12
+ const buttonStructureClasses = "isolate inline-flex shrink-0 items-center justify-center overflow-visible whitespace-nowrap";
13
13
  const buttonTrackStructureClasses = "data-[track=hover]:relative data-[track=hover]:isolate [&_[data-track-item]]:[isolation:auto]";
14
14
  const buttonContentClasses = "relative z-[1] inline-flex min-w-0 items-center justify-center gap-[inherit]";
15
15
  function wrapButtonText(children) {
@@ -4,8 +4,8 @@ import { useEffect, useRef } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { CaptionLabel, Day, DayPicker, Month, MonthCaption, MonthGrid, Months, Nav, Weekday } from "react-day-picker";
6
6
  //#region src/ui/calendar.tsx
7
- const dayButtonClasses = "flex w-full items-center justify-center disabled:pointer-events-none";
8
- const navButtonClasses = "inline-flex items-center justify-center disabled:pointer-events-none";
7
+ const dayButtonClasses = "flex w-full items-center justify-center disabled:pointer-events-none aria-disabled:pointer-events-none";
8
+ const navButtonClasses = "inline-flex items-center justify-center disabled:pointer-events-none aria-disabled:pointer-events-none";
9
9
  const chevronPathByOrientation = {
10
10
  left: "M10 3 5.5 8 10 13",
11
11
  right: "M6 3 10.5 8 6 13",
package/dist/ui/card.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { RenderProp } from "../control-props.js";
1
2
  import { CardKnobStyle } from "../knob-contracts/card-knobs.js";
2
3
  import { CSSProperties, ComponentProps } from "react";
3
4
  //#region src/ui/card.d.ts
@@ -11,6 +12,7 @@ export type CardHeaderProps = ComponentProps<"div"> & {
11
12
  style?: CSSProperties & CardKnobStyle;
12
13
  };
13
14
  export type CardTitleProps = Omit<ComponentProps<"div">, "style"> & {
15
+ render?: RenderProp<ComponentProps<"div">>;
14
16
  style?: CSSProperties & CardKnobStyle;
15
17
  };
16
18
  export type CardDescriptionProps = ComponentProps<"div"> & {
@@ -27,7 +29,7 @@ export type CardFooterProps = ComponentProps<"div"> & {
27
29
  };
28
30
  export declare function Card({ variant, className, ...props }: CardProps): import("react").JSX.Element;
29
31
  export declare function CardHeader({ className, ...props }: CardHeaderProps): import("react").JSX.Element;
30
- export declare function CardTitle({ className, ...props }: CardTitleProps): import("react").JSX.Element;
32
+ export declare function CardTitle({ render, ...props }: CardTitleProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
31
33
  export declare function CardDescription({ className, ...props }: CardDescriptionProps): import("react").JSX.Element;
32
34
  export declare function CardAction({ className, ...props }: CardActionProps): import("react").JSX.Element;
33
35
  export declare function CardContent({ className, ...props }: CardContentProps): import("react").JSX.Element;