Build [v1.14.28]
This commit is contained in:
@@ -109,23 +109,23 @@ export default function SearchModal({
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 bg-black/50 flex items-start justify-center pt-20">
|
||||
<div className="bg-slate-950 rounded-lg shadow-lg w-full max-w-2xl mx-4 max-h-[80vh] flex flex-col">
|
||||
<div className="bg-surface border border-border w-full max-w-2xl mx-4 max-h-[80vh] flex flex-col">
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between p-4 border-b border-slate-800">
|
||||
<h2 className="text-xl font-normal">Search inventory</h2>
|
||||
<div className="flex items-center justify-between p-4 border-b border-border">
|
||||
<h2 className="text-xl font-normal">Search Inventory</h2>
|
||||
<button
|
||||
onClick={onClose}
|
||||
aria-label="Close search modal"
|
||||
className="p-2 hover:bg-slate-800 rounded-lg transition-colors"
|
||||
className="p-2 hover:bg-black border border-transparent hover:border-border transition-colors"
|
||||
>
|
||||
<X size={20} className="text-slate-400" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Search Input */}
|
||||
<div className="p-4 border-b border-slate-800">
|
||||
<div className="p-4 border-b border-border">
|
||||
<div className="relative">
|
||||
<Search size={18} className="absolute left-3 top-3 text-slate-500 pointer-events-none" />
|
||||
<Search size={18} className="absolute left-3 top-1/2 -translate-y-1/2 text-slate-500 pointer-events-none" />
|
||||
<input
|
||||
ref={inputRef}
|
||||
type="text"
|
||||
@@ -133,7 +133,7 @@ export default function SearchModal({
|
||||
value={query}
|
||||
onChange={handleInputChange}
|
||||
aria-label="Search items"
|
||||
className="w-full bg-slate-900 border border-slate-800 rounded-lg pl-10 pr-4 py-2 text-slate-100 placeholder-slate-600 focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/50"
|
||||
className="w-full pl-10"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -141,7 +141,7 @@ export default function SearchModal({
|
||||
{/* Results */}
|
||||
<div className="flex-1 overflow-y-auto">
|
||||
{error && (
|
||||
<div className="p-4 text-rose-500 bg-rose-500/10 border border-rose-500/20 m-4 rounded-lg">
|
||||
<div className="p-4 text-rose-500 bg-rose-500/10 border border-rose-500/20 m-4">
|
||||
{error}
|
||||
</div>
|
||||
)}
|
||||
@@ -149,14 +149,14 @@ export default function SearchModal({
|
||||
{isLoading && (
|
||||
<div className="flex items-center justify-center py-8">
|
||||
<div className="text-slate-400">
|
||||
<div className="inline-block animate-spin rounded-full h-6 w-6 border border-slate-600 border-t-primary"></div>
|
||||
<div className="inline-block animate-spin h-6 w-6 border border-slate-600 border-t-primary"></div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!isLoading && !error && results.length === 0 && query.length > 0 && (
|
||||
<div className="p-4 text-slate-500 text-center">
|
||||
No items found matching "{query}"
|
||||
No Items Found Matching "{query}"
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -167,12 +167,12 @@ export default function SearchModal({
|
||||
)}
|
||||
|
||||
{!isLoading && results.length > 0 && (
|
||||
<div className="divide-y divide-slate-800">
|
||||
<div className="divide-y divide-border">
|
||||
{results.map((item) => (
|
||||
<button
|
||||
key={item.id}
|
||||
onClick={() => handleSelectItem(item)}
|
||||
className="w-full p-4 text-left hover:bg-slate-900 transition-colors focus:outline-none focus:bg-slate-900 focus:ring-2 focus:ring-primary/50"
|
||||
className="w-full p-4 text-left hover:bg-black transition-colors focus:outline-none focus:bg-black"
|
||||
>
|
||||
<div className="flex justify-between items-start gap-2 mb-1">
|
||||
<h3 className="font-normal text-slate-100 flex-1">
|
||||
|
||||
Reference in New Issue
Block a user