@explorer-1/vue 0.3.6 → 0.3.7
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/components/AboutTheAuthor/AboutTheAuthor.stories.js +1 -1
- package/src/components/AboutTheAuthor/AboutTheAuthor.vue +9 -9
- package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.stories.js +0 -5
- package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.vue +5 -1
- package/src/components/BackToTop/BackToTop.stories.js +1 -1
- package/src/components/BackToTop/BackToTop.vue +10 -0
- package/src/components/BaseAccordionItem/BaseAccordionItem.stories.js +5 -29
- package/src/components/BaseAccordionItem/BaseAccordionItem.vue +56 -17
- package/src/components/BaseAudio/BaseAudio.vue +6 -0
- package/src/components/BaseButton/BaseButton.stories.ts +1 -20
- package/src/components/BaseButton/BaseButton.vue +34 -10
- package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.stories.js +2 -1
- package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue +5 -0
- package/src/components/BaseHeading/BaseHeading.stories.js +0 -15
- package/src/components/BaseHeading/BaseHeading.vue +18 -8
- package/src/components/BaseImage/BaseImage.stories.ts +6 -21
- package/src/components/BaseImage/BaseImage.vue +26 -14
- package/src/components/BaseImageCaption/BaseImageCaption.vue +10 -6
- package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.stories.js +3 -16
- package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.vue +13 -9
- package/src/components/BaseLink/BaseLink.stories.js +4 -46
- package/src/components/BaseLink/BaseLink.vue +32 -21
- package/src/components/BaseModal/BaseModal.stories.js +4 -7
- package/src/components/BaseModal/BaseModal.vue +1 -0
- package/src/components/BaseModal/BaseModalDialog.vue +1 -6
- package/src/components/BasePill/BasePill.stories.js +2 -22
- package/src/components/BasePill/BasePill.vue +36 -17
- package/src/components/BasePlaceholder/BasePlaceholder.stories.js +4 -7
- package/src/components/BasePlaceholder/BasePlaceholder.vue +1 -1
- package/src/components/BaseRadioGroup/BaseRadioGroup.stories.js +1 -0
- package/src/components/BaseRadioGroup/BaseRadioGroup.vue +9 -2
- package/src/components/BaseSwimlane/BaseSwimlane.stories.js +2 -1
- package/src/components/BaseSwimlane/BaseSwimlane.vue +2 -0
- package/src/components/BaseTimer/BaseTimer.stories.js +6 -1
- package/src/components/BaseTimer/BaseTimer.vue +4 -2
- package/src/components/BaseUnitToggle/BaseUnitToggle.stories.js +1 -16
- package/src/components/BaseUnitToggle/BaseUnitToggle.vue +4 -0
- package/src/components/BaseVideo/BaseVideo.vue +7 -3
- package/src/components/BlockAccordion/BlockAccordion.stories.js +1 -1
- package/src/components/BlockAccordion/BlockAccordion.vue +3 -3
- package/src/components/BlockAudio/BlockAudio.stories.js +1 -0
- package/src/components/BlockAudio/BlockAudio.vue +11 -3
- package/src/components/BlockCardGrid/BlockCardGrid.stories.js +1 -1
- package/src/components/BlockCardGrid/BlockCardGrid.vue +1 -1
- package/src/components/BlockCardGridItem/BlockCardGridItem.stories.js +1 -1
- package/src/components/BlockCircleImageCard/BlockCircleImageCard.stories.js +1 -8
- package/src/components/BlockCsrTable/BlockCsrTable.stories.js +1 -0
- package/src/components/BlockCsrTable/BlockCsrTable.vue +1 -1
- package/src/components/BlockCta/BlockCta.stories.js +1 -0
- package/src/components/BlockCta/BlockCta.vue +9 -2
- package/src/components/BlockDialog/BlockDialog.stories.js +2 -1
- package/src/components/BlockGist/BlockGist.stories.js +3 -2
- package/src/components/BlockGist/BlockGist.vue +8 -6
- package/src/components/BlockHeading/BlockHeading.stories.js +1 -0
- package/src/components/BlockIframeEmbed/BlockIframeEmbed.stories.js +1 -0
- package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +9 -2
- package/src/components/BlockImage/BlockImage.stories.js +1 -5
- package/src/components/BlockImage/BlockImage.vue +5 -2
- package/src/components/BlockImageCarousel/BlockImageCarousel.stories.js +1 -13
- package/src/components/BlockImageCarousel/BlockImageCarousel.vue +2 -0
- package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.stories.js +0 -14
- package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.vue +7 -7
- package/src/components/BlockImageComparison/BlockImageComparison.stories.js +3 -1
- package/src/components/BlockImageComparison/BlockImageComparison.vue +11 -2
- package/src/components/BlockImageGallery/BlockImageGallery.stories.js +2 -9
- package/src/components/BlockImageGallery/BlockImageGallery.vue +5 -0
- package/src/components/BlockInlineImage/BlockInlineImage.stories.js +1 -8
- package/src/components/BlockInlineImage/BlockInlineImage.vue +20 -7
- package/src/components/BlockKeyPoints/BlockKeyPoints.stories.js +1 -0
- package/src/components/BlockKeyPoints/BlockKeyPoints.vue +12 -3
- package/src/components/BlockLinkCard/BlockLinkCard.stories.js +5 -18
- package/src/components/BlockLinkCard/BlockLinkCard.vue +27 -8
- package/src/components/BlockLinkCard/BlockLinkCardCollectionLg.vue +2 -2
- package/src/components/BlockLinkCardList/BlockLinkCardList.stories.js +1 -3
- package/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.js +2 -14
- package/src/components/BlockLinkCarousel/BlockLinkCarousel.vue +8 -8
- package/src/components/BlockLinkTile/BlockLinkTile.stories.js +1 -11
- package/src/components/BlockLinkTile/BlockLinkTile.vue +26 -13
- package/src/components/BlockListCards/BlockListCards.stories.js +1 -0
- package/src/components/BlockListCards/BlockListCards.vue +5 -4
- package/src/components/BlockNewsletterSignup/BlockNewsletterSignup.stories.js +1 -0
- package/src/components/BlockNewsletterSignup/BlockNewsletterSignup.vue +3 -2
- package/src/components/BlockQuote/BlockQuote.stories.js +1 -0
- package/src/components/BlockQuote/BlockQuote.vue +3 -2
- package/src/components/BlockRelatedLinks/BlockRelatedLinks.stories.js +1 -0
- package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +6 -4
- package/src/components/BlockRichTable/BlockRichTable.stories.js +1 -1
- package/src/components/BlockRichTable/BlockRichTable.vue +23 -9
- package/src/components/BlockStreamfield/BlockStreamfield.stories.js +1 -11
- package/src/components/BlockStreamfield/BlockStreamfield.vue +34 -31
- package/src/components/BlockTeaser/BlockTeaser.stories.js +1 -0
- package/src/components/BlockTeaser/BlockTeaser.vue +20 -12
- package/src/components/BlockText/BlockText.stories.js +2 -9
- package/src/components/BlockText/BlockText.vue +21 -9
- package/src/components/BlockVideo/BlockVideo.stories.js +1 -0
- package/src/components/BlockVideo/BlockVideo.vue +14 -3
- package/src/components/BlockVideoEmbed/BlockVideoEmbed.stories.js +1 -0
- package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +6 -3
- package/src/components/CalendarButton/CalendarButton.vue +7 -0
- package/src/components/DetailHeadline/DetailHeadline.stories.js +2 -20
- package/src/components/DetailHeadline/DetailHeadline.vue +16 -4
- package/src/components/DsnWidget/DsnWidget.stories.js +2 -6
- package/src/components/DsnWidget/DsnWidget.vue +18 -4
- package/src/components/EventDetailHero/EventDetailHero.vue +4 -7
- package/src/components/FormContact/FormContact.stories.js +2 -1
- package/src/components/FormNewsletterSignup/FormNewsletterSignup.stories.js +2 -1
- package/src/components/HeroInlineMedia/HeroInlineMedia.vue +12 -8
- package/src/components/HeroLarge/HeroLarge.stories.js +1 -0
- package/src/components/HeroLarge/HeroLarge.vue +12 -7
- package/src/components/HeroListingIndex/HeroListingIndex.stories.js +1 -0
- package/src/components/HeroListingIndex/HeroListingIndex.vue +18 -13
- package/src/components/HeroMedia/HeroMedia.stories.js +13 -8
- package/src/components/HeroMedia/HeroMedia.vue +9 -8
- package/src/components/HeroMedium/HeroMedium.stories.js +1 -0
- package/src/components/HeroMedium/HeroMedium.vue +32 -14
- package/src/components/HeroMedium/HeroSmall.stories.js +2 -2
- package/src/components/HomepageCarousel/HomepageCarousel.stories.js +1 -1
- package/src/components/HomepageCarouselItem/HomepageCarouselItem.vue +2 -6
- package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.vue +2 -2
- package/src/components/LogoCaltech/LogoCaltech.stories.js +14 -18
- package/src/components/LogoCaltech/LogoCaltech.vue +1 -0
- package/src/components/LogoTribrand/LogoTribrand.stories.js +66 -51
- package/src/components/LogoTribrand/LogoTribrand.vue +4 -2
- package/src/components/MetaPanel/MetaPanel.stories.js +4 -8
- package/src/components/MetaPanel/MetaPanel.vue +3 -0
- package/src/components/MetaPanelItems/MetaPanelItems.stories.js +9 -2
- package/src/components/MetaPanelItems/MetaPanelItems.vue +2 -0
- package/src/components/MetadataEduResource/MetadataEduResource.stories.js +12 -10
- package/src/components/MetadataEduResource/MetadataEduResource.vue +7 -3
- package/src/components/MetadataEvent/MetadataEvent.stories.js +1 -1
- package/src/components/MissionDetailAbout/MissionDetailAbout.vue +1 -1
- package/src/components/MissionDetailHighlights/MissionDetailHighlights.stories.js +1 -0
- package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.stories.js +1 -6
- package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.vue +10 -5
- package/src/components/MissionDetailStats/DistanceStats.vue +10 -5
- package/src/components/MissionDetailStats/MissionDetailStats.stories.js +2 -19
- package/src/components/MissionDetailStats/MissionDetailStats.vue +21 -5
- package/src/components/MissionDetailStreamfield/MissionDetailStreamfield.vue +4 -2
- package/src/components/MixinAnimationCaret/MixinAnimationCaret.stories.ts +7 -0
- package/src/components/MixinAnimationCaret/MixinAnimationCaret.vue +12 -6
- package/src/components/MixinCarousel/MixinCarousel.stories.js +2 -8
- package/src/components/MixinCarousel/MixinCarousel.vue +13 -16
- package/src/components/MixinVideoBg/MixinVideoBg.stories.js +1 -1
- package/src/components/MixinVideoBg/MixinVideoBg.vue +4 -7
- package/src/components/NavDesktop/NavDesktop.stories.js +1 -0
- package/src/components/NavDesktop/NavDesktop.vue +4 -4
- package/src/components/NavDesktop/NavDesktopTopHat.vue +4 -4
- package/src/components/NavDesktopEdu/NavDesktopEdu.stories.js +1 -5
- package/src/components/NavDesktopEdu/NavDesktopEdu.vue +4 -4
- package/src/components/NavHeading/NavHeading.stories.js +1 -0
- package/src/components/NavHighlight/NavHighlight.stories.js +1 -0
- package/src/components/NavJumpMenu/NavJumpMenu.stories.js +5 -2
- package/src/components/NavLinkList/NavLinkList.stories.js +1 -0
- package/src/components/NavLinkList/NavLinkList.vue +3 -3
- package/src/components/NavLogoLinks/NavLogoLinks.stories.js +1 -0
- package/src/components/NavMobile/NavMobile.stories.js +9 -3
- package/src/components/NavMobile/NavMobile.vue +18 -5
- package/src/components/NavMobile/NavMobileDropdown.vue +2 -2
- package/src/components/NavMobile/NavMobileEdu.stories.js +3 -2
- package/src/components/NavMobile/NavMobileLink.vue +4 -4
- package/src/components/NavSearchForm/NavSearchForm.stories.js +1 -0
- package/src/components/NavSecondary/NavSecondary.stories.js +1 -0
- package/src/components/NavSecondary/NavSecondary.vue +7 -4
- package/src/components/NavSecondary/NavSecondaryDropdownContent.vue +1 -1
- package/src/components/NavSocial/NavSocial.stories.js +1 -0
- package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.stories.js +2 -1
- package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.vue +1 -1
- package/src/components/ParallaxContainer/ParallaxContainer.vue +1 -0
- package/src/components/PodcastSeriesCarousel/PodcastSeriesCarousel.vue +6 -5
- package/src/components/RoboticsDetailStats/RoboticsDetailStats.stories.js +1 -6
- package/src/components/SearchFilterGroup/SearchFilterGroup.stories.js +1 -0
- package/src/components/SearchInput/SearchInput.stories.js +1 -0
- package/src/components/SearchPagination/SearchPagination.stories.js +1 -0
- package/src/components/SearchResultCard/SearchResultCard.stories.js +1 -10
- package/src/components/SearchResultCard/SearchResultCard.vue +1 -0
- package/src/components/SearchResultGridItem/SearchResultGridItem.stories.js +1 -10
- package/src/components/SearchResultGridItem/SearchResultGridItem.vue +5 -2
- package/src/components/SearchResultsList/SearchResultsList.stories.js +1 -1
- package/src/components/SearchSelectMenu/SearchSelectMenu.stories.js +2 -1
- package/src/components/SwimlaneCTA/SwimlaneCTA.vue +1 -0
- package/src/components/TextArea/TextArea.stories.js +2 -1
- package/src/components/TextInput/TextInput.stories.js +2 -1
- package/src/components/TheFooter/TheFooter.stories.js +1 -0
- package/src/components/TheFooter/TheFooter.vue +30 -4
- package/src/components/ThumbnailCarousel/ThumbnailCarousel.stories.js +1 -1
- package/src/components/ThumbnailCarousel/ThumbnailCarousel.vue +2 -1
- package/src/components/TimelineDialog/TimelineDialog.vue +2 -2
- package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.stories.js +1 -0
- package/src/components/TopicDetailMore/TopicDetailMore.stories.js +1 -0
- package/src/components/TopicDetailMoreItem/TopicDetailMoreItem.stories.js +1 -0
- package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.vue +2 -2
- package/src/constants.ts +3 -5
- package/src/interfaces.ts +31 -6
- package/src/templates/PageAudioDetail/PageAudioDetail.vue +2 -2
- package/src/templates/edu/PageEduGalleryDetail/PageEduGalleryDetail.vue +10 -6
- package/src/templates/edu/PageEduStudentProject/PageEduStudentProjectSection.vue +10 -6
- package/src/templates/www/PageTopicDetail/PageTopicDetail.vue +2 -1
- package/src/utils/mixins.ts +7 -7
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<script lang="ts">
|
|
22
22
|
import { defineComponent } from 'vue'
|
|
23
23
|
import type { PropType } from 'vue'
|
|
24
|
-
import type {
|
|
24
|
+
import type { BlockVideoEmbedData } from './../BlockVideoEmbed/BlockVideoEmbed.vue'
|
|
25
25
|
import BlockVideoEmbed from './../BlockVideoEmbed/BlockVideoEmbed.vue'
|
|
26
26
|
|
|
27
27
|
export default defineComponent({
|
|
@@ -31,7 +31,7 @@ export default defineComponent({
|
|
|
31
31
|
},
|
|
32
32
|
props: {
|
|
33
33
|
data: {
|
|
34
|
-
type: Array as PropType<
|
|
34
|
+
type: Array as PropType<BlockVideoEmbedData[]>,
|
|
35
35
|
required: false
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -5,18 +5,13 @@ export default {
|
|
|
5
5
|
component: LogoCaltech,
|
|
6
6
|
argTypes: {
|
|
7
7
|
size: {
|
|
8
|
+
description: 'Use TailwindCSS text size classes to control the size of the logo',
|
|
8
9
|
control: {
|
|
9
|
-
type: 'select'
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
type: 'select'
|
|
11
|
+
},
|
|
12
|
+
options: ['text-xs', 'text-sm', 'text-base', 'text-lg', 'text-xl', 'text-2xl']
|
|
12
13
|
}
|
|
13
14
|
},
|
|
14
|
-
decorators: [
|
|
15
|
-
() => ({
|
|
16
|
-
template: `<div class="inline-block" :class="'bg-white '"><story/></div>`,
|
|
17
|
-
props: ['size', 'invert']
|
|
18
|
-
})
|
|
19
|
-
],
|
|
20
15
|
excludeStories: /.*Data$/,
|
|
21
16
|
parameters: {
|
|
22
17
|
viewMode: 'docs',
|
|
@@ -26,14 +21,15 @@ export default {
|
|
|
26
21
|
'The Caltech logo as an SVG. Size and color can be specified via tailwind text classes. This will only work with inlined SVG. This will not work when rendering the svg file via an `<img />` element.'
|
|
27
22
|
}
|
|
28
23
|
}
|
|
29
|
-
}
|
|
24
|
+
},
|
|
25
|
+
// render function to apply arbitrary args
|
|
26
|
+
render: (args) => ({
|
|
27
|
+
components: { LogoCaltech },
|
|
28
|
+
setup() {
|
|
29
|
+
return { args }
|
|
30
|
+
},
|
|
31
|
+
template: '<LogoCaltech :class="args.size" />'
|
|
32
|
+
})
|
|
30
33
|
}
|
|
31
|
-
const LogoCaltechComponentTemplate = (args) => ({
|
|
32
|
-
props: Object.keys(args),
|
|
33
|
-
components: { LogoCaltech },
|
|
34
|
-
template: `<LogoCaltech :class="size" />`
|
|
35
|
-
})
|
|
36
34
|
|
|
37
|
-
export const BaseStory =
|
|
38
|
-
BaseStory.storyName = 'LogoCaltech' // single story hoisting
|
|
39
|
-
BaseStory.args = { size: 'text-base' }
|
|
35
|
+
export const BaseStory = { args: { size: 'text-base' } }
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
</svg>
|
|
17
17
|
</template>
|
|
18
18
|
<script lang="ts">
|
|
19
|
+
/** The Caltech logo as an SVG. Size and color can be specified via tailwind text classes. This will only work with inlined SVG. This will not work when rendering the svg file via an `<img />` element. */
|
|
19
20
|
import { defineComponent } from 'vue'
|
|
20
21
|
export default defineComponent({
|
|
21
22
|
name: 'LogoCaltech'
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import LogoColor from '@explorer-1/common/src/images/svg/logo-tribrand-color.svg'
|
|
2
|
-
import LogoWhite from '@explorer-1/common/src/images/svg/logo-tribrand-white.svg'
|
|
3
1
|
import LogoTribrand from './LogoTribrand.vue'
|
|
4
2
|
|
|
5
3
|
export default {
|
|
@@ -14,64 +12,81 @@ export default {
|
|
|
14
12
|
'Combines JPL, NASA and Caltech in a single logo as an SVG. Tailwind text size classes can be used with inlined SVG (first example), but not when loading the svg file via an `<img />` element'
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
|
-
}
|
|
15
|
+
},
|
|
16
|
+
render: (args) => ({
|
|
17
|
+
components: { LogoTribrand },
|
|
18
|
+
setup() {
|
|
19
|
+
return { args }
|
|
20
|
+
},
|
|
21
|
+
template: `<div :class="args.invert ? 'bg-black ' : 'bg-white '"><LogoTribrand :class="args.size" :invert="args.invert" /></div>`
|
|
22
|
+
})
|
|
18
23
|
}
|
|
19
|
-
const LogoTribrandComponentTemplate = (args) => ({
|
|
20
|
-
props: Object.keys(args),
|
|
21
|
-
components: { LogoTribrand },
|
|
22
|
-
template: `<LogoTribrand :class="size" :invert="invert" />`
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
const LogoTribrandImageTemplate = (args) => ({
|
|
26
|
-
props: Object.keys(args),
|
|
27
|
-
components: {},
|
|
28
|
-
template: `<img :src="src" alt="Logo Image" />`
|
|
29
|
-
})
|
|
30
24
|
|
|
31
|
-
export const BaseStory =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
export const BaseStory = {
|
|
26
|
+
name: 'Logo Inline SVG',
|
|
27
|
+
args: { invert: false, size: 'text-base' },
|
|
28
|
+
argTypes: {
|
|
29
|
+
size: {
|
|
30
|
+
control: {
|
|
31
|
+
type: 'select'
|
|
32
|
+
},
|
|
33
|
+
description: 'Use TailwindCSS text size classes to control the size of the logo',
|
|
38
34
|
options: ['text-xs', 'text-sm', 'text-base', 'text-lg', 'text-xl', 'text-2xl']
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
},
|
|
36
|
+
invert: {
|
|
37
|
+
control: {
|
|
38
|
+
type: 'boolean'
|
|
39
|
+
}
|
|
44
40
|
}
|
|
45
41
|
}
|
|
46
42
|
}
|
|
47
|
-
BaseStory.decorators = [
|
|
48
|
-
() => ({
|
|
49
|
-
template: `<div class="inline-block" :class="invert ? 'bg-black ' : 'bg-white '"><story/></div>`,
|
|
50
|
-
props: ['size', 'invert']
|
|
51
|
-
})
|
|
52
|
-
]
|
|
53
43
|
|
|
54
|
-
export const LogoImageColor =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
44
|
+
export const LogoImageColor = {
|
|
45
|
+
args: { src: '/explorer-1/images/svg/logo-tribrand-color.svg' },
|
|
46
|
+
argTypes: {
|
|
47
|
+
src: {
|
|
48
|
+
control: false
|
|
49
|
+
},
|
|
50
|
+
invert: {
|
|
51
|
+
control: false
|
|
60
52
|
}
|
|
61
|
-
}
|
|
53
|
+
},
|
|
54
|
+
parameters: {
|
|
55
|
+
docs: {
|
|
56
|
+
description: {
|
|
57
|
+
story: 'Demo of using an `<img />` element to render the .svg file'
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
render: (args) => ({
|
|
62
|
+
setup() {
|
|
63
|
+
return { args }
|
|
64
|
+
},
|
|
65
|
+
template: `<img :src="args.src" alt="Logo as Image" />`
|
|
66
|
+
})
|
|
62
67
|
}
|
|
63
68
|
|
|
64
|
-
export const LogoImageWhite =
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
export const LogoImageWhite = {
|
|
70
|
+
args: { src: '/explorer-1/images/svg/logo-tribrand-white.svg' },
|
|
71
|
+
argTypes: {
|
|
72
|
+
src: {
|
|
73
|
+
control: false
|
|
74
|
+
},
|
|
75
|
+
invert: {
|
|
76
|
+
control: false
|
|
70
77
|
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
},
|
|
79
|
+
parameters: {
|
|
80
|
+
docs: {
|
|
81
|
+
description: {
|
|
82
|
+
story: 'Demo of using an `<img />` element to render the .svg file'
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
render: (args) => ({
|
|
87
|
+
setup() {
|
|
88
|
+
return { args }
|
|
89
|
+
},
|
|
90
|
+
template: `<div class="bg-black"><img :src="args.src" alt="Logo as Image" /></div>`
|
|
76
91
|
})
|
|
77
|
-
|
|
92
|
+
}
|
|
@@ -53,12 +53,14 @@
|
|
|
53
53
|
</svg>
|
|
54
54
|
</template>
|
|
55
55
|
<script lang="ts">
|
|
56
|
+
/** Combines JPL, NASA and Caltech in a single logo as an SVG. Tailwind text size classes can be used with inlined SVG (first example), but not when loading the svg file via an `<img />` element */
|
|
56
57
|
import { defineComponent } from 'vue'
|
|
57
58
|
export default defineComponent({
|
|
58
59
|
name: 'LogoTribrand',
|
|
59
60
|
props: {
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
/** For use when the logo needs to be manually inverted. Note that NavDesktop takes care of this automatically and this prop doesn't need to be used in that specific case.
|
|
62
|
+
* Only works when using an inline svg
|
|
63
|
+
*/
|
|
62
64
|
invert: {
|
|
63
65
|
type: Boolean,
|
|
64
66
|
default: false
|
|
@@ -3,20 +3,16 @@ import MetaPanel from './MetaPanel.vue'
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/Utilities/MetaPanel',
|
|
5
5
|
component: MetaPanel,
|
|
6
|
-
tags: [
|
|
6
|
+
tags: [],
|
|
7
7
|
decorators: [
|
|
8
8
|
() => ({
|
|
9
9
|
template: `<div><div class="h-40 w-full max-w-screen-3xl mx-auto bg-gray-dark"><p class="text-white">Dark background for demo purposes only and not part of the component.</p></div><div id="storyRoot"><story/></div><div class="h-40 w-full max-w-screen-3xl mx-auto bg-gray-dark"><p class="text-white">Dark background for demo purposes only and not part of the component.</p></div></div>`
|
|
10
10
|
})
|
|
11
11
|
],
|
|
12
12
|
parameters: {
|
|
13
|
-
layout: 'fullscreen'
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
theme: {
|
|
17
|
-
type: { name: 'string', required: false },
|
|
18
|
-
control: { type: 'select' },
|
|
19
|
-
options: ['primary', 'secondary', 'stars']
|
|
13
|
+
layout: 'fullscreen',
|
|
14
|
+
html: {
|
|
15
|
+
root: '#storyRoot'
|
|
20
16
|
}
|
|
21
17
|
}
|
|
22
18
|
}
|
|
@@ -14,6 +14,7 @@ import MetaPanelAccordion from './../MetaPanelAccordion/MetaPanelAccordion.vue'
|
|
|
14
14
|
import MetaPanelItems from './../MetaPanelItems/MetaPanelItems.vue'
|
|
15
15
|
|
|
16
16
|
interface MetaPanelProps {
|
|
17
|
+
/** Text for button that expands the panel */
|
|
17
18
|
button?: string
|
|
18
19
|
theme?: MetaPanelTheme
|
|
19
20
|
primarySubject?: EduResourcesSubject
|
|
@@ -21,7 +22,9 @@ interface MetaPanelProps {
|
|
|
21
22
|
gradeLevels?: EduResourcesGradeLevel[]
|
|
22
23
|
time?: EduResourcesTime
|
|
23
24
|
standards?: EduResourceStandardItem[]
|
|
25
|
+
/** If the top of the panel should overlay the area above it */
|
|
24
26
|
negativeTop?: boolean
|
|
27
|
+
/** If the bottom of the panel should overlay the area below it */
|
|
25
28
|
negativeBottom?: boolean
|
|
26
29
|
}
|
|
27
30
|
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import MetaPanelItems from './MetaPanelItems.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title: 'Components/Utilities/MetaPanelItems',
|
|
4
|
+
title: 'Components/Utilities/MetaPanel/MetaPanelItems',
|
|
5
5
|
component: MetaPanelItems,
|
|
6
|
-
tags: [
|
|
6
|
+
tags: [],
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: 'The metadata that should be displayed within `MetaPanel`'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
7
14
|
}
|
|
8
15
|
|
|
9
16
|
// stories
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/** The metadata that should be displayed within `MetaPanel` */
|
|
2
3
|
import { computed, reactive } from 'vue'
|
|
3
4
|
import { rangeifyGrades } from './../../utils/rangeifyGrades'
|
|
4
5
|
import {
|
|
@@ -13,6 +14,7 @@ import IconProfile from './../Icons/IconProfile.vue'
|
|
|
13
14
|
import IconTime from './../Icons/IconTime.vue'
|
|
14
15
|
|
|
15
16
|
interface MetaPanelProps {
|
|
17
|
+
/** Select color scheme */
|
|
16
18
|
theme?: MetaPanelTheme
|
|
17
19
|
primarySubject?: EduResourcesSubject
|
|
18
20
|
additionalSubjects?: EduResourcesSubject[]
|
|
@@ -3,16 +3,17 @@ import MetadataEduResource from './MetadataEduResource.vue'
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/Utilities/MetadataEduResource',
|
|
5
5
|
component: MetadataEduResource,
|
|
6
|
-
tags: ['
|
|
7
|
-
argTypes: {
|
|
8
|
-
variant: {
|
|
9
|
-
type: { name: 'string', required: false },
|
|
10
|
-
control: { type: 'select' },
|
|
11
|
-
options: ['primary', 'secondary']
|
|
12
|
-
}
|
|
13
|
-
},
|
|
6
|
+
tags: ['cards'],
|
|
14
7
|
globals: { theme: 'ThemeEdu' },
|
|
15
|
-
excludeStories: /.*Data
|
|
8
|
+
excludeStories: /.*Data$/,
|
|
9
|
+
parameters: {
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component:
|
|
13
|
+
'A row of metadata icons and text that displays key information about a post. Specifically for use with ThemeEdu'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
// data
|
|
@@ -56,6 +57,7 @@ export const MultipleGradeLevels = {
|
|
|
56
57
|
time: 'Under 30 mins'
|
|
57
58
|
}
|
|
58
59
|
},
|
|
59
|
-
variant: 'secondary'
|
|
60
|
+
variant: 'secondary',
|
|
61
|
+
showTime: true
|
|
60
62
|
}
|
|
61
63
|
}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/** A row of metadata icons and text that displays key information about a post. Specifically for use with ThemeEdu */
|
|
3
|
+
|
|
2
4
|
import { computed } from 'vue'
|
|
3
|
-
import type { EduResourceCardObject } from './../../interfaces.ts'
|
|
5
|
+
import type { EduResourceCardObject, MetaPanelTheme } from './../../interfaces.ts'
|
|
4
6
|
import EduSubjectIcon from './../EduSubjectIcon/EduSubjectIcon.vue'
|
|
5
7
|
import IconProfile from './../Icons/IconProfile.vue'
|
|
6
8
|
import IconTime from './../Icons/IconTime.vue'
|
|
7
|
-
import {} from './../../utils/mixins'
|
|
8
9
|
import { rangeifyGrades } from './../../utils/rangeifyGrades'
|
|
9
10
|
|
|
10
11
|
interface MetadataEduResourceProps {
|
|
11
12
|
resource: EduResourceCardObject
|
|
13
|
+
/** If compact styling should be used */
|
|
12
14
|
compact?: boolean
|
|
13
|
-
|
|
15
|
+
/** Use primary or secondary theme colors */
|
|
16
|
+
variant?: MetaPanelTheme
|
|
17
|
+
/** If time commitment should be displayed */
|
|
14
18
|
showTime?: boolean
|
|
15
19
|
}
|
|
16
20
|
|
|
@@ -3,12 +3,7 @@ import MissionDetailInlineImage from './MissionDetailInlineImage.vue'
|
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Components/WWW/MissionDetail/MissionDetailInlineImage',
|
|
6
|
-
component: MissionDetailInlineImage
|
|
7
|
-
argTypes: {
|
|
8
|
-
alignTo: {
|
|
9
|
-
control: { type: 'select', options: ['left', 'right'] }
|
|
10
|
-
}
|
|
11
|
-
}
|
|
6
|
+
component: MissionDetailInlineImage
|
|
12
7
|
}
|
|
13
8
|
|
|
14
9
|
const MissionDetailInlineImageData = {
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
</template>
|
|
46
46
|
|
|
47
47
|
<script lang="ts">
|
|
48
|
-
import { defineComponent } from 'vue'
|
|
48
|
+
import { defineComponent, type PropType } from 'vue'
|
|
49
|
+
import type { ImageObject } from './../../interfaces.ts'
|
|
49
50
|
import { mixinGetSrcSet } from '../../utils/mixins'
|
|
50
51
|
import BlockText from './../BlockText/BlockText.vue'
|
|
51
52
|
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
@@ -61,18 +62,22 @@ export default defineComponent({
|
|
|
61
62
|
BaseImageCaption
|
|
62
63
|
},
|
|
63
64
|
props: {
|
|
65
|
+
/** Which side should the image be aligned to? */
|
|
64
66
|
alignment: {
|
|
65
|
-
type: String
|
|
67
|
+
type: String as PropType<'left' | 'right'>,
|
|
66
68
|
required: false,
|
|
67
69
|
default: 'right'
|
|
68
70
|
},
|
|
71
|
+
/** Supports rich text */
|
|
69
72
|
text: {
|
|
70
73
|
type: String,
|
|
71
|
-
required: false
|
|
74
|
+
required: false,
|
|
75
|
+
default: undefined
|
|
72
76
|
},
|
|
73
77
|
image: {
|
|
74
|
-
type: Object
|
|
75
|
-
required: false
|
|
78
|
+
type: Object as PropType<ImageObject>,
|
|
79
|
+
required: false,
|
|
80
|
+
default: undefined
|
|
76
81
|
}
|
|
77
82
|
},
|
|
78
83
|
computed: {
|
|
@@ -118,9 +118,9 @@ export const supportedAPIPaths = {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
} as const
|
|
121
|
-
type SupportedAPI = keyof typeof supportedAPIPaths
|
|
121
|
+
export type SupportedAPI = keyof typeof supportedAPIPaths
|
|
122
122
|
type SPICEAPIConfig = (typeof supportedAPIPaths)['/spice_data/getRangefromT1/']
|
|
123
|
-
const supportedPaths = Object.keys(supportedAPIPaths) as SupportedAPI[]
|
|
123
|
+
export const supportedPaths = Object.keys(supportedAPIPaths) as SupportedAPI[]
|
|
124
124
|
|
|
125
125
|
// Normally this should just be `number`, but due to our usage of `@types/node`
|
|
126
126
|
// we need to define this in a way that is compatible with both Node and browser code.
|
|
@@ -141,7 +141,10 @@ export default defineComponent({
|
|
|
141
141
|
required: true,
|
|
142
142
|
validator: (val: string): boolean => val === '' || Object.keys(distanceTypes).includes(val)
|
|
143
143
|
},
|
|
144
|
-
value:
|
|
144
|
+
value: {
|
|
145
|
+
type: Number,
|
|
146
|
+
default: undefined
|
|
147
|
+
},
|
|
145
148
|
valueSystem: {
|
|
146
149
|
type: String as PropType<UnitSystemName>,
|
|
147
150
|
required: false,
|
|
@@ -150,9 +153,11 @@ export default defineComponent({
|
|
|
150
153
|
distanceApiUrls: {
|
|
151
154
|
type: String,
|
|
152
155
|
required: false,
|
|
153
|
-
validator: (val: string): boolean =>
|
|
156
|
+
validator: (val: string): boolean =>
|
|
157
|
+
supportedPaths.some((p) => val.includes(p) || val === ''),
|
|
158
|
+
default: undefined
|
|
154
159
|
},
|
|
155
|
-
labelClass: String
|
|
160
|
+
labelClass: { type: String, default: undefined }
|
|
156
161
|
},
|
|
157
162
|
data(): {
|
|
158
163
|
apiDistance: APIDistance | null
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import MissionDetailStats
|
|
1
|
+
import MissionDetailStats from './MissionDetailStats.vue'
|
|
2
2
|
import MissionDetailStatsMini from './MissionDetailStatsMini.vue'
|
|
3
3
|
import MissionDetailStatsMicro from './MissionDetailStatsMicro.vue'
|
|
4
|
-
import { distanceTypes } from './DistanceStats.vue'
|
|
5
4
|
|
|
6
5
|
export default {
|
|
7
6
|
title: 'Components/WWW/MissionDetail/MissionDetailStats',
|
|
@@ -17,23 +16,7 @@ export default {
|
|
|
17
16
|
root: '#storyRoot'
|
|
18
17
|
}
|
|
19
18
|
},
|
|
20
|
-
excludeStories: /.*(Data)
|
|
21
|
-
argTypes: {
|
|
22
|
-
status: {
|
|
23
|
-
control: { type: 'select' },
|
|
24
|
-
options: Object.keys(statuses)
|
|
25
|
-
},
|
|
26
|
-
clockType: {
|
|
27
|
-
control: { type: 'select' },
|
|
28
|
-
options: Object.keys(clockTypes)
|
|
29
|
-
},
|
|
30
|
-
distanceType: {
|
|
31
|
-
control: {
|
|
32
|
-
type: 'select'
|
|
33
|
-
},
|
|
34
|
-
options: Object.keys(distanceTypes).concat([''])
|
|
35
|
-
}
|
|
36
|
-
}
|
|
19
|
+
excludeStories: /.*(Data)$/
|
|
37
20
|
}
|
|
38
21
|
|
|
39
22
|
export const MissionDetailStatsData = {
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
// @ts-nocheck
|
|
76
76
|
import type { PropType } from 'vue'
|
|
77
77
|
import { defineComponent } from 'vue'
|
|
78
|
-
import DistanceStats from './DistanceStats.vue'
|
|
78
|
+
import DistanceStats, { supportedPaths } from './DistanceStats.vue'
|
|
79
79
|
import type { DistanceType } from './DistanceStats.vue'
|
|
80
80
|
import BaseTimer from './../BaseTimer/BaseTimer.vue'
|
|
81
81
|
|
|
@@ -110,15 +110,22 @@ export default defineComponent({
|
|
|
110
110
|
},
|
|
111
111
|
props: {
|
|
112
112
|
showClock: Boolean,
|
|
113
|
+
/** Select the type of clock. This will change the text of the labels and how the count functions */
|
|
113
114
|
clockType: {
|
|
114
115
|
type: String as PropType<ClockType>,
|
|
115
116
|
required: true,
|
|
116
117
|
validator: (val: ClockType): boolean => Boolean(clockTypes[val])
|
|
117
118
|
},
|
|
118
|
-
startDateTime:
|
|
119
|
+
startDateTime: {
|
|
120
|
+
type: String,
|
|
121
|
+
required: false,
|
|
122
|
+
default: undefined
|
|
123
|
+
},
|
|
124
|
+
/** Launch date */
|
|
119
125
|
displayDate: {
|
|
120
126
|
type: String || null,
|
|
121
|
-
required: false
|
|
127
|
+
required: false,
|
|
128
|
+
default: undefined
|
|
122
129
|
},
|
|
123
130
|
missionTypes: {
|
|
124
131
|
type: Array as PropType<{ missionType: string }[]>,
|
|
@@ -135,14 +142,23 @@ export default defineComponent({
|
|
|
135
142
|
required: true,
|
|
136
143
|
validator: (val: Status): boolean => Boolean(statuses[val])
|
|
137
144
|
},
|
|
145
|
+
/** If distance should be displayed with the stats */
|
|
138
146
|
showDistance: Boolean,
|
|
139
147
|
distanceType: {
|
|
140
148
|
type: String as PropType<DistanceType | ''>,
|
|
141
149
|
required: false,
|
|
142
150
|
default: ''
|
|
143
151
|
},
|
|
144
|
-
distanceValue:
|
|
145
|
-
|
|
152
|
+
distanceValue: {
|
|
153
|
+
type: Number,
|
|
154
|
+
default: undefined
|
|
155
|
+
},
|
|
156
|
+
/** Used with `DistanceStats`. Only `/spice_data/getRangefromT1/` or `/api/v1/missions/` paths are supported. */
|
|
157
|
+
distanceApiUrls: {
|
|
158
|
+
type: String,
|
|
159
|
+
default: undefined,
|
|
160
|
+
validator: (val: string): boolean => supportedPaths.some((p) => val.includes(p) || val === '')
|
|
161
|
+
}
|
|
146
162
|
},
|
|
147
163
|
computed: {
|
|
148
164
|
clockTypeLabel(): string {
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
<script lang="ts">
|
|
48
48
|
// @ts-nocheck
|
|
49
|
+
import type { StreamfieldBlockData } from './../../interfaces.ts'
|
|
49
50
|
import MissionDetailInlineImage from './../MissionDetailInlineImage/MissionDetailInlineImage.vue'
|
|
50
51
|
import BaseHeading from './../BaseHeading/BaseHeading.vue'
|
|
51
52
|
import BlockQuote from './../BlockQuote/BlockQuote.vue'
|
|
@@ -63,8 +64,9 @@ export default {
|
|
|
63
64
|
},
|
|
64
65
|
props: {
|
|
65
66
|
data: {
|
|
66
|
-
type: Array,
|
|
67
|
-
required: false
|
|
67
|
+
type: Array as () => StreamfieldBlockData[],
|
|
68
|
+
required: false,
|
|
69
|
+
default: undefined
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
72
|
}
|
|
@@ -3,6 +3,13 @@ import MixinAnimationCaret from './MixinAnimationCaret.vue'
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Mixins/MixinAnimationCaret',
|
|
5
5
|
component: MixinAnimationCaret,
|
|
6
|
+
argTypes: {
|
|
7
|
+
color: {
|
|
8
|
+
control: {
|
|
9
|
+
type: 'text'
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
},
|
|
6
13
|
parameters: {
|
|
7
14
|
slots: {
|
|
8
15
|
default: 'BaseStory slot content'
|