aloha-vue 2.57.4 → 2.57.5

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.
Files changed (26) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/aloha-vue.es.js +9722 -9673
  3. package/dist/aloha-vue.umd.js +51 -51
  4. package/package.json +1 -1
  5. package/src/AButton/AButton.js +275 -270
  6. package/src/AElement/AElement.js +23 -11
  7. package/src/AElement/{comositionAPI → compositionAPI}/AttributesAPI.js +51 -51
  8. package/src/AElement/{comositionAPI → compositionAPI}/ClickAPI.js +30 -30
  9. package/src/AElement/{comositionAPI → compositionAPI}/ComponentLocalAPI.js +23 -23
  10. package/src/AElement/{comositionAPI → compositionAPI}/DisabledAPI.js +22 -22
  11. package/src/AElement/{comositionAPI → compositionAPI}/HtmlTitleAPI.js +33 -33
  12. package/src/AElement/compositionAPI/KeydownAPI.js +35 -0
  13. package/src/AElement/{comositionAPI → compositionAPI}/LoadingAPI.js +22 -22
  14. package/src/AElement/{comositionAPI → compositionAPI}/RouterLinkAPI.js +20 -20
  15. package/src/AElement/{comositionAPI → compositionAPI}/SwitchAPI.js +33 -33
  16. package/src/AElement/{comositionAPI → compositionAPI}/TagAPI.js +34 -34
  17. package/src/AElement/{comositionAPI → compositionAPI}/TextAPI.js +78 -78
  18. package/src/AElement/{comositionAPI → compositionAPI}/TitleAPI.js +29 -29
  19. package/src/ALink/ALink.js +253 -248
  20. package/src/ATableForm/ATableForm.js +5 -0
  21. package/src/ATableForm/ATableFormCellAction/compositionAPI/DeleteAPI.js +5 -0
  22. package/src/ATableForm/ATableFormCellDnd/ATableFormCellDnd.js +2 -0
  23. package/src/ATableForm/ATableFormTh/ATableFormTh.js +0 -6
  24. package/src/ATableForm/compositionAPI/ColumnsGrowAPI.js +4 -1
  25. package/src/ATableForm/compositionAPI/DeleteAPI.js +2 -2
  26. package/src/ATableForm/compositionAPI/DragAndDropAPI.js +24 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aloha-vue",
3
- "version": "2.57.4",
3
+ "version": "2.57.5",
4
4
  "description": "Aloha-vue is a JavaScript library that provides a wide range of accessible components and directives for Vue.js. Accessibility is of paramount importance to us, and we have designed all our components to meet accessibility compliance criteria. This library is a valuable tool for frontend developers and has already been used in three projects, including two large-scale ones",
5
5
  "keywords": [
6
6
  "accessibility compliance criteria",
@@ -1,270 +1,275 @@
1
- import {
2
- h,
3
- } from "vue";
4
- import {
5
- AElement,
6
- } from "../index";
7
-
8
- import EmitsAPI from "./compositionAPI/EmitsAPI";
9
-
10
- import placements from "../const/placements";
11
- import {
12
- isInteger,
13
- isString,
14
- uniqueId,
15
- } from "lodash-es";
16
-
17
- export default {
18
- name: "AButton",
19
- inheritAttrs: false,
20
- props: {
21
- alwaysTranslate: {
22
- type: Boolean,
23
- required: false,
24
- },
25
- ariaDisabled: {
26
- type: Boolean,
27
- required: false,
28
- default: undefined,
29
- },
30
- ariaLabel: {
31
- type: [String, Number, Object],
32
- required: false,
33
- default: undefined,
34
- },
35
- attributes: {
36
- type: Object,
37
- required: false,
38
- default: () => ({}),
39
- },
40
- class: {
41
- type: [String, Object],
42
- required: false,
43
- default: undefined,
44
- },
45
- classDefault: {
46
- type: String,
47
- required: false,
48
- default: "aloha_element",
49
- },
50
- classDefaultHidden: {
51
- type: String,
52
- required: false,
53
- default: "aloha_element__hidden",
54
- },
55
- classDisabled: {
56
- type: String,
57
- required: false,
58
- default: "disabled",
59
- },
60
- disabled: {
61
- type: Boolean,
62
- required: false,
63
- default: undefined,
64
- },
65
- excludeRenderAttributes: {
66
- type: Array,
67
- required: false,
68
- default: () => [],
69
- },
70
- extra: {
71
- type: Object,
72
- required: false,
73
- default: undefined,
74
- },
75
- extraData: {
76
- type: [String, Number, Boolean, Array, Object, Date, Function, Symbol, null, undefined],
77
- required: false,
78
- default: undefined,
79
- },
80
- html: {
81
- type: [String, Number, Object, Array],
82
- required: false,
83
- default: undefined,
84
- },
85
- htmlScreenReader: {
86
- type: [String, Number, Object, Array],
87
- required: false,
88
- default: undefined,
89
- },
90
- iconAttributes: {
91
- type: Object,
92
- required: false,
93
- default: () => ({}),
94
- },
95
- iconClass: {
96
- type: [String, Object],
97
- required: false,
98
- default: undefined,
99
- },
100
- iconLeft: {
101
- type: [String, Object],
102
- required: false,
103
- default: undefined,
104
- },
105
- iconRight: {
106
- type: [String, Object],
107
- required: false,
108
- default: undefined,
109
- },
110
- iconTag: {
111
- type: String,
112
- required: false,
113
- default: undefined,
114
- },
115
- id: {
116
- type: String,
117
- required: false,
118
- default: () => uniqueId("a_btn_"),
119
- },
120
- isSwitch: {
121
- type: Boolean,
122
- required: false,
123
- default: undefined,
124
- },
125
- isTitleHtml: {
126
- type: Boolean,
127
- required: false,
128
- default: undefined,
129
- },
130
- loading: {
131
- type: Boolean,
132
- required: false,
133
- default: false,
134
- },
135
- loadingAlign: {
136
- type: String,
137
- required: false,
138
- default: "right",
139
- validator: value => ["right", "left"].indexOf(value) !== -1,
140
- },
141
- loadingClass: {
142
- type: [String, Object],
143
- required: false,
144
- default: "a_spinner_small",
145
- },
146
- modelSwitch: {
147
- type: Boolean,
148
- required: false,
149
- default: undefined,
150
- },
151
- prevent: {
152
- type: Boolean,
153
- required: false,
154
- default: undefined,
155
- },
156
- safeHtml: {
157
- type: [String, Number, Object, Array],
158
- required: false,
159
- default: undefined,
160
- },
161
- safeHtmlScreenReader: {
162
- type: [String, Number, Object, Array],
163
- required: false,
164
- default: undefined,
165
- },
166
- stop: {
167
- type: Boolean,
168
- required: false,
169
- default: undefined,
170
- },
171
- tabindex: {
172
- type: [Number, String],
173
- required: false,
174
- default: undefined,
175
- },
176
- tag: {
177
- type: String,
178
- required: false,
179
- default: undefined,
180
- },
181
- text: {
182
- type: [String, Number, Object, Array],
183
- required: false,
184
- default: undefined,
185
- },
186
- textAfter: {
187
- type: [String, Number, Object],
188
- required: false,
189
- default: undefined,
190
- },
191
- textAriaHidden: {
192
- type: Boolean,
193
- required: false,
194
- default: undefined,
195
- },
196
- textBefore: {
197
- type: [String, Number, Object],
198
- required: false,
199
- default: undefined,
200
- },
201
- textClass: {
202
- type: String,
203
- required: false,
204
- default: undefined,
205
- },
206
- textScreenReader: {
207
- type: [String, Number, Object, Array],
208
- required: false,
209
- default: undefined,
210
- },
211
- textTag: {
212
- type: String,
213
- required: false,
214
- default: "span",
215
- },
216
- title: {
217
- type: [String, Number, Object, Array],
218
- required: false,
219
- default: undefined,
220
- },
221
- titleAttributes: {
222
- type: Object,
223
- required: false,
224
- default: () => ({}),
225
- },
226
- titlePlacement: {
227
- type: String,
228
- required: false,
229
- default: "top",
230
- validator: placement => placements.indexOf(placement) !== -1,
231
- },
232
- titleZIndex: {
233
- type: [Number, String],
234
- required: false,
235
- default: "auto",
236
- validator: value => {
237
- if (isString(value)) {
238
- return value === "auto";
239
- }
240
- return isInteger(value);
241
- },
242
- },
243
- type: {
244
- type: String,
245
- required: false,
246
- default: "button",
247
- validator: value => ["button", "submit", "reset"].indexOf(value) !== -1,
248
- },
249
- },
250
- emits: [
251
- "click",
252
- ],
253
- setup(props, context) {
254
- const {
255
- clickEmit,
256
- } = EmitsAPI(props, context);
257
-
258
-
259
- return {
260
- clickEmit,
261
- };
262
- },
263
- render() {
264
- return h(AElement, {
265
- ...this.$attrs,
266
- ...this.$props,
267
- onClick: this.clickEmit,
268
- }, this.$slots);
269
- },
270
- };
1
+ import {
2
+ h,
3
+ } from "vue";
4
+ import {
5
+ AElement,
6
+ } from "../index";
7
+
8
+ import EmitsAPI from "./compositionAPI/EmitsAPI";
9
+
10
+ import placements from "../const/placements";
11
+ import {
12
+ isInteger,
13
+ isString,
14
+ uniqueId,
15
+ } from "lodash-es";
16
+
17
+ export default {
18
+ name: "AButton",
19
+ inheritAttrs: false,
20
+ props: {
21
+ alwaysTranslate: {
22
+ type: Boolean,
23
+ required: false,
24
+ },
25
+ ariaDisabled: {
26
+ type: Boolean,
27
+ required: false,
28
+ default: undefined,
29
+ },
30
+ ariaLabel: {
31
+ type: [String, Number, Object],
32
+ required: false,
33
+ default: undefined,
34
+ },
35
+ attributes: {
36
+ type: Object,
37
+ required: false,
38
+ default: () => ({}),
39
+ },
40
+ class: {
41
+ type: [String, Object],
42
+ required: false,
43
+ default: undefined,
44
+ },
45
+ classDefault: {
46
+ type: String,
47
+ required: false,
48
+ default: "aloha_element",
49
+ },
50
+ classDefaultHidden: {
51
+ type: String,
52
+ required: false,
53
+ default: "aloha_element__hidden",
54
+ },
55
+ classDisabled: {
56
+ type: String,
57
+ required: false,
58
+ default: "disabled",
59
+ },
60
+ disabled: {
61
+ type: Boolean,
62
+ required: false,
63
+ default: undefined,
64
+ },
65
+ excludeRenderAttributes: {
66
+ type: Array,
67
+ required: false,
68
+ default: () => [],
69
+ },
70
+ extra: {
71
+ type: Object,
72
+ required: false,
73
+ default: undefined,
74
+ },
75
+ extraData: {
76
+ type: [String, Number, Boolean, Array, Object, Date, Function, Symbol, null, undefined],
77
+ required: false,
78
+ default: undefined,
79
+ },
80
+ html: {
81
+ type: [String, Number, Object, Array],
82
+ required: false,
83
+ default: undefined,
84
+ },
85
+ htmlScreenReader: {
86
+ type: [String, Number, Object, Array],
87
+ required: false,
88
+ default: undefined,
89
+ },
90
+ iconAttributes: {
91
+ type: Object,
92
+ required: false,
93
+ default: () => ({}),
94
+ },
95
+ iconClass: {
96
+ type: [String, Object],
97
+ required: false,
98
+ default: undefined,
99
+ },
100
+ iconLeft: {
101
+ type: [String, Object],
102
+ required: false,
103
+ default: undefined,
104
+ },
105
+ iconRight: {
106
+ type: [String, Object],
107
+ required: false,
108
+ default: undefined,
109
+ },
110
+ iconTag: {
111
+ type: String,
112
+ required: false,
113
+ default: undefined,
114
+ },
115
+ id: {
116
+ type: String,
117
+ required: false,
118
+ default: () => uniqueId("a_btn_"),
119
+ },
120
+ isSwitch: {
121
+ type: Boolean,
122
+ required: false,
123
+ default: undefined,
124
+ },
125
+ isTitleHtml: {
126
+ type: Boolean,
127
+ required: false,
128
+ default: undefined,
129
+ },
130
+ loading: {
131
+ type: Boolean,
132
+ required: false,
133
+ default: false,
134
+ },
135
+ loadingAlign: {
136
+ type: String,
137
+ required: false,
138
+ default: "right",
139
+ validator: value => ["right", "left"].indexOf(value) !== -1,
140
+ },
141
+ loadingClass: {
142
+ type: [String, Object],
143
+ required: false,
144
+ default: "a_spinner_small",
145
+ },
146
+ modelSwitch: {
147
+ type: Boolean,
148
+ required: false,
149
+ default: undefined,
150
+ },
151
+ prevent: {
152
+ type: Boolean,
153
+ required: false,
154
+ default: undefined,
155
+ },
156
+ preventKeyboardRepeat: {
157
+ type: Boolean,
158
+ required: false,
159
+ default: false,
160
+ },
161
+ safeHtml: {
162
+ type: [String, Number, Object, Array],
163
+ required: false,
164
+ default: undefined,
165
+ },
166
+ safeHtmlScreenReader: {
167
+ type: [String, Number, Object, Array],
168
+ required: false,
169
+ default: undefined,
170
+ },
171
+ stop: {
172
+ type: Boolean,
173
+ required: false,
174
+ default: undefined,
175
+ },
176
+ tabindex: {
177
+ type: [Number, String],
178
+ required: false,
179
+ default: undefined,
180
+ },
181
+ tag: {
182
+ type: String,
183
+ required: false,
184
+ default: undefined,
185
+ },
186
+ text: {
187
+ type: [String, Number, Object, Array],
188
+ required: false,
189
+ default: undefined,
190
+ },
191
+ textAfter: {
192
+ type: [String, Number, Object],
193
+ required: false,
194
+ default: undefined,
195
+ },
196
+ textAriaHidden: {
197
+ type: Boolean,
198
+ required: false,
199
+ default: undefined,
200
+ },
201
+ textBefore: {
202
+ type: [String, Number, Object],
203
+ required: false,
204
+ default: undefined,
205
+ },
206
+ textClass: {
207
+ type: String,
208
+ required: false,
209
+ default: undefined,
210
+ },
211
+ textScreenReader: {
212
+ type: [String, Number, Object, Array],
213
+ required: false,
214
+ default: undefined,
215
+ },
216
+ textTag: {
217
+ type: String,
218
+ required: false,
219
+ default: "span",
220
+ },
221
+ title: {
222
+ type: [String, Number, Object, Array],
223
+ required: false,
224
+ default: undefined,
225
+ },
226
+ titleAttributes: {
227
+ type: Object,
228
+ required: false,
229
+ default: () => ({}),
230
+ },
231
+ titlePlacement: {
232
+ type: String,
233
+ required: false,
234
+ default: "top",
235
+ validator: placement => placements.indexOf(placement) !== -1,
236
+ },
237
+ titleZIndex: {
238
+ type: [Number, String],
239
+ required: false,
240
+ default: "auto",
241
+ validator: value => {
242
+ if (isString(value)) {
243
+ return value === "auto";
244
+ }
245
+ return isInteger(value);
246
+ },
247
+ },
248
+ type: {
249
+ type: String,
250
+ required: false,
251
+ default: "button",
252
+ validator: value => ["button", "submit", "reset"].indexOf(value) !== -1,
253
+ },
254
+ },
255
+ emits: [
256
+ "click",
257
+ ],
258
+ setup(props, context) {
259
+ const {
260
+ clickEmit,
261
+ } = EmitsAPI(props, context);
262
+
263
+
264
+ return {
265
+ clickEmit,
266
+ };
267
+ },
268
+ render() {
269
+ return h(AElement, {
270
+ ...this.$attrs,
271
+ ...this.$props,
272
+ onClick: this.clickEmit,
273
+ }, this.$slots);
274
+ },
275
+ };
@@ -9,17 +9,18 @@ import {
9
9
  } from "../index";
10
10
 
11
11
  import AriaLabelAPI from "../ATranslation/compositionAPI/AriaLabelAPI";
12
- import AttributesAPI from "./comositionAPI/AttributesAPI";
13
- import ClickAPI from "./comositionAPI/ClickAPI";
14
- import ComponentLocalAPI from "./comositionAPI/ComponentLocalAPI";
15
- import DisabledAPI from "./comositionAPI/DisabledAPI";
16
- import HtmlTitleAPI from "./comositionAPI/HtmlTitleAPI";
17
- import LoadingAPI from "./comositionAPI/LoadingAPI";
18
- import RouterLinkAPI from "./comositionAPI/RouterLinkAPI";
19
- import SwitchAPI from "./comositionAPI/SwitchAPI";
20
- import TagAPI from "./comositionAPI/TagAPI";
21
- import TextAPI from "./comositionAPI/TextAPI";
22
- import TitleAPI from "./comositionAPI/TitleAPI";
12
+ import AttributesAPI from "./compositionAPI/AttributesAPI";
13
+ import ClickAPI from "./compositionAPI/ClickAPI";
14
+ import ComponentLocalAPI from "./compositionAPI/ComponentLocalAPI";
15
+ import DisabledAPI from "./compositionAPI/DisabledAPI";
16
+ import HtmlTitleAPI from "./compositionAPI/HtmlTitleAPI";
17
+ import KeydownAPI from "./compositionAPI/KeydownAPI";
18
+ import LoadingAPI from "./compositionAPI/LoadingAPI";
19
+ import RouterLinkAPI from "./compositionAPI/RouterLinkAPI";
20
+ import SwitchAPI from "./compositionAPI/SwitchAPI";
21
+ import TagAPI from "./compositionAPI/TagAPI";
22
+ import TextAPI from "./compositionAPI/TextAPI";
23
+ import TitleAPI from "./compositionAPI/TitleAPI";
23
24
  import UIExcludeRenderAttributesAPI from "../ui/compositionApi/UIExcludeRenderAttributesAPI";
24
25
 
25
26
  import {
@@ -172,6 +173,11 @@ export default {
172
173
  required: false,
173
174
  default: undefined,
174
175
  },
176
+ preventKeyboardRepeat: {
177
+ type: Boolean,
178
+ required: false,
179
+ default: false,
180
+ },
175
181
  safeHtml: {
176
182
  type: [String, Number, Object, Array],
177
183
  required: false,
@@ -346,6 +352,10 @@ export default {
346
352
  switchClass,
347
353
  } = SwitchAPI(props);
348
354
 
355
+ const {
356
+ onKeydown,
357
+ } = KeydownAPI(props, context);
358
+
349
359
 
350
360
  return {
351
361
  ariaLabelAttributes,
@@ -361,6 +371,7 @@ export default {
361
371
  isTextOrHtmlVisible,
362
372
  isTitleVisible,
363
373
  onClick,
374
+ onKeydown,
364
375
  switchClass,
365
376
  tagLocal,
366
377
  toHrefAttributes,
@@ -390,6 +401,7 @@ export default {
390
401
  "aria-pressed": this.isSwitchActive,
391
402
  isAllRowsSelected: undefined, // TODO: ATable
392
403
  onClick: this.onClick,
404
+ onKeydown: this.onKeydown,
393
405
  ...this.attributes,
394
406
  ...this.attributesToExcludeFromRender,
395
407
  }, {