uikit 3.25.27-dev.9e97c1f → 3.25.27

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 (222) hide show
  1. package/CHANGELOG.md +2 -34
  2. package/build/prefix.js +1 -1
  3. package/build/publishDev.js +1 -1
  4. package/build/scope.js +1 -1
  5. package/build/scss.js +1 -1
  6. package/dist/css/uikit-core-rtl.css +1569 -1692
  7. package/dist/css/uikit-core-rtl.min.css +1 -1
  8. package/dist/css/uikit-core.css +1569 -1692
  9. package/dist/css/uikit-core.min.css +1 -1
  10. package/dist/css/uikit-rtl.css +1210 -1326
  11. package/dist/css/uikit-rtl.min.css +1 -1
  12. package/dist/css/uikit.css +1210 -1326
  13. package/dist/css/uikit.min.css +1 -1
  14. package/dist/js/components/countdown.js +1 -1
  15. package/dist/js/components/countdown.min.js +1 -1
  16. package/dist/js/components/filter.js +1 -1
  17. package/dist/js/components/filter.min.js +1 -1
  18. package/dist/js/components/lightbox-panel.js +135 -134
  19. package/dist/js/components/lightbox-panel.min.js +1 -1
  20. package/dist/js/components/lightbox.js +136 -135
  21. package/dist/js/components/lightbox.min.js +1 -1
  22. package/dist/js/components/notification.js +6 -8
  23. package/dist/js/components/notification.min.js +1 -1
  24. package/dist/js/components/parallax.js +12 -8
  25. package/dist/js/components/parallax.min.js +1 -1
  26. package/dist/js/components/slider-parallax.js +12 -8
  27. package/dist/js/components/slider-parallax.min.js +1 -1
  28. package/dist/js/components/slider.js +25 -51
  29. package/dist/js/components/slider.min.js +1 -1
  30. package/dist/js/components/slideshow-parallax.js +12 -8
  31. package/dist/js/components/slideshow-parallax.min.js +1 -1
  32. package/dist/js/components/slideshow.js +102 -81
  33. package/dist/js/components/slideshow.min.js +1 -1
  34. package/dist/js/components/sortable.js +1 -1
  35. package/dist/js/components/sortable.min.js +1 -1
  36. package/dist/js/components/tooltip.js +17 -15
  37. package/dist/js/components/tooltip.min.js +1 -1
  38. package/dist/js/components/upload.js +1 -1
  39. package/dist/js/components/upload.min.js +1 -1
  40. package/dist/js/uikit-core.js +313 -856
  41. package/dist/js/uikit-core.min.js +1 -1
  42. package/dist/js/uikit-icons.js +1 -1
  43. package/dist/js/uikit-icons.min.js +1 -1
  44. package/dist/js/uikit.js +377 -711
  45. package/dist/js/uikit.min.js +1 -1
  46. package/package.json +2 -2
  47. package/src/js/api/component.js +3 -2
  48. package/src/js/api/observables.js +4 -16
  49. package/src/js/api/options.js +3 -6
  50. package/src/js/api/props.js +3 -1
  51. package/src/js/api/state.js +8 -7
  52. package/src/js/components/index.js +0 -1
  53. package/src/js/components/internal/lightbox-animations.js +26 -7
  54. package/src/js/components/internal/slider-preload.js +0 -1
  55. package/src/js/components/internal/slideshow-animations.js +62 -15
  56. package/src/js/components/lightbox-panel.js +96 -121
  57. package/src/js/components/lightbox.js +8 -5
  58. package/src/js/components/notification.js +5 -7
  59. package/src/js/core/accordion.js +31 -62
  60. package/src/js/core/drop.js +3 -4
  61. package/src/js/core/dropnav.js +3 -3
  62. package/src/js/core/grid.js +19 -5
  63. package/src/js/core/margin.js +0 -3
  64. package/src/js/core/scroll.js +11 -0
  65. package/src/js/core/sticky.js +1 -1
  66. package/src/js/core/switcher.js +49 -12
  67. package/src/js/core/video.js +21 -236
  68. package/src/js/mixin/internal/slideshow-animations.js +13 -5
  69. package/src/js/mixin/internal/slideshow-transitioner.js +2 -2
  70. package/src/js/mixin/parallax.js +4 -1
  71. package/src/js/mixin/position.js +1 -1
  72. package/src/js/mixin/slider-parallax.js +38 -9
  73. package/src/js/mixin/togglable.js +14 -13
  74. package/src/js/util/attr.js +7 -7
  75. package/src/js/util/dom.js +4 -3
  76. package/src/js/util/lang.js +2 -2
  77. package/src/js/util/player.js +2 -4
  78. package/src/js/util/style.js +13 -12
  79. package/src/js/util/viewport.js +25 -22
  80. package/src/less/components/_import.less +3 -8
  81. package/src/less/components/animation.less +1 -1
  82. package/src/less/components/base.less +1 -1
  83. package/src/less/components/button.less +1 -1
  84. package/src/less/components/card.less +8 -8
  85. package/src/less/components/form.less +15 -15
  86. package/src/less/components/grid.less +65 -58
  87. package/src/less/components/lightbox.less +8 -2
  88. package/src/less/components/margin.less +124 -155
  89. package/src/less/components/modal.less +4 -1
  90. package/src/less/components/nav.less +1 -1
  91. package/src/less/components/navbar.less +1 -1
  92. package/src/less/components/padding.less +9 -9
  93. package/src/less/components/position.less +4 -9
  94. package/src/less/components/search.less +1 -1
  95. package/src/less/components/slideshow.less +4 -1
  96. package/src/less/components/switcher.less +2 -5
  97. package/src/less/components/table.less +4 -4
  98. package/src/less/components/text.less +4 -10
  99. package/src/less/components/utility.less +163 -0
  100. package/src/less/components/visibility.less +4 -4
  101. package/src/less/theme/_import.less +2 -6
  102. package/src/less/theme/alert.less +5 -0
  103. package/src/less/theme/thumbnav.less +4 -1
  104. package/src/less/theme/utility.less +32 -0
  105. package/src/scss/components/_import.scss +3 -8
  106. package/src/scss/components/animation.scss +1 -1
  107. package/src/scss/components/base.scss +1 -1
  108. package/src/scss/components/button.scss +1 -1
  109. package/src/scss/components/card.scss +8 -8
  110. package/src/scss/components/form.scss +14 -14
  111. package/src/scss/components/grid.scss +64 -57
  112. package/src/scss/components/lightbox.scss +8 -2
  113. package/src/scss/components/margin.scss +124 -155
  114. package/src/scss/components/modal.scss +4 -1
  115. package/src/scss/components/nav.scss +1 -1
  116. package/src/scss/components/navbar.scss +1 -1
  117. package/src/scss/components/padding.scss +9 -9
  118. package/src/scss/components/position.scss +4 -9
  119. package/src/scss/components/search.scss +1 -1
  120. package/src/scss/components/slideshow.scss +4 -1
  121. package/src/scss/components/switcher.scss +2 -5
  122. package/src/scss/components/table.scss +4 -4
  123. package/src/scss/components/text.scss +4 -10
  124. package/src/scss/components/utility.scss +129 -0
  125. package/src/scss/components/visibility.scss +4 -4
  126. package/src/scss/mixins-theme.scss +43 -44
  127. package/src/scss/mixins.scss +31 -40
  128. package/src/scss/variables-theme.scss +14 -14
  129. package/src/scss/variables.scss +14 -14
  130. package/tests/accordion.html +10 -77
  131. package/tests/alert.html +1 -1
  132. package/tests/align.html +5 -5
  133. package/tests/animation.html +4 -4
  134. package/tests/article.html +7 -7
  135. package/tests/background.html +2 -2
  136. package/tests/badge.html +1 -1
  137. package/tests/base.html +2 -2
  138. package/tests/button.html +1 -1
  139. package/tests/card.html +15 -15
  140. package/tests/close.html +2 -2
  141. package/tests/comment.html +9 -9
  142. package/tests/container.html +2 -2
  143. package/tests/countdown.html +21 -21
  144. package/tests/cover.html +3 -3
  145. package/tests/description-list.html +1 -1
  146. package/tests/divider.html +3 -3
  147. package/tests/dotnav.html +1 -1
  148. package/tests/drop.html +7 -7
  149. package/tests/dropbar.html +5 -5
  150. package/tests/dropdown.html +1 -1
  151. package/tests/dropnav.html +18 -18
  152. package/tests/filter.html +3 -3
  153. package/tests/form.html +14 -14
  154. package/tests/grid.html +47 -41
  155. package/tests/heading.html +2 -2
  156. package/tests/height-viewport.html +4 -4
  157. package/tests/height.html +5 -5
  158. package/tests/icon.html +8 -8
  159. package/tests/image.html +6 -6
  160. package/tests/index.html +13 -13
  161. package/tests/js/index.js +1 -1
  162. package/tests/leader.html +5 -5
  163. package/tests/lightbox.html +6 -6
  164. package/tests/link.html +1 -1
  165. package/tests/list.html +4 -4
  166. package/tests/margin.html +7 -59
  167. package/tests/marker.html +3 -3
  168. package/tests/modal.html +3 -3
  169. package/tests/nav.html +5 -5
  170. package/tests/navbar.html +27 -27
  171. package/tests/notification.html +2 -8
  172. package/tests/offcanvas.html +12 -12
  173. package/tests/overlay.html +3 -3
  174. package/tests/padding.html +1 -1
  175. package/tests/pagination.html +3 -3
  176. package/tests/parallax.html +1 -1
  177. package/tests/position.html +6 -6
  178. package/tests/scrollspy.html +13 -13
  179. package/tests/search.html +5 -5
  180. package/tests/section.html +17 -17
  181. package/tests/slidenav.html +3 -3
  182. package/tests/slider.html +5 -5
  183. package/tests/slideshow.html +3 -33
  184. package/tests/sortable.html +15 -15
  185. package/tests/sticky-navbar.html +4 -4
  186. package/tests/sticky-parallax.html +3 -3
  187. package/tests/sticky.html +3 -3
  188. package/tests/svg.html +2 -3
  189. package/tests/switcher.html +7 -7
  190. package/tests/tab.html +5 -5
  191. package/tests/text.html +3 -9
  192. package/tests/tile.html +4 -4
  193. package/tests/toggle.html +1 -1
  194. package/tests/tooltip.html +3 -3
  195. package/tests/totop.html +2 -2
  196. package/tests/transition.html +1 -1
  197. package/tests/upload.html +5 -5
  198. package/tests/utility.html +116 -16
  199. package/tests/video.html +24 -224
  200. package/tests/visibility.html +4 -4
  201. package/tests/width.html +12 -12
  202. package/dist/js/components/marquee.js +0 -215
  203. package/dist/js/components/marquee.min.js +0 -1
  204. package/src/js/components/marquee.js +0 -156
  205. package/src/js/mixin/connect.js +0 -90
  206. package/src/js/mixin/scroll-driven.js +0 -57
  207. package/src/less/components/dropcap.less +0 -71
  208. package/src/less/components/floating-shadow.less +0 -66
  209. package/src/less/components/logo.less +0 -94
  210. package/src/less/components/marquee.less +0 -133
  211. package/src/less/theme/dropcap.less +0 -29
  212. package/src/less/theme/floating-shadow.less +0 -20
  213. package/src/less/theme/logo.less +0 -29
  214. package/src/less/theme/marquee.less +0 -14
  215. package/src/scss/components/dropcap.scss +0 -63
  216. package/src/scss/components/floating-shadow.scss +0 -63
  217. package/src/scss/components/logo.scss +0 -75
  218. package/src/scss/components/marquee.scss +0 -136
  219. package/tests/dropcap.html +0 -26
  220. package/tests/floating-shadow.html +0 -44
  221. package/tests/logo.html +0 -84
  222. package/tests/marquee.html +0 -617
@@ -6,7 +6,6 @@ import {
6
6
  css,
7
7
  dimensions,
8
8
  filter,
9
- findIndex,
10
9
  getIndex,
11
10
  hasClass,
12
11
  includes,
@@ -23,16 +22,17 @@ import {
23
22
  import { generateId } from '../api/instance';
24
23
  import { lazyload } from '../api/observables';
25
24
  import Class from '../mixin/class';
26
- import Connect from '../mixin/connect';
27
25
  import { maybeDefaultPreventClick } from '../mixin/event';
26
+ import Togglable from '../mixin/togglable';
28
27
  import { keyMap } from '../util/keys';
29
28
 
30
29
  const wrappers = new WeakMap();
31
30
 
32
31
  export default {
33
- mixins: [Class, Connect],
32
+ mixins: [Class, Togglable],
34
33
 
35
34
  props: {
35
+ animation: Boolean,
36
36
  targets: String,
37
37
  active: null,
38
38
  collapsible: Boolean,
@@ -40,25 +40,18 @@ export default {
40
40
  toggle: String,
41
41
  content: String,
42
42
  offset: Number,
43
- switcherConnect: String,
44
43
  },
45
44
 
46
45
  data: {
47
46
  targets: '> *',
48
47
  active: false,
49
- animation: [true],
48
+ animation: true,
50
49
  collapsible: true,
51
50
  multiple: false,
52
51
  clsOpen: 'uk-open',
53
- cls: 'uk-active',
54
52
  toggle: '.uk-accordion-title',
55
53
  content: '.uk-accordion-content',
56
54
  offset: 0,
57
- switcherConnect: '',
58
- },
59
-
60
- beforeConnect() {
61
- this.connect = this.$props.connect = this.switcherConnect;
62
55
  },
63
56
 
64
57
  computed: {
@@ -90,13 +83,6 @@ export default {
90
83
  }
91
84
  },
92
85
 
93
- connectChildren() {
94
- this.showConnects(
95
- findIndex(this.items, (el) => hasClass(el, this.clsOpen)),
96
- false,
97
- );
98
- },
99
-
100
86
  toggles() {
101
87
  this.$emit();
102
88
  },
@@ -163,69 +149,52 @@ export default {
163
149
  continue;
164
150
  }
165
151
 
166
- const active = includes(activeItems, this.items[index]);
167
-
168
- attr(content, {
169
- id: generateId(this, content),
170
- role: 'region',
171
- 'aria-labelledby': toggle.id,
172
- });
173
- if (isTag(content, 'ul')) {
174
- attr(children(content), 'role', 'presentation');
175
- }
176
-
177
- const controls = [
178
- content.id,
179
- ...this.connects.map(({ children }) => children[index]?.id).filter(Boolean),
180
- ];
152
+ toggle.id = generateId(this, toggle);
153
+ content.id = generateId(this, content);
181
154
 
155
+ const active = includes(activeItems, this.items[index]);
182
156
  attr(toggle, {
183
157
  role: isTag(toggle, 'a') ? 'button' : null,
184
- 'aria-controls': controls.join(' '),
158
+ 'aria-controls': content.id,
185
159
  'aria-expanded': active,
186
160
  'aria-disabled': !this.collapsible && activeItems.length < 2 && active,
187
161
  });
162
+
163
+ attr(content, { role: 'region', 'aria-labelledby': toggle.id });
164
+ if (isTag(content, 'ul')) {
165
+ attr(children(content), 'role', 'presentation');
166
+ }
188
167
  }
189
168
  },
190
169
 
191
170
  methods: {
192
- async toggle(item, animate) {
193
- animate = animate !== false;
194
-
195
- const next = getIndex(item, this.items);
196
-
197
- item = this.items[next];
171
+ toggle(item, animate) {
172
+ item = this.items[getIndex(item, this.items)];
198
173
  let items = [item];
199
174
  const activeItems = filter(this.items, `.${this.clsOpen}`);
200
- const isActive = includes(activeItems, item);
201
175
 
202
- if (isActive && !this.collapsible && activeItems.length < 2) {
203
- return;
176
+ if (!this.multiple && !includes(activeItems, items[0])) {
177
+ items = items.concat(activeItems);
204
178
  }
205
179
 
206
- if (!isActive && !this.multiple) {
207
- items.push(...activeItems);
180
+ if (!this.collapsible && activeItems.length < 2 && includes(activeItems, item)) {
181
+ items = [];
208
182
  }
209
183
 
210
- const toggle = (el) =>
211
- this.toggleElement(el, !includes(activeItems, el), (el, show) => {
212
- toggleClass(el, this.clsOpen, show);
213
-
214
- if (!animate || !this.hasAnimation) {
215
- hide($(this.content, el), !show);
216
- return;
217
- }
184
+ return Promise.all(
185
+ items.map((el) =>
186
+ this.toggleElement(el, !includes(activeItems, el), (el, show) => {
187
+ toggleClass(el, this.clsOpen, show);
218
188
 
219
- return transition(el, show, this);
220
- });
189
+ if (animate === false || !this.animation) {
190
+ hide($(this.content, el), !show);
191
+ return;
192
+ }
221
193
 
222
- const hideIndex = () =>
223
- findIndex(this.items, (i) => i !== item && includes(activeItems, i));
224
-
225
- return Promise.all([
226
- ...items.map(toggle),
227
- this.showConnects(isActive ? hideIndex() : next, animate),
228
- ]);
194
+ return transition(el, show, this);
195
+ }),
196
+ ),
197
+ );
229
198
  },
230
199
  },
231
200
  };
@@ -391,7 +391,6 @@ export default {
391
391
  this.$el.hidden = true;
392
392
 
393
393
  const viewports = this.target.map((target) => getViewport(this.$el, target));
394
- const boundaryOffsets = this.boundary.map((el) => offset(el));
395
394
  const viewportOffset = this.getViewportOffset(this.$el);
396
395
 
397
396
  const dirs = [
@@ -403,7 +402,7 @@ export default {
403
402
  if (this.axis !== axis && includes([axis, true], this.stretch)) {
404
403
  css(this.$el, {
405
404
  [prop]: Math.min(
406
- boundaryOffsets[i][prop],
405
+ offset(this.boundary[i])[prop],
407
406
  viewports[i][prop] - 2 * viewportOffset,
408
407
  ),
409
408
  [`overflow-${axis}`]: 'auto',
@@ -436,11 +435,11 @@ export default {
436
435
  (targetOffset[start] > elOffset[start]
437
436
  ? targetOffset[this.inset ? end : start] -
438
437
  Math.max(
439
- boundaryOffsets[i][start],
438
+ offset(this.boundary[i])[start],
440
439
  viewports[i][start] + viewportOffset,
441
440
  )
442
441
  : Math.min(
443
- boundaryOffsets[i][end],
442
+ offset(this.boundary[i])[end],
444
443
  viewports[i][end] - viewportOffset,
445
444
  ) - targetOffset[this.inset ? start : end]) - positionOffset,
446
445
  [`overflow-${axis}`]: 'auto',
@@ -277,9 +277,9 @@ export default {
277
277
  const drop = this.getDropdown(target);
278
278
  const adjustHeight = () => {
279
279
  const maxBottom = Math.max(
280
- ...[...parents(target, `.${this.clsDrop}`), target].map(
281
- (el) => offset(el).bottom,
282
- ),
280
+ ...parents(target, `.${this.clsDrop}`)
281
+ .concat(target)
282
+ .map((el) => offset(el).bottom),
283
283
  );
284
284
 
285
285
  offset(this.dropbar, {
@@ -1,4 +1,14 @@
1
- import { addClass, css, isRtl, scrolledOver, sumBy, toFloat, toggleClass, toPx } from 'uikit-util';
1
+ import {
2
+ addClass,
3
+ css,
4
+ hasClass,
5
+ isRtl,
6
+ scrolledOver,
7
+ sumBy,
8
+ toFloat,
9
+ toggleClass,
10
+ toPx,
11
+ } from 'uikit-util';
2
12
  import { scroll } from '../api/observables';
3
13
  import Class from '../mixin/class';
4
14
  import Margin from './margin';
@@ -19,8 +29,7 @@ export default {
19
29
  },
20
30
 
21
31
  data: {
22
- margin: '',
23
- firstRow: 'uk-first-row',
32
+ margin: 'uk-grid-margin',
24
33
  clsStack: 'uk-grid-stack',
25
34
  masonry: false,
26
35
  parallax: 0,
@@ -47,7 +56,7 @@ export default {
47
56
  {
48
57
  read(data) {
49
58
  const { rows } = data;
50
- let { masonry, parallax, parallaxJustify } = this;
59
+ let { masonry, parallax, parallaxJustify, margin } = this;
51
60
 
52
61
  parallax = Math.max(0, toPx(parallax));
53
62
 
@@ -62,7 +71,7 @@ export default {
62
71
  return (data.translates = data.scrollColumns = false);
63
72
  }
64
73
 
65
- let gutter = toFloat(css(this.$el, 'row-gap'));
74
+ let gutter = getGutter(rows, margin);
66
75
 
67
76
  let columns;
68
77
  let translates;
@@ -176,6 +185,11 @@ function applyMasonry(rows, gutter, next) {
176
185
  return [columns, translates];
177
186
  }
178
187
 
188
+ function getGutter(rows, cls) {
189
+ const node = rows.flat().find((el) => hasClass(el, cls));
190
+ return toFloat(node ? css(node, 'marginTop') : css(rows[0][0], 'paddingLeft'));
191
+ }
192
+
179
193
  function transpose(rows) {
180
194
  const columns = [];
181
195
  for (const row of rows) {
@@ -4,13 +4,11 @@ import { mutation, resize } from '../api/observables';
4
4
  export default {
5
5
  props: {
6
6
  margin: String,
7
- firstRow: Boolean,
8
7
  firstColumn: Boolean,
9
8
  },
10
9
 
11
10
  data: {
12
11
  margin: 'uk-margin-small-top',
13
- firstRow: false,
14
12
  firstColumn: 'uk-first-column',
15
13
  },
16
14
 
@@ -54,7 +52,6 @@ export default {
54
52
  for (const row of rows) {
55
53
  for (const el of row) {
56
54
  toggleClass(el, this.margin, rows[0] !== row);
57
- toggleClass(el, this.firstRow, rows[0] === row);
58
55
  toggleClass(el, this.firstColumn, row[isRtl ? row.length - 1 : 0] === el);
59
56
  }
60
57
  }
@@ -1,9 +1,12 @@
1
1
  import {
2
2
  $,
3
+ attr,
3
4
  getTargetedElement,
5
+ isFocusable,
4
6
  isSameSiteAnchor,
5
7
  off,
6
8
  on,
9
+ once,
7
10
  scrollIntoView,
8
11
  trigger,
9
12
  } from 'uikit-util';
@@ -31,6 +34,14 @@ export default {
31
34
 
32
35
  if (trigger(this.$el, 'beforescroll', [this, el])) {
33
36
  await scrollIntoView(el, { offset: this.offset });
37
+
38
+ if (!isFocusable(el)) {
39
+ attr(el, 'tabindex', '-1');
40
+ once(el, 'blur', () => attr(el, 'tabindex', null));
41
+ }
42
+
43
+ el.focus({ preventScroll: true });
44
+
34
45
  trigger(this.$el, 'scrolled', [this, el]);
35
46
  }
36
47
  },
@@ -464,7 +464,7 @@ function parseProp(value, el, propOffset, padding) {
464
464
  return 0;
465
465
  }
466
466
 
467
- if (isNumeric(value) || (isString(value) && /^-?\d/.test(value))) {
467
+ if (isNumeric(value) || (isString(value) && value.match(/^-?\d/))) {
468
468
  return propOffset + toPx(value, 'height', el, true);
469
469
  } else {
470
470
  const refElement = value === true ? getVisibleParent(el) : query(value, el);
@@ -9,23 +9,27 @@ import {
9
9
  getIndex,
10
10
  hasClass,
11
11
  isNumeric,
12
+ isTag,
12
13
  matches,
13
14
  queryAll,
15
+ toArray,
14
16
  toggleClass,
15
17
  } from 'uikit-util';
16
- import { swipe } from '../api/observables';
17
- import Connect from '../mixin/connect';
18
+ import { generateId } from '../api/instance';
19
+ import { lazyload, swipe } from '../api/observables';
18
20
  import { maybeDefaultPreventClick } from '../mixin/event';
21
+ import Togglable from '../mixin/togglable';
19
22
  import { getNavigationIndex, keyMap } from '../util/keys';
20
23
 
21
24
  const selDisabled = '.uk-disabled *, .uk-disabled, [disabled]';
22
25
 
23
26
  export default {
24
- mixins: [Connect],
27
+ mixins: [Togglable],
25
28
 
26
29
  args: 'connect',
27
30
 
28
31
  props: {
32
+ connect: String,
29
33
  toggle: String,
30
34
  itemNav: String,
31
35
  active: Number,
@@ -38,6 +42,7 @@ export default {
38
42
  toggle: '> * > :first-child',
39
43
  itemNav: false,
40
44
  active: 0,
45
+ cls: 'uk-active',
41
46
  attrItem: 'uk-switcher-item',
42
47
  selVertical: '.uk-nav',
43
48
  followFocus: false,
@@ -45,6 +50,15 @@ export default {
45
50
  },
46
51
 
47
52
  computed: {
53
+ connects: {
54
+ get: ({ connect }, $el) => queryAll(connect, $el),
55
+ observe: ({ connect }) => connect,
56
+ },
57
+
58
+ connectChildren() {
59
+ return this.connects.flatMap((el) => children(el));
60
+ },
61
+
48
62
  toggles: ({ toggle }, $el) => $$(toggle, $el),
49
63
 
50
64
  children(_, $el) {
@@ -81,7 +95,10 @@ export default {
81
95
  this.$el.role = 'tablist';
82
96
  },
83
97
 
84
- observe: swipe({ target: ({ connects }) => connects, filter: ({ swiping }) => swiping }),
98
+ observe: [
99
+ lazyload({ targets: ({ connectChildren }) => connectChildren }),
100
+ swipe({ target: ({ connects }) => connects, filter: ({ swiping }) => swiping }),
101
+ ],
85
102
 
86
103
  events: [
87
104
  {
@@ -156,17 +173,28 @@ export default {
156
173
  ],
157
174
 
158
175
  update() {
176
+ for (const el of this.connects) {
177
+ if (isTag(el, 'ul')) {
178
+ el.role = 'presentation';
179
+ }
180
+ }
159
181
  attr(children(this.$el), 'role', 'presentation');
160
182
 
161
183
  for (const index in this.toggles) {
162
- const controls = this.connects
163
- .map(({ children }) => children[index]?.id)
164
- .filter(Boolean);
184
+ const toggle = this.toggles[index];
185
+ const item = this.connects[0]?.children[index];
165
186
 
166
- attr(this.toggles[index], {
167
- role: 'tab',
168
- 'aria-controls': controls.join(' '),
169
- });
187
+ toggle.role = 'tab';
188
+
189
+ if (!item) {
190
+ continue;
191
+ }
192
+
193
+ toggle.id = generateId(this, toggle);
194
+ item.id = generateId(this, item);
195
+
196
+ attr(toggle, 'aria-controls', item.id);
197
+ attr(item, { role: 'tabpanel', 'aria-labelledby': toggle.id });
170
198
  }
171
199
  attr(this.$el, 'aria-orientation', matches(this.$el, this.selVertical) ? 'vertical' : null);
172
200
  },
@@ -205,7 +233,16 @@ export default {
205
233
  });
206
234
  });
207
235
 
208
- return this.showConnects(next, prev >= 0 && prev !== next);
236
+ const animate = prev >= 0 && prev !== next;
237
+ this.connects.forEach(async ({ children }) => {
238
+ const actives = toArray(children).filter(
239
+ (child, i) => i !== next && hasClass(child, this.cls),
240
+ );
241
+
242
+ if (await this.toggleElement(actives, false, animate)) {
243
+ await this.toggleElement(children[next], true, animate);
244
+ }
245
+ });
209
246
  },
210
247
  },
211
248
  };