mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-03-17 03:00:27 -04:00
Compare commits
1 Commits
dev
...
ubbe/add-h
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
948119d071 |
@@ -151,7 +151,7 @@ export function CopilotPage() {
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<button
|
||||
className="rounded p-1.5 hover:bg-neutral-100"
|
||||
className="hit-area-3 rounded p-1.5 hover:bg-neutral-100"
|
||||
aria-label="More actions"
|
||||
>
|
||||
<DotsThree className="h-5 w-5 text-neutral-600" />
|
||||
|
||||
@@ -33,7 +33,7 @@ export function FileChips({ files, onRemove, isUploading }: Props) {
|
||||
type="button"
|
||||
aria-label={`Remove ${file.name}`}
|
||||
onClick={() => onRemove(index)}
|
||||
className="ml-0.5 rounded-full p-0.5 text-zinc-400 transition-colors hover:bg-zinc-200 hover:text-zinc-600"
|
||||
className="hit-area-4 ml-0.5 rounded-full p-0.5 text-zinc-400 transition-colors hover:bg-zinc-200 hover:text-zinc-600"
|
||||
>
|
||||
<XIcon className="h-3 w-3" weight="bold" />
|
||||
</button>
|
||||
|
||||
@@ -96,7 +96,7 @@ export function CollapsedToolGroup({ parts }: Props) {
|
||||
onClick={() => setExpanded(!expanded)}
|
||||
aria-expanded={expanded}
|
||||
aria-controls={panelId}
|
||||
className="flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground"
|
||||
className="hit-area-y-2 flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground"
|
||||
>
|
||||
<CaretRightIcon
|
||||
size={12}
|
||||
|
||||
@@ -341,7 +341,7 @@ export function ChatSidebar() {
|
||||
<DropdownMenuTrigger asChild>
|
||||
<button
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className="absolute right-2 top-1/2 -translate-y-1/2 rounded-full p-1.5 text-zinc-600 transition-all hover:bg-neutral-100"
|
||||
className="hit-area-3 absolute right-2 top-1/2 -translate-y-1/2 rounded-full p-1.5 text-zinc-600 transition-all hover:bg-neutral-100"
|
||||
aria-label="More actions"
|
||||
>
|
||||
<DotsThree className="h-4 w-4" />
|
||||
|
||||
@@ -65,7 +65,7 @@ export function ScheduleActionsDropdown({ agent, schedule, onDeleted }: Props) {
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<button
|
||||
className="ml-auto shrink-0 rounded p-1 hover:bg-gray-100"
|
||||
className="hit-area-3 ml-auto shrink-0 rounded p-1 hover:bg-gray-100"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
aria-label="More actions"
|
||||
>
|
||||
|
||||
@@ -108,7 +108,7 @@ export function TaskActionsDropdown({ agent, run, onDeleted }: Props) {
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<button
|
||||
className="ml-auto shrink-0 rounded p-1 hover:bg-gray-100"
|
||||
className="hit-area-3 ml-auto shrink-0 rounded p-1 hover:bg-gray-100"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
aria-label="More actions"
|
||||
>
|
||||
|
||||
@@ -67,7 +67,7 @@ export function TemplateActionsDropdown({ agent, template, onDeleted }: Props) {
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<button
|
||||
className="ml-auto shrink-0 rounded p-1 hover:bg-gray-100"
|
||||
className="hit-area-3 ml-auto shrink-0 rounded p-1 hover:bg-gray-100"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
aria-label="More actions"
|
||||
>
|
||||
|
||||
@@ -67,7 +67,7 @@ export function TriggerActionsDropdown({ agent, trigger, onDeleted }: Props) {
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<button
|
||||
className="ml-auto shrink-0 rounded p-1 hover:bg-gray-100"
|
||||
className="hit-area-3 ml-auto shrink-0 rounded p-1 hover:bg-gray-100"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
aria-label="More actions"
|
||||
>
|
||||
|
||||
@@ -196,3 +196,148 @@ body[data-google-picker-open="true"] [data-dialog-content] {
|
||||
[data-streamdown="table-wrapper"] td {
|
||||
padding: 0.875rem 1rem; /* py-3.5 px-4 */
|
||||
}
|
||||
|
||||
@utility hit-area-debug {
|
||||
position: relative;
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: var(--hit-area-t, 0px);
|
||||
right: var(--hit-area-r, 0px);
|
||||
bottom: var(--hit-area-b, 0px);
|
||||
left: var(--hit-area-l, 0px);
|
||||
pointer-events: inherit;
|
||||
@apply border border-dashed border-blue-500 bg-blue-500/10;
|
||||
}
|
||||
&:hover::before {
|
||||
@apply border border-dashed border-green-500 bg-green-500/10;
|
||||
}
|
||||
}
|
||||
|
||||
@utility hit-area {
|
||||
position: relative;
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: var(--hit-area-t, 0px);
|
||||
right: var(--hit-area-r, 0px);
|
||||
bottom: var(--hit-area-b, 0px);
|
||||
left: var(--hit-area-l, 0px);
|
||||
pointer-events: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
@utility hit-area-* {
|
||||
position: relative;
|
||||
--hit-area-t: --spacing(--value(number) * -1);
|
||||
--hit-area-t: calc(--value([*]) * -1);
|
||||
--hit-area-b: --spacing(--value(number) * -1);
|
||||
--hit-area-b: calc(--value([*]) * -1);
|
||||
--hit-area-l: --spacing(--value(number) * -1);
|
||||
--hit-area-l: calc(--value([*]) * -1);
|
||||
--hit-area-r: --spacing(--value(number) * -1);
|
||||
--hit-area-r: calc(--value([*]) * -1);
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: var(--hit-area-t, 0px);
|
||||
right: var(--hit-area-r, 0px);
|
||||
bottom: var(--hit-area-b, 0px);
|
||||
left: var(--hit-area-l, 0px);
|
||||
pointer-events: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
@utility hit-area-l-* {
|
||||
position: relative;
|
||||
--hit-area-l: --spacing(--value(number) * -1);
|
||||
--hit-area-l: calc(--value([*]) * -1);
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: var(--hit-area-t, 0px);
|
||||
right: var(--hit-area-r, 0px);
|
||||
bottom: var(--hit-area-b, 0px);
|
||||
left: var(--hit-area-l, 0px);
|
||||
pointer-events: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
@utility hit-area-r-* {
|
||||
position: relative;
|
||||
--hit-area-r: --spacing(--value(number) * -1);
|
||||
--hit-area-r: calc(--value([*]) * -1);
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: var(--hit-area-t, 0px);
|
||||
right: var(--hit-area-r, 0px);
|
||||
bottom: var(--hit-area-b, 0px);
|
||||
left: var(--hit-area-l, 0px);
|
||||
pointer-events: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
@utility hit-area-t-* {
|
||||
position: relative;
|
||||
--hit-area-t: --spacing(--value(number) * -1);
|
||||
--hit-area-t: calc(--value([*]) * -1);
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: var(--hit-area-t, 0px);
|
||||
right: var(--hit-area-r, 0px);
|
||||
bottom: var(--hit-area-b, 0px);
|
||||
left: var(--hit-area-l, 0px);
|
||||
pointer-events: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
@utility hit-area-b-* {
|
||||
position: relative;
|
||||
--hit-area-b: --spacing(--value(number) * -1);
|
||||
--hit-area-b: calc(--value([*]) * -1);
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: var(--hit-area-t, 0px);
|
||||
right: var(--hit-area-r, 0px);
|
||||
bottom: var(--hit-area-b, 0px);
|
||||
left: var(--hit-area-l, 0px);
|
||||
pointer-events: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
@utility hit-area-x-* {
|
||||
position: relative;
|
||||
--hit-area-l: --spacing(--value(number) * -1);
|
||||
--hit-area-l: calc(--value([*]) * -1);
|
||||
--hit-area-r: --spacing(--value(number) * -1);
|
||||
--hit-area-r: calc(--value([*]) * -1);
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: var(--hit-area-t, 0px);
|
||||
right: var(--hit-area-r, 0px);
|
||||
bottom: var(--hit-area-b, 0px);
|
||||
left: var(--hit-area-l, 0px);
|
||||
pointer-events: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
@utility hit-area-y-* {
|
||||
position: relative;
|
||||
--hit-area-t: --spacing(--value(number) * -1);
|
||||
--hit-area-t: calc(--value([*]) * -1);
|
||||
--hit-area-b: --spacing(--value(number) * -1);
|
||||
--hit-area-b: calc(--value([*]) * -1);
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: var(--hit-area-t, 0px);
|
||||
right: var(--hit-area-r, 0px);
|
||||
bottom: var(--hit-area-b, 0px);
|
||||
left: var(--hit-area-l, 0px);
|
||||
pointer-events: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,13 @@ export const MessageAction = ({
|
||||
...props
|
||||
}: MessageActionProps) => {
|
||||
const button = (
|
||||
<Button size={size} type="button" variant={variant} {...props}>
|
||||
<Button
|
||||
size={size}
|
||||
type="button"
|
||||
variant={variant}
|
||||
className={cn("hit-area-2", props.className)}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
<span className="sr-only">{label || tooltip}</span>
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user