@opencode-ai/ui 0.0.0-dev-18424 → 0.0.0-dev-202608272004

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 (289) 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 -227
  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 -24
  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/{actions/button → components}/button.tsx +11 -10
  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 +2 -2
  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/dock-surface.css +9 -2
  97. package/src/components/dropdown-menu.css +135 -0
  98. package/src/components/dropdown-menu.tsx +308 -0
  99. package/src/components/icon-button.css +181 -0
  100. package/src/components/icon-button.tsx +29 -0
  101. package/src/components/icon.css +39 -0
  102. package/src/{icons/icon/additional-icons.ts → components/icon.tsx} +74 -8
  103. package/src/components/image-preview.tsx +2 -3
  104. package/src/components/keybind.css +18 -0
  105. package/src/components/keybind.tsx +20 -0
  106. package/src/components/list.css +5 -5
  107. package/src/components/list.tsx +5 -7
  108. package/src/components/popover.tsx +2 -3
  109. package/src/components/progress-circle.css +16 -0
  110. package/src/components/progress-circle.tsx +64 -0
  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/dialog.tsx +0 -1
  131. package/src/context/i18n.tsx +14 -17
  132. package/src/hooks/create-auto-scroll.tsx +0 -20
  133. package/src/i18n/am.ts +3 -1
  134. package/src/i18n/ar.ts +3 -1
  135. package/src/i18n/az.ts +3 -1
  136. package/src/i18n/bg.ts +3 -1
  137. package/src/i18n/bn.ts +3 -1
  138. package/src/i18n/br.ts +3 -1
  139. package/src/i18n/bs.ts +3 -1
  140. package/src/i18n/ca.ts +3 -1
  141. package/src/i18n/cs.ts +3 -1
  142. package/src/i18n/da.ts +3 -1
  143. package/src/i18n/de.ts +3 -1
  144. package/src/i18n/dv.ts +3 -1
  145. package/src/i18n/dz.ts +3 -1
  146. package/src/i18n/el.ts +3 -1
  147. package/src/i18n/en.ts +5 -37
  148. package/src/i18n/es.ts +3 -1
  149. package/src/i18n/et.ts +3 -1
  150. package/src/i18n/fa.ts +3 -1
  151. package/src/i18n/fi.ts +3 -1
  152. package/src/i18n/fo.ts +3 -1
  153. package/src/i18n/fr.ts +3 -1
  154. package/src/i18n/hi.ts +3 -1
  155. package/src/i18n/hr.ts +3 -1
  156. package/src/i18n/hu.ts +3 -1
  157. package/src/i18n/hy.ts +3 -1
  158. package/src/i18n/id.ts +3 -1
  159. package/src/i18n/is.ts +3 -1
  160. package/src/i18n/it.ts +3 -1
  161. package/src/i18n/ja.ts +3 -1
  162. package/src/i18n/ka.ts +3 -1
  163. package/src/i18n/km.ts +3 -1
  164. package/src/i18n/ko.ts +3 -1
  165. package/src/i18n/lo.ts +3 -1
  166. package/src/i18n/lt.ts +3 -1
  167. package/src/i18n/lv.ts +3 -1
  168. package/src/i18n/mk.ts +3 -1
  169. package/src/i18n/mn.ts +3 -1
  170. package/src/i18n/ms.ts +3 -1
  171. package/src/i18n/my.ts +3 -1
  172. package/src/i18n/ne.ts +3 -1
  173. package/src/i18n/nl.ts +3 -1
  174. package/src/i18n/no.ts +3 -1
  175. package/src/i18n/pa.ts +3 -1
  176. package/src/i18n/pl.ts +3 -1
  177. package/src/i18n/ro.ts +3 -1
  178. package/src/i18n/ru.ts +3 -1
  179. package/src/i18n/si.ts +3 -1
  180. package/src/i18n/sk.ts +3 -1
  181. package/src/i18n/sl.ts +3 -1
  182. package/src/i18n/sq.ts +3 -1
  183. package/src/i18n/sr.ts +3 -1
  184. package/src/i18n/sv.ts +3 -1
  185. package/src/i18n/tg.ts +3 -1
  186. package/src/i18n/th.ts +3 -1
  187. package/src/i18n/tk.ts +3 -1
  188. package/src/i18n/tr.ts +3 -1
  189. package/src/i18n/uk.ts +3 -1
  190. package/src/i18n/ur.ts +3 -1
  191. package/src/i18n/uz.ts +3 -1
  192. package/src/i18n/vi.ts +3 -1
  193. package/src/i18n/zh.ts +3 -1
  194. package/src/i18n/zht.ts +3 -1
  195. package/src/styles/index.css +20 -4
  196. package/src/styles/tailwind/colors.css +0 -1
  197. package/src/styles/tailwind/index.css +1 -18
  198. package/src/styles/theme.css +2 -2
  199. package/src/theme/context.tsx +11 -19
  200. package/src/theme/themes/oc-2.json +1 -3
  201. package/src/theme/v2/foreground.ts +0 -1
  202. package/src/v2/components/accordion-v2.css +139 -0
  203. package/src/v2/components/accordion-v2.tsx +86 -0
  204. package/src/{data-display/avatar/avatar.tsx → v2/components/avatar-v2.tsx} +1 -1
  205. package/src/{data-display/badge/badge.css → v2/components/badge-v2.css} +0 -19
  206. package/src/{data-display/badge/badge.tsx → v2/components/badge-v2.tsx} +4 -6
  207. package/src/v2/components/button-v2.tsx +35 -0
  208. package/src/v2/components/checkbox-v2.css +184 -0
  209. package/src/v2/components/checkbox-v2.tsx +65 -0
  210. package/src/{overlays/dialog/dialog.css → v2/components/dialog-v2.css} +0 -3
  211. package/src/{overlays/dialog/dialog.tsx → v2/components/dialog-v2.tsx} +13 -11
  212. package/src/v2/components/diff-changes-v2.css +26 -0
  213. package/src/{data-display/diff-changes/diff-changes.tsx → v2/components/diff-changes-v2.tsx} +2 -7
  214. package/src/{layout/divider/divider.tsx → v2/components/divider-v2.tsx} +3 -3
  215. package/src/{forms/field/field.css → v2/components/field-v2.css} +1 -1
  216. package/src/{forms/field/field.tsx → v2/components/field-v2.tsx} +11 -9
  217. package/src/v2/components/icon-button-v2.tsx +37 -0
  218. package/src/{icons/icon → v2/components}/icon.tsx +9 -50
  219. package/src/v2/components/inline-input-v2.css +225 -0
  220. package/src/v2/components/inline-input-v2.tsx +107 -0
  221. package/src/{data-display/keybind/keybind.css → v2/components/keybind-v2.css} +1 -1
  222. package/src/{data-display/keybind/keybind.tsx → v2/components/keybind-v2.tsx} +3 -3
  223. package/src/{data-display/line-comment/line-comment.css → v2/components/line-comment-v2.css} +3 -3
  224. package/src/{data-display/line-comment/line-comment.tsx → v2/components/line-comment-v2.tsx} +15 -17
  225. package/src/{feedback/loader/loader.tsx → v2/components/loader-v2.tsx} +2 -2
  226. package/src/{navigation/menu/menu.css → v2/components/menu-v2.css} +2 -122
  227. package/src/{navigation/menu/menu.tsx → v2/components/menu-v2.tsx} +32 -96
  228. package/src/v2/components/progress-circle-v2.css +13 -0
  229. package/src/v2/components/progress-circle-v2.tsx +52 -0
  230. package/src/{data-display/project-avatar/project-avatar.tsx → v2/components/project-avatar-v2.tsx} +1 -1
  231. package/src/{forms/radio/radio.tsx → v2/components/radio-v2.tsx} +20 -30
  232. package/src/{navigation/segmented-control/segmented-control.css → v2/components/segmented-control-v2.css} +1 -1
  233. package/src/{navigation/segmented-control/segmented-control.tsx → v2/components/segmented-control-v2.tsx} +8 -9
  234. package/src/{forms/select/select.css → v2/components/select-v2.css} +8 -2
  235. package/src/{forms/select/select.tsx → v2/components/select-v2.tsx} +32 -38
  236. package/src/{actions/split-button/split-button.css → v2/components/split-button-v2.css} +6 -1
  237. package/src/{actions/split-button/split-button.tsx → v2/components/split-button-v2.tsx} +4 -4
  238. package/src/{forms/switch/switch.css → v2/components/switch-v2.css} +0 -110
  239. package/src/v2/components/switch-v2.tsx +28 -0
  240. package/src/{navigation/tabs/tabs-current.css → v2/components/tabs-v2.css} +10 -25
  241. package/src/v2/components/tabs-v2.tsx +149 -0
  242. package/src/{forms/text-input/text-input.css → v2/components/text-input-v2.css} +1 -1
  243. package/src/{forms/text-input/text-input.tsx → v2/components/text-input-v2.tsx} +4 -4
  244. package/src/v2/components/text-shimmer-v2.css +125 -0
  245. package/src/v2/components/text-shimmer-v2.tsx +63 -0
  246. package/src/{forms/textarea/textarea.tsx → v2/components/textarea-v2.tsx} +3 -3
  247. package/src/{feedback/toast/toast.tsx → v2/components/toast-v2.tsx} +58 -60
  248. package/src/{overlays/tooltip/tooltip.css → v2/components/tooltip-v2.css} +0 -26
  249. package/src/{overlays/tooltip/tooltip.tsx → v2/components/tooltip-v2.tsx} +14 -21
  250. package/src/{typography/wordmark/wordmark.tsx → v2/components/wordmark-v2.tsx} +1 -1
  251. package/src/{styles/tokens → v2/styles}/theme.css +14 -10
  252. package/dist/actions/button/button.d.ts +0 -10
  253. package/dist/actions/icon-button/icon-button.d.ts +0 -11
  254. package/dist/actions/split-button/split-button.d.ts +0 -5
  255. package/dist/data-display/badge/badge.d.ts +0 -7
  256. package/dist/data-display/keybind/keybind.d.ts +0 -7
  257. package/dist/feedback/loader/loader.d.ts +0 -3
  258. package/dist/feedback/toast/toast.d.ts +0 -57
  259. package/dist/forms/radio/radio.d.ts +0 -16
  260. package/dist/forms/textarea/textarea.d.ts +0 -7
  261. package/dist/i18n/he.d.ts +0 -197
  262. package/dist/layout/divider/divider.d.ts +0 -5
  263. package/dist/navigation/menu/menu.d.ts +0 -59
  264. package/dist/overlays/tooltip/tooltip.d.ts +0 -15
  265. package/dist/typography/wordmark/wordmark.d.ts +0 -2
  266. package/src/actions/icon-button/icon-button.tsx +0 -32
  267. package/src/feedback/progress-circle/progress-circle.css +0 -28
  268. package/src/feedback/progress-circle/progress-circle.tsx +0 -64
  269. package/src/forms/switch/switch.tsx +0 -34
  270. package/src/i18n/he.ts +0 -199
  271. package/src/icons/icon/icon.css +0 -3
  272. package/src/navigation/tabs/tabs.tsx +0 -194
  273. /package/dist/{forms/inline-input → components}/inline-input.d.ts +0 -0
  274. /package/dist/{navigation → v2/components}/tab-state-indicator.d.ts +0 -0
  275. /package/src/{forms/inline-input → components}/inline-input.css +0 -0
  276. /package/src/{forms/inline-input → components}/inline-input.tsx +0 -0
  277. /package/src/{data-display/avatar/avatar.css → v2/components/avatar-v2.css} +0 -0
  278. /package/src/{actions/button/button.css → v2/components/button-v2.css} +0 -0
  279. /package/src/{layout/divider/divider.css → v2/components/divider-v2.css} +0 -0
  280. /package/src/{styles/file-tree.css → v2/components/file-tree-v2.css} +0 -0
  281. /package/src/{actions/icon-button/icon-button.css → v2/components/icon-button-v2.css} +0 -0
  282. /package/src/{feedback/loader/loader.css → v2/components/loader-v2.css} +0 -0
  283. /package/src/{data-display/project-avatar/project-avatar.css → v2/components/project-avatar-v2.css} +0 -0
  284. /package/src/{forms/radio/radio.css → v2/components/radio-v2.css} +0 -0
  285. /package/src/{navigation → v2/components}/tab-state-indicator.tsx +0 -0
  286. /package/src/{forms/textarea/textarea.css → v2/components/textarea-v2.css} +0 -0
  287. /package/src/{feedback/toast/toast.css → v2/components/toast-v2.css} +0 -0
  288. /package/src/{styles/tokens → v2/styles}/colors.css +0 -0
  289. /package/src/{styles/tokens/index.css → v2/styles/tailwind.css} +0 -0
@@ -0,0 +1,35 @@
1
+ import { Button as Kobalte } from "@kobalte/core/button"
2
+ import { type ComponentProps, Show, createMemo, splitProps } from "solid-js"
3
+ import { Icon, type IconProps } from "./icon"
4
+ import "./button-v2.css"
5
+
6
+ export interface ButtonV2Props
7
+ extends ComponentProps<typeof Kobalte>,
8
+ Pick<ComponentProps<"button">, "class" | "classList" | "children"> {
9
+ size?: "small" | "normal" | "large"
10
+ variant?: "neutral" | "danger" | "warning" | "outline" | "contrast" | "ghost" | "ghost-muted" | "loading"
11
+ icon?: IconProps["name"]
12
+ }
13
+
14
+ export function ButtonV2(props: ButtonV2Props) {
15
+ const [split, rest] = splitProps(props, ["variant", "size", "icon", "class", "classList"])
16
+ const resolvedIcon = createMemo(() => split.icon)
17
+ return (
18
+ <Kobalte
19
+ {...rest}
20
+ data-component="button-v2"
21
+ data-size={split.size || "normal"}
22
+ data-variant={split.variant || "neutral"}
23
+ data-icon={resolvedIcon()}
24
+ classList={{
25
+ ...split.classList,
26
+ [split.class ?? ""]: !!split.class,
27
+ }}
28
+ >
29
+ <Show when={resolvedIcon()}>
30
+ <Icon name={resolvedIcon()!} />
31
+ </Show>
32
+ {props.children}
33
+ </Kobalte>
34
+ )
35
+ }
@@ -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
+ }