-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: migrating www components (#455)
* adding all icons, adding HeroMedia and related mixins and stores * adding pinia store to nuxt module * porting over all blocks * fixing the majority of components * porting over remaining components * fixing BaseTimer story * adding PageContent * adding plugins to nuxt module * removing queries from explorer-1 components * testing more components in the nuxt module * fixing NavMobile components * fixing store action highlightPrimary * moving PageError to www * lint * fixing bottom border on main navigation
- Loading branch information
1 parent
428feed
commit c27d652
Showing
374 changed files
with
28,809 additions
and
542 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
156 changes: 156 additions & 0 deletions
156
apps/vue-storybook/stories/components/AsteroidWatchWidget.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
import AsteroidWatchWidget from '@explorer-1/vue/src/components/AsteroidWatchWidget/AsteroidWatchWidget.vue' | ||
|
||
export default { | ||
title: 'Components/AsteroidWatchWidget', | ||
component: AsteroidWatchWidget, | ||
excludeStories: /.*Data$/, | ||
decorators: [ | ||
() => ({ | ||
template: `<div id="storyDecorator" class="mt-20"><story/></div>` | ||
}) | ||
], | ||
parameters: { | ||
html: { | ||
root: '#storyDecorator' // to omit decorators from html output | ||
} | ||
}, | ||
argTypes: { | ||
status: { | ||
control: { type: 'text' } | ||
} | ||
} | ||
} | ||
|
||
export const AsteroidWatchWidgetData = { | ||
nextCloseApproaches: [ | ||
{ | ||
name: '(2008 YN2)', | ||
date: '2024-06-05', | ||
sizeFeet: 61, | ||
sizeMeters: 19, | ||
distanceMiles: 2500000, | ||
distanceKilometers: 4020000, | ||
externalLink: 'https://ssd.jpl.nasa.gov/tools/sbdb_lookup.html#/?sstr=2008%20YN2&view=VOP', | ||
comparisonImage: { | ||
image: { | ||
webp: { | ||
url: 'https://d2pn8kiwq2w21t.cloudfront.net/images/asteroid_watchmanagem.2e16d0ba.fill-320x320.format-webp_mp07rlQ.webp', | ||
__typename: 'CustomRendition' | ||
}, | ||
src: { | ||
url: 'https://d2pn8kiwq2w21t.cloudfront.net/images/asteroid_watchmanagementcommandsda.2e16d0ba.fill-320x320_5YFe2jp.png', | ||
__typename: 'CustomRendition' | ||
}, | ||
__typename: 'CustomImage' | ||
}, | ||
text: 'HOUSE-SIZE', | ||
__typename: 'AsteroidSizeComparison' | ||
}, | ||
__typename: 'AsteroidApproach' | ||
}, | ||
{ | ||
name: '(2024 JR17)', | ||
date: '2024-06-05', | ||
sizeFeet: 260, | ||
sizeMeters: 80, | ||
distanceMiles: 4600000, | ||
distanceKilometers: 7400000, | ||
externalLink: 'https://ssd.jpl.nasa.gov/tools/sbdb_lookup.html#/?sstr=2024%20JR17&view=VOP', | ||
comparisonImage: { | ||
image: { | ||
webp: { | ||
url: 'https://d2pn8kiwq2w21t.cloudfront.net/images/asteroid_watchmanagem.2e16d0ba.fill-320x320.format-webp_miCwBak.webp', | ||
__typename: 'CustomRendition' | ||
}, | ||
src: { | ||
url: 'https://d2pn8kiwq2w21t.cloudfront.net/images/asteroid_watchmanagementcommandsda.2e16d0ba.fill-320x320_XtfVXBr.png', | ||
__typename: 'CustomRendition' | ||
}, | ||
__typename: 'CustomImage' | ||
}, | ||
text: 'BUILDING-SIZE', | ||
__typename: 'AsteroidSizeComparison' | ||
}, | ||
__typename: 'AsteroidApproach' | ||
}, | ||
{ | ||
name: '(2021 LW3)', | ||
date: '2024-06-06', | ||
sizeFeet: 270, | ||
sizeMeters: 82, | ||
distanceMiles: 2310000, | ||
distanceKilometers: 3710000, | ||
externalLink: 'https://ssd.jpl.nasa.gov/tools/sbdb_lookup.html#/?sstr=2021%20LW3&view=VOP', | ||
comparisonImage: { | ||
image: { | ||
webp: { | ||
url: 'https://d2pn8kiwq2w21t.cloudfront.net/images/asteroid_watchmanagem.2e16d0ba.fill-320x320.format-webp_miCwBak.webp', | ||
__typename: 'CustomRendition' | ||
}, | ||
src: { | ||
url: 'https://d2pn8kiwq2w21t.cloudfront.net/images/asteroid_watchmanagementcommandsda.2e16d0ba.fill-320x320_XtfVXBr.png', | ||
__typename: 'CustomRendition' | ||
}, | ||
__typename: 'CustomImage' | ||
}, | ||
text: 'BUILDING-SIZE', | ||
__typename: 'AsteroidSizeComparison' | ||
}, | ||
__typename: 'AsteroidApproach' | ||
}, | ||
{ | ||
name: '(2024 LA)', | ||
date: '2024-06-07', | ||
sizeFeet: 77, | ||
sizeMeters: 24, | ||
distanceMiles: 1120000, | ||
distanceKilometers: 1800000, | ||
externalLink: 'https://ssd.jpl.nasa.gov/tools/sbdb_lookup.html#/?sstr=2024%20LA&view=VOP', | ||
comparisonImage: { | ||
image: { | ||
webp: { | ||
url: 'https://d2pn8kiwq2w21t.cloudfront.net/images/asteroid_watchmanagem.2e16d0ba.fill-320x320.format-webp_frsqFOl.webp', | ||
__typename: 'CustomRendition' | ||
}, | ||
src: { | ||
url: 'https://d2pn8kiwq2w21t.cloudfront.net/images/asteroid_watchmanagementcommandsda.2e16d0ba.fill-320x320_QiuTjYV.png', | ||
__typename: 'CustomRendition' | ||
}, | ||
__typename: 'CustomImage' | ||
}, | ||
text: 'AIRPLANE-SIZE', | ||
__typename: 'AsteroidSizeComparison' | ||
}, | ||
__typename: 'AsteroidApproach' | ||
}, | ||
{ | ||
name: '(2024 KA1)', | ||
date: '2024-06-07', | ||
sizeFeet: 95, | ||
sizeMeters: 29, | ||
distanceMiles: 1170000, | ||
distanceKilometers: 1880000, | ||
externalLink: 'https://ssd.jpl.nasa.gov/tools/sbdb_lookup.html#/?sstr=2024%20KA1&view=VOP', | ||
comparisonImage: { | ||
image: { | ||
webp: { | ||
url: 'https://d2pn8kiwq2w21t.cloudfront.net/images/asteroid_watchmanagem.2e16d0ba.fill-320x320.format-webp_frsqFOl.webp', | ||
__typename: 'CustomRendition' | ||
}, | ||
src: { | ||
url: 'https://d2pn8kiwq2w21t.cloudfront.net/images/asteroid_watchmanagementcommandsda.2e16d0ba.fill-320x320_QiuTjYV.png', | ||
__typename: 'CustomRendition' | ||
}, | ||
__typename: 'CustomImage' | ||
}, | ||
text: 'AIRPLANE-SIZE', | ||
__typename: 'AsteroidSizeComparison' | ||
}, | ||
__typename: 'AsteroidApproach' | ||
} | ||
] | ||
} | ||
|
||
export const Base = { | ||
args: AsteroidWatchWidgetData | ||
} |
24 changes: 24 additions & 0 deletions
24
apps/vue-storybook/stories/components/BackToTop.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import BackToTop from '@explorer-1/vue/src/components/BackToTop/BackToTop.vue' | ||
|
||
export default { | ||
title: 'Components/Utilities/BackToTop', | ||
component: BackToTop | ||
} | ||
|
||
// template | ||
const BackToTopTemplate = (args) => ({ | ||
components: { BackToTop }, | ||
setup() { | ||
return { args } | ||
}, | ||
template: ` | ||
<div style="height: 2000px;"><div class="fixed">Will appear here on scroll: <BackToTop v-show="true" v-bind="args" /></div></div> | ||
` | ||
}) | ||
|
||
export const Default = BackToTopTemplate.bind({}) | ||
Default.storyName = 'BackToTop' | ||
Default.args = { | ||
threshhold: 300, | ||
scrollTo: 0 | ||
} |
29 changes: 29 additions & 0 deletions
29
apps/vue-storybook/stories/components/BaseAudio.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import BaseAudio from '@explorer-1/vue/src/components/BaseAudio/BaseAudio.vue' | ||
|
||
export default { | ||
title: 'Components/Base/BaseAudio', | ||
component: BaseAudio, | ||
decorators: [ | ||
() => ({ | ||
template: `<div id="storyDecorator" class="bg-black p-4 pb-5"><story/></div>` | ||
}) | ||
], | ||
parameters: { | ||
html: { | ||
root: '#storyDecorator' | ||
} | ||
}, | ||
excludeStories: /.*Data$/ | ||
} | ||
|
||
// shared data | ||
export const BaseAudioData = { | ||
file: 'http://127.0.0.1:9000/media/media/05_Da_Funk_Call_Out_Research_Hook.mp3', | ||
autoPlay: false, | ||
loop: false | ||
} | ||
|
||
export const Base = { | ||
name: 'BaseAudio', // single story hoisting | ||
args: BaseAudioData | ||
} |
File renamed without changes.
68 changes: 68 additions & 0 deletions
68
apps/vue-storybook/stories/components/BaseCheckboxGroup.stories.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs' | ||
import BaseCheckboxGroup from '@explorer-1/vue/src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue' | ||
|
||
<Meta | ||
title="Components/Base/BaseCheckboxGroup" | ||
component={BaseCheckboxGroup} | ||
parameters={{ viewMode: 'docs' }} | ||
/> | ||
|
||
export const BaseCheckboxGroupData = { | ||
options: [ | ||
{ | ||
id: 'educators', | ||
title: 'Educators', | ||
text: null | ||
}, | ||
{ | ||
id: 'educator-workshop', | ||
title: 'Educators Workshops', | ||
text: 'Southern California' | ||
}, | ||
{ | ||
id: 'students', | ||
title: 'Students K-12', | ||
text: null | ||
}, | ||
{ | ||
id: 'internships', | ||
title: 'Internships', | ||
text: null | ||
} | ||
], | ||
group: 'edumail', | ||
heading: 'JPL Education Groups', | ||
subHeading: | ||
'The JPL Education Office also offers email updates about classroom activities and workshops for educators, projects and competitons for K-12 students and internship opportunities at JPL and NASA.', | ||
title: 'Education Email Groups' | ||
} | ||
|
||
export const BaseCheckboxGroupTemplate = (args) => ({ | ||
props: Object.keys(args), | ||
components: { BaseCheckboxGroup }, | ||
template: `<BaseCheckboxGroup :options="options" :group="group" :heading="heading" :sub-heading="subHeading" :title="title" | ||
></BaseCheckboxGroup>` | ||
}) | ||
|
||
# Base Checkbox Group | ||
|
||
## Usage | ||
|
||
The BaseCheckboxGroup component is expected to contain an array of options and a grouping name with the goal of selecting multiple options. | ||
|
||
<Canvas> | ||
<Story | ||
name="Default" | ||
args={BaseCheckboxGroupData} | ||
> | ||
{BaseCheckboxGroupTemplate.bind({})} | ||
</Story> | ||
</Canvas> | ||
|
||
## Props | ||
|
||
<ArgsTable for={BaseCheckboxGroup} /> | ||
|
||
## Example data | ||
|
||
<code language="json">{JSON.stringify(BaseCheckboxGroupData, null, 2)}</code> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.