@remix-run/ui 0.3.0 → 0.5.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 (434) hide show
  1. package/README.md +116 -157
  2. package/dist/accordion/index.d.ts +46 -0
  3. package/dist/accordion/index.js +142 -0
  4. package/dist/accordion/index.js.map +1 -0
  5. package/dist/accordion/primitives.d.ts +104 -0
  6. package/dist/accordion/primitives.js +312 -0
  7. package/dist/accordion/primitives.js.map +1 -0
  8. package/dist/{components/anchor/anchor.js → anchor/index.js} +1 -1
  9. package/dist/anchor/index.js.map +1 -0
  10. package/dist/animation/animate-layout-mixin.js +1 -1
  11. package/dist/animation/animate-layout-mixin.js.map +1 -1
  12. package/dist/animation/animate-mixins.js +2 -2
  13. package/dist/animation/animate-mixins.js.map +1 -1
  14. package/dist/animation/demos/color-interpolation.js +1 -1
  15. package/dist/animation/demos/color-interpolation.js.map +1 -1
  16. package/dist/animation/demos/drag-release.d.ts +1 -1
  17. package/dist/animation/demos/hold-to-confirm.d.ts +3 -3
  18. package/dist/animation/demos/material-ripple.js +1 -3
  19. package/dist/animation/demos/material-ripple.js.map +1 -1
  20. package/dist/animation/demos/reordering.js +9 -6
  21. package/dist/animation/demos/reordering.js.map +1 -1
  22. package/dist/animation/index.js +4 -4
  23. package/dist/animation/spring.js.map +1 -1
  24. package/dist/{components/breadcrumbs/breadcrumbs.js → breadcrumbs/index.js} +19 -19
  25. package/dist/breadcrumbs/index.js.map +1 -0
  26. package/dist/button/index.d.ts +15 -0
  27. package/dist/button/index.js +128 -0
  28. package/dist/button/index.js.map +1 -0
  29. package/dist/checkbox/index.d.ts +14 -0
  30. package/dist/checkbox/index.js +127 -0
  31. package/dist/checkbox/index.js.map +1 -0
  32. package/dist/combobox/index.d.ts +21 -0
  33. package/dist/combobox/index.js +58 -0
  34. package/dist/combobox/index.js.map +1 -0
  35. package/dist/{components/combobox/combobox.d.ts → combobox/primitives.d.ts} +4 -8
  36. package/dist/{components/combobox/combobox.js → combobox/primitives.js} +8 -61
  37. package/dist/combobox/primitives.js.map +1 -0
  38. package/dist/dev/refresh.d.ts +1 -0
  39. package/dist/dev/refresh.js +2 -0
  40. package/dist/dev/refresh.js.map +1 -0
  41. package/dist/index.d.ts +1 -1
  42. package/dist/index.js +14 -14
  43. package/dist/input/index.d.ts +13 -0
  44. package/dist/input/index.js +121 -0
  45. package/dist/input/index.js.map +1 -0
  46. package/dist/jsx-runtime.js +2 -2
  47. package/dist/listbox/flash-attribute.js.map +1 -0
  48. package/dist/{components/listbox/listbox.d.ts → listbox/index.d.ts} +2 -6
  49. package/dist/{components/listbox/listbox.js → listbox/index.js} +4 -82
  50. package/dist/listbox/index.js.map +1 -0
  51. package/dist/menu/hover-aim.js.map +1 -0
  52. package/dist/menu/index.d.ts +42 -0
  53. package/dist/menu/index.js +250 -0
  54. package/dist/menu/index.js.map +1 -0
  55. package/dist/{components/menu/menu.d.ts → menu/primitives.d.ts} +4 -33
  56. package/dist/{components/menu/menu.js → menu/primitives.js} +98 -315
  57. package/dist/menu/primitives.js.map +1 -0
  58. package/dist/{components/popover/popover.d.ts → popover/index.d.ts} +2 -4
  59. package/dist/{components/popover/popover.js → popover/index.js} +5 -48
  60. package/dist/popover/index.js.map +1 -0
  61. package/dist/{interactions/outside-click/outside-click-mixin.js → popover/outside-click.js} +1 -1
  62. package/dist/popover/outside-click.js.map +1 -0
  63. package/dist/popover/scroll-lock.d.ts +1 -0
  64. package/dist/{utils → popover}/scroll-lock.js +0 -18
  65. package/dist/popover/scroll-lock.js.map +1 -0
  66. package/dist/radio/index.d.ts +12 -0
  67. package/dist/radio/index.js +77 -0
  68. package/dist/radio/index.js.map +1 -0
  69. package/dist/runtime/client-entry-boundary.d.ts +14 -0
  70. package/dist/runtime/client-entry-boundary.js +29 -0
  71. package/dist/runtime/client-entry-boundary.js.map +1 -0
  72. package/dist/runtime/component.d.ts +19 -4
  73. package/dist/runtime/component.js +39 -9
  74. package/dist/runtime/component.js.map +1 -1
  75. package/dist/runtime/core/attributes.js +36 -3
  76. package/dist/runtime/core/attributes.js.map +1 -1
  77. package/dist/runtime/core/children.d.ts +2 -0
  78. package/dist/runtime/core/children.js +26 -2
  79. package/dist/runtime/core/children.js.map +1 -1
  80. package/dist/runtime/core/props.js +2 -2
  81. package/dist/runtime/core/vnode.d.ts +3 -3
  82. package/dist/runtime/core/vnode.js +22 -1
  83. package/dist/runtime/core/vnode.js.map +1 -1
  84. package/dist/runtime/create-element.d.ts +2 -2
  85. package/dist/runtime/create-element.js +3 -2
  86. package/dist/runtime/create-element.js.map +1 -1
  87. package/dist/runtime/diff-dom.js +294 -219
  88. package/dist/runtime/diff-dom.js.map +1 -1
  89. package/dist/runtime/diff-props.js +3 -3
  90. package/dist/runtime/dom.d.ts +12 -0
  91. package/dist/runtime/element-function.d.ts +3 -0
  92. package/dist/runtime/element-function.js +2 -0
  93. package/dist/runtime/element-function.js.map +1 -0
  94. package/dist/runtime/form-navigation.d.ts +25 -0
  95. package/dist/runtime/form-navigation.js +132 -0
  96. package/dist/runtime/form-navigation.js.map +1 -0
  97. package/dist/runtime/frame-resolution.d.ts +5 -0
  98. package/dist/runtime/frame-resolution.js +10 -0
  99. package/dist/runtime/frame-resolution.js.map +1 -0
  100. package/dist/runtime/frame.d.ts +58 -15
  101. package/dist/runtime/frame.js +367 -114
  102. package/dist/runtime/frame.js.map +1 -1
  103. package/dist/runtime/jsx.d.ts +1 -1
  104. package/dist/runtime/jsx.js +1 -1
  105. package/dist/runtime/jsx.js.map +1 -1
  106. package/dist/runtime/key.d.ts +1 -0
  107. package/dist/runtime/key.js +2 -0
  108. package/dist/runtime/key.js.map +1 -0
  109. package/dist/runtime/mixins/attrs-mixin.js +2 -2
  110. package/dist/runtime/mixins/link-mixin.js +4 -3
  111. package/dist/runtime/mixins/link-mixin.js.map +1 -1
  112. package/dist/runtime/mixins/mixin.d.ts +15 -10
  113. package/dist/runtime/mixins/mixin.js +4 -4
  114. package/dist/runtime/mixins/mixin.js.map +1 -1
  115. package/dist/runtime/mixins/on-mixin.js +1 -1
  116. package/dist/runtime/mixins/ref-mixin.js +1 -1
  117. package/dist/runtime/navigation.d.ts +4 -1
  118. package/dist/runtime/navigation.js +157 -32
  119. package/dist/runtime/navigation.js.map +1 -1
  120. package/dist/runtime/reconcile.d.ts +11 -10
  121. package/dist/runtime/reconcile.js +557 -423
  122. package/dist/runtime/reconcile.js.map +1 -1
  123. package/dist/runtime/refresh.d.ts +28 -0
  124. package/dist/runtime/refresh.js +31 -0
  125. package/dist/runtime/refresh.js.map +1 -0
  126. package/dist/runtime/render.js +1 -1
  127. package/dist/runtime/render.js.map +1 -1
  128. package/dist/runtime/run.d.ts +3 -1
  129. package/dist/runtime/run.js +15 -7
  130. package/dist/runtime/run.js.map +1 -1
  131. package/dist/runtime/scheduler.js +8 -16
  132. package/dist/runtime/scheduler.js.map +1 -1
  133. package/dist/runtime/to-vnode.d.ts +2 -2
  134. package/dist/runtime/to-vnode.js +68 -20
  135. package/dist/runtime/to-vnode.js.map +1 -1
  136. package/dist/runtime/vdom.d.ts +4 -2
  137. package/dist/runtime/vdom.js +89 -41
  138. package/dist/runtime/vdom.js.map +1 -1
  139. package/dist/runtime/vnode.d.ts +138 -67
  140. package/dist/runtime/vnode.js +17 -12
  141. package/dist/runtime/vnode.js.map +1 -1
  142. package/dist/select/index.d.ts +19 -0
  143. package/dist/select/index.js +95 -0
  144. package/dist/select/index.js.map +1 -0
  145. package/dist/select/keydown.js.map +1 -0
  146. package/dist/{components/select/select.d.ts → select/primitives.d.ts} +5 -7
  147. package/dist/{components/select/select.js → select/primitives.js} +11 -63
  148. package/dist/select/primitives.js.map +1 -0
  149. package/dist/server/stream.js +22 -29
  150. package/dist/server/stream.js.map +1 -1
  151. package/dist/shared/focus-styles.d.ts +1 -0
  152. package/dist/shared/focus-styles.js +2 -0
  153. package/dist/shared/focus-styles.js.map +1 -0
  154. package/dist/shared/icons.d.ts +9 -0
  155. package/dist/shared/icons.js +42 -0
  156. package/dist/shared/icons.js.map +1 -0
  157. package/dist/shared/listbox-popover-styles.d.ts +6 -0
  158. package/dist/shared/listbox-popover-styles.js +137 -0
  159. package/dist/shared/listbox-popover-styles.js.map +1 -0
  160. package/dist/shared/style-values.d.ts +78 -0
  161. package/dist/shared/style-values.js +88 -0
  162. package/dist/shared/style-values.js.map +1 -0
  163. package/dist/{interactions/typeahead/typeahead-mixin.js → shared/typeahead.js} +1 -1
  164. package/dist/shared/typeahead.js.map +1 -0
  165. package/dist/shared/wait-for-css-transition.js.map +1 -0
  166. package/dist/shared/wait.js.map +1 -0
  167. package/dist/style/css-mixin.js +3 -3
  168. package/dist/style/index.js +2 -2
  169. package/dist/style/style.js +25 -6
  170. package/dist/style/style.js.map +1 -1
  171. package/dist/style/stylesheet.d.ts +0 -1
  172. package/dist/style/stylesheet.js +13 -54
  173. package/dist/style/stylesheet.js.map +1 -1
  174. package/dist/tabs/index.d.ts +32 -0
  175. package/dist/tabs/index.js +157 -0
  176. package/dist/tabs/index.js.map +1 -0
  177. package/dist/tabs/primitives.d.ts +57 -0
  178. package/dist/tabs/primitives.js +238 -0
  179. package/dist/tabs/primitives.js.map +1 -0
  180. package/dist/test.js +1 -1
  181. package/dist/toggle/index.d.ts +9 -0
  182. package/dist/toggle/index.js +108 -0
  183. package/dist/toggle/index.js.map +1 -0
  184. package/dist/toggle/primitives.d.ts +29 -0
  185. package/dist/toggle/primitives.js +127 -0
  186. package/dist/toggle/primitives.js.map +1 -0
  187. package/package.json +81 -49
  188. package/src/{components/accordion → accordion}/README.md +50 -14
  189. package/src/accordion/index.tsx +285 -0
  190. package/src/accordion/primitives.tsx +512 -0
  191. package/src/{components/anchor → anchor}/README.md +37 -2
  192. package/src/animation/animate-mixins.ts +3 -3
  193. package/src/animation/demos/color-interpolation.tsx +1 -1
  194. package/src/animation/demos/reordering.tsx +9 -6
  195. package/src/{components/breadcrumbs → breadcrumbs}/README.md +4 -4
  196. package/src/{components/breadcrumbs/breadcrumbs.tsx → breadcrumbs/index.tsx} +18 -18
  197. package/src/button/README.md +44 -0
  198. package/src/button/index.ts +168 -0
  199. package/src/checkbox/README.md +59 -0
  200. package/src/checkbox/index.ts +164 -0
  201. package/src/{components/combobox → combobox}/README.md +58 -9
  202. package/src/combobox/index.tsx +112 -0
  203. package/src/{components/combobox/combobox.tsx → combobox/primitives.tsx} +5 -91
  204. package/src/dev/refresh.ts +1 -0
  205. package/src/index.ts +1 -1
  206. package/src/input/README.md +52 -0
  207. package/src/input/index.ts +147 -0
  208. package/src/{components/listbox → listbox}/README.md +9 -41
  209. package/src/{components/listbox/listbox.ts → listbox/index.ts} +2 -87
  210. package/src/{components/menu → menu}/README.md +55 -14
  211. package/src/menu/index.tsx +354 -0
  212. package/src/{components/menu/menu.tsx → menu/primitives.tsx} +99 -413
  213. package/src/{components/popover → popover}/README.md +20 -39
  214. package/src/{components/popover/popover.ts → popover/index.ts} +3 -57
  215. package/src/{utils → popover}/scroll-lock.ts +0 -28
  216. package/src/radio/README.md +53 -0
  217. package/src/radio/index.ts +101 -0
  218. package/src/runtime/client-entry-boundary.ts +54 -0
  219. package/src/runtime/component.ts +65 -16
  220. package/src/runtime/core/attributes.ts +35 -1
  221. package/src/runtime/core/children.ts +24 -2
  222. package/src/runtime/core/vnode.ts +25 -4
  223. package/src/runtime/create-element.ts +6 -5
  224. package/src/runtime/demos/readme.demo.tsx +20 -18
  225. package/src/runtime/diff-dom.ts +358 -243
  226. package/src/runtime/dom.ts +331 -214
  227. package/src/runtime/element-function.ts +1 -0
  228. package/src/runtime/event-listeners.ts +1 -1
  229. package/src/runtime/form-navigation.ts +184 -0
  230. package/src/runtime/frame-resolution.ts +13 -0
  231. package/src/runtime/frame.ts +482 -124
  232. package/src/runtime/jsx.ts +3 -5
  233. package/src/runtime/key.ts +1 -0
  234. package/src/runtime/mixins/link-mixin.ts +1 -0
  235. package/src/runtime/mixins/mixin.ts +21 -18
  236. package/src/runtime/navigation.ts +204 -30
  237. package/src/runtime/reconcile.ts +769 -760
  238. package/src/runtime/refresh.ts +46 -0
  239. package/src/runtime/run.ts +12 -2
  240. package/src/runtime/scheduler.ts +9 -29
  241. package/src/runtime/to-vnode.ts +85 -23
  242. package/src/runtime/vdom.ts +91 -69
  243. package/src/runtime/vnode.ts +192 -88
  244. package/src/{components/select → select}/README.md +29 -19
  245. package/src/select/index.tsx +159 -0
  246. package/src/{components/select/select.tsx → select/primitives.tsx} +10 -98
  247. package/src/server/stream.ts +25 -31
  248. package/src/shared/focus-styles.ts +2 -0
  249. package/src/shared/icons.tsx +62 -0
  250. package/src/shared/listbox-popover-styles.ts +146 -0
  251. package/src/shared/style-values.ts +165 -0
  252. package/src/style/style.ts +25 -6
  253. package/src/style/stylesheet.ts +32 -57
  254. package/src/tabs/README.md +141 -0
  255. package/src/tabs/index.tsx +245 -0
  256. package/src/tabs/primitives.ts +365 -0
  257. package/src/test/README.md +151 -60
  258. package/src/toggle/README.md +56 -0
  259. package/src/toggle/index.tsx +136 -0
  260. package/src/toggle/primitives.ts +192 -0
  261. package/dist/animation/demos/animation.demo.d.ts +0 -5
  262. package/dist/animation/demos/animation.demo.js +0 -92
  263. package/dist/animation/demos/animation.demo.js.map +0 -1
  264. package/dist/animation/demos/spring.demo.d.ts +0 -6
  265. package/dist/animation/demos/spring.demo.js +0 -304
  266. package/dist/animation/demos/spring.demo.js.map +0 -1
  267. package/dist/components/accordion/accordion.d.ts +0 -92
  268. package/dist/components/accordion/accordion.js +0 -335
  269. package/dist/components/accordion/accordion.js.map +0 -1
  270. package/dist/components/accordion/demos/card.demo.d.ts +0 -7
  271. package/dist/components/accordion/demos/card.demo.js +0 -59
  272. package/dist/components/accordion/demos/card.demo.js.map +0 -1
  273. package/dist/components/accordion/demos/multiple.demo.d.ts +0 -7
  274. package/dist/components/accordion/demos/multiple.demo.js +0 -20
  275. package/dist/components/accordion/demos/multiple.demo.js.map +0 -1
  276. package/dist/components/accordion/demos/overview.demo.d.ts +0 -7
  277. package/dist/components/accordion/demos/overview.demo.js +0 -20
  278. package/dist/components/accordion/demos/overview.demo.js.map +0 -1
  279. package/dist/components/anchor/anchor.js.map +0 -1
  280. package/dist/components/breadcrumbs/basic.demo.d.ts +0 -6
  281. package/dist/components/breadcrumbs/basic.demo.js +0 -15
  282. package/dist/components/breadcrumbs/basic.demo.js.map +0 -1
  283. package/dist/components/breadcrumbs/breadcrumbs.js.map +0 -1
  284. package/dist/components/breadcrumbs/separator.demo.d.ts +0 -6
  285. package/dist/components/breadcrumbs/separator.demo.js +0 -15
  286. package/dist/components/breadcrumbs/separator.demo.js.map +0 -1
  287. package/dist/components/button/button.d.ts +0 -105
  288. package/dist/components/button/button.js +0 -207
  289. package/dist/components/button/button.js.map +0 -1
  290. package/dist/components/button/demos/aliases.demo.d.ts +0 -7
  291. package/dist/components/button/demos/aliases.demo.js +0 -19
  292. package/dist/components/button/demos/aliases.demo.js.map +0 -1
  293. package/dist/components/button/demos/basic.demo.d.ts +0 -7
  294. package/dist/components/button/demos/basic.demo.js +0 -20
  295. package/dist/components/button/demos/basic.demo.js.map +0 -1
  296. package/dist/components/button/demos/states.demo.d.ts +0 -7
  297. package/dist/components/button/demos/states.demo.js +0 -30
  298. package/dist/components/button/demos/states.demo.js.map +0 -1
  299. package/dist/components/combobox/combobox.js.map +0 -1
  300. package/dist/components/combobox/overview.demo.d.ts +0 -7
  301. package/dist/components/combobox/overview.demo.js +0 -154
  302. package/dist/components/combobox/overview.demo.js.map +0 -1
  303. package/dist/components/glyph/glyph.d.ts +0 -14
  304. package/dist/components/glyph/glyph.js +0 -65
  305. package/dist/components/glyph/glyph.js.map +0 -1
  306. package/dist/components/listbox/listbox.js.map +0 -1
  307. package/dist/components/listbox/overview.demo.d.ts +0 -7
  308. package/dist/components/listbox/overview.demo.js +0 -65
  309. package/dist/components/listbox/overview.demo.js.map +0 -1
  310. package/dist/components/menu/demos/bubbling.demo.d.ts +0 -6
  311. package/dist/components/menu/demos/bubbling.demo.js +0 -16
  312. package/dist/components/menu/demos/bubbling.demo.js.map +0 -1
  313. package/dist/components/menu/demos/context-trigger.demo.d.ts +0 -7
  314. package/dist/components/menu/demos/context-trigger.demo.js +0 -87
  315. package/dist/components/menu/demos/context-trigger.demo.js.map +0 -1
  316. package/dist/components/menu/demos/overview.demo.d.ts +0 -7
  317. package/dist/components/menu/demos/overview.demo.js +0 -33
  318. package/dist/components/menu/demos/overview.demo.js.map +0 -1
  319. package/dist/components/menu/hover-aim.js.map +0 -1
  320. package/dist/components/menu/menu.js.map +0 -1
  321. package/dist/components/popover/overview.demo.d.ts +0 -7
  322. package/dist/components/popover/overview.demo.js +0 -65
  323. package/dist/components/popover/overview.demo.js.map +0 -1
  324. package/dist/components/popover/popover.js.map +0 -1
  325. package/dist/components/select/deconstructed.demo.d.ts +0 -7
  326. package/dist/components/select/deconstructed.demo.js +0 -54
  327. package/dist/components/select/deconstructed.demo.js.map +0 -1
  328. package/dist/components/select/overview.demo.d.ts +0 -6
  329. package/dist/components/select/overview.demo.js +0 -28
  330. package/dist/components/select/overview.demo.js.map +0 -1
  331. package/dist/components/select/select.js.map +0 -1
  332. package/dist/components/separator/separator.d.ts +0 -2
  333. package/dist/components/separator/separator.js +0 -15
  334. package/dist/components/separator/separator.js.map +0 -1
  335. package/dist/components/tabs/tabs.d.ts +0 -78
  336. package/dist/components/tabs/tabs.js +0 -339
  337. package/dist/components/tabs/tabs.js.map +0 -1
  338. package/dist/interactions/keydown/keydown.js.map +0 -1
  339. package/dist/interactions/outside-click/outside-click-mixin.js.map +0 -1
  340. package/dist/interactions/typeahead/typeahead-mixin.js.map +0 -1
  341. package/dist/runtime/demos/basic.demo.d.ts +0 -6
  342. package/dist/runtime/demos/basic.demo.js +0 -16
  343. package/dist/runtime/demos/basic.demo.js.map +0 -1
  344. package/dist/runtime/demos/controlled-uncontrolled-values.demo.d.ts +0 -6
  345. package/dist/runtime/demos/controlled-uncontrolled-values.demo.js +0 -77
  346. package/dist/runtime/demos/controlled-uncontrolled-values.demo.js.map +0 -1
  347. package/dist/runtime/demos/keyed-list.demo.d.ts +0 -6
  348. package/dist/runtime/demos/keyed-list.demo.js +0 -62
  349. package/dist/runtime/demos/keyed-list.demo.js.map +0 -1
  350. package/dist/runtime/demos/readme.demo.d.ts +0 -5
  351. package/dist/runtime/demos/readme.demo.js +0 -396
  352. package/dist/runtime/demos/readme.demo.js.map +0 -1
  353. package/dist/theme/contract.d.ts +0 -61
  354. package/dist/theme/contract.js +0 -131
  355. package/dist/theme/contract.js.map +0 -1
  356. package/dist/theme/glyph-contract.d.ts +0 -11
  357. package/dist/theme/glyph-contract.js +0 -34
  358. package/dist/theme/glyph-contract.js.map +0 -1
  359. package/dist/theme/presets/rmx-01/glyphs.d.ts +0 -2
  360. package/dist/theme/presets/rmx-01/glyphs.js +0 -252
  361. package/dist/theme/presets/rmx-01/glyphs.js.map +0 -1
  362. package/dist/theme/presets/rmx-01/index.d.ts +0 -4
  363. package/dist/theme/presets/rmx-01/index.js +0 -119
  364. package/dist/theme/presets/rmx-01/index.js.map +0 -1
  365. package/dist/theme/runtime.d.ts +0 -2
  366. package/dist/theme/runtime.js +0 -84
  367. package/dist/theme/runtime.js.map +0 -1
  368. package/dist/theme/theme.d.ts +0 -6
  369. package/dist/theme/theme.js +0 -5
  370. package/dist/theme/theme.js.map +0 -1
  371. package/dist/utils/flash-attribute.js.map +0 -1
  372. package/dist/utils/scroll-lock.d.ts +0 -3
  373. package/dist/utils/scroll-lock.js.map +0 -1
  374. package/dist/utils/wait-for-css-transition.js.map +0 -1
  375. package/dist/utils/wait.js.map +0 -1
  376. package/src/animation/demos/animation.demo.tsx +0 -194
  377. package/src/animation/demos/spring.demo.tsx +0 -385
  378. package/src/components/accordion/accordion.tsx +0 -565
  379. package/src/components/accordion/demos/card.demo.tsx +0 -114
  380. package/src/components/accordion/demos/multiple.demo.tsx +0 -57
  381. package/src/components/accordion/demos/overview.demo.tsx +0 -57
  382. package/src/components/breadcrumbs/basic.demo.tsx +0 -18
  383. package/src/components/breadcrumbs/separator.demo.tsx +0 -19
  384. package/src/components/button/README.md +0 -44
  385. package/src/components/button/button.tsx +0 -286
  386. package/src/components/button/demos/aliases.demo.tsx +0 -28
  387. package/src/components/button/demos/basic.demo.tsx +0 -31
  388. package/src/components/button/demos/states.demo.tsx +0 -53
  389. package/src/components/combobox/overview.demo.tsx +0 -200
  390. package/src/components/glyph/README.md +0 -72
  391. package/src/components/glyph/glyph.tsx +0 -110
  392. package/src/components/listbox/overview.demo.tsx +0 -102
  393. package/src/components/menu/demos/bubbling.demo.tsx +0 -35
  394. package/src/components/menu/demos/context-trigger.demo.tsx +0 -133
  395. package/src/components/menu/demos/overview.demo.tsx +0 -77
  396. package/src/components/popover/overview.demo.tsx +0 -144
  397. package/src/components/select/deconstructed.demo.tsx +0 -96
  398. package/src/components/select/overview.demo.tsx +0 -52
  399. package/src/components/separator/separator.ts +0 -19
  400. package/src/components/tabs/README.md +0 -105
  401. package/src/components/tabs/tabs.tsx +0 -504
  402. package/src/runtime/demos/basic.demo.tsx +0 -21
  403. package/src/runtime/demos/controlled-uncontrolled-values.demo.tsx +0 -177
  404. package/src/runtime/demos/keyed-list.demo.tsx +0 -94
  405. package/src/theme/README.md +0 -103
  406. package/src/theme/contract.ts +0 -215
  407. package/src/theme/glyph-contract.ts +0 -59
  408. package/src/theme/presets/rmx-01/glyphs.tsx +0 -308
  409. package/src/theme/presets/rmx-01/index.ts +0 -123
  410. package/src/theme/runtime.ts +0 -119
  411. package/src/theme/theme.ts +0 -15
  412. package/src/utils/scroll-lock/README.md +0 -33
  413. /package/dist/{components/anchor/anchor.d.ts → anchor/index.d.ts} +0 -0
  414. /package/dist/{components/breadcrumbs/breadcrumbs.d.ts → breadcrumbs/index.d.ts} +0 -0
  415. /package/dist/{utils → listbox}/flash-attribute.d.ts +0 -0
  416. /package/dist/{utils → listbox}/flash-attribute.js +0 -0
  417. /package/dist/{components/menu → menu}/hover-aim.d.ts +0 -0
  418. /package/dist/{components/menu → menu}/hover-aim.js +0 -0
  419. /package/dist/{interactions/outside-click/outside-click-mixin.d.ts → popover/outside-click.d.ts} +0 -0
  420. /package/dist/{interactions/keydown → select}/keydown.d.ts +0 -0
  421. /package/dist/{interactions/keydown → select}/keydown.js +0 -0
  422. /package/dist/{interactions/typeahead/typeahead-mixin.d.ts → shared/typeahead.d.ts} +0 -0
  423. /package/dist/{utils → shared}/wait-for-css-transition.d.ts +0 -0
  424. /package/dist/{utils → shared}/wait-for-css-transition.js +0 -0
  425. /package/dist/{utils → shared}/wait.d.ts +0 -0
  426. /package/dist/{utils → shared}/wait.js +0 -0
  427. /package/src/{components/anchor/anchor.ts → anchor/index.ts} +0 -0
  428. /package/src/{utils → listbox}/flash-attribute.ts +0 -0
  429. /package/src/{components/menu → menu}/hover-aim.ts +0 -0
  430. /package/src/{interactions/outside-click/outside-click-mixin.ts → popover/outside-click.ts} +0 -0
  431. /package/src/{interactions/keydown → select}/keydown.ts +0 -0
  432. /package/src/{interactions/typeahead/typeahead-mixin.ts → shared/typeahead.ts} +0 -0
  433. /package/src/{utils → shared}/wait-for-css-transition.ts +0 -0
  434. /package/src/{utils → shared}/wait.ts +0 -0
@@ -1,200 +0,0 @@
1
- import { css, type Handle } from '@remix-run/ui'
2
- import { Combobox, ComboboxOption, onComboboxChange } from '@remix-run/ui/combobox'
3
- import { theme } from '@remix-run/ui/theme'
4
-
5
- /**
6
- * @name Combobox Overview
7
- * @description A searchable combobox with keyboard navigation. Try typing airport names or codes like ord, lax, or jfk.
8
- * @layout center
9
- */
10
- export default function Example(handle: Handle) {
11
- let value: string | null = null
12
-
13
- return () => (
14
- <div mix={stackCss}>
15
- <div mix={fieldCss}>
16
- <label for="airport-combobox" mix={labelCss}>
17
- Airport
18
- </label>
19
-
20
- <Combobox
21
- inputId="airport-combobox"
22
- mix={[
23
- comboboxCss,
24
- onComboboxChange((event) => {
25
- value = event.value
26
- void handle.update()
27
- }),
28
- ]}
29
- name="airport"
30
- placeholder="Search airports or codes"
31
- >
32
- {airportOptions.map((airport) => (
33
- <ComboboxOption
34
- key={airport.value}
35
- disabled={airport.disabled}
36
- label={airport.label}
37
- searchValue={airport.searchValue}
38
- value={airport.value}
39
- />
40
- ))}
41
- </Combobox>
42
-
43
- <div mix={helpCss}>
44
- Try typing `san`, `wash`, or airport codes like `ord`, `lax`, or `jfk`, then use ArrowDown
45
- and Enter.
46
- </div>
47
- </div>
48
-
49
- <p mix={valueCss}>{`value=${value ?? 'null'}`}</p>
50
- </div>
51
- )
52
- }
53
-
54
- type AirportOption = {
55
- disabled?: boolean
56
- label: string
57
- searchValue: string[]
58
- value: string
59
- }
60
-
61
- const airportOptions: AirportOption[] = [
62
- {
63
- label: 'Hartsfield-Jackson Atlanta International',
64
- searchValue: ['atl', 'atlanta', 'hartsfield-jackson atlanta international'],
65
- value: 'ATL',
66
- },
67
- {
68
- label: 'Austin-Bergstrom International',
69
- searchValue: ['aus', 'austin', 'austin-bergstrom international'],
70
- value: 'AUS',
71
- },
72
- {
73
- label: 'Boston Logan International',
74
- searchValue: ['bos', 'boston', 'boston logan international'],
75
- value: 'BOS',
76
- },
77
- {
78
- label: 'Baltimore/Washington International',
79
- searchValue: ['bwi', 'baltimore', 'washington', 'baltimore/washington international'],
80
- value: 'BWI',
81
- },
82
- {
83
- label: 'Ronald Reagan Washington National',
84
- searchValue: ['dca', 'reagan', 'washington', 'ronald reagan washington national'],
85
- value: 'DCA',
86
- },
87
- {
88
- label: 'Denver International',
89
- searchValue: ['den', 'denver', 'denver international'],
90
- value: 'DEN',
91
- },
92
- {
93
- label: 'Dallas/Fort Worth International',
94
- searchValue: ['dfw', 'dallas', 'fort worth', 'dallas/fort worth international'],
95
- value: 'DFW',
96
- },
97
- {
98
- label: 'Newark Liberty International',
99
- searchValue: ['ewr', 'newark', 'newark liberty international'],
100
- value: 'EWR',
101
- },
102
- {
103
- label: 'Daniel K. Inouye International',
104
- searchValue: ['hnl', 'honolulu', 'daniel k. inouye international'],
105
- value: 'HNL',
106
- },
107
- {
108
- label: 'Washington Dulles International',
109
- searchValue: ['iad', 'dulles', 'washington', 'washington dulles international'],
110
- value: 'IAD',
111
- },
112
- {
113
- label: 'John F. Kennedy International',
114
- searchValue: ['jfk', 'kennedy', 'new york', 'john f. kennedy international'],
115
- value: 'JFK',
116
- },
117
- {
118
- label: 'Harry Reid International',
119
- searchValue: ['las', 'las vegas', 'harry reid international'],
120
- value: 'LAS',
121
- },
122
- {
123
- label: 'Los Angeles International',
124
- searchValue: ['lax', 'los angeles', 'los angeles international'],
125
- value: 'LAX',
126
- },
127
- {
128
- label: 'Orlando International',
129
- searchValue: ['mco', 'orlando', 'orlando international'],
130
- value: 'MCO',
131
- },
132
- {
133
- label: 'Miami International',
134
- searchValue: ['mia', 'miami', 'miami international'],
135
- value: 'MIA',
136
- },
137
- {
138
- label: "Chicago O'Hare International",
139
- searchValue: ['ord', 'ohare', 'chicago', "chicago o'hare international"],
140
- value: 'ORD',
141
- },
142
- {
143
- label: 'Portland International',
144
- searchValue: ['pdx', 'portland', 'portland international'],
145
- value: 'PDX',
146
- },
147
- {
148
- label: 'San Diego International',
149
- searchValue: ['san', 'san diego', 'san diego international'],
150
- value: 'SAN',
151
- },
152
- {
153
- label: 'San Francisco International',
154
- searchValue: ['sfo', 'san francisco', 'san francisco international'],
155
- value: 'SFO',
156
- },
157
- {
158
- disabled: true,
159
- label: 'San Jose Mineta International',
160
- searchValue: ['sjc', 'san jose', 'san jose mineta international'],
161
- value: 'SJC',
162
- },
163
- ]
164
-
165
- const comboboxCss = css({
166
- width: '16rem',
167
- })
168
-
169
- const stackCss = css({
170
- display: 'flex',
171
- flexDirection: 'column',
172
- gap: theme.space.sm,
173
- width: '100%',
174
- })
175
-
176
- const fieldCss = css({
177
- display: 'flex',
178
- flexDirection: 'column',
179
- gap: theme.space.xs,
180
- })
181
-
182
- const labelCss = css({
183
- margin: 0,
184
- fontSize: theme.fontSize.xs,
185
- fontWeight: theme.fontWeight.semibold,
186
- color: theme.colors.text.primary,
187
- })
188
-
189
- const helpCss = css({
190
- fontSize: theme.fontSize.xs,
191
- lineHeight: theme.lineHeight.relaxed,
192
- color: theme.colors.text.secondary,
193
- })
194
-
195
- const valueCss = css({
196
- margin: 0,
197
- fontFamily: theme.fontFamily.mono,
198
- fontSize: theme.fontSize.xs,
199
- color: theme.colors.text.secondary,
200
- })
@@ -1,72 +0,0 @@
1
- # glyph
2
-
3
- `Glyph` renders references into a shared SVG sprite sheet. Render a glyph sheet once, then render individual `Glyph` instances by name.
4
-
5
- ## Usage
6
-
7
- ```tsx
8
- import { Glyph } from 'remix/ui/glyph'
9
- import { RMX_01_GLYPHS } from 'remix/ui/theme'
10
-
11
- function Layout() {
12
- return (
13
- <html>
14
- <body>
15
- <RMX_01_GLYPHS />
16
- <button aria-label="Delete">
17
- <Glyph name="trash" />
18
- </button>
19
- </body>
20
- </html>
21
- )
22
- }
23
- ```
24
-
25
- Most glyphs are decorative because the surrounding control supplies the accessible name. `Glyph` sets `aria-hidden` by default in that case.
26
-
27
- ```tsx
28
- <button aria-label="Search">
29
- <Glyph name="search" />
30
- </button>
31
- ```
32
-
33
- Give the glyph its own label only when the SVG itself is the accessible element.
34
-
35
- ```tsx
36
- <Glyph aria-label="Search" name="search" viewBox="0 0 20 20" width="24" />
37
- ```
38
-
39
- Use `createGlyphSheet` when a theme or app provides its own complete glyph set. The generated sheet exposes the stable symbol ids and the original values for reuse.
40
-
41
- ```tsx
42
- import { createGlyphSheet, type GlyphValues } from 'remix/ui/glyph'
43
-
44
- declare const glyphValues: GlyphValues
45
-
46
- export const AppGlyphs = createGlyphSheet(glyphValues)
47
-
48
- AppGlyphs.ids.trash
49
- AppGlyphs.values.trash
50
- ```
51
-
52
- ## `glyph.*`
53
-
54
- - `Glyph`: renders an `<svg>` with a `<use>` element that points at the package-owned symbol id for `name`.
55
- - `createGlyphSheet(values)`: creates a hidden SVG sprite sheet component from a complete glyph value set.
56
- - `GlyphName`: typed union of supported glyph names.
57
- - `GlyphProps`: props accepted by `Glyph`.
58
- - `GlyphSheetProps`: props accepted by generated glyph sheet components.
59
- - `GlyphSymbol`: SVG symbol value accepted by glyph value maps.
60
- - `GlyphValues`: object shape expected by `createGlyphSheet`.
61
- - `GlyphSheetComponent`: generated sprite sheet component with `ids` and `values` attached.
62
-
63
- The built-in glyph names are `add`, `alert`, `check`, `chevronDown`, `chevronVertical`, `chevronUp`, `chevronRight`, `close`, `copy`, `edit`, `expand`, `info`, `menu`, `open`, `search`, `spinner`, and `trash`.
64
-
65
- ## Behavior Notes
66
-
67
- - Render the glyph sheet once before rendering glyph instances that reference it.
68
- - `createGlyphSheet` renders a hidden zero-size SVG and clones each provided `<symbol>` with the stable package id.
69
- - `Glyph` is `aria-hidden` by default when no accessible label or labelled-by relationship is provided.
70
- - Labeled glyphs keep their accessible label and do not force `aria-hidden`.
71
- - Host SVG props such as `viewBox`, `width`, `mix`, and `aria-label` are preserved.
72
- - `createGlyphSheet` throws if a provided glyph value is not a `<symbol>` element.
@@ -1,110 +0,0 @@
1
- import { createElement } from '@remix-run/ui'
2
- import type { Handle, Props, RemixElement } from '@remix-run/ui'
3
-
4
- import {
5
- glyphContract,
6
- glyphNames,
7
- type GlyphName,
8
- type GlyphValues,
9
- } from '../../theme/glyph-contract.ts'
10
-
11
- export type { GlyphName, GlyphSymbol, GlyphValues } from '../../theme/glyph-contract.ts'
12
-
13
- export type GlyphSheetProps = Omit<Props<'svg'>, 'children'>
14
-
15
- type GlyphSheetRenderer = (handle: Handle<GlyphSheetProps>) => () => RemixElement
16
-
17
- export type GlyphSheetComponent = GlyphSheetRenderer & {
18
- ids: Readonly<Record<GlyphName, string>>
19
- values: GlyphValues
20
- }
21
-
22
- export type GlyphProps = Omit<Props<'svg'>, 'children'> & {
23
- name: GlyphName
24
- }
25
-
26
- export function createGlyphSheet(values: GlyphValues): GlyphSheetComponent {
27
- let ids = Object.freeze(
28
- Object.fromEntries(glyphNames.map((name) => [name, glyphContract[name].id])) as Record<
29
- GlyphName,
30
- string
31
- >,
32
- )
33
-
34
- function GlyphSheet(handle: Handle<GlyphSheetProps>): () => RemixElement {
35
- return () => {
36
- let { style, ...svgProps } = handle.props
37
- let hiddenStyle = {
38
- position: 'absolute',
39
- width: '0',
40
- height: '0',
41
- overflow: 'hidden',
42
- pointerEvents: 'none',
43
- }
44
- let nextStyle =
45
- typeof style === 'object' && style !== null ? { ...hiddenStyle, ...style } : hiddenStyle
46
-
47
- return createElement(
48
- 'svg',
49
- {
50
- ...svgProps,
51
- 'aria-hidden': handle.props['aria-hidden'] ?? true,
52
- focusable: handle.props.focusable ?? 'false',
53
- height: handle.props.height ?? '0',
54
- style: nextStyle,
55
- width: handle.props.width ?? '0',
56
- xmlns: 'http://www.w3.org/2000/svg',
57
- },
58
- glyphNames.map((name) => {
59
- let glyph = values[name]
60
-
61
- return cloneGlyphSymbol(name, glyph, ids[name])
62
- }),
63
- )
64
- }
65
- }
66
-
67
- return Object.assign(GlyphSheet, {
68
- ids,
69
- values,
70
- })
71
- }
72
-
73
- export function Glyph(handle: Handle<GlyphProps>): () => RemixElement {
74
- return () => {
75
- let { fill, name, ...svgProps } = handle.props
76
- let glyphId = glyphContract[name].id
77
- let hiddenByDefault =
78
- handle.props['aria-hidden'] === undefined &&
79
- handle.props['aria-label'] === undefined &&
80
- handle.props['aria-labelledby'] === undefined
81
-
82
- return createElement(
83
- 'svg',
84
- {
85
- ...svgProps,
86
- 'aria-hidden': hiddenByDefault ? true : handle.props['aria-hidden'],
87
- fill: fill ?? 'none',
88
- xmlns: 'http://www.w3.org/2000/svg',
89
- },
90
- createElement('use', {
91
- xlinkHref: `#${glyphId}`,
92
- }),
93
- )
94
- }
95
- }
96
-
97
- function cloneGlyphSymbol(name: GlyphName, glyph: RemixElement, id: string): RemixElement {
98
- if (glyph.type !== 'symbol') {
99
- throw new TypeError(`Expected glyph "${name}" to be a <symbol> element`)
100
- }
101
-
102
- return {
103
- ...glyph,
104
- key: name,
105
- props: {
106
- ...glyph.props,
107
- id,
108
- },
109
- }
110
- }
@@ -1,102 +0,0 @@
1
- import { css, on, type Handle } from '@remix-run/ui'
2
- import { Glyph } from '@remix-run/ui/glyph'
3
- import * as listbox from '@remix-run/ui/listbox'
4
- import type { ListboxValue } from '@remix-run/ui/listbox'
5
- import { theme } from '@remix-run/ui/theme'
6
-
7
- /**
8
- * @name Listbox Overview
9
- * @description A keyboard-navigable listbox with selection, highlighting, and an optional flash-selection animation.
10
- * @layout center
11
- */
12
- export default function Example(handle: Handle) {
13
- let value: ListboxValue = options[0]!.value
14
- let activeValue: ListboxValue = options[0]!.value
15
- let flashSelection = false
16
-
17
- return () => {
18
- return (
19
- <div mix={stackCss}>
20
- <listbox.Context
21
- value={value}
22
- activeValue={activeValue}
23
- flashSelection={flashSelection}
24
- onSelect={(nextValue) => {
25
- value = nextValue
26
- handle.update()
27
- }}
28
- onHighlight={(nextActiveValue) => {
29
- activeValue = nextActiveValue
30
- handle.update()
31
- }}
32
- >
33
- <div tabIndex={0} mix={[listbox.listStyle, listbox.list(), containerCss]}>
34
- {options.map((option) => (
35
- <div key={option.value} mix={[listbox.optionStyle, listbox.option(option)]}>
36
- <Glyph mix={listbox.glyphStyle} name="check" />
37
- <span mix={listbox.labelStyle}>{option.label}</span>
38
- </div>
39
- ))}
40
- </div>
41
- </listbox.Context>
42
- <div mix={controlsCss}>
43
- <label mix={checkboxLabelCss}>
44
- <input
45
- type="checkbox"
46
- defaultChecked={flashSelection}
47
- mix={on('change', (event) => {
48
- flashSelection = event.currentTarget.checked
49
- handle.update()
50
- })}
51
- />{' '}
52
- Flash selection
53
- </label>
54
- <p mix={valueCss}>{`value=${value ?? 'null'}`}</p>
55
- </div>
56
- </div>
57
- )
58
- }
59
- }
60
-
61
- const options = [
62
- { label: 'Apple', value: 'apple' },
63
- { label: 'Banana', value: 'banana' },
64
- { label: 'Cherry', value: 'cherry' },
65
- { label: 'Date', value: 'date' },
66
- { label: 'Elderberry', value: 'elderberry' },
67
- { label: 'Fig', value: 'fig' },
68
- { label: 'Grape', value: 'grape' },
69
- ] as const
70
-
71
- const containerCss = css({
72
- borderColor: theme.colors.border.subtle,
73
- padding: theme.space.xs,
74
- borderRadius: theme.radius.lg,
75
- borderStyle: 'solid',
76
- })
77
-
78
- const stackCss = css({
79
- display: 'flex',
80
- flexDirection: 'column',
81
- gap: theme.space.md,
82
- width: '100%',
83
- })
84
-
85
- const controlsCss = css({
86
- display: 'flex',
87
- flexDirection: 'column',
88
- gap: theme.space.xs,
89
- })
90
-
91
- const checkboxLabelCss = css({
92
- fontSize: theme.fontSize.sm,
93
- lineHeight: theme.lineHeight.normal,
94
- color: theme.colors.text.secondary,
95
- })
96
-
97
- const valueCss = css({
98
- margin: 0,
99
- fontFamily: theme.fontFamily.mono,
100
- fontSize: theme.fontSize.xs,
101
- color: theme.colors.text.secondary,
102
- })
@@ -1,35 +0,0 @@
1
- import { on } from '@remix-run/ui'
2
- import { Menu, MenuItem, onMenuSelect } from '@remix-run/ui/menu'
3
-
4
- /**
5
- * @name Menu Event Bubbling
6
- * @description Item-level handlers fire before the root handler, letting individual items intercept events while others bubble up.
7
- * @layout center
8
- */
9
- export default function Example() {
10
- return () => (
11
- <Menu
12
- label="Project"
13
- menuLabel="Project actions"
14
- mix={onMenuSelect((event) => {
15
- console.log('Menu root handler:', event.item)
16
- })}
17
- >
18
- <MenuItem name="open" value="open-project">
19
- Open project
20
- </MenuItem>
21
- <MenuItem
22
- name="rename"
23
- value="rename-project"
24
- mix={onMenuSelect((event) => {
25
- console.log('Menu item handler:', event.item)
26
- })}
27
- >
28
- Rename project
29
- </MenuItem>
30
- <MenuItem name="duplicate" value="duplicate-project">
31
- Duplicate project
32
- </MenuItem>
33
- </Menu>
34
- )
35
- }
@@ -1,133 +0,0 @@
1
- import { css, type Handle } from '@remix-run/ui'
2
- import * as menu from '@remix-run/ui/menu'
3
- import { MenuItem, MenuList, onMenuSelect, Submenu } from '@remix-run/ui/menu'
4
- import { separatorStyle } from '@remix-run/ui/separator'
5
- import { theme } from '@remix-run/ui/theme'
6
-
7
- type FileAction = 'copyPath' | 'duplicate' | 'move' | 'rename' | 'reveal' | 'trash'
8
-
9
- const actionLabelByName: Record<FileAction, string> = {
10
- copyPath: 'Copied path',
11
- duplicate: 'Duplicated file',
12
- move: 'Moved file',
13
- rename: 'Renamed file',
14
- reveal: 'Revealed in Finder',
15
- trash: 'Moved to trash',
16
- }
17
-
18
- /**
19
- * @name Context Menu Trigger
20
- * @description A lower-level menu composition that opens from right-click coordinates while keeping standard menu selection and submenu behavior.
21
- * @layout center
22
- */
23
- export default function Example(handle: Handle) {
24
- let latestAction = 'Right-click the card.'
25
-
26
- return () => (
27
- <menu.Context label="File actions">
28
- <div mix={layoutCss}>
29
- <div tabIndex={0} mix={[fileCardCss, menu.contextTrigger()]}>
30
- <span mix={fileIconCss}>TS</span>
31
- <span mix={fileTextCss}>
32
- <strong mix={fileNameCss}>context-menu.tsx</strong>
33
- <span mix={fileMetaCss}>Right-click or press Shift+F10</span>
34
- </span>
35
- </div>
36
-
37
- <p aria-live="polite" mix={statusCss}>
38
- {latestAction}
39
- </p>
40
- </div>
41
-
42
- <MenuList
43
- mix={onMenuSelect((event) => {
44
- latestAction =
45
- actionLabelByName[event.item.name as FileAction] ?? `Selected ${event.item.label}`
46
- void handle.update()
47
- })}
48
- >
49
- <MenuItem name="rename">Rename</MenuItem>
50
- <MenuItem name="duplicate">Duplicate</MenuItem>
51
- <MenuItem name="copyPath">Copy path</MenuItem>
52
- <hr mix={separatorStyle} />
53
- <Submenu label="Move to">
54
- <MenuItem name="move" value="drafts">
55
- Drafts
56
- </MenuItem>
57
- <MenuItem name="move" value="archive">
58
- Archive
59
- </MenuItem>
60
- </Submenu>
61
- <MenuItem name="reveal">Reveal in Finder</MenuItem>
62
- <hr mix={separatorStyle} />
63
- <MenuItem name="trash">Move to trash</MenuItem>
64
- </MenuList>
65
- </menu.Context>
66
- )
67
- }
68
-
69
- const layoutCss = css({
70
- display: 'grid',
71
- justifyItems: 'start',
72
- gap: theme.space.md,
73
- })
74
-
75
- const fileCardCss = css({
76
- display: 'grid',
77
- gridTemplateColumns: 'auto minmax(0, 1fr)',
78
- alignItems: 'center',
79
- gap: theme.space.md,
80
- width: 'min(100%, 21rem)',
81
- padding: theme.space.md,
82
- border: `1px solid ${theme.colors.border.subtle}`,
83
- borderRadius: theme.radius.lg,
84
- backgroundColor: theme.surface.lvl1,
85
- color: theme.colors.text.primary,
86
- boxShadow: theme.shadow.xs,
87
- cursor: 'context-menu',
88
- userSelect: 'none',
89
- '&:focus-visible': {
90
- outline: `2px solid ${theme.colors.focus.ring}`,
91
- outlineOffset: '2px',
92
- },
93
- })
94
-
95
- const fileIconCss = css({
96
- display: 'inline-grid',
97
- placeItems: 'center',
98
- width: theme.control.height.lg,
99
- height: theme.control.height.lg,
100
- borderRadius: theme.radius.md,
101
- backgroundColor: theme.colors.action.primary.background,
102
- color: theme.colors.action.primary.foreground,
103
- fontSize: theme.fontSize.xs,
104
- fontWeight: theme.fontWeight.bold,
105
- })
106
-
107
- const fileTextCss = css({
108
- display: 'grid',
109
- gap: theme.space.px,
110
- minWidth: 0,
111
- })
112
-
113
- const fileNameCss = css({
114
- overflow: 'hidden',
115
- textOverflow: 'ellipsis',
116
- whiteSpace: 'nowrap',
117
- fontSize: theme.fontSize.sm,
118
- lineHeight: theme.lineHeight.normal,
119
- })
120
-
121
- const fileMetaCss = css({
122
- color: theme.colors.text.secondary,
123
- fontSize: theme.fontSize.xs,
124
- lineHeight: theme.lineHeight.normal,
125
- })
126
-
127
- const statusCss = css({
128
- margin: 0,
129
- minHeight: theme.lineHeight.normal,
130
- color: theme.colors.text.secondary,
131
- fontSize: theme.fontSize.sm,
132
- lineHeight: theme.lineHeight.normal,
133
- })