@opencode-ai/ui 0.0.0-dev-202609071625 → 0.0.0-dev-19265
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 +244 -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 +60 -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 +61 -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} +9 -75
- package/src/icons/icon/icon.css +3 -0
- package/src/{v2/components → icons/icon}/icon.tsx +96 -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
|
@@ -71,23 +71,37 @@
|
|
|
71
71
|
|
|
72
72
|
/* Contrast */
|
|
73
73
|
[data-component="icon-button-v2"][data-variant="contrast"] {
|
|
74
|
+
--icon-button-contrast-highlight: var(--v2-alpha-light-20);
|
|
75
|
+
--icon-button-contrast-hover: var(--v2-overlay-simple-overlay-contrast-hover);
|
|
76
|
+
|
|
74
77
|
background-image:
|
|
75
|
-
linear-gradient(180deg, var(--
|
|
76
|
-
linear-gradient(
|
|
78
|
+
linear-gradient(180deg, var(--icon-button-contrast-highlight) 0%, var(--v2-alpha-light-0) 100%),
|
|
79
|
+
linear-gradient(
|
|
80
|
+
90deg,
|
|
81
|
+
var(--v2-background-bg-icon-button-contrast) 0%,
|
|
82
|
+
var(--v2-background-bg-icon-button-contrast) 100%
|
|
83
|
+
);
|
|
77
84
|
color: var(--v2-text-text-contrast);
|
|
78
85
|
text-shadow: 0 0.5px 0.5px rgba(0, 0, 0, 0.3);
|
|
79
86
|
box-shadow: var(--v2-elevation-button-contrast);
|
|
80
87
|
}
|
|
81
88
|
|
|
89
|
+
[data-color-scheme="dark"] [data-component="icon-button-v2"][data-variant="contrast"] {
|
|
90
|
+
--icon-button-contrast-highlight: var(--v2-alpha-light-60);
|
|
91
|
+
--icon-button-contrast-hover: var(--v2-alpha-dark-8);
|
|
92
|
+
|
|
93
|
+
color: var(--v2-icon-icon-inverse);
|
|
94
|
+
}
|
|
95
|
+
|
|
82
96
|
[data-component="icon-button-v2"][data-variant="contrast"]:is(:hover, [data-state="hover"]):not(:disabled) {
|
|
83
97
|
background-image:
|
|
98
|
+
linear-gradient(90deg, var(--icon-button-contrast-hover) 0%, var(--icon-button-contrast-hover) 100%),
|
|
99
|
+
linear-gradient(180deg, var(--icon-button-contrast-highlight) 0%, var(--v2-alpha-light-0) 100%),
|
|
84
100
|
linear-gradient(
|
|
85
101
|
90deg,
|
|
86
|
-
var(--v2-
|
|
87
|
-
var(--v2-
|
|
88
|
-
)
|
|
89
|
-
linear-gradient(180deg, var(--v2-alpha-light-20) 0%, var(--v2-alpha-light-0) 100%),
|
|
90
|
-
linear-gradient(90deg, var(--v2-background-bg-contrast) 0%, var(--v2-background-bg-contrast) 100%);
|
|
102
|
+
var(--v2-background-bg-icon-button-contrast) 0%,
|
|
103
|
+
var(--v2-background-bg-icon-button-contrast) 100%
|
|
104
|
+
);
|
|
91
105
|
}
|
|
92
106
|
|
|
93
107
|
[data-component="icon-button-v2"][data-variant="contrast"]:is(:active, [data-state="pressed"]):not(:disabled) {
|
|
@@ -97,8 +111,12 @@
|
|
|
97
111
|
var(--v2-overlay-simple-overlay-contrast-pressed) 0%,
|
|
98
112
|
var(--v2-overlay-simple-overlay-contrast-pressed) 100%
|
|
99
113
|
),
|
|
100
|
-
linear-gradient(180deg, var(--
|
|
101
|
-
linear-gradient(
|
|
114
|
+
linear-gradient(180deg, var(--icon-button-contrast-highlight) 0%, var(--v2-alpha-light-0) 100%),
|
|
115
|
+
linear-gradient(
|
|
116
|
+
90deg,
|
|
117
|
+
var(--v2-background-bg-icon-button-contrast) 0%,
|
|
118
|
+
var(--v2-background-bg-icon-button-contrast) 100%
|
|
119
|
+
);
|
|
102
120
|
}
|
|
103
121
|
|
|
104
122
|
[data-component="icon-button-v2"][data-variant="contrast"]:is(:disabled, [data-state="disabled"]) {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Root } from "@kobalte/core/button"
|
|
2
|
+
import { type ComponentProps, splitProps } from "solid-js"
|
|
3
|
+
import { JSX } from "solid-js"
|
|
4
|
+
import "./icon-button.css"
|
|
5
|
+
|
|
6
|
+
export interface IconButtonProps
|
|
7
|
+
extends ComponentProps<typeof Root>,
|
|
8
|
+
Pick<ComponentProps<"button">, "class" | "classList"> {
|
|
9
|
+
icon?: JSX.Element
|
|
10
|
+
size?: "small" | "normal" | "large"
|
|
11
|
+
variant?: "neutral" | "contrast" | "ghost" | "ghost-muted"
|
|
12
|
+
state?: "rest" | "hover" | "pressed"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function IconButton(props: ComponentProps<"button"> & IconButtonProps) {
|
|
16
|
+
const [local, rest] = splitProps(props, ["variant", "size", "icon", "class", "classList", "state"])
|
|
17
|
+
return (
|
|
18
|
+
<Root
|
|
19
|
+
{...rest}
|
|
20
|
+
data-component="icon-button-v2"
|
|
21
|
+
data-size={local.size || "normal"}
|
|
22
|
+
data-variant={local.variant || "neutral"}
|
|
23
|
+
data-state={local.state}
|
|
24
|
+
classList={{
|
|
25
|
+
...local.classList,
|
|
26
|
+
[local.class ?? ""]: !!local.class,
|
|
27
|
+
}}
|
|
28
|
+
>
|
|
29
|
+
{local.icon}
|
|
30
|
+
</Root>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
[data-component="split-button-v2"].session-review-v2-open-in-app,
|
|
12
13
|
[data-component="split-button-v2"]:is(:hover, :has([data-component="split-button-v2-menu-trigger"][data-expanded])) {
|
|
13
14
|
box-shadow: inset 0 0 0 1px var(--v2-border-border-muted);
|
|
14
15
|
}
|
|
@@ -87,13 +88,8 @@
|
|
|
87
88
|
flex-shrink: 0;
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
[data-component="menu-v2-content"].open-in-app-v2-menu [data-
|
|
91
|
+
[data-component="menu-v2-content"].open-in-app-v2-menu [data-slot="icon-svg"] {
|
|
91
92
|
width: 16px;
|
|
92
93
|
height: 16px;
|
|
93
94
|
flex-shrink: 0;
|
|
94
95
|
}
|
|
95
|
-
|
|
96
|
-
[data-component="menu-v2-content"].open-in-app-v2-menu [data-component="icon"] [data-slot="icon-svg"] {
|
|
97
|
-
width: 16px;
|
|
98
|
-
height: 16px;
|
|
99
|
-
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { splitProps, type ComponentProps, type ParentProps } from "solid-js"
|
|
2
|
-
import "./split-button
|
|
2
|
+
import "./split-button.css"
|
|
3
3
|
|
|
4
|
-
export function
|
|
4
|
+
export function SplitButton(props: ParentProps<ComponentProps<"div">>) {
|
|
5
5
|
const [split, rest] = splitProps(props, ["class", "classList", "children"])
|
|
6
6
|
return (
|
|
7
7
|
<div
|
|
@@ -17,7 +17,7 @@ export function SplitButtonV2(props: ParentProps<ComponentProps<"div">>) {
|
|
|
17
17
|
)
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export function
|
|
20
|
+
export function SplitButtonAction(props: ComponentProps<"button">) {
|
|
21
21
|
const [split, rest] = splitProps(props, ["class", "classList"])
|
|
22
22
|
return (
|
|
23
23
|
<button
|
|
@@ -32,7 +32,7 @@ export function SplitButtonV2Action(props: ComponentProps<"button">) {
|
|
|
32
32
|
)
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
export function
|
|
35
|
+
export function SplitButtonMenuTrigger(props: ComponentProps<"button">) {
|
|
36
36
|
const [split, rest] = splitProps(props, ["class", "classList"])
|
|
37
37
|
return (
|
|
38
38
|
<button
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
[data-slot="animated-number-digit"] {
|
|
20
|
-
display: inline-
|
|
20
|
+
display: inline-grid;
|
|
21
21
|
width: 1ch;
|
|
22
22
|
height: 1em;
|
|
23
23
|
line-height: 1em;
|
|
@@ -41,19 +41,12 @@
|
|
|
41
41
|
mask-repeat: no-repeat;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
[data-slot="animated-number-static"],
|
|
44
45
|
[data-slot="animated-number-strip"] {
|
|
45
|
-
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
transform: translateY(calc(var(--animated-number-offset, 10) * -1em));
|
|
48
|
-
transition-property: transform;
|
|
49
|
-
transition-duration: var(--animated-number-duration, 560ms);
|
|
50
|
-
transition-timing-function: var(--tool-motion-ease, cubic-bezier(0.22, 1, 0.36, 1));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
[data-slot="animated-number-strip"][data-animating="false"] {
|
|
54
|
-
transition-duration: 0ms;
|
|
46
|
+
grid-area: 1 / 1;
|
|
55
47
|
}
|
|
56
48
|
|
|
49
|
+
[data-slot="animated-number-static"],
|
|
57
50
|
[data-slot="animated-number-cell"] {
|
|
58
51
|
display: inline-flex;
|
|
59
52
|
align-items: center;
|
|
@@ -62,6 +55,24 @@
|
|
|
62
55
|
height: 1em;
|
|
63
56
|
line-height: 1em;
|
|
64
57
|
}
|
|
58
|
+
|
|
59
|
+
[data-slot="animated-number-digit"][data-animating="true"] [data-slot="animated-number-static"] {
|
|
60
|
+
visibility: hidden;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-slot="animated-number-strip"] {
|
|
64
|
+
display: inline-flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
margin-top: calc(var(--animated-number-offset, 10) * -1em);
|
|
67
|
+
transition-property: margin-top;
|
|
68
|
+
transition-duration: var(--animated-number-duration, 560ms);
|
|
69
|
+
transition-timing-function: var(--tool-motion-ease, cubic-bezier(0.22, 1, 0.36, 1));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
[data-slot="animated-number-digit"][data-animating="false"] [data-slot="animated-number-strip"] {
|
|
73
|
+
transition-duration: 0ms;
|
|
74
|
+
visibility: hidden;
|
|
75
|
+
}
|
|
65
76
|
}
|
|
66
77
|
|
|
67
78
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -71,5 +82,12 @@
|
|
|
71
82
|
|
|
72
83
|
[data-component="animated-number"] [data-slot="animated-number-strip"] {
|
|
73
84
|
transition-duration: 0ms;
|
|
85
|
+
visibility: hidden;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[data-component="animated-number"]
|
|
89
|
+
[data-slot="animated-number-digit"][data-animating]
|
|
90
|
+
[data-slot="animated-number-static"] {
|
|
91
|
+
visibility: visible;
|
|
74
92
|
}
|
|
75
93
|
}
|
|
@@ -43,10 +43,10 @@ function Digit(props: { value: number; direction: 1 | -1 }) {
|
|
|
43
43
|
)
|
|
44
44
|
|
|
45
45
|
return (
|
|
46
|
-
<span data-slot="animated-number-digit">
|
|
46
|
+
<span data-slot="animated-number-digit" data-animating={animating() ? "true" : "false"}>
|
|
47
|
+
<span data-slot="animated-number-static">{props.value}</span>
|
|
47
48
|
<span
|
|
48
49
|
data-slot="animated-number-strip"
|
|
49
|
-
data-animating={animating() ? "true" : "false"}
|
|
50
50
|
onTransitionEnd={() => {
|
|
51
51
|
setState("animating", false)
|
|
52
52
|
setState("step", (value) => normalize(value) + 10)
|
package/src/components/card.css
CHANGED
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
gap: var(--card-gap);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
:where([data-slot="card-title"]) [data-
|
|
61
|
+
:where([data-slot="card-title"]) [data-slot="icon-svg"] {
|
|
62
62
|
color: var(--card-accent);
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
flex: 0 0 auto;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
:where([data-slot="card-title-icon"][data-placeholder]) [data-
|
|
74
|
+
:where([data-slot="card-title-icon"][data-placeholder]) [data-slot="icon-svg"] {
|
|
75
75
|
color: var(--v2-text-text-faint);
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -92,24 +92,3 @@
|
|
|
92
92
|
padding-left: var(--card-indent);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
body:not([data-new-layout]) [data-component="card"] {
|
|
97
|
-
color: var(--text-strong);
|
|
98
|
-
--card-accent: var(--icon-active);
|
|
99
|
-
|
|
100
|
-
:where([data-card="title"], [data-slot="card-title"]) {
|
|
101
|
-
color: var(--text-strong);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
:where([data-slot="card-title-icon"][data-placeholder]) [data-component="icon"] {
|
|
105
|
-
color: var(--text-weak);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
:where([data-card="description"], [data-slot="card-description"]) {
|
|
109
|
-
color: var(--text-base);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&[data-variant="error"] {
|
|
113
|
-
--card-accent: var(--icon-critical-base) !important;
|
|
114
|
-
}
|
|
115
|
-
}
|
package/src/components/card.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ComponentProps, splitProps } from "solid-js"
|
|
2
|
-
import { Icon, type IconProps } from "
|
|
1
|
+
import { type ComponentProps, Show, splitProps } from "solid-js"
|
|
2
|
+
import { Icon, type IconProps } from "@opencode-ai/ui/icon"
|
|
3
3
|
|
|
4
4
|
type Variant = "normal" | "error" | "warning" | "success" | "info"
|
|
5
5
|
|
|
@@ -80,11 +80,11 @@ export function CardTitle(props: CardTitleProps) {
|
|
|
80
80
|
[split.class ?? ""]: !!split.class,
|
|
81
81
|
}}
|
|
82
82
|
>
|
|
83
|
-
{show()
|
|
83
|
+
<Show when={show()}>
|
|
84
84
|
<span data-slot="card-title-icon" data-placeholder={placeholder() || undefined}>
|
|
85
85
|
<Icon name={name() ?? "dash"} size="small" />
|
|
86
86
|
</span>
|
|
87
|
-
|
|
87
|
+
</Show>
|
|
88
88
|
{split.children}
|
|
89
89
|
</div>
|
|
90
90
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Collapsible as Kobalte, CollapsibleRootProps } from "@kobalte/core/collapsible"
|
|
2
2
|
import { ComponentProps, ParentProps, splitProps } from "solid-js"
|
|
3
|
-
import { Icon } from "
|
|
3
|
+
import { Icon } from "@opencode-ai/ui/icon"
|
|
4
4
|
|
|
5
5
|
export interface CollapsibleProps extends ParentProps<CollapsibleRootProps> {
|
|
6
6
|
class?: string
|
|
@@ -35,7 +35,7 @@ function CollapsibleArrow(props?: ComponentProps<"div">) {
|
|
|
35
35
|
return (
|
|
36
36
|
<div data-slot="collapsible-arrow" {...(props || {})}>
|
|
37
37
|
<span data-slot="collapsible-arrow-icon">
|
|
38
|
-
<Icon name="
|
|
38
|
+
<Icon name="fill-triangle-down" size="small" />
|
|
39
39
|
</span>
|
|
40
40
|
</div>
|
|
41
41
|
)
|
|
@@ -10,15 +10,8 @@
|
|
|
10
10
|
[data-dock-border-underlay] {
|
|
11
11
|
/* Later shadows paint underneath, so this solid ring masks overlapping surfaces without changing border geometry. */
|
|
12
12
|
box-shadow:
|
|
13
|
-
var(--
|
|
14
|
-
0 0 0 var(--
|
|
15
|
-
var(--dock-shell-border-underlay-background, var(--surface-raised-stronger-non-alpha));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
[data-dock-border-underlay="v2"] {
|
|
19
|
-
--dock-shell-visual-shadow: var(--v2-elevation-raised);
|
|
20
|
-
--dock-shell-border-underlay-width: 0.5px;
|
|
21
|
-
--dock-shell-border-underlay-background: var(--v2-background-bg-base);
|
|
13
|
+
var(--v2-elevation-raised),
|
|
14
|
+
0 0 0 0.5px var(--v2-background-bg-base);
|
|
22
15
|
}
|
|
23
16
|
|
|
24
17
|
[data-dock-surface="tray"] {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Dialog as Kobalte } from "@kobalte/core/dialog"
|
|
2
2
|
import { useI18n } from "../context/i18n"
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "@opencode-ai/ui/icon"
|
|
4
|
+
import { IconButton } from "@opencode-ai/ui/icon-button"
|
|
4
5
|
|
|
5
6
|
export interface ImagePreviewProps {
|
|
6
7
|
src: string
|
|
@@ -17,7 +18,7 @@ export function ImagePreview(props: ImagePreviewProps) {
|
|
|
17
18
|
<Kobalte.CloseButton
|
|
18
19
|
data-slot="image-preview-close"
|
|
19
20
|
as={IconButton}
|
|
20
|
-
icon="close"
|
|
21
|
+
icon={<Icon name="close" />}
|
|
21
22
|
variant="ghost"
|
|
22
23
|
aria-label={i18n.t("ui.common.close")}
|
|
23
24
|
/>
|
package/src/components/list.css
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
align-self: stretch;
|
|
32
32
|
margin-bottom: 4px;
|
|
33
33
|
|
|
34
|
-
> [data-component="icon-button"] {
|
|
34
|
+
> [data-component="icon-button-v2"] {
|
|
35
35
|
width: 24px;
|
|
36
36
|
height: 24px;
|
|
37
37
|
flex-shrink: 0;
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
> [data-component="icon-button"] {
|
|
86
|
+
> [data-component="icon-button-v2"] {
|
|
87
87
|
width: 20px;
|
|
88
88
|
height: 20px;
|
|
89
89
|
background-color: transparent;
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
> [data-component="icon-button"] {
|
|
109
|
+
> [data-component="icon-button-v2"] {
|
|
110
110
|
background-color: transparent;
|
|
111
111
|
|
|
112
112
|
&:hover:not(:disabled),
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
justify-content: center;
|
|
253
253
|
flex-shrink: 0;
|
|
254
254
|
aspect-ratio: 1/1;
|
|
255
|
-
[data-
|
|
255
|
+
[data-slot="icon-svg"] {
|
|
256
256
|
color: var(--icon-strong-base);
|
|
257
257
|
}
|
|
258
258
|
}
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
justify-content: center;
|
|
263
263
|
flex-shrink: 0;
|
|
264
264
|
aspect-ratio: 1/1;
|
|
265
|
-
[data-
|
|
265
|
+
[data-slot="icon-svg"] {
|
|
266
266
|
color: var(--icon-strong-base);
|
|
267
267
|
}
|
|
268
268
|
}
|
package/src/components/list.tsx
CHANGED
|
@@ -3,8 +3,8 @@ import { createEffect, For, type JSX, on, Show } from "solid-js"
|
|
|
3
3
|
import { createStore } from "solid-js/store"
|
|
4
4
|
import { makeEventListener } from "@solid-primitives/event-listener"
|
|
5
5
|
import { useI18n } from "../context/i18n"
|
|
6
|
-
import { Icon, type IconProps } from "
|
|
7
|
-
import { IconButton } from "
|
|
6
|
+
import { Icon, type IconProps } from "@opencode-ai/ui/icon"
|
|
7
|
+
import { IconButton } from "@opencode-ai/ui/icon-button"
|
|
8
8
|
import { TextField } from "./text-field"
|
|
9
9
|
|
|
10
10
|
function findByKey(container: HTMLElement, key: string) {
|
|
@@ -302,7 +302,7 @@ export function List<T>(props: ListProps<T> & { ref?: (ref: ListRef) => void })
|
|
|
302
302
|
</div>
|
|
303
303
|
<Show when={internalFilter()}>
|
|
304
304
|
<IconButton
|
|
305
|
-
icon="circle-x"
|
|
305
|
+
icon={<Icon name="circle-x" />}
|
|
306
306
|
variant="ghost"
|
|
307
307
|
onClick={() => {
|
|
308
308
|
setInternalFilter("")
|
|
@@ -367,9 +367,11 @@ export function List<T>(props: ListProps<T> & { ref?: (ref: ListRef) => void })
|
|
|
367
367
|
</span>
|
|
368
368
|
)}
|
|
369
369
|
</Show>
|
|
370
|
-
|
|
370
|
+
<Show
|
|
371
|
+
when={props.divider && (i() !== group.items.length - 1 || (showAdd() && isLastGroup()))}
|
|
372
|
+
>
|
|
371
373
|
<span data-slot="list-item-divider" />
|
|
372
|
-
|
|
374
|
+
</Show>
|
|
373
375
|
</button>
|
|
374
376
|
)
|
|
375
377
|
if (props.itemWrapper) return props.itemWrapper(item, node)
|
|
@@ -3,7 +3,8 @@ import { ComponentProps, JSXElement, ParentProps, Show, createEffect, splitProps
|
|
|
3
3
|
import { createStore } from "solid-js/store"
|
|
4
4
|
import { makeEventListener } from "@solid-primitives/event-listener"
|
|
5
5
|
import { useI18n } from "../context/i18n"
|
|
6
|
-
import {
|
|
6
|
+
import { Icon } from "@opencode-ai/ui/icon"
|
|
7
|
+
import { IconButton } from "@opencode-ai/ui/icon-button"
|
|
7
8
|
|
|
8
9
|
export interface PopoverProps<T extends ValidComponent = "div">
|
|
9
10
|
extends ParentProps,
|
|
@@ -122,7 +123,7 @@ export function Popover<T extends ValidComponent = "div">(props: PopoverProps<T>
|
|
|
122
123
|
<Kobalte.CloseButton
|
|
123
124
|
data-slot="popover-close-button"
|
|
124
125
|
as={IconButton}
|
|
125
|
-
icon="close"
|
|
126
|
+
icon={<Icon name="close" />}
|
|
126
127
|
variant="ghost"
|
|
127
128
|
aria-label={i18n.t("ui.common.close")}
|
|
128
129
|
/>
|
|
@@ -15,15 +15,21 @@
|
|
|
15
15
|
outline: none;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
.scroll-view[data-orientation="horizontal"] .scroll-view__viewport {
|
|
19
|
+
overflow-x: auto;
|
|
20
|
+
overflow-y: hidden;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.scroll-view[data-orientation="both"] .scroll-view__viewport {
|
|
24
|
+
overflow: auto;
|
|
25
|
+
}
|
|
26
|
+
|
|
18
27
|
.scroll-view__viewport::-webkit-scrollbar {
|
|
19
28
|
display: none;
|
|
20
29
|
}
|
|
21
30
|
|
|
22
31
|
.scroll-view__thumb {
|
|
23
32
|
position: absolute;
|
|
24
|
-
inset-inline-end: 0;
|
|
25
|
-
top: 0;
|
|
26
|
-
width: 12px;
|
|
27
33
|
transition: opacity 200ms ease;
|
|
28
34
|
cursor: default;
|
|
29
35
|
user-select: none;
|
|
@@ -31,7 +37,19 @@
|
|
|
31
37
|
opacity: 0;
|
|
32
38
|
}
|
|
33
39
|
|
|
34
|
-
.scroll-view__thumb
|
|
40
|
+
.scroll-view__thumb[data-orientation="vertical"] {
|
|
41
|
+
inset-inline-end: 0;
|
|
42
|
+
top: 0;
|
|
43
|
+
width: 12px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.scroll-view__thumb[data-orientation="horizontal"] {
|
|
47
|
+
left: 0;
|
|
48
|
+
bottom: 0;
|
|
49
|
+
height: 12px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.scroll-view__thumb[data-orientation="vertical"]::after {
|
|
35
53
|
content: "";
|
|
36
54
|
position: absolute;
|
|
37
55
|
left: 50%;
|
|
@@ -45,6 +63,20 @@
|
|
|
45
63
|
transition: background-color 150ms ease;
|
|
46
64
|
}
|
|
47
65
|
|
|
66
|
+
.scroll-view__thumb[data-orientation="horizontal"]::after {
|
|
67
|
+
content: "";
|
|
68
|
+
position: absolute;
|
|
69
|
+
left: 0;
|
|
70
|
+
right: 0;
|
|
71
|
+
top: 50%;
|
|
72
|
+
height: 4px;
|
|
73
|
+
transform: translateY(-50%);
|
|
74
|
+
border-radius: 9999px;
|
|
75
|
+
background-color: var(--border-weak-base);
|
|
76
|
+
backdrop-filter: blur(4px);
|
|
77
|
+
transition: background-color 150ms ease;
|
|
78
|
+
}
|
|
79
|
+
|
|
48
80
|
.scroll-view__thumb:hover::after,
|
|
49
81
|
.scroll-view__thumb[data-dragging="true"]::after {
|
|
50
82
|
background-color: var(--border-strong-base);
|