@explorer-1/vue 0.2.5 → 0.2.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 (43) hide show
  1. package/dist/explorer-1-vue.js +2612 -2556
  2. package/dist/explorer-1-vue.umd.cjs +14 -12
  3. package/dist/src/components/CalendarButton/CalendarButton.vue.d.ts +3 -2
  4. package/dist/src/components/EventCard/EventCard.vue.d.ts +9 -4
  5. package/dist/src/components/EventDetailHero/EventDetailHero.vue.d.ts +11 -0
  6. package/dist/src/components/NavDesktopEdu/NavDesktopEdu.stories.d.ts +58 -11
  7. package/dist/src/templates/edu/PageEduEventDetail/PageEduEventDetail.stories.d.ts +57 -29
  8. package/dist/src/utils/mixins.d.ts +2 -0
  9. package/dist/style.css +1 -1
  10. package/package.json +2 -2
  11. package/src/components/BaseButton/BaseButton.vue +1 -1
  12. package/src/components/BaseImage/BaseImage.vue +1 -1
  13. package/src/components/BaseTag/BaseTag.vue +2 -2
  14. package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +3 -2
  15. package/src/components/BlockImage/BlockImageStandard.vue +1 -1
  16. package/src/components/BlockKeyPoints/BlockKeyPoints.vue +2 -2
  17. package/src/components/BlockLinkCard/BlockLinkCard.vue +1 -0
  18. package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +29 -27
  19. package/src/components/BlockRelatedLinks/RelatedLink.vue +3 -3
  20. package/src/components/BlockVideo/BlockVideo.vue +1 -1
  21. package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +1 -1
  22. package/src/components/CalendarButton/CalendarButton.vue +9 -10
  23. package/src/components/EventCard/EventCard.vue +22 -8
  24. package/src/components/EventDetailHero/EventDetailHero.vue +45 -21
  25. package/src/components/HeroMedia/HeroMedia.vue +2 -2
  26. package/src/components/MixinCarousel/MixinCarousel.vue +2 -2
  27. package/src/components/NavDesktop/NavDesktopDropdown.vue +1 -1
  28. package/src/components/NavDesktopEdu/NavDesktopEdu.stories.js +6 -15
  29. package/src/components/NavDesktopEdu/NavDesktopEdu.vue +35 -9
  30. package/src/components/NavHeading/NavHeading.stories.js +1 -1
  31. package/src/components/NavHeading/NavHeading.vue +1 -1
  32. package/src/components/NavLinkList/NavLinkList.vue +1 -1
  33. package/src/components/NavMobile/NavMobile.vue +36 -11
  34. package/src/components/ShareButtons/ShareButtons.vue +1 -1
  35. package/src/components/ShareButtonsEdu/ShareButtonsEdu.vue +1 -1
  36. package/src/components/TheFooter/TheFooter.vue +18 -2
  37. package/src/templates/PageEventDetail/PageEventDetail.vue +2 -1
  38. package/src/templates/PageNewsDetail/PageNewsDetail.vue +3 -1
  39. package/src/templates/edu/PageEduEventDetail/PageEduEventDetail.stories.js +146 -104
  40. package/src/templates/edu/PageEduEventDetail/PageEduEventDetail.vue +101 -50
  41. package/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.vue +1 -1
  42. package/src/utils/mixins.ts +18 -14
  43. package/tsconfig.json +1 -1
@@ -12,7 +12,7 @@
12
12
  >
13
13
  <BaseLink
14
14
  variant="none"
15
- class="block text-lg font-medium leading-tight text-white"
15
+ class="block text-base xl:text-lg font-medium leading-tight text-white"
16
16
  :href="item.path && !getRouterLink(item) ? item.path : undefined"
17
17
  :to="getRouterLink(item) ? getRouterLink(item) : undefined"
18
18
  link-class="can-hover:hover:underline inline-block px-2 py-3 -ml-2"
@@ -2,7 +2,7 @@
2
2
  <transition name="headerMobileReveal">
3
3
  <div
4
4
  v-show="headerVisible"
5
- class="NavMobile border-gray-light-mid z-50 w-full transition-all duration-150 ease-in bg-white border-b edu:bg-gray-light edu:border-none"
5
+ class="NavMobile border-gray-light-mid z-50 w-full transition-all duration-150 ease-in bg-white border-b edu:bg-gray-light edu:border-none print:edu:!border-b print:border-black"
6
6
  :class="headerClasses"
7
7
  >
8
8
  <!-- navbar -->
@@ -13,13 +13,22 @@
13
13
  <!-- branding -->
14
14
  <div class="flex items-center">
15
15
  <NavLogoLinks class="lg:p-0 w-72 z-20 p-2 pl-0 -ml-3 edu:w-[12rem]">
16
- <img
17
- v-if="themeStore.theme === 'ThemeEdu'"
18
- :src="LogoWhite"
19
- alt="JPL Logo"
20
- width="324"
21
- height="72"
22
- />
16
+ <template v-if="themeStore.theme === 'ThemeEdu'">
17
+ <img
18
+ class="print:hidden"
19
+ :src="LogoWhite"
20
+ alt="JPL Logo"
21
+ width="324"
22
+ height="72"
23
+ />
24
+ <img
25
+ class="hidden print:block"
26
+ :src="LogoColor"
27
+ alt="JPL Logo"
28
+ width="324"
29
+ height="72"
30
+ />
31
+ </template>
23
32
  <img
24
33
  v-else
25
34
  :src="LogoColor"
@@ -30,14 +39,14 @@
30
39
  </NavLogoLinks>
31
40
  <div
32
41
  v-if="themeStore.theme === 'ThemeEdu'"
33
- class="-ml-1 pl-2 border-l border-white border-opacity-30 z-20"
42
+ class="-ml-1 pl-2 border-l border-white border-opacity-30 z-20 print:border-black"
34
43
  >
35
44
  <span class="text-white font-bold text-xl pl-px">Education</span>
36
45
  </div>
37
46
  </div>
38
47
  <button
39
48
  v-if="data"
40
- class="text-gray-dark p-4 -mr-4 cursor-pointer"
49
+ class="print:hidden text-gray-dark p-4 -mr-4 cursor-pointer"
41
50
  :aria-label="menuVisible ? 'Close menu' : 'Open menu'"
42
51
  @click="toggleMenu"
43
52
  >
@@ -87,6 +96,18 @@
87
96
  :start-open="checkActive(item.titleLink) && !hasSecondary"
88
97
  />
89
98
  </template>
99
+ <template v-if="themeStore.isEdu">
100
+ <BaseLink
101
+ variant="none"
102
+ href="https://www.nasa.gov/learning-resources/"
103
+ class="group relative block w-full px-4 py-2 text-xl font-medium text-left"
104
+ link-class="flex flex-wrap-none overflow-visible whitespace-nowrap items-center py-0 pl-6 -ml-4 border-l-4 border-transparent"
105
+ external-target-blank
106
+ >
107
+ <span class="pr-2">NASA OSTEM</span>
108
+ <IconExternal class="shrink-0 text-sm -mt-0.5" />
109
+ </BaseLink>
110
+ </template>
90
111
  </nav>
91
112
  <div class="pl-8">
92
113
  <nav
@@ -122,6 +143,8 @@ import { useHeaderStore } from './../../store/header'
122
143
  import { useThemeStore } from './../../store/theme'
123
144
  import IconMenu from './../Icons/IconMenu.vue'
124
145
  import IconClose from './../Icons/IconClose.vue'
146
+ import IconExternal from './../Icons/IconExternal.vue'
147
+ import BaseLink from './../BaseLink/BaseLink.vue'
125
148
  import NavLogoLinks from './../NavLogoLinks/NavLogoLinks.vue'
126
149
  import NavMobileDropdown from './../NavMobile/NavMobileDropdown.vue'
127
150
  import NavMobileLink from './../NavMobile/NavMobileLink.vue'
@@ -140,7 +163,9 @@ export default defineComponent({
140
163
  NavMobileDropdown,
141
164
  NavMobileLink,
142
165
  NavSocial,
143
- NavSearchForm
166
+ NavSearchForm,
167
+ BaseLink,
168
+ IconExternal
144
169
  },
145
170
  props: {
146
171
  data: {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="ShareButtons relative flex flex-row items-start border-collapse"
3
+ class="ShareButtons relative flex flex-row items-start border-collapse print:hidden"
4
4
  :class="{ 'lg:absolute lg:top-0 lg:left-0 lg:flex-col': !inline }"
5
5
  >
6
6
  <BaseButton
@@ -89,7 +89,7 @@ const buttonClass = computed(() => {
89
89
  })
90
90
  </script>
91
91
  <template>
92
- <div class="ShareButtonsEdu relative flex flex-row items-start border-collapse">
92
+ <div class="ShareButtonsEdu relative flex flex-row items-start border-collapse print:hidden">
93
93
  <BaseButton
94
94
  variant="social"
95
95
  :class="buttonClass"
@@ -1,5 +1,7 @@
1
1
  <template>
2
- <footer class="TheFooter bg-jpl-blue-darker edu:bg-stars edu:bg-primary text-white relative z-20">
2
+ <footer
3
+ class="TheFooter bg-jpl-blue-darker edu:bg-stars edu:bg-primary text-white relative z-20 print:px-4 print:border-t print:border-black"
4
+ >
3
5
  <div class="footer-main lg:BaseGrid 3xl:px-0 lg:pt-20 container px-4 pt-10 mx-auto">
4
6
  <div class="footer-navigation lg:block lg:col-span-9 hidden col-span-12">
5
7
  <!-- footerNavigation -->
@@ -26,6 +28,18 @@
26
28
  {{ getLinkText(link) }}
27
29
  </BaseLink>
28
30
  </div>
31
+ <template v-if="themeStore.isEdu">
32
+ <BaseLink
33
+ variant="none"
34
+ href="https://www.nasa.gov/learning-resources/"
35
+ class="text-subtitle text-blue edu:text-white mb-3"
36
+ link-class="flex flex-wrap-none overflow-visible whitespace-nowrap items-center"
37
+ external-target-blank
38
+ >
39
+ <span class="pr-2">NASA OSTEM</span>
40
+ <IconExternal class="shrink-0 text-sm -mt-0.5" />
41
+ </BaseLink>
42
+ </template>
29
43
  </div>
30
44
  </div>
31
45
  <!-- footer extras -->
@@ -180,6 +194,7 @@ import { defineComponent } from 'vue'
180
194
  import { mapStores } from 'pinia'
181
195
  import { useThemeStore } from './../../store/theme'
182
196
  import { mixinGetRouterLink, mixinGetLinkText } from './../../utils/mixins'
197
+ import IconExternal from './../Icons/IconExternal.vue'
183
198
  import BaseLink from './../BaseLink/BaseLink.vue'
184
199
  import BaseButton from './../BaseButton/BaseButton.vue'
185
200
  import NavSocial from './../NavSocial/NavSocial.vue'
@@ -193,7 +208,8 @@ export default defineComponent({
193
208
  BaseButton,
194
209
  NavSocial,
195
210
  TheFooterSignUp,
196
- LogoCaltech
211
+ LogoCaltech,
212
+ IconExternal
197
213
  },
198
214
  props: {
199
215
  data: {
@@ -270,10 +270,11 @@
270
270
  <LayoutHelper
271
271
  v-if="data.moreEvents && data.moreEvents.length > 0"
272
272
  indent="col-1"
273
- class="my-12 lg:my-16"
273
+ class="my-12 lg:my-16 print:!px-4"
274
274
  >
275
275
  <BlockLinkCarousel
276
276
  item-type="cards"
277
+ class="print:!px-4"
277
278
  heading="MORE EVENTS"
278
279
  :items="data.moreEvents"
279
280
  />
@@ -174,6 +174,7 @@ import BlockImageStandard from './../../components/BlockImage/BlockImageStandard
174
174
  import BlockLinkCarousel from './../../components/BlockLinkCarousel/BlockLinkCarousel.vue'
175
175
  import ShareButtons from './../../components/ShareButtons/ShareButtons.vue'
176
176
  import BlockText from './../../components/BlockText/BlockText.vue'
177
+ import BlockVideo from './../../components/BlockText/BlockText.vue'
177
178
 
178
179
  export default defineComponent({
179
180
  name: 'PageNewsDetail',
@@ -190,7 +191,8 @@ export default defineComponent({
190
191
  BlockImageStandard,
191
192
  BlockLinkCarousel,
192
193
  ShareButtons,
193
- BlockText
194
+ BlockText,
195
+ BlockVideo
194
196
  },
195
197
  props: {
196
198
  data: {
@@ -1,6 +1,5 @@
1
1
  import { BlockKeyPointsData } from './../../../components/BlockKeyPoints/BlockKeyPoints.stories'
2
2
  import { BlockLinkCardCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories.js'
3
- import { EventDetailHeroData } from './../../../components/EventDetailHero/EventDetailHero.stories'
4
3
  import { EventsBlockLinkCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories'
5
4
  import PageEduEventDetail from './PageEduEventDetail.vue'
6
5
 
@@ -17,114 +16,157 @@ export default {
17
16
  excludeStories: /.*Data$/
18
17
  }
19
18
 
20
- // stories
21
- export const BaseStory = {
22
- name: 'PageEduEventDetail',
23
- args: {
24
- data: {
25
- id: '285',
26
- title: 'Becoming a NASA engineer',
27
- slug: 'becoming-a-nasa-engineer',
28
- url: '/events/becoming-a-nasa-engineer',
29
- startDate: '2022-01-23',
30
- startDatetime: '2022-01-23T17:00:00-08:00',
31
- startTime: '17:00:00',
32
- endDate: '2022-01-25',
33
- endDatetime: '2022-01-25T23:00:00-08:00',
34
- endTime: '23:00:00',
35
- isAllDay: false,
36
- timezone: 'PST',
37
- eventType: 'Workshop',
38
- summary:
39
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus et luctus nisi. Maecenas vel turpis sem. Nullam ultricies nulla quis nisi faucibus eleifend. In turpis ante, blandit nec dapibus tempor, posuere at erat. In justo quam, imperdiet at hendrerit eget, imperdiet ut orci. ',
40
- locationName: 'Webcast',
41
- registerLink: [
42
- {
43
- text: 'Registration Link',
44
- document: '',
45
- page: {
46
- url: '/placeholder'
47
- },
48
- externalLink: ''
49
- }
50
- ],
51
- eventImage: {
52
- __typename: 'CustomImage',
53
- srcSet:
54
- 'https://picsum.photos/720/420 320w, https://picsum.photos/720/420 640w, https://picsum.photos/720/420 720w',
55
- original: 'https://picsum.photos/720/420',
56
- src: {
57
- __typename: 'CustomRendition',
58
- url: 'https://picsum.photos/720/420',
59
- width: '720',
60
- height: '420'
19
+ const PageEduEventDetailData = {
20
+ id: '285',
21
+ title: 'Becoming a NASA engineer',
22
+ slug: 'becoming-a-nasa-engineer',
23
+ url: '/events/becoming-a-nasa-engineer',
24
+ timezone: 'PST',
25
+ startDate: '2024-08-08',
26
+ startDatetime: '2024-08-08T14:00:00-07:00',
27
+ startTime: '15:00:00',
28
+ endDate: '2024-08-08',
29
+ endDatetime: '2024-08-08T22:00:00-07:00',
30
+ endTime: '22:00:00',
31
+ ongoing: false,
32
+ eventType: 'Workshop',
33
+ topper: '<p data-block-key="yecrn">Event topper</p>',
34
+ summary:
35
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus et luctus nisi. Maecenas vel turpis sem. Nullam ultricies nulla quis nisi faucibus eleifend. In turpis ante, blandit nec dapibus tempor, posuere at erat. In justo quam, imperdiet at hendrerit eget, imperdiet ut orci. ',
36
+ locationName: 'Webcast',
37
+ registerLink: [
38
+ {
39
+ document: null,
40
+ externalLink: 'https://nasa.gov',
41
+ page: null,
42
+ text: 'Registration Link'
43
+ }
44
+ ],
45
+ eventImage: {
46
+ __typename: 'CustomImage',
47
+ srcSet:
48
+ 'https://picsum.photos/720/420 320w, https://picsum.photos/720/420 640w, https://picsum.photos/720/420 720w',
49
+ original: 'https://picsum.photos/720/420',
50
+ src: {
51
+ __typename: 'CustomRendition',
52
+ url: 'https://picsum.photos/720/420',
53
+ width: '720',
54
+ height: '420'
55
+ },
56
+ title: 'Marine Picks First Public Mars Global Surveyor Image',
57
+ alt: '',
58
+ caption:
59
+ '<p data-block-key="y00sz">A close-up view of part of the area imaged by Mars Global Surveyor for its public request program.</p>',
60
+ credit: 'Credit',
61
+ detailUrl: null
62
+ },
63
+ heroConstrain: false,
64
+ heroPosition: 'inline',
65
+ thumbnailImage: {
66
+ alt: '',
67
+ original: 'https://picsum.photos/512/288'
68
+ },
69
+ targetAudience: 'All ages',
70
+
71
+ body: [
72
+ BlockKeyPointsData,
73
+ {
74
+ blockType: 'RichTextBlock',
75
+ value:
76
+ '<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'
77
+ }
78
+ ],
79
+ relatedEvents: [...EventsBlockLinkCarouselData],
80
+ speakers: [
81
+ {
82
+ speaker: {
83
+ host: 'host',
84
+ id: '1',
85
+ internalLink: null,
86
+ name: 'Varoujan Gorjian',
87
+ title: 'Splitzer Research Scientest, JPL'
88
+ }
89
+ },
90
+ {
91
+ speaker: {
92
+ host: 'co-host',
93
+ id: '2',
94
+ image: {
95
+ alt: '',
96
+ src: {
97
+ height: '450',
98
+ url: 'https://picsum.photos/560/560',
99
+ width: '450'
100
+ }
61
101
  },
62
- title: 'Marine Picks First Public Mars Global Surveyor Image',
63
- alt: '',
64
- caption:
65
- '<p data-block-key="y00sz">A close-up view of part of the area imaged by Mars Global Surveyor for its public request program.</p>',
66
- credit: 'Credit',
67
- detailUrl: null
68
- },
69
- thumbnailImage: {
70
- alt: '',
71
- original: 'https://picsum.photos/512/288'
72
- },
73
- targetAudience: 'All ages',
74
- body: [
75
- BlockKeyPointsData,
76
- {
77
- blockType: 'RichTextBlock',
78
- value:
79
- '<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'
80
- }
81
- ],
82
- relatedEvents: [...EventsBlockLinkCarouselData],
83
- speakers: [
102
+ internalLink: null,
103
+ name: 'Robert Hurt',
104
+ title: 'Splitzer visualisation'
105
+ }
106
+ }
107
+ ],
108
+ relatedLinks: [
109
+ {
110
+ blockType: 'RelatedLinksBlock',
111
+ heading: 'Related Links',
112
+ links: [
84
113
  {
85
- host: 'host',
86
- id: '1',
87
- internalLink: null,
88
- name: 'Varoujan Gorjian',
89
- title: 'Splitzer Research Scientest, JPL'
114
+ document: null,
115
+ externalLink: 'http://www.google.com',
116
+ page: null,
117
+ text: 'Lorem ipsum dolor'
90
118
  },
91
119
  {
92
- host: 'co-host',
93
- id: '2',
94
- image: {
95
- alt: '',
96
- src: {
97
- height: '450',
98
- url: 'https://picsum.photos/560/560',
99
- width: '450'
100
- }
101
- },
102
- internalLink: null,
103
- name: 'Robert Hurt',
104
- title: 'Splitzer visualisation'
120
+ document: null,
121
+ externalLink: 'http://www.google.com',
122
+ page: null,
123
+ text: 'Sit amet consectatur'
105
124
  }
106
- ],
107
- relatedLinks: [
108
- {
109
- blockType: 'RelatedLinksBlock',
110
- heading: 'Related Links',
111
- links: [
112
- {
113
- document: null,
114
- externalLink: 'http://www.google.com',
115
- page: null,
116
- text: 'Lorem ipsum dolor'
117
- },
118
- {
119
- document: null,
120
- externalLink: 'http://www.google.com',
121
- page: null,
122
- text: 'Sit amet consectatur'
123
- }
124
- ]
125
- }
126
- ],
127
- relatedContent: BlockLinkCardCarouselData
125
+ ]
126
+ }
127
+ ],
128
+ relatedContent: BlockLinkCardCarouselData
129
+ }
130
+ // stories
131
+ export const BaseStory = {
132
+ name: 'PageEduEventDetail',
133
+ args: { data: PageEduEventDetailData }
134
+ }
135
+
136
+ export const CustomDate = {
137
+ args: {
138
+ data: {
139
+ ...PageEduEventDetailData,
140
+ startDate: '2024-08-08',
141
+ startDatetime: null,
142
+ startTime: null,
143
+ endDate: '2024-08-08',
144
+ endDatetime: '2024-08-08T22:00:00-07:00',
145
+ endTime: null,
146
+ customDate: 'Custom date information',
147
+ ongoing: false
148
+ }
149
+ }
150
+ }
151
+
152
+ export const MultiDayEvent = {
153
+ args: {
154
+ data: {
155
+ ...PageEduEventDetailData,
156
+ startDate: '2024-08-08',
157
+ endDate: '2024-08-12',
158
+ startDatetime: '2024-08-08T14:00:00-07:00',
159
+ startTime: '15:00:00',
160
+ endDatetime: '2024-08-12T22:00:00-07:00'
161
+ }
162
+ }
163
+ }
164
+
165
+ export const Ongoing = {
166
+ args: {
167
+ data: {
168
+ ...PageEduEventDetailData,
169
+ ongoing: true
128
170
  }
129
171
  }
130
172
  }