Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: integrating all page templates from www-frontend #510

Merged
merged 11 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ storybook_compiled
.build-*
.netlify

# Typescript
*.d.ts

# Tailwind
.www-frontend_temp/

Expand Down
6 changes: 4 additions & 2 deletions apps/vue-storybook/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,12 @@ const preview: Preview = {
['Overview', 'MixinAnimationCaret', 'MixinVideoBg', 'MixinCarousel'],
'Utilities',
['Overview', '*'],
'EDU'
'WWW'
],
'Mixins',
['Overview']
['Overview'],
'Templates',
['WWW', 'EDU', 'PageContent']
]
}
}
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
},
"scripts": {
"clean": "pnpm clean:nodemodules && pnpm clean:dist && pnpm clean:nuxt",
"clean:rimraf": "rimraf \"**/node_modules\"",
"clean:cache": "find . -name '.cache' -type d -prune -exec rm -rf '{}' +",
"clean:dist": "find . -name 'dist' -type d -prune -exec rm -rf '{}' +",
"clean:nodemodules": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +",
"clean:nuxt": "find . -name '.nuxt' -type d -prune -exec rm -rf '{}' +",
"clean:nodemodules": "rimraf \"**/node_modules\"",
"clean:cache": "rimraf \"**/.cache\"",
"clean:dist": "rimraf \"**/dist\"",
"clean:nuxt": "rimraf \"**/.nuxt\"",
"refresh": "pnpm clean && pnpm i",
"nuke": "rimraf pnpm-lock.yaml && pnpm refresh",
"nuke-frontend": "rimraf pnpm-lock.yaml && pnpm run refresh",
"nuke": "pnpm run clean:nodemodules && pnpm run nuke-frontend",
"preinstall": "npx --yes only-allow pnpm",
"preupdate": "npx --yes only-allow pnpm",
"lint": "pnpm run -r --if-present lint",
Expand Down
2 changes: 1 addition & 1 deletion packages/html/dist/assets/css/explorer-1.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/html/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<title>JPL Design System Assets</title>
</head>
<body>
<div class="bg-dark-blue py-5 px-4 3xl:px-0 mb-10">
<div class="bg-jpl-blue-darker py-5 px-4 3xl:px-0 mb-10">
<div class="flex items-center justify-between max-w-screen-3xl mx-auto">
<h1 class="text-subtitle text-white">JPL Design System Assets</h1>
<a
Expand Down Expand Up @@ -790,7 +790,7 @@ <h2 class="text-h3">Heading</h2>
</div>
</nav>
</div>
<div class="bg-dark-blue py-8 mt-10 px-4 3xl:px-0">
<div class="bg-jpl-blue-darker py-8 mt-10 px-4 3xl:px-0">
<p class="max-w-screen-3xl text-right text-opacity-50 mx-auto text-subtitle text-white">
Maintained by DesignLab
</p>
Expand Down
5 changes: 1 addition & 4 deletions packages/html/src/components/HeroMedia/HeroMedia.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { HeroMediaTemplate } from './HeroMedia'
export default {
title: 'Components/Blocks/Heroes/Media Only',
excludeStories: /.*Data$/,
decorators: [(Story) => `<div id="storyRoot" class="absolute inset-0">${Story()}</div>`],
argTypes: {
image: {
type: { name: 'array', required: false },
Expand All @@ -24,9 +23,7 @@ export default {
}
},
parameters: {
html: {
root: '#storyRoot'
},
layout: 'fullscreen',
viewMode: 'docs',
docs: {
inlineStories: false,
Expand Down
217 changes: 0 additions & 217 deletions packages/vue/components.d.ts

This file was deleted.

4 changes: 4 additions & 0 deletions packages/vue/lib/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import filters from './../src/utils/filters'
import type { Explorer1Theme } from '../src/interfaces'

// stores
import { useCuratedGalleryStore } from './../src/store/curatedGallery'
import { useHeaderStore } from './../src/store/header'
import { useThemeStore } from './../src/store/theme'
import { useSearchStore } from './../src/store/search'
// mixins
import {
mixinTransparentHeader,
Expand Down Expand Up @@ -211,7 +213,9 @@ export {
type Explorer1Theme,
dayjs,
filters,
useCuratedGalleryStore,
useHeaderStore,
useSearchStore,
useThemeStore,
mixinTransparentHeader,
mixinGetLinkText,
Expand Down
1 change: 0 additions & 1 deletion packages/vue/src/components/BaseAudio/BaseAudio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ export default defineComponent({
// this.$root?.$on('play', this.pauseOthers)
},
getAudio() {
console.log(this.$el.querySelectorAll('audio')[0])
return this.$el.querySelectorAll('audio')[0]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export default {
slots: {
default: 'BaseStory slot content'
},
viewMode: 'docs',
docs: {
description: {
component:
Expand Down
12 changes: 5 additions & 7 deletions packages/vue/src/components/BaseHeading/BaseHeading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,22 @@ export default defineComponent({
name: 'BaseHeading',
props: {
level: {
type: (String as PropType<HeadingLevel>) || null,
type: String as PropType<HeadingLevel | undefined>,
required: false,
default: 'h2',
validator: (prop: string): boolean => Object.keys(headings).includes(prop)
default: 'h2'
},
size: {
type: String as PropType<HeadingLevel>,
type: String as PropType<HeadingLevel | '' | undefined>,
required: false,
default: '',
validator: (prop: string): boolean => Object.keys(headings).includes(prop)
default: ''
}
},
computed: {
computedTag(): string {
if (this.level) {
return this.level
} else {
return this.size
return this.size || 'h2'
}
},
computedClass(): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export default {
component: BasePlaceholder,
excludeStories: /.*Data$/,
parameters: {
viewMode: 'docs',
docs: {
description: {
component: `An animated loading component frequently used as a placeholder for <a href="/story/components-search-searchresultcard--standard-result" target="_blank">SearchResultCard</a>`
Expand Down
5 changes: 2 additions & 3 deletions packages/vue/src/components/BlockAudio/BlockAudio.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ export const BlockAudioData = {
path: '0001'
},
createdAt: '2020-12-10T07:38:30.951546+00:00',
file: 'http://127.0.0.1:9000/media/media/05_Da_Funk_Call_Out_Research_Hook.mp3',
file: '/audio/file_example_MP3_700KB.mp3',
fileExtension: 'mp3',
fileOgg: '',
id: '1',
sources:
"[{'src': 'http://127.0.0.1:9000/media/media/05_Da_Funk_Call_Out_Research_Hook.mp3', 'type': 'audio/mpeg'}]",
sources: "[{'src': '/audio/file_example_MP3_700KB.mp3', 'type': 'audio/mpeg'}]",
thumbnail: '',
title: 'audio file',
type: 'audio'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export default {
export const BlockHeadingData = {
blockType: 'HeadingBlock',
heading: 'Heading Text',
level: 'h3',
size: 'h3'
level: 'h2',
size: 'h2'
}

// stories
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export default {
},
excludeStories: /.*Data$/,
parameters: {
viewMode: 'docs',
docs: {
description: {
component:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
:height="theImageData.src.height"
:alt="theImageData.alt"
object-fit-class="contain"
image-class="swiper-lazy"
loading="lazy"
/>
</BaseImagePlaceholder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
:height="cover.src.height"
alt=""
object-fit-class="cover"
image-class="swiper-lazy"
loading="lazy"
/>
</BaseImagePlaceholder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ export default defineComponent({
},
items: {
type: Array,
required: false
required: false,
default: undefined
},
heading: {
type: String,
required: false
required: false,
default: undefined
}
},
computed: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export default {
component: BlockQuote,
excludeStories: /.*Data$/,
parameters: {
viewMode: 'docs',
docs: {
description: {
component:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,31 @@ export default {
options: Object.keys(variants)
}
},
decorators: [
() => ({
template: `<div id="storyDecorator" class="absolute inset-0"><story/></div>`
})
],
parameters: {
html: {
root: '#storyDecorator'
},
viewMode: 'canvas'
layout: 'fullscreen'
},
excludeStories: /.*(Data)$/
}

export const BlockStreamfieldTruncatedData = {
body: [
BlockKeyPointsData,
BlockHeadingData,
{
blockType: 'RichTextBlock',
value:
'<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'
},
BlockImageComparisonData,
BlockHeadingData,
{
blockType: 'RichTextBlock',
value:
'<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'
},
BlockIframeEmbedData
]
}
export const BlockStreamfieldData = {
body: [
BlockKeyPointsData,
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/src/components/DsnWidget/DsnWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
>
<p
v-if="data.heading"
class="text-subtitle text-jpl-red mb-4"
class="text-subtitle text-primary mb-4"
>
{{ data.heading }}
</p>
Expand All @@ -21,7 +21,7 @@
<template v-else>
<p
v-if="data.heading"
class="text-subtitle text-jpl-red mb-4"
class="text-subtitle text-primary mb-4"
>
{{ data.heading }}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,8 @@ import HomepageEmbedBlock from './HomepageEmbedBlock.vue'
export default {
title: 'Components/WWW/Homepage/HomepageEmbedBlock',
component: HomepageEmbedBlock,
decorators: [
() => ({
template: `<div id="storyDecorator" class="absolute inset-0"><story/></div>`
})
],
parameters: {
html: {
root: '#storyDecorator'
},
layout: 'fullscreen',
viewMode: 'canvas'
},
excludeStories: /.*(Data)$/
Expand Down
Loading
Loading