@abcagency/hc-ui-components 1.3.27 → 1.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/HireControlMap.js +9 -1
- package/dist/components/HireControlMap.js.map +1 -1
- package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
- package/dist/components/containers/list/list-item/list-item-container.js.map +1 -1
- package/dist/components/containers/maps/map-container.js +34 -35
- package/dist/components/containers/maps/map-container.js.map +1 -1
- package/dist/components/containers/maps/map-list-container.js +2 -2
- package/dist/components/containers/maps/map-list-container.js.map +1 -1
- package/dist/components/modules/jobListing/listing-details.js +2 -23
- package/dist/components/modules/jobListing/listing-details.js.map +1 -1
- package/dist/components/modules/list/list-item/list-item.js.map +1 -1
- package/dist/components/modules/maps/map.js +4 -13
- package/dist/components/modules/maps/map.js.map +1 -1
- package/dist/contexts/themeContext.js +33 -0
- package/dist/contexts/themeContext.js.map +1 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/components/modules/jobListing/listing-details.d.ts +1 -1
- package/dist/types/contexts/themeContext.d.ts +11 -0
- package/dist/util/urlFilterUtil.js +0 -10
- package/dist/util/urlFilterUtil.js.map +1 -1
- package/package.json +1 -1
- package/src/components/HireControlMap.js +58 -55
- package/src/components/containers/jobListing/listing-details-container.js +40 -40
- package/src/components/containers/list/list-item/list-item-container.js +43 -43
- package/src/components/containers/maps/map-container.js +37 -35
- package/src/components/containers/maps/map-list-container.js +1 -1
- package/src/components/modules/jobListing/listing-details.js +109 -109
- package/src/components/modules/list/list-item/list-item.js +130 -130
- package/src/components/modules/maps/map.js +5 -17
- package/src/contexts/themeContext.js +40 -0
- package/src/styles/index.css +33 -24
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { createContext, useContext } from 'react';
|
|
3
|
+
|
|
4
|
+
const ThemeContext = createContext();
|
|
5
|
+
|
|
6
|
+
export const ThemeProvider = ({
|
|
7
|
+
children,
|
|
8
|
+
uiText,
|
|
9
|
+
uiAccent,
|
|
10
|
+
primary,
|
|
11
|
+
primaryDark,
|
|
12
|
+
secondary,
|
|
13
|
+
secondaryDark
|
|
14
|
+
}) => {
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
document.documentElement.style.setProperty('--ui-text', uiText);
|
|
17
|
+
document.documentElement.style.setProperty('--ui-accent', uiAccent);
|
|
18
|
+
document.documentElement.style.setProperty('--primary', primary);
|
|
19
|
+
document.documentElement.style.setProperty('--primary-dark', primaryDark);
|
|
20
|
+
document.documentElement.style.setProperty('--secondary', secondary);
|
|
21
|
+
document.documentElement.style.setProperty('--secondary-dark', secondaryDark);
|
|
22
|
+
}, [uiText, uiAccent, primary, primaryDark, secondary, secondaryDark]);
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<ThemeContext.Provider
|
|
26
|
+
value={{
|
|
27
|
+
uiText,
|
|
28
|
+
uiAccent,
|
|
29
|
+
primary,
|
|
30
|
+
primaryDark,
|
|
31
|
+
secondary,
|
|
32
|
+
secondaryDark
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
35
|
+
{children}
|
|
36
|
+
</ThemeContext.Provider>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const useTheme = () => useContext(ThemeContext);
|
package/src/styles/index.css
CHANGED
|
@@ -1,24 +1,33 @@
|
|
|
1
|
-
@config "../../tailwind.config.js";
|
|
2
|
-
@tailwind base;
|
|
3
|
-
@tailwind components;
|
|
4
|
-
@tailwind utilities;
|
|
5
|
-
|
|
6
|
-
@layer base {
|
|
7
|
-
html {
|
|
8
|
-
@apply hc-text-400 hc-text-uiText [scroll-behavior:smooth];
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@layer components {
|
|
13
|
-
.track * {
|
|
14
|
-
@apply hc-pointer-events-none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.stretched-link::after {
|
|
18
|
-
@apply hc-content-[''] hc-absolute hc-inset-0 hc-z-[1] hc-pointer-events-auto hc-bg-transparent;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.fit-content{
|
|
23
|
-
height:fit-content;
|
|
24
|
-
}
|
|
1
|
+
@config "../../tailwind.config.js";
|
|
2
|
+
@tailwind base;
|
|
3
|
+
@tailwind components;
|
|
4
|
+
@tailwind utilities;
|
|
5
|
+
|
|
6
|
+
@layer base {
|
|
7
|
+
html {
|
|
8
|
+
@apply hc-text-400 hc-text-uiText [scroll-behavior:smooth];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@layer components {
|
|
13
|
+
.track * {
|
|
14
|
+
@apply hc-pointer-events-none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.stretched-link::after {
|
|
18
|
+
@apply hc-content-[''] hc-absolute hc-inset-0 hc-z-[1] hc-pointer-events-auto hc-bg-transparent;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.fit-content{
|
|
23
|
+
height:fit-content;
|
|
24
|
+
}
|
|
25
|
+
:root {
|
|
26
|
+
--ui-text: #000000;
|
|
27
|
+
--ui-accent: #008494;
|
|
28
|
+
--primary: #008494;
|
|
29
|
+
--primary-dark: #001f5f;
|
|
30
|
+
--secondary: #008494;
|
|
31
|
+
--secondary-dark: #005f73;
|
|
32
|
+
}
|
|
33
|
+
|