@opencode-ai/ui 0.0.0 → 1.17.13

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 (473) hide show
  1. package/LICENSE +21 -0
  2. package/dist/components/accordion.d.ts +24 -0
  3. package/dist/components/animated-number.d.ts +4 -0
  4. package/dist/components/app-icon.d.ts +6 -0
  5. package/dist/components/app-icons/types.d.ts +2 -0
  6. package/dist/components/avatar.d.ts +9 -0
  7. package/dist/components/button.d.ts +9 -0
  8. package/dist/components/card.d.ts +22 -0
  9. package/dist/components/checkbox.d.ts +8 -0
  10. package/dist/components/collapsible.d.ts +17 -0
  11. package/dist/components/context-menu.d.ts +80 -0
  12. package/dist/components/dialog.d.ts +12 -0
  13. package/dist/components/diff-changes.d.ts +11 -0
  14. package/dist/components/dock-surface.d.ts +7 -0
  15. package/dist/components/dropdown-menu.d.ts +80 -0
  16. package/dist/components/favicon.d.ts +1 -0
  17. package/dist/components/file-icon.d.ts +12 -0
  18. package/dist/components/file-icons/types.d.ts +2 -0
  19. package/dist/components/font.d.ts +1 -0
  20. package/dist/components/hover-card.d.ts +9 -0
  21. package/dist/components/icon-button.d.ts +10 -0
  22. package/dist/components/icon.d.ts +104 -0
  23. package/dist/components/image-preview.d.ts +5 -0
  24. package/dist/components/inline-input.d.ts +5 -0
  25. package/dist/components/keybind.d.ts +6 -0
  26. package/dist/components/list.d.ts +45 -0
  27. package/dist/components/logo.d.ts +8 -0
  28. package/dist/components/motion-spring.d.ts +4 -0
  29. package/dist/components/popover.d.ts +14 -0
  30. package/dist/components/progress-circle.d.ts +7 -0
  31. package/dist/components/progress.d.ts +7 -0
  32. package/dist/components/provider-icon.d.ts +5 -0
  33. package/dist/components/provider-icons/types.d.ts +2 -0
  34. package/dist/components/radio-group.d.ts +16 -0
  35. package/dist/components/resize-handle.d.ts +12 -0
  36. package/dist/components/scroll-view.d.ts +15 -0
  37. package/dist/components/select.d.ts +21 -0
  38. package/dist/components/spinner.d.ts +6 -0
  39. package/dist/components/sticky-accordion-header.d.ts +5 -0
  40. package/dist/components/switch.d.ts +7 -0
  41. package/dist/components/tabs.d.ts +32 -0
  42. package/dist/components/tag.d.ts +5 -0
  43. package/dist/components/text-field.d.ts +13 -0
  44. package/dist/components/text-reveal.d.ts +13 -0
  45. package/dist/components/text-shimmer.d.ts +8 -0
  46. package/dist/components/text-strikethrough.d.ts +11 -0
  47. package/dist/components/toast.d.ts +56 -0
  48. package/dist/components/tooltip.d.ts +17 -0
  49. package/dist/components/typewriter.d.ts +6 -0
  50. package/dist/context/dialog.d.ts +18 -0
  51. package/dist/context/file.d.ts +5 -0
  52. package/dist/context/helper.d.ts +14 -0
  53. package/dist/context/i18n.d.ts +12 -0
  54. package/dist/context/index.d.ts +4 -0
  55. package/dist/context/marked.d.ts +9 -0
  56. package/dist/context/worker-pool.d.ts +9 -0
  57. package/dist/hooks/create-auto-scroll.d.ts +17 -0
  58. package/dist/hooks/index.d.ts +2 -0
  59. package/dist/hooks/use-filtered-list.d.ts +39 -0
  60. package/dist/i18n/ar.d.ts +148 -0
  61. package/dist/i18n/br.d.ts +148 -0
  62. package/dist/i18n/bs.d.ts +148 -0
  63. package/dist/i18n/da.d.ts +148 -0
  64. package/dist/i18n/de.d.ts +148 -0
  65. package/dist/i18n/en.d.ts +1 -0
  66. package/dist/i18n/es.d.ts +148 -0
  67. package/dist/i18n/fr.d.ts +148 -0
  68. package/dist/i18n/ja.d.ts +148 -0
  69. package/dist/i18n/ko.d.ts +148 -0
  70. package/dist/i18n/no.d.ts +4 -0
  71. package/dist/i18n/pl.d.ts +148 -0
  72. package/dist/i18n/ru.d.ts +148 -0
  73. package/dist/i18n/th.d.ts +148 -0
  74. package/dist/i18n/tr.d.ts +148 -0
  75. package/dist/i18n/uk.d.ts +1 -0
  76. package/dist/i18n/zh.d.ts +148 -0
  77. package/dist/i18n/zht.d.ts +148 -0
  78. package/dist/storybook/fixtures.d.ts +19 -0
  79. package/dist/storybook/scaffold.d.ts +16 -0
  80. package/dist/theme/color.d.ts +30 -0
  81. package/dist/theme/context.d.ts +21 -0
  82. package/dist/theme/default-themes.d.ts +39 -0
  83. package/dist/theme/index.d.ts +7 -0
  84. package/dist/theme/loader.d.ts +6 -0
  85. package/dist/theme/resolve.d.ts +7 -0
  86. package/dist/theme/types.d.ts +56 -0
  87. package/dist/theme/v2/avatar.d.ts +5 -0
  88. package/dist/theme/v2/default-primitives.d.ts +3 -0
  89. package/dist/theme/v2/foreground.d.ts +2 -0
  90. package/dist/theme/v2/mapping.d.ts +3 -0
  91. package/dist/theme/v2/resolve.d.ts +9 -0
  92. package/dist/v2/components/accordion-v2.d.ts +26 -0
  93. package/dist/v2/components/avatar-v2.d.ts +11 -0
  94. package/dist/v2/components/badge-v2.d.ts +5 -0
  95. package/dist/v2/components/button-v2.d.ts +10 -0
  96. package/dist/v2/components/checkbox-v2.d.ts +10 -0
  97. package/dist/v2/components/dialog-v2.d.ts +26 -0
  98. package/dist/v2/components/diff-changes-v2.d.ts +11 -0
  99. package/dist/v2/components/divider-v2.d.ts +5 -0
  100. package/dist/v2/components/field-v2.d.ts +28 -0
  101. package/dist/v2/components/icon-button-v2.d.ts +11 -0
  102. package/dist/v2/components/icon.d.ts +121 -0
  103. package/dist/v2/components/inline-input-v2.d.ts +21 -0
  104. package/dist/v2/components/keybind-v2.d.ts +7 -0
  105. package/dist/v2/components/line-comment-v2.d.ts +28 -0
  106. package/dist/v2/components/loader-v2.d.ts +3 -0
  107. package/dist/v2/components/menu-v2.d.ts +52 -0
  108. package/dist/v2/components/progress-circle-v2.d.ts +8 -0
  109. package/dist/v2/components/project-avatar-v2.d.ts +11 -0
  110. package/dist/v2/components/radio-v2.d.ts +16 -0
  111. package/dist/v2/components/segmented-control-v2.d.ts +21 -0
  112. package/dist/v2/components/select-v2.d.ts +24 -0
  113. package/dist/v2/components/switch-v2.d.ts +7 -0
  114. package/dist/v2/components/tab-state-indicator.d.ts +2 -0
  115. package/dist/v2/components/tabs-v2.d.ts +34 -0
  116. package/dist/v2/components/text-input-v2.d.ts +17 -0
  117. package/dist/v2/components/text-shimmer-v2.d.ts +9 -0
  118. package/dist/v2/components/textarea-v2.d.ts +7 -0
  119. package/dist/v2/components/toast-v2.d.ts +48 -0
  120. package/dist/v2/components/tooltip-v2.d.ts +13 -0
  121. package/dist/v2/components/wordmark-v2.d.ts +2 -0
  122. package/package.json +148 -6
  123. package/src/assets/audio/alert-01.aac +0 -0
  124. package/src/assets/audio/alert-01.mp3 +0 -0
  125. package/src/assets/audio/alert-02.aac +0 -0
  126. package/src/assets/audio/alert-02.mp3 +0 -0
  127. package/src/assets/audio/alert-03.aac +0 -0
  128. package/src/assets/audio/alert-03.mp3 +0 -0
  129. package/src/assets/audio/alert-04.aac +0 -0
  130. package/src/assets/audio/alert-04.mp3 +0 -0
  131. package/src/assets/audio/alert-05.aac +0 -0
  132. package/src/assets/audio/alert-05.mp3 +0 -0
  133. package/src/assets/audio/alert-06.aac +0 -0
  134. package/src/assets/audio/alert-06.mp3 +0 -0
  135. package/src/assets/audio/alert-07.aac +0 -0
  136. package/src/assets/audio/alert-07.mp3 +0 -0
  137. package/src/assets/audio/alert-08.aac +0 -0
  138. package/src/assets/audio/alert-08.mp3 +0 -0
  139. package/src/assets/audio/alert-09.aac +0 -0
  140. package/src/assets/audio/alert-09.mp3 +0 -0
  141. package/src/assets/audio/alert-10.aac +0 -0
  142. package/src/assets/audio/alert-10.mp3 +0 -0
  143. package/src/assets/audio/bip-bop-01.aac +0 -0
  144. package/src/assets/audio/bip-bop-01.mp3 +0 -0
  145. package/src/assets/audio/bip-bop-02.aac +0 -0
  146. package/src/assets/audio/bip-bop-02.mp3 +0 -0
  147. package/src/assets/audio/bip-bop-03.aac +0 -0
  148. package/src/assets/audio/bip-bop-03.mp3 +0 -0
  149. package/src/assets/audio/bip-bop-04.aac +0 -0
  150. package/src/assets/audio/bip-bop-04.mp3 +0 -0
  151. package/src/assets/audio/bip-bop-05.aac +0 -0
  152. package/src/assets/audio/bip-bop-05.mp3 +0 -0
  153. package/src/assets/audio/bip-bop-06.aac +0 -0
  154. package/src/assets/audio/bip-bop-06.mp3 +0 -0
  155. package/src/assets/audio/bip-bop-07.aac +0 -0
  156. package/src/assets/audio/bip-bop-07.mp3 +0 -0
  157. package/src/assets/audio/bip-bop-08.aac +0 -0
  158. package/src/assets/audio/bip-bop-08.mp3 +0 -0
  159. package/src/assets/audio/bip-bop-09.aac +0 -0
  160. package/src/assets/audio/bip-bop-09.mp3 +0 -0
  161. package/src/assets/audio/bip-bop-10.aac +0 -0
  162. package/src/assets/audio/bip-bop-10.mp3 +0 -0
  163. package/src/assets/audio/nope-01.aac +0 -0
  164. package/src/assets/audio/nope-01.mp3 +0 -0
  165. package/src/assets/audio/nope-02.aac +0 -0
  166. package/src/assets/audio/nope-02.mp3 +0 -0
  167. package/src/assets/audio/nope-03.aac +0 -0
  168. package/src/assets/audio/nope-03.mp3 +0 -0
  169. package/src/assets/audio/nope-04.aac +0 -0
  170. package/src/assets/audio/nope-04.mp3 +0 -0
  171. package/src/assets/audio/nope-05.aac +0 -0
  172. package/src/assets/audio/nope-05.mp3 +0 -0
  173. package/src/assets/audio/nope-06.aac +0 -0
  174. package/src/assets/audio/nope-06.mp3 +0 -0
  175. package/src/assets/audio/nope-07.aac +0 -0
  176. package/src/assets/audio/nope-07.mp3 +0 -0
  177. package/src/assets/audio/nope-08.aac +0 -0
  178. package/src/assets/audio/nope-08.mp3 +0 -0
  179. package/src/assets/audio/nope-09.aac +0 -0
  180. package/src/assets/audio/nope-09.mp3 +0 -0
  181. package/src/assets/audio/nope-10.aac +0 -0
  182. package/src/assets/audio/nope-10.mp3 +0 -0
  183. package/src/assets/audio/nope-11.aac +0 -0
  184. package/src/assets/audio/nope-11.mp3 +0 -0
  185. package/src/assets/audio/nope-12.aac +0 -0
  186. package/src/assets/audio/nope-12.mp3 +0 -0
  187. package/src/assets/audio/staplebops-01.aac +0 -0
  188. package/src/assets/audio/staplebops-01.mp3 +0 -0
  189. package/src/assets/audio/staplebops-02.aac +0 -0
  190. package/src/assets/audio/staplebops-02.mp3 +0 -0
  191. package/src/assets/audio/staplebops-03.aac +0 -0
  192. package/src/assets/audio/staplebops-03.mp3 +0 -0
  193. package/src/assets/audio/staplebops-04.aac +0 -0
  194. package/src/assets/audio/staplebops-04.mp3 +0 -0
  195. package/src/assets/audio/staplebops-05.aac +0 -0
  196. package/src/assets/audio/staplebops-05.mp3 +0 -0
  197. package/src/assets/audio/staplebops-06.aac +0 -0
  198. package/src/assets/audio/staplebops-06.mp3 +0 -0
  199. package/src/assets/audio/staplebops-07.aac +0 -0
  200. package/src/assets/audio/staplebops-07.mp3 +0 -0
  201. package/src/assets/audio/yup-01.aac +0 -0
  202. package/src/assets/audio/yup-01.mp3 +0 -0
  203. package/src/assets/audio/yup-02.aac +0 -0
  204. package/src/assets/audio/yup-02.mp3 +0 -0
  205. package/src/assets/audio/yup-03.aac +0 -0
  206. package/src/assets/audio/yup-03.mp3 +0 -0
  207. package/src/assets/audio/yup-04.aac +0 -0
  208. package/src/assets/audio/yup-04.mp3 +0 -0
  209. package/src/assets/audio/yup-05.aac +0 -0
  210. package/src/assets/audio/yup-05.mp3 +0 -0
  211. package/src/assets/audio/yup-06.aac +0 -0
  212. package/src/assets/audio/yup-06.mp3 +0 -0
  213. package/src/assets/fonts/Inter.ttf +0 -0
  214. package/src/assets/fonts/JetBrainsMonoNerdFontMono-Regular.woff2 +0 -0
  215. package/src/assets/icons/app/android-studio.svg +369 -0
  216. package/src/assets/icons/app/antigravity.svg +97 -0
  217. package/src/assets/icons/app/cursor.svg +16 -0
  218. package/src/assets/icons/app/file-explorer.svg +20 -0
  219. package/src/assets/icons/app/finder.png +0 -0
  220. package/src/assets/icons/app/ghostty.svg +13 -0
  221. package/src/assets/icons/app/iterm2.svg +13 -0
  222. package/src/assets/icons/app/powershell.svg +14 -0
  223. package/src/assets/icons/app/sublimetext.svg +17 -0
  224. package/src/assets/icons/app/terminal.png +0 -0
  225. package/src/assets/icons/app/textmate.png +0 -0
  226. package/src/assets/icons/app/vscode.svg +39 -0
  227. package/src/assets/icons/app/warp.png +0 -0
  228. package/src/assets/icons/app/xcode.png +0 -0
  229. package/src/assets/icons/app/zed-dark.svg +15 -0
  230. package/src/assets/icons/app/zed.svg +15 -0
  231. package/src/components/accordion.css +147 -0
  232. package/src/components/accordion.tsx +92 -0
  233. package/src/components/animated-number.css +75 -0
  234. package/src/components/animated-number.tsx +109 -0
  235. package/src/components/app-icon.css +5 -0
  236. package/src/components/app-icon.tsx +85 -0
  237. package/src/components/app-icons/sprite.svg +114 -0
  238. package/src/components/app-icons/types.ts +21 -0
  239. package/src/components/avatar.css +49 -0
  240. package/src/components/avatar.tsx +55 -0
  241. package/src/components/button.css +194 -0
  242. package/src/components/button.tsx +33 -0
  243. package/src/components/card.css +115 -0
  244. package/src/components/card.tsx +123 -0
  245. package/src/components/checkbox.css +131 -0
  246. package/src/components/checkbox.tsx +43 -0
  247. package/src/components/collapsible.css +148 -0
  248. package/src/components/collapsible.tsx +48 -0
  249. package/src/components/context-menu.css +134 -0
  250. package/src/components/context-menu.tsx +308 -0
  251. package/src/components/dialog.css +181 -0
  252. package/src/components/dialog.tsx +72 -0
  253. package/src/components/diff-changes.css +42 -0
  254. package/src/components/diff-changes.tsx +115 -0
  255. package/src/components/dock-surface.css +23 -0
  256. package/src/components/dock-surface.tsx +54 -0
  257. package/src/components/dropdown-menu.css +135 -0
  258. package/src/components/dropdown-menu.tsx +308 -0
  259. package/src/components/favicon.tsx +13 -0
  260. package/src/components/file-icon.css +26 -0
  261. package/src/components/file-icon.tsx +588 -0
  262. package/src/components/file-icons/sprite.svg +11707 -0
  263. package/src/components/file-icons/types.ts +1095 -0
  264. package/src/components/font.tsx +1 -0
  265. package/src/components/hover-card.css +61 -0
  266. package/src/components/hover-card.tsx +32 -0
  267. package/src/components/icon-button.css +181 -0
  268. package/src/components/icon-button.tsx +29 -0
  269. package/src/components/icon.css +34 -0
  270. package/src/components/icon.tsx +169 -0
  271. package/src/components/image-preview.css +63 -0
  272. package/src/components/image-preview.tsx +32 -0
  273. package/src/components/inline-input.css +17 -0
  274. package/src/components/inline-input.tsx +22 -0
  275. package/src/components/keybind.css +18 -0
  276. package/src/components/keybind.tsx +20 -0
  277. package/src/components/list.css +331 -0
  278. package/src/components/list.tsx +394 -0
  279. package/src/components/logo.css +4 -0
  280. package/src/components/logo.tsx +62 -0
  281. package/src/components/motion-spring.tsx +58 -0
  282. package/src/components/popover.css +98 -0
  283. package/src/components/popover.tsx +153 -0
  284. package/src/components/progress-circle.css +16 -0
  285. package/src/components/progress-circle.tsx +64 -0
  286. package/src/components/progress.css +63 -0
  287. package/src/components/progress.tsx +39 -0
  288. package/src/components/provider-icon.css +5 -0
  289. package/src/components/provider-icon.tsx +25 -0
  290. package/src/components/provider-icons/sprite.svg +1135 -0
  291. package/src/components/provider-icons/types.ts +105 -0
  292. package/src/components/radio-group.css +187 -0
  293. package/src/components/radio-group.tsx +83 -0
  294. package/src/components/resize-handle.css +58 -0
  295. package/src/components/resize-handle.tsx +82 -0
  296. package/src/components/scroll-view.css +66 -0
  297. package/src/components/scroll-view.tsx +250 -0
  298. package/src/components/select.css +199 -0
  299. package/src/components/select.tsx +174 -0
  300. package/src/components/spinner.css +6 -0
  301. package/src/components/spinner.tsx +52 -0
  302. package/src/components/sticky-accordion-header.css +6 -0
  303. package/src/components/sticky-accordion-header.tsx +18 -0
  304. package/src/components/switch.css +132 -0
  305. package/src/components/switch.tsx +29 -0
  306. package/src/components/tabs.css +635 -0
  307. package/src/components/tabs.tsx +125 -0
  308. package/src/components/tag.css +37 -0
  309. package/src/components/tag.tsx +22 -0
  310. package/src/components/text-field.css +134 -0
  311. package/src/components/text-field.tsx +128 -0
  312. package/src/components/text-reveal.css +150 -0
  313. package/src/components/text-reveal.tsx +143 -0
  314. package/src/components/text-shimmer.css +119 -0
  315. package/src/components/text-shimmer.tsx +62 -0
  316. package/src/components/text-strikethrough.css +27 -0
  317. package/src/components/text-strikethrough.tsx +84 -0
  318. package/src/components/toast.css +236 -0
  319. package/src/components/toast.tsx +185 -0
  320. package/src/components/tooltip.css +74 -0
  321. package/src/components/tooltip.tsx +163 -0
  322. package/src/components/typewriter.css +14 -0
  323. package/src/components/typewriter.tsx +55 -0
  324. package/src/context/dialog.tsx +197 -0
  325. package/src/context/file.tsx +10 -0
  326. package/src/context/helper.tsx +38 -0
  327. package/src/context/i18n.tsx +38 -0
  328. package/src/context/index.ts +4 -0
  329. package/src/context/marked.tsx +522 -0
  330. package/src/context/worker-pool.tsx +20 -0
  331. package/src/custom-elements.d.ts +17 -0
  332. package/src/hooks/create-auto-scroll.tsx +237 -0
  333. package/src/hooks/index.ts +2 -0
  334. package/src/hooks/use-filtered-list.tsx +134 -0
  335. package/src/i18n/ar.ts +168 -0
  336. package/src/i18n/br.ts +168 -0
  337. package/src/i18n/bs.ts +172 -0
  338. package/src/i18n/da.ts +167 -0
  339. package/src/i18n/de.ts +173 -0
  340. package/src/i18n/en.ts +176 -0
  341. package/src/i18n/es.ts +168 -0
  342. package/src/i18n/fr.ts +168 -0
  343. package/src/i18n/ja.ts +167 -0
  344. package/src/i18n/ko.ts +168 -0
  345. package/src/i18n/no.ts +171 -0
  346. package/src/i18n/pl.ts +167 -0
  347. package/src/i18n/ru.ts +167 -0
  348. package/src/i18n/th.ts +169 -0
  349. package/src/i18n/tr.ts +174 -0
  350. package/src/i18n/uk.ts +167 -0
  351. package/src/i18n/zh.ts +171 -0
  352. package/src/i18n/zht.ts +171 -0
  353. package/src/storybook/fixtures.ts +51 -0
  354. package/src/storybook/scaffold.tsx +62 -0
  355. package/src/styles/animations.css +141 -0
  356. package/src/styles/base.css +404 -0
  357. package/src/styles/colors.css +772 -0
  358. package/src/styles/index.css +53 -0
  359. package/src/styles/tailwind/colors.css +286 -0
  360. package/src/styles/tailwind/index.css +78 -0
  361. package/src/styles/tailwind/utilities.css +131 -0
  362. package/src/styles/theme.css +609 -0
  363. package/src/styles/utilities.css +118 -0
  364. package/src/theme/color.ts +299 -0
  365. package/src/theme/context.tsx +370 -0
  366. package/src/theme/default-themes.ts +116 -0
  367. package/src/theme/index.ts +78 -0
  368. package/src/theme/loader.ts +112 -0
  369. package/src/theme/resolve.ts +540 -0
  370. package/src/theme/themes/amoled.json +49 -0
  371. package/src/theme/themes/aura.json +51 -0
  372. package/src/theme/themes/ayu.json +51 -0
  373. package/src/theme/themes/carbonfox.json +53 -0
  374. package/src/theme/themes/catppuccin-frappe.json +85 -0
  375. package/src/theme/themes/catppuccin-macchiato.json +85 -0
  376. package/src/theme/themes/catppuccin.json +45 -0
  377. package/src/theme/themes/cobalt2.json +87 -0
  378. package/src/theme/themes/cursor.json +91 -0
  379. package/src/theme/themes/dracula.json +49 -0
  380. package/src/theme/themes/everforest.json +89 -0
  381. package/src/theme/themes/flexoki.json +86 -0
  382. package/src/theme/themes/github.json +85 -0
  383. package/src/theme/themes/gruvbox.json +45 -0
  384. package/src/theme/themes/kanagawa.json +89 -0
  385. package/src/theme/themes/lucent-orng.json +87 -0
  386. package/src/theme/themes/material.json +87 -0
  387. package/src/theme/themes/matrix.json +113 -0
  388. package/src/theme/themes/mercury.json +86 -0
  389. package/src/theme/themes/monokai.json +49 -0
  390. package/src/theme/themes/nightowl.json +46 -0
  391. package/src/theme/themes/nord.json +46 -0
  392. package/src/theme/themes/oc-2.json +474 -0
  393. package/src/theme/themes/one-dark.json +89 -0
  394. package/src/theme/themes/onedarkpro.json +45 -0
  395. package/src/theme/themes/opencode.json +89 -0
  396. package/src/theme/themes/orng.json +87 -0
  397. package/src/theme/themes/osaka-jade.json +88 -0
  398. package/src/theme/themes/palenight.json +85 -0
  399. package/src/theme/themes/rosepine.json +85 -0
  400. package/src/theme/themes/shadesofpurple.json +51 -0
  401. package/src/theme/themes/solarized.json +49 -0
  402. package/src/theme/themes/synthwave84.json +87 -0
  403. package/src/theme/themes/tokyonight.json +47 -0
  404. package/src/theme/themes/vercel.json +90 -0
  405. package/src/theme/themes/vesper.json +51 -0
  406. package/src/theme/themes/zenburn.json +87 -0
  407. package/src/theme/types.ts +75 -0
  408. package/src/theme/v2/avatar.ts +48 -0
  409. package/src/theme/v2/default-primitives.ts +114 -0
  410. package/src/theme/v2/foreground.ts +60 -0
  411. package/src/theme/v2/mapping.ts +140 -0
  412. package/src/theme/v2/resolve.ts +153 -0
  413. package/src/v2/components/accordion-v2.css +139 -0
  414. package/src/v2/components/accordion-v2.tsx +86 -0
  415. package/src/v2/components/avatar-v2.css +70 -0
  416. package/src/v2/components/avatar-v2.tsx +59 -0
  417. package/src/v2/components/badge-v2.css +27 -0
  418. package/src/v2/components/badge-v2.tsx +20 -0
  419. package/src/v2/components/button-v2.css +239 -0
  420. package/src/v2/components/button-v2.tsx +35 -0
  421. package/src/v2/components/checkbox-v2.css +184 -0
  422. package/src/v2/components/checkbox-v2.tsx +65 -0
  423. package/src/v2/components/dialog-v2.css +177 -0
  424. package/src/v2/components/dialog-v2.tsx +114 -0
  425. package/src/v2/components/diff-changes-v2.css +24 -0
  426. package/src/v2/components/diff-changes-v2.tsx +28 -0
  427. package/src/v2/components/divider-v2.css +11 -0
  428. package/src/v2/components/divider-v2.tsx +20 -0
  429. package/src/v2/components/field-v2.css +94 -0
  430. package/src/v2/components/field-v2.tsx +265 -0
  431. package/src/v2/components/icon-button-v2.css +155 -0
  432. package/src/v2/components/icon-button-v2.tsx +37 -0
  433. package/src/v2/components/icon.tsx +173 -0
  434. package/src/v2/components/inline-input-v2.css +218 -0
  435. package/src/v2/components/inline-input-v2.tsx +90 -0
  436. package/src/v2/components/keybind-v2.css +76 -0
  437. package/src/v2/components/keybind-v2.tsx +30 -0
  438. package/src/v2/components/line-comment-v2.css +204 -0
  439. package/src/v2/components/line-comment-v2.tsx +155 -0
  440. package/src/v2/components/loader-v2.css +32 -0
  441. package/src/v2/components/loader-v2.tsx +31 -0
  442. package/src/v2/components/menu-v2.css +190 -0
  443. package/src/v2/components/menu-v2.tsx +225 -0
  444. package/src/v2/components/progress-circle-v2.css +13 -0
  445. package/src/v2/components/progress-circle-v2.tsx +52 -0
  446. package/src/v2/components/project-avatar-v2.css +125 -0
  447. package/src/v2/components/project-avatar-v2.tsx +64 -0
  448. package/src/v2/components/radio-v2.css +202 -0
  449. package/src/v2/components/radio-v2.tsx +72 -0
  450. package/src/v2/components/segmented-control-v2.css +80 -0
  451. package/src/v2/components/segmented-control-v2.tsx +208 -0
  452. package/src/v2/components/select-v2.css +285 -0
  453. package/src/v2/components/select-v2.tsx +208 -0
  454. package/src/v2/components/switch-v2.css +154 -0
  455. package/src/v2/components/switch-v2.tsx +28 -0
  456. package/src/v2/components/tab-state-indicator.tsx +37 -0
  457. package/src/v2/components/tabs-v2.css +225 -0
  458. package/src/v2/components/tabs-v2.tsx +147 -0
  459. package/src/v2/components/text-input-v2.css +145 -0
  460. package/src/v2/components/text-input-v2.tsx +67 -0
  461. package/src/v2/components/text-shimmer-v2.css +125 -0
  462. package/src/v2/components/text-shimmer-v2.tsx +63 -0
  463. package/src/v2/components/textarea-v2.css +78 -0
  464. package/src/v2/components/textarea-v2.tsx +31 -0
  465. package/src/v2/components/toast-v2.css +215 -0
  466. package/src/v2/components/toast-v2.tsx +144 -0
  467. package/src/v2/components/tooltip-v2.css +64 -0
  468. package/src/v2/components/tooltip-v2.tsx +147 -0
  469. package/src/v2/components/wordmark-v2.tsx +92 -0
  470. package/src/v2/styles/colors.css +172 -0
  471. package/src/v2/styles/tailwind.css +2 -0
  472. package/src/v2/styles/theme.css +457 -0
  473. package/README.md +0 -3
@@ -0,0 +1,155 @@
1
+ * {
2
+ -webkit-font-smoothing: antialiased;
3
+ -moz-osx-font-smoothing: grayscale;
4
+ text-rendering: geometricPrecision;
5
+ }
6
+
7
+ [data-component="icon-button-v2"] {
8
+ display: inline-flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ border-radius: 6px;
12
+ color: var(--v2-text-text-base);
13
+ user-select: none;
14
+ outline: none;
15
+ padding: 0;
16
+ cursor: default;
17
+ }
18
+
19
+ [data-component="icon-button-v2"]:focus {
20
+ outline: none;
21
+ }
22
+
23
+ [data-component="icon-button-v2"]:is(:focus-visible, [data-state="focus"]):not(:disabled) {
24
+ outline: 2px solid var(--v2-border-border-focus);
25
+ outline-offset: 2.5px;
26
+ }
27
+
28
+ [data-component="icon-button-v2"][data-size="small"] {
29
+ width: 20px;
30
+ height: 20px;
31
+ border-radius: 4px;
32
+ }
33
+
34
+ [data-component="icon-button-v2"][data-size="normal"] {
35
+ width: 24px;
36
+ height: 24px;
37
+ }
38
+
39
+ [data-component="icon-button-v2"][data-size="large"] {
40
+ width: 28px;
41
+ height: 28px;
42
+ }
43
+
44
+ [data-component="icon-button-v2"] [data-slot="icon-svg"] {
45
+ color: currentColor;
46
+ }
47
+
48
+ /* Neutral */
49
+ [data-component="icon-button-v2"][data-variant="neutral"] {
50
+ background-color: var(--v2-background-bg-button-neutral);
51
+ color: var(--v2-text-text-base);
52
+ box-shadow: var(--v2-elevation-button-neutral);
53
+ }
54
+
55
+ [data-component="icon-button-v2"][data-variant="neutral"]:is(:hover, [data-state="hover"]):not(:disabled) {
56
+ background-image:
57
+ linear-gradient(90deg, var(--v2-overlay-simple-overlay-hover) 0%, var(--v2-overlay-simple-overlay-hover) 100%),
58
+ linear-gradient(90deg, var(--v2-background-bg-button-neutral) 0%, var(--v2-background-bg-button-neutral) 100%);
59
+ }
60
+
61
+ [data-component="icon-button-v2"][data-variant="neutral"]:is(:active, [data-state="pressed"]):not(:disabled) {
62
+ background-image:
63
+ linear-gradient(90deg, var(--v2-overlay-simple-overlay-pressed) 0%, var(--v2-overlay-simple-overlay-pressed) 100%),
64
+ linear-gradient(90deg, var(--v2-background-bg-button-neutral) 0%, var(--v2-background-bg-button-neutral) 100%);
65
+ }
66
+
67
+ [data-component="icon-button-v2"][data-variant="neutral"]:is(:disabled, [data-state="disabled"]) {
68
+ opacity: 0.5;
69
+ cursor: not-allowed;
70
+ }
71
+
72
+ /* Contrast */
73
+ [data-component="icon-button-v2"][data-variant="contrast"] {
74
+ background-image:
75
+ linear-gradient(180deg, var(--v2-alpha-light-20) 0%, var(--v2-alpha-light-0) 100%),
76
+ linear-gradient(90deg, var(--v2-background-bg-contrast) 0%, var(--v2-background-bg-contrast) 100%);
77
+ color: var(--v2-text-text-contrast);
78
+ text-shadow: 0 0.5px 0.5px rgba(0, 0, 0, 0.3);
79
+ box-shadow: var(--v2-elevation-button-contrast);
80
+ }
81
+
82
+ [data-component="icon-button-v2"][data-variant="contrast"]:is(:hover, [data-state="hover"]):not(:disabled) {
83
+ background-image:
84
+ linear-gradient(
85
+ 90deg,
86
+ var(--v2-overlay-simple-overlay-contrast-hover) 0%,
87
+ var(--v2-overlay-simple-overlay-contrast-hover) 100%
88
+ ),
89
+ linear-gradient(180deg, var(--v2-alpha-light-20) 0%, var(--v2-alpha-light-0) 100%),
90
+ linear-gradient(90deg, var(--v2-background-bg-contrast) 0%, var(--v2-background-bg-contrast) 100%);
91
+ }
92
+
93
+ [data-component="icon-button-v2"][data-variant="contrast"]:is(:active, [data-state="pressed"]):not(:disabled) {
94
+ background-image:
95
+ linear-gradient(
96
+ 90deg,
97
+ var(--v2-overlay-simple-overlay-contrast-pressed) 0%,
98
+ var(--v2-overlay-simple-overlay-contrast-pressed) 100%
99
+ ),
100
+ linear-gradient(180deg, var(--v2-alpha-light-20) 0%, var(--v2-alpha-light-0) 100%),
101
+ linear-gradient(90deg, var(--v2-background-bg-contrast) 0%, var(--v2-background-bg-contrast) 100%);
102
+ }
103
+
104
+ [data-component="icon-button-v2"][data-variant="contrast"]:is(:disabled, [data-state="disabled"]) {
105
+ opacity: 0.4;
106
+ cursor: not-allowed;
107
+ }
108
+
109
+ /* Ghost */
110
+ [data-component="icon-button-v2"][data-variant="ghost"] {
111
+ background-color: transparent;
112
+ color: var(--v2-text-text-base);
113
+ }
114
+
115
+ [data-component="icon-button-v2"][data-variant="ghost"]:is(:hover, [data-state="hover"], [data-expanded]):not(
116
+ :disabled
117
+ ) {
118
+ background-color: var(--v2-overlay-simple-overlay-hover);
119
+ }
120
+
121
+ [data-component="icon-button-v2"][data-variant="ghost"]:is(:active, [data-state="pressed"]):not(:disabled) {
122
+ background-color: var(--v2-overlay-simple-overlay-pressed);
123
+ }
124
+
125
+ [data-component="icon-button-v2"][data-variant="ghost"]:is(:disabled, [data-state="disabled"]) {
126
+ opacity: 0.5;
127
+ cursor: not-allowed;
128
+ }
129
+
130
+ /* Ghost */
131
+ [data-component="icon-button-v2"][data-variant="ghost-muted"] {
132
+ background-color: transparent;
133
+ color: var(--v2-icon-icon-muted);
134
+ }
135
+
136
+ [data-component="icon-button-v2"][data-variant="ghost-muted"]:is(:hover, [data-state="hover"], [data-expanded]):not(
137
+ :disabled
138
+ ) {
139
+ background-color: var(--v2-overlay-simple-overlay-hover);
140
+ }
141
+
142
+ [data-component="icon-button-v2"][data-variant="ghost-muted"]:is(:active, [data-state="pressed"]):not(:disabled) {
143
+ background-color: var(--v2-overlay-simple-overlay-pressed);
144
+ color: var(--v2-icon-icon-base);
145
+ }
146
+
147
+ [data-component="icon-button-v2"][data-variant="ghost-muted"]:where([data-expanded]):not(:disabled) {
148
+ background-color: var(--v2-overlay-simple-overlay-pressed);
149
+ color: var(--v2-icon-icon-base);
150
+ }
151
+
152
+ [data-component="icon-button-v2"][data-variant="ghost-muted"]:is(:disabled, [data-state="disabled"]) {
153
+ opacity: 0.5;
154
+ cursor: not-allowed;
155
+ }
@@ -0,0 +1,37 @@
1
+ import { Button as Kobalte } from "@kobalte/core/button"
2
+ import { type ComponentProps, splitProps } from "solid-js"
3
+ import { JSX } from "solid-js"
4
+ import "./icon-button-v2.css"
5
+
6
+ export interface IconButtonV2Props
7
+ extends ComponentProps<typeof Kobalte>,
8
+ Pick<ComponentProps<"button">, "class" | "classList"> {
9
+ // temporary
10
+ icon?: JSX.Element
11
+ // icon: IconProps["name"]
12
+ size?: "small" | "normal" | "large"
13
+ // iconSize?: IconProps["size"]
14
+ variant?: "neutral" | "contrast" | "ghost" | "ghost-muted"
15
+ state?: "rest" | "hover" | "pressed"
16
+ }
17
+
18
+ export function IconButtonV2(props: ComponentProps<"button"> & IconButtonV2Props) {
19
+ const [split, rest] = splitProps(props, ["variant", "size", "iconSize", "class", "classList", "state"])
20
+ return (
21
+ <Kobalte
22
+ {...rest}
23
+ data-component="icon-button-v2"
24
+ // data-icon={props.icon}
25
+ data-size={split.size || "normal"}
26
+ data-variant={split.variant || "neutral"}
27
+ data-state={split.state}
28
+ classList={{
29
+ ...split.classList,
30
+ [split.class ?? ""]: !!split.class,
31
+ }}
32
+ >
33
+ {props.icon}
34
+ {/*<Icon name={props.icon} size={split.iconSize ?? (split.size === "large" ? "normal" : "small")} />*/}
35
+ </Kobalte>
36
+ )
37
+ }
@@ -0,0 +1,173 @@
1
+ import { onMount, type ComponentProps, splitProps } from "solid-js"
2
+
3
+ const icons = {
4
+ edit: {
5
+ viewBox: "0 0 16 16",
6
+ body: `<path d="M13.5555 8.21534V13.5556H2.44434L2.44434 2.4445H7.78462M6.88878 9.11119C6.88878 9.11119 8.96327 9.0367 9.69678 8.3032L14.0301 3.96986C14.5824 3.4176 14.5824 2.52213 14.0301 1.96986C13.4778 1.4176 12.5824 1.4176 12.0301 1.96986L7.69678 6.3032C7.00513 6.99484 6.88878 9.11119 6.88878 9.11119Z" stroke="currentColor"/>`,
7
+ },
8
+ "folder-add-left": {
9
+ viewBox: "0 0 16 16",
10
+ body: `<path d="M7.5 13.3333H1.5V2H6.83333L8.83333 4H14.8333V6M10.1667 11.3333H15.5M12.8333 8.66667V14" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`,
11
+ },
12
+ folder: {
13
+ viewBox: "0 0 16 16",
14
+ body: `<path d="M2.545 3.364V12.636H13.455V5H8.545L6.909 3.364H2.545Z" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`,
15
+ },
16
+ branch: {
17
+ viewBox: "0 0 16 16",
18
+ body: `<path d="M5.118 5.686V10.314M5.118 5.686C5.97 5.686 6.661 4.995 6.661 4.143C6.661 3.291 5.97 2.6 5.118 2.6C4.266 2.6 3.575 3.291 3.575 4.143C3.575 4.995 4.266 5.686 5.118 5.686ZM5.118 10.314C4.266 10.314 3.575 11.005 3.575 11.857C3.575 12.709 4.266 13.4 5.118 13.4C5.97 13.4 6.661 12.709 6.661 11.857M5.118 10.314C5.97 10.314 6.661 11.005 6.661 11.857M10.882 5.686C11.734 5.686 12.425 4.995 12.425 4.143C12.425 3.291 11.734 2.6 10.882 2.6C10.03 2.6 9.339 3.291 9.339 4.143C9.339 4.995 10.03 5.686 10.882 5.686ZM10.882 5.686V9.457C10.882 10.783 9.807 11.857 8.482 11.857H6.661" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>`,
19
+ },
20
+ "grid-plus": {
21
+ viewBox: "0 0 16 16",
22
+ body: `<path d="M13.9948 11.668H9.32812M11.6641 9.33203V13.9987M6.66667 9.33203V13.9987H2V9.33203H6.66667ZM6.66667 2V6.66667H2V2H6.66667ZM13.9948 2V6.66667H9.32812V2H13.9948Z" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`,
23
+ },
24
+ help: {
25
+ viewBox: "0 0 16 16",
26
+ body: `<path d="M6.33345 6.33349V5.00015H9.66679V7.00015L8.00015 8.00015V9.66679M8.27485 11.6819H7.71897M14.4446 8.00011C14.4446 11.5593 11.5593 14.4446 8.00011 14.4446C4.44094 14.4446 1.55566 11.5593 1.55566 8.00011C1.55566 4.44094 4.44094 1.55566 8.00011 1.55566C11.5593 1.55566 14.4446 4.44094 14.4446 8.00011Z" stroke="currentColor" stroke-linecap="square"/>`,
27
+ },
28
+ "sidebar-right": {
29
+ viewBox: "0 0 20 20",
30
+ body: `<path d="M2.91536 2.91406H2.36536V2.36406H2.91536V2.91406ZM2.91536 17.0807V17.6307H2.36536V17.0807H2.91536ZM17.082 17.0807H17.632V17.6307H17.082V17.0807ZM17.082 2.91406V2.36406H17.632V2.91406H17.082ZM6.9987 2.91406H6.4487V2.36406H6.9987V2.91406ZM6.9987 17.0807V17.6307H6.4487V17.0807H6.9987ZM2.91536 2.91406H3.46536V17.0807H2.91536H2.36536V2.91406H2.91536ZM2.91536 17.0807V16.5307H17.082V17.0807V17.6307H2.91536V17.0807ZM17.082 17.0807H16.532V2.91406H17.082H17.632V17.0807H17.082ZM17.082 2.91406V3.46406H2.91536V2.91406V2.36406H17.082V2.91406ZM6.9987 2.91406H7.5487V17.0807H6.9987H6.4487V2.91406H6.9987ZM17.082 17.0807L17.082 17.6307L6.9987 17.6307V17.0807V16.5307L17.082 16.5307L17.082 17.0807ZM6.9987 2.91406V2.36406H17.082V2.91406V3.46406H6.9987V2.91406Z" fill="currentColor"/>`,
31
+ },
32
+ status: {
33
+ viewBox: "0 0 20 20",
34
+ body: `<path d="M2 10V18H18V10M2 10V2H18V10M2 10H18M5 6H9M5 14H9" stroke="currentColor"/>`,
35
+ },
36
+ "status-active": {
37
+ viewBox: "0 0 20 20",
38
+ body: `<path d="M18 2H2V10H18V2Z" fill="currentColor" fill-opacity="0.1"/><path d="M2 18H18V10H2V18Z" fill="currentColor" fill-opacity="0.1"/><path d="M2 10V18H18V10M2 10V2H18V10M2 10H18M5 6H9M5 14H9" stroke="currentColor"/>`,
39
+ },
40
+ "magnifying-glass": {
41
+ viewBox: "0 0 16 16",
42
+ body: `<path d="M14 14L10.3454 10.3454M6.88889 11.7778C9.58889 11.7778 11.7778 9.58889 11.7778 6.88889C11.7778 4.18889 9.58889 2 6.88889 2C4.18889 2 2 4.18889 2 6.88889C2 9.58889 4.18889 11.7778 6.88889 11.7778Z" stroke="currentColor"/>`,
43
+ },
44
+ menu: {
45
+ viewBox: "0 0 16 16",
46
+ body: `<path d="M2 8H14M2 4.664H14M2 11.336H14" stroke="currentColor"/>`,
47
+ },
48
+ plus: {
49
+ viewBox: "0 0 16 16",
50
+ body: `<path d="M8 2.88867V13.1109" stroke="currentColor" stroke-linejoin="round"/><path d="M2.88867 8H13.1109" stroke="currentColor" stroke-linejoin="round"/>`,
51
+ },
52
+ "settings-gear": {
53
+ viewBox: "0 0 16 16",
54
+ body: `<path d="M7.99998 1.3335L14 4.66683V11.3335L7.99998 14.6668L2 11.3335V4.66683L7.99998 1.3335Z" stroke="currentColor"/><path d="M9.99998 8.00016C9.99998 9.10476 9.10458 10.0002 7.99998 10.0002C6.89538 10.0002 5.99998 9.10476 5.99998 8.00016C5.99998 6.89556 6.89538 6.00016 7.99998 6.00016C9.10458 6.00016 9.99998 6.89556 9.99998 8.00016Z" stroke="currentColor"/>`,
55
+ },
56
+ "chevron-down": {
57
+ viewBox: "0 0 16 16",
58
+ body: `<path d="M5 6.5L8 9.5L11 6.5" stroke="currentColor"/>`,
59
+ },
60
+ check: {
61
+ viewBox: "0 0 16 16",
62
+ body: `<path d="M3.53613 8.17857L6.39328 11.75L12.4647 4.25" stroke="currentColor"/>`,
63
+ },
64
+ monitor: {
65
+ viewBox: "0 0 16 16",
66
+ body: `<path d="M4.05559 9.38889H0.500007C0.500007 9.38889 0.500017 8.59298 0.500017 7.61112V2.27778C0.500017 1.29594 0.500102 0.5 0.500102 0.5H13.3889C13.3889 0.5 13.3889 1.29594 13.3889 2.27778V7.61112C13.3889 8.59298 13.3889 9.38889 13.3889 9.38889H9.83336M4.05559 9.38889V11.6111H6.94448H9.83336V9.38889M4.05559 9.38889H9.83336" transform="translate(1.05556 1.94444)" stroke="currentColor"/>`,
67
+ },
68
+ "workspace-new": {
69
+ viewBox: "0 0 16 16",
70
+ body: `<path d="M2 10.7578V14.0011H5.24324M13.9991 5.24324V2H10.7559M13.9991 10.7578V14.0011H10.7559M2 5.24324V2H5.24324" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/><path d="M8 4.5V11.5M4.5 8H11.5" stroke="currentColor" stroke-linejoin="round"/>`,
71
+ },
72
+ "workspace-isolated": {
73
+ viewBox: "0 0 16 16",
74
+ body: `<path d="M10.5 10.5V5.5H5.5V10.5H10.5Z" fill="currentColor"/><rect x="2.5" y="2.5" width="11" height="11" stroke="currentColor"/>`,
75
+ },
76
+ workspace: {
77
+ viewBox: "0 0 16 16",
78
+ body: `<path d="M2 10.668V14.0013H10.6667M13.9974 10.6667V2H2.66406M13.9974 10.668V14.0013H10.6641M2 10V2H5.33333" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/><path d="M10.6693 10.6654V5.33203H5.33594V10.6654H10.6693Z" fill="currentColor"/>`,
79
+ },
80
+ close: {
81
+ viewBox: "0 0 20 20",
82
+ body: `<path d="M14.4446 5.55566L5.55566 14.4446M5.55566 5.55566L14.4446 14.4446" stroke="currentColor" stroke-linejoin="round"/>`,
83
+ },
84
+ "xmark-small": {
85
+ viewBox: "0 0 16 16",
86
+ body: `<path d="M4.25 11.75L11.75 4.25M11.75 11.75L4.25 4.25" stroke="currentColor"/>`,
87
+ },
88
+ "outline-chevron-down": {
89
+ viewBox: "0 0 16 16",
90
+ body: `<path d="M5 6.5L8 9.5L11 6.5" stroke="currentColor"/>`,
91
+ },
92
+ "outline-dots": {
93
+ viewBox: "0 0 16 16",
94
+ body: `<path d="M2.5 7.5H3.5V8.5H2.5V7.5Z" stroke="currentColor"/><path d="M7.5 7.5H8.5V8.5H7.5V7.5Z" stroke="currentColor"/><path d="M12.5 7.5H13.5V8.5H12.5V7.5Z" stroke="currentColor"/>`,
95
+ },
96
+ "outline-sliders": {
97
+ viewBox: "0 0 16 16",
98
+ body: `<path d="M11.7779 4.66675H14.4446M11.7779 4.66675C11.7779 5.77132 10.8825 6.66675 9.77789 6.66675C8.67332 6.66675 7.77789 5.77132 7.77789 4.66675M11.7779 4.66675C11.7779 3.56218 10.8825 2.66675 9.77789 2.66675C8.67332 2.66675 7.77789 3.56218 7.77789 4.66675M1.55566 4.66675H7.77789M4.22233 11.3334H1.55566M4.22233 11.3334C4.22233 12.438 5.11776 13.3334 6.22233 13.3334C7.3269 13.3334 8.22233 12.438 8.22233 11.3334M4.22233 11.3334C4.22233 10.2288 5.11776 9.33341 6.22233 9.33341C7.3269 9.33341 8.22233 10.2288 8.22233 11.3334M14.4446 11.3334H8.22233" stroke="currentColor"/>`,
99
+ },
100
+ "outline-copy": {
101
+ viewBox: "0 0 16 16",
102
+ body: `<path d="M4.14908 11.0081H1.76282V1.51758H9.1038V2.55588M14.2225 4.99681H6.75397V14.4873H14.2225V4.99681Z" stroke="currentColor"/>`,
103
+ },
104
+ "outline-square-arrow": {
105
+ viewBox: "0 0 16 16",
106
+ body: `<path d="M13.5555 6.66656V2.44434H9.33326M13.5555 2.44434L7.99993 7.99989M13.5555 9.33324V13.5555C13.5555 13.5555 12.7599 13.5555 11.7777 13.5555H2.44438C2.44438 13.5555 2.44438 12.7599 2.44438 11.7777V4.22213C2.44438 3.2399 2.44434 2.44435 2.44434 2.44435H6.66661" stroke="currentColor"/>`,
107
+ },
108
+ reset: {
109
+ viewBox: "0 0 20 20",
110
+ body: `<path d="M5.83333 4.16406L2.5 7.4974L5.83333 10.8307M3.33333 7.4974H17.9167V15.4141H10" stroke="currentColor" stroke-linecap="square"/>`,
111
+ },
112
+ archive: {
113
+ viewBox: "0 0 16 16",
114
+ body: `<path d="M13.1112 13.5555V14.0555H13.6112V13.5555H13.1112ZM2.889 13.5555H2.389L2.389 14.0555H2.889V13.5555ZM3.38901 5.55546L3.38901 5.05546L2.38901 5.05546L2.38901 5.55546L2.88901 5.55546L3.38901 5.55546ZM14.4446 2.44434H14.9446V1.94434L14.4446 1.94434L14.4446 2.44434ZM14.4446 5.55545L14.4446 6.05545L14.9446 6.05545V5.55545H14.4446ZM1.55566 5.55546L1.05566 5.55545L1.05566 6.05546L1.55566 6.05546L1.55566 5.55546ZM1.5557 2.44436L1.5557 1.94436L1.05571 1.94436L1.0557 2.44435L1.5557 2.44436ZM13.1112 5.55546H12.6112V13.5555H13.1112H13.6112V5.55546H13.1112ZM2.889 13.5555H3.389L3.38901 5.55546L2.88901 5.55546L2.38901 5.55546L2.389 13.5555H2.889ZM14.4446 2.44434H13.9446V5.55545H14.4446H14.9446V2.44434H14.4446ZM1.55566 5.55546L2.05566 5.55547L2.0557 2.44436L1.5557 2.44436L1.0557 2.44435L1.05566 5.55545L1.55566 5.55546ZM6.22234 8.22213V8.72213H9.7779V8.22213V7.72213H6.22234V8.22213ZM13.1112 13.5555V13.0555H2.889V13.5555V14.0555H13.1112V13.5555ZM1.5557 2.44436L1.5557 2.94436L14.4446 2.94434L14.4446 2.44434L14.4446 1.94434L1.5557 1.94436L1.5557 2.44436ZM14.4446 5.55545L14.4446 5.05545L1.55566 5.05546L1.55566 5.55546L1.55566 6.05546L14.4446 6.05545L14.4446 5.55545Z" fill="currentColor"/>`,
115
+ },
116
+ }
117
+
118
+ const spriteID = "opencode-v2-icon-sprite"
119
+ const symbol = (name: keyof typeof icons) => `opencode-v2-icon-${name}`
120
+ let spriteInserted = false
121
+
122
+ function ensureSprite() {
123
+ if (spriteInserted) return
124
+ if (typeof document === "undefined") return
125
+ if (document.getElementById(spriteID)) {
126
+ spriteInserted = true
127
+ return
128
+ }
129
+
130
+ const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg")
131
+ svg.id = spriteID
132
+ svg.setAttribute("aria-hidden", "true")
133
+ svg.setAttribute("width", "0")
134
+ svg.setAttribute("height", "0")
135
+ svg.style.position = "absolute"
136
+ svg.style.overflow = "hidden"
137
+ svg.innerHTML = Object.entries(icons)
138
+ .map(
139
+ ([name, icon]) =>
140
+ `<symbol id="${symbol(name as keyof typeof icons)}" viewBox="${icon.viewBox}">${icon.body}</symbol>`,
141
+ )
142
+ .join("")
143
+ document.body.insertBefore(svg, document.body.firstChild)
144
+ spriteInserted = true
145
+ }
146
+
147
+ export interface IconProps extends ComponentProps<"svg"> {
148
+ name: keyof typeof icons | (string & {})
149
+ size?: "small" | "normal" | "large"
150
+ }
151
+
152
+ export function Icon(props: IconProps) {
153
+ const [split, rest] = splitProps(props, ["name", "size"])
154
+ const iconName = () => (icons[split.name as keyof typeof icons] ? (split.name as keyof typeof icons) : "plus")
155
+ const icon = () => icons[iconName()]
156
+ const pixelSize = split.size === "small" ? 14 : split.size === "large" ? 20 : 16
157
+ onMount(ensureSprite)
158
+
159
+ return (
160
+ <svg
161
+ {...rest}
162
+ data-slot="icon-svg"
163
+ width={pixelSize}
164
+ height={pixelSize}
165
+ viewBox={icon().viewBox}
166
+ fill="none"
167
+ xmlns="http://www.w3.org/2000/svg"
168
+ aria-hidden={rest["aria-hidden"] ?? "true"}
169
+ >
170
+ <use href={`#${symbol(iconName())}`} />
171
+ </svg>
172
+ )
173
+ }
@@ -0,0 +1,218 @@
1
+ [data-component="inline-input-v2"] {
2
+ box-sizing: border-box;
3
+ display: flex;
4
+ flex-direction: row;
5
+ align-items: stretch;
6
+ padding: 0;
7
+ width: 280px;
8
+ height: 28px;
9
+ border: 0;
10
+ border-radius: 6px;
11
+ outline: 1px solid transparent;
12
+ outline-offset: 0;
13
+ background:
14
+ linear-gradient(180deg, var(--v2-alpha-light-2) 0%, var(--v2-alpha-light-0) 100%), var(--v2-background-bg-base);
15
+ box-shadow: var(--v2-elevation-button-neutral);
16
+ flex: none;
17
+ align-self: stretch;
18
+ overflow: hidden;
19
+ transition:
20
+ background 85ms ease-out,
21
+ outline-color 85ms ease-out,
22
+ box-shadow 85ms ease-out;
23
+ }
24
+
25
+ [data-component="inline-input-v2"][data-appearance="large"] {
26
+ height: 32px;
27
+ }
28
+
29
+ [data-component="inline-input-v2"]:where(:hover):not([data-disabled], [data-invalid]):not(:focus-within) {
30
+ background:
31
+ linear-gradient(0deg, var(--v2-overlay-simple-overlay-hover), var(--v2-overlay-simple-overlay-hover)),
32
+ linear-gradient(180deg, var(--v2-alpha-light-2) 0%, var(--v2-alpha-light-0) 100%), var(--v2-background-bg-base);
33
+ }
34
+
35
+ [data-component="inline-input-v2"]:where(:hover):not([data-disabled], [data-invalid]):not(:focus-within)
36
+ [data-slot="inline-input-v2-prefix"] {
37
+ background: transparent;
38
+ }
39
+
40
+ [data-component="inline-input-v2"]:where(:focus-within):not([data-disabled], [data-invalid]) {
41
+ outline-color: var(--v2-border-border-focus);
42
+ box-shadow: none;
43
+ }
44
+
45
+ [data-component="inline-input-v2"]:where([data-invalid]):not([data-disabled]) {
46
+ outline-color: var(--v2-state-fg-danger);
47
+ box-shadow: none;
48
+ }
49
+
50
+ [data-component="inline-input-v2"]:where([data-disabled]) {
51
+ opacity: 0.5;
52
+ cursor: not-allowed;
53
+ }
54
+
55
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-prefix"] {
56
+ box-sizing: border-box;
57
+ display: flex;
58
+ flex-direction: column;
59
+ justify-content: center;
60
+ align-items: flex-start;
61
+ flex: none;
62
+ align-self: stretch;
63
+ width: fit-content;
64
+ min-width: 0;
65
+ max-width: 100%;
66
+ padding: 4px 8px;
67
+ gap: 4px;
68
+ background: var(--v2-background-bg-layer-01);
69
+ border-radius: 4px 0 0 4px;
70
+ transition: background 85ms ease-out;
71
+ }
72
+
73
+ [data-component="inline-input-v2"][data-label-width] [data-slot="inline-input-v2-prefix"] {
74
+ width: var(--inline-input-v2-label-width);
75
+ min-width: var(--inline-input-v2-label-width);
76
+ max-width: var(--inline-input-v2-label-width);
77
+ }
78
+
79
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-prefix-text"] {
80
+ display: block;
81
+ width: 100%;
82
+ overflow: hidden;
83
+ text-overflow: ellipsis;
84
+ white-space: nowrap;
85
+ font-style: normal;
86
+ font-weight: 440;
87
+ font-size: 13px;
88
+ line-height: 1;
89
+ letter-spacing: -0.04px;
90
+ color: var(--v2-text-text-muted);
91
+ font-variation-settings: "slnt" 0;
92
+ }
93
+
94
+ [data-component="inline-input-v2"][data-numeric] [data-slot="inline-input-v2-prefix-text"] {
95
+ font-variant-numeric: tabular-nums;
96
+ }
97
+
98
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-divider"] {
99
+ flex: none;
100
+ align-self: stretch;
101
+ width: 0.5px;
102
+ min-width: 0.5px;
103
+ background: var(--v2-border-border-base);
104
+ }
105
+
106
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-field"] {
107
+ display: flex;
108
+ flex-direction: row;
109
+ align-items: center;
110
+ align-self: stretch;
111
+ flex: 1 1 auto;
112
+ min-width: 0;
113
+ padding: 4px 8px;
114
+ gap: 8px;
115
+ }
116
+
117
+ [data-component="inline-input-v2"][data-appearance="large"] [data-slot="inline-input-v2-field"] {
118
+ padding-top: 6px;
119
+ padding-bottom: 6px;
120
+ }
121
+
122
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-value"] {
123
+ display: flex;
124
+ flex-direction: row;
125
+ align-items: center;
126
+ flex: 1 1 auto;
127
+ min-width: 0;
128
+ min-height: 0;
129
+ }
130
+
131
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-input"] {
132
+ display: block;
133
+ width: 100%;
134
+ min-width: 0;
135
+ height: 100%;
136
+ padding: 0;
137
+ margin: 0;
138
+ border: 0;
139
+ background: transparent;
140
+ outline: none;
141
+ font-style: normal;
142
+ font-weight: 440;
143
+ font-size: 13px;
144
+ line-height: 1;
145
+ letter-spacing: -0.04px;
146
+ color: var(--v2-text-text-base);
147
+ font-variation-settings: "slnt" 0;
148
+ }
149
+
150
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-input"]::placeholder {
151
+ color: var(--v2-text-text-faint);
152
+ }
153
+
154
+ [data-component="inline-input-v2"][data-numeric] [data-slot="inline-input-v2-input"] {
155
+ font-variant-numeric: tabular-nums;
156
+ }
157
+
158
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-icon-button"] {
159
+ display: flex;
160
+ flex-direction: row;
161
+ justify-content: center;
162
+ align-items: center;
163
+ flex: none;
164
+ width: 20px;
165
+ height: 20px;
166
+ padding: 2px;
167
+ gap: 3px;
168
+ border: 0;
169
+ border-radius: 4px;
170
+ background: transparent;
171
+ color: var(--v2-icon-icon-muted);
172
+ cursor: pointer;
173
+ outline: none;
174
+ }
175
+
176
+ [data-component="inline-input-v2"]
177
+ [data-slot="inline-input-v2-icon-button"]:is(:hover, [data-state="hover"]):not(:disabled) {
178
+ background-color: var(--v2-overlay-simple-overlay-hover);
179
+ }
180
+
181
+ [data-component="inline-input-v2"]
182
+ [data-slot="inline-input-v2-icon-button"]:is(:active, [data-state="pressed"]):not(:disabled) {
183
+ background-color: var(--v2-overlay-simple-overlay-pressed);
184
+ }
185
+
186
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-icon-button"]:focus {
187
+ outline: none;
188
+ }
189
+
190
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-icon-button"]:focus-visible {
191
+ outline: 2px solid var(--v2-border-border-focus);
192
+ outline-offset: 1px;
193
+ }
194
+
195
+ [data-component="inline-input-v2"]:where([data-disabled]) [data-slot="inline-input-v2-icon-button"] {
196
+ cursor: not-allowed;
197
+ pointer-events: none;
198
+ }
199
+
200
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-icon-button"] [data-slot="icon-svg"] {
201
+ display: block;
202
+ flex: none;
203
+ color: currentColor;
204
+ }
205
+
206
+ [data-component="inline-input-v2"][data-invalid]:not([data-disabled]) [data-slot="inline-input-v2-prefix-text"] {
207
+ color: var(--v2-text-text-muted);
208
+ }
209
+
210
+ [data-component="inline-input-v2"][data-invalid]:not([data-disabled]) [data-slot="inline-input-v2-input"] {
211
+ color: var(--v2-state-fg-danger);
212
+ caret-color: var(--v2-state-fg-danger);
213
+ }
214
+
215
+ [data-component="inline-input-v2"][data-invalid]:not([data-disabled]) [data-slot="inline-input-v2-input"]::placeholder {
216
+ color: var(--v2-state-fg-danger);
217
+ opacity: 1;
218
+ }
@@ -0,0 +1,90 @@
1
+ import { type ComponentProps, type JSX, Show, splitProps } from "solid-js"
2
+ import { Icon } from "./icon"
3
+ import "./inline-input-v2.css"
4
+
5
+ export interface InlineInputV2Props extends Omit<ComponentProps<"input">, "type" | "prefix"> {
6
+ /** Inline label shown before the field (prefix segment). */
7
+ prefix: JSX.Element
8
+ /** Fixed width for the prefix segment (px number or CSS length). Omit for fit-content. */
9
+ labelWidth?: number | string
10
+ /** Show the trailing copy action. */
11
+ showCopyButton?: boolean
12
+ /** Accessible label for the copy button. */
13
+ copyLabel?: string
14
+ onCopyClick?: (event: MouseEvent) => void
15
+ /** Apply tabular numerals to the prefix and field value. */
16
+ numeric?: boolean
17
+ /** Error styling for the field and value text. */
18
+ invalid?: boolean
19
+ /** `base` is 28px tall; `large` is 32px tall. */
20
+ appearance?: "base" | "large"
21
+ type?: ComponentProps<"input">["type"]
22
+ }
23
+
24
+ export function InlineInputV2(props: InlineInputV2Props) {
25
+ const [local, inputProps] = splitProps(props, [
26
+ "class",
27
+ "classList",
28
+ "prefix",
29
+ "labelWidth",
30
+ "showCopyButton",
31
+ "copyLabel",
32
+ "onCopyClick",
33
+ "numeric",
34
+ "invalid",
35
+ "appearance",
36
+ "disabled",
37
+ "style",
38
+ ])
39
+
40
+ return (
41
+ <div
42
+ data-component="inline-input-v2"
43
+ data-disabled={local.disabled ? "" : undefined}
44
+ data-invalid={local.invalid ? "" : undefined}
45
+ data-numeric={local.numeric ? "" : undefined}
46
+ data-appearance={local.appearance ?? "base"}
47
+ data-label-width={local.labelWidth != null ? "" : undefined}
48
+ classList={{
49
+ ...local.classList,
50
+ [local.class ?? ""]: !!local.class,
51
+ }}
52
+ style={{
53
+ ...(typeof local.style === "object" && local.style != null ? local.style : {}),
54
+ ...(local.labelWidth != null
55
+ ? {
56
+ "--inline-input-v2-label-width":
57
+ typeof local.labelWidth === "number" ? `${local.labelWidth}px` : local.labelWidth,
58
+ }
59
+ : {}),
60
+ }}
61
+ >
62
+ <div data-slot="inline-input-v2-prefix">
63
+ <span data-slot="inline-input-v2-prefix-text">{local.prefix}</span>
64
+ </div>
65
+ <div data-slot="inline-input-v2-divider" aria-hidden="true" />
66
+ <div data-slot="inline-input-v2-field">
67
+ <div data-slot="inline-input-v2-value">
68
+ <input
69
+ {...inputProps}
70
+ type={inputProps.type ?? "text"}
71
+ disabled={local.disabled}
72
+ aria-invalid={local.invalid ? true : undefined}
73
+ data-slot="inline-input-v2-input"
74
+ />
75
+ </div>
76
+ <Show when={local.showCopyButton}>
77
+ <button
78
+ type="button"
79
+ data-slot="inline-input-v2-icon-button"
80
+ aria-label={local.copyLabel ?? "Copy"}
81
+ disabled={local.disabled}
82
+ onClick={local.onCopyClick}
83
+ >
84
+ <Icon name="copy" />
85
+ </button>
86
+ </Show>
87
+ </div>
88
+ </div>
89
+ )
90
+ }