@opencode-ai/ui 0.0.0-dev-18424 → 0.0.0-dev-202608272004
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/{data-display/accordion → components}/accordion.d.ts +6 -6
- package/dist/components/avatar.d.ts +9 -0
- package/dist/components/button.d.ts +9 -0
- package/dist/components/card.d.ts +1 -1
- package/dist/{forms/checkbox → components}/checkbox.d.ts +2 -2
- package/dist/components/dialog.d.ts +12 -0
- package/dist/{data-display/diff-changes → components}/diff-changes.d.ts +1 -2
- package/dist/components/dropdown-menu.d.ts +80 -0
- package/dist/components/icon-button.d.ts +10 -0
- package/dist/{icons/icon/additional-icons.d.ts → components/icon.d.ts} +8 -8
- package/dist/components/keybind.d.ts +6 -0
- package/dist/components/list.d.ts +1 -1
- package/dist/{feedback/progress-circle → components}/progress-circle.d.ts +0 -2
- package/dist/components/radio-group.d.ts +16 -0
- package/dist/components/scroll-view.d.ts +3 -3
- package/dist/components/select.d.ts +21 -0
- package/dist/{forms/switch → components}/switch.d.ts +2 -4
- package/dist/{navigation/tabs → components}/tabs.d.ts +8 -15
- package/dist/components/tag.d.ts +5 -0
- package/dist/{typography/text-shimmer → components}/text-shimmer.d.ts +0 -1
- package/dist/components/toast.d.ts +56 -0
- package/dist/components/tooltip.d.ts +17 -0
- package/dist/context/i18n.d.ts +7 -10
- package/dist/i18n/ar.d.ts +2 -0
- package/dist/i18n/bg.d.ts +2 -0
- package/dist/i18n/br.d.ts +2 -0
- package/dist/i18n/bs.d.ts +2 -0
- package/dist/i18n/da.d.ts +2 -0
- package/dist/i18n/de.d.ts +2 -0
- package/dist/i18n/en.d.ts +1 -227
- package/dist/i18n/es.d.ts +2 -0
- package/dist/i18n/fr.d.ts +2 -0
- package/dist/i18n/ja.d.ts +2 -0
- package/dist/i18n/km.d.ts +2 -0
- package/dist/i18n/ko.d.ts +2 -0
- package/dist/i18n/lo.d.ts +2 -0
- package/dist/i18n/mk.d.ts +2 -0
- package/dist/i18n/mn.d.ts +2 -0
- package/dist/i18n/my.d.ts +2 -0
- package/dist/i18n/pl.d.ts +2 -0
- package/dist/i18n/ru.d.ts +2 -0
- package/dist/i18n/sr.d.ts +2 -0
- package/dist/i18n/tg.d.ts +2 -0
- package/dist/i18n/th.d.ts +2 -0
- package/dist/i18n/tr.d.ts +2 -0
- package/dist/i18n/zh.d.ts +2 -0
- package/dist/i18n/zht.d.ts +2 -0
- package/dist/v2/components/accordion-v2.d.ts +26 -0
- package/dist/{data-display/avatar/avatar.d.ts → v2/components/avatar-v2.d.ts} +1 -1
- package/dist/v2/components/badge-v2.d.ts +6 -0
- package/dist/v2/components/button-v2.d.ts +10 -0
- package/dist/v2/components/checkbox-v2.d.ts +10 -0
- package/dist/{overlays/dialog/dialog.d.ts → v2/components/dialog-v2.d.ts} +2 -1
- package/dist/v2/components/diff-changes-v2.d.ts +11 -0
- package/dist/v2/components/divider-v2.d.ts +5 -0
- package/dist/{forms/field/field.d.ts → v2/components/field-v2.d.ts} +10 -4
- package/dist/v2/components/icon-button-v2.d.ts +11 -0
- package/dist/{icons/icon → v2/components}/icon.d.ts +1 -24
- package/dist/v2/components/inline-input-v2.d.ts +21 -0
- package/dist/v2/components/keybind-v2.d.ts +7 -0
- package/dist/{data-display/line-comment/line-comment.d.ts → v2/components/line-comment-v2.d.ts} +9 -9
- package/dist/v2/components/loader-v2.d.ts +3 -0
- package/dist/v2/components/menu-v2.d.ts +52 -0
- package/dist/v2/components/progress-circle-v2.d.ts +8 -0
- package/dist/{data-display/project-avatar/project-avatar.d.ts → v2/components/project-avatar-v2.d.ts} +1 -1
- package/dist/v2/components/radio-v2.d.ts +16 -0
- package/dist/{navigation/segmented-control/segmented-control.d.ts → v2/components/segmented-control-v2.d.ts} +5 -5
- package/dist/{forms/select/select.d.ts → v2/components/select-v2.d.ts} +6 -4
- package/dist/v2/components/split-button-v2.d.ts +5 -0
- package/dist/v2/components/switch-v2.d.ts +7 -0
- package/dist/v2/components/tabs-v2.d.ts +34 -0
- package/dist/{forms/text-input/text-input.d.ts → v2/components/text-input-v2.d.ts} +3 -3
- package/dist/v2/components/text-shimmer-v2.d.ts +9 -0
- package/dist/v2/components/textarea-v2.d.ts +7 -0
- package/dist/v2/components/toast-v2.d.ts +57 -0
- package/dist/v2/components/tooltip-v2.d.ts +13 -0
- package/dist/v2/components/wordmark-v2.d.ts +2 -0
- package/package.json +13 -131
- package/src/{data-display/accordion → components}/accordion.css +26 -1
- package/src/{data-display/accordion → components}/accordion.tsx +14 -14
- package/src/components/animated-number.css +11 -29
- package/src/components/animated-number.tsx +2 -2
- package/src/components/avatar.css +49 -0
- package/src/components/avatar.tsx +55 -0
- package/src/components/button.css +194 -0
- package/src/{actions/button → components}/button.tsx +11 -10
- package/src/components/card.css +23 -2
- package/src/components/card.tsx +4 -4
- package/src/{forms/checkbox → components}/checkbox.css +7 -1
- package/src/{forms/checkbox → components}/checkbox.tsx +13 -13
- package/src/components/collapsible.tsx +2 -2
- package/src/components/dialog.css +181 -0
- package/src/components/dialog.tsx +72 -0
- package/src/{data-display/diff-changes → components}/diff-changes.css +19 -22
- package/src/components/diff-changes.tsx +115 -0
- package/src/components/dock-surface.css +9 -2
- package/src/components/dropdown-menu.css +135 -0
- package/src/components/dropdown-menu.tsx +308 -0
- package/src/components/icon-button.css +181 -0
- package/src/components/icon-button.tsx +29 -0
- package/src/components/icon.css +39 -0
- package/src/{icons/icon/additional-icons.ts → components/icon.tsx} +74 -8
- package/src/components/image-preview.tsx +2 -3
- package/src/components/keybind.css +18 -0
- package/src/components/keybind.tsx +20 -0
- package/src/components/list.css +5 -5
- package/src/components/list.tsx +5 -7
- package/src/components/popover.tsx +2 -3
- package/src/components/progress-circle.css +16 -0
- package/src/components/progress-circle.tsx +64 -0
- package/src/components/radio-group.css +187 -0
- package/src/components/radio-group.tsx +83 -0
- package/src/components/scroll-view.tsx +20 -5
- package/src/components/select.css +201 -0
- package/src/components/select.tsx +174 -0
- package/src/components/sticky-accordion-header.tsx +1 -1
- package/src/components/switch.css +136 -0
- package/src/components/switch.tsx +29 -0
- package/src/{navigation/tabs → components}/tabs.css +229 -39
- package/src/components/tabs.tsx +126 -0
- package/src/components/tag.css +37 -0
- package/src/components/tag.tsx +22 -0
- package/src/components/text-field.tsx +4 -12
- package/src/{typography/text-shimmer → components}/text-shimmer.css +1 -2
- package/src/{typography/text-shimmer → components}/text-shimmer.tsx +0 -1
- package/src/components/toast.css +236 -0
- package/src/components/toast.tsx +185 -0
- package/src/components/tooltip.css +74 -0
- package/src/components/tooltip.tsx +163 -0
- package/src/context/dialog.tsx +0 -1
- package/src/context/i18n.tsx +14 -17
- package/src/hooks/create-auto-scroll.tsx +0 -20
- package/src/i18n/am.ts +3 -1
- package/src/i18n/ar.ts +3 -1
- package/src/i18n/az.ts +3 -1
- package/src/i18n/bg.ts +3 -1
- package/src/i18n/bn.ts +3 -1
- package/src/i18n/br.ts +3 -1
- package/src/i18n/bs.ts +3 -1
- package/src/i18n/ca.ts +3 -1
- package/src/i18n/cs.ts +3 -1
- package/src/i18n/da.ts +3 -1
- package/src/i18n/de.ts +3 -1
- package/src/i18n/dv.ts +3 -1
- package/src/i18n/dz.ts +3 -1
- package/src/i18n/el.ts +3 -1
- package/src/i18n/en.ts +5 -37
- package/src/i18n/es.ts +3 -1
- package/src/i18n/et.ts +3 -1
- package/src/i18n/fa.ts +3 -1
- package/src/i18n/fi.ts +3 -1
- package/src/i18n/fo.ts +3 -1
- package/src/i18n/fr.ts +3 -1
- package/src/i18n/hi.ts +3 -1
- package/src/i18n/hr.ts +3 -1
- package/src/i18n/hu.ts +3 -1
- package/src/i18n/hy.ts +3 -1
- package/src/i18n/id.ts +3 -1
- package/src/i18n/is.ts +3 -1
- package/src/i18n/it.ts +3 -1
- package/src/i18n/ja.ts +3 -1
- package/src/i18n/ka.ts +3 -1
- package/src/i18n/km.ts +3 -1
- package/src/i18n/ko.ts +3 -1
- package/src/i18n/lo.ts +3 -1
- package/src/i18n/lt.ts +3 -1
- package/src/i18n/lv.ts +3 -1
- package/src/i18n/mk.ts +3 -1
- package/src/i18n/mn.ts +3 -1
- package/src/i18n/ms.ts +3 -1
- package/src/i18n/my.ts +3 -1
- package/src/i18n/ne.ts +3 -1
- package/src/i18n/nl.ts +3 -1
- package/src/i18n/no.ts +3 -1
- package/src/i18n/pa.ts +3 -1
- package/src/i18n/pl.ts +3 -1
- package/src/i18n/ro.ts +3 -1
- package/src/i18n/ru.ts +3 -1
- package/src/i18n/si.ts +3 -1
- package/src/i18n/sk.ts +3 -1
- package/src/i18n/sl.ts +3 -1
- package/src/i18n/sq.ts +3 -1
- package/src/i18n/sr.ts +3 -1
- package/src/i18n/sv.ts +3 -1
- package/src/i18n/tg.ts +3 -1
- package/src/i18n/th.ts +3 -1
- package/src/i18n/tk.ts +3 -1
- package/src/i18n/tr.ts +3 -1
- package/src/i18n/uk.ts +3 -1
- package/src/i18n/ur.ts +3 -1
- package/src/i18n/uz.ts +3 -1
- package/src/i18n/vi.ts +3 -1
- package/src/i18n/zh.ts +3 -1
- package/src/i18n/zht.ts +3 -1
- package/src/styles/index.css +20 -4
- package/src/styles/tailwind/colors.css +0 -1
- package/src/styles/tailwind/index.css +1 -18
- package/src/styles/theme.css +2 -2
- package/src/theme/context.tsx +11 -19
- package/src/theme/themes/oc-2.json +1 -3
- package/src/theme/v2/foreground.ts +0 -1
- package/src/v2/components/accordion-v2.css +139 -0
- package/src/v2/components/accordion-v2.tsx +86 -0
- package/src/{data-display/avatar/avatar.tsx → v2/components/avatar-v2.tsx} +1 -1
- package/src/{data-display/badge/badge.css → v2/components/badge-v2.css} +0 -19
- package/src/{data-display/badge/badge.tsx → v2/components/badge-v2.tsx} +4 -6
- package/src/v2/components/button-v2.tsx +35 -0
- package/src/v2/components/checkbox-v2.css +184 -0
- package/src/v2/components/checkbox-v2.tsx +65 -0
- package/src/{overlays/dialog/dialog.css → v2/components/dialog-v2.css} +0 -3
- package/src/{overlays/dialog/dialog.tsx → v2/components/dialog-v2.tsx} +13 -11
- package/src/v2/components/diff-changes-v2.css +26 -0
- package/src/{data-display/diff-changes/diff-changes.tsx → v2/components/diff-changes-v2.tsx} +2 -7
- package/src/{layout/divider/divider.tsx → v2/components/divider-v2.tsx} +3 -3
- package/src/{forms/field/field.css → v2/components/field-v2.css} +1 -1
- package/src/{forms/field/field.tsx → v2/components/field-v2.tsx} +11 -9
- package/src/v2/components/icon-button-v2.tsx +37 -0
- package/src/{icons/icon → v2/components}/icon.tsx +9 -50
- package/src/v2/components/inline-input-v2.css +225 -0
- package/src/v2/components/inline-input-v2.tsx +107 -0
- package/src/{data-display/keybind/keybind.css → v2/components/keybind-v2.css} +1 -1
- package/src/{data-display/keybind/keybind.tsx → v2/components/keybind-v2.tsx} +3 -3
- package/src/{data-display/line-comment/line-comment.css → v2/components/line-comment-v2.css} +3 -3
- package/src/{data-display/line-comment/line-comment.tsx → v2/components/line-comment-v2.tsx} +15 -17
- package/src/{feedback/loader/loader.tsx → v2/components/loader-v2.tsx} +2 -2
- package/src/{navigation/menu/menu.css → v2/components/menu-v2.css} +2 -122
- package/src/{navigation/menu/menu.tsx → v2/components/menu-v2.tsx} +32 -96
- package/src/v2/components/progress-circle-v2.css +13 -0
- package/src/v2/components/progress-circle-v2.tsx +52 -0
- package/src/{data-display/project-avatar/project-avatar.tsx → v2/components/project-avatar-v2.tsx} +1 -1
- package/src/{forms/radio/radio.tsx → v2/components/radio-v2.tsx} +20 -30
- package/src/{navigation/segmented-control/segmented-control.css → v2/components/segmented-control-v2.css} +1 -1
- package/src/{navigation/segmented-control/segmented-control.tsx → v2/components/segmented-control-v2.tsx} +8 -9
- package/src/{forms/select/select.css → v2/components/select-v2.css} +8 -2
- package/src/{forms/select/select.tsx → v2/components/select-v2.tsx} +32 -38
- package/src/{actions/split-button/split-button.css → v2/components/split-button-v2.css} +6 -1
- package/src/{actions/split-button/split-button.tsx → v2/components/split-button-v2.tsx} +4 -4
- package/src/{forms/switch/switch.css → v2/components/switch-v2.css} +0 -110
- package/src/v2/components/switch-v2.tsx +28 -0
- package/src/{navigation/tabs/tabs-current.css → v2/components/tabs-v2.css} +10 -25
- package/src/v2/components/tabs-v2.tsx +149 -0
- package/src/{forms/text-input/text-input.css → v2/components/text-input-v2.css} +1 -1
- package/src/{forms/text-input/text-input.tsx → v2/components/text-input-v2.tsx} +4 -4
- package/src/v2/components/text-shimmer-v2.css +125 -0
- package/src/v2/components/text-shimmer-v2.tsx +63 -0
- package/src/{forms/textarea/textarea.tsx → v2/components/textarea-v2.tsx} +3 -3
- package/src/{feedback/toast/toast.tsx → v2/components/toast-v2.tsx} +58 -60
- package/src/{overlays/tooltip/tooltip.css → v2/components/tooltip-v2.css} +0 -26
- package/src/{overlays/tooltip/tooltip.tsx → v2/components/tooltip-v2.tsx} +14 -21
- package/src/{typography/wordmark/wordmark.tsx → v2/components/wordmark-v2.tsx} +1 -1
- package/src/{styles/tokens → v2/styles}/theme.css +14 -10
- package/dist/actions/button/button.d.ts +0 -10
- package/dist/actions/icon-button/icon-button.d.ts +0 -11
- package/dist/actions/split-button/split-button.d.ts +0 -5
- package/dist/data-display/badge/badge.d.ts +0 -7
- package/dist/data-display/keybind/keybind.d.ts +0 -7
- package/dist/feedback/loader/loader.d.ts +0 -3
- package/dist/feedback/toast/toast.d.ts +0 -57
- package/dist/forms/radio/radio.d.ts +0 -16
- package/dist/forms/textarea/textarea.d.ts +0 -7
- package/dist/i18n/he.d.ts +0 -197
- package/dist/layout/divider/divider.d.ts +0 -5
- package/dist/navigation/menu/menu.d.ts +0 -59
- package/dist/overlays/tooltip/tooltip.d.ts +0 -15
- package/dist/typography/wordmark/wordmark.d.ts +0 -2
- package/src/actions/icon-button/icon-button.tsx +0 -32
- package/src/feedback/progress-circle/progress-circle.css +0 -28
- package/src/feedback/progress-circle/progress-circle.tsx +0 -64
- package/src/forms/switch/switch.tsx +0 -34
- package/src/i18n/he.ts +0 -199
- package/src/icons/icon/icon.css +0 -3
- package/src/navigation/tabs/tabs.tsx +0 -194
- /package/dist/{forms/inline-input → components}/inline-input.d.ts +0 -0
- /package/dist/{navigation → v2/components}/tab-state-indicator.d.ts +0 -0
- /package/src/{forms/inline-input → components}/inline-input.css +0 -0
- /package/src/{forms/inline-input → components}/inline-input.tsx +0 -0
- /package/src/{data-display/avatar/avatar.css → v2/components/avatar-v2.css} +0 -0
- /package/src/{actions/button/button.css → v2/components/button-v2.css} +0 -0
- /package/src/{layout/divider/divider.css → v2/components/divider-v2.css} +0 -0
- /package/src/{styles/file-tree.css → v2/components/file-tree-v2.css} +0 -0
- /package/src/{actions/icon-button/icon-button.css → v2/components/icon-button-v2.css} +0 -0
- /package/src/{feedback/loader/loader.css → v2/components/loader-v2.css} +0 -0
- /package/src/{data-display/project-avatar/project-avatar.css → v2/components/project-avatar-v2.css} +0 -0
- /package/src/{forms/radio/radio.css → v2/components/radio-v2.css} +0 -0
- /package/src/{navigation → v2/components}/tab-state-indicator.tsx +0 -0
- /package/src/{forms/textarea/textarea.css → v2/components/textarea-v2.css} +0 -0
- /package/src/{feedback/toast/toast.css → v2/components/toast-v2.css} +0 -0
- /package/src/{styles/tokens → v2/styles}/colors.css +0 -0
- /package/src/{styles/tokens/index.css → v2/styles/tailwind.css} +0 -0
package/src/i18n/tk.ts
CHANGED
|
@@ -69,7 +69,7 @@ export const dict: Record<string, string> = {
|
|
|
69
69
|
"ui.sessionTurn.error.addCredits": "Karz goşuň",
|
|
70
70
|
"dialog.usageExceeded.freeTier.title": "Mugt çäk ýetdi",
|
|
71
71
|
"dialog.usageExceeded.freeTier.description":
|
|
72
|
-
"Iň oňat açyk çeşme modellerine ygtybarly girmek üçin aýda
|
|
72
|
+
"Iň oňat açyk çeşme modellerine ygtybarly girmek üçin aýda 10 $ töläp, OpenCode Go-a ýazylyň.",
|
|
73
73
|
"dialog.usageExceeded.freeTier.actionLabel": "Abuna ýazylyň",
|
|
74
74
|
"dialog.usageExceeded.accountRateLimit.title": "Çäklendirildi",
|
|
75
75
|
"dialog.usageExceeded.accountRateLimit.description":
|
|
@@ -143,6 +143,8 @@ export const dict: Record<string, string> = {
|
|
|
143
143
|
"ui.tool.websearch.provider": "{{provider}} Web gözlegi",
|
|
144
144
|
"ui.tool.shell": "Shell",
|
|
145
145
|
"ui.tool.patch": "Patch",
|
|
146
|
+
"ui.tool.todos": "Edilmeli işler",
|
|
147
|
+
"ui.tool.todos.read": "Edilmeli zatlary okaň",
|
|
146
148
|
"ui.tool.questions": "Soraglar",
|
|
147
149
|
"ui.tool.questions.numbered": "Soraglar {{number}}",
|
|
148
150
|
"ui.tool.agent": "{{type}} Agenti",
|
package/src/i18n/tr.ts
CHANGED
|
@@ -79,7 +79,7 @@ export const dict = {
|
|
|
79
79
|
|
|
80
80
|
"dialog.usageExceeded.freeTier.title": "Ücretsiz sınıra ulaşıldı",
|
|
81
81
|
"dialog.usageExceeded.freeTier.description":
|
|
82
|
-
"En iyi açık kaynaklı modellere güvenilir erişim için OpenCode Go'ya abone olun.
|
|
82
|
+
"En iyi açık kaynaklı modellere güvenilir erişim için aylık $10 karşılığında OpenCode Go'ya abone olun.",
|
|
83
83
|
"dialog.usageExceeded.freeTier.actionLabel": "Abone ol",
|
|
84
84
|
"dialog.usageExceeded.accountRateLimit.title": "Go sınırına ulaşıldı",
|
|
85
85
|
"dialog.usageExceeded.accountRateLimit.description":
|
|
@@ -157,6 +157,8 @@ export const dict = {
|
|
|
157
157
|
"ui.tool.websearch.provider": "{{provider}} Web araması",
|
|
158
158
|
"ui.tool.shell": "Kabuk",
|
|
159
159
|
"ui.tool.patch": "Yama",
|
|
160
|
+
"ui.tool.todos": "Görevler",
|
|
161
|
+
"ui.tool.todos.read": "Görevleri oku",
|
|
160
162
|
"ui.tool.questions": "Sorular",
|
|
161
163
|
"ui.tool.questions.numbered": "Sorular {{number}}",
|
|
162
164
|
"ui.tool.agent": "{{type}} ajanı",
|
package/src/i18n/uk.ts
CHANGED
|
@@ -77,7 +77,7 @@ export const dict: Record<string, string> = {
|
|
|
77
77
|
|
|
78
78
|
"dialog.usageExceeded.freeTier.title": "Безкоштовний ліміт вичерпано",
|
|
79
79
|
"dialog.usageExceeded.freeTier.description":
|
|
80
|
-
"Підпишіться на OpenCode Go для надійного доступу до найкращих моделей із відкритим
|
|
80
|
+
"Підпишіться на OpenCode Go за $10 на місяць для надійного доступу до найкращих моделей із відкритим кодом.",
|
|
81
81
|
"dialog.usageExceeded.freeTier.actionLabel": "Підписатися",
|
|
82
82
|
"dialog.usageExceeded.accountRateLimit.title": "Ліміт Go вичерпано",
|
|
83
83
|
"dialog.usageExceeded.accountRateLimit.description":
|
|
@@ -167,6 +167,8 @@ export const dict: Record<string, string> = {
|
|
|
167
167
|
"ui.tool.websearch.provider": "{{provider}} Веб-пошук",
|
|
168
168
|
"ui.tool.shell": "Оболонка",
|
|
169
169
|
"ui.tool.patch": "Патч",
|
|
170
|
+
"ui.tool.todos": "Завдання",
|
|
171
|
+
"ui.tool.todos.read": "Читати завдання",
|
|
170
172
|
"ui.tool.questions": "Запитання",
|
|
171
173
|
"ui.tool.questions.numbered": "Запитання {{number}}",
|
|
172
174
|
"ui.tool.agent": "Агент {{type}}",
|
package/src/i18n/ur.ts
CHANGED
|
@@ -70,7 +70,7 @@ export const dict: Record<string, string> = {
|
|
|
70
70
|
"ui.sessionTurn.error.addCredits": "کریڈٹ شامل کریں۔",
|
|
71
71
|
"dialog.usageExceeded.freeTier.title": "مفت استعمال کی حد پوری ہو گئی",
|
|
72
72
|
"dialog.usageExceeded.freeTier.description":
|
|
73
|
-
"$
|
|
73
|
+
"$10/ماہ میں بہترین اوپن سورس ماڈلز تک قابل اعتماد رسائی کے لیے OpenCode Go کو سبسکرائب کریں۔",
|
|
74
74
|
"dialog.usageExceeded.freeTier.actionLabel": "سبسکرائب کریں۔",
|
|
75
75
|
"dialog.usageExceeded.accountRateLimit.title": "Go حد تک پہنچ گئی۔",
|
|
76
76
|
"dialog.usageExceeded.accountRateLimit.description":
|
|
@@ -144,6 +144,8 @@ export const dict: Record<string, string> = {
|
|
|
144
144
|
"ui.tool.websearch.provider": "{{provider}} ویب تلاش",
|
|
145
145
|
"ui.tool.shell": "شیل",
|
|
146
146
|
"ui.tool.patch": "پیچ",
|
|
147
|
+
"ui.tool.todos": "زیر التوا کام",
|
|
148
|
+
"ui.tool.todos.read": "زیر التوا کام پڑھیں",
|
|
147
149
|
"ui.tool.questions": "سوالات",
|
|
148
150
|
"ui.tool.questions.numbered": "سوالات {{number}}",
|
|
149
151
|
"ui.tool.agent": "{{type}} ایجنٹ",
|
package/src/i18n/uz.ts
CHANGED
|
@@ -71,7 +71,7 @@ export const dict: Record<string, string> = {
|
|
|
71
71
|
"ui.sessionTurn.error.addCredits": "Kredit qo'shing",
|
|
72
72
|
"dialog.usageExceeded.freeTier.title": "Bepul chegaraga yetdi",
|
|
73
73
|
"dialog.usageExceeded.freeTier.description":
|
|
74
|
-
"Oyiga $
|
|
74
|
+
"Oyiga $10 evaziga eng yaxshi ochiq kodli modellarga ishonchli kirish uchun OpenCode Go ga obuna bo'ling.",
|
|
75
75
|
"dialog.usageExceeded.freeTier.actionLabel": "Obuna boʻling",
|
|
76
76
|
"dialog.usageExceeded.accountRateLimit.title": "Oʻtish chegarasiga yetdi",
|
|
77
77
|
"dialog.usageExceeded.accountRateLimit.description":
|
|
@@ -146,6 +146,8 @@ export const dict: Record<string, string> = {
|
|
|
146
146
|
"ui.tool.websearch.provider": "{{provider}} veb-qidiruv",
|
|
147
147
|
"ui.tool.shell": "Shell",
|
|
148
148
|
"ui.tool.patch": "Yamoq",
|
|
149
|
+
"ui.tool.todos": "Vazifalar",
|
|
150
|
+
"ui.tool.todos.read": "Vazifalarni o'qing",
|
|
149
151
|
"ui.tool.questions": "Savollar",
|
|
150
152
|
"ui.tool.questions.numbered": "Savollar {{number}}",
|
|
151
153
|
"ui.tool.agent": "{{type}} agenti",
|
package/src/i18n/vi.ts
CHANGED
|
@@ -69,7 +69,7 @@ export const dict: Record<string, string> = {
|
|
|
69
69
|
"ui.sessionTurn.error.addCredits": "Thêm số dư",
|
|
70
70
|
"dialog.usageExceeded.freeTier.title": "Đã đạt đến giới hạn miễn phí",
|
|
71
71
|
"dialog.usageExceeded.freeTier.description":
|
|
72
|
-
"Đăng ký OpenCode Go để có quyền truy cập đáng tin cậy vào các mô hình nguồn mở tốt nhất
|
|
72
|
+
"Đăng ký OpenCode Go với giá $10/tháng để có quyền truy cập đáng tin cậy vào các mô hình nguồn mở tốt nhất.",
|
|
73
73
|
"dialog.usageExceeded.freeTier.actionLabel": "Đăng ký",
|
|
74
74
|
"dialog.usageExceeded.accountRateLimit.title": "Đã đạt giới hạn Go",
|
|
75
75
|
"dialog.usageExceeded.accountRateLimit.description":
|
|
@@ -143,6 +143,8 @@ export const dict: Record<string, string> = {
|
|
|
143
143
|
"ui.tool.websearch.provider": "{{provider}} Tìm kiếm trên web",
|
|
144
144
|
"ui.tool.shell": "Shell",
|
|
145
145
|
"ui.tool.patch": "Bản vá",
|
|
146
|
+
"ui.tool.todos": "Việc cần làm",
|
|
147
|
+
"ui.tool.todos.read": "Đọc việc cần làm",
|
|
146
148
|
"ui.tool.questions": "Câu hỏi",
|
|
147
149
|
"ui.tool.questions.numbered": "Câu hỏi {{number}}",
|
|
148
150
|
"ui.tool.agent": "Tác nhân {{type}}",
|
package/src/i18n/zh.ts
CHANGED
|
@@ -76,7 +76,7 @@ export const dict = {
|
|
|
76
76
|
"ui.sessionTurn.error.addCredits": "充值",
|
|
77
77
|
|
|
78
78
|
"dialog.usageExceeded.freeTier.title": "免费额度已用完",
|
|
79
|
-
"dialog.usageExceeded.freeTier.description": "订阅 OpenCode Go
|
|
79
|
+
"dialog.usageExceeded.freeTier.description": "每月 $10 订阅 OpenCode Go,可靠地使用最佳开源模型。",
|
|
80
80
|
"dialog.usageExceeded.freeTier.actionLabel": "订阅",
|
|
81
81
|
"dialog.usageExceeded.accountRateLimit.title": "Go 额度已用完",
|
|
82
82
|
"dialog.usageExceeded.accountRateLimit.description": "使用额度已达上限。如需立即继续使用此模型,请启用余额付费",
|
|
@@ -153,6 +153,8 @@ export const dict = {
|
|
|
153
153
|
"ui.tool.websearch.provider": "{{provider}} 网页搜索",
|
|
154
154
|
"ui.tool.shell": "Shell",
|
|
155
155
|
"ui.tool.patch": "补丁",
|
|
156
|
+
"ui.tool.todos": "待办",
|
|
157
|
+
"ui.tool.todos.read": "读取待办",
|
|
156
158
|
"ui.tool.questions": "问题",
|
|
157
159
|
"ui.tool.questions.numbered": "问题 {{number}}",
|
|
158
160
|
"ui.tool.agent": "{{type}} 智能体",
|
package/src/i18n/zht.ts
CHANGED
|
@@ -76,7 +76,7 @@ export const dict = {
|
|
|
76
76
|
"ui.sessionTurn.error.addCredits": "新增點數",
|
|
77
77
|
|
|
78
78
|
"dialog.usageExceeded.freeTier.title": "已達免費額度上限",
|
|
79
|
-
"dialog.usageExceeded.freeTier.description": "訂閱 OpenCode Go
|
|
79
|
+
"dialog.usageExceeded.freeTier.description": "每月 $10 訂閱 OpenCode Go,可靠地使用最佳開源模型。",
|
|
80
80
|
"dialog.usageExceeded.freeTier.actionLabel": "訂閱",
|
|
81
81
|
"dialog.usageExceeded.accountRateLimit.title": "已達 Go 額度上限",
|
|
82
82
|
"dialog.usageExceeded.accountRateLimit.description": "已達使用額度上限。若要立即繼續使用此模型,請啟用可用餘額計費",
|
|
@@ -153,6 +153,8 @@ export const dict = {
|
|
|
153
153
|
"ui.tool.websearch.provider": "{{provider}} 網頁搜尋",
|
|
154
154
|
"ui.tool.shell": "Shell",
|
|
155
155
|
"ui.tool.patch": "修補",
|
|
156
|
+
"ui.tool.todos": "待辦",
|
|
157
|
+
"ui.tool.todos.read": "讀取待辦",
|
|
156
158
|
"ui.tool.questions": "問題",
|
|
157
159
|
"ui.tool.questions.numbered": "問題 {{number}}",
|
|
158
160
|
"ui.tool.agent": "{{type}} 代理程式",
|
package/src/styles/index.css
CHANGED
|
@@ -6,31 +6,47 @@
|
|
|
6
6
|
@import "./base.css" layer(base);
|
|
7
7
|
@import "katex/dist/katex.min.css" layer(base);
|
|
8
8
|
|
|
9
|
-
@import "../
|
|
9
|
+
@import "../components/accordion.css" layer(components);
|
|
10
10
|
@import "../components/animated-number.css" layer(components);
|
|
11
11
|
@import "../components/app-icon.css" layer(components);
|
|
12
|
+
@import "../components/avatar.css" layer(components);
|
|
13
|
+
@import "../components/button.css" layer(components);
|
|
12
14
|
@import "../components/card.css" layer(components);
|
|
13
|
-
@import "../
|
|
15
|
+
@import "../components/checkbox.css" layer(components);
|
|
14
16
|
@import "../components/collapsible.css" layer(components);
|
|
17
|
+
@import "../components/diff-changes.css" layer(components);
|
|
15
18
|
@import "../components/context-menu.css" layer(components);
|
|
19
|
+
@import "../components/dropdown-menu.css" layer(components);
|
|
20
|
+
@import "../components/dialog.css" layer(components);
|
|
16
21
|
@import "../components/file-icon.css" layer(components);
|
|
17
22
|
@import "../components/hover-card.css" layer(components);
|
|
18
23
|
@import "../components/provider-icon.css" layer(components);
|
|
19
24
|
@import "../components/dock-surface.css" layer(components);
|
|
25
|
+
@import "../components/icon.css" layer(components);
|
|
26
|
+
@import "../components/icon-button.css" layer(components);
|
|
20
27
|
@import "../components/image-preview.css" layer(components);
|
|
21
|
-
@import "../
|
|
28
|
+
@import "../components/keybind.css" layer(components);
|
|
22
29
|
@import "../components/text-field.css" layer(components);
|
|
30
|
+
@import "../components/inline-input.css" layer(components);
|
|
23
31
|
@import "../components/list.css" layer(components);
|
|
24
32
|
@import "../components/logo.css" layer(components);
|
|
25
33
|
@import "../components/popover.css" layer(components);
|
|
26
34
|
@import "../components/progress.css" layer(components);
|
|
35
|
+
@import "../components/progress-circle.css" layer(components);
|
|
36
|
+
@import "../components/radio-group.css" layer(components);
|
|
27
37
|
@import "../components/resize-handle.css" layer(components);
|
|
38
|
+
@import "../components/select.css" layer(components);
|
|
28
39
|
@import "../components/spinner.css" layer(components);
|
|
40
|
+
@import "../components/switch.css" layer(components);
|
|
29
41
|
@import "../components/scroll-view.css" layer(components);
|
|
30
42
|
@import "../components/sticky-accordion-header.css" layer(components);
|
|
31
|
-
@import "../
|
|
43
|
+
@import "../components/tabs.css" layer(components);
|
|
44
|
+
@import "../components/tag.css" layer(components);
|
|
32
45
|
@import "../components/text-reveal.css" layer(components);
|
|
33
46
|
@import "../components/text-strikethrough.css" layer(components);
|
|
47
|
+
@import "../components/text-shimmer.css" layer(components);
|
|
48
|
+
@import "../components/toast.css" layer(components);
|
|
49
|
+
@import "../components/tooltip.css" layer(components);
|
|
34
50
|
@import "../components/typewriter.css" layer(components);
|
|
35
51
|
|
|
36
52
|
@import "./utilities.css" layer(utilities);
|
|
@@ -252,7 +252,6 @@
|
|
|
252
252
|
--color-v2-text-text-code-accent: var(--v2-text-text-code-accent);
|
|
253
253
|
--color-v2-icon-icon-base: var(--v2-icon-icon-base);
|
|
254
254
|
--color-v2-icon-icon-muted: var(--v2-icon-icon-muted);
|
|
255
|
-
--color-v2-icon-icon-faint: var(--v2-icon-icon-faint);
|
|
256
255
|
--color-v2-icon-icon-inverse: var(--v2-icon-icon-inverse);
|
|
257
256
|
--color-v2-icon-icon-contrast: var(--v2-icon-icon-contrast);
|
|
258
257
|
--color-v2-icon-icon-accent: var(--v2-icon-icon-accent);
|
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
@layer theme, base, components, utilities;
|
|
2
2
|
|
|
3
3
|
@import "tailwindcss/theme.css" layer(theme);
|
|
4
|
-
@import "tailwindcss/utilities.css" layer(utilities) source(
|
|
5
|
-
@source "../../../../app/src";
|
|
6
|
-
@source "../../../../app/index.html";
|
|
7
|
-
@source not "../../../../app/src/i18n";
|
|
8
|
-
@source not "../../../../app/src/**/*.test.{ts,tsx}";
|
|
9
|
-
@source "../../../../desktop/src/renderer";
|
|
10
|
-
@source not "../../../../desktop/src/renderer/**/*.test.{ts,tsx}";
|
|
11
|
-
@source "../../../../enterprise/src";
|
|
12
|
-
@source "../../../../session-ui/src";
|
|
13
|
-
@source not "../../../../session-ui/src/**/*.test.{ts,tsx}";
|
|
14
|
-
@source "../../../../storybook";
|
|
15
|
-
@source "../../../src";
|
|
16
|
-
@source not "../../../src/assets";
|
|
17
|
-
@source not "../../../src/i18n";
|
|
18
|
-
@source not "../../../src/**/*.test.{ts,tsx}";
|
|
4
|
+
@import "tailwindcss/utilities.css" layer(utilities) source("../../../../");
|
|
19
5
|
@import "./utilities.css";
|
|
20
6
|
|
|
21
7
|
@import "../index.css";
|
|
@@ -65,9 +51,6 @@
|
|
|
65
51
|
--leading-lg: var(--line-height-large);
|
|
66
52
|
--leading-xl: var(--line-height-x-large);
|
|
67
53
|
--leading-2xl: var(--line-height-2x-large);
|
|
68
|
-
--leading-text-tight: var(--line-height-tight);
|
|
69
|
-
--leading-text-compact: var(--line-height-compact);
|
|
70
|
-
--leading-text-base: var(--line-height-base);
|
|
71
54
|
|
|
72
55
|
--tracking-normal: var(--letter-spacing-normal);
|
|
73
56
|
--tracking-tight: var(--letter-spacing-tight);
|
package/src/styles/theme.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--font-family-sans:
|
|
2
|
+
--font-family-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
3
3
|
--font-family-sans--font-feature-settings: normal;
|
|
4
4
|
--font-family-mono:
|
|
5
|
-
|
|
5
|
+
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
6
6
|
--font-family-mono--font-feature-settings: normal;
|
|
7
7
|
|
|
8
8
|
--font-size-small: 13px;
|
package/src/theme/context.tsx
CHANGED
|
@@ -84,9 +84,8 @@ const names: Record<string, string> = {
|
|
|
84
84
|
}
|
|
85
85
|
const oc2Theme = oc2ThemeJson as DesktopTheme
|
|
86
86
|
|
|
87
|
-
function
|
|
88
|
-
|
|
89
|
-
return "oc-2"
|
|
87
|
+
function normalize(id: string | null | undefined) {
|
|
88
|
+
return id === "oc-1" ? "oc-2" : id
|
|
90
89
|
}
|
|
91
90
|
|
|
92
91
|
function read(key: string) {
|
|
@@ -178,12 +177,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|
|
178
177
|
defaultTheme?: string
|
|
179
178
|
onThemeApplied?: (theme: DesktopTheme, mode: "light" | "dark", scheme: ColorScheme) => void
|
|
180
179
|
}) => {
|
|
181
|
-
const
|
|
182
|
-
const themeId = resolveStoredTheme(rawTheme)
|
|
183
|
-
if (rawTheme && rawTheme !== themeId) {
|
|
184
|
-
write(STORAGE_KEYS.THEME_ID, themeId)
|
|
185
|
-
clear()
|
|
186
|
-
}
|
|
180
|
+
const themeId = normalize(read(STORAGE_KEYS.THEME_ID) ?? props.defaultTheme) ?? "oc-2"
|
|
187
181
|
const colorScheme = (read(STORAGE_KEYS.COLOR_SCHEME) as ColorScheme | null) ?? "system"
|
|
188
182
|
const mode = colorScheme === "system" ? getSystemMode() : colorScheme
|
|
189
183
|
const [store, setStore] = createStore({
|
|
@@ -200,7 +194,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|
|
200
194
|
const loads = new Map<string, Promise<DesktopTheme | undefined>>()
|
|
201
195
|
|
|
202
196
|
const load = (id: string) => {
|
|
203
|
-
const next = id
|
|
197
|
+
const next = normalize(id)
|
|
204
198
|
if (!next) return Promise.resolve(undefined)
|
|
205
199
|
const hit = store.themes[next]
|
|
206
200
|
if (hit) return Promise.resolve(hit)
|
|
@@ -239,11 +233,9 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|
|
239
233
|
|
|
240
234
|
const onStorage = (e: StorageEvent) => {
|
|
241
235
|
if (e.key === STORAGE_KEYS.THEME_ID && e.newValue) {
|
|
242
|
-
const next =
|
|
243
|
-
if (next
|
|
244
|
-
|
|
245
|
-
clear()
|
|
246
|
-
}
|
|
236
|
+
const next = normalize(e.newValue)
|
|
237
|
+
if (!next) return
|
|
238
|
+
if (next !== "oc-2" && !knownThemes().has(next) && !store.themes[next]) return
|
|
247
239
|
setStore("themeId", next)
|
|
248
240
|
if (next === "oc-2") {
|
|
249
241
|
clear()
|
|
@@ -270,8 +262,8 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|
|
270
262
|
}
|
|
271
263
|
makeEventListener(mediaQuery, "change", onMedia)
|
|
272
264
|
|
|
273
|
-
const rawTheme = read(STORAGE_KEYS.THEME_ID)
|
|
274
|
-
const savedTheme =
|
|
265
|
+
const rawTheme = read(STORAGE_KEYS.THEME_ID)
|
|
266
|
+
const savedTheme = normalize(rawTheme ?? props.defaultTheme) ?? "oc-2"
|
|
275
267
|
const savedScheme = (read(STORAGE_KEYS.COLOR_SCHEME) as ColorScheme | null) ?? "system"
|
|
276
268
|
if (rawTheme && rawTheme !== savedTheme) {
|
|
277
269
|
write(STORAGE_KEYS.THEME_ID, savedTheme)
|
|
@@ -293,7 +285,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|
|
293
285
|
})
|
|
294
286
|
|
|
295
287
|
const setTheme = (id: string) => {
|
|
296
|
-
const next = id
|
|
288
|
+
const next = normalize(id)
|
|
297
289
|
if (!next) {
|
|
298
290
|
console.warn(`Theme "${id}" not found`)
|
|
299
291
|
return
|
|
@@ -333,7 +325,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|
|
333
325
|
setColorScheme,
|
|
334
326
|
registerTheme: (theme: DesktopTheme) => setStore("themes", theme.id, theme),
|
|
335
327
|
previewTheme: (id: string) => {
|
|
336
|
-
const next = id
|
|
328
|
+
const next = normalize(id)
|
|
337
329
|
if (!next) return
|
|
338
330
|
if (next !== "oc-2" && !knownThemes().has(next) && !store.themes[next]) return
|
|
339
331
|
setStore("previewThemeId", next)
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"border-weak-base": "#DBDBDB",
|
|
26
26
|
"border-weaker-base": "#E8E8E8",
|
|
27
27
|
"icon-base": "#8F8F8F",
|
|
28
|
-
"icon-weak-base": "C7C7C7",
|
|
28
|
+
"icon-weak-base": "#C7C7C7",
|
|
29
29
|
"surface-raised-base": "#F3F3F3",
|
|
30
30
|
"surface-raised-base-hover": "#EDEDED",
|
|
31
31
|
"surface-base": "#F8F8F8",
|
|
@@ -176,7 +176,6 @@
|
|
|
176
176
|
"v2-text-text-code-accent": "var(--v2-blue-900)",
|
|
177
177
|
"v2-icon-icon-base": "var(--v2-grey-800)",
|
|
178
178
|
"v2-icon-icon-muted": "var(--v2-grey-600)",
|
|
179
|
-
"v2-icon-icon-faint": "var(--v2-grey-500)",
|
|
180
179
|
"v2-icon-icon-inverse": "var(--v2-grey-50)",
|
|
181
180
|
"v2-icon-icon-contrast": "var(--v2-grey-100)",
|
|
182
181
|
"v2-icon-icon-accent": "var(--v2-blue-600)",
|
|
@@ -412,7 +411,6 @@
|
|
|
412
411
|
"v2-text-text-code-accent": "var(--v2-blue-400)",
|
|
413
412
|
"v2-icon-icon-base": "var(--v2-grey-400)",
|
|
414
413
|
"v2-icon-icon-muted": "var(--v2-grey-600)",
|
|
415
|
-
"v2-icon-icon-faint": "var(--v2-grey-500)",
|
|
416
414
|
"v2-icon-icon-inverse": "var(--v2-grey-1100)",
|
|
417
415
|
"v2-icon-icon-contrast": "var(--v2-grey-100)",
|
|
418
416
|
"v2-icon-icon-accent": "var(--v2-blue-400)",
|
|
@@ -52,7 +52,6 @@ export function mapV2Foreground(
|
|
|
52
52
|
"v2-text-text-faint": shift(body, { l: isDark ? -0.2 : 0.21, c: isDark ? 0.78 : 0.72 }),
|
|
53
53
|
"v2-icon-icon-base": greyRef(pickGrey(primitives, bgBase, 7, isDark ? 400 : 800)),
|
|
54
54
|
"v2-icon-icon-muted": greyRef(pickGrey(primitives, bgBase, 3, 600)),
|
|
55
|
-
"v2-icon-icon-faint": greyRef(pickGrey(primitives, bgBase, 1.5, 500)),
|
|
56
55
|
"v2-icon-icon-inverse": greyRef(pickGrey(primitives, bgInverse, 7, inverseTarget)),
|
|
57
56
|
"v2-icon-icon-contrast": greyRef(pickGrey(primitives, bgContrast, 7, 100)),
|
|
58
57
|
"v2-icon-icon-accent": isDark ? "var(--v2-blue-400)" : "var(--v2-blue-600)",
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
[data-component="accordion-v2"] {
|
|
2
|
+
--accordion-v2-fg: var(--v2-text-text-base);
|
|
3
|
+
--accordion-v2-icon: var(--v2-icon-icon-base);
|
|
4
|
+
--accordion-v2-border: var(--v2-border-border-strong);
|
|
5
|
+
--accordion-v2-bg: var(--v2-background-bg-base);
|
|
6
|
+
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: stretch;
|
|
11
|
+
|
|
12
|
+
width: 100%;
|
|
13
|
+
background: var(--accordion-v2-bg);
|
|
14
|
+
border-radius: 6px;
|
|
15
|
+
box-shadow: 0 0 0 0.5px var(--accordion-v2-border);
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
|
|
18
|
+
color: var(--accordion-v2-fg);
|
|
19
|
+
|
|
20
|
+
-webkit-font-smoothing: antialiased;
|
|
21
|
+
-moz-osx-font-smoothing: grayscale;
|
|
22
|
+
text-rendering: geometricPrecision;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[data-component="accordion-v2-item"] {
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
align-items: stretch;
|
|
30
|
+
width: 100%;
|
|
31
|
+
background: var(--accordion-v2-bg);
|
|
32
|
+
box-shadow: inset 0 -0.5px 0 var(--accordion-v2-border);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[data-component="accordion-v2-item"]:last-child {
|
|
36
|
+
box-shadow: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
[data-slot="accordion-v2-header"] {
|
|
40
|
+
display: flex;
|
|
41
|
+
margin: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[data-component="accordion-v2-trigger"] {
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: row;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: 4px;
|
|
50
|
+
|
|
51
|
+
width: 100%;
|
|
52
|
+
min-height: 30px;
|
|
53
|
+
padding: 0 12px;
|
|
54
|
+
|
|
55
|
+
background: transparent;
|
|
56
|
+
border: 0;
|
|
57
|
+
outline: none;
|
|
58
|
+
cursor: default;
|
|
59
|
+
user-select: none;
|
|
60
|
+
|
|
61
|
+
font-size: 13px;
|
|
62
|
+
font-weight: 440;
|
|
63
|
+
line-height: 100%;
|
|
64
|
+
letter-spacing: -0.04px;
|
|
65
|
+
color: var(--accordion-v2-fg);
|
|
66
|
+
text-align: left;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[data-component="accordion-v2-trigger"] [data-slot="accordion-v2-trigger-content"] {
|
|
70
|
+
display: flex;
|
|
71
|
+
flex: 1 1 auto;
|
|
72
|
+
flex-direction: row;
|
|
73
|
+
align-items: center;
|
|
74
|
+
gap: 8px;
|
|
75
|
+
min-width: 0;
|
|
76
|
+
height: 30px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[data-component="accordion-v2-trigger"] [data-slot="accordion-v2-chevron"] {
|
|
80
|
+
flex: none;
|
|
81
|
+
width: 14px;
|
|
82
|
+
height: 14px;
|
|
83
|
+
color: var(--accordion-v2-icon);
|
|
84
|
+
transition: transform 150ms ease;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
[data-component="accordion-v2-trigger"][data-expanded] [data-slot="accordion-v2-chevron"] {
|
|
88
|
+
transform: rotate(180deg);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
[data-component="accordion-v2-item"][data-expanded] [data-component="accordion-v2-trigger"] {
|
|
92
|
+
box-shadow: inset 0 -0.5px 0 var(--accordion-v2-border);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
[data-component="accordion-v2-trigger"][data-disabled] {
|
|
96
|
+
pointer-events: none;
|
|
97
|
+
opacity: 0.5;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[data-component="accordion-v2-content"] {
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
font-size: 13px;
|
|
103
|
+
line-height: 140%;
|
|
104
|
+
color: var(--accordion-v2-fg);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
[data-component="accordion-v2-content"][data-expanded] {
|
|
108
|
+
animation: accordion-v2-down 180ms ease-out;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
[data-component="accordion-v2-content"][data-closed] {
|
|
112
|
+
animation: accordion-v2-up 180ms ease-out;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[data-component="accordion-v2-content"] [data-slot="accordion-v2-content-inner"] {
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: row;
|
|
118
|
+
align-items: flex-start;
|
|
119
|
+
width: 100%;
|
|
120
|
+
padding: 12px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@keyframes accordion-v2-down {
|
|
124
|
+
from {
|
|
125
|
+
height: 0;
|
|
126
|
+
}
|
|
127
|
+
to {
|
|
128
|
+
height: var(--kb-collapsible-content-height);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@keyframes accordion-v2-up {
|
|
133
|
+
from {
|
|
134
|
+
height: var(--kb-collapsible-content-height);
|
|
135
|
+
}
|
|
136
|
+
to {
|
|
137
|
+
height: 0;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Accordion as Kobalte } from "@kobalte/core/accordion"
|
|
2
|
+
import { Show, splitProps, type Component, type ComponentProps, type ParentProps } from "solid-js"
|
|
3
|
+
import "./accordion-v2.css"
|
|
4
|
+
|
|
5
|
+
const ChevronDown: Component = () => (
|
|
6
|
+
<svg
|
|
7
|
+
data-slot="accordion-v2-chevron"
|
|
8
|
+
width="14"
|
|
9
|
+
height="14"
|
|
10
|
+
viewBox="0 0 14 14"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
aria-hidden="true"
|
|
14
|
+
>
|
|
15
|
+
<path d="M4 5.5L7 8.5L10 5.5" stroke="currentColor" />
|
|
16
|
+
</svg>
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
export interface AccordionV2Props extends ComponentProps<typeof Kobalte> {}
|
|
20
|
+
export interface AccordionV2ItemProps extends ComponentProps<typeof Kobalte.Item> {}
|
|
21
|
+
export interface AccordionV2HeaderProps extends ComponentProps<typeof Kobalte.Header> {}
|
|
22
|
+
export interface AccordionV2TriggerProps extends ComponentProps<typeof Kobalte.Trigger> {
|
|
23
|
+
hideChevron?: boolean
|
|
24
|
+
}
|
|
25
|
+
export interface AccordionV2ContentProps extends ComponentProps<typeof Kobalte.Content> {}
|
|
26
|
+
|
|
27
|
+
function AccordionV2Root(props: ParentProps<AccordionV2Props>) {
|
|
28
|
+
const [s, r] = splitProps(props, ["class", "classList"])
|
|
29
|
+
return <Kobalte {...r} data-component="accordion-v2" classList={{ ...s.classList, [s.class ?? ""]: !!s.class }} />
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function AccordionV2Item(props: ParentProps<AccordionV2ItemProps>) {
|
|
33
|
+
const [s, r] = splitProps(props, ["class", "classList"])
|
|
34
|
+
return (
|
|
35
|
+
<Kobalte.Item
|
|
36
|
+
{...r}
|
|
37
|
+
data-component="accordion-v2-item"
|
|
38
|
+
classList={{ ...s.classList, [s.class ?? ""]: !!s.class }}
|
|
39
|
+
/>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function AccordionV2Header(props: ParentProps<AccordionV2HeaderProps>) {
|
|
44
|
+
const [s, r] = splitProps(props, ["class", "classList", "children"])
|
|
45
|
+
return (
|
|
46
|
+
<Kobalte.Header {...r} data-slot="accordion-v2-header" classList={{ ...s.classList, [s.class ?? ""]: !!s.class }}>
|
|
47
|
+
{s.children}
|
|
48
|
+
</Kobalte.Header>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function AccordionV2Trigger(props: ParentProps<AccordionV2TriggerProps>) {
|
|
53
|
+
const [s, r] = splitProps(props, ["class", "classList", "children", "hideChevron"])
|
|
54
|
+
return (
|
|
55
|
+
<Kobalte.Trigger
|
|
56
|
+
{...r}
|
|
57
|
+
data-component="accordion-v2-trigger"
|
|
58
|
+
classList={{ ...s.classList, [s.class ?? ""]: !!s.class }}
|
|
59
|
+
>
|
|
60
|
+
<span data-slot="accordion-v2-trigger-content">{s.children}</span>
|
|
61
|
+
<Show when={!s.hideChevron}>
|
|
62
|
+
<ChevronDown />
|
|
63
|
+
</Show>
|
|
64
|
+
</Kobalte.Trigger>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function AccordionV2Content(props: ParentProps<AccordionV2ContentProps>) {
|
|
69
|
+
const [s, r] = splitProps(props, ["class", "classList", "children"])
|
|
70
|
+
return (
|
|
71
|
+
<Kobalte.Content
|
|
72
|
+
{...r}
|
|
73
|
+
data-component="accordion-v2-content"
|
|
74
|
+
classList={{ ...s.classList, [s.class ?? ""]: !!s.class }}
|
|
75
|
+
>
|
|
76
|
+
<div data-slot="accordion-v2-content-inner">{s.children}</div>
|
|
77
|
+
</Kobalte.Content>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export const AccordionV2 = Object.assign(AccordionV2Root, {
|
|
82
|
+
Item: AccordionV2Item,
|
|
83
|
+
Header: AccordionV2Header,
|
|
84
|
+
Trigger: AccordionV2Trigger,
|
|
85
|
+
Content: AccordionV2Content,
|
|
86
|
+
})
|
|
@@ -31,22 +31,3 @@
|
|
|
31
31
|
background: var(--v2-background-bg-accent);
|
|
32
32
|
color: var(--v2-text-text-contrast);
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
[data-component="tag"][data-appearance="standard"] {
|
|
36
|
-
height: 18px;
|
|
37
|
-
padding: 0 6px;
|
|
38
|
-
border-radius: var(--radius-xs);
|
|
39
|
-
font-family: var(--font-family-sans);
|
|
40
|
-
font-size: var(--font-size-small);
|
|
41
|
-
font-style: normal;
|
|
42
|
-
font-weight: var(--font-weight-medium);
|
|
43
|
-
line-height: var(--line-height-large);
|
|
44
|
-
letter-spacing: var(--letter-spacing-normal);
|
|
45
|
-
font-variant-numeric: normal;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
[data-component="tag"][data-appearance="standard"][data-variant="neutral"] {
|
|
49
|
-
border: 0.5px solid var(--border-weak-base);
|
|
50
|
-
background: var(--surface-raised-base);
|
|
51
|
-
color: var(--text-base);
|
|
52
|
-
}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { type ComponentProps, splitProps } from "solid-js"
|
|
2
|
-
import "./badge.css"
|
|
2
|
+
import "./badge-v2.css"
|
|
3
3
|
|
|
4
|
-
export interface
|
|
5
|
-
appearance?: "standard" | "compact"
|
|
4
|
+
export interface TagProps extends ComponentProps<"span"> {
|
|
6
5
|
variant?: "neutral" | "accent"
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
export function
|
|
10
|
-
const [split, rest] = splitProps(props, ["class", "classList", "children", "
|
|
8
|
+
export function Tag(props: TagProps) {
|
|
9
|
+
const [split, rest] = splitProps(props, ["class", "classList", "children", "variant"])
|
|
11
10
|
return (
|
|
12
11
|
<span
|
|
13
12
|
{...rest}
|
|
14
13
|
data-component="tag"
|
|
15
|
-
data-appearance={split.appearance ?? "compact"}
|
|
16
14
|
data-variant={split.variant ?? "neutral"}
|
|
17
15
|
classList={{
|
|
18
16
|
...split.classList,
|