summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src
diff options
context:
space:
mode:
authoradamelmore <[email protected]>2026-01-27 08:28:55 -0600
committeradamelmore <[email protected]>2026-01-27 08:43:37 -0600
commit099ab929dbfcbe9e167e1afd46487e039e46b1c2 (patch)
tree28540d7a1dd0d4fe480b48668fad359ba75d817a /packages/ui/src
parenteac2d4c6999f79085ac72dd4812125674030ef16 (diff)
downloadopencode-099ab929dbfcbe9e167e1afd46487e039e46b1c2.tar.gz
opencode-099ab929dbfcbe9e167e1afd46487e039e46b1c2.zip
chore(app): cleanup tailwind vs pure css
Diffstat (limited to 'packages/ui/src')
-rw-r--r--packages/ui/src/components/avatar.css8
-rw-r--r--packages/ui/src/components/avatar.tsx2
-rw-r--r--packages/ui/src/components/message-part.css8
-rw-r--r--packages/ui/src/components/message-part.tsx15
-rw-r--r--packages/ui/src/components/session-turn.css4
-rw-r--r--packages/ui/src/components/session-turn.tsx2
-rw-r--r--packages/ui/src/components/tabs.tsx2
-rw-r--r--packages/ui/src/styles/tailwind/utilities.css33
8 files changed, 57 insertions, 17 deletions
diff --git a/packages/ui/src/components/avatar.css b/packages/ui/src/components/avatar.css
index 87be9a50a..587216077 100644
--- a/packages/ui/src/components/avatar.css
+++ b/packages/ui/src/components/avatar.css
@@ -39,3 +39,11 @@
font-size: 1.25rem;
line-height: 2rem;
}
+
+[data-component="avatar"] [data-slot="avatar-image"] {
+ width: 100%;
+ height: 100%;
+ display: block;
+ object-fit: cover;
+ border-radius: inherit;
+}
diff --git a/packages/ui/src/components/avatar.tsx b/packages/ui/src/components/avatar.tsx
index 9d124b56a..76bde1e15 100644
--- a/packages/ui/src/components/avatar.tsx
+++ b/packages/ui/src/components/avatar.tsx
@@ -37,7 +37,7 @@ export function Avatar(props: AvatarProps) {
}}
>
<Show when={src} fallback={split.fallback?.[0]}>
- {(src) => <img src={src()} draggable={false} class="size-full object-cover rounded-[inherit]" />}
+ {(src) => <img src={src()} draggable={false} data-slot="avatar-image" />}
</Show>
</div>
)
diff --git a/packages/ui/src/components/message-part.css b/packages/ui/src/components/message-part.css
index d47a3a79b..56fe9cf41 100644
--- a/packages/ui/src/components/message-part.css
+++ b/packages/ui/src/components/message-part.css
@@ -81,6 +81,14 @@
padding: 8px 12px;
border-radius: 4px;
+ [data-highlight="file"] {
+ color: var(--syntax-property);
+ }
+
+ [data-highlight="agent"] {
+ color: var(--syntax-type);
+ }
+
[data-slot="user-message-copy-wrapper"] {
position: absolute;
top: 7px;
diff --git a/packages/ui/src/components/message-part.tsx b/packages/ui/src/components/message-part.tsx
index 194d5148a..3fde255c8 100644
--- a/packages/ui/src/components/message-part.tsx
+++ b/packages/ui/src/components/message-part.tsx
@@ -477,20 +477,7 @@ function HighlightedText(props: { text: string; references: FilePart[]; agents:
return result
})
- return (
- <For each={segments()}>
- {(segment) => (
- <span
- classList={{
- "text-syntax-property": segment.type === "file",
- "text-syntax-type": segment.type === "agent",
- }}
- >
- {segment.text}
- </span>
- )}
- </For>
- )
+ return <For each={segments()}>{(segment) => <span data-highlight={segment.type}>{segment.text}</span>}</For>
}
export function Part(props: MessagePartProps) {
diff --git a/packages/ui/src/components/session-turn.css b/packages/ui/src/components/session-turn.css
index 4a2714c0e..d1ade879e 100644
--- a/packages/ui/src/components/session-turn.css
+++ b/packages/ui/src/components/session-turn.css
@@ -499,6 +499,10 @@
gap: 8px;
color: var(--text-weak);
+ [data-slot="session-turn-trigger-icon"] {
+ color: var(--icon-base);
+ }
+
[data-component="spinner"] {
width: 12px;
height: 12px;
diff --git a/packages/ui/src/components/session-turn.tsx b/packages/ui/src/components/session-turn.tsx
index 5aa79e0b9..8b20a73b4 100644
--- a/packages/ui/src/components/session-turn.tsx
+++ b/packages/ui/src/components/session-turn.tsx
@@ -565,7 +565,7 @@ export function SessionTurn(
viewBox="0 0 10 10"
fill="none"
xmlns="http://www.w3.org/2000/svg"
- class="text-icon-base"
+ data-slot="session-turn-trigger-icon"
>
<path
d="M8.125 1.875H1.875L5 8.125L8.125 1.875Z"
diff --git a/packages/ui/src/components/tabs.tsx b/packages/ui/src/components/tabs.tsx
index ddd22ec51..4836a0864 100644
--- a/packages/ui/src/components/tabs.tsx
+++ b/packages/ui/src/components/tabs.tsx
@@ -75,7 +75,7 @@ function TabsTrigger(props: ParentProps<TabsTriggerProps>) {
<Kobalte.Trigger
{...rest}
data-slot="tabs-trigger"
- classList={{ "group/tab": true, [split.classes?.button ?? ""]: split.classes?.button }}
+ classList={{ [split.classes?.button ?? ""]: split.classes?.button }}
>
{split.children}
</Kobalte.Trigger>
diff --git a/packages/ui/src/styles/tailwind/utilities.css b/packages/ui/src/styles/tailwind/utilities.css
index 8194aeffb..be305b4cb 100644
--- a/packages/ui/src/styles/tailwind/utilities.css
+++ b/packages/ui/src/styles/tailwind/utilities.css
@@ -8,6 +8,39 @@
}
}
+@utility session-scroller {
+ &::-webkit-scrollbar {
+ width: 10px;
+ height: 10px;
+ }
+
+ &::-webkit-scrollbar-track {
+ background: transparent;
+ border-radius: 5px;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ background: var(--border-weak-base);
+ border-radius: 5px;
+ border: 3px solid transparent;
+ background-clip: padding-box;
+ }
+
+ &::-webkit-scrollbar-thumb:hover {
+ background: var(--border-weak-base);
+ }
+
+ & {
+ scrollbar-width: thin;
+ scrollbar-color: var(--border-weak-base) transparent;
+ }
+}
+
+@utility badge-mask {
+ -webkit-mask-image: radial-gradient(circle 5px at calc(100% - 4px) 4px, transparent 5px, black 5.5px);
+ mask-image: radial-gradient(circle 5px at calc(100% - 4px) 4px, transparent 5px, black 5.5px);
+}
+
@utility truncate-start {
text-overflow: ellipsis;
overflow: hidden;