foundry-component-library 0.1.11 → 0.1.12
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/lib/components/Capabilities/Item.tsx +7 -1
- package/lib/components/CaseStudyTeaser/index.tsx +5 -1
- package/lib/components/HubsAccordion/Hub.tsx +7 -1
- package/lib/components/case/Other/index.tsx +33 -25
- package/lib/components/cases/Items/More.tsx +5 -3
- package/lib/components/cases/Items/index.tsx +13 -11
- package/lib/components/single/Other/index.tsx +29 -21
- package/lib/queries/getCases.ts +3 -0
- package/lib/queries/getCasesPage.ts +3 -0
- package/lib/queries/getHomePage.ts +6 -0
- package/lib/queries/getHubBySlug.ts +6 -0
- package/lib/queries/getHubs.ts +6 -0
- package/lib/queries/getHubsPage.ts +3 -0
- package/lib/types/index.ts +3 -0
- package/package.json +1 -1
|
@@ -104,6 +104,8 @@ const Item = ({
|
|
|
104
104
|
>
|
|
105
105
|
{Link &&
|
|
106
106
|
cases.map((item) => {
|
|
107
|
+
const { thumbnailImage, mainImage } = item.case;
|
|
108
|
+
|
|
107
109
|
return (
|
|
108
110
|
<Link
|
|
109
111
|
href={item.uri}
|
|
@@ -115,7 +117,11 @@ const Item = ({
|
|
|
115
117
|
<div className={styles.caseImage}>
|
|
116
118
|
{Image && (
|
|
117
119
|
<Image
|
|
118
|
-
src={
|
|
120
|
+
src={
|
|
121
|
+
thumbnailImage?.sourceUrl ||
|
|
122
|
+
mainImage?.sourceUrl ||
|
|
123
|
+
""
|
|
124
|
+
}
|
|
119
125
|
alt={item.title}
|
|
120
126
|
fill
|
|
121
127
|
/>
|
|
@@ -45,11 +45,15 @@ const CaseStudyTeaser = ({
|
|
|
45
45
|
}}
|
|
46
46
|
>
|
|
47
47
|
{cases.map((el) => {
|
|
48
|
+
const { thumbnailImage, mainImage } = el.case;
|
|
49
|
+
|
|
48
50
|
return (
|
|
49
51
|
<div key={el.id} className={styles.case}>
|
|
50
52
|
<Image
|
|
51
53
|
className={styles.image}
|
|
52
|
-
src={
|
|
54
|
+
src={
|
|
55
|
+
thumbnailImage?.sourceUrl || mainImage?.sourceUrl || ""
|
|
56
|
+
}
|
|
53
57
|
alt={el.title}
|
|
54
58
|
fill
|
|
55
59
|
/>
|
|
@@ -88,6 +88,8 @@ const Hub = ({
|
|
|
88
88
|
}}
|
|
89
89
|
>
|
|
90
90
|
{customFields.relatedWork.map((item) => {
|
|
91
|
+
const { thumbnailImage, mainImage } = item.case;
|
|
92
|
+
|
|
91
93
|
return (
|
|
92
94
|
<Link
|
|
93
95
|
href={item.uri}
|
|
@@ -98,7 +100,11 @@ const Hub = ({
|
|
|
98
100
|
>
|
|
99
101
|
<div className={styles.caseImage}>
|
|
100
102
|
<Image
|
|
101
|
-
src={
|
|
103
|
+
src={
|
|
104
|
+
thumbnailImage?.sourceUrl ||
|
|
105
|
+
mainImage?.sourceUrl ||
|
|
106
|
+
""
|
|
107
|
+
}
|
|
102
108
|
alt={item.title}
|
|
103
109
|
fill
|
|
104
110
|
/>
|
|
@@ -40,33 +40,41 @@ function Other({
|
|
|
40
40
|
onMouseLeave={handleMouseUp}
|
|
41
41
|
style={dragStyle as React.CSSProperties}
|
|
42
42
|
>
|
|
43
|
-
{cases.map((item) =>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
43
|
+
{cases.map((item) => {
|
|
44
|
+
const { thumbnailImage, mainImage } = item.case;
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<div key={item.id} className={styles.case}>
|
|
48
|
+
<Link href={item.uri}>
|
|
49
|
+
<div className={styles.image}>
|
|
50
|
+
{item.case.mainImage && (
|
|
51
|
+
<Image
|
|
52
|
+
className={styles.image}
|
|
53
|
+
src={
|
|
54
|
+
thumbnailImage?.sourceUrl ||
|
|
55
|
+
mainImage?.sourceUrl ||
|
|
56
|
+
""
|
|
57
|
+
}
|
|
58
|
+
alt={item.title || ""}
|
|
59
|
+
width={308}
|
|
60
|
+
height={220}
|
|
61
|
+
/>
|
|
62
|
+
)}
|
|
61
63
|
</div>
|
|
62
|
-
<div className={styles.
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
<div className={styles.texts}>
|
|
65
|
+
<div>
|
|
66
|
+
<div className={styles.title}>{item.title}</div>
|
|
67
|
+
{item.case.excerpt && <div>{item.case.excerpt}</div>}
|
|
68
|
+
</div>
|
|
69
|
+
<div className={styles.more}>
|
|
70
|
+
{translate("See More")}
|
|
71
|
+
<Arrow />
|
|
72
|
+
</div>
|
|
65
73
|
</div>
|
|
66
|
-
</
|
|
67
|
-
</
|
|
68
|
-
|
|
69
|
-
)
|
|
74
|
+
</Link>
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
})}
|
|
70
78
|
</div>
|
|
71
79
|
<div className={styles.buttonWrapper}>
|
|
72
80
|
<Link className={styles.button} href="/cases">
|
|
@@ -56,7 +56,7 @@ const More = ({
|
|
|
56
56
|
<>
|
|
57
57
|
{cases.map((item) => {
|
|
58
58
|
if (!item.case) return null;
|
|
59
|
-
const { thumbnailVideo, mainImage } = item.case;
|
|
59
|
+
const { thumbnailVideo, thumbnailImage, mainImage } = item.case;
|
|
60
60
|
|
|
61
61
|
return (
|
|
62
62
|
<div key={item.id} className={styles.case}>
|
|
@@ -64,11 +64,13 @@ const More = ({
|
|
|
64
64
|
{thumbnailVideo && (
|
|
65
65
|
<Video url={thumbnailVideo.mediaItemUrl} Image={Image} />
|
|
66
66
|
)}
|
|
67
|
-
{!thumbnailVideo && mainImage
|
|
67
|
+
{!thumbnailVideo && (mainImage || thumbnailImage) && (
|
|
68
68
|
<div className={styles.imageWrapper}>
|
|
69
69
|
<Image
|
|
70
70
|
className={styles.image}
|
|
71
|
-
src={
|
|
71
|
+
src={
|
|
72
|
+
thumbnailImage?.sourceUrl || mainImage?.sourceUrl || ""
|
|
73
|
+
}
|
|
72
74
|
alt={item.title || ""}
|
|
73
75
|
width={720}
|
|
74
76
|
height={490}
|
|
@@ -79,7 +79,7 @@ function Cases({
|
|
|
79
79
|
<div className={styles.wrapper}>
|
|
80
80
|
{cases.map((item) => {
|
|
81
81
|
if (!item.case) return null;
|
|
82
|
-
const { thumbnailVideo, mainImage } = item.case;
|
|
82
|
+
const { thumbnailVideo, mainImage, thumbnailImage } = item.case;
|
|
83
83
|
|
|
84
84
|
return (
|
|
85
85
|
<div key={item.id} className={styles.case}>
|
|
@@ -91,17 +91,19 @@ function Cases({
|
|
|
91
91
|
Image={Image}
|
|
92
92
|
/>
|
|
93
93
|
)}
|
|
94
|
-
{!thumbnailVideo && mainImage && (
|
|
94
|
+
{!thumbnailVideo && (thumbnailImage || mainImage) && (
|
|
95
95
|
<div className={styles.imageWrapper}>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
96
|
+
<Image
|
|
97
|
+
className={styles.image}
|
|
98
|
+
src={
|
|
99
|
+
thumbnailImage?.sourceUrl ||
|
|
100
|
+
mainImage?.sourceUrl ||
|
|
101
|
+
""
|
|
102
|
+
}
|
|
103
|
+
alt={item.title || ""}
|
|
104
|
+
width={720}
|
|
105
|
+
height={490}
|
|
106
|
+
/>
|
|
105
107
|
</div>
|
|
106
108
|
)}
|
|
107
109
|
<div className={styles.texts}>
|
|
@@ -25,27 +25,35 @@ function Other({
|
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
<div className={styles.cases}>
|
|
28
|
-
{cases.map((item) =>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
28
|
+
{cases.map((item) => {
|
|
29
|
+
const { thumbnailImage, mainImage } = item.case;
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div key={item.id} className={styles.case}>
|
|
33
|
+
<Link href={item.uri}>
|
|
34
|
+
<div className={styles.image}>
|
|
35
|
+
{item.case.mainImage && (
|
|
36
|
+
<Image
|
|
37
|
+
className={styles.image}
|
|
38
|
+
src={
|
|
39
|
+
thumbnailImage?.sourceUrl ||
|
|
40
|
+
mainImage?.sourceUrl ||
|
|
41
|
+
""
|
|
42
|
+
}
|
|
43
|
+
alt={item.title || ""}
|
|
44
|
+
width={400}
|
|
45
|
+
height={490}
|
|
46
|
+
/>
|
|
47
|
+
)}
|
|
48
|
+
</div>
|
|
49
|
+
<div className={styles.texts}>
|
|
50
|
+
<div>{item.title}</div>
|
|
51
|
+
<Arrow />
|
|
52
|
+
</div>
|
|
53
|
+
</Link>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
})}
|
|
49
57
|
</div>
|
|
50
58
|
</div>
|
|
51
59
|
</Container>
|
package/lib/queries/getCases.ts
CHANGED
|
@@ -29,6 +29,9 @@ type HomePage = {
|
|
|
29
29
|
title: string;
|
|
30
30
|
case: {
|
|
31
31
|
caption: string;
|
|
32
|
+
thumbnailImage: {
|
|
33
|
+
sourceUrl: string;
|
|
34
|
+
};
|
|
32
35
|
mainImage: {
|
|
33
36
|
sourceUrl: string;
|
|
34
37
|
};
|
|
@@ -146,6 +149,9 @@ export default async function getHomePage({
|
|
|
146
149
|
title
|
|
147
150
|
case {
|
|
148
151
|
caption
|
|
152
|
+
thumbnailImage {
|
|
153
|
+
sourceUrl
|
|
154
|
+
}
|
|
149
155
|
mainImage {
|
|
150
156
|
sourceUrl
|
|
151
157
|
}
|
|
@@ -50,6 +50,9 @@ export default async function getCaseBySlug({
|
|
|
50
50
|
title
|
|
51
51
|
uri
|
|
52
52
|
case {
|
|
53
|
+
thumbnailImage {
|
|
54
|
+
sourceUrl
|
|
55
|
+
}
|
|
53
56
|
mainImage {
|
|
54
57
|
sourceUrl
|
|
55
58
|
}
|
|
@@ -64,6 +67,9 @@ export default async function getCaseBySlug({
|
|
|
64
67
|
title
|
|
65
68
|
uri
|
|
66
69
|
case {
|
|
70
|
+
thumbnailImage {
|
|
71
|
+
sourceUrl
|
|
72
|
+
}
|
|
67
73
|
mainImage {
|
|
68
74
|
sourceUrl
|
|
69
75
|
}
|
package/lib/queries/getHubs.ts
CHANGED
|
@@ -56,6 +56,9 @@ export default async function getCases(): Promise<{
|
|
|
56
56
|
title
|
|
57
57
|
uri
|
|
58
58
|
case {
|
|
59
|
+
thumbnailImage {
|
|
60
|
+
sourceUrl
|
|
61
|
+
}
|
|
59
62
|
mainImage {
|
|
60
63
|
sourceUrl
|
|
61
64
|
}
|
|
@@ -70,6 +73,9 @@ export default async function getCases(): Promise<{
|
|
|
70
73
|
title
|
|
71
74
|
uri
|
|
72
75
|
case {
|
|
76
|
+
thumbnailImage {
|
|
77
|
+
sourceUrl
|
|
78
|
+
}
|
|
73
79
|
mainImage {
|
|
74
80
|
sourceUrl
|
|
75
81
|
}
|
package/lib/types/index.ts
CHANGED