@latte-macchiat-io/latte-vanilla-components 0.0.302 → 0.0.304
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/package.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { style } from '@vanilla-extract/css';
|
1
|
+
import { globalStyle, style } from '@vanilla-extract/css';
|
2
2
|
import { recipe } from '@vanilla-extract/recipes';
|
3
3
|
|
4
4
|
import { themeContract } from '../../theme/contract.css';
|
@@ -21,3 +21,14 @@ export const navLegalRecipe = recipe(
|
|
21
21
|
},
|
22
22
|
'nav-legal'
|
23
23
|
);
|
24
|
+
|
25
|
+
export const navLegalLink = style({}, 'nav-social-link');
|
26
|
+
|
27
|
+
globalStyle(`${navLegalLink} svg path`, {
|
28
|
+
transition: themeContract.navLegal.transition,
|
29
|
+
fill: themeContract.navLegal.colors.default,
|
30
|
+
});
|
31
|
+
|
32
|
+
globalStyle(`${navLegalLink}:hover svg path`, {
|
33
|
+
fill: themeContract.navLegal.colors.defaultHover,
|
34
|
+
});
|
@@ -1,5 +1,6 @@
|
|
1
1
|
const themeNavLegalBase = {
|
2
2
|
navLegal: {
|
3
|
+
transition: 'all 0.5s ease-in-out',
|
3
4
|
gap: {
|
4
5
|
mobile: '5px',
|
5
6
|
sm: '5px',
|
@@ -14,11 +15,19 @@ const themeNavLegalBase = {
|
|
14
15
|
export const themeNavLegalLight = {
|
15
16
|
navLegal: {
|
16
17
|
...themeNavLegalBase.navLegal,
|
18
|
+
colors: {
|
19
|
+
default: '#FF7377',
|
20
|
+
defaultHover: '#000000',
|
21
|
+
},
|
17
22
|
},
|
18
23
|
};
|
19
24
|
|
20
25
|
export const themeNavLegalDark = {
|
21
26
|
navLegal: {
|
22
27
|
...themeNavLegalBase.navLegal,
|
28
|
+
colors: {
|
29
|
+
default: '#FF7377',
|
30
|
+
defaultHover: '#000000',
|
31
|
+
},
|
23
32
|
},
|
24
33
|
};
|
@@ -6,10 +6,11 @@ import { Icon } from '../Icon';
|
|
6
6
|
import icons from '../Icon/path';
|
7
7
|
|
8
8
|
export type NavSocialProps = React.HTMLAttributes<HTMLDivElement> & {
|
9
|
+
size: number;
|
9
10
|
navSocial: { name: Social; link: string }[];
|
10
11
|
};
|
11
12
|
|
12
|
-
export const NavSocial = ({ navSocial, className }: NavSocialProps) => (
|
13
|
+
export const NavSocial = ({ size = 24, navSocial, className }: NavSocialProps) => (
|
13
14
|
<div className={clsx(navSocialRecipe(), className)}>
|
14
15
|
{navSocial?.map(({ name, link }, index) => {
|
15
16
|
const capitalized = name[0].toUpperCase() + name.slice(1);
|
@@ -17,7 +18,7 @@ export const NavSocial = ({ navSocial, className }: NavSocialProps) => (
|
|
17
18
|
return (
|
18
19
|
<div key={`navSocialItem-${index}`} className={navSocialLink}>
|
19
20
|
<a target="_blank" rel="noopener noreferrer" aria-label={name} href={link}>
|
20
|
-
<Icon icon={`social${capitalized}` as keyof typeof icons} />
|
21
|
+
<Icon size={size} icon={`social${capitalized}` as keyof typeof icons} />
|
21
22
|
</a>
|
22
23
|
</div>
|
23
24
|
);
|
@@ -650,6 +650,11 @@ export const themeContract = createGlobalThemeContract({
|
|
650
650
|
},
|
651
651
|
|
652
652
|
navLegal: {
|
653
|
+
transition: 'latte-navLegal-transition',
|
654
|
+
colors: {
|
655
|
+
default: 'latte-navLegal-colors-default',
|
656
|
+
defaultHover: 'latte-navLegal-colors-defaultHover',
|
657
|
+
},
|
653
658
|
gap: {
|
654
659
|
mobile: 'latte-navLegal-gap-mobile',
|
655
660
|
sm: 'latte-navLegal-gap-sm',
|