well-waterfall 1.2.4 → 1.2.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.
- package/dist/index.es.js +496 -489
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/attributes.d.ts +1 -0
- package/dist/util.d.ts +1 -0
- package/package.json +1 -1
- package/src/index.ts +4 -1
- package/src/lib/attributes.ts +1 -0
- package/src/util.ts +6 -0
package/dist/lib/attributes.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const ATTR_WATERFALL = "waterfall";
|
|
2
2
|
export declare const ATTR_WATERFALL_PRELOAD = "waterfall-preload";
|
|
3
3
|
export declare const ATTR_WATERFALL_POSTLOAD = "waterfall-postload";
|
|
4
|
+
export declare const ATTR_WATERFALL_CONTENT = "waterfall-content";
|
|
4
5
|
export declare const ATTR_DEBUG_MODE = "waterfall-debug-mode";
|
|
5
6
|
export declare const ATTR_ADVANCED_DEBUG_MODE = "waterfall-advanced-debug-mode";
|
|
6
7
|
export declare const ATTR_A11Y = "waterfall-a11y";
|
package/dist/util.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ export declare function parseNumber(el: HTMLElement, attrName: string, defaultVa
|
|
|
8
8
|
export declare function parseBoolean(el: HTMLElement, attrName: string, defaultValue?: boolean): boolean | undefined;
|
|
9
9
|
export declare function removeNullOrUndefinedKeys<T extends Record<string, any>>(obj: T): T;
|
|
10
10
|
export declare function getSwipersByName(waterfalls: Waterfall[], selector: string, debug: boolean): Swiper[];
|
|
11
|
+
export declare function fixWebflowCMSListARIARole(): void;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ import "swiper/css/bundle";
|
|
|
4
4
|
import { SwiperOptions } from "swiper/types";
|
|
5
5
|
import { Waterfall } from "./types/waterfall";
|
|
6
6
|
|
|
7
|
-
import { removeNullOrUndefinedKeys, parseString, parseBoolean } from "./util";
|
|
7
|
+
import { removeNullOrUndefinedKeys, parseString, parseBoolean, fixWebflowCMSListARIARole } from "./util";
|
|
8
8
|
import { navigationConfig } from "./modules/navigation";
|
|
9
9
|
import { breakpointsConfig } from "./modules/breakpoints";
|
|
10
10
|
import { paginationConfig } from "./modules/pagination";
|
|
@@ -115,3 +115,6 @@ manipulateSlides();
|
|
|
115
115
|
|
|
116
116
|
// SLIDE COUNT
|
|
117
117
|
initSlideCount();
|
|
118
|
+
|
|
119
|
+
// ARIA ROLE FIX FOR WEBFLOW CMS LIST
|
|
120
|
+
fixWebflowCMSListARIARole();
|
package/src/lib/attributes.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export const ATTR_WATERFALL = "waterfall";
|
|
3
3
|
export const ATTR_WATERFALL_PRELOAD = "waterfall-preload";
|
|
4
4
|
export const ATTR_WATERFALL_POSTLOAD = "waterfall-postload";
|
|
5
|
+
export const ATTR_WATERFALL_CONTENT = "waterfall-content";
|
|
5
6
|
// Debug
|
|
6
7
|
export const ATTR_DEBUG_MODE = "waterfall-debug-mode";
|
|
7
8
|
export const ATTR_ADVANCED_DEBUG_MODE = "waterfall-advanced-debug-mode";
|
package/src/util.ts
CHANGED
|
@@ -84,3 +84,9 @@ export function getSwipersByName(waterfalls: Waterfall[], selector: string, debu
|
|
|
84
84
|
|
|
85
85
|
return matchedSwipers;
|
|
86
86
|
}
|
|
87
|
+
|
|
88
|
+
export function fixWebflowCMSListARIARole() {
|
|
89
|
+
document.querySelectorAll('[waterfall] .swiper-wrapper[role="list"]').forEach((wrapper) => {
|
|
90
|
+
wrapper.removeAttribute("role");
|
|
91
|
+
});
|
|
92
|
+
}
|