@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,194 +1,194 @@
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
+ 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 +1,35 @@
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
+ 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 +1,27 @@
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
+ 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,19 +1,19 @@
1
- import React from 'react';
2
-
3
- const ShowAllButton = ({ mapInteracted, setMapInteracted, fitBounds, mapRef, pinIconUrl, setSelectedFilters, setQuery, listingCount }) => {
4
- if (!mapInteracted) {
5
- return null;
6
- }
7
- return (
8
- <button
9
- style={{ fontFamily: 'Roboto, Arial, sans-serif', fontSize: '14px', fontWeight: '500' }}
10
- 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"
11
- onClick={() => { setMapInteracted(false); fitBounds(mapRef.current, true); if (listingCount < 2) { setSelectedFilters({}); setQuery(null); }; }}
12
- >
13
- <img src={pinIconUrl} alt="Pin Icon" className="hc-size-5" />
14
- Show All
15
- </button>
16
- );
17
- };
18
-
19
- export default ShowAllButton;
1
+ import React from 'react';
2
+
3
+ const ShowAllButton = ({ mapInteracted, setMapInteracted, fitBounds, mapRef, pinIconUrl, setSelectedFilters, setQuery, listingCount }) => {
4
+ if (!mapInteracted) {
5
+ return null;
6
+ }
7
+ return (
8
+ <button
9
+ style={{ fontFamily: 'Roboto, Arial, sans-serif', fontSize: '14px', fontWeight: '500' }}
10
+ 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"
11
+ onClick={() => { setMapInteracted(false); fitBounds(mapRef.current, true); if (listingCount < 2) { setSelectedFilters({}); setQuery(null); }; }}
12
+ >
13
+ <img src={pinIconUrl} alt="Pin Icon" className="hc-size-5" />
14
+ Show All
15
+ </button>
16
+ );
17
+ };
18
+
19
+ export default ShowAllButton;