@explorer-1/vue 0.2.0 → 0.2.2
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/components.d.ts +1 -0
- package/dist/explorer-1-vue.js +3759 -3729
- package/dist/explorer-1-vue.umd.cjs +12 -12
- package/dist/src/components/BlockCard/BlockCard.vue.d.ts +9 -0
- package/dist/src/components/BlockLinkCard/BlockLinkCard.vue.d.ts +30 -0
- package/dist/src/components/BlockRelatedLinks/BlockRelatedLinks.vue.d.ts +11 -0
- package/dist/src/components/BlockStreamfield/BlockStreamfield.stories.d.ts +17 -0
- package/dist/src/components/CalendarButton/CalendarButton.stories.d.ts +2 -62
- package/dist/src/components/CalendarButton/CalendarButton.vue.d.ts +26 -7
- package/dist/src/components/EventDetailHero/EventDetailHero.vue.d.ts +8 -1
- package/dist/src/templates/PageEventDetail/PageEventDetail.stories.d.ts +3 -1
- package/dist/src/templates/PageImageDetail/PageImageDetail.stories.d.ts +19 -27
- package/dist/src/templates/PageNewsDetail/PageNewsDetail.stories.d.ts +136 -0
- package/dist/src/templates/edu/PageContentEdu.stories.d.ts +1 -0
- package/dist/src/templates/edu/PageEduEventDetail/PageEduEventDetail.stories.d.ts +128 -0
- package/dist/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.stories.d.ts +51 -0
- package/dist/src/templates/edu/PageEduResourceArticle/PageEduResourceArticle.stories.d.ts +17 -0
- package/dist/src/templates/www/PageCuratedGallery/PageCuratedGallery.stories.d.ts +17 -0
- package/dist/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.stories.d.ts +17 -0
- package/dist/style.css +1 -1
- package/lib/main.ts +4 -4
- package/package.json +1 -1
- package/src/components/BaseTag/BaseTag.vue +2 -2
- package/src/components/{BlockCardGroup/BlockCardGroup.stories.js → BlockCardGrid/BlockCardGrid.stories.js} +21 -12
- package/src/components/BlockCardGrid/BlockCardGrid.vue +70 -0
- package/src/components/{BlockCard/BlockCard.stories.js → BlockCardGridItem/BlockCardGridItem.stories.js} +14 -6
- package/src/components/BlockCardGridItem/BlockCardGridItem.vue +40 -0
- package/src/components/{BlockCard/BlockCard.vue → BlockCardGridItem/BlockCardGridItemElement.vue} +36 -20
- package/src/components/BlockCircleImageCard/BlockCircleImageCard.stories.js +2 -1
- package/src/components/BlockInlineImage/BlockInlineImage.vue +1 -1
- package/src/components/BlockLinkCard/BlockLinkCard.stories.js +2 -1
- package/src/components/BlockLinkCard/BlockLinkCard.vue +33 -13
- package/src/components/BlockLinkCarousel/BlockLinkCarousel.vue +0 -1
- package/src/components/BlockLinkTile/BlockLinkTile.stories.js +3 -2
- package/src/components/BlockListCards/BlockListCards.stories.js +1 -0
- package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +6 -1
- package/src/components/BlockStreamfield/BlockStreamfield.stories.js +8 -1
- package/src/components/BlockStreamfield/BlockStreamfield.vue +17 -4
- package/src/components/CalendarButton/CalendarButton.stories.js +1 -19
- package/src/components/CalendarButton/CalendarButton.vue +43 -17
- package/src/components/EventDetailHero/EventDetailHero.vue +26 -31
- package/src/components/LayoutHelper/LayoutHelper.vue +7 -1
- package/src/components/MixinCarousel/MixinCarousel.vue +1 -1
- package/src/components/ThumbnailCarousel/ThumbnailCarousel.stories.js +1 -0
- package/src/docs/overviews/blocks.docs.mdx.disabled +7 -7
- package/src/docs/overviews/cards.docs.mdx +81 -0
- package/src/interfaces.ts +7 -2
- package/src/templates/PageEventDetail/PageEventDetail.stories.js +3 -1
- package/src/templates/PageEventDetail/PageEventDetail.vue +3 -3
- package/src/templates/PageImageDetail/PageImageDetail.stories.js +1 -1
- package/src/templates/edu/PageContentEdu.stories.js +1 -0
- package/src/templates/edu/PageEduEventDetail/PageEduEventDetail.stories.js +130 -0
- package/src/templates/edu/PageEduEventDetail/PageEduEventDetail.vue +419 -0
- package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.stories.js +2 -2
- package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.vue +4 -4
- package/src/components/BlockCardGroup/BlockCardGroup.vue +0 -61
package/lib/main.ts
CHANGED
|
@@ -50,8 +50,8 @@ import BaseUnitToggle from './../src/components/BaseUnitToggle/BaseUnitToggle.vu
|
|
|
50
50
|
import BaseVideo from './../src/components/BaseVideo/BaseVideo.vue'
|
|
51
51
|
import BlockAnchor from './../src/components/BlockAnchor/BlockAnchor.vue'
|
|
52
52
|
import BlockAudio from './../src/components/BlockAudio/BlockAudio.vue'
|
|
53
|
-
import
|
|
54
|
-
import
|
|
53
|
+
import BlockCardGridItem from './../src/components/BlockCardGridItem/BlockCardGridItem.vue'
|
|
54
|
+
import BlockCardGrid from './../src/components/BlockCardGrid/BlockCardGrid.vue'
|
|
55
55
|
import BlockCircleImageCard from './../src/components/BlockCircleImageCard/BlockCircleImageCard.vue'
|
|
56
56
|
import BlockCta from './../src/components/BlockCta/BlockCta.vue'
|
|
57
57
|
import BlockHeading from './../src/components/BlockHeading/BlockHeading.vue'
|
|
@@ -254,8 +254,8 @@ export {
|
|
|
254
254
|
BaseVideo,
|
|
255
255
|
BlockAnchor,
|
|
256
256
|
BlockAudio,
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
BlockCardGridItem,
|
|
258
|
+
BlockCardGrid,
|
|
259
259
|
BlockCircleImageCard,
|
|
260
260
|
BlockCta,
|
|
261
261
|
BlockHeading,
|
package/package.json
CHANGED
|
@@ -10,8 +10,8 @@ const variantMap: Attributes = {
|
|
|
10
10
|
|
|
11
11
|
const sizeMap: Attributes = {
|
|
12
12
|
sm: 'text-xs uppercase border-t-2 py-1 px-2.5',
|
|
13
|
-
md: 'text-base capitalize border-t py-
|
|
14
|
-
lg: 'text-lg capitalize border-t py-
|
|
13
|
+
md: 'text-base capitalize border-t py-1 px-3',
|
|
14
|
+
lg: 'text-lg capitalize border-t py-1 px-3'
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
interface BaseTagProps {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import BlockCardGrid from './BlockCardGrid.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title: 'Components/Blocks/
|
|
5
|
-
component:
|
|
4
|
+
title: 'Components/Blocks/BlockCardGrid',
|
|
5
|
+
component: BlockCardGrid,
|
|
6
|
+
tags: ['!autodocs'],
|
|
6
7
|
excludeStories: /.*Data$/
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
export const
|
|
10
|
+
export const BlockCardGridData = [
|
|
10
11
|
{
|
|
11
|
-
|
|
12
|
+
label: 'Factoid 1',
|
|
12
13
|
title: 'Nimble Limbs',
|
|
13
14
|
description:
|
|
14
15
|
'The robot has four limbs, each with seven degrees of freedom. The robot has four limbs, each with seven degrees of freedom. The robot has four limbs, each with seven degrees of freedom.',
|
|
@@ -23,7 +24,7 @@ export const BlockCardGroupData = [
|
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
26
|
{
|
|
26
|
-
|
|
27
|
+
label: 'Factoid 2',
|
|
27
28
|
title: 'Nimble Limbs',
|
|
28
29
|
description: 'The robot has four limbs, each with seven degrees of freedom.',
|
|
29
30
|
image: {
|
|
@@ -34,17 +35,22 @@ export const BlockCardGroupData = [
|
|
|
34
35
|
width: 800
|
|
35
36
|
},
|
|
36
37
|
srcSet: 'https://picsum.photos/400/200 320w, https://picsum.photos/800/400 1024w'
|
|
38
|
+
},
|
|
39
|
+
link: {
|
|
40
|
+
page: {
|
|
41
|
+
url: '#'
|
|
42
|
+
}
|
|
37
43
|
}
|
|
38
44
|
},
|
|
39
45
|
{
|
|
40
|
-
|
|
46
|
+
label: 'Factoid 3',
|
|
41
47
|
title: 'Nimble Limbs',
|
|
42
48
|
description:
|
|
43
49
|
'Proin sapien nulla, consequat et aliquam tristique, sollicitudin vitae lorem. Etiam nec vestibulum ante, semper blandit tortor. Nam id bibendum leo. Suspendisse a cursus felis, eget tristique nibh. Proin facilisis tortor eget pulvinar cursus.',
|
|
44
50
|
image: null
|
|
45
51
|
},
|
|
46
52
|
{
|
|
47
|
-
|
|
53
|
+
label: 'Factoid 4',
|
|
48
54
|
title: 'Nimble Limbs',
|
|
49
55
|
description: 'The robot has four limbs, each with seven degrees of freedom.',
|
|
50
56
|
image: {
|
|
@@ -58,14 +64,17 @@ export const BlockCardGroupData = [
|
|
|
58
64
|
}
|
|
59
65
|
},
|
|
60
66
|
{
|
|
61
|
-
|
|
67
|
+
label: 'Factoid 5',
|
|
62
68
|
title: 'Nimble Limbs',
|
|
63
69
|
description: 'The robot has four limbs, each with seven degrees of freedom.',
|
|
64
|
-
image: null
|
|
70
|
+
image: null,
|
|
71
|
+
link: {
|
|
72
|
+
externalLink: '#'
|
|
73
|
+
}
|
|
65
74
|
}
|
|
66
75
|
]
|
|
67
76
|
|
|
68
77
|
export const BaseStory = {
|
|
69
|
-
name: '
|
|
70
|
-
args: {
|
|
78
|
+
name: 'BlockCardGrid',
|
|
79
|
+
args: { cards: BlockCardGridData }
|
|
71
80
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="cards"
|
|
4
|
+
class="BlockCardGrid"
|
|
5
|
+
>
|
|
6
|
+
<div
|
|
7
|
+
:class="`hidden md:grid md:grid-cols-2 lg:grid-cols-3 ${compact ? ' gap-5' : '3xl:grid-cols-4 gap-8'}`"
|
|
8
|
+
>
|
|
9
|
+
<BlockCardGridItem
|
|
10
|
+
v-for="(card, index) of cards"
|
|
11
|
+
:key="`item-${index}`"
|
|
12
|
+
class="col-span-1"
|
|
13
|
+
:label="card.label"
|
|
14
|
+
:title="card.title"
|
|
15
|
+
:description="card.description"
|
|
16
|
+
:image="card.image"
|
|
17
|
+
:link="card.link"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
<MixinCarousel
|
|
21
|
+
class="md:hidden sm:px-10 sm:-ml-10 py-10 -mt-10 overflow-x-visible"
|
|
22
|
+
indent="col-1"
|
|
23
|
+
:slides-per-view="3"
|
|
24
|
+
no-links
|
|
25
|
+
>
|
|
26
|
+
<BlockCardGridItem
|
|
27
|
+
v-for="(card, index) of cards"
|
|
28
|
+
:key="index"
|
|
29
|
+
:label="card.label"
|
|
30
|
+
:title="card.title"
|
|
31
|
+
:text="card.description"
|
|
32
|
+
:image="card.image"
|
|
33
|
+
class="swiper-slide mb-5"
|
|
34
|
+
/>
|
|
35
|
+
</MixinCarousel>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
<script lang="ts">
|
|
39
|
+
import { defineComponent } from 'vue'
|
|
40
|
+
import type { PropType } from 'vue'
|
|
41
|
+
import type { ImageObject, LinkObject } from '../../interfaces'
|
|
42
|
+
import BlockCardGridItem from './../BlockCardGridItem/BlockCardGridItem.vue'
|
|
43
|
+
import MixinCarousel from './../MixinCarousel/MixinCarousel.vue'
|
|
44
|
+
|
|
45
|
+
interface CardGridItem {
|
|
46
|
+
title: string
|
|
47
|
+
label: string
|
|
48
|
+
description: string
|
|
49
|
+
image: Partial<ImageObject>
|
|
50
|
+
link?: LinkObject
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default defineComponent({
|
|
54
|
+
name: 'BlockCardGrid',
|
|
55
|
+
components: {
|
|
56
|
+
MixinCarousel,
|
|
57
|
+
BlockCardGridItem
|
|
58
|
+
},
|
|
59
|
+
props: {
|
|
60
|
+
compact: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false
|
|
63
|
+
},
|
|
64
|
+
cards: {
|
|
65
|
+
type: Array as PropType<CardGridItem[]>,
|
|
66
|
+
default: undefined
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
</script>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import BlockCardGridItem from './BlockCardGridItem.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title: 'Components/
|
|
5
|
-
component:
|
|
4
|
+
title: 'Components/Cards/BlockCardGridItem',
|
|
5
|
+
component: BlockCardGridItem,
|
|
6
|
+
tags: ['!autodocs'],
|
|
6
7
|
decorators: [
|
|
7
8
|
() => ({
|
|
8
9
|
template: `<div id="storyDecorator" class="lg:w-1/3"><story/></div>`
|
|
@@ -17,9 +18,9 @@ export default {
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export const BlockCardData = {
|
|
20
|
-
|
|
21
|
+
label: 'Factoid',
|
|
21
22
|
title: 'Nimble Limbs',
|
|
22
|
-
|
|
23
|
+
description: 'The robot has four limbs, each with seven degrees of freedom.',
|
|
23
24
|
image: {
|
|
24
25
|
alt: 'Fourth image',
|
|
25
26
|
src: {
|
|
@@ -28,7 +29,14 @@ export const BlockCardData = {
|
|
|
28
29
|
width: 800
|
|
29
30
|
},
|
|
30
31
|
srcSet: 'https://picsum.photos/400/200 320w, https://picsum.photos/800/400 1024w'
|
|
32
|
+
},
|
|
33
|
+
link: {
|
|
34
|
+
page: {
|
|
35
|
+
url: '#'
|
|
36
|
+
},
|
|
37
|
+
externalLink: null
|
|
31
38
|
}
|
|
32
39
|
}
|
|
33
40
|
|
|
34
|
-
export const BaseStory = { name: '
|
|
41
|
+
export const BaseStory = { name: 'BlockCardGridItem', args: BlockCardData }
|
|
42
|
+
export const NoLink = { args: { ...BlockCardData, link: undefined } }
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<BaseLink
|
|
3
|
+
v-if="link"
|
|
4
|
+
variant="none"
|
|
5
|
+
:to="link?.page?.url ? link.page.url : undefined"
|
|
6
|
+
:href="link?.externalLink ? link?.externalLink : undefined"
|
|
7
|
+
class="BlockCardGridItem group"
|
|
8
|
+
external-target-blank
|
|
9
|
+
>
|
|
10
|
+
<BlockCardGridItemElement
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
:link="link"
|
|
13
|
+
/>
|
|
14
|
+
</BaseLink>
|
|
15
|
+
<BlockCardGridItemElement
|
|
16
|
+
v-else
|
|
17
|
+
v-bind="$attrs"
|
|
18
|
+
/>
|
|
19
|
+
</template>
|
|
20
|
+
<script lang="ts">
|
|
21
|
+
import { defineComponent, PropType } from 'vue'
|
|
22
|
+
import type { LinkObject } from './../../interfaces'
|
|
23
|
+
import BaseLink from './../BaseLink/BaseLink.vue'
|
|
24
|
+
import BlockCardGridItemElement from './BlockCardGridItemElement.vue'
|
|
25
|
+
|
|
26
|
+
export default defineComponent({
|
|
27
|
+
name: 'BlockCardGridItem',
|
|
28
|
+
components: {
|
|
29
|
+
BaseLink,
|
|
30
|
+
BlockCardGridItemElement
|
|
31
|
+
},
|
|
32
|
+
props: {
|
|
33
|
+
link: {
|
|
34
|
+
type: Object as PropType<LinkObject>,
|
|
35
|
+
required: false,
|
|
36
|
+
default: undefined
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
</script>
|
package/src/components/{BlockCard/BlockCard.vue → BlockCardGridItem/BlockCardGridItemElement.vue}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="shadow-jpl relative h-full"
|
|
3
|
+
class="shadow-jpl relative h-full bg-white"
|
|
4
4
|
:class="{ 'flex items-center min-h-32': !image }"
|
|
5
5
|
>
|
|
6
6
|
<div
|
|
@@ -19,18 +19,21 @@
|
|
|
19
19
|
:width="image.src.width"
|
|
20
20
|
:height="image.src.height"
|
|
21
21
|
object-fit-class="cover"
|
|
22
|
+
image-class="can-hover:group-hover:delay-200 can-hover:group-hover:scale-100 absolute top-0 left-0 w-full transition-all duration-200 ease-in transform scale-105"
|
|
22
23
|
loading="lazy"
|
|
23
24
|
/>
|
|
24
25
|
</BaseImagePlaceholder>
|
|
25
26
|
</div>
|
|
26
|
-
<div class="px-6 py-6">
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
<div class="px-6 py-6 ThemeVariantLight">
|
|
28
|
+
<template v-if="label">
|
|
29
|
+
<div class="text-primary text-subtitle">
|
|
30
|
+
{{ label }}
|
|
31
|
+
</div>
|
|
32
|
+
<hr
|
|
33
|
+
aria-hidden="true"
|
|
34
|
+
class="bg-primary text-primary w-8 h-2px border-0 my-2"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
34
37
|
<BaseHeading
|
|
35
38
|
size="h5"
|
|
36
39
|
level="h3"
|
|
@@ -38,41 +41,54 @@
|
|
|
38
41
|
>
|
|
39
42
|
{{ title }}
|
|
40
43
|
</BaseHeading>
|
|
41
|
-
<p class="text-body-sm">{{
|
|
44
|
+
<p class="text-body-sm">{{ description }}</p>
|
|
45
|
+
<div
|
|
46
|
+
v-if="link"
|
|
47
|
+
class="ThemeVariantLight w-full mt-1 can-hover:block text-action can-hover:-ml-3 can-hover:group-hover:delay-200 can-hover:opacity-0 can-hover:group-hover:ml-0 can-hover:group-hover:opacity-100 hidden text-2xl leading-normal transition-all duration-200 ease-in"
|
|
48
|
+
>
|
|
49
|
+
<IconArrow />
|
|
50
|
+
</div>
|
|
42
51
|
</div>
|
|
43
52
|
</div>
|
|
44
53
|
</template>
|
|
45
54
|
<script lang="ts">
|
|
46
|
-
import { defineComponent } from 'vue'
|
|
55
|
+
import { defineComponent, PropType } from 'vue'
|
|
47
56
|
import { mixinGetSrcSet } from './../../utils/mixins'
|
|
57
|
+
import type { LinkObject } from './../../interfaces'
|
|
48
58
|
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
49
59
|
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
50
60
|
import BaseHeading from './../BaseHeading/BaseHeading.vue'
|
|
61
|
+
import IconArrow from './../Icons/IconArrow.vue'
|
|
51
62
|
|
|
52
63
|
export default defineComponent({
|
|
53
|
-
name: '
|
|
64
|
+
name: 'BlockCardGridItemElement',
|
|
54
65
|
components: {
|
|
55
66
|
BaseImagePlaceholder,
|
|
56
67
|
BaseImage,
|
|
57
|
-
BaseHeading
|
|
68
|
+
BaseHeading,
|
|
69
|
+
IconArrow
|
|
58
70
|
},
|
|
59
71
|
props: {
|
|
60
|
-
|
|
72
|
+
label: {
|
|
61
73
|
type: String,
|
|
62
|
-
|
|
63
|
-
default: 'Factoid'
|
|
74
|
+
default: undefined
|
|
64
75
|
},
|
|
65
76
|
title: {
|
|
66
77
|
type: String,
|
|
67
|
-
required: false
|
|
78
|
+
required: false,
|
|
79
|
+
default: undefined
|
|
68
80
|
},
|
|
69
|
-
|
|
81
|
+
description: {
|
|
70
82
|
type: String,
|
|
71
|
-
|
|
83
|
+
default: undefined
|
|
72
84
|
},
|
|
73
85
|
image: {
|
|
74
86
|
type: Object,
|
|
75
|
-
|
|
87
|
+
default: undefined
|
|
88
|
+
},
|
|
89
|
+
link: {
|
|
90
|
+
type: Object as PropType<LinkObject>,
|
|
91
|
+
default: undefined
|
|
76
92
|
}
|
|
77
93
|
},
|
|
78
94
|
computed: {
|
|
@@ -2,8 +2,9 @@ import IconExternal from './../Icons/IconExternal.vue'
|
|
|
2
2
|
import BlockCircleImageCard from './BlockCircleImageCard.vue'
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title: 'Components/
|
|
5
|
+
title: 'Components/Cards/BlockCircleImageCard',
|
|
6
6
|
component: BlockCircleImageCard,
|
|
7
|
+
tags: ['!autodocs'],
|
|
7
8
|
decorators: [
|
|
8
9
|
() => ({
|
|
9
10
|
template: `<div class="relative max-w-xl mx-auto container"><story/></div>`
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
import BlockLinkCard from './BlockLinkCard.vue'
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
title: 'Components/
|
|
6
|
+
title: 'Components/Cards/BlockLinkCard',
|
|
7
7
|
component: BlockLinkCard,
|
|
8
|
+
tags: ['!autodocs'],
|
|
8
9
|
excludeStories: /.*Data$/,
|
|
9
10
|
decorators: [
|
|
10
11
|
() => ({
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:to="theItem.url ? theItem.url : undefined"
|
|
6
6
|
:href="theItem.externalLink ? theItem.externalLink : undefined"
|
|
7
7
|
class="BlockLinkCard group"
|
|
8
|
-
link-class="block pb-5"
|
|
8
|
+
:link-class="`block ${compact ? 'pb-3' : 'pb-5'}`"
|
|
9
9
|
external-target-blank
|
|
10
10
|
>
|
|
11
11
|
<BaseImagePlaceholder
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
</BaseImagePlaceholder>
|
|
30
30
|
|
|
31
31
|
<div
|
|
32
|
-
class="transition-translate can-hover:group-hover:delay-200 duration-200 ease-in transform"
|
|
32
|
+
class="BlockLinkCard__CardContent transition-translate can-hover:group-hover:delay-200 duration-200 ease-in transform"
|
|
33
33
|
:class="
|
|
34
34
|
compact ? 'can-hover:group-hover:-translate-y-2' : 'can-hover:group-hover:-translate-y-3'
|
|
35
35
|
"
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
</p>
|
|
72
72
|
</div>
|
|
73
73
|
<div
|
|
74
|
-
class="can-hover:block text-action can-hover:-ml-3 can-hover:group-hover:delay-200 can-hover:opacity-0 can-hover:group-hover:ml-0 can-hover:group-hover:opacity-100 hidden -mt-1 text-2xl leading-normal transition-all duration-200 ease-in"
|
|
74
|
+
class="BlockLinkCard__CardArrow ThemeVariantLight can-hover:block text-action can-hover:-ml-3 can-hover:group-hover:delay-200 can-hover:opacity-0 can-hover:group-hover:ml-0 can-hover:group-hover:opacity-100 hidden -mt-1 text-2xl leading-normal transition-all duration-200 ease-in"
|
|
75
75
|
>
|
|
76
76
|
<IconArrow />
|
|
77
77
|
</div>
|
|
@@ -100,41 +100,50 @@ export default defineComponent({
|
|
|
100
100
|
props: {
|
|
101
101
|
data: {
|
|
102
102
|
type: Object as PropType<Card>,
|
|
103
|
-
required: false
|
|
103
|
+
required: false,
|
|
104
|
+
default: undefined
|
|
104
105
|
},
|
|
105
106
|
// override props as needed
|
|
106
107
|
// so we can use this component in search results
|
|
107
108
|
url: {
|
|
108
109
|
type: String,
|
|
109
|
-
required: false
|
|
110
|
+
required: false,
|
|
111
|
+
default: undefined
|
|
110
112
|
},
|
|
111
113
|
externalLink: {
|
|
112
114
|
type: String,
|
|
113
|
-
required: false
|
|
115
|
+
required: false,
|
|
116
|
+
default: undefined
|
|
114
117
|
},
|
|
115
118
|
thumbnailImage: {
|
|
116
119
|
type: Object,
|
|
117
|
-
required: false
|
|
120
|
+
required: false,
|
|
121
|
+
default: undefined
|
|
118
122
|
},
|
|
119
123
|
label: {
|
|
120
124
|
type: String,
|
|
121
|
-
required: false
|
|
125
|
+
required: false,
|
|
126
|
+
default: undefined
|
|
122
127
|
},
|
|
123
128
|
title: {
|
|
124
129
|
type: String,
|
|
125
|
-
required: false
|
|
130
|
+
required: false,
|
|
131
|
+
default: undefined
|
|
126
132
|
},
|
|
127
133
|
date: {
|
|
128
134
|
type: String,
|
|
129
|
-
required: false
|
|
135
|
+
required: false,
|
|
136
|
+
default: undefined
|
|
130
137
|
},
|
|
131
138
|
startDate: {
|
|
132
139
|
type: String,
|
|
133
|
-
required: false
|
|
140
|
+
required: false,
|
|
141
|
+
default: undefined
|
|
134
142
|
},
|
|
135
143
|
endDate: {
|
|
136
144
|
type: String,
|
|
137
|
-
required: false
|
|
145
|
+
required: false,
|
|
146
|
+
default: undefined
|
|
138
147
|
},
|
|
139
148
|
// if styling should be compact
|
|
140
149
|
compact: {
|
|
@@ -144,7 +153,8 @@ export default defineComponent({
|
|
|
144
153
|
// if a heading should be used and at what level
|
|
145
154
|
headingLevel: {
|
|
146
155
|
type: (String as PropType<HeadingLevel>) || null,
|
|
147
|
-
required: false
|
|
156
|
+
required: false,
|
|
157
|
+
default: undefined
|
|
148
158
|
}
|
|
149
159
|
},
|
|
150
160
|
computed: {
|
|
@@ -193,5 +203,15 @@ export default defineComponent({
|
|
|
193
203
|
.text-subtitle.divide-x {
|
|
194
204
|
@apply leading-none #{!important};
|
|
195
205
|
}
|
|
206
|
+
.ThemeVariantDark & {
|
|
207
|
+
@apply bg-white;
|
|
208
|
+
.BlockLinkCard__CardContent,
|
|
209
|
+
.BlockLinkCard__CardArrow {
|
|
210
|
+
@apply px-6;
|
|
211
|
+
}
|
|
212
|
+
.BaseImagePlaceholder {
|
|
213
|
+
@apply bg-gray-mid-dark;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
196
216
|
}
|
|
197
217
|
</style>
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
import BlockLinkTile from './BlockLinkTile.vue'
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
title: 'Components/
|
|
6
|
+
title: 'Components/Cards/BlockLinkTile',
|
|
7
7
|
component: BlockLinkTile,
|
|
8
8
|
decorators: [
|
|
9
9
|
() => ({
|
|
10
10
|
template: `<div id="storyDecorator" class="relative grid grid-cols-2 gap-3 lg:grid-cols-3"><story/></div>`
|
|
11
11
|
})
|
|
12
12
|
],
|
|
13
|
+
tags: ['!autodocs'],
|
|
13
14
|
argTypes: {
|
|
14
15
|
headingLevel: {
|
|
15
16
|
description:
|
|
@@ -32,7 +33,7 @@ export default {
|
|
|
32
33
|
export const BlockLinkTileData = {
|
|
33
34
|
card: {
|
|
34
35
|
url: '/topics/placeholder-slug-1',
|
|
35
|
-
title: '
|
|
36
|
+
title: 'Lorem ipsum dolor',
|
|
36
37
|
label: 'Solar System',
|
|
37
38
|
thumbnailImage: {
|
|
38
39
|
src: {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<BaseHeading
|
|
4
4
|
v-if="data.heading"
|
|
5
5
|
level="h2"
|
|
6
|
+
v-bind="$attrs"
|
|
6
7
|
class="md:mb-8 mb-5"
|
|
7
8
|
>
|
|
8
9
|
{{ data.heading }}
|
|
@@ -43,7 +44,6 @@
|
|
|
43
44
|
import { defineComponent } from 'vue'
|
|
44
45
|
import type { PropType } from 'vue'
|
|
45
46
|
import type { BlockData, RelatedLinkObject } from './../../interfaces'
|
|
46
|
-
|
|
47
47
|
import RelatedLink from './../BlockRelatedLinks/RelatedLink.vue'
|
|
48
48
|
import BaseHeading from './../BaseHeading/BaseHeading.vue'
|
|
49
49
|
|
|
@@ -63,6 +63,11 @@ export default defineComponent({
|
|
|
63
63
|
type: Object as PropType<BlockRelatedLinksObject>,
|
|
64
64
|
required: true,
|
|
65
65
|
default: () => ({})
|
|
66
|
+
},
|
|
67
|
+
headingSize: {
|
|
68
|
+
type: String,
|
|
69
|
+
required: false,
|
|
70
|
+
default: undefined
|
|
66
71
|
}
|
|
67
72
|
},
|
|
68
73
|
computed: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BlockCardGridData } from './../BlockCardGrid/BlockCardGrid.stories'
|
|
1
2
|
import { BlockCtaData } from './../BlockCta/BlockCta.stories'
|
|
2
3
|
import { BlockHeadingData } from './../BlockHeading/BlockHeading.stories'
|
|
3
4
|
import { BlockImageCarouselData } from './../BlockImageCarousel/BlockImageCarousel.stories'
|
|
@@ -47,6 +48,7 @@ export const BlockStreamfieldTruncatedData = {
|
|
|
47
48
|
value:
|
|
48
49
|
'<p>Lorem ipsum <a href="/missions/test-mission/">dolor</a> sit amet, consectetur adipiscing elit. Quisque vitae justo quis justo malesuada molestie. Cras sed tincidunt dui.</p><p>Integer imperdiet blandit neque vitae euismod. Nulla aliquet lacus nibh, vel tincidunt urna efficitur non. In et eros vitae ex posuere maximus quis eget urna. Suspendisse fringilla posuere velit sit amet posuere. Morbi malesuada bibendum vehicula. Donec faucibus ut erat ut mattis. Suspendisse ornare, quam at placerat cursus, dolor mi lacinia nunc, eget maximus augue nulla in dolor.</p>\n'
|
|
49
50
|
},
|
|
51
|
+
BlockInlineImageData.block,
|
|
50
52
|
BlockIframeEmbedData
|
|
51
53
|
]
|
|
52
54
|
}
|
|
@@ -93,7 +95,12 @@ export const BlockStreamfieldData = {
|
|
|
93
95
|
...BlockInlineImageData.block,
|
|
94
96
|
alignTo: 'left'
|
|
95
97
|
},
|
|
96
|
-
BlockTableData
|
|
98
|
+
BlockTableData,
|
|
99
|
+
{
|
|
100
|
+
blockType: 'ListBlock',
|
|
101
|
+
field: 'card_grid',
|
|
102
|
+
items: BlockCardGridData
|
|
103
|
+
}
|
|
97
104
|
]
|
|
98
105
|
}
|
|
99
106
|
|