@explorer-1/vue 0.0.0

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 (371) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +9 -0
  3. package/components.d.ts +215 -0
  4. package/index.html +18 -0
  5. package/lib/main.ts +78 -0
  6. package/package.json +54 -0
  7. package/postcss.config.js +7 -0
  8. package/public/edu/.gitkeep +0 -0
  9. package/public/edu/explorer-1/bg-stars-edu.png +0 -0
  10. package/public/edu/explorer-1/bg-stars.jpg +0 -0
  11. package/public/explorer-1/bg-stars-edu.png +0 -0
  12. package/public/explorer-1/bg-stars.jpg +0 -0
  13. package/src/App.vue +30 -0
  14. package/src/assets/fonts/README.md +12 -0
  15. package/src/assets/fonts/archivo-narrow/ArchivoNarrow-Bold.woff2 +0 -0
  16. package/src/assets/fonts/archivo-narrow/ArchivoNarrow-BoldItalic.woff2 +0 -0
  17. package/src/assets/fonts/archivo-narrow/ArchivoNarrow-SemiBold.woff2 +0 -0
  18. package/src/assets/fonts/archivo-narrow/ArchivoNarrow-SemiBoldItalic.woff2 +0 -0
  19. package/src/assets/fonts/metropolis/Metropolis-Bold.woff2 +0 -0
  20. package/src/assets/fonts/metropolis/Metropolis-BoldItalic.woff2 +0 -0
  21. package/src/assets/fonts/metropolis/Metropolis-ExtraBold.woff2 +0 -0
  22. package/src/assets/fonts/metropolis/Metropolis-Medium.woff2 +0 -0
  23. package/src/assets/fonts/metropolis/Metropolis-MediumItalic.woff2 +0 -0
  24. package/src/assets/fonts/metropolis/Metropolis-Regular.woff2 +0 -0
  25. package/src/assets/fonts/metropolis/Metropolis-RegularItalic.woff2 +0 -0
  26. package/src/assets/fonts/metropolis/Metropolis-SemiBold.woff2 +0 -0
  27. package/src/assets/fonts/metropolis/Metropolis-SemiBoldItalic.woff2 +0 -0
  28. package/src/assets/scss/styles.scss +1 -0
  29. package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.stories.js +156 -0
  30. package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.vue +156 -0
  31. package/src/components/BackToTop/BackToTop.stories.js +24 -0
  32. package/src/components/BackToTop/BackToTop.vue +76 -0
  33. package/src/components/BaseAudio/BaseAudio.stories.js +29 -0
  34. package/src/components/BaseAudio/BaseAudio.vue +359 -0
  35. package/src/components/BaseButton/BaseButton.stories.ts +65 -0
  36. package/src/components/BaseButton/BaseButton.vue +114 -0
  37. package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.stories.mdx +68 -0
  38. package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue +101 -0
  39. package/src/components/BaseHeading/BaseHeading.stories.js +75 -0
  40. package/src/components/BaseHeading/BaseHeading.vue +58 -0
  41. package/src/components/BaseImage/BaseImage.stories.ts +52 -0
  42. package/src/components/BaseImage/BaseImage.vue +120 -0
  43. package/src/components/BaseImageCaption/BaseImageCaption.stories.js +27 -0
  44. package/src/components/BaseImageCaption/BaseImageCaption.vue +51 -0
  45. package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.stories.js +73 -0
  46. package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.vue +90 -0
  47. package/src/components/BaseLightboxCloseButton/BaseLightboxCloseButton.vue +45 -0
  48. package/src/components/BaseLightboxOpenButton/BaseLightboxOpenButton.vue +46 -0
  49. package/src/components/BaseLink/BaseLink.stories.js +47 -0
  50. package/src/components/BaseLink/BaseLink.vue +227 -0
  51. package/src/components/BaseModal/BaseModal.stories.js +90 -0
  52. package/src/components/BaseModal/BaseModal.vue +54 -0
  53. package/src/components/BaseModal/BaseModalDialog.vue +59 -0
  54. package/src/components/BasePlaceholder/BasePlaceholder.stories.js +29 -0
  55. package/src/components/BasePlaceholder/BasePlaceholder.vue +30 -0
  56. package/src/components/BaseRadioGroup/BaseRadioGroup.stories.mdx +68 -0
  57. package/src/components/BaseRadioGroup/BaseRadioGroup.vue +102 -0
  58. package/src/components/BaseSwimlane/BaseSwimlane.stories.mdx +64 -0
  59. package/src/components/BaseSwimlane/BaseSwimlane.vue +204 -0
  60. package/src/components/BaseTag/BaseTag.stories.js +34 -0
  61. package/src/components/BaseTag/BaseTag.vue +36 -0
  62. package/src/components/BaseTimer/BaseTimer.stories.js +78 -0
  63. package/src/components/BaseTimer/BaseTimer.test.js +15 -0
  64. package/src/components/BaseTimer/BaseTimer.vue +270 -0
  65. package/src/components/BaseUnitToggle/BaseUnitToggle.stories.js +86 -0
  66. package/src/components/BaseUnitToggle/BaseUnitToggle.test.js +26 -0
  67. package/src/components/BaseUnitToggle/BaseUnitToggle.vue +255 -0
  68. package/src/components/BaseVideo/BaseVideo.stories.js +31 -0
  69. package/src/components/BaseVideo/BaseVideo.vue +73 -0
  70. package/src/components/BlockAnchor/BlockAnchor.vue +38 -0
  71. package/src/components/BlockAudio/BlockAudio.stories.js +29 -0
  72. package/src/components/BlockAudio/BlockAudio.vue +78 -0
  73. package/src/components/BlockCard/BlockCard.stories.js +24 -0
  74. package/src/components/BlockCard/BlockCard.vue +88 -0
  75. package/src/components/BlockCardGroup/BlockCardGroup.stories.js +71 -0
  76. package/src/components/BlockCardGroup/BlockCardGroup.vue +61 -0
  77. package/src/components/BlockCircleImageCard/BlockCircleImageCard.stories.js +55 -0
  78. package/src/components/BlockCircleImageCard/BlockCircleImageCard.vue +120 -0
  79. package/src/components/BlockCta/BlockCta.stories.js +35 -0
  80. package/src/components/BlockCta/BlockCta.vue +55 -0
  81. package/src/components/BlockHeading/BlockHeading.stories.js +22 -0
  82. package/src/components/BlockHeading/BlockHeading.vue +27 -0
  83. package/src/components/BlockIframeEmbed/BlockIframeEmbed.stories.js +40 -0
  84. package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +84 -0
  85. package/src/components/BlockImage/BlockImage.stories.js +137 -0
  86. package/src/components/BlockImage/BlockImage.vue +48 -0
  87. package/src/components/BlockImage/BlockImageFullBleed.vue +119 -0
  88. package/src/components/BlockImage/BlockImageStandard.vue +106 -0
  89. package/src/components/BlockImageCarousel/BlockImageCarousel.stories.js +108 -0
  90. package/src/components/BlockImageCarousel/BlockImageCarousel.vue +201 -0
  91. package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.stories.js +63 -0
  92. package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.vue +120 -0
  93. package/src/components/BlockImageComparison/BlockImageComparison.stories.js +46 -0
  94. package/src/components/BlockImageComparison/BlockImageComparison.vue +59 -0
  95. package/src/components/BlockImageGallery/BlockImageGallery.stories.js +55 -0
  96. package/src/components/BlockImageGallery/BlockImageGallery.vue +128 -0
  97. package/src/components/BlockInlineImage/BlockInlineImage.stories.js +68 -0
  98. package/src/components/BlockInlineImage/BlockInlineImage.vue +124 -0
  99. package/src/components/BlockKeyPoints/BlockKeyPoints.stories.js +28 -0
  100. package/src/components/BlockKeyPoints/BlockKeyPoints.vue +48 -0
  101. package/src/components/BlockLinkCard/BlockLinkCard.stories.js +102 -0
  102. package/src/components/BlockLinkCard/BlockLinkCard.vue +197 -0
  103. package/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.js +217 -0
  104. package/src/components/BlockLinkCarousel/BlockLinkCarousel.vue +68 -0
  105. package/src/components/BlockLinkTile/BlockLinkTile.stories.js +72 -0
  106. package/src/components/BlockLinkTile/BlockLinkTile.vue +193 -0
  107. package/src/components/BlockListCards/BlockListCards.stories.js +69 -0
  108. package/src/components/BlockListCards/BlockListCards.vue +129 -0
  109. package/src/components/BlockQuote/BlockQuote.stories.js +84 -0
  110. package/src/components/BlockQuote/BlockQuote.vue +87 -0
  111. package/src/components/BlockRelatedLinks/BlockRelatedLinks.stories.js +60 -0
  112. package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +77 -0
  113. package/src/components/BlockRelatedLinks/RelatedLink.vue +85 -0
  114. package/src/components/BlockStreamfield/BlockStreamfield.stories.js +88 -0
  115. package/src/components/BlockStreamfield/BlockStreamfield.vue +333 -0
  116. package/src/components/BlockTable/BlockTable.stories.js +20 -0
  117. package/src/components/BlockTable/BlockTable.vue +73 -0
  118. package/src/components/BlockTeaser/BlockTeaser.stories.js +74 -0
  119. package/src/components/BlockTeaser/BlockTeaser.test.js +12 -0
  120. package/src/components/BlockTeaser/BlockTeaser.vue +174 -0
  121. package/src/components/BlockText/BlockText.stories.js +21 -0
  122. package/src/components/BlockText/BlockText.vue +44 -0
  123. package/src/components/BlockTwitterEmbed/BlockTwitterEmbed.stories.js +19 -0
  124. package/src/components/BlockTwitterEmbed/BlockTwitterEmbed.vue +61 -0
  125. package/src/components/BlockVideo/BlockVideo.stories.js +23 -0
  126. package/src/components/BlockVideo/BlockVideo.vue +41 -0
  127. package/src/components/BlockVideoEmbed/BlockVideoEmbed.stories.js +20 -0
  128. package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +71 -0
  129. package/src/components/CalendarButton/CalendarButton.stories.js +36 -0
  130. package/src/components/CalendarButton/CalendarButton.vue +86 -0
  131. package/src/components/DetailHeadline/DetailHeadline.stories.js +48 -0
  132. package/src/components/DetailHeadline/DetailHeadline.vue +143 -0
  133. package/src/components/DsnWidget/DsnWidget.stories.js +29 -0
  134. package/src/components/DsnWidget/DsnWidget.vue +96 -0
  135. package/src/components/EventCard/EventCard.vue +188 -0
  136. package/src/components/EventDetailHero/EventDetailHero.stories.js +53 -0
  137. package/src/components/EventDetailHero/EventDetailHero.vue +64 -0
  138. package/src/components/FormContact/FormContact.stories.js +16 -0
  139. package/src/components/FormContact/FormContact.vue +202 -0
  140. package/src/components/FormNewsletterSignup/FormNewsletterSignup.stories.js +16 -0
  141. package/src/components/FormNewsletterSignup/FormNewsletterSignup.vue +355 -0
  142. package/src/components/HeroLarge/HeroLarge.stories.js +46 -0
  143. package/src/components/HeroLarge/HeroLarge.vue +93 -0
  144. package/src/components/HeroListingIndex/HeroListingIndex.stories.js +156 -0
  145. package/src/components/HeroListingIndex/HeroListingIndex.vue +80 -0
  146. package/src/components/HeroMedia/HeroMedia.stories.js +135 -0
  147. package/src/components/HeroMedia/HeroMedia.vue +174 -0
  148. package/src/components/HeroMedium/HeroMedium.stories.js +73 -0
  149. package/src/components/HeroMedium/HeroMedium.vue +166 -0
  150. package/src/components/HomepageCarousel/HomepageCarousel.stories.js +112 -0
  151. package/src/components/HomepageCarousel/HomepageCarousel.vue +382 -0
  152. package/src/components/HomepageCarouselItem/HomepageCarouselItem.stories.js +60 -0
  153. package/src/components/HomepageCarouselItem/HomepageCarouselItem.vue +168 -0
  154. package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.stories.js +35 -0
  155. package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.vue +39 -0
  156. package/src/components/HomepageFeaturedRobot/HomepageFeaturedRobot.stories.js +93 -0
  157. package/src/components/HomepageFeaturedRobot/HomepageFeaturedRobot.vue +129 -0
  158. package/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.stories.js +153 -0
  159. package/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.vue +282 -0
  160. package/src/components/HomepageMissionsCarousel/HomepageMissionsCarouselItem.vue +143 -0
  161. package/src/components/HomepageStats/HomepageStats.stories.js +155 -0
  162. package/src/components/HomepageStats/HomepageStats.vue +362 -0
  163. package/src/components/HomepageTeaserBlock/HomepageTeaserBlock.stories.js +90 -0
  164. package/src/components/HomepageTeaserBlock/HomepageTeaserBlock.vue +156 -0
  165. package/src/components/HomepageTeaserBlock/HomepageTeaserBlockCardImage.vue +58 -0
  166. package/src/components/Icons/Icon360.vue +29 -0
  167. package/src/components/Icons/IconArrow.vue +26 -0
  168. package/src/components/Icons/IconArrows.vue +43 -0
  169. package/src/components/Icons/IconAudio.vue +27 -0
  170. package/src/components/Icons/IconBook.vue +21 -0
  171. package/src/components/Icons/IconBookUser.vue +21 -0
  172. package/src/components/Icons/IconBriefcase.vue +21 -0
  173. package/src/components/Icons/IconCalendar.vue +25 -0
  174. package/src/components/Icons/IconCaret.vue +26 -0
  175. package/src/components/Icons/IconCheckbox.vue +26 -0
  176. package/src/components/Icons/IconCheckboxSelected.vue +35 -0
  177. package/src/components/Icons/IconClose.vue +27 -0
  178. package/src/components/Icons/IconCloseLightbox.vue +25 -0
  179. package/src/components/Icons/IconDownload.vue +31 -0
  180. package/src/components/Icons/IconDropdown.vue +25 -0
  181. package/src/components/Icons/IconEnvelope.vue +21 -0
  182. package/src/components/Icons/IconExpand.vue +28 -0
  183. package/src/components/Icons/IconExternal.vue +25 -0
  184. package/src/components/Icons/IconFilter.vue +25 -0
  185. package/src/components/Icons/IconForwardTen.vue +38 -0
  186. package/src/components/Icons/IconGrid.vue +25 -0
  187. package/src/components/Icons/IconHand.vue +21 -0
  188. package/src/components/Icons/IconInfo.vue +26 -0
  189. package/src/components/Icons/IconLink.vue +27 -0
  190. package/src/components/Icons/IconList.vue +25 -0
  191. package/src/components/Icons/IconLocation.vue +37 -0
  192. package/src/components/Icons/IconMagnifyingGlass.vue +21 -0
  193. package/src/components/Icons/IconMedal.vue +21 -0
  194. package/src/components/Icons/IconMenu.vue +27 -0
  195. package/src/components/Icons/IconMinus.vue +26 -0
  196. package/src/components/Icons/IconMute.vue +27 -0
  197. package/src/components/Icons/IconNext.vue +25 -0
  198. package/src/components/Icons/IconPause.vue +28 -0
  199. package/src/components/Icons/IconPlay.vue +28 -0
  200. package/src/components/Icons/IconPlus.vue +25 -0
  201. package/src/components/Icons/IconPrev.vue +25 -0
  202. package/src/components/Icons/IconRewindTen.vue +42 -0
  203. package/src/components/Icons/IconSearch.vue +25 -0
  204. package/src/components/Icons/IconShare.vue +30 -0
  205. package/src/components/Icons/IconSlideshow.vue +30 -0
  206. package/src/components/Icons/IconSocialEmail.vue +26 -0
  207. package/src/components/Icons/IconSocialFacebook.vue +26 -0
  208. package/src/components/Icons/IconSocialGoogleClassroom.vue +26 -0
  209. package/src/components/Icons/IconSocialInstagram.vue +35 -0
  210. package/src/components/Icons/IconSocialPinterest.vue +26 -0
  211. package/src/components/Icons/IconSocialReddit.vue +25 -0
  212. package/src/components/Icons/IconSocialTwitter.vue +25 -0
  213. package/src/components/Icons/IconSocialYoutube.vue +35 -0
  214. package/src/components/Icons/IconStop.vue +27 -0
  215. package/src/components/Icons/IconTime.vue +25 -0
  216. package/src/components/Icons/IconUniversity.vue +21 -0
  217. package/src/components/Icons/IconUser.vue +26 -0
  218. package/src/components/Icons/IconVolume.vue +27 -0
  219. package/src/components/Icons/Icons.stories.ts +440 -0
  220. package/src/components/ImageDetailContextImage/ImageDetailContextImage.vue +125 -0
  221. package/src/components/LayoutHelper/LayoutHelper.vue +38 -0
  222. package/src/components/LoadingTransition/LoadingTransition.vue +48 -0
  223. package/src/components/LogoCaltech/LogoCaltech.stories.js +39 -0
  224. package/src/components/LogoCaltech/LogoCaltech.vue +29 -0
  225. package/src/components/LogoTribrand/LogoTribrand.stories.js +76 -0
  226. package/src/components/LogoTribrand/LogoTribrand.vue +93 -0
  227. package/src/components/MissionDetailAbout/MissionDetailAbout.stories.js +70 -0
  228. package/src/components/MissionDetailAbout/MissionDetailAbout.vue +204 -0
  229. package/src/components/MissionDetailHero/MissionDetailHero.stories.js +303 -0
  230. package/src/components/MissionDetailHero/MissionDetailHero.vue +292 -0
  231. package/src/components/MissionDetailHighlights/MissionDetailHighlights.stories.js +278 -0
  232. package/src/components/MissionDetailHighlights/MissionDetailHighlights.vue +332 -0
  233. package/src/components/MissionDetailHighlights/MissionDetailHighlightsCarousel.vue +160 -0
  234. package/src/components/MissionDetailHighlights/MissionDetailHighlightsCarouselItem.vue +123 -0
  235. package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.stories.js +43 -0
  236. package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.vue +97 -0
  237. package/src/components/MissionDetailStats/DistanceStats.test.js +133 -0
  238. package/src/components/MissionDetailStats/DistanceStats.vue +250 -0
  239. package/src/components/MissionDetailStats/MissionDetailStats.stories.js +95 -0
  240. package/src/components/MissionDetailStats/MissionDetailStats.test.js +23 -0
  241. package/src/components/MissionDetailStats/MissionDetailStats.vue +187 -0
  242. package/src/components/MissionDetailStats/MissionDetailStatsMicro.vue +52 -0
  243. package/src/components/MissionDetailStats/MissionDetailStatsMini.vue +109 -0
  244. package/src/components/MissionDetailStreamfield/MissionDetailStreamfield.stories.js +55 -0
  245. package/src/components/MissionDetailStreamfield/MissionDetailStreamfield.vue +95 -0
  246. package/src/components/MixinAnimationCaret/MixinAnimationCaret.stories.ts +24 -0
  247. package/src/components/MixinAnimationCaret/MixinAnimationCaret.vue +81 -0
  248. package/src/components/MixinCarousel/MixinCarousel.docs.mdx +33 -0
  249. package/src/components/MixinCarousel/MixinCarousel.stories.js +53 -0
  250. package/src/components/MixinCarousel/MixinCarousel.vue +236 -0
  251. package/src/components/MixinDropdownToggle/MixinDropdownToggle.vue +53 -0
  252. package/src/components/MixinFancybox/MixinFancybox.vue +405 -0
  253. package/src/components/MixinFancybox/MixinFancyboxOpenButton.vue +35 -0
  254. package/src/components/MixinVideoBg/MixinVideoBg.stories.js +23 -0
  255. package/src/components/MixinVideoBg/MixinVideoBg.vue +39 -0
  256. package/src/components/NavDesktop/NavDesktop.stories.js +254 -0
  257. package/src/components/NavDesktop/NavDesktop.vue +355 -0
  258. package/src/components/NavDesktop/NavDesktopDropdown.vue +201 -0
  259. package/src/components/NavDesktop/NavDesktopDropdownContent.vue +87 -0
  260. package/src/components/NavDesktop/NavDesktopDropdownMore.vue +112 -0
  261. package/src/components/NavDesktop/NavDesktopTopHat.vue +56 -0
  262. package/src/components/NavHeading/NavHeading.stories.js +23 -0
  263. package/src/components/NavHeading/NavHeading.vue +40 -0
  264. package/src/components/NavHighlight/NavHighlight.stories.js +42 -0
  265. package/src/components/NavHighlight/NavHighlight.vue +67 -0
  266. package/src/components/NavLinkList/NavLinkList.stories.js +46 -0
  267. package/src/components/NavLinkList/NavLinkList.vue +66 -0
  268. package/src/components/NavLogoLinks/NavLogoLinks.stories.js +22 -0
  269. package/src/components/NavLogoLinks/NavLogoLinks.vue +57 -0
  270. package/src/components/NavMobile/NavMobile.stories.js +231 -0
  271. package/src/components/NavMobile/NavMobile.vue +280 -0
  272. package/src/components/NavMobile/NavMobileDropdown.vue +175 -0
  273. package/src/components/NavMobile/NavMobileLink.vue +69 -0
  274. package/src/components/NavMobile/NavMobileSecondaryDropdown.vue +124 -0
  275. package/src/components/NavSearchForm/NavSearchForm.stories.js +13 -0
  276. package/src/components/NavSearchForm/NavSearchForm.vue +102 -0
  277. package/src/components/NavSecondary/NavSecondary.stories.js +24 -0
  278. package/src/components/NavSecondary/NavSecondary.vue +191 -0
  279. package/src/components/NavSecondary/NavSecondaryDropdown.vue +181 -0
  280. package/src/components/NavSecondary/NavSecondaryDropdownContent.vue +140 -0
  281. package/src/components/NavSecondary/NavSecondaryLink.vue +62 -0
  282. package/src/components/NavSocial/NavSocial.stories.js +20 -0
  283. package/src/components/NavSocial/NavSocial.vue +97 -0
  284. package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.stories.js +60 -0
  285. package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.test.js +30 -0
  286. package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.vue +73 -0
  287. package/src/components/ParallaxContainer/ParallaxContainer.stories.js +47 -0
  288. package/src/components/ParallaxContainer/ParallaxContainer.vue +76 -0
  289. package/src/components/ParallaxElement/ParallaxElement.vue +25 -0
  290. package/src/components/PastEventsCarousel/PastEventsCarousel.vue +86 -0
  291. package/src/components/PodcastEpisodeCard/PodcastEpisodeCard.vue +251 -0
  292. package/src/components/PodcastSeriesCarousel/PodcastSeriesCarousel.stories.js +235 -0
  293. package/src/components/PodcastSeriesCarousel/PodcastSeriesCarousel.vue +171 -0
  294. package/src/components/ProfileDetailSectionGroup/ProfileDetailSectionGroup.vue +84 -0
  295. package/src/components/RoboticsDetailStats/RoboticsDetailStats.stories.js +97 -0
  296. package/src/components/RoboticsDetailStats/RoboticsDetailStats.test.js +21 -0
  297. package/src/components/RoboticsDetailStats/RoboticsDetailStats.vue +217 -0
  298. package/src/components/RoboticsDetailStats/RoboticsDetailStatsMini.vue +182 -0
  299. package/src/components/SearchFilterGroup/SearchFilterGroup.stories.js +59 -0
  300. package/src/components/SearchFilterGroup/SearchFilterGroup.vue +221 -0
  301. package/src/components/SearchInput/SearchInput.stories.js +35 -0
  302. package/src/components/SearchInput/SearchInput.vue +93 -0
  303. package/src/components/SearchPagination/SearchPagination.stories.js +55 -0
  304. package/src/components/SearchPagination/SearchPagination.vue +173 -0
  305. package/src/components/SearchResultCard/SearchResultCard.stories.js +57 -0
  306. package/src/components/SearchResultCard/SearchResultCard.vue +282 -0
  307. package/src/components/SearchResultGridItem/SearchResultGridItem.stories.js +70 -0
  308. package/src/components/SearchResultGridItem/SearchResultGridItem.vue +140 -0
  309. package/src/components/SearchResultsList/SearchResultsList.vue +183 -0
  310. package/src/components/SearchSelectMenu/SearchSelectMenu.stories.js +25 -0
  311. package/src/components/SearchSelectMenu/SearchSelectMenu.vue +86 -0
  312. package/src/components/ShareButtons/ShareButtons.stories.js +16 -0
  313. package/src/components/ShareButtons/ShareButtons.vue +132 -0
  314. package/src/components/ShareButtonsEdu/ShareButtonsEdu.stories.js +14 -0
  315. package/src/components/ShareButtonsEdu/ShareButtonsEdu.vue +215 -0
  316. package/src/components/SkipLink/SkipLink.stories.js +9 -0
  317. package/src/components/SkipLink/SkipLink.vue +53 -0
  318. package/src/components/SwimlaneCTA/SwimlaneCTA.stories.mdx +77 -0
  319. package/src/components/SwimlaneCTA/SwimlaneCTA.vue +281 -0
  320. package/src/components/TheFooter/TheFooter.stories.js +602 -0
  321. package/src/components/TheFooter/TheFooter.vue +228 -0
  322. package/src/components/TheFooter/TheFooterSignUp.vue +61 -0
  323. package/src/components/ThumbnailCarousel/ThumbnailCarousel.stories.js +106 -0
  324. package/src/components/ThumbnailCarousel/ThumbnailCarousel.vue +76 -0
  325. package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.stories.js +93 -0
  326. package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.vue +68 -0
  327. package/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.stories.js +38 -0
  328. package/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.vue +104 -0
  329. package/src/components/TopicDetailMissionSpotlight/TopicDetailMissionSpotlight.stories.js +84 -0
  330. package/src/components/TopicDetailMissionSpotlight/TopicDetailMissionSpotlight.vue +112 -0
  331. package/src/components/TopicDetailMore/TopicDetailMore.stories.js +221 -0
  332. package/src/components/TopicDetailMore/TopicDetailMore.vue +124 -0
  333. package/src/components/TopicDetailMore/TopicDetailMoreVisibility.vue +51 -0
  334. package/src/components/TopicDetailMoreItem/TopicDetailMoreItem.stories.js +116 -0
  335. package/src/components/TopicDetailMoreItem/TopicDetailMoreItem.vue +130 -0
  336. package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.stories.js +34 -0
  337. package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.vue +98 -0
  338. package/src/components/YearTicker/YearTicker.stories.js +37 -0
  339. package/src/components/YearTicker/YearTicker.vue +132 -0
  340. package/src/docs/foundation/DynamicTokens.vue +106 -0
  341. package/src/docs/foundation/FontVariants.vue +80 -0
  342. package/src/docs/foundation/color.docs.mdx +112 -0
  343. package/src/docs/foundation/grid.docs.mdx +189 -0
  344. package/src/docs/foundation/grid.stories.js +263 -0
  345. package/src/docs/foundation/grid_layouthelpers.docs.mdx +78 -0
  346. package/src/docs/foundation/grid_layouthelpers.stories.js +53 -0
  347. package/src/docs/foundation/themes.docs.mdx +71 -0
  348. package/src/docs/foundation/themes.stories.js +63 -0
  349. package/src/docs/foundation/typography.docs.mdx +50 -0
  350. package/src/docs/foundation/typography.stories.js +119 -0
  351. package/src/interfaces.ts +129 -0
  352. package/src/main.ts +34 -0
  353. package/src/store/header.ts +40 -0
  354. package/src/store/theme.ts +27 -0
  355. package/src/templates/PageContent/PageContent.stories.js +92 -0
  356. package/src/templates/PageContent/PageContent.vue +140 -0
  357. package/src/templates/PageEventDetail/PageEventDetail.stories.js +104 -0
  358. package/src/templates/PageEventDetail/PageEventDetail.vue +358 -0
  359. package/src/templates/PageNewsDetail/PageNewsDetail.stories.js +158 -0
  360. package/src/templates/PageNewsDetail/PageNewsDetail.vue +242 -0
  361. package/src/templates/edu/PageEduNewsDetail.stories.js +64 -0
  362. package/src/templates/edu/PageEduNewsDetail.vue +155 -0
  363. package/src/templates/www/HomePage/HomePage.vue +30 -0
  364. package/src/utils/dayjs.js +32 -0
  365. package/src/utils/filters.js +33 -0
  366. package/src/utils/mixins.ts +353 -0
  367. package/src/vite-env.d.ts +1 -0
  368. package/tailwind.config.js +24 -0
  369. package/tsconfig.json +29 -0
  370. package/tsconfig.node.json +11 -0
  371. package/vite.config.ts +55 -0
@@ -0,0 +1,359 @@
1
+ <template>
2
+ <div class="BaseAudio">
3
+ <div class="BaseAudio__stage sm:pr-5">
4
+ <div class="BaseAudio__player w-full select-none">
5
+ <div class="flex flex-row w-full">
6
+ <div class="z-30 text-sm md:text-base">
7
+ <template v-if="paused">
8
+ <button
9
+ class="cursor-pointer"
10
+ title="Play"
11
+ aria-label="Play"
12
+ @click="play()"
13
+ >
14
+ <IconPlay class="bg-jpl-red text-white" />
15
+ </button>
16
+ </template>
17
+ <template v-else>
18
+ <button
19
+ class="cursor-pointer"
20
+ title="Pause"
21
+ aria-label="Pause"
22
+ @click="pause()"
23
+ >
24
+ <IconPause class="bg-jpl-red text-white" />
25
+ </button>
26
+ </template>
27
+ </div>
28
+ <div class="flex flex-col w-full z-20">
29
+ <div
30
+ class="BaseAudio__playback-time-wrapper cursor-pointer relative inline-block w-full border-t border-jpl-red bg-gray-mid-dark bg-opacity-25 h-2"
31
+ title="Playback Position"
32
+ @click="setPosition"
33
+ >
34
+ <div
35
+ v-if="playing"
36
+ :style="progressStyle"
37
+ class="BaseAudio__playback-time-indicator bg-jpl-red transition-all transform-gpu duration-50 absolute top-0 left-0 bottom-0 h-2"
38
+ ></div>
39
+ </div>
40
+ <div class="flex flex-row text-white">
41
+ <div class="flex flex-row justify-between w-full py-1.5 px-3">
42
+ <span
43
+ class="BaseAudio__playback-time-current text-sm md:text-base pr-1 md:pr-3 text-left"
44
+ >
45
+ {{ currentTime }}
46
+ </span>
47
+ <div
48
+ v-if="playing"
49
+ class="BaseAudio__rewind-forward animate-fadeIn"
50
+ >
51
+ <button
52
+ class="cursor-pointer"
53
+ title="Rewind"
54
+ aria-label="Rewind 10 seconds"
55
+ @click="rewind(10)"
56
+ >
57
+ <IconRewindTen />
58
+ </button>
59
+ <button
60
+ class="cursor-pointer"
61
+ title="Fast Forward"
62
+ aria-label="Fast-forward 10 seconds"
63
+ @click="forward(10)"
64
+ >
65
+ <IconForwardTen />
66
+ </button>
67
+ </div>
68
+ <span class="BaseAudio__playback-time-total">
69
+ {{ duration }}
70
+ </span>
71
+ </div>
72
+ <div
73
+ class="BaseAudio__extern-wrapper flex flex-row"
74
+ :class="
75
+ !playing
76
+ ? '-mt-1.5 sm:mt-0.5 md:mt-1 lg:mt-1.5'
77
+ : '-mt-1.5 sm:-mt-0.5 md:mt-0 lg:-mt-0.5'
78
+ "
79
+ >
80
+ <template v-if="isMuted">
81
+ <button
82
+ class="cursor-pointer"
83
+ title="Unmute"
84
+ aria-label="Unmute"
85
+ @click="toggleMute()"
86
+ >
87
+ <IconMute />
88
+ </button>
89
+ </template>
90
+ <template v-else>
91
+ <button
92
+ class="cursor-pointer"
93
+ title="Mute"
94
+ aria-label="Mute"
95
+ @click="toggleMute()"
96
+ >
97
+ <IconVolume />
98
+ </button>
99
+ </template>
100
+ </div>
101
+ </div>
102
+ </div>
103
+ </div>
104
+ </div>
105
+ <audio
106
+ :id="playerId"
107
+ ref="player"
108
+ :src="file"
109
+ preload="auto"
110
+ class="hidden min-w-full left-0 right-0"
111
+ ></audio>
112
+ </div>
113
+ <a
114
+ class="volume-toggle absolute right-5 -bottom-4"
115
+ title="Volume"
116
+ @mouseover="toggleVolume()"
117
+ />
118
+ </div>
119
+ </template>
120
+ <script lang="ts">
121
+ // @ts-nocheck
122
+ import { defineComponent } from 'vue'
123
+ import IconPlay from './../Icons/IconPlay.vue'
124
+ import IconPause from './../Icons/IconPause.vue'
125
+ import IconVolume from './../Icons/IconVolume.vue'
126
+ import IconMute from './../Icons/IconMute.vue'
127
+ import IconRewindTen from './../Icons/IconRewindTen.vue'
128
+ import IconForwardTen from './../Icons/IconForwardTen.vue'
129
+ export const baseVolumeValue = 10
130
+
131
+ export const generateUUID = () => {
132
+ return 'xxxxxxxx-xxxx-4xxx'.replace(/[xy]/g, function (c) {
133
+ const r = (Math.random() * 16) | 0
134
+ const v = c === 'x' ? r : (r & 0x3) | 0x8
135
+ return v.toString(16)
136
+ })
137
+ }
138
+
139
+ export const convertTimeHHMMSS = (val) => {
140
+ const hhmmss = new Date(val * 1000).toISOString().substr(11, 8)
141
+ return hhmmss.indexOf('00:') === 0 ? hhmmss.substr(3) : hhmmss
142
+ }
143
+
144
+ export default defineComponent({
145
+ name: 'BaseAudio',
146
+ components: {
147
+ IconPlay,
148
+ IconPause,
149
+ IconVolume,
150
+ IconMute,
151
+ IconRewindTen,
152
+ IconForwardTen
153
+ },
154
+ props: {
155
+ file: {
156
+ type: String,
157
+ default: null
158
+ },
159
+ autoPlay: {
160
+ type: Boolean,
161
+ default: false
162
+ }
163
+ },
164
+ data() {
165
+ return {
166
+ firstPlay: true,
167
+ isMuted: false,
168
+ loaded: false,
169
+ playing: false,
170
+ paused: true,
171
+ progressStyle: '',
172
+ currentTime: '00:00',
173
+ uuid: '0',
174
+ audio: undefined,
175
+ totalDuration: 0,
176
+ hideVolumeSlider: false,
177
+ volumeValue: baseVolumeValue
178
+ }
179
+ },
180
+ computed: {
181
+ duration() {
182
+ return this.audio ? convertTimeHHMMSS(this.totalDuration) : ''
183
+ },
184
+ playerId() {
185
+ return 'player-' + this.uuid
186
+ }
187
+ },
188
+ mounted() {
189
+ this.uuid = generateUUID()
190
+ this.audio = this.getAudio()
191
+ this.init()
192
+ },
193
+ beforeUnmount() {
194
+ this.audio.removeEventListener('timeupdate', this._handlePlayingUI)
195
+ this.audio.removeEventListener('loadeddata', this._handleLoaded)
196
+ this.audio.removeEventListener('pause', this._handlePlayPause)
197
+ this.audio.removeEventListener('play', this._handlePlayPause)
198
+ },
199
+ methods: {
200
+ setPosition: function name(e) {
201
+ const tag = e.target
202
+ if (this.paused) return
203
+
204
+ if (e.target.tagName === 'SPAN') {
205
+ return
206
+ }
207
+ const pos = tag.getBoundingClientRect()
208
+ const seekPos = (e.clientX - pos.left) / pos.width
209
+ this.audio.currentTime = parseInt(this.audio.duration * seekPos)
210
+ },
211
+ updateVolume() {
212
+ this.hideVolumeSlider = false
213
+ this.audio.volume = this.volumeValue / 100
214
+ if (this.volumeValue / 100 > 0) {
215
+ this.isMuted = this.audio.muted = false
216
+ }
217
+
218
+ if (this.volumeValue / 100 === 0) {
219
+ this.isMuted = this.audio.muted = true
220
+ }
221
+ },
222
+ toggleVolume() {
223
+ this.hideVolumeSlider = true
224
+ },
225
+ stop() {
226
+ this.playing = false
227
+ this.paused = true
228
+ this.audio.pause()
229
+ this.audio.currentTime = 0
230
+ },
231
+ play() {
232
+ if (this.playing && !this.paused) return
233
+ this.paused = false
234
+ this.audio.play()
235
+ this.playing = true
236
+ this.$root.$emit('play', this.uuid)
237
+ },
238
+ forward(duration) {
239
+ return (this.audio.currentTime += duration)
240
+ },
241
+ rewind(duration) {
242
+ return (this.audio.currentTime -= duration)
243
+ },
244
+ pause() {
245
+ this.paused = !this.paused
246
+ this.paused ? this.audio.pause() : this.audio.play()
247
+ },
248
+ pauseOthers(activeUuid) {
249
+ if (this.uuid !== activeUuid) {
250
+ this.paused = true
251
+ this.audio.pause()
252
+ }
253
+ },
254
+ toggleMute() {
255
+ this.isMuted = !this.isMuted
256
+ this.audio.muted = this.isMuted
257
+ this.volumeValue = this.isMuted ? 0 : 100
258
+ },
259
+ _handleLoaded() {
260
+ if (this.audio.readyState >= 2) {
261
+ if (this.autoPlay) this.play()
262
+
263
+ this.loaded = true
264
+ this.totalDuration = parseInt(this.audio.duration)
265
+ } else {
266
+ throw new Error('Failed to load audio file')
267
+ }
268
+ },
269
+ _handlePlayingUI(_e) {
270
+ const currTime = this.audio.currentTime
271
+ const percentage = (currTime / this.totalDuration) * 100
272
+ this.progressStyle = `width: ${percentage}%;`
273
+ this.currentTime = convertTimeHHMMSS(currTime)
274
+ },
275
+ _handlePlayPause(e) {
276
+ if (e.type === 'play' && this.firstPlay) {
277
+ // in some situations, audio.currentTime is the end one on chrome
278
+ this.audio.currentTime = 0
279
+ if (this.firstPlay) {
280
+ this.firstPlay = false
281
+ }
282
+ }
283
+ if (e.type === 'pause' && this.playing === false) {
284
+ this.progressStyle = 'width:0%'
285
+ this.currentTime = '00:00'
286
+ this.paused = true
287
+ }
288
+ },
289
+ _handleEnded() {
290
+ this.paused = this.playing = false
291
+ },
292
+ init() {
293
+ this.audio.addEventListener('timeupdate', this._handlePlayingUI)
294
+ this.audio.addEventListener('loadeddata', this._handleLoaded)
295
+ this.audio.addEventListener('pause', this._handlePlayPause)
296
+ this.audio.addEventListener('play', this._handlePlayPause)
297
+ this.audio.addEventListener('ended', this._handleEnded)
298
+ // TODO: VUE3: find solution for emitting event from slot
299
+ // TODO: find a cleaner way to do this w/o using mounted or root level events
300
+ // scoped slots? https://github.com/vuejs/vue/issues/4332
301
+ this.$root?.$on('play', this.pauseOthers)
302
+ },
303
+ getAudio() {
304
+ return this.$el.querySelectorAll('audio')[0]
305
+ }
306
+ }
307
+ })
308
+ </script>
309
+
310
+ <style lang="scss">
311
+ .BaseAudio {
312
+ @apply relative w-full;
313
+
314
+ .BaseAudio__stage {
315
+ @apply flex flex-row w-full;
316
+ }
317
+
318
+ .BaseAudio__playback-time-total {
319
+ @apply text-sm md:text-base pl-1 md:pl-3 text-right;
320
+ }
321
+
322
+ .BaseAudio__playback-time-current,
323
+ .BaseAudio__playback-time-total {
324
+ @screen sm {
325
+ min-width: 7ch;
326
+ }
327
+ }
328
+
329
+ .BaseAudio__rewind-forward {
330
+ @apply hidden sm:flex flex-row w-25 lg:w-35 mx-auto justify-between;
331
+
332
+ > button {
333
+ @apply opacity-100 hover:opacity-80;
334
+
335
+ svg {
336
+ @apply w-6 text-white;
337
+ }
338
+ }
339
+ }
340
+
341
+ .BaseAudio__playback-time-indicator {
342
+ &::after {
343
+ @apply h-4 bg-white block absolute w-1 -top-1 -right-1;
344
+
345
+ content: '';
346
+ }
347
+ }
348
+
349
+ .BaseAudio__extern-wrapper {
350
+ > button {
351
+ @apply mr-1 sm:-mt-2 lg:-mt-2.5 ml-2.5 opacity-100 hover:opacity-80;
352
+
353
+ svg {
354
+ @apply w-6;
355
+ }
356
+ }
357
+ }
358
+ }
359
+ </style>
@@ -0,0 +1,65 @@
1
+ import BaseButton, { variants } from './BaseButton.vue'
2
+
3
+ // TODO: add the rest of the button stories (icons, disabled, etc.)
4
+ export default {
5
+ title: 'Components/Base/BaseButton',
6
+ component: BaseButton,
7
+ excludeStories: /.*(Data)$/,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ slots: {
11
+ default: 'Default slot content'
12
+ },
13
+ docs: {
14
+ description: {
15
+ component: 'Simple button with several style variations.'
16
+ }
17
+ }
18
+ },
19
+ argTypes: {
20
+ ariaLabel: {
21
+ type: 'string',
22
+ description:
23
+ "ARIA label. Recommended if your button label isn't descriptive, or if it only contains an icon."
24
+ },
25
+ variant: {
26
+ type: 'string',
27
+ description: 'Button variant type',
28
+ control: {
29
+ type: 'select'
30
+ },
31
+ options: Object.keys(variants),
32
+ table: {
33
+ defaultValue: { summary: 'default' }
34
+ }
35
+ }
36
+ }
37
+ }
38
+
39
+ export const BaseButtonData = {
40
+ label: 'Explore',
41
+ ariaLabel: 'Explore',
42
+ compact: false,
43
+ disabled: false,
44
+ to: '/',
45
+ default: 'Button'
46
+ }
47
+
48
+ export const PrimaryButton = {
49
+ args: {
50
+ ...BaseButtonData,
51
+ variant: 'primary'
52
+ }
53
+ }
54
+ export const SecondaryButton = {
55
+ args: {
56
+ ...BaseButtonData,
57
+ variant: 'secondary'
58
+ }
59
+ }
60
+ export const DarkButton = {
61
+ args: {
62
+ ...BaseButtonData,
63
+ variant: 'dark'
64
+ }
65
+ }
@@ -0,0 +1,114 @@
1
+ <script lang="ts">
2
+ import { defineComponent } from 'vue'
3
+
4
+ interface Variants {
5
+ [name: string]: string
6
+ }
7
+
8
+ export const variants: Variants = {
9
+ primary: '-primary',
10
+ secondary: '-secondary',
11
+ dark: '-dark',
12
+ social: '-social'
13
+ }
14
+
15
+ export default defineComponent({
16
+ name: 'BaseButton',
17
+ props: {
18
+ variant: {
19
+ type: String,
20
+ required: false,
21
+ default: 'primary',
22
+ validator: (prop: string): boolean => Object.keys(variants).includes(prop)
23
+ },
24
+ compact: {
25
+ type: Boolean,
26
+ default: false,
27
+ required: false
28
+ },
29
+ blockClasses: {
30
+ type: String,
31
+ required: false,
32
+ default: 'inline-block'
33
+ },
34
+ disabled: {
35
+ type: Boolean,
36
+ default: false,
37
+ required: false
38
+ },
39
+ ariaLabel: {
40
+ type: String,
41
+ default: '',
42
+ required: false
43
+ },
44
+ to: {
45
+ type: [String, Object],
46
+ required: false,
47
+ default: undefined
48
+ },
49
+ href: {
50
+ type: String,
51
+ required: false,
52
+ default: undefined
53
+ }
54
+ },
55
+ emits: ['click'],
56
+ computed: {
57
+ tag(): string {
58
+ if (this.disabled) {
59
+ return 'button'
60
+ } else if (this.to) {
61
+ return 'nuxt-link'
62
+ } else if (this.href) {
63
+ return 'a'
64
+ } else {
65
+ return 'button'
66
+ }
67
+ },
68
+ // necessary for valid html
69
+ // must account for <a>, <nuxt-link>, and <button> use-cases
70
+ theHref(): string | undefined {
71
+ if (this.tag === 'nuxt-link') {
72
+ return this.to as string
73
+ } else if (this.tag === 'a') {
74
+ return this.href
75
+ }
76
+ return undefined
77
+ },
78
+ variantClass(): string {
79
+ let classes = variants[this.variant]
80
+ if (!this.$slots.default && this.$slots.icon) {
81
+ classes = classes + ' -icon-only'
82
+ } else if (this.compact) {
83
+ classes = classes + ' -compact'
84
+ }
85
+ if (this.blockClasses) {
86
+ classes = classes + ' ' + this.blockClasses
87
+ }
88
+ return classes
89
+ }
90
+ }
91
+ })
92
+ </script>
93
+
94
+ <template>
95
+ <component
96
+ :is="tag"
97
+ class="BaseButton text-contrast-none"
98
+ :class="variantClass"
99
+ :aria-label="ariaLabel"
100
+ :disabled="disabled"
101
+ :href="theHref"
102
+ :to="to ? to : undefined"
103
+ @click="$emit('click')"
104
+ >
105
+ <span class="label block">
106
+ <slot name="default"></slot>
107
+ <slot name="icon"></slot>
108
+ <slot name="afterIcon"></slot>
109
+ </span>
110
+ </component>
111
+ </template>
112
+ <style lang="scss">
113
+ @import '@explorer-1/common/src/scss/components/BaseButton';
114
+ </style>
@@ -0,0 +1,68 @@
1
+ import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs'
2
+ import BaseCheckboxGroup from './BaseCheckboxGroup.vue'
3
+
4
+ <Meta
5
+ title="Components/Base/BaseCheckboxGroup"
6
+ component={BaseCheckboxGroup}
7
+ parameters={{ viewMode: 'docs' }}
8
+ />
9
+
10
+ export const BaseCheckboxGroupData = {
11
+ options: [
12
+ {
13
+ id: 'educators',
14
+ title: 'Educators',
15
+ text: null
16
+ },
17
+ {
18
+ id: 'educator-workshop',
19
+ title: 'Educators Workshops',
20
+ text: 'Southern California'
21
+ },
22
+ {
23
+ id: 'students',
24
+ title: 'Students K-12',
25
+ text: null
26
+ },
27
+ {
28
+ id: 'internships',
29
+ title: 'Internships',
30
+ text: null
31
+ }
32
+ ],
33
+ group: 'edumail',
34
+ heading: 'JPL Education Groups',
35
+ subHeading:
36
+ 'The JPL Education Office also offers email updates about classroom activities and workshops for educators, projects and competitons for K-12 students and internship opportunities at JPL and NASA.',
37
+ title: 'Education Email Groups'
38
+ }
39
+
40
+ export const BaseCheckboxGroupTemplate = (args) => ({
41
+ props: Object.keys(args),
42
+ components: { BaseCheckboxGroup },
43
+ template: `<BaseCheckboxGroup :options="options" :group="group" :heading="heading" :sub-heading="subHeading" :title="title"
44
+ ></BaseCheckboxGroup>`
45
+ })
46
+
47
+ # Base Checkbox Group
48
+
49
+ ## Usage
50
+
51
+ The BaseCheckboxGroup component is expected to contain an array of options and a grouping name with the goal of selecting multiple options.
52
+
53
+ <Canvas>
54
+ <Story
55
+ name="Default"
56
+ args={BaseCheckboxGroupData}
57
+ >
58
+ {BaseCheckboxGroupTemplate.bind({})}
59
+ </Story>
60
+ </Canvas>
61
+
62
+ ## Props
63
+
64
+ <ArgsTable for={BaseCheckboxGroup} />
65
+
66
+ ## Example data
67
+
68
+ <code language="json">{JSON.stringify(BaseCheckboxGroupData, null, 2)}</code>
@@ -0,0 +1,101 @@
1
+ <template>
2
+ <div class="BaseCheckboxGroup">
3
+ <label
4
+ v-if="heading"
5
+ class="text-lg font-semibold text-gray-900"
6
+ >{{ heading }}</label
7
+ >
8
+ <p
9
+ v-if="subHeading"
10
+ class="text-lg pt-4 pb-2 pr-4"
11
+ >
12
+ {{ subHeading }}
13
+ </p>
14
+ <fieldset class="mt-4">
15
+ <legend
16
+ v-if="title"
17
+ class="sr-only"
18
+ >
19
+ {{ title }}
20
+ </legend>
21
+ <div
22
+ v-if="options"
23
+ class="space-y-4 mb-2 pb-5"
24
+ >
25
+ <div
26
+ v-for="option in options"
27
+ :key="option.id"
28
+ class="relative flex items-start"
29
+ >
30
+ <div class="flex items-center h-5">
31
+ <input
32
+ :id="`${group}_${option.id}`"
33
+ :aria-describedby="option.text ? `${group}_${option.id}_description` : undefined"
34
+ :name="option.name"
35
+ :alt="option.alt"
36
+ :value="option.value"
37
+ type="checkbox"
38
+ class="h-5 w-5 mt-0.5"
39
+ />
40
+ </div>
41
+ <div class="mb-1">
42
+ <label
43
+ :for="`${group}_${option.id}`"
44
+ class="ml-3 block text-md text-gray-700"
45
+ >
46
+ <span
47
+ v-if="option.title"
48
+ class="font-semibold"
49
+ >{{ option.title }}</span
50
+ >
51
+ <span v-if="option.text"> - </span>
52
+ <span
53
+ v-if="option.text"
54
+ :id="`${group}_${option.id}_description`"
55
+ class="font-light"
56
+ >{{ option.text }}</span
57
+ >
58
+ </label>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </fieldset>
63
+ </div>
64
+ </template>
65
+
66
+ <script lang="ts">
67
+ import { defineComponent } from 'vue'
68
+ import type { PropType } from 'vue'
69
+ import type { FormOption } from '../../interfaces'
70
+
71
+ export default defineComponent({
72
+ name: 'BaseCheckboxGroup',
73
+ props: {
74
+ group: {
75
+ type: String,
76
+ default: null,
77
+ required: false
78
+ },
79
+ heading: {
80
+ type: String,
81
+ default: null,
82
+ required: false
83
+ },
84
+ subHeading: {
85
+ type: String,
86
+ default: null,
87
+ required: false
88
+ },
89
+ title: {
90
+ type: String,
91
+ default: null,
92
+ required: false
93
+ },
94
+ options: {
95
+ type: Array as PropType<FormOption[]>,
96
+ default: null,
97
+ required: false
98
+ }
99
+ }
100
+ })
101
+ </script>