@aurora-studio/starter-core 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -84,5 +84,5 @@ export function CatalogueFilters({ categories, currentCategory, currentSort, onS
|
|
|
84
84
|
if (variant === "drawer") {
|
|
85
85
|
return (_jsx("div", { className: "bg-aurora-surface border-t border-aurora-border p-6", children: content }));
|
|
86
86
|
}
|
|
87
|
-
return (_jsx("aside", { className: "w-56 shrink-0
|
|
87
|
+
return (_jsx("aside", { className: "w-56 shrink-0 order-first block", children: _jsx("div", { className: "pattern-well sticky top-24 space-y-6 rounded-component border border-aurora-border p-4", children: content }) }));
|
|
88
88
|
}
|
|
@@ -122,7 +122,7 @@ export function SearchDropdown({ vendorId, placeholder = "Search milk, bananas,
|
|
|
122
122
|
const showRecent = open && query.trim() && !loading && hits.length === 0 && recentSearches.length > 0;
|
|
123
123
|
const recipeSuggestion = getRecipeSuggestion?.(query) ?? null;
|
|
124
124
|
const showRecipeSuggestion = open && query.trim().length >= 2 && recipeSuggestion && !loading;
|
|
125
|
-
return (_jsxs("div", { ref: containerRef, className: `relative w-full ${fullWidth ? "" : "max-w-[280px]"}`, children: [_jsxs("div", { className: "relative flex items-center", children: [_jsx("span", { className: "absolute left-
|
|
125
|
+
return (_jsxs("div", { ref: containerRef, className: `relative w-full ${fullWidth ? "" : "max-w-[280px]"}`, children: [_jsxs("div", { className: "relative flex items-center min-h-9", children: [_jsx("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 flex items-center justify-center pointer-events-none text-aurora-muted", children: _jsx(Search, { className: "w-4 h-4 shrink-0" }) }), _jsx("input", { type: "search", value: query, onChange: (e) => setQuery(e.target.value), onFocus: () => (query.trim() || recentSearches.length) && setOpen(true), placeholder: placeholder, className: "w-full pl-10 pr-3 py-2 h-9 text-sm rounded-lg bg-aurora-surface border border-aurora-border text-aurora-text placeholder:text-aurora-muted focus:outline-none focus:ring-1 focus:ring-aurora-primary/50 focus:border-aurora-primary/70", "aria-label": "Search products" })] }), open && (query.trim() || showRecent) && (_jsx("div", { className: "absolute top-full left-0 right-0 mt-1 rounded-component bg-aurora-surface border border-aurora-border shadow-xl z-[9999] max-h-96 overflow-y-auto", children: loading ? (_jsx("div", { className: "p-4 text-aurora-muted text-sm", children: "Searching\u2026" })) : hits.length === 0 && !showRecent && !showRecipeSuggestion ? (_jsx("div", { className: "p-4 text-aurora-muted text-sm", children: "No results" })) : (_jsxs("div", { className: "py-2", children: [showRecipeSuggestion && (_jsx("div", { className: "px-3 py-1.5 text-xs font-semibold uppercase tracking-wider text-aurora-muted border-b border-aurora-border", children: "Suggestions" })), showRecipeSuggestion && (_jsxs(Link, { href: `/catalogue?q=${encodeURIComponent(recipeSuggestion.replace("?", "").split(" ")[0].toLowerCase())}`, onClick: () => {
|
|
126
126
|
addToRecent(recipeSuggestion);
|
|
127
127
|
setOpen(false);
|
|
128
128
|
}, className: "flex items-center gap-3 px-4 py-2 hover:bg-aurora-surface-hover transition-colors border-b border-aurora-border", children: [_jsx(Search, { className: "w-4 h-4 text-aurora-muted shrink-0" }), _jsx("span", { className: "font-medium truncate", children: recipeSuggestion })] })), hits.length > 0 && (_jsxs(_Fragment, { children: [_jsx("div", { className: "px-3 py-1.5 text-xs font-semibold uppercase tracking-wider text-aurora-muted border-b border-aurora-border", children: "Products" }), _jsx("ul", { children: hits.slice(0, 6).map((hit) => (_jsx("li", { className: "group/item", children: _jsxs("div", { className: "flex items-center gap-3 px-4 py-2 hover:bg-aurora-surface-hover transition-colors", children: [_jsxs(Link, { href: `/catalogue/${hit.recordId}`, onClick: () => {
|