@explorer-1/vue 0.1.4 → 0.1.6

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 (162) hide show
  1. package/components.d.ts +25 -3
  2. package/dist/explorer-1-vue.js +8978 -10024
  3. package/dist/explorer-1-vue.umd.cjs +13 -16
  4. package/dist/src/components/BaseHeading/BaseHeading.stories.d.ts +6 -11
  5. package/dist/src/components/BaseHeading/BaseHeading.vue.d.ts +6 -10
  6. package/dist/src/components/BasePlaceholder/BasePlaceholder.stories.d.ts +0 -1
  7. package/dist/src/components/BlockDialog/BlockDialog.stories.d.ts +81 -0
  8. package/dist/src/components/BlockImage/BlockImage.stories.d.ts +0 -1
  9. package/dist/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.d.ts +6 -0
  10. package/dist/src/components/BlockLinkCarousel/BlockLinkCarousel.vue.d.ts +6 -0
  11. package/dist/src/components/BlockQuote/BlockQuote.stories.d.ts +0 -1
  12. package/dist/src/components/BlockStreamfield/BlockStreamfield.stories.d.ts +58 -8
  13. package/dist/src/components/BlockVideoEmbed/BlockVideoEmbed.vue.d.ts +7 -3
  14. package/dist/src/components/HeroListingIndex/HeroListingIndex.stories.d.ts +1 -0
  15. package/dist/src/components/HeroMedium/HeroMedium.stories.d.ts +1 -0
  16. package/dist/src/components/HeroMedium/HeroSmall.stories.d.ts +1 -0
  17. package/dist/src/components/HomepageEmbedBlock/HomepageEmbedBlock.stories.d.ts +1 -6
  18. package/dist/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.stories.d.ts +31 -47
  19. package/dist/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.vue.d.ts +5 -1
  20. package/dist/src/components/HomepageStats/HomepageStats.stories.d.ts +19 -9
  21. package/dist/src/components/HomepageTeaserBlock/HomepageTeaserBlock.stories.d.ts +6 -50
  22. package/dist/src/components/HomepageTeaserBlock/HomepageTeaserBlock.vue.d.ts +7 -1
  23. package/dist/src/components/MissionDetailAbout/MissionDetailAbout.stories.d.ts +1 -6
  24. package/dist/src/components/MissionDetailHero/MissionDetailHero.stories.d.ts +11 -11
  25. package/dist/src/components/MissionDetailHighlights/MissionDetailHighlights.stories.d.ts +6 -6
  26. package/dist/src/components/NavDesktop/NavDesktop.stories.d.ts +3 -6
  27. package/dist/src/components/NavDesktopEdu/NavDesktopEdu.stories.d.ts +289 -0
  28. package/dist/src/components/NavLogoLinks/NavLogoLinks.stories.d.ts +0 -5
  29. package/dist/src/components/NavMobile/NavMobile.stories.d.ts +42 -9
  30. package/dist/src/components/NavMobile/NavMobile.vue.d.ts +13 -2
  31. package/dist/src/components/NavMobile/NavMobileEdu.stories.d.ts +392 -0
  32. package/dist/src/components/NavSocial/NavSocial.stories.d.ts +42 -1
  33. package/dist/src/components/NavSocial/NavSocial.vue.d.ts +42 -1
  34. package/dist/src/components/TheFooter/TheFooter.vue.d.ts +9 -1
  35. package/dist/src/components/TimelineDialog/TimelineDialog.stories.d.ts +75 -0
  36. package/dist/src/components/TopicDetailMissionSpotlight/TopicDetailMissionSpotlight.stories.d.ts +1 -7
  37. package/dist/src/components/TopicDetailStreamfield/TopicDetailStreamfield.stories.d.ts +1 -6
  38. package/dist/src/docs/foundation/typography.stories.d.ts +6 -10
  39. package/dist/src/store/curatedGallery.d.ts +6 -0
  40. package/dist/src/store/search.d.ts +10 -0
  41. package/dist/src/templates/PageAudioDetail/PageAudioDetail.stories.d.ts +102 -0
  42. package/dist/src/templates/PageContent/PageContent.stories.d.ts +2 -1
  43. package/dist/src/templates/PageContent/PageContent.vue.d.ts +8 -1
  44. package/dist/src/templates/PageEventDetail/PageEventDetail.stories.d.ts +1 -1
  45. package/dist/src/templates/PageImageDetail/PageImageDetail.stories.d.ts +141 -0
  46. package/dist/src/templates/PageNewsDetail/PageNewsDetail.stories.d.ts +1163 -228
  47. package/dist/src/templates/PageVideoDetail/PageVideoDetail.stories.d.ts +56 -0
  48. package/dist/src/templates/edu/PageContentEdu.stories.d.ts +27 -0
  49. package/dist/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.stories.d.ts +360 -0
  50. package/dist/src/templates/edu/PageEduResourceArticle/PageEduResourceArticle.stories.d.ts +327 -0
  51. package/dist/src/templates/www/PageAsteroidWatchContent/PageAsteroidWatchContent.stories.d.ts +99 -0
  52. package/dist/src/templates/{edu/PageEduNewsDetail.stories.d.ts → www/PageAsteroidWatchIndex/PageAsteroidWatchIndex.stories.d.ts} +48 -67
  53. package/dist/src/templates/www/PageCuratedGallery/PageCuratedGallery.stories.d.ts +98 -0
  54. package/dist/src/templates/www/PageGoDirectory/PageGoDirectory.stories.d.ts +56 -0
  55. package/dist/src/templates/www/PageHomepage/PageHomepage.stories.d.ts +704 -0
  56. package/dist/src/templates/www/PageInfographicDetail/PageInfographicDetail.stories.d.ts +41 -0
  57. package/dist/src/templates/www/PageMaintenanceMode/PageMaintenanceMode.stories.d.ts +14 -0
  58. package/dist/src/templates/www/PageMissionDetail/PageMissionDetail.stories.d.ts +875 -0
  59. package/dist/src/templates/www/PagePodcast/PagePodcast.stories.d.ts +115 -0
  60. package/dist/src/templates/www/PagePodcastSeason/PagePodcastSeason.stories.d.ts +84 -0
  61. package/dist/src/templates/www/PagePressKitIndex/PagePressKitIndex.stories.d.ts +64 -0
  62. package/dist/src/templates/www/PageProfileDetail/PageProfileDetail.stories.d.ts +60 -0
  63. package/dist/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.stories.d.ts +170 -0
  64. package/dist/src/templates/www/PageTimeline/PageTimeline.stories.d.ts +339 -0
  65. package/dist/src/templates/www/PageTopicDetail/PageTopicDetail.stories.d.ts +297 -0
  66. package/dist/style.css +1 -1
  67. package/lib/main.ts +4 -0
  68. package/package.json +2 -1
  69. package/src/components/BaseAudio/BaseAudio.vue +0 -1
  70. package/src/components/BaseHeading/BaseHeading.stories.js +0 -1
  71. package/src/components/BaseHeading/BaseHeading.vue +5 -7
  72. package/src/components/BasePlaceholder/BasePlaceholder.stories.js +0 -1
  73. package/src/components/BlockAudio/BlockAudio.stories.js +2 -3
  74. package/src/components/BlockDialog/BlockDialog.stories.js +56 -0
  75. package/src/components/BlockDialog/BlockDialog.stories.mdx +28 -0
  76. package/src/components/BlockDialog/BlockDialog.vue +132 -0
  77. package/src/components/BlockHeading/BlockHeading.stories.js +2 -2
  78. package/src/components/BlockImage/BlockImage.stories.js +0 -1
  79. package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.vue +0 -1
  80. package/src/components/BlockImageGallery/BlockImageGallery.vue +0 -1
  81. package/src/components/BlockLinkCarousel/BlockLinkCarousel.vue +4 -2
  82. package/src/components/BlockQuote/BlockQuote.stories.js +0 -1
  83. package/src/components/BlockStreamfield/BlockStreamfield.stories.js +20 -9
  84. package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +3 -2
  85. package/src/components/DetailHeadline/DetailHeadline.vue +3 -2
  86. package/src/components/DsnWidget/DsnWidget.vue +2 -2
  87. package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.stories.js +1 -8
  88. package/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.stories.js +115 -118
  89. package/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.vue +3 -23
  90. package/src/components/HomepageMissionsCarousel/HomepageMissionsCarouselItem.vue +1 -2
  91. package/src/components/HomepageStats/HomepageStats.stories.js +10 -10
  92. package/src/components/HomepageStats/HomepageStats.vue +8 -8
  93. package/src/components/HomepageTeaserBlock/HomepageTeaserBlock.stories.js +11 -18
  94. package/src/components/HomepageTeaserBlock/HomepageTeaserBlock.vue +20 -14
  95. package/src/components/HomepageTeaserBlock/HomepageTeaserBlockCardImage.vue +1 -1
  96. package/src/components/MissionDetailAbout/MissionDetailAbout.stories.js +1 -8
  97. package/src/components/MissionDetailHero/MissionDetailHero.stories.js +11 -11
  98. package/src/components/MissionDetailHighlights/MissionDetailHighlights.stories.js +6 -6
  99. package/src/components/MixinCarousel/MixinCarousel.docs.mdx +1 -1
  100. package/src/components/NavDesktop/NavDesktop.stories.js +1 -4
  101. package/src/components/NavDesktopEdu/NavDesktopEdu.stories.js +2 -1
  102. package/src/components/NavMobile/NavMobileEdu.stories.js +2 -1
  103. package/src/components/RoboticsDetailStats/RoboticsDetailStats.stories.js +1 -1
  104. package/src/components/TimelineDialog/TimelineDialog.stories.js +47 -0
  105. package/src/components/TimelineDialog/TimelineDialog.stories.mdx +26 -0
  106. package/src/components/TimelineDialog/TimelineDialog.vue +145 -0
  107. package/src/components/TopicDetailMissionSpotlight/TopicDetailMissionSpotlight.stories.js +1 -9
  108. package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.stories.js +1 -8
  109. package/src/docs/utils/ComponentItem.jsx +0 -1
  110. package/src/store/curatedGallery.ts +23 -0
  111. package/src/store/search.ts +43 -0
  112. package/src/templates/PageAudioDetail/PageAudioDetail.stories.js +106 -0
  113. package/src/templates/PageAudioDetail/PageAudioDetail.vue +375 -0
  114. package/src/templates/PageContent/PageContent.stories.js +2 -1
  115. package/src/templates/PageContent/PageContent.vue +16 -19
  116. package/src/templates/PageEventDetail/PageEventDetail.stories.js +1 -1
  117. package/src/templates/PageEventDetail/PageEventDetail.vue +15 -15
  118. package/src/templates/PageImageDetail/PageImageDetail.stories.js +116 -0
  119. package/src/templates/PageImageDetail/PageImageDetail.vue +444 -0
  120. package/src/templates/PageNewsDetail/PageNewsDetail.stories.js +3 -2
  121. package/src/templates/PageNewsDetail/PageNewsDetail.vue +4 -5
  122. package/src/templates/PageVideoDetail/PageVideoDetail.stories.js +84 -0
  123. package/src/templates/PageVideoDetail/PageVideoDetail.vue +173 -0
  124. package/src/templates/edu/PageContentEdu.stories.js +1 -0
  125. package/src/templates/edu/{PageEduNewsDetail.stories.js → PageEduNewsDetail/PageEduNewsDetail.stories.js} +5 -3
  126. package/src/templates/edu/{PageEduNewsDetail.vue → PageEduNewsDetail/PageEduNewsDetail.vue} +3 -2
  127. package/src/templates/edu/PageEduResourceArticle/PageEduResourceArticle.stories.js +192 -0
  128. package/src/templates/edu/PageEduResourceArticle/PageEduResourceArticle.vue +196 -0
  129. package/src/templates/www/PageAsteroidWatchContent/PageAsteroidWatchContent.stories.js +54 -0
  130. package/src/templates/www/PageAsteroidWatchContent/PageAsteroidWatchContent.vue +79 -0
  131. package/src/templates/www/PageAsteroidWatchIndex/PageAsteroidWatchIndex.stories.js +34 -0
  132. package/src/templates/www/PageAsteroidWatchIndex/PageAsteroidWatchIndex.vue +56 -0
  133. package/src/templates/www/PageCuratedGallery/PageCuratedGallery.stories.js +110 -0
  134. package/src/templates/www/PageCuratedGallery/PageCuratedGallery.vue +345 -0
  135. package/src/templates/www/PageGoDirectory/PageGoDirectory.stories.js +61 -0
  136. package/src/templates/www/PageGoDirectory/PageGoDirectory.vue +76 -0
  137. package/src/templates/www/PageHomepage/PageHomepage.stories.js +101 -0
  138. package/src/templates/www/PageHomepage/PageHomepage.vue +136 -0
  139. package/src/templates/www/PageInfographicDetail/PageInfographicDetail.stories.js +46 -0
  140. package/src/templates/www/PageInfographicDetail/PageInfographicDetail.vue +125 -0
  141. package/src/templates/www/PageMaintenanceMode/PageMaintenanceMode.stories.js +14 -0
  142. package/src/templates/www/PageMaintenanceMode/PageMaintenanceMode.vue +94 -0
  143. package/src/templates/www/PageMissionDetail/PageMissionDetail.stories.js +246 -0
  144. package/src/templates/www/PageMissionDetail/PageMissionDetail.vue +136 -0
  145. package/src/templates/www/PagePodcast/PagePodcast.stories.js +86 -0
  146. package/src/templates/www/PagePodcast/PagePodcast.vue +219 -0
  147. package/src/templates/www/PagePodcastSeason/PagePodcastSeason.stories.js +96 -0
  148. package/src/templates/www/PagePodcastSeason/PagePodcastSeason.vue +191 -0
  149. package/src/templates/www/PagePressKitIndex/PagePressKitIndex.stories.js +72 -0
  150. package/src/templates/www/PagePressKitIndex/PagePressKitIndex.vue +76 -0
  151. package/src/templates/www/PageProfileDetail/PageProfileDetail.stories.js +76 -0
  152. package/src/templates/www/PageProfileDetail/PageProfileDetail.vue +178 -0
  153. package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.stories.js +43 -0
  154. package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.vue +101 -0
  155. package/src/templates/www/PageTimeline/BlockMilestone.vue +99 -0
  156. package/src/templates/www/PageTimeline/PageTimeline.stories.js +357 -0
  157. package/src/templates/www/PageTimeline/PageTimeline.vue +384 -0
  158. package/src/templates/www/PageTopicDetail/PageTopicDetail.stories.js +87 -0
  159. package/src/templates/www/PageTopicDetail/PageTopicDetail.vue +121 -0
  160. package/src/utils/mixins.ts +1 -1
  161. package/src/templates/www/HomePage/HomePage.vue +0 -30
  162. /package/dist/src/components/{MixinDropdownToggle/MixinDropdownToggle.vue.d.ts → NavDropdownToggle/NavDropdownToggle.vue.d.ts} +0 -0
package/lib/main.ts CHANGED
@@ -4,8 +4,10 @@ import filters from './../src/utils/filters'
4
4
  import type { Explorer1Theme } from '../src/interfaces'
5
5
 
6
6
  // stores
7
+ import { useCuratedGalleryStore } from './../src/store/curatedGallery'
7
8
  import { useHeaderStore } from './../src/store/header'
8
9
  import { useThemeStore } from './../src/store/theme'
10
+ import { useSearchStore } from './../src/store/search'
9
11
  // mixins
10
12
  import {
11
13
  mixinTransparentHeader,
@@ -211,7 +213,9 @@ export {
211
213
  type Explorer1Theme,
212
214
  dayjs,
213
215
  filters,
216
+ useCuratedGalleryStore,
214
217
  useHeaderStore,
218
+ useSearchStore,
215
219
  useThemeStore,
216
220
  mixinTransparentHeader,
217
221
  mixinGetLinkText,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorer-1/vue",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -32,6 +32,7 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@vitejs/plugin-vue": "^5.0.4",
35
+ "a11y-dialog": "^8.0.4",
35
36
  "autoprefixer": "^10.4.19",
36
37
  "postcss": "^8.4.38",
37
38
  "postcss-import": "^16.1.0",
@@ -332,7 +332,6 @@ export default defineComponent({
332
332
  // this.$root?.$on('play', this.pauseOthers)
333
333
  },
334
334
  getAudio() {
335
- console.log(this.$el.querySelectorAll('audio')[0])
336
335
  return this.$el.querySelectorAll('audio')[0]
337
336
  }
338
337
  }
@@ -25,7 +25,6 @@ export default {
25
25
  slots: {
26
26
  default: 'BaseStory slot content'
27
27
  },
28
- viewMode: 'docs',
29
28
  docs: {
30
29
  description: {
31
30
  component:
@@ -18,16 +18,14 @@ export default defineComponent({
18
18
  name: 'BaseHeading',
19
19
  props: {
20
20
  level: {
21
- type: (String as PropType<HeadingLevel>) || null,
21
+ type: String as PropType<HeadingLevel | undefined>,
22
22
  required: false,
23
- default: 'h2',
24
- validator: (prop: string): boolean => Object.keys(headings).includes(prop)
23
+ default: 'h2'
25
24
  },
26
25
  size: {
27
- type: String as PropType<HeadingLevel>,
26
+ type: String as PropType<HeadingLevel | '' | undefined>,
28
27
  required: false,
29
- default: '',
30
- validator: (prop: string): boolean => Object.keys(headings).includes(prop)
28
+ default: ''
31
29
  }
32
30
  },
33
31
  computed: {
@@ -35,7 +33,7 @@ export default defineComponent({
35
33
  if (this.level) {
36
34
  return this.level
37
35
  } else {
38
- return this.size
36
+ return this.size || 'h2'
39
37
  }
40
38
  },
41
39
  computedClass(): string {
@@ -5,7 +5,6 @@ export default {
5
5
  component: BasePlaceholder,
6
6
  excludeStories: /.*Data$/,
7
7
  parameters: {
8
- viewMode: 'docs',
9
8
  docs: {
10
9
  description: {
11
10
  component: `An animated loading component frequently used as a placeholder for <a href="/story/components-search-searchresultcard--standard-result" target="_blank">SearchResultCard</a>`
@@ -15,12 +15,11 @@ export const BlockAudioData = {
15
15
  path: '0001'
16
16
  },
17
17
  createdAt: '2020-12-10T07:38:30.951546+00:00',
18
- file: 'http://127.0.0.1:9000/media/media/05_Da_Funk_Call_Out_Research_Hook.mp3',
18
+ file: '/audio/file_example_MP3_700KB.mp3',
19
19
  fileExtension: 'mp3',
20
20
  fileOgg: '',
21
21
  id: '1',
22
- sources:
23
- "[{'src': 'http://127.0.0.1:9000/media/media/05_Da_Funk_Call_Out_Research_Hook.mp3', 'type': 'audio/mpeg'}]",
22
+ sources: "[{'src': '/audio/file_example_MP3_700KB.mp3', 'type': 'audio/mpeg'}]",
24
23
  thumbnail: '',
25
24
  title: 'audio file',
26
25
  type: 'audio'
@@ -0,0 +1,56 @@
1
+ import BlockDialog from './BlockDialog.vue'
2
+
3
+ export default {
4
+ title: 'Components/Blocks/BlockDialog',
5
+ component: BlockDialog,
6
+ argTypes: {
7
+ overlayClose: { control: { type: 'boolean' } }
8
+ }
9
+ }
10
+
11
+ export const BaseStory = {
12
+ name: 'BlockDialog',
13
+ args: {
14
+ dialogId: 'dialog-id',
15
+ headingId: 'heading-id'
16
+ },
17
+ render: (args) => ({
18
+ components: { BlockDialog },
19
+ setup() {
20
+ return { args }
21
+ },
22
+ template: `<div>
23
+ <button type="button" data-a11y-dialog-show="dialog-id">Open the dialog</button>
24
+ <BlockDialog v-bind="args" dialog-box-class="max-w-2xl">
25
+ <div class="p-3 sm:p-5">
26
+ <h2 id="heading-id">Dialog title</h2>
27
+ <hr
28
+ aria-hidden="true"
29
+ class="bg-gray-light-mid w-full h-2px border-0 my-3"
30
+ />
31
+ <div class="dialog-main py-3 max-h-64 overflow-auto relative">
32
+ <p class="py-2">
33
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
34
+ eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
35
+ enim ad minim veniam, quis nostrud exercitation ullamco laboris
36
+ nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
37
+ in reprehenderit in voluptate velit esse cillum dolore eu fugiat
38
+ nulla pariatur. Excepteur sint occaecat cupidatat non proident,
39
+ sunt in culpa qui officia deserunt mollit anim id est laborum.
40
+ </p>
41
+ </div>
42
+ <div class="my-3">
43
+ <a
44
+ href="#"
45
+ target=""
46
+ rel=""
47
+ class="group cursor-pointer -default underline text-theme-color can-hover:hover:text-theme-color-hover"
48
+ >
49
+ <span class="break-words">Explore</span>
50
+ </a>
51
+ </div>
52
+ </div>
53
+ </BlockDialog>
54
+ </div>`
55
+ })
56
+ }
@@ -0,0 +1,28 @@
1
+ import { Meta, Story, Canvas } from '@storybook/addon-docs'
2
+ import * as Stories from './BlockDialog.stories'
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # BlockDialog
7
+
8
+ This component is an accessible dialog window that utilizes the efficient and lightweight `a11y-dialog` package.
9
+ It adheres to the [Dialog (Modal) pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) outlined in the Accessible Rich Internet Applications (ARIA) Authoring Practices Guide.
10
+
11
+ Additionally, it is unopinionated with styling.
12
+
13
+ <Canvas
14
+ of={Stories.BaseStory}
15
+ className="sbdocs-preview-full-width"
16
+ />
17
+
18
+ ### Basic Usage
19
+
20
+ To trigger dialog opening, use the `data-a11y-dialog-show` attribute with the value set to the `id` of the dialog element you want to open.
21
+
22
+ ```
23
+ <button type="button" data-a11y-dialog-show="your-dialog-id">
24
+ Open the dialog
25
+ </button>
26
+ ```
27
+
28
+ See [all documentation in the repository](https://github.com/KittyGiraudel/a11y-dialog).
@@ -0,0 +1,132 @@
1
+ <template>
2
+ <div
3
+ v-if="dialogId"
4
+ :id="dialogId"
5
+ ref="DialogRef"
6
+ :aria-labelledby="headingId"
7
+ aria-hidden="true"
8
+ class="BlockDialog fixed top-0 left-0 z-60 flex w-full h-full overflow-auto"
9
+ >
10
+ <div
11
+ class="dialog-overlay bg-gray-dark bg-opacity-90 fixed top-0 left-0 w-full h-full"
12
+ :data-a11y-dialog-hide="overlayClose ? '' : undefined"
13
+ ></div>
14
+ <div class="container px-4 m-auto">
15
+ <div
16
+ role="document"
17
+ class="dialog-box relative m-auto bg-white"
18
+ :class="dialogBoxClass"
19
+ >
20
+ <button
21
+ type="button"
22
+ data-a11y-dialog-hide
23
+ aria-label="Close dialog"
24
+ class="button-close absolute right-0 flex-shrink-0 text-white focus:outline-none focus:ring-2"
25
+ >
26
+ <IconClose />
27
+ </button>
28
+ <slot>Content</slot>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </template>
33
+
34
+ <script lang="ts">
35
+ import { defineComponent } from 'vue'
36
+ import A11yDialog from 'a11y-dialog'
37
+ import IconClose from './../Icons/IconClose.vue'
38
+
39
+ export default defineComponent({
40
+ name: 'BlockDialog',
41
+ components: {
42
+ IconClose
43
+ },
44
+ props: {
45
+ dialogId: {
46
+ type: String,
47
+ required: true
48
+ },
49
+ headingId: {
50
+ type: String,
51
+ required: false,
52
+ default: ''
53
+ },
54
+ overlayClose: {
55
+ type: Boolean,
56
+ required: false,
57
+ default: true
58
+ },
59
+ dialogBoxClass: {
60
+ type: String,
61
+ required: false,
62
+ default: ''
63
+ }
64
+ },
65
+ emits: ['show', 'hide'],
66
+ data(): {
67
+ dialog: A11yDialog | null
68
+ content: HTMLElement | null
69
+ } {
70
+ return {
71
+ dialog: null,
72
+ content: null
73
+ }
74
+ },
75
+ mounted() {
76
+ this.init()
77
+ ;(this.dialog as A11yDialog).show()
78
+ },
79
+ beforeUnmount() {
80
+ if (this.dialog) {
81
+ this.dialog.destroy()
82
+ }
83
+ },
84
+ methods: {
85
+ init() {
86
+ this.dialog = this.$refs.DialogRef
87
+ ? new A11yDialog(this.$refs.DialogRef as HTMLElement)
88
+ : null
89
+ console.log(this.dialog)
90
+ if (this.dialog) {
91
+ this.dialog
92
+ .on('show', () => {
93
+ document.body.classList.add('overflow-hidden')
94
+ this.$emit('show')
95
+ })
96
+ .on('hide', () => {
97
+ document.body.classList.remove('overflow-hidden')
98
+ this.$emit('hide')
99
+ })
100
+ }
101
+ }
102
+ }
103
+ })
104
+ </script>
105
+ <style lang="scss">
106
+ .BlockDialog {
107
+ // Make sure the dialog container and all its descendants are not visible and not focusable when it is hidden.
108
+ &[aria-hidden='true'] {
109
+ display: none;
110
+ }
111
+
112
+ @media (forced-colors: active) {
113
+ .dialog-box {
114
+ border: 1px solid;
115
+ }
116
+ }
117
+
118
+ .dialog-overlay,
119
+ .dialog-box {
120
+ @apply animate-fadeIn;
121
+
122
+ @media (prefers-reduced-motion: reduce) {
123
+ animation: none;
124
+ }
125
+ }
126
+
127
+ // Offset by the size of the icon.
128
+ .button-close {
129
+ top: -2rem;
130
+ }
131
+ }
132
+ </style>
@@ -9,8 +9,8 @@ export default {
9
9
  export const BlockHeadingData = {
10
10
  blockType: 'HeadingBlock',
11
11
  heading: 'Heading Text',
12
- level: 'h3',
13
- size: 'h3'
12
+ level: 'h2',
13
+ size: 'h2'
14
14
  }
15
15
 
16
16
  // stories
@@ -10,7 +10,6 @@ export default {
10
10
  },
11
11
  excludeStories: /.*Data$/,
12
12
  parameters: {
13
- viewMode: 'docs',
14
13
  docs: {
15
14
  description: {
16
15
  component:
@@ -22,7 +22,6 @@
22
22
  :height="theImageData.src.height"
23
23
  :alt="theImageData.alt"
24
24
  object-fit-class="contain"
25
- image-class="swiper-lazy"
26
25
  loading="lazy"
27
26
  />
28
27
  </BaseImagePlaceholder>
@@ -57,7 +57,6 @@
57
57
  :height="cover.src.height"
58
58
  alt=""
59
59
  object-fit-class="cover"
60
- image-class="swiper-lazy"
61
60
  loading="lazy"
62
61
  />
63
62
  </BaseImagePlaceholder>
@@ -46,11 +46,13 @@ export default defineComponent({
46
46
  },
47
47
  items: {
48
48
  type: Array,
49
- required: false
49
+ required: false,
50
+ default: undefined
50
51
  },
51
52
  heading: {
52
53
  type: String,
53
- required: false
54
+ required: false,
55
+ default: undefined
54
56
  }
55
57
  },
56
58
  computed: {
@@ -5,7 +5,6 @@ export default {
5
5
  component: BlockQuote,
6
6
  excludeStories: /.*Data$/,
7
7
  parameters: {
8
- viewMode: 'docs',
9
8
  docs: {
10
9
  description: {
11
10
  component:
@@ -25,20 +25,31 @@ export default {
25
25
  options: Object.keys(variants)
26
26
  }
27
27
  },
28
- decorators: [
29
- () => ({
30
- template: `<div id="storyDecorator" class="absolute inset-0"><story/></div>`
31
- })
32
- ],
33
28
  parameters: {
34
- html: {
35
- root: '#storyDecorator'
36
- },
37
- viewMode: 'canvas'
29
+ layout: 'fullscreen'
38
30
  },
39
31
  excludeStories: /.*(Data)$/
40
32
  }
41
33
 
34
+ export const BlockStreamfieldTruncatedData = {
35
+ body: [
36
+ BlockKeyPointsData,
37
+ BlockHeadingData,
38
+ {
39
+ blockType: 'RichTextBlock',
40
+ value:
41
+ '<p>Lorem ipsum <a href="/missions/test-mission/">dolor</a> sit amet, consectetur adipiscing elit. Quisque vitae justo quis justo malesuada molestie. Cras sed tincidunt dui.</p><p>Integer imperdiet blandit neque vitae euismod. Nulla aliquet lacus nibh, vel tincidunt urna efficitur non. In et eros vitae ex posuere maximus quis eget urna. Suspendisse fringilla posuere velit sit amet posuere. Morbi malesuada bibendum vehicula. Donec faucibus ut erat ut mattis. Suspendisse ornare, quam at placerat cursus, dolor mi lacinia nunc, eget maximus augue nulla in dolor.</p>\n'
42
+ },
43
+ BlockImageComparisonData,
44
+ BlockHeadingData,
45
+ {
46
+ blockType: 'RichTextBlock',
47
+ value:
48
+ '<p>Lorem ipsum <a href="/missions/test-mission/">dolor</a> sit amet, consectetur adipiscing elit. Quisque vitae justo quis justo malesuada molestie. Cras sed tincidunt dui.</p><p>Integer imperdiet blandit neque vitae euismod. Nulla aliquet lacus nibh, vel tincidunt urna efficitur non. In et eros vitae ex posuere maximus quis eget urna. Suspendisse fringilla posuere velit sit amet posuere. Morbi malesuada bibendum vehicula. Donec faucibus ut erat ut mattis. Suspendisse ornare, quam at placerat cursus, dolor mi lacinia nunc, eget maximus augue nulla in dolor.</p>\n'
49
+ },
50
+ BlockIframeEmbedData
51
+ ]
52
+ }
42
53
  export const BlockStreamfieldData = {
43
54
  body: [
44
55
  BlockKeyPointsData,
@@ -42,8 +42,9 @@ export default defineComponent({
42
42
  },
43
43
  props: {
44
44
  data: {
45
- type: Object as PropType<BlockData>,
46
- required: false
45
+ type: Object as PropType<Partial<BlockData>>,
46
+ required: false,
47
+ default: undefined
47
48
  }
48
49
  },
49
50
  mounted() {
@@ -12,7 +12,7 @@
12
12
  variant="secondary"
13
13
  :to="topics[0].url"
14
14
  class="py-3"
15
- use-primary-color
15
+ :use-primary-color="themeStore.theme === 'ThemeEdu'"
16
16
  >
17
17
  <span :itemprop="schema ? 'articleSection' : undefined">
18
18
  {{ topics[0].title }}
@@ -21,7 +21,7 @@
21
21
  </div>
22
22
  <span
23
23
  v-else-if="label"
24
- class="text-subtitle py-3"
24
+ class="text-subtitle py-3 edu:text-primary"
25
25
  >
26
26
  <template v-if="!labelLink">
27
27
  {{ label }}
@@ -31,6 +31,7 @@
31
31
  variant="secondary"
32
32
  :to="labelLink"
33
33
  class="py-3"
34
+ :use-primary-color="themeStore.theme === 'ThemeEdu'"
34
35
  >
35
36
  {{ label }}
36
37
  </BaseLink>
@@ -12,7 +12,7 @@
12
12
  >
13
13
  <p
14
14
  v-if="data.heading"
15
- class="text-subtitle text-jpl-red mb-4"
15
+ class="text-subtitle text-primary mb-4"
16
16
  >
17
17
  {{ data.heading }}
18
18
  </p>
@@ -21,7 +21,7 @@
21
21
  <template v-else>
22
22
  <p
23
23
  v-if="data.heading"
24
- class="text-subtitle text-jpl-red mb-4"
24
+ class="text-subtitle text-primary mb-4"
25
25
  >
26
26
  {{ data.heading }}
27
27
  </p>
@@ -4,15 +4,8 @@ import HomepageEmbedBlock from './HomepageEmbedBlock.vue'
4
4
  export default {
5
5
  title: 'Components/WWW/Homepage/HomepageEmbedBlock',
6
6
  component: HomepageEmbedBlock,
7
- decorators: [
8
- () => ({
9
- template: `<div id="storyDecorator" class="absolute inset-0"><story/></div>`
10
- })
11
- ],
12
7
  parameters: {
13
- html: {
14
- root: '#storyDecorator'
15
- },
8
+ layout: 'fullscreen',
16
9
  viewMode: 'canvas'
17
10
  },
18
11
  excludeStories: /.*(Data)$/