GULP DIST

This commit is contained in:
2022-04-07 14:11:14 +02:00
parent 0a1f83b99c
commit 5e7215d041
137 changed files with 18556 additions and 2641 deletions

View File

@@ -111,7 +111,7 @@ export default function A11y({
}
function updateNavigation() {
if (swiper.params.loop || !swiper.navigation) return;
if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return;
const {
$nextEl,
$prevEl
@@ -139,23 +139,34 @@ export default function A11y({
}
function hasPagination() {
return swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length;
return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length;
}
function hasClickablePagination() {
return hasPagination() && swiper.params.pagination.clickable;
}
function updatePagination() {
const params = swiper.params.a11y;
if (!hasPagination()) return;
swiper.pagination.bullets.each(bulletEl => {
const $bulletEl = $(bulletEl);
if (hasPagination()) {
swiper.pagination.bullets.each(bulletEl => {
const $bulletEl = $(bulletEl);
if (swiper.params.pagination.clickable) {
makeElFocusable($bulletEl);
if (!swiper.params.pagination.renderBullet) {
addElRole($bulletEl, 'button');
addElLabel($bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, $bulletEl.index() + 1));
}
});
}
}
if ($bulletEl.is(`.${swiper.params.pagination.bulletActiveClass}`)) {
$bulletEl.attr('aria-current', 'true');
} else {
$bulletEl.removeAttr('aria-current');
}
});
}
const initNavEl = ($el, wrapperId, message) => {
@@ -224,7 +235,7 @@ export default function A11y({
} // Pagination
if (hasPagination()) {
if (hasClickablePagination()) {
swiper.pagination.$el.on('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);
}
}
@@ -251,7 +262,7 @@ export default function A11y({
} // Pagination
if (hasPagination()) {
if (hasClickablePagination()) {
swiper.pagination.$el.off('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);
}
}