@abcagency/hc-ui-components 1.3.57 → 1.3.59

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 (158) 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/containers/accordions/filter-container.js.map +1 -1
  5. package/dist/components/containers/accordions/filter-item-container.js +4 -2
  6. package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
  7. package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
  8. package/dist/components/containers/filter/filter-item-container.js +4 -2
  9. package/dist/components/containers/filter/filter-item-container.js.map +1 -1
  10. package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
  11. package/dist/components/containers/list/item-list-container.js +21 -21
  12. package/dist/components/containers/list/list-item/list-item-container.js.map +1 -1
  13. package/dist/components/containers/maps/map-container.js.map +1 -1
  14. package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
  15. package/dist/components/modules/accordions/default.js.map +1 -1
  16. package/dist/components/modules/buttons/commute-pill.js.map +1 -1
  17. package/dist/components/modules/buttons/default.js.map +1 -1
  18. package/dist/components/modules/buttons/items-pill.js.map +1 -1
  19. package/dist/components/modules/buttons/pill-wrapper.js.map +1 -1
  20. package/dist/components/modules/buttons/show-all-button.js.map +1 -1
  21. package/dist/components/modules/cards/default.js.map +1 -1
  22. package/dist/components/modules/cards/filter.js.map +1 -1
  23. package/dist/components/modules/filter/item.js.map +1 -1
  24. package/dist/components/modules/filter/sort.js.map +1 -1
  25. package/dist/components/modules/grid.js.map +1 -1
  26. package/dist/components/modules/icon.js.map +1 -1
  27. package/dist/components/modules/list/header.js.map +1 -1
  28. package/dist/components/modules/list/item-list.js +40 -40
  29. package/dist/components/modules/maps/info-window-card.js.map +1 -1
  30. package/dist/components/modules/maps/map.js.map +1 -1
  31. package/dist/components/modules/maps/place-marker.js.map +1 -1
  32. package/dist/components/modules/maps/tabs.js.map +1 -1
  33. package/dist/constants/placeTypes.js.map +1 -1
  34. package/dist/contexts/mapContext.js +83 -83
  35. package/dist/contexts/mapListContext.js +190 -190
  36. package/dist/contexts/trackEventContext.js.map +1 -1
  37. package/dist/hooks/useList.js.map +1 -1
  38. package/dist/services/configService.js +9 -9
  39. package/dist/services/googlePlacesNearbyService.js +32 -32
  40. package/dist/services/googlePlacesNearbyService.js.map +1 -1
  41. package/dist/services/listingAggregatorService.js +34 -34
  42. package/dist/services/listingAggregatorService.js.map +1 -1
  43. package/dist/services/listingEntityService.js +9 -9
  44. package/dist/services/listingService.js +24 -24
  45. package/dist/services/recruiterService.js +10 -10
  46. package/dist/types/apis/hcApi.d.ts +5 -5
  47. package/dist/types/clientToken.d.ts +2 -2
  48. package/dist/types/components/containers/accordions/map-accordion-item-container.d.ts +12 -12
  49. package/dist/types/components/containers/jobListing/listing-details-container.d.ts +6 -6
  50. package/dist/types/components/containers/list/item-list-container.d.ts +9 -9
  51. package/dist/types/components/containers/list/list-item/list-item-container.d.ts +14 -14
  52. package/dist/types/components/modules/accordions/MapAccordionItem.d.ts +10 -10
  53. package/dist/types/components/modules/accordions/default.d.ts +19 -19
  54. package/dist/types/components/modules/buttons/button-group-apply.d.ts +24 -24
  55. package/dist/types/components/modules/buttons/commute-pill.d.ts +5 -5
  56. package/dist/types/components/modules/buttons/default.d.ts +48 -48
  57. package/dist/types/components/modules/buttons/pill-wrapper.d.ts +3 -3
  58. package/dist/types/components/modules/dialogs/apply-dialog.d.ts +8 -8
  59. package/dist/types/components/modules/filter/sort.d.ts +8 -8
  60. package/dist/types/components/modules/grid.d.ts +8 -8
  61. package/dist/types/components/modules/icon.d.ts +10 -10
  62. package/dist/types/components/modules/jobListing/listing-details.d.ts +18 -18
  63. package/dist/types/components/modules/list/field-mapper.d.ts +10 -10
  64. package/dist/types/components/modules/list/header-item.d.ts +11 -11
  65. package/dist/types/components/modules/list/header.d.ts +12 -12
  66. package/dist/types/components/modules/list/item-expand-card/index.d.ts +7 -7
  67. package/dist/types/components/modules/list/item-expand-card/recruiter-contact-nav.d.ts +17 -17
  68. package/dist/types/components/modules/list/item-expand-card/recruiter-details.d.ts +21 -21
  69. package/dist/types/components/modules/list/item-expand-card/recruiter-headshot.d.ts +8 -8
  70. package/dist/types/components/modules/list/item-list.d.ts +20 -20
  71. package/dist/types/components/modules/list/list-item/list-item.d.ts +3 -3
  72. package/dist/types/constants/eventTypes.d.ts +14 -14
  73. package/dist/types/contexts/mapContext.d.ts +29 -29
  74. package/dist/types/contexts/mapListContext.d.ts +61 -61
  75. package/dist/types/contexts/trackEventContext.d.ts +6 -6
  76. package/dist/types/enums/SectionType.d.ts +9 -9
  77. package/dist/types/hooks/useList.d.ts +13 -13
  78. package/dist/types/services/configService.d.ts +6 -6
  79. package/dist/types/services/googlePlacesNearbyService.d.ts +5 -5
  80. package/dist/types/services/listingAggregatorService.d.ts +12 -12
  81. package/dist/types/services/listingEntityService.d.ts +6 -6
  82. package/dist/types/services/listingService.d.ts +9 -9
  83. package/dist/types/services/recruiterService.d.ts +6 -6
  84. package/dist/types/types/Address.d.ts +7 -7
  85. package/dist/types/types/ContentSection.d.ts +8 -8
  86. package/dist/types/types/GetListingParams.d.ts +8 -8
  87. package/dist/types/types/LatLng.d.ts +4 -4
  88. package/dist/types/types/ListingEntity.d.ts +10 -10
  89. package/dist/types/types/ListingFields.d.ts +25 -25
  90. package/dist/types/types/Listings.d.ts +31 -31
  91. package/dist/types/types/Recruiter.d.ts +9 -9
  92. package/dist/types/types/SimilarListing.d.ts +24 -24
  93. package/dist/types/types/config/Colors.d.ts +8 -8
  94. package/dist/types/types/config/MapConfig.d.ts +30 -30
  95. package/dist/types/types/config/PointsOfInterestConfig.d.ts +13 -13
  96. package/dist/types/types/config/SearchConfig.d.ts +4 -4
  97. package/dist/types/util/filterUtil.d.ts +28 -28
  98. package/dist/types/util/loading.d.ts +3 -3
  99. package/dist/types/util/localStorageUtil.d.ts +3 -3
  100. package/dist/types/util/mapUtil.d.ts +16 -16
  101. package/dist/types/util/sortUtil.d.ts +1 -1
  102. package/dist/types/util/stringUtils.d.ts +1 -1
  103. package/dist/types/util/urlFilterUtil.d.ts +8 -8
  104. package/dist/util/filterUtil.js +2 -2
  105. package/dist/util/filterUtil.js.map +1 -1
  106. package/dist/util/loading.js.map +1 -1
  107. package/dist/util/localStorageUtil.js +37 -37
  108. package/dist/util/localStorageUtil.js.map +1 -1
  109. package/dist/util/sortUtil.js.map +1 -1
  110. package/dist/util/stringUtils.js.map +1 -1
  111. package/dist/util/urlFilterUtil.js.map +1 -1
  112. package/package.json +1 -1
  113. package/src/apis/hcApi.ts +109 -109
  114. package/src/clientToken.js +9 -9
  115. package/src/components/containers/accordions/filter-container.js +48 -48
  116. package/src/components/containers/accordions/filter-item-container.js +2 -0
  117. package/src/components/containers/accordions/map-accordion-item-container.js +70 -70
  118. package/src/components/containers/filter/filter-item-container.js +2 -1
  119. package/src/components/containers/jobListing/listing-details-container.js +40 -40
  120. package/src/components/containers/list/list-item/list-item-container.js +43 -43
  121. package/src/components/containers/maps/map-container.js +249 -249
  122. package/src/components/modules/accordions/MapAccordionItem.js +30 -30
  123. package/src/components/modules/accordions/default.js +171 -171
  124. package/src/components/modules/buttons/commute-pill.js +22 -22
  125. package/src/components/modules/buttons/default.js +194 -194
  126. package/src/components/modules/buttons/items-pill.js +35 -35
  127. package/src/components/modules/buttons/pill-wrapper.js +27 -27
  128. package/src/components/modules/buttons/show-all-button.js +19 -19
  129. package/src/components/modules/cards/default.js +167 -167
  130. package/src/components/modules/cards/filter.js +56 -56
  131. package/src/components/modules/filter/item.js +69 -69
  132. package/src/components/modules/filter/sort.js +83 -83
  133. package/src/components/modules/grid.js +54 -54
  134. package/src/components/modules/icon.js +33 -33
  135. package/src/components/modules/list/header.js +51 -51
  136. package/src/components/modules/list/item-expand-card/recruiter-contact-nav.js +50 -50
  137. package/src/components/modules/list/item-expand-card/recruiter-details.js +68 -68
  138. package/src/components/modules/list/item-expand-card/recruiter-headshot.js +22 -22
  139. package/src/components/modules/maps/info-window-card.js +17 -17
  140. package/src/components/modules/maps/map.js +64 -64
  141. package/src/components/modules/maps/place-marker.js +41 -41
  142. package/src/components/modules/maps/tabs.js +81 -81
  143. package/src/constants/placeTypes.js +8 -8
  144. package/src/contexts/trackEventContext.js +14 -14
  145. package/src/enums/SectionType.ts +9 -9
  146. package/src/hooks/useList.js +89 -89
  147. package/src/index.js +3 -3
  148. package/src/services/googlePlacesNearbyService.ts +42 -42
  149. package/src/services/listingAggregatorService.ts +76 -76
  150. package/src/util/arrayUtil.js +3 -3
  151. package/src/util/fieldMapper.js +22 -22
  152. package/src/util/filterUtil.js +311 -310
  153. package/src/util/loading.js +17 -17
  154. package/src/util/localStorageUtil.ts +34 -34
  155. package/src/util/sortUtil.js +32 -32
  156. package/src/util/stringUtils.js +6 -6
  157. package/src/util/urlFilterUtil.js +85 -85
  158. package/dist/types/contexts/themeContext.d.ts +0 -11
@@ -1,83 +1,83 @@
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
+ 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 +1,54 @@
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
+ 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 +1,33 @@
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
+ 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,51 +1,51 @@
1
- import React from 'react';
2
- import { twMerge } from 'tailwind-merge';
3
-
4
- import Grid from '~/components/modules/grid';
5
- import HeaderItem from '~/components/modules/list/header-item';
6
-
7
- const ListHeader = ({
8
- className,
9
- fieldsShown,
10
- fieldNames,
11
- fieldIsSortable = true,
12
- setSortSetting,
13
- sortSetting,
14
- includeFavorite = false,
15
- scrollbarWidth
16
- }) => {
17
- return (
18
- <Grid
19
- columns="hc-grid-flow-col hc-auto-cols-fr"
20
- gap="hc-gap-0"
21
- isAnimated={false}
22
- style={{ paddingRight: `${scrollbarWidth && scrollbarWidth > 0 ? scrollbarWidth + 6 : 1 }px` }}
23
- className={twMerge`
24
- hc-hidden md:hc-grid hc-bg-uiAccent/10 hc-border-b hc-border-uiAccent/10 hc-sticky hc-top-0 hc-z-10
25
- ${className ?? ""}
26
- `}
27
- >
28
- {fieldsShown.map(field => (
29
- <HeaderItem
30
- key={field}
31
- isSortable={fieldIsSortable}
32
- sortSetting={sortSetting}
33
- field={field}
34
- setSortSetting={setSortSetting}
35
- >
36
- {fieldNames[field]}
37
- </HeaderItem>
38
- ))}
39
- { includeFavorite == true &&
40
- <HeaderItem key={"favorite"}
41
- isSortable={false}
42
- field={"favorite"}
43
- >
44
- Favorite
45
- </HeaderItem>
46
- }
47
- </Grid>
48
- );
49
- };
50
-
51
- export default ListHeader;
1
+ import React from 'react';
2
+ import { twMerge } from 'tailwind-merge';
3
+
4
+ import Grid from '~/components/modules/grid';
5
+ import HeaderItem from '~/components/modules/list/header-item';
6
+
7
+ const ListHeader = ({
8
+ className,
9
+ fieldsShown,
10
+ fieldNames,
11
+ fieldIsSortable = true,
12
+ setSortSetting,
13
+ sortSetting,
14
+ includeFavorite = false,
15
+ scrollbarWidth
16
+ }) => {
17
+ return (
18
+ <Grid
19
+ columns="hc-grid-flow-col hc-auto-cols-fr"
20
+ gap="hc-gap-0"
21
+ isAnimated={false}
22
+ style={{ paddingRight: `${scrollbarWidth && scrollbarWidth > 0 ? scrollbarWidth + 6 : 1 }px` }}
23
+ className={twMerge`
24
+ hc-hidden md:hc-grid hc-bg-uiAccent/10 hc-border-b hc-border-uiAccent/10 hc-sticky hc-top-0 hc-z-10
25
+ ${className ?? ""}
26
+ `}
27
+ >
28
+ {fieldsShown.map(field => (
29
+ <HeaderItem
30
+ key={field}
31
+ isSortable={fieldIsSortable}
32
+ sortSetting={sortSetting}
33
+ field={field}
34
+ setSortSetting={setSortSetting}
35
+ >
36
+ {fieldNames[field]}
37
+ </HeaderItem>
38
+ ))}
39
+ { includeFavorite == true &&
40
+ <HeaderItem key={"favorite"}
41
+ isSortable={false}
42
+ field={"favorite"}
43
+ >
44
+ Favorite
45
+ </HeaderItem>
46
+ }
47
+ </Grid>
48
+ );
49
+ };
50
+
51
+ export default ListHeader;
@@ -1,50 +1,50 @@
1
- import React from 'react';
2
-
3
- import Button from '~/components/modules/buttons/default';
4
-
5
- const RecruiterContactNav = ({
6
- children,
7
- className
8
- }) => {
9
- return (
10
- <nav
11
- className={`
12
- hc-inline-flex hc-items-center hc-justify-between hc-gap-2 hc-mt-2
13
- ${className ?? ''}
14
- `}
15
- >
16
- {children}
17
- </nav>
18
- );
19
- };
20
-
21
- export const NavButton = ({
22
- className,
23
- href,
24
- target = '_self',
25
- title,
26
- icon,
27
- ...props
28
- }) => {
29
- return (
30
- <Button.Anchor
31
- href={href}
32
- variant="icon"
33
- size="sq"
34
- target={target}
35
- title={title}
36
- className={className ?? ''}
37
- {...props}
38
- >
39
- <span className="hc-sr-only">{title}</span>
40
- <Button.Icon
41
- icon={icon}
42
- size="hc-size-8"
43
- />
44
- </Button.Anchor>
45
- );
46
- };
47
-
48
- RecruiterContactNav.Button = NavButton;
49
-
50
- export default RecruiterContactNav;
1
+ import React from 'react';
2
+
3
+ import Button from '~/components/modules/buttons/default';
4
+
5
+ const RecruiterContactNav = ({
6
+ children,
7
+ className
8
+ }) => {
9
+ return (
10
+ <nav
11
+ className={`
12
+ hc-inline-flex hc-items-center hc-justify-between hc-gap-2 hc-mt-2
13
+ ${className ?? ''}
14
+ `}
15
+ >
16
+ {children}
17
+ </nav>
18
+ );
19
+ };
20
+
21
+ export const NavButton = ({
22
+ className,
23
+ href,
24
+ target = '_self',
25
+ title,
26
+ icon,
27
+ ...props
28
+ }) => {
29
+ return (
30
+ <Button.Anchor
31
+ href={href}
32
+ variant="icon"
33
+ size="sq"
34
+ target={target}
35
+ title={title}
36
+ className={className ?? ''}
37
+ {...props}
38
+ >
39
+ <span className="hc-sr-only">{title}</span>
40
+ <Button.Icon
41
+ icon={icon}
42
+ size="hc-size-8"
43
+ />
44
+ </Button.Anchor>
45
+ );
46
+ };
47
+
48
+ RecruiterContactNav.Button = NavButton;
49
+
50
+ export default RecruiterContactNav;
@@ -1,68 +1,68 @@
1
- import React from 'react';
2
- import { twMerge } from 'tailwind-merge';
3
-
4
- const RecruiterDetails = ({
5
- contactNav,
6
- className,
7
- children
8
- }) => {
9
- return (
10
- <div
11
- className={twMerge`
12
- hc-grow
13
- ${className ?? ''}
14
- `}
15
- >
16
- {children}
17
-
18
- {contactNav &&
19
- <div className="hc-inline-flex">
20
- {contactNav}
21
- </div>
22
- }
23
- </div>
24
- );
25
- };
26
-
27
- export const Title = ({
28
- as = 'h4',
29
- className,
30
- children
31
- }) => {
32
- const Container = as;
33
-
34
- return (
35
- <Container
36
- className={twMerge`
37
- hc-text-base hc-font-medium
38
- ${className ?? ''}
39
- `}
40
- >
41
- {children}
42
- </Container>
43
- );
44
- };
45
-
46
- export const Text = ({
47
- as = 'p',
48
- className,
49
- children
50
- }) => {
51
- const Container = as;
52
-
53
- return (
54
- <Container
55
- className={twMerge`
56
- hc-text-sm hc-text-uiText/60
57
- ${className ?? ''}
58
- `}
59
- >
60
- {children}
61
- </Container>
62
- );
63
- };
64
-
65
- RecruiterDetails.Title = Title;
66
- RecruiterDetails.Text = Text;
67
-
68
- export default RecruiterDetails;
1
+ import React from 'react';
2
+ import { twMerge } from 'tailwind-merge';
3
+
4
+ const RecruiterDetails = ({
5
+ contactNav,
6
+ className,
7
+ children
8
+ }) => {
9
+ return (
10
+ <div
11
+ className={twMerge`
12
+ hc-grow
13
+ ${className ?? ''}
14
+ `}
15
+ >
16
+ {children}
17
+
18
+ {contactNav &&
19
+ <div className="hc-inline-flex">
20
+ {contactNav}
21
+ </div>
22
+ }
23
+ </div>
24
+ );
25
+ };
26
+
27
+ export const Title = ({
28
+ as = 'h4',
29
+ className,
30
+ children
31
+ }) => {
32
+ const Container = as;
33
+
34
+ return (
35
+ <Container
36
+ className={twMerge`
37
+ hc-text-base hc-font-medium
38
+ ${className ?? ''}
39
+ `}
40
+ >
41
+ {children}
42
+ </Container>
43
+ );
44
+ };
45
+
46
+ export const Text = ({
47
+ as = 'p',
48
+ className,
49
+ children
50
+ }) => {
51
+ const Container = as;
52
+
53
+ return (
54
+ <Container
55
+ className={twMerge`
56
+ hc-text-sm hc-text-uiText/60
57
+ ${className ?? ''}
58
+ `}
59
+ >
60
+ {children}
61
+ </Container>
62
+ );
63
+ };
64
+
65
+ RecruiterDetails.Title = Title;
66
+ RecruiterDetails.Text = Text;
67
+
68
+ export default RecruiterDetails;