@recruitnepal/shared-packages 1.8.4 → 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: "
|
|
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('text-left text-sm px-3 py-2 rounded-lg border transition', selected ? 'border-primary bg-primary/10 text-primary' : 'hover:bg-muted/60'), children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "truncate", children: title }), _jsx(Check, { className: cn('
|
|
83
|
-
}) })) }), _jsxs(DialogFooter, { className: "
|
|
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
|
+
}) })) }), _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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAI1D,QAAA,MAAM,MAAM,uCAAuB,CAAC;AACpC,QAAA,MAAM,aAAa,8GAA0B,CAAC;AAC9C,QAAA,MAAM,YAAY,6CAAyB,CAAC;AAC5C,QAAA,MAAM,WAAW,4GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,8JAYjB,CAAC;AAGH,QAAA,MAAM,aAAa,8JAwBjB,CAAC;AAGH,QAAA,MAAM,YAAY,GAAI,yBAAyB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,4CAElF,CAAC;AACF,QAAA,MAAM,YAAY,GAAI,yBAAyB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,4CAElF,CAAC;AACF,QAAA,MAAM,WAAW,oKASf,CAAC;AAGH,OAAO,EACL,MAAM,EACN,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,CAAC"}
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
|
+
import { X } from 'lucide-react';
|
|
5
6
|
import { cn } from '../../utils/cn';
|
|
6
7
|
const Dialog = DialogPrimitive.Root;
|
|
7
8
|
const DialogTrigger = DialogPrimitive.Trigger;
|
|
8
9
|
const DialogPortal = DialogPrimitive.Portal;
|
|
9
10
|
const DialogClose = DialogPrimitive.Close;
|
|
10
|
-
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn('fixed inset-0 z-
|
|
11
|
+
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn('fixed inset-0 z-[9999] bg-black/30 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0', className), ...props })));
|
|
11
12
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
12
|
-
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}),
|
|
13
|
+
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn('fixed left-[50%] top-[50%] z-[10000] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-4 shadow-lg duration-200 sm:rounded-xl sm:p-6', 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:max-w-lg', className), ...props, children: [children, _jsx(DialogPrimitive.Close, { className: "fixed right-4 top-4 z-[10010] inline-grid h-9 w-9 place-items-center rounded-full border bg-background shadow-sm hover:bg-muted/50 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", "aria-label": "Close", children: _jsx(X, { className: "h-5 w-5" }) })] })] })));
|
|
13
14
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
14
|
-
const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col
|
|
15
|
-
const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className), ...props }));
|
|
16
|
-
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn('text-lg font-semibold leading-none', className), ...props })));
|
|
15
|
+
const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col space-y-1.5 text-center sm:text-left', className), ...props }));
|
|
16
|
+
const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
|
|
17
|
+
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn('text-lg font-semibold leading-none tracking-tight', className), ...props })));
|
|
17
18
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
18
19
|
export { Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@recruitnepal/shared-packages",
|
|
3
|
-
"version": "1.8.
|
|
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",
|