@creative-web-solution/front-library 7.1.44 → 7.1.45
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 +5 -0
- package/Modules/DragSlider.ts +11 -6
- package/README.md +1 -1
- package/Types/DragSlider.d.ts +1 -0
- package/Types/Slider.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/Modules/DragSlider.ts
CHANGED
|
@@ -12,6 +12,7 @@ const defaultOptions = {
|
|
|
12
12
|
swipeTresholdMin: 40,
|
|
13
13
|
swipeTresholdSize: 0.5,
|
|
14
14
|
lockedClass: "is-locked",
|
|
15
|
+
makeSlideOutideViewportInert: false,
|
|
15
16
|
_animReset: function ($list) {
|
|
16
17
|
// gsap.set( $list, {
|
|
17
18
|
// "x": 0,
|
|
@@ -597,16 +598,20 @@ export default class DragSlider {
|
|
|
597
598
|
this.#viewportInfo.width;
|
|
598
599
|
|
|
599
600
|
if (hideElement1 || hideElement2) {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
601
|
+
if (this.#options.makeSlideOutideViewportInert) {
|
|
602
|
+
item.$item.setAttribute("tabindex", "-1");
|
|
603
|
+
item.$item.setAttribute("inert", "");
|
|
604
|
+
item.$item.setAttribute("aria-hidden", "true");
|
|
605
|
+
}
|
|
603
606
|
this.#hiddenItems.push(item);
|
|
604
607
|
return;
|
|
605
608
|
}
|
|
606
609
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
+
if (this.#options.makeSlideOutideViewportInert) {
|
|
611
|
+
item.$item.removeAttribute("tabindex");
|
|
612
|
+
item.$item.removeAttribute("inert");
|
|
613
|
+
item.$item.setAttribute("aria-hidden", "false");
|
|
614
|
+
}
|
|
610
615
|
this.#visibleItems.push(item);
|
|
611
616
|
});
|
|
612
617
|
};
|
package/README.md
CHANGED
package/Types/DragSlider.d.ts
CHANGED
package/Types/Slider.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ declare namespace FLib {
|
|
|
44
44
|
$button?: HTMLElement
|
|
45
45
|
}
|
|
46
46
|
type Callback = ( data: CallbackParam ) => void;
|
|
47
|
-
type InitCallback = ({ currentSlide:
|
|
47
|
+
type InitCallback = ({ currentSlide }: { currentSlide: SlideProperties }) => void;
|
|
48
48
|
|
|
49
49
|
type Options = {
|
|
50
50
|
/** @defaultValue 0 */
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@creative-web-solution/front-library",
|
|
3
3
|
"title": "Frontend library",
|
|
4
4
|
"description": "Frontend functions and modules",
|
|
5
|
-
"version": "7.1.
|
|
5
|
+
"version": "7.1.45",
|
|
6
6
|
"homepage": "https://github.com/creative-web-solution/front-library",
|
|
7
7
|
"author": "Creative Web Solution <contact@cws-studio.com> (https://www.cws-studio.com)",
|
|
8
8
|
"keywords": [],
|