@opencode-ai/ui 0.0.0-dev-202609070401 → 0.0.0-dev-19227
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.
- package/dist/actions/button/button.d.ts +10 -0
- package/dist/actions/icon-button/icon-button.d.ts +11 -0
- package/dist/actions/split-button/split-button.d.ts +5 -0
- package/dist/components/card.d.ts +1 -1
- package/dist/components/list.d.ts +1 -1
- package/dist/components/scroll-view.d.ts +14 -4
- package/dist/context/i18n.d.ts +10 -7
- package/dist/context/marked-base.d.ts +3 -0
- package/dist/context/marked-parser.d.ts +1 -2
- package/dist/{components → data-display/accordion}/accordion.d.ts +6 -6
- package/dist/{v2/components/avatar-v2.d.ts → data-display/avatar/avatar.d.ts} +1 -1
- package/dist/data-display/badge/badge.d.ts +7 -0
- package/dist/{components → data-display/diff-changes}/diff-changes.d.ts +2 -1
- package/dist/data-display/keybind/keybind.d.ts +7 -0
- package/dist/{v2/components/line-comment-v2.d.ts → data-display/line-comment/line-comment.d.ts} +9 -9
- package/dist/{v2/components/project-avatar-v2.d.ts → data-display/project-avatar/project-avatar.d.ts} +1 -1
- package/dist/feedback/loader/loader.d.ts +3 -0
- package/dist/{components → feedback/progress-circle}/progress-circle.d.ts +2 -0
- package/dist/feedback/toast/toast.d.ts +57 -0
- package/dist/{components → forms/checkbox}/checkbox.d.ts +2 -2
- package/dist/{v2/components/field-v2.d.ts → forms/field/field.d.ts} +4 -10
- package/dist/forms/radio/radio.d.ts +16 -0
- package/dist/{v2/components/select-v2.d.ts → forms/select/select.d.ts} +5 -6
- package/dist/{components → forms/switch}/switch.d.ts +4 -2
- package/dist/{v2/components/text-input-v2.d.ts → forms/text-input/text-input.d.ts} +3 -3
- package/dist/forms/textarea/textarea.d.ts +7 -0
- package/dist/hooks/use-filtered-list.d.ts +9 -0
- package/dist/i18n/ar.d.ts +0 -2
- package/dist/i18n/bg.d.ts +0 -2
- package/dist/i18n/br.d.ts +0 -2
- package/dist/i18n/bs.d.ts +0 -2
- package/dist/i18n/da.d.ts +0 -2
- package/dist/i18n/de.d.ts +0 -2
- package/dist/i18n/en.d.ts +242 -1
- package/dist/i18n/es.d.ts +0 -2
- package/dist/i18n/fr.d.ts +0 -2
- package/dist/i18n/he.d.ts +197 -0
- package/dist/i18n/ja.d.ts +0 -2
- package/dist/i18n/km.d.ts +0 -2
- package/dist/i18n/ko.d.ts +0 -2
- package/dist/i18n/lo.d.ts +0 -2
- package/dist/i18n/mk.d.ts +0 -2
- package/dist/i18n/mn.d.ts +0 -2
- package/dist/i18n/my.d.ts +0 -2
- package/dist/i18n/pl.d.ts +0 -2
- package/dist/i18n/ru.d.ts +0 -2
- package/dist/i18n/sr.d.ts +0 -2
- package/dist/i18n/tg.d.ts +0 -2
- package/dist/i18n/th.d.ts +0 -2
- package/dist/i18n/tr.d.ts +0 -2
- package/dist/i18n/zh.d.ts +0 -2
- package/dist/i18n/zht.d.ts +0 -2
- package/dist/{components/icon.d.ts → icons/icon/additional-icons.d.ts} +8 -8
- package/dist/{v2/components → icons/icon}/icon.d.ts +52 -1
- package/dist/layout/divider/divider.d.ts +5 -0
- package/dist/navigation/menu/menu.d.ts +59 -0
- package/dist/{v2/components/segmented-control-v2.d.ts → navigation/segmented-control/segmented-control.d.ts} +5 -5
- package/dist/{components → navigation/tabs}/tabs.d.ts +15 -8
- package/dist/{v2/components/dialog-v2.d.ts → overlays/dialog/dialog.d.ts} +1 -2
- package/dist/overlays/tooltip/tooltip.d.ts +15 -0
- package/dist/{components → typography/text-shimmer}/text-shimmer.d.ts +1 -0
- package/dist/typography/wordmark/wordmark.d.ts +5 -0
- package/package.json +141 -35
- package/src/{v2/components/button-v2.css → actions/button/button.css} +30 -0
- package/src/{components → actions/button}/button.tsx +19 -11
- package/src/{v2/components/icon-button-v2.css → actions/icon-button/icon-button.css} +27 -9
- package/src/actions/icon-button/icon-button.tsx +32 -0
- package/src/{v2/components/split-button-v2.css → actions/split-button/split-button.css} +2 -6
- package/src/{v2/components/split-button-v2.tsx → actions/split-button/split-button.tsx} +4 -4
- package/src/components/animated-number.css +29 -11
- package/src/components/animated-number.tsx +2 -2
- package/src/components/card.css +2 -23
- package/src/components/card.tsx +4 -4
- package/src/components/collapsible.tsx +2 -2
- package/src/components/dock-surface.css +2 -9
- package/src/components/image-preview.tsx +3 -2
- package/src/components/list.css +5 -5
- package/src/components/list.tsx +7 -5
- package/src/components/popover.tsx +3 -2
- package/src/components/scroll-view.css +36 -4
- package/src/components/scroll-view.tsx +153 -88
- package/src/components/sticky-accordion-header.tsx +1 -1
- package/src/components/text-field.tsx +12 -4
- package/src/context/dialog.tsx +1 -0
- package/src/context/i18n.tsx +17 -14
- package/src/context/marked-base.tsx +27 -0
- package/src/context/marked-parser.tsx +3 -13
- package/src/{components → data-display/accordion}/accordion.css +7 -33
- package/src/{components → data-display/accordion}/accordion.tsx +14 -14
- package/src/{v2/components/avatar-v2.tsx → data-display/avatar/avatar.tsx} +1 -1
- package/src/{v2/components/badge-v2.css → data-display/badge/badge.css} +19 -0
- package/src/{v2/components/badge-v2.tsx → data-display/badge/badge.tsx} +6 -4
- package/src/{components → data-display/diff-changes}/diff-changes.css +22 -19
- package/src/{v2/components/diff-changes-v2.tsx → data-display/diff-changes/diff-changes.tsx} +7 -2
- package/src/{v2/components/keybind-v2.css → data-display/keybind/keybind.css} +1 -1
- package/src/{v2/components/keybind-v2.tsx → data-display/keybind/keybind.tsx} +3 -3
- package/src/{v2/components/line-comment-v2.css → data-display/line-comment/line-comment.css} +4 -4
- package/src/{v2/components/line-comment-v2.tsx → data-display/line-comment/line-comment.tsx} +17 -15
- package/src/{v2/components/project-avatar-v2.css → data-display/project-avatar/project-avatar.css} +4 -4
- package/src/{v2/components/project-avatar-v2.tsx → data-display/project-avatar/project-avatar.tsx} +1 -1
- package/src/{v2/components/loader-v2.tsx → feedback/loader/loader.tsx} +2 -2
- package/src/feedback/progress-circle/progress-circle.css +28 -0
- package/src/feedback/progress-circle/progress-circle.tsx +64 -0
- package/src/{v2/components/toast-v2.tsx → feedback/toast/toast.tsx} +60 -58
- package/src/{components → forms/checkbox}/checkbox.css +1 -7
- package/src/{components → forms/checkbox}/checkbox.tsx +13 -13
- package/src/{v2/components/field-v2.css → forms/field/field.css} +1 -1
- package/src/{v2/components/field-v2.tsx → forms/field/field.tsx} +9 -11
- package/src/{v2/components/radio-v2.tsx → forms/radio/radio.tsx} +30 -20
- package/src/{v2/components/select-v2.css → forms/select/select.css} +2 -8
- package/src/{v2/components/select-v2.tsx → forms/select/select.tsx} +42 -32
- package/src/{v2/components/switch-v2.css → forms/switch/switch.css} +110 -0
- package/src/forms/switch/switch.tsx +34 -0
- package/src/{v2/components/text-input-v2.css → forms/text-input/text-input.css} +3 -3
- package/src/{v2/components/text-input-v2.tsx → forms/text-input/text-input.tsx} +4 -4
- package/src/{v2/components/textarea-v2.tsx → forms/textarea/textarea.tsx} +3 -3
- package/src/hooks/create-auto-scroll.tsx +20 -0
- package/src/i18n/am.ts +7 -9
- package/src/i18n/ar.ts +7 -9
- package/src/i18n/az.ts +7 -9
- package/src/i18n/bg.ts +7 -9
- package/src/i18n/bn.ts +7 -9
- package/src/i18n/br.ts +7 -9
- package/src/i18n/bs.ts +7 -9
- package/src/i18n/ca.ts +7 -9
- package/src/i18n/cs.ts +7 -9
- package/src/i18n/da.ts +7 -9
- package/src/i18n/de.ts +1 -3
- package/src/i18n/dv.ts +7 -9
- package/src/i18n/dz.ts +5 -7
- package/src/i18n/el.ts +7 -9
- package/src/i18n/en.ts +59 -12
- package/src/i18n/es.ts +6 -8
- package/src/i18n/et.ts +7 -9
- package/src/i18n/fa.ts +7 -9
- package/src/i18n/fi.ts +7 -9
- package/src/i18n/fo.ts +7 -9
- package/src/i18n/fr.ts +6 -8
- package/src/i18n/he.ts +199 -0
- package/src/i18n/hi.ts +7 -9
- package/src/i18n/hr.ts +7 -9
- package/src/i18n/hu.ts +7 -9
- package/src/i18n/hy.ts +7 -9
- package/src/i18n/id.ts +7 -9
- package/src/i18n/is.ts +7 -9
- package/src/i18n/it.ts +7 -9
- package/src/i18n/ja.ts +7 -9
- package/src/i18n/ka.ts +7 -9
- package/src/i18n/km.ts +7 -9
- package/src/i18n/ko.ts +7 -9
- package/src/i18n/lo.ts +7 -9
- package/src/i18n/lt.ts +7 -9
- package/src/i18n/lv.ts +7 -9
- package/src/i18n/mk.ts +7 -9
- package/src/i18n/mn.ts +7 -9
- package/src/i18n/ms.ts +7 -9
- package/src/i18n/my.ts +7 -9
- package/src/i18n/ne.ts +7 -9
- package/src/i18n/nl.ts +7 -9
- package/src/i18n/no.ts +7 -9
- package/src/i18n/pa.ts +7 -9
- package/src/i18n/pl.ts +7 -9
- package/src/i18n/ro.ts +7 -9
- package/src/i18n/ru.ts +7 -9
- package/src/i18n/si.ts +7 -9
- package/src/i18n/sk.ts +7 -9
- package/src/i18n/sl.ts +7 -9
- package/src/i18n/sq.ts +7 -9
- package/src/i18n/sr.ts +7 -9
- package/src/i18n/sv.ts +7 -9
- package/src/i18n/tg.ts +7 -9
- package/src/i18n/th.ts +7 -9
- package/src/i18n/tk.ts +7 -9
- package/src/i18n/tr.ts +7 -9
- package/src/i18n/uk.ts +7 -9
- package/src/i18n/ur.ts +7 -9
- package/src/i18n/uz.ts +7 -9
- package/src/i18n/vi.ts +7 -9
- package/src/i18n/zh.ts +7 -9
- package/src/i18n/zht.ts +7 -9
- package/src/{components/icon.tsx → icons/icon/additional-icons.ts} +8 -74
- package/src/icons/icon/icon.css +3 -0
- package/src/{v2/components → icons/icon}/icon.tsx +88 -12
- package/src/{v2/components/divider-v2.tsx → layout/divider/divider.tsx} +3 -3
- package/src/{v2/components/menu-v2.css → navigation/menu/menu.css} +124 -2
- package/src/{v2/components/menu-v2.tsx → navigation/menu/menu.tsx} +96 -32
- package/src/{v2/components/segmented-control-v2.css → navigation/segmented-control/segmented-control.css} +1 -1
- package/src/{v2/components/segmented-control-v2.tsx → navigation/segmented-control/segmented-control.tsx} +9 -8
- package/src/{v2/components/tabs-v2.css → navigation/tabs/tabs-current.css} +25 -10
- package/src/{components → navigation/tabs}/tabs.css +53 -232
- package/src/navigation/tabs/tabs.tsx +194 -0
- package/src/{v2/components/dialog-v2.css → overlays/dialog/dialog.css} +3 -0
- package/src/{v2/components/dialog-v2.tsx → overlays/dialog/dialog.tsx} +11 -13
- package/src/{v2/components/tooltip-v2.css → overlays/tooltip/tooltip.css} +33 -0
- package/src/{v2/components/tooltip-v2.tsx → overlays/tooltip/tooltip.tsx} +24 -17
- package/src/styles/base.css +5 -0
- package/src/{v2/components/file-tree-v2.css → styles/file-tree.css} +64 -3
- package/src/styles/index.css +4 -20
- package/src/styles/tailwind/colors.css +2 -0
- package/src/styles/tailwind/index.css +18 -1
- package/src/styles/theme.css +2 -2
- package/src/{v2/styles → styles/tokens}/colors.css +8 -8
- package/src/{v2/styles → styles/tokens}/theme.css +23 -16
- package/src/theme/context.tsx +19 -11
- package/src/theme/themes/oc-2.json +50 -19
- package/src/theme/v2/default-primitives.ts +8 -8
- package/src/theme/v2/foreground.ts +1 -0
- package/src/theme/v2/mapping.ts +7 -1
- package/src/{components → typography/text-shimmer}/text-shimmer.css +2 -1
- package/src/{components → typography/text-shimmer}/text-shimmer.tsx +1 -0
- package/src/typography/wordmark/wordmark.tsx +39 -0
- package/dist/components/avatar.d.ts +0 -9
- package/dist/components/button.d.ts +0 -9
- package/dist/components/dialog.d.ts +0 -12
- package/dist/components/dropdown-menu.d.ts +0 -80
- package/dist/components/icon-button.d.ts +0 -10
- package/dist/components/keybind.d.ts +0 -6
- package/dist/components/radio-group.d.ts +0 -16
- package/dist/components/select.d.ts +0 -21
- package/dist/components/tag.d.ts +0 -5
- package/dist/components/toast.d.ts +0 -56
- package/dist/components/tooltip.d.ts +0 -17
- package/dist/v2/components/accordion-v2.d.ts +0 -26
- package/dist/v2/components/badge-v2.d.ts +0 -6
- package/dist/v2/components/button-v2.d.ts +0 -10
- package/dist/v2/components/checkbox-v2.d.ts +0 -10
- package/dist/v2/components/diff-changes-v2.d.ts +0 -11
- package/dist/v2/components/divider-v2.d.ts +0 -5
- package/dist/v2/components/icon-button-v2.d.ts +0 -11
- package/dist/v2/components/inline-input-v2.d.ts +0 -21
- package/dist/v2/components/keybind-v2.d.ts +0 -7
- package/dist/v2/components/loader-v2.d.ts +0 -3
- package/dist/v2/components/menu-v2.d.ts +0 -52
- package/dist/v2/components/progress-circle-v2.d.ts +0 -8
- package/dist/v2/components/radio-v2.d.ts +0 -16
- package/dist/v2/components/split-button-v2.d.ts +0 -5
- package/dist/v2/components/switch-v2.d.ts +0 -7
- package/dist/v2/components/tabs-v2.d.ts +0 -34
- package/dist/v2/components/text-shimmer-v2.d.ts +0 -9
- package/dist/v2/components/textarea-v2.d.ts +0 -7
- package/dist/v2/components/toast-v2.d.ts +0 -57
- package/dist/v2/components/tooltip-v2.d.ts +0 -13
- package/dist/v2/components/wordmark-v2.d.ts +0 -2
- package/src/components/avatar.css +0 -49
- package/src/components/avatar.tsx +0 -55
- package/src/components/button.css +0 -194
- package/src/components/dialog.css +0 -181
- package/src/components/dialog.tsx +0 -72
- package/src/components/diff-changes.tsx +0 -115
- package/src/components/dropdown-menu.css +0 -135
- package/src/components/dropdown-menu.tsx +0 -308
- package/src/components/icon-button.css +0 -181
- package/src/components/icon-button.tsx +0 -29
- package/src/components/icon.css +0 -39
- package/src/components/keybind.css +0 -18
- package/src/components/keybind.tsx +0 -20
- package/src/components/progress-circle.css +0 -16
- package/src/components/progress-circle.tsx +0 -64
- package/src/components/radio-group.css +0 -187
- package/src/components/radio-group.tsx +0 -83
- package/src/components/select.css +0 -201
- package/src/components/select.tsx +0 -174
- package/src/components/switch.css +0 -136
- package/src/components/switch.tsx +0 -29
- package/src/components/tabs.tsx +0 -126
- package/src/components/tag.css +0 -37
- package/src/components/tag.tsx +0 -22
- package/src/components/toast.css +0 -236
- package/src/components/toast.tsx +0 -185
- package/src/components/tooltip.css +0 -74
- package/src/components/tooltip.tsx +0 -163
- package/src/v2/components/accordion-v2.css +0 -139
- package/src/v2/components/accordion-v2.tsx +0 -86
- package/src/v2/components/button-v2.tsx +0 -35
- package/src/v2/components/checkbox-v2.css +0 -184
- package/src/v2/components/checkbox-v2.tsx +0 -65
- package/src/v2/components/diff-changes-v2.css +0 -26
- package/src/v2/components/icon-button-v2.tsx +0 -37
- package/src/v2/components/inline-input-v2.css +0 -225
- package/src/v2/components/inline-input-v2.tsx +0 -107
- package/src/v2/components/progress-circle-v2.css +0 -13
- package/src/v2/components/progress-circle-v2.tsx +0 -52
- package/src/v2/components/switch-v2.tsx +0 -28
- package/src/v2/components/tabs-v2.tsx +0 -149
- package/src/v2/components/text-shimmer-v2.css +0 -125
- package/src/v2/components/text-shimmer-v2.tsx +0 -63
- package/src/v2/components/wordmark-v2.tsx +0 -71
- /package/dist/{components → forms/inline-input}/inline-input.d.ts +0 -0
- /package/dist/{v2/components → navigation}/tab-state-indicator.d.ts +0 -0
- /package/src/{v2/components/avatar-v2.css → data-display/avatar/avatar.css} +0 -0
- /package/src/{v2/components/loader-v2.css → feedback/loader/loader.css} +0 -0
- /package/src/{v2/components/toast-v2.css → feedback/toast/toast.css} +0 -0
- /package/src/{components → forms/inline-input}/inline-input.css +0 -0
- /package/src/{components → forms/inline-input}/inline-input.tsx +0 -0
- /package/src/{v2/components/radio-v2.css → forms/radio/radio.css} +0 -0
- /package/src/{v2/components/textarea-v2.css → forms/textarea/textarea.css} +0 -0
- /package/src/{v2/components/divider-v2.css → layout/divider/divider.css} +0 -0
- /package/src/{v2/components → navigation}/tab-state-indicator.tsx +0 -0
- /package/src/{v2/styles/tailwind.css → styles/tokens/index.css} +0 -0
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { type ComponentProps } from "solid-js";
|
|
2
|
+
import { additionalIcons } from "./additional-icons";
|
|
3
|
+
import "./icon.css";
|
|
2
4
|
declare const icons: {
|
|
5
|
+
flask: {
|
|
6
|
+
viewBox: string;
|
|
7
|
+
body: string;
|
|
8
|
+
};
|
|
3
9
|
edit: {
|
|
4
10
|
viewBox: string;
|
|
5
11
|
body: string;
|
|
@@ -16,6 +22,10 @@ declare const icons: {
|
|
|
16
22
|
viewBox: string;
|
|
17
23
|
body: string;
|
|
18
24
|
};
|
|
25
|
+
"branch-out": {
|
|
26
|
+
viewBox: string;
|
|
27
|
+
body: string;
|
|
28
|
+
};
|
|
19
29
|
"grid-plus": {
|
|
20
30
|
viewBox: string;
|
|
21
31
|
body: string;
|
|
@@ -24,6 +34,14 @@ declare const icons: {
|
|
|
24
34
|
viewBox: string;
|
|
25
35
|
body: string;
|
|
26
36
|
};
|
|
37
|
+
info: {
|
|
38
|
+
viewBox: string;
|
|
39
|
+
body: string;
|
|
40
|
+
};
|
|
41
|
+
"circle-exclamation": {
|
|
42
|
+
viewBox: string;
|
|
43
|
+
body: string;
|
|
44
|
+
};
|
|
27
45
|
"sidebar-right": {
|
|
28
46
|
viewBox: string;
|
|
29
47
|
body: string;
|
|
@@ -80,6 +98,14 @@ declare const icons: {
|
|
|
80
98
|
viewBox: string;
|
|
81
99
|
body: string;
|
|
82
100
|
};
|
|
101
|
+
"outline-worktree": {
|
|
102
|
+
viewBox: string;
|
|
103
|
+
body: string;
|
|
104
|
+
};
|
|
105
|
+
"outline-trash": {
|
|
106
|
+
viewBox: string;
|
|
107
|
+
body: string;
|
|
108
|
+
};
|
|
83
109
|
close: {
|
|
84
110
|
viewBox: string;
|
|
85
111
|
body: string;
|
|
@@ -120,6 +146,14 @@ declare const icons: {
|
|
|
120
146
|
viewBox: string;
|
|
121
147
|
body: string;
|
|
122
148
|
};
|
|
149
|
+
"window-analytics": {
|
|
150
|
+
viewBox: string;
|
|
151
|
+
body: string;
|
|
152
|
+
};
|
|
153
|
+
trash: {
|
|
154
|
+
viewBox: string;
|
|
155
|
+
body: string;
|
|
156
|
+
};
|
|
123
157
|
"outline-sliders": {
|
|
124
158
|
viewBox: string;
|
|
125
159
|
body: string;
|
|
@@ -128,10 +162,22 @@ declare const icons: {
|
|
|
128
162
|
viewBox: string;
|
|
129
163
|
body: string;
|
|
130
164
|
};
|
|
165
|
+
"arrow-up-right": {
|
|
166
|
+
viewBox: string;
|
|
167
|
+
body: string;
|
|
168
|
+
};
|
|
131
169
|
"outline-square-arrow": {
|
|
132
170
|
viewBox: string;
|
|
133
171
|
body: string;
|
|
134
172
|
};
|
|
173
|
+
"outline-arrow-to-corner-top-right": {
|
|
174
|
+
viewBox: string;
|
|
175
|
+
body: string;
|
|
176
|
+
};
|
|
177
|
+
"outline-hexagonal-warning": {
|
|
178
|
+
viewBox: string;
|
|
179
|
+
body: string;
|
|
180
|
+
};
|
|
135
181
|
"outline-share": {
|
|
136
182
|
viewBox: string;
|
|
137
183
|
body: string;
|
|
@@ -144,13 +190,18 @@ declare const icons: {
|
|
|
144
190
|
viewBox: string;
|
|
145
191
|
body: string;
|
|
146
192
|
};
|
|
193
|
+
"fill-triangle-down": {
|
|
194
|
+
viewBox: string;
|
|
195
|
+
body: string;
|
|
196
|
+
};
|
|
147
197
|
archive: {
|
|
148
198
|
viewBox: string;
|
|
149
199
|
body: string;
|
|
150
200
|
};
|
|
151
201
|
};
|
|
202
|
+
type IconName = keyof typeof icons | keyof typeof additionalIcons;
|
|
152
203
|
export interface IconProps extends ComponentProps<"svg"> {
|
|
153
|
-
name:
|
|
204
|
+
name: IconName | (string & {});
|
|
154
205
|
size?: "small" | "normal" | "large";
|
|
155
206
|
}
|
|
156
207
|
export declare function Icon(props: IconProps): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { DropdownMenu } from "@kobalte/core/dropdown-menu";
|
|
2
|
+
import { ContextMenu } from "@kobalte/core/context-menu";
|
|
3
|
+
import { type ComponentProps, type JSX, type ParentProps } from "solid-js";
|
|
4
|
+
import "./menu.css";
|
|
5
|
+
export type MenuAppearance = "standard" | "compact";
|
|
6
|
+
export interface MenuItemProps extends ComponentProps<typeof DropdownMenu.Item> {
|
|
7
|
+
shortcut?: JSX.Element | string;
|
|
8
|
+
badge?: JSX.Element | string;
|
|
9
|
+
}
|
|
10
|
+
declare function MenuItem(props: ParentProps<MenuItemProps>): JSX.Element;
|
|
11
|
+
export interface MenuCheckboxItemProps extends ComponentProps<typeof DropdownMenu.CheckboxItem> {
|
|
12
|
+
shortcut?: JSX.Element | string;
|
|
13
|
+
badge?: JSX.Element | string;
|
|
14
|
+
}
|
|
15
|
+
declare function MenuCheckboxItem(props: ParentProps<MenuCheckboxItemProps>): JSX.Element;
|
|
16
|
+
export interface MenuRadioItemProps extends ComponentProps<typeof DropdownMenu.RadioItem> {
|
|
17
|
+
shortcut?: JSX.Element | string;
|
|
18
|
+
badge?: JSX.Element | string;
|
|
19
|
+
}
|
|
20
|
+
declare function MenuRadioItem(props: ParentProps<MenuRadioItemProps>): JSX.Element;
|
|
21
|
+
export interface MenuSubTriggerProps extends ComponentProps<typeof DropdownMenu.SubTrigger> {
|
|
22
|
+
shortcut?: JSX.Element | string;
|
|
23
|
+
badge?: JSX.Element | string;
|
|
24
|
+
}
|
|
25
|
+
declare function MenuSubTrigger(props: ParentProps<MenuSubTriggerProps>): JSX.Element;
|
|
26
|
+
declare function MenuSubContent(props: ComponentProps<typeof DropdownMenu.SubContent>): JSX.Element;
|
|
27
|
+
declare function MenuGroupLabel(props: ComponentProps<typeof DropdownMenu.GroupLabel>): JSX.Element;
|
|
28
|
+
declare function MenuSeparator(props: ComponentProps<typeof DropdownMenu.Separator>): JSX.Element;
|
|
29
|
+
declare function MenuContent(props: ComponentProps<typeof DropdownMenu.Content>): JSX.Element;
|
|
30
|
+
export interface MenuProps extends ComponentProps<typeof DropdownMenu> {
|
|
31
|
+
appearance?: MenuAppearance;
|
|
32
|
+
}
|
|
33
|
+
declare function MenuRoot(props: MenuProps): JSX.Element;
|
|
34
|
+
export interface MenuContextProps extends ComponentProps<typeof ContextMenu> {
|
|
35
|
+
appearance?: MenuAppearance;
|
|
36
|
+
}
|
|
37
|
+
declare function MenuContextRoot(props: MenuContextProps): JSX.Element;
|
|
38
|
+
declare function MenuContextContent(props: ComponentProps<typeof ContextMenu.Content>): JSX.Element;
|
|
39
|
+
export declare const Menu: typeof MenuRoot & {
|
|
40
|
+
Trigger: typeof import("@kobalte/core/menu").MenuTrigger;
|
|
41
|
+
Portal: typeof import("@kobalte/core/context-menu").Portal;
|
|
42
|
+
Content: typeof MenuContent;
|
|
43
|
+
Item: typeof MenuItem;
|
|
44
|
+
CheckboxItem: typeof MenuCheckboxItem;
|
|
45
|
+
RadioGroup: typeof import("@kobalte/core/context-menu").RadioGroup;
|
|
46
|
+
RadioItem: typeof MenuRadioItem;
|
|
47
|
+
Group: typeof import("@kobalte/core/context-menu").Group;
|
|
48
|
+
GroupLabel: typeof MenuGroupLabel;
|
|
49
|
+
Separator: typeof MenuSeparator;
|
|
50
|
+
Sub: typeof import("@kobalte/core/context-menu").Sub;
|
|
51
|
+
SubTrigger: typeof MenuSubTrigger;
|
|
52
|
+
SubContent: typeof MenuSubContent;
|
|
53
|
+
Context: typeof MenuContextRoot & {
|
|
54
|
+
Trigger: typeof import("@kobalte/core/context-menu").Trigger;
|
|
55
|
+
Portal: typeof import("@kobalte/core/context-menu").Portal;
|
|
56
|
+
Content: typeof MenuContextContent;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type JSX, type ParentProps } from "solid-js";
|
|
2
2
|
import type { ComponentProps } from "solid-js";
|
|
3
|
-
import "./segmented-control
|
|
3
|
+
import "./segmented-control.css";
|
|
4
4
|
type OnChange = (value: string | null) => void;
|
|
5
|
-
export type
|
|
5
|
+
export type SegmentedControlProps = Omit<ComponentProps<"div">, "onChange"> & ParentProps<{
|
|
6
6
|
/** Selected value when controlled (including `null` when empty). Omit key for uncontrolled. */
|
|
7
7
|
value?: string | null;
|
|
8
8
|
/** Initial value when uncontrolled. */
|
|
@@ -12,10 +12,10 @@ export type SegmentedControlV2Props = Omit<ComponentProps<"div">, "onChange"> &
|
|
|
12
12
|
allowDeselect?: boolean;
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
}>;
|
|
15
|
-
export declare function
|
|
16
|
-
export type
|
|
15
|
+
export declare function SegmentedControl(props: SegmentedControlProps): JSX.Element;
|
|
16
|
+
export type SegmentedControlItemProps = Omit<ComponentProps<"button">, "type" | "children"> & ParentProps<{
|
|
17
17
|
value: string;
|
|
18
18
|
children: JSX.Element;
|
|
19
19
|
}>;
|
|
20
|
-
export declare function
|
|
20
|
+
export declare function SegmentedControlItem(props: SegmentedControlItemProps): JSX.Element;
|
|
21
21
|
export {};
|
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Content, List, Root, Trigger } from "@kobalte/core/tabs";
|
|
2
2
|
import { type JSX } from "solid-js";
|
|
3
|
-
import type { ComponentProps, ParentProps
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import type { Component, ComponentProps, ParentProps } from "solid-js";
|
|
4
|
+
import "./tabs-current.css";
|
|
5
|
+
export type TabsVariant = "panel" | "underline" | "surface" | "line" | "pill" | "settings";
|
|
6
|
+
export interface TabsProps extends ComponentProps<typeof Root> {
|
|
7
|
+
variant?: TabsVariant;
|
|
6
8
|
orientation?: "horizontal" | "vertical";
|
|
7
9
|
}
|
|
8
|
-
export interface TabsListProps extends ComponentProps<typeof
|
|
10
|
+
export interface TabsListProps extends ComponentProps<typeof List> {
|
|
9
11
|
}
|
|
10
|
-
export interface TabsTriggerProps extends ComponentProps<typeof
|
|
12
|
+
export interface TabsTriggerProps extends ComponentProps<typeof Trigger> {
|
|
11
13
|
classes?: {
|
|
12
14
|
button?: string;
|
|
13
15
|
};
|
|
14
|
-
hideCloseButton?: boolean;
|
|
15
16
|
closeButton?: JSX.Element;
|
|
17
|
+
hideCloseButton?: boolean;
|
|
16
18
|
onMiddleClick?: () => void;
|
|
19
|
+
subtext?: JSX.Element | string;
|
|
20
|
+
}
|
|
21
|
+
export interface TabsCloseButtonProps extends ComponentProps<"button"> {
|
|
17
22
|
}
|
|
18
|
-
export interface TabsContentProps extends ComponentProps<typeof
|
|
23
|
+
export interface TabsContentProps extends ComponentProps<typeof Content> {
|
|
19
24
|
}
|
|
20
25
|
declare function TabsRoot(props: TabsProps): JSX.Element;
|
|
21
26
|
declare function TabsList(props: TabsListProps): JSX.Element;
|
|
22
27
|
declare function TabsTrigger(props: ParentProps<TabsTriggerProps>): JSX.Element;
|
|
28
|
+
declare function TabsCloseButton(props: TabsCloseButtonProps): JSX.Element;
|
|
23
29
|
declare function TabsContent(props: ParentProps<TabsContentProps>): JSX.Element;
|
|
24
30
|
export declare const Tabs: typeof TabsRoot & {
|
|
25
31
|
List: typeof TabsList;
|
|
26
32
|
Trigger: typeof TabsTrigger;
|
|
33
|
+
CloseButton: typeof TabsCloseButton;
|
|
27
34
|
Content: typeof TabsContent;
|
|
28
35
|
SectionTitle: Component<{
|
|
29
36
|
children?: JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentProps, type JSXElement, type ParentProps } from "solid-js";
|
|
2
|
-
import "./dialog
|
|
2
|
+
import "./dialog.css";
|
|
3
3
|
export interface DialogProps extends ParentProps {
|
|
4
4
|
size?: "normal" | "large" | "x-large";
|
|
5
5
|
variant?: "default" | "settings";
|
|
@@ -24,4 +24,3 @@ export declare function DialogTitle(props: ParentProps): import("solid-js").JSX.
|
|
|
24
24
|
export declare function DialogTitleGroup(props: DialogTitleGroupProps): import("solid-js").JSX.Element;
|
|
25
25
|
export declare function DialogHeader(props: DialogHeaderProps): import("solid-js").JSX.Element;
|
|
26
26
|
export declare function Dialog(props: DialogProps): import("solid-js").JSX.Element;
|
|
27
|
-
export declare const DialogV2: typeof Dialog;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Root } from "@kobalte/core/tooltip";
|
|
2
|
+
import { type JSX } from "solid-js";
|
|
3
|
+
import type { ComponentProps } from "solid-js";
|
|
4
|
+
import "./tooltip.css";
|
|
5
|
+
export interface TooltipProps extends ComponentProps<typeof Root> {
|
|
6
|
+
value: JSX.Element;
|
|
7
|
+
appearance?: "standard" | "compact" | "large";
|
|
8
|
+
class?: string;
|
|
9
|
+
contentClass?: string;
|
|
10
|
+
contentStyle?: JSX.CSSProperties;
|
|
11
|
+
inactive?: boolean;
|
|
12
|
+
forceOpen?: boolean;
|
|
13
|
+
triggerTabIndex?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function Tooltip(props: TooltipProps): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencode-ai/ui",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-19227",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -34,6 +34,133 @@
|
|
|
34
34
|
],
|
|
35
35
|
"exports": {
|
|
36
36
|
"./package.json": "./package.json",
|
|
37
|
+
"./accordion": {
|
|
38
|
+
"types": "./dist/data-display/accordion/accordion.d.ts",
|
|
39
|
+
"import": "./src/data-display/accordion/accordion.tsx"
|
|
40
|
+
},
|
|
41
|
+
"./avatar": {
|
|
42
|
+
"types": "./dist/data-display/avatar/avatar.d.ts",
|
|
43
|
+
"import": "./src/data-display/avatar/avatar.tsx"
|
|
44
|
+
},
|
|
45
|
+
"./badge": {
|
|
46
|
+
"types": "./dist/data-display/badge/badge.d.ts",
|
|
47
|
+
"import": "./src/data-display/badge/badge.tsx"
|
|
48
|
+
},
|
|
49
|
+
"./button": {
|
|
50
|
+
"types": "./dist/actions/button/button.d.ts",
|
|
51
|
+
"import": "./src/actions/button/button.tsx"
|
|
52
|
+
},
|
|
53
|
+
"./button.css": "./src/actions/button/button.css",
|
|
54
|
+
"./checkbox": {
|
|
55
|
+
"types": "./dist/forms/checkbox/checkbox.d.ts",
|
|
56
|
+
"import": "./src/forms/checkbox/checkbox.tsx"
|
|
57
|
+
},
|
|
58
|
+
"./dialog": {
|
|
59
|
+
"types": "./dist/overlays/dialog/dialog.d.ts",
|
|
60
|
+
"import": "./src/overlays/dialog/dialog.tsx"
|
|
61
|
+
},
|
|
62
|
+
"./diff-changes": {
|
|
63
|
+
"types": "./dist/data-display/diff-changes/diff-changes.d.ts",
|
|
64
|
+
"import": "./src/data-display/diff-changes/diff-changes.tsx"
|
|
65
|
+
},
|
|
66
|
+
"./divider": {
|
|
67
|
+
"types": "./dist/layout/divider/divider.d.ts",
|
|
68
|
+
"import": "./src/layout/divider/divider.tsx"
|
|
69
|
+
},
|
|
70
|
+
"./field": {
|
|
71
|
+
"types": "./dist/forms/field/field.d.ts",
|
|
72
|
+
"import": "./src/forms/field/field.tsx"
|
|
73
|
+
},
|
|
74
|
+
"./file-tree.css": "./src/styles/file-tree.css",
|
|
75
|
+
"./icon": {
|
|
76
|
+
"types": "./dist/icons/icon/icon.d.ts",
|
|
77
|
+
"import": "./src/icons/icon/icon.tsx"
|
|
78
|
+
},
|
|
79
|
+
"./icon-button": {
|
|
80
|
+
"types": "./dist/actions/icon-button/icon-button.d.ts",
|
|
81
|
+
"import": "./src/actions/icon-button/icon-button.tsx"
|
|
82
|
+
},
|
|
83
|
+
"./inline-input": {
|
|
84
|
+
"types": "./dist/forms/inline-input/inline-input.d.ts",
|
|
85
|
+
"import": "./src/forms/inline-input/inline-input.tsx"
|
|
86
|
+
},
|
|
87
|
+
"./keybind": {
|
|
88
|
+
"types": "./dist/data-display/keybind/keybind.d.ts",
|
|
89
|
+
"import": "./src/data-display/keybind/keybind.tsx"
|
|
90
|
+
},
|
|
91
|
+
"./line-comment": {
|
|
92
|
+
"types": "./dist/data-display/line-comment/line-comment.d.ts",
|
|
93
|
+
"import": "./src/data-display/line-comment/line-comment.tsx"
|
|
94
|
+
},
|
|
95
|
+
"./loader": {
|
|
96
|
+
"types": "./dist/feedback/loader/loader.d.ts",
|
|
97
|
+
"import": "./src/feedback/loader/loader.tsx"
|
|
98
|
+
},
|
|
99
|
+
"./menu": {
|
|
100
|
+
"types": "./dist/navigation/menu/menu.d.ts",
|
|
101
|
+
"import": "./src/navigation/menu/menu.tsx"
|
|
102
|
+
},
|
|
103
|
+
"./progress-circle": {
|
|
104
|
+
"types": "./dist/feedback/progress-circle/progress-circle.d.ts",
|
|
105
|
+
"import": "./src/feedback/progress-circle/progress-circle.tsx"
|
|
106
|
+
},
|
|
107
|
+
"./project-avatar": {
|
|
108
|
+
"types": "./dist/data-display/project-avatar/project-avatar.d.ts",
|
|
109
|
+
"import": "./src/data-display/project-avatar/project-avatar.tsx"
|
|
110
|
+
},
|
|
111
|
+
"./radio": {
|
|
112
|
+
"types": "./dist/forms/radio/radio.d.ts",
|
|
113
|
+
"import": "./src/forms/radio/radio.tsx"
|
|
114
|
+
},
|
|
115
|
+
"./segmented-control": {
|
|
116
|
+
"types": "./dist/navigation/segmented-control/segmented-control.d.ts",
|
|
117
|
+
"import": "./src/navigation/segmented-control/segmented-control.tsx"
|
|
118
|
+
},
|
|
119
|
+
"./select": {
|
|
120
|
+
"types": "./dist/forms/select/select.d.ts",
|
|
121
|
+
"import": "./src/forms/select/select.tsx"
|
|
122
|
+
},
|
|
123
|
+
"./split-button": {
|
|
124
|
+
"types": "./dist/actions/split-button/split-button.d.ts",
|
|
125
|
+
"import": "./src/actions/split-button/split-button.tsx"
|
|
126
|
+
},
|
|
127
|
+
"./switch": {
|
|
128
|
+
"types": "./dist/forms/switch/switch.d.ts",
|
|
129
|
+
"import": "./src/forms/switch/switch.tsx"
|
|
130
|
+
},
|
|
131
|
+
"./tab-state-indicator": {
|
|
132
|
+
"types": "./dist/navigation/tab-state-indicator.d.ts",
|
|
133
|
+
"import": "./src/navigation/tab-state-indicator.tsx"
|
|
134
|
+
},
|
|
135
|
+
"./tabs": {
|
|
136
|
+
"types": "./dist/navigation/tabs/tabs.d.ts",
|
|
137
|
+
"import": "./src/navigation/tabs/tabs.tsx"
|
|
138
|
+
},
|
|
139
|
+
"./text-input": {
|
|
140
|
+
"types": "./dist/forms/text-input/text-input.d.ts",
|
|
141
|
+
"import": "./src/forms/text-input/text-input.tsx"
|
|
142
|
+
},
|
|
143
|
+
"./text-input.css": "./src/forms/text-input/text-input.css",
|
|
144
|
+
"./textarea": {
|
|
145
|
+
"types": "./dist/forms/textarea/textarea.d.ts",
|
|
146
|
+
"import": "./src/forms/textarea/textarea.tsx"
|
|
147
|
+
},
|
|
148
|
+
"./text-shimmer": {
|
|
149
|
+
"types": "./dist/typography/text-shimmer/text-shimmer.d.ts",
|
|
150
|
+
"import": "./src/typography/text-shimmer/text-shimmer.tsx"
|
|
151
|
+
},
|
|
152
|
+
"./toast": {
|
|
153
|
+
"types": "./dist/feedback/toast/toast.d.ts",
|
|
154
|
+
"import": "./src/feedback/toast/toast.tsx"
|
|
155
|
+
},
|
|
156
|
+
"./tooltip": {
|
|
157
|
+
"types": "./dist/overlays/tooltip/tooltip.d.ts",
|
|
158
|
+
"import": "./src/overlays/tooltip/tooltip.tsx"
|
|
159
|
+
},
|
|
160
|
+
"./wordmark": {
|
|
161
|
+
"types": "./dist/typography/wordmark/wordmark.d.ts",
|
|
162
|
+
"import": "./src/typography/wordmark/wordmark.tsx"
|
|
163
|
+
},
|
|
37
164
|
"./*": {
|
|
38
165
|
"types": "./dist/components/*.d.ts",
|
|
39
166
|
"import": "./src/components/*.tsx"
|
|
@@ -63,6 +190,7 @@
|
|
|
63
190
|
"import": "./src/storybook/fixtures.ts"
|
|
64
191
|
},
|
|
65
192
|
"./styles": "./src/styles/index.css",
|
|
193
|
+
"./styles/tokens": "./src/styles/tokens/index.css",
|
|
66
194
|
"./styles/tailwind": "./src/styles/tailwind/index.css",
|
|
67
195
|
"./theme": {
|
|
68
196
|
"types": "./dist/theme/index.d.ts",
|
|
@@ -89,13 +217,7 @@
|
|
|
89
217
|
"import": "./src/components/app-icons/types.ts"
|
|
90
218
|
},
|
|
91
219
|
"./fonts/*": "./src/assets/fonts/*",
|
|
92
|
-
"./audio/*": "./src/assets/audio/*"
|
|
93
|
-
"./v2/*.css": "./src/v2/components/*.css",
|
|
94
|
-
"./v2/*": {
|
|
95
|
-
"types": "./dist/v2/components/*.d.ts",
|
|
96
|
-
"import": "./src/v2/components/*.tsx"
|
|
97
|
-
},
|
|
98
|
-
"./v2/styles/*": "./src/v2/styles/*"
|
|
220
|
+
"./audio/*": "./src/assets/audio/*"
|
|
99
221
|
},
|
|
100
222
|
"scripts": {
|
|
101
223
|
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
@@ -107,49 +229,33 @@
|
|
|
107
229
|
},
|
|
108
230
|
"devDependencies": {
|
|
109
231
|
"@solidjs/meta": "0.29.4",
|
|
110
|
-
"@tailwindcss/vite": "4.1.11",
|
|
111
232
|
"@tsconfig/node22": "22.0.2",
|
|
112
|
-
"@types/bun": "1.
|
|
113
|
-
"@types/katex": "0.16.7",
|
|
114
|
-
"@types/luxon": "3.7.1",
|
|
233
|
+
"@types/bun": "1.4.0",
|
|
115
234
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
116
|
-
"solid-js": "1.9.
|
|
235
|
+
"solid-js": "1.9.15",
|
|
117
236
|
"tailwindcss": "4.1.11",
|
|
118
|
-
"tw-animate-css": "1.4.0",
|
|
119
237
|
"typescript": "5.8.2",
|
|
120
|
-
"vite": "7.
|
|
238
|
+
"vite": "7.3.6",
|
|
121
239
|
"vite-plugin-icons-spritesheet": "3.0.1",
|
|
122
240
|
"vite-plugin-solid": "2.11.10"
|
|
123
241
|
},
|
|
124
242
|
"dependencies": {
|
|
125
|
-
"@kobalte/core": "0.13.
|
|
243
|
+
"@kobalte/core": "0.13.13",
|
|
126
244
|
"@pierre/diffs": "1.2.10",
|
|
127
|
-
"@
|
|
128
|
-
"@solid-primitives/
|
|
129
|
-
"@solid-primitives/event-listener": "2.4.5",
|
|
130
|
-
"@solid-primitives/media": "2.3.3",
|
|
131
|
-
"@solid-primitives/resize-observer": "2.1.3",
|
|
132
|
-
"@shikijs/stream": "4.2.0",
|
|
133
|
-
"diff": "8.0.2",
|
|
134
|
-
"dompurify": "3.3.1",
|
|
245
|
+
"@solid-primitives/event-listener": "2.4.6",
|
|
246
|
+
"@solid-primitives/resize-observer": "2.2.0",
|
|
135
247
|
"fuzzysort": "3.1.0",
|
|
136
|
-
"katex": "0.16.
|
|
137
|
-
"
|
|
138
|
-
"marked": "18.0.7",
|
|
248
|
+
"katex": "0.16.47",
|
|
249
|
+
"marked": "18.0.11",
|
|
139
250
|
"marked-shiki": "1.2.1",
|
|
140
|
-
"morphdom": "2.7.8",
|
|
141
251
|
"motion": "12.34.5",
|
|
142
|
-
"motion-dom": "12.34.3",
|
|
143
|
-
"motion-utils": "12.29.2",
|
|
144
252
|
"remeda": "2.26.0",
|
|
145
|
-
"
|
|
146
|
-
"shiki": "4.2.0",
|
|
253
|
+
"shiki": "4.4.3",
|
|
147
254
|
"solid-list": "0.3.0",
|
|
148
|
-
"solid-sonner": "0.3.1"
|
|
149
|
-
"strip-ansi": "7.1.2"
|
|
255
|
+
"solid-sonner": "0.3.1"
|
|
150
256
|
},
|
|
151
257
|
"peerDependencies": {
|
|
152
258
|
"@solidjs/meta": "^0.29.0",
|
|
153
|
-
"solid-js": "^1.9.
|
|
259
|
+
"solid-js": "^1.9.8"
|
|
154
260
|
}
|
|
155
261
|
}
|
|
@@ -231,6 +231,7 @@
|
|
|
231
231
|
[data-component="button-v2"][data-variant="ghost-muted"] {
|
|
232
232
|
background-color: transparent;
|
|
233
233
|
color: var(--v2-text-text-muted);
|
|
234
|
+
font-weight: 440;
|
|
234
235
|
}
|
|
235
236
|
|
|
236
237
|
[data-component="button-v2"][data-variant="ghost-muted"] [data-slot="icon-svg"] {
|
|
@@ -260,3 +261,32 @@
|
|
|
260
261
|
opacity: 0.5;
|
|
261
262
|
cursor: not-allowed;
|
|
262
263
|
}
|
|
264
|
+
|
|
265
|
+
/* Ghost faint */
|
|
266
|
+
[data-component="button-v2"][data-variant="ghost-faint"] {
|
|
267
|
+
background-color: transparent;
|
|
268
|
+
color: var(--v2-text-text-faint);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
[data-component="button-v2"][data-variant="ghost-faint"] [data-slot="icon-svg"] {
|
|
272
|
+
color: var(--v2-icon-icon-faint);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
[data-component="button-v2"][data-variant="ghost-faint"]:is(:hover, [data-state="hover"]):not(:disabled):not(
|
|
276
|
+
[data-expanded]
|
|
277
|
+
) {
|
|
278
|
+
background-color: var(--v2-overlay-simple-overlay-hover);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
[data-component="button-v2"][data-variant="ghost-faint"]:is(:active, [data-state="pressed"]):not(:disabled) {
|
|
282
|
+
background-color: var(--v2-overlay-simple-overlay-pressed);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
[data-component="button-v2"][data-variant="ghost-faint"]:where([data-expanded]):not(:disabled) {
|
|
286
|
+
background-color: var(--v2-overlay-simple-overlay-pressed);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
[data-component="button-v2"][data-variant="ghost-faint"]:is(:disabled, [data-state="disabled"]) {
|
|
290
|
+
opacity: 0.5;
|
|
291
|
+
cursor: not-allowed;
|
|
292
|
+
}
|
|
@@ -1,33 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Root } from "@kobalte/core/button"
|
|
2
2
|
import { type ComponentProps, Show, splitProps } from "solid-js"
|
|
3
|
-
import { Icon, IconProps } from "
|
|
3
|
+
import { Icon, type IconProps } from "@opencode-ai/ui/icon"
|
|
4
|
+
import "./button.css"
|
|
4
5
|
|
|
5
6
|
export interface ButtonProps
|
|
6
|
-
extends ComponentProps<typeof
|
|
7
|
+
extends ComponentProps<typeof Root>,
|
|
7
8
|
Pick<ComponentProps<"button">, "class" | "classList" | "children"> {
|
|
8
9
|
size?: "small" | "normal" | "large"
|
|
9
|
-
variant?:
|
|
10
|
+
variant?:
|
|
11
|
+
| "neutral"
|
|
12
|
+
| "danger"
|
|
13
|
+
| "warning"
|
|
14
|
+
| "outline"
|
|
15
|
+
| "contrast"
|
|
16
|
+
| "ghost"
|
|
17
|
+
| "ghost-muted"
|
|
18
|
+
| "ghost-faint"
|
|
19
|
+
| "loading"
|
|
10
20
|
icon?: IconProps["name"]
|
|
11
21
|
}
|
|
12
22
|
|
|
13
23
|
export function Button(props: ButtonProps) {
|
|
14
24
|
const [split, rest] = splitProps(props, ["variant", "size", "icon", "class", "classList"])
|
|
15
25
|
return (
|
|
16
|
-
<
|
|
26
|
+
<Root
|
|
17
27
|
{...rest}
|
|
18
|
-
data-component="button"
|
|
28
|
+
data-component="button-v2"
|
|
19
29
|
data-size={split.size || "normal"}
|
|
20
|
-
data-variant={split.variant || "
|
|
30
|
+
data-variant={split.variant || "neutral"}
|
|
21
31
|
data-icon={split.icon}
|
|
22
32
|
classList={{
|
|
23
33
|
...split.classList,
|
|
24
34
|
[split.class ?? ""]: !!split.class,
|
|
25
35
|
}}
|
|
26
36
|
>
|
|
27
|
-
<Show when={split.icon}>
|
|
28
|
-
<Icon name={split.icon!} size="small" />
|
|
29
|
-
</Show>
|
|
37
|
+
<Show when={split.icon}>{(icon) => <Icon name={icon()} />}</Show>
|
|
30
38
|
{props.children}
|
|
31
|
-
</
|
|
39
|
+
</Root>
|
|
32
40
|
)
|
|
33
41
|
}
|