@asd20/ui-next 2.26.1 → 2.27.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,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.27.1](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.27.0...ui-next-v2.27.1) (2026-10-01)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* keep public form field colors neutral across school themes ([f752928](https://github.com/academydistrict20/asd20-ui-next/commit/f7529283c5ac1cc515f565b98baae97096f3de1a))
|
|
9
|
+
|
|
10
|
+
# [2.27.0](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.26.1...ui-next-v2.27.0) (2026-09-30)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* support inline public form introduction links ([bea4683](https://github.com/academydistrict20/asd20-ui-next/commit/bea4683f849623abe527ad9b70f6d85db145aa25))
|
|
16
|
+
|
|
3
17
|
## [2.26.1](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.26.0...ui-next-v2.26.1) (2026-09-30)
|
|
4
18
|
|
|
5
19
|
|
package/package.json
CHANGED
|
@@ -214,6 +214,16 @@ export default {
|
|
|
214
214
|
@use '../../../design/component-stack' as *;
|
|
215
215
|
|
|
216
216
|
.asd20-public-form-field {
|
|
217
|
+
// Public intake controls must stay legible on every school theme. Limit the
|
|
218
|
+
// neutral overrides to this wrapper so other site components keep their colors.
|
|
219
|
+
--color__accent: #3d3d3d;
|
|
220
|
+
--color__accent-t50: #9e9e9e;
|
|
221
|
+
--color__primary-t50: #666;
|
|
222
|
+
--color__secondary-t50: #666;
|
|
223
|
+
--website-card__reverse-background-color: #333;
|
|
224
|
+
|
|
225
|
+
accent-color: #3d3d3d;
|
|
226
|
+
color: #333;
|
|
217
227
|
margin-bottom: space(0.5);
|
|
218
228
|
|
|
219
229
|
&__select label,
|
|
@@ -53,9 +53,14 @@
|
|
|
53
53
|
v-if="formDefinition.introduction"
|
|
54
54
|
class="asd20-public-form-modal__introduction"
|
|
55
55
|
>
|
|
56
|
-
|
|
56
|
+
<template v-if="inlineIntroductionParts">
|
|
57
|
+
{{ inlineIntroductionParts.before }}<a :href="formDefinition.introductionLink.href">{{ formDefinition.introductionLink.label }}</a>{{ inlineIntroductionParts.after }}
|
|
58
|
+
</template>
|
|
59
|
+
<template v-else>
|
|
60
|
+
{{ formDefinition.introduction }}
|
|
61
|
+
</template>
|
|
57
62
|
</p>
|
|
58
|
-
<p v-if="formDefinition.introductionLink">
|
|
63
|
+
<p v-if="formDefinition.introductionLink && !formDefinition.introductionLink.inline">
|
|
59
64
|
<a :href="formDefinition.introductionLink.href">
|
|
60
65
|
{{ formDefinition.introductionLink.label }}
|
|
61
66
|
</a>
|
|
@@ -253,6 +258,16 @@ export default {
|
|
|
253
258
|
modalTitle() {
|
|
254
259
|
return this.formDefinition?.title || 'Public Form'
|
|
255
260
|
},
|
|
261
|
+
inlineIntroductionParts() {
|
|
262
|
+
const introduction = this.formDefinition?.introduction || ''
|
|
263
|
+
const link = this.formDefinition?.introductionLink
|
|
264
|
+
if (!link?.inline) return null
|
|
265
|
+
const index = introduction.indexOf(link.label)
|
|
266
|
+
return {
|
|
267
|
+
before: introduction.slice(0, index),
|
|
268
|
+
after: introduction.slice(index + link.label.length),
|
|
269
|
+
}
|
|
270
|
+
},
|
|
256
271
|
usesRecordsFormSpacing() {
|
|
257
272
|
return [
|
|
258
273
|
'student-records-request',
|
|
@@ -171,6 +171,12 @@ export function normalizePublicFormDefinition(definition) {
|
|
|
171
171
|
const id = boundedText(definition.id, 'Form ID', 100, true)
|
|
172
172
|
if (!FORM_ID_PATTERN.test(id)) throw new Error('The public form ID is invalid.')
|
|
173
173
|
|
|
174
|
+
const introduction = boundedText(
|
|
175
|
+
definition.introduction,
|
|
176
|
+
'Form introduction',
|
|
177
|
+
2000
|
|
178
|
+
)
|
|
179
|
+
|
|
174
180
|
let introductionLink
|
|
175
181
|
if (definition.introductionLink != null) {
|
|
176
182
|
const label = boundedText(
|
|
@@ -187,18 +193,25 @@ export function normalizePublicFormDefinition(definition) {
|
|
|
187
193
|
)
|
|
188
194
|
if (!/^\/[a-z0-9/-]+\/?$/.test(href) || href.startsWith('//'))
|
|
189
195
|
throw new Error('The introduction link must be a local page path.')
|
|
190
|
-
|
|
196
|
+
const inline = optionalBoolean(
|
|
197
|
+
definition.introductionLink.inline,
|
|
198
|
+
'Inline introduction link'
|
|
199
|
+
)
|
|
200
|
+
if (
|
|
201
|
+
inline &&
|
|
202
|
+
(!introduction.includes(label) ||
|
|
203
|
+
introduction.indexOf(label) !== introduction.lastIndexOf(label))
|
|
204
|
+
) {
|
|
205
|
+
throw new Error('The inline introduction link label must appear once in the introduction.')
|
|
206
|
+
}
|
|
207
|
+
introductionLink = inline ? { label, href, inline: true } : { label, href }
|
|
191
208
|
}
|
|
192
209
|
|
|
193
210
|
return {
|
|
194
211
|
id,
|
|
195
212
|
version,
|
|
196
213
|
title: boundedText(definition.title, 'Form title', 200, true),
|
|
197
|
-
introduction
|
|
198
|
-
definition.introduction,
|
|
199
|
-
'Form introduction',
|
|
200
|
-
2000
|
|
201
|
-
),
|
|
214
|
+
introduction,
|
|
202
215
|
introductionLink,
|
|
203
216
|
submitLabel: boundedText(definition.submitLabel, 'Submit label', 100, true),
|
|
204
217
|
successMessage: boundedText(
|