@asd20/ui 3.2.415 → 3.2.418

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 (23) hide show
  1. package/package.json +1 -1
  2. package/src/components/atoms/Asd20Messaging/index.vue +107 -70
  3. package/src/components/organisms/Asd20EventModal/index.vue +5 -9
  4. package/src/components/organisms/Asd20ImageGallery/index.vue +1 -1
  5. package/src/components/organisms/Asd20ImageHeader/index.stories.js +38 -0
  6. package/src/components/organisms/Asd20ImageHeader/index.vue +559 -0
  7. package/src/components/organisms/Asd20PageContent/index.vue +29 -6
  8. package/src/components/organisms/Asd20VideoHeaderContent/index.vue +1 -1
  9. package/src/components/templates/Asd20ArticleDigestTemplate/index.stories.js +4 -1
  10. package/src/components/templates/Asd20ArticleListTemplate/index.stories.js +7 -1
  11. package/src/components/templates/Asd20ArticleTemplate/index.stories.js +2 -1
  12. package/src/components/templates/Asd20CampusTemplate/index.stories.js +1 -1
  13. package/src/components/templates/Asd20DetailImageTemplate/index.stories.js +60 -0
  14. package/src/components/templates/Asd20DetailImageTemplate/index.vue +267 -0
  15. package/src/components/templates/Asd20LoginsTemplate/index.stories.js +3 -0
  16. package/src/components/templates/Asd20ProfileTemplate/index.stories.js +2 -1
  17. package/src/components/templates/Asd20WayfindingImageTemplate/index.stories.js +65 -0
  18. package/src/components/templates/Asd20WayfindingImageTemplate/index.vue +234 -0
  19. package/src/components/templates/Asd20WayfindingTemplate/index.stories.js +1 -1
  20. package/src/data/page-queries/landing-page-query-result.json +554 -58
  21. package/src/data/page-queries/sublanding-page-query-result.json +3 -3
  22. package/src/helpers/mapEventToCard.js +5 -2
  23. package/src/mixins/mockPageMixin.js +6 -6
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "*.scss",
6
6
  "*.vue"
7
7
  ],
8
- "version": "3.2.415",
8
+ "version": "3.2.418",
9
9
  "private": false,
10
10
  "license": "MIT",
11
11
  "repository": {
@@ -1,8 +1,11 @@
1
1
  <template>
2
2
  <div :class="classes">
3
- <figure v-if=" images && images.length > 0 && fullscreen">
4
- <img :src="images[0].url" alt />
5
- </figure>
3
+ <div
4
+ class="message-image"
5
+ v-if="images && images.length > 0 && messageImage && fullscreen"
6
+ >
7
+ <img :src="messageImage" alt />
8
+ </div>
6
9
  <div class="asd20-messaging__content">
7
10
  <component
8
11
  class="asd20-messaging__heading"
@@ -10,23 +13,34 @@
10
13
  :is="headingTagName"
11
14
  :id="hash"
12
15
  >
13
- <!-- <a :href="`#${hash}`">#</a> -->
14
- <span v-html="heading"></span>
16
+ <!-- <span v-html="heading"></span> -->
17
+ <span>{{ heading }}</span>
15
18
  </component>
16
- <div v-if="shortDescription" class="lead short-description">
17
- <span v-html="shortDescription"></span>
19
+ <!-- <div class="asd20-messaging__heading" v-if="heading">
20
+ <span v-html="heading"></span>
21
+ <span>{{ heading }}</span>
22
+ </div> -->
23
+ <div v-if="shortDescription" class="lead">
24
+ <!-- <span v-text="shortDescription"></span> -->
25
+ <span>{{ shortDescription }}</span>
18
26
  <a v-if="detailLink" :href="detailLink">{{ detailLinkLabel }}</a>
19
27
  </div>
20
- <p
28
+ <!-- <p
21
29
  v-if="longDescription"
22
30
  class="long-description"
23
31
  v-html="longDescription"
24
- />
32
+ /> -->
33
+ <p v-if="longDescription" class="long-description">
34
+ >{{ longDescription }}
35
+ </p>
25
36
  <div v-if="bodyContent" class="asd20-messaging__body-content">
26
37
  <component :is="dynamicComponent"></component>
27
38
  </div>
28
39
 
29
- <p v-if=" callsToAction && callsToAction.length > 0" class="asd20-messaging__button-group">
40
+ <p
41
+ v-if="callsToAction && callsToAction.length > 0"
42
+ class="asd20-messaging__button-group"
43
+ >
30
44
  <asd20-button
31
45
  v-for="cta in callsToAction"
32
46
  :key="cta.label"
@@ -70,7 +84,7 @@ export default {
70
84
  return {
71
85
  'asd20-messaging': true,
72
86
  'asd20-messaging--fullscreen': this.fullscreen,
73
- 'asd20-messaging--padded': this.fullscreen,
87
+ 'asd20-messaging--padded': this.padded,
74
88
  }
75
89
  },
76
90
  dynamicComponent() {
@@ -78,6 +92,22 @@ export default {
78
92
  template: `<div>${this.bodyContent}</div>`,
79
93
  }
80
94
  },
95
+ messageImage() {
96
+ // Get full image
97
+ const messageImages = Array.isArray(this.images) ? this.images : []
98
+
99
+ const coverImage = messageImages.find(i => i.isCover)
100
+ let messageImageUrl = null
101
+
102
+ if (coverImage) {
103
+ const coverImageFiles = coverImage.files || []
104
+ const coverImageFull = coverImageFiles.find(f => f.name === 'full')
105
+ messageImageUrl = coverImageFull
106
+ ? coverImageFull.url
107
+ : coverImage.url || ''
108
+ }
109
+ return messageImageUrl
110
+ },
81
111
  },
82
112
  }
83
113
  </script>
@@ -140,13 +170,15 @@ export default {
140
170
  padding: space(1);
141
171
  }
142
172
  &--fullscreen {
143
- & + .asd20-messaging--fullscreen {
144
- margin-top: space(-1);
145
- }
146
- & > figure {
173
+ // & + .asd20-messaging--fullscreen {
174
+ // margin-top: space(-1);
175
+ // }
176
+ padding: space(1);
177
+
178
+ & > .message-image {
147
179
  padding: 0;
148
180
  margin: 0;
149
- overflow: hidden;
181
+ // overflow: hidden;
150
182
  margin: 0 space(-1) space(1) space(-1);
151
183
  & > img {
152
184
  display: block;
@@ -163,83 +195,88 @@ export default {
163
195
  &--fullscreen {
164
196
  // position: relative;
165
197
  padding: 0;
198
+ display: flex;
199
+ align-items: center;
166
200
  // min-height: 100vh;
167
- display: grid;
168
- grid-template-columns: $grid-three-up-columns;
169
- grid-template-rows: $grid-base-rows;
170
- grid-template-areas: $grid-aside-right-areas;
201
+ // display: grid;
202
+ // grid-template-columns: $grid-three-up-columns;
203
+ // grid-template-rows: $grid-base-rows;
204
+ // grid-template-areas: $grid-aside-right-areas;
171
205
  & + .asd20-messaging--fullscreen {
172
- margin-top: space(-3);
206
+ // margin-top: space(-3);
173
207
  z-index: -1;
174
208
  }
175
209
 
176
- &::before {
177
- content: '';
178
- display: block;
179
- position: relative;
180
- z-index: 2;
181
- grid-column: -1 / -2;
182
- grid-row: 1 / -1;
183
- height: 70%;
184
- align-self: center;
185
- background: var(--color__primary);
186
- transform: translate3d(0, calc(20% * var(--scroll-progress)), 0);
187
- }
210
+ // &::before {
211
+ // content: '';
212
+ // display: block;
213
+ // position: relative;
214
+ // z-index: 2;
215
+ // grid-column: -1 / -2;
216
+ // grid-row: 1 / -1;
217
+ // height: 70%;
218
+ // align-self: center;
219
+ // background: var(--color__primary);
220
+ // transform: translate3d(0, calc(20% * var(--scroll-progress)), 0);
221
+ // }
188
222
 
189
223
  .asd20-messaging__content {
190
224
  position: relative;
191
225
  z-index: 1;
192
- grid-row: 1 / -1;
193
- grid-column: 1 / 4;
194
- background: var(--website-page__background-color);
195
- padding: space(3);
226
+ // grid-row: 1 / -1;
227
+ // grid-column: 1 / 4;
228
+ // background: var(--website-page__background-color);
229
+ // padding: 0 0 0 space(2);
196
230
  height: min-content;
197
231
  align-self: center;
198
232
  transform: translate3d(0, calc(10% * var(--scroll-progress)), 0);
199
233
  }
200
234
 
201
- &::v-deep figure {
235
+ .message-image {
202
236
  position: relative;
203
- overflow: hidden;
204
- grid-column: 3 / -2;
205
- grid-row: 2 / -2;
206
- padding: 0;
237
+ // overflow: hidden;
238
+ // grid-column: 3 / -2;
239
+ // grid-row: 2 / -2;
240
+ padding-right: space(2);
207
241
  margin: 0;
208
- height: 100%;
209
- background: var(--website-card__reverse-background-color)
210
- var(--website-card__reverse-background-style);
211
- &::before {
212
- content: '';
213
- display: block;
214
- position: absolute;
215
- top: 0;
216
- left: 0;
217
- right: 0;
218
- bottom: 0;
219
- // background: var(--color__accent-t70);
220
- // background: hsla(40, 60%, 50%, 1);
221
- // mix-blend-mode: multiply;
222
- z-index: 1;
223
- }
242
+ // height: 100%;
243
+ // width: 20vw;
244
+ // background: var(--website-card__reverse-background-color)
245
+ // var(--website-card__reverse-background-style);
246
+ // &::before {
247
+ // content: '';
248
+ // display: block;
249
+ // position: absolute;
250
+ // top: 0;
251
+ // left: 0;
252
+ // right: 0;
253
+ // bottom: 0;
254
+ // background: var(--color__accent-t70);
255
+ // background: hsla(40, 60%, 50%, 1);
256
+ // mix-blend-mode: multiply;
257
+ // z-index: 1;
258
+ // }
224
259
  img {
260
+ width: 20vw;
261
+ height: 20vw;
225
262
  // filter: grayscale(100%);
226
263
  // mix-blend-mode: lighten;
227
264
  // opacity: 0.7;
228
265
  }
229
266
  }
230
267
 
231
- &:nth-child(even) {
232
- grid-template-areas: $grid-aside-left-areas;
233
- &::before {
234
- grid-column: 1 / 2;
235
- }
236
- figure {
237
- grid-column: 2 / 6;
238
- }
239
- .asd20-messaging__content {
240
- grid-column: 5 / -1;
241
- }
242
- }
268
+ // &:nth-child(even) {
269
+ // grid-template-areas: $grid-aside-left-areas;
270
+ // &::before {
271
+ // grid-column: 1 / 2;
272
+ // }
273
+ // figure {
274
+ // grid-column: 2 / 6;
275
+ // }
276
+ // .asd20-messaging__content {
277
+ // grid-column: 5 / -1;
278
+ // }
279
+ // }
243
280
  }
244
281
  }
245
282
  }
@@ -10,7 +10,6 @@
10
10
  class="asd20-event-modal"
11
11
  @dismiss="$emit('dismiss')"
12
12
  :style="{ '--accent-color': event.calendarColor }"
13
- v-scroll-lock="open"
14
13
  >
15
14
  <Asd20Viewport tabindex="0" class="asd20-event-modal__details" scrollable>
16
15
  <header class="asd20-event-modal__header">
@@ -57,7 +56,7 @@
57
56
 
58
57
  <script>
59
58
  // import parse from 'date-fns/parse'
60
- import Vue from 'vue'
59
+ // import Vue from 'vue'
61
60
 
62
61
  import { truncate } from 'lodash-es'
63
62
  import { format, parse } from 'date-fns'
@@ -66,8 +65,8 @@ import Asd20Tag from '../../atoms/Asd20Tag'
66
65
  import Asd20List from '../../organisms/Asd20List'
67
66
  import Asd20ListItem from '../../molecules/Asd20ListItem'
68
67
  import Asd20Viewport from '../../atoms/Asd20Viewport'
69
- import VScrollLock from 'v-scroll-lock'
70
- Vue.use(VScrollLock)
68
+ // import VScrollLock from 'v-scroll-lock'
69
+ // Vue.use(VScrollLock)
71
70
 
72
71
  export default {
73
72
  name: 'Asd20EventModal',
@@ -98,12 +97,9 @@ export default {
98
97
 
99
98
  let time = `${format(parse(this.event.start), '<b>h:mm aa</b>')}`
100
99
  if (this.event.endTimeUndetermined) {
101
- time += `${format(parse(this.event.end), ', dddd, MMMM DD, YYYY')}`
100
+ time += `${format(parse(this.event.end))}`
102
101
  } else {
103
- time += ` - ${format(
104
- parse(this.event.end),
105
- '<b>h:mm aa</b>, dddd, MMMM DD, YYYY'
106
- )}`
102
+ time += ` - ${format(parse(this.event.end), '<b>h:mm aa</b>')}`
107
103
  }
108
104
  return time
109
105
  },
@@ -217,7 +217,7 @@ export default {
217
217
  .asd20-image-gallery {
218
218
  .image-grid {
219
219
  .grid-overlay {
220
- font-size: 1rem !important;
220
+ // font-size: 1rem !important;
221
221
  }
222
222
  }
223
223
  }
@@ -0,0 +1,38 @@
1
+ import { storiesOf } from '@storybook/vue'
2
+ import Asd20ImageHeader from '.'
3
+
4
+ const info = {
5
+ summary: 'Asd20ImageHeader',
6
+ }
7
+
8
+ const wrapper = {
9
+ components: { Asd20ImageHeader },
10
+ data: () => ({
11
+ pageHeaderContent: {
12
+ heading: 'Cultivating the&nbsp;next generation of&nbsp;leaders.',
13
+ lead:
14
+ 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Cras justo odio, dapibus ac facilisis in, egestas eget quam.',
15
+ imageUrl: '/statics/images/home-images/best-brass-section.jpg',
16
+ imageCaption: '',
17
+ callsToAction: [
18
+ { label: 'Enroll Your Child', url: '/enroll' },
19
+ { label: 'Browse Our Schools', url: '/schools' },
20
+ ],
21
+ detailLink: '',
22
+ detailLinkLabel: '',
23
+ organization: {
24
+ title: 'Organization Title',
25
+ },
26
+ organizationOptions: [],
27
+ },
28
+ }),
29
+ }
30
+
31
+ storiesOf('Organisms - Asd20ImageHeader', module).add(
32
+ 'Default',
33
+ () => ({
34
+ ...wrapper,
35
+ template: `<Asd20ImageHeader v-bind="pageHeaderContent"></Asd20ImageHeader>`,
36
+ }),
37
+ { info }
38
+ )