@asd20/ui-next 2.25.0 → 2.25.1

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.25.1](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.25.0...ui-next-v2.25.1) (2026-09-23)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * add public form activation to sidebar links ([2f82e94](https://github.com/academydistrict20/asd20-ui-next/commit/2f82e94d2249df42f695f9cfe4fbbd4e254c46b7))
9
+
3
10
  # [2.25.0](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.24.4...ui-next-v2.25.0) (2026-09-21)
4
11
 
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asd20/ui-next",
3
- "version": "2.25.0",
3
+ "version": "2.25.1",
4
4
  "private": false,
5
5
  "description": "ASD20 UI component library for Vue 3.",
6
6
  "license": "MIT",
@@ -3,6 +3,8 @@
3
3
  :is="tag"
4
4
  :[hrefAttr]="hrefValue"
5
5
  :[targetAttr]="targetValue"
6
+ :type="tag === 'button' ? 'button' : undefined"
7
+ :data-public-form="normalizedPublicFormId || undefined"
6
8
  class="asd20-list-item"
7
9
  :class="classes"
8
10
  @click="onClick"
@@ -168,6 +170,7 @@ export default {
168
170
  alignTop: { type: Boolean, default: false },
169
171
  to: { type: [String, Object], default: '' },
170
172
  link: { type: String, default: '' },
173
+ publicFormId: { type: String, default: '' },
171
174
  sourceTitle: { type: String, default: '' },
172
175
  logoUrl: { type: String, default: '' },
173
176
  attribution: { type: Boolean, default: false },
@@ -186,6 +189,9 @@ export default {
186
189
  }
187
190
  },
188
191
  tag() {
192
+ if (this.actionable && this.normalizedPublicFormId) {
193
+ return 'button'
194
+ }
189
195
  if (this.actionable && this.usesRouterNavigation) {
190
196
  return 'button'
191
197
  }
@@ -201,8 +207,14 @@ export default {
201
207
  return this.tag === 'a' ? 'href' : null
202
208
  },
203
209
  hrefValue() {
210
+ if (this.normalizedPublicFormId) return ''
204
211
  return this.link || this.to
205
212
  },
213
+ normalizedPublicFormId() {
214
+ if (!this.actionable) return ''
215
+ const formId = String(this.publicFormId || '').trim()
216
+ return /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(formId) ? formId : ''
217
+ },
206
218
  usesRouterNavigation() {
207
219
  const router = resolveRouter(this)
208
220
  if (!router || !this.to) return false
@@ -230,7 +242,12 @@ export default {
230
242
  onClick(e) {
231
243
  const router = resolveRouter(this)
232
244
 
233
- if (this.usesRouterNavigation && router && typeof router.push === 'function') {
245
+ if (
246
+ !this.normalizedPublicFormId &&
247
+ this.usesRouterNavigation &&
248
+ router &&
249
+ typeof router.push === 'function'
250
+ ) {
234
251
  e.preventDefault()
235
252
  router.push(this.to)
236
253
  }
@@ -14,6 +14,7 @@ export default function mapLinksToListItems(links) {
14
14
  alignTop: false,
15
15
  tags: [],
16
16
  link: l.url || '',
17
+ publicFormId: l.publicFormId || '',
17
18
  thumbnail: l.imageUrl,
18
19
  to: l.to || l.path,
19
20
  }