@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,135 +0,0 @@
1
- [data-component="dropdown-menu-content"],
2
- [data-component="dropdown-menu-sub-content"] {
3
- min-width: 8rem;
4
- overflow: hidden;
5
- border-radius: var(--radius-md);
6
- border: 1px solid color-mix(in oklch, var(--border-base) 50%, transparent);
7
- background-clip: padding-box;
8
- background-color: var(--surface-raised-stronger-non-alpha);
9
- padding: 4px;
10
- box-shadow: var(--shadow-md);
11
- z-index: 50;
12
- transform-origin: var(--kb-menu-content-transform-origin);
13
-
14
- &:focus,
15
- &:focus-visible {
16
- outline: none;
17
- }
18
-
19
- &[data-closed] {
20
- animation: dropdown-menu-close 0.15s ease-out;
21
- }
22
-
23
- &[data-expanded] {
24
- animation: dropdown-menu-open 0.15s ease-out;
25
- }
26
- }
27
-
28
- [data-component="dropdown-menu-content"],
29
- [data-component="dropdown-menu-sub-content"] {
30
- [data-slot="dropdown-menu-item"],
31
- [data-slot="dropdown-menu-checkbox-item"],
32
- [data-slot="dropdown-menu-radio-item"],
33
- [data-slot="dropdown-menu-sub-trigger"] {
34
- position: relative;
35
- display: flex;
36
- align-items: center;
37
- gap: 8px;
38
- padding: 4px 8px;
39
- border-radius: var(--radius-sm);
40
- cursor: default;
41
- user-select: none;
42
- outline: none;
43
-
44
- font-family: var(--font-family-sans);
45
- font-size: var(--font-size-small);
46
- font-weight: var(--font-weight-medium);
47
- line-height: var(--line-height-large);
48
- letter-spacing: var(--letter-spacing-normal);
49
- color: var(--text-strong);
50
-
51
- &[data-highlighted] {
52
- background: var(--surface-raised-base-hover);
53
- }
54
-
55
- &[data-disabled] {
56
- color: var(--text-weak);
57
- pointer-events: none;
58
- }
59
- }
60
-
61
- [data-slot="dropdown-menu-checkbox-item"],
62
- [data-slot="dropdown-menu-radio-item"] {
63
- padding-inline-end: 28px;
64
- }
65
-
66
- [data-slot="dropdown-menu-sub-trigger"] {
67
- &[data-expanded] {
68
- background: var(--surface-raised-base-hover);
69
- }
70
- }
71
-
72
- [data-slot="dropdown-menu-item-indicator"] {
73
- display: flex;
74
- align-items: center;
75
- justify-content: center;
76
- width: 16px;
77
- height: 16px;
78
- position: absolute;
79
- inset-inline-end: 8px;
80
- top: 50%;
81
- transform: translateY(-50%);
82
- }
83
-
84
- [data-slot="dropdown-menu-item-label"] {
85
- flex: 1;
86
- }
87
-
88
- [data-slot="dropdown-menu-item-description"] {
89
- font-size: var(--font-size-x-small);
90
- color: var(--text-weak);
91
- }
92
-
93
- [data-slot="dropdown-menu-separator"] {
94
- height: 1px;
95
- margin: 4px -4px;
96
- border-top-color: var(--border-weak-base);
97
- }
98
-
99
- [data-slot="dropdown-menu-group-label"] {
100
- display: block;
101
- padding: 4px 8px;
102
- font-family: var(--font-family-sans);
103
- font-size: var(--font-size-x-small);
104
- font-weight: var(--font-weight-medium);
105
- line-height: var(--line-height-large);
106
- letter-spacing: var(--letter-spacing-normal);
107
- color: var(--text-weak);
108
- }
109
-
110
- [data-slot="dropdown-menu-arrow"] {
111
- fill: var(--surface-raised-stronger-non-alpha);
112
- }
113
- }
114
-
115
- @keyframes dropdown-menu-open {
116
- from {
117
- opacity: 0;
118
- transform: scale(0.96);
119
- }
120
- to {
121
- opacity: 1;
122
- transform: scale(1);
123
- }
124
- }
125
-
126
- @keyframes dropdown-menu-close {
127
- from {
128
- opacity: 1;
129
- transform: scale(1);
130
- }
131
- to {
132
- opacity: 0;
133
- transform: scale(0.96);
134
- }
135
- }
@@ -1,308 +0,0 @@
1
- import { DropdownMenu as Kobalte } from "@kobalte/core/dropdown-menu"
2
- import { splitProps } from "solid-js"
3
- import type { ComponentProps, ParentProps } from "solid-js"
4
-
5
- export interface DropdownMenuProps extends ComponentProps<typeof Kobalte> {}
6
- export interface DropdownMenuTriggerProps extends ComponentProps<typeof Kobalte.Trigger> {}
7
- export interface DropdownMenuIconProps extends ComponentProps<typeof Kobalte.Icon> {}
8
- export interface DropdownMenuPortalProps extends ComponentProps<typeof Kobalte.Portal> {}
9
- export interface DropdownMenuContentProps extends ComponentProps<typeof Kobalte.Content> {}
10
- export interface DropdownMenuArrowProps extends ComponentProps<typeof Kobalte.Arrow> {}
11
- export interface DropdownMenuSeparatorProps extends ComponentProps<typeof Kobalte.Separator> {}
12
- export interface DropdownMenuGroupProps extends ComponentProps<typeof Kobalte.Group> {}
13
- export interface DropdownMenuGroupLabelProps extends ComponentProps<typeof Kobalte.GroupLabel> {}
14
- export interface DropdownMenuItemProps extends ComponentProps<typeof Kobalte.Item> {}
15
- export interface DropdownMenuItemLabelProps extends ComponentProps<typeof Kobalte.ItemLabel> {}
16
- export interface DropdownMenuItemDescriptionProps extends ComponentProps<typeof Kobalte.ItemDescription> {}
17
- export interface DropdownMenuItemIndicatorProps extends ComponentProps<typeof Kobalte.ItemIndicator> {}
18
- export interface DropdownMenuRadioGroupProps extends ComponentProps<typeof Kobalte.RadioGroup> {}
19
- export interface DropdownMenuRadioItemProps extends ComponentProps<typeof Kobalte.RadioItem> {}
20
- export interface DropdownMenuCheckboxItemProps extends ComponentProps<typeof Kobalte.CheckboxItem> {}
21
- export interface DropdownMenuSubProps extends ComponentProps<typeof Kobalte.Sub> {}
22
- export interface DropdownMenuSubTriggerProps extends ComponentProps<typeof Kobalte.SubTrigger> {}
23
- export interface DropdownMenuSubContentProps extends ComponentProps<typeof Kobalte.SubContent> {}
24
-
25
- function DropdownMenuRoot(props: DropdownMenuProps) {
26
- return <Kobalte {...props} data-component="dropdown-menu" />
27
- }
28
-
29
- function DropdownMenuTrigger(props: ParentProps<DropdownMenuTriggerProps>) {
30
- const [local, rest] = splitProps(props, ["class", "classList", "children"])
31
- return (
32
- <Kobalte.Trigger
33
- {...rest}
34
- data-slot="dropdown-menu-trigger"
35
- classList={{
36
- ...local.classList,
37
- [local.class ?? ""]: !!local.class,
38
- }}
39
- >
40
- {local.children}
41
- </Kobalte.Trigger>
42
- )
43
- }
44
-
45
- function DropdownMenuIcon(props: ParentProps<DropdownMenuIconProps>) {
46
- const [local, rest] = splitProps(props, ["class", "classList", "children"])
47
- return (
48
- <Kobalte.Icon
49
- {...rest}
50
- data-slot="dropdown-menu-icon"
51
- classList={{
52
- ...local.classList,
53
- [local.class ?? ""]: !!local.class,
54
- }}
55
- >
56
- {local.children}
57
- </Kobalte.Icon>
58
- )
59
- }
60
-
61
- function DropdownMenuPortal(props: DropdownMenuPortalProps) {
62
- return <Kobalte.Portal {...props} />
63
- }
64
-
65
- function DropdownMenuContent(props: ParentProps<DropdownMenuContentProps>) {
66
- const [local, rest] = splitProps(props, ["class", "classList", "children"])
67
- return (
68
- <Kobalte.Content
69
- {...rest}
70
- data-component="dropdown-menu-content"
71
- classList={{
72
- ...local.classList,
73
- [local.class ?? ""]: !!local.class,
74
- }}
75
- >
76
- {local.children}
77
- </Kobalte.Content>
78
- )
79
- }
80
-
81
- function DropdownMenuArrow(props: DropdownMenuArrowProps) {
82
- const [local, rest] = splitProps(props, ["class", "classList"])
83
- return (
84
- <Kobalte.Arrow
85
- {...rest}
86
- data-slot="dropdown-menu-arrow"
87
- classList={{
88
- ...local.classList,
89
- [local.class ?? ""]: !!local.class,
90
- }}
91
- />
92
- )
93
- }
94
-
95
- function DropdownMenuSeparator(props: DropdownMenuSeparatorProps) {
96
- const [local, rest] = splitProps(props, ["class", "classList"])
97
- return (
98
- <Kobalte.Separator
99
- {...rest}
100
- data-slot="dropdown-menu-separator"
101
- classList={{
102
- ...local.classList,
103
- [local.class ?? ""]: !!local.class,
104
- }}
105
- />
106
- )
107
- }
108
-
109
- function DropdownMenuGroup(props: ParentProps<DropdownMenuGroupProps>) {
110
- const [local, rest] = splitProps(props, ["class", "classList", "children"])
111
- return (
112
- <Kobalte.Group
113
- {...rest}
114
- data-slot="dropdown-menu-group"
115
- classList={{
116
- ...local.classList,
117
- [local.class ?? ""]: !!local.class,
118
- }}
119
- >
120
- {local.children}
121
- </Kobalte.Group>
122
- )
123
- }
124
-
125
- function DropdownMenuGroupLabel(props: ParentProps<DropdownMenuGroupLabelProps>) {
126
- const [local, rest] = splitProps(props, ["class", "classList", "children"])
127
- return (
128
- <Kobalte.GroupLabel
129
- {...rest}
130
- data-slot="dropdown-menu-group-label"
131
- classList={{
132
- ...local.classList,
133
- [local.class ?? ""]: !!local.class,
134
- }}
135
- >
136
- {local.children}
137
- </Kobalte.GroupLabel>
138
- )
139
- }
140
-
141
- function DropdownMenuItem(props: ParentProps<DropdownMenuItemProps>) {
142
- const [local, rest] = splitProps(props, ["class", "classList", "children"])
143
- return (
144
- <Kobalte.Item
145
- {...rest}
146
- data-slot="dropdown-menu-item"
147
- classList={{
148
- ...local.classList,
149
- [local.class ?? ""]: !!local.class,
150
- }}
151
- >
152
- {local.children}
153
- </Kobalte.Item>
154
- )
155
- }
156
-
157
- function DropdownMenuItemLabel(props: ParentProps<DropdownMenuItemLabelProps>) {
158
- const [local, rest] = splitProps(props, ["class", "classList", "children"])
159
- return (
160
- <Kobalte.ItemLabel
161
- {...rest}
162
- data-slot="dropdown-menu-item-label"
163
- classList={{
164
- ...local.classList,
165
- [local.class ?? ""]: !!local.class,
166
- }}
167
- >
168
- {local.children}
169
- </Kobalte.ItemLabel>
170
- )
171
- }
172
-
173
- function DropdownMenuItemDescription(props: ParentProps<DropdownMenuItemDescriptionProps>) {
174
- const [local, rest] = splitProps(props, ["class", "classList", "children"])
175
- return (
176
- <Kobalte.ItemDescription
177
- {...rest}
178
- data-slot="dropdown-menu-item-description"
179
- classList={{
180
- ...local.classList,
181
- [local.class ?? ""]: !!local.class,
182
- }}
183
- >
184
- {local.children}
185
- </Kobalte.ItemDescription>
186
- )
187
- }
188
-
189
- function DropdownMenuItemIndicator(props: ParentProps<DropdownMenuItemIndicatorProps>) {
190
- const [local, rest] = splitProps(props, ["class", "classList", "children"])
191
- return (
192
- <Kobalte.ItemIndicator
193
- {...rest}
194
- data-slot="dropdown-menu-item-indicator"
195
- classList={{
196
- ...local.classList,
197
- [local.class ?? ""]: !!local.class,
198
- }}
199
- >
200
- {local.children}
201
- </Kobalte.ItemIndicator>
202
- )
203
- }
204
-
205
- function DropdownMenuRadioGroup(props: ParentProps<DropdownMenuRadioGroupProps>) {
206
- const [local, rest] = splitProps(props, ["class", "classList", "children"])
207
- return (
208
- <Kobalte.RadioGroup
209
- {...rest}
210
- data-slot="dropdown-menu-radio-group"
211
- classList={{
212
- ...local.classList,
213
- [local.class ?? ""]: !!local.class,
214
- }}
215
- >
216
- {local.children}
217
- </Kobalte.RadioGroup>
218
- )
219
- }
220
-
221
- function DropdownMenuRadioItem(props: ParentProps<DropdownMenuRadioItemProps>) {
222
- const [local, rest] = splitProps(props, ["class", "classList", "children"])
223
- return (
224
- <Kobalte.RadioItem
225
- {...rest}
226
- data-slot="dropdown-menu-radio-item"
227
- classList={{
228
- ...local.classList,
229
- [local.class ?? ""]: !!local.class,
230
- }}
231
- >
232
- {local.children}
233
- </Kobalte.RadioItem>
234
- )
235
- }
236
-
237
- function DropdownMenuCheckboxItem(props: ParentProps<DropdownMenuCheckboxItemProps>) {
238
- const [local, rest] = splitProps(props, ["class", "classList", "children"])
239
- return (
240
- <Kobalte.CheckboxItem
241
- {...rest}
242
- data-slot="dropdown-menu-checkbox-item"
243
- classList={{
244
- ...local.classList,
245
- [local.class ?? ""]: !!local.class,
246
- }}
247
- >
248
- {local.children}
249
- </Kobalte.CheckboxItem>
250
- )
251
- }
252
-
253
- function DropdownMenuSub(props: DropdownMenuSubProps) {
254
- return <Kobalte.Sub {...props} />
255
- }
256
-
257
- function DropdownMenuSubTrigger(props: ParentProps<DropdownMenuSubTriggerProps>) {
258
- const [local, rest] = splitProps(props, ["class", "classList", "children"])
259
- return (
260
- <Kobalte.SubTrigger
261
- {...rest}
262
- data-slot="dropdown-menu-sub-trigger"
263
- classList={{
264
- ...local.classList,
265
- [local.class ?? ""]: !!local.class,
266
- }}
267
- >
268
- {local.children}
269
- </Kobalte.SubTrigger>
270
- )
271
- }
272
-
273
- function DropdownMenuSubContent(props: ParentProps<DropdownMenuSubContentProps>) {
274
- const [local, rest] = splitProps(props, ["class", "classList", "children"])
275
- return (
276
- <Kobalte.SubContent
277
- {...rest}
278
- data-component="dropdown-menu-sub-content"
279
- classList={{
280
- ...local.classList,
281
- [local.class ?? ""]: !!local.class,
282
- }}
283
- >
284
- {local.children}
285
- </Kobalte.SubContent>
286
- )
287
- }
288
-
289
- export const DropdownMenu = Object.assign(DropdownMenuRoot, {
290
- Trigger: DropdownMenuTrigger,
291
- Icon: DropdownMenuIcon,
292
- Portal: DropdownMenuPortal,
293
- Content: DropdownMenuContent,
294
- Arrow: DropdownMenuArrow,
295
- Separator: DropdownMenuSeparator,
296
- Group: DropdownMenuGroup,
297
- GroupLabel: DropdownMenuGroupLabel,
298
- Item: DropdownMenuItem,
299
- ItemLabel: DropdownMenuItemLabel,
300
- ItemDescription: DropdownMenuItemDescription,
301
- ItemIndicator: DropdownMenuItemIndicator,
302
- RadioGroup: DropdownMenuRadioGroup,
303
- RadioItem: DropdownMenuRadioItem,
304
- CheckboxItem: DropdownMenuCheckboxItem,
305
- Sub: DropdownMenuSub,
306
- SubTrigger: DropdownMenuSubTrigger,
307
- SubContent: DropdownMenuSubContent,
308
- })
@@ -1,181 +0,0 @@
1
- [data-component="icon-button"] {
2
- display: inline-flex;
3
- align-items: center;
4
- justify-content: center;
5
- border-radius: var(--radius-sm);
6
- text-decoration: none;
7
- user-select: none;
8
- aspect-ratio: 1;
9
- flex-shrink: 0;
10
-
11
- &[data-variant="primary"] {
12
- background-color: var(--icon-strong-base);
13
-
14
- [data-slot="icon-svg"] {
15
- /* color: var(--icon-weak-base); */
16
- color: var(--icon-invert-base);
17
-
18
- /* &:hover:not(:disabled) { */
19
- /* color: var(--icon-weak-hover); */
20
- /* } */
21
- /* &:active:not(:disabled) { */
22
- /* color: var(--icon-strong-active); */
23
- /* } */
24
- }
25
-
26
- &:hover:not(:disabled) {
27
- background-color: var(--icon-strong-hover);
28
- }
29
- &:focus:not(:disabled) {
30
- background-color: var(--icon-strong-focus);
31
- }
32
- &:active:not(:disabled) {
33
- background-color: var(--icon-strong-active);
34
- }
35
- &:disabled {
36
- background-color: var(--icon-strong-disabled);
37
-
38
- [data-slot="icon-svg"] {
39
- color: var(--icon-invert-base);
40
- }
41
- }
42
- }
43
-
44
- &[data-variant="secondary"] {
45
- border: transparent;
46
- background-color: var(--button-secondary-base);
47
- color: var(--text-strong);
48
- box-shadow: var(--shadow-xs-border-base);
49
-
50
- &:hover:not(:disabled) {
51
- background-color: var(--button-secondary-hover);
52
- }
53
- &:focus:not(:disabled) {
54
- background-color: var(--button-secondary-base);
55
- }
56
- &:focus-visible:not(:active) {
57
- background-color: var(--button-secondary-base);
58
- box-shadow: var(--shadow-xs-border-focus);
59
- }
60
- &:focus-visible:active {
61
- box-shadow: none;
62
- }
63
- &:active:not(:disabled) {
64
- background-color: var(--button-secondary-base);
65
- }
66
-
67
- [data-slot="icon-svg"] {
68
- color: var(--icon-strong-base);
69
- }
70
-
71
- &:disabled {
72
- background-color: var(--icon-strong-disabled);
73
- color: var(--icon-invert-base);
74
- cursor: not-allowed;
75
- }
76
- }
77
-
78
- &[data-variant="ghost"] {
79
- background-color: transparent;
80
- /* color: var(--icon-base); */
81
-
82
- [data-slot="icon-svg"] {
83
- color: var(--icon-base);
84
- }
85
-
86
- &:hover:not(:disabled) {
87
- background-color: var(--surface-base-hover);
88
-
89
- /* [data-slot="icon-svg"] { */
90
- /* color: var(--icon-hover); */
91
- /* } */
92
- }
93
- &:focus-visible:not(:disabled) {
94
- background-color: var(--surface-base-hover);
95
- }
96
- &:active:not(:disabled) {
97
- background-color: var(--surface-base-active);
98
- /* [data-slot="icon-svg"] { */
99
- /* color: var(--icon-active); */
100
- /* } */
101
- }
102
- &:selected:not(:disabled) {
103
- background-color: var(--surface-base-active);
104
- /* [data-slot="icon-svg"] { */
105
- /* color: var(--icon-selected); */
106
- /* } */
107
- }
108
- &:disabled {
109
- color: var(--icon-invert-base);
110
- cursor: not-allowed;
111
- }
112
- }
113
-
114
- &[data-size="normal"] {
115
- width: 24px;
116
- height: 24px;
117
-
118
- font-size: var(--font-size-small);
119
- line-height: var(--line-height-large);
120
- gap: calc(var(--spacing) * 0.5);
121
- }
122
-
123
- &[data-size="small"] {
124
- width: 20px;
125
- height: 20px;
126
- }
127
-
128
- &[data-size="large"] {
129
- height: 32px;
130
- /* padding: 0 8px 0 6px; */
131
- gap: 8px;
132
-
133
- /* text-12-medium */
134
- font-family: var(--font-family-sans);
135
- font-size: var(--font-size-small);
136
- font-style: normal;
137
- font-weight: var(--font-weight-medium);
138
- line-height: var(--line-height-large); /* 166.667% */
139
- letter-spacing: var(--letter-spacing-normal);
140
- }
141
-
142
- &:focus {
143
- outline: none;
144
- }
145
- }
146
-
147
- @media (prefers-reduced-motion: no-preference) {
148
- [data-component="icon-button"][data-icon="stop"] [data-slot="icon-svg"] rect {
149
- transform-origin: center;
150
- transform-box: fill-box;
151
- animation: stop-pulse 1.8s ease-in-out infinite;
152
- }
153
- }
154
-
155
- @keyframes stop-pulse {
156
- 0%,
157
- 100% {
158
- transform: scale(0.95);
159
- }
160
- 50% {
161
- transform: scale(1.12);
162
- }
163
- }
164
-
165
- [data-component="icon-button"].titlebar-icon {
166
- width: 32px;
167
- height: 24px;
168
- aspect-ratio: auto;
169
- }
170
-
171
- [data-component="icon-button"].titlebar-icon[data-variant="ghost"][aria-expanded="true"] {
172
- background-color: var(--surface-raised-base-active);
173
- }
174
-
175
- [data-component="icon-button"].titlebar-icon[data-variant="ghost"][aria-expanded="true"] [data-slot="icon-svg"] {
176
- color: var(--icon-strong-base);
177
- }
178
-
179
- [data-component="icon-button"].titlebar-icon[data-variant="ghost"][aria-expanded="true"]:hover:not(:disabled) {
180
- background-color: var(--surface-raised-base-active);
181
- }
@@ -1,29 +0,0 @@
1
- import { Button as Kobalte } from "@kobalte/core/button"
2
- import { type ComponentProps, splitProps } from "solid-js"
3
- import { Icon, IconProps } from "./icon"
4
-
5
- export interface IconButtonProps extends ComponentProps<typeof Kobalte> {
6
- icon: IconProps["name"]
7
- size?: "small" | "normal" | "large"
8
- iconSize?: IconProps["size"]
9
- variant?: "primary" | "secondary" | "ghost"
10
- }
11
-
12
- export function IconButton(props: ComponentProps<"button"> & IconButtonProps) {
13
- const [split, rest] = splitProps(props, ["variant", "size", "iconSize", "class", "classList"])
14
- return (
15
- <Kobalte
16
- {...rest}
17
- data-component="icon-button"
18
- data-icon={props.icon}
19
- data-size={split.size || "normal"}
20
- data-variant={split.variant || "secondary"}
21
- classList={{
22
- ...split.classList,
23
- [split.class ?? ""]: !!split.class,
24
- }}
25
- >
26
- <Icon name={props.icon} size={split.iconSize ?? (split.size === "large" ? "normal" : "small")} />
27
- </Kobalte>
28
- )
29
- }
@@ -1,39 +0,0 @@
1
- [data-component="icon"] {
2
- display: inline-flex;
3
- align-items: center;
4
- justify-content: center;
5
- flex-shrink: 0;
6
- /* resize: both; */
7
- aspect-ratio: 1/1;
8
- color: var(--icon-base);
9
-
10
- &[data-size="small"] {
11
- width: 16px;
12
- height: 16px;
13
- }
14
-
15
- &[data-size="normal"] {
16
- width: 20px;
17
- height: 20px;
18
- }
19
-
20
- &[data-size="medium"] {
21
- width: 24px;
22
- height: 24px;
23
- }
24
-
25
- &[data-size="large"] {
26
- width: 24px;
27
- height: 24px;
28
- }
29
-
30
- [data-slot="icon-svg"] {
31
- width: 100%;
32
- height: auto;
33
- }
34
- }
35
-
36
- :dir(rtl) [data-component="icon"][data-directional] [data-slot="icon-svg"],
37
- :dir(rtl) [data-slot="menu-v2-item-chevron"] {
38
- transform: scaleX(-1);
39
- }
@@ -1,18 +0,0 @@
1
- [data-component="keybind"] {
2
- display: flex;
3
- align-items: center;
4
- justify-content: center;
5
- flex-shrink: 0;
6
- height: 20px;
7
- padding: 0 8px;
8
- border-radius: 2px;
9
- background: var(--surface-base);
10
- box-shadow: var(--shadow-xxs-border);
11
-
12
- /* text-12-regular */
13
- font-family: var(--font-family-sans);
14
- font-size: 12px;
15
- font-weight: var(--font-weight-regular);
16
- line-height: 1;
17
- color: var(--text-weak);
18
- }