Some checks failed
build-packages / resolve bundled mosh-client (push) Has been cancelled
build-packages / resolve bundled et-client (push) Has been cancelled
build-packages / build-macos (push) Has been cancelled
build-packages / build-windows (push) Has been cancelled
build-packages / build-linux-x64 (push) Has been cancelled
build-packages / build-linux-arm64 (push) Has been cancelled
build-packages / release (push) Has been cancelled
build-packages / update Nix release metadata (push) Has been cancelled
build-packages / bump homebrew tap (push) Has been cancelled
test / lint-and-test (push) Has been cancelled
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
build-et-binaries / build-linux-x64 (push) Has been cancelled
build-et-binaries / build-linux-arm64 (push) Has been cancelled
build-et-binaries / build-macos-universal (push) Has been cancelled
build-et-binaries / build-windows-x64 (push) Has been cancelled
build-et-binaries / release (push) Has been cancelled
81 lines
2.1 KiB
TypeScript
81 lines
2.1 KiB
TypeScript
import { Search } from "lucide-react";
|
|
import React from "react";
|
|
import { cn } from "../../lib/utils";
|
|
import { Input } from "../ui/input";
|
|
|
|
interface VaultPageHeaderProps {
|
|
children: React.ReactNode;
|
|
className?: string;
|
|
contentClassName?: string;
|
|
dataSection?: string;
|
|
}
|
|
|
|
export function VaultPageHeader({
|
|
children,
|
|
className,
|
|
contentClassName,
|
|
dataSection,
|
|
}: VaultPageHeaderProps) {
|
|
return (
|
|
<header
|
|
className={cn(
|
|
"relative shrink-0 bg-background/95 app-drag after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-px after:origin-bottom after:[transform:scaleY(.5)] after:bg-border/40 after:content-['']",
|
|
className,
|
|
)}
|
|
data-section={dataSection}
|
|
>
|
|
<div
|
|
className={cn(
|
|
"h-14 px-4 py-2 flex items-center gap-3 app-no-drag",
|
|
contentClassName,
|
|
)}
|
|
>
|
|
{children}
|
|
</div>
|
|
</header>
|
|
);
|
|
}
|
|
|
|
interface VaultHeaderSearchProps
|
|
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "className"> {
|
|
className?: string;
|
|
inputClassName?: string;
|
|
rightAdornment?: React.ReactNode;
|
|
}
|
|
|
|
export function VaultHeaderSearch({
|
|
className,
|
|
inputClassName,
|
|
rightAdornment,
|
|
...props
|
|
}: VaultHeaderSearchProps) {
|
|
return (
|
|
<div className={cn("relative min-w-[100px]", className)}>
|
|
<Search
|
|
size={14}
|
|
className="absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
|
|
/>
|
|
<Input
|
|
{...props}
|
|
className={cn(
|
|
"pl-9 h-10 bg-secondary border-border/60 text-sm",
|
|
rightAdornment && "pr-9",
|
|
inputClassName,
|
|
)}
|
|
/>
|
|
{rightAdornment && (
|
|
<div className="absolute right-3 top-1/2 -translate-y-1/2">
|
|
{rightAdornment}
|
|
</div>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export const vaultHeaderSecondaryButtonClass =
|
|
"h-10 px-3 gap-2 bg-foreground/5 text-foreground hover:bg-foreground/10 border-border/40";
|
|
|
|
export const vaultHeaderIconButtonClass = "h-10 w-10";
|
|
|
|
export const vaultSectionTitleClass = "text-base font-semibold text-muted-foreground";
|