@asd20/ui-next 2.7.5 → 2.8.0

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,19 @@
1
1
  # Changelog
2
2
 
3
+ # [2.8.0](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.7.6...ui-next-v2.8.0) (2026-05-12)
4
+
5
+
6
+ ### Features
7
+
8
+ * optimize video loading for mobile devices ([bf57b66](https://github.com/academydistrict20/asd20-ui-next/commit/bf57b66611bbf4652e801c246d7b6c483e64bb71))
9
+
10
+ ## [2.7.6](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.7.5...ui-next-v2.7.6) (2026-05-07)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * correct aria labels for logos ([6e44309](https://github.com/academydistrict20/asd20-ui-next/commit/6e44309c101a93620c3abf2b905867d742efdfad))
16
+
3
17
  ## [2.7.5](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.7.4...ui-next-v2.7.5) (2026-05-07)
4
18
 
5
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asd20/ui-next",
3
- "version": "2.7.5",
3
+ "version": "2.8.0",
4
4
  "private": false,
5
5
  "description": "ASD20 UI component library for Vue 3.",
6
6
  "license": "MIT",
@@ -2,8 +2,7 @@
2
2
  <a
3
3
  :href="link"
4
4
  class="asd20-district-logo"
5
- aria-label="Academy District 20 Home - We educate and inspire students to thrive."
6
- alt="The Academy District 20 logo."
5
+ :aria-label="accessibleLabel"
7
6
  @click="onClick"
8
7
  >
9
8
  <svg viewBox="0 0 460.94 62.52">
@@ -39,6 +38,13 @@ export default {
39
38
  link: { type: String, default: '/' },
40
39
  tagline: { type: Boolean, default: false },
41
40
  },
41
+ computed: {
42
+ accessibleLabel() {
43
+ return this.tagline
44
+ ? 'Educate. Inspire. Thrive. Academy District 20 Home'
45
+ : 'Academy District 20 Home'
46
+ },
47
+ },
42
48
  methods: {
43
49
  onClick(event) {
44
50
  navigateInternalHref(this, event, this.link, {
@@ -3,11 +3,7 @@
3
3
  class="asd20-logo"
4
4
  :class="classes"
5
5
  :href="link"
6
- :aria-label="
7
- tagline
8
- ? `${abbreviatedTitle} ${subtitle}, An Academy District 20 School`
9
- : `${abbreviatedTitle} ${subtitle}`
10
- "
6
+ :aria-label="accessibleLabel"
11
7
  @click="onClick"
12
8
  >
13
9
  <figure class="asd20-logo__image">
@@ -83,7 +79,7 @@ export default {
83
79
  if (this.title === 'Academy District 20 Insider') {
84
80
  return (newTitle = 'D20 Insider')
85
81
  }
86
- const words = this.title.trim().split(' ')
82
+ const words = this.title.trim().split(/\s+/).filter(Boolean)
87
83
  if (this.abbreviated && words.length >= 3) {
88
84
  for (let i = 0; i < words.length; i++) {
89
85
  newTitle += `${words[i][0]}<em>${words[i].substr(1)} </em>`
@@ -92,6 +88,25 @@ export default {
92
88
  }
93
89
  return this.title.trim()
94
90
  },
91
+ visibleTitle() {
92
+ if (this.title === 'Academy District 20 Insider') {
93
+ return 'D20 Insider'
94
+ }
95
+ const words = this.title.trim().split(/\s+/).filter(Boolean)
96
+ if (this.abbreviated && words.length >= 3) {
97
+ return words.map(word => word[0]).join('')
98
+ }
99
+ return this.title.trim()
100
+ },
101
+ accessibleLabel() {
102
+ return [
103
+ this.visibleTitle,
104
+ this.subtitle,
105
+ this.tagline ? 'An Academy District 20 School' : '',
106
+ ]
107
+ .filter(Boolean)
108
+ .join(' ')
109
+ },
95
110
  },
96
111
  methods: {
97
112
  onClick(event) {
@@ -26,6 +26,7 @@
26
26
  loop
27
27
  muted
28
28
  playsinline
29
+ preload="none"
29
30
  :poster="imageUrl"
30
31
  >
31
32
  <source
@@ -39,6 +40,8 @@
39
40
  class="background-image"
40
41
  :src="imageUrl"
41
42
  :alt="imageCaption"
43
+ decoding="async"
44
+ fetchpriority="high"
42
45
  />
43
46
  <button
44
47
  v-if="videoUrl && !isMobile"
@@ -129,6 +132,7 @@ export default {
129
132
  },
130
133
  data() {
131
134
  return {
135
+ hasMounted: false,
132
136
  isPaused: false,
133
137
  isMobile: false,
134
138
  }
@@ -151,13 +155,14 @@ export default {
151
155
  )
152
156
  },
153
157
  loadVideo() {
154
- if (this.isMobile) {
158
+ if (!this.hasMounted || this.isMobile) {
155
159
  return null
156
160
  }
157
161
  return this.videoUrl
158
162
  },
159
163
  },
160
164
  mounted() {
165
+ this.hasMounted = true
161
166
  this.checkIsMobile()
162
167
  window.addEventListener('resize', this.checkIsMobile)
163
168
  },
@@ -115,6 +115,7 @@
115
115
  loop
116
116
  muted
117
117
  playsinline
118
+ preload="none"
118
119
  :poster="imageUrl"
119
120
  >
120
121
  <source
@@ -128,6 +129,8 @@
128
129
  class="background-image"
129
130
  :src="imageUrl"
130
131
  :alt="imageCaption"
132
+ decoding="async"
133
+ fetchpriority="high"
131
134
  />
132
135
  <button
133
136
  v-if="videoUrl && !isMobile"
@@ -172,6 +175,7 @@ export default {
172
175
  },
173
176
  data() {
174
177
  return {
178
+ hasMounted: false,
175
179
  isPaused: false,
176
180
  isMobile: false,
177
181
  }
@@ -191,13 +195,14 @@ export default {
191
195
  )
192
196
  },
193
197
  loadVideo() {
194
- if (this.isMobile) {
198
+ if (!this.hasMounted || this.isMobile) {
195
199
  return null
196
200
  }
197
201
  return this.videoUrl
198
202
  },
199
203
  },
200
204
  mounted() {
205
+ this.hasMounted = true
201
206
  this.checkIsMobile()
202
207
  window.addEventListener('resize', this.checkIsMobile)
203
208
  },