@asd20/ui-next 1.0.8 → 1.0.9

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,7 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.9](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v1.0.8...ui-next-v1.0.9) (2026-03-23)
4
+
3
5
  ## [1.0.8](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v1.0.7...ui-next-v1.0.8) (2026-03-23)
4
6
 
5
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asd20/ui-next",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "private": false,
5
5
  "description": "ASD20 UI component library migration workspace.",
6
6
  "license": "MIT",
@@ -8,13 +8,8 @@
8
8
  ]"
9
9
  >
10
10
  <input
11
- :id="id"
11
+ v-bind="checkboxAttrs"
12
12
  ref="checkbox"
13
- :checked="resolvedValue"
14
- :role="!checkbox ? 'switch' : null"
15
- :aria-checked="resolvedValue.toString()"
16
- v-bind="$attrs"
17
- type="checkbox"
18
13
  @change="toggle"
19
14
  />
20
15
  <label
@@ -64,6 +59,16 @@ export default {
64
59
  resolvedValue() {
65
60
  return typeof this.modelValue === 'boolean' ? this.modelValue : this.value
66
61
  },
62
+ checkboxAttrs() {
63
+ return {
64
+ ...this.$attrs,
65
+ id: this.id,
66
+ checked: this.resolvedValue,
67
+ role: !this.checkbox ? 'switch' : null,
68
+ 'aria-checked': this.resolvedValue.toString(),
69
+ type: 'checkbox',
70
+ }
71
+ },
67
72
  id() {
68
73
  if (this.$attrs.id) return this.$attrs.id
69
74
 
@@ -13,10 +13,7 @@
13
13
  />
14
14
  <div class="asd20-select-input__select-wrapper">
15
15
  <select
16
- v-bind="inputAttrs"
17
- :id="computedId"
18
- :value="resolvedValue"
19
- :aria-label="hideLabel ? label : ''"
16
+ v-bind="mergedInputAttrs"
20
17
  v-on="legacyListeners"
21
18
  @input="input"
22
19
  >
@@ -62,6 +59,15 @@ export default {
62
59
  name: 'Asd20SelectInput',
63
60
  components: { Asd20Icon },
64
61
  mixins: [inputComponentMixin],
62
+ computed: {
63
+ mergedInputAttrs() {
64
+ return this.mergeInputAttrs({
65
+ id: this.computedId,
66
+ value: this.resolvedValue,
67
+ 'aria-label': this.hideLabel ? this.label : '',
68
+ })
69
+ },
70
+ },
65
71
  }
66
72
  </script>
67
73
 
@@ -13,10 +13,7 @@
13
13
  />
14
14
 
15
15
  <input
16
- :id="computedId"
17
- type="file"
18
- v-bind="inputAttrs"
19
- :aria-label="hideLabel ? label : ''"
16
+ v-bind="mergedInputAttrs"
20
17
  v-on="legacyListeners"
21
18
  @input="input"
22
19
  />
@@ -46,6 +43,15 @@ export default {
46
43
  components: { Asd20Icon },
47
44
  mixins: [inputComponentMixin],
48
45
  inheritAttrs: false,
46
+ computed: {
47
+ mergedInputAttrs() {
48
+ return this.mergeInputAttrs({
49
+ id: this.computedId,
50
+ type: 'file',
51
+ 'aria-label': this.hideLabel ? this.label : '',
52
+ })
53
+ },
54
+ },
49
55
  methods: {
50
56
  input(event) {
51
57
  this.isDirty = true
@@ -17,12 +17,7 @@
17
17
  />
18
18
 
19
19
  <textarea
20
- :id="computedId"
21
- rows="10"
22
- cols="100"
23
- :value="resolvedValue"
24
- v-bind="inputAttrs"
25
- :aria-label="hideLabel ? label : ''"
20
+ v-bind="mergedInputAttrs"
26
21
  v-on="legacyListeners"
27
22
  @input="input"
28
23
  />
@@ -56,6 +51,17 @@ export default {
56
51
  value: { type: String, default: '' },
57
52
  label: { type: String, default: '' },
58
53
  },
54
+ computed: {
55
+ mergedInputAttrs() {
56
+ return this.mergeInputAttrs({
57
+ id: this.computedId,
58
+ rows: '10',
59
+ cols: '100',
60
+ value: this.resolvedValue,
61
+ 'aria-label': this.hideLabel ? this.label : '',
62
+ })
63
+ },
64
+ },
59
65
  }
60
66
  </script>
61
67
 
@@ -13,10 +13,7 @@
13
13
  />
14
14
 
15
15
  <input
16
- :id="computedId"
17
- :value="resolvedValue"
18
- v-bind="inputAttrs"
19
- :aria-label="hideLabel ? label : ''"
16
+ v-bind="mergedInputAttrs"
20
17
  v-on="legacyListeners"
21
18
  @input="input"
22
19
  />
@@ -46,6 +43,15 @@ export default {
46
43
  components: { Asd20Icon },
47
44
  mixins: [inputComponentMixin],
48
45
  inheritAttrs: false,
46
+ computed: {
47
+ mergedInputAttrs() {
48
+ return this.mergeInputAttrs({
49
+ id: this.computedId,
50
+ value: this.resolvedValue,
51
+ 'aria-label': this.hideLabel ? this.label : '',
52
+ })
53
+ },
54
+ },
49
55
  }
50
56
  </script>
51
57
 
@@ -18,14 +18,8 @@
18
18
  <asd20-notification
19
19
  v-for="(notification, notificationIndex) of notificationsFromIndex"
20
20
  :key="notification.key || notification.title"
21
- class="notification"
22
- v-bind="notification"
23
- :notification-style="groupType"
24
- :aria-hidden="notificationIndex ? true : undefined"
25
- :focus-disabled="notificationIndex ? true : false"
26
- @dismiss="$emit('dismiss', notification)"
27
- >
28
- </asd20-notification>
21
+ v-bind="notificationBindings(notification, notificationIndex)"
22
+ />
29
23
  </transition-group>
30
24
  </transition>
31
25
 
@@ -154,6 +148,16 @@ export default {
154
148
  this.initNotifications(this.notifications)
155
149
  },
156
150
  methods: {
151
+ notificationBindings(notification, notificationIndex) {
152
+ return {
153
+ ...notification,
154
+ class: ['notification', notification.class].filter(Boolean),
155
+ notificationStyle: this.groupType,
156
+ ariaHidden: notificationIndex ? true : undefined,
157
+ focusDisabled: notificationIndex ? true : false,
158
+ onDismiss: () => this.$emit('dismiss', notification),
159
+ }
160
+ },
157
161
  initNotifications(incomingNotifications) {
158
162
  // filter out old notifications that are no longer present in incoming notifications
159
163
  this.notificationsFromIndex = this.notificationsFromIndex.filter(n =>
@@ -143,6 +143,12 @@ export default {
143
143
  },
144
144
  },
145
145
  methods: {
146
+ mergeInputAttrs(overrides = {}) {
147
+ return {
148
+ ...this.inputAttrs,
149
+ ...overrides,
150
+ }
151
+ },
146
152
  validate(value) {
147
153
  // Clear validation errors
148
154
  this.validationErrors = []