@abcagency/hc-ui-components 1.3.21 → 1.3.23
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.
- package/dist/components/containers/accordions/filter-container.js +4 -2
- package/dist/components/containers/accordions/filter-container.js.map +1 -1
- package/dist/components/containers/accordions/filter-item-container.js +6 -1
- package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
- package/dist/components/containers/accordions/map-accordion-item-container.js +4 -2
- package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
- package/dist/components/containers/jobListing/listing-details-container.js +2 -2
- package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
- package/dist/components/containers/list/item-list-container.js +2 -2
- package/dist/components/containers/list/item-list-container.js.map +1 -1
- package/dist/components/modules/accordions/MapAccordionItem.js +2 -1
- package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
- package/dist/components/modules/dialogs/apply-dialog.js +1 -1
- package/dist/components/modules/dialogs/apply-dialog.js.map +1 -1
- package/dist/components/modules/filter/search.js +1 -1
- package/dist/components/modules/filter/search.js.map +1 -1
- package/dist/components/modules/jobListing/listing-details.js +5 -4
- package/dist/components/modules/jobListing/listing-details.js.map +1 -1
- package/dist/components/modules/list/field-mapper.js +1 -1
- package/dist/components/modules/list/field-mapper.js.map +1 -1
- package/dist/components/modules/list/item-list.js.map +1 -1
- package/dist/contexts/mapListContext.js.map +1 -1
- package/dist/services/listingAggregatorService.js.map +1 -1
- package/dist/styles/index.css +3 -1
- package/dist/types/components/containers/jobListing/listing-details-container.d.ts +2 -2
- package/dist/types/components/modules/accordions/MapAccordionItem.d.ts +2 -1
- package/dist/types/components/modules/jobListing/listing-details.d.ts +2 -2
- package/dist/types/components/modules/list/item-list.d.ts +0 -1
- package/dist/types/types/ListingFields.d.ts +5 -0
- package/dist/types/types/config/MapConfig.d.ts +1 -0
- package/dist/util/filterUtil.js +2 -2
- package/dist/util/filterUtil.js.map +1 -1
- package/package.json +4 -1
- package/.env +0 -3
- package/.eslintrc +0 -136
- package/bundle.js +0 -28134
- package/bundle.js.map +0 -1
- package/bundleDist.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -12
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +0 -1
- package/jsconfig.json +0 -7
- package/postcss.config.js +0 -13
- package/preset.default.js +0 -15
- package/rollup.config.mjs +0 -111
- package/src/.editorconfig +0 -12
- package/src/apis/hcApi.ts +0 -109
- package/src/bundleIndex.js +0 -14
- package/src/clientToken.js +0 -9
- package/src/components/HireControlMap.js +0 -135
- package/src/components/containers/accordions/filter-container.js +0 -47
- package/src/components/containers/accordions/filter-item-container.js +0 -62
- package/src/components/containers/accordions/map-accordion-item-container.js +0 -70
- package/src/components/containers/filter/commute-container.js +0 -89
- package/src/components/containers/filter/filter-container.js +0 -76
- package/src/components/containers/filter/filter-item-container.js +0 -71
- package/src/components/containers/filter/location-container.js +0 -45
- package/src/components/containers/filter/points-of-interest-container.js +0 -33
- package/src/components/containers/filter/points-of-interest-radio-item-container.js +0 -35
- package/src/components/containers/filter/search-container.js +0 -50
- package/src/components/containers/jobListing/listing-details-container.js +0 -40
- package/src/components/containers/list/item-list-container.tsx +0 -82
- package/src/components/containers/list/list-item/list-item-container.js +0 -43
- package/src/components/containers/maps/info-window-content-container.js +0 -51
- package/src/components/containers/maps/map-container.js +0 -204
- package/src/components/containers/maps/map-list-container.js +0 -48
- package/src/components/containers/maps/map-marker-container.js +0 -78
- package/src/components/modules/accordions/MapAccordionItem.js +0 -29
- package/src/components/modules/accordions/default.js +0 -171
- package/src/components/modules/accordions/filterItem.js +0 -27
- package/src/components/modules/accordions/filters.js +0 -32
- package/src/components/modules/buttons/button-group-apply.js +0 -123
- package/src/components/modules/buttons/commute-pill.js +0 -22
- package/src/components/modules/buttons/default.js +0 -194
- package/src/components/modules/buttons/items-pill.js +0 -35
- package/src/components/modules/buttons/pill-wrapper.js +0 -27
- package/src/components/modules/buttons/show-all-button.js +0 -20
- package/src/components/modules/cards/default.js +0 -167
- package/src/components/modules/cards/filter.js +0 -56
- package/src/components/modules/dialogs/apply-dialog.js +0 -48
- package/src/components/modules/filter/commute.js +0 -108
- package/src/components/modules/filter/index.js +0 -55
- package/src/components/modules/filter/item.js +0 -48
- package/src/components/modules/filter/location.js +0 -48
- package/src/components/modules/filter/radio-item.js +0 -42
- package/src/components/modules/filter/search.js +0 -65
- package/src/components/modules/filter/sort.js +0 -83
- package/src/components/modules/grid.js +0 -54
- package/src/components/modules/icon.js +0 -33
- package/src/components/modules/jobListing/listing-details.js +0 -109
- package/src/components/modules/list/field-mapper.js +0 -114
- package/src/components/modules/list/header-item.js +0 -91
- package/src/components/modules/list/header.js +0 -49
- package/src/components/modules/list/item-expand-card/index.js +0 -22
- package/src/components/modules/list/item-expand-card/recruiter-contact-nav.js +0 -50
- package/src/components/modules/list/item-expand-card/recruiter-details.js +0 -68
- package/src/components/modules/list/item-expand-card/recruiter-headshot.js +0 -22
- package/src/components/modules/list/item-list.tsx +0 -85
- package/src/components/modules/list/list-item/list-item.js +0 -130
- package/src/components/modules/maps/info-window-card.js +0 -17
- package/src/components/modules/maps/info-window-content.js +0 -35
- package/src/components/modules/maps/map-list.js +0 -28
- package/src/components/modules/maps/map-marker.js +0 -29
- package/src/components/modules/maps/map.js +0 -76
- package/src/components/modules/maps/place-marker.js +0 -41
- package/src/components/modules/maps/tabs.js +0 -81
- package/src/constants/eventTypes.js +0 -13
- package/src/constants/placeTypes.js +0 -8
- package/src/contexts/mapContext.tsx +0 -129
- package/src/contexts/mapListContext.tsx +0 -311
- package/src/contexts/placesContext.js +0 -102
- package/src/contexts/trackEventContext.js +0 -14
- package/src/enums/SectionType.ts +0 -9
- package/src/hooks/useList.js +0 -89
- package/src/index.js +0 -3
- package/src/services/configService.ts +0 -16
- package/src/services/googlePlacesNearbyService.ts +0 -42
- package/src/services/listingAggregatorService.ts +0 -76
- package/src/services/listingEntityService.ts +0 -16
- package/src/services/listingService.ts +0 -40
- package/src/services/recruiterService.ts +0 -18
- package/src/styles/bundle.css +0 -268
- package/src/styles/index.css +0 -125
- package/src/types/Address.ts +0 -7
- package/src/types/ContentSection.ts +0 -9
- package/src/types/GetListingParams.ts +0 -8
- package/src/types/LatLng.ts +0 -4
- package/src/types/ListingEntity.ts +0 -11
- package/src/types/ListingFields.ts +0 -20
- package/src/types/Listings.ts +0 -32
- package/src/types/Recruiter.ts +0 -9
- package/src/types/SimilarListing.ts +0 -24
- package/src/types/config/Colors.ts +0 -8
- package/src/types/config/MapConfig.ts +0 -30
- package/src/types/config/PointsOfInterestConfig.ts +0 -13
- package/src/types/config/SearchConfig.ts +0 -4
- package/src/util/arrayUtil.js +0 -3
- package/src/util/fieldMapper.js +0 -22
- package/src/util/filterUtil.js +0 -239
- package/src/util/loading.js +0 -17
- package/src/util/localStorageUtil.ts +0 -34
- package/src/util/mapIconUtil.js +0 -180
- package/src/util/mapUtil.js +0 -91
- package/src/util/sortUtil.js +0 -33
- package/src/util/stringUtils.js +0 -6
- package/src/util/urlFilterUtil.js +0 -85
- package/stats.html +0 -4842
- package/styles/index.css +0 -1
- package/tailwind.config.js +0 -129
- package/tsconfig.json +0 -23
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import React, { Fragment } from 'react';
|
|
2
|
-
import { Combobox, Transition } from '@headlessui/react';
|
|
3
|
-
|
|
4
|
-
import Button from '~/components/modules/buttons/default';
|
|
5
|
-
import Icon from "~/components/modules/icon";
|
|
6
|
-
|
|
7
|
-
const FilterCommute = ({
|
|
8
|
-
className,
|
|
9
|
-
ready,
|
|
10
|
-
status,
|
|
11
|
-
data,
|
|
12
|
-
selected,
|
|
13
|
-
isCurrentLocation,
|
|
14
|
-
inputRef,
|
|
15
|
-
handleSelect,
|
|
16
|
-
setValue,
|
|
17
|
-
setSelected,
|
|
18
|
-
clearSuggestions,
|
|
19
|
-
commuteLocation,
|
|
20
|
-
setIsCurrentLocation,
|
|
21
|
-
fetchLocation,
|
|
22
|
-
setCommuteLocation
|
|
23
|
-
}) => {
|
|
24
|
-
return (
|
|
25
|
-
<div className={`relative ${className ?? ""}`}>
|
|
26
|
-
<label
|
|
27
|
-
htmlFor="commute"
|
|
28
|
-
className="hc-flex hc-items-center hc-gap-2 hc-mb-2 hc-text-xs hc-uppercase hc-font-bold hc-text-uiText"
|
|
29
|
-
>
|
|
30
|
-
<Icon
|
|
31
|
-
icon="ri:pin-distance-fill"
|
|
32
|
-
size="hc-size-5"
|
|
33
|
-
className="hc-text-uiAccent/30"
|
|
34
|
-
/>
|
|
35
|
-
<span>
|
|
36
|
-
<span className="md:hc-hidden lg:hc-inline">Calculate your</span> commute
|
|
37
|
-
</span>
|
|
38
|
-
</label>
|
|
39
|
-
|
|
40
|
-
<Combobox value={selected} onChange={handleSelect}>
|
|
41
|
-
<div className="hc-relative hc-mt-1">
|
|
42
|
-
<div className="hc-relative hc-flex hc-items-center hc-w-full hc-pr-2 hc-cursor-default hc-overflow-hidden hc-rounded hc-bg-white hc-text-left hc-border hc-border-uiAccent/20 focus-within:hc-ring-1 focus-within:hc-ring-uiAccent focus:hc-outline-none">
|
|
43
|
-
<Combobox.Input
|
|
44
|
-
className="hc-w-full hc-border-none hc-py-2 hc-pl-4 hc-pr-1 hc-text-sm hc-leading-5 hc-text-gray-900 focus:hc-ring-0 placeholder:hc-text-gray-400"
|
|
45
|
-
onChange={e => {
|
|
46
|
-
setCommuteLocation("");
|
|
47
|
-
setValue(e.target.value);
|
|
48
|
-
setSelected(e.target.value);
|
|
49
|
-
}}
|
|
50
|
-
value={selected}
|
|
51
|
-
disabled={!ready}
|
|
52
|
-
placeholder="Starting point"
|
|
53
|
-
ref={inputRef}
|
|
54
|
-
/>
|
|
55
|
-
<Button.Btn
|
|
56
|
-
variant="icon"
|
|
57
|
-
size="sqsm"
|
|
58
|
-
onClick={() => {
|
|
59
|
-
setIsCurrentLocation(!isCurrentLocation);
|
|
60
|
-
localStorage.setItem('isCurrentLocation', !isCurrentLocation);
|
|
61
|
-
if (isCurrentLocation || commuteLocation) {
|
|
62
|
-
setCommuteLocation("");
|
|
63
|
-
setSelected("");
|
|
64
|
-
} else if (!commuteLocation) { fetchLocation(); }
|
|
65
|
-
}}
|
|
66
|
-
|
|
67
|
-
className=""
|
|
68
|
-
>
|
|
69
|
-
<span className="hc-sr-only">Use your location</span>
|
|
70
|
-
{commuteLocation ? <Icon icon="mdi:times"></Icon> : <Button.Icon className={isCurrentLocation ? 'hc-text-blue-500' : 'hc-text-current'} icon="mdi:my-location" />}
|
|
71
|
-
</Button.Btn>
|
|
72
|
-
</div>
|
|
73
|
-
<Transition
|
|
74
|
-
as={Fragment}
|
|
75
|
-
leave="hc-transition hc-ease-in hc-duration-100"
|
|
76
|
-
leaveFrom="hc-opacity-100"
|
|
77
|
-
leaveTo="hc-opacity-0"
|
|
78
|
-
afterLeave={clearSuggestions}
|
|
79
|
-
>
|
|
80
|
-
<Combobox.Options className="hc-absolute hc-z-20 hc-mt-1 hc-max-h-60 hc-w-full hc-overflow-auto hc-rounded hc-bg-white hc-py-1 hc-text-base hc-shadow hc-ring-1 hc-ring-uiAccent/10 focus:hc-outline-none sm:hc-text-sm">
|
|
81
|
-
{status === "OK" &&
|
|
82
|
-
data.map(data => (
|
|
83
|
-
<Combobox.Option
|
|
84
|
-
key={data.place_id}
|
|
85
|
-
value={data.description}
|
|
86
|
-
className={({ active }) =>
|
|
87
|
-
`hc-relative hc-cursor-default hc-select-none hc-px-4 hc-py-2 ${active ? "hc-bg-primary hc-text-white" : "hc-text-uiText"
|
|
88
|
-
}`
|
|
89
|
-
}
|
|
90
|
-
>
|
|
91
|
-
{({ selected }) => (
|
|
92
|
-
<span
|
|
93
|
-
className={`hc-block hc-truncate ${selected ? "hc-font-bold" : "hc-font-medium"}`}
|
|
94
|
-
>
|
|
95
|
-
{data.description}
|
|
96
|
-
</span>
|
|
97
|
-
)}
|
|
98
|
-
</Combobox.Option>
|
|
99
|
-
))}
|
|
100
|
-
</Combobox.Options>
|
|
101
|
-
</Transition>
|
|
102
|
-
</div>
|
|
103
|
-
</Combobox>
|
|
104
|
-
</div>
|
|
105
|
-
);
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export default FilterCommute;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Button from '~/components/modules/buttons/default';
|
|
3
|
-
|
|
4
|
-
const Filter = ({
|
|
5
|
-
className,
|
|
6
|
-
hasActiveFilters,
|
|
7
|
-
filteredListings,
|
|
8
|
-
selectedFilters,
|
|
9
|
-
setMobileTab,
|
|
10
|
-
handleReset,
|
|
11
|
-
children
|
|
12
|
-
}) => {
|
|
13
|
-
return (
|
|
14
|
-
<div
|
|
15
|
-
className={`
|
|
16
|
-
hc-relative hc-max-h-[95vh] md:hc-max-h-screen hc-overflow-y-auto hc-overflow-x-auto
|
|
17
|
-
${className ?? ""}
|
|
18
|
-
`}
|
|
19
|
-
>
|
|
20
|
-
<div className="hc-px-4 md:hc-pt-4 hc-space-y-4">
|
|
21
|
-
{children}
|
|
22
|
-
</div>
|
|
23
|
-
<div className="hc-sticky hc-bottom-0 hc-inset-x-0 hc-flex hc-items-center hc-justify-between hc-gap-2 hc-py-2 hc-px-4 hc-mt-2 hc-bg-white md:hc-bg-gray-100">
|
|
24
|
-
<Button.Btn
|
|
25
|
-
onClick={handleReset}
|
|
26
|
-
variant="outline"
|
|
27
|
-
size="sm"
|
|
28
|
-
>
|
|
29
|
-
Reset
|
|
30
|
-
</Button.Btn>
|
|
31
|
-
{selectedFilters && Object.keys(selectedFilters).length > 0 &&
|
|
32
|
-
<Button.Btn
|
|
33
|
-
onClick={() => setMobileTab("listTab")}
|
|
34
|
-
variant="primary"
|
|
35
|
-
size="sm"
|
|
36
|
-
className={`
|
|
37
|
-
md:hc-hidden
|
|
38
|
-
${hasActiveFilters ? "hc-opacity-0 hc-pointer-events-none" : "hc-opacity-100"}
|
|
39
|
-
`}
|
|
40
|
-
>
|
|
41
|
-
<Button.Body>
|
|
42
|
-
<Button.Icon
|
|
43
|
-
icon="fluent:search-12-filled"
|
|
44
|
-
size="hc-size-3.5"
|
|
45
|
-
/>
|
|
46
|
-
Show {filteredListings.length} Jobs
|
|
47
|
-
</Button.Body>
|
|
48
|
-
</Button.Btn>
|
|
49
|
-
}
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export default Filter;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const FilterItem = ({
|
|
4
|
-
className,
|
|
5
|
-
item,
|
|
6
|
-
type,
|
|
7
|
-
itemKey,
|
|
8
|
-
hasCount,
|
|
9
|
-
field,
|
|
10
|
-
activeItem,
|
|
11
|
-
setActiveItem,
|
|
12
|
-
changeHandler,
|
|
13
|
-
...rest
|
|
14
|
-
}) => {
|
|
15
|
-
const itemName = item.name ? item.name : item;
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<label
|
|
19
|
-
className={`
|
|
20
|
-
hc-flex hc-items-start hc-gap-2 hc-px-2 hc-py-1.5 hc-rounded-sm hc-text-sm hc-cursor-pointer hc-transition hover:hc-bg-uiAccent/5
|
|
21
|
-
${className ?? ""}
|
|
22
|
-
`}
|
|
23
|
-
{...rest}
|
|
24
|
-
>
|
|
25
|
-
<input
|
|
26
|
-
id={itemKey}
|
|
27
|
-
name={field}
|
|
28
|
-
disabled={item.count === 0}
|
|
29
|
-
value={itemName}
|
|
30
|
-
type={type}
|
|
31
|
-
className="hc-size-4 hc-mt-px hc-text-primary hc-border-uiAccent/30 hc-transition-colors hc-rounded-sm"
|
|
32
|
-
checked={activeItem}
|
|
33
|
-
onChange={() => {
|
|
34
|
-
setActiveItem(!activeItem);
|
|
35
|
-
changeHandler();
|
|
36
|
-
}}
|
|
37
|
-
/>
|
|
38
|
-
<span className="font-medium">{itemName}</span>
|
|
39
|
-
{hasCount && (
|
|
40
|
-
<span className="hc-inline-block hc-mt-1 hc-ml-auto hc-text-xs hc-leading-none hc-text-primary">
|
|
41
|
-
({item.count})
|
|
42
|
-
</span>
|
|
43
|
-
)}
|
|
44
|
-
</label>
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export default FilterItem;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Accordion from '~/components/modules/accordions/default';
|
|
3
|
-
import FilterCard from '~/components/modules/cards/filter';
|
|
4
|
-
import AccordionFilterItem from '~/components/containers/accordions/filter-item-container';
|
|
5
|
-
import Loading from '~/util/loading';
|
|
6
|
-
|
|
7
|
-
const FilterLocation = ({
|
|
8
|
-
className,
|
|
9
|
-
defaultValue,
|
|
10
|
-
setDefaultValue,
|
|
11
|
-
setLocation,
|
|
12
|
-
setSelectedListItem,
|
|
13
|
-
locations,
|
|
14
|
-
setSelectedFilters,
|
|
15
|
-
selectedFilters,
|
|
16
|
-
children
|
|
17
|
-
}) => {
|
|
18
|
-
return (
|
|
19
|
-
<FilterCard className={className ?? ""}>
|
|
20
|
-
<FilterCard.Title icon="fluent:location-16-filled">
|
|
21
|
-
<span>
|
|
22
|
-
<span className="hc-hidden lg:hc-inline">Job</span> location
|
|
23
|
-
</span>
|
|
24
|
-
</FilterCard.Title>
|
|
25
|
-
{!locations && <Loading />}
|
|
26
|
-
{locations && (
|
|
27
|
-
<Accordion defaultValue={defaultValue} className="hc-space-y-4">
|
|
28
|
-
{locations?.map(filter => (
|
|
29
|
-
<AccordionFilterItem
|
|
30
|
-
key={filter.id}
|
|
31
|
-
filter={filter}
|
|
32
|
-
setDefaultValue={setDefaultValue}
|
|
33
|
-
selectedFilters={selectedFilters}
|
|
34
|
-
setSelectedFilters={prevFilters => {
|
|
35
|
-
setSelectedFilters(prevFilters);
|
|
36
|
-
setLocation(null);
|
|
37
|
-
setSelectedListItem(null);
|
|
38
|
-
}}
|
|
39
|
-
/>
|
|
40
|
-
))}
|
|
41
|
-
{children}
|
|
42
|
-
</Accordion>
|
|
43
|
-
)}
|
|
44
|
-
</FilterCard>
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export default FilterLocation;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Icon from '~/components/modules/icon';
|
|
3
|
-
|
|
4
|
-
const RadioItem = ({
|
|
5
|
-
className,
|
|
6
|
-
item,
|
|
7
|
-
field,
|
|
8
|
-
isActive,
|
|
9
|
-
changeHandler,
|
|
10
|
-
...rest
|
|
11
|
-
}) => {
|
|
12
|
-
return (
|
|
13
|
-
<label
|
|
14
|
-
key={item.key}
|
|
15
|
-
className={`
|
|
16
|
-
hc-flex hc-items-start hc-gap-2 hc-px-2 hc-py-1.5 hc-rounded-sm hc-text-sm hc-cursor-pointer hc-transition hover:hc-bg-uiAccent/5
|
|
17
|
-
${item.count === 0 ? 'hc-text-uiDisabled hc-cursor-not-allowed' : 'hover:hc-bg-uiAccent/5'}
|
|
18
|
-
${className ?? ""}
|
|
19
|
-
`}
|
|
20
|
-
{...rest}
|
|
21
|
-
>
|
|
22
|
-
<input
|
|
23
|
-
key={item.key}
|
|
24
|
-
id={item.key}
|
|
25
|
-
name={field}
|
|
26
|
-
value={item.key}
|
|
27
|
-
type="radio"
|
|
28
|
-
className="hc-size-4 hc-mt-px hc-text-primary hc-border-uiAccent/30 hc-transition-colors hc-rounded-full"
|
|
29
|
-
checked={isActive}
|
|
30
|
-
onClick={changeHandler}
|
|
31
|
-
/>
|
|
32
|
-
<span className="hc-font-medium">{item.key}</span>
|
|
33
|
-
{isActive &&
|
|
34
|
-
<div className="hc-w-full hc-unselect-div">
|
|
35
|
-
<Icon className="hc-float-right" icon="mdi:times"></Icon>
|
|
36
|
-
</div>
|
|
37
|
-
}
|
|
38
|
-
</label>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export default RadioItem;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Button from '~/components/modules/buttons/default';
|
|
3
|
-
import Icon from '~/components/modules/icon';
|
|
4
|
-
import FilterCard from '~/components/modules/cards/filter';
|
|
5
|
-
|
|
6
|
-
const Search = ({
|
|
7
|
-
inputPlaceholder,
|
|
8
|
-
showSearchIcon,
|
|
9
|
-
className,
|
|
10
|
-
labelClassName,
|
|
11
|
-
inputValue,
|
|
12
|
-
handleInputChange,
|
|
13
|
-
handleReset,
|
|
14
|
-
label
|
|
15
|
-
}) => {
|
|
16
|
-
return (
|
|
17
|
-
<FilterCard as="form" className={className ?? ""}>
|
|
18
|
-
<FilterCard.Title
|
|
19
|
-
as="label"
|
|
20
|
-
icon="fluent:search-12-filled"
|
|
21
|
-
className={labelClassName ?? ""}
|
|
22
|
-
>
|
|
23
|
-
<span>
|
|
24
|
-
{label}
|
|
25
|
-
</span>
|
|
26
|
-
</FilterCard.Title>
|
|
27
|
-
|
|
28
|
-
<div className="hc-relative hc-flex hc-items-center hc-px-2 hc-rounded hc-bg-white hc-border hc-border-uiAccent/20 focus-within:hc-ring-1 focus-within:hc-ring-uiAccent">
|
|
29
|
-
{showSearchIcon && (
|
|
30
|
-
<Icon
|
|
31
|
-
icon="fluent:search-12-filled"
|
|
32
|
-
size="hc-size-4"
|
|
33
|
-
className="hc-mr-2 hc-text-uiAccent/50"
|
|
34
|
-
/>
|
|
35
|
-
)}
|
|
36
|
-
<input
|
|
37
|
-
type="text"
|
|
38
|
-
name="search"
|
|
39
|
-
onKeyDown={e => {
|
|
40
|
-
if (e.key === 'Enter') {
|
|
41
|
-
e.preventDefault();
|
|
42
|
-
}
|
|
43
|
-
}}
|
|
44
|
-
placeholder={inputPlaceholder}
|
|
45
|
-
value={inputValue}
|
|
46
|
-
className="hc-w-full hc-px-0 hc-py-2 hc-text-sm hc-border-0 hc-transition-colors placeholder:hc-text-uiText/50 focus:hc-ring-0 focus:hc-outline-none"
|
|
47
|
-
onChange={handleInputChange}
|
|
48
|
-
/>
|
|
49
|
-
|
|
50
|
-
<Button.Btn
|
|
51
|
-
type="reset"
|
|
52
|
-
variant="icon"
|
|
53
|
-
size="sqsm"
|
|
54
|
-
className={`transition-opacity ${inputValue ? "hc-opacity-100" : "hc-opacity-0 hc-pointer-events-none"}`}
|
|
55
|
-
onClick={handleReset}
|
|
56
|
-
>
|
|
57
|
-
<span className="sr-only">Clear</span>
|
|
58
|
-
<Button.Icon icon="uil:times" className="hc-text-uiAccent" />
|
|
59
|
-
</Button.Btn>
|
|
60
|
-
</div>
|
|
61
|
-
</FilterCard>
|
|
62
|
-
);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export default Search;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
import * as Select from '@radix-ui/react-select';
|
|
3
|
-
import { twMerge } from 'tailwind-merge';
|
|
4
|
-
|
|
5
|
-
import Icon from '~/components/modules/icon';
|
|
6
|
-
import Button from '~/components/modules/buttons/default';
|
|
7
|
-
|
|
8
|
-
const FilterSort = ({ className, fields, setSortSetting, fieldNames }) => {
|
|
9
|
-
const handleSortChange = value => {
|
|
10
|
-
const [field, direction] = value.split("-");
|
|
11
|
-
setSortSetting({ field, type: direction });
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<div className={className ?? ""}>
|
|
16
|
-
<Select.Root onValueChange={handleSortChange}>
|
|
17
|
-
<Select.Trigger asChild aria-label="Sort">
|
|
18
|
-
<Button.Btn variant="outline" size="sm" className="hc-normal-case">
|
|
19
|
-
<Button.Body className="hc-justify-center">
|
|
20
|
-
<Select.Value placeholder={
|
|
21
|
-
<span className="hc-flex hc-items-center hc-gap-2">
|
|
22
|
-
Sort
|
|
23
|
-
<Icon icon="mdi:sort" />
|
|
24
|
-
</span>
|
|
25
|
-
} />
|
|
26
|
-
<Select.Icon>
|
|
27
|
-
<Button.Icon icon="mdi:chevron-down" />
|
|
28
|
-
</Select.Icon>
|
|
29
|
-
</Button.Body>
|
|
30
|
-
</Button.Btn>
|
|
31
|
-
</Select.Trigger>
|
|
32
|
-
<Select.Portal>
|
|
33
|
-
<Select.Content className={`hc-relative hc-z-[200] hc-overflow-hidden hc-bg-white hc-rounded-md `}>
|
|
34
|
-
<Select.ScrollUpButton className="hc-flex hc-items-center hc-justify-center hc-h-5 hc-bg-white hc-text-primary hc-cursor-default">
|
|
35
|
-
<Icon icon="mdi:chevron-up" />
|
|
36
|
-
</Select.ScrollUpButton>
|
|
37
|
-
<Select.Viewport className="hc-p-1">
|
|
38
|
-
{fields.map(field => (
|
|
39
|
-
<Select.Group key={field}>
|
|
40
|
-
<SelectItem value={`${field}-asc`}>
|
|
41
|
-
<span className="hc-flex hc-items-center hc-justify-between hc-gap-2 hc-w-full">
|
|
42
|
-
{fieldNames[field] ?? field}
|
|
43
|
-
<Icon icon="mdi:sort-ascending" />
|
|
44
|
-
</span>
|
|
45
|
-
</SelectItem>
|
|
46
|
-
<SelectItem value={`${field}-desc`}>
|
|
47
|
-
<span className="hc-flex hc-items-center hc-justify-between hc-gap-2 w-full">
|
|
48
|
-
{fieldNames[field] ?? field}
|
|
49
|
-
<Icon icon="mdi:sort-descending" />
|
|
50
|
-
</span>
|
|
51
|
-
</SelectItem>
|
|
52
|
-
</Select.Group>
|
|
53
|
-
))}
|
|
54
|
-
</Select.Viewport>
|
|
55
|
-
<Select.ScrollDownButton className="hc-flex hc-items-center hc-justify-center hc-h-5 hc-bg-white hc-text-primary hc-cursor-default">
|
|
56
|
-
<Icon icon="mdi:chevron-down" />
|
|
57
|
-
</Select.ScrollDownButton>
|
|
58
|
-
</Select.Content>
|
|
59
|
-
</Select.Portal>
|
|
60
|
-
</Select.Root>
|
|
61
|
-
</div>
|
|
62
|
-
);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
const SelectItem = forwardRef(({ children, className, ...props }, forwardedRef) => (
|
|
66
|
-
<Select.Item
|
|
67
|
-
className={twMerge(
|
|
68
|
-
"hc-text-sm hc-leading-none hc-rounded-sm hc-flex hc-items-center hc-w-full hc-py-1.5 hc-pr-4 hc-pl-7 hc-relative hc-select-none hc-cursor-pointer data-[disabled]:hc-text-gray-500 data-[disabled]:hc-pointer-events-none data-[highlighted]:hc-outline-none data-[highlighted]:hc-bg-primary data-[highlighted]:hc-text-white",
|
|
69
|
-
className
|
|
70
|
-
)}
|
|
71
|
-
{...props}
|
|
72
|
-
ref={forwardedRef}
|
|
73
|
-
>
|
|
74
|
-
<Select.ItemText>{children}</Select.ItemText>
|
|
75
|
-
<Select.ItemIndicator className="hc-absolute hc-left-0 hc-w-8 hc-inline-flex hc-items-center hc-justify-center">
|
|
76
|
-
<Icon icon="mdi:check" />
|
|
77
|
-
</Select.ItemIndicator>
|
|
78
|
-
</Select.Item>
|
|
79
|
-
));
|
|
80
|
-
|
|
81
|
-
SelectItem.displayName = "SelectItem";
|
|
82
|
-
|
|
83
|
-
export default FilterSort;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
import { twMerge } from 'tailwind-merge';
|
|
3
|
-
|
|
4
|
-
const Grid = forwardRef((props, ref) => {
|
|
5
|
-
const {
|
|
6
|
-
as = 'div',
|
|
7
|
-
children,
|
|
8
|
-
className,
|
|
9
|
-
autoRows = true,
|
|
10
|
-
columns = 'md:hc-grid-cols-2',
|
|
11
|
-
gap = 'hc-gap-12 lg:hc-gap-16',
|
|
12
|
-
...rest
|
|
13
|
-
} = props;
|
|
14
|
-
|
|
15
|
-
const Container = as;
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<Container
|
|
19
|
-
ref={ref}
|
|
20
|
-
className={twMerge(
|
|
21
|
-
'hc-grid',
|
|
22
|
-
gap,
|
|
23
|
-
autoRows ? 'hc-auto-rows-min' : '',
|
|
24
|
-
'hc-grid-cols-1',
|
|
25
|
-
columns,
|
|
26
|
-
className ?? ''
|
|
27
|
-
)}
|
|
28
|
-
{...rest}
|
|
29
|
-
>
|
|
30
|
-
{children}
|
|
31
|
-
</Container>
|
|
32
|
-
);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
export const GridItem = ({
|
|
36
|
-
as = 'div',
|
|
37
|
-
children,
|
|
38
|
-
className
|
|
39
|
-
}) => {
|
|
40
|
-
const Container = as;
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<Container
|
|
44
|
-
className={className ?? ''}
|
|
45
|
-
>
|
|
46
|
-
{children}
|
|
47
|
-
</Container>
|
|
48
|
-
);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
Grid.Item = GridItem;
|
|
52
|
-
|
|
53
|
-
Grid.displayName = 'Grid';
|
|
54
|
-
export default Grid;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Icon } from '@iconify/react';
|
|
3
|
-
|
|
4
|
-
const IconContained = ({
|
|
5
|
-
className,
|
|
6
|
-
size,
|
|
7
|
-
icon,
|
|
8
|
-
iconClasses,
|
|
9
|
-
title,
|
|
10
|
-
...iconProps
|
|
11
|
-
}) => {
|
|
12
|
-
return (
|
|
13
|
-
<span
|
|
14
|
-
title={title}
|
|
15
|
-
className={`
|
|
16
|
-
hc-inline-block hc-align-middle
|
|
17
|
-
${className ?? ''}
|
|
18
|
-
${size ?? ''}
|
|
19
|
-
`}
|
|
20
|
-
>
|
|
21
|
-
<Icon
|
|
22
|
-
icon={icon}
|
|
23
|
-
className={`
|
|
24
|
-
${iconClasses ?? ''}
|
|
25
|
-
${size ?? ''}
|
|
26
|
-
`}
|
|
27
|
-
{...iconProps}
|
|
28
|
-
/>
|
|
29
|
-
</span>
|
|
30
|
-
);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export default IconContained;
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import RecruiterHeadshot from '~/components/modules/list/item-expand-card/recruiter-headshot';
|
|
3
|
-
import RecruiterDetails from '~/components/modules/list/item-expand-card/recruiter-details';
|
|
4
|
-
import RecruiterContactNav from '~/components/modules/list/item-expand-card/recruiter-contact-nav';
|
|
5
|
-
import ApplyButtonGroup from '~/components/modules/buttons/button-group-apply';
|
|
6
|
-
import CommutePill from '~/components/modules/buttons/commute-pill';
|
|
7
|
-
|
|
8
|
-
const ListingDetails = ({
|
|
9
|
-
item,
|
|
10
|
-
recruiters,
|
|
11
|
-
travelTime,
|
|
12
|
-
useDetailsPostMessage,
|
|
13
|
-
navigateToDetails,
|
|
14
|
-
navigateToEasyApply,
|
|
15
|
-
Link,
|
|
16
|
-
linkFormat,
|
|
17
|
-
useApplyDialog,
|
|
18
|
-
internalApplyLink,
|
|
19
|
-
companyName,
|
|
20
|
-
jobsDomain,
|
|
21
|
-
trackEvent,
|
|
22
|
-
eventTypes
|
|
23
|
-
}) => {
|
|
24
|
-
if (!item) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
let matchingRecruiter = !recruiters ? null : recruiters[item?.recruiterId];
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<div className="hc-w-full">
|
|
32
|
-
<div className="hc-grow hc-flex hc-flex-wrap hc-items-center hc-gap-4">
|
|
33
|
-
{matchingRecruiter?.headshot && (
|
|
34
|
-
<RecruiterHeadshot
|
|
35
|
-
image={`https:${matchingRecruiter.headshot}`}
|
|
36
|
-
alt={matchingRecruiter?.firstName}
|
|
37
|
-
className="hc-bg-gray-300"
|
|
38
|
-
/>
|
|
39
|
-
)}
|
|
40
|
-
{matchingRecruiter && (
|
|
41
|
-
<RecruiterDetails
|
|
42
|
-
contactNav={
|
|
43
|
-
<RecruiterContactNav>
|
|
44
|
-
{matchingRecruiter?.mobilePhone && (
|
|
45
|
-
<RecruiterContactNav.Button
|
|
46
|
-
href={`tel:${matchingRecruiter.mobilePhone}`}
|
|
47
|
-
title={`Call ${matchingRecruiter.mobilePhone}`}
|
|
48
|
-
icon="fluent:phone-32-regular"
|
|
49
|
-
/>
|
|
50
|
-
)}
|
|
51
|
-
{matchingRecruiter?.email && (
|
|
52
|
-
<RecruiterContactNav.Button
|
|
53
|
-
href={`mailto:${matchingRecruiter.email}`}
|
|
54
|
-
title={`email ${matchingRecruiter.email}`}
|
|
55
|
-
icon="bi:envelope-at"
|
|
56
|
-
/>
|
|
57
|
-
)}
|
|
58
|
-
{matchingRecruiter?.linkedIn && (
|
|
59
|
-
<RecruiterContactNav.Button
|
|
60
|
-
href={matchingRecruiter.linkedIn}
|
|
61
|
-
title="LinkedIn"
|
|
62
|
-
icon="ant-design:linkedin-outlined"
|
|
63
|
-
/>
|
|
64
|
-
)}
|
|
65
|
-
</RecruiterContactNav>
|
|
66
|
-
}
|
|
67
|
-
>
|
|
68
|
-
{matchingRecruiter?.firstName && matchingRecruiter?.lastName && (
|
|
69
|
-
<RecruiterDetails.Title>
|
|
70
|
-
{`${matchingRecruiter?.firstName} ${matchingRecruiter?.lastName}`}
|
|
71
|
-
</RecruiterDetails.Title>
|
|
72
|
-
)}
|
|
73
|
-
{item.details?.recruiter?.title && (
|
|
74
|
-
<RecruiterDetails.Text>
|
|
75
|
-
{item.details.recruiter.title}
|
|
76
|
-
</RecruiterDetails.Text>
|
|
77
|
-
)}
|
|
78
|
-
</RecruiterDetails>
|
|
79
|
-
)}
|
|
80
|
-
<ApplyButtonGroup
|
|
81
|
-
useDetailsPostMessage={useDetailsPostMessage}
|
|
82
|
-
navigateToDetails={navigateToDetails}
|
|
83
|
-
navigateToEasyApply={navigateToEasyApply}
|
|
84
|
-
Link={Link}
|
|
85
|
-
linkFormat={linkFormat}
|
|
86
|
-
includeDialog={useApplyDialog}
|
|
87
|
-
internalApplyLink={internalApplyLink}
|
|
88
|
-
companyName={companyName}
|
|
89
|
-
applyUrl={item?.applyUrl}
|
|
90
|
-
itemId={item.id}
|
|
91
|
-
item={item}
|
|
92
|
-
trackEvent={trackEvent}
|
|
93
|
-
eventTypes={eventTypes}
|
|
94
|
-
detailsUrl={item.useClientJobUrl ? item?.detailsUrl : `${jobsDomain}${item.id}`}
|
|
95
|
-
className={`
|
|
96
|
-
lg:hc-w-auto hc-order-first lg:hc-order-last md:hc-self-center hc-py-2 lg:hc-p-0 lg:hc-mb-0 hc-border-b lg:hc-border-none hc-border-uiAccent/20
|
|
97
|
-
${matchingRecruiter ? "lg:hc-flex-col lg:hc-w-auto" : "lg:hc-flex-row"}
|
|
98
|
-
`}
|
|
99
|
-
/>
|
|
100
|
-
</div>
|
|
101
|
-
<div className="hc-w-full">
|
|
102
|
-
<CommutePill travelTime={travelTime} className="hc-ml-0" />
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
);
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export default ListingDetails;
|
|
109
|
-
|