@explorer-1/vue 0.2.22 → 0.2.24

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 (56) hide show
  1. package/components.d.ts +2 -0
  2. package/dist/explorer-1-vue.js +8119 -7836
  3. package/dist/explorer-1-vue.umd.cjs +14 -14
  4. package/dist/src/components/BaseAccordionItem/BaseAccordionItem.vue.d.ts +54 -0
  5. package/dist/src/components/BaseButton/BaseButton.stories.d.ts +0 -13
  6. package/dist/src/components/BaseButton/BaseButton.vue.d.ts +0 -14
  7. package/dist/src/components/BaseImageCaption/BaseImageCaption.vue.d.ts +18 -0
  8. package/dist/src/components/BaseModal/BaseModal.stories.d.ts +0 -26
  9. package/dist/src/components/BaseSwimlane/BaseSwimlane.vue.d.ts +2 -2
  10. package/dist/src/components/BaseTimer/BaseTimer.vue.d.ts +2 -2
  11. package/dist/src/components/BlockAccordion/BlockAccordion.stories.d.ts +25 -40
  12. package/dist/src/components/BlockAccordion/BlockAccordion.vue.d.ts +51 -0
  13. package/dist/src/components/BlockGist/BlockGist.stories.d.ts +19 -0
  14. package/dist/src/components/BlockGist/BlockGist.vue.d.ts +19 -0
  15. package/dist/src/components/BlockGist/GitHub404.vue.d.ts +2 -0
  16. package/dist/src/components/BlockLinkCard/BlockLinkCard.stories.d.ts +71 -15
  17. package/dist/src/components/BlockLinkCard/BlockLinkCard.vue.d.ts +10 -2
  18. package/dist/src/components/BlockStreamfield/BlockStreamfield.stories.d.ts +127 -27
  19. package/dist/src/components/BlockTeaser/BlockTeaser.vue.d.ts +3 -2
  20. package/dist/src/components/CalendarButton/CalendarButton.vue.d.ts +12 -2
  21. package/dist/src/components/LayoutHelper/LayoutHelper.vue.d.ts +1 -1
  22. package/dist/src/components/MetaPanel/MetaPanel.stories.d.ts +6 -2
  23. package/dist/src/components/MetadataEvent/MetadataEvent.vue.d.ts +8 -0
  24. package/dist/src/components/MixinFancybox/MixinFancybox.vue.d.ts +1 -1
  25. package/dist/src/components/NavDesktop/NavDesktop.stories.d.ts +49 -0
  26. package/dist/src/components/NavDropdownToggle/NavDropdownToggle.vue.d.ts +1 -1
  27. package/dist/src/docs/foundation/grid_layouthelpers.stories.d.ts +4 -4
  28. package/dist/src/interfaces.d.ts +4 -0
  29. package/dist/src/templates/PageContent/PageContent.vue.d.ts +1 -0
  30. package/dist/src/templates/edu/PageContentEdu.stories.d.ts +179 -2
  31. package/dist/src/templates/edu/PageEduEventDetail/PageEduEventDetail.stories.d.ts +37 -18
  32. package/dist/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.stories.d.ts +3 -1
  33. package/dist/src/templates/edu/PageEduLesson/PageEduLesson.stories.d.ts +28 -46
  34. package/dist/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.stories.d.ts +378 -81
  35. package/dist/src/templates/www/PageAsteroidWatchIndex/PageAsteroidWatchIndex.stories.d.ts +126 -27
  36. package/dist/style.css +1 -1
  37. package/package.json +2 -2
  38. package/src/components/BaseAccordionItem/BaseAccordionItem.vue +8 -11
  39. package/src/components/BlockAccordion/BlockAccordion.stories.js +64 -19
  40. package/src/components/BlockAccordion/BlockAccordion.vue +99 -18
  41. package/src/components/BlockLinkCardList/BlockLinkCardList.stories.js +110 -0
  42. package/src/components/BlockLinkCardList/BlockLinkCardList.vue +34 -0
  43. package/src/components/BlockStreamfield/BlockStreamfield.stories.js +2 -0
  44. package/src/components/BlockStreamfield/BlockStreamfield.vue +36 -3
  45. package/src/components/MetadataEduResource/MetadataEduResource.stories.js +4 -1
  46. package/src/components/MetadataEduResource/MetadataEduResource.vue +14 -1
  47. package/src/components/NavJumpMenu/NavJumpMenu.vue +14 -2
  48. package/src/components/NavSecondary/NavSecondaryDropdown.vue +4 -5
  49. package/src/components/NavSecondary/NavSecondaryLink.vue +6 -4
  50. package/src/components/SearchSelectMenu/SearchSelectMenu.vue +1 -1
  51. package/src/docs/foundation/typography.stories.js +2 -0
  52. package/src/interfaces.ts +1 -0
  53. package/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.vue +1 -0
  54. package/src/templates/edu/PageEduLesson/PageEduLesson.vue +1 -0
  55. package/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.vue +1 -0
  56. package/src/utils/rangeifyGrades.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorer-1/vue",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -30,7 +30,7 @@
30
30
  "vue-bind-once": "^0.2.1",
31
31
  "vue-observe-visibility": "^1.0.0",
32
32
  "vue3-compare-image": "^1.2.5",
33
- "@explorer-1/common": "1.1.5"
33
+ "@explorer-1/common": "1.1.6"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@vitejs/plugin-vue": "^5.0.4",
@@ -1,9 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, reactive, ref } from 'vue'
3
- import { AccordionItemObject } from './../../interfaces.ts'
3
+ import type { AccordionItemObject } from './../../interfaces.ts'
4
4
  import { uniqueId } from 'lodash'
5
5
  import IconPlus from './../Icons/IconPlus.vue'
6
- import BlockStreamfield from './../BlockStreamfield/BlockStreamfield.vue'
7
6
 
8
7
  export interface BaseAccordionItemProps {
9
8
  headingLevel?: string
@@ -58,9 +57,12 @@ const emit = defineEmits(['accordionItemOpened', 'accordionItemClosed'])
58
57
  <slot name="header">
59
58
  <div
60
59
  v-if="headingLevel && item"
61
- class="border-b border-gray-light-mid"
60
+ :class="{ 'border-b border-gray-light-mid': isHidden }"
62
61
  >
63
- <component :is="headingLevel">
62
+ <component
63
+ :is="headingLevel"
64
+ class="!font-medium"
65
+ >
64
66
  <button
65
67
  v-bind-once="{ id: headingId, 'aria-controls': panelId }"
66
68
  :aria-expanded="ariaExpanded"
@@ -91,15 +93,10 @@ const emit = defineEmits(['accordionItemOpened', 'accordionItemClosed'])
91
93
  <div
92
94
  v-bind-once="{ id: panelId, 'aria-labelledby': headingId }"
93
95
  role="region"
94
- class="BaseAccordion-panel"
96
+ class="BaseAccordion-panel border-b border-gray-light-mid"
95
97
  >
96
98
  <slot name="panelContents">
97
- <div class="px-4 pb-8">
98
- <BlockStreamfield
99
- :data="item.body"
100
- variant="fluid"
101
- />
102
- </div>
99
+ <pre>{{ item.body }}</pre>
103
100
  </slot>
104
101
  </div>
105
102
  </slot>
@@ -1,29 +1,74 @@
1
1
  import BlockAccordion from './BlockAccordion.vue'
2
- import { BlockStreamfieldTruncatedData } from '../BlockStreamfield/BlockStreamfield.stories'
2
+ import { BlockImageData } from './../BlockImage/BlockImage.stories'
3
3
 
4
4
  export default {
5
5
  title: 'Components/Blocks/BlockAccordion',
6
- component: BlockAccordion
6
+ component: BlockAccordion,
7
+ tags: ['!autodocs'],
8
+ excludeStories: /.*Data$/
7
9
  }
8
10
 
11
+ const AccordionItemStreamfieldData = [
12
+ {
13
+ blockType: 'RichTextBlock',
14
+ value:
15
+ '<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>\n'
16
+ },
17
+ { ...BlockImageData, blockType: 'ImageBlock' },
18
+ {
19
+ blockType: 'RichTextBlock',
20
+ value:
21
+ '<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'
22
+ }
23
+ ]
24
+
25
+ export const BlockAccordionData = {
26
+ blockType: 'AccordionBlock',
27
+ accordionItemsHeadingLevel: '3',
28
+ accordionItems: [
29
+ {
30
+ blockType: 'AccordionItemBlock',
31
+ blocks: [
32
+ {
33
+ blockType: 'CharBlock',
34
+ value: 'First Accordion Item'
35
+ },
36
+ {
37
+ blockType: 'AccordionBodyStreamfieldBlock',
38
+ blocks: AccordionItemStreamfieldData
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ blockType: 'AccordionItemBlock',
44
+ blocks: [
45
+ {
46
+ blockType: 'CharBlock',
47
+ value: 'Second Accordion Item'
48
+ },
49
+ {
50
+ blockType: 'AccordionBodyStreamfieldBlock',
51
+ blocks: AccordionItemStreamfieldData
52
+ }
53
+ ]
54
+ },
55
+ {
56
+ blockType: 'AccordionItemBlock',
57
+ blocks: [
58
+ {
59
+ blockType: 'CharBlock',
60
+ value: 'Third Accordion Item'
61
+ },
62
+ {
63
+ blockType: 'AccordionBodyStreamfieldBlock',
64
+ blocks: AccordionItemStreamfieldData
65
+ }
66
+ ]
67
+ }
68
+ ]
69
+ }
9
70
  // stories
10
71
  export const BaseStory = {
11
72
  name: 'BlockAccordion',
12
- args: {
13
- headingLevel: 'h5',
14
- items: [
15
- {
16
- title: 'Title for the accordion',
17
- body: BlockStreamfieldTruncatedData.body
18
- },
19
- {
20
- title: 'Another',
21
- body: BlockStreamfieldTruncatedData.body
22
- },
23
- {
24
- title: 'Yet another',
25
- body: BlockStreamfieldTruncatedData.body
26
- }
27
- ]
28
- }
73
+ args: { data: BlockAccordionData }
29
74
  }
@@ -1,32 +1,113 @@
1
1
  <script setup lang="ts">
2
- import { reactive } from 'vue'
3
- import { AccordionItemObject } from '../../interfaces'
2
+ import { computed, reactive } from 'vue'
3
+ import type { AccordionItemObject, ImageBlock, ImageObject } from '../../interfaces'
4
4
  import BaseAccordionItem from './../BaseAccordionItem/BaseAccordionItem.vue'
5
+ import BlockImageStandard from './../BlockImage/BlockImageStandard.vue'
6
+ import BlockText from './../BlockText/BlockText.vue'
5
7
 
8
+ interface AccordionItemCharBlock {
9
+ blockType: 'CharBlock'
10
+ value: string
11
+ }
12
+ interface RichTextBlock {
13
+ blockType: 'RichTextBlock'
14
+ text: string
15
+ variant: string
16
+ }
17
+ interface AccordionBodyStreamfieldBlock {
18
+ blockType: 'AccordionBodyStreamfieldBlock'
19
+ blocks: (ImageBlock | RichTextBlock)[]
20
+ }
21
+ interface AccordionItemBlock {
22
+ blockType: 'AccordionItemBlock'
23
+ blocks: (AccordionBodyStreamfieldBlock | AccordionItemCharBlock)[]
24
+ }
25
+ export interface AccordionBlockObject {
26
+ accordionItemsHeadingLevel: string
27
+ accordionItems: AccordionItemBlock[]
28
+ }
6
29
  interface BlockAccordionProps {
7
- autoClose?: boolean
8
- headingLevel?: string
9
- items?: AccordionItemObject[]
30
+ data: AccordionBlockObject
10
31
  }
11
32
 
12
33
  // define props
13
34
  const props = withDefaults(defineProps<BlockAccordionProps>(), {
14
- autoClose: false,
15
- headingLevel: 'h2',
16
- items: undefined
35
+ data: undefined
17
36
  })
18
37
 
19
- const { headingLevel, items } = reactive(props)
38
+ const { data } = reactive(props)
39
+
40
+ const headingLevel = computed(() => {
41
+ return data ? `h${data?.accordionItemsHeadingLevel}` : undefined
42
+ })
43
+
44
+ const remappedAccordionItems = computed((): AccordionItemObject[] | undefined => {
45
+ if (data?.accordionItems) {
46
+ const remappedItems = data.accordionItems.map((item) => {
47
+ let title = ''
48
+ let body: (ImageBlock | RichTextBlock)[] = []
49
+
50
+ item.blocks.forEach((block) => {
51
+ if (block.blockType === 'CharBlock') {
52
+ title = (block as AccordionItemCharBlock).value || ''
53
+ } else if (block.blockType === 'AccordionBodyStreamfieldBlock') {
54
+ body = (block as AccordionBodyStreamfieldBlock).blocks || []
55
+ }
56
+ })
57
+ return {
58
+ title,
59
+ body
60
+ }
61
+ })
62
+ return remappedItems
63
+ }
64
+ return undefined
65
+ })
20
66
  </script>
21
67
  <template>
22
- <div class="BlockAccordion">
23
- <slot>
24
- <BaseAccordionItem
25
- v-for="(item, index) in items"
26
- :key="index"
27
- :heading-level="headingLevel"
28
- :item="item"
29
- />
30
- </slot>
68
+ <div class="BlockAccordion border-t border-gray-light-mid">
69
+ <BaseAccordionItem
70
+ v-for="(item, index) in remappedAccordionItems"
71
+ :key="index"
72
+ :heading-level="headingLevel"
73
+ :item="item"
74
+ >
75
+ <template #panelContents>
76
+ <div
77
+ v-if="item.body"
78
+ class="px-4 pb-8"
79
+ >
80
+ <div
81
+ v-for="(block, block_index) in item.body"
82
+ :key="block_index"
83
+ :class="{ 'mb-5': Number(block_index) + 1 != item.body.length }"
84
+ >
85
+ <template v-if="block.blockType === 'ImageBlock'">
86
+ <BlockImageStandard
87
+ class="AccordionItemImage"
88
+ :data="block.image as ImageObject"
89
+ :caption="block.caption"
90
+ :display-bacpotion="block.displayCaption"
91
+ />
92
+ </template>
93
+ <template v-else-if="block.blockType === 'RichTextBlock'">
94
+ <BlockText
95
+ :text="block.value"
96
+ variant="medium"
97
+ />
98
+ </template>
99
+ </div>
100
+ </div>
101
+ </template>
102
+ </BaseAccordionItem>
31
103
  </div>
32
104
  </template>
105
+ <style lang="scss">
106
+ .BlockAccordion {
107
+ .AccordionItemImage {
108
+ div.p-4 {
109
+ @apply px-0 #{!important};
110
+ }
111
+ }
112
+ }
113
+ </style>
@@ -0,0 +1,110 @@
1
+ import BlockLinkCardList from './BlockLinkCardList.vue'
2
+
3
+ export default {
4
+ title: 'Components/Blocks/BlockLinkCardList',
5
+ component: BlockLinkCardList,
6
+ tags: ['!autodocs'],
7
+ excludeStories: /.*Data$/
8
+ }
9
+ export const BlockLinkCardData = {
10
+ data: {
11
+ url: '/news/placeholder-slug-1',
12
+ title: 'How engineers at NASA-JPL persevered to develop a ventilator',
13
+ slug: 'placeholder-slug-1',
14
+ label: 'Solar System',
15
+ thumbnailImage: {
16
+ src: {
17
+ url: 'https://picsum.photos/512/288',
18
+ width: 512,
19
+ height: 288
20
+ },
21
+ alt: 'Alt text'
22
+ }
23
+ },
24
+ headingLevel: 'h2',
25
+ startDate: undefined,
26
+ endDate: undefined
27
+ }
28
+
29
+ export const BlockLinkCardCarouselData = [
30
+ {
31
+ page: {
32
+ ...BlockLinkCardData.data,
33
+ __typename: 'EDUEventPage',
34
+ startDate: '2021-11-11',
35
+ startDatetime: '2021-11-11T00:00:00-08:00',
36
+ endDatetime: '2021-11-11T23:59:59.999999-08:00',
37
+ endDate: '2021-11-11',
38
+ ongoing: false,
39
+ eventType: 'Workshop'
40
+ }
41
+ },
42
+ {
43
+ page: {
44
+ summary:
45
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse at tortor placerat, varius ante in, imperdiet dolor. Morbi vel arcu eu purus efficitur consequat sit amet vel nisi. Duis convallis volutpat scelerisque.',
46
+
47
+ ...BlockLinkCardData.data,
48
+ __typename: 'EDULessonPage',
49
+ primarySubject: {
50
+ subject: 'Math'
51
+ },
52
+ gradeLevels: [
53
+ { gradeLevel: 'K' },
54
+ { gradeLevel: '1' },
55
+ { gradeLevel: '2' },
56
+ { gradeLevel: '8' }
57
+ ],
58
+ time: {
59
+ time: '1-2 hrs'
60
+ }
61
+ }
62
+ },
63
+ {
64
+ page: {
65
+ ...BlockLinkCardData.data,
66
+ __typename: 'EDUExplainerArticlePage',
67
+ summary:
68
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse at tortor placerat, varius ante in, imperdiet dolor. Morbi vel arcu eu purus efficitur consequat sit amet vel nisi. Duis convallis volutpat scelerisque.',
69
+ primarySubject: {
70
+ subject: 'Engineering'
71
+ },
72
+ gradeLevels: [
73
+ { gradeLevel: 'All Ages' },
74
+ { gradeLevel: 'K' },
75
+ { gradeLevel: '1' },
76
+ { gradeLevel: '2' },
77
+ { gradeLevel: '5' },
78
+ { gradeLevel: '6' },
79
+ { gradeLevel: '7' },
80
+ { gradeLevel: '8' }
81
+ ]
82
+ }
83
+ },
84
+ {
85
+ url: '/news/placeholder-slug-4',
86
+ title: 'How engineers at NASA-JPL persevered to develop a ventilator',
87
+ slug: 'placeholder-slug-4',
88
+ summary:
89
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse at tortor placerat, varius ante in, imperdiet dolor. Morbi vel arcu eu purus efficitur consequat sit amet vel nisi. Duis convallis volutpat scelerisque.',
90
+ label: 'Technology',
91
+ thumbnailImage: {
92
+ src: {
93
+ url: 'https://picsum.photos/512/288',
94
+ width: 512,
95
+ height: 288
96
+ },
97
+ alt: 'Alt text'
98
+ }
99
+ }
100
+ ]
101
+
102
+ // stories
103
+ export const BaseStory = {
104
+ name: 'BlockLinkCardList',
105
+ args: {
106
+ itemType: 'cards',
107
+ heading: 'Related Pages',
108
+ items: BlockLinkCardCarouselData
109
+ }
110
+ }
@@ -0,0 +1,34 @@
1
+ <script setup lang="ts">
2
+ import type { Card } from './../../interfaces'
3
+ import BlockLinkCard from './../BlockLinkCard/BlockLinkCard.vue'
4
+
5
+ export interface BlockLinkCardListProps {
6
+ items: Card[]
7
+ }
8
+
9
+ const props = withDefaults(defineProps<BlockLinkCardListProps>(), {
10
+ items: undefined
11
+ })
12
+ </script>
13
+ <template>
14
+ <div class="BlockLinkCardList">
15
+ <!-- Slides -->
16
+ <BlockLinkCard
17
+ v-for="(item, index) in props.items"
18
+ :key="index"
19
+ class="border-b border-gray-light-mid mb-5"
20
+ :class="{ 'pt-3': index !== 0 }"
21
+ :data="item"
22
+ size="lg"
23
+ />
24
+ </div>
25
+ </template>
26
+ <style lang="scss">
27
+ .BlockLinkCardList {
28
+ .BlockLinkCard {
29
+ div.bg-gray-dark.relative.mb-6 {
30
+ @apply mb-3 #{!important};
31
+ }
32
+ }
33
+ }
34
+ </style>
@@ -1,3 +1,4 @@
1
+ import { BlockAccordionData } from './../BlockAccordion/BlockAccordion.stories'
1
2
  import { BlockCardGridData } from './../BlockCardGrid/BlockCardGrid.stories'
2
3
  import { BlockCtaData } from './../BlockCta/BlockCta.stories'
3
4
  import { BlockHeadingData } from './../BlockHeading/BlockHeading.stories'
@@ -86,6 +87,7 @@ export const BlockStreamfieldData = {
86
87
  heading: 'Heading 2',
87
88
  level: 'h2'
88
89
  },
90
+ BlockAccordionData,
89
91
  {
90
92
  blockType: 'HeadingBlock',
91
93
  heading: 'Heading 3',
@@ -207,6 +207,32 @@
207
207
  <BlockCardGrid :cards="block.items" />
208
208
  </div>
209
209
 
210
+ <div
211
+ v-else-if="block.blockType === 'LinkCarouselBlock' && block.blocks?.length"
212
+ :key="`linkCarouselBlock${index}`"
213
+ class="lg:mb-18 mb-10"
214
+ >
215
+ <BlockLinkCarousel :items="block.blocks" />
216
+ </div>
217
+
218
+ <LayoutHelper
219
+ v-else-if="block.blockType === 'LinkCardListBlock' && block.blocks?.length"
220
+ :key="`linkCardListBlock${index}`"
221
+ indent="col-3"
222
+ class="lg:mb-18 mb-10"
223
+ >
224
+ <BlockLinkCardList :items="block.blocks" />
225
+ </LayoutHelper>
226
+
227
+ <LayoutHelper
228
+ v-else-if="block.blockType == 'AccordionBlock'"
229
+ :key="`accordionBlock${index}`"
230
+ indent="col-3"
231
+ class="lg:mb-18 mb-10"
232
+ >
233
+ <BlockAccordion :data="block as unknown as AccordionBlockObject" />
234
+ </LayoutHelper>
235
+
210
236
  <div
211
237
  v-else
212
238
  :key="index"
@@ -222,6 +248,8 @@ import { defineComponent } from 'vue'
222
248
  import type { PropType } from 'vue'
223
249
  import type { StreamfieldBlockData } from '../../interfaces'
224
250
  import LayoutHelper from './../LayoutHelper/LayoutHelper.vue'
251
+ import BlockAnchor from './../BlockAnchor/BlockAnchor.vue'
252
+ import BlockAccordion, { type AccordionBlockObject } from './../BlockAccordion/BlockAccordion.vue'
225
253
  import BlockCardGrid from './../BlockCardGrid/BlockCardGrid.vue'
226
254
  import BlockCta from './../BlockCta/BlockCta.vue'
227
255
  import BlockHeading, { BlockHeadingObject } from './../BlockHeading/BlockHeading.vue'
@@ -231,6 +259,8 @@ import BlockImageComparison from './../BlockImageComparison/BlockImageComparison
231
259
  import BlockImageGallery from './../BlockImageGallery/BlockImageGallery.vue'
232
260
  import BlockInlineImage from './../BlockInlineImage/BlockInlineImage.vue'
233
261
  import BlockKeyPoints from './../BlockKeyPoints/BlockKeyPoints.vue'
262
+ import BlockLinkCardList from './../BlockLinkCardList/BlockLinkCardList.vue'
263
+ import BlockLinkCarousel from './../BlockLinkCarousel/BlockLinkCarousel.vue'
234
264
  import BlockListCards from './../BlockListCards/BlockListCards.vue'
235
265
  import BlockQuote, { type BlockQuoteAttributes } from './../BlockQuote/BlockQuote.vue'
236
266
  import BlockRelatedLinks, {
@@ -246,7 +276,7 @@ import BlockVideo from './../BlockVideo/BlockVideo.vue'
246
276
  import BlockVideoEmbed, {
247
277
  type BlockData as VideoBlockEmbedData
248
278
  } from './../BlockVideoEmbed/BlockVideoEmbed.vue'
249
- import BlockAnchor from './../BlockAnchor/BlockAnchor.vue'
279
+
250
280
  interface Variants {
251
281
  [key: string]: string
252
282
  }
@@ -260,6 +290,8 @@ export default defineComponent({
260
290
  name: 'BlockStreamfield',
261
291
  components: {
262
292
  LayoutHelper,
293
+ BlockAnchor,
294
+ BlockAccordion,
263
295
  BlockCardGrid,
264
296
  BlockCta,
265
297
  BlockHeading,
@@ -269,6 +301,8 @@ export default defineComponent({
269
301
  BlockImageGallery,
270
302
  BlockInlineImage,
271
303
  BlockKeyPoints,
304
+ BlockLinkCardList,
305
+ BlockLinkCarousel,
272
306
  BlockListCards,
273
307
  BlockQuote,
274
308
  BlockRelatedLinks,
@@ -279,8 +313,7 @@ export default defineComponent({
279
313
  BlockIframeEmbed,
280
314
  BlockGist,
281
315
  BlockVideo,
282
- BlockVideoEmbed,
283
- BlockAnchor
316
+ BlockVideoEmbed
284
317
  },
285
318
  props: {
286
319
  variant: {
@@ -50,7 +50,10 @@ export const MultipleGradeLevels = {
50
50
  { gradeLevel: '6' },
51
51
  { gradeLevel: '7' },
52
52
  { gradeLevel: '8' }
53
- ]
53
+ ],
54
+ time: {
55
+ time: 'Under 30 mins'
56
+ }
54
57
  },
55
58
  variant: 'secondary'
56
59
  }
@@ -3,7 +3,7 @@ import { computed } from 'vue'
3
3
  import type { EduResourceCardObject } from './../../interfaces.ts'
4
4
  import IconSubject from './../Icons/IconSubject.vue'
5
5
  import IconProfile from './../Icons/IconProfile.vue'
6
- // import IconTime from './../Icons/IconTime.vue'
6
+ import IconTime from './../Icons/IconTime.vue'
7
7
  import {} from './../../utils/mixins'
8
8
  import { rangeifyGrades } from './../../utils/rangeifyGrades'
9
9
 
@@ -29,6 +29,9 @@ const primarySubject = computed(() => {
29
29
  const audience = computed(() => {
30
30
  return rangeifyGrades(props.resource?.gradeLevels)
31
31
  })
32
+ const time = computed(() => {
33
+ return props.resource?.time?.time
34
+ })
32
35
  </script>
33
36
  <template>
34
37
  <div
@@ -57,6 +60,16 @@ const audience = computed(() => {
57
60
  />
58
61
  <span>{{ audience }}</span>
59
62
  </div>
63
+ <div
64
+ v-if="time"
65
+ class="MetadataEduResourceItem"
66
+ >
67
+ <IconTime
68
+ class="MetadataEduResourceIcon text-[1.15em]"
69
+ :class="iconClass"
70
+ />
71
+ <span>{{ time }}</span>
72
+ </div>
60
73
  </div>
61
74
  </template>
62
75
  <style lang="scss">
@@ -50,6 +50,7 @@ interface NavJumpMenuProps {
50
50
  headingLevel?: string
51
51
  invert?: boolean
52
52
  enabled?: boolean
53
+ dropdownText?: string
53
54
  }
54
55
 
55
56
  const props = withDefaults(defineProps<NavJumpMenuProps>(), {
@@ -59,7 +60,8 @@ const props = withDefaults(defineProps<NavJumpMenuProps>(), {
59
60
  headingLevel: 'h2',
60
61
  enabled: true,
61
62
  invert: true,
62
- hidden: false
63
+ hidden: false,
64
+ dropdownText: 'Jump to…'
63
65
  })
64
66
 
65
67
  const NavJumpMenuRef = ref()
@@ -102,7 +104,7 @@ const theBreadcrumbs = computed(() => {
102
104
  path: '#siteTop'
103
105
  }
104
106
  const jumpMenu: BreadcrumbPathObject = {
105
- title: 'Jump to…',
107
+ title: props.dropdownText,
106
108
  path: '#',
107
109
  children: theJumpLinks.value as BreadcrumbPathObject[]
108
110
  }
@@ -139,5 +141,15 @@ watch(
139
141
  @apply opacity-100 transition-all pointer-events-auto;
140
142
  }
141
143
  }
144
+ .NavSecondaryLink.secondary-root {
145
+ span {
146
+ @apply border-primary #{!important};
147
+ }
148
+ &.-invert {
149
+ span {
150
+ @apply border-white #{!important};
151
+ }
152
+ }
153
+ }
142
154
  }
143
155
  </style>
@@ -9,7 +9,7 @@
9
9
  <NavDropdownToggle
10
10
  :aria-expanded="dropdownVisible ? true : false"
11
11
  :path="item.path"
12
- class="font-medium border-t-2 border-transparent block px-3 py-2"
12
+ class="-t-2 border-transparent block px-3 py-2"
13
13
  :class="dropdownToggleClasses(index)"
14
14
  :invert="invert"
15
15
  @toggle-clicked="toggleDropdown()"
@@ -69,7 +69,6 @@ export default defineComponent({
69
69
  type: Object,
70
70
  required: true
71
71
  },
72
-
73
72
  invert: {
74
73
  type: Boolean,
75
74
  required: false,
@@ -121,13 +120,13 @@ export default defineComponent({
121
120
  dropdownToggleClasses(index: number) {
122
121
  return this.invert
123
122
  ? {
124
- 'mr-auto text-white font-semibold secondary-root': index === 0,
125
- 'text-white': index !== 0,
123
+ 'mr-auto text-white font-bold secondary-root': index === 0,
124
+ 'text-white font-semibold !pt-[.6rem]': index !== 0,
126
125
  '-open': this.dropdownVisible
127
126
  }
128
127
  : {
129
128
  'mr-auto text-primary font-semibold secondary-root': index === 0,
130
- 'text-gray-dark': index !== 0,
129
+ 'text-gray-dark font-medium !pt-[.6rem]': index !== 0,
131
130
  '-open': this.dropdownVisible
132
131
  }
133
132
  },
@@ -50,11 +50,13 @@ export default defineComponent({
50
50
  return false
51
51
  },
52
52
  baseLinkClasses(index: number | undefined) {
53
- let rootClasses = 'mr-auto font-semibold secondary-root'
53
+ let rootClasses = 'mr-auto secondary-root'
54
54
  rootClasses = this.invert
55
- ? `${rootClasses} text-white -invert`
56
- : `${rootClasses} text-primary`
57
- const regularClasses = this.invert ? 'text-white -invert' : 'text-gray-dark'
55
+ ? `${rootClasses} text-white font-bold -invert`
56
+ : `${rootClasses} text-primary font-semibold`
57
+ const regularClasses = this.invert
58
+ ? 'text-white -invert font-semibold'
59
+ : 'text-gray-dark font-medium'
58
60
  return index === 0 ? rootClasses : regularClasses
59
61
  },
60
62
  spanClasses(index: number | undefined) {
@@ -8,7 +8,7 @@
8
8
  <select
9
9
  :id="generateId()"
10
10
  v-model="selectValueHandler"
11
- class="border-0 text-primary can-hover:hover:text-primary-dark font-secondary font-semibold tracking-wider uppercase align-middle"
11
+ class="border-0 text-action can-hover:hover:text-action-dark font-secondary font-semibold tracking-wider uppercase align-middle"
12
12
  >
13
13
  <option
14
14
  disabled