@preline/non-auto 4.1.3 → 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.
- package/index.d.ts +44 -2
- package/index.js +91 -91
- package/index.mjs +83 -83
- package/package.json +3 -3
- package/theme.css +725 -0
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
|
|
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;
|
|
@@ -910,6 +931,7 @@ export interface IOverlayOptions {
|
|
|
910
931
|
backdropParent?: string | HTMLElement | Document;
|
|
911
932
|
backdropExtraClasses?: string | null;
|
|
912
933
|
moveOverlayToBody?: number | null;
|
|
934
|
+
isToggleClassesImmediately?: boolean;
|
|
913
935
|
}
|
|
914
936
|
export interface IOverlay {
|
|
915
937
|
options?: IOverlayOptions;
|
|
@@ -933,6 +955,8 @@ export declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay {
|
|
|
933
955
|
private readonly backdropParent;
|
|
934
956
|
private readonly backdropExtraClasses;
|
|
935
957
|
private readonly animationTarget;
|
|
958
|
+
private readonly isScrollInsideViewport;
|
|
959
|
+
private onScrollInsideViewportClickListener;
|
|
936
960
|
private openNextOverlay;
|
|
937
961
|
private autoHide;
|
|
938
962
|
private toggleButtons;
|
|
@@ -949,6 +973,7 @@ export declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay {
|
|
|
949
973
|
autoClose: number | null;
|
|
950
974
|
autoCloseEqualityType: TOverlayOptionsAutoCloseEqualityType | null;
|
|
951
975
|
moveOverlayToBody: number | null;
|
|
976
|
+
isToggleClassesImmediately: boolean;
|
|
952
977
|
private backdrop;
|
|
953
978
|
private initialZIndex;
|
|
954
979
|
static currentZIndex: number;
|
|
@@ -985,6 +1010,7 @@ export declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay {
|
|
|
985
1010
|
static close(target: HSOverlay | HTMLElement | string): void;
|
|
986
1011
|
static minify(target: HSOverlay | HTMLElement | string, isMinified: boolean): void;
|
|
987
1012
|
static setOpened(breakpoint: number, el: ICollectionItem<HSOverlay>): void;
|
|
1013
|
+
private moveFocusWithinOverlay;
|
|
988
1014
|
private setupAccessibility;
|
|
989
1015
|
static on(evt: string, target: HSOverlay | HTMLElement | string, cb: Function): void;
|
|
990
1016
|
}
|
|
@@ -1065,6 +1091,8 @@ export declare class HSRangeSlider extends HSBasePlugin<IRangeSliderOptions> imp
|
|
|
1065
1091
|
private buildHandleIcon;
|
|
1066
1092
|
private updateCurrentValue;
|
|
1067
1093
|
destroy(): void;
|
|
1094
|
+
private static readonly unavailableMessage;
|
|
1095
|
+
private static isAvailable;
|
|
1068
1096
|
static getInstance(target: HTMLElement | string, isInstance?: boolean): any;
|
|
1069
1097
|
static autoInit(): void;
|
|
1070
1098
|
}
|
|
@@ -1149,6 +1177,7 @@ export declare class HSScrollspy extends HSBasePlugin<IScrollspyOptions> impleme
|
|
|
1149
1177
|
private isScrollingDown;
|
|
1150
1178
|
private lastScrollTop;
|
|
1151
1179
|
private onScrollableScrollListener;
|
|
1180
|
+
private onPopstateListener;
|
|
1152
1181
|
private onLinkClickListener;
|
|
1153
1182
|
constructor(el: HTMLElement, options?: {});
|
|
1154
1183
|
private scrollableScroll;
|
|
@@ -1156,6 +1185,7 @@ export declare class HSScrollspy extends HSBasePlugin<IScrollspyOptions> impleme
|
|
|
1156
1185
|
private determineScrollDirection;
|
|
1157
1186
|
private linkClick;
|
|
1158
1187
|
private update;
|
|
1188
|
+
private handlePopstate;
|
|
1159
1189
|
private scrollTo;
|
|
1160
1190
|
destroy(): void;
|
|
1161
1191
|
static getInstance(target: HTMLElement, isInstance?: boolean): any;
|
|
@@ -1253,6 +1283,7 @@ export declare class HSSelect extends HSBasePlugin<ISelectOptions> implements IS
|
|
|
1253
1283
|
private lastQuery;
|
|
1254
1284
|
private readonly apiPageStart?;
|
|
1255
1285
|
private readonly apiTotalPath?;
|
|
1286
|
+
private isLoadEventFired;
|
|
1256
1287
|
private optionId;
|
|
1257
1288
|
private onWrapperClickListener;
|
|
1258
1289
|
private onToggleClickListener;
|
|
@@ -1275,6 +1306,7 @@ export declare class HSSelect extends HSBasePlugin<ISelectOptions> implements IS
|
|
|
1275
1306
|
private hasValue;
|
|
1276
1307
|
private init;
|
|
1277
1308
|
private build;
|
|
1309
|
+
private fireLoadEvent;
|
|
1278
1310
|
private setOptions;
|
|
1279
1311
|
private buildWrapper;
|
|
1280
1312
|
private buildExtraMarkup;
|
|
@@ -1292,6 +1324,14 @@ export declare class HSSelect extends HSBasePlugin<ISelectOptions> implements IS
|
|
|
1292
1324
|
private setupInfiniteScroll;
|
|
1293
1325
|
private handleScroll;
|
|
1294
1326
|
private loadMore;
|
|
1327
|
+
/**
|
|
1328
|
+
* Positions the dropdown using Floating UI when `dropdownScope` is set to `"window"`.
|
|
1329
|
+
*
|
|
1330
|
+
* Requires `@floating-ui/dom` to be loaded on the page (e.g. via CDN or npm).
|
|
1331
|
+
* Used by: `dropdownScope: "window"`, `dropdownPlacement`, `dropdownAutoPlacement`.
|
|
1332
|
+
*
|
|
1333
|
+
* @see https://floating-ui.com
|
|
1334
|
+
*/
|
|
1295
1335
|
private buildFloatingUI;
|
|
1296
1336
|
private updateDropdownWidth;
|
|
1297
1337
|
private buildSearch;
|
|
@@ -1684,6 +1724,8 @@ export declare class HSTooltip extends HSBasePlugin<{}> implements ITooltip {
|
|
|
1684
1724
|
private onToggleMouseEnterListener;
|
|
1685
1725
|
private onToggleMouseLeaveListener;
|
|
1686
1726
|
private onToggleHandleListener;
|
|
1727
|
+
private onToggleTouchListener;
|
|
1728
|
+
private onDocumentTouchListener;
|
|
1687
1729
|
constructor(el: HTMLElement, options?: {}, events?: {});
|
|
1688
1730
|
private toggleClick;
|
|
1689
1731
|
private toggleFocus;
|