@opencode-ai/ui 0.0.0-dev-202609010135 → 0.0.0-dev-18786

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 (295) 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/context/marked-base.d.ts +3 -0
  9. package/dist/context/marked-parser.d.ts +1 -2
  10. package/dist/{components → data-display/accordion}/accordion.d.ts +6 -6
  11. package/dist/{v2/components/avatar-v2.d.ts → data-display/avatar/avatar.d.ts} +1 -1
  12. package/dist/data-display/badge/badge.d.ts +7 -0
  13. package/dist/{components → data-display/diff-changes}/diff-changes.d.ts +2 -1
  14. package/dist/data-display/keybind/keybind.d.ts +7 -0
  15. package/dist/{v2/components/line-comment-v2.d.ts → data-display/line-comment/line-comment.d.ts} +9 -9
  16. package/dist/{v2/components/project-avatar-v2.d.ts → data-display/project-avatar/project-avatar.d.ts} +1 -1
  17. package/dist/feedback/loader/loader.d.ts +3 -0
  18. package/dist/{components → feedback/progress-circle}/progress-circle.d.ts +2 -0
  19. package/dist/feedback/toast/toast.d.ts +57 -0
  20. package/dist/{components → forms/checkbox}/checkbox.d.ts +2 -2
  21. package/dist/{v2/components/field-v2.d.ts → forms/field/field.d.ts} +4 -10
  22. package/dist/forms/radio/radio.d.ts +16 -0
  23. package/dist/{v2/components/select-v2.d.ts → forms/select/select.d.ts} +4 -6
  24. package/dist/{components → forms/switch}/switch.d.ts +4 -2
  25. package/dist/{v2/components/text-input-v2.d.ts → forms/text-input/text-input.d.ts} +3 -3
  26. package/dist/forms/textarea/textarea.d.ts +7 -0
  27. package/dist/hooks/use-filtered-list.d.ts +9 -0
  28. package/dist/i18n/ar.d.ts +0 -2
  29. package/dist/i18n/bg.d.ts +0 -2
  30. package/dist/i18n/br.d.ts +0 -2
  31. package/dist/i18n/bs.d.ts +0 -2
  32. package/dist/i18n/da.d.ts +0 -2
  33. package/dist/i18n/de.d.ts +0 -2
  34. package/dist/i18n/en.d.ts +230 -1
  35. package/dist/i18n/es.d.ts +0 -2
  36. package/dist/i18n/fr.d.ts +0 -2
  37. package/dist/i18n/he.d.ts +197 -0
  38. package/dist/i18n/ja.d.ts +0 -2
  39. package/dist/i18n/km.d.ts +0 -2
  40. package/dist/i18n/ko.d.ts +0 -2
  41. package/dist/i18n/lo.d.ts +0 -2
  42. package/dist/i18n/mk.d.ts +0 -2
  43. package/dist/i18n/mn.d.ts +0 -2
  44. package/dist/i18n/my.d.ts +0 -2
  45. package/dist/i18n/pl.d.ts +0 -2
  46. package/dist/i18n/ru.d.ts +0 -2
  47. package/dist/i18n/sr.d.ts +0 -2
  48. package/dist/i18n/tg.d.ts +0 -2
  49. package/dist/i18n/th.d.ts +0 -2
  50. package/dist/i18n/tr.d.ts +0 -2
  51. package/dist/i18n/zh.d.ts +0 -2
  52. package/dist/i18n/zht.d.ts +0 -2
  53. package/dist/{components/icon.d.ts → icons/icon/additional-icons.d.ts} +8 -8
  54. package/dist/{v2/components → icons/icon}/icon.d.ts +24 -1
  55. package/dist/layout/divider/divider.d.ts +5 -0
  56. package/dist/navigation/menu/menu.d.ts +59 -0
  57. package/dist/{v2/components/segmented-control-v2.d.ts → navigation/segmented-control/segmented-control.d.ts} +5 -5
  58. package/dist/{components → navigation/tabs}/tabs.d.ts +15 -8
  59. package/dist/{v2/components/dialog-v2.d.ts → overlays/dialog/dialog.d.ts} +1 -2
  60. package/dist/overlays/tooltip/tooltip.d.ts +15 -0
  61. package/dist/{components → typography/text-shimmer}/text-shimmer.d.ts +1 -0
  62. package/dist/typography/wordmark/wordmark.d.ts +2 -0
  63. package/package.json +140 -34
  64. package/src/{components → actions/button}/button.tsx +10 -11
  65. package/src/actions/icon-button/icon-button.tsx +32 -0
  66. package/src/{v2/components/split-button-v2.css → actions/split-button/split-button.css} +1 -6
  67. package/src/{v2/components/split-button-v2.tsx → actions/split-button/split-button.tsx} +4 -4
  68. package/src/components/animated-number.css +29 -11
  69. package/src/components/animated-number.tsx +2 -2
  70. package/src/components/card.css +2 -23
  71. package/src/components/card.tsx +4 -4
  72. package/src/components/collapsible.tsx +2 -2
  73. package/src/components/dock-surface.css +2 -9
  74. package/src/components/image-preview.tsx +3 -2
  75. package/src/components/list.css +5 -5
  76. package/src/components/list.tsx +7 -5
  77. package/src/components/popover.tsx +3 -2
  78. package/src/components/scroll-view.tsx +5 -20
  79. package/src/components/sticky-accordion-header.tsx +1 -1
  80. package/src/components/text-field.tsx +12 -4
  81. package/src/context/dialog.tsx +1 -0
  82. package/src/context/i18n.tsx +17 -14
  83. package/src/context/marked-base.tsx +27 -0
  84. package/src/context/marked-parser.tsx +3 -13
  85. package/src/{components → data-display/accordion}/accordion.css +5 -31
  86. package/src/{components → data-display/accordion}/accordion.tsx +14 -14
  87. package/src/{v2/components/avatar-v2.tsx → data-display/avatar/avatar.tsx} +1 -1
  88. package/src/{v2/components/badge-v2.css → data-display/badge/badge.css} +19 -0
  89. package/src/{v2/components/badge-v2.tsx → data-display/badge/badge.tsx} +6 -4
  90. package/src/{components → data-display/diff-changes}/diff-changes.css +22 -19
  91. package/src/{v2/components/diff-changes-v2.tsx → data-display/diff-changes/diff-changes.tsx} +7 -2
  92. package/src/{v2/components/keybind-v2.css → data-display/keybind/keybind.css} +1 -1
  93. package/src/{v2/components/keybind-v2.tsx → data-display/keybind/keybind.tsx} +3 -3
  94. package/src/{v2/components/line-comment-v2.css → data-display/line-comment/line-comment.css} +3 -3
  95. package/src/{v2/components/line-comment-v2.tsx → data-display/line-comment/line-comment.tsx} +17 -15
  96. package/src/{v2/components/project-avatar-v2.tsx → data-display/project-avatar/project-avatar.tsx} +1 -1
  97. package/src/{v2/components/loader-v2.tsx → feedback/loader/loader.tsx} +2 -2
  98. package/src/feedback/progress-circle/progress-circle.css +28 -0
  99. package/src/feedback/progress-circle/progress-circle.tsx +64 -0
  100. package/src/{v2/components/toast-v2.tsx → feedback/toast/toast.tsx} +60 -58
  101. package/src/{components → forms/checkbox}/checkbox.css +1 -7
  102. package/src/{components → forms/checkbox}/checkbox.tsx +13 -13
  103. package/src/{v2/components/field-v2.css → forms/field/field.css} +1 -1
  104. package/src/{v2/components/field-v2.tsx → forms/field/field.tsx} +9 -11
  105. package/src/{v2/components/radio-v2.tsx → forms/radio/radio.tsx} +30 -20
  106. package/src/{v2/components/select-v2.css → forms/select/select.css} +2 -8
  107. package/src/{v2/components/select-v2.tsx → forms/select/select.tsx} +38 -32
  108. package/src/{v2/components/switch-v2.css → forms/switch/switch.css} +110 -0
  109. package/src/forms/switch/switch.tsx +34 -0
  110. package/src/{v2/components/text-input-v2.css → forms/text-input/text-input.css} +1 -1
  111. package/src/{v2/components/text-input-v2.tsx → forms/text-input/text-input.tsx} +4 -4
  112. package/src/{v2/components/textarea-v2.tsx → forms/textarea/textarea.tsx} +3 -3
  113. package/src/hooks/create-auto-scroll.tsx +20 -0
  114. package/src/i18n/am.ts +1 -3
  115. package/src/i18n/ar.ts +1 -3
  116. package/src/i18n/az.ts +1 -3
  117. package/src/i18n/bg.ts +1 -3
  118. package/src/i18n/bn.ts +1 -3
  119. package/src/i18n/br.ts +1 -3
  120. package/src/i18n/bs.ts +1 -3
  121. package/src/i18n/ca.ts +1 -3
  122. package/src/i18n/cs.ts +1 -3
  123. package/src/i18n/da.ts +1 -3
  124. package/src/i18n/de.ts +1 -3
  125. package/src/i18n/dv.ts +1 -3
  126. package/src/i18n/dz.ts +1 -3
  127. package/src/i18n/el.ts +1 -3
  128. package/src/i18n/en.ts +40 -5
  129. package/src/i18n/es.ts +1 -3
  130. package/src/i18n/et.ts +1 -3
  131. package/src/i18n/fa.ts +1 -3
  132. package/src/i18n/fi.ts +1 -3
  133. package/src/i18n/fo.ts +1 -3
  134. package/src/i18n/fr.ts +1 -3
  135. package/src/i18n/he.ts +199 -0
  136. package/src/i18n/hi.ts +1 -3
  137. package/src/i18n/hr.ts +1 -3
  138. package/src/i18n/hu.ts +1 -3
  139. package/src/i18n/hy.ts +1 -3
  140. package/src/i18n/id.ts +1 -3
  141. package/src/i18n/is.ts +1 -3
  142. package/src/i18n/it.ts +1 -3
  143. package/src/i18n/ja.ts +1 -3
  144. package/src/i18n/ka.ts +1 -3
  145. package/src/i18n/km.ts +1 -3
  146. package/src/i18n/ko.ts +1 -3
  147. package/src/i18n/lo.ts +1 -3
  148. package/src/i18n/lt.ts +1 -3
  149. package/src/i18n/lv.ts +1 -3
  150. package/src/i18n/mk.ts +1 -3
  151. package/src/i18n/mn.ts +1 -3
  152. package/src/i18n/ms.ts +1 -3
  153. package/src/i18n/my.ts +1 -3
  154. package/src/i18n/ne.ts +1 -3
  155. package/src/i18n/nl.ts +1 -3
  156. package/src/i18n/no.ts +1 -3
  157. package/src/i18n/pa.ts +1 -3
  158. package/src/i18n/pl.ts +1 -3
  159. package/src/i18n/ro.ts +1 -3
  160. package/src/i18n/ru.ts +1 -3
  161. package/src/i18n/si.ts +1 -3
  162. package/src/i18n/sk.ts +1 -3
  163. package/src/i18n/sl.ts +1 -3
  164. package/src/i18n/sq.ts +1 -3
  165. package/src/i18n/sr.ts +1 -3
  166. package/src/i18n/sv.ts +1 -3
  167. package/src/i18n/tg.ts +1 -3
  168. package/src/i18n/th.ts +1 -3
  169. package/src/i18n/tk.ts +1 -3
  170. package/src/i18n/tr.ts +1 -3
  171. package/src/i18n/uk.ts +1 -3
  172. package/src/i18n/ur.ts +1 -3
  173. package/src/i18n/uz.ts +1 -3
  174. package/src/i18n/vi.ts +1 -3
  175. package/src/i18n/zh.ts +1 -3
  176. package/src/i18n/zht.ts +1 -3
  177. package/src/{components/icon.tsx → icons/icon/additional-icons.ts} +8 -74
  178. package/src/icons/icon/icon.css +3 -0
  179. package/src/{v2/components → icons/icon}/icon.tsx +50 -9
  180. package/src/{v2/components/divider-v2.tsx → layout/divider/divider.tsx} +3 -3
  181. package/src/{v2/components/menu-v2.css → navigation/menu/menu.css} +123 -2
  182. package/src/{v2/components/menu-v2.tsx → navigation/menu/menu.tsx} +96 -32
  183. package/src/{v2/components/segmented-control-v2.css → navigation/segmented-control/segmented-control.css} +1 -1
  184. package/src/{v2/components/segmented-control-v2.tsx → navigation/segmented-control/segmented-control.tsx} +9 -8
  185. package/src/{v2/components/tabs-v2.css → navigation/tabs/tabs-current.css} +25 -10
  186. package/src/{components → navigation/tabs}/tabs.css +39 -229
  187. package/src/navigation/tabs/tabs.tsx +194 -0
  188. package/src/{v2/components/dialog-v2.css → overlays/dialog/dialog.css} +3 -0
  189. package/src/{v2/components/dialog-v2.tsx → overlays/dialog/dialog.tsx} +11 -13
  190. package/src/{v2/components/tooltip-v2.css → overlays/tooltip/tooltip.css} +26 -0
  191. package/src/{v2/components/tooltip-v2.tsx → overlays/tooltip/tooltip.tsx} +24 -17
  192. package/src/styles/base.css +5 -0
  193. package/src/styles/index.css +4 -20
  194. package/src/styles/tailwind/colors.css +1 -0
  195. package/src/styles/tailwind/index.css +18 -1
  196. package/src/styles/theme.css +2 -2
  197. package/src/{v2/styles → styles/tokens}/theme.css +10 -14
  198. package/src/theme/context.tsx +19 -11
  199. package/src/theme/themes/oc-2.json +3 -1
  200. package/src/theme/v2/foreground.ts +1 -0
  201. package/src/{components → typography/text-shimmer}/text-shimmer.css +2 -1
  202. package/src/{components → typography/text-shimmer}/text-shimmer.tsx +1 -0
  203. package/src/{v2/components/wordmark-v2.tsx → typography/wordmark/wordmark.tsx} +1 -1
  204. package/dist/components/avatar.d.ts +0 -9
  205. package/dist/components/button.d.ts +0 -9
  206. package/dist/components/dialog.d.ts +0 -12
  207. package/dist/components/dropdown-menu.d.ts +0 -80
  208. package/dist/components/icon-button.d.ts +0 -10
  209. package/dist/components/keybind.d.ts +0 -6
  210. package/dist/components/radio-group.d.ts +0 -16
  211. package/dist/components/select.d.ts +0 -21
  212. package/dist/components/tag.d.ts +0 -5
  213. package/dist/components/toast.d.ts +0 -56
  214. package/dist/components/tooltip.d.ts +0 -17
  215. package/dist/v2/components/accordion-v2.d.ts +0 -26
  216. package/dist/v2/components/badge-v2.d.ts +0 -6
  217. package/dist/v2/components/button-v2.d.ts +0 -10
  218. package/dist/v2/components/checkbox-v2.d.ts +0 -10
  219. package/dist/v2/components/diff-changes-v2.d.ts +0 -11
  220. package/dist/v2/components/divider-v2.d.ts +0 -5
  221. package/dist/v2/components/icon-button-v2.d.ts +0 -11
  222. package/dist/v2/components/inline-input-v2.d.ts +0 -21
  223. package/dist/v2/components/keybind-v2.d.ts +0 -7
  224. package/dist/v2/components/loader-v2.d.ts +0 -3
  225. package/dist/v2/components/menu-v2.d.ts +0 -52
  226. package/dist/v2/components/progress-circle-v2.d.ts +0 -8
  227. package/dist/v2/components/radio-v2.d.ts +0 -16
  228. package/dist/v2/components/split-button-v2.d.ts +0 -5
  229. package/dist/v2/components/switch-v2.d.ts +0 -7
  230. package/dist/v2/components/tabs-v2.d.ts +0 -34
  231. package/dist/v2/components/text-shimmer-v2.d.ts +0 -9
  232. package/dist/v2/components/textarea-v2.d.ts +0 -7
  233. package/dist/v2/components/toast-v2.d.ts +0 -57
  234. package/dist/v2/components/tooltip-v2.d.ts +0 -13
  235. package/dist/v2/components/wordmark-v2.d.ts +0 -2
  236. package/src/components/avatar.css +0 -49
  237. package/src/components/avatar.tsx +0 -55
  238. package/src/components/button.css +0 -194
  239. package/src/components/dialog.css +0 -181
  240. package/src/components/dialog.tsx +0 -72
  241. package/src/components/diff-changes.tsx +0 -115
  242. package/src/components/dropdown-menu.css +0 -135
  243. package/src/components/dropdown-menu.tsx +0 -308
  244. package/src/components/icon-button.css +0 -181
  245. package/src/components/icon-button.tsx +0 -29
  246. package/src/components/icon.css +0 -39
  247. package/src/components/keybind.css +0 -18
  248. package/src/components/keybind.tsx +0 -20
  249. package/src/components/progress-circle.css +0 -16
  250. package/src/components/progress-circle.tsx +0 -64
  251. package/src/components/radio-group.css +0 -187
  252. package/src/components/radio-group.tsx +0 -83
  253. package/src/components/select.css +0 -201
  254. package/src/components/select.tsx +0 -174
  255. package/src/components/switch.css +0 -136
  256. package/src/components/switch.tsx +0 -29
  257. package/src/components/tabs.tsx +0 -126
  258. package/src/components/tag.css +0 -37
  259. package/src/components/tag.tsx +0 -22
  260. package/src/components/toast.css +0 -236
  261. package/src/components/toast.tsx +0 -185
  262. package/src/components/tooltip.css +0 -74
  263. package/src/components/tooltip.tsx +0 -163
  264. package/src/v2/components/accordion-v2.css +0 -139
  265. package/src/v2/components/accordion-v2.tsx +0 -86
  266. package/src/v2/components/button-v2.tsx +0 -35
  267. package/src/v2/components/checkbox-v2.css +0 -184
  268. package/src/v2/components/checkbox-v2.tsx +0 -65
  269. package/src/v2/components/diff-changes-v2.css +0 -26
  270. package/src/v2/components/icon-button-v2.tsx +0 -37
  271. package/src/v2/components/inline-input-v2.css +0 -225
  272. package/src/v2/components/inline-input-v2.tsx +0 -107
  273. package/src/v2/components/progress-circle-v2.css +0 -13
  274. package/src/v2/components/progress-circle-v2.tsx +0 -52
  275. package/src/v2/components/switch-v2.tsx +0 -28
  276. package/src/v2/components/tabs-v2.tsx +0 -149
  277. package/src/v2/components/text-shimmer-v2.css +0 -125
  278. package/src/v2/components/text-shimmer-v2.tsx +0 -63
  279. /package/dist/{components → forms/inline-input}/inline-input.d.ts +0 -0
  280. /package/dist/{v2/components → navigation}/tab-state-indicator.d.ts +0 -0
  281. /package/src/{v2/components/button-v2.css → actions/button/button.css} +0 -0
  282. /package/src/{v2/components/icon-button-v2.css → actions/icon-button/icon-button.css} +0 -0
  283. /package/src/{v2/components/avatar-v2.css → data-display/avatar/avatar.css} +0 -0
  284. /package/src/{v2/components/project-avatar-v2.css → data-display/project-avatar/project-avatar.css} +0 -0
  285. /package/src/{v2/components/loader-v2.css → feedback/loader/loader.css} +0 -0
  286. /package/src/{v2/components/toast-v2.css → feedback/toast/toast.css} +0 -0
  287. /package/src/{components → forms/inline-input}/inline-input.css +0 -0
  288. /package/src/{components → forms/inline-input}/inline-input.tsx +0 -0
  289. /package/src/{v2/components/radio-v2.css → forms/radio/radio.css} +0 -0
  290. /package/src/{v2/components/textarea-v2.css → forms/textarea/textarea.css} +0 -0
  291. /package/src/{v2/components/divider-v2.css → layout/divider/divider.css} +0 -0
  292. /package/src/{v2/components → navigation}/tab-state-indicator.tsx +0 -0
  293. /package/src/{v2/components/file-tree-v2.css → styles/file-tree.css} +0 -0
  294. /package/src/{v2/styles → styles/tokens}/colors.css +0 -0
  295. /package/src/{v2/styles/tailwind.css → styles/tokens/index.css} +0 -0
@@ -1,34 +0,0 @@
1
- import { Tabs as Kobalte } from "@kobalte/core/tabs";
2
- import { type JSX } from "solid-js";
3
- import type { ComponentProps, ParentProps, Component } from "solid-js";
4
- import "./tabs-v2.css";
5
- export interface TabsV2Props extends ComponentProps<typeof Kobalte> {
6
- variant?: "normal" | "pill" | "settings";
7
- orientation?: "horizontal" | "vertical";
8
- }
9
- export interface TabsV2ListProps extends ComponentProps<typeof Kobalte.List> {
10
- }
11
- export interface TabsV2TriggerProps extends ComponentProps<typeof Kobalte.Trigger> {
12
- onMiddleClick?: () => void;
13
- /** Optional subtext shown beside the primary content (muted style) */
14
- subtext?: JSX.Element | string;
15
- }
16
- export interface TabsV2CloseButtonProps extends ComponentProps<"div"> {
17
- }
18
- export interface TabsV2ContentProps extends ComponentProps<typeof Kobalte.Content> {
19
- }
20
- declare function TabsV2Root(props: TabsV2Props): JSX.Element;
21
- declare function TabsV2List(props: TabsV2ListProps): JSX.Element;
22
- declare function TabsV2Trigger(props: ParentProps<TabsV2TriggerProps>): JSX.Element;
23
- declare function TabsV2CloseButton(props: TabsV2CloseButtonProps): JSX.Element;
24
- declare function TabsV2Content(props: ParentProps<TabsV2ContentProps>): JSX.Element;
25
- export declare const TabsV2: typeof TabsV2Root & {
26
- List: typeof TabsV2List;
27
- Trigger: typeof TabsV2Trigger;
28
- CloseButton: typeof TabsV2CloseButton;
29
- Content: typeof TabsV2Content;
30
- SectionTitle: Component<{
31
- children?: JSX.Element;
32
- }>;
33
- };
34
- export {};
@@ -1,9 +0,0 @@
1
- import { type ValidComponent } from "solid-js";
2
- import "./text-shimmer-v2.css";
3
- export declare const TextShimmerV2: <T extends ValidComponent = "span">(props: {
4
- text: string;
5
- class?: string;
6
- as?: T;
7
- active?: boolean;
8
- offset?: number;
9
- }) => import("solid-js").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { type ComponentProps } from "solid-js";
2
- import "./textarea-v2.css";
3
- export interface TextareaV2Props extends ComponentProps<"textarea"> {
4
- /** Error styling for the field and value text. */
5
- invalid?: boolean;
6
- }
7
- export declare function TextareaV2(props: TextareaV2Props): import("solid-js").JSX.Element;
@@ -1,57 +0,0 @@
1
- import { type ToasterProps } from "solid-sonner";
2
- import type { ComponentProps, JSX } from "solid-js";
3
- import "./button-v2.css";
4
- import "./toast-v2.css";
5
- export interface ToastV2RegionProps extends ToasterProps {
6
- }
7
- declare function ToastV2Region(props: ToastV2RegionProps): JSX.Element;
8
- export interface ToastV2RootComponentProps {
9
- toastId: number;
10
- children?: JSX.Element;
11
- }
12
- declare function ToastV2Root(props: ToastV2RootComponentProps): JSX.Element;
13
- declare function ToastV2Icon(props: ComponentProps<"div">): JSX.Element;
14
- declare function ToastV2Content(props: ComponentProps<"div">): JSX.Element;
15
- declare function ToastV2Title(props: ComponentProps<"div">): JSX.Element;
16
- declare function ToastV2Description(props: ComponentProps<"div">): JSX.Element;
17
- declare function ToastV2Actions(props: ComponentProps<"div">): JSX.Element;
18
- declare function ToastV2CloseButton(props: ComponentProps<"button">): JSX.Element;
19
- export declare const ToastV2: typeof ToastV2Root & {
20
- Region: typeof ToastV2Region;
21
- Icon: typeof ToastV2Icon;
22
- Content: typeof ToastV2Content;
23
- Title: typeof ToastV2Title;
24
- Description: typeof ToastV2Description;
25
- Actions: typeof ToastV2Actions;
26
- CloseButton: typeof ToastV2CloseButton;
27
- };
28
- export declare const toasterV2: {
29
- show(render: (props: {
30
- toastId: number;
31
- }) => JSX.Element, options?: {
32
- duration?: number;
33
- persistent?: boolean;
34
- }): number;
35
- dismiss(toastId?: number): string | number | undefined;
36
- };
37
- export interface ToastV2Action {
38
- label: string;
39
- variant?: "primary" | "secondary";
40
- onClick: "dismiss" | (() => void);
41
- }
42
- export interface ToastV2Options {
43
- title?: string;
44
- description?: string;
45
- icon?: JSX.Element;
46
- variant?: "default" | "success" | "error" | "loading";
47
- duration?: number;
48
- persistent?: boolean;
49
- actions?: ToastV2Action[];
50
- }
51
- export declare function showToastV2(options: ToastV2Options | string): number;
52
- export interface ToastV2PromiseOptions<T, U = unknown> {
53
- loading?: JSX.Element;
54
- success?: (data: T) => JSX.Element;
55
- error?: (error: U) => JSX.Element;
56
- }
57
- export {};
@@ -1,13 +0,0 @@
1
- import { Tooltip as KobalteTooltip } from "@kobalte/core/tooltip";
2
- import { type JSX } from "solid-js";
3
- import type { ComponentProps } from "solid-js";
4
- import "./tooltip-v2.css";
5
- export interface TooltipV2Props extends ComponentProps<typeof KobalteTooltip> {
6
- value: JSX.Element;
7
- class?: string;
8
- contentClass?: string;
9
- contentStyle?: JSX.CSSProperties;
10
- inactive?: boolean;
11
- forceOpen?: boolean;
12
- }
13
- export declare function TooltipV2(props: TooltipV2Props): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { type ComponentProps } from "solid-js";
2
- export declare function WordmarkV2(props: Pick<ComponentProps<"svg">, "class">): import("solid-js").JSX.Element;
@@ -1,49 +0,0 @@
1
- [data-component="avatar"] {
2
- --avatar-bg: var(--color-surface-info-base);
3
- --avatar-fg: var(--color-text-base);
4
- display: flex;
5
- align-items: center;
6
- justify-content: center;
7
- flex-shrink: 0;
8
- border-radius: var(--radius-sm);
9
- border: 1px solid var(--color-border-weak-base);
10
- font-family: var(--font-mono);
11
- font-weight: 500;
12
- text-transform: uppercase;
13
- background-color: var(--avatar-bg);
14
- color: var(--avatar-fg);
15
- }
16
-
17
- [data-component="avatar"][data-has-image] {
18
- background-color: transparent;
19
- border: none;
20
- }
21
-
22
- [data-component="avatar"][data-size="small"] {
23
- width: 1.25rem;
24
- height: 1.25rem;
25
- font-size: 0.75rem;
26
- line-height: 1;
27
- }
28
-
29
- [data-component="avatar"][data-size="normal"] {
30
- width: 1.5rem;
31
- height: 1.5rem;
32
- font-size: 1.125rem;
33
- line-height: 1.5rem;
34
- }
35
-
36
- [data-component="avatar"][data-size="large"] {
37
- width: 2rem;
38
- height: 2rem;
39
- font-size: 1.25rem;
40
- line-height: 2rem;
41
- }
42
-
43
- [data-component="avatar"] [data-slot="avatar-image"] {
44
- width: 100%;
45
- height: 100%;
46
- display: block;
47
- object-fit: cover;
48
- border-radius: inherit;
49
- }
@@ -1,55 +0,0 @@
1
- import { type ComponentProps, splitProps, Show } from "solid-js"
2
-
3
- const segmenter =
4
- typeof Intl !== "undefined" && "Segmenter" in Intl
5
- ? new Intl.Segmenter(undefined, { granularity: "grapheme" })
6
- : undefined
7
-
8
- function first(value: string) {
9
- if (!value) return ""
10
- if (!segmenter) return Array.from(value)[0] ?? ""
11
- return segmenter.segment(value)[Symbol.iterator]().next().value?.segment ?? Array.from(value)[0] ?? ""
12
- }
13
-
14
- export interface AvatarProps extends ComponentProps<"div"> {
15
- fallback: string
16
- src?: string
17
- background?: string
18
- foreground?: string
19
- size?: "small" | "normal" | "large"
20
- }
21
-
22
- export function Avatar(props: AvatarProps) {
23
- const [split, rest] = splitProps(props, [
24
- "fallback",
25
- "src",
26
- "background",
27
- "foreground",
28
- "size",
29
- "class",
30
- "classList",
31
- "style",
32
- ])
33
- const src = split.src // did this so i can zero it out to test fallback
34
- return (
35
- <div
36
- {...rest}
37
- data-component="avatar"
38
- data-size={split.size || "normal"}
39
- data-has-image={src ? "" : undefined}
40
- classList={{
41
- ...split.classList,
42
- [split.class ?? ""]: !!split.class,
43
- }}
44
- style={{
45
- ...(typeof split.style === "object" ? split.style : {}),
46
- ...(!src && split.background ? { "--avatar-bg": split.background } : {}),
47
- ...(!src && split.foreground ? { "--avatar-fg": split.foreground } : {}),
48
- }}
49
- >
50
- <Show when={src} fallback={first(split.fallback)}>
51
- {(src) => <img src={src()} draggable={false} data-slot="avatar-image" />}
52
- </Show>
53
- </div>
54
- )
55
- }
@@ -1,194 +0,0 @@
1
- [data-component="button"] {
2
- display: inline-flex;
3
- align-items: center;
4
- justify-content: center;
5
- border-style: solid;
6
- border-width: 1px;
7
- border-radius: var(--radius-md);
8
- text-decoration: none;
9
- user-select: none;
10
- cursor: default;
11
- outline: none;
12
- white-space: nowrap;
13
-
14
- &[data-variant="primary"] {
15
- background-color: var(--button-primary-base);
16
- border-color: var(--border-weak-base);
17
- color: var(--icon-invert-base);
18
-
19
- [data-slot="icon-svg"] {
20
- color: var(--icon-invert-base);
21
- }
22
-
23
- &:hover:not(:disabled) {
24
- background-color: var(--icon-strong-hover);
25
- }
26
- &:focus:not(:disabled) {
27
- background-color: var(--icon-strong-focus);
28
- }
29
- &:active:not(:disabled) {
30
- background-color: var(--icon-strong-active);
31
- }
32
- &:disabled {
33
- background-color: var(--icon-strong-disabled);
34
-
35
- [data-slot="icon-svg"] {
36
- color: var(--icon-invert-base);
37
- }
38
- }
39
- }
40
-
41
- &[data-variant="ghost"] {
42
- border-color: transparent;
43
- background-color: transparent;
44
- color: var(--text-strong);
45
-
46
- [data-slot="icon-svg"] {
47
- color: var(--icon-base);
48
- }
49
-
50
- &:hover:not(:disabled) {
51
- background-color: var(--surface-base-hover);
52
- }
53
- &:focus-visible:not(:disabled) {
54
- background-color: var(--surface-base-hover);
55
- }
56
- &:active:not(:disabled) {
57
- background-color: var(--surface-base-active);
58
- }
59
- &:disabled {
60
- color: var(--text-weak);
61
- cursor: not-allowed;
62
-
63
- [data-slot="icon-svg"] {
64
- color: var(--icon-disabled);
65
- }
66
- }
67
- &[data-selected="true"]:not(:disabled) {
68
- background-color: var(--surface-base-hover);
69
- }
70
- &[data-active="true"] {
71
- background-color: var(--surface-base-active);
72
- }
73
- }
74
-
75
- &[data-variant="secondary"] {
76
- border: transparent;
77
- background-color: var(--button-secondary-base);
78
- color: var(--text-strong);
79
- box-shadow: var(--shadow-xs-border-base);
80
-
81
- &:hover:not(:disabled) {
82
- background-color: var(--button-secondary-hover);
83
- }
84
- &:focus:not(:disabled) {
85
- background-color: var(--button-secondary-base);
86
- }
87
- &:focus-visible:not(:active) {
88
- background-color: var(--button-secondary-base);
89
- box-shadow: var(--shadow-xs-border-focus);
90
- }
91
- &:focus-visible:active {
92
- box-shadow: none;
93
- }
94
- &:active:not(:disabled) {
95
- background-color: var(--button-secondary-base);
96
- }
97
- &:disabled {
98
- border-color: var(--border-disabled);
99
- background-color: var(--surface-disabled);
100
- color: var(--text-weak);
101
- cursor: not-allowed;
102
- }
103
-
104
- [data-slot="icon-svg"] {
105
- color: var(--icon-base);
106
- }
107
- }
108
-
109
- &[data-size="small"] {
110
- height: 24px;
111
- padding: 0 8px;
112
- &[data-icon] {
113
- padding: 0 12px 0 4px;
114
- }
115
-
116
- font-size: var(--font-size-small);
117
- line-height: var(--line-height-large);
118
- gap: 8px;
119
-
120
- /* text-12-medium */
121
- font-family: var(--font-family-sans);
122
- font-size: var(--font-size-small);
123
- font-style: normal;
124
- font-weight: var(--font-weight-medium);
125
- line-height: var(--line-height-large); /* 166.667% */
126
- letter-spacing: var(--letter-spacing-normal);
127
- }
128
-
129
- &[data-size="normal"] {
130
- height: 28px;
131
- line-height: 28px;
132
- padding: 0 6px;
133
- &[data-icon] {
134
- padding: 0 12px 0 4px;
135
- }
136
-
137
- font-size: var(--font-size-small);
138
- gap: 8px;
139
-
140
- /* text-12-medium */
141
- font-family: var(--font-family-sans);
142
- font-size: var(--font-size-small);
143
- font-style: normal;
144
- font-weight: var(--font-weight-medium);
145
- letter-spacing: var(--letter-spacing-normal);
146
- }
147
-
148
- &[data-size="large"] {
149
- height: 32px;
150
- padding: 6px 12px;
151
-
152
- &[data-icon] {
153
- padding: 0 12px 0 8px;
154
- }
155
-
156
- gap: 8px;
157
-
158
- /* text-14-medium */
159
- font-family: var(--font-family-sans);
160
- font-size: 14px;
161
- font-style: normal;
162
- font-weight: var(--font-weight-medium);
163
- line-height: var(--line-height-large); /* 142.857% */
164
- letter-spacing: var(--letter-spacing-normal);
165
- }
166
-
167
- &:focus {
168
- outline: none;
169
- }
170
- }
171
-
172
- [data-component="button"].titlebar-icon[data-variant="ghost"][aria-expanded="true"] {
173
- background-color: var(--surface-base-active);
174
- }
175
-
176
- [data-component="button"].titlebar-icon[data-variant="ghost"][aria-expanded="true"] [data-slot="icon-svg"] {
177
- color: var(--icon-strong-base);
178
- }
179
-
180
- [data-component="button"].titlebar-icon[data-variant="ghost"][aria-expanded="true"]:hover:not(:disabled) {
181
- background-color: var(--surface-base-active);
182
- }
183
-
184
- [data-component="button"].titlebar-icon[data-variant="ghost"][aria-current="page"] {
185
- background-color: var(--surface-base-active);
186
- }
187
-
188
- [data-component="button"].titlebar-icon[data-variant="ghost"][aria-current="page"] [data-slot="icon-svg"] {
189
- color: var(--icon-strong-base);
190
- }
191
-
192
- [data-component="button"].titlebar-icon[data-variant="ghost"][aria-current="page"]:hover:not(:disabled) {
193
- background-color: var(--surface-base-active);
194
- }
@@ -1,181 +0,0 @@
1
- /* [data-component="dialog-trigger"] { } */
2
-
3
- [data-component="dialog-overlay"] {
4
- position: fixed;
5
- inset: 0;
6
- z-index: 50;
7
- background-color: hsl(from var(--background-base) h s l / 0.2);
8
- }
9
-
10
- [data-component="dialog"] {
11
- position: fixed;
12
- inset: 0;
13
- z-index: 50;
14
- display: flex;
15
- align-items: center;
16
- justify-content: center;
17
- pointer-events: none;
18
-
19
- [data-slot="dialog-container"] {
20
- position: relative;
21
- z-index: 50;
22
- width: min(calc(100vw - 16px), 640px);
23
- height: min(calc(100vh - 16px), 512px);
24
- display: flex;
25
- flex-direction: column;
26
- align-items: center;
27
- justify-items: start;
28
- overflow: visible;
29
-
30
- [data-slot="dialog-content"] {
31
- display: flex;
32
- flex-direction: column;
33
- align-items: flex-start;
34
- align-self: stretch;
35
- width: 100%;
36
- max-height: 100%;
37
- min-height: 280px;
38
- overflow: auto;
39
- pointer-events: auto;
40
-
41
- /* Hide scrollbar */
42
- scrollbar-width: none;
43
- -ms-overflow-style: none;
44
- &::-webkit-scrollbar {
45
- display: none;
46
- }
47
-
48
- /* padding: 8px; */
49
- /* padding: 8px 8px 0 8px; */
50
- border-radius: var(--radius-xl);
51
- background: var(--surface-raised-stronger-non-alpha);
52
- background-clip: padding-box;
53
- box-shadow: var(--shadow-lg-border-base);
54
-
55
- [data-slot="dialog-header"] {
56
- display: flex;
57
- padding: 16px 20px;
58
- justify-content: space-between;
59
- align-items: center;
60
- flex-shrink: 0;
61
- align-self: stretch;
62
-
63
- [data-slot="dialog-title"] {
64
- color: var(--text-strong);
65
-
66
- /* text-16-medium */
67
- font-family: var(--font-family-sans);
68
- font-size: var(--font-size-large);
69
- font-style: normal;
70
- font-weight: var(--font-weight-medium);
71
- line-height: var(--line-height-x-large); /* 150% */
72
- letter-spacing: var(--letter-spacing-tight);
73
- }
74
- /* [data-slot="dialog-close-button"] {} */
75
- }
76
-
77
- [data-slot="dialog-description"] {
78
- display: flex;
79
- padding: 16px;
80
- padding-left: 24px;
81
- padding-top: 0;
82
- margin-top: -8px;
83
- justify-content: space-between;
84
- align-items: center;
85
- flex-shrink: 0;
86
- align-self: stretch;
87
-
88
- color: var(--text-base);
89
-
90
- /* text-14-regular */
91
- font-family: var(--font-family-sans);
92
- font-size: 14px;
93
- font-style: normal;
94
- font-weight: var(--font-weight-regular);
95
- line-height: var(--line-height-large); /* 142.857% */
96
- letter-spacing: var(--letter-spacing-normal);
97
- }
98
-
99
- [data-slot="dialog-body"] {
100
- width: 100%;
101
- position: relative;
102
- display: flex;
103
- flex-direction: column;
104
- flex: 1;
105
- overflow: hidden;
106
-
107
- &:focus-visible {
108
- outline: none;
109
- }
110
- }
111
- &:focus-visible {
112
- outline: none;
113
- }
114
- }
115
- }
116
-
117
- &[data-fit] {
118
- [data-slot="dialog-container"] {
119
- height: auto;
120
-
121
- [data-slot="dialog-content"] {
122
- min-height: 0;
123
- }
124
- }
125
- }
126
-
127
- &[data-size="large"] [data-slot="dialog-container"] {
128
- width: min(calc(100vw - 32px), 800px);
129
- height: min(calc(100vh - 32px), 600px);
130
- }
131
-
132
- &[data-size="x-large"] [data-slot="dialog-container"] {
133
- width: min(calc(100vw - 32px), 980px);
134
- height: min(calc(100vh - 92px), 600px);
135
- }
136
- }
137
-
138
- [data-component="dialog"][data-transition] [data-slot="dialog-content"] {
139
- animation: contentHide 100ms ease-in forwards;
140
-
141
- &[data-expanded] {
142
- animation: contentShow 150ms ease-out;
143
- }
144
- }
145
-
146
- @keyframes overlayShow {
147
- from {
148
- opacity: 0;
149
- }
150
- to {
151
- opacity: 1;
152
- }
153
- }
154
- @keyframes overlayHide {
155
- from {
156
- opacity: 1;
157
- }
158
- to {
159
- opacity: 0;
160
- }
161
- }
162
- @keyframes contentShow {
163
- from {
164
- opacity: 0;
165
- transform: scale(0.98);
166
- }
167
- to {
168
- opacity: 1;
169
- transform: scale(1);
170
- }
171
- }
172
- @keyframes contentHide {
173
- from {
174
- opacity: 1;
175
- transform: scale(1);
176
- }
177
- to {
178
- opacity: 0;
179
- transform: scale(0.98);
180
- }
181
- }
@@ -1,72 +0,0 @@
1
- import { Dialog as Kobalte } from "@kobalte/core/dialog"
2
- import { ComponentProps, JSXElement, Match, ParentProps, Show, Switch } from "solid-js"
3
- import { useI18n } from "../context/i18n"
4
- import { IconButton } from "./icon-button"
5
-
6
- export interface DialogProps extends ParentProps {
7
- title?: JSXElement
8
- description?: JSXElement
9
- action?: JSXElement
10
- size?: "normal" | "large" | "x-large"
11
- class?: ComponentProps<"div">["class"]
12
- classList?: ComponentProps<"div">["classList"]
13
- fit?: boolean
14
- transition?: boolean
15
- }
16
-
17
- export function Dialog(props: DialogProps) {
18
- const i18n = useI18n()
19
- return (
20
- <div
21
- data-component="dialog"
22
- data-fit={props.fit ? true : undefined}
23
- data-size={props.size || "normal"}
24
- data-transition={props.transition ? true : undefined}
25
- >
26
- <div data-slot="dialog-container">
27
- <Kobalte.Content
28
- data-slot="dialog-content"
29
- data-no-header={!props.title && !props.action ? "" : undefined}
30
- classList={{
31
- ...props.classList,
32
- [props.class ?? ""]: !!props.class,
33
- }}
34
- onOpenAutoFocus={(e) => {
35
- const target = e.currentTarget as HTMLElement | null
36
- const autofocusEl = target?.querySelector("[autofocus]") as HTMLElement | null
37
- if (autofocusEl) {
38
- e.preventDefault()
39
- autofocusEl.focus()
40
- }
41
- }}
42
- >
43
- <Show when={props.title || props.action}>
44
- <div data-slot="dialog-header">
45
- <Show when={props.title}>
46
- <Kobalte.Title data-slot="dialog-title">{props.title}</Kobalte.Title>
47
- </Show>
48
- <Switch>
49
- <Match when={props.action}>{props.action}</Match>
50
- <Match when={true}>
51
- <Kobalte.CloseButton
52
- data-slot="dialog-close-button"
53
- as={IconButton}
54
- icon="close"
55
- variant="ghost"
56
- aria-label={i18n.t("ui.common.close")}
57
- />
58
- </Match>
59
- </Switch>
60
- </div>
61
- </Show>
62
- <Show when={props.description}>
63
- <Kobalte.Description data-slot="dialog-description" style={{ "margin-left": "-4px" }}>
64
- {props.description}
65
- </Kobalte.Description>
66
- </Show>
67
- <div data-slot="dialog-body">{props.children}</div>
68
- </Kobalte.Content>
69
- </div>
70
- </div>
71
- )
72
- }