@abcagency/hc-ui-components 1.3.61 → 1.3.63

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.
Files changed (279) hide show
  1. package/dist/apis/hcApi.js +85 -85
  2. package/dist/apis/hcApi.js.map +1 -1
  3. package/dist/clientToken.js.map +1 -1
  4. package/dist/components/HireControlMap.js +14 -4
  5. package/dist/components/HireControlMap.js.map +1 -1
  6. package/dist/components/containers/accordions/filter-container.js +10 -3
  7. package/dist/components/containers/accordions/filter-container.js.map +1 -1
  8. package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
  9. package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
  10. package/dist/components/containers/filter/commute-container.js +1 -1
  11. package/dist/components/containers/filter/commute-container.js.map +1 -1
  12. package/dist/components/containers/filter/filter-container.js.map +1 -1
  13. package/dist/components/containers/filter/filter-item-container.js.map +1 -1
  14. package/dist/components/containers/filter/location-container.js.map +1 -1
  15. package/dist/components/containers/filter/points-of-interest-container.js.map +1 -1
  16. package/dist/components/containers/filter/points-of-interest-radio-item-container.js.map +1 -1
  17. package/dist/components/containers/filter/search-container.js.map +1 -1
  18. package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
  19. package/dist/components/containers/list/item-list-container.js +21 -21
  20. package/dist/components/containers/list/item-list-container.js.map +1 -1
  21. package/dist/components/containers/list/list-item/list-item-container.js.map +1 -1
  22. package/dist/components/containers/maps/info-window-content-container.js.map +1 -1
  23. package/dist/components/containers/maps/map-container.js +1 -1
  24. package/dist/components/containers/maps/map-container.js.map +1 -1
  25. package/dist/components/containers/maps/map-list-container.js.map +1 -1
  26. package/dist/components/containers/maps/map-marker-container.js +1 -1
  27. package/dist/components/containers/maps/map-marker-container.js.map +1 -1
  28. package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
  29. package/dist/components/modules/accordions/default.js +2 -2
  30. package/dist/components/modules/accordions/default.js.map +1 -1
  31. package/dist/components/modules/accordions/filterItem.js.map +1 -1
  32. package/dist/components/modules/accordions/filters.js.map +1 -1
  33. package/dist/components/modules/buttons/button-group-apply.js +1 -1
  34. package/dist/components/modules/buttons/button-group-apply.js.map +1 -1
  35. package/dist/components/modules/buttons/commute-pill.js.map +1 -1
  36. package/dist/components/modules/buttons/default.js +2 -2
  37. package/dist/components/modules/buttons/default.js.map +1 -1
  38. package/dist/components/modules/buttons/items-pill.js +5 -8
  39. package/dist/components/modules/buttons/items-pill.js.map +1 -1
  40. package/dist/components/modules/buttons/pill-wrapper.js.map +1 -1
  41. package/dist/components/modules/buttons/show-all-button.js.map +1 -1
  42. package/dist/components/modules/cards/default.js +2 -2
  43. package/dist/components/modules/cards/default.js.map +1 -1
  44. package/dist/components/modules/cards/filter.js.map +1 -1
  45. package/dist/components/modules/dialogs/apply-dialog.js +1 -1
  46. package/dist/components/modules/dialogs/apply-dialog.js.map +1 -1
  47. package/dist/components/modules/filter/commute.js +2 -2
  48. package/dist/components/modules/filter/commute.js.map +1 -1
  49. package/dist/components/modules/filter/index.js +1 -1
  50. package/dist/components/modules/filter/index.js.map +1 -1
  51. package/dist/components/modules/filter/item.js.map +1 -1
  52. package/dist/components/modules/filter/location.js.map +1 -1
  53. package/dist/components/modules/filter/radio-item.js.map +1 -1
  54. package/dist/components/modules/filter/search.js.map +1 -1
  55. package/dist/components/modules/filter/sort.js +2 -2
  56. package/dist/components/modules/filter/sort.js.map +1 -1
  57. package/dist/components/modules/grid.js +1 -1
  58. package/dist/components/modules/grid.js.map +1 -1
  59. package/dist/components/modules/icon.js +1 -1
  60. package/dist/components/modules/icon.js.map +1 -1
  61. package/dist/components/modules/jobListing/listing-details.js +1 -1
  62. package/dist/components/modules/jobListing/listing-details.js.map +1 -1
  63. package/dist/components/modules/list/field-mapper.js.map +1 -1
  64. package/dist/components/modules/list/header-item.js.map +1 -1
  65. package/dist/components/modules/list/header.js +1 -1
  66. package/dist/components/modules/list/header.js.map +1 -1
  67. package/dist/components/modules/list/item-expand-card/index.js +1 -1
  68. package/dist/components/modules/list/item-expand-card/index.js.map +1 -1
  69. package/dist/components/modules/list/item-expand-card/recruiter-contact-nav.js +38 -38
  70. package/dist/components/modules/list/item-expand-card/recruiter-details.js +40 -40
  71. package/dist/components/modules/list/item-expand-card/recruiter-headshot.js +20 -20
  72. package/dist/components/modules/list/item-list.js +43 -43
  73. package/dist/components/modules/list/item-list.js.map +1 -1
  74. package/dist/components/modules/list/list-item/list-item.js.map +1 -1
  75. package/dist/components/modules/maps/info-window-card.js.map +1 -1
  76. package/dist/components/modules/maps/info-window-content.js.map +1 -1
  77. package/dist/components/modules/maps/map-list.js.map +1 -1
  78. package/dist/components/modules/maps/map-marker.js +1 -1
  79. package/dist/components/modules/maps/map-marker.js.map +1 -1
  80. package/dist/components/modules/maps/map.js +1 -1
  81. package/dist/components/modules/maps/map.js.map +1 -1
  82. package/dist/components/modules/maps/place-marker.js +1 -1
  83. package/dist/components/modules/maps/place-marker.js.map +1 -1
  84. package/dist/components/modules/maps/tabs.js +1 -1
  85. package/dist/components/modules/maps/tabs.js.map +1 -1
  86. package/dist/constants/eventTypes.js.map +1 -1
  87. package/dist/constants/placeTypes.js.map +1 -1
  88. package/dist/contexts/mapContext.js +83 -83
  89. package/dist/contexts/mapContext.js.map +1 -1
  90. package/dist/contexts/mapListContext.js +211 -192
  91. package/dist/contexts/mapListContext.js.map +1 -1
  92. package/dist/contexts/placesContext.js.map +1 -1
  93. package/dist/contexts/themeContext.js.map +1 -1
  94. package/dist/contexts/trackEventContext.js.map +1 -1
  95. package/dist/hooks/useList.js.map +1 -1
  96. package/dist/services/configService.js +9 -9
  97. package/dist/services/configService.js.map +1 -1
  98. package/dist/services/googlePlacesNearbyService.js +32 -32
  99. package/dist/services/googlePlacesNearbyService.js.map +1 -1
  100. package/dist/services/listingAggregatorService.js +34 -34
  101. package/dist/services/listingAggregatorService.js.map +1 -1
  102. package/dist/services/listingEntityService.js +9 -9
  103. package/dist/services/listingEntityService.js.map +1 -1
  104. package/dist/services/listingService.js +24 -24
  105. package/dist/services/listingService.js.map +1 -1
  106. package/dist/services/recruiterService.js +10 -10
  107. package/dist/services/recruiterService.js.map +1 -1
  108. package/dist/styles/index.css +1 -1
  109. package/dist/types/apis/hcApi.d.ts +5 -5
  110. package/dist/types/clientToken.d.ts +2 -2
  111. package/dist/types/components/containers/accordions/map-accordion-item-container.d.ts +12 -12
  112. package/dist/types/components/containers/jobListing/listing-details-container.d.ts +6 -6
  113. package/dist/types/components/containers/list/item-list-container.d.ts +9 -9
  114. package/dist/types/components/containers/list/list-item/list-item-container.d.ts +14 -14
  115. package/dist/types/components/modules/accordions/MapAccordionItem.d.ts +10 -10
  116. package/dist/types/components/modules/accordions/default.d.ts +19 -19
  117. package/dist/types/components/modules/buttons/button-group-apply.d.ts +24 -24
  118. package/dist/types/components/modules/buttons/commute-pill.d.ts +5 -5
  119. package/dist/types/components/modules/buttons/default.d.ts +48 -48
  120. package/dist/types/components/modules/buttons/pill-wrapper.d.ts +3 -3
  121. package/dist/types/components/modules/dialogs/apply-dialog.d.ts +8 -8
  122. package/dist/types/components/modules/filter/sort.d.ts +8 -8
  123. package/dist/types/components/modules/grid.d.ts +8 -8
  124. package/dist/types/components/modules/icon.d.ts +10 -10
  125. package/dist/types/components/modules/jobListing/listing-details.d.ts +20 -20
  126. package/dist/types/components/modules/list/field-mapper.d.ts +10 -10
  127. package/dist/types/components/modules/list/header-item.d.ts +11 -11
  128. package/dist/types/components/modules/list/header.d.ts +12 -12
  129. package/dist/types/components/modules/list/item-expand-card/index.d.ts +7 -7
  130. package/dist/types/components/modules/list/item-expand-card/recruiter-contact-nav.d.ts +17 -17
  131. package/dist/types/components/modules/list/item-expand-card/recruiter-details.d.ts +21 -21
  132. package/dist/types/components/modules/list/item-expand-card/recruiter-headshot.d.ts +8 -8
  133. package/dist/types/components/modules/list/item-list.d.ts +20 -20
  134. package/dist/types/components/modules/list/list-item/list-item.d.ts +3 -3
  135. package/dist/types/constants/eventTypes.d.ts +15 -15
  136. package/dist/types/contexts/mapContext.d.ts +29 -29
  137. package/dist/types/contexts/mapListContext.d.ts +69 -65
  138. package/dist/types/contexts/trackEventContext.d.ts +6 -6
  139. package/dist/types/enums/SectionType.d.ts +9 -9
  140. package/dist/types/hooks/useList.d.ts +13 -13
  141. package/dist/types/services/configService.d.ts +6 -6
  142. package/dist/types/services/googlePlacesNearbyService.d.ts +5 -5
  143. package/dist/types/services/listingAggregatorService.d.ts +12 -12
  144. package/dist/types/services/listingEntityService.d.ts +6 -6
  145. package/dist/types/services/listingService.d.ts +9 -9
  146. package/dist/types/services/recruiterService.d.ts +6 -6
  147. package/dist/types/types/Address.d.ts +7 -7
  148. package/dist/types/types/ContentSection.d.ts +8 -8
  149. package/dist/types/types/GetListingParams.d.ts +8 -8
  150. package/dist/types/types/LatLng.d.ts +4 -4
  151. package/dist/types/types/ListingEntity.d.ts +10 -10
  152. package/dist/types/types/ListingFields.d.ts +25 -25
  153. package/dist/types/types/Listings.d.ts +31 -31
  154. package/dist/types/types/Recruiter.d.ts +9 -9
  155. package/dist/types/types/SimilarListing.d.ts +24 -24
  156. package/dist/types/types/config/Colors.d.ts +8 -8
  157. package/dist/types/types/config/MapConfig.d.ts +30 -30
  158. package/dist/types/types/config/PointsOfInterestConfig.d.ts +13 -13
  159. package/dist/types/types/config/SearchConfig.d.ts +4 -4
  160. package/dist/types/util/filterUtil.d.ts +28 -28
  161. package/dist/types/util/loading.d.ts +3 -3
  162. package/dist/types/util/localStorageUtil.d.ts +3 -3
  163. package/dist/types/util/mapUtil.d.ts +16 -16
  164. package/dist/types/util/sortUtil.d.ts +1 -1
  165. package/dist/types/util/stringUtils.d.ts +1 -1
  166. package/dist/types/util/urlFilterUtil.d.ts +8 -8
  167. package/dist/util/filterUtil.js +1 -1
  168. package/dist/util/filterUtil.js.map +1 -1
  169. package/dist/util/loading.js.map +1 -1
  170. package/dist/util/localStorageUtil.js +37 -37
  171. package/dist/util/localStorageUtil.js.map +1 -1
  172. package/dist/util/mapIconUtil.js.map +1 -1
  173. package/dist/util/mapUtil.js.map +1 -1
  174. package/dist/util/sortUtil.js.map +1 -1
  175. package/dist/util/stringUtils.js.map +1 -1
  176. package/dist/util/urlFilterUtil.js.map +1 -1
  177. package/package.json +90 -90
  178. package/src/.editorconfig +12 -12
  179. package/src/apis/hcApi.ts +109 -109
  180. package/src/bundleIndex.js +14 -14
  181. package/src/clientToken.js +9 -9
  182. package/src/components/HireControlMap.js +153 -148
  183. package/src/components/containers/accordions/filter-container.js +52 -48
  184. package/src/components/containers/accordions/filter-item-container.js +83 -83
  185. package/src/components/containers/accordions/map-accordion-item-container.js +70 -70
  186. package/src/components/containers/filter/commute-container.js +89 -89
  187. package/src/components/containers/filter/filter-container.js +76 -76
  188. package/src/components/containers/filter/filter-item-container.js +117 -117
  189. package/src/components/containers/filter/location-container.js +45 -45
  190. package/src/components/containers/filter/points-of-interest-container.js +33 -33
  191. package/src/components/containers/filter/points-of-interest-radio-item-container.js +35 -35
  192. package/src/components/containers/filter/search-container.js +61 -61
  193. package/src/components/containers/jobListing/listing-details-container.js +42 -42
  194. package/src/components/containers/list/item-list-container.tsx +81 -81
  195. package/src/components/containers/list/list-item/list-item-container.js +43 -43
  196. package/src/components/containers/maps/info-window-content-container.js +53 -53
  197. package/src/components/containers/maps/map-container.js +249 -249
  198. package/src/components/containers/maps/map-list-container.js +50 -50
  199. package/src/components/containers/maps/map-marker-container.js +78 -78
  200. package/src/components/modules/accordions/MapAccordionItem.js +30 -30
  201. package/src/components/modules/accordions/default.js +171 -171
  202. package/src/components/modules/accordions/filterItem.js +27 -27
  203. package/src/components/modules/accordions/filters.js +32 -32
  204. package/src/components/modules/buttons/button-group-apply.js +115 -115
  205. package/src/components/modules/buttons/commute-pill.js +22 -22
  206. package/src/components/modules/buttons/default.js +194 -194
  207. package/src/components/modules/buttons/items-pill.js +31 -35
  208. package/src/components/modules/buttons/pill-wrapper.js +27 -27
  209. package/src/components/modules/buttons/show-all-button.js +19 -19
  210. package/src/components/modules/cards/default.js +167 -167
  211. package/src/components/modules/cards/filter.js +56 -56
  212. package/src/components/modules/dialogs/apply-dialog.js +48 -48
  213. package/src/components/modules/filter/commute.js +108 -108
  214. package/src/components/modules/filter/index.js +55 -55
  215. package/src/components/modules/filter/item.js +69 -69
  216. package/src/components/modules/filter/location.js +51 -51
  217. package/src/components/modules/filter/radio-item.js +42 -42
  218. package/src/components/modules/filter/search.js +79 -79
  219. package/src/components/modules/filter/sort.js +83 -83
  220. package/src/components/modules/grid.js +54 -54
  221. package/src/components/modules/icon.js +33 -33
  222. package/src/components/modules/jobListing/listing-details.js +110 -110
  223. package/src/components/modules/list/field-mapper.js +130 -130
  224. package/src/components/modules/list/header-item.js +92 -92
  225. package/src/components/modules/list/header.js +51 -51
  226. package/src/components/modules/list/item-expand-card/index.js +22 -22
  227. package/src/components/modules/list/item-expand-card/recruiter-contact-nav.js +50 -50
  228. package/src/components/modules/list/item-expand-card/recruiter-details.js +68 -68
  229. package/src/components/modules/list/item-expand-card/recruiter-headshot.js +22 -22
  230. package/src/components/modules/list/item-list.tsx +117 -117
  231. package/src/components/modules/list/list-item/list-item.js +130 -130
  232. package/src/components/modules/maps/info-window-card.js +17 -17
  233. package/src/components/modules/maps/info-window-content.js +64 -64
  234. package/src/components/modules/maps/map-list.js +38 -38
  235. package/src/components/modules/maps/map-marker.js +29 -29
  236. package/src/components/modules/maps/map.js +64 -64
  237. package/src/components/modules/maps/place-marker.js +41 -41
  238. package/src/components/modules/maps/tabs.js +81 -81
  239. package/src/constants/eventTypes.js +15 -15
  240. package/src/constants/placeTypes.js +8 -8
  241. package/src/contexts/mapContext.tsx +129 -129
  242. package/src/contexts/mapListContext.tsx +351 -326
  243. package/src/contexts/placesContext.js +102 -102
  244. package/src/contexts/themeContext.js +40 -40
  245. package/src/contexts/trackEventContext.js +14 -14
  246. package/src/enums/SectionType.ts +9 -9
  247. package/src/hooks/useList.js +89 -89
  248. package/src/index.js +3 -3
  249. package/src/services/configService.ts +16 -16
  250. package/src/services/googlePlacesNearbyService.ts +42 -42
  251. package/src/services/listingAggregatorService.ts +76 -76
  252. package/src/services/listingEntityService.ts +16 -16
  253. package/src/services/listingService.ts +40 -40
  254. package/src/services/recruiterService.ts +18 -18
  255. package/src/styles/bundle.css +268 -268
  256. package/src/styles/index.css +33 -33
  257. package/src/types/Address.ts +7 -7
  258. package/src/types/ContentSection.ts +9 -9
  259. package/src/types/GetListingParams.ts +8 -8
  260. package/src/types/LatLng.ts +4 -4
  261. package/src/types/ListingEntity.ts +11 -11
  262. package/src/types/ListingFields.ts +25 -25
  263. package/src/types/Listings.ts +32 -32
  264. package/src/types/Recruiter.ts +9 -9
  265. package/src/types/SimilarListing.ts +24 -24
  266. package/src/types/config/Colors.ts +8 -8
  267. package/src/types/config/MapConfig.ts +31 -31
  268. package/src/types/config/PointsOfInterestConfig.ts +13 -13
  269. package/src/types/config/SearchConfig.ts +4 -4
  270. package/src/util/arrayUtil.js +3 -3
  271. package/src/util/fieldMapper.js +22 -22
  272. package/src/util/filterUtil.js +311 -311
  273. package/src/util/loading.js +17 -17
  274. package/src/util/localStorageUtil.ts +34 -34
  275. package/src/util/mapIconUtil.js +180 -180
  276. package/src/util/mapUtil.js +92 -92
  277. package/src/util/sortUtil.js +32 -32
  278. package/src/util/stringUtils.js +6 -6
  279. package/src/util/urlFilterUtil.js +85 -85
@@ -1,48 +1,48 @@
1
- import React from 'react';
2
- import * as Dialog from '@radix-ui/react-dialog';
3
-
4
- import Button from '~/components/modules/buttons/default';
5
- import Icon from '~/components/modules/icon';
6
-
7
- const ApplyDialog = ({ children, applyUrl, internalApplyLink, companyName }) => (
8
-
9
- <Dialog.Root >
10
- <Dialog.Trigger asChild>
11
- {children}
12
- </Dialog.Trigger>
13
- <Dialog.Portal>
14
- <Dialog.Overlay className="hc-bg-black/50 hc-fixed hc-inset-0 hc-animate-overlayShow" />
15
- <Dialog.Content className="z-99 hc-fit-content hc-h-fit hc-animate-contentShow hc-fixed hc-inset-0 hc-m-auto hc-max-h-[85vh] hc-w-[90vw] hc-max-w-[450px] hc-rounded-[6px] hc-bg-white hc-p-[25px] hc-shadow-lg focus:hc-outline-none hc-flex hc-flex-col hc-items-center hc-text-center">
16
- <Dialog.Title className="hc-text-[17px] hc-font-medium hc-w-full">
17
- Career Opportunities
18
- </Dialog.Title>
19
- <Dialog.Description className="hc-mt-4 hc-mb-5 hc-text-[15px] hc-leading-normal hc-w-full">
20
- Are you currently a {companyName} employee?
21
- </Dialog.Description>
22
- <div className="hc-flex hc-justify-center hc-space-x-4 hc-w-full">
23
- <Dialog.Close asChild>
24
- <Button.Anchor variant="outline" href={internalApplyLink}>
25
- Yes
26
- </Button.Anchor>
27
- </Dialog.Close>
28
- <Dialog.Close asChild>
29
- <Button.Anchor variant="primary" href={applyUrl}>
30
- No
31
- </Button.Anchor>
32
- </Dialog.Close>
33
- </div>
34
- <Dialog.Close asChild>
35
- <Button.Anchor className="hc-absolute hc-top-[10px] hc-right-[10px] hc-inline-flex hc-h-[25px] hc-w-[25px] hc-items-center hc-justify-center hc-rounded-full focus:hc-outline-none"
36
- variant="ghost" aria-label="Close">
37
- <Icon
38
- icon="mdi:times"
39
- className="hc-cursor-pointer hc-text-black hover:hc-text-gray-500 hover:hc-opacity-75"
40
- />
41
- </Button.Anchor>
42
- </Dialog.Close>
43
- </Dialog.Content>
44
- </Dialog.Portal>
45
- </Dialog.Root>
46
- );
47
-
48
- export default ApplyDialog;
1
+ import React from 'react';
2
+ import * as Dialog from '@radix-ui/react-dialog';
3
+
4
+ import Button from '~/components/modules/buttons/default';
5
+ import Icon from '~/components/modules/icon';
6
+
7
+ const ApplyDialog = ({ children, applyUrl, internalApplyLink, companyName }) => (
8
+
9
+ <Dialog.Root >
10
+ <Dialog.Trigger asChild>
11
+ {children}
12
+ </Dialog.Trigger>
13
+ <Dialog.Portal>
14
+ <Dialog.Overlay className="hc-bg-black/50 hc-fixed hc-inset-0 hc-animate-overlayShow" />
15
+ <Dialog.Content className="z-99 hc-fit-content hc-h-fit hc-animate-contentShow hc-fixed hc-inset-0 hc-m-auto hc-max-h-[85vh] hc-w-[90vw] hc-max-w-[450px] hc-rounded-[6px] hc-bg-white hc-p-[25px] hc-shadow-lg focus:hc-outline-none hc-flex hc-flex-col hc-items-center hc-text-center">
16
+ <Dialog.Title className="hc-text-[17px] hc-font-medium hc-w-full">
17
+ Career Opportunities
18
+ </Dialog.Title>
19
+ <Dialog.Description className="hc-mt-4 hc-mb-5 hc-text-[15px] hc-leading-normal hc-w-full">
20
+ Are you currently a {companyName} employee?
21
+ </Dialog.Description>
22
+ <div className="hc-flex hc-justify-center hc-space-x-4 hc-w-full">
23
+ <Dialog.Close asChild>
24
+ <Button.Anchor variant="outline" href={internalApplyLink}>
25
+ Yes
26
+ </Button.Anchor>
27
+ </Dialog.Close>
28
+ <Dialog.Close asChild>
29
+ <Button.Anchor variant="primary" href={applyUrl}>
30
+ No
31
+ </Button.Anchor>
32
+ </Dialog.Close>
33
+ </div>
34
+ <Dialog.Close asChild>
35
+ <Button.Anchor className="hc-absolute hc-top-[10px] hc-right-[10px] hc-inline-flex hc-h-[25px] hc-w-[25px] hc-items-center hc-justify-center hc-rounded-full focus:hc-outline-none"
36
+ variant="ghost" aria-label="Close">
37
+ <Icon
38
+ icon="mdi:times"
39
+ className="hc-cursor-pointer hc-text-black hover:hc-text-gray-500 hover:hc-opacity-75"
40
+ />
41
+ </Button.Anchor>
42
+ </Dialog.Close>
43
+ </Dialog.Content>
44
+ </Dialog.Portal>
45
+ </Dialog.Root>
46
+ );
47
+
48
+ export default ApplyDialog;
@@ -1,108 +1,108 @@
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
+ 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 +1,55 @@
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
+ 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 All
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,69 +1,69 @@
1
- import React from 'react';
2
- import Icon from '~/components/modules/icon';
3
-
4
- const FilterItem = ({
5
- className,
6
- item,
7
- type,
8
- itemKey,
9
- hasCount,
10
- field,
11
- activeItem,
12
- setActiveItem,
13
- changeHandler,
14
- isExternalLink = false,
15
- externalLinkUrl,
16
- trackEvent,
17
- eventTypes,
18
- ...rest
19
- }) => {
20
- const itemName = item.name ? item.name : item;
21
-
22
- return (
23
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
24
- <label
25
- onClick={() =>
26
- {
27
- if(!isExternalLink) return;
28
- trackEvent(eventTypes.EXTERNAL_LINK_CLICKED, { link: externalLinkUrl });
29
- window.location.href = externalLinkUrl;
30
- }}
31
- className={`
32
- 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
33
- ${className ?? ""}
34
- `}
35
- {...rest}
36
- >
37
- {isExternalLink ? (
38
- <Icon
39
- icon="tabler:external-link"
40
- size="hc-size-4"
41
- className={'hc-size-4 hc-mt-px hc-text-primary hc-border-uiAccent/30'}
42
- ></Icon>
43
- ) : (
44
- <input
45
- id={itemKey}
46
- name={field}
47
- disabled={item.count === 0}
48
- value={itemName}
49
- type={type}
50
- className="hc-size-4 hc-mt-px hc-text-primary hc-border-uiAccent/30 hc-transition-colors hc-rounded-sm"
51
- checked={activeItem}
52
- onChange={() => {
53
- setActiveItem(!activeItem);
54
- changeHandler();
55
- }}
56
- />
57
- )}
58
-
59
- <span className="hc-text-left hc-font-medium">{itemName}</span>
60
- {hasCount && !isExternalLink && (
61
- <span className="hc-inline-block hc-mt-1 hc-ml-auto hc-text-xs hc-leading-none hc-text-primary">
62
- ({item.count})
63
- </span>
64
- )}
65
- </label>
66
- );
67
- };
68
-
69
- export default FilterItem;
1
+ import React from 'react';
2
+ import Icon from '~/components/modules/icon';
3
+
4
+ const FilterItem = ({
5
+ className,
6
+ item,
7
+ type,
8
+ itemKey,
9
+ hasCount,
10
+ field,
11
+ activeItem,
12
+ setActiveItem,
13
+ changeHandler,
14
+ isExternalLink = false,
15
+ externalLinkUrl,
16
+ trackEvent,
17
+ eventTypes,
18
+ ...rest
19
+ }) => {
20
+ const itemName = item.name ? item.name : item;
21
+
22
+ return (
23
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
24
+ <label
25
+ onClick={() =>
26
+ {
27
+ if(!isExternalLink) return;
28
+ trackEvent(eventTypes.EXTERNAL_LINK_CLICKED, { link: externalLinkUrl });
29
+ window.location.href = externalLinkUrl;
30
+ }}
31
+ className={`
32
+ 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
33
+ ${className ?? ""}
34
+ `}
35
+ {...rest}
36
+ >
37
+ {isExternalLink ? (
38
+ <Icon
39
+ icon="tabler:external-link"
40
+ size="hc-size-4"
41
+ className={'hc-size-4 hc-mt-px hc-text-primary hc-border-uiAccent/30'}
42
+ ></Icon>
43
+ ) : (
44
+ <input
45
+ id={itemKey}
46
+ name={field}
47
+ disabled={item.count === 0}
48
+ value={itemName}
49
+ type={type}
50
+ className="hc-size-4 hc-mt-px hc-text-primary hc-border-uiAccent/30 hc-transition-colors hc-rounded-sm"
51
+ checked={activeItem}
52
+ onChange={() => {
53
+ setActiveItem(!activeItem);
54
+ changeHandler();
55
+ }}
56
+ />
57
+ )}
58
+
59
+ <span className="hc-text-left hc-font-medium">{itemName}</span>
60
+ {hasCount && !isExternalLink && (
61
+ <span className="hc-inline-block hc-mt-1 hc-ml-auto hc-text-xs hc-leading-none hc-text-primary">
62
+ ({item.count})
63
+ </span>
64
+ )}
65
+ </label>
66
+ );
67
+ };
68
+
69
+ export default FilterItem;
@@ -1,51 +1,51 @@
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
- if(filter.id === 'entityName' && (!selectedFilters.cityState && !selectedFilters.state)){
30
- return;
31
- }
32
- return(<AccordionFilterItem
33
- key={filter.id}
34
- filter={filter}
35
- setDefaultValue={setDefaultValue}
36
- selectedFilters={selectedFilters}
37
- setSelectedFilters={prevFilters => {
38
- setSelectedFilters(prevFilters);
39
- setLocation(null);
40
- setSelectedListItem(null);
41
- }}
42
- />);
43
- })}
44
- {children}
45
- </Accordion>
46
- )}
47
- </FilterCard>
48
- );
49
- };
50
-
51
- export default FilterLocation;
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
+ if(filter.id === 'entityName' && (!selectedFilters.cityState && !selectedFilters.state)){
30
+ return;
31
+ }
32
+ return(<AccordionFilterItem
33
+ key={filter.id}
34
+ filter={filter}
35
+ setDefaultValue={setDefaultValue}
36
+ selectedFilters={selectedFilters}
37
+ setSelectedFilters={prevFilters => {
38
+ setSelectedFilters(prevFilters);
39
+ setLocation(null);
40
+ setSelectedListItem(null);
41
+ }}
42
+ />);
43
+ })}
44
+ {children}
45
+ </Accordion>
46
+ )}
47
+ </FilterCard>
48
+ );
49
+ };
50
+
51
+ export default FilterLocation;