@explorer-1/vue 0.3.4 → 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.
Files changed (236) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/package.json +2 -2
  3. package/src/components/AboutTheAuthor/AboutTheAuthor.stories.js +1 -1
  4. package/src/components/AboutTheAuthor/AboutTheAuthor.vue +9 -9
  5. package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.stories.js +2 -7
  6. package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.vue +5 -1
  7. package/src/components/BackToTop/BackToTop.stories.js +1 -1
  8. package/src/components/BackToTop/BackToTop.vue +10 -0
  9. package/src/components/BaseAccordionItem/BaseAccordionItem.stories.js +24 -4
  10. package/src/components/BaseAccordionItem/BaseAccordionItem.vue +56 -17
  11. package/src/components/BaseAudio/BaseAudio.stories.js +4 -6
  12. package/src/components/BaseAudio/BaseAudio.vue +6 -0
  13. package/src/components/BaseButton/BaseButton.stories.ts +12 -23
  14. package/src/components/BaseButton/BaseButton.vue +34 -10
  15. package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.stories.js +2 -1
  16. package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue +5 -0
  17. package/src/components/BaseHeading/BaseHeading.stories.js +9 -17
  18. package/src/components/BaseHeading/BaseHeading.vue +18 -8
  19. package/src/components/BaseImage/BaseImage.stories.ts +7 -17
  20. package/src/components/BaseImage/BaseImage.vue +26 -14
  21. package/src/components/BaseImageCaption/BaseImageCaption.stories.js +11 -0
  22. package/src/components/BaseImageCaption/BaseImageCaption.vue +10 -6
  23. package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.stories.js +13 -15
  24. package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.vue +13 -9
  25. package/src/components/BaseLink/BaseLink.stories.js +8 -7
  26. package/src/components/BaseLink/BaseLink.vue +32 -21
  27. package/src/components/BaseModal/BaseModal.stories.js +4 -7
  28. package/src/components/BaseModal/BaseModal.vue +1 -0
  29. package/src/components/BaseModal/BaseModalDialog.vue +1 -6
  30. package/src/components/BasePill/BasePill.stories.js +8 -22
  31. package/src/components/BasePill/BasePill.vue +36 -19
  32. package/src/components/BasePlaceholder/BasePlaceholder.stories.js +4 -7
  33. package/src/components/BasePlaceholder/BasePlaceholder.vue +1 -1
  34. package/src/components/BaseRadioGroup/BaseRadioGroup.stories.js +1 -0
  35. package/src/components/BaseRadioGroup/BaseRadioGroup.vue +9 -2
  36. package/src/components/BaseSwimlane/BaseSwimlane.stories.js +2 -1
  37. package/src/components/BaseSwimlane/BaseSwimlane.vue +2 -0
  38. package/src/components/BaseTimer/BaseTimer.stories.js +7 -2
  39. package/src/components/BaseTimer/BaseTimer.vue +4 -2
  40. package/src/components/BaseUnitToggle/BaseUnitToggle.stories.js +1 -16
  41. package/src/components/BaseUnitToggle/BaseUnitToggle.vue +4 -0
  42. package/src/components/BaseVideo/BaseVideo.vue +7 -3
  43. package/src/components/BlockAccordion/BlockAccordion.stories.js +4 -2
  44. package/src/components/BlockAccordion/BlockAccordion.vue +3 -3
  45. package/src/components/BlockAudio/BlockAudio.stories.js +1 -0
  46. package/src/components/BlockAudio/BlockAudio.vue +11 -3
  47. package/src/components/BlockCardGrid/BlockCardGrid.stories.js +1 -1
  48. package/src/components/BlockCardGrid/BlockCardGrid.vue +1 -1
  49. package/src/components/BlockCardGridItem/BlockCardGridItem.stories.js +3 -3
  50. package/src/components/BlockCardGridItem/BlockCardGridItemElement.vue +1 -1
  51. package/src/components/BlockCircleImageCard/BlockCircleImageCard.stories.js +3 -9
  52. package/src/components/BlockCsrTable/BlockCsrTable.stories.js +1 -0
  53. package/src/components/BlockCsrTable/BlockCsrTable.vue +1 -1
  54. package/src/components/BlockCta/BlockCta.stories.js +1 -0
  55. package/src/components/BlockCta/BlockCta.vue +9 -2
  56. package/src/components/BlockDialog/BlockDialog.stories.js +2 -1
  57. package/src/components/BlockGist/BlockGist.stories.js +3 -2
  58. package/src/components/BlockGist/BlockGist.vue +8 -6
  59. package/src/components/BlockHeading/BlockHeading.stories.js +1 -0
  60. package/src/components/BlockIframeEmbed/BlockIframeEmbed.stories.js +3 -2
  61. package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +9 -2
  62. package/src/components/BlockImage/BlockImage.stories.js +1 -5
  63. package/src/components/BlockImage/BlockImage.vue +5 -2
  64. package/src/components/BlockImageCarousel/BlockImageCarousel.stories.js +3 -15
  65. package/src/components/BlockImageCarousel/BlockImageCarousel.vue +2 -0
  66. package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.stories.js +2 -16
  67. package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.vue +7 -7
  68. package/src/components/BlockImageComparison/BlockImageComparison.stories.js +5 -3
  69. package/src/components/BlockImageComparison/BlockImageComparison.vue +11 -2
  70. package/src/components/BlockImageGallery/BlockImageGallery.stories.js +4 -11
  71. package/src/components/BlockImageGallery/BlockImageGallery.vue +5 -0
  72. package/src/components/BlockInlineImage/BlockInlineImage.stories.js +5 -2
  73. package/src/components/BlockInlineImage/BlockInlineImage.vue +20 -7
  74. package/src/components/BlockKeyPoints/BlockKeyPoints.stories.js +1 -0
  75. package/src/components/BlockKeyPoints/BlockKeyPoints.vue +12 -3
  76. package/src/components/BlockLinkCard/BlockLinkCard.stories.js +24 -34
  77. package/src/components/BlockLinkCard/BlockLinkCard.vue +28 -9
  78. package/src/components/BlockLinkCard/BlockLinkCardCollectionLg.vue +2 -2
  79. package/src/components/BlockLinkCardList/BlockLinkCardList.stories.js +1 -3
  80. package/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.js +2 -14
  81. package/src/components/BlockLinkCarousel/BlockLinkCarousel.vue +8 -8
  82. package/src/components/BlockLinkTile/BlockLinkTile.stories.js +3 -13
  83. package/src/components/BlockLinkTile/BlockLinkTile.vue +26 -13
  84. package/src/components/BlockListCards/BlockListCards.stories.js +1 -0
  85. package/src/components/BlockListCards/BlockListCards.vue +5 -4
  86. package/src/components/BlockNewsletterSignup/BlockNewsletterSignup.stories.js +1 -0
  87. package/src/components/BlockNewsletterSignup/BlockNewsletterSignup.vue +3 -2
  88. package/src/components/BlockQuote/BlockQuote.stories.js +1 -0
  89. package/src/components/BlockQuote/BlockQuote.vue +3 -2
  90. package/src/components/BlockRelatedLinks/BlockRelatedLinks.stories.js +1 -0
  91. package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +6 -4
  92. package/src/components/BlockRichTable/BlockRichTable.stories.js +1 -1
  93. package/src/components/BlockRichTable/BlockRichTable.vue +23 -9
  94. package/src/components/BlockStreamfield/BlockStreamfield.stories.js +1 -11
  95. package/src/components/BlockStreamfield/BlockStreamfield.vue +34 -31
  96. package/src/components/BlockTeaser/BlockTeaser.stories.js +1 -0
  97. package/src/components/BlockTeaser/BlockTeaser.vue +20 -12
  98. package/src/components/BlockText/BlockText.stories.js +2 -9
  99. package/src/components/BlockText/BlockText.vue +21 -9
  100. package/src/components/BlockVideo/BlockVideo.stories.js +1 -0
  101. package/src/components/BlockVideo/BlockVideo.vue +14 -3
  102. package/src/components/BlockVideoEmbed/BlockVideoEmbed.stories.js +1 -0
  103. package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +6 -3
  104. package/src/components/CalendarButton/CalendarButton.vue +7 -0
  105. package/src/components/DetailHeadline/DetailHeadline.stories.js +2 -20
  106. package/src/components/DetailHeadline/DetailHeadline.vue +16 -4
  107. package/src/components/DsnWidget/DsnWidget.stories.js +2 -6
  108. package/src/components/DsnWidget/DsnWidget.vue +18 -4
  109. package/src/components/EventDetailHero/EventDetailHero.stories.js +10 -7
  110. package/src/components/EventDetailHero/EventDetailHero.vue +4 -7
  111. package/src/components/FormContact/FormContact.stories.js +2 -1
  112. package/src/components/FormNewsletterSignup/FormNewsletterSignup.stories.js +2 -1
  113. package/src/components/HeroInlineMedia/HeroInlineMedia.vue +12 -8
  114. package/src/components/HeroLarge/HeroLarge.stories.js +27 -2
  115. package/src/components/HeroLarge/HeroLarge.vue +12 -5
  116. package/src/components/HeroListingIndex/HeroListingIndex.stories.js +1 -0
  117. package/src/components/HeroListingIndex/HeroListingIndex.vue +18 -13
  118. package/src/components/HeroMedia/HeroMedia.stories.js +14 -9
  119. package/src/components/HeroMedia/HeroMedia.vue +9 -8
  120. package/src/components/HeroMedium/HeroMedium.stories.js +19 -4
  121. package/src/components/HeroMedium/HeroMedium.vue +32 -14
  122. package/src/components/HeroMedium/HeroSmall.stories.js +20 -6
  123. package/src/components/HomepageCarousel/HomepageCarousel.stories.js +1 -1
  124. package/src/components/HomepageCarouselItem/HomepageCarouselItem.stories.js +2 -2
  125. package/src/components/HomepageCarouselItem/HomepageCarouselItem.vue +2 -6
  126. package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.vue +2 -2
  127. package/src/components/LogoCaltech/LogoCaltech.stories.js +14 -18
  128. package/src/components/LogoCaltech/LogoCaltech.vue +1 -0
  129. package/src/components/LogoTribrand/LogoTribrand.stories.js +66 -51
  130. package/src/components/LogoTribrand/LogoTribrand.vue +4 -2
  131. package/src/components/MetaPanel/MetaPanel.stories.js +5 -9
  132. package/src/components/MetaPanel/MetaPanel.vue +3 -0
  133. package/src/components/MetaPanelItems/MetaPanelItems.stories.js +9 -2
  134. package/src/components/MetaPanelItems/MetaPanelItems.vue +2 -0
  135. package/src/components/MetadataEduResource/MetadataEduResource.stories.js +12 -10
  136. package/src/components/MetadataEduResource/MetadataEduResource.vue +7 -3
  137. package/src/components/MetadataEvent/MetadataEvent.stories.js +1 -1
  138. package/src/components/MissionDetailAbout/MissionDetailAbout.vue +1 -1
  139. package/src/components/MissionDetailHero/MissionDetailHero.stories.js +2 -2
  140. package/src/components/MissionDetailHighlights/MissionDetailHighlights.stories.js +1 -0
  141. package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.stories.js +1 -6
  142. package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.vue +10 -5
  143. package/src/components/MissionDetailStats/DistanceStats.vue +10 -5
  144. package/src/components/MissionDetailStats/MissionDetailStats.stories.js +4 -21
  145. package/src/components/MissionDetailStats/MissionDetailStats.vue +21 -5
  146. package/src/components/MissionDetailStreamfield/MissionDetailStreamfield.vue +4 -2
  147. package/src/components/MixinAnimationCaret/MixinAnimationCaret.stories.ts +7 -0
  148. package/src/components/MixinAnimationCaret/MixinAnimationCaret.vue +12 -6
  149. package/src/components/MixinCarousel/MixinCarousel.stories.js +2 -8
  150. package/src/components/MixinCarousel/MixinCarousel.vue +13 -16
  151. package/src/components/MixinVideoBg/MixinVideoBg.stories.js +1 -1
  152. package/src/components/MixinVideoBg/MixinVideoBg.vue +4 -7
  153. package/src/components/NavDesktop/NavDesktop.stories.js +1 -0
  154. package/src/components/NavDesktop/NavDesktop.vue +4 -4
  155. package/src/components/NavDesktop/NavDesktopTopHat.vue +4 -4
  156. package/src/components/NavDesktopEdu/NavDesktopEdu.stories.js +1 -5
  157. package/src/components/NavDesktopEdu/NavDesktopEdu.vue +4 -4
  158. package/src/components/NavHeading/NavHeading.stories.js +3 -2
  159. package/src/components/NavHighlight/NavHighlight.stories.js +3 -2
  160. package/src/components/NavJumpMenu/NavJumpMenu.stories.js +5 -2
  161. package/src/components/NavLinkList/NavLinkList.stories.js +3 -2
  162. package/src/components/NavLinkList/NavLinkList.vue +3 -3
  163. package/src/components/NavLogoLinks/NavLogoLinks.stories.js +1 -0
  164. package/src/components/NavMobile/NavMobile.stories.js +13 -2
  165. package/src/components/NavMobile/NavMobile.vue +18 -5
  166. package/src/components/NavMobile/NavMobileDropdown.vue +2 -2
  167. package/src/components/NavMobile/NavMobileEdu.stories.js +11 -4
  168. package/src/components/NavMobile/NavMobileLink.vue +4 -4
  169. package/src/components/NavSearchForm/NavSearchForm.stories.js +1 -0
  170. package/src/components/NavSecondary/NavSecondary.stories.js +1 -0
  171. package/src/components/NavSecondary/NavSecondary.vue +7 -4
  172. package/src/components/NavSecondary/NavSecondaryDropdownContent.vue +1 -1
  173. package/src/components/NavSocial/NavSocial.stories.js +1 -0
  174. package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.stories.js +2 -1
  175. package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.vue +1 -1
  176. package/src/components/ParallaxContainer/ParallaxContainer.stories.js +2 -2
  177. package/src/components/ParallaxContainer/ParallaxContainer.vue +1 -0
  178. package/src/components/PodcastSeriesCarousel/PodcastSeriesCarousel.vue +6 -5
  179. package/src/components/RoboticsDetailStats/RoboticsDetailStats.stories.js +3 -8
  180. package/src/components/SearchFilterGroup/SearchFilterGroup.stories.js +1 -0
  181. package/src/components/SearchInput/SearchInput.stories.js +1 -0
  182. package/src/components/SearchPagination/SearchPagination.stories.js +1 -0
  183. package/src/components/SearchResultCard/SearchResultCard.stories.js +1 -10
  184. package/src/components/SearchResultCard/SearchResultCard.vue +1 -0
  185. package/src/components/SearchResultGridItem/SearchResultGridItem.stories.js +3 -12
  186. package/src/components/SearchResultGridItem/SearchResultGridItem.vue +5 -2
  187. package/src/components/SearchResultsList/SearchResultsList.stories.js +3 -3
  188. package/src/components/SearchSelectMenu/SearchSelectMenu.stories.js +2 -1
  189. package/src/components/SwimlaneCTA/SwimlaneCTA.vue +1 -0
  190. package/src/components/TextArea/TextArea.stories.js +2 -1
  191. package/src/components/TextInput/TextInput.stories.js +2 -1
  192. package/src/components/TheFooter/TheFooter.stories.js +1 -0
  193. package/src/components/TheFooter/TheFooter.vue +30 -4
  194. package/src/components/ThumbnailCarousel/ThumbnailCarousel.stories.js +1 -1
  195. package/src/components/ThumbnailCarousel/ThumbnailCarousel.vue +2 -1
  196. package/src/components/TimelineDialog/TimelineDialog.vue +2 -2
  197. package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.stories.js +1 -0
  198. package/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.stories.js +2 -2
  199. package/src/components/TopicDetailMore/TopicDetailMore.stories.js +1 -0
  200. package/src/components/TopicDetailMoreItem/TopicDetailMoreItem.stories.js +3 -2
  201. package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.vue +2 -2
  202. package/src/constants.ts +3 -5
  203. package/src/docs/foundation/grid_layouthelpers.stories.js +2 -2
  204. package/src/docs/introduction.docs.mdx +14 -2
  205. package/src/interfaces.ts +31 -6
  206. package/src/templates/PageAudioDetail/PageAudioDetail.vue +2 -2
  207. package/src/templates/PageContent/PageContent.stories.js +1 -1
  208. package/src/templates/PageEventDetail/PageEventDetail.stories.js +1 -1
  209. package/src/templates/PageNewsDetail/PageNewsDetail.stories.js +2 -2
  210. package/src/templates/edu/PageContentEdu.stories.js +2 -2
  211. package/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.stories.js +2 -2
  212. package/src/templates/edu/PageEduEventDetail/PageEduEventDetail.stories.js +1 -1
  213. package/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.stories.js +2 -2
  214. package/src/templates/edu/PageEduGalleryDetail/PageEduGalleryDetail.stories.js +1 -1
  215. package/src/templates/edu/PageEduGalleryDetail/PageEduGalleryDetail.vue +10 -6
  216. package/src/templates/edu/PageEduHome/PageEduHome.stories.js +1 -1
  217. package/src/templates/edu/PageEduLesson/PageEduLesson.stories.js +2 -2
  218. package/src/templates/edu/PageEduMultimediaDetail/PageEduMultimediaDetail.stories.js +1 -1
  219. package/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.stories.js +2 -2
  220. package/src/templates/edu/PageEduStudentProject/PageEduStudentProject.stories.js +2 -2
  221. package/src/templates/edu/PageEduStudentProject/PageEduStudentProjectSection.vue +10 -6
  222. package/src/templates/edu/PageEduTeachableMoment/PageEduTeachableMoment.stories.js +2 -2
  223. package/src/templates/www/PageAsteroidWatchContent/PageAsteroidWatchContent.stories.js +2 -2
  224. package/src/templates/www/PageAsteroidWatchIndex/PageAsteroidWatchIndex.stories.js +2 -2
  225. package/src/templates/www/PageGoDirectory/PageGoDirectory.stories.js +2 -2
  226. package/src/templates/www/PageHomepage/PageHomepage.stories.js +2 -2
  227. package/src/templates/www/PageMissionDetail/PageMissionDetail.stories.js +2 -2
  228. package/src/templates/www/PagePodcast/PagePodcast.stories.js +2 -2
  229. package/src/templates/www/PagePodcastSeason/PagePodcastSeason.stories.js +2 -2
  230. package/src/templates/www/PagePressKitIndex/PagePressKitIndex.stories.js +2 -2
  231. package/src/templates/www/PageProfileDetail/PageProfileDetail.stories.js +2 -2
  232. package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.stories.js +2 -2
  233. package/src/templates/www/PageTimeline/PageTimeline.stories.js +2 -2
  234. package/src/templates/www/PageTopicDetail/PageTopicDetail.stories.js +2 -2
  235. package/src/templates/www/PageTopicDetail/PageTopicDetail.vue +2 -1
  236. package/src/utils/mixins.ts +7 -7
@@ -6,12 +6,12 @@ export default {
6
6
  component: HomepageCarouselItem,
7
7
  decorators: [
8
8
  () => ({
9
- template: `<div id="storyDecorator" class="max-w-screen-3xl mx-auto"><story/></div>`
9
+ template: `<div id="storyRoot" class="max-w-screen-3xl mx-auto"><story/></div>`
10
10
  })
11
11
  ],
12
12
  parameters: {
13
13
  html: {
14
- root: '#storyDecorator'
14
+ root: '#storyRoot'
15
15
  },
16
16
  viewMode: 'canvas'
17
17
  },
@@ -98,7 +98,7 @@
98
98
  <script lang="ts">
99
99
  import { defineComponent, resolveComponent } from 'vue'
100
100
  import type { PropType } from 'vue'
101
- import type { ImageObject } from '../../interfaces'
101
+ import type { ImageObject, VideoObject } from '../../interfaces'
102
102
  import BaseLink from './../BaseLink/BaseLink.vue'
103
103
  import IconArrow from './../Icons/IconArrow.vue'
104
104
 
@@ -109,11 +109,7 @@ export interface Slide {
109
109
  url: string
110
110
  }
111
111
  heading: string
112
- video: {
113
- file: string
114
- fileOgg: string
115
- fileWebm: string
116
- }
112
+ video: Partial<VideoObject>
117
113
  listingPageHeroImage: Partial<ImageObject>
118
114
  }
119
115
 
@@ -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 { BlockData } from './../BlockVideoEmbed/BlockVideoEmbed.vue'
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<BlockData[]>,
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
- options: ['text-xs', 'text-sm', 'text-base', 'text-lg', 'text-xl', 'text-2xl']
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 = LogoCaltechComponentTemplate.bind({})
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 = LogoTribrandComponentTemplate.bind({})
32
- BaseStory.storyName = 'Logo Inline SVG'
33
- BaseStory.args = { invert: false, size: 'text-base' }
34
- BaseStory.argTypes = {
35
- size: {
36
- control: {
37
- type: 'select',
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
- invert: {
42
- control: {
43
- type: 'boolean'
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 = LogoTribrandImageTemplate.bind({})
55
- LogoImageColor.args = { src: LogoColor }
56
- LogoImageColor.parameters = {
57
- docs: {
58
- description: {
59
- story: 'Demo of using an `<img />` element to render the .svg file'
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 = LogoTribrandImageTemplate.bind({})
65
- LogoImageWhite.args = { src: LogoWhite }
66
- LogoImageWhite.parameters = {
67
- docs: {
68
- description: {
69
- story: 'Demo of using an `<img />` element to render the .svg file'
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
- LogoImageWhite.decorators = [
74
- () => ({
75
- template: `<div class="inline-block bg-black"><story/></div>`
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
- // The -transparent class on NavDesktop takes care of this -- don't use the prop in this case
61
- // Prop should be used when the logo needs to be manually inverted for use somewhere else
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: ['!autodocs'],
6
+ tags: [],
7
7
  decorators: [
8
8
  () => ({
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="storyDecorator"><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>`
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
- argTypes: {
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: ['!autodocs']
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: ['!autodocs'],
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
- variant?: string
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,7 +3,7 @@ import MetadataEvent from './MetadataEvent.vue'
3
3
  export default {
4
4
  title: 'Components/Utilities/MetadataEvent',
5
5
  component: MetadataEvent,
6
- tags: ['!autodocs'],
6
+ tags: [],
7
7
  excludeStories: /.*Data$/
8
8
  }
9
9
 
@@ -45,7 +45,7 @@ import type { PropType } from 'vue'
45
45
  import BaseHeading from './../BaseHeading/BaseHeading.vue'
46
46
  import BlockText from './../BlockText/BlockText.vue'
47
47
 
48
- interface Instrument {
48
+ export interface Instrument {
49
49
  id: string
50
50
  instrument: string
51
51
  }
@@ -22,12 +22,12 @@ export default {
22
22
  },
23
23
  decorators: [
24
24
  () => ({
25
- template: `<div id="storyDecorator" style="height:2500px"><story/></div>`
25
+ template: `<div id="storyRoot" style="height:2500px"><story/></div>`
26
26
  })
27
27
  ],
28
28
  parameters: {
29
29
  html: {
30
- root: '#storyDecorator'
30
+ root: '#storyRoot'
31
31
  },
32
32
  viewMode: 'canvas'
33
33
  },
@@ -9,6 +9,7 @@ import MissionDetailHighlights from './MissionDetailHighlights.vue'
9
9
  export default {
10
10
  title: 'Components/WWW/MissionDetail/MissionHighlights',
11
11
  component: MissionDetailHighlights,
12
+ tags: ['carousels'],
12
13
  parameters: {
13
14
  viewMode: 'canvas'
14
15
  },
@@ -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: Number,
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 => supportedPaths.some((p) => val.includes(p) || val === '')
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, { statuses, clockTypes } from './MissionDetailStats.vue'
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',
@@ -9,31 +8,15 @@ export default {
9
8
  subcomponents: { MissionDetailStatsMini, MissionDetailStatsMicro },
10
9
  decorators: [
11
10
  () => ({
12
- template: `<div id="storyDecorator" class="mt-20"><story/></div>`
11
+ template: `<div id="storyRoot" class="mt-20"><story/></div>`
13
12
  })
14
13
  ],
15
14
  parameters: {
16
15
  html: {
17
- root: '#storyDecorator'
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: String,
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: Number,
145
- distanceApiUrls: String
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 {