@recruitnepal/shared-packages 1.8.5 → 1.8.6

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.
@@ -76,10 +76,10 @@ export function JobsSearchBar({ getSearchParam, handleSearch, onSubmitSearch, mo
76
76
  if (onSubmitSearch)
77
77
  onSubmitSearch(searchQuery);
78
78
  };
79
- return (_jsxs("div", { className: cn('w-full max-w-6xl mx-auto p-2 pt-0', className), children: [_jsxs("div", { className: "border rounded-xl bg-white flex items-center", children: [_jsxs("div", { className: "relative flex-1 p-2", children: [_jsx(Search, { className: "absolute left-5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }), _jsx(Input, { name: "keyword", placeholder: "Job title, keywords or company", value: searchQuery.keyword, onChange: onChangeField, className: "pl-8 py-0 border-0 h-9" })] }), _jsxs("div", { className: "relative flex-1 p-2 hidden md:block", children: [_jsx(MapPin, { className: "absolute left-5 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }), _jsx(Input, { name: "location", placeholder: "City, Location", value: searchQuery.location, onChange: onChangeField, className: "pl-8 py-0 border-0 h-9" })] }), !hideCategory && (_jsx("div", { className: "p-2 hidden md:block", children: _jsxs(Dialog, { open: catOpen, onOpenChange: setCatOpen, children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", className: "text-sm w-full md:w-[260px] justify-between h-9", children: searchQuery.category.length === 0 ? 'Category' : searchQuery.category[0] }) }), _jsxs(DialogContent, { className: "max-w-[900px] w-[92vw] p-0 overflow-hidden", children: [_jsx(DialogHeader, { className: "p-4 pb-2", children: _jsx(DialogTitle, { children: "Select a Category" }) }), _jsx("div", { className: "px-4 pb-4", children: _jsx(Input, { placeholder: "Search category\u2026", value: catQuery, onChange: (e) => setCatQuery(e.target.value), className: "h-9 w-full rounded-md border border-input bg-background px-3 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" }) }), _jsx("div", { className: "max-h-[60vh] overflow-y-auto px-4 pb-2", children: isCatsLoading ? (_jsx("div", { className: "text-sm text-muted-foreground px-1 py-6", children: "Loading\u2026" })) : filteredCategories.length === 0 ? (_jsx("div", { className: "text-sm text-muted-foreground px-1 py-6", children: "No category found." })) : (_jsx("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-4", children: filteredCategories.map((c) => {
79
+ return (_jsxs("div", { className: cn('w-full max-w-6xl mx-auto p-2 pt-0', className), children: [_jsxs("div", { className: "border rounded-xl bg-white flex items-center", children: [_jsxs("div", { className: "relative flex-1 p-2", children: [_jsx(Search, { className: "absolute left-5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }), _jsx(Input, { name: "keyword", placeholder: "Job title, keywords or company", value: searchQuery.keyword, onChange: onChangeField, className: "pl-8 py-0 border-0 h-9" })] }), _jsxs("div", { className: "relative flex-1 p-2 hidden md:block", children: [_jsx(MapPin, { className: "absolute left-5 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }), _jsx(Input, { name: "location", placeholder: "City, Location", value: searchQuery.location, onChange: onChangeField, className: "pl-8 py-0 border-0 h-9" })] }), !hideCategory && (_jsx("div", { className: "p-2 hidden md:block", children: _jsxs(Dialog, { open: catOpen, onOpenChange: setCatOpen, children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", className: "text-sm w-full md:w-[260px] justify-between h-9", children: searchQuery.category.length === 0 ? 'Category' : searchQuery.category[0] }) }), _jsxs(DialogContent, { className: "w-[96vw] max-w-[1200px] p-0 overflow-hidden", children: [_jsx(DialogHeader, { className: "p-4 pb-2", children: _jsx(DialogTitle, { children: "Select a Category" }) }), _jsx("div", { className: "px-4 pb-4", children: _jsx(Input, { placeholder: "Search category\u2026", value: catQuery, onChange: (e) => setCatQuery(e.target.value), className: "h-9 w-full rounded-md border border-input bg-background px-3 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" }) }), _jsx("div", { className: "max-h-[60vh] overflow-y-auto px-4 pb-2", children: isCatsLoading ? (_jsx("div", { className: "text-sm text-muted-foreground px-1 py-6", children: "Loading\u2026" })) : filteredCategories.length === 0 ? (_jsx("div", { className: "text-sm text-muted-foreground px-1 py-6", children: "No category found." })) : (_jsx("div", { className: "grid grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-2", children: filteredCategories.map((c) => {
80
80
  const title = categoryLabel(c);
81
81
  const selected = searchQuery.category[0] === title;
82
- return (_jsx("button", { type: "button", onClick: () => toggleCategory(title), className: cn('min-w-0 text-left text-sm px-3 py-2 rounded-lg border transition', selected ? 'border-primary bg-primary/10 text-primary' : 'border-border bg-muted/30 hover:bg-muted/60'), children: _jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: "min-w-0 truncate", children: title }), _jsx(Check, { className: cn('h-4 w-4 shrink-0', selected ? 'opacity-100' : 'opacity-0') })] }) }, title));
82
+ return (_jsx("button", { type: "button", onClick: () => toggleCategory(title), className: cn('text-left text-sm px-3 py-2 rounded-lg border transition', selected ? 'border-primary bg-primary/10 text-primary' : 'border-border bg-muted/30 hover:bg-muted/60'), children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "truncate", children: title }), _jsx(Check, { className: cn('h-4 w-4 shrink-0', selected ? 'opacity-100' : 'opacity-0') })] }) }, title));
83
83
  }) })) }), _jsxs(DialogFooter, { className: "flex items-center justify-between border-t p-4", children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: clearCategory, children: "Clear" }), _jsx(Button, { size: "sm", onClick: () => setCatOpen(false), children: "Done" })] })] })] }) })), mode === 'submit' && (_jsx("div", { className: "p-2", children: _jsx(Button, { onClick: submitSearch, children: "Search" }) }))] }), showPopularSearch && mode === 'live' && (_jsx("div", { className: "hidden md:block" }))] }));
84
84
  }
85
85
  export default JobsSearchBar;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recruitnepal/shared-packages",
3
- "version": "1.8.5",
3
+ "version": "1.8.6",
4
4
  "description": "Shared hooks, API client, types and utils for Recruit Nepal (CV builder UI and preprocess stay in each repo)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",