@stackshift-ui/footer 6.0.10 → 6.0.11
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 +16 -16
- package/src/footer_a.tsx +16 -18
- package/src/footer_b.tsx +7 -13
- package/src/footer_c.tsx +7 -8
- package/src/footer_d.tsx +7 -8
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/footer",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.11",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -29,30 +29,30 @@
|
|
|
29
29
|
"typescript": "^5.6.2",
|
|
30
30
|
"vite-tsconfig-paths": "^5.0.1",
|
|
31
31
|
"vitest": "^2.1.1",
|
|
32
|
-
"@stackshift-ui/eslint-config": "6.0.
|
|
33
|
-
"@stackshift-ui/typescript-config": "6.0.
|
|
32
|
+
"@stackshift-ui/eslint-config": "6.0.8",
|
|
33
|
+
"@stackshift-ui/typescript-config": "6.0.8"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
|
-
"@stackshift-ui/
|
|
38
|
-
"@stackshift-ui/
|
|
39
|
-
"@stackshift-ui/
|
|
40
|
-
"@stackshift-ui/
|
|
41
|
-
"@stackshift-ui/
|
|
42
|
-
"@stackshift-ui/
|
|
43
|
-
"@stackshift-ui/
|
|
44
|
-
"@stackshift-ui/
|
|
45
|
-
"@stackshift-ui/grid-item": "6.0.
|
|
46
|
-
"@stackshift-ui/
|
|
47
|
-
"@stackshift-ui/
|
|
48
|
-
"@stackshift-ui/
|
|
37
|
+
"@stackshift-ui/link": "6.0.9",
|
|
38
|
+
"@stackshift-ui/system": "6.0.9",
|
|
39
|
+
"@stackshift-ui/section": "6.0.9",
|
|
40
|
+
"@stackshift-ui/text": "6.0.9",
|
|
41
|
+
"@stackshift-ui/container": "6.0.9",
|
|
42
|
+
"@stackshift-ui/grid": "6.0.9",
|
|
43
|
+
"@stackshift-ui/flex": "6.0.9",
|
|
44
|
+
"@stackshift-ui/button": "6.0.9",
|
|
45
|
+
"@stackshift-ui/grid-item": "6.0.9",
|
|
46
|
+
"@stackshift-ui/scripts": "6.0.8",
|
|
47
|
+
"@stackshift-ui/image": "6.0.9",
|
|
48
|
+
"@stackshift-ui/social-icons": "6.0.9"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@types/react": "16.8 - 19",
|
|
52
52
|
"next": "10 - 14",
|
|
53
53
|
"react": "16.8 - 19",
|
|
54
54
|
"react-dom": "16.8 - 19",
|
|
55
|
-
"@stackshift-ui/system": ">=6.0.
|
|
55
|
+
"@stackshift-ui/system": ">=6.0.9"
|
|
56
56
|
},
|
|
57
57
|
"peerDependenciesMeta": {
|
|
58
58
|
"next": {
|
package/src/footer_a.tsx
CHANGED
|
@@ -15,13 +15,13 @@ import { ContactDetails, Logo, SocialLink, Socials } from "./types";
|
|
|
15
15
|
export default function Footer_A({ logo, text, contacts, copyright, socialMedia }: FooterProps) {
|
|
16
16
|
return (
|
|
17
17
|
<Section className="py-20 bg-background">
|
|
18
|
-
<Container maxWidth={
|
|
18
|
+
<Container maxWidth={1280} className="lg:px-4">
|
|
19
19
|
<Flex wrap className="mb-5 lg:mb-20">
|
|
20
20
|
<LogoSection logo={logo} />
|
|
21
21
|
<TextContainer text={text} />
|
|
22
22
|
<ContactsContainer contacts={contacts} />
|
|
23
23
|
</Flex>
|
|
24
|
-
<Flex justify="between" align="center" className="w-full mx-auto
|
|
24
|
+
<Flex justify="between" align="center" wrap className="w-full mx-auto gap-4">
|
|
25
25
|
<CopyrightContainer copyright={copyright} />
|
|
26
26
|
<SocialMediaContainer socialMedia={socialMedia} />
|
|
27
27
|
</Flex>
|
|
@@ -36,16 +36,15 @@ function LogoSection({ logo }: { logo?: Logo }) {
|
|
|
36
36
|
return (
|
|
37
37
|
<div className="w-full mb-5 lg:w-1/5">
|
|
38
38
|
<Link
|
|
39
|
+
className="w-40 h-14 flex items-center"
|
|
39
40
|
aria-label={logoLink(logo) === "/" ? "Go to home page" : `Go to ${logoLink(logo)}`}
|
|
40
|
-
className="text-3xl font-bold leading-none"
|
|
41
41
|
href={logoLink(logo)}
|
|
42
42
|
target={logo?.linkTarget}
|
|
43
43
|
rel={logo?.linkTarget === "_blank" ? "noopener noreferrer" : ""}>
|
|
44
44
|
<Image
|
|
45
|
+
className="w-fit h-full object-contain"
|
|
45
46
|
src={`${logo?.image}`}
|
|
46
|
-
|
|
47
|
-
width={132}
|
|
48
|
-
height={56}
|
|
47
|
+
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
|
|
49
48
|
alt={logo?.alt ?? "footer-logo"}
|
|
50
49
|
/>
|
|
51
50
|
</Link>
|
|
@@ -57,7 +56,7 @@ function TextContainer({ text }: { text?: string }) {
|
|
|
57
56
|
if (!text) return null;
|
|
58
57
|
|
|
59
58
|
return (
|
|
60
|
-
<Container className="w-full mb-5 lg:w-1/5" maxWidth={
|
|
59
|
+
<Container className="w-full mb-5 lg:w-1/5 !px-0 lg:px-4" maxWidth={1280}>
|
|
61
60
|
<Text muted className="leading-loose">
|
|
62
61
|
{text}
|
|
63
62
|
</Text>
|
|
@@ -69,7 +68,7 @@ function ContactsContainer({ contacts }: { contacts?: ContactDetails[] }) {
|
|
|
69
68
|
if (!contacts) return null;
|
|
70
69
|
|
|
71
70
|
return (
|
|
72
|
-
<Container className="w-full mt-1
|
|
71
|
+
<Container className="w-full mt-1 lg:w-1/2 !px-0 lg:px-4" maxWidth={1280}>
|
|
73
72
|
{contacts?.map((contact, index) => (
|
|
74
73
|
<Grid columns={1} gap={4} className="lg:gap-10 md:grid-cols-3" key={index}>
|
|
75
74
|
<GridItem span={1}>
|
|
@@ -124,33 +123,32 @@ function SocialMediaContainer({ socialMedia }: { socialMedia?: SocialLink[] }) {
|
|
|
124
123
|
if (!socialMedia) return null;
|
|
125
124
|
|
|
126
125
|
return (
|
|
127
|
-
<Flex wrap className="
|
|
128
|
-
{socialMedia?.map((social, index) => <SocialMediaLink social={social}
|
|
126
|
+
<Flex wrap className="gap-5">
|
|
127
|
+
{socialMedia?.map((social, index) => <SocialMediaLink social={social} key={index} />)}
|
|
129
128
|
</Flex>
|
|
130
129
|
);
|
|
131
130
|
}
|
|
132
131
|
|
|
133
|
-
function SocialMediaLink({ social
|
|
132
|
+
function SocialMediaLink({ social }: { social?: SocialLink }) {
|
|
134
133
|
if (!social?.socialMediaLink) return null;
|
|
135
134
|
|
|
136
135
|
return (
|
|
137
136
|
<Link
|
|
138
137
|
aria-label={social?.socialMedia || social?.socialMediaPlatform || ""}
|
|
139
|
-
className="
|
|
138
|
+
className="rounded w-6 h-6 flex items-center"
|
|
140
139
|
target="_blank"
|
|
141
140
|
rel="noopener noreferrer"
|
|
142
|
-
href={social?.socialMediaLink}
|
|
143
|
-
key={index}>
|
|
141
|
+
href={social?.socialMediaLink}>
|
|
144
142
|
{social?.socialMediaIcon?.image ? (
|
|
145
143
|
<Image
|
|
146
|
-
className="h-
|
|
144
|
+
className="w-full h-full object-contain"
|
|
147
145
|
src={`${social?.socialMediaIcon?.image}`}
|
|
148
|
-
width={
|
|
149
|
-
height={
|
|
146
|
+
width={56}
|
|
147
|
+
height={56}
|
|
150
148
|
alt={social?.socialMediaIcon?.alt ?? "contact-socialMedia-icon"}
|
|
151
149
|
/>
|
|
152
150
|
) : (
|
|
153
|
-
<SocialIcons social={social?.socialMedia
|
|
151
|
+
<SocialIcons social={social?.socialMedia} />
|
|
154
152
|
)}
|
|
155
153
|
</Link>
|
|
156
154
|
);
|
package/src/footer_b.tsx
CHANGED
|
@@ -20,7 +20,7 @@ export default function Footer_B({ logo, copyright, socialMedia, menu }: FooterP
|
|
|
20
20
|
<LogoSection logo={logo} />
|
|
21
21
|
<MenuLists menu={menu} />
|
|
22
22
|
</Flex>
|
|
23
|
-
<Flex wrap
|
|
23
|
+
<Flex wrap className="mt-8 justify-between items-start">
|
|
24
24
|
<CopyrightContainer copyright={copyright} />
|
|
25
25
|
<SocialMediaContainer socialMedia={socialMedia} />
|
|
26
26
|
</Flex>
|
|
@@ -33,20 +33,14 @@ function LogoSection({ logo }: { logo?: Logo }) {
|
|
|
33
33
|
if (!logo?.image) return null;
|
|
34
34
|
|
|
35
35
|
return (
|
|
36
|
-
<div className="
|
|
36
|
+
<div className="mb-8 xl:mb-0 w-full lg:w-1/5">
|
|
37
37
|
<Link
|
|
38
38
|
aria-label={logoLink(logo) === "/" ? "Go to home page" : `Go to ${logoLink(logo)}`}
|
|
39
|
-
className="
|
|
39
|
+
className="w-40 h-14 flex items-center"
|
|
40
40
|
href={logoLink(logo)}
|
|
41
41
|
target={logo?.linkTarget}
|
|
42
42
|
rel={logo?.linkTarget === "_blank" ? "noopener noreferrer" : ""}>
|
|
43
|
-
<Image
|
|
44
|
-
src={logo?.image}
|
|
45
|
-
alt={logo?.alt ?? "footer-logo"}
|
|
46
|
-
width={80}
|
|
47
|
-
height={80}
|
|
48
|
-
className="inline-block text-3xl font-bold leading-none"
|
|
49
|
-
/>
|
|
43
|
+
<Image className="w-full h-full " src={logo?.image} alt={logo?.alt ?? "footer-logo"} />
|
|
50
44
|
</Link>
|
|
51
45
|
</div>
|
|
52
46
|
);
|
|
@@ -57,7 +51,7 @@ function MenuLists({ menu }: { menu?: LabeledRouteWithKey[] }) {
|
|
|
57
51
|
|
|
58
52
|
return (
|
|
59
53
|
<div className="w-full lg:w-auto">
|
|
60
|
-
<Flex wrap align="center" justify="between" as="ul" className="
|
|
54
|
+
<Flex wrap align="center" justify="between" as="ul" gap={5} className="mt-8">
|
|
61
55
|
{menu?.map((links, index, { length }) => (
|
|
62
56
|
<React.Fragment key={links?._key || index}>
|
|
63
57
|
<MenuList links={links} />
|
|
@@ -109,7 +103,7 @@ function CopyrightContainer({ copyright }: { copyright?: string }) {
|
|
|
109
103
|
if (!copyright) return null;
|
|
110
104
|
|
|
111
105
|
return (
|
|
112
|
-
<Text muted className="order-last text-sm ">
|
|
106
|
+
<Text muted className="order-last text-sm p-2">
|
|
113
107
|
{copyright}
|
|
114
108
|
</Text>
|
|
115
109
|
);
|
|
@@ -131,7 +125,7 @@ function SocialMediaLink({ social }: { social?: SocialLink }) {
|
|
|
131
125
|
return (
|
|
132
126
|
<Link
|
|
133
127
|
aria-label={social?.socialMedia || social?.socialMediaPlatform || ""}
|
|
134
|
-
className="inline-block p-2
|
|
128
|
+
className="inline-block p-2 rounded"
|
|
135
129
|
target="_blank"
|
|
136
130
|
rel="noopener noreferrer"
|
|
137
131
|
href={social?.socialMediaLink}
|
package/src/footer_c.tsx
CHANGED
|
@@ -67,7 +67,7 @@ function MenuLists({ menu }: { menu?: LabeledRouteWithKey[] }) {
|
|
|
67
67
|
return (
|
|
68
68
|
<div className="mx-auto">
|
|
69
69
|
<Flex
|
|
70
|
-
className="flex-col gap-
|
|
70
|
+
className="flex-col gap-4 lg:flex-row lg:gap-10"
|
|
71
71
|
as="ul"
|
|
72
72
|
align="center"
|
|
73
73
|
justify="center">
|
|
@@ -97,26 +97,25 @@ function SocialMediaContainer({ socialMedia }: { socialMedia?: SocialLink[] }) {
|
|
|
97
97
|
if (!socialMedia) return null;
|
|
98
98
|
|
|
99
99
|
return (
|
|
100
|
-
<Flex wrap justify="center" className="
|
|
101
|
-
{socialMedia?.map((social, index) => <SocialMediaLink social={social}
|
|
100
|
+
<Flex wrap justify="center" align="center" className="gap-5">
|
|
101
|
+
{socialMedia?.map((social, index) => <SocialMediaLink social={social} key={index} />)}
|
|
102
102
|
</Flex>
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
function SocialMediaLink({ social
|
|
106
|
+
function SocialMediaLink({ social }: { social?: SocialLink }) {
|
|
107
107
|
if (!social?.socialMediaLink) return null;
|
|
108
108
|
|
|
109
109
|
return (
|
|
110
110
|
<Link
|
|
111
111
|
aria-label={social?.socialMedia || social?.socialMediaPlatform || ""}
|
|
112
|
-
className="
|
|
112
|
+
className="rounded w-6 h-6 flex items-center"
|
|
113
113
|
target="_blank"
|
|
114
114
|
rel="noopener noreferrer"
|
|
115
|
-
href={social?.socialMediaLink}
|
|
116
|
-
key={index}>
|
|
115
|
+
href={social?.socialMediaLink}>
|
|
117
116
|
{social?.socialMediaIcon?.image ? (
|
|
118
117
|
<Image
|
|
119
|
-
className="h-
|
|
118
|
+
className="w-full h-full object-contain"
|
|
120
119
|
src={`${social?.socialMediaIcon?.image}`}
|
|
121
120
|
width={56}
|
|
122
121
|
height={56}
|
package/src/footer_d.tsx
CHANGED
|
@@ -54,16 +54,15 @@ function LogoSection({ logo }: { logo?: Logo }) {
|
|
|
54
54
|
|
|
55
55
|
return (
|
|
56
56
|
<Link
|
|
57
|
-
className="
|
|
57
|
+
className="w-40 h-14 flex items-center"
|
|
58
58
|
aria-label={logoLink(logo) === "/" ? "Go to home page" : `Go to ${logoLink(logo)}`}
|
|
59
59
|
href={logoLink(logo)}
|
|
60
60
|
target={logo?.linkTarget}
|
|
61
61
|
rel={logo?.linkTarget === "_blank" ? "noopener noreferrer" : ""}>
|
|
62
62
|
<Image
|
|
63
|
+
className="w-fit h-full object-contain"
|
|
63
64
|
src={`${logo?.image}`}
|
|
64
65
|
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
|
|
65
|
-
width={132}
|
|
66
|
-
height={56}
|
|
67
66
|
alt={logo?.alt ?? "footer-logo"}
|
|
68
67
|
/>
|
|
69
68
|
</Link>
|
|
@@ -157,17 +156,17 @@ function SocialMediaLink({ social }: { social?: SocialLink }) {
|
|
|
157
156
|
return (
|
|
158
157
|
<Link
|
|
159
158
|
aria-label={social?.socialMedia || social?.socialMediaPlatform || ""}
|
|
160
|
-
className="
|
|
159
|
+
className="rounded w-6 h-6 flex items-center"
|
|
161
160
|
target="_blank"
|
|
162
161
|
rel="noopener noreferrer"
|
|
163
162
|
href={social?.socialMediaLink}>
|
|
164
163
|
{social?.socialMediaIcon?.image ? (
|
|
165
164
|
<Image
|
|
166
|
-
className="h-
|
|
165
|
+
className="w-full h-full object-contain"
|
|
167
166
|
src={`${social?.socialMediaIcon?.image}`}
|
|
168
|
-
width={
|
|
169
|
-
height={
|
|
170
|
-
alt={social?.socialMediaIcon?.alt ?? "
|
|
167
|
+
width={56}
|
|
168
|
+
height={56}
|
|
169
|
+
alt={social?.socialMediaIcon?.alt ?? "contact-socialMedia-icon"}
|
|
171
170
|
/>
|
|
172
171
|
) : (
|
|
173
172
|
<SocialIcons social={getSocialType(social?.socialMedia)} />
|