@opencode-ai/ui 0.0.0-dev-18909 → 0.0.0-dev-202609021553

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 (296) 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/context/marked-parser.d.ts +2 -1
  25. package/dist/hooks/use-filtered-list.d.ts +0 -9
  26. package/dist/i18n/ar.d.ts +2 -0
  27. package/dist/i18n/bg.d.ts +2 -0
  28. package/dist/i18n/br.d.ts +2 -0
  29. package/dist/i18n/bs.d.ts +2 -0
  30. package/dist/i18n/da.d.ts +2 -0
  31. package/dist/i18n/de.d.ts +2 -0
  32. package/dist/i18n/en.d.ts +1 -230
  33. package/dist/i18n/es.d.ts +2 -0
  34. package/dist/i18n/fr.d.ts +2 -0
  35. package/dist/i18n/ja.d.ts +2 -0
  36. package/dist/i18n/km.d.ts +2 -0
  37. package/dist/i18n/ko.d.ts +2 -0
  38. package/dist/i18n/lo.d.ts +2 -0
  39. package/dist/i18n/mk.d.ts +2 -0
  40. package/dist/i18n/mn.d.ts +2 -0
  41. package/dist/i18n/my.d.ts +2 -0
  42. package/dist/i18n/pl.d.ts +2 -0
  43. package/dist/i18n/ru.d.ts +2 -0
  44. package/dist/i18n/sr.d.ts +2 -0
  45. package/dist/i18n/tg.d.ts +2 -0
  46. package/dist/i18n/th.d.ts +2 -0
  47. package/dist/i18n/tr.d.ts +2 -0
  48. package/dist/i18n/zh.d.ts +2 -0
  49. package/dist/i18n/zht.d.ts +2 -0
  50. package/dist/v2/components/accordion-v2.d.ts +26 -0
  51. package/dist/{data-display/avatar/avatar.d.ts → v2/components/avatar-v2.d.ts} +1 -1
  52. package/dist/v2/components/badge-v2.d.ts +6 -0
  53. package/dist/v2/components/button-v2.d.ts +10 -0
  54. package/dist/v2/components/checkbox-v2.d.ts +10 -0
  55. package/dist/{overlays/dialog/dialog.d.ts → v2/components/dialog-v2.d.ts} +2 -1
  56. package/dist/v2/components/diff-changes-v2.d.ts +11 -0
  57. package/dist/v2/components/divider-v2.d.ts +5 -0
  58. package/dist/{forms/field/field.d.ts → v2/components/field-v2.d.ts} +10 -4
  59. package/dist/v2/components/icon-button-v2.d.ts +11 -0
  60. package/dist/{icons/icon → v2/components}/icon.d.ts +1 -24
  61. package/dist/v2/components/inline-input-v2.d.ts +21 -0
  62. package/dist/v2/components/keybind-v2.d.ts +7 -0
  63. package/dist/{data-display/line-comment/line-comment.d.ts → v2/components/line-comment-v2.d.ts} +9 -9
  64. package/dist/v2/components/loader-v2.d.ts +3 -0
  65. package/dist/v2/components/menu-v2.d.ts +52 -0
  66. package/dist/v2/components/progress-circle-v2.d.ts +8 -0
  67. package/dist/{data-display/project-avatar/project-avatar.d.ts → v2/components/project-avatar-v2.d.ts} +1 -1
  68. package/dist/v2/components/radio-v2.d.ts +16 -0
  69. package/dist/{navigation/segmented-control/segmented-control.d.ts → v2/components/segmented-control-v2.d.ts} +5 -5
  70. package/dist/{forms/select/select.d.ts → v2/components/select-v2.d.ts} +6 -4
  71. package/dist/v2/components/split-button-v2.d.ts +5 -0
  72. package/dist/v2/components/switch-v2.d.ts +7 -0
  73. package/dist/v2/components/tabs-v2.d.ts +34 -0
  74. package/dist/{forms/text-input/text-input.d.ts → v2/components/text-input-v2.d.ts} +3 -3
  75. package/dist/v2/components/text-shimmer-v2.d.ts +9 -0
  76. package/dist/v2/components/textarea-v2.d.ts +7 -0
  77. package/dist/v2/components/toast-v2.d.ts +57 -0
  78. package/dist/v2/components/tooltip-v2.d.ts +13 -0
  79. package/dist/v2/components/wordmark-v2.d.ts +2 -0
  80. package/package.json +34 -140
  81. package/src/{data-display/accordion → components}/accordion.css +31 -5
  82. package/src/{data-display/accordion → components}/accordion.tsx +14 -14
  83. package/src/components/animated-number.css +11 -29
  84. package/src/components/animated-number.tsx +2 -2
  85. package/src/components/avatar.css +49 -0
  86. package/src/components/avatar.tsx +55 -0
  87. package/src/components/button.css +194 -0
  88. package/src/{actions/button → components}/button.tsx +11 -10
  89. package/src/components/card.css +23 -2
  90. package/src/components/card.tsx +4 -4
  91. package/src/{forms/checkbox → components}/checkbox.css +7 -1
  92. package/src/{forms/checkbox → components}/checkbox.tsx +13 -13
  93. package/src/components/collapsible.tsx +2 -2
  94. package/src/components/dialog.css +181 -0
  95. package/src/components/dialog.tsx +72 -0
  96. package/src/{data-display/diff-changes → components}/diff-changes.css +19 -22
  97. package/src/components/diff-changes.tsx +115 -0
  98. package/src/components/dock-surface.css +9 -2
  99. package/src/components/dropdown-menu.css +135 -0
  100. package/src/components/dropdown-menu.tsx +308 -0
  101. package/src/components/icon-button.css +181 -0
  102. package/src/components/icon-button.tsx +29 -0
  103. package/src/components/icon.css +39 -0
  104. package/src/{icons/icon/additional-icons.ts → components/icon.tsx} +74 -8
  105. package/src/components/image-preview.tsx +2 -3
  106. package/src/components/keybind.css +18 -0
  107. package/src/components/keybind.tsx +20 -0
  108. package/src/components/list.css +5 -5
  109. package/src/components/list.tsx +5 -7
  110. package/src/components/popover.tsx +2 -3
  111. package/src/components/progress-circle.css +16 -0
  112. package/src/components/progress-circle.tsx +64 -0
  113. package/src/components/radio-group.css +187 -0
  114. package/src/components/radio-group.tsx +83 -0
  115. package/src/components/scroll-view.tsx +20 -5
  116. package/src/components/select.css +201 -0
  117. package/src/components/select.tsx +174 -0
  118. package/src/components/sticky-accordion-header.tsx +1 -1
  119. package/src/components/switch.css +136 -0
  120. package/src/components/switch.tsx +29 -0
  121. package/src/{navigation/tabs → components}/tabs.css +229 -39
  122. package/src/components/tabs.tsx +126 -0
  123. package/src/components/tag.css +37 -0
  124. package/src/components/tag.tsx +22 -0
  125. package/src/components/text-field.tsx +4 -12
  126. package/src/{typography/text-shimmer → components}/text-shimmer.css +1 -2
  127. package/src/{typography/text-shimmer → components}/text-shimmer.tsx +0 -1
  128. package/src/components/toast.css +236 -0
  129. package/src/components/toast.tsx +185 -0
  130. package/src/components/tooltip.css +74 -0
  131. package/src/components/tooltip.tsx +163 -0
  132. package/src/context/dialog.tsx +0 -1
  133. package/src/context/i18n.tsx +14 -17
  134. package/src/context/marked-parser.tsx +13 -3
  135. package/src/hooks/create-auto-scroll.tsx +0 -20
  136. package/src/i18n/am.ts +9 -7
  137. package/src/i18n/ar.ts +9 -7
  138. package/src/i18n/az.ts +9 -7
  139. package/src/i18n/bg.ts +9 -7
  140. package/src/i18n/bn.ts +9 -7
  141. package/src/i18n/br.ts +9 -7
  142. package/src/i18n/bs.ts +9 -7
  143. package/src/i18n/ca.ts +9 -7
  144. package/src/i18n/cs.ts +9 -7
  145. package/src/i18n/da.ts +9 -7
  146. package/src/i18n/de.ts +3 -1
  147. package/src/i18n/dv.ts +9 -7
  148. package/src/i18n/dz.ts +7 -5
  149. package/src/i18n/el.ts +9 -7
  150. package/src/i18n/en.ts +11 -46
  151. package/src/i18n/es.ts +8 -6
  152. package/src/i18n/et.ts +9 -7
  153. package/src/i18n/fa.ts +9 -7
  154. package/src/i18n/fi.ts +9 -7
  155. package/src/i18n/fo.ts +9 -7
  156. package/src/i18n/fr.ts +8 -6
  157. package/src/i18n/hi.ts +9 -7
  158. package/src/i18n/hr.ts +9 -7
  159. package/src/i18n/hu.ts +9 -7
  160. package/src/i18n/hy.ts +9 -7
  161. package/src/i18n/id.ts +9 -7
  162. package/src/i18n/is.ts +9 -7
  163. package/src/i18n/it.ts +9 -7
  164. package/src/i18n/ja.ts +9 -7
  165. package/src/i18n/ka.ts +9 -7
  166. package/src/i18n/km.ts +9 -7
  167. package/src/i18n/ko.ts +9 -7
  168. package/src/i18n/lo.ts +9 -7
  169. package/src/i18n/lt.ts +9 -7
  170. package/src/i18n/lv.ts +9 -7
  171. package/src/i18n/mk.ts +9 -7
  172. package/src/i18n/mn.ts +9 -7
  173. package/src/i18n/ms.ts +9 -7
  174. package/src/i18n/my.ts +9 -7
  175. package/src/i18n/ne.ts +9 -7
  176. package/src/i18n/nl.ts +9 -7
  177. package/src/i18n/no.ts +9 -7
  178. package/src/i18n/pa.ts +9 -7
  179. package/src/i18n/pl.ts +9 -7
  180. package/src/i18n/ro.ts +9 -7
  181. package/src/i18n/ru.ts +9 -7
  182. package/src/i18n/si.ts +9 -7
  183. package/src/i18n/sk.ts +9 -7
  184. package/src/i18n/sl.ts +9 -7
  185. package/src/i18n/sq.ts +9 -7
  186. package/src/i18n/sr.ts +9 -7
  187. package/src/i18n/sv.ts +9 -7
  188. package/src/i18n/tg.ts +9 -7
  189. package/src/i18n/th.ts +9 -7
  190. package/src/i18n/tk.ts +9 -7
  191. package/src/i18n/tr.ts +9 -7
  192. package/src/i18n/uk.ts +9 -7
  193. package/src/i18n/ur.ts +9 -7
  194. package/src/i18n/uz.ts +9 -7
  195. package/src/i18n/vi.ts +9 -7
  196. package/src/i18n/zh.ts +9 -7
  197. package/src/i18n/zht.ts +9 -7
  198. package/src/styles/base.css +0 -5
  199. package/src/styles/index.css +20 -4
  200. package/src/styles/tailwind/colors.css +0 -1
  201. package/src/styles/tailwind/index.css +1 -18
  202. package/src/styles/theme.css +2 -2
  203. package/src/theme/context.tsx +11 -19
  204. package/src/theme/themes/oc-2.json +1 -3
  205. package/src/theme/v2/foreground.ts +0 -1
  206. package/src/theme/v2/mapping.ts +0 -4
  207. package/src/v2/components/accordion-v2.css +139 -0
  208. package/src/v2/components/accordion-v2.tsx +86 -0
  209. package/src/{data-display/avatar/avatar.tsx → v2/components/avatar-v2.tsx} +1 -1
  210. package/src/{data-display/badge/badge.css → v2/components/badge-v2.css} +0 -19
  211. package/src/{data-display/badge/badge.tsx → v2/components/badge-v2.tsx} +4 -6
  212. package/src/v2/components/button-v2.tsx +35 -0
  213. package/src/v2/components/checkbox-v2.css +184 -0
  214. package/src/v2/components/checkbox-v2.tsx +65 -0
  215. package/src/{overlays/dialog/dialog.css → v2/components/dialog-v2.css} +0 -3
  216. package/src/{overlays/dialog/dialog.tsx → v2/components/dialog-v2.tsx} +13 -11
  217. package/src/v2/components/diff-changes-v2.css +26 -0
  218. package/src/{data-display/diff-changes/diff-changes.tsx → v2/components/diff-changes-v2.tsx} +2 -7
  219. package/src/{layout/divider/divider.tsx → v2/components/divider-v2.tsx} +3 -3
  220. package/src/{forms/field/field.css → v2/components/field-v2.css} +1 -1
  221. package/src/{forms/field/field.tsx → v2/components/field-v2.tsx} +11 -9
  222. package/src/v2/components/icon-button-v2.tsx +37 -0
  223. package/src/{icons/icon → v2/components}/icon.tsx +9 -50
  224. package/src/v2/components/inline-input-v2.css +225 -0
  225. package/src/v2/components/inline-input-v2.tsx +107 -0
  226. package/src/{data-display/keybind/keybind.css → v2/components/keybind-v2.css} +1 -1
  227. package/src/{data-display/keybind/keybind.tsx → v2/components/keybind-v2.tsx} +3 -3
  228. package/src/{data-display/line-comment/line-comment.css → v2/components/line-comment-v2.css} +4 -4
  229. package/src/{data-display/line-comment/line-comment.tsx → v2/components/line-comment-v2.tsx} +15 -17
  230. package/src/{feedback/loader/loader.tsx → v2/components/loader-v2.tsx} +2 -2
  231. package/src/{navigation/menu/menu.css → v2/components/menu-v2.css} +2 -123
  232. package/src/{navigation/menu/menu.tsx → v2/components/menu-v2.tsx} +32 -96
  233. package/src/v2/components/progress-circle-v2.css +13 -0
  234. package/src/v2/components/progress-circle-v2.tsx +52 -0
  235. package/src/{data-display/project-avatar/project-avatar.tsx → v2/components/project-avatar-v2.tsx} +1 -1
  236. package/src/{forms/radio/radio.tsx → v2/components/radio-v2.tsx} +20 -30
  237. package/src/{navigation/segmented-control/segmented-control.css → v2/components/segmented-control-v2.css} +1 -1
  238. package/src/{navigation/segmented-control/segmented-control.tsx → v2/components/segmented-control-v2.tsx} +8 -9
  239. package/src/{forms/select/select.css → v2/components/select-v2.css} +8 -2
  240. package/src/{forms/select/select.tsx → v2/components/select-v2.tsx} +32 -38
  241. package/src/{actions/split-button/split-button.css → v2/components/split-button-v2.css} +6 -1
  242. package/src/{actions/split-button/split-button.tsx → v2/components/split-button-v2.tsx} +4 -4
  243. package/src/{forms/switch/switch.css → v2/components/switch-v2.css} +0 -110
  244. package/src/v2/components/switch-v2.tsx +28 -0
  245. package/src/{navigation/tabs/tabs-current.css → v2/components/tabs-v2.css} +10 -25
  246. package/src/v2/components/tabs-v2.tsx +149 -0
  247. package/src/{forms/text-input/text-input.css → v2/components/text-input-v2.css} +1 -1
  248. package/src/{forms/text-input/text-input.tsx → v2/components/text-input-v2.tsx} +4 -4
  249. package/src/v2/components/text-shimmer-v2.css +125 -0
  250. package/src/v2/components/text-shimmer-v2.tsx +63 -0
  251. package/src/{forms/textarea/textarea.tsx → v2/components/textarea-v2.tsx} +3 -3
  252. package/src/{feedback/toast/toast.tsx → v2/components/toast-v2.tsx} +58 -60
  253. package/src/{overlays/tooltip/tooltip.css → v2/components/tooltip-v2.css} +0 -26
  254. package/src/{overlays/tooltip/tooltip.tsx → v2/components/tooltip-v2.tsx} +17 -24
  255. package/src/{typography/wordmark/wordmark.tsx → v2/components/wordmark-v2.tsx} +1 -1
  256. package/src/{styles/tokens → v2/styles}/theme.css +14 -18
  257. package/dist/actions/button/button.d.ts +0 -10
  258. package/dist/actions/icon-button/icon-button.d.ts +0 -11
  259. package/dist/actions/split-button/split-button.d.ts +0 -5
  260. package/dist/context/marked-base.d.ts +0 -3
  261. package/dist/data-display/badge/badge.d.ts +0 -7
  262. package/dist/data-display/keybind/keybind.d.ts +0 -7
  263. package/dist/feedback/loader/loader.d.ts +0 -3
  264. package/dist/feedback/toast/toast.d.ts +0 -57
  265. package/dist/forms/radio/radio.d.ts +0 -16
  266. package/dist/forms/textarea/textarea.d.ts +0 -7
  267. package/dist/i18n/he.d.ts +0 -197
  268. package/dist/layout/divider/divider.d.ts +0 -5
  269. package/dist/navigation/menu/menu.d.ts +0 -59
  270. package/dist/overlays/tooltip/tooltip.d.ts +0 -15
  271. package/dist/typography/wordmark/wordmark.d.ts +0 -2
  272. package/src/actions/icon-button/icon-button.tsx +0 -32
  273. package/src/context/marked-base.tsx +0 -27
  274. package/src/feedback/progress-circle/progress-circle.css +0 -28
  275. package/src/feedback/progress-circle/progress-circle.tsx +0 -64
  276. package/src/forms/switch/switch.tsx +0 -34
  277. package/src/i18n/he.ts +0 -199
  278. package/src/icons/icon/icon.css +0 -3
  279. package/src/navigation/tabs/tabs.tsx +0 -194
  280. /package/dist/{forms/inline-input → components}/inline-input.d.ts +0 -0
  281. /package/dist/{navigation → v2/components}/tab-state-indicator.d.ts +0 -0
  282. /package/src/{forms/inline-input → components}/inline-input.css +0 -0
  283. /package/src/{forms/inline-input → components}/inline-input.tsx +0 -0
  284. /package/src/{data-display/avatar/avatar.css → v2/components/avatar-v2.css} +0 -0
  285. /package/src/{actions/button/button.css → v2/components/button-v2.css} +0 -0
  286. /package/src/{layout/divider/divider.css → v2/components/divider-v2.css} +0 -0
  287. /package/src/{styles/file-tree.css → v2/components/file-tree-v2.css} +0 -0
  288. /package/src/{actions/icon-button/icon-button.css → v2/components/icon-button-v2.css} +0 -0
  289. /package/src/{feedback/loader/loader.css → v2/components/loader-v2.css} +0 -0
  290. /package/src/{data-display/project-avatar/project-avatar.css → v2/components/project-avatar-v2.css} +0 -0
  291. /package/src/{forms/radio/radio.css → v2/components/radio-v2.css} +0 -0
  292. /package/src/{navigation → v2/components}/tab-state-indicator.tsx +0 -0
  293. /package/src/{forms/textarea/textarea.css → v2/components/textarea-v2.css} +0 -0
  294. /package/src/{feedback/toast/toast.css → v2/components/toast-v2.css} +0 -0
  295. /package/src/{styles/tokens → v2/styles}/colors.css +0 -0
  296. /package/src/{styles/tokens/index.css → v2/styles/tailwind.css} +0 -0
@@ -0,0 +1,184 @@
1
+ [data-slot="checkbox-v2"] {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 6px;
5
+ cursor: default;
6
+
7
+ &:where([data-disabled]) {
8
+ cursor: not-allowed;
9
+ }
10
+
11
+ [data-slot="checkbox-v2-error"] {
12
+ color: var(--v2-state-fg-danger);
13
+ font-size: 12px;
14
+ font-weight: var(--font-weight-regular);
15
+ line-height: var(--line-height-normal);
16
+ letter-spacing: var(--letter-spacing-normal);
17
+ }
18
+
19
+ [data-slot="checkbox-v2-error"]:empty {
20
+ display: none;
21
+ }
22
+ }
23
+
24
+ [data-slot="checkbox-v2-row"] {
25
+ position: relative;
26
+ display: flex;
27
+ flex-direction: row;
28
+ align-items: flex-start;
29
+ padding: 0px;
30
+ gap: 8px;
31
+
32
+ [data-slot="checkbox-v2-input"] {
33
+ position: absolute;
34
+ width: 1px;
35
+ height: 1px;
36
+ padding: 0;
37
+ margin: -1px;
38
+ overflow: hidden;
39
+ clip: rect(0, 0, 0, 0);
40
+ white-space: nowrap;
41
+ border-width: 0;
42
+ }
43
+
44
+ [data-slot="checkbox-v2-control-stack"] {
45
+ position: relative;
46
+ width: 16px;
47
+ height: 20px;
48
+ flex: none;
49
+ }
50
+
51
+ [data-slot="checkbox-v2-control"] {
52
+ box-sizing: border-box;
53
+ position: absolute;
54
+ width: 16px;
55
+ height: 16px;
56
+ flex: none;
57
+ flex-shrink: 0;
58
+ left: 0;
59
+ top: calc(50% - 16px / 2);
60
+ border-radius: 4px;
61
+ border: none;
62
+ box-shadow: inset 0 0 0 0.5px var(--v2-border-border-strong);
63
+
64
+ background:
65
+ linear-gradient(180deg, var(--v2-alpha-light-6) 0%, var(--v2-alpha-light-0) 100%), var(--v2-background-bg-base);
66
+ transition:
67
+ background 170ms ease-out,
68
+ opacity 170ms ease-out,
69
+ outline-color 170ms ease-out;
70
+ }
71
+
72
+ [data-slot="checkbox-v2-indicator"] {
73
+ position: absolute;
74
+ inset: 0;
75
+ width: 16px;
76
+ height: 16px;
77
+ pointer-events: none;
78
+ }
79
+
80
+ [data-slot="checkbox-v2-text"] {
81
+ display: flex;
82
+ flex-direction: column;
83
+ justify-content: center;
84
+ align-items: flex-start;
85
+ padding: 0px;
86
+ gap: 6px;
87
+ }
88
+
89
+ [data-slot="checkbox-v2-label"] {
90
+ display: inline-flex;
91
+ user-select: none;
92
+ color: inherit;
93
+ font-style: normal;
94
+ font-weight: 440;
95
+ font-variant-numeric: tabular-nums;
96
+ font-variation-settings: "slnt" 0;
97
+ }
98
+
99
+ [data-slot="checkbox-v2-label-text"] {
100
+ display: inline-flex;
101
+ align-items: center;
102
+ user-select: none;
103
+ color: var(--v2-text-text-base);
104
+ font-size: 13px;
105
+ line-height: 20px;
106
+ letter-spacing: -0.04px;
107
+ }
108
+
109
+ [data-slot="checkbox-v2-description"] {
110
+ color: var(--v2-text-text-muted);
111
+ font-size: 11px;
112
+ font-weight: 440;
113
+ line-height: 1;
114
+ letter-spacing: 0.05px;
115
+ font-variant-numeric: tabular-nums;
116
+ user-select: none;
117
+ }
118
+ }
119
+
120
+ [data-slot="checkbox-v2"]:where(:not([data-readonly]))
121
+ [data-slot="checkbox-v2-input"]:focus-visible
122
+ ~ [data-slot="checkbox-v2-control-stack"]
123
+ [data-slot="checkbox-v2-control"] {
124
+ outline: 2px solid var(--v2-border-border-focus);
125
+ outline-offset: 1px;
126
+ }
127
+
128
+ [data-slot="checkbox-v2"]:where(:hover):where(:not([data-disabled], [data-readonly], [data-invalid])):where(
129
+ :not([data-checked], [data-indeterminate])
130
+ )
131
+ [data-slot="checkbox-v2-control"] {
132
+ background:
133
+ linear-gradient(0deg, var(--v2-overlay-simple-overlay-hover), var(--v2-overlay-simple-overlay-hover)),
134
+ linear-gradient(180deg, var(--v2-alpha-light-6) 0%, var(--v2-alpha-light-0) 100%), var(--v2-background-bg-base);
135
+ }
136
+
137
+ [data-slot="checkbox-v2"]:where([data-disabled]) [data-slot="checkbox-v2-control"] {
138
+ opacity: 0.5;
139
+ }
140
+
141
+ [data-slot="checkbox-v2"]:where([data-checked], [data-indeterminate]) [data-slot="checkbox-v2-control"] {
142
+ background:
143
+ linear-gradient(180deg, var(--v2-alpha-light-20) 0%, var(--v2-alpha-light-0) 100%), var(--v2-background-bg-accent);
144
+ }
145
+
146
+ [data-slot="checkbox-v2"]:where([data-checked], [data-indeterminate]):where(:hover):where(
147
+ :not([data-disabled], [data-readonly])
148
+ )
149
+ [data-slot="checkbox-v2-control"] {
150
+ background:
151
+ linear-gradient(
152
+ 0deg,
153
+ var(--v2-overlay-simple-overlay-contrast-hover),
154
+ var(--v2-overlay-simple-overlay-contrast-hover)
155
+ ),
156
+ linear-gradient(180deg, var(--v2-alpha-light-20) 0%, var(--v2-alpha-light-0) 100%), var(--v2-background-bg-accent);
157
+ }
158
+
159
+ [data-slot="checkbox-v2"]:where([data-invalid]):where(:not([data-checked], [data-indeterminate]))
160
+ [data-slot="checkbox-v2-control"] {
161
+ background: var(--v2-state-bg-danger);
162
+ box-shadow: inset 0 0 0 0.5px var(--v2-state-border-danger);
163
+ }
164
+
165
+ [data-slot="checkbox-v2"] .checkbox-v2-icon {
166
+ position: absolute;
167
+ left: 50%;
168
+ top: 50%;
169
+ transform: translate(-50%, -50%);
170
+ display: none;
171
+ }
172
+
173
+ [data-slot="checkbox-v2"]:where([data-checked]):where(:not([data-indeterminate])) .checkbox-v2-icon--check {
174
+ display: block;
175
+ }
176
+
177
+ [data-slot="checkbox-v2"]:where([data-indeterminate]) .checkbox-v2-icon--minus {
178
+ display: block;
179
+ }
180
+
181
+ [data-slot="checkbox-v2"]:where([data-disabled]) [data-slot="checkbox-v2-label"],
182
+ [data-slot="checkbox-v2"]:where([data-disabled]) [data-slot="checkbox-v2-description"] {
183
+ opacity: 0.5;
184
+ }
@@ -0,0 +1,65 @@
1
+ import { Checkbox as Kobalte } from "@kobalte/core/checkbox"
2
+ import { Show, splitProps, type JSX } from "solid-js"
3
+ import type { ComponentProps } from "solid-js"
4
+ import "./checkbox-v2.css"
5
+
6
+ export interface CheckboxV2Props extends ComponentProps<typeof Kobalte> {
7
+ label: JSX.Element
8
+ description?: JSX.Element
9
+ hideLabel?: boolean
10
+ }
11
+
12
+ export function CheckboxV2(props: CheckboxV2Props) {
13
+ const [local, others] = splitProps(props, ["class", "classList", "label", "description", "hideLabel"])
14
+ return (
15
+ <Kobalte
16
+ {...others}
17
+ data-slot="checkbox-v2"
18
+ classList={{
19
+ ...local.classList,
20
+ [local.class ?? ""]: !!local.class,
21
+ }}
22
+ >
23
+ <div data-slot="checkbox-v2-row">
24
+ <Kobalte.Input data-slot="checkbox-v2-input" />
25
+ <div data-slot="checkbox-v2-control-stack">
26
+ <Kobalte.Control data-slot="checkbox-v2-control">
27
+ <Kobalte.Indicator data-slot="checkbox-v2-indicator">
28
+ <svg
29
+ class="checkbox-v2-icon checkbox-v2-icon--check"
30
+ width="16"
31
+ height="16"
32
+ viewBox="0 0 16 16"
33
+ fill="none"
34
+ xmlns="http://www.w3.org/2000/svg"
35
+ aria-hidden="true"
36
+ >
37
+ <path d="M3.53564 8.17857L6.39279 11.75L12.4642 4.25" stroke="#FAFAFA" stroke-width="1" />
38
+ </svg>
39
+ <svg
40
+ class="checkbox-v2-icon checkbox-v2-icon--minus"
41
+ width="16"
42
+ height="16"
43
+ viewBox="0 0 16 16"
44
+ fill="none"
45
+ xmlns="http://www.w3.org/2000/svg"
46
+ aria-hidden="true"
47
+ >
48
+ <path d="M12.75 8H3.25" stroke="#FAFAFA" stroke-linejoin="round" stroke-width="1" />
49
+ </svg>
50
+ </Kobalte.Indicator>
51
+ </Kobalte.Control>
52
+ </div>
53
+ <Kobalte.Label data-slot="checkbox-v2-label" classList={{ "sr-only": local.hideLabel }}>
54
+ <div data-slot="checkbox-v2-text">
55
+ <span data-slot="checkbox-v2-label-text">{local.label}</span>
56
+ <Show when={local.description}>
57
+ {(description) => <span data-slot="checkbox-v2-description">{description()}</span>}
58
+ </Show>
59
+ </div>
60
+ </Kobalte.Label>
61
+ </div>
62
+ <Kobalte.ErrorMessage data-slot="checkbox-v2-error" />
63
+ </Kobalte>
64
+ )
65
+ }
@@ -93,9 +93,6 @@
93
93
  [data-slot="dialog-description"] {
94
94
  flex: none;
95
95
  flex-grow: 0;
96
- min-width: 0;
97
- max-width: 100%;
98
- overflow-wrap: anywhere;
99
96
  user-select: none;
100
97
  font-weight: 440;
101
98
  font-size: 13px;
@@ -1,7 +1,7 @@
1
- import { CloseButton, Content, Description, Title } from "@kobalte/core/dialog"
1
+ import { Dialog as Kobalte } from "@kobalte/core/dialog"
2
2
  import { type ComponentProps, type JSXElement, type ParentProps, Show, children, splitProps } from "solid-js"
3
3
  import { useI18n } from "../../context/i18n"
4
- import "./dialog.css"
4
+ import "./dialog-v2.css"
5
5
 
6
6
  export interface DialogProps extends ParentProps {
7
7
  size?: "normal" | "large" | "x-large"
@@ -36,7 +36,7 @@ export function DialogBody(props: ParentProps & { class?: ComponentProps<"div">[
36
36
  }
37
37
 
38
38
  export function DialogTitle(props: ParentProps) {
39
- return <Title data-slot="dialog-header-title">{props.children}</Title>
39
+ return <Kobalte.Title data-slot="dialog-header-title">{props.children}</Kobalte.Title>
40
40
  }
41
41
 
42
42
  export function DialogTitleGroup(props: DialogTitleGroupProps) {
@@ -45,8 +45,8 @@ export function DialogTitleGroup(props: DialogTitleGroupProps) {
45
45
 
46
46
  return (
47
47
  <div data-slot="dialog-title-group">
48
- <Show when={title()}>{(t) => <Title data-slot="dialog-title">{t()}</Title>}</Show>
49
- <Description data-slot="dialog-description">{description()}</Description>
48
+ <Show when={title()}>{(t) => <Kobalte.Title data-slot="dialog-title">{t()}</Kobalte.Title>}</Show>
49
+ <Kobalte.Description data-slot="dialog-description">{description()}</Kobalte.Description>
50
50
  </div>
51
51
  )
52
52
  }
@@ -59,8 +59,8 @@ export function DialogHeader(props: DialogHeaderProps) {
59
59
  return (
60
60
  <div data-slot="dialog-header" data-hide-close={hideClose() ? "" : undefined}>
61
61
  {local.children}
62
- <Show when={!hideClose()}>
63
- <CloseButton data-slot="dialog-close-button" aria-label={local.closeLabel ?? i18n.t("ui.common.close")}>
62
+ {!hideClose() && (
63
+ <Kobalte.CloseButton data-slot="dialog-close-button" aria-label={local.closeLabel ?? i18n.t("ui.common.close")}>
64
64
  <svg
65
65
  width="16"
66
66
  height="16"
@@ -75,8 +75,8 @@ export function DialogHeader(props: DialogHeaderProps) {
75
75
  stroke-linejoin="round"
76
76
  />
77
77
  </svg>
78
- </CloseButton>
79
- </Show>
78
+ </Kobalte.CloseButton>
79
+ )}
80
80
  </div>
81
81
  )
82
82
  }
@@ -92,7 +92,7 @@ export function Dialog(props: DialogProps) {
92
92
  data-size={local.size || "normal"}
93
93
  >
94
94
  <div data-slot="dialog-container" class={local.containerClass}>
95
- <Content
95
+ <Kobalte.Content
96
96
  data-slot="dialog-content"
97
97
  classList={{
98
98
  ...local.classList,
@@ -108,8 +108,10 @@ export function Dialog(props: DialogProps) {
108
108
  }}
109
109
  >
110
110
  {local.children}
111
- </Content>
111
+ </Kobalte.Content>
112
112
  </div>
113
113
  </div>
114
114
  )
115
115
  }
116
+
117
+ export const DialogV2 = Dialog
@@ -0,0 +1,26 @@
1
+ [data-component="diff-changes"] {
2
+ display: flex;
3
+ direction: ltr;
4
+ unicode-bidi: isolate;
5
+ gap: 8px;
6
+ justify-content: flex-end;
7
+ align-items: center;
8
+
9
+ [data-slot="diff-changes-additions"],
10
+ [data-slot="diff-changes-deletions"] {
11
+ font-size: 11px;
12
+ font-style: normal;
13
+ font-weight: 440;
14
+ line-height: 1;
15
+ letter-spacing: 0.05px;
16
+ text-align: right;
17
+ }
18
+
19
+ [data-slot="diff-changes-additions"] {
20
+ color: var(--v2-state-fg-success);
21
+ }
22
+
23
+ [data-slot="diff-changes-deletions"] {
24
+ color: var(--v2-state-fg-danger);
25
+ }
26
+ }
@@ -1,9 +1,8 @@
1
1
  import { createMemo, Show } from "solid-js"
2
- import "./diff-changes.css"
2
+ import "./diff-changes-v2.css"
3
3
 
4
4
  export function DiffChanges(props: {
5
5
  class?: string
6
- appearance?: "standard" | "compact"
7
6
  changes: { additions: number; deletions: number } | { additions: number; deletions: number }[]
8
7
  }) {
9
8
  const additions = createMemo(() =>
@@ -20,11 +19,7 @@ export function DiffChanges(props: {
20
19
 
21
20
  return (
22
21
  <Show when={total() > 0}>
23
- <div
24
- data-component="diff-changes"
25
- data-appearance={props.appearance ?? "compact"}
26
- classList={{ [props.class ?? ""]: true }}
27
- >
22
+ <div data-component="diff-changes" classList={{ [props.class ?? ""]: true }}>
28
23
  <span data-slot="diff-changes-additions">{`+${additions()}`}</span>
29
24
  <span data-slot="diff-changes-deletions">{`-${deletions()}`}</span>
30
25
  </div>
@@ -1,9 +1,9 @@
1
1
  import { type ComponentProps, splitProps } from "solid-js"
2
- import "./divider.css"
2
+ import "./divider-v2.css"
3
3
 
4
- export interface DividerProps extends ComponentProps<"div"> {}
4
+ export interface DividerV2Props extends ComponentProps<"div"> {}
5
5
 
6
- export function Divider(props: DividerProps) {
6
+ export function DividerV2(props: DividerV2Props) {
7
7
  const [local, rest] = splitProps(props, ["class", "classList"])
8
8
  return (
9
9
  <div
@@ -20,7 +20,7 @@
20
20
  font-style: normal;
21
21
  font-weight: 530;
22
22
  font-size: 13px;
23
- line-height: var(--line-height-compact);
23
+ line-height: 1;
24
24
  letter-spacing: -0.04px;
25
25
  color: var(--v2-text-text-base);
26
26
  font-variation-settings: "slnt" 0;
@@ -11,8 +11,8 @@ import {
11
11
  type ComponentProps,
12
12
  type ParentProps,
13
13
  } from "solid-js"
14
- import { Tooltip } from "@opencode-ai/ui/tooltip"
15
- import "./field.css"
14
+ import { TooltipV2 } from "./tooltip-v2"
15
+ import "./field-v2.css"
16
16
 
17
17
  type FieldContextValue = {
18
18
  controlId: string
@@ -40,14 +40,14 @@ function useField() {
40
40
  const CONTROL_SELECTOR = [
41
41
  "[data-slot='text-input-v2-input']",
42
42
  "[data-slot='textarea-v2-textarea']",
43
- "[data-component='inline-input']",
43
+ "[data-slot='inline-input-v2-input']",
44
44
  ].join(", ")
45
45
 
46
- export interface FieldProps extends ComponentProps<"div"> {
46
+ export interface FieldV2Props extends ComponentProps<"div"> {
47
47
  invalid?: boolean
48
48
  }
49
49
 
50
- function FieldRoot(props: ParentProps<FieldProps>) {
50
+ function FieldV2Root(props: ParentProps<FieldV2Props>) {
51
51
  const [local, rest] = splitProps(props, ["invalid", "class", "classList", "children"])
52
52
 
53
53
  const controlId = `field-control-${createUniqueId()}`
@@ -86,7 +86,7 @@ function FieldRoot(props: ParentProps<FieldProps>) {
86
86
  if (!control) return
87
87
 
88
88
  const shell = control.closest(
89
- "[data-component='text-input-v2'], [data-component='textarea-v2'], [data-component='inline-input']",
89
+ "[data-component='text-input-v2'], [data-component='textarea-v2'], [data-component='inline-input-v2']",
90
90
  ) as HTMLElement | null
91
91
 
92
92
  control.id = controlId
@@ -173,7 +173,7 @@ function FieldLabel(props: ParentProps<FieldLabelProps>) {
173
173
  <span data-slot="field-v2-label-text">{local.children}</span>
174
174
  <Show when={local.tooltip}>
175
175
  {(tooltip) => (
176
- <Tooltip value={tooltip()}>
176
+ <TooltipV2 value={tooltip()}>
177
177
  <button
178
178
  type="button"
179
179
  data-slot="field-v2-label-info"
@@ -182,7 +182,7 @@ function FieldLabel(props: ParentProps<FieldLabelProps>) {
182
182
  >
183
183
  <FieldLabelInfoIcon />
184
184
  </button>
185
- </Tooltip>
185
+ </TooltipV2>
186
186
  )}
187
187
  </Show>
188
188
  </label>
@@ -255,9 +255,11 @@ function FieldControl(props: ParentProps<ComponentProps<"div">>) {
255
255
  )
256
256
  }
257
257
 
258
- export const Field = Object.assign(FieldRoot, {
258
+ export const FieldV2 = Object.assign(FieldV2Root, {
259
259
  Label: FieldLabel,
260
260
  Prefix: FieldPrefix,
261
261
  Suffix: FieldSuffix,
262
262
  Control: FieldControl,
263
263
  })
264
+
265
+ export const Field = FieldV2
@@ -0,0 +1,37 @@
1
+ import { Button as Kobalte } from "@kobalte/core/button"
2
+ import { type ComponentProps, splitProps } from "solid-js"
3
+ import { JSX } from "solid-js"
4
+ import "./icon-button-v2.css"
5
+
6
+ export interface IconButtonV2Props
7
+ extends ComponentProps<typeof Kobalte>,
8
+ Pick<ComponentProps<"button">, "class" | "classList"> {
9
+ // temporary
10
+ icon?: JSX.Element
11
+ // icon: IconProps["name"]
12
+ size?: "small" | "normal" | "large"
13
+ // iconSize?: IconProps["size"]
14
+ variant?: "neutral" | "contrast" | "ghost" | "ghost-muted"
15
+ state?: "rest" | "hover" | "pressed"
16
+ }
17
+
18
+ export function IconButtonV2(props: ComponentProps<"button"> & IconButtonV2Props) {
19
+ const [split, rest] = splitProps(props, ["variant", "size", "iconSize", "class", "classList", "state"])
20
+ return (
21
+ <Kobalte
22
+ {...rest}
23
+ data-component="icon-button-v2"
24
+ // data-icon={props.icon}
25
+ data-size={split.size || "normal"}
26
+ data-variant={split.variant || "neutral"}
27
+ data-state={split.state}
28
+ classList={{
29
+ ...split.classList,
30
+ [split.class ?? ""]: !!split.class,
31
+ }}
32
+ >
33
+ {props.icon}
34
+ {/*<Icon name={props.icon} size={split.iconSize ?? (split.size === "large" ? "normal" : "small")} />*/}
35
+ </Kobalte>
36
+ )
37
+ }
@@ -1,8 +1,5 @@
1
1
  import { onMount, type ComponentProps, splitProps } from "solid-js"
2
- import { additionalIcons, additionalIconViewBox } from "./additional-icons"
3
- import "./icon.css"
4
2
 
5
- // Consumers center the SVG viewport, so each icon must center its artwork within its viewBox.
6
3
  const icons = {
7
4
  edit: {
8
5
  viewBox: "0 0 16 16",
@@ -20,10 +17,6 @@ const icons = {
20
17
  viewBox: "0 0 16 16",
21
18
  body: `<path d="M5.118 5.686V10.314M5.118 5.686C5.97 5.686 6.661 4.995 6.661 4.143C6.661 3.291 5.97 2.6 5.118 2.6C4.266 2.6 3.575 3.291 3.575 4.143C3.575 4.995 4.266 5.686 5.118 5.686ZM5.118 10.314C4.266 10.314 3.575 11.005 3.575 11.857C3.575 12.709 4.266 13.4 5.118 13.4C5.97 13.4 6.661 12.709 6.661 11.857M5.118 10.314C5.97 10.314 6.661 11.005 6.661 11.857M10.882 5.686C11.734 5.686 12.425 4.995 12.425 4.143C12.425 3.291 11.734 2.6 10.882 2.6C10.03 2.6 9.339 3.291 9.339 4.143C9.339 4.995 10.03 5.686 10.882 5.686ZM10.882 5.686V9.457C10.882 10.783 9.807 11.857 8.482 11.857H6.661" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>`,
22
19
  },
23
- "branch-out": {
24
- viewBox: "0 0 16 16",
25
- body: `<path d="M10.4225 3.35355L12.9024 5.83344L10.4225 8.31333" stroke="currentColor"/><path d="M1 12.2852H4.23042C4.89912 12.2852 5.52359 11.951 5.89452 11.3946L9.00783 6.72462C8.37877 6.16823 10.0032 5.83402 10.6719 5.83402H12.9024" stroke="currentColor"/><path d="M8.5 12.2852H14" stroke="currentColor" stroke-linejoin="round"/>`,
26
- },
27
20
  "grid-plus": {
28
21
  viewBox: "0 0 16 16",
29
22
  body: `<path d="M13.9948 11.668H9.32812M11.6641 9.33203V13.9987M6.66667 9.33203V13.9987H2V9.33203H6.66667ZM6.66667 2V6.66667H2V2H6.66667ZM13.9948 2V6.66667H9.32812V2H13.9948Z" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`,
@@ -32,10 +25,6 @@ const icons = {
32
25
  viewBox: "0 0 16 16",
33
26
  body: `<path d="M6.33345 6.33349V5.00015H9.66679V7.00015L8.00015 8.00015V9.66679M8.27485 11.6819H7.71897M14.4446 8.00011C14.4446 11.5593 11.5593 14.4446 8.00011 14.4446C4.44094 14.4446 1.55566 11.5593 1.55566 8.00011C1.55566 4.44094 4.44094 1.55566 8.00011 1.55566C11.5593 1.55566 14.4446 4.44094 14.4446 8.00011Z" stroke="currentColor" stroke-linecap="square"/>`,
34
27
  },
35
- "circle-exclamation": {
36
- viewBox: "0 0 16 16",
37
- body: `<path d="M8.75 11.75H7.25V10.25H8.75V11.75Z" fill="currentColor"/><path d="M8.75 9.25H7.25V4.25H8.75V9.25Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8 1C9.93286 1 11.684 1.7836 12.9502 3.0498C14.2164 4.31601 15 6.06714 15 8C15 11.866 11.866 15 8 15C6.06714 15 4.31601 14.2164 3.0498 12.9502C1.7836 11.684 1 9.93286 1 8C1 4.13401 4.13401 1 8 1ZM8 2C4.68629 2 2 4.68629 2 8C2 9.65699 2.67148 11.1559 3.75781 12.2422C4.84415 13.3285 6.34301 14 8 14C11.3137 14 14 11.3137 14 8C14 6.34301 13.3285 4.84415 12.2422 3.75781C11.1559 2.67148 9.65699 2 8 2Z" fill="currentColor"/>`,
38
- },
39
28
  "sidebar-right": {
40
29
  viewBox: "0 0 20 20",
41
30
  body: `<path d="M2.91536 2.91406H2.36536V2.36406H2.91536V2.91406ZM2.91536 17.0807V17.6307H2.36536V17.0807H2.91536ZM17.082 17.0807H17.632V17.6307H17.082V17.0807ZM17.082 2.91406V2.36406H17.632V2.91406H17.082ZM6.9987 2.91406H6.4487V2.36406H6.9987V2.91406ZM6.9987 17.0807V17.6307H6.4487V17.0807H6.9987ZM2.91536 2.91406H3.46536V17.0807H2.91536H2.36536V2.91406H2.91536ZM2.91536 17.0807V16.5307H17.082V17.0807V17.6307H2.91536V17.0807ZM17.082 17.0807H16.532V2.91406H17.082H17.632V17.0807H17.082ZM17.082 2.91406V3.46406H2.91536V2.91406V2.36406H17.082V2.91406ZM6.9987 2.91406H7.5487V17.0807H6.9987H6.4487V2.91406H6.9987ZM17.082 17.0807L17.082 17.6307L6.9987 17.6307V17.0807V16.5307L17.082 16.5307L17.082 17.0807ZM6.9987 2.91406V2.36406H17.082V2.91406V3.46406H6.9987V2.91406Z" fill="currentColor"/>`,
@@ -132,14 +121,6 @@ const icons = {
132
121
  viewBox: "0 0 20 20",
133
122
  body: `<path d="M7 14.5H13M7 7.99512H10.0049M10.0049 7.99512H13M10.0049 7.99512V5M10.0049 7.99512V11M18 18V2L2 2L2 18H18Z" stroke="currentColor"/>`,
134
123
  },
135
- "window-analytics": {
136
- viewBox: "0 0 16 16",
137
- body: `<path d="M14.5 9.8333V13.5H1.5V2.5H7.1667M9.5 2.5V7.5H14.5V2.5H9.5Z" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`,
138
- },
139
- trash: {
140
- viewBox: "0 0 20 20",
141
- body: `<path d="M4.58342 17.9134L4.58369 17.4134L4.22787 17.5384L4.22766 18.0384H4.58342V17.9134ZM15.4167 17.9134V18.0384H15.7725L15.7723 17.5384L15.4167 17.9134ZM2.08342 3.95508V3.45508H1.58342V3.95508H2.08342V4.45508V3.95508ZM17.9167 4.45508V4.95508H18.4167V4.45508H17.9167V3.95508V4.45508ZM4.16677 4.58008L3.66701 4.5996L4.22816 17.5379L4.72792 17.4934L5.22767 17.4489L4.66652 4.54055L4.16677 4.58008ZM4.58342 18.0384V17.9134H15.4167V18.0384V18.5384H4.58342V18.0384ZM15.4167 17.9134L15.8332 17.5379L16.2498 4.5996L15.7501 4.58008L15.2503 4.56055L14.8337 17.4989L15.4167 17.9134ZM15.8334 4.58008V4.08008H4.16677V4.58008V5.08008H15.8334V4.58008ZM2.08342 4.45508V4.95508H4.16677V4.58008V4.08008H2.08342V4.45508ZM15.8334 4.58008V5.08008H17.9167V4.45508V3.95508H15.8334V4.58008ZM6.83951 4.35149L7.432 4.55047C7.79251 3.47701 8.80699 2.70508 10.0001 2.70508V2.20508V1.70508C8.25392 1.70508 6.77335 2.83539 6.24702 4.15251L6.83951 4.35149ZM10.0001 2.20508V2.70508C11.1932 2.70508 12.2077 3.47701 12.5682 4.55047L13.1607 4.35149L13.7532 4.15251C13.2269 2.83539 11.7463 1.70508 10.0001 1.70508V2.20508Z" fill="currentColor"/>`,
142
- },
143
124
  "outline-sliders": {
144
125
  viewBox: "0 0 16 16",
145
126
  body: `<path d="M11.7779 4.66675H14.4446M11.7779 4.66675C11.7779 5.77132 10.8825 6.66675 9.77789 6.66675C8.67332 6.66675 7.77789 5.77132 7.77789 4.66675M11.7779 4.66675C11.7779 3.56218 10.8825 2.66675 9.77789 2.66675C8.67332 2.66675 7.77789 3.56218 7.77789 4.66675M1.55566 4.66675H7.77789M4.22233 11.3334H1.55566M4.22233 11.3334C4.22233 12.438 5.11776 13.3334 6.22233 13.3334C7.3269 13.3334 8.22233 12.438 8.22233 11.3334M4.22233 11.3334C4.22233 10.2288 5.11776 9.33341 6.22233 9.33341C7.3269 9.33341 8.22233 10.2288 8.22233 11.3334M14.4446 11.3334H8.22233" stroke="currentColor"/>`,
@@ -164,29 +145,16 @@ const icons = {
164
145
  viewBox: "0 0 20 20",
165
146
  body: `<path d="M5.83333 4.16406L2.5 7.4974L5.83333 10.8307M3.33333 7.4974H17.9167V15.4141H10" stroke="currentColor" stroke-linecap="square"/>`,
166
147
  },
167
- "fill-triangle-down": {
168
- viewBox: "0 0 16 16",
169
- body: `<path d="M5.37624 6.75194C5.1818 6.41861 5.42223 6 5.80813 6H10.1921C10.578 6 10.8184 6.41861 10.624 6.75194L8.43199 10.5096C8.23905 10.8404 7.76115 10.8404 7.56821 10.5096L5.37624 6.75194Z" fill="currentColor"/>`,
170
- },
171
148
  archive: {
172
149
  viewBox: "0 0 16 16",
173
150
  body: `<path d="M13.1112 13.5555V14.0555H13.6112V13.5555H13.1112ZM2.889 13.5555H2.389L2.389 14.0555H2.889V13.5555ZM3.38901 5.55546L3.38901 5.05546L2.38901 5.05546L2.38901 5.55546L2.88901 5.55546L3.38901 5.55546ZM14.4446 2.44434H14.9446V1.94434L14.4446 1.94434L14.4446 2.44434ZM14.4446 5.55545L14.4446 6.05545L14.9446 6.05545V5.55545H14.4446ZM1.55566 5.55546L1.05566 5.55545L1.05566 6.05546L1.55566 6.05546L1.55566 5.55546ZM1.5557 2.44436L1.5557 1.94436L1.05571 1.94436L1.0557 2.44435L1.5557 2.44436ZM13.1112 5.55546H12.6112V13.5555H13.1112H13.6112V5.55546H13.1112ZM2.889 13.5555H3.389L3.38901 5.55546L2.88901 5.55546L2.38901 5.55546L2.389 13.5555H2.889ZM14.4446 2.44434H13.9446V5.55545H14.4446H14.9446V2.44434H14.4446ZM1.55566 5.55546L2.05566 5.55547L2.0557 2.44436L1.5557 2.44436L1.0557 2.44435L1.05566 5.55545L1.55566 5.55546ZM6.22234 8.22213V8.72213H9.7779V8.22213V7.72213H6.22234V8.22213ZM13.1112 13.5555V13.0555H2.889V13.5555V14.0555H13.1112V13.5555ZM1.5557 2.44436L1.5557 2.94436L14.4446 2.94434L14.4446 2.44434L14.4446 1.94434L1.5557 1.94436L1.5557 2.44436ZM14.4446 5.55545L14.4446 5.05545L1.55566 5.05546L1.55566 5.55546L1.55566 6.05546L14.4446 6.05545L14.4446 5.55545Z" fill="currentColor"/>`,
174
151
  },
175
152
  }
176
153
 
177
- type IconName = keyof typeof icons | keyof typeof additionalIcons
178
-
179
154
  const spriteID = "opencode-v2-icon-sprite"
180
- const symbol = (name: IconName) => `opencode-v2-icon-${name}`
155
+ const symbol = (name: keyof typeof icons) => `opencode-v2-icon-${name}`
181
156
  let spriteInserted = false
182
157
 
183
- function getIcon(name: IconName) {
184
- const icon = icons[name as keyof typeof icons]
185
- if (icon) return icon
186
- const body = additionalIcons[name as keyof typeof additionalIcons]
187
- return { body, viewBox: additionalIconViewBox(name as keyof typeof additionalIcons) }
188
- }
189
-
190
158
  function ensureSprite() {
191
159
  if (spriteInserted) return
192
160
  if (typeof document === "undefined") return
@@ -202,26 +170,25 @@ function ensureSprite() {
202
170
  svg.setAttribute("height", "0")
203
171
  svg.style.position = "absolute"
204
172
  svg.style.overflow = "hidden"
205
- svg.innerHTML = Array.from(new Set<IconName>([...Object.keys(additionalIcons), ...Object.keys(icons)] as IconName[]))
206
- .map((name) => `<symbol id="${symbol(name)}" viewBox="${getIcon(name).viewBox}">${getIcon(name).body}</symbol>`)
173
+ svg.innerHTML = Object.entries(icons)
174
+ .map(
175
+ ([name, icon]) =>
176
+ `<symbol id="${symbol(name as keyof typeof icons)}" viewBox="${icon.viewBox}">${icon.body}</symbol>`,
177
+ )
207
178
  .join("")
208
179
  document.body.insertBefore(svg, document.body.firstChild)
209
180
  spriteInserted = true
210
181
  }
211
182
 
212
183
  export interface IconProps extends ComponentProps<"svg"> {
213
- name: IconName | (string & {})
184
+ name: keyof typeof icons | (string & {})
214
185
  size?: "small" | "normal" | "large"
215
186
  }
216
187
 
217
188
  export function Icon(props: IconProps) {
218
189
  const [split, rest] = splitProps(props, ["name", "size"])
219
- const iconName = (): IconName => {
220
- if (icons[split.name as keyof typeof icons]) return split.name as keyof typeof icons
221
- if (additionalIcons[split.name as keyof typeof additionalIcons]) return split.name as keyof typeof additionalIcons
222
- return "plus"
223
- }
224
- const icon = () => getIcon(iconName())
190
+ const iconName = () => (icons[split.name as keyof typeof icons] ? (split.name as keyof typeof icons) : "plus")
191
+ const icon = () => icons[iconName()]
225
192
  const pixelSize = split.size === "small" ? 14 : split.size === "large" ? 20 : 16
226
193
  onMount(ensureSprite)
227
194
 
@@ -229,14 +196,6 @@ export function Icon(props: IconProps) {
229
196
  <svg
230
197
  {...rest}
231
198
  data-slot="icon-svg"
232
- data-directional={
233
- iconName() === "arrow-left" ||
234
- iconName() === "arrow-right" ||
235
- iconName() === "chevron-left" ||
236
- iconName() === "chevron-right"
237
- ? ""
238
- : undefined
239
- }
240
199
  width={pixelSize}
241
200
  height={pixelSize}
242
201
  viewBox={icon().viewBox}