@preline/non-auto 4.2.0 → 5.1.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 +35 -2
  2. package/index.js +65 -63
  3. package/index.mjs +55 -55
  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;
@@ -573,6 +591,7 @@ export interface ISelectOptions {
573
591
  searchNoResultText?: string | null;
574
592
  searchNoResultClasses?: string | null;
575
593
  optionAllowEmptyOption?: boolean;
594
+ optionValueAsTitle?: boolean;
576
595
  optionTemplate?: string;
577
596
  optionTag?: string;
578
597
  optionClasses?: string;
@@ -601,6 +620,7 @@ export interface ICustomDatepickerOptions extends Options {
601
620
  inputModeOptions?: {
602
621
  dateSeparator?: string;
603
622
  itemsSeparator?: string;
623
+ closeOnSelect?: boolean;
604
624
  };
605
625
  templates?: {
606
626
  time?: string;
@@ -620,6 +640,7 @@ export interface ICustomDatepickerOptions extends Options {
620
640
  dateFormat?: string;
621
641
  dateLocale?: string;
622
642
  replaceTodayWithText?: boolean;
643
+ showTodayButton?: boolean;
623
644
  }
624
645
  export interface IDatepicker {
625
646
  options?: ICustomDatepickerOptions;
@@ -642,6 +663,7 @@ export declare class HSDatepicker extends HSBasePlugin<{}> implements IDatepicke
642
663
  private changeDateSeparator;
643
664
  private formatDateArrayToIndividualDates;
644
665
  private hasTime;
666
+ private shouldCloseOnSelect;
645
667
  private createArrowFromTemplate;
646
668
  private concatObjectProperties;
647
669
  private updateTemplate;
@@ -658,6 +680,9 @@ export declare class HSDatepicker extends HSBasePlugin<{}> implements IDatepicke
658
680
  private parseCustomYear;
659
681
  private parseArrowPrev;
660
682
  private parseArrowNext;
683
+ private generateCustomTodayMarkup;
684
+ private parseCustomToday;
685
+ private selectToday;
661
686
  private processCustomTemplate;
662
687
  private disableOptions;
663
688
  private disableNav;
@@ -705,6 +730,7 @@ export declare class HSDropdown extends HSBasePlugin<{}, IHTMLElementFloatingUI>
705
730
  private onTouchEndListener;
706
731
  private onCloserClickListener;
707
732
  constructor(el: IHTMLElementFloatingUI, options?: {}, events?: {});
733
+ private getEventMode;
708
734
  private elementMouseEnter;
709
735
  private elementMouseLeave;
710
736
  private toggleClick;
@@ -723,6 +749,7 @@ export declare class HSDropdown extends HSBasePlugin<{}, IHTMLElementFloatingUI>
723
749
  private onClickHandler;
724
750
  private onMouseEnterHandler;
725
751
  private onMouseLeaveHandler;
752
+ private getNextFocusableElement;
726
753
  private destroyFloatingUI;
727
754
  private focusElement;
728
755
  private setupFloatingUI;
@@ -741,6 +768,7 @@ export declare class HSDropdown extends HSBasePlugin<{}, IHTMLElementFloatingUI>
741
768
  static close(target: HSDropdown | HTMLElement | string): void;
742
769
  static closeCurrentlyOpened(evtTarget?: HTMLElement | null, isAnimated?: boolean): void;
743
770
  private setupAccessibility;
771
+ private onTabOut;
744
772
  private onFirstLetter;
745
773
  private onArrowX;
746
774
  private onStartEnd;
@@ -989,6 +1017,7 @@ export declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay {
989
1017
  static close(target: HSOverlay | HTMLElement | string): void;
990
1018
  static minify(target: HSOverlay | HTMLElement | string, isMinified: boolean): void;
991
1019
  static setOpened(breakpoint: number, el: ICollectionItem<HSOverlay>): void;
1020
+ private moveFocusWithinOverlay;
992
1021
  private setupAccessibility;
993
1022
  static on(evt: string, target: HSOverlay | HTMLElement | string, cb: Function): void;
994
1023
  }
@@ -1227,6 +1256,7 @@ export declare class HSSelect extends HSBasePlugin<ISelectOptions> implements IS
1227
1256
  private readonly searchNoResultText;
1228
1257
  private readonly searchNoResultClasses;
1229
1258
  private readonly optionAllowEmptyOption;
1259
+ private readonly optionValueAsTitle;
1230
1260
  private readonly optionTag;
1231
1261
  private readonly optionTemplate;
1232
1262
  private readonly optionClasses;
@@ -1290,6 +1320,7 @@ export declare class HSSelect extends HSBasePlugin<ISelectOptions> implements IS
1290
1320
  private buildExtraMarkup;
1291
1321
  private buildToggle;
1292
1322
  private setToggleIcon;
1323
+ private setToggleText;
1293
1324
  private setToggleTitle;
1294
1325
  private buildTags;
1295
1326
  private reassignTagsInputPlaceholder;
@@ -1702,6 +1733,8 @@ export declare class HSTooltip extends HSBasePlugin<{}> implements ITooltip {
1702
1733
  private onToggleMouseEnterListener;
1703
1734
  private onToggleMouseLeaveListener;
1704
1735
  private onToggleHandleListener;
1736
+ private onToggleTouchListener;
1737
+ private onDocumentTouchListener;
1705
1738
  constructor(el: HTMLElement, options?: {}, events?: {});
1706
1739
  private toggleClick;
1707
1740
  private toggleFocus;