@explorer-1/vue 0.0.3 → 0.1.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 (64) hide show
  1. package/dist/explorer-1-vue.js +4555 -4478
  2. package/dist/explorer-1-vue.umd.cjs +16 -16
  3. package/dist/src/components/BaseAudio/BaseAudio.vue.d.ts +4 -4
  4. package/dist/src/components/BaseVideo/BaseVideo.stories.d.ts +2 -5
  5. package/dist/src/components/BlockImageCarousel/BlockImageCarousel.vue.d.ts +8 -0
  6. package/dist/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.d.ts +32 -8
  7. package/dist/src/components/EventDetailHero/EventDetailHero.vue.d.ts +2 -2
  8. package/dist/src/components/HeroMedia/HeroMedia.stories.d.ts +0 -3
  9. package/dist/src/components/HomepageCarousel/HomepageCarousel.stories.d.ts +6 -0
  10. package/dist/src/components/NavDesktop/NavDesktop.stories.d.ts +3 -3
  11. package/dist/src/components/NavMobile/NavMobile.stories.d.ts +3 -3
  12. package/dist/src/docs/foundation/themes.stories.d.ts +1 -12
  13. package/dist/src/templates/PageContent/PageContent.stories.d.ts +0 -3
  14. package/dist/src/templates/PageEventDetail/PageEventDetail.stories.d.ts +0 -3
  15. package/dist/style.css +1 -1
  16. package/package.json +2 -2
  17. package/src/components/BaseAudio/BaseAudio.stories.js +1 -1
  18. package/src/components/BaseAudio/BaseAudio.vue +89 -57
  19. package/src/components/BaseImage/BaseImage.vue +1 -0
  20. package/src/components/BaseTimer/BaseTimer.vue +1 -0
  21. package/src/components/BaseVideo/BaseVideo.stories.js +2 -4
  22. package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +1 -0
  23. package/src/components/BlockImageCarousel/BlockImageCarousel.vue +7 -0
  24. package/src/components/BlockImageGallery/BlockImageGallery.vue +1 -0
  25. package/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.js +15 -14
  26. package/src/components/BlockQuote/BlockQuote.vue +1 -0
  27. package/src/components/BlockTable/BlockTable.vue +1 -1
  28. package/src/components/EventDetailHero/EventDetailHero.vue +12 -6
  29. package/src/components/FormContact/FormContact.vue +1 -1
  30. package/src/components/FormNewsletterSignup/FormNewsletterSignup.vue +1 -1
  31. package/src/components/HeroListingIndex/HeroListingIndex.stories.js +2 -4
  32. package/src/components/HeroMedia/HeroMedia.stories.js +0 -5
  33. package/src/components/HeroMedia/HeroMedia.vue +2 -1
  34. package/src/components/HomepageCarousel/HomepageCarousel.stories.js +3 -0
  35. package/src/components/HomepageCarouselItem/HomepageCarouselItem.vue +1 -0
  36. package/src/components/MissionDetailHero/MissionDetailHero.vue +1 -0
  37. package/src/components/MissionDetailStats/MissionDetailStats.vue +2 -2
  38. package/src/components/MissionDetailStats/MissionDetailStatsMicro.vue +1 -1
  39. package/src/components/MissionDetailStats/MissionDetailStatsMini.vue +3 -3
  40. package/src/components/MixinCarousel/MixinCarousel.stories.js +2 -2
  41. package/src/components/MixinCarousel/MixinCarousel.vue +5 -2
  42. package/src/components/MixinFancybox/MixinFancybox.vue +1 -0
  43. package/src/components/NavDesktop/NavDesktop.stories.js +1 -1
  44. package/src/components/NavDesktop/NavDesktopDropdownContent.vue +1 -1
  45. package/src/components/NavDesktop/NavDesktopDropdownMore.vue +1 -1
  46. package/src/components/NavHeading/NavHeading.stories.js +1 -1
  47. package/src/components/NavHeading/NavHeading.vue +2 -2
  48. package/src/components/NavLinkList/NavLinkList.stories.js +1 -1
  49. package/src/components/NavSocial/NavSocial.stories.js +1 -1
  50. package/src/components/SearchFilterGroup/SearchFilterGroup.vue +1 -1
  51. package/src/components/SearchResultCard/SearchResultCard.vue +2 -1
  52. package/src/components/TheFooter/TheFooter.vue +1 -1
  53. package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.vue +1 -1
  54. package/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.vue +2 -2
  55. package/src/docs/foundation/DynamicTokens.vue +4 -4
  56. package/src/docs/foundation/color.docs.mdx +50 -45
  57. package/src/docs/foundation/themes.docs.mdx +8 -2
  58. package/src/docs/foundation/themes.stories.js +0 -35
  59. package/src/templates/PageContent/PageContent.stories.js +0 -5
  60. package/src/templates/PageContent/PageContent.vue +62 -37
  61. package/src/templates/PageEventDetail/PageEventDetail.stories.js +0 -5
  62. package/src/templates/PageEventDetail/PageEventDetail.vue +32 -0
  63. package/src/templates/edu/PageEduNewsDetail.vue +9 -1
  64. package/src/utils/dayjs.js +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorer-1/vue",
3
- "version": "0.0.3",
3
+ "version": "0.1.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -28,7 +28,7 @@
28
28
  "vue": "^3.4.21",
29
29
  "vue-observe-visibility": "^1.0.0",
30
30
  "vue3-compare-image": "^1.2.5",
31
- "@explorer-1/common": "1.0.1"
31
+ "@explorer-1/common": "1.0.3"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@vitejs/plugin-vue": "^5.0.4",
@@ -18,7 +18,7 @@ export default {
18
18
 
19
19
  // shared data
20
20
  export const BaseAudioData = {
21
- file: 'http://127.0.0.1:9000/media/media/05_Da_Funk_Call_Out_Research_Hook.mp3',
21
+ file: '/audio/file_example_MP3_700KB.mp3',
22
22
  autoPlay: false,
23
23
  loop: false
24
24
  }
@@ -118,7 +118,6 @@
118
118
  </div>
119
119
  </template>
120
120
  <script lang="ts">
121
- // @ts-nocheck
122
121
  import { defineComponent } from 'vue'
123
122
  import IconPlay from './../Icons/IconPlay.vue'
124
123
  import IconPause from './../Icons/IconPause.vue'
@@ -136,7 +135,7 @@ export const generateUUID = () => {
136
135
  })
137
136
  }
138
137
 
139
- export const convertTimeHHMMSS = (val) => {
138
+ export const convertTimeHHMMSS = (val: any) => {
140
139
  const hhmmss = new Date(val * 1000).toISOString().substr(11, 8)
141
140
  return hhmmss.indexOf('00:') === 0 ? hhmmss.substr(3) : hhmmss
142
141
  }
@@ -161,7 +160,20 @@ export default defineComponent({
161
160
  default: false
162
161
  }
163
162
  },
164
- data() {
163
+ data(): {
164
+ firstPlay: boolean
165
+ isMuted: boolean
166
+ loaded: boolean
167
+ playing: boolean
168
+ paused: boolean
169
+ progressStyle: string
170
+ currentTime: string
171
+ uuid: string
172
+ audio?: HTMLAudioElement
173
+ totalDuration: number
174
+ hideVolumeSlider: boolean
175
+ volumeValue: number
176
+ } {
165
177
  return {
166
178
  firstPlay: true,
167
179
  isMuted: false,
@@ -191,89 +203,106 @@ export default defineComponent({
191
203
  this.init()
192
204
  },
193
205
  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)
206
+ if (this.audio) {
207
+ this.audio.removeEventListener('timeupdate', this._handlePlayingUI)
208
+ this.audio.removeEventListener('loadeddata', this._handleLoaded)
209
+ this.audio.removeEventListener('pause', this._handlePlayPause)
210
+ this.audio.removeEventListener('play', this._handlePlayPause)
211
+ }
198
212
  },
199
213
  methods: {
200
- setPosition: function name(e) {
201
- const tag = e.target
202
- if (this.paused) return
214
+ setPosition: function name(e: any) {
215
+ if (this.audio) {
216
+ const tag = e.target
217
+ if (this.paused) return
203
218
 
204
- if (e.target.tagName === 'SPAN') {
205
- return
219
+ if (e.target.tagName === 'SPAN') {
220
+ return
221
+ }
222
+ const pos = tag.getBoundingClientRect()
223
+ const seekPos = (e.clientX - pos.left) / pos.width
224
+ this.audio.currentTime = this.audio.duration * seekPos
206
225
  }
207
- const pos = tag.getBoundingClientRect()
208
- const seekPos = (e.clientX - pos.left) / pos.width
209
- this.audio.currentTime = parseInt(this.audio.duration * seekPos)
210
226
  },
211
227
  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
- }
228
+ if (this.audio) {
229
+ this.hideVolumeSlider = false
230
+ this.audio.volume = this.volumeValue / 100
231
+ if (this.volumeValue / 100 > 0) {
232
+ this.isMuted = this.audio.muted = false
233
+ }
217
234
 
218
- if (this.volumeValue / 100 === 0) {
219
- this.isMuted = this.audio.muted = true
235
+ if (this.volumeValue / 100 === 0) {
236
+ this.isMuted = this.audio.muted = true
237
+ }
220
238
  }
221
239
  },
222
240
  toggleVolume() {
223
241
  this.hideVolumeSlider = true
224
242
  },
225
243
  stop() {
226
- this.playing = false
227
- this.paused = true
228
- this.audio.pause()
229
- this.audio.currentTime = 0
244
+ if (this.audio) {
245
+ this.playing = false
246
+ this.paused = true
247
+ this.audio.pause()
248
+ this.audio.currentTime = 0
249
+ }
230
250
  },
231
251
  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)
252
+ if (this.playing && !this.paused) {
253
+ return
254
+ } else if (this.audio) {
255
+ this.paused = false
256
+ this.audio.play()
257
+ this.playing = true
258
+ this.$root?.$emit('play', this.uuid)
259
+ }
237
260
  },
238
- forward(duration) {
239
- return (this.audio.currentTime += duration)
261
+ forward(duration: number) {
262
+ return this.audio ? (this.audio.currentTime += duration) : undefined
240
263
  },
241
- rewind(duration) {
242
- return (this.audio.currentTime -= duration)
264
+ rewind(duration: number) {
265
+ return this.audio ? (this.audio.currentTime -= duration) : undefined
243
266
  },
244
267
  pause() {
245
- this.paused = !this.paused
246
- this.paused ? this.audio.pause() : this.audio.play()
268
+ if (this.audio) {
269
+ this.paused = !this.paused
270
+ this.paused ? this.audio.pause() : this.audio.play()
271
+ }
247
272
  },
248
- pauseOthers(activeUuid) {
249
- if (this.uuid !== activeUuid) {
273
+ pauseOthers(activeUuid: string) {
274
+ if (this.audio && this.uuid !== activeUuid) {
250
275
  this.paused = true
251
276
  this.audio.pause()
252
277
  }
253
278
  },
254
279
  toggleMute() {
255
- this.isMuted = !this.isMuted
256
- this.audio.muted = this.isMuted
257
- this.volumeValue = this.isMuted ? 0 : 100
280
+ if (this.audio) {
281
+ this.isMuted = !this.isMuted
282
+ this.audio.muted = this.isMuted
283
+ this.volumeValue = this.isMuted ? 0 : 100
284
+ }
258
285
  },
259
286
  _handleLoaded() {
260
- if (this.audio.readyState >= 2) {
287
+ if (this.audio && this.audio.readyState >= 2) {
261
288
  if (this.autoPlay) this.play()
262
289
 
263
290
  this.loaded = true
264
- this.totalDuration = parseInt(this.audio.duration)
291
+ this.totalDuration = this.audio.duration
265
292
  } else {
266
293
  throw new Error('Failed to load audio file')
267
294
  }
268
295
  },
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)
296
+ _handlePlayingUI(_e: any) {
297
+ if (this.audio) {
298
+ const currTime = this.audio.currentTime
299
+ const percentage = (currTime / this.totalDuration) * 100
300
+ this.progressStyle = `width: ${percentage}%;`
301
+ this.currentTime = convertTimeHHMMSS(currTime)
302
+ }
274
303
  },
275
- _handlePlayPause(e) {
276
- if (e.type === 'play' && this.firstPlay) {
304
+ _handlePlayPause(e: any) {
305
+ if (this.audio && e.type === 'play' && this.firstPlay) {
277
306
  // in some situations, audio.currentTime is the end one on chrome
278
307
  this.audio.currentTime = 0
279
308
  if (this.firstPlay) {
@@ -290,17 +319,20 @@ export default defineComponent({
290
319
  this.paused = this.playing = false
291
320
  },
292
321
  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)
322
+ if (this.audio) {
323
+ this.audio.addEventListener('timeupdate', this._handlePlayingUI)
324
+ this.audio.addEventListener('loadeddata', this._handleLoaded)
325
+ this.audio.addEventListener('pause', this._handlePlayPause)
326
+ this.audio.addEventListener('play', this._handlePlayPause)
327
+ this.audio.addEventListener('ended', this._handleEnded)
328
+ }
298
329
  // TODO: VUE3: find solution for emitting event from slot
299
330
  // TODO: find a cleaner way to do this w/o using mounted or root level events
300
331
  // scoped slots? https://github.com/vuejs/vue/issues/4332
301
- this.$root?.$on('play', this.pauseOthers)
332
+ // this.$root?.$on('play', this.pauseOthers)
302
333
  },
303
334
  getAudio() {
335
+ console.log(this.$el.querySelectorAll('audio')[0])
304
336
  return this.$el.querySelectorAll('audio')[0]
305
337
  }
306
338
  }
@@ -111,6 +111,7 @@ export default defineComponent({
111
111
  :width="width"
112
112
  :height="height"
113
113
  :loading="loading"
114
+ data-chromatic="ignore"
114
115
  @error="imageFailed"
115
116
  />
116
117
  </div>
@@ -34,6 +34,7 @@
34
34
  <span
35
35
  class="text-stats-xl"
36
36
  :class="{ 'text-seconds': unit === 'seconds' }"
37
+ data-chromatic="ignore"
37
38
  >
38
39
  <template v-if="countdown && isPast">00</template>
39
40
  <template v-else>{{ unitValue(unit) }}</template>
@@ -1,6 +1,4 @@
1
1
  import BaseVideo from './BaseVideo.vue'
2
- import videoMp4 from '@explorer-1/common-storybook/src/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.mp4'
3
- import videoWebm from '@explorer-1/common-storybook/src/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.webm'
4
2
 
5
3
  export default {
6
4
  title: 'Components/Base/BaseVideo',
@@ -11,10 +9,10 @@ export default {
11
9
  // shared data
12
10
  export const BaseVideoData = {
13
11
  duration: '8',
14
- file: videoMp4,
12
+ file: '/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.mp4',
15
13
  fileExtension: 'mp4',
16
14
  fileOgg: 'http://127.0.0.1:9000/media/media/NASA-Mars-Helicopter-IngenuityAnimations-7sec.ogv', // no webpack loader for ogg files
17
- fileWebm: videoWebm,
15
+ fileWebm: '/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.webm',
18
16
  height: null,
19
17
  id: '1',
20
18
  sources:
@@ -29,6 +29,7 @@
29
29
  :class="{ lazyload: !lazyNative }"
30
30
  :title="data.title"
31
31
  :data-src="data.url"
32
+ data-chromatic="ignore"
32
33
  width="90%"
33
34
  allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
34
35
  allowfullscreen
@@ -88,6 +88,10 @@ export default defineComponent({
88
88
  type: Array as PropType<Partial<ImageObject>[]>,
89
89
  required: false
90
90
  },
91
+ itemRole: {
92
+ type: String,
93
+ required: false
94
+ },
91
95
  loop: {
92
96
  type: Boolean,
93
97
  default: true
@@ -122,6 +126,9 @@ export default defineComponent({
122
126
  loop: this.loop,
123
127
  // this component has custom pagination
124
128
  pagination: false,
129
+ a11y: {
130
+ slideRole: this.itemRole as string | undefined
131
+ },
125
132
  on: {
126
133
  slideChange: (swiper: Swiper) => {
127
134
  // See https://github.com/vuejs/vue/issues/8721.
@@ -3,6 +3,7 @@
3
3
  v-if="items"
4
4
  class="BlockImageGallery"
5
5
  :items="items"
6
+ item-role="link"
6
7
  :loop="false"
7
8
  :block-id="blockId"
8
9
  >
@@ -160,19 +160,12 @@ export const EventsBlockLinkCarouselData = [
160
160
  }
161
161
  ]
162
162
 
163
- // template
164
- const BlockLinkCarouselTemplate = (args) => ({
165
- props: Object.keys(args),
166
- components: { BlockLinkCarousel },
167
- template: `<BlockLinkCarousel :itemType="itemType" :heading="heading" :items="items"/>`
168
- })
169
-
170
163
  const BlockLinkCarouselMultipleTemplate = (args) => ({
171
164
  components: { BlockLinkCarousel },
172
165
  setup() {
173
166
  return { args }
174
167
  },
175
- template: `<div><BlockLinkCarousel class="mb-20" v-bind="args" /><BlockLinkCarousel item-type="cards" v-bind="args" /></div>`
168
+ template: `<div><BlockLinkCarousel class="mb-20" v-bind="args[0]" /><BlockLinkCarousel v-bind="args[1]" /></div>`
176
169
  })
177
170
 
178
171
  // stories
@@ -209,9 +202,17 @@ export const TwoItems = {
209
202
  }
210
203
 
211
204
  export const MultipleCarousels = BlockLinkCarouselMultipleTemplate.bind({})
212
- MultipleCarousels.args = {
213
- itemType: 'cards',
214
- heading: 'Related Pages',
215
- otherHeading: 'Explore More',
216
- items: BlockLinkCardCarouselData
217
- }
205
+ MultipleCarousels.args = [
206
+ {
207
+ itemType: 'cards',
208
+ heading: 'Related Pages',
209
+ otherHeading: 'Explore More',
210
+ items: BlockLinkCardCarouselData
211
+ },
212
+ {
213
+ itemType: 'cards',
214
+ heading: 'More Related Pages',
215
+ otherHeading: 'Explore Even More',
216
+ items: BlockLinkCardCarouselData
217
+ }
218
+ ]
@@ -17,6 +17,7 @@
17
17
  class="attribution-image"
18
18
  :src="data.thumbnail.src"
19
19
  :alt="data.thumbnail.alt"
20
+ data-chromatic="ignore"
20
21
  />
21
22
 
22
23
  <BaseLink
@@ -13,7 +13,7 @@
13
13
  v-for="(col, index_col) in row.cols"
14
14
  :key="index_col"
15
15
  :class="
16
- row.header ? 'bg-dark-blue text-subtitle text-white' : 'bg-white text-gray-dark'
16
+ row.header ? 'bg-jpl-blue-darker text-subtitle text-white' : 'bg-white text-gray-dark'
17
17
  "
18
18
  class="border-gray-light-mid lg:p-5 p-3 border-b"
19
19
  >
@@ -6,18 +6,20 @@
6
6
  <div class="bg-gray-light">
7
7
  <div class="relative flex items-center mx-auto overflow-hidden vh-crop max-w-screen-3xl">
8
8
  <div class="hero">
9
- <img
9
+ <BaseImage
10
10
  v-if="image.src"
11
- class="object-cover object-center w-full h-full"
12
- :srcset="getSrcSet"
13
11
  :src="image.src.url"
12
+ :srcset="getSrcSet"
13
+ :alt="image.alt"
14
14
  :width="image.src.width"
15
15
  :height="image.src.height"
16
- :alt="image.alt"
16
+ image-class="object-center w-full h-full"
17
+ object-fit-class="cover"
18
+ loading="lazy"
17
19
  />
18
20
  <div
19
21
  v-if="startDateSplit"
20
- class="absolute top-0 left-0 z-10 px-4 py-4 text-center text-white bg-primary"
22
+ class="ThemeVariantLight absolute top-0 left-0 z-10 px-4 py-4 text-center text-white bg-primary"
21
23
  >
22
24
  <div class="font-extrabold text-6xl leading-tight tracking-wider">
23
25
  {{ startDateSplit.day }}
@@ -33,18 +35,22 @@
33
35
  </template>
34
36
  <script lang="ts">
35
37
  import { defineComponent } from 'vue'
38
+ import BaseImage from '../BaseImage/BaseImage.vue'
36
39
  import { mixinGetSrcSet, type EventDateObject } from './../../utils/mixins'
37
40
  import type { PropType } from 'vue'
38
41
 
39
42
  export default defineComponent({
40
43
  name: 'EventDetailHero',
44
+ components: {
45
+ BaseImage
46
+ },
41
47
  props: {
42
48
  data: {
43
49
  type: Object,
44
50
  required: false
45
51
  },
46
52
  startDateSplit: {
47
- type: Object as PropType<EventDateObject>,
53
+ type: Object as PropType<EventDateObject | undefined>,
48
54
  required: true
49
55
  },
50
56
  image: {
@@ -121,7 +121,7 @@
121
121
  >
122
122
  <BaseHeading level="h2">Thank you!</BaseHeading>
123
123
  <div
124
- class="text-jpl-aqua h-22 w-22 p-5 mx-auto my-8 text-6xl font-bold border-4 rounded-full"
124
+ class="text-jpl-blue-light h-22 w-22 p-5 mx-auto my-8 text-6xl font-bold border-4 rounded-full"
125
125
  >
126
126
  &#10003;
127
127
  </div>
@@ -162,7 +162,7 @@
162
162
  >
163
163
  <BaseHeading level="h2">Thank you!</BaseHeading>
164
164
  <div
165
- class="text-jpl-aqua h-22 w-22 p-5 mx-auto my-8 text-6xl font-bold border-4 rounded-full"
165
+ class="text-jpl-blue-light h-22 w-22 p-5 mx-auto my-8 text-6xl font-bold border-4 rounded-full"
166
166
  >
167
167
  &#10003;
168
168
  </div>
@@ -1,5 +1,3 @@
1
- import videoMp4 from '@explorer-1/common-storybook/src/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.mp4'
2
- import videoWebm from '@explorer-1/common-storybook/src/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.webm'
3
1
  import HeroListingIndex from './HeroListingIndex.vue'
4
2
 
5
3
  export default {
@@ -91,8 +89,8 @@ export const NewsVideoHero = {
91
89
  {
92
90
  blockType: 'VideoBlock',
93
91
  video: {
94
- file: videoMp4,
95
- fileWebm: videoWebm
92
+ file: '/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.mp4',
93
+ fileWebm: '/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.webm'
96
94
  }
97
95
  }
98
96
  ]
@@ -4,11 +4,6 @@ import HeroMedia from './HeroMedia.vue'
4
4
  export default {
5
5
  title: 'Components/Heroes/HeroMedia',
6
6
  component: HeroMedia,
7
- decorators: [
8
- () => ({
9
- template: `<div id="storyDecorator" class="absolute inset-0"><story/></div>`
10
- })
11
- ],
12
7
  parameters: {
13
8
  html: {
14
9
  root: '#storyDecorator'
@@ -16,6 +16,7 @@
16
16
  :height="theImageData.src.height"
17
17
  :alt="theImageData.alt"
18
18
  itemprop="image"
19
+ data-chromatic="ignore"
19
20
  />
20
21
  </template>
21
22
  <template v-else-if="video">
@@ -43,7 +44,7 @@
43
44
  <div
44
45
  v-if="hasCaptionArea"
45
46
  :class="captionVisibilityClass"
46
- class="max-w-screen-3xl bg-gray-light bg-opacity-90 lg:bg-opacity-100 lg:block lg:pb-4 lg:px-3 xl:px-8 lg:pt-4 items-start p-4 mx-auto"
47
+ class="max-w-screen-3xl ThemeVariantGray bg-gray-light bg-opacity-90 lg:bg-opacity-100 ThemeVariantGray lg:block lg:pb-4 lg:px-3 xl:px-8 lg:pt-4 items-start p-4 mx-auto"
47
48
  >
48
49
  <BaseImageCaption :data="theImageData || customCaption" />
49
50
  </div>
@@ -94,6 +94,9 @@ export const Shuffled = {
94
94
  args: {
95
95
  items: HomepageCarouselShuffledData(),
96
96
  duration: 10000
97
+ },
98
+ parameters: {
99
+ chromatic: { disableSnapshot: true }
97
100
  }
98
101
  }
99
102
  export const OneSlide = {
@@ -46,6 +46,7 @@
46
46
  :height="item.image.src.height"
47
47
  alt=""
48
48
  loading="lazy"
49
+ data-chromatic="ignore"
49
50
  />
50
51
  </picture>
51
52
  </div>
@@ -20,6 +20,7 @@
20
20
  :width="theBackground.src.width"
21
21
  :height="theBackground.src.height"
22
22
  :alt="hasForeground ? '' : theBackground.alt"
23
+ data-chromatic="ignore"
23
24
  />
24
25
  </div>
25
26
  </div>
@@ -165,7 +165,7 @@ export default defineComponent({
165
165
  }
166
166
 
167
167
  .ThemeVariantDark & .theme {
168
- @apply bg-dark-blue bg-opacity-75 text-white;
168
+ @apply bg-jpl-blue-darker bg-opacity-75 text-white;
169
169
  }
170
170
 
171
171
  .label {
@@ -173,7 +173,7 @@ export default defineComponent({
173
173
  }
174
174
 
175
175
  .ThemeVariantDark & .label {
176
- @apply text-jpl-aqua;
176
+ @apply text-jpl-blue-light;
177
177
  }
178
178
 
179
179
  .legend {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="MissionDetailStatsMicro bg-dark-blue sm:py-0 p-3 py-1 text-white">
2
+ <div class="MissionDetailStatsMicro bg-jpl-blue-darker sm:py-0 p-3 py-1 text-white">
3
3
  <div v-if="showClock && startDateTime">
4
4
  <BaseTimer
5
5
  :target-date-time="startDateTime"
@@ -7,7 +7,7 @@
7
7
  v-if="showClock && startDateTime"
8
8
  class="theme-inner lg:col-span-4 xl:col-span-4 2xl:col-span-3 sm:col-span-7 col-span-11"
9
9
  >
10
- <p class="text-jpl-aqua text-subtitle mb-3">
10
+ <p class="text-jpl-blue-lighter text-subtitle mb-3">
11
11
  {{ clockTypeLabel }}
12
12
  </p>
13
13
  <BaseTimer
@@ -25,7 +25,7 @@
25
25
  :distance-api-urls="distanceApiUrls"
26
26
  >
27
27
  <template #label="slotProps">
28
- <p class="text-jpl-aqua text-subtitle mb-3">
28
+ <p class="text-jpl-blue-lighter text-subtitle mb-3">
29
29
  {{ slotProps.label }}
30
30
  </p>
31
31
  </template>
@@ -82,7 +82,7 @@ export default defineComponent({
82
82
  .MissionDetailStatsMini {
83
83
  .theme,
84
84
  .theme-inner {
85
- @apply bg-dark-blue bg-opacity-75 text-white;
85
+ @apply bg-jpl-blue-darker bg-opacity-75 text-white;
86
86
  }
87
87
  // different padding left for first child, which is dynamic
88
88
  .theme-inner {
@@ -25,7 +25,7 @@ export const Default = {
25
25
  },
26
26
  template: `<MixinCarousel v-bind="args">
27
27
  <div v-for="(item, index) in [1, 2, 3, 4, 5, 6, 7]" :key="index" class="swiper-slide">
28
- <img src="https://picsum.photos/550/483" width="550" height="483" alt="test slide">
28
+ <img src="https://picsum.photos/550/483" width="550" height="483" alt="test slide" data-chromatic="ignore">
29
29
  </div>
30
30
  </MixinCarousel>`
31
31
  })
@@ -46,7 +46,7 @@ export const BaseCarouselWLink = {
46
46
  },
47
47
  template: `<MixinCarousel v-bind="args">
48
48
  <div v-for="(item, index) in [1, 2, 3, 4, 5, 6, 7]" :key="index" class="swiper-slide">
49
- <img src="https://picsum.photos/550/483" width="550" height="483" alt="test slide">
49
+ <img src="https://picsum.photos/550/483" width="550" height="483" alt="test slide" data-chromatic="ignore">
50
50
  </div>
51
51
  </MixinCarousel>`
52
52
  })
@@ -46,7 +46,9 @@
46
46
  <div class="swiper-wrapper">
47
47
  <slot />
48
48
  </div>
49
- <div class="swiper-navigation xl:block absolute top-0 left-0 hidden w-full">
49
+ <div
50
+ class="swiper-navigation xl:block absolute top-0 left-0 hidden w-full ThemeVariantLight"
51
+ >
50
52
  <div class="xl:-ml-22 top-1/2 absolute left-0 z-30 -ml-20">
51
53
  <BaseButton
52
54
  class="swiper-prev xl:text-xl"
@@ -196,7 +198,8 @@ export default defineComponent({
196
198
  initialSlide: this.initialSlide,
197
199
  a11y: {
198
200
  prevSlideMessage: this.heading ? this.heading + ' - Previous slide' : 'Previous slide',
199
- nextSlideMessage: this.heading ? this.heading + ' - Next slide' : 'Next slide'
201
+ nextSlideMessage: this.heading ? this.heading + ' - Next slide' : 'Next slide',
202
+ slideRole: 'link'
200
203
  },
201
204
  breakpoints: {
202
205
  ...MixinCarouselOptions.breakpoints,
@@ -283,6 +283,7 @@ export default defineComponent({
283
283
  <template>
284
284
  <a
285
285
  class="MixinFancybox group cursor-pointer block"
286
+ role="link"
286
287
  aria-label="Open in Lightbox"
287
288
  :href="src"
288
289
  :data-fancybox="galleryName || ''"
@@ -199,7 +199,7 @@ export const NavInverted = {
199
199
  return { args }
200
200
  },
201
201
  template: `<div class="absolute inset-0">
202
- <div style="height:2500px" class="nav-offset bg-dark-blue">
202
+ <div style="height:2500px" class="nav-offset bg-jpl-blue-darker">
203
203
  <NavDesktop v-bind="args" />
204
204
  <div v-if="invertOverride" class="-nav-offset max-w-screen-3xl mx-auto">
205
205
  <img class="w-full h-auto block" src="https://picsum.photos/1600/900" alt="Example Hero" />