@vvedantb/ui 0.66.0 → 0.69.0

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 (423) hide show
  1. package/app/src/auth/useStableAuth.ts +0 -2
  2. package/app/src/confirm/ConfirmSkipHint.tsx +0 -2
  3. package/app/src/confirm/useAltHeld.ts +0 -17
  4. package/app/src/convex/ConvexClerkProvider.tsx +0 -3
  5. package/app/src/convex/env.ts +0 -4
  6. package/app/src/convex/errorMessage.ts +0 -1
  7. package/app/src/convex/useHeldResult.ts +0 -3
  8. package/app/src/page-motion/PageMotionProvider.tsx +0 -6
  9. package/app/src/page-title/createPageTitleContext.tsx +0 -14
  10. package/app/src/settings/SettingsEmptyState.tsx +0 -4
  11. package/app/src/settings/SettingsField.tsx +0 -4
  12. package/app/src/settings/SettingsPage.tsx +0 -12
  13. package/app/src/settings/SettingsSection.tsx +0 -14
  14. package/app/src/settings/ThemeModePicker.tsx +0 -6
  15. package/app/src/theme/createThemeProvider.tsx +0 -33
  16. package/app/src/time/compactRelativeTime.ts +0 -16
  17. package/app/src/update/staleDeployReload.ts +0 -40
  18. package/app/src/update/updateWatcher.ts +0 -8
  19. package/dist/app/src/auth/useStableAuth.js +0 -1
  20. package/dist/app/src/confirm/ConfirmSkipHint.js +0 -3
  21. package/dist/app/src/confirm/useAltHeld.js +0 -17
  22. package/dist/app/src/convex/env.js +0 -3
  23. package/dist/app/src/convex/errorMessage.js +0 -2
  24. package/dist/app/src/settings/ThemeModePicker.js +0 -1
  25. package/dist/app/src/theme/createThemeProvider.js +1 -11
  26. package/dist/app/src/time/compactRelativeTime.js +0 -8
  27. package/dist/app/src/update/staleDeployReload.js +3 -38
  28. package/dist/app/src/update/updateWatcher.js +1 -3
  29. package/dist/shell/src/AppShell.js +0 -14
  30. package/dist/shell/src/PageHeaderBar.js +0 -3
  31. package/dist/shell/src/SessionsHoverCard.js +0 -9
  32. package/dist/shell/src/SidePanelTabs.js +0 -36
  33. package/dist/shell/src/Sidebar.js +0 -1
  34. package/dist/shell/src/SidebarAccountMenu.js +1 -1
  35. package/dist/shell/src/SidebarChrome.js +0 -19
  36. package/dist/shell/src/SidebarIconTooltip.js +0 -1
  37. package/dist/shell/src/SidebarRail.js +0 -12
  38. package/dist/shell/src/SidebarResize.js +1 -4
  39. package/dist/shell/src/app-shell-classes.js +0 -10
  40. package/dist/shell/src/index.js +0 -1
  41. package/dist/shell/src/shell-panel-motion.js +0 -12
  42. package/dist/src/ai-elements/activity-shared.js +0 -6
  43. package/dist/src/ai-elements/activity-step-label.js +0 -6
  44. package/dist/src/ai-elements/activity-step-types.js +0 -4
  45. package/dist/src/ai-elements/activity-tasks-utils.js +0 -17
  46. package/dist/src/ai-elements/activity-tasks.js +0 -55
  47. package/dist/src/ai-elements/artifact.js +0 -4
  48. package/dist/src/ai-elements/attachments.js +0 -41
  49. package/dist/src/ai-elements/code-block.js +0 -18
  50. package/dist/src/ai-elements/collapsible-user-message-body.js +0 -2
  51. package/dist/src/ai-elements/context.js +0 -13
  52. package/dist/src/ai-elements/conversation.js +0 -4
  53. package/dist/src/ai-elements/jump-rail.js +0 -5
  54. package/dist/src/ai-elements/message.js +3 -9
  55. package/dist/src/ai-elements/model-picker-types.js +0 -1
  56. package/dist/src/ai-elements/model-picker.js +1 -6
  57. package/dist/src/ai-elements/model-selector.js +0 -4
  58. package/dist/src/ai-elements/prompt-input-speech.js +0 -13
  59. package/dist/src/ai-elements/prompt-input.js +0 -1
  60. package/dist/src/ai-elements/provider-icon.js +0 -4
  61. package/dist/src/ai-elements/queue.js +2 -16
  62. package/dist/src/ai-elements/shimmer.js +0 -14
  63. package/dist/src/ai-elements/speech-input.js +0 -7
  64. package/dist/src/artifacts/artifact-card.js +1 -1
  65. package/dist/src/artifacts/artifact-frame.js +0 -2
  66. package/dist/src/artifacts/artifact-viewer.js +2 -1
  67. package/dist/src/audio/playChime.js +0 -2
  68. package/dist/src/audio/playTone.js +1 -4
  69. package/dist/src/brand/AppWordmark.js +0 -5
  70. package/dist/src/brand/svg.js +0 -6
  71. package/dist/src/client.js +0 -43
  72. package/dist/src/composer/Composer.js +0 -27
  73. package/dist/src/composer/input-area/InputArea.js +0 -3
  74. package/dist/src/composer/input-area/InputAreaEditor.js +1 -50
  75. package/dist/src/composer/input-area/composerPrediction.js +0 -3
  76. package/dist/src/generative-ui/content.js +0 -2
  77. package/dist/src/generative-ui/index.js +0 -3
  78. package/dist/src/generative-ui/layout.js +0 -5
  79. package/dist/src/hooks/use-count-up-display.js +0 -2
  80. package/dist/src/hooks/use-idle-callback.js +0 -3
  81. package/dist/src/hooks/use-persisted-scroll-parent.js +1 -8
  82. package/dist/src/icons/animated/index.js +0 -4
  83. package/dist/src/icons/board-icon.js +74 -41
  84. package/dist/src/icons/bolt-icon.js +30 -20
  85. package/dist/src/icons/building-icon.js +125 -61
  86. package/dist/src/icons/files-icon.js +103 -43
  87. package/dist/src/icons/inbox-icon.js +101 -49
  88. package/dist/src/icons/index.js +2 -1
  89. package/dist/src/icons/memory-icon.js +135 -58
  90. package/dist/src/icons/search-icon.js +143 -46
  91. package/dist/src/icons/settings-icon.js +113 -53
  92. package/dist/src/icons/solid-icons.js +665 -0
  93. package/dist/src/icons/with-active.js +25 -0
  94. package/dist/src/index.js +0 -40
  95. package/dist/src/kibo/gantt-features.js +0 -10
  96. package/dist/src/kibo/gantt-provider.js +0 -34
  97. package/dist/src/kibo/kanban.js +0 -15
  98. package/dist/src/kibo/list.js +0 -3
  99. package/dist/src/kibo/video-player.js +0 -7
  100. package/dist/src/logos/index.js +0 -4
  101. package/dist/src/markdown/Markdown.js +0 -15
  102. package/dist/src/markdown/MarkdownCodeBlock.js +0 -16
  103. package/dist/src/markdown/MarkdownInlineCode.js +0 -6
  104. package/dist/src/markdown/MarkdownLink.js +0 -5
  105. package/dist/src/markdown/codeFence.js +0 -1
  106. package/dist/src/markdown/codeHighlight.js +0 -19
  107. package/dist/src/markdown/incrementalBlocks.js +0 -45
  108. package/dist/src/markdown/markdownClipboard.js +0 -13
  109. package/dist/src/markdown/mermaid.js +0 -25
  110. package/dist/src/markdown/rehypeGithubAlerts.js +0 -4
  111. package/dist/src/markdown/useSmoothText.js +0 -5
  112. package/dist/src/marketing/PricingModal.js +0 -2
  113. package/dist/src/marketing/ProductHero.js +0 -2
  114. package/dist/src/marketing/createLandingKit.js +0 -5
  115. package/dist/src/marketing/marketing-classes.js +0 -7
  116. package/dist/src/motion/dock-motion.js +0 -27
  117. package/dist/src/motion/panel-transition.js +0 -2
  118. package/dist/src/ui/_field-classes.js +0 -3
  119. package/dist/src/ui/_menu-classes.js +6 -6
  120. package/dist/src/ui/_picker-classes.js +0 -9
  121. package/dist/src/ui/accordion.alt.js +0 -12
  122. package/dist/src/ui/badge.js +0 -1
  123. package/dist/src/ui/border-beam.js +0 -2
  124. package/dist/src/ui/breadcrumb.js +0 -15
  125. package/dist/src/ui/bulk-action-bar.js +0 -11
  126. package/dist/src/ui/button.js +0 -20
  127. package/dist/src/ui/calendar.js +1 -20
  128. package/dist/src/ui/card.js +0 -3
  129. package/dist/src/ui/carousel.js +0 -1
  130. package/dist/src/ui/clear-input.alt.js +0 -9
  131. package/dist/src/ui/clearInputDissolve.js +0 -4
  132. package/dist/src/ui/command.js +0 -15
  133. package/dist/src/ui/confetti-burst.js +0 -3
  134. package/dist/src/ui/confirm-dialog-parts.js +0 -11
  135. package/dist/src/ui/confirm-dialog.js +0 -6
  136. package/dist/src/ui/context-menu.js +40 -34
  137. package/dist/src/ui/crossfade-icon.js +0 -2
  138. package/dist/src/ui/date-picker.js +0 -22
  139. package/dist/src/ui/dialog.js +0 -5
  140. package/dist/src/ui/dropdown-menu.js +40 -34
  141. package/dist/src/ui/empty-state.js +0 -7
  142. package/dist/src/ui/field.js +0 -21
  143. package/dist/src/ui/image-lightbox.js +0 -5
  144. package/dist/src/ui/input-group.alt.js +0 -24
  145. package/dist/src/ui/input-group.js +0 -4
  146. package/dist/src/ui/kbd.js +0 -3
  147. package/dist/src/ui/loading-state.js +0 -17
  148. package/dist/src/ui/marquee-on-hover.js +0 -3
  149. package/dist/src/ui/media-preview.js +0 -2
  150. package/dist/src/ui/modalTransition.js +0 -33
  151. package/dist/src/ui/overlay-a11y.js +0 -1
  152. package/dist/src/ui/page-title.js +0 -3
  153. package/dist/src/ui/refresh-spin-icon.js +0 -12
  154. package/dist/src/ui/search-input.js +0 -1
  155. package/dist/src/ui/select-field.js +0 -1
  156. package/dist/src/ui/send-queue-icon.js +0 -3
  157. package/dist/src/ui/sheet.js +0 -33
  158. package/dist/src/ui/slider.js +103 -82
  159. package/dist/src/ui/sonner-icons.js +0 -5
  160. package/dist/src/ui/sonner.js +0 -60
  161. package/dist/src/ui/spinner.js +0 -35
  162. package/dist/src/ui/status-dot.js +0 -2
  163. package/dist/src/ui/surface.js +0 -14
  164. package/dist/src/ui/switch.js +213 -36
  165. package/dist/src/ui/table.js +0 -1
  166. package/dist/src/ui/tabs-transition.js +0 -1
  167. package/dist/src/ui/tabs.js +0 -17
  168. package/dist/src/ui/tabsSliding.js +0 -6
  169. package/dist/src/ui/time-picker.js +0 -15
  170. package/dist/src/ui/toggle-search.js +0 -3
  171. package/dist/src/ui/ui-config.js +0 -16
  172. package/dist/src/utils/cat-color.js +0 -17
  173. package/dist/src/utils/cn.js +0 -5
  174. package/dist/src/utils/gesture.js +0 -8
  175. package/dist/src/utils/ref.js +0 -1
  176. package/dist/src/utils/runtimeVisibility.js +1 -22
  177. package/dist/src/utils/surface-radius.js +0 -11
  178. package/dist/src/utils/useDragSensors.js +0 -4
  179. package/dist/tokens/src/tailwind-preset.mjs +0 -3
  180. package/package.json +3 -3
  181. package/scripts/build-brand-assets.mjs +0 -8
  182. package/shell/src/AppShell.tsx +0 -37
  183. package/shell/src/AppSidebar.tsx +0 -14
  184. package/shell/src/ButtonTrack.tsx +0 -1
  185. package/shell/src/PageHeaderBar.tsx +0 -61
  186. package/shell/src/PageWrapper.tsx +0 -26
  187. package/shell/src/PillTabs.tsx +0 -1
  188. package/shell/src/SessionsHoverCard.tsx +0 -40
  189. package/shell/src/SidePanelTabs.tsx +0 -61
  190. package/shell/src/Sidebar.tsx +0 -1
  191. package/shell/src/SidebarAccountMenu.tsx +1 -41
  192. package/shell/src/SidebarChrome.tsx +0 -32
  193. package/shell/src/SidebarIconTooltip.tsx +0 -3
  194. package/shell/src/SidebarPanel.tsx +0 -20
  195. package/shell/src/SidebarRail.tsx +0 -44
  196. package/shell/src/SidebarResize.tsx +0 -6
  197. package/shell/src/SidebarUpgradeCard.tsx +0 -2
  198. package/shell/src/SignOutDialog.tsx +0 -6
  199. package/shell/src/app-shell-classes.ts +0 -15
  200. package/shell/src/index.ts +0 -1
  201. package/shell/src/shell-panel-motion.ts +0 -11
  202. package/shell/src/shell-variant.ts +0 -6
  203. package/src/ai-elements/__snapshots__/queue.test.tsx.snap +2 -2
  204. package/src/ai-elements/activity-question.tsx +0 -2
  205. package/src/ai-elements/activity-shared.tsx +0 -11
  206. package/src/ai-elements/activity-step-detail.tsx +0 -2
  207. package/src/ai-elements/activity-step-label.ts +0 -5
  208. package/src/ai-elements/activity-step-types.ts +0 -24
  209. package/src/ai-elements/activity-tasks-utils.ts +0 -13
  210. package/src/ai-elements/activity-tasks.tsx +0 -61
  211. package/src/ai-elements/artifact.tsx +0 -7
  212. package/src/ai-elements/attachments.tsx +0 -33
  213. package/src/ai-elements/chat-day-divider.tsx +0 -3
  214. package/src/ai-elements/chat-jump-rail.tsx +0 -9
  215. package/src/ai-elements/code-block.tsx +0 -28
  216. package/src/ai-elements/collapsible-user-message-body.tsx +0 -2
  217. package/src/ai-elements/context.tsx +0 -10
  218. package/src/ai-elements/conversation.tsx +0 -16
  219. package/src/ai-elements/jump-rail.tsx +0 -31
  220. package/src/ai-elements/message.tsx +3 -34
  221. package/src/ai-elements/model-picker-content.tsx +0 -17
  222. package/src/ai-elements/model-picker-types.ts +0 -5
  223. package/src/ai-elements/model-picker.tsx +0 -36
  224. package/src/ai-elements/model-selector.tsx +0 -5
  225. package/src/ai-elements/prompt-input-speech.tsx +0 -11
  226. package/src/ai-elements/prompt-input.tsx +0 -26
  227. package/src/ai-elements/provider-icon.tsx +0 -2
  228. package/src/ai-elements/queue.tsx +2 -20
  229. package/src/ai-elements/reasoning.tsx +0 -4
  230. package/src/ai-elements/shimmer.tsx +0 -16
  231. package/src/ai-elements/simple-model-ladder.tsx +0 -1
  232. package/src/ai-elements/speech-input.tsx +0 -6
  233. package/src/ai-elements/test-results.tsx +0 -5
  234. package/src/ai-elements/trace.tsx +0 -2
  235. package/src/ai-elements/web-preview.tsx +0 -7
  236. package/src/artifacts/artifact-card.tsx +1 -8
  237. package/src/artifacts/artifact-dialogs.tsx +0 -4
  238. package/src/artifacts/artifact-frame.tsx +0 -10
  239. package/src/artifacts/artifact-list-toolbar.tsx +0 -6
  240. package/src/artifacts/artifact-list.tsx +0 -4
  241. package/src/artifacts/artifact-type-icon.tsx +0 -1
  242. package/src/artifacts/artifact-versions-menu.tsx +0 -3
  243. package/src/artifacts/artifact-viewer.tsx +2 -6
  244. package/src/artifacts/types.ts +0 -1
  245. package/src/audio/playChime.ts +0 -1
  246. package/src/audio/playTone.ts +0 -7
  247. package/src/brand/AppIcons.tsx +0 -5
  248. package/src/brand/AppMark.tsx +0 -6
  249. package/src/brand/AppWordmark.tsx +0 -10
  250. package/src/brand/familyApps.ts +0 -2
  251. package/src/brand/svg.ts +0 -9
  252. package/src/client.ts +0 -34
  253. package/src/composer/Composer.tsx +0 -70
  254. package/src/composer/input-area/ComposerSlashMenu.tsx +0 -1
  255. package/src/composer/input-area/ConnectionStatusMenuItem.tsx +0 -2
  256. package/src/composer/input-area/FadePresence.tsx +0 -4
  257. package/src/composer/input-area/InputActions.tsx +0 -5
  258. package/src/composer/input-area/InputArea.tsx +1 -28
  259. package/src/composer/input-area/InputAreaEditor.tsx +0 -39
  260. package/src/composer/input-area/InputBanners.tsx +0 -1
  261. package/src/composer/input-area/PromoBanner.tsx +0 -1
  262. package/src/composer/input-area/composerPrediction.ts +0 -2
  263. package/src/composer/input-area/useComposerSlashMenu.ts +0 -1
  264. package/src/composer/input-area/useInputAreaPrediction.ts +0 -1
  265. package/src/composer/prediction.ts +0 -6
  266. package/src/composer/useComposerPrediction.ts +0 -2
  267. package/src/generative-ui/GenerativeUiPanel.tsx +0 -11
  268. package/src/generative-ui/content.tsx +0 -2
  269. package/src/generative-ui/index.ts +0 -3
  270. package/src/generative-ui/layout.tsx +0 -5
  271. package/src/hooks/use-count-up-display.ts +0 -1
  272. package/src/hooks/use-idle-callback.ts +0 -5
  273. package/src/hooks/use-persisted-scroll-parent.ts +0 -4
  274. package/src/hooks/use-single-flight.ts +0 -5
  275. package/src/icons/animated/animated-bell-icon.tsx +0 -6
  276. package/src/icons/animated/animated-counter.tsx +0 -5
  277. package/src/icons/animated/animated-key-icon.tsx +0 -4
  278. package/src/icons/animated/animated-notification-icon.tsx +0 -14
  279. package/src/icons/animated/animated-progress.tsx +0 -10
  280. package/src/icons/animated/animated-status-dot.tsx +0 -4
  281. package/src/icons/animated/index.ts +0 -4
  282. package/src/icons/animated/morphing-menu-icon.tsx +0 -5
  283. package/src/icons/animated/morphing-mic-icon.tsx +0 -2
  284. package/src/icons/animated/pulsing-rings.tsx +0 -4
  285. package/src/icons/automation-icon.tsx +0 -1
  286. package/src/icons/board-icon.tsx +13 -10
  287. package/src/icons/bolt-icon.tsx +5 -4
  288. package/src/icons/building-icon.tsx +11 -9
  289. package/src/icons/draft-icon.tsx +0 -1
  290. package/src/icons/files-icon.tsx +9 -5
  291. package/src/icons/inbox-arrow-icon.tsx +0 -1
  292. package/src/icons/inbox-icon.tsx +9 -5
  293. package/src/icons/index.ts +12 -1
  294. package/src/icons/memory-icon.tsx +9 -11
  295. package/src/icons/nav-icon-base.tsx +0 -10
  296. package/src/icons/search-icon.tsx +7 -6
  297. package/src/icons/settings-icon.tsx +11 -13
  298. package/src/icons/sidebar-toggle-icon.tsx +0 -1
  299. package/src/icons/solid-icons.tsx +138 -0
  300. package/src/icons/with-active.tsx +14 -0
  301. package/src/index.ts +0 -30
  302. package/src/kibo/gantt-features.tsx +0 -16
  303. package/src/kibo/gantt-header.tsx +0 -4
  304. package/src/kibo/gantt-provider.tsx +0 -36
  305. package/src/kibo/gantt-sidebar.tsx +0 -7
  306. package/src/kibo/gantt-timeline.tsx +0 -4
  307. package/src/kibo/kanban.tsx +0 -49
  308. package/src/kibo/list.tsx +0 -8
  309. package/src/kibo/theme-switcher.tsx +0 -5
  310. package/src/kibo/video-player.tsx +0 -9
  311. package/src/logos/index.ts +0 -3
  312. package/src/logos/logo-svg.tsx +0 -5
  313. package/src/markdown/Markdown.tsx +0 -20
  314. package/src/markdown/MarkdownCodeBlock.tsx +0 -14
  315. package/src/markdown/MarkdownInlineCode.tsx +0 -6
  316. package/src/markdown/MarkdownLink.tsx +0 -4
  317. package/src/markdown/codeFence.ts +0 -3
  318. package/src/markdown/codeHighlight.ts +0 -16
  319. package/src/markdown/incrementalBlocks.ts +0 -49
  320. package/src/markdown/markdownClipboard.ts +0 -12
  321. package/src/markdown/mermaid.ts +0 -22
  322. package/src/markdown/rehypeGithubAlerts.ts +0 -3
  323. package/src/markdown/useSmoothText.ts +0 -5
  324. package/src/marketing/FloatingBar.tsx +0 -3
  325. package/src/marketing/PricingModal.tsx +0 -45
  326. package/src/marketing/ProductHero.tsx +0 -23
  327. package/src/marketing/ProductHeroOrbit.tsx +0 -5
  328. package/src/marketing/SiteFooter.tsx +0 -23
  329. package/src/marketing/SiteHeader.tsx +0 -14
  330. package/src/marketing/VProPricingModal.tsx +0 -5
  331. package/src/marketing/createLandingKit.tsx +0 -12
  332. package/src/marketing/landing.tsx +0 -12
  333. package/src/marketing/marketing-classes.ts +0 -7
  334. package/src/motion/dock-motion.ts +0 -25
  335. package/src/motion/list-enter.tsx +0 -4
  336. package/src/motion/panel-transition.tsx +0 -5
  337. package/src/ui/_field-classes.ts +0 -2
  338. package/src/ui/_menu-classes.ts +7 -4
  339. package/src/ui/_menu-parts.tsx +0 -5
  340. package/src/ui/_picker-classes.ts +0 -6
  341. package/src/ui/accordion.alt.tsx +0 -8
  342. package/src/ui/accordion.tsx +0 -4
  343. package/src/ui/badge.tsx +0 -1
  344. package/src/ui/border-beam.tsx +0 -11
  345. package/src/ui/breadcrumb.tsx +0 -13
  346. package/src/ui/bulk-action-bar.tsx +0 -24
  347. package/src/ui/button.tsx +0 -27
  348. package/src/ui/calendar.tsx +0 -18
  349. package/src/ui/card.tsx +0 -3
  350. package/src/ui/carousel.tsx +0 -4
  351. package/src/ui/checkbox.tsx +0 -1
  352. package/src/ui/clear-input.alt.tsx +0 -8
  353. package/src/ui/clear-input.tsx +0 -16
  354. package/src/ui/clearInputDissolve.ts +0 -4
  355. package/src/ui/command.tsx +0 -22
  356. package/src/ui/confetti-burst.tsx +0 -4
  357. package/src/ui/confirm-dialog-parts.tsx +0 -45
  358. package/src/ui/confirm-dialog.tsx +0 -26
  359. package/src/ui/context-menu.tsx +4 -11
  360. package/src/ui/count-pop.tsx +0 -2
  361. package/src/ui/crossfade-icon.tsx +0 -3
  362. package/src/ui/date-picker.tsx +0 -40
  363. package/src/ui/dialog.tsx +0 -18
  364. package/src/ui/dropdown-menu.tsx +4 -12
  365. package/src/ui/empty-state.tsx +0 -15
  366. package/src/ui/error-boundary.tsx +0 -7
  367. package/src/ui/field.tsx +0 -18
  368. package/src/ui/hover-card.tsx +0 -6
  369. package/src/ui/image-lightbox.tsx +0 -7
  370. package/src/ui/input-group.alt.tsx +0 -16
  371. package/src/ui/input-group.tsx +0 -3
  372. package/src/ui/kbd.tsx +0 -3
  373. package/src/ui/label.tsx +0 -1
  374. package/src/ui/labeled-slider-row.tsx +0 -2
  375. package/src/ui/list-row.tsx +0 -46
  376. package/src/ui/loading-state.tsx +0 -23
  377. package/src/ui/marquee-on-hover.tsx +1 -6
  378. package/src/ui/media-preview.tsx +0 -5
  379. package/src/ui/modalTransition.ts +0 -25
  380. package/src/ui/overlay-a11y.ts +0 -1
  381. package/src/ui/page-title.tsx +0 -4
  382. package/src/ui/popover.tsx +0 -8
  383. package/src/ui/progress.tsx +0 -1
  384. package/src/ui/refresh-spin-icon.tsx +0 -11
  385. package/src/ui/relative-date-time.tsx +0 -3
  386. package/src/ui/rolling-number.tsx +0 -2
  387. package/src/ui/search-input.tsx +0 -9
  388. package/src/ui/select-field.tsx +0 -5
  389. package/src/ui/select.tsx +0 -8
  390. package/src/ui/send-queue-icon.tsx +0 -3
  391. package/src/ui/separator.tsx +0 -1
  392. package/src/ui/sheet.tsx +0 -42
  393. package/src/ui/slide-over-panel.tsx +0 -2
  394. package/src/ui/slider.tsx +21 -9
  395. package/src/ui/sonner-icons.tsx +0 -4
  396. package/src/ui/sonner.tsx +0 -78
  397. package/src/ui/spinner.tsx +0 -50
  398. package/src/ui/status-dot.tsx +0 -10
  399. package/src/ui/surface.tsx +0 -13
  400. package/src/ui/switch.tsx +72 -3
  401. package/src/ui/table.tsx +0 -3
  402. package/src/ui/tabs-transition.tsx +0 -12
  403. package/src/ui/tabs.tsx +0 -17
  404. package/src/ui/tabsSliding.ts +0 -5
  405. package/src/ui/time-picker.tsx +0 -17
  406. package/src/ui/toggle-search.tsx +0 -6
  407. package/src/ui/toolbar-search-input.tsx +0 -3
  408. package/src/ui/tooltip.tsx +0 -5
  409. package/src/ui/ui-config.tsx +0 -19
  410. package/src/utils/cat-color.ts +0 -20
  411. package/src/utils/cn.ts +0 -4
  412. package/src/utils/gesture.ts +0 -8
  413. package/src/utils/ref.ts +0 -1
  414. package/src/utils/runtimeVisibility.ts +0 -19
  415. package/src/utils/surface-radius.ts +0 -11
  416. package/src/utils/useDragSensors.ts +0 -2
  417. package/tokens/examples/compat-shadcn-rgb/vite.config.ts +0 -2
  418. package/tokens/examples/toaster/Fixture.tsx +0 -4
  419. package/tokens/examples/toaster/UpdateToastFixture.tsx +0 -4
  420. package/tokens/examples/toaster/vite.config.ts +0 -2
  421. package/tokens/examples/tokens-moved/Fixture.tsx +0 -4
  422. package/tokens/examples/tokens-moved/vite.config.ts +0 -2
  423. package/tokens/src/tailwind-preset.mjs +0 -3
@@ -15,7 +15,6 @@ interface LabeledSliderRowProps {
15
15
  step?: number;
16
16
  disabled?: boolean;
17
17
  icon?: ReactNode;
18
- /** Formats the right-aligned value display. Default joins the values with an en dash. */
19
18
  formatValue?: (value: number[]) => ReactNode;
20
19
  minLabel?: ReactNode;
21
20
  maxLabel?: ReactNode;
@@ -62,7 +61,6 @@ export function LabeledSliderRow({
62
61
  {formatValue(value)}
63
62
  </output>
64
63
  </div>
65
- {/* The thumb is a span, which `htmlFor` cannot name, so aria-labelledby carries the name unless thumbLabels does. */}
66
64
  <Slider
67
65
  id={id}
68
66
  aria-labelledby={thumbLabels ? undefined : labelId}
@@ -54,64 +54,25 @@ export interface ListRowProps extends Omit<
54
54
  "onClick" | "children"
55
55
  > {
56
56
  children: React.ReactNode;
57
- /**
58
- * Background class for the 4px stripe down the leading edge — the row's
59
- * status colour. Omit for rows that carry no status.
60
- */
61
57
  accentClassName?: string;
62
- /** Current row. Fills the surface and recolours the hairline. */
63
58
  selected?: boolean;
64
- /**
65
- * Router link (or any single element) used as the stretched overlay. Props
66
- * are merged via Radix `Slot`. Prefer this over {@link href} for in-app
67
- * navigation so rewrites apply to the rendered `href`.
68
- */
69
59
  link?: React.ReactElement;
70
- /**
71
- * Renders the overlay as a raw `<a>`. Use for external URLs. In-app paths
72
- * should use {@link link} instead.
73
- */
74
60
  href?: string;
75
- /**
76
- * Fires on plain (non-modified) clicks. With {@link link}, call
77
- * `event.preventDefault()` to cancel navigation (e.g. selection mode). With
78
- * {@link href}, the row always prevents the browser navigation and expects
79
- * this handler to navigate in-app if needed.
80
- */
81
61
  onClick?: (event: React.MouseEvent<HTMLElement>) => void;
82
- /**
83
- * Names the row for screen readers, since the overlay has no text of its own.
84
- * Lands on the overlay rather than the shell, so it labels the control that
85
- * actually carries the role.
86
- */
87
62
  "aria-label"?: string;
88
63
  className?: string;
89
- /** Padding for the row body. Defaults to the standard row inset. */
90
64
  contentClassName?: string;
91
- /** Content layered behind the row body, such as a hover glow. */
92
65
  decoration?: React.ReactNode;
93
66
  }
94
67
 
95
68
  export interface ListRowConfig {
96
- /**
97
- * Replaces the built-in classes of a part. The row is `root`, plus
98
- * `interactive` when it has a `link`, `href` or `onClick`, plus `selected`
99
- * or `idle`.
100
- */
101
69
  classes?: {
102
- /** Shell: radius, clipping, transition and the overlay focus ring. */
103
70
  root?: string;
104
- /** Press feedback, added when the row is interactive. */
105
71
  interactive?: string;
106
- /** Fill and ring of the current row. */
107
72
  selected?: string;
108
- /** Fill and hover of every other row. */
109
73
  idle?: string;
110
- /** The 4px status stripe (its colour comes from `accentClassName`). */
111
74
  accent?: string;
112
- /** The stretched `<button>` / `<a>` / `link` overlay. */
113
75
  overlay?: string;
114
- /** Row body padding (a caller `contentClassName` merges after it). */
115
76
  content?: string;
116
77
  };
117
78
  }
@@ -181,12 +142,9 @@ const ListRow = React.forwardRef<HTMLDivElement, ListRowProps>(function ListRow(
181
142
  aria-label={ariaLabel}
182
143
  className={overlayClasses}
183
144
  onClick={(event: React.MouseEvent<HTMLElement>) => {
184
- // Modified clicks are for new tab / window — leave navigation alone.
185
145
  if (!isModifiedClick(event)) {
186
146
  onClick?.(event);
187
147
  }
188
- // Own the click so a wrapping parent (e.g. KanbanCard) does not
189
- // also treat it as a row activation.
190
148
  event.stopPropagation();
191
149
  }}
192
150
  >
@@ -197,10 +155,6 @@ const ListRow = React.forwardRef<HTMLDivElement, ListRowProps>(function ListRow(
197
155
  href={href}
198
156
  onClick={(event) => {
199
157
  if (onClick === undefined) return;
200
- // A modified click is the entire reason this is an `<a>` — let the
201
- // browser open the new tab or window itself. A plain click is
202
- // handled in-app, so the navigation has to be cancelled or the
203
- // row would also hard-reload the page out from under the router.
204
158
  if (isModifiedClick(event)) return;
205
159
  event.preventDefault();
206
160
  onClick(event);
@@ -35,15 +35,10 @@ export type LoadingStateSize = "default" | "sm";
35
35
  export type LoadingStateColors = readonly [string, string, string];
36
36
 
37
37
  export interface LoadingStateConfig {
38
- /** Default for the `label` prop. */
39
38
  label?: string;
40
- /** Default for the `colors` prop. */
41
39
  colors?: LoadingStateColors;
42
- /** Default for the `labelStyle` prop. */
43
40
  labelStyle?: CSSProperties;
44
- /** Replaces the built-in classes of a part. */
45
41
  classes?: {
46
- /** The label text. Default `text-sm font-medium text-muted-foreground`. */
47
42
  label?: string;
48
43
  };
49
44
  }
@@ -52,7 +47,6 @@ const SIZE_TOKENS: Record<
52
47
  LoadingStateSize,
53
48
  { cellPx: number; gapPx: number; radiusClass: string }
54
49
  > = {
55
- // 3×3px + 2×1px gaps = 11px.
56
50
  sm: { cellPx: 3, gapPx: 1, radiusClass: "rounded-[0.5px]" },
57
51
  default: { cellPx: 4, gapPx: 1.5, radiusClass: "rounded-[1px]" },
58
52
  };
@@ -82,15 +76,8 @@ const DEFAULT_COLORS: LoadingStateColors = ["currentColor", "currentColor", "cur
82
76
 
83
77
  const defaultLabelClass = "text-sm font-medium text-muted-foreground";
84
78
 
85
- /** Started on attach, cancelled on detach. `undefined` for a gap cell. */
86
79
  type PulseRef = ((cell: HTMLSpanElement) => () => void) | undefined;
87
80
 
88
- /**
89
- * One ref callback per cell. The easing sits on the keyframes, not in the
90
- * options, because CSS applies `animation-timing-function` per segment —
91
- * as an option it would ease the whole cycle instead. No `fill`, so during
92
- * its delay a cell keeps the static inline opacity, as under CSS.
93
- */
94
81
  function pulseRefs(delays: (number | null)[], dur: number): PulseRef[] {
95
82
  return delays.map((d) =>
96
83
  d === null
@@ -109,12 +96,6 @@ function pulseRefs(delays: (number | null)[], dur: number): PulseRef[] {
109
96
  );
110
97
  }
111
98
 
112
- /**
113
- * Built once per variant, because these identities have to be stable: a ref
114
- * callback built during render would be a new function every render, and React
115
- * detaches and reattaches on identity change — restarting the pulse each time
116
- * (the labelled variant re-renders 10×/s off `useElapsed`).
117
- */
118
99
  const PULSE_REFS: Record<LoadingStateVariant, PulseRef[]> = {
119
100
  Drive: pulseRefs(PATTERNS.Drive.delays, PATTERNS.Drive.dur),
120
101
  Dots: pulseRefs(PATTERNS.Dots.delays, PATTERNS.Dots.dur),
@@ -139,15 +120,11 @@ function useElapsed(enabled: boolean) {
139
120
  }
140
121
 
141
122
  export interface LoadingStateProps {
142
- /** Label text, also the `aria-label` when `iconOnly`. Default `UiConfig.LoadingState.label`, else `"Working"`. */
143
123
  label?: string;
144
124
  variant?: LoadingStateVariant;
145
125
  size?: LoadingStateSize;
146
- /** Pixel grid only — no label or elapsed timer. */
147
126
  iconOnly?: boolean;
148
- /** Column colours. Default `UiConfig.LoadingState.colors`, else `currentColor`. */
149
127
  colors?: LoadingStateColors;
150
- /** Inline style for the label, e.g. a shimmer gradient. Default `UiConfig.LoadingState.labelStyle`. */
151
128
  labelStyle?: CSSProperties;
152
129
  }
153
130
 
@@ -1,9 +1,7 @@
1
1
  import { useEffect, useRef, type ReactNode } from "react";
2
2
  import { useCn } from "./ui-config";
3
3
 
4
- /** Pixels per second the revealed text travels: constant speed, so long labels do not whip by. */
5
4
  const MARQUEE_SPEED_PX_PER_S = 60;
6
- /** Clamp the scroll duration so very short and very long overflows both stay readable. */
7
5
  const MIN_DURATION_S = 0.5;
8
6
  const MAX_DURATION_S = 5;
9
7
 
@@ -29,8 +27,6 @@ export function MarqueeOnHover({ children, className }: MarqueeOnHoverProps) {
29
27
  const hostRef = useRef<HTMLSpanElement>(null);
30
28
  const innerRef = useRef<HTMLSpanElement>(null);
31
29
 
32
- // Re-measure after a content change, a host resize or the web font swap,
33
- // since each changes how much (if at all) the text overflows.
34
30
  useEffect(() => {
35
31
  const host = hostRef.current;
36
32
  const inner = innerRef.current;
@@ -43,9 +39,8 @@ export function MarqueeOnHover({ children, className }: MarqueeOnHoverProps) {
43
39
  cancelAnimationFrame(raf);
44
40
  raf = requestAnimationFrame(() => {
45
41
  const shift = Math.max(0, inner.scrollWidth - host.clientWidth);
46
- const overflows = shift > 1; // 1px guard against sub-pixel rounding jitter
42
+ const overflows = shift > 1;
47
43
  host.dataset.mqOverflow = overflows ? "true" : "false";
48
- // Native tooltip is the touch / long-hover fallback, only when truncated.
49
44
  host.title = overflows ? (inner.textContent ?? "") : "";
50
45
  if (overflows) {
51
46
  const duration = Math.min(
@@ -16,7 +16,6 @@ import {
16
16
  import { ImageLightbox, type GalleryImage } from "./image-lightbox";
17
17
  import { useCn } from "./ui-config";
18
18
 
19
- /** Hairline ring that separates media from any surface, in light and dark. */
20
19
  const MEDIA_OUTLINE = "ring-1 ring-black/10 dark:ring-white/10";
21
20
 
22
21
  /**
@@ -65,7 +64,6 @@ export function ImageGalleryPreview({ images }: { images: GalleryImage[] }) {
65
64
  onClick={() => setLightboxIndex(index)}
66
65
  className={cn(
67
66
  "relative block cursor-pointer motion-press active:scale-[0.99]",
68
- // Three images: first tile spans the left column, Twitter-style.
69
67
  count === 3 && index === 0 ? "row-span-2 h-full" : undefined,
70
68
  )}
71
69
  >
@@ -115,9 +113,6 @@ export function VideoPreview({
115
113
  preload="metadata"
116
114
  slot="media"
117
115
  />
118
- {/* Nine controls do not fit a phone-width bar. Playback rate and the
119
- volume slider drop out below `sm` — a phone has hardware volume keys,
120
- and everything essential (play, scrub, time, mute, fullscreen) stays. */}
121
116
  <VideoPlayerControlBar>
122
117
  <VideoPlayerPlayButton />
123
118
  <VideoPlayerSeekBackwardButton />
@@ -2,19 +2,10 @@ import { prefersReducedMotion } from "./overlay-a11y";
2
2
 
3
3
  const closeTimers = new WeakMap<HTMLElement, ReturnType<typeof setTimeout>>();
4
4
 
5
- /*
6
- * Grow from the trigger (macOS-style): a modal opened by a press grows out of
7
- * the pressed point and shrinks back into it on close. Opened from the
8
- * keyboard, it grows out of the focused control. With neither (a shortcut, an
9
- * async open), it keeps the centred `--modal-scale` zoom.
10
- */
11
5
  const TRIGGER_SCALE = 0.4;
12
- /** A press older than this did not open the modal (it was an async open). */
13
6
  const PRESS_WINDOW_MS = 500;
14
7
  let lastPress: { x: number; y: number; at: number } | null = null;
15
8
 
16
- // From module load, not the first modal: the press that opens the first
17
- // modal comes before any modal connects.
18
9
  if (typeof document !== "undefined") {
19
10
  document.addEventListener(
20
11
  "pointerdown",
@@ -41,23 +32,15 @@ function triggerPoint(el: HTMLElement): { x: number; y: number } | null {
41
32
  return null;
42
33
  }
43
34
 
44
- /**
45
- * Points the surface's transform origin at the trigger and widens its zoom.
46
- * Skips instant surfaces (`--modal-scale: 1`, the command palette). Measured
47
- * from the box centre, which a centred scale does not move.
48
- */
49
35
  function aimAtTrigger(el: HTMLElement): void {
50
36
  if (getComputedStyle(el).getPropertyValue("--modal-scale").trim() === "1") {
51
37
  return;
52
38
  }
53
39
  const point = triggerPoint(el);
54
- // No layout (jsdom, a hidden host): nothing to aim from.
55
40
  if (point === null || el.offsetWidth === 0) return;
56
41
  const r = el.getBoundingClientRect();
57
42
  const left = r.left + r.width / 2 - el.offsetWidth / 2;
58
43
  const top = r.top + r.height / 2 - el.offsetHeight / 2;
59
- // Measuring fixed the 0.96 start as the before-change style, so jump to
60
- // the trigger start without a transition, or it would tween there first.
61
44
  el.style.transition = "none";
62
45
  el.style.transformOrigin = `${point.x - left}px ${point.y - top}px`;
63
46
  el.style.setProperty("--modal-scale", String(TRIGGER_SCALE));
@@ -82,14 +65,12 @@ function clearCloseTimer(el: HTMLElement): void {
82
65
  }
83
66
  }
84
67
 
85
- // open: scales up from, modal, scale clears any in, flight close cleanup
86
68
  function openModalSurface(el: HTMLElement): void {
87
69
  clearCloseTimer(el);
88
70
  el.classList.remove("is-closing");
89
71
  el.classList.add("is-open");
90
72
  }
91
73
 
92
- // close: swap to is, closing, remove after, modal, close, dur
93
74
  function closeModalSurface(el: HTMLElement): void {
94
75
  clearCloseTimer(el);
95
76
  el.classList.remove("is-open");
@@ -106,7 +87,6 @@ function closeModalSurface(el: HTMLElement): void {
106
87
  closeTimers.set(el, timer);
107
88
  }
108
89
 
109
- // first paint entrance, start at resting scale, then open on next frame
110
90
  function primeModalSurface(el: HTMLElement): void {
111
91
  clearCloseTimer(el);
112
92
  el.classList.remove("is-open", "is-closing");
@@ -120,7 +100,6 @@ function primeModalSurface(el: HTMLElement): void {
120
100
  });
121
101
  }
122
102
 
123
- // sync is, open / is, closing with radix data, state on the same node
124
103
  function syncModalSurfaceFromDataState(el: HTMLElement): void {
125
104
  const state = el.getAttribute("data-state");
126
105
  if (state === "open") {
@@ -141,11 +120,7 @@ function disconnectModalSurface(el: HTMLElement): void {
141
120
  clearCloseTimer(el);
142
121
  }
143
122
 
144
- // wire radix data, state → is, open / is, closing on the dialog surface
145
- // call from the content ref callback so portal, mounted nodes are never missed
146
123
  export function connectModalSurface(el: HTMLElement): () => void {
147
- // A content re-render can re-run the ref (a new `ref` prop): a surface
148
- // that is already open stays put, or it replayed its entrance mid-view.
149
124
  if (
150
125
  el.getAttribute("data-state") === "open" &&
151
126
  !el.classList.contains("is-open")
@@ -140,7 +140,6 @@ export function treeHasDialogDescription(
140
140
  if (!React.isValidElement(child)) return false;
141
141
  const type = child.type;
142
142
  if (type === descriptionType) return true;
143
- // Wrappers named like `ConfirmDialog.Description` count too.
144
143
  const displayName =
145
144
  (typeof type === "function" || (typeof type === "object" && type !== null)) &&
146
145
  "displayName" in type
@@ -4,20 +4,16 @@ import { cn } from "../utils/cn";
4
4
  /** The page title class contract: Instrument Sans (the sans token), 20px, weight 600, never lighter. Same string as `Breadcrumb`. */
5
5
  export const pageTitleClass = "text-xl font-semibold leading-tight tracking-tight";
6
6
 
7
- /** Page title: `h1`, `text-xl font-semibold leading-tight tracking-tight`. */
8
7
  const PageTitle = React.forwardRef<HTMLHeadingElement, React.HTMLAttributes<HTMLHeadingElement>>(
9
8
  ({ className, ...props }, ref) => <h1 ref={ref} className={cn(pageTitleClass, className)} {...props} />,
10
9
  );
11
10
  PageTitle.displayName = "PageTitle";
12
11
 
13
12
  export type PageHeaderProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
14
- /** Title text or node, rendered in `PageTitle`. */
15
13
  title: React.ReactNode;
16
- /** Right-aligned slot, for example a button. */
17
14
  action?: React.ReactNode;
18
15
  };
19
16
 
20
- /** Title row: `PageTitle` with an optional `action` slot. No safe-area padding (web). */
21
17
  const PageHeader = React.forwardRef<HTMLElement, PageHeaderProps>(({ title, action, className, ...props }, ref) => (
22
18
  <header ref={ref} className={cn("flex min-w-0 items-center justify-between gap-3 px-4 py-4 sm:px-6", className)} {...props}>
23
19
  <PageTitle className="min-w-0 truncate">{title}</PageTitle>
@@ -11,11 +11,8 @@ type PopoverContentProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitiv
11
11
 
12
12
  /** App defaults for `Popover*` (see `UiConfigProvider`). */
13
13
  export interface PopoverConfig {
14
- /** Replaces the built-in classes of a part. */
15
14
  classes?: { trigger?: string; content?: string };
16
- /** Default for `PopoverContent` `sideOffset`. */
17
15
  sideOffset?: number;
18
- /** Default for `PopoverContent` `collisionPadding` (built-in: `8`). */
19
16
  collisionPadding?: PopoverContentProps["collisionPadding"];
20
17
  }
21
18
 
@@ -28,8 +25,6 @@ const PopoverTrigger = React.forwardRef<
28
25
  >((props, ref) => {
29
26
  const trigger = useUiConfig("Popover")?.classes?.trigger;
30
27
  const merge = useCn();
31
- // Without config, pass props untouched: Radix's Slot turns an explicit
32
- // `className={undefined}` into `class=""`.
33
28
  if (trigger === undefined) return <PopoverPrimitive.Trigger ref={ref} {...props} />;
34
29
  const { className, ...rest } = props;
35
30
  return <PopoverPrimitive.Trigger ref={ref} className={merge(trigger, className)} {...rest} />;
@@ -39,9 +34,6 @@ PopoverTrigger.displayName = PopoverPrimitive.Trigger.displayName;
39
34
  const PopoverContent = React.forwardRef<
40
35
  React.ComponentRef<typeof PopoverPrimitive.Content>,
41
36
  PopoverContentProps & {
42
- /**
43
- * Grow from the trigger and, on small screens, cap width and height.
44
- */
45
37
  fitViewport?: boolean;
46
38
  }
47
39
  >(({ className, align = "center", sideOffset, fitViewport, collisionPadding, ...props }, ref) => {
@@ -3,7 +3,6 @@ import * as ProgressPrimitive from "@radix-ui/react-progress";
3
3
  import { useCn, useUiConfig } from "./ui-config";
4
4
 
5
5
  export interface ProgressConfig {
6
- /** Replaces the built-in classes of a part. A part left out keeps its default. */
7
6
  classes?: { root?: string; indicator?: string };
8
7
  }
9
8
 
@@ -3,17 +3,6 @@ import { CrossfadeIcon } from "./crossfade-icon";
3
3
  import { Spinner } from "./spinner";
4
4
  import { useCn } from "./ui-config";
5
5
 
6
- /**
7
- * Refresh glyph for a control that reloads something: it crossfades to
8
- * the `circle` {@link Spinner} while the action is in flight.
9
- *
10
- * One component so every toolbar swaps glyph and spinner the same way, with
11
- * the `soft` crossfade.
12
- *
13
- * `className` sizes the slot and both glyphs. Inside a `Button`, the button's
14
- * `[&_svg]:size-*` rule wins on specificity, so pass a matching size to keep
15
- * the slot and the glyph the same box.
16
- */
17
6
  function RefreshSpinIcon({
18
7
  busy,
19
8
  className = "size-4",
@@ -4,11 +4,8 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip";
4
4
  import { useCn } from "./ui-config";
5
5
 
6
6
  export interface RelativeDateTimeProps {
7
- /** Unix ms. When omitted, renders `emptyLabel` with no tooltip. */
8
7
  at?: number;
9
- /** Shown when `at` is missing. Default `"—"`. */
10
8
  emptyLabel?: string;
11
- /** dayjs format for the tooltip. Default `"DD/MM/YYYY HH:mm"`. */
12
9
  exactFormat?: string;
13
10
  className?: string;
14
11
  }
@@ -42,12 +42,10 @@ export function RollingNumber({ value, className }: { value: string; className?:
42
42
  function DigitColumn({ digit }: { digit: number }) {
43
43
  return (
44
44
  <span aria-hidden className="relative inline-block h-[1lh] overflow-hidden">
45
- {/* Holds the width of one digit; the moving column is absolute. */}
46
45
  <span className="invisible">0</span>
47
46
  <m.span
48
47
  className="absolute inset-x-0 top-0 flex flex-col"
49
48
  initial={false}
50
- // The column is ten rows tall, so one row is 10% of its height.
51
49
  animate={{ y: `${-digit * 10}%` }}
52
50
  transition={springTransition}
53
51
  >
@@ -7,7 +7,6 @@ import { useCn, useUiConfig } from "./ui-config";
7
7
  const sizeClasses = {
8
8
  sm: { input: "h-8 pl-8 text-base sm:pointer-fine:text-sm", icon: "left-2" },
9
9
  md: { input: "h-10 pl-9", icon: "left-3" },
10
- // Alias of `md`.
11
10
  default: { input: "h-10 pl-9", icon: "left-3" },
12
11
  };
13
12
 
@@ -29,28 +28,20 @@ type EnterKeyHint = React.InputHTMLAttributes<HTMLInputElement>["enterKeyHint"];
29
28
  */
30
29
  export interface SearchInputConfig {
31
30
  classes?: { wrapper?: string; input?: string; icon?: string };
32
- /** Search icon size in px. Default `16`. */
33
31
  iconSize?: number;
34
32
  label?: string | false;
35
33
  placeholder?: string;
36
34
  clearLabel?: string;
37
35
  enterKeyHint?: EnterKeyHint | false;
38
- /** Element that receives `className`: `"input"` (default) or `"wrapper"`. */
39
36
  classNameTarget?: "input" | "wrapper";
40
37
  }
41
38
 
42
39
  export interface SearchInputProps extends Omit<ClearInputProps, "leading" | "size"> {
43
- /** `aria-label`, and the placeholder when `placeholder` is not set. Default `"Search"`. */
44
40
  label?: string;
45
- /** Key hint shown on the right while the value is empty, such as `"/"` or `"⌘K"`. */
46
41
  shortcut?: string;
47
- /** `sm` is `h-8`; `md` and its alias `default` are `h-10`. Default `"sm"`. */
48
42
  size?: keyof typeof sizeClasses;
49
- /** `toolbar`: transparent until hover or focus, fixed width from `sm`. Default `"default"`. */
50
43
  variant?: keyof typeof variantClasses;
51
- /** Called after `onChange` whenever the value becomes empty (typed away or cleared). */
52
44
  onClear?: () => void;
53
- /** Classes for the input, merged after `className` when that also targets the input. */
54
45
  inputClassName?: string;
55
46
  }
56
47
 
@@ -4,23 +4,18 @@ import { Label } from "./label";
4
4
  import { Select, SelectContent, SelectTrigger, SelectValue } from "./select";
5
5
 
6
6
  export interface SelectFieldProps {
7
- /** Merged onto the trigger. */
8
7
  className?: string;
9
- /** `SelectItem` elements. */
10
8
  children?: React.ReactNode;
11
9
  label?: React.ReactNode;
12
10
  placeholder?: string;
13
- /** An empty string shows the placeholder. */
14
11
  value?: string;
15
12
  onValueChange?: (value: string) => void;
16
13
  disabled?: boolean;
17
14
  name?: string;
18
- /** Set on the trigger; the label points at it. */
19
15
  id?: string;
20
16
  "aria-label"?: string;
21
17
  }
22
18
 
23
- /** Labelled single select built from the `Select` primitives. */
24
19
  function SelectField({
25
20
  className,
26
21
  children,
package/src/ui/select.tsx CHANGED
@@ -11,31 +11,23 @@ import { useCn, useUiConfig } from "./ui-config";
11
11
 
12
12
  /** App defaults for `Select*` (see `UiConfigProvider`). */
13
13
  export interface SelectConfig {
14
- /** Replaces the built-in classes of a part. */
15
14
  classes?: {
16
15
  trigger?: string;
17
- /** Both scroll buttons. */
18
16
  scrollButton?: string;
19
17
  content?: string;
20
- /** Viewport classes for every `position`. */
21
18
  viewport?: string;
22
- /** Extra viewport classes for `position="popper"`. */
23
19
  popperViewport?: string;
24
20
  label?: string;
25
21
  item?: string;
26
22
  separator?: string;
27
23
  };
28
- /** Replace the built-in icons. */
29
24
  icons?: {
30
25
  trigger?: React.ReactNode;
31
26
  scrollUp?: React.ReactNode;
32
27
  scrollDown?: React.ReactNode;
33
- /** `SelectItem` indicator. */
34
28
  check?: React.ReactNode;
35
29
  };
36
- /** Adds `data-slot="select-trigger"` to the trigger, for parent selectors such as `ButtonGroup`'s (built-in: `true`). */
37
30
  triggerSlot?: boolean;
38
- /** Default for `SelectContent` `collisionPadding` (built-in: `8`). */
39
31
  collisionPadding?: number | Partial<Record<"top" | "right" | "bottom" | "left", number>>;
40
32
  }
41
33
 
@@ -10,9 +10,6 @@ interface Segment {
10
10
 
11
11
  type Shape = readonly [Segment, Segment, Segment];
12
12
 
13
- // Both shapes use the same three lines, so the arrow's own strokes move into
14
- // the queue bars instead of one icon fading out and another fading in.
15
- // Arrow points match Tabler's `IconArrowUp` on its 24px grid.
16
13
  const ARROW: Shape = [
17
14
  { x1: 6, y1: 11, x2: 12, y2: 5 },
18
15
  { x1: 12, y1: 5, x2: 12, y2: 19 },
@@ -3,7 +3,6 @@ import * as SeparatorPrimitive from "@radix-ui/react-separator";
3
3
  import { useCn, useUiConfig } from "./ui-config";
4
4
 
5
5
  export interface SeparatorConfig {
6
- /** Replaces the built-in classes of a part. `root` excludes the orientation size classes. */
7
6
  classes?: { root?: string };
8
7
  }
9
8
 
package/src/ui/sheet.tsx CHANGED
@@ -11,8 +11,6 @@ import {
11
11
 
12
12
  type SheetSide = "top" | "bottom" | "left" | "right";
13
13
 
14
- // vaul animates and drags from the Root's `direction`; SheetContent reads it
15
- // so `<Sheet direction="right">` places the panel on the right by default.
16
14
  const SheetDirectionContext = React.createContext<SheetSide>("bottom");
17
15
 
18
16
  function Sheet({
@@ -57,7 +55,6 @@ const SheetOverlay = React.forwardRef<
57
55
  ));
58
56
  SheetOverlay.displayName = "SheetOverlay";
59
57
 
60
- // Position and size. Stays on the element vaul moves.
61
58
  const sheetSideLayoutClass: Record<SheetSide, string> = {
62
59
  bottom:
63
60
  "inset-x-0 bottom-[var(--overlay-vv-bottom,0px)] mt-24 flex max-h-[min(96dvh,calc(var(--overlay-vv-height,100dvh)-1.5rem))] h-auto flex-col",
@@ -66,7 +63,6 @@ const sheetSideLayoutClass: Record<SheetSide, string> = {
66
63
  right: "inset-y-2 left-auto right-2 flex h-auto w-80 max-w-[88vw] flex-col",
67
64
  };
68
65
 
69
- // Corners and safe-area padding. Go on the visible surface.
70
66
  const sheetSideSurfaceClass: Record<SheetSide, string> = {
71
67
  bottom: "rounded-t-2xl pb-[max(0.75rem,env(safe-area-inset-bottom,0px))]",
72
68
  top: "rounded-b-2xl pt-[max(0.75rem,env(safe-area-inset-top,0px))]",
@@ -74,29 +70,15 @@ const sheetSideSurfaceClass: Record<SheetSide, string> = {
74
70
  right: "rounded-2xl",
75
71
  };
76
72
 
77
- // Without `motionBlur`, one element is both the moving part and the surface.
78
73
  const sheetContentClass =
79
74
  "fixed z-50 overflow-y-auto bg-overlay/95 text-overlay-foreground smooth-shadow-ring-xl outline-hidden backdrop-blur-xl motion-reduce:transition-none";
80
75
 
81
- // With `motionBlur`, the element vaul moves has to stay transparent, because the
82
- // blur is drawn into its first child. It also stops clipping (no overflow), so
83
- // the streak and the surface shadow can reach past its edges. `after:hidden`
84
- // drops vaul's `::after` fill: it inherits the now transparent background, and
85
- // the old `overflow-y-auto` clipped it anyway.
86
76
  const sheetBlurHostClass =
87
77
  "fixed z-50 outline-hidden motion-reduce:transition-none after:hidden";
88
78
 
89
- // The visible surface inside it. It fills the host and is the scroll container.
90
79
  const sheetBlurSurfaceClass =
91
80
  "flex min-h-0 flex-auto flex-col overflow-y-auto bg-overlay/95 text-overlay-foreground smooth-shadow-ring-xl backdrop-blur-xl";
92
81
 
93
- /**
94
- * `@web-kits/motion-blur` reads transforms with `DOMMatrix` and the computed
95
- * `translate`, polls `getAnimations()` and checks `matchMedia`, and throws
96
- * without them. jsdom, happy-dom and browsers without the individual transform
97
- * properties lack some of these, so the blur stays off there and the sheet
98
- * still renders.
99
- */
100
82
  function supportsMotionBlur(node: HTMLElement): boolean {
101
83
  return (
102
84
  typeof DOMMatrix === "function" &&
@@ -108,11 +90,6 @@ function supportsMotionBlur(node: HTMLElement): boolean {
108
90
 
109
91
  const syncedEchoCopies = new WeakSet<Element>();
110
92
 
111
- /**
112
- * Echo draws copies of the surface next to it, and a fresh copy starts at
113
- * scroll 0. Give each copy the surface's scroll once, so a scrolled sheet does
114
- * not flash its top while it closes.
115
- */
116
93
  function syncEchoScroll(host: HTMLElement): void {
117
94
  const surface = host.firstElementChild;
118
95
  if (!(surface instanceof HTMLElement)) return;
@@ -127,22 +104,8 @@ function syncEchoScroll(host: HTMLElement): void {
127
104
  const SheetContent = React.forwardRef<
128
105
  React.ComponentRef<typeof DrawerPrimitive.Content>,
129
106
  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content> & {
130
- /** Defaults to the parent Sheet's `direction`. */
131
107
  side?: SheetSide;
132
- /**
133
- * Blur the sheet while it slides in, out or is dragged, with
134
- * `@web-kits/motion-blur` (Echo, 180° shutter). Off under
135
- * `prefers-reduced-motion`. When `true`, the content element moves and
136
- * stays transparent, and an inner `data-slot="sheet-surface"` div holds the
137
- * fill, shadow, corners and scroll. `className` then styles the moving
138
- * element only (size, position); use `surfaceClassName` for the surface.
139
- * Default `false`.
140
- */
141
108
  motionBlur?: boolean;
142
- /**
143
- * Classes for the visible surface: the inner div when `motionBlur` is on,
144
- * otherwise the content element itself (after `className`).
145
- */
146
109
  surfaceClassName?: string;
147
110
  }
148
111
  >(({ className, children, side: sideProp, motionBlur = false, surfaceClassName, ...props }, ref) => {
@@ -155,7 +118,6 @@ const SheetContent = React.forwardRef<
155
118
  const onBlurFrame = React.useCallback(() => {
156
119
  if (hostRef.current) syncEchoScroll(hostRef.current);
157
120
  }, []);
158
- // Called on every render (hook rules); it does nothing until its ref is set.
159
121
  const { ref: attachMotionBlur } = useMotionBlur({ onFrame: onBlurFrame });
160
122
 
161
123
  const detachMotionBlur = React.useCallback(() => {
@@ -202,8 +164,6 @@ const SheetContent = React.forwardRef<
202
164
  };
203
165
  }, [detachMotionBlur]);
204
166
 
205
- // vaul may keep the same content node when only `motionBlur` flips, so the
206
- // callback ref above does not always re-run. Sync attach/detach here.
207
167
  React.useLayoutEffect(() => {
208
168
  const node = hostRef.current;
209
169
  if (!node) return;
@@ -294,8 +254,6 @@ export {
294
254
  SheetFooter,
295
255
  };
296
256
 
297
- // The same parts under vaul's name, for apps that call the sliding panel a
298
- // drawer. One implementation, so `DrawerContent` takes `motionBlur` too.
299
257
  export {
300
258
  Sheet as Drawer,
301
259
  SheetPortal as DrawerPortal,