@opencode-ai/ui 0.0.0-dev-17746 → 0.0.0-dev-202608201733

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 (285) hide show
  1. package/dist/{data-display/accordion → components}/accordion.d.ts +6 -6
  2. package/dist/components/avatar.d.ts +9 -0
  3. package/dist/components/button.d.ts +9 -0
  4. package/dist/components/card.d.ts +1 -1
  5. package/dist/{forms/checkbox → components}/checkbox.d.ts +2 -2
  6. package/dist/components/dialog.d.ts +12 -0
  7. package/dist/{data-display/diff-changes → components}/diff-changes.d.ts +1 -2
  8. package/dist/components/dropdown-menu.d.ts +80 -0
  9. package/dist/components/icon-button.d.ts +10 -0
  10. package/dist/{icons/icon/additional-icons.d.ts → components/icon.d.ts} +8 -8
  11. package/dist/components/keybind.d.ts +6 -0
  12. package/dist/components/list.d.ts +1 -1
  13. package/dist/{feedback/progress-circle → components}/progress-circle.d.ts +0 -2
  14. package/dist/components/radio-group.d.ts +16 -0
  15. package/dist/components/scroll-view.d.ts +3 -3
  16. package/dist/components/select.d.ts +21 -0
  17. package/dist/{forms/switch → components}/switch.d.ts +2 -4
  18. package/dist/{navigation/tabs → components}/tabs.d.ts +8 -15
  19. package/dist/components/tag.d.ts +5 -0
  20. package/dist/{typography/text-shimmer → components}/text-shimmer.d.ts +0 -1
  21. package/dist/components/toast.d.ts +56 -0
  22. package/dist/components/tooltip.d.ts +17 -0
  23. package/dist/context/i18n.d.ts +7 -10
  24. package/dist/i18n/ar.d.ts +2 -0
  25. package/dist/i18n/bg.d.ts +2 -0
  26. package/dist/i18n/br.d.ts +2 -0
  27. package/dist/i18n/bs.d.ts +2 -0
  28. package/dist/i18n/da.d.ts +2 -0
  29. package/dist/i18n/de.d.ts +2 -0
  30. package/dist/i18n/en.d.ts +1 -209
  31. package/dist/i18n/es.d.ts +2 -0
  32. package/dist/i18n/fr.d.ts +2 -0
  33. package/dist/i18n/ja.d.ts +2 -0
  34. package/dist/i18n/km.d.ts +2 -0
  35. package/dist/i18n/ko.d.ts +2 -0
  36. package/dist/i18n/lo.d.ts +2 -0
  37. package/dist/i18n/mk.d.ts +2 -0
  38. package/dist/i18n/mn.d.ts +2 -0
  39. package/dist/i18n/my.d.ts +2 -0
  40. package/dist/i18n/pl.d.ts +2 -0
  41. package/dist/i18n/ru.d.ts +2 -0
  42. package/dist/i18n/sr.d.ts +2 -0
  43. package/dist/i18n/tg.d.ts +2 -0
  44. package/dist/i18n/th.d.ts +2 -0
  45. package/dist/i18n/tr.d.ts +2 -0
  46. package/dist/i18n/zh.d.ts +2 -0
  47. package/dist/i18n/zht.d.ts +2 -0
  48. package/dist/v2/components/accordion-v2.d.ts +26 -0
  49. package/dist/{data-display/avatar/avatar.d.ts → v2/components/avatar-v2.d.ts} +1 -1
  50. package/dist/v2/components/badge-v2.d.ts +6 -0
  51. package/dist/v2/components/button-v2.d.ts +10 -0
  52. package/dist/v2/components/checkbox-v2.d.ts +10 -0
  53. package/dist/{overlays/dialog/dialog.d.ts → v2/components/dialog-v2.d.ts} +2 -1
  54. package/dist/v2/components/diff-changes-v2.d.ts +11 -0
  55. package/dist/v2/components/divider-v2.d.ts +5 -0
  56. package/dist/{forms/field/field.d.ts → v2/components/field-v2.d.ts} +10 -4
  57. package/dist/v2/components/icon-button-v2.d.ts +11 -0
  58. package/dist/{icons/icon → v2/components}/icon.d.ts +1 -16
  59. package/dist/v2/components/inline-input-v2.d.ts +21 -0
  60. package/dist/v2/components/keybind-v2.d.ts +7 -0
  61. package/dist/{data-display/line-comment/line-comment.d.ts → v2/components/line-comment-v2.d.ts} +9 -9
  62. package/dist/v2/components/loader-v2.d.ts +3 -0
  63. package/dist/v2/components/menu-v2.d.ts +52 -0
  64. package/dist/v2/components/progress-circle-v2.d.ts +8 -0
  65. package/dist/{data-display/project-avatar/project-avatar.d.ts → v2/components/project-avatar-v2.d.ts} +1 -1
  66. package/dist/v2/components/radio-v2.d.ts +16 -0
  67. package/dist/{navigation/segmented-control/segmented-control.d.ts → v2/components/segmented-control-v2.d.ts} +5 -5
  68. package/dist/{forms/select/select.d.ts → v2/components/select-v2.d.ts} +6 -4
  69. package/dist/v2/components/split-button-v2.d.ts +5 -0
  70. package/dist/v2/components/switch-v2.d.ts +7 -0
  71. package/dist/v2/components/tabs-v2.d.ts +34 -0
  72. package/dist/{forms/text-input/text-input.d.ts → v2/components/text-input-v2.d.ts} +3 -3
  73. package/dist/v2/components/text-shimmer-v2.d.ts +9 -0
  74. package/dist/v2/components/textarea-v2.d.ts +7 -0
  75. package/dist/v2/components/toast-v2.d.ts +57 -0
  76. package/dist/v2/components/tooltip-v2.d.ts +13 -0
  77. package/dist/v2/components/wordmark-v2.d.ts +2 -0
  78. package/package.json +13 -131
  79. package/src/{data-display/accordion → components}/accordion.css +26 -1
  80. package/src/{data-display/accordion → components}/accordion.tsx +14 -14
  81. package/src/components/animated-number.css +11 -29
  82. package/src/components/animated-number.tsx +2 -2
  83. package/src/components/avatar.css +49 -0
  84. package/src/components/avatar.tsx +55 -0
  85. package/src/components/button.css +194 -0
  86. package/src/components/button.tsx +33 -0
  87. package/src/components/card.css +23 -2
  88. package/src/components/card.tsx +4 -4
  89. package/src/{forms/checkbox → components}/checkbox.css +7 -1
  90. package/src/{forms/checkbox → components}/checkbox.tsx +13 -13
  91. package/src/components/collapsible.tsx +1 -1
  92. package/src/components/dialog.css +181 -0
  93. package/src/components/dialog.tsx +72 -0
  94. package/src/{data-display/diff-changes → components}/diff-changes.css +19 -22
  95. package/src/components/diff-changes.tsx +115 -0
  96. package/src/components/dropdown-menu.css +135 -0
  97. package/src/components/dropdown-menu.tsx +308 -0
  98. package/src/components/icon-button.css +181 -0
  99. package/src/components/icon-button.tsx +29 -0
  100. package/src/components/icon.css +39 -0
  101. package/src/{icons/icon/additional-icons.ts → components/icon.tsx} +74 -8
  102. package/src/components/image-preview.tsx +2 -3
  103. package/src/components/keybind.css +18 -0
  104. package/src/components/keybind.tsx +20 -0
  105. package/src/components/list.css +5 -5
  106. package/src/components/list.tsx +5 -7
  107. package/src/components/popover.tsx +2 -3
  108. package/src/components/progress-circle.css +16 -0
  109. package/src/components/progress-circle.tsx +64 -0
  110. package/src/components/provider-icon.tsx +1 -1
  111. package/src/components/radio-group.css +187 -0
  112. package/src/components/radio-group.tsx +83 -0
  113. package/src/components/scroll-view.tsx +20 -5
  114. package/src/components/select.css +201 -0
  115. package/src/components/select.tsx +174 -0
  116. package/src/components/sticky-accordion-header.tsx +1 -1
  117. package/src/components/switch.css +136 -0
  118. package/src/components/switch.tsx +29 -0
  119. package/src/{navigation/tabs → components}/tabs.css +229 -39
  120. package/src/components/tabs.tsx +126 -0
  121. package/src/components/tag.css +37 -0
  122. package/src/components/tag.tsx +22 -0
  123. package/src/components/text-field.tsx +4 -12
  124. package/src/{typography/text-shimmer → components}/text-shimmer.css +1 -2
  125. package/src/{typography/text-shimmer → components}/text-shimmer.tsx +0 -1
  126. package/src/components/toast.css +236 -0
  127. package/src/components/toast.tsx +185 -0
  128. package/src/components/tooltip.css +74 -0
  129. package/src/components/tooltip.tsx +163 -0
  130. package/src/context/i18n.tsx +14 -17
  131. package/src/hooks/create-auto-scroll.tsx +0 -20
  132. package/src/i18n/am.ts +2 -0
  133. package/src/i18n/ar.ts +2 -0
  134. package/src/i18n/az.ts +2 -0
  135. package/src/i18n/bg.ts +2 -0
  136. package/src/i18n/bn.ts +2 -0
  137. package/src/i18n/br.ts +2 -0
  138. package/src/i18n/bs.ts +2 -0
  139. package/src/i18n/ca.ts +2 -0
  140. package/src/i18n/cs.ts +2 -0
  141. package/src/i18n/da.ts +2 -0
  142. package/src/i18n/de.ts +2 -0
  143. package/src/i18n/dv.ts +2 -0
  144. package/src/i18n/dz.ts +2 -0
  145. package/src/i18n/el.ts +2 -0
  146. package/src/i18n/en.ts +4 -18
  147. package/src/i18n/es.ts +2 -0
  148. package/src/i18n/et.ts +2 -0
  149. package/src/i18n/fa.ts +2 -0
  150. package/src/i18n/fi.ts +2 -0
  151. package/src/i18n/fo.ts +2 -0
  152. package/src/i18n/fr.ts +2 -0
  153. package/src/i18n/hi.ts +2 -0
  154. package/src/i18n/hr.ts +2 -0
  155. package/src/i18n/hu.ts +2 -0
  156. package/src/i18n/hy.ts +2 -0
  157. package/src/i18n/id.ts +2 -0
  158. package/src/i18n/is.ts +2 -0
  159. package/src/i18n/it.ts +2 -0
  160. package/src/i18n/ja.ts +2 -0
  161. package/src/i18n/ka.ts +2 -0
  162. package/src/i18n/km.ts +2 -0
  163. package/src/i18n/ko.ts +2 -0
  164. package/src/i18n/lo.ts +2 -0
  165. package/src/i18n/lt.ts +2 -0
  166. package/src/i18n/lv.ts +2 -0
  167. package/src/i18n/mk.ts +2 -0
  168. package/src/i18n/mn.ts +2 -0
  169. package/src/i18n/ms.ts +2 -0
  170. package/src/i18n/my.ts +2 -0
  171. package/src/i18n/ne.ts +2 -0
  172. package/src/i18n/nl.ts +2 -0
  173. package/src/i18n/no.ts +2 -0
  174. package/src/i18n/pa.ts +2 -0
  175. package/src/i18n/pl.ts +2 -0
  176. package/src/i18n/ro.ts +2 -0
  177. package/src/i18n/ru.ts +2 -0
  178. package/src/i18n/si.ts +2 -0
  179. package/src/i18n/sk.ts +2 -0
  180. package/src/i18n/sl.ts +2 -0
  181. package/src/i18n/sq.ts +2 -0
  182. package/src/i18n/sr.ts +2 -0
  183. package/src/i18n/sv.ts +2 -0
  184. package/src/i18n/tg.ts +2 -0
  185. package/src/i18n/th.ts +2 -0
  186. package/src/i18n/tk.ts +2 -0
  187. package/src/i18n/tr.ts +2 -0
  188. package/src/i18n/uk.ts +2 -0
  189. package/src/i18n/ur.ts +2 -0
  190. package/src/i18n/uz.ts +2 -0
  191. package/src/i18n/vi.ts +2 -0
  192. package/src/i18n/zh.ts +2 -0
  193. package/src/i18n/zht.ts +2 -0
  194. package/src/styles/index.css +20 -4
  195. package/src/styles/tailwind/index.css +1 -15
  196. package/src/theme/context.tsx +11 -19
  197. package/src/theme/themes/oc-2.json +1 -1
  198. package/src/v2/components/accordion-v2.css +139 -0
  199. package/src/v2/components/accordion-v2.tsx +86 -0
  200. package/src/{data-display/avatar/avatar.tsx → v2/components/avatar-v2.tsx} +1 -1
  201. package/src/{data-display/badge/badge.css → v2/components/badge-v2.css} +0 -19
  202. package/src/{data-display/badge/badge.tsx → v2/components/badge-v2.tsx} +4 -6
  203. package/src/{actions/button/button.tsx → v2/components/button-v2.tsx} +8 -8
  204. package/src/v2/components/checkbox-v2.css +184 -0
  205. package/src/v2/components/checkbox-v2.tsx +65 -0
  206. package/src/{overlays/dialog/dialog.css → v2/components/dialog-v2.css} +0 -3
  207. package/src/{overlays/dialog/dialog.tsx → v2/components/dialog-v2.tsx} +13 -11
  208. package/src/v2/components/diff-changes-v2.css +26 -0
  209. package/src/{data-display/diff-changes/diff-changes.tsx → v2/components/diff-changes-v2.tsx} +2 -7
  210. package/src/{layout/divider/divider.tsx → v2/components/divider-v2.tsx} +3 -3
  211. package/src/{forms/field/field.tsx → v2/components/field-v2.tsx} +11 -9
  212. package/src/v2/components/icon-button-v2.tsx +37 -0
  213. package/src/{icons/icon → v2/components}/icon.tsx +9 -42
  214. package/src/v2/components/inline-input-v2.css +225 -0
  215. package/src/v2/components/inline-input-v2.tsx +107 -0
  216. package/src/{data-display/keybind/keybind.css → v2/components/keybind-v2.css} +1 -1
  217. package/src/{data-display/keybind/keybind.tsx → v2/components/keybind-v2.tsx} +3 -3
  218. package/src/{data-display/line-comment/line-comment.tsx → v2/components/line-comment-v2.tsx} +15 -17
  219. package/src/{feedback/loader/loader.tsx → v2/components/loader-v2.tsx} +2 -2
  220. package/src/{navigation/menu/menu.css → v2/components/menu-v2.css} +0 -121
  221. package/src/{navigation/menu/menu.tsx → v2/components/menu-v2.tsx} +32 -96
  222. package/src/v2/components/progress-circle-v2.css +13 -0
  223. package/src/v2/components/progress-circle-v2.tsx +52 -0
  224. package/src/{data-display/project-avatar/project-avatar.tsx → v2/components/project-avatar-v2.tsx} +1 -1
  225. package/src/{forms/radio/radio.tsx → v2/components/radio-v2.tsx} +20 -30
  226. package/src/{navigation/segmented-control/segmented-control.tsx → v2/components/segmented-control-v2.tsx} +8 -9
  227. package/src/{forms/select/select.css → v2/components/select-v2.css} +8 -2
  228. package/src/{forms/select/select.tsx → v2/components/select-v2.tsx} +32 -38
  229. package/src/{actions/split-button/split-button.css → v2/components/split-button-v2.css} +6 -1
  230. package/src/{actions/split-button/split-button.tsx → v2/components/split-button-v2.tsx} +4 -4
  231. package/src/{forms/switch/switch.css → v2/components/switch-v2.css} +0 -110
  232. package/src/v2/components/switch-v2.tsx +28 -0
  233. package/src/{navigation/tabs/tabs-current.css → v2/components/tabs-v2.css} +9 -24
  234. package/src/v2/components/tabs-v2.tsx +149 -0
  235. package/src/{forms/text-input/text-input.tsx → v2/components/text-input-v2.tsx} +4 -4
  236. package/src/v2/components/text-shimmer-v2.css +125 -0
  237. package/src/v2/components/text-shimmer-v2.tsx +63 -0
  238. package/src/{forms/textarea/textarea.tsx → v2/components/textarea-v2.tsx} +3 -3
  239. package/src/{feedback/toast/toast.tsx → v2/components/toast-v2.tsx} +58 -60
  240. package/src/{overlays/tooltip/tooltip.css → v2/components/tooltip-v2.css} +0 -26
  241. package/src/{overlays/tooltip/tooltip.tsx → v2/components/tooltip-v2.tsx} +14 -18
  242. package/src/{typography/wordmark/wordmark.tsx → v2/components/wordmark-v2.tsx} +1 -1
  243. package/src/{styles/tokens → v2/styles}/theme.css +12 -0
  244. package/dist/actions/button/button.d.ts +0 -10
  245. package/dist/actions/icon-button/icon-button.d.ts +0 -11
  246. package/dist/actions/split-button/split-button.d.ts +0 -5
  247. package/dist/data-display/badge/badge.d.ts +0 -7
  248. package/dist/data-display/keybind/keybind.d.ts +0 -7
  249. package/dist/feedback/loader/loader.d.ts +0 -3
  250. package/dist/feedback/toast/toast.d.ts +0 -57
  251. package/dist/forms/radio/radio.d.ts +0 -16
  252. package/dist/forms/textarea/textarea.d.ts +0 -7
  253. package/dist/i18n/he.d.ts +0 -197
  254. package/dist/layout/divider/divider.d.ts +0 -5
  255. package/dist/navigation/menu/menu.d.ts +0 -59
  256. package/dist/overlays/tooltip/tooltip.d.ts +0 -14
  257. package/dist/typography/wordmark/wordmark.d.ts +0 -2
  258. package/src/actions/icon-button/icon-button.tsx +0 -32
  259. package/src/feedback/progress-circle/progress-circle.css +0 -28
  260. package/src/feedback/progress-circle/progress-circle.tsx +0 -64
  261. package/src/forms/switch/switch.tsx +0 -34
  262. package/src/i18n/he.ts +0 -199
  263. package/src/icons/icon/icon.css +0 -3
  264. package/src/navigation/tabs/tabs.tsx +0 -194
  265. /package/dist/{forms/inline-input → components}/inline-input.d.ts +0 -0
  266. /package/dist/{navigation → v2/components}/tab-state-indicator.d.ts +0 -0
  267. /package/src/{forms/inline-input → components}/inline-input.css +0 -0
  268. /package/src/{forms/inline-input → components}/inline-input.tsx +0 -0
  269. /package/src/{data-display/avatar/avatar.css → v2/components/avatar-v2.css} +0 -0
  270. /package/src/{actions/button/button.css → v2/components/button-v2.css} +0 -0
  271. /package/src/{layout/divider/divider.css → v2/components/divider-v2.css} +0 -0
  272. /package/src/{forms/field/field.css → v2/components/field-v2.css} +0 -0
  273. /package/src/{styles/file-tree.css → v2/components/file-tree-v2.css} +0 -0
  274. /package/src/{actions/icon-button/icon-button.css → v2/components/icon-button-v2.css} +0 -0
  275. /package/src/{data-display/line-comment/line-comment.css → v2/components/line-comment-v2.css} +0 -0
  276. /package/src/{feedback/loader/loader.css → v2/components/loader-v2.css} +0 -0
  277. /package/src/{data-display/project-avatar/project-avatar.css → v2/components/project-avatar-v2.css} +0 -0
  278. /package/src/{forms/radio/radio.css → v2/components/radio-v2.css} +0 -0
  279. /package/src/{navigation/segmented-control/segmented-control.css → v2/components/segmented-control-v2.css} +0 -0
  280. /package/src/{navigation → v2/components}/tab-state-indicator.tsx +0 -0
  281. /package/src/{forms/text-input/text-input.css → v2/components/text-input-v2.css} +0 -0
  282. /package/src/{forms/textarea/textarea.css → v2/components/textarea-v2.css} +0 -0
  283. /package/src/{feedback/toast/toast.css → v2/components/toast-v2.css} +0 -0
  284. /package/src/{styles/tokens → v2/styles}/colors.css +0 -0
  285. /package/src/{styles/tokens/index.css → v2/styles/tailwind.css} +0 -0
@@ -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,107 @@
1
+ import { type ComponentProps, type JSX, Show, splitProps } from "solid-js"
2
+ import { Icon } from "./icon"
3
+ import { useI18n } from "../../context/i18n"
4
+ import "./inline-input-v2.css"
5
+
6
+ export interface InlineInputV2Props extends Omit<ComponentProps<"input">, "type" | "prefix"> {
7
+ /** Inline label shown before the field (prefix segment). */
8
+ prefix: JSX.Element
9
+ /** Fixed width for the prefix segment (px number or CSS length). Omit for fit-content. */
10
+ labelWidth?: number | string
11
+ /** Show the trailing copy action. */
12
+ showCopyButton?: boolean
13
+ /** Accessible label for the copy button. */
14
+ copyLabel?: string
15
+ onCopyClick?: (event: MouseEvent) => void
16
+ /** Apply tabular numerals to the prefix and field value. */
17
+ numeric?: boolean
18
+ /** Error styling for the field and value text. */
19
+ invalid?: boolean
20
+ /** `base` is 28px tall; `large` is 32px tall. */
21
+ appearance?: "base" | "large"
22
+ type?: ComponentProps<"input">["type"]
23
+ }
24
+
25
+ export function InlineInputV2(props: InlineInputV2Props) {
26
+ const i18n = useI18n()
27
+ const [local, inputProps] = splitProps(props, [
28
+ "class",
29
+ "classList",
30
+ "prefix",
31
+ "labelWidth",
32
+ "showCopyButton",
33
+ "copyLabel",
34
+ "onCopyClick",
35
+ "numeric",
36
+ "invalid",
37
+ "appearance",
38
+ "disabled",
39
+ "style",
40
+ ])
41
+
42
+ let input: HTMLInputElement | undefined
43
+
44
+ return (
45
+ <div
46
+ data-component="inline-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-label-width={local.labelWidth != null ? "" : undefined}
52
+ classList={{
53
+ ...local.classList,
54
+ [local.class ?? ""]: !!local.class,
55
+ }}
56
+ style={{
57
+ ...(typeof local.style === "object" && local.style != null ? local.style : {}),
58
+ ...(local.labelWidth != null
59
+ ? {
60
+ "--inline-input-v2-label-width":
61
+ typeof local.labelWidth === "number" ? `${local.labelWidth}px` : local.labelWidth,
62
+ }
63
+ : {}),
64
+ }}
65
+ >
66
+ <div
67
+ data-slot="inline-input-v2-prefix"
68
+ onMouseDown={(event) => {
69
+ if (local.disabled || event.button !== 0) return
70
+ // Keep focus on the input without using a native <label>, so external labels still work.
71
+ event.preventDefault()
72
+ input?.focus()
73
+ }}
74
+ >
75
+ <span data-slot="inline-input-v2-prefix-text">{local.prefix}</span>
76
+ </div>
77
+ <div data-slot="inline-input-v2-divider" aria-hidden="true" />
78
+ <div data-slot="inline-input-v2-field">
79
+ <div data-slot="inline-input-v2-value">
80
+ <input
81
+ {...inputProps}
82
+ ref={(el) => {
83
+ input = el
84
+ const ref = inputProps.ref
85
+ if (typeof ref === "function") ref(el)
86
+ }}
87
+ type={inputProps.type ?? "text"}
88
+ disabled={local.disabled}
89
+ aria-invalid={local.invalid ? true : undefined}
90
+ data-slot="inline-input-v2-input"
91
+ />
92
+ </div>
93
+ <Show when={local.showCopyButton}>
94
+ <button
95
+ type="button"
96
+ data-slot="inline-input-v2-icon-button"
97
+ aria-label={local.copyLabel ?? i18n.t("ui.message.copy")}
98
+ disabled={local.disabled}
99
+ onClick={local.onCopyClick}
100
+ >
101
+ <Icon name="copy" />
102
+ </button>
103
+ </Show>
104
+ </div>
105
+ </div>
106
+ )
107
+ }
@@ -27,7 +27,6 @@
27
27
  justify-content: center;
28
28
  align-items: center;
29
29
  padding: 0;
30
- padding-inline: 4px;
31
30
  gap: 4px;
32
31
  min-width: 14px;
33
32
  height: 14px;
@@ -49,6 +48,7 @@
49
48
  flex-direction: row;
50
49
  justify-content: center;
51
50
  align-items: center;
51
+ min-width: 14px;
52
52
  height: 11px;
53
53
  padding: 0;
54
54
  flex: none;
@@ -1,12 +1,12 @@
1
1
  import { type ComponentProps, For, splitProps } from "solid-js"
2
- import "./keybind.css"
2
+ import "./keybind-v2.css"
3
3
 
4
- export interface KeybindProps extends ComponentProps<"div"> {
4
+ export interface KeybindV2Props extends ComponentProps<"div"> {
5
5
  keys: string[]
6
6
  variant?: "neutral" | "ghost"
7
7
  }
8
8
 
9
- export function Keybind(props: KeybindProps) {
9
+ export function KeybindV2(props: KeybindV2Props) {
10
10
  const [local, rest] = splitProps(props, ["keys", "variant", "class", "classList"])
11
11
  return (
12
12
  <div
@@ -1,12 +1,12 @@
1
1
  import { For, Show, createSignal, onMount, splitProps, type ComponentProps, type JSX } from "solid-js"
2
- import { FileIcon } from "@opencode-ai/ui/file-icon"
2
+ import { FileIcon } from "../../components/file-icon"
3
3
  import { useI18n } from "../../context/i18n"
4
4
  import { useFilteredList } from "../../hooks"
5
- import { Button } from "@opencode-ai/ui/button"
6
- import "./line-comment.css"
5
+ import { ButtonV2 } from "./button-v2"
6
+ import "./line-comment-v2.css"
7
7
 
8
8
  /** Horizontal “more” glyph for the display-card overflow control (Figma outline-dots). */
9
- export function LineCommentOverflowIcon(props: ComponentProps<"svg">) {
9
+ export function LineCommentV2OverflowIcon(props: ComponentProps<"svg">) {
10
10
  return (
11
11
  <svg
12
12
  {...props}
@@ -24,16 +24,16 @@ export function LineCommentOverflowIcon(props: ComponentProps<"svg">) {
24
24
  )
25
25
  }
26
26
 
27
- export interface LineCommentProps extends ComponentProps<"div"> {
27
+ export interface LineCommentV2Props extends ComponentProps<"div"> {
28
28
  /** Main comment body (text or rich content). */
29
29
  comment: JSX.Element
30
30
  /** Line / selection context (e.g. “Comment on line 40”). */
31
31
  selection: JSX.Element
32
- /** Typically an overflow menu trigger; use `LineCommentOverflowIcon` inside `line-comment-v2-overflow`. */
32
+ /** Typically an overflow menu trigger; use `LineCommentV2OverflowIcon` inside `line-comment-v2-overflow`. */
33
33
  actions?: JSX.Element
34
34
  }
35
35
 
36
- export function LineComment(props: LineCommentProps) {
36
+ export function LineCommentV2(props: LineCommentV2Props) {
37
37
  const [local, rest] = splitProps(props, ["comment", "selection", "actions", "class", "classList"])
38
38
  return (
39
39
  <div
@@ -56,11 +56,11 @@ export function LineComment(props: LineCommentProps) {
56
56
  )
57
57
  }
58
58
 
59
- export type LineCommentEditorMention = {
59
+ export type LineCommentEditorV2Mention = {
60
60
  items: (query: string) => string[] | Promise<string[]>
61
61
  }
62
62
 
63
- export interface LineCommentEditorProps extends Omit<ComponentProps<"div">, "children" | "onInput" | "onSubmit"> {
63
+ export interface LineCommentEditorV2Props extends Omit<ComponentProps<"div">, "children" | "onInput" | "onSubmit"> {
64
64
  /** Visible field label above the textarea (default: “Comment”). */
65
65
  heading?: JSX.Element | string
66
66
  value: string
@@ -73,7 +73,7 @@ export interface LineCommentEditorProps extends Omit<ComponentProps<"div">, "chi
73
73
  cancelLabel?: string
74
74
  submitLabel?: string
75
75
  autofocus?: boolean
76
- mention?: LineCommentEditorMention
76
+ mention?: LineCommentEditorV2Mention
77
77
  }
78
78
 
79
79
  function pathFilename(path: string) {
@@ -86,7 +86,7 @@ function pathDirectory(path: string) {
86
86
  return index === -1 ? "" : path.slice(0, index + 1)
87
87
  }
88
88
 
89
- export function LineCommentEditor(props: LineCommentEditorProps) {
89
+ export function LineCommentEditorV2(props: LineCommentEditorV2Props) {
90
90
  const i18n = useI18n()
91
91
  let textareaRef: HTMLTextAreaElement | undefined
92
92
  const [mentionOpen, setMentionOpen] = createSignal(false)
@@ -212,11 +212,9 @@ export function LineCommentEditor(props: LineCommentEditorProps) {
212
212
  textareaRef = el
213
213
  }}
214
214
  data-slot="line-comment-v2-textarea"
215
- dir="auto"
216
215
  rows={local.rows ?? 3}
217
216
  placeholder={local.placeholder ?? i18n.t("ui.lineComment.contextPlaceholder")}
218
217
  value={local.value}
219
- style={{ "unicode-bidi": "plaintext", "text-align": "start" }}
220
218
  onInput={(e) => {
221
219
  local.onInput(e.currentTarget.value)
222
220
  syncMention()
@@ -294,12 +292,12 @@ export function LineCommentEditor(props: LineCommentEditorProps) {
294
292
  <div data-slot="line-comment-v2-footer">
295
293
  <div data-slot="line-comment-v2-footer-meta">{local.selection}</div>
296
294
  <div data-slot="line-comment-v2-footer-actions">
297
- <Button type="button" size="normal" variant="neutral" onClick={() => local.onCancel()}>
295
+ <ButtonV2 type="button" size="normal" variant="neutral" onClick={() => local.onCancel()}>
298
296
  {local.cancelLabel ?? i18n.t("ui.lineComment.cancel")}
299
- </Button>
300
- <Button type="button" size="normal" variant="contrast" disabled={!canSubmit()} onClick={submit}>
297
+ </ButtonV2>
298
+ <ButtonV2 type="button" size="normal" variant="contrast" disabled={!canSubmit()} onClick={submit}>
301
299
  {local.submitLabel ?? i18n.t("ui.lineComment.submit")}
302
- </Button>
300
+ </ButtonV2>
303
301
  </div>
304
302
  </div>
305
303
  </div>
@@ -1,7 +1,7 @@
1
1
  import { splitProps, type ComponentProps } from "solid-js"
2
- import "./loader.css"
2
+ import "./loader-v2.css"
3
3
 
4
- export function Loader(props: ComponentProps<"svg">) {
4
+ export function LoaderV2(props: ComponentProps<"svg">) {
5
5
  const [local, rest] = splitProps(props, ["class", "classList", "width", "height"])
6
6
  return (
7
7
  <svg
@@ -31,10 +31,6 @@
31
31
  }
32
32
  }
33
33
 
34
- :dir(rtl) [data-slot="menu-v2-item-chevron"] {
35
- transform: scaleX(-1);
36
- }
37
-
38
34
  [data-component="menu-v2-item"] {
39
35
  --menu-v2-fg: var(--v2-text-text-base);
40
36
  --menu-v2-fg-muted: var(--v2-text-text-faint);
@@ -182,123 +178,6 @@
182
178
  font-variant-numeric: tabular-nums;
183
179
  }
184
180
 
185
- [data-component="menu-v2-content"][data-appearance="standard"] {
186
- min-width: 8rem;
187
- padding: 4px;
188
- overflow: hidden;
189
- border: 1px solid color-mix(in oklch, var(--border-base) 50%, transparent);
190
- border-radius: var(--radius-md);
191
- background: var(--surface-raised-stronger-non-alpha);
192
- background-clip: padding-box;
193
- box-shadow: var(--shadow-md);
194
- z-index: 60;
195
- animation: dropdown-menu-open 150ms ease-out;
196
-
197
- &[data-closed] {
198
- animation: dropdown-menu-close 150ms ease-out;
199
- }
200
-
201
- [data-component="menu-v2-item"] {
202
- position: relative;
203
- height: auto;
204
- min-height: 0;
205
- padding: 4px 8px;
206
- border-radius: var(--radius-sm);
207
- color: var(--text-strong);
208
- font-family: var(--font-family-sans);
209
- font-size: var(--font-size-small);
210
- font-weight: var(--font-weight-medium);
211
- line-height: var(--line-height-large);
212
- letter-spacing: var(--letter-spacing-normal);
213
- font-variant-numeric: normal;
214
- -webkit-font-smoothing: auto;
215
- text-rendering: auto;
216
-
217
- [data-slot="menu-v2-item-content"] {
218
- font-family: inherit;
219
- font-size: inherit;
220
- font-weight: inherit;
221
- line-height: inherit;
222
- letter-spacing: inherit;
223
- color: inherit;
224
- }
225
-
226
- &[data-highlighted] {
227
- background: var(--surface-raised-base-hover);
228
- }
229
-
230
- &[data-disabled] {
231
- color: var(--text-weak);
232
- opacity: 1;
233
- }
234
-
235
- &[data-checked] {
236
- padding-inline-end: 28px;
237
- }
238
-
239
- &[data-checked] [data-slot="menu-v2-item-content"] {
240
- font-weight: inherit;
241
- color: inherit;
242
- }
243
-
244
- [data-slot="menu-v2-item-indicator"] {
245
- position: absolute;
246
- inset-inline-end: 8px;
247
- top: 50%;
248
- width: 16px;
249
- height: 16px;
250
- transform: translateY(-50%);
251
- color: var(--icon-base);
252
- }
253
-
254
- [data-slot="menu-v2-item-chevron"] {
255
- margin-inline-start: auto;
256
- color: var(--icon-base);
257
- }
258
- }
259
-
260
- [data-slot="menu-v2-separator"] {
261
- width: calc(100% + 8px);
262
- height: 1px;
263
- margin: 4px -4px;
264
- background: var(--border-weak-base);
265
- }
266
-
267
- [data-slot="menu-v2-group-label"] {
268
- height: auto;
269
- padding: 4px 8px;
270
- color: var(--text-weak);
271
- font-family: var(--font-family-sans);
272
- font-size: var(--font-size-x-small);
273
- font-weight: var(--font-weight-medium);
274
- line-height: var(--line-height-large);
275
- letter-spacing: var(--letter-spacing-normal);
276
- font-variant-numeric: normal;
277
- }
278
- }
279
-
280
- @keyframes dropdown-menu-open {
281
- from {
282
- opacity: 0;
283
- transform: scale(0.96);
284
- }
285
- to {
286
- opacity: 1;
287
- transform: scale(1);
288
- }
289
- }
290
-
291
- @keyframes dropdown-menu-close {
292
- from {
293
- opacity: 1;
294
- transform: scale(1);
295
- }
296
- to {
297
- opacity: 0;
298
- transform: scale(0.96);
299
- }
300
- }
301
-
302
181
  @keyframes menu-v2-in {
303
182
  from {
304
183
  opacity: 0;