@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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 7.1.45
4
+
5
+ * [Slider]: Fix type
6
+ * [DragSlider]: The feature that make slide outside viewport inert is tied to an option
7
+
3
8
  ## 7.1.44
4
9
 
5
10
  * [SkinSelect]: Fix click handler on full skinned select
@@ -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
- item.$item.setAttribute("tabindex", "-1");
601
- item.$item.setAttribute("inert", "");
602
- item.$item.setAttribute("aria-hidden", "true");
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
- item.$item.removeAttribute("tabindex");
608
- item.$item.removeAttribute("inert");
609
- item.$item.setAttribute("aria-hidden", "false");
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
@@ -1,6 +1,6 @@
1
1
  # Front Library
2
2
 
3
- @version: 7.1.44
3
+ @version: 7.1.45
4
4
 
5
5
 
6
6
  ## Use
@@ -31,6 +31,7 @@ declare namespace FLib {
31
31
  viewportSelector: string;
32
32
  listSelector: string;
33
33
  itemSelector: string;
34
+ makeSlideOutideViewportInert: boolean;
34
35
  dragClass: string;
35
36
  /** @defaultValue is-locked */
36
37
  lockedClass: string;
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: SlidePropertiesType }) => void;
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.44",
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": [],