@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,179 @@
1
+ [data-component="text-input-v2"] {
2
+ box-sizing: border-box;
3
+ display: flex;
4
+ flex-direction: row;
5
+ align-items: stretch;
6
+ padding: 0 8px 0 0;
7
+ gap: 8px;
8
+ width: 280px;
9
+ height: 28px;
10
+ border: 0;
11
+ border-radius: 6px;
12
+ outline: 1px solid transparent;
13
+ outline-offset: 0;
14
+ background:
15
+ linear-gradient(180deg, var(--v2-alpha-light-2) 0%, var(--v2-alpha-light-0) 100%), var(--v2-background-bg-base);
16
+ box-shadow: var(--v2-elevation-button-neutral);
17
+ flex: none;
18
+ align-self: stretch;
19
+ transition:
20
+ background 85ms ease-out,
21
+ outline-color 85ms ease-out,
22
+ box-shadow 85ms ease-out;
23
+ }
24
+
25
+ [data-component="text-input-v2"][data-appearance="large"] {
26
+ height: 32px;
27
+ }
28
+
29
+ [data-component="text-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="text-input-v2"]:where(:focus-within):not([data-disabled], [data-invalid]) {
36
+ outline-color: var(--v2-border-border-focus);
37
+ box-shadow: none;
38
+ }
39
+
40
+ [data-component="text-input-v2"]:where([data-invalid]):not([data-disabled]) {
41
+ outline-color: var(--v2-state-fg-danger);
42
+ box-shadow: none;
43
+ }
44
+
45
+ [data-component="text-input-v2"]:where([data-disabled]) {
46
+ opacity: 0.5;
47
+ cursor: not-allowed;
48
+ }
49
+
50
+ [data-component="text-input-v2"] [data-slot="text-input-v2-value"] {
51
+ display: flex;
52
+ flex-direction: row;
53
+ align-items: center;
54
+ align-self: stretch;
55
+ padding: 0;
56
+ gap: 6px;
57
+ min-width: 0;
58
+ flex: 1 1 auto;
59
+ min-height: 0;
60
+ }
61
+
62
+ [data-component="text-input-v2"] [data-slot="text-input-v2-leading-icon"] {
63
+ display: flex;
64
+ flex: none;
65
+ align-items: center;
66
+ justify-content: center;
67
+ padding-left: 8px;
68
+ color: var(--v2-icon-icon-muted);
69
+ }
70
+
71
+ [data-component="text-input-v2"] [data-slot="text-input-v2-leading-icon"] :is(svg, [data-slot="icon-svg"]) {
72
+ display: block;
73
+ flex: none;
74
+ }
75
+
76
+ [data-component="text-input-v2"][data-leading-icon] [data-slot="text-input-v2-input"] {
77
+ padding-left: 0;
78
+ }
79
+
80
+ [data-component="text-input-v2"] [data-slot="text-input-v2-input"] {
81
+ display: block;
82
+ width: 100%;
83
+ min-width: 0;
84
+ height: 100%;
85
+ padding: 0 0 0 8px;
86
+ margin: 0;
87
+ border: 0;
88
+ background: transparent;
89
+ outline: none;
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-base);
96
+ font-variation-settings: "slnt" 0;
97
+ }
98
+
99
+ [data-component="text-input-v2"] [data-slot="text-input-v2-input"]::placeholder {
100
+ color: var(--v2-text-text-faint);
101
+ user-select: none;
102
+ }
103
+
104
+ [data-component="text-input-v2"] [data-slot="text-input-v2-input"][type="search"]::-webkit-search-cancel-button {
105
+ -webkit-appearance: none;
106
+ appearance: none;
107
+ display: none;
108
+ }
109
+
110
+ [data-component="text-input-v2"][data-numeric] [data-slot="text-input-v2-input"] {
111
+ font-variant-numeric: tabular-nums;
112
+ }
113
+
114
+ [data-component="text-input-v2"] [data-slot="text-input-v2-icon-button"] {
115
+ display: flex;
116
+ flex-direction: row;
117
+ justify-content: center;
118
+ align-items: center;
119
+ align-self: center;
120
+ flex: none;
121
+ width: 20px;
122
+ height: 20px;
123
+ padding: 2px;
124
+ gap: 3px;
125
+ border: 0;
126
+ border-radius: 4px;
127
+ background: transparent;
128
+ color: var(--v2-icon-icon-muted);
129
+ cursor: pointer;
130
+ outline: none;
131
+ }
132
+
133
+ [data-component="text-input-v2"]
134
+ [data-slot="text-input-v2-icon-button"]:is(:hover, [data-state="hover"]):not(:disabled) {
135
+ background-color: var(--v2-overlay-simple-overlay-hover);
136
+ }
137
+
138
+ [data-component="text-input-v2"]
139
+ [data-slot="text-input-v2-icon-button"]:is(:active, [data-state="pressed"]):not(:disabled) {
140
+ background-color: var(--v2-overlay-simple-overlay-pressed);
141
+ }
142
+
143
+ [data-component="text-input-v2"] [data-slot="text-input-v2-icon-button"]:focus {
144
+ outline: none;
145
+ }
146
+
147
+ [data-component="text-input-v2"] [data-slot="text-input-v2-icon-button"]:focus-visible {
148
+ outline: 2px solid var(--v2-border-border-focus);
149
+ outline-offset: 1px;
150
+ }
151
+
152
+ [data-component="text-input-v2"]:where([data-disabled]) [data-slot="text-input-v2-icon-button"] {
153
+ cursor: not-allowed;
154
+ pointer-events: none;
155
+ }
156
+
157
+ [data-component="text-input-v2"] [data-slot="text-input-v2-icon-button"] [data-slot="icon-svg"] {
158
+ display: block;
159
+ flex: none;
160
+ color: currentColor;
161
+ }
162
+
163
+ [data-component="text-input-v2"] [data-slot="text-input-v2-icon-button"][data-variant="clear"] {
164
+ width: 28px;
165
+ height: 28px;
166
+ padding: 0;
167
+ border-radius: 6px;
168
+ margin-right: -8px;
169
+ }
170
+
171
+ [data-component="text-input-v2"][data-invalid]:not([data-disabled]) [data-slot="text-input-v2-input"] {
172
+ color: var(--v2-state-fg-danger);
173
+ caret-color: var(--v2-state-fg-danger);
174
+ }
175
+
176
+ [data-component="text-input-v2"][data-invalid]:not([data-disabled]) [data-slot="text-input-v2-input"]::placeholder {
177
+ color: var(--v2-state-fg-danger);
178
+ opacity: 1;
179
+ }
@@ -0,0 +1,93 @@
1
+ import { type ComponentProps, type JSX, Show, splitProps } from "solid-js"
2
+ import { Icon } from "./icon"
3
+ import "./text-input-v2.css"
4
+
5
+ export interface TextInputV2Props extends Omit<ComponentProps<"input">, "type"> {
6
+ /** Icon or adornment shown before the field value. */
7
+ leadingIcon?: JSX.Element
8
+ /** Show the trailing copy action. */
9
+ showCopyButton?: boolean
10
+ /** Show the trailing clear action. */
11
+ showClearButton?: boolean
12
+ /** Accessible label for the copy button. */
13
+ copyLabel?: string
14
+ /** Accessible label for the clear button. */
15
+ clearLabel?: string
16
+ onCopyClick?: (event: MouseEvent) => void
17
+ onClearClick?: (event: MouseEvent) => void
18
+ /** Apply tabular numerals to the field value. */
19
+ numeric?: boolean
20
+ /** Error styling for the field and value text. */
21
+ invalid?: boolean
22
+ /** `base` is 28px tall; `large` is 32px tall. */
23
+ appearance?: "base" | "large"
24
+ type?: ComponentProps<"input">["type"]
25
+ }
26
+
27
+ export function TextInputV2(props: TextInputV2Props) {
28
+ const [local, inputProps] = splitProps(props, [
29
+ "class",
30
+ "classList",
31
+ "leadingIcon",
32
+ "showCopyButton",
33
+ "showClearButton",
34
+ "copyLabel",
35
+ "clearLabel",
36
+ "onCopyClick",
37
+ "onClearClick",
38
+ "numeric",
39
+ "invalid",
40
+ "appearance",
41
+ "disabled",
42
+ ])
43
+
44
+ return (
45
+ <div
46
+ data-component="text-input-v2"
47
+ data-disabled={local.disabled ? "" : undefined}
48
+ data-invalid={local.invalid ? "" : undefined}
49
+ data-numeric={local.numeric ? "" : undefined}
50
+ data-appearance={local.appearance ?? "base"}
51
+ data-leading-icon={local.leadingIcon ? "" : undefined}
52
+ classList={{
53
+ ...local.classList,
54
+ [local.class ?? ""]: !!local.class,
55
+ }}
56
+ >
57
+ <div data-slot="text-input-v2-value">
58
+ <Show when={local.leadingIcon}>
59
+ <span data-slot="text-input-v2-leading-icon">{local.leadingIcon}</span>
60
+ </Show>
61
+ <input
62
+ {...inputProps}
63
+ type={inputProps.type ?? "text"}
64
+ disabled={local.disabled}
65
+ aria-invalid={local.invalid ? true : undefined}
66
+ data-slot="text-input-v2-input"
67
+ />
68
+ </div>
69
+ <Show when={local.showClearButton || local.showCopyButton}>
70
+ <button
71
+ type="button"
72
+ data-slot="text-input-v2-icon-button"
73
+ data-variant={local.showClearButton ? "clear" : "copy"}
74
+ aria-label={local.showClearButton ? (local.clearLabel ?? "Clear") : (local.copyLabel ?? "Copy")}
75
+ disabled={local.disabled}
76
+ onMouseDown={(event) => {
77
+ if (!local.showClearButton) return
78
+ event.preventDefault()
79
+ }}
80
+ onClick={(event) => {
81
+ if (local.showClearButton) {
82
+ local.onClearClick?.(event)
83
+ return
84
+ }
85
+ local.onCopyClick?.(event)
86
+ }}
87
+ >
88
+ <Icon name={local.showClearButton ? "xmark-small" : "copy"} />
89
+ </button>
90
+ </Show>
91
+ </div>
92
+ )
93
+ }
@@ -0,0 +1,125 @@
1
+ * {
2
+ -webkit-font-smoothing: antialiased;
3
+ -moz-osx-font-smoothing: grayscale;
4
+ text-rendering: geometricPrecision;
5
+ }
6
+
7
+ [data-component="text-shimmer-v2"] {
8
+ --_step: 45ms;
9
+ --_duration: 1200ms;
10
+ --_swap: 220ms;
11
+ --_index: 0;
12
+ --_angle: 90deg;
13
+ --_spread: 5.2ch;
14
+ --_size: 360%;
15
+ --_base-color: var(--v2-text-text-muted);
16
+ --_peak-color: var(--v2-text-text-base);
17
+ --_sweep: linear-gradient(
18
+ var(--_angle),
19
+ transparent calc(50% - var(--_spread)),
20
+ var(--_peak-color) 50%,
21
+ transparent calc(50% + var(--_spread))
22
+ );
23
+ --_base: linear-gradient(var(--_base-color), var(--_base-color));
24
+
25
+ display: inline-flex;
26
+ align-items: baseline;
27
+ font: inherit;
28
+ letter-spacing: inherit;
29
+ line-height: inherit;
30
+ user-select: none;
31
+ }
32
+
33
+ [data-component="text-shimmer-v2"] [data-slot="text-shimmer-v2-char"] {
34
+ display: inline-grid;
35
+ white-space: pre;
36
+ font: inherit;
37
+ letter-spacing: inherit;
38
+ line-height: inherit;
39
+ }
40
+
41
+ [data-component="text-shimmer-v2"] [data-slot="text-shimmer-v2-base"],
42
+ [data-component="text-shimmer-v2"] [data-slot="text-shimmer-v2-shimmer"] {
43
+ grid-area: 1 / 1;
44
+ white-space: pre;
45
+ transition: opacity var(--_swap) ease-out;
46
+ font: inherit;
47
+ letter-spacing: inherit;
48
+ line-height: inherit;
49
+ }
50
+
51
+ [data-component="text-shimmer-v2"] [data-slot="text-shimmer-v2-base"] {
52
+ color: inherit;
53
+ opacity: 1;
54
+ }
55
+
56
+ [data-component="text-shimmer-v2"] [data-slot="text-shimmer-v2-shimmer"] {
57
+ color: var(--_base-color);
58
+ opacity: 0;
59
+ }
60
+
61
+ [data-component="text-shimmer-v2"][data-active="true"] [data-slot="text-shimmer-v2-shimmer"] {
62
+ opacity: 1;
63
+ }
64
+
65
+ [data-component="text-shimmer-v2"] [data-slot="text-shimmer-v2-shimmer"][data-run="true"] {
66
+ animation-name: text-shimmer-v2-sweep;
67
+ animation-duration: var(--_duration);
68
+ animation-iteration-count: infinite;
69
+ animation-timing-function: linear;
70
+ animation-fill-mode: both;
71
+ animation-delay: calc(var(--_step) * var(--_index) * -1);
72
+ will-change: background-position;
73
+ }
74
+
75
+ @keyframes text-shimmer-v2-sweep {
76
+ 0% {
77
+ background-position:
78
+ 100% 0,
79
+ 0 0;
80
+ }
81
+ 100% {
82
+ background-position:
83
+ 0% 0,
84
+ 0 0;
85
+ }
86
+ }
87
+
88
+ @supports ((-webkit-background-clip: text) or (background-clip: text)) {
89
+ [data-component="text-shimmer-v2"] [data-slot="text-shimmer-v2-shimmer"] {
90
+ color: transparent;
91
+ -webkit-text-fill-color: transparent;
92
+ background-image: var(--_sweep), var(--_base);
93
+ background-size:
94
+ var(--_size) 100%,
95
+ 100% 100%;
96
+ background-position:
97
+ 100% 0,
98
+ 0 0;
99
+ background-repeat: no-repeat;
100
+ -webkit-background-clip: text;
101
+ background-clip: text;
102
+ }
103
+
104
+ [data-component="text-shimmer-v2"][data-active="true"] [data-slot="text-shimmer-v2-base"] {
105
+ opacity: 0;
106
+ }
107
+ }
108
+
109
+ @media (prefers-reduced-motion: reduce) {
110
+ [data-component="text-shimmer-v2"] [data-slot="text-shimmer-v2-base"],
111
+ [data-component="text-shimmer-v2"] [data-slot="text-shimmer-v2-shimmer"] {
112
+ transition-duration: 0ms;
113
+ }
114
+
115
+ [data-component="text-shimmer-v2"] [data-slot="text-shimmer-v2-shimmer"] {
116
+ animation: none !important;
117
+ color: inherit;
118
+ -webkit-text-fill-color: currentColor;
119
+ background-image: none;
120
+ }
121
+
122
+ [data-component="text-shimmer-v2"] [data-slot="text-shimmer-v2-base"] {
123
+ opacity: 1 !important;
124
+ }
125
+ }
@@ -0,0 +1,63 @@
1
+ import { createEffect, createMemo, createSignal, onCleanup, type ValidComponent } from "solid-js"
2
+ import { Dynamic } from "solid-js/web"
3
+ import "./text-shimmer-v2.css"
4
+
5
+ export const TextShimmerV2 = <T extends ValidComponent = "span">(props: {
6
+ text: string
7
+ class?: string
8
+ as?: T
9
+ active?: boolean
10
+ offset?: number
11
+ }) => {
12
+ const text = createMemo(() => props.text ?? "")
13
+ const active = createMemo(() => props.active ?? true)
14
+ const offset = createMemo(() => props.offset ?? 0)
15
+ const [run, setRun] = createSignal(active())
16
+ const swap = 220
17
+ let timer: ReturnType<typeof setTimeout> | undefined
18
+
19
+ createEffect(() => {
20
+ if (timer) {
21
+ clearTimeout(timer)
22
+ timer = undefined
23
+ }
24
+
25
+ if (active()) {
26
+ setRun(true)
27
+ return
28
+ }
29
+
30
+ timer = setTimeout(() => {
31
+ timer = undefined
32
+ setRun(false)
33
+ }, swap)
34
+ })
35
+
36
+ onCleanup(() => {
37
+ if (!timer) return
38
+ clearTimeout(timer)
39
+ })
40
+
41
+ return (
42
+ <Dynamic
43
+ component={props.as ?? "span"}
44
+ data-component="text-shimmer-v2"
45
+ data-active={active() ? "true" : "false"}
46
+ class={props.class}
47
+ aria-label={text()}
48
+ style={{
49
+ "--_swap": `${swap}ms`,
50
+ "--_index": `${offset()}`,
51
+ }}
52
+ >
53
+ <span data-slot="text-shimmer-v2-char">
54
+ <span data-slot="text-shimmer-v2-base" aria-hidden="true">
55
+ {text()}
56
+ </span>
57
+ <span data-slot="text-shimmer-v2-shimmer" data-run={run() ? "true" : "false"} aria-hidden="true">
58
+ {text()}
59
+ </span>
60
+ </span>
61
+ </Dynamic>
62
+ )
63
+ }
@@ -0,0 +1,78 @@
1
+ [data-component="textarea-v2"] {
2
+ box-sizing: border-box;
3
+ display: flex;
4
+ flex-direction: column;
5
+ align-items: stretch;
6
+ padding: 0 2px 2px 0;
7
+ width: 280px;
8
+ min-height: 80px;
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
+ transition:
19
+ background 85ms ease-out,
20
+ outline-color 85ms ease-out,
21
+ box-shadow 85ms ease-out;
22
+ }
23
+
24
+ [data-component="textarea-v2"]:where(:hover):not([data-disabled], [data-invalid]):not(:focus-within) {
25
+ background:
26
+ linear-gradient(0deg, var(--v2-overlay-simple-overlay-hover), var(--v2-overlay-simple-overlay-hover)),
27
+ linear-gradient(180deg, var(--v2-alpha-light-2) 0%, var(--v2-alpha-light-0) 100%), var(--v2-background-bg-base);
28
+ }
29
+
30
+ [data-component="textarea-v2"]:where(:focus-within):not([data-disabled], [data-invalid]) {
31
+ outline-color: var(--v2-border-border-focus);
32
+ box-shadow: none;
33
+ }
34
+
35
+ [data-component="textarea-v2"]:where([data-invalid]):not([data-disabled]) {
36
+ outline-color: var(--v2-state-fg-danger);
37
+ box-shadow: none;
38
+ }
39
+
40
+ [data-component="textarea-v2"]:where([data-disabled]) {
41
+ opacity: 0.5;
42
+ cursor: not-allowed;
43
+ }
44
+
45
+ [data-component="textarea-v2"] [data-slot="textarea-v2-textarea"] {
46
+ display: block;
47
+ width: 100%;
48
+ min-width: 0;
49
+ min-height: 80px;
50
+ height: 100%;
51
+ padding: 8px;
52
+ margin: 0;
53
+ border: 0;
54
+ background: transparent;
55
+ outline: none;
56
+ resize: vertical;
57
+ font-style: normal;
58
+ font-weight: 440;
59
+ font-size: 13px;
60
+ line-height: 1.35;
61
+ letter-spacing: -0.04px;
62
+ color: var(--v2-text-text-base);
63
+ font-variation-settings: "slnt" 0;
64
+ }
65
+
66
+ [data-component="textarea-v2"] [data-slot="textarea-v2-textarea"]::placeholder {
67
+ color: var(--v2-text-text-faint);
68
+ }
69
+
70
+ [data-component="textarea-v2"][data-invalid]:not([data-disabled]) [data-slot="textarea-v2-textarea"] {
71
+ color: var(--v2-state-fg-danger);
72
+ caret-color: var(--v2-state-fg-danger);
73
+ }
74
+
75
+ [data-component="textarea-v2"][data-invalid]:not([data-disabled]) [data-slot="textarea-v2-textarea"]::placeholder {
76
+ color: var(--v2-state-fg-danger);
77
+ opacity: 1;
78
+ }
@@ -0,0 +1,31 @@
1
+ import { type ComponentProps, splitProps } from "solid-js"
2
+ import "./textarea-v2.css"
3
+
4
+ export interface TextareaV2Props extends ComponentProps<"textarea"> {
5
+ /** Error styling for the field and value text. */
6
+ invalid?: boolean
7
+ }
8
+
9
+ export function TextareaV2(props: TextareaV2Props) {
10
+ const [local, textareaProps] = splitProps(props, ["class", "classList", "invalid", "disabled", "rows"])
11
+
12
+ return (
13
+ <div
14
+ data-component="textarea-v2"
15
+ data-disabled={local.disabled ? "" : undefined}
16
+ data-invalid={local.invalid ? "" : undefined}
17
+ classList={{
18
+ ...local.classList,
19
+ [local.class ?? ""]: !!local.class,
20
+ }}
21
+ >
22
+ <textarea
23
+ {...textareaProps}
24
+ rows={local.rows ?? 3}
25
+ disabled={local.disabled}
26
+ aria-invalid={local.invalid ? true : undefined}
27
+ data-slot="textarea-v2-textarea"
28
+ />
29
+ </div>
30
+ )
31
+ }