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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/dist/{data-display/accordion → components}/accordion.d.ts +6 -6
  2. package/dist/components/avatar.d.ts +9 -0
  3. package/dist/components/button.d.ts +9 -0
  4. package/dist/components/card.d.ts +1 -1
  5. package/dist/{forms/checkbox → components}/checkbox.d.ts +2 -2
  6. package/dist/components/dialog.d.ts +12 -0
  7. package/dist/{data-display/diff-changes → components}/diff-changes.d.ts +1 -2
  8. package/dist/components/dropdown-menu.d.ts +80 -0
  9. package/dist/components/icon-button.d.ts +10 -0
  10. package/dist/{icons/icon/additional-icons.d.ts → components/icon.d.ts} +8 -8
  11. package/dist/components/keybind.d.ts +6 -0
  12. package/dist/components/list.d.ts +1 -1
  13. package/dist/{feedback/progress-circle → components}/progress-circle.d.ts +0 -2
  14. package/dist/components/radio-group.d.ts +16 -0
  15. package/dist/components/scroll-view.d.ts +3 -3
  16. package/dist/components/select.d.ts +21 -0
  17. package/dist/{forms/switch → components}/switch.d.ts +2 -4
  18. package/dist/{navigation/tabs → components}/tabs.d.ts +8 -15
  19. package/dist/components/tag.d.ts +5 -0
  20. package/dist/{typography/text-shimmer → components}/text-shimmer.d.ts +0 -1
  21. package/dist/components/toast.d.ts +56 -0
  22. package/dist/components/tooltip.d.ts +17 -0
  23. package/dist/context/i18n.d.ts +7 -10
  24. package/dist/i18n/ar.d.ts +2 -0
  25. package/dist/i18n/bg.d.ts +2 -0
  26. package/dist/i18n/br.d.ts +2 -0
  27. package/dist/i18n/bs.d.ts +2 -0
  28. package/dist/i18n/da.d.ts +2 -0
  29. package/dist/i18n/de.d.ts +2 -0
  30. package/dist/i18n/en.d.ts +1 -209
  31. package/dist/i18n/es.d.ts +2 -0
  32. package/dist/i18n/fr.d.ts +2 -0
  33. package/dist/i18n/ja.d.ts +2 -0
  34. package/dist/i18n/km.d.ts +2 -0
  35. package/dist/i18n/ko.d.ts +2 -0
  36. package/dist/i18n/lo.d.ts +2 -0
  37. package/dist/i18n/mk.d.ts +2 -0
  38. package/dist/i18n/mn.d.ts +2 -0
  39. package/dist/i18n/my.d.ts +2 -0
  40. package/dist/i18n/pl.d.ts +2 -0
  41. package/dist/i18n/ru.d.ts +2 -0
  42. package/dist/i18n/sr.d.ts +2 -0
  43. package/dist/i18n/tg.d.ts +2 -0
  44. package/dist/i18n/th.d.ts +2 -0
  45. package/dist/i18n/tr.d.ts +2 -0
  46. package/dist/i18n/zh.d.ts +2 -0
  47. package/dist/i18n/zht.d.ts +2 -0
  48. package/dist/v2/components/accordion-v2.d.ts +26 -0
  49. package/dist/{data-display/avatar/avatar.d.ts → v2/components/avatar-v2.d.ts} +1 -1
  50. package/dist/v2/components/badge-v2.d.ts +6 -0
  51. package/dist/v2/components/button-v2.d.ts +10 -0
  52. package/dist/v2/components/checkbox-v2.d.ts +10 -0
  53. package/dist/{overlays/dialog/dialog.d.ts → v2/components/dialog-v2.d.ts} +2 -1
  54. package/dist/v2/components/diff-changes-v2.d.ts +11 -0
  55. package/dist/v2/components/divider-v2.d.ts +5 -0
  56. package/dist/{forms/field/field.d.ts → v2/components/field-v2.d.ts} +10 -4
  57. package/dist/v2/components/icon-button-v2.d.ts +11 -0
  58. package/dist/{icons/icon → v2/components}/icon.d.ts +1 -16
  59. package/dist/v2/components/inline-input-v2.d.ts +21 -0
  60. package/dist/v2/components/keybind-v2.d.ts +7 -0
  61. package/dist/{data-display/line-comment/line-comment.d.ts → v2/components/line-comment-v2.d.ts} +9 -9
  62. package/dist/v2/components/loader-v2.d.ts +3 -0
  63. package/dist/v2/components/menu-v2.d.ts +52 -0
  64. package/dist/v2/components/progress-circle-v2.d.ts +8 -0
  65. package/dist/{data-display/project-avatar/project-avatar.d.ts → v2/components/project-avatar-v2.d.ts} +1 -1
  66. package/dist/v2/components/radio-v2.d.ts +16 -0
  67. package/dist/{navigation/segmented-control/segmented-control.d.ts → v2/components/segmented-control-v2.d.ts} +5 -5
  68. package/dist/{forms/select/select.d.ts → v2/components/select-v2.d.ts} +6 -4
  69. package/dist/v2/components/split-button-v2.d.ts +5 -0
  70. package/dist/v2/components/switch-v2.d.ts +7 -0
  71. package/dist/v2/components/tabs-v2.d.ts +34 -0
  72. package/dist/{forms/text-input/text-input.d.ts → v2/components/text-input-v2.d.ts} +3 -3
  73. package/dist/v2/components/text-shimmer-v2.d.ts +9 -0
  74. package/dist/v2/components/textarea-v2.d.ts +7 -0
  75. package/dist/v2/components/toast-v2.d.ts +57 -0
  76. package/dist/v2/components/tooltip-v2.d.ts +13 -0
  77. package/dist/v2/components/wordmark-v2.d.ts +2 -0
  78. package/package.json +13 -131
  79. package/src/{data-display/accordion → components}/accordion.css +26 -1
  80. package/src/{data-display/accordion → components}/accordion.tsx +14 -14
  81. package/src/components/animated-number.css +11 -29
  82. package/src/components/animated-number.tsx +2 -2
  83. package/src/components/avatar.css +49 -0
  84. package/src/components/avatar.tsx +55 -0
  85. package/src/components/button.css +194 -0
  86. package/src/components/button.tsx +33 -0
  87. package/src/components/card.css +23 -2
  88. package/src/components/card.tsx +4 -4
  89. package/src/{forms/checkbox → components}/checkbox.css +7 -1
  90. package/src/{forms/checkbox → components}/checkbox.tsx +13 -13
  91. package/src/components/collapsible.tsx +1 -1
  92. package/src/components/dialog.css +181 -0
  93. package/src/components/dialog.tsx +72 -0
  94. package/src/{data-display/diff-changes → components}/diff-changes.css +19 -22
  95. package/src/components/diff-changes.tsx +115 -0
  96. package/src/components/dropdown-menu.css +135 -0
  97. package/src/components/dropdown-menu.tsx +308 -0
  98. package/src/components/icon-button.css +181 -0
  99. package/src/components/icon-button.tsx +29 -0
  100. package/src/components/icon.css +39 -0
  101. package/src/{icons/icon/additional-icons.ts → components/icon.tsx} +74 -8
  102. package/src/components/image-preview.tsx +2 -3
  103. package/src/components/keybind.css +18 -0
  104. package/src/components/keybind.tsx +20 -0
  105. package/src/components/list.css +5 -5
  106. package/src/components/list.tsx +5 -7
  107. package/src/components/popover.tsx +2 -3
  108. package/src/components/progress-circle.css +16 -0
  109. package/src/components/progress-circle.tsx +64 -0
  110. package/src/components/provider-icon.tsx +1 -1
  111. package/src/components/radio-group.css +187 -0
  112. package/src/components/radio-group.tsx +83 -0
  113. package/src/components/scroll-view.tsx +20 -5
  114. package/src/components/select.css +201 -0
  115. package/src/components/select.tsx +174 -0
  116. package/src/components/sticky-accordion-header.tsx +1 -1
  117. package/src/components/switch.css +136 -0
  118. package/src/components/switch.tsx +29 -0
  119. package/src/{navigation/tabs → components}/tabs.css +229 -39
  120. package/src/components/tabs.tsx +126 -0
  121. package/src/components/tag.css +37 -0
  122. package/src/components/tag.tsx +22 -0
  123. package/src/components/text-field.tsx +4 -12
  124. package/src/{typography/text-shimmer → components}/text-shimmer.css +1 -2
  125. package/src/{typography/text-shimmer → components}/text-shimmer.tsx +0 -1
  126. package/src/components/toast.css +236 -0
  127. package/src/components/toast.tsx +185 -0
  128. package/src/components/tooltip.css +74 -0
  129. package/src/components/tooltip.tsx +163 -0
  130. package/src/context/i18n.tsx +14 -17
  131. package/src/hooks/create-auto-scroll.tsx +0 -20
  132. package/src/i18n/am.ts +2 -0
  133. package/src/i18n/ar.ts +2 -0
  134. package/src/i18n/az.ts +2 -0
  135. package/src/i18n/bg.ts +2 -0
  136. package/src/i18n/bn.ts +2 -0
  137. package/src/i18n/br.ts +2 -0
  138. package/src/i18n/bs.ts +2 -0
  139. package/src/i18n/ca.ts +2 -0
  140. package/src/i18n/cs.ts +2 -0
  141. package/src/i18n/da.ts +2 -0
  142. package/src/i18n/de.ts +2 -0
  143. package/src/i18n/dv.ts +2 -0
  144. package/src/i18n/dz.ts +2 -0
  145. package/src/i18n/el.ts +2 -0
  146. package/src/i18n/en.ts +4 -18
  147. package/src/i18n/es.ts +2 -0
  148. package/src/i18n/et.ts +2 -0
  149. package/src/i18n/fa.ts +2 -0
  150. package/src/i18n/fi.ts +2 -0
  151. package/src/i18n/fo.ts +2 -0
  152. package/src/i18n/fr.ts +2 -0
  153. package/src/i18n/hi.ts +2 -0
  154. package/src/i18n/hr.ts +2 -0
  155. package/src/i18n/hu.ts +2 -0
  156. package/src/i18n/hy.ts +2 -0
  157. package/src/i18n/id.ts +2 -0
  158. package/src/i18n/is.ts +2 -0
  159. package/src/i18n/it.ts +2 -0
  160. package/src/i18n/ja.ts +2 -0
  161. package/src/i18n/ka.ts +2 -0
  162. package/src/i18n/km.ts +2 -0
  163. package/src/i18n/ko.ts +2 -0
  164. package/src/i18n/lo.ts +2 -0
  165. package/src/i18n/lt.ts +2 -0
  166. package/src/i18n/lv.ts +2 -0
  167. package/src/i18n/mk.ts +2 -0
  168. package/src/i18n/mn.ts +2 -0
  169. package/src/i18n/ms.ts +2 -0
  170. package/src/i18n/my.ts +2 -0
  171. package/src/i18n/ne.ts +2 -0
  172. package/src/i18n/nl.ts +2 -0
  173. package/src/i18n/no.ts +2 -0
  174. package/src/i18n/pa.ts +2 -0
  175. package/src/i18n/pl.ts +2 -0
  176. package/src/i18n/ro.ts +2 -0
  177. package/src/i18n/ru.ts +2 -0
  178. package/src/i18n/si.ts +2 -0
  179. package/src/i18n/sk.ts +2 -0
  180. package/src/i18n/sl.ts +2 -0
  181. package/src/i18n/sq.ts +2 -0
  182. package/src/i18n/sr.ts +2 -0
  183. package/src/i18n/sv.ts +2 -0
  184. package/src/i18n/tg.ts +2 -0
  185. package/src/i18n/th.ts +2 -0
  186. package/src/i18n/tk.ts +2 -0
  187. package/src/i18n/tr.ts +2 -0
  188. package/src/i18n/uk.ts +2 -0
  189. package/src/i18n/ur.ts +2 -0
  190. package/src/i18n/uz.ts +2 -0
  191. package/src/i18n/vi.ts +2 -0
  192. package/src/i18n/zh.ts +2 -0
  193. package/src/i18n/zht.ts +2 -0
  194. package/src/styles/index.css +20 -4
  195. package/src/styles/tailwind/index.css +1 -15
  196. package/src/theme/context.tsx +11 -19
  197. package/src/theme/themes/oc-2.json +1 -1
  198. package/src/v2/components/accordion-v2.css +139 -0
  199. package/src/v2/components/accordion-v2.tsx +86 -0
  200. package/src/{data-display/avatar/avatar.tsx → v2/components/avatar-v2.tsx} +1 -1
  201. package/src/{data-display/badge/badge.css → v2/components/badge-v2.css} +0 -19
  202. package/src/{data-display/badge/badge.tsx → v2/components/badge-v2.tsx} +4 -6
  203. package/src/{actions/button/button.tsx → v2/components/button-v2.tsx} +8 -8
  204. package/src/v2/components/checkbox-v2.css +184 -0
  205. package/src/v2/components/checkbox-v2.tsx +65 -0
  206. package/src/{overlays/dialog/dialog.css → v2/components/dialog-v2.css} +0 -3
  207. package/src/{overlays/dialog/dialog.tsx → v2/components/dialog-v2.tsx} +13 -11
  208. package/src/v2/components/diff-changes-v2.css +26 -0
  209. package/src/{data-display/diff-changes/diff-changes.tsx → v2/components/diff-changes-v2.tsx} +2 -7
  210. package/src/{layout/divider/divider.tsx → v2/components/divider-v2.tsx} +3 -3
  211. package/src/{forms/field/field.tsx → v2/components/field-v2.tsx} +11 -9
  212. package/src/v2/components/icon-button-v2.tsx +37 -0
  213. package/src/{icons/icon → v2/components}/icon.tsx +9 -42
  214. package/src/v2/components/inline-input-v2.css +225 -0
  215. package/src/v2/components/inline-input-v2.tsx +107 -0
  216. package/src/{data-display/keybind/keybind.css → v2/components/keybind-v2.css} +1 -1
  217. package/src/{data-display/keybind/keybind.tsx → v2/components/keybind-v2.tsx} +3 -3
  218. package/src/{data-display/line-comment/line-comment.tsx → v2/components/line-comment-v2.tsx} +15 -17
  219. package/src/{feedback/loader/loader.tsx → v2/components/loader-v2.tsx} +2 -2
  220. package/src/{navigation/menu/menu.css → v2/components/menu-v2.css} +0 -121
  221. package/src/{navigation/menu/menu.tsx → v2/components/menu-v2.tsx} +32 -96
  222. package/src/v2/components/progress-circle-v2.css +13 -0
  223. package/src/v2/components/progress-circle-v2.tsx +52 -0
  224. package/src/{data-display/project-avatar/project-avatar.tsx → v2/components/project-avatar-v2.tsx} +1 -1
  225. package/src/{forms/radio/radio.tsx → v2/components/radio-v2.tsx} +20 -30
  226. package/src/{navigation/segmented-control/segmented-control.tsx → v2/components/segmented-control-v2.tsx} +8 -9
  227. package/src/{forms/select/select.css → v2/components/select-v2.css} +8 -2
  228. package/src/{forms/select/select.tsx → v2/components/select-v2.tsx} +32 -38
  229. package/src/{actions/split-button/split-button.css → v2/components/split-button-v2.css} +6 -1
  230. package/src/{actions/split-button/split-button.tsx → v2/components/split-button-v2.tsx} +4 -4
  231. package/src/{forms/switch/switch.css → v2/components/switch-v2.css} +0 -110
  232. package/src/v2/components/switch-v2.tsx +28 -0
  233. package/src/{navigation/tabs/tabs-current.css → v2/components/tabs-v2.css} +9 -24
  234. package/src/v2/components/tabs-v2.tsx +149 -0
  235. package/src/{forms/text-input/text-input.tsx → v2/components/text-input-v2.tsx} +4 -4
  236. package/src/v2/components/text-shimmer-v2.css +125 -0
  237. package/src/v2/components/text-shimmer-v2.tsx +63 -0
  238. package/src/{forms/textarea/textarea.tsx → v2/components/textarea-v2.tsx} +3 -3
  239. package/src/{feedback/toast/toast.tsx → v2/components/toast-v2.tsx} +58 -60
  240. package/src/{overlays/tooltip/tooltip.css → v2/components/tooltip-v2.css} +0 -26
  241. package/src/{overlays/tooltip/tooltip.tsx → v2/components/tooltip-v2.tsx} +14 -18
  242. package/src/{typography/wordmark/wordmark.tsx → v2/components/wordmark-v2.tsx} +1 -1
  243. package/src/{styles/tokens → v2/styles}/theme.css +12 -0
  244. package/dist/actions/button/button.d.ts +0 -10
  245. package/dist/actions/icon-button/icon-button.d.ts +0 -11
  246. package/dist/actions/split-button/split-button.d.ts +0 -5
  247. package/dist/data-display/badge/badge.d.ts +0 -7
  248. package/dist/data-display/keybind/keybind.d.ts +0 -7
  249. package/dist/feedback/loader/loader.d.ts +0 -3
  250. package/dist/feedback/toast/toast.d.ts +0 -57
  251. package/dist/forms/radio/radio.d.ts +0 -16
  252. package/dist/forms/textarea/textarea.d.ts +0 -7
  253. package/dist/i18n/he.d.ts +0 -197
  254. package/dist/layout/divider/divider.d.ts +0 -5
  255. package/dist/navigation/menu/menu.d.ts +0 -59
  256. package/dist/overlays/tooltip/tooltip.d.ts +0 -14
  257. package/dist/typography/wordmark/wordmark.d.ts +0 -2
  258. package/src/actions/icon-button/icon-button.tsx +0 -32
  259. package/src/feedback/progress-circle/progress-circle.css +0 -28
  260. package/src/feedback/progress-circle/progress-circle.tsx +0 -64
  261. package/src/forms/switch/switch.tsx +0 -34
  262. package/src/i18n/he.ts +0 -199
  263. package/src/icons/icon/icon.css +0 -3
  264. package/src/navigation/tabs/tabs.tsx +0 -194
  265. /package/dist/{forms/inline-input → components}/inline-input.d.ts +0 -0
  266. /package/dist/{navigation → v2/components}/tab-state-indicator.d.ts +0 -0
  267. /package/src/{forms/inline-input → components}/inline-input.css +0 -0
  268. /package/src/{forms/inline-input → components}/inline-input.tsx +0 -0
  269. /package/src/{data-display/avatar/avatar.css → v2/components/avatar-v2.css} +0 -0
  270. /package/src/{actions/button/button.css → v2/components/button-v2.css} +0 -0
  271. /package/src/{layout/divider/divider.css → v2/components/divider-v2.css} +0 -0
  272. /package/src/{forms/field/field.css → v2/components/field-v2.css} +0 -0
  273. /package/src/{styles/file-tree.css → v2/components/file-tree-v2.css} +0 -0
  274. /package/src/{actions/icon-button/icon-button.css → v2/components/icon-button-v2.css} +0 -0
  275. /package/src/{data-display/line-comment/line-comment.css → v2/components/line-comment-v2.css} +0 -0
  276. /package/src/{feedback/loader/loader.css → v2/components/loader-v2.css} +0 -0
  277. /package/src/{data-display/project-avatar/project-avatar.css → v2/components/project-avatar-v2.css} +0 -0
  278. /package/src/{forms/radio/radio.css → v2/components/radio-v2.css} +0 -0
  279. /package/src/{navigation/segmented-control/segmented-control.css → v2/components/segmented-control-v2.css} +0 -0
  280. /package/src/{navigation → v2/components}/tab-state-indicator.tsx +0 -0
  281. /package/src/{forms/text-input/text-input.css → v2/components/text-input-v2.css} +0 -0
  282. /package/src/{forms/textarea/textarea.css → v2/components/textarea-v2.css} +0 -0
  283. /package/src/{feedback/toast/toast.css → v2/components/toast-v2.css} +0 -0
  284. /package/src/{styles/tokens → v2/styles}/colors.css +0 -0
  285. /package/src/{styles/tokens/index.css → v2/styles/tailwind.css} +0 -0
@@ -0,0 +1,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
@@ -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"/>`,
@@ -128,14 +121,6 @@ const icons = {
128
121
  viewBox: "0 0 20 20",
129
122
  body: `<path d="M7 14.5H13M7 7.99512H10.0049M10.0049 7.99512H13M10.0049 7.99512V5M10.0049 7.99512V11M18 18V2L2 2L2 18H18Z" stroke="currentColor"/>`,
130
123
  },
131
- "window-analytics": {
132
- viewBox: "0 0 16 16",
133
- body: `<g transform="translate(1 2)"><path d="M7 4H11M7 8H11M0.5 0.5V11.5H13.5V0.5H0.5ZM3.5 3.5H4.5V4.5H3.5V3.5ZM3.5 7.5H4.5V8.5H3.5V7.5Z" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/></g>`,
134
- },
135
- trash: {
136
- viewBox: "0 0 20 20",
137
- 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"/>`,
138
- },
139
124
  "outline-sliders": {
140
125
  viewBox: "0 0 16 16",
141
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"/>`,
@@ -166,19 +151,10 @@ const icons = {
166
151
  },
167
152
  }
168
153
 
169
- type IconName = keyof typeof icons | keyof typeof additionalIcons
170
-
171
154
  const spriteID = "opencode-v2-icon-sprite"
172
- const symbol = (name: IconName) => `opencode-v2-icon-${name}`
155
+ const symbol = (name: keyof typeof icons) => `opencode-v2-icon-${name}`
173
156
  let spriteInserted = false
174
157
 
175
- function getIcon(name: IconName) {
176
- const icon = icons[name as keyof typeof icons]
177
- if (icon) return icon
178
- const body = additionalIcons[name as keyof typeof additionalIcons]
179
- return { body, viewBox: additionalIconViewBox(name as keyof typeof additionalIcons) }
180
- }
181
-
182
158
  function ensureSprite() {
183
159
  if (spriteInserted) return
184
160
  if (typeof document === "undefined") return
@@ -194,26 +170,25 @@ function ensureSprite() {
194
170
  svg.setAttribute("height", "0")
195
171
  svg.style.position = "absolute"
196
172
  svg.style.overflow = "hidden"
197
- svg.innerHTML = Array.from(new Set<IconName>([...Object.keys(additionalIcons), ...Object.keys(icons)] as IconName[]))
198
- .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
+ )
199
178
  .join("")
200
179
  document.body.insertBefore(svg, document.body.firstChild)
201
180
  spriteInserted = true
202
181
  }
203
182
 
204
183
  export interface IconProps extends ComponentProps<"svg"> {
205
- name: IconName | (string & {})
184
+ name: keyof typeof icons | (string & {})
206
185
  size?: "small" | "normal" | "large"
207
186
  }
208
187
 
209
188
  export function Icon(props: IconProps) {
210
189
  const [split, rest] = splitProps(props, ["name", "size"])
211
- const iconName = (): IconName => {
212
- if (icons[split.name as keyof typeof icons]) return split.name as keyof typeof icons
213
- if (additionalIcons[split.name as keyof typeof additionalIcons]) return split.name as keyof typeof additionalIcons
214
- return "plus"
215
- }
216
- 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()]
217
192
  const pixelSize = split.size === "small" ? 14 : split.size === "large" ? 20 : 16
218
193
  onMount(ensureSprite)
219
194
 
@@ -221,14 +196,6 @@ export function Icon(props: IconProps) {
221
196
  <svg
222
197
  {...rest}
223
198
  data-slot="icon-svg"
224
- data-directional={
225
- iconName() === "arrow-left" ||
226
- iconName() === "arrow-right" ||
227
- iconName() === "chevron-left" ||
228
- iconName() === "chevron-right"
229
- ? ""
230
- : undefined
231
- }
232
199
  width={pixelSize}
233
200
  height={pixelSize}
234
201
  viewBox={icon().viewBox}