@creative-web-solution/front-library 7.1.46 → 7.1.47
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 +4 -0
- package/Modules/Slider/Slider.ts +4 -0
- package/Modules/Slider/SliderControls.ts +8 -4
- package/README.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/Modules/Slider/Slider.ts
CHANGED
|
@@ -116,6 +116,10 @@ export default class Slider {
|
|
|
116
116
|
return this.#options.moveByPage ? this.#nbPages : this.#nbSlides;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
get options(): FLib.Slider.Options {
|
|
120
|
+
return this.#options;
|
|
121
|
+
}
|
|
122
|
+
|
|
119
123
|
|
|
120
124
|
constructor( $slider: HTMLElement, userOptions: Partial<FLib.Slider.Options> = {} ) {
|
|
121
125
|
|
|
@@ -404,14 +404,18 @@ export default class SliderControls {
|
|
|
404
404
|
return;
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
-
|
|
408
|
-
|
|
407
|
+
const currentSlideIndex = (this.#slider.options.moveByPage ? currentSlide?.pageIndex : currentSlide?.index) ?? 0;
|
|
408
|
+
|
|
409
|
+
if ( currentSlide && this.#$bullets[ currentSlideIndex ] ) {
|
|
410
|
+
const $BULLET = this.#$bullets[ currentSlideIndex ] as HTMLElement;
|
|
409
411
|
$BULLET.setAttribute( 'aria-selected', 'false' );
|
|
410
412
|
$BULLET.setAttribute( 'tabindex', '-1' );
|
|
411
413
|
}
|
|
412
414
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
+
const targetlideIndex = (this.#slider.options.moveByPage ? targetSlide?.pageIndex : targetSlide?.index) ?? 0;
|
|
416
|
+
|
|
417
|
+
if ( targetSlide && this.#$bullets[ targetlideIndex ] ) {
|
|
418
|
+
const $BULLET = this.#$bullets[ targetlideIndex ] as HTMLElement;
|
|
415
419
|
$BULLET.setAttribute( 'aria-selected', 'true' );
|
|
416
420
|
$BULLET.setAttribute( 'tabindex', '0' );
|
|
417
421
|
}
|
package/README.md
CHANGED
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.47",
|
|
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": [],
|