@asd20/ui-next 2.0.15 → 2.0.16
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
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.16](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.0.15...ui-next-v2.0.16) (2026-04-01)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* fix secondary header image display ([8ed8d6f](https://github.com/academydistrict20/asd20-ui-next/commit/8ed8d6f0e2bedab9e108948963f65cd3daf20972))
|
|
9
|
+
|
|
3
10
|
## [2.0.15](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.0.14...ui-next-v2.0.15) (2026-04-01)
|
|
4
11
|
|
|
5
12
|
## [2.0.14](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.0.13...ui-next-v2.0.14) (2026-03-31)
|
package/package.json
CHANGED
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
<div class="white-accent-band">
|
|
98
98
|
<section
|
|
99
99
|
ref="header"
|
|
100
|
-
class="
|
|
100
|
+
:class="headerClasses"
|
|
101
101
|
aria-label="Secondary message"
|
|
102
102
|
:style="secondaryHeaderStyle"
|
|
103
103
|
>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
118
|
<asd20-messaging
|
|
119
|
-
v-bind="
|
|
119
|
+
v-bind="secondaryMessageForDisplay"
|
|
120
120
|
fullscreen
|
|
121
121
|
></asd20-messaging>
|
|
122
122
|
</section>
|
|
@@ -151,33 +151,52 @@ export default {
|
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
computed: {
|
|
154
|
+
headerClasses() {
|
|
155
|
+
return {
|
|
156
|
+
'asd20-secondary-header': true,
|
|
157
|
+
'asd20-secondary-header--hide-desktop-image':
|
|
158
|
+
!this.shouldShowDesktopInlineImage,
|
|
159
|
+
}
|
|
160
|
+
},
|
|
154
161
|
secondaryMessage() {
|
|
155
162
|
return Array.isArray(this.messages) ? this.messages[1] || {} : {}
|
|
156
163
|
},
|
|
157
|
-
|
|
158
|
-
|
|
164
|
+
secondaryMessageImages() {
|
|
165
|
+
return Array.isArray(this.secondaryMessage.images)
|
|
159
166
|
? this.secondaryMessage.images
|
|
160
167
|
: []
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
coverImageFull.filename.includes('headerimage')
|
|
172
|
-
) {
|
|
173
|
-
return ''
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return coverImageFull ? coverImageFull.url : coverImage.url || ''
|
|
168
|
+
},
|
|
169
|
+
secondaryHeaderImageObject() {
|
|
170
|
+
return (
|
|
171
|
+
this.secondaryMessageImages.find(image => image && image.isCover) ||
|
|
172
|
+
this.secondaryMessageImages[0] ||
|
|
173
|
+
null
|
|
174
|
+
)
|
|
175
|
+
},
|
|
176
|
+
secondaryHeaderImage() {
|
|
177
|
+
return this.resolveMessageImageUrl(this.secondaryHeaderImageObject)
|
|
177
178
|
},
|
|
178
179
|
hasSecondaryHeaderImage() {
|
|
179
180
|
return Boolean(this.secondaryHeaderImage)
|
|
180
181
|
},
|
|
182
|
+
shouldShowDesktopInlineImage() {
|
|
183
|
+
return Boolean(
|
|
184
|
+
this.secondaryHeaderImageObject && this.secondaryHeaderImageObject.isCover
|
|
185
|
+
)
|
|
186
|
+
},
|
|
187
|
+
secondaryMessageForDisplay() {
|
|
188
|
+
if (!this.secondaryHeaderImageObject) return this.secondaryMessage
|
|
189
|
+
|
|
190
|
+
return {
|
|
191
|
+
...this.secondaryMessage,
|
|
192
|
+
images: [
|
|
193
|
+
{
|
|
194
|
+
...this.secondaryHeaderImageObject,
|
|
195
|
+
isCover: true,
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
}
|
|
199
|
+
},
|
|
181
200
|
secondaryHeaderStyle() {
|
|
182
201
|
if (!this.hasSecondaryHeaderImage) return {}
|
|
183
202
|
|
|
@@ -223,6 +242,13 @@ export default {
|
|
|
223
242
|
this.teardownParallax()
|
|
224
243
|
},
|
|
225
244
|
methods: {
|
|
245
|
+
resolveMessageImageUrl(image) {
|
|
246
|
+
if (!image) return ''
|
|
247
|
+
|
|
248
|
+
const imageFiles = Array.isArray(image.files) ? image.files : []
|
|
249
|
+
const fullImage = imageFiles.find(file => file.name === 'full')
|
|
250
|
+
return fullImage ? fullImage.url : image.url || ''
|
|
251
|
+
},
|
|
226
252
|
teardownParallax() {
|
|
227
253
|
this.disableParallax()
|
|
228
254
|
if (this.intersectionObserver) this.intersectionObserver.disconnect()
|
|
@@ -552,19 +578,6 @@ export default {
|
|
|
552
578
|
}
|
|
553
579
|
}
|
|
554
580
|
|
|
555
|
-
& :deep(.message-image) {
|
|
556
|
-
display: none;
|
|
557
|
-
margin-top: 0;
|
|
558
|
-
order: 2;
|
|
559
|
-
max-height: 400px;
|
|
560
|
-
img {
|
|
561
|
-
height: auto !important;
|
|
562
|
-
margin-left: space(1);
|
|
563
|
-
max-height: 25vw;
|
|
564
|
-
border-radius: var(--website-shape__radius-m);
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
|
|
568
581
|
& :deep(.asd20-messaging__content) {
|
|
569
582
|
order: 1;
|
|
570
583
|
max-width: 60%;
|
|
@@ -629,6 +642,29 @@ export default {
|
|
|
629
642
|
);
|
|
630
643
|
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,1) 70%);
|
|
631
644
|
}
|
|
645
|
+
|
|
646
|
+
& :deep(.message-image) {
|
|
647
|
+
display: flex;
|
|
648
|
+
margin-top: 0;
|
|
649
|
+
order: 2;
|
|
650
|
+
max-height: 400px;
|
|
651
|
+
img {
|
|
652
|
+
height: auto !important;
|
|
653
|
+
margin-left: space(1);
|
|
654
|
+
max-height: 25vw;
|
|
655
|
+
border-radius: var(--website-shape__radius-m);
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
.asd20-secondary-header--hide-desktop-image {
|
|
661
|
+
& :deep(.message-image) {
|
|
662
|
+
display: none;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
& :deep(.asd20-messaging__content) {
|
|
666
|
+
max-width: 60%;
|
|
667
|
+
}
|
|
632
668
|
}
|
|
633
669
|
}
|
|
634
670
|
</style>
|