@opencode-ai/ui 0.0.0-dev-202608201855 → 0.0.0-dev-17751

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/actions/button/button.d.ts +10 -0
  2. package/dist/actions/icon-button/icon-button.d.ts +11 -0
  3. package/dist/actions/split-button/split-button.d.ts +5 -0
  4. package/dist/components/card.d.ts +1 -1
  5. package/dist/components/list.d.ts +1 -1
  6. package/dist/components/scroll-view.d.ts +3 -3
  7. package/dist/context/i18n.d.ts +10 -7
  8. package/dist/{components → data-display/accordion}/accordion.d.ts +6 -6
  9. package/dist/{v2/components/avatar-v2.d.ts → data-display/avatar/avatar.d.ts} +1 -1
  10. package/dist/data-display/badge/badge.d.ts +7 -0
  11. package/dist/{components → data-display/diff-changes}/diff-changes.d.ts +2 -1
  12. package/dist/data-display/keybind/keybind.d.ts +7 -0
  13. package/dist/{v2/components/line-comment-v2.d.ts → data-display/line-comment/line-comment.d.ts} +9 -9
  14. package/dist/{v2/components/project-avatar-v2.d.ts → data-display/project-avatar/project-avatar.d.ts} +1 -1
  15. package/dist/feedback/loader/loader.d.ts +3 -0
  16. package/dist/{components → feedback/progress-circle}/progress-circle.d.ts +2 -0
  17. package/dist/feedback/toast/toast.d.ts +57 -0
  18. package/dist/{components → forms/checkbox}/checkbox.d.ts +2 -2
  19. package/dist/{v2/components/field-v2.d.ts → forms/field/field.d.ts} +4 -10
  20. package/dist/forms/radio/radio.d.ts +16 -0
  21. package/dist/{v2/components/select-v2.d.ts → forms/select/select.d.ts} +4 -6
  22. package/dist/{components → forms/switch}/switch.d.ts +4 -2
  23. package/dist/{v2/components/text-input-v2.d.ts → forms/text-input/text-input.d.ts} +3 -3
  24. package/dist/forms/textarea/textarea.d.ts +7 -0
  25. package/dist/i18n/ar.d.ts +0 -2
  26. package/dist/i18n/bg.d.ts +0 -2
  27. package/dist/i18n/br.d.ts +0 -2
  28. package/dist/i18n/bs.d.ts +0 -2
  29. package/dist/i18n/da.d.ts +0 -2
  30. package/dist/i18n/de.d.ts +0 -2
  31. package/dist/i18n/en.d.ts +209 -1
  32. package/dist/i18n/es.d.ts +0 -2
  33. package/dist/i18n/fr.d.ts +0 -2
  34. package/dist/i18n/he.d.ts +197 -0
  35. package/dist/i18n/ja.d.ts +0 -2
  36. package/dist/i18n/km.d.ts +0 -2
  37. package/dist/i18n/ko.d.ts +0 -2
  38. package/dist/i18n/lo.d.ts +0 -2
  39. package/dist/i18n/mk.d.ts +0 -2
  40. package/dist/i18n/mn.d.ts +0 -2
  41. package/dist/i18n/my.d.ts +0 -2
  42. package/dist/i18n/pl.d.ts +0 -2
  43. package/dist/i18n/ru.d.ts +0 -2
  44. package/dist/i18n/sr.d.ts +0 -2
  45. package/dist/i18n/tg.d.ts +0 -2
  46. package/dist/i18n/th.d.ts +0 -2
  47. package/dist/i18n/tr.d.ts +0 -2
  48. package/dist/i18n/zh.d.ts +0 -2
  49. package/dist/i18n/zht.d.ts +0 -2
  50. package/dist/{components/icon.d.ts → icons/icon/additional-icons.d.ts} +8 -8
  51. package/dist/{v2/components → icons/icon}/icon.d.ts +16 -1
  52. package/dist/layout/divider/divider.d.ts +5 -0
  53. package/dist/navigation/menu/menu.d.ts +59 -0
  54. package/dist/{v2/components/segmented-control-v2.d.ts → navigation/segmented-control/segmented-control.d.ts} +5 -5
  55. package/dist/{components → navigation/tabs}/tabs.d.ts +15 -8
  56. package/dist/{v2/components/dialog-v2.d.ts → overlays/dialog/dialog.d.ts} +1 -2
  57. package/dist/overlays/tooltip/tooltip.d.ts +14 -0
  58. package/dist/{components → typography/text-shimmer}/text-shimmer.d.ts +1 -0
  59. package/dist/typography/wordmark/wordmark.d.ts +2 -0
  60. package/package.json +131 -13
  61. package/src/{v2/components/button-v2.tsx → actions/button/button.tsx} +8 -8
  62. package/src/actions/icon-button/icon-button.tsx +32 -0
  63. package/src/{v2/components/split-button-v2.css → actions/split-button/split-button.css} +1 -6
  64. package/src/{v2/components/split-button-v2.tsx → actions/split-button/split-button.tsx} +4 -4
  65. package/src/components/animated-number.css +29 -11
  66. package/src/components/animated-number.tsx +2 -2
  67. package/src/components/card.css +2 -23
  68. package/src/components/card.tsx +4 -4
  69. package/src/components/collapsible.tsx +1 -1
  70. package/src/components/image-preview.tsx +3 -2
  71. package/src/components/list.css +5 -5
  72. package/src/components/list.tsx +7 -5
  73. package/src/components/popover.tsx +3 -2
  74. package/src/components/provider-icon.tsx +1 -1
  75. package/src/components/scroll-view.tsx +5 -20
  76. package/src/components/sticky-accordion-header.tsx +1 -1
  77. package/src/components/text-field.tsx +12 -4
  78. package/src/context/i18n.tsx +17 -14
  79. package/src/{components → data-display/accordion}/accordion.css +1 -26
  80. package/src/{components → data-display/accordion}/accordion.tsx +14 -14
  81. package/src/{v2/components/avatar-v2.tsx → data-display/avatar/avatar.tsx} +1 -1
  82. package/src/{v2/components/badge-v2.css → data-display/badge/badge.css} +19 -0
  83. package/src/{v2/components/badge-v2.tsx → data-display/badge/badge.tsx} +6 -4
  84. package/src/{components → data-display/diff-changes}/diff-changes.css +22 -19
  85. package/src/{v2/components/diff-changes-v2.tsx → data-display/diff-changes/diff-changes.tsx} +7 -2
  86. package/src/{v2/components/keybind-v2.css → data-display/keybind/keybind.css} +1 -1
  87. package/src/{v2/components/keybind-v2.tsx → data-display/keybind/keybind.tsx} +3 -3
  88. package/src/{v2/components/line-comment-v2.tsx → data-display/line-comment/line-comment.tsx} +17 -15
  89. package/src/{v2/components/project-avatar-v2.tsx → data-display/project-avatar/project-avatar.tsx} +1 -1
  90. package/src/{v2/components/loader-v2.tsx → feedback/loader/loader.tsx} +2 -2
  91. package/src/feedback/progress-circle/progress-circle.css +28 -0
  92. package/src/feedback/progress-circle/progress-circle.tsx +64 -0
  93. package/src/{v2/components/toast-v2.tsx → feedback/toast/toast.tsx} +60 -58
  94. package/src/{components → forms/checkbox}/checkbox.css +1 -7
  95. package/src/{components → forms/checkbox}/checkbox.tsx +13 -13
  96. package/src/{v2/components/field-v2.tsx → forms/field/field.tsx} +9 -11
  97. package/src/{v2/components/radio-v2.tsx → forms/radio/radio.tsx} +30 -20
  98. package/src/{v2/components/select-v2.css → forms/select/select.css} +2 -8
  99. package/src/{v2/components/select-v2.tsx → forms/select/select.tsx} +38 -32
  100. package/src/{v2/components/switch-v2.css → forms/switch/switch.css} +110 -0
  101. package/src/forms/switch/switch.tsx +34 -0
  102. package/src/{v2/components/text-input-v2.tsx → forms/text-input/text-input.tsx} +4 -4
  103. package/src/{v2/components/textarea-v2.tsx → forms/textarea/textarea.tsx} +3 -3
  104. package/src/hooks/create-auto-scroll.tsx +20 -0
  105. package/src/i18n/am.ts +0 -2
  106. package/src/i18n/ar.ts +0 -2
  107. package/src/i18n/az.ts +0 -2
  108. package/src/i18n/bg.ts +0 -2
  109. package/src/i18n/bn.ts +0 -2
  110. package/src/i18n/br.ts +0 -2
  111. package/src/i18n/bs.ts +0 -2
  112. package/src/i18n/ca.ts +0 -2
  113. package/src/i18n/cs.ts +0 -2
  114. package/src/i18n/da.ts +0 -2
  115. package/src/i18n/de.ts +0 -2
  116. package/src/i18n/dv.ts +0 -2
  117. package/src/i18n/dz.ts +0 -2
  118. package/src/i18n/el.ts +0 -2
  119. package/src/i18n/en.ts +18 -4
  120. package/src/i18n/es.ts +0 -2
  121. package/src/i18n/et.ts +0 -2
  122. package/src/i18n/fa.ts +0 -2
  123. package/src/i18n/fi.ts +0 -2
  124. package/src/i18n/fo.ts +0 -2
  125. package/src/i18n/fr.ts +0 -2
  126. package/src/i18n/he.ts +199 -0
  127. package/src/i18n/hi.ts +0 -2
  128. package/src/i18n/hr.ts +0 -2
  129. package/src/i18n/hu.ts +0 -2
  130. package/src/i18n/hy.ts +0 -2
  131. package/src/i18n/id.ts +0 -2
  132. package/src/i18n/is.ts +0 -2
  133. package/src/i18n/it.ts +0 -2
  134. package/src/i18n/ja.ts +0 -2
  135. package/src/i18n/ka.ts +0 -2
  136. package/src/i18n/km.ts +0 -2
  137. package/src/i18n/ko.ts +0 -2
  138. package/src/i18n/lo.ts +0 -2
  139. package/src/i18n/lt.ts +0 -2
  140. package/src/i18n/lv.ts +0 -2
  141. package/src/i18n/mk.ts +0 -2
  142. package/src/i18n/mn.ts +0 -2
  143. package/src/i18n/ms.ts +0 -2
  144. package/src/i18n/my.ts +0 -2
  145. package/src/i18n/ne.ts +0 -2
  146. package/src/i18n/nl.ts +0 -2
  147. package/src/i18n/no.ts +0 -2
  148. package/src/i18n/pa.ts +0 -2
  149. package/src/i18n/pl.ts +0 -2
  150. package/src/i18n/ro.ts +0 -2
  151. package/src/i18n/ru.ts +0 -2
  152. package/src/i18n/si.ts +0 -2
  153. package/src/i18n/sk.ts +0 -2
  154. package/src/i18n/sl.ts +0 -2
  155. package/src/i18n/sq.ts +0 -2
  156. package/src/i18n/sr.ts +0 -2
  157. package/src/i18n/sv.ts +0 -2
  158. package/src/i18n/tg.ts +0 -2
  159. package/src/i18n/th.ts +0 -2
  160. package/src/i18n/tk.ts +0 -2
  161. package/src/i18n/tr.ts +0 -2
  162. package/src/i18n/uk.ts +0 -2
  163. package/src/i18n/ur.ts +0 -2
  164. package/src/i18n/uz.ts +0 -2
  165. package/src/i18n/vi.ts +0 -2
  166. package/src/i18n/zh.ts +0 -2
  167. package/src/i18n/zht.ts +0 -2
  168. package/src/{components/icon.tsx → icons/icon/additional-icons.ts} +8 -74
  169. package/src/icons/icon/icon.css +3 -0
  170. package/src/{v2/components → icons/icon}/icon.tsx +42 -9
  171. package/src/{v2/components/divider-v2.tsx → layout/divider/divider.tsx} +3 -3
  172. package/src/{v2/components/menu-v2.css → navigation/menu/menu.css} +121 -0
  173. package/src/{v2/components/menu-v2.tsx → navigation/menu/menu.tsx} +96 -32
  174. package/src/{v2/components/segmented-control-v2.tsx → navigation/segmented-control/segmented-control.tsx} +9 -8
  175. package/src/{v2/components/tabs-v2.css → navigation/tabs/tabs-current.css} +24 -9
  176. package/src/{components → navigation/tabs}/tabs.css +39 -229
  177. package/src/navigation/tabs/tabs.tsx +194 -0
  178. package/src/{v2/components/dialog-v2.css → overlays/dialog/dialog.css} +3 -0
  179. package/src/{v2/components/dialog-v2.tsx → overlays/dialog/dialog.tsx} +11 -13
  180. package/src/{v2/components/tooltip-v2.css → overlays/tooltip/tooltip.css} +26 -0
  181. package/src/{v2/components/tooltip-v2.tsx → overlays/tooltip/tooltip.tsx} +18 -14
  182. package/src/styles/index.css +4 -20
  183. package/src/styles/tailwind/index.css +15 -1
  184. package/src/{v2/styles → styles/tokens}/theme.css +0 -12
  185. package/src/theme/context.tsx +19 -11
  186. package/src/theme/themes/oc-2.json +1 -1
  187. package/src/{components → typography/text-shimmer}/text-shimmer.css +2 -1
  188. package/src/{components → typography/text-shimmer}/text-shimmer.tsx +1 -0
  189. package/src/{v2/components/wordmark-v2.tsx → typography/wordmark/wordmark.tsx} +1 -1
  190. package/dist/components/avatar.d.ts +0 -9
  191. package/dist/components/button.d.ts +0 -9
  192. package/dist/components/dialog.d.ts +0 -12
  193. package/dist/components/dropdown-menu.d.ts +0 -80
  194. package/dist/components/icon-button.d.ts +0 -10
  195. package/dist/components/keybind.d.ts +0 -6
  196. package/dist/components/radio-group.d.ts +0 -16
  197. package/dist/components/select.d.ts +0 -21
  198. package/dist/components/tag.d.ts +0 -5
  199. package/dist/components/toast.d.ts +0 -56
  200. package/dist/components/tooltip.d.ts +0 -17
  201. package/dist/v2/components/accordion-v2.d.ts +0 -26
  202. package/dist/v2/components/badge-v2.d.ts +0 -6
  203. package/dist/v2/components/button-v2.d.ts +0 -10
  204. package/dist/v2/components/checkbox-v2.d.ts +0 -10
  205. package/dist/v2/components/diff-changes-v2.d.ts +0 -11
  206. package/dist/v2/components/divider-v2.d.ts +0 -5
  207. package/dist/v2/components/icon-button-v2.d.ts +0 -11
  208. package/dist/v2/components/inline-input-v2.d.ts +0 -21
  209. package/dist/v2/components/keybind-v2.d.ts +0 -7
  210. package/dist/v2/components/loader-v2.d.ts +0 -3
  211. package/dist/v2/components/menu-v2.d.ts +0 -52
  212. package/dist/v2/components/progress-circle-v2.d.ts +0 -8
  213. package/dist/v2/components/radio-v2.d.ts +0 -16
  214. package/dist/v2/components/split-button-v2.d.ts +0 -5
  215. package/dist/v2/components/switch-v2.d.ts +0 -7
  216. package/dist/v2/components/tabs-v2.d.ts +0 -34
  217. package/dist/v2/components/text-shimmer-v2.d.ts +0 -9
  218. package/dist/v2/components/textarea-v2.d.ts +0 -7
  219. package/dist/v2/components/toast-v2.d.ts +0 -57
  220. package/dist/v2/components/tooltip-v2.d.ts +0 -13
  221. package/dist/v2/components/wordmark-v2.d.ts +0 -2
  222. package/src/components/avatar.css +0 -49
  223. package/src/components/avatar.tsx +0 -55
  224. package/src/components/button.css +0 -194
  225. package/src/components/button.tsx +0 -33
  226. package/src/components/dialog.css +0 -181
  227. package/src/components/dialog.tsx +0 -72
  228. package/src/components/diff-changes.tsx +0 -115
  229. package/src/components/dropdown-menu.css +0 -135
  230. package/src/components/dropdown-menu.tsx +0 -308
  231. package/src/components/icon-button.css +0 -181
  232. package/src/components/icon-button.tsx +0 -29
  233. package/src/components/icon.css +0 -39
  234. package/src/components/keybind.css +0 -18
  235. package/src/components/keybind.tsx +0 -20
  236. package/src/components/progress-circle.css +0 -16
  237. package/src/components/progress-circle.tsx +0 -64
  238. package/src/components/radio-group.css +0 -187
  239. package/src/components/radio-group.tsx +0 -83
  240. package/src/components/select.css +0 -201
  241. package/src/components/select.tsx +0 -174
  242. package/src/components/switch.css +0 -136
  243. package/src/components/switch.tsx +0 -29
  244. package/src/components/tabs.tsx +0 -126
  245. package/src/components/tag.css +0 -37
  246. package/src/components/tag.tsx +0 -22
  247. package/src/components/toast.css +0 -236
  248. package/src/components/toast.tsx +0 -185
  249. package/src/components/tooltip.css +0 -74
  250. package/src/components/tooltip.tsx +0 -163
  251. package/src/v2/components/accordion-v2.css +0 -139
  252. package/src/v2/components/accordion-v2.tsx +0 -86
  253. package/src/v2/components/checkbox-v2.css +0 -184
  254. package/src/v2/components/checkbox-v2.tsx +0 -65
  255. package/src/v2/components/diff-changes-v2.css +0 -26
  256. package/src/v2/components/icon-button-v2.tsx +0 -37
  257. package/src/v2/components/inline-input-v2.css +0 -225
  258. package/src/v2/components/inline-input-v2.tsx +0 -107
  259. package/src/v2/components/progress-circle-v2.css +0 -13
  260. package/src/v2/components/progress-circle-v2.tsx +0 -52
  261. package/src/v2/components/switch-v2.tsx +0 -28
  262. package/src/v2/components/tabs-v2.tsx +0 -149
  263. package/src/v2/components/text-shimmer-v2.css +0 -125
  264. package/src/v2/components/text-shimmer-v2.tsx +0 -63
  265. /package/dist/{components → forms/inline-input}/inline-input.d.ts +0 -0
  266. /package/dist/{v2/components → navigation}/tab-state-indicator.d.ts +0 -0
  267. /package/src/{v2/components/button-v2.css → actions/button/button.css} +0 -0
  268. /package/src/{v2/components/icon-button-v2.css → actions/icon-button/icon-button.css} +0 -0
  269. /package/src/{v2/components/avatar-v2.css → data-display/avatar/avatar.css} +0 -0
  270. /package/src/{v2/components/line-comment-v2.css → data-display/line-comment/line-comment.css} +0 -0
  271. /package/src/{v2/components/project-avatar-v2.css → data-display/project-avatar/project-avatar.css} +0 -0
  272. /package/src/{v2/components/loader-v2.css → feedback/loader/loader.css} +0 -0
  273. /package/src/{v2/components/toast-v2.css → feedback/toast/toast.css} +0 -0
  274. /package/src/{v2/components/field-v2.css → forms/field/field.css} +0 -0
  275. /package/src/{components → forms/inline-input}/inline-input.css +0 -0
  276. /package/src/{components → forms/inline-input}/inline-input.tsx +0 -0
  277. /package/src/{v2/components/radio-v2.css → forms/radio/radio.css} +0 -0
  278. /package/src/{v2/components/text-input-v2.css → forms/text-input/text-input.css} +0 -0
  279. /package/src/{v2/components/textarea-v2.css → forms/textarea/textarea.css} +0 -0
  280. /package/src/{v2/components/divider-v2.css → layout/divider/divider.css} +0 -0
  281. /package/src/{v2/components/segmented-control-v2.css → navigation/segmented-control/segmented-control.css} +0 -0
  282. /package/src/{v2/components → navigation}/tab-state-indicator.tsx +0 -0
  283. /package/src/{v2/components/file-tree-v2.css → styles/file-tree.css} +0 -0
  284. /package/src/{v2/styles → styles/tokens}/colors.css +0 -0
  285. /package/src/{v2/styles/tailwind.css → styles/tokens/index.css} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { splitProps, type ComponentProps } from "solid-js"
2
- import "./loader-v2.css"
2
+ import "./loader.css"
3
3
 
4
- export function LoaderV2(props: ComponentProps<"svg">) {
4
+ export function Loader(props: ComponentProps<"svg">) {
5
5
  const [local, rest] = splitProps(props, ["class", "classList", "width", "height"])
6
6
  return (
7
7
  <svg
@@ -0,0 +1,28 @@
1
+ [data-component="progress-circle"] {
2
+ display: block;
3
+ transform: rotate(-90deg);
4
+ }
5
+
6
+ [data-component="progress-circle"][data-appearance="compact"] [data-slot="progress-circle-background"] {
7
+ stroke: var(--v2-background-bg-layer-04);
8
+ }
9
+
10
+ [data-component="progress-circle"][data-appearance="compact"] [data-slot="progress-circle-progress"] {
11
+ stroke: var(--v2-icon-icon-base);
12
+ }
13
+
14
+ [data-component="progress-circle"][data-appearance="indicator"] [data-slot="progress-circle-background"] {
15
+ stroke: var(--progress-circle-background, var(--border-weak-base));
16
+ }
17
+
18
+ [data-component="progress-circle"][data-appearance="indicator"] [data-slot="progress-circle-background-overlay"] {
19
+ stroke: var(--progress-circle-background-overlay, transparent);
20
+ }
21
+
22
+ [data-component="progress-circle"][data-appearance="indicator"] [data-slot="progress-circle-progress"] {
23
+ stroke: var(--progress-circle-progress, var(--border-active));
24
+ }
25
+
26
+ [data-component="progress-circle"] [data-slot="progress-circle-progress"] {
27
+ transition: stroke-dashoffset 0.35s cubic-bezier(0.65, 0, 0.35, 1);
28
+ }
@@ -0,0 +1,64 @@
1
+ import { type ComponentProps, createMemo, Show, splitProps } from "solid-js"
2
+ import "./progress-circle.css"
3
+
4
+ export interface ProgressCircleProps extends Pick<ComponentProps<"svg">, "class" | "classList" | "style"> {
5
+ percentage: number
6
+ appearance?: "compact" | "indicator"
7
+ size?: number
8
+ strokeWidth?: number
9
+ }
10
+
11
+ export function ProgressCircle(props: ProgressCircleProps) {
12
+ const [local, rest] = splitProps(props, ["percentage", "appearance", "size", "strokeWidth", "class", "classList"])
13
+
14
+ const appearance = () => local.appearance ?? "compact"
15
+ const viewBoxSize = () => (appearance() === "indicator" ? 16 : 14)
16
+ const size = () => local.size ?? viewBoxSize()
17
+ const strokeWidth = () => local.strokeWidth ?? (appearance() === "indicator" ? 3 : 1.5)
18
+ const center = () => viewBoxSize() / 2
19
+ const radius = () => center() - strokeWidth() / 2
20
+ const circumference = createMemo(() => 2 * Math.PI * radius())
21
+ const offset = createMemo(() => circumference() * (1 - Math.max(0, Math.min(100, local.percentage || 0)) / 100))
22
+
23
+ return (
24
+ <svg
25
+ {...rest}
26
+ width={size()}
27
+ height={size()}
28
+ viewBox={`0 0 ${viewBoxSize()} ${viewBoxSize()}`}
29
+ fill="none"
30
+ data-component="progress-circle"
31
+ data-appearance={appearance()}
32
+ classList={{
33
+ ...local.classList,
34
+ [local.class ?? ""]: !!local.class,
35
+ }}
36
+ >
37
+ <circle
38
+ cx={center()}
39
+ cy={center()}
40
+ r={radius()}
41
+ data-slot="progress-circle-background"
42
+ stroke-width={strokeWidth()}
43
+ />
44
+ <Show when={appearance() === "indicator"}>
45
+ <circle
46
+ cx={center()}
47
+ cy={center()}
48
+ r={radius()}
49
+ data-slot="progress-circle-background-overlay"
50
+ stroke-width={strokeWidth()}
51
+ />
52
+ </Show>
53
+ <circle
54
+ cx={center()}
55
+ cy={center()}
56
+ r={radius()}
57
+ data-slot="progress-circle-progress"
58
+ stroke-width={strokeWidth()}
59
+ stroke-dasharray={circumference().toString()}
60
+ stroke-dashoffset={offset()}
61
+ />
62
+ </svg>
63
+ )
64
+ }
@@ -4,12 +4,12 @@ import type { ComponentProps, JSX } from "solid-js"
4
4
  import { createContext, onCleanup, onMount, splitProps, useContext } from "solid-js"
5
5
  import { Portal } from "solid-js/web"
6
6
  import { useI18n } from "../../context/i18n"
7
- import "./button-v2.css"
8
- import "./toast-v2.css"
7
+ import "../../actions/button/button.css"
8
+ import "./toast.css"
9
9
 
10
- export interface ToastV2RegionProps extends ToasterProps {}
10
+ export interface ToastRegionProps extends ToasterProps {}
11
11
 
12
- function ToastV2Region(props: ToastV2RegionProps) {
12
+ function ToastRegion(props: ToastRegionProps) {
13
13
  const i18n = useI18n()
14
14
  const [local, rest] = splitProps(props, ["class", "className", "style", "toastOptions", "swipeDirections"])
15
15
  onMount(() => {
@@ -67,40 +67,40 @@ function ToastV2Region(props: ToastV2RegionProps) {
67
67
  )
68
68
  }
69
69
 
70
- const ToastV2Context = createContext<number>()
70
+ const ToastContext = createContext<number>()
71
71
 
72
- export interface ToastV2RootComponentProps {
72
+ export interface ToastRootComponentProps {
73
73
  toastId: number
74
74
  children?: JSX.Element
75
75
  }
76
76
 
77
- function ToastV2Root(props: ToastV2RootComponentProps) {
78
- return <ToastV2Context.Provider value={props.toastId}>{props.children}</ToastV2Context.Provider>
77
+ function ToastRoot(props: ToastRootComponentProps) {
78
+ return <ToastContext.Provider value={props.toastId}>{props.children}</ToastContext.Provider>
79
79
  }
80
80
 
81
- function ToastV2Icon(props: ComponentProps<"div">) {
81
+ function ToastIcon(props: ComponentProps<"div">) {
82
82
  return <div data-slot="toast-v2-icon" {...props} />
83
83
  }
84
84
 
85
- function ToastV2Content(props: ComponentProps<"div">) {
85
+ function ToastContent(props: ComponentProps<"div">) {
86
86
  return <div data-slot="toast-v2-content" {...props} />
87
87
  }
88
88
 
89
- function ToastV2Title(props: ComponentProps<"div">) {
89
+ function ToastTitle(props: ComponentProps<"div">) {
90
90
  return <div data-slot="toast-v2-title" {...props} />
91
91
  }
92
92
 
93
- function ToastV2Description(props: ComponentProps<"div">) {
93
+ function ToastDescription(props: ComponentProps<"div">) {
94
94
  return <div data-slot="toast-v2-description" {...props} />
95
95
  }
96
96
 
97
- function ToastV2Actions(props: ComponentProps<"div">) {
97
+ function ToastActions(props: ComponentProps<"div">) {
98
98
  return <div data-slot="toast-v2-actions" {...props} />
99
99
  }
100
100
 
101
- function ToastV2CloseButton(props: ComponentProps<"button">) {
101
+ function ToastCloseButton(props: ComponentProps<"button">) {
102
102
  const i18n = useI18n()
103
- const toastId = useContext(ToastV2Context)
103
+ const toastId = useContext(ToastContext)
104
104
  const [local, rest] = splitProps(props, ["children", "onClick"])
105
105
  return (
106
106
  <button
@@ -110,7 +110,7 @@ function ToastV2CloseButton(props: ComponentProps<"button">) {
110
110
  {...rest}
111
111
  onClick={(event) => {
112
112
  if (typeof local.onClick === "function") local.onClick(event)
113
- if (!event.defaultPrevented && toastId !== undefined) toasterV2.dismiss(toastId)
113
+ if (!event.defaultPrevented && toastId !== undefined) toaster.dismiss(toastId)
114
114
  }}
115
115
  >
116
116
  {local.children ?? <CloseIcon />}
@@ -127,19 +127,19 @@ function CloseIcon() {
127
127
  )
128
128
  }
129
129
 
130
- export const ToastV2 = Object.assign(ToastV2Root, {
131
- Region: ToastV2Region,
132
- Icon: ToastV2Icon,
133
- Content: ToastV2Content,
134
- Title: ToastV2Title,
135
- Description: ToastV2Description,
136
- Actions: ToastV2Actions,
137
- CloseButton: ToastV2CloseButton,
130
+ export const Toast = Object.assign(ToastRoot, {
131
+ Region: ToastRegion,
132
+ Icon: ToastIcon,
133
+ Content: ToastContent,
134
+ Title: ToastTitle,
135
+ Description: ToastDescription,
136
+ Actions: ToastActions,
137
+ CloseButton: ToastCloseButton,
138
138
  })
139
139
 
140
140
  let toastV2Id = 0
141
141
 
142
- export const toasterV2 = {
142
+ export const toaster = {
143
143
  show(render: (props: { toastId: number }) => JSX.Element, options?: { duration?: number; persistent?: boolean }) {
144
144
  const toastId = --toastV2Id
145
145
  toast.custom((id) => render({ toastId: Number(id) }), {
@@ -152,43 +152,43 @@ export const toasterV2 = {
152
152
  },
153
153
  dismiss(toastId?: number) {
154
154
  if (toastId === undefined) {
155
- activeToastV2ByKey.clear()
156
- activeToastV2ById.clear()
155
+ activeToastByKey.clear()
156
+ activeToastById.clear()
157
157
  } else {
158
- releaseToastV2(activeToastV2ById.get(toastId))
158
+ releaseToast(activeToastById.get(toastId))
159
159
  }
160
160
  return toast.dismiss(toastId)
161
161
  },
162
162
  }
163
163
 
164
- export interface ToastV2Action {
164
+ export interface ToastAction {
165
165
  label: string
166
166
  variant?: "primary" | "secondary"
167
167
  onClick: "dismiss" | (() => void)
168
168
  }
169
169
 
170
- export interface ToastV2Options {
170
+ export interface ToastOptions {
171
171
  title?: string
172
172
  description?: string
173
173
  icon?: JSX.Element
174
174
  variant?: "default" | "success" | "error" | "loading"
175
175
  duration?: number
176
176
  persistent?: boolean
177
- actions?: ToastV2Action[]
177
+ actions?: ToastAction[]
178
178
  }
179
179
 
180
- interface ActiveToastV2 {
180
+ interface ActiveToast {
181
181
  id: number
182
182
  key: string
183
- options: ToastV2Options
183
+ options: ToastOptions
184
184
  actions?: JSX.Element
185
185
  }
186
186
 
187
- const activeToastV2ByKey = new Map<string, ActiveToastV2>()
188
- const activeToastV2ById = new Map<number, ActiveToastV2>()
187
+ const activeToastByKey = new Map<string, ActiveToast>()
188
+ const activeToastById = new Map<number, ActiveToast>()
189
189
 
190
- export function showToastV2(options: ToastV2Options | string) {
191
- const opts: ToastV2Options = typeof options === "string" ? { description: options } : options
190
+ export function showToast(options: ToastOptions | string) {
191
+ const opts: ToastOptions = typeof options === "string" ? { description: options } : options
192
192
  const key = JSON.stringify({
193
193
  title: opts.title,
194
194
  description: opts.description,
@@ -197,29 +197,29 @@ export function showToastV2(options: ToastV2Options | string) {
197
197
  persistent: opts.persistent,
198
198
  actions: opts.actions?.map((action) => [action.label, action.variant]),
199
199
  })
200
- const active = activeToastV2ByKey.get(key)
200
+ const active = activeToastByKey.get(key)
201
201
  const toasts = toast.getToasts()
202
202
 
203
203
  if (active && toasts.at(-1)?.id === active.id) {
204
204
  active.options = opts
205
- publishToastV2(active)
206
- pulseToastV2(active.id)
205
+ publishToast(active)
206
+ pulseToast(active.id)
207
207
  return active.id
208
208
  }
209
209
 
210
- if (active && toasts.some((item) => item.id === active.id)) toasterV2.dismiss(active.id)
211
- releaseToastV2(active)
210
+ if (active && toasts.some((item) => item.id === active.id)) toaster.dismiss(active.id)
211
+ releaseToast(active)
212
212
 
213
- const entry: ActiveToastV2 = { id: --toastV2Id, key, options: opts }
214
- entry.actions = createToastV2Actions(entry)
215
- activeToastV2ByKey.set(key, entry)
216
- activeToastV2ById.set(entry.id, entry)
217
- publishToastV2(entry)
213
+ const entry: ActiveToast = { id: --toastV2Id, key, options: opts }
214
+ entry.actions = createToastActions(entry)
215
+ activeToastByKey.set(key, entry)
216
+ activeToastById.set(entry.id, entry)
217
+ publishToast(entry)
218
218
  return entry.id
219
219
  }
220
220
 
221
- function publishToastV2(entry: ActiveToastV2) {
222
- const release = () => releaseToastV2(entry)
221
+ function publishToast(entry: ActiveToast) {
222
+ const release = () => releaseToast(entry)
223
223
  toast(entry.options.title ?? "", {
224
224
  id: entry.id,
225
225
  description: entry.options.description,
@@ -235,10 +235,12 @@ function publishToastV2(entry: ActiveToastV2) {
235
235
  })
236
236
  }
237
237
 
238
- function createToastV2Actions(entry: ActiveToastV2) {
238
+ function createToastActions(entry: ActiveToast) {
239
239
  if (!entry.options.actions?.length) return undefined
240
240
  return (
241
- <ToastV2.Actions>
241
+ <Toast.Actions>
242
+ {/* Static map, not <For>: this JSX is created imperatively outside any Solid
243
+ root, where a <For> computation would never be disposed. */}
242
244
  {entry.options.actions.map((action, index) => (
243
245
  <button
244
246
  type="button"
@@ -249,17 +251,17 @@ function createToastV2Actions(entry: ActiveToastV2) {
249
251
  onClick={() => {
250
252
  const onClick = entry.options.actions?.[index]?.onClick
251
253
  if (typeof onClick === "function") onClick()
252
- toasterV2.dismiss(entry.id)
254
+ toaster.dismiss(entry.id)
253
255
  }}
254
256
  >
255
257
  {action.label}
256
258
  </button>
257
259
  ))}
258
- </ToastV2.Actions>
260
+ </Toast.Actions>
259
261
  )
260
262
  }
261
263
 
262
- function pulseToastV2(toastId: number) {
264
+ function pulseToast(toastId: number) {
263
265
  if (typeof document === "undefined" || typeof requestAnimationFrame === "undefined") return
264
266
  requestAnimationFrame(() => {
265
267
  const element = document.querySelector<HTMLElement>(`[data-testid="toast-v2-${toastId}"]`)
@@ -268,13 +270,13 @@ function pulseToastV2(toastId: number) {
268
270
  })
269
271
  }
270
272
 
271
- function releaseToastV2(entry: ActiveToastV2 | undefined) {
273
+ function releaseToast(entry: ActiveToast | undefined) {
272
274
  if (!entry) return
273
- if (activeToastV2ByKey.get(entry.key) === entry) activeToastV2ByKey.delete(entry.key)
274
- if (activeToastV2ById.get(entry.id) === entry) activeToastV2ById.delete(entry.id)
275
+ if (activeToastByKey.get(entry.key) === entry) activeToastByKey.delete(entry.key)
276
+ if (activeToastById.get(entry.id) === entry) activeToastById.delete(entry.id)
275
277
  }
276
278
 
277
- export interface ToastV2PromiseOptions<T, U = unknown> {
279
+ export interface ToastPromiseOptions<T, U = unknown> {
278
280
  loading?: JSX.Element
279
281
  success?: (data: T) => JSX.Element
280
282
  error?: (error: U) => JSX.Element
@@ -32,7 +32,6 @@
32
32
  border-color 220ms var(--tool-motion-ease, cubic-bezier(0.22, 1, 0.36, 1)),
33
33
  background-color 220ms var(--tool-motion-ease, cubic-bezier(0.22, 1, 0.36, 1)),
34
34
  box-shadow 220ms var(--tool-motion-ease, cubic-bezier(0.22, 1, 0.36, 1));
35
- /* background-color: var(--surface-weak); */
36
35
  }
37
36
 
38
37
  [data-slot="checkbox-checkbox-indicator"] {
@@ -49,19 +48,14 @@
49
48
  transform 220ms var(--tool-motion-ease, cubic-bezier(0.22, 1, 0.36, 1));
50
49
  }
51
50
 
52
- /* [data-slot="checkbox-checkbox-content"] { */
53
- /* } */
54
-
55
51
  [data-slot="checkbox-checkbox-label"] {
56
52
  user-select: none;
57
53
  color: var(--text-base);
58
-
59
- /* text-12-regular */
60
54
  font-family: var(--font-family-sans);
61
55
  font-size: var(--font-size-small);
62
56
  font-style: normal;
63
57
  font-weight: var(--font-weight-regular);
64
- line-height: var(--line-height-large); /* 166.667% */
58
+ line-height: var(--line-height-large);
65
59
  letter-spacing: var(--letter-spacing-normal);
66
60
  }
67
61
 
@@ -1,8 +1,8 @@
1
- import { Checkbox as Kobalte } from "@kobalte/core/checkbox"
1
+ import { Control, Description, ErrorMessage, Indicator, Input, Label, Root } from "@kobalte/core/checkbox"
2
2
  import { Show, splitProps } from "solid-js"
3
3
  import type { ComponentProps, JSX, ParentProps } from "solid-js"
4
4
 
5
- export interface CheckboxProps extends ParentProps<ComponentProps<typeof Kobalte>> {
5
+ export interface CheckboxProps extends ParentProps<ComponentProps<typeof Root>> {
6
6
  hideLabel?: boolean
7
7
  description?: string
8
8
  icon?: JSX.Element
@@ -11,10 +11,10 @@ export interface CheckboxProps extends ParentProps<ComponentProps<typeof Kobalte
11
11
  export function Checkbox(props: CheckboxProps) {
12
12
  const [local, others] = splitProps(props, ["children", "class", "label", "hideLabel", "description", "icon"])
13
13
  return (
14
- <Kobalte {...others} data-component="checkbox">
15
- <Kobalte.Input data-slot="checkbox-checkbox-input" />
16
- <Kobalte.Control data-slot="checkbox-checkbox-control">
17
- <Kobalte.Indicator data-slot="checkbox-checkbox-indicator">
14
+ <Root {...others} data-component="checkbox">
15
+ <Input data-slot="checkbox-checkbox-input" />
16
+ <Control data-slot="checkbox-checkbox-control">
17
+ <Indicator data-slot="checkbox-checkbox-indicator">
18
18
  {local.icon || (
19
19
  <svg viewBox="0 0 12 12" fill="none" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
20
20
  <path
@@ -25,19 +25,19 @@ export function Checkbox(props: CheckboxProps) {
25
25
  />
26
26
  </svg>
27
27
  )}
28
- </Kobalte.Indicator>
29
- </Kobalte.Control>
28
+ </Indicator>
29
+ </Control>
30
30
  <div data-slot="checkbox-checkbox-content">
31
31
  <Show when={props.children}>
32
- <Kobalte.Label data-slot="checkbox-checkbox-label" classList={{ "sr-only": local.hideLabel }}>
32
+ <Label data-slot="checkbox-checkbox-label" classList={{ "sr-only": local.hideLabel }}>
33
33
  {props.children}
34
- </Kobalte.Label>
34
+ </Label>
35
35
  </Show>
36
36
  <Show when={local.description}>
37
- <Kobalte.Description data-slot="checkbox-checkbox-description">{local.description}</Kobalte.Description>
37
+ <Description data-slot="checkbox-checkbox-description">{local.description}</Description>
38
38
  </Show>
39
- <Kobalte.ErrorMessage data-slot="checkbox-checkbox-error" />
39
+ <ErrorMessage data-slot="checkbox-checkbox-error" />
40
40
  </div>
41
- </Kobalte>
41
+ </Root>
42
42
  )
43
43
  }
@@ -11,8 +11,8 @@ import {
11
11
  type ComponentProps,
12
12
  type ParentProps,
13
13
  } from "solid-js"
14
- import { TooltipV2 } from "./tooltip-v2"
15
- import "./field-v2.css"
14
+ import { Tooltip } from "@opencode-ai/ui/tooltip"
15
+ import "./field.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-slot='inline-input-v2-input']",
43
+ "[data-component='inline-input']",
44
44
  ].join(", ")
45
45
 
46
- export interface FieldV2Props extends ComponentProps<"div"> {
46
+ export interface FieldProps extends ComponentProps<"div"> {
47
47
  invalid?: boolean
48
48
  }
49
49
 
50
- function FieldV2Root(props: ParentProps<FieldV2Props>) {
50
+ function FieldRoot(props: ParentProps<FieldProps>) {
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 FieldV2Root(props: ParentProps<FieldV2Props>) {
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-v2']",
89
+ "[data-component='text-input-v2'], [data-component='textarea-v2'], [data-component='inline-input']",
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
- <TooltipV2 value={tooltip()}>
176
+ <Tooltip 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
- </TooltipV2>
185
+ </Tooltip>
186
186
  )}
187
187
  </Show>
188
188
  </label>
@@ -255,11 +255,9 @@ function FieldControl(props: ParentProps<ComponentProps<"div">>) {
255
255
  )
256
256
  }
257
257
 
258
- export const FieldV2 = Object.assign(FieldV2Root, {
258
+ export const Field = Object.assign(FieldRoot, {
259
259
  Label: FieldLabel,
260
260
  Prefix: FieldPrefix,
261
261
  Suffix: FieldSuffix,
262
262
  Control: FieldControl,
263
263
  })
264
-
265
- export const Field = FieldV2
@@ -1,18 +1,28 @@
1
- import { RadioGroup as Kobalte } from "@kobalte/core/radio-group"
1
+ import {
2
+ Description,
3
+ ErrorMessage,
4
+ Item,
5
+ ItemControl,
6
+ ItemIndicator,
7
+ ItemInput,
8
+ ItemLabel,
9
+ Label,
10
+ Root,
11
+ } from "@kobalte/core/radio-group"
2
12
  import { Show, splitProps, type JSX } from "solid-js"
3
13
  import type { ComponentProps, ParentProps } from "solid-js"
4
- import "./radio-v2.css"
14
+ import "./radio.css"
5
15
 
6
- export interface RadioGroupV2Props extends ParentProps<ComponentProps<typeof Kobalte>> {
16
+ export interface RadioGroupProps extends ParentProps<ComponentProps<typeof Root>> {
7
17
  label?: JSX.Element
8
18
  description?: JSX.Element
9
19
  hideLabel?: boolean
10
20
  }
11
21
 
12
- export function RadioGroupV2(props: RadioGroupV2Props) {
22
+ export function RadioGroup(props: RadioGroupProps) {
13
23
  const [local, others] = splitProps(props, ["class", "classList", "children", "label", "description", "hideLabel"])
14
24
  return (
15
- <Kobalte
25
+ <Root
16
26
  {...others}
17
27
  data-component="radio-v2"
18
28
  classList={{
@@ -22,30 +32,30 @@ export function RadioGroupV2(props: RadioGroupV2Props) {
22
32
  >
23
33
  <Show when={local.label}>
24
34
  {(label) => (
25
- <Kobalte.Label data-slot="radio-v2-label" classList={{ "sr-only": local.hideLabel }}>
35
+ <Label data-slot="radio-v2-label" classList={{ "sr-only": local.hideLabel }}>
26
36
  {label()}
27
- </Kobalte.Label>
37
+ </Label>
28
38
  )}
29
39
  </Show>
30
40
  <Show when={local.description}>
31
- {(description) => <Kobalte.Description data-slot="radio-v2-description">{description()}</Kobalte.Description>}
41
+ {(description) => <Description data-slot="radio-v2-description">{description()}</Description>}
32
42
  </Show>
33
43
  <div data-slot="radio-v2-items">{local.children}</div>
34
- <Kobalte.ErrorMessage data-slot="radio-v2-error" />
35
- </Kobalte>
44
+ <ErrorMessage data-slot="radio-v2-error" />
45
+ </Root>
36
46
  )
37
47
  }
38
48
 
39
- export interface RadioItemV2Props extends ComponentProps<typeof Kobalte.Item> {
49
+ export interface RadioItemProps extends ComponentProps<typeof Item> {
40
50
  label: JSX.Element
41
51
  description?: JSX.Element
42
52
  hideLabel?: boolean
43
53
  }
44
54
 
45
- export function RadioItemV2(props: RadioItemV2Props) {
55
+ export function RadioItem(props: RadioItemProps) {
46
56
  const [local, others] = splitProps(props, ["class", "classList", "label", "description", "hideLabel"])
47
57
  return (
48
- <Kobalte.Item
58
+ <Item
49
59
  {...others}
50
60
  data-slot="radio-v2-item"
51
61
  classList={{
@@ -53,20 +63,20 @@ export function RadioItemV2(props: RadioItemV2Props) {
53
63
  [local.class ?? ""]: !!local.class,
54
64
  }}
55
65
  >
56
- <Kobalte.ItemInput data-slot="radio-v2-item-input" />
66
+ <ItemInput data-slot="radio-v2-item-input" />
57
67
  <div data-slot="radio-v2-item-control-stack">
58
- <Kobalte.ItemControl data-slot="radio-v2-item-control">
59
- <Kobalte.ItemIndicator data-slot="radio-v2-item-indicator" />
60
- </Kobalte.ItemControl>
68
+ <ItemControl data-slot="radio-v2-item-control">
69
+ <ItemIndicator data-slot="radio-v2-item-indicator" />
70
+ </ItemControl>
61
71
  </div>
62
- <Kobalte.ItemLabel data-slot="radio-v2-item-label" classList={{ "sr-only": local.hideLabel }}>
72
+ <ItemLabel data-slot="radio-v2-item-label" classList={{ "sr-only": local.hideLabel }}>
63
73
  <div data-slot="radio-v2-item-text">
64
74
  <span data-slot="radio-v2-item-label-text">{local.label}</span>
65
75
  <Show when={local.description}>
66
76
  {(description) => <span data-slot="radio-v2-item-description">{description()}</span>}
67
77
  </Show>
68
78
  </div>
69
- </Kobalte.ItemLabel>
70
- </Kobalte.Item>
79
+ </ItemLabel>
80
+ </Item>
71
81
  )
72
82
  }
@@ -1,4 +1,4 @@
1
- @import "./menu-v2.css";
1
+ @import "../../navigation/menu/menu.css";
2
2
 
3
3
  /* Above modal dialogs (z-index 50); matches legacy select-content. */
4
4
  [data-popper-positioner]:has([data-slot="select-v2-content"]) {
@@ -46,7 +46,7 @@
46
46
  }
47
47
  }
48
48
 
49
- /* Trigger shell aligned with text-input-v2 */
49
+ /* Shared trigger structure for the inline control. */
50
50
  [data-component="select-v2"] {
51
51
  box-sizing: border-box;
52
52
  display: flex;
@@ -73,12 +73,6 @@
73
73
  box-shadow 85ms ease-out;
74
74
  }
75
75
 
76
- [data-component="select-v2"][data-appearance="large"] {
77
- height: 32px;
78
- padding-block: 0;
79
- padding-inline: 0 8px;
80
- }
81
-
82
76
  [data-component="select-v2"]:where(:hover):not([data-disabled], [data-invalid]):not(:focus-within):not(
83
77
  [data-expanded]
84
78
  ) {