@preline/carousel 2.0.2 → 2.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 (3) hide show
  1. package/index.d.ts +15 -14
  2. package/index.js +2 -2
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,18 +1,5 @@
1
1
 
2
- export interface ICarouselOptions {
3
- currentIndex: number;
4
- loadingClasses?: string | string[];
5
- isAutoPlay?: boolean;
6
- speed?: number;
7
- isInfiniteLoop?: boolean;
8
- }
9
- export interface ICarousel {
10
- options?: ICarouselOptions;
11
- recalculateWidth(): void;
12
- goToPrev(): void;
13
- goToNext(): void;
14
- goTo(i: number): void;
15
- }
2
+
16
3
  export interface IBasePlugin<O, E> {
17
4
  el: E;
18
5
  options?: O;
@@ -31,6 +18,20 @@ export interface ICollectionItem<T> {
31
18
  id: string | number;
32
19
  element: T;
33
20
  }
21
+ export interface ICarouselOptions {
22
+ currentIndex: number;
23
+ loadingClasses?: string | string[];
24
+ isAutoPlay?: boolean;
25
+ speed?: number;
26
+ isInfiniteLoop?: boolean;
27
+ }
28
+ export interface ICarousel {
29
+ options?: ICarouselOptions;
30
+ recalculateWidth(): void;
31
+ goToPrev(): void;
32
+ goToNext(): void;
33
+ goTo(i: number): void;
34
+ }
34
35
  declare class HSCarousel extends HSBasePlugin<ICarouselOptions> implements ICarousel {
35
36
  private readonly inner;
36
37
  private readonly slides;
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var s=e();for(var i in s)("object"==typeof exports?exports:t)[i]=s[i]}}(self,(()=>(()=>{"use strict";var t={737:(t,e)=>{
2
2
  /*
3
3
  * HSBasePlugin
4
- * @version: 2.0.3
4
+ * @version: 2.1.0
5
5
  * @author: HTMLStream
6
6
  * @license: Licensed under MIT (https://preline.co/docs/license.html)
7
7
  * Copyright 2023 HTMLStream
@@ -9,7 +9,7 @@
9
9
  Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e,s){this.el=t,this.options=e,this.events=s,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var s;t.push({id:(null===(s=null==e?void 0:e.el)||void 0===s?void 0:s.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=s},629:function(t,e,s){
10
10
  /*
11
11
  * HSCarousel
12
- * @version: 2.0.3
12
+ * @version: 2.1.0
13
13
  * @author: HTMLStream
14
14
  * @license: Licensed under MIT (https://preline.co/docs/license.html)
15
15
  * Copyright 2023 HTMLStream
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@preline/carousel",
3
- "version": "2.0.2",
3
+ "version": "2.1.0",
4
4
  "description": "Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",