@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
@@ -1,36 +1,53 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue'
3
- import type { Attributes } from './../../interfaces'
3
+ import type { ContentTypeKey } from './../../interfaces.ts'
4
4
  import { eduMetadataDictionary } from './../../constants'
5
5
 
6
6
  // using borders to vertically center wonky font face
7
- const variantMap: Attributes = {
7
+ const variantMap = {
8
8
  primary: 'bg-primary border-primary',
9
9
  'primary-inverted': 'bg-gray-light-mid !text-primary-darker border-gray-light-mid',
10
10
  secondary: 'bg-secondary border-secondary',
11
11
  action: 'bg-action border-action'
12
- }
12
+ } as const
13
+ type VariantMapKey = keyof typeof variantMap
13
14
 
14
- const sizeMap: Attributes = {
15
+ const sizeMap = {
15
16
  sm: 'text-xs border-t-2 py-1 px-2.5',
16
17
  md: 'text-xs lg:text-base border-t py-1.5 px-3.5',
17
18
  lg: 'text-base lg:text-lg border-t pt-1.5 pb-1 px-5'
18
- }
19
+ } as const
20
+ type SizeMapKey = keyof typeof sizeMap
19
21
 
20
- interface BasePillProps {
21
- text?: string
22
- variant?: string
23
- size?: string
24
- contentType?: string
25
- invert?: boolean
26
- }
27
-
28
- // define props
29
- const props = withDefaults(defineProps<BasePillProps>(), {
30
- variant: 'primary',
31
- size: 'md',
32
- contentType: undefined,
33
- invert: false
22
+ const props = defineProps({
23
+ /**
24
+ * The text contained in the pill. Plain text only.
25
+ */
26
+ text: {
27
+ type: String,
28
+ default: undefined
29
+ },
30
+ /**
31
+ * The variant (color) of the pill
32
+ */
33
+ variant: {
34
+ type: String as () => VariantMapKey,
35
+ default: 'primary'
36
+ },
37
+ /**
38
+ * The size of the pill
39
+ */
40
+ size: {
41
+ type: String as () => SizeMapKey,
42
+ default: 'md'
43
+ },
44
+ /**
45
+ * Maps to EDU Resource types. Must use `ThemeEdu` to affect color.
46
+ */
47
+ contentType: {
48
+ type: String as () => ContentTypeKey,
49
+ default: undefined
50
+ }
34
51
  })
35
52
 
36
53
  const metadataType = computed(() => {
@@ -4,18 +4,16 @@ export default {
4
4
  title: 'Components/Base/BasePlaceholder',
5
5
  component: BasePlaceholder,
6
6
  excludeStories: /.*Data$/,
7
+ tags: ['autodocs', 'listings'],
7
8
  parameters: {
8
9
  docs: {
9
10
  description: {
10
- component: `An animated loading component frequently used as a placeholder for <a href="/story/components-search-searchresultcard--standard-result" target="_blank">SearchResultCard</a>`
11
+ component:
12
+ 'An animated loading component frequently used as a placeholder for <a href="/story/components-search-searchresultcard--standard-result" target="_blank">SearchResultCard</a>'
11
13
  }
12
14
  }
13
15
  }
14
16
  }
15
-
16
- // shared data
17
- const BasePlaceholderData = {}
18
-
19
17
  // templates
20
18
  const BasePlaceholderTemplate = (args) => ({
21
19
  props: Object.keys(args),
@@ -24,5 +22,4 @@ const BasePlaceholderTemplate = (args) => ({
24
22
  })
25
23
 
26
24
  export const BaseStory = BasePlaceholderTemplate.bind({})
27
- BaseStory.storyName = 'BasePlaceholder' // single story hoisting
28
- BaseStory.args = { ...BasePlaceholderData }
25
+ BaseStory.storyName = 'BasePlaceholder'
@@ -19,7 +19,7 @@
19
19
 
20
20
  <script lang="ts">
21
21
  import { defineComponent } from 'vue'
22
-
22
+ /** An animated loading component frequently used as a placeholder for <a href="/story/components-search-searchresultcard--standard-result" target="_blank">SearchResultCard</a> */
23
23
  export default defineComponent({
24
24
  name: 'BasePlaceholder'
25
25
  })
@@ -3,6 +3,7 @@ import BaseRadioGroup from './BaseRadioGroup.vue'
3
3
  export default {
4
4
  title: 'Components/Base/BaseRadioGroup',
5
5
  component: BaseRadioGroup,
6
+ tags: ['autodocs', 'forms'],
6
7
  parameters: {
7
8
  docs: {
8
9
  description: {
@@ -61,37 +61,44 @@
61
61
  </template>
62
62
 
63
63
  <script lang="ts">
64
- import { defineComponent } from 'vue'
65
- import type { PropType } from 'vue'
64
+ /** The BaseRadioGroup component is expected to contain an array of options and a grouping name with the goal of selecting a single option. */
65
+
66
+ import { defineComponent, type PropType } from 'vue'
66
67
  import type { FormOption } from '../../interfaces'
67
68
  export default defineComponent({
68
69
  name: 'BaseRadioGroup',
69
70
  props: {
71
+ /** iContact group id */
70
72
  group: {
71
73
  type: String,
72
74
  default: null,
73
75
  required: false
74
76
  },
77
+ /** The value that should be preselected */
75
78
  preselected: {
76
79
  type: String,
77
80
  default: null,
78
81
  required: false
79
82
  },
83
+ /** Heading */
80
84
  heading: {
81
85
  type: String,
82
86
  default: null,
83
87
  required: false
84
88
  },
89
+ /** Descriptive text or summary */
85
90
  subHeading: {
86
91
  type: String,
87
92
  default: null,
88
93
  required: false
89
94
  },
95
+ /** Fieldset title, for screen readers */
90
96
  title: {
91
97
  type: String,
92
98
  default: null,
93
99
  required: false
94
100
  },
101
+ /** Array of `{FormOption}s` */
95
102
  options: {
96
103
  type: Array as PropType<FormOption[]>,
97
104
  default: null,
@@ -7,7 +7,8 @@ export default {
7
7
  parameters: {
8
8
  docs: {
9
9
  description: {
10
- component: `The BaseSwimlane component is expected to contain an array of words to create a 'swimlane' effect as the text swims through.`
10
+ component:
11
+ "The BaseSwimlane component is expected to contain an array of words to create a 'swimlane' effect as the text swims through."
11
12
  }
12
13
  }
13
14
  }
@@ -17,6 +17,8 @@
17
17
  </template>
18
18
 
19
19
  <script lang="ts">
20
+ /** The BaseSwimlane component is expected to contain an array of words to create a 'swimlane' effect as the text swims through. */
21
+
20
22
  // @ts-nocheck
21
23
  import { defineComponent } from 'vue'
22
24
 
@@ -5,9 +5,14 @@ export default {
5
5
  component: BaseTimer,
6
6
  decorators: [
7
7
  () => ({
8
- template: `<div id="storyDecorator" class="w-full"><story/></div>`
8
+ template: `<div id="storyRoot" class="w-full"><story/></div>`
9
9
  })
10
- ]
10
+ ],
11
+ parameters: {
12
+ html: {
13
+ root: '#storyRoot'
14
+ }
15
+ }
11
16
  }
12
17
 
13
18
  export const BaseStory = {
@@ -85,22 +85,24 @@ type Interval = ReturnType<typeof setInterval>
85
85
  export default defineComponent({
86
86
  name: 'BaseTimer',
87
87
  props: {
88
+ /** Start time or goal time (depends if it's a countdown or not). Format: `YYYY-MM-DD HH:MM:SS+01:00` */
88
89
  targetDateTime: {
89
90
  type: String,
90
91
  required: true
91
92
  },
92
- // if blank, the first three significant units will show
93
+ /** If blank, the first three applicable time units will show */
93
94
  selectedUnits: {
94
95
  type: Array as PropType<UnitID[]>,
95
96
  required: false,
96
97
  validator: (val: UnitID[]): boolean => val.every((v) => Boolean(timerUnits[v]))
97
98
  },
99
+ /** If time and units should all appear on one line */
98
100
  inline: {
99
101
  type: Boolean,
100
102
  required: false,
101
103
  default: false
102
104
  },
103
- // if a countdown clock, then this will force it to stop at 0
105
+ /** If this is a countdown clock, the timer will start `now()` and count down to 0 when it reaches the `targetDateTime`) */
104
106
  countdown: {
105
107
  type: Boolean,
106
108
  required: false,
@@ -2,22 +2,7 @@ import BaseUnitToggle, { unitPairs } from './BaseUnitToggle.vue'
2
2
 
3
3
  export default {
4
4
  title: 'Components/Base/BaseUnitToggle',
5
- component: BaseUnitToggle,
6
- argTypes: {
7
- unitPair: {
8
- control: { type: 'select', options: Object.keys(unitPairs) }
9
- },
10
- valueSystem: {
11
- description: 'The system of measurement that corresponds with the provided `value`',
12
- control: { type: 'select', options: ['imperial', 'metric'] }
13
- },
14
- value: {
15
- description: 'The initial value to be converted'
16
- },
17
- secondValue: {
18
- description: 'Manually override the converted value'
19
- }
20
- }
5
+ component: BaseUnitToggle
21
6
  }
22
7
 
23
8
  const BaseUnitToggleTemplate = (args) => ({
@@ -157,18 +157,22 @@ export default defineComponent({
157
157
  required: true,
158
158
  validator: (val: UnitName): boolean => Boolean(unitPairs[val])
159
159
  },
160
+ /** The initial value to be converted */
160
161
  value: {
161
162
  type: Number as PropType<number>,
162
163
  required: true
163
164
  },
165
+ /** Manually override the converted value */
164
166
  secondValue: {
165
167
  type: Number as PropType<number>,
166
168
  required: false
167
169
  },
170
+ /** The system of measurement that corresponds with the provided `value` */
168
171
  valueSystem: {
169
172
  type: String as PropType<UnitSystemName>,
170
173
  required: true
171
174
  },
175
+ /** If value and unit should appear on the same line */
172
176
  inline: {
173
177
  type: Boolean,
174
178
  default: false
@@ -41,7 +41,8 @@
41
41
  </div>
42
42
  </template>
43
43
  <script lang="ts">
44
- import { defineComponent } from 'vue'
44
+ import { defineComponent, type PropType } from 'vue'
45
+ import type { VideoObject } from './../../interfaces'
45
46
  import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
46
47
 
47
48
  export default defineComponent({
@@ -50,10 +51,13 @@ export default defineComponent({
50
51
  BaseImagePlaceholder
51
52
  },
52
53
  props: {
54
+ /** Video data object */
53
55
  data: {
54
- type: Object,
55
- required: false
56
+ type: Object as PropType<VideoObject>,
57
+ required: false,
58
+ default: undefined
56
59
  },
60
+ /** If video should autoplay */
57
61
  autoplay: {
58
62
  type: Boolean,
59
63
  default: false
@@ -4,7 +4,7 @@ import { BlockImageData } from './../BlockImage/BlockImage.stories'
4
4
  export default {
5
5
  title: 'Components/Blocks/BlockAccordion',
6
6
  component: BlockAccordion,
7
- tags: ['!autodocs'],
7
+ tags: ['wagtail-blocks'],
8
8
  excludeStories: /.*Data$/
9
9
  }
10
10
 
@@ -70,5 +70,7 @@ export const BlockAccordionData = {
70
70
  // stories
71
71
  export const BaseStory = {
72
72
  name: 'BlockAccordion',
73
- args: { data: BlockAccordionData }
73
+ args: {
74
+ data: BlockAccordionData
75
+ }
74
76
  }
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, reactive } from 'vue'
3
- import type { AccordionItemObject, ImageBlock, ImageObject } from '../../interfaces'
3
+ import type { AccordionItemObject, ImageBlock, ImageObject, HeadingLevels } from '../../interfaces'
4
4
  import BaseAccordionItem from './../BaseAccordionItem/BaseAccordionItem.vue'
5
5
  import BlockImageStandard from './../BlockImage/BlockImageStandard.vue'
6
6
  import BlockText from './../BlockText/BlockText.vue'
@@ -37,8 +37,8 @@ const props = withDefaults(defineProps<BlockAccordionProps>(), {
37
37
 
38
38
  const { data } = reactive(props)
39
39
 
40
- const headingLevel = computed(() => {
41
- return data ? `h${data?.accordionItemsHeadingLevel}` : undefined
40
+ const headingLevel = computed((): HeadingLevels | undefined => {
41
+ return data ? (`h${data?.accordionItemsHeadingLevel}` as HeadingLevels) : undefined
42
42
  })
43
43
 
44
44
  const remappedAccordionItems = computed((): AccordionItemObject[] | undefined => {
@@ -3,6 +3,7 @@ import BlockAudio from './BlockAudio.vue'
3
3
  export default {
4
4
  title: 'Components/Blocks/BlockAudio',
5
5
  component: BlockAudio,
6
+ tags: ['wagtail-blocks'],
6
7
  excludeStories: /.*Data$/
7
8
  }
8
9
 
@@ -41,12 +41,19 @@
41
41
  </div>
42
42
  </template>
43
43
  <script lang="ts">
44
- import { defineComponent } from 'vue'
44
+ import { defineComponent, type PropType } from 'vue'
45
+ import type { BlockData, ImageObject } from './../../interfaces.ts'
45
46
  import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
46
47
  import BaseImage from './../BaseImage/BaseImage.vue'
47
48
  import BaseAudio from './../BaseAudio/BaseAudio.vue'
48
49
  import LayoutHelper from './../LayoutHelper/LayoutHelper.vue'
49
50
 
51
+ export interface BlockAudioData extends BlockData {
52
+ thumbnailImage: ImageObject
53
+ uploadedMedia: {
54
+ file: string
55
+ }
56
+ }
50
57
  export default defineComponent({
51
58
  name: 'BlockAudio',
52
59
  components: {
@@ -57,8 +64,9 @@ export default defineComponent({
57
64
  },
58
65
  props: {
59
66
  data: {
60
- type: Object,
61
- required: false
67
+ type: Object as PropType<BlockAudioData>,
68
+ required: false,
69
+ default: undefined
62
70
  }
63
71
  }
64
72
  })
@@ -3,7 +3,7 @@ import BlockCardGrid from './BlockCardGrid.vue'
3
3
  export default {
4
4
  title: 'Components/Blocks/BlockCardGrid',
5
5
  component: BlockCardGrid,
6
- tags: ['!autodocs'],
6
+ tags: ['!autodocs', 'wagtail-blocks', 'listings'],
7
7
  excludeStories: /.*Data$/
8
8
  }
9
9
 
@@ -41,7 +41,7 @@ import type { ImageObject, LinkObject } from '../../interfaces'
41
41
  import BlockCardGridItem from './../BlockCardGridItem/BlockCardGridItem.vue'
42
42
  import MixinCarousel from './../MixinCarousel/MixinCarousel.vue'
43
43
 
44
- interface CardGridItem {
44
+ export interface CardGridItem {
45
45
  title: string
46
46
  label: string
47
47
  description: string
@@ -3,15 +3,15 @@ import BlockCardGridItem from './BlockCardGridItem.vue'
3
3
  export default {
4
4
  title: 'Components/Cards/BlockCardGridItem',
5
5
  component: BlockCardGridItem,
6
- tags: ['!autodocs'],
6
+ tags: ['!autodocs', 'cards'],
7
7
  decorators: [
8
8
  () => ({
9
- template: `<div id="storyDecorator" class="lg:w-1/3"><story/></div>`
9
+ template: `<div id="storyRoot" class="lg:w-1/3"><story/></div>`
10
10
  })
11
11
  ],
12
12
  parameters: {
13
13
  html: {
14
- root: '#storyDecorator'
14
+ root: '#storyRoot'
15
15
  }
16
16
  },
17
17
  excludeStories: /.*Data$/
@@ -26,7 +26,7 @@
26
26
  </div>
27
27
  <div class="px-6 py-6 ThemeVariantLight">
28
28
  <template v-if="label">
29
- <div class="text-primary text-subtitle">
29
+ <div class="text-primary text-subtitle internal:text-black">
30
30
  {{ label }}
31
31
  </div>
32
32
  <hr
@@ -4,20 +4,14 @@ import BlockCircleImageCard from './BlockCircleImageCard.vue'
4
4
  export default {
5
5
  title: 'Components/Cards/BlockCircleImageCard',
6
6
  component: BlockCircleImageCard,
7
- tags: ['!autodocs'],
7
+ tags: ['!autodocs', 'cards'],
8
8
  decorators: [
9
9
  () => ({
10
- template: `<div class="relative max-w-xl mx-auto container"><story/></div>`
10
+ template: `<div id="storyRoot" class="relative max-w-xl mx-auto container"><story/></div>`
11
11
  })
12
12
  ],
13
- argTypes: {
14
- imageOnRight: {
15
- control: {
16
- type: 'boolean'
17
- }
18
- }
19
- },
20
13
  parameters: {
14
+ html: { root: '#storyRoot' },
21
15
  slots: {
22
16
  icon: {
23
17
  description: 'Icon slot',
@@ -3,6 +3,7 @@ import BlockCsrTable from './BlockCsrTable.vue'
3
3
  export default {
4
4
  title: 'Components/FeatureFlags/BlockCsrTable',
5
5
  component: BlockCsrTable,
6
+ tags: ['!autodocs', 'wagtail-blocks', 'feature-flag'],
6
7
  excludeStories: /.*Data$/
7
8
  }
8
9
 
@@ -34,7 +34,7 @@ export interface ExportPackageRate {
34
34
  Fluence: string
35
35
  Energy: string
36
36
  }
37
- interface BlockCsrTableRow {
37
+ export interface BlockCsrTableRow {
38
38
  Id: number
39
39
  TestRecordId: number
40
40
  Attachment: string
@@ -3,6 +3,7 @@ import BlockCta from './BlockCta.vue'
3
3
  export default {
4
4
  title: 'Components/Blocks/BlockCta',
5
5
  component: BlockCta,
6
+ tags: ['!autodocs', 'wagtail-blocks'],
6
7
  excludeStories: /.*Data$/
7
8
  }
8
9
 
@@ -26,12 +26,19 @@
26
26
  </div>
27
27
  </template>
28
28
  <script lang="ts">
29
- import { defineComponent } from 'vue'
29
+ import { defineComponent, type PropType } from 'vue'
30
30
  import { mapStores } from 'pinia'
31
+ import type { BlockData, PageObject } from './../../interfaces.ts'
31
32
  import { useThemeStore } from '../../store/theme'
32
33
  import BaseButton from './../BaseButton/BaseButton.vue'
33
34
  import IconExternal from './../Icons/IconExternal.vue'
34
35
 
36
+ export type BlockCtaData = BlockData & {
37
+ page: PageObject
38
+ text: string
39
+ externalLink: string
40
+ }
41
+
35
42
  export default defineComponent({
36
43
  name: 'BlockCta',
37
44
  components: {
@@ -40,7 +47,7 @@ export default defineComponent({
40
47
  },
41
48
  props: {
42
49
  data: {
43
- type: Object,
50
+ type: Object as PropType<BlockCtaData>,
44
51
  required: true,
45
52
  default: () => ({})
46
53
  }
@@ -1,8 +1,9 @@
1
1
  import BlockDialog from './BlockDialog.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/Blocks/BlockDialog',
4
+ title: 'Components/Utilities/BlockDialog',
5
5
  component: BlockDialog,
6
+ tags: ['!autodocs', 'deprecated'],
6
7
  argTypes: {
7
8
  overlayClose: { control: { type: 'boolean' } }
8
9
  }
@@ -3,10 +3,11 @@ import BlockGist from './BlockGist.vue'
3
3
  export default {
4
4
  title: 'Components/Blocks/BlockGist',
5
5
  component: BlockGist,
6
+ tags: ['wagtail-blocks'],
6
7
  excludeStories: /.*Data$/
7
8
  }
8
9
 
9
- export const BlockGistData = {
10
+ export const BlockGistStoryData = {
10
11
  blockType: 'GitHubGistBlock',
11
12
  caption: '<p>Caption for gist block</p>',
12
13
  id: 'cefc8e20-2833-4d0b-a4d6-7f469d5dbd02',
@@ -17,6 +18,6 @@ export const BlockGistData = {
17
18
  export const BaseStory = {
18
19
  name: 'BlockGist',
19
20
  args: {
20
- data: BlockGistData
21
+ data: BlockGistStoryData
21
22
  }
22
23
  }
@@ -1,14 +1,16 @@
1
1
  <script setup lang="ts">
2
2
  import { ref, watch } from 'vue'
3
+ import type { BlockData } from './../../interfaces.ts'
3
4
  import BaseImageCaption from './../BaseImageCaption/BaseImageCaption.vue'
4
5
  import GitHub404 from './GitHub404.vue'
6
+
7
+ export interface BlockGistData extends BlockData {
8
+ caption?: string
9
+ id?: string
10
+ url?: string
11
+ }
5
12
  interface BlockGistProps {
6
- data: {
7
- blockType?: string
8
- caption?: string
9
- id?: string
10
- url?: string
11
- }
13
+ data: BlockGistData
12
14
  }
13
15
 
14
16
  const props = defineProps<BlockGistProps>()
@@ -2,6 +2,7 @@ import BlockHeading from './BlockHeading.vue'
2
2
  export default {
3
3
  title: 'Components/Blocks/BlockHeading',
4
4
  component: BlockHeading,
5
+ tags: ['wagtail-blocks'],
5
6
  excludeStories: /.*Data$/
6
7
  }
7
8
 
@@ -3,14 +3,15 @@ import BlockIframeEmbed from './BlockIframeEmbed.vue'
3
3
  export default {
4
4
  title: 'Components/Blocks/BlockIframeEmbed',
5
5
  component: BlockIframeEmbed,
6
+ tags: ['wagtail-blocks'],
6
7
  decorators: [
7
8
  () => ({
8
- template: `<div id="storyDecorator" class="mx-auto max-w-screen-md"><story/></div>`
9
+ template: `<div id="storyRoot" class="mx-auto max-w-screen-md"><story/></div>`
9
10
  })
10
11
  ],
11
12
  parameters: {
12
13
  html: {
13
- root: '#storyDecorator'
14
+ root: '#storyRoot'
14
15
  }
15
16
  },
16
17
  excludeStories: /.*Data$/
@@ -47,18 +47,25 @@
47
47
  </div>
48
48
  </template>
49
49
  <script lang="ts">
50
- import { defineComponent } from 'vue'
50
+ import { defineComponent, type PropType } from 'vue'
51
51
  import { mapStores } from 'pinia'
52
+ import type { BlockData } from './../../interfaces.ts'
52
53
  import { useThemeStore } from '../../store/theme'
53
54
  import BaseImageCaption from './../BaseImageCaption/BaseImageCaption.vue'
54
55
  import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
55
56
 
57
+ export type BlockIframeEmbedData = BlockData & {
58
+ caption: string
59
+ title: string
60
+ url: string
61
+ height?: number
62
+ }
56
63
  export default defineComponent({
57
64
  name: 'BlockIframeEmbed',
58
65
  components: { BaseImageCaption, BaseImagePlaceholder },
59
66
  props: {
60
67
  data: {
61
- type: Object,
68
+ type: Object as PropType<BlockIframeEmbedData>,
62
69
  default: undefined
63
70
  }
64
71
  },
@@ -3,11 +3,7 @@ import BlockImage from './BlockImage.vue'
3
3
  export default {
4
4
  title: 'Components/Blocks/BlockImage',
5
5
  component: BlockImage,
6
- argTypes: {
7
- fullBleed: {
8
- control: { type: 'boolean' }
9
- }
10
- },
6
+ tags: ['autodocs', 'wagtail-blocks'],
11
7
  excludeStories: /.*Data$/,
12
8
  parameters: {
13
9
  docs: {