@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.
Files changed (149) hide show
  1. package/dist/components/containers/accordions/filter-container.js +4 -2
  2. package/dist/components/containers/accordions/filter-container.js.map +1 -1
  3. package/dist/components/containers/accordions/filter-item-container.js +6 -1
  4. package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
  5. package/dist/components/containers/accordions/map-accordion-item-container.js +4 -2
  6. package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
  7. package/dist/components/containers/jobListing/listing-details-container.js +2 -2
  8. package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
  9. package/dist/components/containers/list/item-list-container.js +2 -2
  10. package/dist/components/containers/list/item-list-container.js.map +1 -1
  11. package/dist/components/modules/accordions/MapAccordionItem.js +2 -1
  12. package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
  13. package/dist/components/modules/dialogs/apply-dialog.js +1 -1
  14. package/dist/components/modules/dialogs/apply-dialog.js.map +1 -1
  15. package/dist/components/modules/filter/search.js +1 -1
  16. package/dist/components/modules/filter/search.js.map +1 -1
  17. package/dist/components/modules/jobListing/listing-details.js +5 -4
  18. package/dist/components/modules/jobListing/listing-details.js.map +1 -1
  19. package/dist/components/modules/list/field-mapper.js +1 -1
  20. package/dist/components/modules/list/field-mapper.js.map +1 -1
  21. package/dist/components/modules/list/item-list.js.map +1 -1
  22. package/dist/contexts/mapListContext.js.map +1 -1
  23. package/dist/services/listingAggregatorService.js.map +1 -1
  24. package/dist/styles/index.css +3 -1
  25. package/dist/types/components/containers/jobListing/listing-details-container.d.ts +2 -2
  26. package/dist/types/components/modules/accordions/MapAccordionItem.d.ts +2 -1
  27. package/dist/types/components/modules/jobListing/listing-details.d.ts +2 -2
  28. package/dist/types/components/modules/list/item-list.d.ts +0 -1
  29. package/dist/types/types/ListingFields.d.ts +5 -0
  30. package/dist/types/types/config/MapConfig.d.ts +1 -0
  31. package/dist/util/filterUtil.js +2 -2
  32. package/dist/util/filterUtil.js.map +1 -1
  33. package/package.json +4 -1
  34. package/.env +0 -3
  35. package/.eslintrc +0 -136
  36. package/bundle.js +0 -28134
  37. package/bundle.js.map +0 -1
  38. package/bundleDist.map +0 -1
  39. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -12
  40. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +0 -1
  41. package/jsconfig.json +0 -7
  42. package/postcss.config.js +0 -13
  43. package/preset.default.js +0 -15
  44. package/rollup.config.mjs +0 -111
  45. package/src/.editorconfig +0 -12
  46. package/src/apis/hcApi.ts +0 -109
  47. package/src/bundleIndex.js +0 -14
  48. package/src/clientToken.js +0 -9
  49. package/src/components/HireControlMap.js +0 -135
  50. package/src/components/containers/accordions/filter-container.js +0 -47
  51. package/src/components/containers/accordions/filter-item-container.js +0 -62
  52. package/src/components/containers/accordions/map-accordion-item-container.js +0 -70
  53. package/src/components/containers/filter/commute-container.js +0 -89
  54. package/src/components/containers/filter/filter-container.js +0 -76
  55. package/src/components/containers/filter/filter-item-container.js +0 -71
  56. package/src/components/containers/filter/location-container.js +0 -45
  57. package/src/components/containers/filter/points-of-interest-container.js +0 -33
  58. package/src/components/containers/filter/points-of-interest-radio-item-container.js +0 -35
  59. package/src/components/containers/filter/search-container.js +0 -50
  60. package/src/components/containers/jobListing/listing-details-container.js +0 -40
  61. package/src/components/containers/list/item-list-container.tsx +0 -82
  62. package/src/components/containers/list/list-item/list-item-container.js +0 -43
  63. package/src/components/containers/maps/info-window-content-container.js +0 -51
  64. package/src/components/containers/maps/map-container.js +0 -204
  65. package/src/components/containers/maps/map-list-container.js +0 -48
  66. package/src/components/containers/maps/map-marker-container.js +0 -78
  67. package/src/components/modules/accordions/MapAccordionItem.js +0 -29
  68. package/src/components/modules/accordions/default.js +0 -171
  69. package/src/components/modules/accordions/filterItem.js +0 -27
  70. package/src/components/modules/accordions/filters.js +0 -32
  71. package/src/components/modules/buttons/button-group-apply.js +0 -123
  72. package/src/components/modules/buttons/commute-pill.js +0 -22
  73. package/src/components/modules/buttons/default.js +0 -194
  74. package/src/components/modules/buttons/items-pill.js +0 -35
  75. package/src/components/modules/buttons/pill-wrapper.js +0 -27
  76. package/src/components/modules/buttons/show-all-button.js +0 -20
  77. package/src/components/modules/cards/default.js +0 -167
  78. package/src/components/modules/cards/filter.js +0 -56
  79. package/src/components/modules/dialogs/apply-dialog.js +0 -48
  80. package/src/components/modules/filter/commute.js +0 -108
  81. package/src/components/modules/filter/index.js +0 -55
  82. package/src/components/modules/filter/item.js +0 -48
  83. package/src/components/modules/filter/location.js +0 -48
  84. package/src/components/modules/filter/radio-item.js +0 -42
  85. package/src/components/modules/filter/search.js +0 -65
  86. package/src/components/modules/filter/sort.js +0 -83
  87. package/src/components/modules/grid.js +0 -54
  88. package/src/components/modules/icon.js +0 -33
  89. package/src/components/modules/jobListing/listing-details.js +0 -109
  90. package/src/components/modules/list/field-mapper.js +0 -114
  91. package/src/components/modules/list/header-item.js +0 -91
  92. package/src/components/modules/list/header.js +0 -49
  93. package/src/components/modules/list/item-expand-card/index.js +0 -22
  94. package/src/components/modules/list/item-expand-card/recruiter-contact-nav.js +0 -50
  95. package/src/components/modules/list/item-expand-card/recruiter-details.js +0 -68
  96. package/src/components/modules/list/item-expand-card/recruiter-headshot.js +0 -22
  97. package/src/components/modules/list/item-list.tsx +0 -85
  98. package/src/components/modules/list/list-item/list-item.js +0 -130
  99. package/src/components/modules/maps/info-window-card.js +0 -17
  100. package/src/components/modules/maps/info-window-content.js +0 -35
  101. package/src/components/modules/maps/map-list.js +0 -28
  102. package/src/components/modules/maps/map-marker.js +0 -29
  103. package/src/components/modules/maps/map.js +0 -76
  104. package/src/components/modules/maps/place-marker.js +0 -41
  105. package/src/components/modules/maps/tabs.js +0 -81
  106. package/src/constants/eventTypes.js +0 -13
  107. package/src/constants/placeTypes.js +0 -8
  108. package/src/contexts/mapContext.tsx +0 -129
  109. package/src/contexts/mapListContext.tsx +0 -311
  110. package/src/contexts/placesContext.js +0 -102
  111. package/src/contexts/trackEventContext.js +0 -14
  112. package/src/enums/SectionType.ts +0 -9
  113. package/src/hooks/useList.js +0 -89
  114. package/src/index.js +0 -3
  115. package/src/services/configService.ts +0 -16
  116. package/src/services/googlePlacesNearbyService.ts +0 -42
  117. package/src/services/listingAggregatorService.ts +0 -76
  118. package/src/services/listingEntityService.ts +0 -16
  119. package/src/services/listingService.ts +0 -40
  120. package/src/services/recruiterService.ts +0 -18
  121. package/src/styles/bundle.css +0 -268
  122. package/src/styles/index.css +0 -125
  123. package/src/types/Address.ts +0 -7
  124. package/src/types/ContentSection.ts +0 -9
  125. package/src/types/GetListingParams.ts +0 -8
  126. package/src/types/LatLng.ts +0 -4
  127. package/src/types/ListingEntity.ts +0 -11
  128. package/src/types/ListingFields.ts +0 -20
  129. package/src/types/Listings.ts +0 -32
  130. package/src/types/Recruiter.ts +0 -9
  131. package/src/types/SimilarListing.ts +0 -24
  132. package/src/types/config/Colors.ts +0 -8
  133. package/src/types/config/MapConfig.ts +0 -30
  134. package/src/types/config/PointsOfInterestConfig.ts +0 -13
  135. package/src/types/config/SearchConfig.ts +0 -4
  136. package/src/util/arrayUtil.js +0 -3
  137. package/src/util/fieldMapper.js +0 -22
  138. package/src/util/filterUtil.js +0 -239
  139. package/src/util/loading.js +0 -17
  140. package/src/util/localStorageUtil.ts +0 -34
  141. package/src/util/mapIconUtil.js +0 -180
  142. package/src/util/mapUtil.js +0 -91
  143. package/src/util/sortUtil.js +0 -33
  144. package/src/util/stringUtils.js +0 -6
  145. package/src/util/urlFilterUtil.js +0 -85
  146. package/stats.html +0 -4842
  147. package/styles/index.css +0 -1
  148. package/tailwind.config.js +0 -129
  149. package/tsconfig.json +0 -23
@@ -1,123 +0,0 @@
1
- import React from 'react';
2
- import { twMerge } from 'tailwind-merge';
3
-
4
- import Button from '~/components/modules/buttons/default';
5
- import ApplyDialog from '../dialogs/apply-dialog';
6
-
7
- const ButtonGroupApply = ({
8
- applyUrl,
9
- useDetailsPostMessage,
10
- navigateToDetails,
11
- navigateToEasyApply,
12
- Link,
13
- linkFormat,
14
- applyText = 'Apply Now',
15
- detailsUrl,
16
- detailsText = 'View Details',
17
- className,
18
- buttonSize = 'sm',
19
- applyButtonVariant = 'primary',
20
- detailsButtonVariant = 'outline',
21
- includeDialog = false,
22
- internalApplyLink,
23
- itemId,
24
- item,
25
- companyName,
26
- trackEvent,
27
- eventTypes
28
- }) => {
29
- const href = linkFormat.replace('[slug]', item.slug ?? item.id);
30
-
31
- const trackApply = () => {
32
- trackEvent(eventTypes.APPLY_NOW_CLICKED, { jobTitle: item.fields.position, jobCategory: item.fields.category, entityDisplayName: item?.mapDetails?.entityDisplayName });
33
- };
34
-
35
- const trackViewDetails = () => {
36
- trackEvent(eventTypes.VIEW_DETAILS_CLICKED, { jobTitle: item.fields.position, jobCategory: item.fields.category, entityDisplayName: item?.mapDetails?.entityDisplayName });
37
- };
38
-
39
- return (
40
- <nav
41
- className={twMerge`
42
- hc-flex hc-flex-row hc-justify-between hc-gap-2 hc-w-full
43
- ${className ?? ''}
44
- `}
45
- >
46
- {Link &&
47
- <Button.Link
48
- Link={Link}
49
- href={href}
50
- variant={detailsButtonVariant}
51
- size={buttonSize}
52
- onClick={trackViewDetails}
53
- >
54
- {detailsText}
55
- </Button.Link>
56
- }
57
- {navigateToDetails &&
58
- <Button.Anchor
59
- href={href}
60
- onClick={e => {
61
- e.preventDefault();
62
- navigateToDetails(item);
63
- trackViewDetails();
64
- }}
65
- variant={detailsButtonVariant}
66
- size={buttonSize}
67
- >
68
- {detailsText}
69
- </Button.Anchor>
70
- }
71
- {detailsUrl && useDetailsPostMessage !== true && navigateToDetails === null &&
72
- <Button.Anchor
73
- href={detailsUrl}
74
- variant={detailsButtonVariant}
75
- size={buttonSize}
76
- onClick={trackViewDetails}
77
- >
78
- {detailsText}
79
- </Button.Anchor>
80
- }
81
- {useDetailsPostMessage === true && navigateToDetails === null &&
82
- <Button.Btn
83
- onClick={() => {trackViewDetails; window.parent.postMessage({ itemId: itemId, type: 'LISTING_ID' }, '*'); }}
84
- variant={detailsButtonVariant}
85
- size={buttonSize}
86
- >
87
- {detailsText}
88
- </Button.Btn>}
89
- {applyUrl && !includeDialog && navigateToEasyApply == null &&
90
- <Button.Anchor
91
- href={applyUrl}
92
- variant={applyButtonVariant}
93
- size={buttonSize}
94
- onClick={trackApply}
95
- >
96
- {applyText}
97
- </Button.Anchor>
98
- }
99
- {applyUrl && !includeDialog && navigateToEasyApply != null &&
100
- <Button.Btn
101
- onClick={() => { navigateToEasyApply(item); trackApply(); }}
102
- variant={applyButtonVariant}
103
- size={buttonSize}
104
- >
105
- {applyText}
106
- </Button.Btn>
107
- }
108
- {applyUrl && includeDialog &&
109
- <ApplyDialog applyUrl={applyUrl} internalApplyLink={internalApplyLink} companyName={companyName}>
110
- <Button.Anchor
111
- variant={applyButtonVariant}
112
- size={buttonSize}
113
- onClick={trackApply}
114
- >
115
- {applyText}
116
- </Button.Anchor>
117
- </ApplyDialog>
118
- }
119
- </nav>
120
- );
121
- };
122
-
123
- export default ButtonGroupApply;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
-
3
- import Icon from '~/components/modules/icon';
4
- import PillWrapper from '~/components/modules/buttons/pill-wrapper';
5
-
6
- const CommutePill = ({ travelTime }) => {
7
- if (!travelTime) return;
8
- return (
9
- <div className="pt-2">
10
- <PillWrapper >
11
- <Icon
12
- icon="ri:pin-distance-fill"
13
- size="hc-size-5"
14
- className="hc-text-uiAccent/30"
15
- />
16
- commute time = {travelTime}
17
- </PillWrapper>
18
- </div>
19
- );
20
- };
21
-
22
- export default CommutePill;
@@ -1,194 +0,0 @@
1
- import React from 'react';
2
- import { forwardRef } from 'react';
3
- import { Link } from 'react-router-dom';
4
- import { twMerge } from 'tailwind-merge';
5
-
6
- import Icon from '~/components/modules/icon';
7
-
8
- const linkDefaultClasses = "hc-normal-case hc-text-inherit !hc-font-[inherit] hc-[font-weight:inherit] !hc-p-0 hc-rounded-none";
9
- const underlineClasses = "!underline decoration-1 underline-offset-2 hover:!no-underline focus:!no-underline";
10
-
11
- const ButtonVariant = {
12
- none: '',
13
- primary: 'hc-bg-primary hc-border hc-border-primary hc-text-white hover:hc-bg-opacity-70 focus:hc-bg-opacity-70',
14
- secondary: 'hc-bg-secondary hc-border hc-border-secondary hc-text-white hover:hc-bg-opacity-70 focus:hc-bg-opacity-70',
15
- outline: 'hc-bg-transparent hc-border hc-border-primary hc-text-primary hover:hc-bg-primaryDark hover:hc-border-primaryDark hover:hc-text-white focus:hc-bg-primaryDark focus:hc-border-primaryDark focus:hc-text-white',
16
- link: `${linkDefaultClasses} hc-text-primary hover:hc-text-uiText focus:hc-text-uiText`,
17
- icon: 'hc-opacity-100 hover:hc-opacity-70 focus:hc-opacity-70'
18
- };
19
-
20
- const ButtonSize = {
21
- none: '',
22
- default: 'hc-py-2 hc-px-6 hc-text-base',
23
- sq: 'hc-p-2.5',
24
- sqsm: 'hc-p-1',
25
- xs: 'hc-py-1.5 hc-px-3 hc-text-xs',
26
- sm: 'hc-py-1.5 hc-px-4 hc-text-sm',
27
- lg: 'hc-py-4 hc-px-10 hc-text-lg'
28
- };
29
-
30
- const ButtonDefaults = {
31
- style: 'hc-group hc-font-medium hc-uppercase hc-text-center hc-rounded hc-transition',
32
- size: ButtonSize.default,
33
- variant: ButtonVariant.primary,
34
- block: 'hc-block hc-w-full'
35
- };
36
-
37
- const linkVariants = variant => variant === 'link';
38
-
39
- const buttonClasses = (variant, size, isBlock, hasUnderline, className) => twMerge(
40
- isBlock ? ButtonDefaults.block : linkVariants(variant) ? 'hc-inline' : 'hc-inline-block',
41
- ButtonDefaults.style,
42
- variant ? ButtonVariant[variant] : ButtonDefaults.variant,
43
- size ? ButtonSize[size] : ButtonDefaults.size,
44
- hasUnderline ? underlineClasses : '',
45
- className ?? ''
46
- );
47
-
48
- const Button = ({
49
- children
50
- }) => {
51
- return (
52
- { children }
53
- );
54
- };
55
-
56
- export const Anchor = ({
57
- children,
58
- href,
59
- className,
60
- size,
61
- variant,
62
- isBlock,
63
- hasUnderline,
64
- target = '_blank',
65
- ...rest
66
- }) => {
67
- return (
68
- <a
69
- href={href}
70
- target={target}
71
- className={buttonClasses(variant, size, isBlock, hasUnderline, className)}
72
- onClick={href === '#' ? e => {
73
- e.preventDefault();
74
- } : null}
75
- {...rest}
76
- >
77
- {children}
78
- </a>
79
- );
80
- };
81
-
82
- export const AnchorLink = ({
83
- children,
84
- Link,
85
- href,
86
- className,
87
- size,
88
- variant,
89
- isBlock,
90
- hasUnderline,
91
- ...rest
92
- }) => {
93
- return (
94
- <Link
95
- href={href}
96
- className={`
97
- ${buttonClasses(variant, size, isBlock, hasUnderline, className)}
98
- `}
99
- {...rest}
100
- >
101
- {children}
102
- </Link>
103
- );
104
- };
105
-
106
- export const ScrollAnchor = forwardRef((props, ref) => {
107
- const {
108
- children,
109
- href,
110
- className,
111
- size,
112
- variant,
113
- isBlock,
114
- hasUnderline,
115
- ...rest
116
- } = props;
117
-
118
- return (
119
- <Link
120
- ref={ref}
121
- href={`#${href}`}
122
- scroll={false}
123
- className={buttonClasses(variant, size, isBlock, hasUnderline, className)}
124
- {...rest}
125
- >
126
- {children}
127
- </Link>
128
- );
129
- });
130
-
131
- export const Btn = forwardRef((props, ref) => {
132
- const {
133
- children,
134
- type = 'button',
135
- className,
136
- size,
137
- variant,
138
- isBlock,
139
- hasUnderline,
140
- ...rest
141
- } = props;
142
- return (
143
- <button
144
- ref={ref}
145
- type={type}
146
- className={buttonClasses(variant, size, isBlock, hasUnderline, className)}
147
- {...rest}
148
- >
149
- {children}
150
- </button>
151
- );
152
- });
153
-
154
- export const ButtonBody = ({
155
- children,
156
- className
157
- }) => {
158
- return (
159
- <span
160
- className={twMerge(
161
- 'hc-inline-flex hc-w-full hc-items-center hc-justify-between hc-gap-1.5',
162
- className ?? ''
163
- )}
164
- >
165
- {children}
166
- </span>
167
- );
168
- };
169
-
170
- export const ButtonIcon = ({
171
- icon,
172
- size = 'hc-size-4',
173
- className
174
- }) => {
175
- return (
176
- <Icon
177
-
178
- icon={icon}
179
- size={size}
180
- className={className ?? ''}
181
- />
182
- );
183
- };
184
-
185
- Button.Anchor = Anchor;
186
- Button.Link = AnchorLink;
187
- Button.Scroll = ScrollAnchor;
188
- Button.Btn = Btn;
189
- Button.Body = ButtonBody;
190
- Button.Icon = ButtonIcon;
191
-
192
- Btn.displayName = 'Button:Button';
193
- ScrollAnchor.displayName = 'Button:ScrollAnchor';
194
- export default Button;
@@ -1,35 +0,0 @@
1
- import React from 'react';
2
- import { forwardRef } from 'react';
3
-
4
- import Button from '~/components/modules/buttons/default';
5
-
6
- export const ButtonItemsPill = forwardRef((
7
- {
8
- className,
9
- activeItemsCount,
10
- ...props
11
- },
12
- ref
13
- ) => {
14
- return (
15
- <Button.Btn
16
- ref={ref}
17
- size="none"
18
- variant="none"
19
- className={`
20
- hc-relative hc-z-[2] hc-group hc-inline-flex hc-items-center hc-gap-px hc-ml-auto hc-mr-1.5 hc-pl-1.5 hc-pr-1 hc-py-0.5 hc-rounded hc-bg-primary/10 hc-text-xs hc-font-bold hc-text-primary hc-ring-1 hc-ring-inset hc-ring-primary/20
21
- ${className ?? ''}
22
- `}
23
- {...props}
24
- >
25
- {activeItemsCount > 9 ? '9+' : activeItemsCount}
26
- <Button.Icon
27
- icon="uil:times"
28
- size="hc-size-3.5"
29
- />
30
- </Button.Btn>
31
- );
32
- });
33
-
34
- ButtonItemsPill.displayName = 'ButtonItemsPill';
35
- export default ButtonItemsPill;
@@ -1,27 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
-
3
- import Button from '~/components/modules/buttons/default';
4
-
5
- export const PillWrapper = forwardRef((
6
- {
7
- className,
8
- children,
9
- ...props
10
- },
11
- ref
12
- ) => {
13
- return (
14
- <Button.Btn
15
- ref={ref}
16
- size="none"
17
- variant="none"
18
- className={`hc-relative hc-group hc-inline-flex hc-items-center hc-gap-px hc-ml-auto hc-mr-1.5 hc-pl-1.5 hc-pr-1 hc-py-0.5 hc-rounded hc-bg-primary/10 hc-text-xs hc-font-bold hc-text-primary hc-ring-1 hc-ring-inset hc-ring-primary/20 ${className}`}
19
- {...props}
20
- >
21
- {children}
22
- </Button.Btn>
23
- );
24
- });
25
-
26
- PillWrapper.displayName = 'PillWrapper';
27
- export default PillWrapper;
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
-
3
- const ShowAllButton = ({ mapInteracted, markerConfigs, setMapInteracted, fitBounds, mapRef, pinIconUrl, setSelectedFilters, setQuery, listingCount }) => {
4
- if (!mapInteracted || !markerConfigs) {
5
- return null;
6
- }
7
-
8
- return (
9
- <button
10
- style={{ fontFamily: 'Roboto, Arial, sans-serif', fontSize: '14px', fontWeight: '500' }}
11
- className="hc-absolute hc-bottom-10 hc-left-2.5 hc-z-10 hc-flex hc-items-center hc-justify-center hc-pl-2 hc-pb-1 hc-pt-1.5 hc-pr-3 hc-bg-white hc-text-black hc-border-none hc-rounded-full hc-shadow hc-cursor-pointer hc-text-sm hc-font-medium"
12
- onClick={() => { setMapInteracted(false); fitBounds(mapRef.current, true); if (listingCount < 2) { setSelectedFilters({}); setQuery(null); }; }}
13
- >
14
- <img src={pinIconUrl} alt="Pin Icon" className="hc-size-5" />
15
- Show All
16
- </button>
17
- );
18
- };
19
-
20
- export default ShowAllButton;
@@ -1,167 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- import { Link } from 'react-router-dom';
3
- import { twMerge } from 'tailwind-merge';
4
-
5
- const cardClasses = (className, hasShadow) => twMerge(
6
- 'hc-relative hc-flex hc-flex-wrap hc-flex-col hc-bg-clip-border hc-break-words hc-bg-white hc-border hc-border-gray-100',
7
- hasShadow ? 'hc-shadow-lg' : '',
8
- className ?? ''
9
- );
10
-
11
- const Card = ({ children }) => {
12
- return (
13
- <>{children}</>
14
- );
15
- };
16
-
17
- export const CardDefault = forwardRef((
18
- {
19
- as = 'div',
20
- className,
21
- hasShadow = false,
22
- image,
23
- body,
24
- children,
25
- footer,
26
- ...rest
27
- },
28
- ref
29
- ) => {
30
- const Container = as;
31
-
32
- return (
33
- <Container
34
- ref={ref}
35
- className={cardClasses(className, hasShadow)}
36
- {...rest}
37
- >
38
- {image}
39
- {children}
40
- {body}
41
- {footer}
42
- </Container>
43
- );
44
- });
45
-
46
- const CardLink = ({
47
- as = 'link',
48
- href,
49
- className,
50
- hasShadow = false,
51
- image,
52
- body,
53
- children,
54
- footer,
55
- ...rest
56
- }) => {
57
- const Container = as === 'link' ? Link : as;
58
-
59
- return (
60
- <Container
61
- to={href}
62
- className={twMerge(
63
- cardClasses(className, hasShadow),
64
- 'hc-group hc-transition hover:hc-shadow-xl hover:hc-border-indigo-300 focus:hc-shadow-xl focus:hc-border-indigo-300'
65
- )}
66
- {...rest}
67
- >
68
- {image && image}
69
- {children}
70
- {body && body}
71
- {footer && footer}
72
- </Container>
73
- );
74
- };
75
-
76
- export const CardImage = ({
77
- image,
78
- alt,
79
- className,
80
- imageClassName,
81
- ...rest
82
- }) => {
83
- return (
84
- <div
85
- className={twMerge(
86
- 'hc-w-full',
87
- className ?? ''
88
- )}
89
- >
90
- <img
91
- src={typeof image === 'string' ? image : image.src}
92
- width={image.width ? image.width : null}
93
- height={image.height ? image.height : null}
94
- alt={alt ?? ''}
95
- className={twMerge(
96
- 'hc-w-full hc-h-auto',
97
- imageClassName ?? ''
98
- )}
99
- {...rest}
100
- />
101
- </div>
102
- );
103
- };
104
-
105
- export const CardBody = ({
106
- children,
107
- className
108
- }) => {
109
- return (
110
- <div
111
- className={twMerge(
112
- 'hc-flex-auto hc-p-4 md:hc-px-6 lg:hc-px-8',
113
- className ?? ''
114
- )}
115
- >
116
- {children}
117
- </div>
118
- );
119
- };
120
-
121
- export const CardTitle = ({
122
- as = 'h3',
123
- children,
124
- className,
125
- ...rest
126
- }) => {
127
- const Title = as;
128
-
129
- return (
130
- <Title
131
- className={twMerge(
132
- 'hc-text-2xl hc-font-bold',
133
- className ?? ''
134
- )}
135
- {...rest}
136
- >
137
- {children}
138
- </Title>
139
- );
140
- };
141
-
142
- export const CardFooter = ({
143
- children,
144
- className
145
- }) => {
146
- return (
147
- <div
148
- className={twMerge(
149
- 'hc-py-2 hc-px-4 md:hc-px-6 lg:hc-px-8 hc-bg-gray-100',
150
- className ?? ''
151
- )}
152
- >
153
- {children}
154
- </div>
155
- );
156
- };
157
-
158
- Card.Default = CardDefault;
159
- Card.Link = CardLink;
160
- Card.Image = CardImage;
161
- Card.Body = CardBody;
162
- Card.Title = CardTitle;
163
- Card.Footer = CardFooter;
164
-
165
- CardDefault.displayName = 'Card:Default';
166
-
167
- export default Card;
@@ -1,56 +0,0 @@
1
- import React from 'react';
2
-
3
- import Card from '~/components/modules/cards/default';
4
- import Icon from '~/components/modules/icon';
5
-
6
- const CardFilter = ({
7
- as,
8
- className,
9
- children,
10
- ...rest
11
- }) => {
12
- return (
13
- <Card.Default
14
- as={as}
15
- className={`
16
- hc-bg-uiAccent/5 hc-border hc-border-uiAccent/20 hc-rounded
17
- ${className ?? ''}
18
- `}
19
- {...rest}
20
- >
21
- <Card.Body className="!hc-p-3">
22
- {children}
23
- </Card.Body>
24
- </Card.Default>
25
- );
26
- };
27
-
28
- export const CardTitle = ({
29
- as,
30
- children,
31
- icon,
32
- className,
33
- ...rest
34
- }) => {
35
- return (
36
- <Card.Title
37
- as={as}
38
- className={`
39
- hc-flex hc-items-center hc-gap-2 hc-mb-2 hc-text-xs hc-uppercase hc-font-bold hc-text-uiText
40
- ${className ?? ''}
41
- `}
42
- {...rest}
43
- >
44
- <Icon
45
- icon={icon}
46
- size="hc-size-5"
47
- className="hc-text-uiAccent/30"
48
- />
49
- {children}
50
- </Card.Title>
51
- );
52
- };
53
-
54
- CardFilter.Title = CardTitle;
55
-
56
- export default CardFilter;
@@ -1,48 +0,0 @@
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="hc-fit-content 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;