|
@@ -21,6 +21,7 @@ import type {
|
|
|
PromptInputV2Suggestion,
|
|
PromptInputV2Suggestion,
|
|
|
} from "./types"
|
|
} from "./types"
|
|
|
import type { PromptInputV2Interaction, PromptInputV2SelectControl } from "./interaction"
|
|
import type { PromptInputV2Interaction, PromptInputV2SelectControl } from "./interaction"
|
|
|
|
|
+import "./attachments.css"
|
|
|
|
|
|
|
|
export type {
|
|
export type {
|
|
|
PromptInputV2Attachment,
|
|
PromptInputV2Attachment,
|
|
@@ -107,7 +108,7 @@ export function PromptInputV2(props: PromptInputV2Props) {
|
|
|
<form
|
|
<form
|
|
|
data-component="prompt-input-v2"
|
|
data-component="prompt-input-v2"
|
|
|
data-dock-border-underlay={props.borderUnderlay ? "v2" : undefined}
|
|
data-dock-border-underlay={props.borderUnderlay ? "v2" : undefined}
|
|
|
- class="group/prompt-input relative min-h-[96px] w-full rounded-xl bg-v2-background-bg-base"
|
|
|
|
|
|
|
+ class="group/prompt-input relative min-h-[96px] w-full overflow-clip rounded-xl bg-v2-background-bg-base"
|
|
|
classList={{
|
|
classList={{
|
|
|
"shadow-[var(--v2-elevation-raised)]": !props.borderUnderlay,
|
|
"shadow-[var(--v2-elevation-raised)]": !props.borderUnderlay,
|
|
|
"border border-v2-icon-icon-info border-dashed": state.drag === "active",
|
|
"border border-v2-icon-icon-info border-dashed": state.drag === "active",
|
|
@@ -378,7 +379,7 @@ export function PromptInputV2Attachments(props: {
|
|
|
}) {
|
|
}) {
|
|
|
return (
|
|
return (
|
|
|
<Show when={props.attachments.length > 0 || (props.comments?.length ?? 0) > 0}>
|
|
<Show when={props.attachments.length > 0 || (props.comments?.length ?? 0) > 0}>
|
|
|
- <div data-slot="prompt-attachments" class="relative">
|
|
|
|
|
|
|
+ <div data-component="prompt-input-v2-attachments" data-slot="prompt-attachments" class="relative">
|
|
|
<div
|
|
<div
|
|
|
data-slot="prompt-attachments-scroll"
|
|
data-slot="prompt-attachments-scroll"
|
|
|
class="flex flex-nowrap gap-2 overflow-x-auto no-scrollbar px-2 pt-2 pb-1"
|
|
class="flex flex-nowrap gap-2 overflow-x-auto no-scrollbar px-2 pt-2 pb-1"
|
|
@@ -444,8 +445,14 @@ export function PromptInputV2Attachments(props: {
|
|
|
)}
|
|
)}
|
|
|
</For>
|
|
</For>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="pointer-events-none absolute inset-y-0 left-0 z-10 w-6 bg-[linear-gradient(to_right,var(--v2-background-bg-base),transparent)]" />
|
|
|
|
|
- <div class="pointer-events-none absolute inset-y-0 right-0 z-10 w-6 bg-[linear-gradient(to_left,var(--v2-background-bg-base),transparent)]" />
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ data-slot="prompt-attachments-fade-left"
|
|
|
|
|
+ class="pointer-events-none absolute inset-y-0 left-0 z-10 w-6 bg-[linear-gradient(to_right,var(--v2-background-bg-base),transparent)]"
|
|
|
|
|
+ />
|
|
|
|
|
+ <div
|
|
|
|
|
+ data-slot="prompt-attachments-fade-right"
|
|
|
|
|
+ class="pointer-events-none absolute inset-y-0 right-0 z-10 w-6 bg-[linear-gradient(to_left,var(--v2-background-bg-base),transparent)]"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</Show>
|
|
</Show>
|
|
|
)
|
|
)
|