@neurocode-ai/ui 1.18.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +113 -0
  3. package/src/assets/audio/alert-01.aac +0 -0
  4. package/src/assets/audio/alert-01.mp3 +0 -0
  5. package/src/assets/audio/alert-02.aac +0 -0
  6. package/src/assets/audio/alert-02.mp3 +0 -0
  7. package/src/assets/audio/alert-03.aac +0 -0
  8. package/src/assets/audio/alert-03.mp3 +0 -0
  9. package/src/assets/audio/alert-04.aac +0 -0
  10. package/src/assets/audio/alert-04.mp3 +0 -0
  11. package/src/assets/audio/alert-05.aac +0 -0
  12. package/src/assets/audio/alert-05.mp3 +0 -0
  13. package/src/assets/audio/alert-06.aac +0 -0
  14. package/src/assets/audio/alert-06.mp3 +0 -0
  15. package/src/assets/audio/alert-07.aac +0 -0
  16. package/src/assets/audio/alert-07.mp3 +0 -0
  17. package/src/assets/audio/alert-08.aac +0 -0
  18. package/src/assets/audio/alert-08.mp3 +0 -0
  19. package/src/assets/audio/alert-09.aac +0 -0
  20. package/src/assets/audio/alert-09.mp3 +0 -0
  21. package/src/assets/audio/alert-10.aac +0 -0
  22. package/src/assets/audio/alert-10.mp3 +0 -0
  23. package/src/assets/audio/bip-bop-01.aac +0 -0
  24. package/src/assets/audio/bip-bop-01.mp3 +0 -0
  25. package/src/assets/audio/bip-bop-02.aac +0 -0
  26. package/src/assets/audio/bip-bop-02.mp3 +0 -0
  27. package/src/assets/audio/bip-bop-03.aac +0 -0
  28. package/src/assets/audio/bip-bop-03.mp3 +0 -0
  29. package/src/assets/audio/bip-bop-04.aac +0 -0
  30. package/src/assets/audio/bip-bop-04.mp3 +0 -0
  31. package/src/assets/audio/bip-bop-05.aac +0 -0
  32. package/src/assets/audio/bip-bop-05.mp3 +0 -0
  33. package/src/assets/audio/bip-bop-06.aac +0 -0
  34. package/src/assets/audio/bip-bop-06.mp3 +0 -0
  35. package/src/assets/audio/bip-bop-07.aac +0 -0
  36. package/src/assets/audio/bip-bop-07.mp3 +0 -0
  37. package/src/assets/audio/bip-bop-08.aac +0 -0
  38. package/src/assets/audio/bip-bop-08.mp3 +0 -0
  39. package/src/assets/audio/bip-bop-09.aac +0 -0
  40. package/src/assets/audio/bip-bop-09.mp3 +0 -0
  41. package/src/assets/audio/bip-bop-10.aac +0 -0
  42. package/src/assets/audio/bip-bop-10.mp3 +0 -0
  43. package/src/assets/audio/nope-01.aac +0 -0
  44. package/src/assets/audio/nope-01.mp3 +0 -0
  45. package/src/assets/audio/nope-02.aac +0 -0
  46. package/src/assets/audio/nope-02.mp3 +0 -0
  47. package/src/assets/audio/nope-03.aac +0 -0
  48. package/src/assets/audio/nope-03.mp3 +0 -0
  49. package/src/assets/audio/nope-04.aac +0 -0
  50. package/src/assets/audio/nope-04.mp3 +0 -0
  51. package/src/assets/audio/nope-05.aac +0 -0
  52. package/src/assets/audio/nope-05.mp3 +0 -0
  53. package/src/assets/audio/nope-06.aac +0 -0
  54. package/src/assets/audio/nope-06.mp3 +0 -0
  55. package/src/assets/audio/nope-07.aac +0 -0
  56. package/src/assets/audio/nope-07.mp3 +0 -0
  57. package/src/assets/audio/nope-08.aac +0 -0
  58. package/src/assets/audio/nope-08.mp3 +0 -0
  59. package/src/assets/audio/nope-09.aac +0 -0
  60. package/src/assets/audio/nope-09.mp3 +0 -0
  61. package/src/assets/audio/nope-10.aac +0 -0
  62. package/src/assets/audio/nope-10.mp3 +0 -0
  63. package/src/assets/audio/nope-11.aac +0 -0
  64. package/src/assets/audio/nope-11.mp3 +0 -0
  65. package/src/assets/audio/nope-12.aac +0 -0
  66. package/src/assets/audio/nope-12.mp3 +0 -0
  67. package/src/assets/audio/staplebops-01.aac +0 -0
  68. package/src/assets/audio/staplebops-01.mp3 +0 -0
  69. package/src/assets/audio/staplebops-02.aac +0 -0
  70. package/src/assets/audio/staplebops-02.mp3 +0 -0
  71. package/src/assets/audio/staplebops-03.aac +0 -0
  72. package/src/assets/audio/staplebops-03.mp3 +0 -0
  73. package/src/assets/audio/staplebops-04.aac +0 -0
  74. package/src/assets/audio/staplebops-04.mp3 +0 -0
  75. package/src/assets/audio/staplebops-05.aac +0 -0
  76. package/src/assets/audio/staplebops-05.mp3 +0 -0
  77. package/src/assets/audio/staplebops-06.aac +0 -0
  78. package/src/assets/audio/staplebops-06.mp3 +0 -0
  79. package/src/assets/audio/staplebops-07.aac +0 -0
  80. package/src/assets/audio/staplebops-07.mp3 +0 -0
  81. package/src/assets/audio/yup-01.aac +0 -0
  82. package/src/assets/audio/yup-01.mp3 +0 -0
  83. package/src/assets/audio/yup-02.aac +0 -0
  84. package/src/assets/audio/yup-02.mp3 +0 -0
  85. package/src/assets/audio/yup-03.aac +0 -0
  86. package/src/assets/audio/yup-03.mp3 +0 -0
  87. package/src/assets/audio/yup-04.aac +0 -0
  88. package/src/assets/audio/yup-04.mp3 +0 -0
  89. package/src/assets/audio/yup-05.aac +0 -0
  90. package/src/assets/audio/yup-05.mp3 +0 -0
  91. package/src/assets/audio/yup-06.aac +0 -0
  92. package/src/assets/audio/yup-06.mp3 +0 -0
  93. package/src/assets/fonts/Inter.ttf +0 -0
  94. package/src/assets/fonts/JetBrainsMonoNerdFontMono-Regular.woff2 +0 -0
  95. package/src/assets/icons/app/android-studio.svg +369 -0
  96. package/src/assets/icons/app/antigravity.svg +97 -0
  97. package/src/assets/icons/app/cursor.svg +16 -0
  98. package/src/assets/icons/app/file-explorer.svg +20 -0
  99. package/src/assets/icons/app/finder.png +0 -0
  100. package/src/assets/icons/app/ghostty.svg +13 -0
  101. package/src/assets/icons/app/iterm2.svg +13 -0
  102. package/src/assets/icons/app/powershell.svg +14 -0
  103. package/src/assets/icons/app/sublimetext.svg +17 -0
  104. package/src/assets/icons/app/terminal.png +0 -0
  105. package/src/assets/icons/app/textmate.png +0 -0
  106. package/src/assets/icons/app/vscode.svg +39 -0
  107. package/src/assets/icons/app/warp.png +0 -0
  108. package/src/assets/icons/app/xcode.png +0 -0
  109. package/src/assets/icons/app/zed-dark.svg +15 -0
  110. package/src/assets/icons/app/zed.svg +15 -0
  111. package/src/components/accordion.css +147 -0
  112. package/src/components/accordion.tsx +92 -0
  113. package/src/components/animated-number.css +75 -0
  114. package/src/components/animated-number.tsx +109 -0
  115. package/src/components/app-icon.css +5 -0
  116. package/src/components/app-icon.tsx +85 -0
  117. package/src/components/app-icons/sprite.svg +114 -0
  118. package/src/components/app-icons/types.ts +21 -0
  119. package/src/components/avatar.css +49 -0
  120. package/src/components/avatar.tsx +55 -0
  121. package/src/components/button.css +194 -0
  122. package/src/components/button.tsx +33 -0
  123. package/src/components/card.css +115 -0
  124. package/src/components/card.tsx +123 -0
  125. package/src/components/checkbox.css +131 -0
  126. package/src/components/checkbox.tsx +43 -0
  127. package/src/components/collapsible.css +154 -0
  128. package/src/components/collapsible.tsx +48 -0
  129. package/src/components/context-menu.css +134 -0
  130. package/src/components/context-menu.tsx +308 -0
  131. package/src/components/dialog.css +181 -0
  132. package/src/components/dialog.tsx +72 -0
  133. package/src/components/diff-changes.css +42 -0
  134. package/src/components/diff-changes.tsx +115 -0
  135. package/src/components/dock-surface.css +37 -0
  136. package/src/components/dock-surface.tsx +54 -0
  137. package/src/components/dropdown-menu.css +135 -0
  138. package/src/components/dropdown-menu.tsx +308 -0
  139. package/src/components/favicon.tsx +13 -0
  140. package/src/components/file-icon.css +26 -0
  141. package/src/components/file-icon.tsx +588 -0
  142. package/src/components/file-icons/sprite.svg +11707 -0
  143. package/src/components/file-icons/types.ts +1095 -0
  144. package/src/components/font.tsx +1 -0
  145. package/src/components/hover-card.css +61 -0
  146. package/src/components/hover-card.tsx +32 -0
  147. package/src/components/icon-button.css +181 -0
  148. package/src/components/icon-button.tsx +29 -0
  149. package/src/components/icon.css +34 -0
  150. package/src/components/icon.tsx +170 -0
  151. package/src/components/image-preview.css +63 -0
  152. package/src/components/image-preview.tsx +32 -0
  153. package/src/components/inline-input.css +17 -0
  154. package/src/components/inline-input.tsx +22 -0
  155. package/src/components/keybind.css +18 -0
  156. package/src/components/keybind.tsx +20 -0
  157. package/src/components/list.css +331 -0
  158. package/src/components/list.tsx +394 -0
  159. package/src/components/logo.css +4 -0
  160. package/src/components/logo.tsx +62 -0
  161. package/src/components/motion-spring.tsx +58 -0
  162. package/src/components/popover.css +98 -0
  163. package/src/components/popover.tsx +153 -0
  164. package/src/components/progress-circle.css +16 -0
  165. package/src/components/progress-circle.tsx +64 -0
  166. package/src/components/progress.css +63 -0
  167. package/src/components/progress.tsx +39 -0
  168. package/src/components/provider-icon.css +5 -0
  169. package/src/components/provider-icon.tsx +25 -0
  170. package/src/components/provider-icons/sprite.svg +1135 -0
  171. package/src/components/provider-icons/types.ts +105 -0
  172. package/src/components/radio-group.css +187 -0
  173. package/src/components/radio-group.tsx +83 -0
  174. package/src/components/resize-handle.css +58 -0
  175. package/src/components/resize-handle.tsx +98 -0
  176. package/src/components/scroll-view.css +67 -0
  177. package/src/components/scroll-view.tsx +388 -0
  178. package/src/components/select.css +199 -0
  179. package/src/components/select.tsx +174 -0
  180. package/src/components/spinner.css +6 -0
  181. package/src/components/spinner.tsx +52 -0
  182. package/src/components/sticky-accordion-header.css +6 -0
  183. package/src/components/sticky-accordion-header.tsx +18 -0
  184. package/src/components/switch.css +132 -0
  185. package/src/components/switch.tsx +29 -0
  186. package/src/components/tabs.css +861 -0
  187. package/src/components/tabs.tsx +125 -0
  188. package/src/components/tag.css +37 -0
  189. package/src/components/tag.tsx +22 -0
  190. package/src/components/text-field.css +134 -0
  191. package/src/components/text-field.tsx +128 -0
  192. package/src/components/text-reveal.css +150 -0
  193. package/src/components/text-reveal.tsx +143 -0
  194. package/src/components/text-shimmer.css +119 -0
  195. package/src/components/text-shimmer.tsx +62 -0
  196. package/src/components/text-strikethrough.css +27 -0
  197. package/src/components/text-strikethrough.tsx +84 -0
  198. package/src/components/toast.css +236 -0
  199. package/src/components/toast.tsx +185 -0
  200. package/src/components/tooltip.css +74 -0
  201. package/src/components/tooltip.tsx +163 -0
  202. package/src/components/typewriter.css +14 -0
  203. package/src/components/typewriter.tsx +55 -0
  204. package/src/context/dialog.tsx +197 -0
  205. package/src/context/file.tsx +10 -0
  206. package/src/context/helper.tsx +38 -0
  207. package/src/context/i18n.tsx +38 -0
  208. package/src/context/index.ts +4 -0
  209. package/src/context/marked-code-span.ts +17 -0
  210. package/src/context/marked.tsx +570 -0
  211. package/src/context/worker-pool.tsx +20 -0
  212. package/src/custom-elements.d.ts +17 -0
  213. package/src/hooks/create-auto-scroll.tsx +237 -0
  214. package/src/hooks/index.ts +2 -0
  215. package/src/hooks/use-filtered-list.tsx +134 -0
  216. package/src/i18n/ar.ts +193 -0
  217. package/src/i18n/br.ts +193 -0
  218. package/src/i18n/bs.ts +197 -0
  219. package/src/i18n/da.ts +192 -0
  220. package/src/i18n/de.ts +199 -0
  221. package/src/i18n/en.ts +196 -0
  222. package/src/i18n/es.ts +193 -0
  223. package/src/i18n/fr.ts +193 -0
  224. package/src/i18n/ja.ts +192 -0
  225. package/src/i18n/ko.ts +194 -0
  226. package/src/i18n/no.ts +197 -0
  227. package/src/i18n/pl.ts +192 -0
  228. package/src/i18n/ru.ts +192 -0
  229. package/src/i18n/th.ts +194 -0
  230. package/src/i18n/tr.ts +199 -0
  231. package/src/i18n/uk.ts +196 -0
  232. package/src/i18n/zh.ts +196 -0
  233. package/src/i18n/zht.ts +196 -0
  234. package/src/storybook/fixtures.ts +51 -0
  235. package/src/storybook/scaffold.tsx +62 -0
  236. package/src/styles/animations.css +141 -0
  237. package/src/styles/base.css +404 -0
  238. package/src/styles/colors.css +772 -0
  239. package/src/styles/index.css +53 -0
  240. package/src/styles/tailwind/colors.css +286 -0
  241. package/src/styles/tailwind/index.css +78 -0
  242. package/src/styles/tailwind/utilities.css +131 -0
  243. package/src/styles/theme.css +631 -0
  244. package/src/styles/utilities.css +118 -0
  245. package/src/theme/color.ts +299 -0
  246. package/src/theme/context.tsx +373 -0
  247. package/src/theme/default-themes.ts +116 -0
  248. package/src/theme/index.ts +78 -0
  249. package/src/theme/loader.ts +112 -0
  250. package/src/theme/resolve.ts +540 -0
  251. package/src/theme/themes/amoled.json +49 -0
  252. package/src/theme/themes/aura.json +51 -0
  253. package/src/theme/themes/ayu.json +51 -0
  254. package/src/theme/themes/carbonfox.json +53 -0
  255. package/src/theme/themes/catppuccin-frappe.json +85 -0
  256. package/src/theme/themes/catppuccin-macchiato.json +85 -0
  257. package/src/theme/themes/catppuccin.json +45 -0
  258. package/src/theme/themes/cobalt2.json +87 -0
  259. package/src/theme/themes/cursor.json +91 -0
  260. package/src/theme/themes/dracula.json +49 -0
  261. package/src/theme/themes/everforest.json +89 -0
  262. package/src/theme/themes/flexoki.json +86 -0
  263. package/src/theme/themes/github.json +85 -0
  264. package/src/theme/themes/gruvbox.json +45 -0
  265. package/src/theme/themes/kanagawa.json +89 -0
  266. package/src/theme/themes/lucent-orng.json +87 -0
  267. package/src/theme/themes/material.json +87 -0
  268. package/src/theme/themes/matrix.json +113 -0
  269. package/src/theme/themes/mercury.json +86 -0
  270. package/src/theme/themes/monokai.json +49 -0
  271. package/src/theme/themes/nightowl.json +46 -0
  272. package/src/theme/themes/nord.json +46 -0
  273. package/src/theme/themes/oc-2.json +474 -0
  274. package/src/theme/themes/one-dark.json +89 -0
  275. package/src/theme/themes/onedarkpro.json +45 -0
  276. package/src/theme/themes/opencode.json +89 -0
  277. package/src/theme/themes/orng.json +87 -0
  278. package/src/theme/themes/osaka-jade.json +88 -0
  279. package/src/theme/themes/palenight.json +85 -0
  280. package/src/theme/themes/rosepine.json +85 -0
  281. package/src/theme/themes/shadesofpurple.json +51 -0
  282. package/src/theme/themes/solarized.json +49 -0
  283. package/src/theme/themes/synthwave84.json +87 -0
  284. package/src/theme/themes/tokyonight.json +47 -0
  285. package/src/theme/themes/vercel.json +90 -0
  286. package/src/theme/themes/vesper.json +51 -0
  287. package/src/theme/themes/zenburn.json +87 -0
  288. package/src/theme/types.ts +75 -0
  289. package/src/theme/v2/avatar.ts +48 -0
  290. package/src/theme/v2/default-primitives.ts +114 -0
  291. package/src/theme/v2/foreground.ts +60 -0
  292. package/src/theme/v2/mapping.ts +170 -0
  293. package/src/theme/v2/resolve.ts +153 -0
  294. package/src/v2/components/accordion-v2.css +139 -0
  295. package/src/v2/components/accordion-v2.tsx +86 -0
  296. package/src/v2/components/avatar-v2.css +70 -0
  297. package/src/v2/components/avatar-v2.tsx +59 -0
  298. package/src/v2/components/badge-v2.css +33 -0
  299. package/src/v2/components/badge-v2.tsx +23 -0
  300. package/src/v2/components/button-v2.css +262 -0
  301. package/src/v2/components/button-v2.tsx +35 -0
  302. package/src/v2/components/checkbox-v2.css +184 -0
  303. package/src/v2/components/checkbox-v2.tsx +65 -0
  304. package/src/v2/components/dialog-v2.css +177 -0
  305. package/src/v2/components/dialog-v2.tsx +115 -0
  306. package/src/v2/components/diff-changes-v2.css +24 -0
  307. package/src/v2/components/diff-changes-v2.tsx +28 -0
  308. package/src/v2/components/divider-v2.css +11 -0
  309. package/src/v2/components/divider-v2.tsx +20 -0
  310. package/src/v2/components/field-v2.css +94 -0
  311. package/src/v2/components/field-v2.tsx +265 -0
  312. package/src/v2/components/file-tree-v2.css +137 -0
  313. package/src/v2/components/icon-button-v2.css +159 -0
  314. package/src/v2/components/icon-button-v2.tsx +37 -0
  315. package/src/v2/components/icon.tsx +209 -0
  316. package/src/v2/components/inline-input-v2.css +225 -0
  317. package/src/v2/components/inline-input-v2.tsx +105 -0
  318. package/src/v2/components/keybind-v2.css +76 -0
  319. package/src/v2/components/keybind-v2.tsx +30 -0
  320. package/src/v2/components/line-comment-v2.css +258 -0
  321. package/src/v2/components/line-comment-v2.tsx +304 -0
  322. package/src/v2/components/loader-v2.css +32 -0
  323. package/src/v2/components/loader-v2.tsx +31 -0
  324. package/src/v2/components/menu-v2.css +190 -0
  325. package/src/v2/components/menu-v2.tsx +225 -0
  326. package/src/v2/components/progress-circle-v2.css +13 -0
  327. package/src/v2/components/progress-circle-v2.tsx +52 -0
  328. package/src/v2/components/project-avatar-v2.css +132 -0
  329. package/src/v2/components/project-avatar-v2.tsx +66 -0
  330. package/src/v2/components/radio-v2.css +202 -0
  331. package/src/v2/components/radio-v2.tsx +72 -0
  332. package/src/v2/components/segmented-control-v2.css +80 -0
  333. package/src/v2/components/segmented-control-v2.tsx +208 -0
  334. package/src/v2/components/select-v2.css +286 -0
  335. package/src/v2/components/select-v2.tsx +208 -0
  336. package/src/v2/components/split-button-v2.css +99 -0
  337. package/src/v2/components/split-button-v2.tsx +48 -0
  338. package/src/v2/components/switch-v2.css +154 -0
  339. package/src/v2/components/switch-v2.tsx +28 -0
  340. package/src/v2/components/tab-state-indicator.tsx +37 -0
  341. package/src/v2/components/tabs-v2.css +226 -0
  342. package/src/v2/components/tabs-v2.tsx +147 -0
  343. package/src/v2/components/text-input-v2.css +179 -0
  344. package/src/v2/components/text-input-v2.tsx +93 -0
  345. package/src/v2/components/text-shimmer-v2.css +125 -0
  346. package/src/v2/components/text-shimmer-v2.tsx +63 -0
  347. package/src/v2/components/textarea-v2.css +78 -0
  348. package/src/v2/components/textarea-v2.tsx +31 -0
  349. package/src/v2/components/toast-v2.css +215 -0
  350. package/src/v2/components/toast-v2.tsx +146 -0
  351. package/src/v2/components/tooltip-v2.css +69 -0
  352. package/src/v2/components/tooltip-v2.tsx +147 -0
  353. package/src/v2/components/wordmark-v2.tsx +71 -0
  354. package/src/v2/styles/colors.css +172 -0
  355. package/src/v2/styles/tailwind.css +2 -0
  356. package/src/v2/styles/theme.css +503 -0
@@ -0,0 +1,209 @@
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
+ collapse: {
61
+ viewBox: "0 0 16 16",
62
+ body: `<path d="M8 1V6M11 3L8 6L5 3" stroke="currentColor"/><path d="M8 15V10M11 13L8 10L5 13" stroke="currentColor"/><path d="M4 8H6" stroke="currentColor"/><path d="M7 8H9" stroke="currentColor"/><path d="M10 8H12" stroke="currentColor"/>`,
63
+ },
64
+ check: {
65
+ viewBox: "0 0 16 16",
66
+ body: `<path d="M3.53613 8.17857L6.39328 11.75L12.4647 4.25" stroke="currentColor"/>`,
67
+ },
68
+ monitor: {
69
+ viewBox: "0 0 16 16",
70
+ 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"/>`,
71
+ },
72
+ "workspace-new": {
73
+ viewBox: "0 0 16 16",
74
+ 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"/>`,
75
+ },
76
+ "workspace-isolated": {
77
+ viewBox: "0 0 16 16",
78
+ 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"/>`,
79
+ },
80
+ workspace: {
81
+ viewBox: "0 0 16 16",
82
+ 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"/>`,
83
+ },
84
+ close: {
85
+ viewBox: "0 0 20 20",
86
+ body: `<path d="M14.4446 5.55566L5.55566 14.4446M5.55566 5.55566L14.4446 14.4446" stroke="currentColor" stroke-linejoin="round"/>`,
87
+ },
88
+ "xmark-small": {
89
+ viewBox: "0 0 16 16",
90
+ body: `<path d="M4.25 11.75L11.75 4.25M11.75 11.75L4.25 4.25" stroke="currentColor"/>`,
91
+ },
92
+ "outline-xmark": {
93
+ viewBox: "0 0 16 16",
94
+ body: `<path fill-rule="evenodd" clip-rule="evenodd" d="M4.99487 5.70186L7.29297 7.99995L4.99487 10.2981L5.70198 11.0052L8.00008 8.70706L10.2982 11.0052L11.0053 10.2981L8.70718 7.99995L11.0053 5.70186L10.2982 4.99475L8.00008 7.29285L5.70198 4.99475L4.99487 5.70186Z" fill="currentColor"/>`,
95
+ },
96
+ "outline-chevron-down": {
97
+ viewBox: "0 0 16 16",
98
+ body: `<path d="M5 6.5L8 9.5L11 6.5" stroke="currentColor"/>`,
99
+ },
100
+ "outline-dots": {
101
+ viewBox: "0 0 16 16",
102
+ 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"/>`,
103
+ },
104
+ expand: {
105
+ viewBox: "0 0 16 16",
106
+ body: `<path d="M8.25 6.17773V1.17773M11.25 4.17773L8.25 1.17773L5.25 4.17773" stroke="currentColor"/><path d="M8.25 9.17773V14.1777M11.25 11.1777L8.25 14.1777L5.25 11.1777" stroke="currentColor"/><path d="M4.25 7.67773H12.25" stroke="currentColor"/>`,
107
+ },
108
+ filetree: {
109
+ viewBox: "0 0 16 16",
110
+ body: `<path d="M2.5 1.5V12.2484H6.75M2.5 4.74838H6.75" stroke="currentColor"/><rect x="8.5" y="3.2168" width="6" height="3" fill="none" stroke="currentColor"/><rect x="8.5" y="10.75" width="6" height="3" fill="none" stroke="currentColor"/>`,
111
+ },
112
+ split: {
113
+ viewBox: "0 0 16 16",
114
+ body: `<path d="M1 14H15L15 2H1V14Z" stroke="currentColor"/><rect x="3" y="4" width="4" height="8" fill="currentColor" fill-opacity="0.5"/><rect x="9" y="4" width="4" height="8" fill="currentColor" fill-opacity="0.5"/>`,
115
+ },
116
+ unified: {
117
+ viewBox: "0 0 16 16",
118
+ body: `<path d="M3.00001 4.00045L12.9998 4L13 6.99955L3 7L3.00001 4.00045Z" fill="currentColor" fill-opacity="0.5"/><path d="M3.0001 9H13L12.9999 12H3L3.0001 9Z" fill="currentColor" fill-opacity="0.5"/><path d="M1 14H15L15 2H1V14Z" stroke="currentColor"/>`,
119
+ },
120
+ review: {
121
+ viewBox: "0 0 20 20",
122
+ body: `<path d="M7 14.5H13M7 7.99512H10.0049M10.0049 7.99512H13M10.0049 7.99512V5M10.0049 7.99512V11M18 18V2L2 2L2 18H18Z" stroke="currentColor"/>`,
123
+ },
124
+ "outline-sliders": {
125
+ viewBox: "0 0 16 16",
126
+ 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"/>`,
127
+ },
128
+ "outline-copy": {
129
+ viewBox: "0 0 16 16",
130
+ body: `<path d="M4.14908 11.0081H1.76282V1.51758H9.1038V2.55588M14.2225 4.99681H6.75397V14.4873H14.2225V4.99681Z" stroke="currentColor"/>`,
131
+ },
132
+ "outline-square-arrow": {
133
+ viewBox: "0 0 16 16",
134
+ 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"/>`,
135
+ },
136
+ "outline-share": {
137
+ viewBox: "0 0 16 16",
138
+ body: `<path d="M13.5554 10.4445V13.5556C13.5554 13.5556 12.7599 13.5556 11.7777 13.5556H4.22211C3.23989 13.5556 2.44434 13.5556 2.44434 13.5556V10.4445M4.88878 5.55557L7.99989 2.44446L11.111 5.55557M7.99989 2.44446L7.99989 9.11112" stroke="currentColor"/>`,
139
+ },
140
+ reset: {
141
+ viewBox: "0 0 20 20",
142
+ body: `<path d="M5.83333 4.16406L2.5 7.4974L5.83333 10.8307M3.33333 7.4974H17.9167V15.4141H10" stroke="currentColor" stroke-linecap="square"/>`,
143
+ },
144
+ "outline-reset": {
145
+ viewBox: "0 0 20 20",
146
+ body: `<path d="M5.83333 4.16406L2.5 7.4974L5.83333 10.8307M3.33333 7.4974H17.9167V15.4141H10" stroke="currentColor" stroke-linecap="square"/>`,
147
+ },
148
+ archive: {
149
+ viewBox: "0 0 16 16",
150
+ 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"/>`,
151
+ },
152
+ }
153
+
154
+ const spriteID = "opencode-v2-icon-sprite"
155
+ const symbol = (name: keyof typeof icons) => `opencode-v2-icon-${name}`
156
+ let spriteInserted = false
157
+
158
+ function ensureSprite() {
159
+ if (spriteInserted) return
160
+ if (typeof document === "undefined") return
161
+ if (document.getElementById(spriteID)) {
162
+ spriteInserted = true
163
+ return
164
+ }
165
+
166
+ const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg")
167
+ svg.id = spriteID
168
+ svg.setAttribute("aria-hidden", "true")
169
+ svg.setAttribute("width", "0")
170
+ svg.setAttribute("height", "0")
171
+ svg.style.position = "absolute"
172
+ svg.style.overflow = "hidden"
173
+ svg.innerHTML = Object.entries(icons)
174
+ .map(
175
+ ([name, icon]) =>
176
+ `<symbol id="${symbol(name as keyof typeof icons)}" viewBox="${icon.viewBox}">${icon.body}</symbol>`,
177
+ )
178
+ .join("")
179
+ document.body.insertBefore(svg, document.body.firstChild)
180
+ spriteInserted = true
181
+ }
182
+
183
+ export interface IconProps extends ComponentProps<"svg"> {
184
+ name: keyof typeof icons | (string & {})
185
+ size?: "small" | "normal" | "large"
186
+ }
187
+
188
+ export function Icon(props: IconProps) {
189
+ const [split, rest] = splitProps(props, ["name", "size"])
190
+ const iconName = () => (icons[split.name as keyof typeof icons] ? (split.name as keyof typeof icons) : "plus")
191
+ const icon = () => icons[iconName()]
192
+ const pixelSize = split.size === "small" ? 14 : split.size === "large" ? 20 : 16
193
+ onMount(ensureSprite)
194
+
195
+ return (
196
+ <svg
197
+ {...rest}
198
+ data-slot="icon-svg"
199
+ width={pixelSize}
200
+ height={pixelSize}
201
+ viewBox={icon().viewBox}
202
+ fill="none"
203
+ xmlns="http://www.w3.org/2000/svg"
204
+ aria-hidden={rest["aria-hidden"] ?? "true"}
205
+ >
206
+ <use href={`#${symbol(iconName())}`} />
207
+ </svg>
208
+ )
209
+ }
@@ -0,0 +1,225 @@
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
+ cursor: default;
71
+ transition: background 85ms ease-out;
72
+ }
73
+
74
+ [data-component="inline-input-v2"]:where([data-disabled]) [data-slot="inline-input-v2-prefix"] {
75
+ cursor: not-allowed;
76
+ }
77
+
78
+ [data-component="inline-input-v2"][data-label-width] [data-slot="inline-input-v2-prefix"] {
79
+ width: var(--inline-input-v2-label-width);
80
+ min-width: var(--inline-input-v2-label-width);
81
+ max-width: var(--inline-input-v2-label-width);
82
+ }
83
+
84
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-prefix-text"] {
85
+ display: block;
86
+ width: 100%;
87
+ overflow: hidden;
88
+ text-overflow: ellipsis;
89
+ white-space: nowrap;
90
+ font-style: normal;
91
+ font-weight: 440;
92
+ font-size: 13px;
93
+ line-height: 1;
94
+ letter-spacing: -0.04px;
95
+ color: var(--v2-text-text-muted);
96
+ font-variation-settings: "slnt" 0;
97
+ user-select: none;
98
+ }
99
+
100
+ [data-component="inline-input-v2"][data-numeric] [data-slot="inline-input-v2-prefix-text"] {
101
+ font-variant-numeric: tabular-nums;
102
+ }
103
+
104
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-divider"] {
105
+ flex: none;
106
+ align-self: stretch;
107
+ width: 0.5px;
108
+ min-width: 0.5px;
109
+ background: var(--v2-border-border-base);
110
+ }
111
+
112
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-field"] {
113
+ display: flex;
114
+ flex-direction: row;
115
+ align-items: center;
116
+ align-self: stretch;
117
+ flex: 1 1 auto;
118
+ min-width: 0;
119
+ padding: 4px 8px;
120
+ gap: 8px;
121
+ }
122
+
123
+ [data-component="inline-input-v2"][data-appearance="large"] [data-slot="inline-input-v2-field"] {
124
+ padding-top: 6px;
125
+ padding-bottom: 6px;
126
+ }
127
+
128
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-value"] {
129
+ display: flex;
130
+ flex-direction: row;
131
+ align-items: center;
132
+ flex: 1 1 auto;
133
+ min-width: 0;
134
+ min-height: 0;
135
+ }
136
+
137
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-input"] {
138
+ display: block;
139
+ width: 100%;
140
+ min-width: 0;
141
+ height: 100%;
142
+ padding: 0;
143
+ margin: 0;
144
+ border: 0;
145
+ background: transparent;
146
+ outline: none;
147
+ font-style: normal;
148
+ font-weight: 440;
149
+ font-size: 13px;
150
+ line-height: 1;
151
+ letter-spacing: -0.04px;
152
+ color: var(--v2-text-text-base);
153
+ font-variation-settings: "slnt" 0;
154
+ }
155
+
156
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-input"]::placeholder {
157
+ color: var(--v2-text-text-faint);
158
+ user-select: none;
159
+ }
160
+
161
+ [data-component="inline-input-v2"][data-numeric] [data-slot="inline-input-v2-input"] {
162
+ font-variant-numeric: tabular-nums;
163
+ }
164
+
165
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-icon-button"] {
166
+ display: flex;
167
+ flex-direction: row;
168
+ justify-content: center;
169
+ align-items: center;
170
+ flex: none;
171
+ width: 20px;
172
+ height: 20px;
173
+ padding: 2px;
174
+ gap: 3px;
175
+ border: 0;
176
+ border-radius: 4px;
177
+ background: transparent;
178
+ color: var(--v2-icon-icon-muted);
179
+ cursor: pointer;
180
+ outline: none;
181
+ }
182
+
183
+ [data-component="inline-input-v2"]
184
+ [data-slot="inline-input-v2-icon-button"]:is(:hover, [data-state="hover"]):not(:disabled) {
185
+ background-color: var(--v2-overlay-simple-overlay-hover);
186
+ }
187
+
188
+ [data-component="inline-input-v2"]
189
+ [data-slot="inline-input-v2-icon-button"]:is(:active, [data-state="pressed"]):not(:disabled) {
190
+ background-color: var(--v2-overlay-simple-overlay-pressed);
191
+ }
192
+
193
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-icon-button"]:focus {
194
+ outline: none;
195
+ }
196
+
197
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-icon-button"]:focus-visible {
198
+ outline: 2px solid var(--v2-border-border-focus);
199
+ outline-offset: 1px;
200
+ }
201
+
202
+ [data-component="inline-input-v2"]:where([data-disabled]) [data-slot="inline-input-v2-icon-button"] {
203
+ cursor: not-allowed;
204
+ pointer-events: none;
205
+ }
206
+
207
+ [data-component="inline-input-v2"] [data-slot="inline-input-v2-icon-button"] [data-slot="icon-svg"] {
208
+ display: block;
209
+ flex: none;
210
+ color: currentColor;
211
+ }
212
+
213
+ [data-component="inline-input-v2"][data-invalid]:not([data-disabled]) [data-slot="inline-input-v2-prefix-text"] {
214
+ color: var(--v2-text-text-muted);
215
+ }
216
+
217
+ [data-component="inline-input-v2"][data-invalid]:not([data-disabled]) [data-slot="inline-input-v2-input"] {
218
+ color: var(--v2-state-fg-danger);
219
+ caret-color: var(--v2-state-fg-danger);
220
+ }
221
+
222
+ [data-component="inline-input-v2"][data-invalid]:not([data-disabled]) [data-slot="inline-input-v2-input"]::placeholder {
223
+ color: var(--v2-state-fg-danger);
224
+ opacity: 1;
225
+ }
@@ -0,0 +1,105 @@
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
+ let input: HTMLInputElement | undefined
41
+
42
+ return (
43
+ <div
44
+ data-component="inline-input-v2"
45
+ data-disabled={local.disabled ? "" : undefined}
46
+ data-invalid={local.invalid ? "" : undefined}
47
+ data-numeric={local.numeric ? "" : undefined}
48
+ data-appearance={local.appearance ?? "base"}
49
+ data-label-width={local.labelWidth != null ? "" : undefined}
50
+ classList={{
51
+ ...local.classList,
52
+ [local.class ?? ""]: !!local.class,
53
+ }}
54
+ style={{
55
+ ...(typeof local.style === "object" && local.style != null ? local.style : {}),
56
+ ...(local.labelWidth != null
57
+ ? {
58
+ "--inline-input-v2-label-width":
59
+ typeof local.labelWidth === "number" ? `${local.labelWidth}px` : local.labelWidth,
60
+ }
61
+ : {}),
62
+ }}
63
+ >
64
+ <div
65
+ data-slot="inline-input-v2-prefix"
66
+ onMouseDown={(event) => {
67
+ if (local.disabled || event.button !== 0) return
68
+ // Keep focus on the input without using a native <label>, so external labels still work.
69
+ event.preventDefault()
70
+ input?.focus()
71
+ }}
72
+ >
73
+ <span data-slot="inline-input-v2-prefix-text">{local.prefix}</span>
74
+ </div>
75
+ <div data-slot="inline-input-v2-divider" aria-hidden="true" />
76
+ <div data-slot="inline-input-v2-field">
77
+ <div data-slot="inline-input-v2-value">
78
+ <input
79
+ {...inputProps}
80
+ ref={(el) => {
81
+ input = el
82
+ const ref = inputProps.ref
83
+ if (typeof ref === "function") ref(el)
84
+ }}
85
+ type={inputProps.type ?? "text"}
86
+ disabled={local.disabled}
87
+ aria-invalid={local.invalid ? true : undefined}
88
+ data-slot="inline-input-v2-input"
89
+ />
90
+ </div>
91
+ <Show when={local.showCopyButton}>
92
+ <button
93
+ type="button"
94
+ data-slot="inline-input-v2-icon-button"
95
+ aria-label={local.copyLabel ?? "Copy"}
96
+ disabled={local.disabled}
97
+ onClick={local.onCopyClick}
98
+ >
99
+ <Icon name="copy" />
100
+ </button>
101
+ </Show>
102
+ </div>
103
+ </div>
104
+ )
105
+ }
@@ -0,0 +1,76 @@
1
+ * {
2
+ -webkit-font-smoothing: antialiased;
3
+ -moz-osx-font-smoothing: grayscale;
4
+ text-rendering: geometricPrecision;
5
+ }
6
+
7
+ [data-component="keybind-v2"] {
8
+ box-sizing: border-box;
9
+ font-variant-numeric: tabular-nums;
10
+ display: inline-flex;
11
+ flex-direction: row;
12
+ align-items: center;
13
+ padding: 0;
14
+ gap: 2px;
15
+ flex-shrink: 0;
16
+ }
17
+
18
+ [data-component="keybind-v2"] *,
19
+ [data-component="keybind-v2"] *::before,
20
+ [data-component="keybind-v2"] *::after {
21
+ box-sizing: border-box;
22
+ }
23
+
24
+ [data-component="keybind-v2"] [data-slot="keybind-v2-key"] {
25
+ display: flex;
26
+ flex-direction: row;
27
+ justify-content: center;
28
+ align-items: center;
29
+ padding: 0;
30
+ gap: 4px;
31
+ min-width: 14px;
32
+ height: 14px;
33
+ border-radius: 2px;
34
+ flex: none;
35
+ flex-grow: 0;
36
+ }
37
+
38
+ [data-component="keybind-v2"][data-variant="neutral"] [data-slot="keybind-v2-key"] {
39
+ background: var(--v2-background-bg-layer-03);
40
+ }
41
+
42
+ [data-component="keybind-v2"][data-variant="ghost"] [data-slot="keybind-v2-key"] {
43
+ background: transparent;
44
+ }
45
+
46
+ [data-component="keybind-v2"] [data-slot="keybind-v2-label"] {
47
+ display: flex;
48
+ flex-direction: row;
49
+ justify-content: center;
50
+ align-items: center;
51
+ min-width: 14px;
52
+ height: 11px;
53
+ padding: 0;
54
+ flex: none;
55
+ font-style: normal;
56
+ font-weight: 530;
57
+ font-size: 11px;
58
+ line-height: 1;
59
+ text-align: center;
60
+ letter-spacing: 0.05px;
61
+ text-transform: uppercase;
62
+ font-variant-numeric: tabular-nums;
63
+ font-feature-settings:
64
+ "tnum" on,
65
+ "lnum" on;
66
+ font-variation-settings: "slnt" 0;
67
+ user-select: none;
68
+ }
69
+
70
+ [data-component="keybind-v2"][data-variant="neutral"] [data-slot="keybind-v2-label"] {
71
+ color: var(--v2-text-text-muted);
72
+ }
73
+
74
+ [data-component="keybind-v2"][data-variant="ghost"] [data-slot="keybind-v2-label"] {
75
+ color: var(--v2-text-text-faint);
76
+ }
@@ -0,0 +1,30 @@
1
+ import { type ComponentProps, For, splitProps } from "solid-js"
2
+ import "./keybind-v2.css"
3
+
4
+ export interface KeybindV2Props extends ComponentProps<"div"> {
5
+ keys: string[]
6
+ variant?: "neutral" | "ghost"
7
+ }
8
+
9
+ export function KeybindV2(props: KeybindV2Props) {
10
+ const [local, rest] = splitProps(props, ["keys", "variant", "class", "classList"])
11
+ return (
12
+ <div
13
+ {...rest}
14
+ data-component="keybind-v2"
15
+ data-variant={local.variant || "neutral"}
16
+ classList={{
17
+ ...local.classList,
18
+ [local.class ?? ""]: !!local.class,
19
+ }}
20
+ >
21
+ <For each={local.keys}>
22
+ {(key) => (
23
+ <div data-slot="keybind-v2-key">
24
+ <span data-slot="keybind-v2-label">{key}</span>
25
+ </div>
26
+ )}
27
+ </For>
28
+ </div>
29
+ )
30
+ }