@justanarthur/modo-ui 0.6.0 → 2.0.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 (710) hide show
  1. package/README.md +240 -549
  2. package/blocks/desktop-shell/examples.mdx +153 -0
  3. package/blocks/desktop-shell/index.tsx +352 -0
  4. package/blocks/shell-card/examples.mdx +72 -0
  5. package/blocks/shell-card/index.tsx +127 -0
  6. package/blocks/sidebar-app/examples.mdx +33 -0
  7. package/blocks/sidebar-app/index.tsx +232 -0
  8. package/blocks/sidebar-app/inset-topbar.tsx +20 -0
  9. package/blocks/sidebar-app/menu-grid.ts +16 -0
  10. package/blocks/sidebar-app/nav-data.ts +36 -0
  11. package/blocks/sidebar-app/search-field.tsx +41 -0
  12. package/blocks/sidebar-app/thread-page.tsx +58 -0
  13. package/blocks/sidebar-app/user-footer.tsx +60 -0
  14. package/blocks/sidebar-app/workspace-header.tsx +110 -0
  15. package/components/actions/button/examples.mdx +153 -0
  16. package/components/actions/button/index.tsx +325 -0
  17. package/components/actions/button/loading-demo.tsx +27 -0
  18. package/components/actions/button/variants.ts +138 -0
  19. package/components/actions/copy/examples.mdx +125 -0
  20. package/components/actions/copy/index.tsx +605 -0
  21. package/components/containers/accordion/accordion-content.tsx +220 -0
  22. package/components/containers/accordion/accordion-context.tsx +127 -0
  23. package/components/containers/accordion/accordion-group.tsx +215 -0
  24. package/components/containers/accordion/examples.mdx +165 -0
  25. package/components/containers/accordion/index.tsx +355 -0
  26. package/components/containers/card/card-group.tsx +184 -0
  27. package/components/containers/card/card-media.tsx +207 -0
  28. package/components/containers/card/card-parts.tsx +189 -0
  29. package/components/containers/card/examples.mdx +200 -0
  30. package/components/containers/card/index.tsx +380 -0
  31. package/components/data-display/avatar/examples.mdx +95 -0
  32. package/components/data-display/avatar/index.tsx +135 -0
  33. package/components/data-display/badge/change-demo.tsx +31 -0
  34. package/components/data-display/badge/examples.mdx +106 -0
  35. package/components/data-display/badge/index.tsx +185 -0
  36. package/components/data-display/badge/variants.ts +55 -0
  37. package/components/data-display/diff/examples.mdx +72 -0
  38. package/components/data-display/diff/index.tsx +147 -0
  39. package/components/data-display/kbd/examples.mdx +55 -0
  40. package/components/data-display/kbd/index.tsx +65 -0
  41. package/components/data-display/list/examples.mdx +157 -0
  42. package/components/data-display/list/index.tsx +130 -0
  43. package/components/data-display/log-view/examples.mdx +69 -0
  44. package/components/data-display/log-view/index.tsx +290 -0
  45. package/components/data-display/log-view/stream-demo.tsx +46 -0
  46. package/components/data-display/markdown/examples.mdx +92 -0
  47. package/components/data-display/markdown/index.tsx +291 -0
  48. package/components/data-display/table/context.ts +59 -0
  49. package/components/data-display/table/examples.mdx +156 -0
  50. package/components/data-display/table/head.tsx +105 -0
  51. package/components/data-display/table/index.tsx +176 -0
  52. package/components/data-display/table/parts.tsx +202 -0
  53. package/components/data-display/table/sort-demo.tsx +52 -0
  54. package/components/feedback/empty-state/examples.mdx +38 -0
  55. package/components/feedback/empty-state/index.tsx +96 -0
  56. package/components/feedback/meter/examples.mdx +61 -0
  57. package/components/feedback/meter/index.tsx +182 -0
  58. package/components/feedback/progress/examples.mdx +59 -0
  59. package/components/feedback/progress/index.tsx +168 -0
  60. package/components/feedback/progress/progress.css +27 -0
  61. package/components/feedback/progress/step-demo.tsx +29 -0
  62. package/components/feedback/status-dot/examples.mdx +75 -0
  63. package/components/feedback/status-dot/index.tsx +105 -0
  64. package/components/inputs/checkbox/examples.mdx +70 -0
  65. package/components/inputs/checkbox/index.tsx +465 -0
  66. package/components/inputs/checkbox/select-all-demo.tsx +50 -0
  67. package/components/inputs/choice-list/examples.mdx +101 -0
  68. package/components/inputs/choice-list/index.tsx +186 -0
  69. package/components/inputs/color-picker/channel-sliders.tsx +70 -0
  70. package/components/inputs/color-picker/color-input.tsx +387 -0
  71. package/components/inputs/color-picker/context.ts +11 -0
  72. package/components/inputs/color-picker/examples.mdx +82 -0
  73. package/components/inputs/color-picker/format-menu.tsx +212 -0
  74. package/components/inputs/color-picker/index.tsx +411 -0
  75. package/components/inputs/color-picker/inputs-row.tsx +196 -0
  76. package/components/inputs/color-picker/popover.tsx +193 -0
  77. package/components/inputs/color-picker/saturation-square.tsx +167 -0
  78. package/components/inputs/color-picker/swatches.tsx +178 -0
  79. package/components/inputs/color-picker/variants.ts +366 -0
  80. package/components/inputs/combobox/context.ts +114 -0
  81. package/components/inputs/combobox/examples.mdx +263 -0
  82. package/components/inputs/combobox/fields.tsx +377 -0
  83. package/components/inputs/combobox/index.tsx +390 -0
  84. package/components/inputs/combobox/list.tsx +415 -0
  85. package/components/inputs/combobox/remote-demo.tsx +101 -0
  86. package/components/inputs/date-time/calendar/examples.mdx +34 -0
  87. package/components/inputs/date-time/calendar/index.tsx +346 -0
  88. package/components/inputs/date-time/calendar/use-month-window.ts +176 -0
  89. package/components/inputs/date-time/date-picker/examples.mdx +183 -0
  90. package/components/inputs/date-time/date-picker/index.tsx +378 -0
  91. package/components/inputs/date-time/date-picker/masked-date-input.tsx +206 -0
  92. package/components/inputs/date-time/date-range-picker/examples.mdx +73 -0
  93. package/components/inputs/date-time/date-range-picker/index.tsx +503 -0
  94. package/components/inputs/date-time/date-value.ts +37 -0
  95. package/components/inputs/date-time/day-rules.ts +25 -0
  96. package/components/inputs/date-time/duration-picker/examples.mdx +32 -0
  97. package/components/inputs/date-time/duration-picker/index.tsx +215 -0
  98. package/components/inputs/date-time/month-picker/examples.mdx +28 -0
  99. package/components/inputs/date-time/month-picker/index.tsx +225 -0
  100. package/components/inputs/date-time/picker-shell.tsx +591 -0
  101. package/components/inputs/date-time/time-columns.tsx +93 -0
  102. package/components/inputs/date-time/time-picker/examples.mdx +39 -0
  103. package/components/inputs/date-time/time-picker/index.tsx +197 -0
  104. package/components/inputs/editable-text/examples.mdx +33 -0
  105. package/components/inputs/editable-text/index.tsx +175 -0
  106. package/components/inputs/field/examples.mdx +159 -0
  107. package/components/inputs/field/index.tsx +278 -0
  108. package/components/inputs/file-dropzone/examples.mdx +82 -0
  109. package/components/inputs/file-dropzone/file-row.tsx +200 -0
  110. package/components/inputs/file-dropzone/index.tsx +322 -0
  111. package/components/inputs/file-dropzone/upload-demo.tsx +71 -0
  112. package/components/inputs/file-dropzone/variants.ts +96 -0
  113. package/components/inputs/input/examples.mdx +111 -0
  114. package/components/inputs/input/index.tsx +431 -0
  115. package/components/inputs/input/password-demo.tsx +30 -0
  116. package/components/inputs/key-value/examples.mdx +58 -0
  117. package/components/inputs/key-value/index.tsx +232 -0
  118. package/components/inputs/label/examples.mdx +60 -0
  119. package/components/inputs/label/index.tsx +72 -0
  120. package/components/inputs/number-input/examples.mdx +96 -0
  121. package/components/inputs/number-input/index.tsx +226 -0
  122. package/components/inputs/radio/examples.mdx +72 -0
  123. package/components/inputs/radio/index.tsx +442 -0
  124. package/components/inputs/search/examples.mdx +74 -0
  125. package/components/inputs/search/index.tsx +340 -0
  126. package/components/inputs/select/examples.mdx +232 -0
  127. package/components/inputs/select/index.tsx +601 -0
  128. package/components/inputs/slider/comfortable.tsx +524 -0
  129. package/components/inputs/slider/compact.tsx +690 -0
  130. package/components/inputs/slider/examples.mdx +127 -0
  131. package/components/inputs/slider/geometry.ts +88 -0
  132. package/components/inputs/slider/index.tsx +136 -0
  133. package/components/inputs/slider/value-display.tsx +184 -0
  134. package/components/inputs/switch/examples.mdx +94 -0
  135. package/components/inputs/switch/index.tsx +452 -0
  136. package/components/inputs/textarea/examples.mdx +88 -0
  137. package/components/inputs/textarea/index.tsx +129 -0
  138. package/components/navigation/breadcrumb/examples.mdx +45 -0
  139. package/components/navigation/breadcrumb/index.tsx +284 -0
  140. package/components/navigation/navigation-menu/content.tsx +76 -0
  141. package/components/navigation/navigation-menu/context.ts +38 -0
  142. package/components/navigation/navigation-menu/examples.mdx +96 -0
  143. package/components/navigation/navigation-menu/index.tsx +211 -0
  144. package/components/navigation/navigation-menu/indicator.tsx +38 -0
  145. package/components/navigation/navigation-menu/item.tsx +47 -0
  146. package/components/navigation/navigation-menu/link.tsx +104 -0
  147. package/components/navigation/navigation-menu/list.tsx +97 -0
  148. package/components/navigation/navigation-menu/trigger.tsx +78 -0
  149. package/components/navigation/navigation-menu/use-dom-rows.ts +56 -0
  150. package/components/navigation/pagination/examples.mdx +65 -0
  151. package/components/navigation/pagination/index.tsx +323 -0
  152. package/components/navigation/sidebar/examples.mdx +319 -0
  153. package/components/navigation/sidebar/index.tsx +393 -0
  154. package/components/navigation/sidebar/menu-scope.tsx +439 -0
  155. package/components/navigation/sidebar/row-label.tsx +61 -0
  156. package/components/navigation/sidebar/sidebar-context.tsx +71 -0
  157. package/components/navigation/sidebar/sidebar-group.tsx +299 -0
  158. package/components/navigation/sidebar/sidebar-menu-actions.tsx +209 -0
  159. package/components/navigation/sidebar/sidebar-menu-button.tsx +214 -0
  160. package/components/navigation/sidebar/sidebar-menu-item.tsx +207 -0
  161. package/components/navigation/sidebar/sidebar-menu-sub.tsx +180 -0
  162. package/components/navigation/sidebar/sidebar-parts.tsx +94 -0
  163. package/components/navigation/sidebar/sidebar-provider.tsx +248 -0
  164. package/components/navigation/sidebar/sidebar-rail.tsx +206 -0
  165. package/components/navigation/sidebar/sidebar-shell.tsx +180 -0
  166. package/components/navigation/sidebar/sidebar-shortcut.tsx +101 -0
  167. package/components/navigation/sidebar/sidebar.css +70 -0
  168. package/components/navigation/sidebar/use-measured-collapse.ts +62 -0
  169. package/components/navigation/tabs/context.ts +45 -0
  170. package/components/navigation/tabs/examples.mdx +146 -0
  171. package/components/navigation/tabs/index.tsx +142 -0
  172. package/components/navigation/tabs/item.tsx +161 -0
  173. package/components/navigation/tabs/list.tsx +143 -0
  174. package/components/navigation/tree/examples.mdx +76 -0
  175. package/components/navigation/tree/index.tsx +431 -0
  176. package/components/overlays/alert-dialog/examples.mdx +89 -0
  177. package/components/overlays/alert-dialog/index.tsx +273 -0
  178. package/components/overlays/alert-dialog/pending-demo.tsx +38 -0
  179. package/components/overlays/command/examples.mdx +113 -0
  180. package/components/overlays/command/index.tsx +397 -0
  181. package/components/overlays/context-menu/examples.mdx +110 -0
  182. package/components/overlays/context-menu/index.tsx +144 -0
  183. package/components/overlays/dialog/examples.mdx +162 -0
  184. package/components/overlays/dialog/index.tsx +326 -0
  185. package/components/overlays/dropdown/dropdown-search.tsx +330 -0
  186. package/components/overlays/dropdown/examples.mdx +242 -0
  187. package/components/overlays/dropdown/index.tsx +433 -0
  188. package/components/overlays/dropdown/menu-item.tsx +326 -0
  189. package/components/overlays/dropdown/menu-parts.tsx +153 -0
  190. package/components/overlays/dropdown/menu-popup.tsx +336 -0
  191. package/components/overlays/dropdown/panel-state.ts +209 -0
  192. package/components/overlays/dropdown/submenu.tsx +169 -0
  193. package/components/overlays/lightbox/examples.mdx +29 -0
  194. package/components/overlays/lightbox/index.tsx +395 -0
  195. package/components/overlays/popover/anchored-demo.tsx +68 -0
  196. package/components/overlays/popover/examples.mdx +154 -0
  197. package/components/overlays/popover/index.tsx +276 -0
  198. package/components/overlays/preview-card/examples.mdx +61 -0
  199. package/components/overlays/preview-card/index.tsx +152 -0
  200. package/components/overlays/sheet/examples.mdx +102 -0
  201. package/components/overlays/sheet/index.tsx +290 -0
  202. package/components/overlays/toast/examples.mdx +109 -0
  203. package/components/overlays/toast/index.tsx +469 -0
  204. package/components/overlays/toast/manager.ts +170 -0
  205. package/components/overlays/tooltip/examples.mdx +100 -0
  206. package/components/overlays/tooltip/index.tsx +408 -0
  207. package/dist/base.css +186 -50
  208. package/dist/blocks/desktop-shell/index.d.ts +84 -0
  209. package/dist/blocks/desktop-shell/index.js +45 -0
  210. package/dist/blocks/shell-card/index.d.ts +57 -0
  211. package/dist/blocks/shell-card/index.js +13 -0
  212. package/dist/blocks/sidebar-app/index.d.ts +31 -3
  213. package/dist/blocks/sidebar-app/index.js +55 -26
  214. package/dist/components/actions/button/index.d.ts +87 -0
  215. package/dist/components/actions/button/index.js +22 -0
  216. package/dist/components/actions/button/variants.d.ts +29 -0
  217. package/dist/components/actions/button/variants.js +6 -0
  218. package/dist/components/actions/copy/index.d.ts +79 -0
  219. package/dist/components/actions/copy/index.js +26 -0
  220. package/dist/components/containers/accordion/index.d.ts +144 -0
  221. package/dist/components/containers/accordion/index.js +40 -0
  222. package/dist/components/containers/card/index.d.ts +223 -0
  223. package/dist/components/containers/card/index.js +58 -0
  224. package/dist/components/data-display/avatar/index.d.ts +46 -0
  225. package/dist/components/data-display/avatar/index.js +20 -0
  226. package/dist/components/{badge → data-display/badge}/index.d.ts +18 -15
  227. package/dist/components/data-display/badge/index.js +21 -0
  228. package/dist/components/data-display/badge/variants.d.ts +31 -0
  229. package/dist/components/data-display/badge/variants.js +8 -0
  230. package/dist/components/data-display/diff/index.d.ts +42 -0
  231. package/dist/components/data-display/diff/index.js +17 -0
  232. package/dist/components/data-display/kbd/index.d.ts +28 -0
  233. package/dist/components/data-display/kbd/index.js +11 -0
  234. package/dist/components/data-display/list/index.d.ts +60 -0
  235. package/dist/components/data-display/list/index.js +21 -0
  236. package/dist/components/data-display/log-view/index.d.ts +47 -0
  237. package/dist/components/data-display/log-view/index.js +26 -0
  238. package/dist/components/data-display/markdown/index.d.ts +43 -0
  239. package/dist/components/data-display/markdown/index.js +34 -0
  240. package/dist/components/data-display/table/index.d.ts +117 -0
  241. package/dist/components/data-display/table/index.js +40 -0
  242. package/dist/components/feedback/empty-state/index.d.ts +38 -0
  243. package/dist/components/feedback/empty-state/index.js +15 -0
  244. package/dist/components/feedback/meter/index.d.ts +48 -0
  245. package/dist/components/feedback/meter/index.js +13 -0
  246. package/dist/components/feedback/progress/index.d.ts +55 -0
  247. package/dist/components/feedback/progress/index.js +16 -0
  248. package/dist/components/feedback/status-dot/index.d.ts +37 -0
  249. package/dist/components/feedback/status-dot/index.js +15 -0
  250. package/dist/components/inputs/checkbox/index.d.ts +31 -9
  251. package/dist/components/inputs/checkbox/index.js +22 -13
  252. package/dist/components/inputs/choice-list/index.d.ts +52 -0
  253. package/dist/components/inputs/choice-list/index.js +25 -0
  254. package/dist/components/inputs/color-picker/index.d.ts +89 -53
  255. package/dist/components/inputs/color-picker/index.js +37 -21
  256. package/dist/components/inputs/color-picker/variants.d.ts +61 -0
  257. package/dist/components/inputs/color-picker/variants.js +28 -0
  258. package/dist/components/inputs/combobox/index.d.ts +194 -103
  259. package/dist/components/inputs/combobox/index.js +31 -20
  260. package/dist/components/inputs/date-time/calendar/index.d.ts +6 -1
  261. package/dist/components/inputs/date-time/calendar/index.js +17 -11
  262. package/dist/components/inputs/date-time/date-picker/index.d.ts +105 -20
  263. package/dist/components/inputs/date-time/date-picker/index.js +42 -25
  264. package/dist/components/inputs/date-time/date-range-picker/index.d.ts +137 -22
  265. package/dist/components/inputs/date-time/date-range-picker/index.js +42 -24
  266. package/dist/components/inputs/date-time/duration-picker/index.d.ts +60 -10
  267. package/dist/components/inputs/date-time/duration-picker/index.js +39 -24
  268. package/dist/components/inputs/date-time/month-picker/index.d.ts +57 -9
  269. package/dist/components/inputs/date-time/month-picker/index.js +38 -23
  270. package/dist/components/inputs/date-time/time-picker/index.d.ts +55 -9
  271. package/dist/components/inputs/date-time/time-picker/index.js +39 -24
  272. package/dist/components/inputs/editable-text/index.d.ts +38 -0
  273. package/dist/components/inputs/editable-text/index.js +17 -0
  274. package/dist/components/inputs/field/index.d.ts +112 -0
  275. package/dist/components/inputs/field/index.js +28 -0
  276. package/dist/components/inputs/file-dropzone/index.d.ts +176 -0
  277. package/dist/components/inputs/file-dropzone/index.js +36 -0
  278. package/dist/components/inputs/file-dropzone/variants.d.ts +35 -0
  279. package/dist/components/inputs/file-dropzone/variants.js +12 -0
  280. package/dist/components/inputs/input/index.d.ts +100 -20
  281. package/dist/components/inputs/input/index.js +20 -9
  282. package/dist/components/inputs/key-value/index.d.ts +57 -0
  283. package/dist/components/inputs/key-value/index.js +29 -0
  284. package/dist/components/inputs/label/index.d.ts +34 -0
  285. package/dist/components/inputs/label/index.js +12 -0
  286. package/dist/components/inputs/number-input/index.d.ts +96 -0
  287. package/dist/components/inputs/number-input/index.js +23 -0
  288. package/dist/components/inputs/radio/index.d.ts +25 -6
  289. package/dist/components/inputs/radio/index.js +20 -12
  290. package/dist/components/inputs/search/index.d.ts +10 -3
  291. package/dist/components/inputs/search/index.js +33 -18
  292. package/dist/components/inputs/select/index.d.ts +141 -52
  293. package/dist/components/inputs/select/index.js +36 -17
  294. package/dist/components/inputs/slider/index.d.ts +26 -39
  295. package/dist/components/inputs/slider/index.js +9 -7
  296. package/dist/components/inputs/switch/index.d.ts +14 -2
  297. package/dist/components/inputs/switch/index.js +17 -12
  298. package/dist/components/inputs/textarea/index.d.ts +13 -4
  299. package/dist/components/inputs/textarea/index.js +12 -6
  300. package/dist/components/navigation/breadcrumb/index.d.ts +44 -0
  301. package/dist/components/navigation/breadcrumb/index.js +45 -0
  302. package/dist/components/navigation/navigation-menu/index.d.ts +166 -0
  303. package/dist/components/navigation/navigation-menu/index.js +47 -0
  304. package/dist/components/navigation/pagination/index.d.ts +62 -0
  305. package/dist/components/navigation/pagination/index.js +34 -0
  306. package/dist/components/navigation/sidebar/index.d.ts +228 -207
  307. package/dist/components/navigation/sidebar/index.js +51 -36
  308. package/dist/components/navigation/tabs/index.d.ts +63 -40
  309. package/dist/components/navigation/tabs/index.js +23 -12
  310. package/dist/components/navigation/tree/index.d.ts +65 -0
  311. package/dist/components/navigation/tree/index.js +25 -0
  312. package/dist/components/overlays/alert-dialog/index.d.ts +149 -45
  313. package/dist/components/overlays/alert-dialog/index.js +28 -13
  314. package/dist/components/overlays/command/index.d.ts +36 -17
  315. package/dist/components/overlays/command/index.js +31 -17
  316. package/dist/components/overlays/context-menu/index.d.ts +182 -50
  317. package/dist/components/overlays/context-menu/index.js +37 -19
  318. package/dist/components/overlays/dialog/index.d.ts +110 -72
  319. package/dist/components/overlays/dialog/index.js +23 -12
  320. package/dist/components/overlays/dropdown/index.d.ts +329 -121
  321. package/dist/components/overlays/dropdown/index.js +53 -21
  322. package/dist/components/overlays/lightbox/index.d.ts +59 -0
  323. package/dist/components/overlays/lightbox/index.js +30 -0
  324. package/dist/components/overlays/popover/index.d.ts +100 -39
  325. package/dist/components/overlays/popover/index.js +17 -9
  326. package/dist/components/overlays/preview-card/index.d.ts +55 -26
  327. package/dist/components/overlays/preview-card/index.js +16 -8
  328. package/dist/components/overlays/sheet/index.d.ts +82 -28
  329. package/dist/components/overlays/sheet/index.js +24 -13
  330. package/dist/components/overlays/toast/index.d.ts +155 -53
  331. package/dist/components/overlays/toast/index.js +24 -10
  332. package/dist/components/overlays/tooltip/index.d.ts +113 -39
  333. package/dist/components/overlays/tooltip/index.js +18 -6
  334. package/dist/docs/index.d.ts +54 -0
  335. package/dist/docs/index.js +327 -0
  336. package/dist/docs/vite.d.ts +50 -0
  337. package/dist/docs/vite.js +63 -0
  338. package/dist/index.d.ts +5036 -2211
  339. package/dist/index.js +413 -155
  340. package/dist/lib/date-locale.d.ts +31 -0
  341. package/dist/lib/date-locale.js +26 -0
  342. package/dist/lib/date-mask.d.ts +41 -0
  343. package/dist/lib/date-mask.js +20 -0
  344. package/dist/lib/field-box.d.ts +114 -0
  345. package/dist/lib/field-box.js +18 -0
  346. package/dist/lib/field-classes.d.ts +45 -0
  347. package/dist/lib/field-classes.js +24 -0
  348. package/dist/lib/fluid-hover-highlight.d.ts +90 -0
  349. package/dist/lib/fluid-hover-highlight.js +12 -0
  350. package/dist/lib/focus-ring.d.ts +24 -0
  351. package/dist/lib/focus-ring.js +11 -0
  352. package/dist/lib/goo-indicator.d.ts +46 -0
  353. package/dist/lib/goo-indicator.js +15 -0
  354. package/dist/lib/icon-context.d.ts +29 -0
  355. package/dist/lib/icon-context.js +10 -0
  356. package/dist/lib/merge-refs.d.ts +10 -0
  357. package/dist/lib/merge-refs.js +8 -0
  358. package/dist/lib/morph-layers.d.ts +99 -0
  359. package/dist/lib/morph-layers.js +14 -0
  360. package/dist/lib/morph-part.d.ts +21 -0
  361. package/dist/lib/morph-part.js +12 -0
  362. package/dist/lib/overlay.d.ts +113 -0
  363. package/dist/lib/overlay.js +21 -0
  364. package/dist/lib/popup-rows.d.ts +101 -0
  365. package/dist/lib/popup-rows.js +25 -0
  366. package/dist/lib/popup-surface.d.ts +92 -0
  367. package/dist/lib/popup-surface.js +17 -0
  368. package/dist/lib/popup.d.ts +36 -0
  369. package/dist/lib/popup.js +15 -0
  370. package/dist/lib/rect.d.ts +16 -0
  371. package/dist/lib/rect.js +12 -0
  372. package/dist/lib/reduced-motion.d.ts +9 -0
  373. package/dist/lib/reduced-motion.js +6 -0
  374. package/dist/lib/row-group.d.ts +100 -0
  375. package/dist/lib/row-group.js +12 -0
  376. package/dist/lib/row-index.d.ts +12 -0
  377. package/dist/lib/row-index.js +10 -0
  378. package/dist/lib/row-order.d.ts +28 -0
  379. package/dist/lib/row-order.js +11 -0
  380. package/dist/lib/scroll-column.d.ts +27 -0
  381. package/dist/lib/scroll-column.js +20 -0
  382. package/dist/lib/shape-classes.d.ts +16 -0
  383. package/dist/lib/shape-classes.js +6 -0
  384. package/dist/lib/shape-context.d.ts +30 -0
  385. package/dist/lib/shape-context.js +11 -0
  386. package/dist/lib/size-context.d.ts +93 -0
  387. package/dist/lib/size-context.js +15 -0
  388. package/dist/lib/size-scale.d.ts +79 -0
  389. package/dist/lib/size-scale.js +8 -0
  390. package/dist/lib/slot.d.ts +51 -0
  391. package/dist/lib/slot.js +16 -0
  392. package/dist/lib/spinner-glyph.d.ts +7 -0
  393. package/dist/lib/spinner-glyph.js +7 -0
  394. package/dist/lib/springs.d.ts +48 -0
  395. package/dist/lib/springs.js +10 -0
  396. package/dist/lib/surface-classes.d.ts +19 -0
  397. package/dist/lib/surface-classes.js +10 -0
  398. package/dist/lib/surface-context.d.ts +11 -0
  399. package/dist/lib/surface-context.js +10 -0
  400. package/dist/lib/use-autosize-textarea.d.ts +16 -0
  401. package/dist/lib/use-autosize-textarea.js +7 -0
  402. package/dist/lib/use-controllable-state.d.ts +16 -0
  403. package/dist/lib/use-controllable-state.js +6 -0
  404. package/dist/lib/use-fluid-hover.d.ts +90 -0
  405. package/dist/lib/use-fluid-hover.js +8 -0
  406. package/dist/lib/use-is-mobile.d.ts +2 -0
  407. package/dist/lib/use-is-mobile.js +6 -0
  408. package/dist/lib/use-iso-layout-effect.d.ts +7 -0
  409. package/dist/lib/use-iso-layout-effect.js +6 -0
  410. package/dist/lib/use-keyboard-nav-gate.d.ts +20 -0
  411. package/dist/lib/use-keyboard-nav-gate.js +8 -0
  412. package/dist/lib/use-merge-split.d.ts +47 -0
  413. package/dist/lib/use-merge-split.js +16 -0
  414. package/dist/lib/use-morph.d.ts +107 -0
  415. package/dist/lib/use-morph.js +21 -0
  416. package/dist/lib/use-touch-primary.d.ts +2 -0
  417. package/dist/lib/use-touch-primary.js +6 -0
  418. package/dist/lib/utils.d.ts +3 -0
  419. package/dist/lib/utils.js +6 -0
  420. package/dist/lib/weight-label.d.ts +26 -0
  421. package/dist/lib/weight-label.js +7 -0
  422. package/dist/preset.d.ts +27 -0
  423. package/dist/preset.js +35 -4
  424. package/dist/primitives/content/code/index.js +14 -0
  425. package/dist/primitives/content/skeleton/index.d.ts +35 -0
  426. package/dist/primitives/content/skeleton/index.js +14 -0
  427. package/dist/primitives/layout/resizable/index.d.ts +67 -0
  428. package/dist/primitives/layout/resizable/index.js +16 -0
  429. package/dist/primitives/{scroll-area → layout/scroll-area}/index.d.ts +5 -4
  430. package/dist/primitives/layout/scroll-area/index.js +14 -0
  431. package/dist/primitives/layout/separator/index.d.ts +26 -0
  432. package/dist/primitives/layout/separator/index.js +9 -0
  433. package/dist/primitives/layout/sortable/index.d.ts +79 -0
  434. package/dist/primitives/layout/sortable/index.js +23 -0
  435. package/dist/primitives/layout/virtual-list/index.d.ts +50 -0
  436. package/dist/primitives/layout/virtual-list/index.js +9 -0
  437. package/dist/primitives/{craft → systems/craft}/index.d.ts +1 -1
  438. package/dist/primitives/systems/craft/index.js +16 -0
  439. package/dist/primitives/{fluid-hover → systems/fluid-hover}/index.d.ts +13 -14
  440. package/dist/primitives/systems/fluid-hover/index.js +30 -0
  441. package/dist/primitives/{morph → systems/morph}/index.d.ts +4 -2
  442. package/dist/primitives/systems/morph/index.js +30 -0
  443. package/dist/primitives/{motion → systems/motion}/index.d.ts +2 -0
  444. package/dist/primitives/systems/motion/index.js +25 -0
  445. package/dist/primitives/{sizes → systems/sizes}/index.d.ts +19 -6
  446. package/dist/primitives/{sizes → systems/sizes}/index.js +10 -5
  447. package/dist/primitives/{surface → systems/surface}/index.d.ts +12 -25
  448. package/dist/primitives/systems/surface/index.js +21 -0
  449. package/dist/shared/components-0cpte6s1.js +868 -0
  450. package/dist/shared/{components-b2wyq2cq.js → components-0h2mng6m.js} +65 -88
  451. package/dist/shared/components-14wzcym0.js +585 -0
  452. package/dist/shared/components-1asw2ph0.js +237 -0
  453. package/dist/shared/components-1bnf96sr.js +231 -0
  454. package/dist/shared/components-1f3a7gmg.js +168 -0
  455. package/dist/shared/components-1hb27y2e.js +77 -0
  456. package/dist/shared/components-1hga6pkn.js +334 -0
  457. package/dist/shared/components-1ztgy933.js +61 -0
  458. package/dist/shared/components-22h8dvt1.js +180 -0
  459. package/dist/shared/{components-y9y0g8er.js → components-280grw6q.js} +41 -55
  460. package/dist/shared/components-29ebea21.js +129 -0
  461. package/dist/shared/components-2m2hg11x.js +1486 -0
  462. package/dist/shared/components-3hgk57s0.js +27 -0
  463. package/dist/shared/components-3rvrdsa9.js +208 -0
  464. package/dist/shared/{components-1v7rxytx.js → components-45r18egt.js} +11 -1
  465. package/dist/shared/components-464zs8v6.js +152 -0
  466. package/dist/shared/components-4t2cjav8.js +73 -0
  467. package/dist/shared/components-5xs8pkkj.js +64 -0
  468. package/dist/shared/components-62510420.js +192 -0
  469. package/dist/shared/components-6f5pyzb2.js +33 -0
  470. package/dist/shared/components-6h5qg9rs.js +188 -0
  471. package/dist/shared/components-6rtawx8y.js +476 -0
  472. package/dist/shared/{components-fzrq6tr3.js → components-77gxngmc.js} +87 -62
  473. package/dist/shared/{components-59efxjd9.js → components-7c4a0egq.js} +9 -0
  474. package/dist/shared/components-7mj5wsv3.js +200 -0
  475. package/dist/shared/components-7xc2dne4.js +324 -0
  476. package/dist/shared/{components-hqeq3w9q.js → components-8pnvkrbw.js} +51 -50
  477. package/dist/shared/{components-c6s6b43g.js → components-8wp8d8q1.js} +11 -2
  478. package/dist/shared/components-91mmbrw3.js +113 -0
  479. package/dist/shared/components-92mvpt9h.js +243 -0
  480. package/dist/shared/components-9ca0c92a.js +148 -0
  481. package/dist/shared/components-9h3g4mnq.js +46 -0
  482. package/dist/shared/components-9rebr89j.js +249 -0
  483. package/dist/shared/{components-s083f38z.js → components-9z7bq8gn.js} +192 -62
  484. package/dist/shared/{components-q5xj5c16.js → components-a1ms36qq.js} +17 -9
  485. package/dist/shared/components-a1mwqxsv.js +448 -0
  486. package/dist/shared/components-azrjnfxn.js +22 -0
  487. package/dist/shared/components-b2kjsn1s.js +643 -0
  488. package/dist/shared/{components-1z6tdadk.js → components-b7p1pjcm.js} +40 -36
  489. package/dist/shared/components-b9bj65j3.js +204 -0
  490. package/dist/shared/components-bkwjvvkh.js +18 -0
  491. package/dist/shared/components-c515d6xr.js +35 -0
  492. package/dist/shared/{components-zx6b6yby.js → components-ceyn28cf.js} +11 -18
  493. package/dist/shared/components-chda6b23.js +70 -0
  494. package/dist/shared/{components-vc7vq5nz.js → components-cp5ym3g2.js} +16 -7
  495. package/dist/shared/components-czvraaw9.js +135 -0
  496. package/dist/shared/components-dm86y7b3.js +105 -0
  497. package/dist/shared/{components-mjthm1kf.js → components-e7zxwja1.js} +18 -15
  498. package/dist/shared/components-ee09xmkh.js +359 -0
  499. package/dist/shared/{components-b0eac83j.js → components-esy5nsvc.js} +17 -31
  500. package/dist/shared/{components-39jq9va1.js → components-ev0ytbqb.js} +39 -31
  501. package/dist/shared/components-ew4wq7mj.js +42 -0
  502. package/dist/shared/components-fmyvz4r2.js +79 -0
  503. package/dist/shared/components-fpsfr52a.js +34 -0
  504. package/dist/shared/{components-jwst3vtj.js → components-fqsgd07c.js} +198 -86
  505. package/dist/shared/{components-kvr7f9hy.js → components-g35n8tzm.js} +20 -12
  506. package/dist/shared/components-g8qgr7p8.js +28 -0
  507. package/dist/shared/{components-vfbhxf5r.js → components-gd8gmr6w.js} +10 -9
  508. package/dist/shared/components-grxgqa75.js +49 -0
  509. package/dist/shared/{components-8snj490h.js → components-gsstwhtv.js} +101 -72
  510. package/dist/shared/components-h0x2pj2y.js +433 -0
  511. package/dist/shared/components-h8v9nh5r.js +142 -0
  512. package/dist/shared/components-hcftn5r8.js +336 -0
  513. package/dist/shared/components-hh1g7r3t.js +57 -0
  514. package/dist/shared/components-hz6armxa.js +301 -0
  515. package/dist/shared/{components-ta7shw28.js → components-j3q9kaps.js} +11 -7
  516. package/dist/shared/{components-4700p9kz.js → components-j79a6jqa.js} +44 -38
  517. package/dist/shared/components-jeecysvd.js +192 -0
  518. package/dist/shared/{components-zrkzcayz.js → components-jnhpgpfk.js} +59 -4
  519. package/dist/shared/{components-7r3etddy.js → components-jw45ck66.js} +30 -58
  520. package/dist/shared/components-kwxye0an.js +85 -0
  521. package/dist/shared/{components-cv16mryv.js → components-kxpcj2ry.js} +24 -32
  522. package/dist/shared/components-m3vxpz2z.js +123 -0
  523. package/dist/shared/components-me742146.js +252 -0
  524. package/dist/shared/components-mse06t0x.js +31 -0
  525. package/dist/shared/components-n0gbyp5a.js +65 -0
  526. package/dist/shared/{components-w90endve.js → components-nhmgr5xc.js} +1480 -1483
  527. package/dist/shared/components-nwa2a9tq.js +27 -0
  528. package/dist/shared/components-nxqrw789.js +37 -0
  529. package/dist/shared/components-nz14rwtd.js +40 -0
  530. package/dist/shared/components-p0x8ren6.js +61 -0
  531. package/dist/shared/{components-wvp1m52g.js → components-p32aqk3q.js} +919 -898
  532. package/dist/shared/components-pa2t12j2.js +327 -0
  533. package/dist/shared/components-pa43g2r2.js +39 -0
  534. package/dist/shared/components-pva1wj1r.js +27 -0
  535. package/dist/shared/components-q0hs5rqn.js +91 -0
  536. package/dist/shared/components-q7zk70tx.js +257 -0
  537. package/dist/shared/components-r5q9gdh4.js +147 -0
  538. package/dist/shared/components-rgng034x.js +53 -0
  539. package/dist/shared/{components-2dxkv6zm.js → components-rzy6h7s4.js} +34 -40
  540. package/dist/shared/components-s217vq1n.js +35 -0
  541. package/dist/shared/components-s4x951hj.js +45 -0
  542. package/dist/shared/components-s90v3jpr.js +1170 -0
  543. package/dist/shared/components-t0c1rw40.js +75 -0
  544. package/dist/shared/components-t84071ay.js +76 -0
  545. package/dist/shared/{components-gz8zf3ec.js → components-ta4e10mx.js} +16 -43
  546. package/dist/shared/components-tcyz2tdn.js +31 -0
  547. package/dist/shared/components-twyj2y8c.js +336 -0
  548. package/dist/shared/{components-men63rwj.js → components-tz0axc0f.js} +4 -2
  549. package/dist/shared/components-v2j3jx89.js +7 -0
  550. package/dist/shared/components-vcte8p75.js +71 -0
  551. package/dist/shared/components-vfreweq3.js +210 -0
  552. package/dist/shared/components-vpkh6j83.js +42 -0
  553. package/dist/shared/{components-5xc2j8jz.js → components-w1ysefg1.js} +27 -18
  554. package/dist/shared/components-w2at9ntm.js +113 -0
  555. package/dist/shared/{components-0q0sqfh4.js → components-wq9hrera.js} +48 -49
  556. package/dist/shared/{components-n7mjr357.js → components-wwd093xg.js} +4 -2
  557. package/dist/shared/{components-5vgpnxgy.js → components-wx1dcp2n.js} +36 -52
  558. package/dist/shared/components-xa9fvd5b.js +302 -0
  559. package/dist/shared/components-xnkc892z.js +340 -0
  560. package/dist/shared/{components-ezxhrmer.js → components-xnp09586.js} +9 -1
  561. package/dist/shared/components-y09nr7fe.js +30 -0
  562. package/dist/shared/{components-11da9ajg.js → components-y4gsk1jt.js} +12 -8
  563. package/dist/shared/components-y8m64zdw.js +561 -0
  564. package/dist/shared/components-yf2gtq68.js +302 -0
  565. package/dist/shared/components-ymq8tbq9.js +88 -0
  566. package/dist/shared/components-ywgqahmg.js +80 -0
  567. package/dist/shared/{components-chacnk61.js → components-z0kz9rxj.js} +20 -19
  568. package/dist/shared/components-znspksk0.js +41 -0
  569. package/dist/styles.css +493 -147
  570. package/dist/tailwind.css +42 -0
  571. package/dist/tokens.css +91 -6
  572. package/docs/chrome.css +175 -0
  573. package/docs/chrome.tsx +314 -0
  574. package/docs/index.ts +8 -0
  575. package/docs/vite.ts +123 -0
  576. package/index.ts +93 -0
  577. package/lib/date-locale.ts +204 -0
  578. package/lib/date-mask.ts +146 -0
  579. package/lib/field-box.ts +117 -0
  580. package/lib/field-classes.ts +106 -0
  581. package/lib/fluid-hover-highlight.tsx +94 -0
  582. package/lib/focus-ring.tsx +49 -0
  583. package/lib/goo-indicator.tsx +263 -0
  584. package/lib/icon-context.tsx +302 -0
  585. package/lib/merge-refs.ts +29 -0
  586. package/lib/morph-layers.tsx +104 -0
  587. package/lib/morph-part.tsx +51 -0
  588. package/lib/overlay.tsx +118 -0
  589. package/lib/popup-rows.tsx +149 -0
  590. package/lib/popup-surface.tsx +52 -0
  591. package/lib/popup.ts +53 -0
  592. package/lib/rect.ts +48 -0
  593. package/lib/reduced-motion.ts +21 -0
  594. package/lib/row-group.tsx +113 -0
  595. package/lib/row-index.tsx +36 -0
  596. package/lib/row-order.tsx +111 -0
  597. package/lib/scroll-column.tsx +246 -0
  598. package/lib/shape-classes.ts +56 -0
  599. package/lib/shape-context.tsx +77 -0
  600. package/lib/size-context.tsx +53 -0
  601. package/lib/size-scale.ts +109 -0
  602. package/lib/slot.tsx +137 -0
  603. package/lib/spinner-glyph.tsx +27 -0
  604. package/lib/springs.ts +61 -0
  605. package/lib/surface-classes.ts +53 -0
  606. package/lib/surface-context.tsx +26 -0
  607. package/lib/use-autosize-textarea.ts +64 -0
  608. package/lib/use-controllable-state.ts +59 -0
  609. package/lib/use-fluid-hover.ts +539 -0
  610. package/lib/use-is-mobile.ts +25 -0
  611. package/lib/use-iso-layout-effect.ts +14 -0
  612. package/lib/use-keyboard-nav-gate.ts +44 -0
  613. package/lib/use-merge-split.tsx +199 -0
  614. package/lib/use-morph.ts +533 -0
  615. package/lib/use-touch-primary.tsx +43 -0
  616. package/lib/utils.ts +30 -0
  617. package/lib/weight-label.tsx +69 -0
  618. package/package.json +255 -7
  619. package/primitives/content/code/examples.mdx +27 -0
  620. package/primitives/content/code/index.tsx +82 -0
  621. package/primitives/content/skeleton/examples.mdx +51 -0
  622. package/primitives/content/skeleton/index.tsx +86 -0
  623. package/primitives/content/skeleton/skeleton.css +20 -0
  624. package/primitives/layout/resizable/examples.mdx +93 -0
  625. package/primitives/layout/resizable/index.tsx +332 -0
  626. package/primitives/layout/scroll-area/examples.mdx +58 -0
  627. package/primitives/layout/scroll-area/index.tsx +179 -0
  628. package/primitives/layout/separator/examples.mdx +30 -0
  629. package/primitives/layout/separator/index.tsx +54 -0
  630. package/primitives/layout/sortable/examples.mdx +53 -0
  631. package/primitives/layout/sortable/index.tsx +351 -0
  632. package/primitives/layout/virtual-list/examples.mdx +45 -0
  633. package/primitives/layout/virtual-list/index.tsx +269 -0
  634. package/primitives/layout/virtual-list/jump-demo.tsx +53 -0
  635. package/primitives/systems/craft/demos.tsx +175 -0
  636. package/primitives/systems/craft/examples.mdx +140 -0
  637. package/primitives/systems/craft/index.tsx +79 -0
  638. package/primitives/systems/fluid-hover/examples.mdx +84 -0
  639. package/primitives/systems/fluid-hover/index.tsx +281 -0
  640. package/primitives/systems/morph/examples.mdx +136 -0
  641. package/primitives/systems/morph/index.tsx +199 -0
  642. package/primitives/systems/motion/examples.mdx +100 -0
  643. package/primitives/systems/motion/index.tsx +144 -0
  644. package/primitives/systems/sizes/examples.mdx +167 -0
  645. package/primitives/systems/sizes/index.tsx +75 -0
  646. package/primitives/systems/surface/examples.mdx +173 -0
  647. package/primitives/systems/surface/index.tsx +84 -0
  648. package/primitives/systems/surface/surface.css +176 -0
  649. package/tokens/colors.css +234 -0
  650. package/tokens/motion.css +40 -0
  651. package/tokens/radius.css +24 -0
  652. package/tokens/spacing.css +9 -0
  653. package/tokens/typography.css +119 -0
  654. package/dist/components/AI/input-message/index.d.ts +0 -125
  655. package/dist/components/AI/input-message/index.js +0 -25
  656. package/dist/components/AI/thinking-indicator/index.d.ts +0 -32
  657. package/dist/components/AI/thinking-indicator/index.js +0 -13
  658. package/dist/components/accordion/index.d.ts +0 -117
  659. package/dist/components/accordion/index.js +0 -28
  660. package/dist/components/badge/index.js +0 -16
  661. package/dist/components/button/index.d.ts +0 -59
  662. package/dist/components/button/index.js +0 -14
  663. package/dist/components/card/index.d.ts +0 -141
  664. package/dist/components/card/index.js +0 -42
  665. package/dist/components/copy/index.d.ts +0 -44
  666. package/dist/components/copy/index.js +0 -16
  667. package/dist/components/navigation/tabs-subtle/index.d.ts +0 -73
  668. package/dist/components/navigation/tabs-subtle/index.js +0 -21
  669. package/dist/components/table/index.d.ts +0 -44
  670. package/dist/components/table/index.js +0 -26
  671. package/dist/primitives/code/index.js +0 -11
  672. package/dist/primitives/craft/index.js +0 -11
  673. package/dist/primitives/fluid-hover/index.js +0 -25
  674. package/dist/primitives/morph/index.js +0 -19
  675. package/dist/primitives/motion/index.js +0 -19
  676. package/dist/primitives/scroll-area/index.js +0 -12
  677. package/dist/primitives/surface/index.js +0 -17
  678. package/dist/shared/components-0sn7ypjw.js +0 -61
  679. package/dist/shared/components-1434p1mh.js +0 -123
  680. package/dist/shared/components-27nnvrwe.js +0 -152
  681. package/dist/shared/components-2ecg8svx.js +0 -496
  682. package/dist/shared/components-2ph6t61s.js +0 -215
  683. package/dist/shared/components-3ky44908.js +0 -9
  684. package/dist/shared/components-3mkepka5.js +0 -111
  685. package/dist/shared/components-6p8tfcd6.js +0 -122
  686. package/dist/shared/components-b3c5et5b.js +0 -667
  687. package/dist/shared/components-d6xtjht3.js +0 -981
  688. package/dist/shared/components-dk0gjr5a.js +0 -304
  689. package/dist/shared/components-gc5vtq2f.js +0 -149
  690. package/dist/shared/components-gf5s6ap9.js +0 -42
  691. package/dist/shared/components-h2ajmhwn.js +0 -183
  692. package/dist/shared/components-hw9yk32z.js +0 -288
  693. package/dist/shared/components-hyq23phv.js +0 -310
  694. package/dist/shared/components-jbbmdr74.js +0 -484
  695. package/dist/shared/components-jjw69c4c.js +0 -28
  696. package/dist/shared/components-jthe1pwb.js +0 -1759
  697. package/dist/shared/components-kwa6mrf9.js +0 -89
  698. package/dist/shared/components-n42c79bz.js +0 -445
  699. package/dist/shared/components-ng72k97e.js +0 -128
  700. package/dist/shared/components-pbmqctfa.js +0 -300
  701. package/dist/shared/components-raknhppb.js +0 -64
  702. package/dist/shared/components-rr7a6ja9.js +0 -160
  703. package/dist/shared/components-s5ngg32c.js +0 -267
  704. package/dist/shared/components-sn1rxx1d.js +0 -143
  705. package/dist/shared/components-vynjtrk6.js +0 -19
  706. package/dist/shared/components-w1r67ag9.js +0 -717
  707. package/dist/shared/components-wy9jpqny.js +0 -146
  708. package/dist/shared/components-ypp01w3p.js +0 -986
  709. package/dist/shared/components-zfnmn5d4.js +0 -220
  710. /package/dist/primitives/{code → content/code}/index.d.ts +0 -0
package/README.md CHANGED
@@ -1,24 +1,13 @@
1
- # UI — Fluid Functionalism for modo
1
+ # @justanarthur/modo-ui
2
2
 
3
- The UI design system is a port of [Fluid Functionalism](https://www.fluidfunctionalism.com)
4
- (FF) into modo's structure. FF is a shadcn-style component registry by Micka
5
- Touillaud / mickadesign ([repo](https://github.com/mickadesign/fluid-functionalism),
6
- MIT). It layers motion springs, a fluid hover highlight, a two-step size ladder,
7
- an eight-level elevated surface system and Inter weight animation on top of
8
- Radix or Base UI primitives.
3
+ A React design system: [Fluid Functionalism](https://www.fluidfunctionalism.com)
4
+ (Base UI flavor) on UnoCSS, with a liquid morph layer on top. Motion springs, a
5
+ fluid hover highlight, a two-step size ladder and an eight-level elevated
6
+ surface system come from Fluid Functionalism; overlays that grow out of
7
+ whatever opened them, and indicators that melt between items, are local.
9
8
 
10
- This port differs from the upstream registry in three ways:
11
- - It uses the **Base UI** flavor.
12
- - **UnoCSS** (`presetWind4`) replaces Tailwind CSS v4.
13
- - **[`cn`](https://github.com/shadcn-ui/cn)** replaces clsx + tailwind-merge.
14
-
15
- The sibling `../fluid-functionalism` package is a different project: a Radix
16
- flavor pulled with the shadcn CLI, still on Tailwind.
17
-
18
- On top of FF, the overlays morph: they grow out of whatever opened them, with
19
- a liquid "goo" neck by default. That layer is local code (`lib/use-morph.ts`,
20
- `lib/morph-layers.tsx`, documented by `primitives/morph`), with techniques
21
- taken from three more MIT projects (see [Morph sources](#morph-sources)).
9
+ **Live docs:** https://justanarthur.github.io/modo/ui/ — every component with
10
+ its props and live examples, built with [modo](https://github.com/justAnArthur/modo).
22
11
 
23
12
  ## Install
24
13
 
@@ -26,38 +15,62 @@ taken from three more MIT projects (see [Morph sources](#morph-sources)).
26
15
  npm install @justanarthur/modo-ui
27
16
  ```
28
17
 
29
- React 18 or later is a peer dependency. Import components from the package
30
- root, or one item per subpath (`@justanarthur/modo-ui/components/button`,
31
- `@justanarthur/modo-ui/components/overlays/dialog`, …):
18
+ React 18 or later is a peer dependency. Import from the package root, or one
19
+ item per subpath:
32
20
 
33
21
  ```tsx
34
22
  import { Button, Switch } from '@justanarthur/modo-ui'
23
+ import Dialog from '@justanarthur/modo-ui/components/overlays/dialog'
35
24
  ```
36
25
 
37
- ### Styles
38
-
39
- Pick one of three ways in. The components are styled with utility classes,
40
- so either take them prebuilt or let your own Tailwind or UnoCSS generate them
41
- by scanning the package's `dist/`. Scanning emits each class once, beside your
42
- own.
43
-
44
- **Prebuilt**: no CSS tooling needed. It includes the reset, the tokens, the
45
- base styles and every utility the components use:
26
+ Subpaths follow the docs' tiers and groups: `primitives/*`, `components/*`
27
+ (`components/actions/button`, `components/inputs/select`, …) and `blocks/*`
28
+ (`blocks/sidebar-app`). Every shared system in `lib/` is a subpath too, for
29
+ components of your own: `lib/utils`, `lib/springs`, `lib/size-scale`,
30
+ `lib/shape-classes`, `lib/field-classes`, `lib/field-box`, `lib/size-context`,
31
+ `lib/shape-context` (`useShape`, `useShapeContext`), `lib/surface-classes`,
32
+ `lib/surface-context`, `lib/icon-context` (`useIcon`, `useIcons`,
33
+ `IconProvider`), `lib/use-controllable-state`, `lib/use-morph`,
34
+ `lib/goo-indicator`, `lib/use-fluid-hover`, `lib/fluid-hover-highlight`,
35
+ `lib/reduced-motion`, `lib/scroll-column`, `lib/slot` (`cloneSlot`),
36
+ `lib/row-order` and the rest of the folder. Button's, Badge's, ColorPicker's and
37
+ FileDropzone's pure tables are `components/actions/button/variants`,
38
+ `components/data-display/badge/variants`,
39
+ `components/inputs/color-picker/variants` and
40
+ `components/inputs/file-dropzone/variants`. `tokens/<group>.css` serves each
41
+ token group's source (`colors`, `typography`, `motion`, `radius`, `spacing`).
42
+
43
+ ## Styles
44
+
45
+ The components are styled with utility classes. Take them prebuilt, or let
46
+ your own Tailwind or UnoCSS generate them from the package's `dist/`, so each
47
+ class is emitted once, beside your own. Pick one path.
48
+
49
+ ### Prebuilt CSS
50
+
51
+ No CSS tooling needed. `styles.css` holds the reset, the tokens, the base
52
+ styles, the Inter variable font and every utility the components use:
46
53
 
47
54
  ```ts
48
55
  import '@justanarthur/modo-ui/styles.css'
49
56
  ```
50
57
 
51
- **Tailwind CSS v4**: the theme, the token utilities, the `dark:` variant and
52
- `@source` for the components ship in one file:
58
+ ### Tailwind CSS v4
59
+
60
+ `tailwind.css` imports the tokens and base styles, adds `@source` for the
61
+ components, the `dark:` variant, the theme (`@theme inline`) and the token
62
+ utilities (`text-body`, `weight-medium`, `duration-fast`, …):
53
63
 
54
64
  ```css
55
65
  @import "tailwindcss";
56
66
  @import "@justanarthur/modo-ui/tailwind.css";
57
67
  ```
58
68
 
59
- **UnoCSS** (`presetWind4`): add the preset and the components' content, then
60
- import the tokens and base styles:
69
+ ### UnoCSS
70
+
71
+ Add the preset next to `presetWind4`, and the components' classes through
72
+ `modoUiContent` (UnoCSS reads `content` from your config only, never from a
73
+ preset, so this part can't ship inside it):
61
74
 
62
75
  ```ts
63
76
  // uno.config.ts
@@ -70,544 +83,222 @@ export default defineConfig({
70
83
  })
71
84
  ```
72
85
 
86
+ Then import the generated CSS and the tokens with the base styles:
87
+
73
88
  ```ts
74
89
  import 'virtual:uno.css'
75
90
  import '@justanarthur/modo-ui/base.css'
76
91
  ```
77
92
 
78
- `tokens.css` holds the CSS variables alone.
93
+ `@justanarthur/modo-ui/tokens.css` holds the CSS variables alone, for a host
94
+ that brings its own base styles.
79
95
 
80
- ### Theme
96
+ ## Theming and dark mode
81
97
 
82
- Every color is a `light-dark()` token, so `color-scheme` picks the side: it
83
- follows the OS until `<html>` (or any subtree) carries `light` or `dark`.
84
- `dark:` utilities match inside a `.dark` ancestor, so set the class whenever
85
- you pin dark mode:
98
+ Every color is a `light-dark()` token, so `color-scheme` picks the side. It
99
+ follows the OS until `<html>` (or any subtree) carries the `light` or `dark`
100
+ class. The `dark:` utilities match inside a `.dark` ancestor, so set the class
101
+ whenever you pin a scheme:
86
102
 
87
103
  ```ts
88
104
  document.documentElement.classList.toggle('dark', dark)
89
105
  document.documentElement.classList.toggle('light', !dark)
90
106
  ```
91
107
 
92
- ## Source
93
-
94
- - Repository: `github.com/mickadesign/fluid-functionalism`
95
- - Commit: `b3587bdbd83fc66c2a6aae3817ffb856cb09260b`
96
- - License: MIT © 2026 Micka Touillaud. The full text is in
97
- [`LICENSE.fluid-functionalism`](./LICENSE.fluid-functionalism), copied
98
- verbatim.
99
- - Flavor: `registry/base/*` wherever upstream ships a flavored file, and
100
- `registry/default/*` otherwise. The Base UI flavor is pinned to
101
- `@base-ui/react@1.4.1`, the version upstream was tested with.
102
-
103
- Every vendored file opens with a plain `/* */` header. The header names the
104
- upstream path and commit, carries the MIT notice, and lists every local
105
- modification. The vendored code below the header keeps upstream's formatting.
106
- Files written for this port (`preset.ts`, `uno.config.ts`, `vite.ts`, `index.ts`,
107
- `scripts/build-css.ts`, `modo.components.tsx`,
108
- `lib/use-controllable-state.ts`, `primitives/code/index.tsx`, `primitives/craft/*`, the morph files
109
- in `lib/` (`use-morph.ts`, `reduced-motion.ts`, `morph-layers.tsx`, `morph-part.tsx`, `goo-indicator.tsx`,
110
- `slot.ts`) and `primitives/morph/index.tsx`, `blocks/sidebar-app/index.tsx`,
111
- and the local components marked "— (local)" below) use this repo's style: single quotes and no semicolons.
112
-
113
- ### Morph sources
108
+ A subtree with its own class keeps that scheme (a dark preview card on a light
109
+ page).
114
110
 
115
- | Project | Repository @ commit | License | What it contributes |
116
- |---|---|---|---|
117
- | beUI | `github.com/starc007/ui-components` @ `de52f337e520e7ee37749b36eb1c32df86137bcb` | MIT © 2026 Saurabh Chauhan, [`LICENSE.beui`](./LICENSE.beui) | the gooey popover's rect interpolation, rounded-rect path, source cutout and goo filter; the morph select; the morphing search (idea only) |
118
- | motion-primitives | `github.com/ibelick/motion-primitives` @ `120f64f6ca60348e251f929e9c81f11ccbe45eda` | MIT © 2024 ibelick, [`LICENSE.motion-primitives`](./LICENSE.motion-primitives) | the morphing popover and morphing dialog (trigger growing into the panel, shared parts) |
119
- | Sileo | `github.com/hiaaryan/sileo` @ `9793f844349983e140cf33cebbb8f51626d41407` | MIT, [`LICENSE.sileo`](./LICENSE.sileo) | the goo blur as a share of the surface radius; the gooey toast |
111
+ To re-brand, override tokens after the package's stylesheet, on the same
112
+ selector the tokens use (`.light` / `.dark` subtrees re-declare them). Give a
113
+ color both sides with `light-dark()`:
120
114
 
121
- Sileo declares MIT in its `package.json` but ships no LICENSE file, so
122
- `LICENSE.sileo` is the standard MIT text naming the repository's owner.
123
- beUI's and motion-primitives' are copied verbatim.
115
+ ```css
116
+ :root,
117
+ .light,
118
+ .dark {
119
+ --brand: oklch(0.65 0.19 150);
120
+ --brand-hover: oklch(0.6 0.19 150);
121
+ --background: light-dark(oklch(0.99 0.005 150), oklch(0.2 0.01 150));
122
+ --font-sans: "Geist Variable", ui-sans-serif, system-ui, sans-serif;
123
+ }
124
+ ```
124
125
 
125
- Only visuals come from these projects. Base UI keeps all behavior
126
- (positioning, focus, dismissal, hover and tap, scroll lock), so none of
127
- their own hooks for it (click-outside, focus traps, dismissal, gestures,
128
- positioning) are ported.
126
+ The primary Button paints with its own hooks, so a brand fill needs no fork:
127
+ `--primary`, `--primary-hover`, `--primary-active`, `--primary-foreground` and
128
+ `--shadow-button-primary` (an extra shadow list on the fill). They default to
129
+ the ink; re-point `--primary-hover` and `--primary-active` with `--primary`.
130
+
131
+ The tokens live in five groups: colors (`--background`, `--foreground`,
132
+ `--muted-foreground`, `--accent`, `--brand`, `--destructive`, `--status-*`,
133
+ `--syntax-*`, …), typography (`--font-sans`, `--text-<role>`,
134
+ `--weight-*`), motion (`--duration-*`), radius and spacing. The surface ladder
135
+ (`--surface-1…8`, `--shadow-1…8`) re-points per scheme. The docs'
136
+ Foundations pages list every one with its value.
137
+
138
+ ## Component API
139
+
140
+ The same conventions run through every component:
141
+
142
+ - **State both ways.** Values are `value` / `defaultValue` / `onValueChange`
143
+ (`checked` / `defaultChecked` / `onCheckedChange` on Checkbox and Switch),
144
+ and `onValueChange` gets the value, not an event: `Input`, `Textarea` and
145
+ `Slider` included. Overlays and other popups take `open` / `defaultOpen` /
146
+ `onOpenChange`. Leave the value prop out and the component keeps its own
147
+ state.
148
+ - **Sizes.** `size` is `default` (36px) or `compact` (28px); Button adds
149
+ `icon` and `icon-compact`. Leave it out and a component follows the nearest
150
+ `SizeProvider`, so one `<SizeProvider size="compact">` makes a whole
151
+ region dense, menus included.
152
+ - **Forms.** Checkbox, `Radio.Group`, Switch, Select, Combobox, Slider,
153
+ NumberInput, ColorPicker, ChoiceList and the date and time pickers take `name` and
154
+ submit their value with the surrounding form; Input and Textarea are native
155
+ fields. Text fields, Select and Combobox take `readOnly` and `required`.
156
+ - **Fields.** Wrap a control in `Field` for a label, a description and an
157
+ error (`Field.Label`, `.Description`, `.Error`); the control takes the
158
+ field's `invalid`, `disabled`, `readOnly` and `required` unless it sets its
159
+ own.
160
+ - **Overlays.** Content parts that anchor to a trigger (Popover, PreviewCard,
161
+ Dropdown, Select, Combobox) take `side`, `align`, `sideOffset` and
162
+ `container`, plus the morph options `from`, `effect`, `hideSource` and
163
+ `tier`. `Tooltip.PortalContainer` portals every overlay inside it into
164
+ another element (a preview frame, a shadow root). `Dialog.Content` and
165
+ `AlertDialog.Content` take `width`: `sm` (400px), `lg` (540px) or `xl`
166
+ (880px). `Tooltip` takes `open` / `defaultOpen` to pin it, `side`, `align`
167
+ and `container`, and `Tooltip.Trigger` / `Tooltip.Content` for a trigger of
168
+ your own. `Popover.Content` also takes `anchor`, `alignOffset`, the
169
+ `collision*` props and `initialFocus` / `finalFocus`.
170
+ - **Tabs** take `variant`: `segmented` (a track with an elevated indicator,
171
+ the default) or `subtle` (a borderless strip with a pill).
172
+ - **Date pickers.** `disabled` turns the field off; `disabledDays` takes
173
+ react-day-picker matchers for the days that can't be picked.
174
+ `valueType="string"` makes DatePicker and DateRangePicker take and report
175
+ ISO strings instead of `Date`s; `labels` replaces their texts; DatePicker's
176
+ `editable` lets the field be typed into.
129
177
 
130
- ## Layout
178
+ ```tsx
179
+ <Select name="plan" defaultValue="pro" onValueChange={setPlan}>…</Select>
180
+ <Input size="compact" onValueChange={setQuery} />
181
+ <DatePicker disabledDays={{ before: new Date() }} />
182
+ <Field invalid>
183
+ <Field.Label>Email</Field.Label>
184
+ <Input type="email" />
185
+ <Field.Error>Enter a valid email.</Field.Error>
186
+ </Field>
187
+ ```
131
188
 
132
- | Path | What it holds |
133
- |---|---|
134
- | `AGENTS.md` | The ui-specific guide for coding agents (where things live, the rules that matter most, the checks); `CLAUDE.md` imports it. |
135
- | `DESIGN.md` | The design language in Google's [DESIGN.md](https://github.com/google-labs-code/design.md) format: the tokens as front matter, the rules as prose. Agents building here follow the `modo-ui` skill (`.claude/skills/modo-ui` at the repo root). |
136
- | `tokens/*.css` | Colors, typography (`--font-sans`, `--text-*`), motion (`--duration-*`), radius and spacing. |
137
- | `base.css` | Theme switching, base styles, focus fallback, scrollbars, shimmer/spinner keyframes and `.scroll-fade`. Shipped in the package. |
138
- | `global.css` | The docs site's stylesheet (`modo.config.ts` `css`): imports `base.css`, then the modo-only focus revert and the docs chrome. |
139
- | `preset.ts` | The UnoCSS preset (theme and token utilities), shipped as `@justanarthur/modo-ui/unocss`. |
140
- | `uno.config.ts`, `vite.ts` | The UnoCSS setup of the docs site and the prebuilt CSS (see below). |
141
- | `index.ts`, `bunup.config.ts`, `scripts/build-css.ts` | The package build: `bun run build` writes the components, their types and the stylesheets to `dist/`. The docs site builds with `bun run build:docs` into `docs-dist/`. |
142
- | `lib/` | FF's shared system files (upstream `lib/`, `hooks/` and the fluid-hover highlight, flat, upstream names), imported relatively by items. modo only scans the tier folders, so it never mistakes them for items. |
143
- | `modo.components.tsx` | Components only the docs site uses: the `Icon`, `Select` and `DocsNav` shell-slot adapters and the `ThemeSwitcher` panel item, picked in `modo.config.ts` by export name (`./modo.components.tsx#Select`). |
144
- | `primitives/<id>/` | FF's "System" pages: `index.tsx` (component + TSDoc prose) and `examples.mdx`, pulled in by `@example {@include ./examples.mdx}`. |
145
- | `components/[<group>/]<id>/` | FF's "Components" pages, same shape. The `AI/`, `inputs/` (with `inputs/date-time/`), `navigation/` and `overlays/` group folders become sidebar sub-groups and overview sections; the core display items stay ungrouped. |
146
- | `blocks/<id>/` | Compositions of several items, same shape: `sidebar-app`, FF's sidebar preset `sa1FQfCxH6` as an app shell, with the header and footer blocks it is built from beside it. |
147
-
148
- ## Upstream → local file map
149
-
150
- ### Shared system (`lib/`)
151
-
152
- | Upstream (`registry/default/…`) | Local | Modifications |
153
- |---|---|---|
154
- | `lib/utils.ts` | `lib/utils.ts` | `extendTailwindMerge` → `createCn` from `cn/config`, with the same font-size group extension; the local token utilities join their groups too (compact and `micro` type roles as font-size, `weight-*`, the `duration-*` / `delay-*` motion tiers, `rounded-box\|glyph`) |
155
- | `lib/springs.ts` | `lib/springs.ts` | `goo` tier added (the morph engine's goo: 250ms to land, bounce 0.15, a 200ms spring back); `exitFallbackMs` also reads a spring exit's `visualDuration` |
156
- | `lib/font-weight.ts` | — | not ported: its `fontWeights` became the `--weight-*` tokens in `tokens/typography.css` (the `weight-*` utilities) |
157
- | `lib/popup.ts` | `lib/popup.ts` | `popupMotionClass` dropped (unused since the popups morph) |
158
- | `lib/shape-context.tsx` | `lib/shape-context.tsx` | `"use client"` dropped |
159
- | `lib/size-context.tsx` | `lib/size-context.tsx` | `"use client"` dropped; `SizeProvider` moved to `primitives/sizes` (the documented item), with `SizeContext` exported for it; `sizeMap` text classes → `text-body` / `text-body-compact` |
160
- | `lib/icon-context.tsx` | `lib/icon-context.tsx` | `"use client"` dropped; `size`/`strokeWidth` widened to `number \| string` for lucide v1 + React 18 types |
161
- | `lib/surface-context.tsx` | `lib/surface-context.tsx` | `"use client"` dropped |
162
- | `lib/surface-classes.ts` | `lib/surface-classes.ts` | `SURFACE_HOVER_*` and `surfaceHoverClasses` dropped (only Sidebar used them) |
163
- | `hooks/use-fluid-hover.ts` | `lib/use-fluid-hover.ts` | `"use client"` dropped; `sessionRef` typed `MutableRefObject<number>` (React 18) |
164
- | `hooks/use-merge-split.tsx` | `lib/use-merge-split.tsx` | `"use client"` dropped; `framer-motion` → `motion/react`; relative imports; the merge/split choreography replaced by per-row blocks melted through `GooLayer`; exports and `SelBlock`'s `key`/rect/`radii`/`instant` kept |
165
- | `hooks/use-keyboard-nav-gate.ts` | `lib/use-keyboard-nav-gate.ts` | `"use client"` dropped; relative imports |
166
- | `hooks/use-touch-primary.tsx` | `lib/use-touch-primary.tsx` | `"use client"` dropped |
167
- | `sidebar-core.tsx` (`useIsMobile`) | `lib/use-is-mobile.ts` | Moved out of the sidebar, unchanged, so the date and time pickers share it |
168
- | `fluid-hover-highlight.tsx` | `lib/fluid-hover-highlight.tsx` | `"use client"` dropped; `framer-motion` → `motion/react`; relative imports; the fill is a `GooIndicator` (melts from row to row), props unchanged |
169
- | — (new) | `lib/use-controllable-state.ts` | Local addition: controlled + uncontrolled state, Base UI style |
170
- | — (new) | `lib/use-morph.ts` | Local addition: the morph engine (source rect → popup box on a spring tier, exit hold for Base UI's unmount), geometry after beUI's popover; goo runs on its own `spring.goo` with a blur of at least 8px that eases to nothing as the surface lands, so the neck pinches off; a close-only `exit` override, an `instant` predicate that ends a run at once, press points from clicks, context menus and long presses (a droplet source for `from="pointer"`), cleanup when the popup unmounts mid-run; focus goes back to the trigger when a closed popup that held it is gone and Base UI skipped the return (the exit hold makes a menu read the pointer leaving the inert popup as a hover close) |
171
- | — (new) | `lib/reduced-motion.ts` | Local addition: `useReduceMotion`, the one reduced-motion read for the morph layer and the liquid indicators — the OS setting, or a `MotionConfig` asking for it (motion's `useReducedMotionConfig` alone ignores the OS without `<MotionConfig reducedMotion="user">`) |
172
- | — (new) | `lib/field-classes.ts` | Local addition: the field ladder FF repeats per text field (rest → muted fill on hover or a group's `data-active` → card fill on focus; `data-invalid` keeps a destructive ring), as `fieldVariants` + `fieldIconClasses`, shared by Input, Textarea, Combobox and Sidebar's input; `useFieldBox` (variant, state attributes, radius, inset) + `focusControlOnPress`, the box Input, Textarea, Combobox's fields and the date/time pickers' field build on, so each takes `variant` |
173
- | — (new) | `lib/date-locale.ts` | Local addition: what the date and time pickers read off a react-day-picker (date-fns) locale — the hour cycle (Intl), typed dates, times and months in the locale's formats (date-fns `parse` with `P`…`PPPP`), field names for column labels (`Intl.DisplayNames`) |
174
- | — (new) | `lib/scroll-column.tsx` | Local addition: `ScrollColumn`, the scrolling option list beside a calendar (months, years, hours, minutes) or a strip above it: the pick gets a dot, a run of `inView` options one band, the followed option stays centred; fluid hover, listbox semantics, arrow keys; `dividedColumns` puts a hairline between neighbours |
175
- | — (new) | `lib/slot.ts` | Local addition: Dialog's `render` / `asChild` slot shape (`SlotProps`, `slotRender`), shared by every overlay part that wraps a control |
176
- | — (new) | `lib/morph-part.tsx` | Local addition: `MorphPart` (shared parts over a motion `layoutId`, after motion-primitives' morphing dialog) and the scope contexts overlays provide |
177
- | — (new) | `lib/goo-indicator.tsx` | Local addition: `GooIndicator` (melts between items, a lingering blob follows it) and `GooLayer` (goo over the shapes' coverage, filled with their own token, on only while moving), on the engine's `GOO_MATRIX` / `GOO_BLUR_RATIO` |
178
- | — (new) | `lib/morph-layers.tsx` | Local addition: `MorphSurface`, the renderer (shapes layer with beUI's goo filter plus a `--shadow-color` hairline around the melted shape, surface background and shadow, clipped content) |
179
-
180
- ### Styles
181
-
182
- | Upstream | Local |
183
- |---|---|
184
- | `app/globals.css` §1 tokens | `tokens/colors.css`, with HEX converted to oklch. The surface ladder and shadows live in `primitives/surface/surface.css`. Local addition: the `--status-*` roles (toast states), by reference to the badge palette, `--destructive` and `--brand`. |
185
- | `app/globals.css` §2 theme switching | `base.css` (`color-scheme`, `--overlay`) and `surface.css` (`--shadow-N` per scheme) |
186
- | `app/globals.css` §3 `@theme inline` | `preset.ts` `theme` |
187
- | `app/globals.css` `--fs-*` + `@utility text-*` | `tokens/typography.css` `--text-*` and `preset.ts` `utilities` |
188
- | `app/globals.css` §4–6 | `base.css` |
189
- | `registry/default/lib/springs.ts` (as CSS) | `tokens/motion.css` (plus `--duration-goo` / `--duration-goo-exit`) |
190
-
191
- ### Items
192
-
193
- Every item goes through the same mechanical pass, so the tables below list
194
- only what is specific to it:
195
-
196
- - `"use client"` dropped (no RSC here).
197
- - Imports rewritten: `@/lib/*` → `../../lib/*`, `@/hooks/*` →
198
- `../../lib/*`, `SizeProvider` from `@/lib/size-context` →
199
- `../../primitives/sizes`, `@/lib/elevated` → `../../primitives/surface`,
200
- `@/components/ui/scroll-area` → `../../primitives/scroll-area`,
201
- `@/components/ui/fluid-hover-highlight` → `../../lib/fluid-hover-highlight`,
202
- `@/registry/radix/*` → the Base-flavor sibling, `framer-motion` →
203
- `motion/react`, `next/link` → a plain anchor.
204
- - A local `interface <Item>Props` whose members are each declared on one line
205
- with the FF docs API-table text (modo's parser lists only members declared
206
- in the interface body), modo TSDoc written from the FF docs page, and
207
- `export default <Item>`. Upstream's named exports are kept.
208
-
209
- #### primitives
210
-
211
- | Item | Upstream | Local | Specific modifications |
212
- |---|---|---|---|
213
- | `Elevated` | `registry/default/lib/elevated.tsx` (+ `lib/surface-context.tsx`; docs "Surfaces") | `primitives/surface/index.tsx` | `.Provider` static (= `SurfaceProvider`); `useSurface` / `surfaceClasses` re-exported; `className`/`children` re-declared; `surface.css` co-located (modo injects it) |
214
- | `ScrollArea` | `registry/base/scroll-area.tsx` (docs "Scrollbars") | `primitives/scroll-area/index.tsx` | the root's forwardRef element type written out as `HTMLDivElement` (the parser needs a first type argument without `<`/`,`); `viewportClassName` documented; `.Bar` static (= `ScrollBar`) |
215
- | `SizeProvider` | `registry/default/lib/size-context.tsx` + `app/docs/sizes/page.tsx` | `primitives/sizes/index.tsx` | upstream's `SizeProvider`, moved here from the vendored context so modo documents it (sized components import it from here), with the hooks, maps and types re-exported; the live demos become static examples (Select/TabsSubtle/InputGroup/CheckboxGroup/Dropdown swapped for Button/Badge/Switch/Tabs, token-inspector overlay dropped); the token table and type scale are written out rather than rendered from `sizeMap` / `typeScale` |
216
- | `FluidHover` | `app/docs/fluid-hover/{page,demos}.tsx` over `registry/default/hooks/use-fluid-hover.ts` + `fluid-hover-highlight.tsx` | `primitives/fluid-hover/index.tsx` | new container (`FluidHover` + `FluidHover.Item`) around the hook/highlight pair so examples need no hooks; `items`, `renderItem`, `disabledIndices`, `columns`, `highlightClassName` are the container's own API, `axis` and `gapClick` pass through to the hook; row classes are upstream's `rowClass` with per-axis variants; the two scripted-cursor demos are dropped |
217
- | `Motion` | `registry/default/lib/springs.ts` + `app/docs/motion/page.tsx` | `primitives/motion/index.tsx` | `Motion` is local demo code (FF ships none): it plays one tier's enter spring and exit tween on its children, adding `defaultShow`, `sameExit` and `reducedMotion`; `spring` / `exitFallbackMs` re-exported from the vendored `springs.ts`; the ball-on-track and fake-modal visuals become show/hide of arbitrary children |
218
- | `Morph` | — (local; see [Morph sources](#morph-sources)) | `primitives/morph/index.tsx` | a docs stage like `Motion`: a trigger and a panel playing one `from` × `effect` pair over `lib/use-morph.ts`; static `.Part` (= `MorphPart`); also documents the liquid indicators (`lib/goo-indicator.tsx`) |
219
- | `Code` | — (local; FF has no code item) | `primitives/code/index.tsx` | sugar-high tokens colored by the `--syntax-*` tokens, one surface step above its substrate; also the docs chrome's Code slot |
220
- | `Craft` | — (local; after the before/after pairs on fluidfunctionalism.com/docs/skill) | `primitives/craft/index.tsx` (+ `demos.tsx`) | a docs stage: a bad and a good version side by side with a one-line verdict each; the bad sides live in `demos.tsx` and break one rule each on purpose, the good sides are this package's items |
221
-
222
- #### components
223
-
224
- | Item | Upstream | Local | Specific modifications |
225
- |---|---|---|---|
226
- | `Accordion` | `registry/base/accordion.tsx` | `components/accordion/index.tsx` | open state runs through `useControllableState` (see [Behavior additions](#behavior-additions)); standalone `Accordion` accepts `highlight` and passes it to its items as their default; the panel morphs out of its row (a shape grows from the press point into the item, content clipped by it, layout height on its bottom edge; the `"item"` tint is that shape melted into the row through `GooFilter`), `effect` / `tier` on `Accordion.Content`; the group's hover highlight and focus ring snap with reflowed rows; statics `.Group/.Item/.Trigger/.Content` |
227
- | `AlertDialog` | — (local) | `components/overlays/alert-dialog/index.tsx` | Base UI AlertDialog root (always modal, no outside-press dismissal) over Dialog's own parts and `DialogState`, so it morphs like Dialog; `AlertDialog.Content` drops the ✕ by default; statics as Dialog's |
228
- | `Badge` | `registry/default/badge.tsx` | `components/badge/index.tsx` | `variant` re-declared (it came from cva's `VariantProps` upstream); changes animate: a new label or variant springs the width (inner content span, `spring.moderate`) while the label blur-crossfades, a new color fades, the dot scales in and out; "Changes" example over a local `change-demo.tsx` stage |
229
- | `Button` | `registry/base/button.tsx` | `components/button/index.tsx` | `variant`/`disabled`/`children` re-declared; extra Sizes / Active / As-child / Loading morph examples; `loading` folds the surface into a circle around the spinner and back (`spring.moderate`, box unchanged), label and spinner crossfade, `aria-busy`, the disabled dim fades; "Loading morph" example over a local `loading-demo.tsx` stage; also serves modo's chrome Button (`shell.Button`) |
230
- | `Calendar` | — (local, on react-day-picker) | `components/inputs/date-time/calendar/index.tsx` (+ `use-month-window.ts`) | DayPicker props pass through (as shadcn's Calendar); styled through `classNames` and custom `Month` / `Day` / `DayButton` (no react-day-picker stylesheet); one scrolling list of months rendered as a 25-month window that moves as you scroll; a pinned weekday row, muted weekends, today's dot; FF's fills (the pick `bg-foreground text-background` like the primary button, a range `bg-active`, its preview `bg-hover`); month and year columns that mark the month being read and jump on click, before or after the days (`columnsSide`), turning into strips when narrow; `extraColumns` / `extraColumnsSide` for the date picker's time |
231
- | `Card` | `registry/default/card.tsx` | `components/card/index.tsx` | `next/link` → plain anchors (stretched card link, `CardButton`'s `href` form); statics `.Group/.Header/.Title/.Description/.Action/.Content/.Footer/.Media/.Image/.Eyebrow/.Feature/.Button` |
232
- | `Checkbox` (upstream `CheckboxItem`), `Checkbox.Group` (upstream `CheckboxGroup`) | `registry/base/checkbox-group.tsx` | `components/inputs/checkbox/index.tsx` | renamed; the row stands alone too (own state from `defaultChecked`, `onCheckedChange`, own hover and focus ring, `size`); rows numbered by the group (`lib/row-index.tsx`), so `index` is optional; uncontrolled mode + group-level callback; item `checked`/`onToggle` optional, falling back to group context; arrow-key focus guarded for `noUncheckedIndexedAccess`; shared `useSelectionRuns`, picks melt and split through the goo |
233
- | `ColorPicker` | `registry/default/color-picker.tsx` | `components/inputs/color-picker/index.tsx` | `@/registry/radix/{slider,tooltip}` → the Base siblings `../slider` / `../../overlays/tooltip`; `noUncheckedIndexedAccess` guards on regex captures, `rgb()`/`hsl()`/`oklch()` parts, `itemRects[i]` and the Slider's array value; static `.Popover`; uncontrolled support was already upstream (verified, kept); `ColorPicker.Popover` (goo on `spring.goo`; `from` / `effect` / `hideSource` / `tier`) and the format menu morph out of their triggers, replacing the motion wrappers and the ignored `actionsRef` |
234
- | `Combobox` | `registry/base/combobox.tsx` | `components/inputs/combobox/index.tsx` | root de-generified (the parser needs a plain function plus a same-file `interface ComboboxProps`): items gained an index signature, `value`/`defaultValue` are `string \| string[]` and `onValueChange` is a union of the two handler shapes; `ComboboxValue<Multiple>` still exported; `creatable` added; `React.*` type refs replaced by named type imports; statics `.Input/.Chips/.Content/.List/.Item/.Empty`; the popup morphs out of the field (morph layer, goo on `spring.goo`; `from` / `effect` / `hideSource` / `tier` on `Combobox.Content`), replacing the `scaleY` wrapper and the `actionsRef` deferred unmount |
235
- | `Command` | — (local) | `components/overlays/command/index.tsx` | Base UI Autocomplete rendered inline in Dialog's panel (`position="top"`, no ✕), morphing from its trigger with goo; grouped/flat command data filtered by label + keywords; one fluid highlight follows Base UI's highlight; ⌘K/Ctrl+K `hotkey` (one palette answers a press); fresh palette per open; statics `.Trigger/.Content/.Palette/.Shortcut`; `CommandList`/`CommandListRoot` exported for Search |
236
- | `ContextMenu` | — (local; see [Morph sources](#morph-sources)) | `components/overlays/context-menu/index.tsx` | Base UI ContextMenu (right click, long press) with the morph layer growing from the press point (`from="pointer"` default, goo on `spring.goo`); rows are Dropdown's `MenuItem`, `Dropdown.Label`, `Dropdown.Separator` with fluid hover; `ContextMenu.Item` adds `shortcut`; `size` on the root; statics `.Trigger/.Content/.Item/.Label/.Separator` |
237
- | `Dialog` | `registry/base/dialog.tsx` | `components/overlays/dialog/index.tsx` | `DialogProps` and `DialogContentProps` fully re-declared (the slot props now come from `lib/slot.ts`); statics attached as expando properties (`Dialog.Trigger = …`), so `<Dialog.Content>` types without a cast; FF's "With a sidebar" example replaced by "Surfaces inside a dialog" (written before the Sidebar was ported); the panel morphs out of its trigger (morph layer, goo on `spring.goo`; `from` / `effect` / `hideSource` / `tier` on `Dialog.Content`), the backdrop fades with the morph's progress, the root holds the open state and scopes `Morph.Part` pairs |
238
- | `Dropdown` | `registry/base/dropdown.tsx` | `components/overlays/dropdown/index.tsx` | uncontrolled selection and uncontrolled search filtering (below); `items[next].focus()` guarded; statics `.Menu/.Trigger/.Content/.Item/.Label/.Separator/.Search/.Empty`; FF's "Create from the query" section skipped — adding a row to the list is real consumer state; the popup menu morphs out of its trigger (morph layer, goo on `spring.goo`; `from` / `effect` / `hideSource` / `tier` on `Dropdown.Content`), replacing the `scaleY` wrapper and the ignored `actionsRef`; popup rows hand activation to the Menu item's `onClick` so Enter / Space pick |
239
- | `DatePicker`, `DateRangePicker`, `TimePicker`, `DurationPicker`, `MonthPicker` | — (local; props after shadcn's date picker and utegsk/ui's pickers) | `components/inputs/date-time/<id>/index.tsx` (+ the group's `picker-shell.tsx`, `time-columns.tsx`) | a field on the field ladder whose panel morphs out of it with Combobox's options (goo by default; `from` / `effect` / `hideSource` / `tier`, in place with `effect="morph"` + `hideSource`), or a bottom `Sheet` under 640px; one hour column with AM/PM on a 12-hour clock; `columnsSide` / `timeColumnsSide`; the panel header types the value in the locale's formats; `value` / `defaultValue` / `onValueChange` with `null` for empty — a `Date`, react-day-picker's `DateRange`, `"HH:mm"`, a date-fns `Duration`, a month's first day; `locale` is a react-day-picker locale throughout |
240
- | — | `registry/default/menu-item.tsx` | `components/overlays/dropdown/menu-item.tsx` | a row with no `checked` derives it from a self-managed panel and toggles the panel's state; `sourceIndex` carries the authored index so selection survives filter re-indexing |
241
- | — | `registry/default/dropdown-search.tsx` | `components/overlays/dropdown/dropdown-search.tsx` | `filter` mode: `value`/`onValueChange` optional, the field reads and writes the query held by the panel (`DropdownFilterContext`) |
242
- | `Copy` (upstream `InputCopy`) | `registry/default/input-copy.tsx` | `components/copy/index.tsx` | renamed, out of the inputs group; `@/registry/radix/tooltip` → `../overlays/tooltip`; `useRef<ReturnType<typeof setTimeout> \| null>(null)` (React 18 overloads); defaults spelled into the prop prose; the tooltip comment's "Radix" reads "Base UI"; the copied state morphs: the glyph's two sheets melt through the goo filter into a status-tinted disc behind the check (✕ on failure) and split back |
243
- | `Input`, `Label`, `InputGroup` | `registry/default/input-group.tsx` | `components/inputs/input/index.tsx` | `InputField` split into `Input` (the ringed box, standalone: own hover outside a group, `invalid`, `size`) and `Label` (a plain `<label>`, rendered through `Field.Label` in a field), composed back by `InputGroup.Field`; item renamed `input`, `Input` the default export; uncontrolled mode (`InputHTMLAttributes`' own `defaultValue` omitted in favour of the local one); static `.Field` |
244
- | `InputMessage` | `registry/default/input-message.tsx` | `components/AI/input-message/index.tsx` | uncontrolled twins for value, files, queue and status (below); `FilePreviewTile` turned into a `forwardRef` (it exits inside `<AnimatePresence mode="popLayout">`, which measures through a ref); guards on `queue[0]`, `history[i]`, `suggestions[i]` and the `moveQueued` swap; FF's Playground section skipped and the surrounding transcript dropped (`ChatMessage` is not ported) |
245
- | — | `registry/default/file-thumbnail.tsx` | `components/AI/input-message/file-thumbnail.tsx` | the lazy `import("pdfjs-dist")` is kept as-is — verified against modo's esbuild settings, it lands in a ~790 kB chunk fetched only when a PDF is attached; the worker still comes from jsDelivr, so no bundler-side worker config is needed; the `@next/next/no-img-element` eslint-disable dropped |
246
- | `Popover` | — (local; after beUI's gooey popover and motion-primitives' morphing popover, see [Morph sources](#morph-sources)) | `components/overlays/popover/index.tsx` | Base UI Popover with the morph layer (goo by default); `openOnHover` on the trigger; statics `.Trigger/.Content/.Title/.Description/.Close` |
247
- | `PreviewCard` | — (local; after beUI's gooey popover, see [Morph sources](#morph-sources)) | `components/overlays/preview-card/index.tsx` | Base UI PreviewCard with the morph layer (goo from the link on `spring.goo`); `delay` / `closeDelay` / `render` on the trigger, a token-styled link by default; `from` without `'pointer'`; statics `.Trigger/.Content` |
248
- | `Radio` (upstream `RadioItem`), `Radio.Group` (upstream `RadioGroup`) | `registry/base/radio-group.tsx` | `components/inputs/radio/index.tsx` | renamed; rows numbered by the group (`lib/row-index.tsx`), so `index` is optional; uncontrolled index and value modes; group context carries a `selectIndex` setter every item calls, so items need no `selected`/`onSelect`; arrow-key focus guarded; selected background is a `GooIndicator` |
249
- | `Search` | — (local; after beUI's morphing search, see [Morph sources](#morph-sources)) | `components/inputs/search/index.tsx` | pill or icon button springing its own width in place (`spring.slow`), growing over its neighbors (`align`); with `items`, Autocomplete suggestions ooze out of the field via the morph layer (goo on `spring.goo`, `effect`/`tier`) with Command's rows; Escape closes → clears → collapses; blur collapses when empty; `shortcut`; `<search>` landmark + form, `onSubmit` |
250
- | `Select` | `registry/base/select.tsx` | `components/inputs/select/index.tsx` | members re-declared one per line (the parser drops members whose type spans lines); upstream's uncontrolled `defaultValue` verified and kept rather than rerouted through `useControllableState`; expando statics `.Trigger/.Content/.Item/.Group/.Label/.Separator`; the popup morphs out of its trigger (morph layer, goo on `spring.goo`; `from` / `effect` / `hideSource` / `tier` on `Select.Content`), replacing the `scaleY` wrapper and the `actionsRef` deferred unmount |
251
- | `Sheet` | — (local; replaces beUI's bottom sheet and drawer, see [Morph sources](#morph-sources)) | `components/overlays/sheet/index.tsx` | Base UI Drawer (swipe to dismiss, snap points, `Drawer.Viewport` for the swipe) with the morph growing from the sheet's own edge; a swipe-dismissed sheet slides on off its edge from the release point (the morph's `exit`); `side`, `snapPoints`, `defaultSnapPoint`; Dialog's parts and `DialogState` (Base UI's Drawer parts are Dialog's); statics as Dialog's plus `.Provider` / `.Indent` |
252
- | `Sidebar` | `registry/base/sidebar.tsx` (+ `registry/default/sidebar-core.tsx`, `sidebar-menu.tsx`; `app/globals.css` `.scroll-divider`) | `components/navigation/sidebar/index.tsx` (+ `sidebar-core.tsx`, `sidebar-menu.tsx`, `sidebar.css`) | the mobile sheet is the DS's `Sheet` (goo from its edge, swipe to dismiss) instead of a Dialog with a framer slide; no collapsed peek: `openOnHover` on the provider opens the sidebar in flow while the pointer is between its edge and the far side of a trigger beside it, the trigger switching between open and on hover (`panel-*-dashed` glyphs added to the icon context); the active row backgrounds are `GooIndicator`s and the hover highlight the liquid `FluidHoverHighlight`; uncontrolled selection (`value` on the buttons, `value` / `defaultValue` / `onValueChange` on `Sidebar`) and collapsible rows (`Sidebar.MenuItem collapsible`, below); statics `.Provider/.Trigger/.Rail/.Inset/.Input/.Header/.Content/.Footer/.Separator/.Group/.GroupLabel/.GroupAction/.GroupActions/.GroupContent/.Menu/.MenuItem/.MenuButton/.MenuAction/.MenuActions/.MenuBadge/.MenuSkeleton/.MenuSub/.MenuSubItem/.MenuSubButton` through a `SidebarComponent` cast; `fontVariationSettings` → `weight-*`, `text-[Npx]` → type roles, hex focus ring → `ring-focus-ring`, `duration-80\|160\|240` → tiers |
253
- | `Slider` | `registry/base/slider.tsx` | `components/inputs/slider/index.tsx` | `var(--color-accent)` → `var(--accent)` (no `--color-*` aliases here); uncontrolled support on the public wrapper, with both engines still fully controlled; `SliderProps extends Omit<SliderEngineProps, "value" \| "onChange">`; React 18 ref types (`MutableRefObject`); indexed reads of the value/step/pip arrays asserted |
254
- | `Switch` | `registry/base/switch.tsx` | `components/inputs/switch/index.tsx` | uncontrolled support; every in-body read goes through the resolved `isChecked` and a `toggle()` that also calls `onToggle`; the thumb is a `GooIndicator` in Base UI's Thumb (stretches as it travels), dragged x held in state; local `description` (muted line, `aria-describedby`) and `trackSide`; local `Switch.Group`: switches as settings rows (track at the end) in one outlined fieldset, after an outlined `Card.Group` (shared hairlines dropped around the fluid hover highlight), rows numbered by the group |
255
- | `Table` | `registry/default/table.tsx` | `components/table/index.tsx` | statics `.Header/.Body/.Row/.Head/.Cell`; `TableProps` / `TableRowProps` exported |
256
- | `Tabs` | `registry/base/tabs.tsx` | `components/navigation/tabs/index.tsx` | `defaultSelectedIndex` added as the index-mode twin of the existing `defaultValue`; indicator and hover pill are `GooIndicator`s (the hover pill returns to the active tab as it fades); statics `.List/.Item/.Panel` |
257
- | `TabsSubtle` | `registry/base/tabs-subtle.tsx` | `components/navigation/tabs-subtle/index.tsx` | uncontrolled mode; panels may be authored inside the root (below); the tab list's ref write goes through `MutableRefObject`; selected and hover pills are `GooIndicator`s; statics `.Item/.Panel` |
258
- | `Textarea` | — (local; Input's multi-line twin) | `components/inputs/textarea/index.tsx` | Base UI `Field.Control` rendered as a `<textarea>`; the field ladder from `lib/field-classes.ts`; padding sized so one row matches the control height; grows from `minRows` to `maxRows` (InputMessage's measure), then scrolls; `value` / `defaultValue` / `onChange` |
259
- | `ThinkingIndicator` | `registry/default/thinking-indicator.tsx` | `components/AI/thinking-indicator/index.tsx` | upstream prop JSDoc kept (it already matches the FF API table); the `.shimmer-text` rule it rides lives in `base.css`; local `variant="goo"` (three dots merging and splitting through `GooFilter`, plain label; default stays `shimmer`); reduced motion also follows MotionConfig |
260
- | `Toast` | — (local; after Sileo, see [Morph sources](#morph-sources)) | `components/overlays/toast/index.tsx` | Base UI Toast (queue, timers, swipe, announcements) with Sileo's pill melting into a body through the shared `GooFilter`; autopilot expand/collapse, six states on the `--status-*` tokens, promise toasts; `Toast` is the provider + viewport, `Toast.Trigger` shows one, `useToast()` the imperative API |
261
- | `Tooltip` | `registry/base/tooltip.tsx` | `components/overlays/tooltip/index.tsx` | `className`/`children` docs filled in; statics `.Provider` / `.PortalContainer`; the slide + fade replaced by the morph layer (goo from the trigger on `spring.goo`, `from` / `effect` / `tier` props; `followCursor` tooltips fade); a hand-off between grouped tooltips skips the morph (Base UI's `data-instant`) |
262
-
263
- #### blocks
264
-
265
- | Item | Upstream | Local | Specific modifications |
266
- |---|---|---|---|
267
- | `SidebarApp` | the app-sidebar.tsx and page.tsx FF's preset generator emits for `sa1FQfCxH6` (`lib/preset/sidebar-install.ts` @ `c367a0d066bc10e663b3d269bc40539ea8417b25`, later than the pin: the generator postdates it) | `blocks/sidebar-app/index.tsx` (+ `nav-data.ts`) | the selected thread rides `Sidebar`'s `value` and shows in the topbar; the switcher keeps its own pick (`defaultCheckedIndex`); the footer's raw icon buttons are the ghost `Button`; `variant`, `side`, `openOnHover`, `contained` props |
268
- | — | `registry/blocks/sidebar-workspace-header.tsx` | `blocks/sidebar-app/workspace-header.tsx` | `fontVariationSettings` → `weight-semibold`, `text-[13px]` / `text-[10px]` → `text-body` / `text-micro-compact`; `defaultCheckedIndex` passed through; the peek-only trigger over the tile dropped |
269
- | — | `registry/blocks/sidebar-user-footer.tsx` | `blocks/sidebar-app/user-footer.tsx` | `text-[13px]` → `text-body` |
270
- | — | `registry/blocks/sidebar-app/search-field.tsx` | `blocks/sidebar-app/search-field.tsx` | `text-[11px]` → `text-micro` |
271
- | — | `registry/blocks/sidebar-app/inset-topbar.tsx` | `blocks/sidebar-app/inset-topbar.tsx` | the trigger's peek-time fade dropped (the sidebar opens on hover in flow, so the trigger stays) |
272
- | — | `registry/default/lib/sidebar-menu-grid.ts` | `blocks/sidebar-app/menu-grid.ts` | the width reads `--anchor-width` only; the `-ml-1` shift dropped (it would move the morph surface's content off its background) |
273
-
274
- `Select` in `modo.components.tsx` is not an item: modo's docs chrome renders its Select slot
275
- with a flat `value` / `onChange` / `options` contract
276
- (`lib/src/lib/slots.tsx`), and this adapter maps it onto
277
- `Select.Trigger` / `Select.Content` / `Select.Item` so the chrome runs on the
278
- design system's own Select. The
279
- `components/inputs/select` item keeps the upstream API untouched.
280
-
281
- `DocsNav` in `modo.components.tsx` is the chrome's Sidebar slot, pinned as
282
- `shell.Sidebar` (by name alone modo would adopt the documented `Sidebar`, an
283
- app shell that needs its provider). Each aside is an inset `Sidebar` with its
284
- own provider, and `global.css` turns the content between them into the inset
285
- card (the lib's grid columns become `auto`, so they follow the sidebars' width
286
- springs). Each provider has `openOnHover`, and its `Sidebar.Trigger` sits in
287
- the card's corner: the trigger, `[` for the nav and `]` for the panel, switch
288
- a side between open and on hover, and on hover it opens once the pointer is
289
- in the column under the trigger (so a browser's own edge hover sidebar stays
290
- out of the way). `DocsNav` owns those keys, so a demo sidebar in the content keeps them only
291
- while it has focus. Below md each side is a drawer; the panel starts on hover
292
- below xl. A section of links is a collapsible `Sidebar.Group` with one
293
- `Sidebar.Menu`, so the current page, the TOC's current heading and the hover
294
- highlight melt from link to link; a panel section (Theme) keeps its control
295
- under the group label.
296
-
297
- `ThemeSwitcher` in `modo.components.tsx` is not an item either: it is the `Theme` entry in
298
- `modo.config.ts` `panel.items`, a `Select` of Light / Dark / System (each row
299
- with its icon, the trigger showing the active one) that reads and sets
300
- `window.__uiTheme` and re-reads it on `ui:themechange`. All switching logic lives in the pre-paint controller
301
- described under **Tailwind → UnoCSS**, so the control holds no theme state of
302
- its own. `demo/scripts/run-design-systems.ts` appends its own `Switcher` panel
303
- item to whatever a design system declares, so both show up under the runner.
304
-
305
- ## Tier mapping
306
-
307
- The tiers mirror the FF docs navigation. FF's "System" pages become
308
- `primitives/`; its "Components" become `components/`. Its sidebar preset
309
- becomes the one block.
310
-
311
- | Tier | Item | Upstream source | FF docs page |
312
- |---|---|---|---|
313
- | primitives | `surface` (Elevated, `.Provider`, `useSurface`) | `lib/elevated.tsx` + `lib/surface-context.tsx` | surfaces |
314
- | primitives | `scroll-area` (ScrollArea) | `base/scroll-area.tsx` | scrollbars |
315
- | primitives | `sizes` (SizeProvider) | `lib/size-context.tsx` | sizes |
316
- | primitives | `fluid-hover` (FluidHover) | `hooks/use-fluid-hover.ts` + `fluid-hover-highlight.tsx` | fluid-hover |
317
- | primitives | `motion` (Motion) | `lib/springs.ts` | motion |
318
- | primitives | `code` (Code) | — (local, sugar-high) | — |
319
- | primitives | `morph` (Morph) | — (local, `lib/use-morph.ts`) | — |
320
- | primitives | `craft` (Craft) | — (local, bad/good pairs) | skill (before/after) |
321
- | components | accordion, button, combobox, dialog, dropdown, select, slider, switch, tabs, tabs-subtle, tooltip | `registry/base/<id>.tsx` | same slug |
322
- | components | `checkbox` (Checkbox, `.Group`), `radio` (Radio, `.Group`) | `registry/base/checkbox-group.tsx`, `radio-group.tsx` | checkbox-group, radio-group |
323
- | components | badge, card, color-picker, input-message, table, thinking-indicator | `registry/default/<id>.tsx` | same slug |
324
- | components | `copy` (Copy) | `registry/default/input-copy.tsx` | input-copy |
325
- | components | `input` (Input, Label, InputGroup) | `registry/default/input-group.tsx` | input-group |
326
- | components | alert-dialog, command, context-menu, popover, preview-card, search, sheet, toast | — (local, see [Morph sources](#morph-sources)) | — |
327
- | components | calendar, date-picker, date-range-picker, time-picker, duration-picker, month-picker (group `inputs/date-time`) | — (local, on react-day-picker) | — |
328
- | components | sidebar | `base/sidebar.tsx` + `default/sidebar-core.tsx` + `default/sidebar-menu.tsx` | sidebar |
329
- | blocks | `sidebar-app` (SidebarApp) | the preset generator's output + `blocks/sidebar-*` | sidebar, preset `sa1FQfCxH6` |
330
-
331
- Button lives in `components/` to mirror the FF docs, and `modo.config.ts`
332
- points `shell.Button` at it explicitly (an explicit path skips modo's tier
333
- check). The chrome renders its icon buttons as `<Button variant="ghost"
334
- size="icon-sm">`, which works because `icon-sm` is upstream's legacy alias for
335
- `icon-compact`.
336
-
337
- Compound components export their root by default, with the parts attached
338
- as statics (`Select.Item`, `Accordion.Trigger`, …). Upstream's named exports
339
- are kept as well.
340
-
341
- ## Omitted
342
-
343
- These are not ported: ThinkingSteps, CommandMenu, ChatMessage and
344
- AskUserQuestions. CommandMenu is the FF docs site's own chrome, which modo's
345
- shell already provides; ThinkingSteps, ChatMessage and
346
- AskUserQuestions are the agent-chat composites, left out of this port's scope.
347
- No ported file imports any of them.
348
-
349
- The files only they, or the FF docs site's nav, use are left out too:
350
- `mobile-drawer`, `nav-item`, `nav-menu`, `lib/theme-context.tsx` (the
351
- `ThemeSwitcher` panel item and vite.ts's pre-paint controller take its
352
- place) and the blocks other than the sidebar's (`queued-stack`,
353
- `dialog-sidebar`). Inside kept files, the same rule removed
354
- `SURFACE_HOVER_BG`, `SURFACE_HOVER_SHADOW` and `surfaceHoverClasses` from
355
- `surface-classes.ts` (only the Sidebar docs' callout cards used them; the
356
- callouts are not ported).
357
-
358
- The same goes for the docs-site-only CSS in `app/globals.css`: `.xl-fade-*`,
359
- `.inview-fade-block`, `.bento-*` and
360
- `.shiki`, plus the Tailwind directives, the self-hosted Inter `@font-face`
361
- and the Radix-only scroll-lock margin fix (`body[data-scroll-locked]`).
362
-
363
- `surface.css` does keep the inset shadow variants (`--shadow-light-2-inset`,
364
- `--shadow-light-3-inset` and the per-scheme `--shadow-2-inset` /
365
- `--shadow-3-inset` aliases), but no ported item consumes them and
366
- `preset.ts` maps no utility to them.
367
-
368
- ## Tailwind → UnoCSS
369
-
370
- `uno.config.ts` uses `presetWind4` (UnoCSS's Tailwind v4 preset) and
371
- `preset.ts` (the theme and token utilities the package ships) with
372
- `outputToCssLayers`. `vite.ts` adds the UnoCSS Vite plugin to modo's Vite
373
- config. `scripts/build-css.ts` runs the same config over `dist/` for the
374
- prebuilt `styles.css`, and turns `preset.ts` into `tailwind.css`.
375
-
376
- - **Dark mode.** `dark: 'class'` produces `.dark .dark\:x`, the same "inside a
377
- `.dark` ancestor" contract as FF's `@custom-variant dark (&:is(.dark *))`.
378
- modo ships no theme of its own, so `vite.ts` injects a small controller into
379
- `index.html` (`transformIndexHtml`, `head-prepend`). Before first paint it
380
- puts `light` or `dark` on `<html>` — the stored preference, or the OS one
381
- under `system` — which is also what flips every `light-dark()` token through
382
- `color-scheme`. It exposes `window.__uiTheme` (`get` / `set`), persists the
383
- choice in `localStorage` under `modo-ui-theme`, and fires `ui:themechange`
384
- on every apply, including when the OS flips underneath `system`.
385
- - **Load order.** The same plugin prepends `import 'virtual:uno.css'` to
386
- modo's `\0virtual:modo-config-css` module, so UnoCSS's
387
- `@layer properties, theme, base, default` statement lands before
388
- `global.css` (and the `base.css` it imports) and fixes the order of the
389
- layer its `@layer base` rules join.
390
- `vite.ts` is loaded by Node with type stripping, so it may only use erasable
391
- TypeScript and hands `uno.config.ts` to UnoCSS by absolute path.
392
- - **Colors.** Theme colors point at the CSS variables directly (for example
393
- `accent: 'var(--accent)'`, `surface.1..8`). wind4 applies opacity modifiers
394
- to `var()` colors with `color-mix(in srgb, …)`, so `bg-accent/12` works on
395
- the `light-dark()` tokens.
396
- - **Shadows.** `shadow-surface-N` maps to `var(--shadow-N)`, which is
397
- re-pointed per scheme in `surface.css`.
398
- - **Radius.** wind4's default scale stays (`rounded-lg` = 8px). shape-context
399
- pairs `rounded-lg` with 8px JS radii, so the scale must not follow
400
- `--radius`.
401
- - **Font.** `font.sans` repeats the literal family from
402
- `tokens/typography.css` rather than `var(--font-sans)`: wind4 emits theme
403
- keys as same-named variables, and a self-reference would be a cycle.
404
- - **Type roles.** `text-display|title|subtitle|body|caption` is a custom rule
405
- reading `var(--text-<role>)`.
406
- - **Transitions.** wind4's arbitrary `transition-[a,b]` only accepts CSS
407
- properties it knows. `stroke-width` (icon stroke on hover) and
408
- `font-variation-settings` (the Inter weight ladder) are added through
409
- `theme.property`.
410
- - **Layers.** UnoCSS declares `@layer properties, theme, base, default` and
411
- puts its reset in `base`. `base.css`'s `@layer base` rules join that layer
412
- after the reset, so utilities (in `default`) still win. This is the same
413
- arrangement as Tailwind's base/utilities split.
414
- - **Content.** UnoCSS scans `{lib,primitives,components,blocks}/**/*.{ts,tsx,mdx}`
415
- and `modo.components.tsx` from disk (`content.filesystem`, and the same
416
- globs in `content.pipeline.include`, since the default pipeline skips
417
- `.ts`). Two reasons:
418
- - modo serves items pre-bundled, so the sources never pass through Vite's
419
- transform pipeline;
420
- - example code exists only in each item's `examples.mdx`.
421
-
422
- The class-name literal tables (`SURFACE_BG`, `sizeMap`, …) do the same job
423
- for UnoCSS's extractor that they do for Tailwind's scanner.
424
- - **Focus.** modo's structural `shell.css` draws an unlayered `*:focus-visible`
425
- outline. `global.css` reverts it with `outline: revert-layer` (and
426
- `outline-offset: revert-layer`), handing focus styling back to `@layer base`
427
- and the utilities, so FF's ring (1px `--focus-ring`) is the only one drawn.
428
-
429
- Every Tailwind idiom FF uses has a wind4 equivalent, among them:
430
- - named groups (`group-[.is-active]/row:`)
431
- - `has-data-[…]:`
432
- - arbitrary variants (`[[data-side=top]_&]:`, `[&>div[style]]:!block`)
433
- - `supports-[…]:`
434
- - arbitrary properties (`[text-box:…]`, `[--popup-enter-y:-4px]`)
435
- - typed arbitrary values (`ring-[color:…]`)
436
- - `duration-80`, `!h-auto`
437
- - `transition-[color,stroke-width]`, `transition-[font-variation-settings]`
438
- - `bg-accent/12` → `color-mix`, `shadow-surface-3`, `dark:bg-surface-2`
439
- - the type-role rule and wind4's unchanged `--radius-lg: 0.5rem`
440
-
441
- No upstream class string had to change. The current run covers 45 files and
442
- 3299 class tokens (561 unique), and all of them generate.
443
-
444
- ## `cn`
445
-
446
- `lib/utils.ts` exports `cn = createCn({ extend: { classGroups: {
447
- 'font-size': ['text-display', …] } } })` from `cn/config`. `cn` is a compiled
448
- drop-in for clsx + tailwind-merge with the same `extend` shape.
449
-
450
- The font-size extension keeps upstream's fix. Without it, `text-body` would
451
- be read as a text *color*, and `cn('text-body', 'text-muted-foreground')`
452
- would drop the size.
453
-
454
- ## Behavior additions
455
-
456
- Base UI components work both controlled and uncontrolled. The FF wrappers
457
- that were controlled-only gain a `default*` prop, backed by
458
- `lib/use-controllable-state.ts`: a component is controlled while its
459
- value prop is not `undefined`, and it reports every change through its
460
- callback either way. Where FF only had per-item callbacks, a group-level one
461
- was added and the item's own state props became optional.
462
-
463
- | Item | Controlled prop | Added uncontrolled prop | Added change callback |
464
- |---|---|---|---|
465
- | Accordion, Accordion.Group | `value` | `defaultValue` (semantics fixed, below) | — (`onValueChange` now also fires uncontrolled) |
466
- | Checkbox | `checked` (now optional) | `defaultChecked` (standalone) | `onCheckedChange` |
467
- | Checkbox.Group | `checkedIndices` (now optional) | `defaultCheckedIndices` (`Set` or array) | `onCheckedIndicesChange` |
468
- | Dropdown, Dropdown.Content | `checkedIndex`, `checkedIndices` | `defaultCheckedIndex`, `defaultCheckedIndices` | `onCheckedIndexChange`, `onCheckedIndicesChange` |
469
- | Input, InputGroup.Field | `value`, `onChange` (now optional) | `defaultValue` | — |
470
- | InputMessage | `value`, `files`, `queue`, `status` | `defaultValue`, `defaultFiles`, `defaultQueue`, `defaultStatus` | `onValueChange` optional; `onStatusChange` added |
471
- | Radio.Group | `selectedIndex`, `value` | `defaultSelectedIndex`, `defaultValue` | `onSelectedIndexChange` (`onValueChange` now also fires uncontrolled) |
472
- | Slider | `value`, `onChange` (now optional) | `defaultValue` | — |
473
- | Switch | `checked`, `onToggle` (now optional) | `defaultChecked` | `onCheckedChange` |
474
- | Sidebar | `value` (new: the row whose `value` is selected) | `defaultValue` | `onValueChange` |
475
- | Sidebar.MenuItem `collapsible` | `open` (new: its sub-menu; upstream's docs held it in page state) | `defaultOpen` | `onOpenChange` |
476
- | Tabs | `value`, `selectedIndex` | `defaultSelectedIndex` (`defaultValue` is upstream's) | — |
477
- | TabsSubtle | `selectedIndex`, `onSelect` (now optional) | `defaultSelectedIndex` | — |
478
-
479
- Already uncontrolled upstream and left on their own internal state (none of
480
- these go through `useControllableState`): Select `defaultValue` — checked
481
- explicitly, see its file header — ColorPicker and ColorPicker.Popover
482
- (`defaultValue`, `defaultFormat`, `defaultFormatOpen`, `defaultOpen`),
483
- Combobox `defaultValue`, Tabs `defaultValue`, and the `defaultOpen` of
484
- Dropdown.Menu. Dialog's `open` / `defaultOpen` now go through
485
- `useControllableState`, because the morph reads the open state.
486
-
487
- Notable local behavior changes beyond the `default*` props:
488
-
489
- | Item | Change |
490
- |---|---|
491
- | Accordion | Upstream treated the presence of `onValueChange` as "controlled", so an uncontrolled accordion with a listener never opened. Now `value` alone controls, and `defaultValue` seeds an accordion that still reports changes. |
492
- | Radio.Group | The group context carries a `selectIndex` setter that every item selection calls (after its own `onValueChange` / `onSelect`), so items need no `selected` / `onSelect` of their own. |
493
- | Checkbox.Group | The group context carries the checked set plus a setter; an item's toggle always reports to the group as well. |
494
- | TabsSubtle | Panels may now be written inside `<TabsSubtle>`: the root partitions its children, keeps the tabs inside the tab list and renders the panels as its siblings right after it (the root element *is* the `role="tablist"`, so panels cannot nest in it). A panel with no `selectedIndex` / `idPrefix` reads both from context, the prefix falling back to a `useId()` one; a panel rendered outside `<TabsSubtle>` still takes them as props. |
495
- | Dropdown | `Dropdown.Search` with `filter` hands the query to the panel, which drops the `Dropdown.Item` rows whose `label` doesn't match, re-indexes the survivors for fluid hover, and shows `Dropdown.Empty` only when nothing matched — the work the controlled form asks the consumer to do. Selection stays keyed on the authored index (`sourceIndex`), so it survives re-indexing. |
496
- | Combobox | `creatable` offers the create row with no callback and the component keeps the items it makes (merged into `items`, deduped by value), so a combobox can grow its own list; `onCreate` is unchanged and still wins when it returns an item. The root is also no longer generic — see the file map. |
497
- | InputMessage | Attachments are enabled by `onFilesChange` **or** `defaultFiles`; the queue by `onQueueChange` **or** `defaultQueue` (still only alongside a status). With the status uncontrolled the Stop control is offered even without `onStop` and flips the status to `"idle"` itself, which is the edge that auto-dispatches the head of the queue. An uncontrolled draft and file list clear themselves after `onSend`. |
498
- | Card | `next/link` is gone: the stretched card link and `CardButton`'s `href` form render plain anchors. Examples use inline `data:image/svg+xml` gradients instead of real image files. |
499
- | Dialog, Select, Combobox | Statics are attached as expando properties (`Dialog.Trigger = …`) rather than through `Object.assign`, so TypeScript infers them without a cast and `check-items` can see them. |
500
-
501
- ## Dependency deltas (vs upstream `package.json`)
502
-
503
- | Upstream | Here | Why |
504
- |---|---|---|
505
- | `tailwindcss`, `@tailwindcss/postcss` ^4 | `unocss` 66.10.5 (pinned) | UnoCSS instead of Tailwind |
506
- | `clsx`, `tailwind-merge` | `cn` ^0.3.0 | Compiled drop-in |
507
- | `framer-motion` ^12 + `motion` ^12 | `motion` ^13.4.0 | One package; imports use `motion/react` |
508
- | `@base-ui/react` ^1.4.1 | `@base-ui/react` 1.4.1 (exact) | FF styling relies on its `--anchor-width`, `--available-height` and `data-side` hooks |
509
- | `lucide-react` ^0.564 | `lucide-react` ^1.47.0 | Workspace version; `icon-context`'s `size`/`strokeWidth` widened to `number \| string` for it |
510
- | `react` / `react-dom` ^19 | ^18.3 | The workspace pins React 18. React 19's ref typings are adapted per file: `MutableRefObject` casts where a forwarded ref is written, `useRef<T \| null>(null)` instead of the 1-arg null form, and `FilePreviewTile` turned into a `forwardRef` (React 19 passes `ref` as a plain prop; React 18 warns and drops it). |
511
- | self-hosted `InterVariable.ttf` | `@fontsource-variable/inter` ^5.3.0 (`opsz.css`) | npm-distributed. The opsz axis is needed by the `--weight-*` ladder. |
512
- | `pdfjs-dist` ^5.7.284 | same | InputMessage PDF thumbnails. It bundles under modo's esbuild as a lazy ~790 kB chunk; the worker is loaded from `cdn.jsdelivr.net`, as upstream does. |
513
- | `class-variance-authority` ^0.7.1 | same | |
514
- | `next` (`next/link`, `next/image` lint) | — | No Next.js here |
515
- | — | `@justanarthur/modo` (workspace) | The design system's own host |
516
- | — | `sugar-high` ^2.5.1 | Tokenizer for the local `primitives/code` item |
517
- | — | `react-day-picker` ^10.0.2, `date-fns` ^4.4.0 | The calendar under the date pickers, and its date math, formats and locales (`react-day-picker/locale`); date-fns is declared because the pickers import it directly |
518
- | — | `vite` ^5.4, `esbuild` ^0.20, `typescript` ^5.4, `@types/react(-dom)` ^18.3 (dev) | `vite` ^5.4 makes UnoCSS's peer reuse modo's Vite 5. The others serve the scripts and `tsc`. |
519
-
520
- Every import is declared here, because bun's isolated linker only exposes
521
- declared packages.
522
-
523
- ## Docs and examples
524
-
525
- What modo's parser (`lib/src/lib/tsdoc.ts`) and example compiler
526
- (`lib/src/lib/example.ts`) need, and how this package answers it:
527
-
528
- - **The item is the file's `export default`** — either `function X(…)` or a
529
- `const X = forwardRef<HTMLXElement, XProps>(…)`. The forwardRef form's first
530
- type argument must contain no `<` or `,`, which is why ScrollArea spells out
531
- `HTMLDivElement` instead of `ComponentRef<typeof …>`, and why Combobox's
532
- root lost its generics.
533
- - **Props come from a same-file `interface XProps`**, and only from members
534
- declared in its body — inherited members are invisible, and a member whose
535
- type spans several lines is dropped. Every member needs a description, and
536
- defaults are read from that prose (`Defaults to \`false\`.`), not from the
537
- destructuring. Hence the FF API-table text re-declared on every prop.
538
- - **Examples live in `examples.mdx`** next to the item, included by the
539
- TSDoc's `@example {@include ./examples.mdx}`: a `# <FF section title>`,
540
- an optional caption, then one JSX block (or a fenced code block for code to
541
- read). Expressions are plain JS (no `as const`), and multi-line JSX text
542
- stays inline (modo unwraps MDX's paragraphs inside examples).
543
- - **Examples are hook-free JSX.** Nothing runs a component body, so
544
- interactivity in the docs comes from the `default*` props above instead of
545
- `useState`.
546
- - **Imports are real**: the item is `./index`, other items are
547
- `../../<tier>/<id>` (one `../` more from or to a group folder), icons come from `lucide-react`. Every free identifier
548
- must be imported (or be an item name or a JS/DOM global), and every
549
- `Item.Part` used must really be attached to that item.
550
-
551
- Each item follows its FF docs page: the TSDoc holds the one-liner, a concept
552
- paragraph and the list of statics; `examples.mdx` holds one `# <FF section
553
- title>` example per docs section. Playground and API Reference sections are never ported (the API
554
- tables become the prop docs instead). Other per-item deviations:
555
-
556
- | Item | Docs deviation |
189
+ ## Next.js and React Server Components
190
+
191
+ - Every module with state, effects, handlers or browser APIs opens with
192
+ `'use client'`, kept at the top of each built chunk, so the components work
193
+ from Server Components (Next.js App Router) as client components.
194
+ - `@justanarthur/modo-ui/lib/{utils,springs,size-scale,shape-classes,field-classes,surface-classes}`
195
+ and `components/{actions/button,data-display/badge,inputs/color-picker,inputs/file-dropzone}/variants` carry no
196
+ `'use client'`, so a Server Component can call `cn`, read the class tables,
197
+ build a link with `buttonVariants({ surface: true })`, parse a color or check a file with `acceptsFile`. The
198
+ components and the context and hook subpaths are client modules; each
199
+ context is one instance, shared by the barrel, the items and the subpaths.
200
+ - In a Server Component, use the named parts (`CardHeader`, `DialogContent`,
201
+ `TabsList`, `SidebarMenuButton`, …) rather than the dotted form
202
+ (`Card.Header`): React can't read a property off a client module from the
203
+ server. Both are exported; the dotted form works in client components.
204
+
205
+ ## Hooks for your own components
206
+
207
+ The motion and layout systems are exported, so components of your own move
208
+ and stack the way these do (the docs' Morph, Motion, Sizes and Surface pages
209
+ show them):
210
+
211
+ | Export | What it does |
557
212
  |---|---|
558
- | Button | Extra Sizes / Active / As-child examples, for API-table props the FF page has no section for. |
559
- | Dialog | "With a sidebar" replaced by "Surfaces inside a dialog" (a Select popover lifting off the dialog's own level) — the same point about composing inside an `xl` panel, with items this port ships. |
560
- | Sidebar | Layouts split into three examples; "Callouts" (docs-only cards), "Inside a dialog", the "No icon rail" prose (folded into the TSDoc) and "Functional and perfectly aligned" (an alignment-guides overlay) skipped; "Mobile drawer" added. Frames pass `mobileBreakpoint={0}` like FF's, so a rail stays a rail inside them. |
561
- | SidebarApp | One block page for FF's preset playground: the preset itself (collapsed), open, open on hover, floating on the right. |
562
- | Dropdown | "Create from the query" skipped: adding a row to the list is real consumer state, which an uncontrolled panel cannot stand in for. |
563
- | InputMessage | Playground skipped; the transcript around the Attachments / Send Handler demos dropped, since `ChatMessage` is not ported. |
564
- | FluidHover | The two scripted-cursor demos are dropped — they exist only to film the mechanism. |
565
- | SizeProvider | Live demos become static examples; the token-inspector overlay is dropped and the demo components are swapped for ones this port ships. |
566
- | Motion | The ball-on-track and fake-modal visuals become a show/hide of arbitrary children; component chips are plain text. |
567
- | Card | Images are inline `data:image/svg+xml` gradients. |
568
-
569
- ## Known limitations
570
-
571
- - The 22px mobile display size and the `html[data-size="compact"]` type-scale
572
- override are not carried over. Both are FF docs-site chrome. Compact type
573
- reaches components through `SizeProvider` / `useTypeScale()`.
574
- - Theme switching is docs-site glue, not a ported `ThemeProvider`: vite.ts's
575
- pre-paint controller and the `ThemeSwitcher` panel item. A `.light` /
576
- `.dark` class on a subtree still forces that scheme, which is what the
577
- forced-theme previews use.
578
- - `transition-[…]` with a CSS property outside wind4's list needs a
579
- `theme.property` entry in `preset.ts`.
580
- - Cross-item context (a `SizeProvider` example shrinking a Button, a surface
581
- level crossing from Dialog into Dropdown) depends on modo bundling the whole
582
- design system in **one** esbuild build with `splitting: true`, so a shared
583
- module exists once at runtime. The output lives in this package's
584
- `.modo-tmp/build`, which is keyed on the package and not on the port: two
585
- `modo dev` servers started in this directory share it. `run-design-systems.ts`
586
- avoids that by killing stray `modo dev` processes before it starts.
587
- - PDF thumbnails in InputMessage need network access: the pdfjs worker is
588
- fetched from `cdn.jsdelivr.net` on the first PDF attachment.
589
- - The inset shadow tokens in `surface.css` are dead weight today — they ship,
590
- but nothing in this package reads them.
591
-
592
- ## How to run
213
+ | `useMorph(open, origin, options)` | The morph engine: grows an overlay's surface from its source (the trigger, the press point, an edge) to its own box on a spring tier, with a liquid goo neck by default, and holds it through the exit. |
214
+ | `MorphSurface` | Renders a `useMorph` state: the goo-filtered shape, the surface's background and shadow, the content clipped by it. |
215
+ | `GooFilter` | The SVG goo filter behind the morph and the indicators, for shapes of your own that melt together (`filter: url(#id)` on their parent). |
216
+ | `GooIndicator` | An indicator (a selection, a thumb) that travels between items' rects and melts like a drop of liquid on the way. |
217
+ | `useReduceMotion()` | The one reduced-motion read: the OS setting, or a `<MotionConfig reducedMotion>` asking for it. |
218
+ | `useControllableState(value, defaultValue, onChange)` | Controlled and uncontrolled state in one, Base UI style: controlled while `value` isn't `undefined`, reporting every change either way. |
219
+ | `spring`, `exitFallbackMs` | The spring tiers (`fast`, `moderate`, `slow`, `goo`), each with its quicker `exit` tween, for motion's `transition`. |
220
+ | `useSize`, `useSizeVariant`, `SizeProvider`, `SizeScope` | The size ladder: a component's classes for its step, the step a region chose, and the providers that set it (`SizeScope` only when a `size` is given). |
221
+ | `useSurface`, `useLift(offset)`, `SurfaceProvider`, `Elevated` | The surface ladder: the substrate level, the level `offset` above it (capped at 8), re-providing it, and a raised `div`. |
222
+ | `useFluidHover`, `FluidHoverHighlight`, `FluidHover` | The fluid hover highlight: the hook and its highlight for a custom list, or the container for a simple one. |
223
+ | `IconProvider`, `ShapeProvider` | Swap the icon set, or switch every radius between rounded and pill. |
224
+ | `useFieldBox`, `useFieldState` (`lib/field-box`) | The field ladder's box around a control of your own, and an enclosing `Field`'s state resolved against a control's own props. |
225
+ | `useToast()`, `toast` | Show toasts: `useToast()` inside a `Toast`, or the global `toast` anywhere once `<Toast manager={toast} />` is mounted (one per app). Both have `show`, `success`, `error`, `warning`, `info`, `loading`, `promise`, `update` and `close`. |
226
+ | `Sortable`, `useSortableHandle`, `VirtualList`, `Resizable` | Building blocks for lists and layouts: reorder by pointer or keyboard (the handle props for a button of your own), render only the rows in view (a ref's `scrollToIndex`), and split a region into panes that resize. |
227
+ | `Diff`, `Markdown`, `LogView`, `parsePatch`, `parseAnsi` | Text on the page: a unified patch, a markdown string (on `marked`, raw HTML stays text, `streaming` for text that is still arriving) and terminal output with ANSI colors that follows its tail; the parsers for your own rendering. |
228
+ | `useAutosizeTextarea(ref, { minRows, maxRows }, deps)`, `useTouchPrimary()` | A textarea that grows with its text and then scrolls; whether the primary pointer is touch, to skip pointer-only machinery. |
229
+ | `cn` | Class merging that knows the token utilities (`cn('text-body', 'text-muted-foreground')` keeps both). |
230
+
231
+ ## Documenting ui items in your own modo site
232
+
233
+ A [modo](https://github.com/justAnArthur/modo/tree/main/lib) site can list ui
234
+ items next to its own. Re-export one as an item:
593
235
 
594
- ```sh
595
- cd demo && bun scripts/run-design-systems.ts ui # http://127.0.0.1:5173
236
+ ```tsx
237
+ // components/actions/button/index.tsx
238
+ export { default } from '@justanarthur/modo-ui/components/actions/button'
596
239
  ```
597
240
 
598
- The runner kills stray `modo dev` processes, splices a temporary
599
- `.modo.config.ts` with the demo switcher panel, and assigns ports from 5173
600
- upward. To run the package on its own, without the switcher:
241
+ The package ships its TypeScript sources and each item's `examples.mdx` under
242
+ a `source` export condition, which modo reads and bundlers and Node skip
243
+ (they take `dist/`): the page gets the item's description, prop table and live examples,
244
+ bundled from those sources so they share one copy of each context. Load ui's
245
+ styles in the site's `css` (`@import "@justanarthur/modo-ui/styles.css";`);
246
+ the prebuilt sheet holds the components' utilities, so for the layout
247
+ utilities the examples add, point your Tailwind `@source` or UnoCSS `content`
248
+ at `node_modules/@justanarthur/modo-ui/{primitives,components,blocks}`.
601
249
 
602
- ```sh
603
- cd ui && MODO_PORT=5180 bunx modo dev
604
- ```
250
+ To wear ui's docs look as well, pin the chrome's slots to `@justanarthur/modo-ui/docs`,
251
+ load its look after the package styles and add the theme script:
605
252
 
606
- ## How to verify
253
+ ```ts
254
+ // modo.config.ts
255
+ shell: {
256
+ Button: '@justanarthur/modo-ui/docs#Button',
257
+ Link: '@justanarthur/modo-ui/docs#Link',
258
+ Select: '@justanarthur/modo-ui/docs#Select',
259
+ Icon: '@justanarthur/modo-ui/docs#Icon',
260
+ Sidebar: '@justanarthur/modo-ui/docs#DocsNav',
261
+ },
262
+ panel: { items: [{ label: 'Theme', component: '@justanarthur/modo-ui/docs#ThemeSwitcher' }] },
263
+ vite: './vite.ts',
264
+ ```
607
265
 
608
- ```sh
609
- cd ui && bunx tsc -p . --noEmit
266
+ ```css
267
+ /* the site's css */
268
+ @import "@justanarthur/modo-ui/docs/chrome.css";
610
269
  ```
611
270
 
612
- modo reports parser and build problems itself, as `[modo:bundle]` lines in
613
- the dev server's output.
271
+ `@justanarthur/modo-ui/docs/vite` exports `docsTheme({ storageKey })`, a Vite
272
+ plugin that applies the stored light / dark / system preference before first
273
+ paint (add it to `config.plugins` in your `vite` extension), and
274
+ `withUno(configFile)`, the whole extension for a UnoCSS host (UnoCSS over your
275
+ uno config, plus `docsTheme`; needs `unocss`). The chrome's own elements are
276
+ styled by `chrome.css` through `data-modo-ui` attributes, so nothing needs
277
+ scanning.
278
+
279
+ ## Credits
280
+
281
+ modo-ui is a port of [Fluid Functionalism](https://github.com/mickadesign/fluid-functionalism)
282
+ by Micka Touillaud / mickadesign, at commit
283
+ `b3587bdbd83fc66c2a6aae3817ffb856cb09260b`: MIT © 2026 Micka Touillaud, full
284
+ text in [`LICENSE.fluid-functionalism`](./LICENSE.fluid-functionalism). Every
285
+ vendored file keeps its provenance header.
286
+
287
+ The morph layer takes techniques from three more MIT projects:
288
+
289
+ | Project | Repository @ commit | License | What it contributes |
290
+ |---|---|---|---|
291
+ | beUI | `github.com/starc007/ui-components` @ `de52f337e520e7ee37749b36eb1c32df86137bcb` | MIT © 2026 Saurabh Chauhan, [`LICENSE.beui`](./LICENSE.beui) | the gooey popover's rect interpolation, rounded-rect path, source cutout and goo filter; the morphing search (idea only) |
292
+ | motion-primitives | `github.com/ibelick/motion-primitives` @ `120f64f6ca60348e251f929e9c81f11ccbe45eda` | MIT © 2024 ibelick, [`LICENSE.motion-primitives`](./LICENSE.motion-primitives) | the morphing popover and morphing dialog (trigger growing into the panel, shared parts) |
293
+ | Sileo | `github.com/hiaaryan/sileo` @ `9793f844349983e140cf33cebbb8f51626d41407` | MIT, [`LICENSE.sileo`](./LICENSE.sileo) | the goo blur as a share of the surface radius; the gooey toast |
294
+
295
+ Sileo declares MIT in its `package.json` but ships no LICENSE file, so
296
+ `LICENSE.sileo` is the standard MIT text naming the repository's owner.
297
+ beUI's and motion-primitives' are copied verbatim. Only visuals come from
298
+ these projects: Base UI keeps all behavior (positioning, focus, dismissal,
299
+ hover and tap, scroll lock).
300
+
301
+ The package itself is MIT ([`LICENSE`](./LICENSE)). How the port was done
302
+ (the upstream → local file map, every local modification, the Tailwind →
303
+ UnoCSS translation) is in [`PORTING.md`](https://github.com/justAnArthur/modo/blob/main/ui/PORTING.md)
304
+ in the repository.