@explorer-1/vue 0.3.4 → 0.3.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.
- package/CHANGELOG.md +19 -0
- package/package.json +2 -2
- package/src/components/AboutTheAuthor/AboutTheAuthor.stories.js +1 -1
- package/src/components/AboutTheAuthor/AboutTheAuthor.vue +9 -9
- package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.stories.js +2 -7
- package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.vue +5 -1
- package/src/components/BackToTop/BackToTop.stories.js +1 -1
- package/src/components/BackToTop/BackToTop.vue +10 -0
- package/src/components/BaseAccordionItem/BaseAccordionItem.stories.js +24 -4
- package/src/components/BaseAccordionItem/BaseAccordionItem.vue +56 -17
- package/src/components/BaseAudio/BaseAudio.stories.js +4 -6
- package/src/components/BaseAudio/BaseAudio.vue +6 -0
- package/src/components/BaseButton/BaseButton.stories.ts +12 -23
- package/src/components/BaseButton/BaseButton.vue +34 -10
- package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.stories.js +2 -1
- package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue +5 -0
- package/src/components/BaseHeading/BaseHeading.stories.js +9 -17
- package/src/components/BaseHeading/BaseHeading.vue +18 -8
- package/src/components/BaseImage/BaseImage.stories.ts +7 -17
- package/src/components/BaseImage/BaseImage.vue +26 -14
- package/src/components/BaseImageCaption/BaseImageCaption.stories.js +11 -0
- package/src/components/BaseImageCaption/BaseImageCaption.vue +10 -6
- package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.stories.js +13 -15
- package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.vue +13 -9
- package/src/components/BaseLink/BaseLink.stories.js +8 -7
- package/src/components/BaseLink/BaseLink.vue +32 -21
- package/src/components/BaseModal/BaseModal.stories.js +4 -7
- package/src/components/BaseModal/BaseModal.vue +1 -0
- package/src/components/BaseModal/BaseModalDialog.vue +1 -6
- package/src/components/BasePill/BasePill.stories.js +8 -22
- package/src/components/BasePill/BasePill.vue +36 -19
- package/src/components/BasePlaceholder/BasePlaceholder.stories.js +4 -7
- package/src/components/BasePlaceholder/BasePlaceholder.vue +1 -1
- package/src/components/BaseRadioGroup/BaseRadioGroup.stories.js +1 -0
- package/src/components/BaseRadioGroup/BaseRadioGroup.vue +9 -2
- package/src/components/BaseSwimlane/BaseSwimlane.stories.js +2 -1
- package/src/components/BaseSwimlane/BaseSwimlane.vue +2 -0
- package/src/components/BaseTimer/BaseTimer.stories.js +7 -2
- package/src/components/BaseTimer/BaseTimer.vue +4 -2
- package/src/components/BaseUnitToggle/BaseUnitToggle.stories.js +1 -16
- package/src/components/BaseUnitToggle/BaseUnitToggle.vue +4 -0
- package/src/components/BaseVideo/BaseVideo.vue +7 -3
- package/src/components/BlockAccordion/BlockAccordion.stories.js +4 -2
- package/src/components/BlockAccordion/BlockAccordion.vue +3 -3
- package/src/components/BlockAudio/BlockAudio.stories.js +1 -0
- package/src/components/BlockAudio/BlockAudio.vue +11 -3
- package/src/components/BlockCardGrid/BlockCardGrid.stories.js +1 -1
- package/src/components/BlockCardGrid/BlockCardGrid.vue +1 -1
- package/src/components/BlockCardGridItem/BlockCardGridItem.stories.js +3 -3
- package/src/components/BlockCardGridItem/BlockCardGridItemElement.vue +1 -1
- package/src/components/BlockCircleImageCard/BlockCircleImageCard.stories.js +3 -9
- package/src/components/BlockCsrTable/BlockCsrTable.stories.js +1 -0
- package/src/components/BlockCsrTable/BlockCsrTable.vue +1 -1
- package/src/components/BlockCta/BlockCta.stories.js +1 -0
- package/src/components/BlockCta/BlockCta.vue +9 -2
- package/src/components/BlockDialog/BlockDialog.stories.js +2 -1
- package/src/components/BlockGist/BlockGist.stories.js +3 -2
- package/src/components/BlockGist/BlockGist.vue +8 -6
- package/src/components/BlockHeading/BlockHeading.stories.js +1 -0
- package/src/components/BlockIframeEmbed/BlockIframeEmbed.stories.js +3 -2
- package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +9 -2
- package/src/components/BlockImage/BlockImage.stories.js +1 -5
- package/src/components/BlockImage/BlockImage.vue +5 -2
- package/src/components/BlockImageCarousel/BlockImageCarousel.stories.js +3 -15
- package/src/components/BlockImageCarousel/BlockImageCarousel.vue +2 -0
- package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.stories.js +2 -16
- package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.vue +7 -7
- package/src/components/BlockImageComparison/BlockImageComparison.stories.js +5 -3
- package/src/components/BlockImageComparison/BlockImageComparison.vue +11 -2
- package/src/components/BlockImageGallery/BlockImageGallery.stories.js +4 -11
- package/src/components/BlockImageGallery/BlockImageGallery.vue +5 -0
- package/src/components/BlockInlineImage/BlockInlineImage.stories.js +5 -2
- package/src/components/BlockInlineImage/BlockInlineImage.vue +20 -7
- package/src/components/BlockKeyPoints/BlockKeyPoints.stories.js +1 -0
- package/src/components/BlockKeyPoints/BlockKeyPoints.vue +12 -3
- package/src/components/BlockLinkCard/BlockLinkCard.stories.js +24 -34
- package/src/components/BlockLinkCard/BlockLinkCard.vue +28 -9
- package/src/components/BlockLinkCard/BlockLinkCardCollectionLg.vue +2 -2
- package/src/components/BlockLinkCardList/BlockLinkCardList.stories.js +1 -3
- package/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.js +2 -14
- package/src/components/BlockLinkCarousel/BlockLinkCarousel.vue +8 -8
- package/src/components/BlockLinkTile/BlockLinkTile.stories.js +3 -13
- package/src/components/BlockLinkTile/BlockLinkTile.vue +26 -13
- package/src/components/BlockListCards/BlockListCards.stories.js +1 -0
- package/src/components/BlockListCards/BlockListCards.vue +5 -4
- package/src/components/BlockNewsletterSignup/BlockNewsletterSignup.stories.js +1 -0
- package/src/components/BlockNewsletterSignup/BlockNewsletterSignup.vue +3 -2
- package/src/components/BlockQuote/BlockQuote.stories.js +1 -0
- package/src/components/BlockQuote/BlockQuote.vue +3 -2
- package/src/components/BlockRelatedLinks/BlockRelatedLinks.stories.js +1 -0
- package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +6 -4
- package/src/components/BlockRichTable/BlockRichTable.stories.js +1 -1
- package/src/components/BlockRichTable/BlockRichTable.vue +23 -9
- package/src/components/BlockStreamfield/BlockStreamfield.stories.js +1 -11
- package/src/components/BlockStreamfield/BlockStreamfield.vue +34 -31
- package/src/components/BlockTeaser/BlockTeaser.stories.js +1 -0
- package/src/components/BlockTeaser/BlockTeaser.vue +20 -12
- package/src/components/BlockText/BlockText.stories.js +2 -9
- package/src/components/BlockText/BlockText.vue +21 -9
- package/src/components/BlockVideo/BlockVideo.stories.js +1 -0
- package/src/components/BlockVideo/BlockVideo.vue +14 -3
- package/src/components/BlockVideoEmbed/BlockVideoEmbed.stories.js +1 -0
- package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +6 -3
- package/src/components/CalendarButton/CalendarButton.vue +7 -0
- package/src/components/DetailHeadline/DetailHeadline.stories.js +2 -20
- package/src/components/DetailHeadline/DetailHeadline.vue +16 -4
- package/src/components/DsnWidget/DsnWidget.stories.js +2 -6
- package/src/components/DsnWidget/DsnWidget.vue +18 -4
- package/src/components/EventDetailHero/EventDetailHero.stories.js +10 -7
- package/src/components/EventDetailHero/EventDetailHero.vue +4 -7
- package/src/components/FormContact/FormContact.stories.js +2 -1
- package/src/components/FormNewsletterSignup/FormNewsletterSignup.stories.js +2 -1
- package/src/components/HeroInlineMedia/HeroInlineMedia.vue +12 -8
- package/src/components/HeroLarge/HeroLarge.stories.js +27 -2
- package/src/components/HeroLarge/HeroLarge.vue +12 -5
- package/src/components/HeroListingIndex/HeroListingIndex.stories.js +1 -0
- package/src/components/HeroListingIndex/HeroListingIndex.vue +18 -13
- package/src/components/HeroMedia/HeroMedia.stories.js +14 -9
- package/src/components/HeroMedia/HeroMedia.vue +9 -8
- package/src/components/HeroMedium/HeroMedium.stories.js +19 -4
- package/src/components/HeroMedium/HeroMedium.vue +32 -14
- package/src/components/HeroMedium/HeroSmall.stories.js +20 -6
- package/src/components/HomepageCarousel/HomepageCarousel.stories.js +1 -1
- package/src/components/HomepageCarouselItem/HomepageCarouselItem.stories.js +2 -2
- package/src/components/HomepageCarouselItem/HomepageCarouselItem.vue +2 -6
- package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.vue +2 -2
- package/src/components/LogoCaltech/LogoCaltech.stories.js +14 -18
- package/src/components/LogoCaltech/LogoCaltech.vue +1 -0
- package/src/components/LogoTribrand/LogoTribrand.stories.js +66 -51
- package/src/components/LogoTribrand/LogoTribrand.vue +4 -2
- package/src/components/MetaPanel/MetaPanel.stories.js +5 -9
- package/src/components/MetaPanel/MetaPanel.vue +3 -0
- package/src/components/MetaPanelItems/MetaPanelItems.stories.js +9 -2
- package/src/components/MetaPanelItems/MetaPanelItems.vue +2 -0
- package/src/components/MetadataEduResource/MetadataEduResource.stories.js +12 -10
- package/src/components/MetadataEduResource/MetadataEduResource.vue +7 -3
- package/src/components/MetadataEvent/MetadataEvent.stories.js +1 -1
- package/src/components/MissionDetailAbout/MissionDetailAbout.vue +1 -1
- package/src/components/MissionDetailHero/MissionDetailHero.stories.js +2 -2
- package/src/components/MissionDetailHighlights/MissionDetailHighlights.stories.js +1 -0
- package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.stories.js +1 -6
- package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.vue +10 -5
- package/src/components/MissionDetailStats/DistanceStats.vue +10 -5
- package/src/components/MissionDetailStats/MissionDetailStats.stories.js +4 -21
- package/src/components/MissionDetailStats/MissionDetailStats.vue +21 -5
- package/src/components/MissionDetailStreamfield/MissionDetailStreamfield.vue +4 -2
- package/src/components/MixinAnimationCaret/MixinAnimationCaret.stories.ts +7 -0
- package/src/components/MixinAnimationCaret/MixinAnimationCaret.vue +12 -6
- package/src/components/MixinCarousel/MixinCarousel.stories.js +2 -8
- package/src/components/MixinCarousel/MixinCarousel.vue +13 -16
- package/src/components/MixinVideoBg/MixinVideoBg.stories.js +1 -1
- package/src/components/MixinVideoBg/MixinVideoBg.vue +4 -7
- package/src/components/NavDesktop/NavDesktop.stories.js +1 -0
- package/src/components/NavDesktop/NavDesktop.vue +4 -4
- package/src/components/NavDesktop/NavDesktopTopHat.vue +4 -4
- package/src/components/NavDesktopEdu/NavDesktopEdu.stories.js +1 -5
- package/src/components/NavDesktopEdu/NavDesktopEdu.vue +4 -4
- package/src/components/NavHeading/NavHeading.stories.js +3 -2
- package/src/components/NavHighlight/NavHighlight.stories.js +3 -2
- package/src/components/NavJumpMenu/NavJumpMenu.stories.js +5 -2
- package/src/components/NavLinkList/NavLinkList.stories.js +3 -2
- package/src/components/NavLinkList/NavLinkList.vue +3 -3
- package/src/components/NavLogoLinks/NavLogoLinks.stories.js +1 -0
- package/src/components/NavMobile/NavMobile.stories.js +13 -2
- package/src/components/NavMobile/NavMobile.vue +18 -5
- package/src/components/NavMobile/NavMobileDropdown.vue +2 -2
- package/src/components/NavMobile/NavMobileEdu.stories.js +11 -4
- package/src/components/NavMobile/NavMobileLink.vue +4 -4
- package/src/components/NavSearchForm/NavSearchForm.stories.js +1 -0
- package/src/components/NavSecondary/NavSecondary.stories.js +1 -0
- package/src/components/NavSecondary/NavSecondary.vue +7 -4
- package/src/components/NavSecondary/NavSecondaryDropdownContent.vue +1 -1
- package/src/components/NavSocial/NavSocial.stories.js +1 -0
- package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.stories.js +2 -1
- package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.vue +1 -1
- package/src/components/ParallaxContainer/ParallaxContainer.stories.js +2 -2
- package/src/components/ParallaxContainer/ParallaxContainer.vue +1 -0
- package/src/components/PodcastSeriesCarousel/PodcastSeriesCarousel.vue +6 -5
- package/src/components/RoboticsDetailStats/RoboticsDetailStats.stories.js +3 -8
- package/src/components/SearchFilterGroup/SearchFilterGroup.stories.js +1 -0
- package/src/components/SearchInput/SearchInput.stories.js +1 -0
- package/src/components/SearchPagination/SearchPagination.stories.js +1 -0
- package/src/components/SearchResultCard/SearchResultCard.stories.js +1 -10
- package/src/components/SearchResultCard/SearchResultCard.vue +1 -0
- package/src/components/SearchResultGridItem/SearchResultGridItem.stories.js +3 -12
- package/src/components/SearchResultGridItem/SearchResultGridItem.vue +5 -2
- package/src/components/SearchResultsList/SearchResultsList.stories.js +3 -3
- package/src/components/SearchSelectMenu/SearchSelectMenu.stories.js +2 -1
- package/src/components/SwimlaneCTA/SwimlaneCTA.vue +1 -0
- package/src/components/TextArea/TextArea.stories.js +2 -1
- package/src/components/TextInput/TextInput.stories.js +2 -1
- package/src/components/TheFooter/TheFooter.stories.js +1 -0
- package/src/components/TheFooter/TheFooter.vue +30 -4
- package/src/components/ThumbnailCarousel/ThumbnailCarousel.stories.js +1 -1
- package/src/components/ThumbnailCarousel/ThumbnailCarousel.vue +2 -1
- package/src/components/TimelineDialog/TimelineDialog.vue +2 -2
- package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.stories.js +1 -0
- package/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.stories.js +2 -2
- package/src/components/TopicDetailMore/TopicDetailMore.stories.js +1 -0
- package/src/components/TopicDetailMoreItem/TopicDetailMoreItem.stories.js +3 -2
- package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.vue +2 -2
- package/src/constants.ts +3 -5
- package/src/docs/foundation/grid_layouthelpers.stories.js +2 -2
- package/src/docs/introduction.docs.mdx +14 -2
- package/src/interfaces.ts +31 -6
- package/src/templates/PageAudioDetail/PageAudioDetail.vue +2 -2
- package/src/templates/PageContent/PageContent.stories.js +1 -1
- package/src/templates/PageEventDetail/PageEventDetail.stories.js +1 -1
- package/src/templates/PageNewsDetail/PageNewsDetail.stories.js +2 -2
- package/src/templates/edu/PageContentEdu.stories.js +2 -2
- package/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.stories.js +2 -2
- package/src/templates/edu/PageEduEventDetail/PageEduEventDetail.stories.js +1 -1
- package/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.stories.js +2 -2
- package/src/templates/edu/PageEduGalleryDetail/PageEduGalleryDetail.stories.js +1 -1
- package/src/templates/edu/PageEduGalleryDetail/PageEduGalleryDetail.vue +10 -6
- package/src/templates/edu/PageEduHome/PageEduHome.stories.js +1 -1
- package/src/templates/edu/PageEduLesson/PageEduLesson.stories.js +2 -2
- package/src/templates/edu/PageEduMultimediaDetail/PageEduMultimediaDetail.stories.js +1 -1
- package/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.stories.js +2 -2
- package/src/templates/edu/PageEduStudentProject/PageEduStudentProject.stories.js +2 -2
- package/src/templates/edu/PageEduStudentProject/PageEduStudentProjectSection.vue +10 -6
- package/src/templates/edu/PageEduTeachableMoment/PageEduTeachableMoment.stories.js +2 -2
- package/src/templates/www/PageAsteroidWatchContent/PageAsteroidWatchContent.stories.js +2 -2
- package/src/templates/www/PageAsteroidWatchIndex/PageAsteroidWatchIndex.stories.js +2 -2
- package/src/templates/www/PageGoDirectory/PageGoDirectory.stories.js +2 -2
- package/src/templates/www/PageHomepage/PageHomepage.stories.js +2 -2
- package/src/templates/www/PageMissionDetail/PageMissionDetail.stories.js +2 -2
- package/src/templates/www/PagePodcast/PagePodcast.stories.js +2 -2
- package/src/templates/www/PagePodcastSeason/PagePodcastSeason.stories.js +2 -2
- package/src/templates/www/PagePressKitIndex/PagePressKitIndex.stories.js +2 -2
- package/src/templates/www/PageProfileDetail/PageProfileDetail.stories.js +2 -2
- package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.stories.js +2 -2
- package/src/templates/www/PageTimeline/PageTimeline.stories.js +2 -2
- package/src/templates/www/PageTopicDetail/PageTopicDetail.stories.js +2 -2
- package/src/templates/www/PageTopicDetail/PageTopicDetail.vue +2 -1
- package/src/utils/mixins.ts +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @explorer-1/vue
|
|
2
2
|
|
|
3
|
+
## 0.3.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bc9dbbb: Documentation updates, Storybook improvements.
|
|
8
|
+
|
|
9
|
+
## 0.3.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [c307f7b]
|
|
14
|
+
- @explorer-1/common@1.3.3
|
|
15
|
+
|
|
16
|
+
## 0.3.5
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 0a83db1: Documentation updates, Storybook improvements.
|
|
21
|
+
|
|
3
22
|
## 0.3.4
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@explorer-1/vue",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"vue-bind-once": "^0.2.1",
|
|
32
32
|
"vue3-compare-image": "^1.2.5",
|
|
33
33
|
"vue3-observe-visibility": "^1.0.1",
|
|
34
|
-
"@explorer-1/common": "1.3.
|
|
34
|
+
"@explorer-1/common": "1.3.3"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
@@ -5,17 +5,17 @@ import BlockText from './../BlockText/BlockText.vue'
|
|
|
5
5
|
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
6
6
|
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
/**
|
|
10
|
+
* Array of keyed `{AuthorObject}s`
|
|
11
|
+
*/
|
|
9
12
|
authors: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const props = withDefaults(defineProps<AboutTheAuthorProps>(), {
|
|
16
|
-
authors: undefined
|
|
13
|
+
type: Array as () => {
|
|
14
|
+
author?: AuthorObject
|
|
15
|
+
}[],
|
|
16
|
+
default: () => []
|
|
17
|
+
}
|
|
17
18
|
})
|
|
18
|
-
|
|
19
19
|
const { authors } = reactive(props)
|
|
20
20
|
|
|
21
21
|
const headingString = computed(() => {
|
|
@@ -6,17 +6,12 @@ export default {
|
|
|
6
6
|
excludeStories: /.*Data$/,
|
|
7
7
|
decorators: [
|
|
8
8
|
() => ({
|
|
9
|
-
template: `<div id="
|
|
9
|
+
template: `<div id="storyRoot" class="mt-20"><story/></div>`
|
|
10
10
|
})
|
|
11
11
|
],
|
|
12
12
|
parameters: {
|
|
13
13
|
html: {
|
|
14
|
-
root: '#
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
argTypes: {
|
|
18
|
-
status: {
|
|
19
|
-
control: { type: 'text' }
|
|
14
|
+
root: '#storyRoot' // to omit decorators from html output
|
|
20
15
|
}
|
|
21
16
|
}
|
|
22
17
|
}
|
|
@@ -140,9 +140,13 @@ export default defineComponent({
|
|
|
140
140
|
BaseUnitToggle
|
|
141
141
|
},
|
|
142
142
|
props: {
|
|
143
|
+
/**
|
|
144
|
+
* Array of next close approaches (structure provided by backend)
|
|
145
|
+
*/
|
|
143
146
|
nextCloseApproaches: {
|
|
144
147
|
type: Array as PropType<NextCloseApproach[]>,
|
|
145
|
-
required: false
|
|
148
|
+
required: false,
|
|
149
|
+
default: undefined
|
|
146
150
|
}
|
|
147
151
|
}
|
|
148
152
|
})
|
|
@@ -24,18 +24,28 @@ export default defineComponent({
|
|
|
24
24
|
IconDropdown
|
|
25
25
|
},
|
|
26
26
|
props: {
|
|
27
|
+
/**
|
|
28
|
+
* Threshold (px) of when the button should appear
|
|
29
|
+
*/
|
|
27
30
|
threshold: {
|
|
28
31
|
type: Number,
|
|
29
32
|
required: false,
|
|
30
33
|
default: 300
|
|
31
34
|
},
|
|
35
|
+
/**
|
|
36
|
+
* Pixel offset when scrolling to the top
|
|
37
|
+
*/
|
|
32
38
|
scrollTo: {
|
|
33
39
|
type: Number,
|
|
34
40
|
required: false,
|
|
35
41
|
default: 0
|
|
36
42
|
}
|
|
37
43
|
},
|
|
44
|
+
emits: ['click'],
|
|
38
45
|
data(): {
|
|
46
|
+
/**
|
|
47
|
+
* Dynamically altered value that determines when the button should appear
|
|
48
|
+
*/
|
|
39
49
|
showBackToTop: Boolean
|
|
40
50
|
scrollHandler: DebouncedFunc<() => void> | null
|
|
41
51
|
} {
|
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
import BaseAccordionItem from './BaseAccordionItem.vue'
|
|
2
|
-
import { BlockStreamfieldTruncatedData } from '../BlockStreamfield/BlockStreamfield.stories'
|
|
3
2
|
export default {
|
|
4
3
|
title: 'Components/Base/BaseAccordionItem',
|
|
5
|
-
component: BaseAccordionItem
|
|
4
|
+
component: BaseAccordionItem,
|
|
5
|
+
argTypes: {
|
|
6
|
+
// slots
|
|
7
|
+
header: {
|
|
8
|
+
control: false
|
|
9
|
+
},
|
|
10
|
+
heading: {
|
|
11
|
+
control: false
|
|
12
|
+
},
|
|
13
|
+
default: {
|
|
14
|
+
control: false
|
|
15
|
+
},
|
|
16
|
+
panelContents: {
|
|
17
|
+
control: false
|
|
18
|
+
}
|
|
19
|
+
}
|
|
6
20
|
}
|
|
7
21
|
|
|
8
22
|
// stories
|
|
9
23
|
export const BaseStory = {
|
|
10
24
|
name: 'BaseAccordionItem',
|
|
11
25
|
args: {
|
|
12
|
-
headingLevel: '
|
|
13
|
-
|
|
26
|
+
headingLevel: 'h5',
|
|
27
|
+
|
|
28
|
+
item: {
|
|
29
|
+
title: 'Title for the accordion',
|
|
30
|
+
body: [{ text: 'No default body template. Customize with the `panelContents` slot.' }]
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
header: '<h3>Test</h3>'
|
|
14
34
|
}
|
|
15
35
|
}
|
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Component that includes an accessible clickable header that will expand a panel below it
|
|
4
|
+
*/
|
|
5
|
+
|
|
2
6
|
import { computed, reactive, ref } from 'vue'
|
|
3
|
-
import type { AccordionItemObject } from './../../interfaces.ts'
|
|
7
|
+
import type { AccordionItemObject, HeadingLevels } from './../../interfaces.ts'
|
|
4
8
|
import { uniqueId } from 'lodash'
|
|
5
9
|
import IconPlus from './../Icons/IconPlus.vue'
|
|
6
10
|
import IconMinus from './../Icons/IconMinus.vue'
|
|
7
11
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
/**
|
|
14
|
+
* Semantic heading level
|
|
15
|
+
*/
|
|
16
|
+
headingLevel: {
|
|
17
|
+
type: String as () => HeadingLevels,
|
|
18
|
+
default: 'h2'
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* Data object that includes all content that should be rendered in the accordion item
|
|
22
|
+
*/
|
|
23
|
+
item: {
|
|
24
|
+
type: Object as () => AccordionItemObject,
|
|
25
|
+
default: () =>
|
|
26
|
+
({
|
|
27
|
+
title: undefined,
|
|
28
|
+
body: undefined
|
|
29
|
+
}) as AccordionItemObject
|
|
23
30
|
}
|
|
24
31
|
})
|
|
25
32
|
|
|
@@ -37,6 +44,18 @@ const headingId = computed(() => {
|
|
|
37
44
|
return `block_accordion_heading_${itemId.value}`
|
|
38
45
|
})
|
|
39
46
|
|
|
47
|
+
const emit = defineEmits([
|
|
48
|
+
/**
|
|
49
|
+
* Fires when an item is opened
|
|
50
|
+
* @type {thing}
|
|
51
|
+
*/
|
|
52
|
+
'accordionItemOpened',
|
|
53
|
+
/**
|
|
54
|
+
* Fires when an item is closed
|
|
55
|
+
*/
|
|
56
|
+
'accordionItemClosed'
|
|
57
|
+
])
|
|
58
|
+
|
|
40
59
|
const handleClick = () => {
|
|
41
60
|
ariaExpanded.value = !ariaExpanded.value
|
|
42
61
|
isHidden.value = !isHidden.value
|
|
@@ -47,7 +66,27 @@ const handleClick = () => {
|
|
|
47
66
|
}
|
|
48
67
|
}
|
|
49
68
|
|
|
50
|
-
|
|
69
|
+
defineSlots<{
|
|
70
|
+
/**
|
|
71
|
+
* The entire clickable area of the item, including `heading`.
|
|
72
|
+
* Override with `<template #header>` and requires reconstructing `handleClick()` behavior.
|
|
73
|
+
*/
|
|
74
|
+
header(): void
|
|
75
|
+
/**
|
|
76
|
+
* The heading text within the item header. Override with `<template #heading>`
|
|
77
|
+
*/
|
|
78
|
+
heading(): void
|
|
79
|
+
/**
|
|
80
|
+
* The entire contents of expanded item, including `panelContents`.
|
|
81
|
+
* Override with `<template #default>` and requires reconstructing `aria-labelledby` attributes.
|
|
82
|
+
*/
|
|
83
|
+
default(): void // Use 'void' as the return type
|
|
84
|
+
/**
|
|
85
|
+
* Contents of expanded accordion item. There is no default template.
|
|
86
|
+
* Override with `<template #panelContents>`
|
|
87
|
+
*/
|
|
88
|
+
panelContents(): void
|
|
89
|
+
}>()
|
|
51
90
|
</script>
|
|
52
91
|
<template>
|
|
53
92
|
<div
|
|
@@ -5,22 +5,20 @@ export default {
|
|
|
5
5
|
component: BaseAudio,
|
|
6
6
|
decorators: [
|
|
7
7
|
() => ({
|
|
8
|
-
template: `<div id="
|
|
8
|
+
template: `<div id="storyRoot" class="bg-black p-4 pb-5"><story/></div>`
|
|
9
9
|
})
|
|
10
10
|
],
|
|
11
11
|
parameters: {
|
|
12
12
|
html: {
|
|
13
|
-
root: '#
|
|
13
|
+
root: '#storyRoot'
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
excludeStories: /.*Data$/
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
export const BaseAudioData = {
|
|
19
|
+
const BaseAudioData = {
|
|
21
20
|
file: '/audio/file_example_MP3_700KB.mp3',
|
|
22
|
-
autoPlay: false
|
|
23
|
-
loop: false
|
|
21
|
+
autoPlay: false
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
export const BaseStory = {
|
|
@@ -152,11 +152,17 @@ export default defineComponent({
|
|
|
152
152
|
IconForwardTen
|
|
153
153
|
},
|
|
154
154
|
props: {
|
|
155
|
+
/**
|
|
156
|
+
* Path to audio file
|
|
157
|
+
*/
|
|
155
158
|
file: {
|
|
156
159
|
type: String,
|
|
157
160
|
default: null
|
|
158
161
|
},
|
|
159
162
|
autoPlay: {
|
|
163
|
+
/**
|
|
164
|
+
* If audio should play automatically
|
|
165
|
+
*/
|
|
160
166
|
type: Boolean,
|
|
161
167
|
default: false
|
|
162
168
|
}
|
|
@@ -1,44 +1,32 @@
|
|
|
1
|
-
import BaseButton
|
|
1
|
+
import BaseButton from './BaseButton.vue'
|
|
2
2
|
|
|
3
3
|
// TODO: add the rest of the button stories (icons, disabled, etc.)
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Components/Base/BaseButton',
|
|
6
6
|
component: BaseButton,
|
|
7
7
|
excludeStories: /.*(Data)$/,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
8
|
parameters: {
|
|
10
9
|
slots: {
|
|
11
|
-
default: '
|
|
10
|
+
default: 'The contents of the button, usually text. Override with `<template #default>`',
|
|
11
|
+
icon: 'Appears to the right of the `default` slot. Override with `<template #icon>`',
|
|
12
|
+
afterIcon: 'Appears to the right of the `icon` slot. Override with `<template #afterIcon>`'
|
|
12
13
|
},
|
|
13
14
|
docs: {
|
|
14
15
|
description: {
|
|
15
|
-
component: 'Simple button with
|
|
16
|
+
component: 'Simple button with style variations.'
|
|
16
17
|
}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
argTypes: {
|
|
20
|
-
ariaLabel: {
|
|
21
|
-
type: 'string',
|
|
22
|
-
description:
|
|
23
|
-
"ARIA label. Recommended if your button label isn't descriptive, or if it only contains an icon."
|
|
24
18
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
options: Object.keys(variants),
|
|
32
|
-
table: {
|
|
33
|
-
defaultValue: { summary: 'default' }
|
|
34
|
-
}
|
|
19
|
+
to: {
|
|
20
|
+
description: 'If populated, a router-link will be generated. Overrides `href`'
|
|
21
|
+
},
|
|
22
|
+
click: {
|
|
23
|
+
type: '@click emit'
|
|
35
24
|
}
|
|
36
25
|
}
|
|
37
26
|
}
|
|
38
27
|
|
|
39
28
|
export const BaseButtonData = {
|
|
40
|
-
|
|
41
|
-
ariaLabel: 'Explore',
|
|
29
|
+
ariaLabel: 'Link to learn more',
|
|
42
30
|
compact: false,
|
|
43
31
|
disabled: false,
|
|
44
32
|
to: '/',
|
|
@@ -63,4 +51,5 @@ export const DarkButton = {
|
|
|
63
51
|
...BaseButtonData,
|
|
64
52
|
variant: 'dark'
|
|
65
53
|
}
|
|
54
|
+
// globals: { themeVariant: 'ThemeVariantDark' }
|
|
66
55
|
}
|
|
@@ -1,51 +1,68 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { defineComponent, resolveComponent } from 'vue'
|
|
2
|
+
import { defineComponent, resolveComponent, type PropType } from 'vue'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
[key: string]: string
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const variants: Variants = {
|
|
4
|
+
const variants = {
|
|
9
5
|
primary: '-primary',
|
|
10
6
|
secondary: '-secondary',
|
|
11
7
|
dark: '-dark',
|
|
12
8
|
social: '-social'
|
|
13
|
-
}
|
|
9
|
+
} as const
|
|
10
|
+
type VariantsMapKey = keyof typeof variants
|
|
14
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Simple button with style variations. Can be either a true `<button>` element or a link.
|
|
14
|
+
*/
|
|
15
15
|
export default defineComponent({
|
|
16
16
|
name: 'BaseButton',
|
|
17
17
|
props: {
|
|
18
|
+
/**
|
|
19
|
+
* Button style variants
|
|
20
|
+
*/
|
|
18
21
|
variant: {
|
|
19
|
-
type: String
|
|
22
|
+
type: String as PropType<VariantsMapKey>,
|
|
20
23
|
required: false,
|
|
21
24
|
default: 'primary',
|
|
22
25
|
validator: (prop: string): boolean => Object.keys(variants).includes(prop)
|
|
23
26
|
},
|
|
27
|
+
/** Removes extra left and right padding */
|
|
24
28
|
compact: {
|
|
25
29
|
type: Boolean,
|
|
26
30
|
default: false,
|
|
27
31
|
required: false
|
|
28
32
|
},
|
|
33
|
+
/** Additional arbitrary classes to add to the button */
|
|
29
34
|
blockClasses: {
|
|
30
35
|
type: String,
|
|
31
36
|
required: false,
|
|
32
37
|
default: 'inline-block'
|
|
33
38
|
},
|
|
39
|
+
/** If the button should render as disabled */
|
|
34
40
|
disabled: {
|
|
35
41
|
type: Boolean,
|
|
36
42
|
default: false,
|
|
37
43
|
required: false
|
|
38
44
|
},
|
|
45
|
+
/**
|
|
46
|
+
* ARIA label. Recommended if your button text isn't descriptive, or if it only contains an icon.
|
|
47
|
+
*/
|
|
39
48
|
ariaLabel: {
|
|
40
49
|
type: String,
|
|
41
50
|
default: '',
|
|
42
51
|
required: false
|
|
43
52
|
},
|
|
53
|
+
/**
|
|
54
|
+
* If populated, a router-link will be generated. Overrides `href`.
|
|
55
|
+
* If both `to` and `href` are blank, a `<button>` element will be rendered.
|
|
56
|
+
* */
|
|
44
57
|
to: {
|
|
45
58
|
type: [String, Object],
|
|
46
59
|
required: false,
|
|
47
60
|
default: undefined
|
|
48
61
|
},
|
|
62
|
+
/**
|
|
63
|
+
* Optional link for the button.
|
|
64
|
+
* If both `to` and `href` are blank, a `<button>` element will be rendered.
|
|
65
|
+
* */
|
|
49
66
|
href: {
|
|
50
67
|
type: String,
|
|
51
68
|
required: false,
|
|
@@ -54,6 +71,9 @@ export default defineComponent({
|
|
|
54
71
|
},
|
|
55
72
|
emits: ['click'],
|
|
56
73
|
computed: {
|
|
74
|
+
/**
|
|
75
|
+
* Whether the html element should be `<button>`, `<a>` or `<nuxt-link>`
|
|
76
|
+
*/
|
|
57
77
|
tag() {
|
|
58
78
|
if (this.disabled) {
|
|
59
79
|
return 'button'
|
|
@@ -65,6 +85,9 @@ export default defineComponent({
|
|
|
65
85
|
return 'button'
|
|
66
86
|
}
|
|
67
87
|
},
|
|
88
|
+
/**
|
|
89
|
+
* Necessary for valid html. Guards for `<a>` or `<nuxt-link>` use-cases
|
|
90
|
+
*/
|
|
68
91
|
computedTo() {
|
|
69
92
|
let toValue = this.to
|
|
70
93
|
// filter out unnecessary `/home/` prefix from wagtail default site urlPaths
|
|
@@ -73,8 +96,9 @@ export default defineComponent({
|
|
|
73
96
|
}
|
|
74
97
|
return toValue
|
|
75
98
|
},
|
|
76
|
-
|
|
77
|
-
|
|
99
|
+
/**
|
|
100
|
+
* Necessary for valid html. Guards for `<a>` or `<nuxt-link>` use-cases
|
|
101
|
+
*/
|
|
78
102
|
theHref(): string | undefined {
|
|
79
103
|
let href = undefined
|
|
80
104
|
if (this.tag === 'a') {
|
|
@@ -71,26 +71,31 @@ import type { FormOption } from '../../interfaces'
|
|
|
71
71
|
export default defineComponent({
|
|
72
72
|
name: 'BaseCheckboxGroup',
|
|
73
73
|
props: {
|
|
74
|
+
/** iContact group id */
|
|
74
75
|
group: {
|
|
75
76
|
type: String,
|
|
76
77
|
default: null,
|
|
77
78
|
required: false
|
|
78
79
|
},
|
|
80
|
+
/** Heading */
|
|
79
81
|
heading: {
|
|
80
82
|
type: String,
|
|
81
83
|
default: null,
|
|
82
84
|
required: false
|
|
83
85
|
},
|
|
86
|
+
/** Descriptive text or summary */
|
|
84
87
|
subHeading: {
|
|
85
88
|
type: String,
|
|
86
89
|
default: null,
|
|
87
90
|
required: false
|
|
88
91
|
},
|
|
92
|
+
/** Fieldset title, for screen readers */
|
|
89
93
|
title: {
|
|
90
94
|
type: String,
|
|
91
95
|
default: null,
|
|
92
96
|
required: false
|
|
93
97
|
},
|
|
98
|
+
/** Array of `{FormOption}s` */
|
|
94
99
|
options: {
|
|
95
100
|
type: Array as PropType<FormOption[]>,
|
|
96
101
|
default: null,
|
|
@@ -6,24 +6,9 @@ import IconUser from './../Icons/IconUser.vue'
|
|
|
6
6
|
export default {
|
|
7
7
|
title: 'Components/Base/BaseHeading',
|
|
8
8
|
component: BaseHeading,
|
|
9
|
-
argTypes: {
|
|
10
|
-
size: {
|
|
11
|
-
type: { name: 'string', required: true },
|
|
12
|
-
description: 'The display size of the heading.',
|
|
13
|
-
control: { type: 'select' },
|
|
14
|
-
options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']
|
|
15
|
-
},
|
|
16
|
-
level: {
|
|
17
|
-
type: { name: 'string', required: false },
|
|
18
|
-
description:
|
|
19
|
-
'The semantic heading tag if different from the display size (ex: a heading looks like an `h4`, but semantically, it is an `h1`.',
|
|
20
|
-
control: { type: 'select' },
|
|
21
|
-
options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
9
|
parameters: {
|
|
25
10
|
slots: {
|
|
26
|
-
default: '
|
|
11
|
+
default: 'The contents of the heading, usually text. Override with `<template #default>`'
|
|
27
12
|
},
|
|
28
13
|
docs: {
|
|
29
14
|
description: {
|
|
@@ -71,4 +56,11 @@ const TemplateHeadingsWithIcons = (args) => ({
|
|
|
71
56
|
})
|
|
72
57
|
|
|
73
58
|
export const HeadingsWithIcons = TemplateHeadingsWithIcons.bind({})
|
|
74
|
-
HeadingsWithIcons.args = { size: '
|
|
59
|
+
HeadingsWithIcons.args = { size: 'h3', level: 'h3', default: 'Heading 3 with Icon' }
|
|
60
|
+
HeadingsWithIcons.parameters = {
|
|
61
|
+
docs: {
|
|
62
|
+
description: {
|
|
63
|
+
story: 'Example of overriding the default slot to include an icon component.'
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,29 +1,39 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
import type { Attributes } from './../../interfaces'
|
|
4
|
-
import type { PropType } from 'vue'
|
|
2
|
+
/** Base component for headings. Allows for retaining semantic markup while varying the text size. */
|
|
5
3
|
|
|
6
|
-
|
|
4
|
+
import { defineComponent, type PropType } from 'vue'
|
|
7
5
|
|
|
8
|
-
|
|
6
|
+
type HeadingAttributes = {
|
|
7
|
+
h1: string
|
|
8
|
+
h2: string
|
|
9
|
+
h3: string
|
|
10
|
+
h4: string
|
|
11
|
+
h5: string
|
|
12
|
+
h6: string
|
|
13
|
+
}
|
|
14
|
+
export type HeadingLevel = keyof HeadingAttributes
|
|
15
|
+
|
|
16
|
+
const headings: HeadingAttributes = {
|
|
9
17
|
h1: 'text-h1',
|
|
10
18
|
h2: 'text-h2',
|
|
11
19
|
h3: 'text-h3',
|
|
12
20
|
h4: 'text-h4',
|
|
13
21
|
h5: 'text-h5',
|
|
14
22
|
h6: 'text-h6'
|
|
15
|
-
}
|
|
23
|
+
} as const
|
|
16
24
|
|
|
17
25
|
export default defineComponent({
|
|
18
26
|
name: 'BaseHeading',
|
|
19
27
|
props: {
|
|
28
|
+
/** The semantic heading tag if different from the display size (ex: a heading needs to look like an `h4`, but semantically is an `h1`. */
|
|
20
29
|
level: {
|
|
21
|
-
type: String as PropType<HeadingLevel
|
|
30
|
+
type: String as PropType<HeadingLevel>,
|
|
22
31
|
required: false,
|
|
23
32
|
default: 'h2'
|
|
24
33
|
},
|
|
34
|
+
/** The display size of the heading */
|
|
25
35
|
size: {
|
|
26
|
-
type: String as PropType<HeadingLevel
|
|
36
|
+
type: String as PropType<HeadingLevel>,
|
|
27
37
|
required: false,
|
|
28
38
|
default: ''
|
|
29
39
|
}
|