@explorer-1/vue 0.2.67 → 0.2.70

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.
@@ -72,3 +72,97 @@ export const BaseStory = {
72
72
  table: BlockRichTableData
73
73
  }
74
74
  }
75
+ export const MixedColumnWidths = {
76
+ args: {
77
+ table: {
78
+ blockType: 'RichTableBlock',
79
+ tableCaption:
80
+ 'Ut dapibus cursus quam, non dapibus diam pellentesque ac. Maecenas ultrices porta dui eget placerat. Curabitur ornare congue interdum.',
81
+ tableContent: {
82
+ tableHead: [
83
+ [
84
+ {
85
+ text: 'Image'
86
+ },
87
+ {
88
+ text: 'Type'
89
+ },
90
+ {
91
+ text: 'Description'
92
+ }
93
+ ]
94
+ ],
95
+ tableBody: [
96
+ [
97
+ {
98
+ ...BlockImageData,
99
+ caption: '<p>Custom ImageCaption</p>',
100
+ displayCaption: true,
101
+ blockType: 'ImageBlock'
102
+ },
103
+ {
104
+ blockType: 'CharBlock',
105
+ value: 'Internal'
106
+ },
107
+ {
108
+ blockType: 'RichTextBlock',
109
+ value:
110
+ '<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'
111
+ }
112
+ ],
113
+ [
114
+ {
115
+ ...BlockImageData,
116
+ caption: '<p>Custom ImageCaption</p>',
117
+ displayCaption: true,
118
+ blockType: 'ImageBlock'
119
+ },
120
+ {
121
+ blockType: 'CharBlock',
122
+ value: 'External'
123
+ },
124
+ {
125
+ blockType: 'RichTextBlock',
126
+ value:
127
+ '<p>Morbi pretium, massa non convallis facilisis, lectus eros vulputate turpis, et imperdiet eros metus eu enim. Cras consequat iaculis leo eget auctor. Sed bibendum, nulla vel ultricies aliquam, augue mauris sagittis massa, nec malesuada massa justo id sem. In hac habitasse platea dictumst. Sed ullamcorper bibendum libero vitae pellentesque.</p>\n'
128
+ }
129
+ ],
130
+ [
131
+ {
132
+ ...BlockImageData,
133
+ caption: '<p>Custom ImageCaption</p>',
134
+ displayCaption: false,
135
+ blockType: 'ImageBlock'
136
+ },
137
+ {
138
+ blockType: 'CharBlock',
139
+ value: 'N/A'
140
+ },
141
+ {
142
+ blockType: 'RichTextBlock',
143
+ value:
144
+ '<p>Maecenas vel dapibus ligula, pretium <a href="#">dictum est</a>. Proin venenatis massa vulputate <strong>est rhoncus</strong>, sed ornare ex sagittis. Donec iaculis magna in rhoncus malesuada.</p>\n'
145
+ }
146
+ ],
147
+ [
148
+ {
149
+ ...BlockImageData,
150
+ caption: '<p>Custom ImageCaption</p>',
151
+ displayCaption: true,
152
+ blockType: 'ImageBlock'
153
+ },
154
+ {
155
+ blockType: 'CharBlock',
156
+ value: 'Internal'
157
+ },
158
+ {
159
+ blockType: 'RichTextBlock',
160
+ value:
161
+ '<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'
162
+ }
163
+ ]
164
+ ]
165
+ }
166
+ }
167
+ }
168
+ }
@@ -25,15 +25,24 @@ export default defineComponent({
25
25
  >
26
26
  <div class="overflow-x-auto scrolling-touch max-w-screen-3xl mx-auto !mb-0">
27
27
  <table
28
- class="min-w-full border-gray-light-mid w-full border-t border-b border-collapse table-auto"
28
+ v-if="table.tableContent"
29
+ class="min-w-full border-gray-light-mid w-full border-t border-b border-collapse table-auto m-0 p-0"
29
30
  >
31
+ <caption
32
+ v-if="table.tableCaption"
33
+ class="sr-only"
34
+ >
35
+ {{
36
+ table.tableCaption
37
+ }}
38
+ </caption>
30
39
  <thead v-if="table.tableContent.tableHead?.length">
31
40
  <tr>
32
41
  <th
33
42
  v-for="(headCell, headIndex) in table.tableContent.tableHead[0]"
34
43
  :key="headIndex"
35
44
  scope="col"
36
- class="min-w-[12rem] bg-jpl-blue-darker edu:bg-jpl-teal-dark text-subtitle text-white border-gray-light-mid lg:p-5 p-3 border-b"
45
+ class="min-w-[6rem] bg-jpl-blue-darker edu:bg-jpl-violet-darker text-subtitle text-white border-gray-light-mid lg:p-5 p-3 border-b text-left"
37
46
  >
38
47
  {{ headCell.text }}
39
48
  </th>
@@ -47,7 +56,7 @@ export default defineComponent({
47
56
  <td
48
57
  v-for="(cell, cellIndex) in row"
49
58
  :key="cellIndex"
50
- class="min-w-[12rem] bg-white text-gray-dark border-gray-light-mid"
59
+ class="min-w-[6rem] bg-white text-gray-dark border-gray-light-mid lg:p-5 p-3 align-top"
51
60
  >
52
61
  <template v-if="cell.blockType === 'CharBlock'">
53
62
  <p class="">
@@ -75,11 +84,12 @@ export default defineComponent({
75
84
  </table>
76
85
  </div>
77
86
  <template v-if="table.tableCaption">
78
- <caption class="block text-left px-0 text-gray-mid-dark text-body-sm mt-4">
79
- {{
80
- table.tableCaption
81
- }}
82
- </caption>
87
+ <div
88
+ class="max-w-screen-3xl mx-auto block text-left px-0 text-gray-mid-dark text-body-sm mt-4"
89
+ aria-hidden
90
+ >
91
+ {{ table.tableCaption }}
92
+ </div>
83
93
  </template>
84
94
  </div>
85
95
  </template>
@@ -16,6 +16,7 @@ import { BlockTeaserData } from './../BlockTeaser/BlockTeaser.stories'
16
16
  import { BlockIframeEmbedData } from './../BlockIframeEmbed/BlockIframeEmbed.stories'
17
17
  import { BlockVideoData } from './../BlockVideo/BlockVideo.stories'
18
18
  import { BlockVideoEmbedData } from './../BlockVideoEmbed/BlockVideoEmbed.stories'
19
+ import { MixedColumnWidths } from './../BlockRichTable/BlockRichTable.stories'
19
20
  import BlockStreamfield, { variants } from './BlockStreamfield.vue'
20
21
 
21
22
  export default {
@@ -127,6 +128,45 @@ export const BlockStreamfieldData = {
127
128
  alignTo: 'left'
128
129
  },
129
130
  BlockRichTableData,
131
+ MixedColumnWidths.args.table,
132
+ {
133
+ blockType: 'RichTableBlock',
134
+ tableCaption: 'table caption',
135
+ tableContent: {
136
+ tableHead: [
137
+ [
138
+ {
139
+ text: '1. Learn'
140
+ }
141
+ ]
142
+ ],
143
+ tableBody: [
144
+ [
145
+ {
146
+ ...BlockImageData,
147
+ caption: '<p>My custom caption.</p>',
148
+ displayCaption: true,
149
+ blockType: 'ImageBlock'
150
+ }
151
+ ],
152
+ [
153
+ {
154
+ blockType: 'RichTextBlock',
155
+ value:
156
+ '<p>Rich text. 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'
157
+ }
158
+ ],
159
+
160
+ [
161
+ {
162
+ blockType: 'CharBlock',
163
+ value:
164
+ "Geologists are scientists who study a planet's solid features, like soil, rocks, and minerals. There are all kinds of rocks and minerals that make up our planet – as well as the Moon, Mars, and other rocky worlds. By studying these features, we can learn more about how rocky worlds form and change over time."
165
+ }
166
+ ]
167
+ ]
168
+ }
169
+ },
130
170
  {
131
171
  blockType: 'ListBlock',
132
172
  field: 'card_grid',
@@ -11,7 +11,7 @@ interface MetadataEduResourceProps {
11
11
  resource: EduResourceCardObject
12
12
  compact?: boolean
13
13
  variant?: string
14
- showTime: boolean
14
+ showTime?: boolean
15
15
  }
16
16
 
17
17
  // define props
@@ -23,7 +23,7 @@ const clearSearch = () => {
23
23
  const submitSearch = () => {
24
24
  emit('submitForm')
25
25
  router.push({
26
- path: themeStore.isEdu ? '/edu/search/' : '/search',
26
+ path: themeStore.isEdu ? '/edubeta/search/' : '/search',
27
27
  query: { query: searchQuery.value }
28
28
  })
29
29
  }
@@ -29,6 +29,7 @@
29
29
  }
30
30
  }"
31
31
  show-calendar-chip
32
+ use-featured-styles
32
33
  />
33
34
  <EventCard
34
35
  v-else-if="isEvents"
@@ -28,6 +28,7 @@
28
28
  :heading-level="headingLevel"
29
29
  size="sm"
30
30
  show-calendar-chip
31
+ use-featured-styles
31
32
  />
32
33
  <BlockLinkCard
33
34
  v-else-if="typename === 'News'"
package/src/constants.ts CHANGED
@@ -1,6 +1,12 @@
1
1
  import type { PillDictionaryInterface } from './interfaces'
2
2
 
3
3
  export const eduMetadataDictionary: PillDictionaryInterface = {
4
+ EDUNewsPage: {
5
+ label: 'News',
6
+ variant: 'primary',
7
+ icons: 'primary',
8
+ type: undefined
9
+ },
4
10
  EDUEventPage: {
5
11
  label: 'Event',
6
12
  variant: 'primary',