@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,190 @@
1
+ /* Above modal dialogs (z-index 50); matches select-v2-content. */
2
+ [data-popper-positioner]:has([data-component="menu-v2-content"]) {
3
+ z-index: 60;
4
+ }
5
+
6
+ [data-component="menu-v2-content"] {
7
+ box-sizing: border-box;
8
+ display: flex;
9
+ flex-direction: column;
10
+ align-items: stretch;
11
+ padding: 2px;
12
+ min-width: 160px;
13
+ z-index: 60;
14
+ pointer-events: auto;
15
+
16
+ background: var(--v2-background-bg-layer-01);
17
+ border-radius: 6px;
18
+ box-shadow: var(--v2-elevation-floating);
19
+
20
+ outline: none;
21
+
22
+ -webkit-font-smoothing: antialiased;
23
+ -moz-osx-font-smoothing: grayscale;
24
+ text-rendering: geometricPrecision;
25
+
26
+ transform-origin: var(--kb-menu-content-transform-origin);
27
+ animation: menu-v2-in 120ms ease-out;
28
+
29
+ &:focus-visible {
30
+ outline: none;
31
+ }
32
+ }
33
+
34
+ [data-component="menu-v2-item"] {
35
+ --menu-v2-fg: var(--v2-text-text-base);
36
+ --menu-v2-fg-muted: var(--v2-text-text-faint);
37
+ --menu-v2-fg-subtle: var(--v2-text-text-muted);
38
+ --menu-v2-icon: var(--v2-icon-icon-base);
39
+ --menu-v2-accent: var(--v2-text-text-accent);
40
+ --menu-v2-badge-bg: var(--v2-background-bg-layer-02);
41
+ --menu-v2-badge-border: var(--v2-border-border-base);
42
+ --menu-v2-hover: var(--v2-overlay-simple-overlay-hover);
43
+
44
+ -webkit-font-smoothing: antialiased;
45
+ -moz-osx-font-smoothing: grayscale;
46
+ text-rendering: geometricPrecision;
47
+
48
+ box-sizing: border-box;
49
+ display: flex;
50
+ flex-direction: row;
51
+ align-items: center;
52
+ gap: 8px;
53
+ height: 28px;
54
+ padding: 0 12px;
55
+ background: transparent;
56
+ border-radius: 4px;
57
+ outline: none;
58
+ cursor: default;
59
+ user-select: none;
60
+
61
+ font-variation-settings: "slnt" 0;
62
+ font-variant-numeric: tabular-nums;
63
+ color: var(--menu-v2-fg);
64
+
65
+ [data-slot="menu-v2-item-content"] {
66
+ display: flex;
67
+ flex: 1 1 auto;
68
+ flex-direction: row;
69
+ align-items: center;
70
+ gap: 8px;
71
+ min-width: 0;
72
+
73
+ font-size: 13px;
74
+ font-weight: 440;
75
+ line-height: 100%;
76
+ letter-spacing: -0.04px;
77
+ color: var(--menu-v2-fg);
78
+ }
79
+
80
+ [data-slot="menu-v2-item-shortcut"] {
81
+ display: inline-flex;
82
+ align-items: center;
83
+ flex: none;
84
+ height: 11px;
85
+
86
+ font-size: 11px;
87
+ font-weight: 530;
88
+ line-height: 100%;
89
+ letter-spacing: 0.05px;
90
+ color: var(--menu-v2-fg-muted);
91
+ white-space: nowrap;
92
+ }
93
+
94
+ [data-slot="menu-v2-item-badge"] {
95
+ box-sizing: border-box;
96
+ display: inline-flex;
97
+ flex-direction: row;
98
+ align-items: center;
99
+ justify-content: center;
100
+ flex: none;
101
+ gap: 4px;
102
+ height: 16px;
103
+ padding: 0 4px;
104
+
105
+ background: var(--menu-v2-badge-bg);
106
+ border: 0.5px solid var(--menu-v2-badge-border);
107
+ border-radius: 2px;
108
+
109
+ font-size: 11px;
110
+ font-weight: 530;
111
+ line-height: 100%;
112
+ letter-spacing: 0.05px;
113
+ color: var(--menu-v2-fg-subtle);
114
+ white-space: nowrap;
115
+ }
116
+
117
+ [data-slot="menu-v2-item-indicator"] {
118
+ display: inline-flex;
119
+ align-items: center;
120
+ justify-content: center;
121
+ flex: none;
122
+ width: 16px;
123
+ height: 16px;
124
+ color: var(--menu-v2-icon);
125
+ }
126
+
127
+ [data-slot="menu-v2-item-indicator"]:not([data-checked]) > svg {
128
+ visibility: hidden;
129
+ }
130
+
131
+ [data-slot="menu-v2-item-chevron"] {
132
+ flex: none;
133
+ width: 16px;
134
+ height: 16px;
135
+ color: var(--menu-v2-fg-muted);
136
+ }
137
+
138
+ &[data-highlighted] {
139
+ background: var(--menu-v2-hover);
140
+ }
141
+
142
+ &[data-checked] [data-slot="menu-v2-item-content"] {
143
+ font-weight: 530;
144
+ color: var(--menu-v2-accent);
145
+ }
146
+
147
+ &[data-checked] [data-slot="menu-v2-item-indicator"] {
148
+ color: var(--menu-v2-accent);
149
+ }
150
+
151
+ &[data-disabled] {
152
+ pointer-events: none;
153
+ opacity: 0.5;
154
+ }
155
+ }
156
+
157
+ [data-slot="menu-v2-separator"] {
158
+ height: 1px;
159
+ width: calc(100% + 4px);
160
+ margin: 2px -2px;
161
+ background: var(--v2-border-border-muted);
162
+ border: none;
163
+ }
164
+
165
+ [data-slot="menu-v2-group-label"] {
166
+ box-sizing: border-box;
167
+ display: flex;
168
+ align-items: center;
169
+ height: 28px;
170
+ padding: 0 12px;
171
+
172
+ font-size: 11px;
173
+ font-weight: 530;
174
+ line-height: 100%;
175
+ letter-spacing: 0.05px;
176
+ color: var(--v2-text-text-faint);
177
+ user-select: none;
178
+ font-variant-numeric: tabular-nums;
179
+ }
180
+
181
+ @keyframes menu-v2-in {
182
+ from {
183
+ opacity: 0;
184
+ transform: scale(0.96);
185
+ }
186
+ to {
187
+ opacity: 1;
188
+ transform: scale(1);
189
+ }
190
+ }
@@ -0,0 +1,225 @@
1
+ import { DropdownMenu } from "@kobalte/core/dropdown-menu"
2
+ import { ContextMenu } from "@kobalte/core/context-menu"
3
+ import { Show, splitProps, type Component, type ComponentProps, type JSX, type ParentProps } from "solid-js"
4
+ import "./menu-v2.css"
5
+
6
+ const ChevronRight: Component = () => (
7
+ <svg
8
+ data-slot="menu-v2-item-chevron"
9
+ width="16"
10
+ height="16"
11
+ viewBox="0 0 16 16"
12
+ fill="none"
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ aria-hidden="true"
15
+ >
16
+ <path d="M6 4L10 8L6 12V4Z" fill="currentColor" />
17
+ </svg>
18
+ )
19
+
20
+ const CheckMark: Component = () => (
21
+ <svg width="14" height="14" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
22
+ <path
23
+ d="M3.53564 8.17857L6.39279 11.75L12.4642 4.25"
24
+ stroke="currentColor"
25
+ stroke-width="1"
26
+ stroke-linecap="round"
27
+ stroke-linejoin="round"
28
+ />
29
+ </svg>
30
+ )
31
+
32
+ function ItemBody(
33
+ props: ParentProps<{
34
+ shortcut?: JSX.Element | string
35
+ badge?: JSX.Element | string
36
+ trailing?: JSX.Element
37
+ }>,
38
+ ) {
39
+ return (
40
+ <>
41
+ <span data-slot="menu-v2-item-content">{props.children}</span>
42
+ <Show when={props.shortcut}>{(shortcut) => <span data-slot="menu-v2-item-shortcut">{shortcut()}</span>}</Show>
43
+ <Show when={props.badge}>{(badge) => <span data-slot="menu-v2-item-badge">{badge()}</span>}</Show>
44
+ {props.trailing}
45
+ </>
46
+ )
47
+ }
48
+
49
+ export interface MenuV2ItemProps extends ComponentProps<typeof DropdownMenu.Item> {
50
+ shortcut?: JSX.Element | string
51
+ badge?: JSX.Element | string
52
+ }
53
+
54
+ function MenuV2Item(props: ParentProps<MenuV2ItemProps>) {
55
+ const [s, r] = splitProps(props, ["class", "classList", "children", "shortcut", "badge"])
56
+ return (
57
+ <DropdownMenu.Item {...r} data-component="menu-v2-item" classList={{ ...s.classList, [s.class ?? ""]: !!s.class }}>
58
+ <ItemBody shortcut={s.shortcut} badge={s.badge}>
59
+ {s.children}
60
+ </ItemBody>
61
+ </DropdownMenu.Item>
62
+ )
63
+ }
64
+
65
+ export interface MenuV2CheckboxItemProps extends ComponentProps<typeof DropdownMenu.CheckboxItem> {
66
+ shortcut?: JSX.Element | string
67
+ badge?: JSX.Element | string
68
+ }
69
+
70
+ function MenuV2CheckboxItem(props: ParentProps<MenuV2CheckboxItemProps>) {
71
+ const [s, r] = splitProps(props, ["class", "classList", "children", "shortcut", "badge"])
72
+ return (
73
+ <DropdownMenu.CheckboxItem
74
+ {...r}
75
+ data-component="menu-v2-item"
76
+ classList={{ ...s.classList, [s.class ?? ""]: !!s.class }}
77
+ >
78
+ <ItemBody
79
+ shortcut={s.shortcut}
80
+ badge={s.badge}
81
+ trailing={
82
+ <DropdownMenu.ItemIndicator data-slot="menu-v2-item-indicator" forceMount>
83
+ <CheckMark />
84
+ </DropdownMenu.ItemIndicator>
85
+ }
86
+ >
87
+ {s.children}
88
+ </ItemBody>
89
+ </DropdownMenu.CheckboxItem>
90
+ )
91
+ }
92
+
93
+ export interface MenuV2RadioItemProps extends ComponentProps<typeof DropdownMenu.RadioItem> {
94
+ shortcut?: JSX.Element | string
95
+ badge?: JSX.Element | string
96
+ }
97
+
98
+ function MenuV2RadioItem(props: ParentProps<MenuV2RadioItemProps>) {
99
+ const [s, r] = splitProps(props, ["class", "classList", "children", "shortcut", "badge"])
100
+ return (
101
+ <DropdownMenu.RadioItem
102
+ {...r}
103
+ data-component="menu-v2-item"
104
+ classList={{ ...s.classList, [s.class ?? ""]: !!s.class }}
105
+ >
106
+ <ItemBody
107
+ shortcut={s.shortcut}
108
+ badge={s.badge}
109
+ trailing={
110
+ <DropdownMenu.ItemIndicator data-slot="menu-v2-item-indicator" forceMount>
111
+ <CheckMark />
112
+ </DropdownMenu.ItemIndicator>
113
+ }
114
+ >
115
+ {s.children}
116
+ </ItemBody>
117
+ </DropdownMenu.RadioItem>
118
+ )
119
+ }
120
+
121
+ export interface MenuV2SubTriggerProps extends ComponentProps<typeof DropdownMenu.SubTrigger> {
122
+ shortcut?: JSX.Element | string
123
+ badge?: JSX.Element | string
124
+ }
125
+
126
+ function MenuV2SubTrigger(props: ParentProps<MenuV2SubTriggerProps>) {
127
+ const [s, r] = splitProps(props, ["class", "classList", "children", "shortcut", "badge"])
128
+ return (
129
+ <DropdownMenu.SubTrigger
130
+ {...r}
131
+ data-component="menu-v2-item"
132
+ classList={{ ...s.classList, [s.class ?? ""]: !!s.class }}
133
+ >
134
+ <ItemBody shortcut={s.shortcut} badge={s.badge} trailing={<ChevronRight />}>
135
+ {s.children}
136
+ </ItemBody>
137
+ </DropdownMenu.SubTrigger>
138
+ )
139
+ }
140
+
141
+ function MenuV2SubContent(props: ComponentProps<typeof DropdownMenu.SubContent>) {
142
+ const [s, r] = splitProps(props, ["class", "classList"])
143
+ return (
144
+ <DropdownMenu.SubContent
145
+ {...r}
146
+ data-component="menu-v2-content"
147
+ classList={{ ...s.classList, [s.class ?? ""]: !!s.class }}
148
+ />
149
+ )
150
+ }
151
+
152
+ function MenuV2GroupLabel(props: ComponentProps<typeof DropdownMenu.GroupLabel>) {
153
+ const [s, r] = splitProps(props, ["class", "classList"])
154
+ return (
155
+ <DropdownMenu.GroupLabel
156
+ {...r}
157
+ data-slot="menu-v2-group-label"
158
+ classList={{ ...s.classList, [s.class ?? ""]: !!s.class }}
159
+ />
160
+ )
161
+ }
162
+
163
+ function MenuV2Separator(props: ComponentProps<typeof DropdownMenu.Separator>) {
164
+ const [s, r] = splitProps(props, ["class", "classList"])
165
+ return (
166
+ <DropdownMenu.Separator
167
+ {...r}
168
+ data-slot="menu-v2-separator"
169
+ classList={{ ...s.classList, [s.class ?? ""]: !!s.class }}
170
+ />
171
+ )
172
+ }
173
+
174
+ function MenuV2Content(props: ComponentProps<typeof DropdownMenu.Content>) {
175
+ const [s, r] = splitProps(props, ["class", "classList"])
176
+ return (
177
+ <DropdownMenu.Content
178
+ {...r}
179
+ data-component="menu-v2-content"
180
+ classList={{ ...s.classList, [s.class ?? ""]: !!s.class }}
181
+ />
182
+ )
183
+ }
184
+
185
+ function MenuV2Root(props: ComponentProps<typeof DropdownMenu>) {
186
+ return <DropdownMenu {...props} />
187
+ }
188
+
189
+ function MenuV2ContextRoot(props: ComponentProps<typeof ContextMenu>) {
190
+ return <ContextMenu {...props} />
191
+ }
192
+
193
+ function MenuV2ContextContent(props: ComponentProps<typeof ContextMenu.Content>) {
194
+ const [s, r] = splitProps(props, ["class", "classList"])
195
+ return (
196
+ <ContextMenu.Content
197
+ {...r}
198
+ data-component="menu-v2-content"
199
+ classList={{ ...s.classList, [s.class ?? ""]: !!s.class }}
200
+ />
201
+ )
202
+ }
203
+
204
+ const MenuV2Context = Object.assign(MenuV2ContextRoot, {
205
+ Trigger: ContextMenu.Trigger,
206
+ Portal: ContextMenu.Portal,
207
+ Content: MenuV2ContextContent,
208
+ })
209
+
210
+ export const MenuV2 = Object.assign(MenuV2Root, {
211
+ Trigger: DropdownMenu.Trigger,
212
+ Portal: DropdownMenu.Portal,
213
+ Content: MenuV2Content,
214
+ Item: MenuV2Item,
215
+ CheckboxItem: MenuV2CheckboxItem,
216
+ RadioGroup: DropdownMenu.RadioGroup,
217
+ RadioItem: MenuV2RadioItem,
218
+ Group: DropdownMenu.Group,
219
+ GroupLabel: MenuV2GroupLabel,
220
+ Separator: MenuV2Separator,
221
+ Sub: DropdownMenu.Sub,
222
+ SubTrigger: MenuV2SubTrigger,
223
+ SubContent: MenuV2SubContent,
224
+ Context: MenuV2Context,
225
+ })
@@ -0,0 +1,13 @@
1
+ [data-component="progress-circle-v2"] {
2
+ display: block;
3
+ transform: rotate(-90deg);
4
+ }
5
+
6
+ [data-component="progress-circle-v2"] [data-slot="progress-circle-v2-background"] {
7
+ stroke: var(--v2-background-bg-layer-04);
8
+ }
9
+
10
+ [data-component="progress-circle-v2"] [data-slot="progress-circle-v2-progress"] {
11
+ stroke: var(--v2-icon-icon-base);
12
+ transition: stroke-dashoffset 0.35s cubic-bezier(0.65, 0, 0.35, 1);
13
+ }
@@ -0,0 +1,52 @@
1
+ import { type ComponentProps, createMemo, splitProps } from "solid-js"
2
+ import "./progress-circle-v2.css"
3
+
4
+ export interface ProgressCircleV2Props extends Pick<ComponentProps<"svg">, "class" | "classList"> {
5
+ percentage: number
6
+ size?: number
7
+ strokeWidth?: number
8
+ }
9
+
10
+ export function ProgressCircleV2(props: ProgressCircleV2Props) {
11
+ const [split, rest] = splitProps(props, ["percentage", "size", "strokeWidth", "class", "classList"])
12
+
13
+ const size = () => split.size ?? 14
14
+ const strokeWidth = () => split.strokeWidth ?? 1.5
15
+ const viewBoxSize = 14
16
+ const center = viewBoxSize / 2
17
+ const radius = () => center - strokeWidth() / 2
18
+ const circumference = createMemo(() => 2 * Math.PI * radius())
19
+ const offset = createMemo(() => circumference() * (1 - Math.max(0, Math.min(100, split.percentage || 0)) / 100))
20
+
21
+ return (
22
+ <svg
23
+ {...rest}
24
+ width={size()}
25
+ height={size()}
26
+ viewBox={`0 0 ${viewBoxSize} ${viewBoxSize}`}
27
+ fill="none"
28
+ data-component="progress-circle-v2"
29
+ classList={{
30
+ ...split.classList,
31
+ [split.class ?? ""]: !!split.class,
32
+ }}
33
+ >
34
+ <circle
35
+ cx={center}
36
+ cy={center}
37
+ r={radius()}
38
+ data-slot="progress-circle-v2-background"
39
+ stroke-width={strokeWidth()}
40
+ />
41
+ <circle
42
+ cx={center}
43
+ cy={center}
44
+ r={radius()}
45
+ data-slot="progress-circle-v2-progress"
46
+ stroke-width={strokeWidth()}
47
+ stroke-dasharray={circumference().toString()}
48
+ stroke-dashoffset={offset()}
49
+ />
50
+ </svg>
51
+ )
52
+ }
@@ -0,0 +1,132 @@
1
+ [data-component="project-avatar-v2"] {
2
+ position: relative;
3
+ flex-shrink: 0;
4
+ width: 16px;
5
+ height: 16px;
6
+ }
7
+
8
+ [data-component="project-avatar-v2"][data-unread] {
9
+ overflow: visible;
10
+ }
11
+
12
+ [data-slot="project-avatar-surface"] {
13
+ --project-avatar-bg: var(--v2-avatar-bg-gray);
14
+ --project-avatar-border: var(--v2-avatar-border-gray);
15
+ position: relative;
16
+ box-sizing: border-box;
17
+ display: flex;
18
+ width: 100%;
19
+ height: 100%;
20
+ align-items: center;
21
+ justify-content: center;
22
+ overflow: hidden;
23
+ border-radius: 4px;
24
+ background:
25
+ linear-gradient(180deg, var(--v2-alpha-light-16) 0%, var(--v2-alpha-light-0) 100%), var(--project-avatar-bg);
26
+ box-shadow: inset 0 0 0 0.5px var(--project-avatar-border);
27
+ font-weight: 530;
28
+ font-size: 11px;
29
+ line-height: 1;
30
+ letter-spacing: 0.05px;
31
+ font-variant-numeric: tabular-nums;
32
+ text-transform: uppercase;
33
+ color: var(--v2-avatar-fg);
34
+ text-shadow: 0 0 4px var(--v2-alpha-dark-20);
35
+ user-select: none;
36
+ -webkit-user-select: none;
37
+ }
38
+
39
+ [data-slot="project-avatar-surface"][data-variant="orange"] {
40
+ --project-avatar-bg: var(--v2-avatar-bg-orange);
41
+ --project-avatar-border: var(--v2-avatar-border-orange);
42
+ }
43
+
44
+ [data-slot="project-avatar-surface"][data-variant="yellow"] {
45
+ --project-avatar-bg: var(--v2-avatar-bg-yellow);
46
+ --project-avatar-border: var(--v2-avatar-border-yellow);
47
+ }
48
+
49
+ [data-slot="project-avatar-surface"][data-variant="cyan"] {
50
+ --project-avatar-bg: var(--v2-avatar-bg-cyan);
51
+ --project-avatar-border: var(--v2-avatar-border-cyan);
52
+ }
53
+
54
+ [data-slot="project-avatar-surface"][data-variant="green"] {
55
+ --project-avatar-bg: var(--v2-avatar-bg-green);
56
+ --project-avatar-border: var(--v2-avatar-border-green);
57
+ }
58
+
59
+ [data-slot="project-avatar-surface"][data-variant="red"] {
60
+ --project-avatar-bg: var(--v2-avatar-bg-red);
61
+ --project-avatar-border: var(--v2-avatar-border-red);
62
+ }
63
+
64
+ [data-slot="project-avatar-surface"][data-variant="pink"] {
65
+ --project-avatar-bg: var(--v2-avatar-bg-pink);
66
+ --project-avatar-border: var(--v2-avatar-border-pink);
67
+ }
68
+
69
+ [data-slot="project-avatar-surface"][data-variant="blue"] {
70
+ --project-avatar-bg: var(--v2-avatar-bg-blue);
71
+ --project-avatar-border: var(--v2-avatar-border-blue);
72
+ }
73
+
74
+ [data-slot="project-avatar-surface"][data-variant="purple"] {
75
+ --project-avatar-bg: var(--v2-avatar-bg-purple);
76
+ --project-avatar-border: var(--v2-avatar-border-purple);
77
+ }
78
+
79
+ [data-slot="project-avatar-surface"][data-variant="gray"] {
80
+ --project-avatar-bg: var(--v2-avatar-bg-gray);
81
+ --project-avatar-border: var(--v2-avatar-border-gray);
82
+ }
83
+
84
+ [data-slot="project-avatar-surface"][data-variant="outline"] {
85
+ --project-avatar-bg: var(--v2-background-bg-base);
86
+ --project-avatar-border: var(--v2-border-border-strong);
87
+ color: var(--v2-text-text-muted);
88
+ text-shadow: none;
89
+ }
90
+
91
+ [data-slot="project-avatar-surface"][data-has-image] {
92
+ background: var(--project-avatar-bg);
93
+ }
94
+
95
+ [data-slot="project-avatar-surface"] [data-slot="project-avatar-image"] {
96
+ position: relative;
97
+ display: block;
98
+ width: 100%;
99
+ height: 100%;
100
+ border-radius: inherit;
101
+ object-fit: cover;
102
+ user-select: none;
103
+ -webkit-user-select: none;
104
+ -webkit-user-drag: none;
105
+ }
106
+
107
+ [data-component="project-avatar-v2"][data-unread] [data-slot="project-avatar-surface"] {
108
+ -webkit-mask-image: radial-gradient(circle 4.5px at calc(100% - 1px) 1px, transparent 4.5px, black 4.5px);
109
+ mask-image: radial-gradient(circle 4.5px at calc(100% - 1px) 1px, transparent 4.5px, black 4.5px);
110
+ }
111
+
112
+ [data-slot="project-avatar-unread-dot"] {
113
+ position: absolute;
114
+ z-index: 3;
115
+ width: 6px;
116
+ height: 6px;
117
+ right: -2px;
118
+ top: -2px;
119
+ border-radius: 9999px;
120
+ background: var(--v2-background-bg-accent);
121
+ pointer-events: none;
122
+ }
123
+
124
+ [data-slot="project-avatar-slot"] {
125
+ display: flex;
126
+ flex-shrink: 0;
127
+ align-items: center;
128
+ justify-content: center;
129
+ width: 16px;
130
+ height: 16px;
131
+ overflow: visible;
132
+ }
@@ -0,0 +1,66 @@
1
+ import { type ComponentProps, splitProps, Show } from "solid-js"
2
+ import "./project-avatar-v2.css"
3
+
4
+ const segmenter =
5
+ typeof Intl !== "undefined" && "Segmenter" in Intl
6
+ ? new Intl.Segmenter(undefined, { granularity: "grapheme" })
7
+ : undefined
8
+
9
+ function first(value: string) {
10
+ if (!value) return ""
11
+ if (!segmenter) return Array.from(value)[0] ?? ""
12
+ return segmenter.segment(value)[Symbol.iterator]().next().value?.segment ?? Array.from(value)[0] ?? ""
13
+ }
14
+
15
+ export const PROJECT_AVATAR_VARIANTS = [
16
+ "orange",
17
+ "yellow",
18
+ "cyan",
19
+ "green",
20
+ "red",
21
+ "pink",
22
+ "blue",
23
+ "purple",
24
+ "gray",
25
+ ] as const
26
+
27
+ export type ProjectAvatarVariant = (typeof PROJECT_AVATAR_VARIANTS)[number]
28
+
29
+ // "outline" is a neutral, muted style (e.g. recently closed projects) and is not part of the color rotation.
30
+ export type ProjectAvatarStyle = ProjectAvatarVariant | "outline"
31
+
32
+ export interface ProjectAvatarProps extends ComponentProps<"div"> {
33
+ fallback: string
34
+ src?: string
35
+ variant?: ProjectAvatarStyle
36
+ unread?: boolean
37
+ }
38
+
39
+ export function ProjectAvatar(props: ProjectAvatarProps) {
40
+ const [split, rest] = splitProps(props, ["fallback", "src", "variant", "unread", "class", "classList", "style"])
41
+ return (
42
+ <div
43
+ {...rest}
44
+ data-component="project-avatar-v2"
45
+ data-unread={split.unread ? "" : undefined}
46
+ classList={{
47
+ ...split.classList,
48
+ [split.class ?? ""]: !!split.class,
49
+ }}
50
+ style={typeof split.style === "object" ? split.style : undefined}
51
+ >
52
+ <div
53
+ data-slot="project-avatar-surface"
54
+ data-variant={split.variant ?? "gray"}
55
+ data-has-image={split.src ? "" : undefined}
56
+ >
57
+ <Show when={split.src} fallback={first(split.fallback)}>
58
+ {(value) => <img src={value()} draggable={false} data-slot="project-avatar-image" />}
59
+ </Show>
60
+ </div>
61
+ <Show when={split.unread}>
62
+ <span data-slot="project-avatar-unread-dot" aria-hidden="true" />
63
+ </Show>
64
+ </div>
65
+ )
66
+ }