@asd20/ui-next 2.10.9 → 2.10.11

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.10.11](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.10.10...ui-next-v2.10.11) (2026-05-20)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * update calendar modal date accent color ([efedbe6](https://github.com/academydistrict20/asd20-ui-next/commit/efedbe6e8aa18412a272753aa36d0cdcb70e20a9))
9
+
10
+ ## [2.10.10](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.10.9...ui-next-v2.10.10) (2026-05-20)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * normalize card slugs ([d5a7119](https://github.com/academydistrict20/asd20-ui-next/commit/d5a7119690c453a3b19a879aac311dcf43f945b5))
16
+
3
17
  ## [2.10.9](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.10.8...ui-next-v2.10.9) (2026-05-19)
4
18
 
5
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asd20/ui-next",
3
- "version": "2.10.9",
3
+ "version": "2.10.11",
4
4
  "private": false,
5
5
  "description": "ASD20 UI component library for Vue 3.",
6
6
  "license": "MIT",
@@ -203,13 +203,13 @@ export default {
203
203
  transparent 55deg,
204
204
  rgba(255, 255, 255, 0.2) 80deg,
205
205
  rgba(255, 255, 255, 0.75) 98deg,
206
- var(--accent-color) 114deg,
206
+ var(--website-card__reverse-background-color) 114deg,
207
207
  rgba(255, 255, 255, 0.25) 132deg,
208
208
  transparent 160deg,
209
209
  transparent 235deg,
210
210
  rgba(255, 255, 255, 0.2) 260deg,
211
211
  rgba(255, 255, 255, 0.75) 278deg,
212
- var(--accent-color) 294deg,
212
+ var(--website-card__reverse-background-color) 294deg,
213
213
  rgba(255, 255, 255, 0.25) 312deg,
214
214
  transparent 340deg,
215
215
  transparent 360deg
@@ -68,6 +68,22 @@ function formatApDate(iso) {
68
68
  }
69
69
  }
70
70
 
71
+ function normalizeMessageSlug(slug) {
72
+ return typeof slug === 'string'
73
+ ? slug.trim().replace(/^\/+/, '').replace(/\/+$/, '')
74
+ : ''
75
+ }
76
+
77
+ function buildMessageLink({ prefix, slug, website = '' }) {
78
+ const normalizedSlug = normalizeMessageSlug(slug)
79
+ const normalizedWebsite = website.replace(/\/+$/, '')
80
+
81
+ if (!prefix || !normalizedSlug) return normalizedWebsite || prefix || '/'
82
+
83
+ const normalizedPrefix = prefix.endsWith('/') ? prefix : `${prefix}/`
84
+ return `${normalizedWebsite}${normalizedPrefix}${normalizedSlug}/`
85
+ }
86
+
71
87
  export default function mapMessageToCard(
72
88
  message,
73
89
  options = {},
@@ -97,7 +113,10 @@ export default function mapMessageToCard(
97
113
  }
98
114
 
99
115
  // Check for organization ID match
100
- let baseLink = `${channelPrefixMap[channelTitle]}${message.slug}`
116
+ let baseLink = buildMessageLink({
117
+ prefix: channelPrefixMap[channelTitle],
118
+ slug: message.slug,
119
+ })
101
120
  let sourceOrg = null
102
121
  let websiteLogo = null
103
122
 
@@ -119,7 +138,11 @@ export default function mapMessageToCard(
119
138
 
120
139
  // Keep destination-targeted content on the current site URL.
121
140
  if (!hasDestinations && matchedOrg.website) {
122
- baseLink = `${matchedOrg.website}${channelPrefixMap[channelTitle]}${message.slug}`
141
+ baseLink = buildMessageLink({
142
+ prefix: channelPrefixMap[channelTitle],
143
+ slug: message.slug,
144
+ website: matchedOrg.website,
145
+ })
123
146
  }
124
147
  } else {
125
148
  websiteLogo = organization.logoImageUrl