@preline/non-auto 4.2.0 → 5.0.0

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.
Files changed (4) hide show
  1. package/index.d.ts +26 -2
  2. package/index.js +41 -41
  3. package/index.mjs +46 -46
  4. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -105,21 +105,36 @@ export interface ICarouselOptions {
105
105
  currentIndex: number;
106
106
  loadingClasses?: string | string[];
107
107
  dotsItemClasses?: string;
108
- mode?: "default" | "scroll-nav";
109
108
  isAutoHeight?: boolean;
110
109
  isAutoPlay?: boolean;
111
110
  isCentered?: boolean;
112
111
  isDraggable?: boolean;
112
+ dragThreshold?: number;
113
113
  isInfiniteLoop?: boolean;
114
+ isItemCustomWidth?: boolean;
114
115
  isRTL?: boolean;
115
116
  isSnap?: boolean;
117
+ isScrollBlocked?: boolean;
116
118
  hasSnapSpacers?: boolean;
117
119
  slidesQty?: TCarouselOptionsSlidesQty | number;
120
+ slideBy?: TCarouselOptionsSlidesQty | number | null;
118
121
  speed?: number;
119
122
  updateDelay?: number;
123
+ mode?: "default" | "snap" | "bounded";
124
+ boundedOptions?: {
125
+ maxWidth?: [
126
+ number,
127
+ "px" | "rem"
128
+ ];
129
+ slidesGap?: [
130
+ number,
131
+ "px" | "rem"
132
+ ];
133
+ spacersWidth?: number | "auto";
134
+ };
120
135
  }
121
136
  export interface ICarousel {
122
- options?: ICarouselOptions;
137
+ options: ICarouselOptions;
123
138
  recalculateWidth(): void;
124
139
  goToPrev(): void;
125
140
  goToNext(): void;
@@ -134,6 +149,7 @@ export declare class HSCarousel extends HSBasePlugin<ICarouselOptions> implement
134
149
  private readonly isAutoPlay;
135
150
  private readonly isCentered;
136
151
  private readonly isDraggable;
152
+ private readonly dragThreshold;
137
153
  private readonly isInfiniteLoop;
138
154
  private readonly isRTL;
139
155
  private readonly isSnap;
@@ -159,6 +175,7 @@ export declare class HSCarousel extends HSBasePlugin<ICarouselOptions> implement
159
175
  private isScrolling;
160
176
  private isDragging;
161
177
  private dragStartX;
178
+ private dragStartTime;
162
179
  private initialTranslateX;
163
180
  private readonly touchX;
164
181
  private readonly touchY;
@@ -220,6 +237,7 @@ export declare class HSCarousel extends HSBasePlugin<ICarouselOptions> implement
220
237
  private setTimer;
221
238
  private resetTimer;
222
239
  private detectDirection;
240
+ private getTargetTranslateX;
223
241
  private calculateTransform;
224
242
  private setTransform;
225
243
  private setTranslate;
@@ -705,6 +723,7 @@ export declare class HSDropdown extends HSBasePlugin<{}, IHTMLElementFloatingUI>
705
723
  private onTouchEndListener;
706
724
  private onCloserClickListener;
707
725
  constructor(el: IHTMLElementFloatingUI, options?: {}, events?: {});
726
+ private getEventMode;
708
727
  private elementMouseEnter;
709
728
  private elementMouseLeave;
710
729
  private toggleClick;
@@ -723,6 +742,7 @@ export declare class HSDropdown extends HSBasePlugin<{}, IHTMLElementFloatingUI>
723
742
  private onClickHandler;
724
743
  private onMouseEnterHandler;
725
744
  private onMouseLeaveHandler;
745
+ private getNextFocusableElement;
726
746
  private destroyFloatingUI;
727
747
  private focusElement;
728
748
  private setupFloatingUI;
@@ -741,6 +761,7 @@ export declare class HSDropdown extends HSBasePlugin<{}, IHTMLElementFloatingUI>
741
761
  static close(target: HSDropdown | HTMLElement | string): void;
742
762
  static closeCurrentlyOpened(evtTarget?: HTMLElement | null, isAnimated?: boolean): void;
743
763
  private setupAccessibility;
764
+ private onTabOut;
744
765
  private onFirstLetter;
745
766
  private onArrowX;
746
767
  private onStartEnd;
@@ -989,6 +1010,7 @@ export declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay {
989
1010
  static close(target: HSOverlay | HTMLElement | string): void;
990
1011
  static minify(target: HSOverlay | HTMLElement | string, isMinified: boolean): void;
991
1012
  static setOpened(breakpoint: number, el: ICollectionItem<HSOverlay>): void;
1013
+ private moveFocusWithinOverlay;
992
1014
  private setupAccessibility;
993
1015
  static on(evt: string, target: HSOverlay | HTMLElement | string, cb: Function): void;
994
1016
  }
@@ -1702,6 +1724,8 @@ export declare class HSTooltip extends HSBasePlugin<{}> implements ITooltip {
1702
1724
  private onToggleMouseEnterListener;
1703
1725
  private onToggleMouseLeaveListener;
1704
1726
  private onToggleHandleListener;
1727
+ private onToggleTouchListener;
1728
+ private onDocumentTouchListener;
1705
1729
  constructor(el: HTMLElement, options?: {}, events?: {});
1706
1730
  private toggleClick;
1707
1731
  private toggleFocus;