@kolserdav/swiper 4.3.0 → 4.3.2
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/dist/Swiper.d.ts +3 -4
- package/dist/Swiper.js +1122 -2
- package/dist/Swiper.js.map +1 -0
- package/{src/components/Swiper.module.css → dist/styles.css} +25 -20
- package/dist/styles.css.map +1 -0
- package/package.json +13 -14
- package/.eslintrc.json +0 -24
- package/.prettierrc +0 -9
- package/.travis.yml +0 -4
- package/.vscode/extensions.json +0 -7
- package/.vscode/settings.json +0 -21
- package/README copy.md +0 -40
- package/dist/Swiper.js.LICENSE.txt +0 -1
- package/docs/CHANGELOG.md +0 -5
- package/next.config.mjs +0 -6
- package/pages/_app.tsx +0 -16
- package/pages/_document.tsx +0 -23
- package/pages/api/hello.ts +0 -23
- package/pages/fonts/GeistMonoVF.woff +0 -0
- package/pages/fonts/GeistVF.woff +0 -0
- package/pages/index.tsx +0 -74
- package/public/favicon.ico +0 -0
- package/src/components/Swiper.tsx +0 -812
- package/styles/Home.module.css +0 -5
- package/styles/globals.css +0 -35
- package/tsconfig.json +0 -36
- package/webpack.config.js +0 -40
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Swiper.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVA;AAC0G;AACjB;AACzF,8BAA8B,mFAA2B,CAAC,4FAAqC;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC,OAAO,wFAAwF,YAAY,aAAa,aAAa,WAAW,UAAU,YAAY,aAAa,WAAW,YAAY,aAAa,OAAO,KAAK,YAAY,aAAa,OAAO,KAAK,YAAY,WAAW,UAAU,MAAM,KAAK,YAAY,aAAa,WAAW,UAAU,UAAU,YAAY,aAAa,aAAa,MAAM,KAAK,UAAU,KAAK,KAAK,UAAU,KAAK,KAAK,YAAY,MAAM,KAAK,YAAY,OAAO,KAAK,UAAU,UAAU,YAAY,OAAO,KAAK,YAAY,aAAa,aAAa,aAAa,aAAa,aAAa,aAAa,OAAO,KAAK,UAAU,YAAY,WAAW,UAAU,UAAU,YAAY,WAAW,MAAM,KAAK,UAAU,MAAM,KAAK,UAAU,YAAY,OAAO,KAAK,YAAY,aAAa,aAAa,aAAa,aAAa,aAAa,aAAa,aAAa,aAAa,WAAW,UAAU,UAAU,YAAY,WAAW,UAAU,YAAY,aAAa,aAAa,WAAW,YAAY,WAAW,YAAY,WAAW,YAAY,aAAa,aAAa,aAAa,MAAM,KAAK,YAAY,MAAM,KAAK,YAAY,OAAO,KAAK,YAAY,WAAW,YAAY,WAAW,MAAM,KAAK,UAAU,YAAY,WAAW,UAAU,UAAU,YAAY,aAAa,OAAO,KAAK,UAAU,YAAY,sCAAsC,uBAAuB,qBAAqB,qBAAqB,gBAAgB,iBAAiB,qBAAqB,qBAAqB,kBAAkB,wBAAwB,4BAA4B,GAAG,YAAY,2BAA2B,wBAAwB,GAAG,WAAW,uBAAuB,gBAAgB,iBAAiB,GAAG,WAAW,uBAAuB,uBAAuB,WAAW,YAAY,kBAAkB,wBAAwB,4BAA4B,2BAA2B,GAAG,SAAS,gBAAgB,GAAG,SAAS,eAAe,GAAG,SAAS,qCAAqC,GAAG,OAAO,sCAAsC,GAAG,iBAAiB,gBAAgB,iBAAiB,uBAAuB,GAAG,cAAc,uBAAuB,uBAAuB,6BAA6B,8BAA8B,+DAA+D,4DAA4D,uDAAuD,GAAG,aAAa,oBAAoB,uBAAuB,gBAAgB,iBAAiB,kBAAkB,wBAAwB,gBAAgB,GAAG,mBAAmB,aAAa,GAAG,mBAAmB,YAAY,8BAA8B,GAAG,mBAAmB,gCAAgC,iCAAiC,gCAAgC,yBAAyB,wBAAwB,4BAA4B,uBAAuB,2BAA2B,kCAAkC,eAAe,cAAc,cAAc,qBAAqB,eAAe,oBAAoB,sBAAsB,2BAA2B,0BAA0B,mBAAmB,uBAAuB,mBAAmB,sBAAsB,iBAAiB,uBAAuB,sBAAsB,+BAA+B,wEAAwE,GAAG,uBAAuB,2CAA2C,GAAG,wBAAwB,2CAA2C,GAAG,WAAW,uBAAuB,kBAAkB,wBAAwB,cAAc,GAAG,UAAU,oBAAoB,uBAAuB,eAAe,gBAAgB,gBAAgB,2BAA2B,uBAAuB,GAAG,iBAAiB,oBAAoB,2BAA2B,GAAG,mBAAmB;AACnxH;AACO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACP,iEAAe,uBAAuB,EAAC;;;;;;;;;;;AClK1B;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA,gDAAgD;AAChD;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sFAAsF,qBAAqB;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,iDAAiD,qBAAqB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sDAAsD,qBAAqB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACpFa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,cAAc;AACrE;AACA;AACA;AACA;AACA;;;;;;;;;;ACfA;;;;;;;;;;;;;;;ACAA,cAAc,aAAa,+CAA+C,gDAAgD,eAAe,QAAQ,IAAI,0CAA0C,yCAAyC,SAAgB,gBAAgB,wCAAwC,IAAI,mDAAmD,SAAS,iEAAe,IAAI;;;;;;UCAnY;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;ACNA,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAI,IAAI,SAAI;AAC7B,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,mBAAmB,SAAI,IAAI,SAAI;AAC/B,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC0F;AAClE;AACY;AACpC;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,0CAA0C;AACnF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA,cAAc,0DAAmB;AACjC,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA,aAAa,+CAAQ;AACrB,aAAa,+CAAQ;AACrB,aAAa,+CAAQ;AACrB,aAAa,+CAAQ;AACrB,aAAa,+CAAQ;AACrB,aAAa,+CAAQ;AACrB,aAAa,+CAAQ;AACrB,aAAa,+CAAQ;AACrB,aAAa,+CAAQ;AACrB,aAAa,+CAAQ;AACrB,aAAa,+CAAQ;AACrB,aAAa,+CAAQ;AACrB,uBAAuB,6CAAM;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8CAAO;AACxB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,yCAAyC,gDAAS;AAClD;AACA;AACA;AACA;AACA;AACA,4BAA4B,8CAAO;AACnC;AACA;AACA,gNAAgN,6DAAI;AACpN,gNAAgN,6DAAI;AACpN,6JAA6J,6DAAI;AACjK;AACA;AACA,uNAAuN,6DAAI;AAC3N,uNAAuN,6DAAI;AAC3N,oKAAoK,6DAAI;AACxK,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA,8BAA8B,8CAAO,eAAe;AACpD;AACA,gJAAgJ,+DAAM;AACtJ,gJAAgJ,+DAAM;AACtJ,yJAAyJ,+DAAM;AAC/J;AACA;AACA,uJAAuJ,+DAAM;AAC7J,uJAAuJ,+DAAM;AAC7J,gKAAgK,+DAAM;AACtK,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,uBAAuB,8CAAO;AAC9B;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,KAAK;AACL,sBAAsB,8CAAO,eAAe;AAC5C;AACA;AACA;AACA,QAAQ;AACR,qBAAqB,8CAAO,eAAe;AAC3C;AACA;AACA,QAAQ;AACR,mBAAmB,8CAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,kBAAkB,8CAAO;AACzB,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0DAA0D;AAC7F;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,gBAAgB,8CAAO;AACvB,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,gDAAgD;AACvG;AACA;AACA;AACA,2DAA2D,8CAA8C;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,yBAAyB,8CAAO;AAChC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,8CAAO;AAC9B;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,8CAAO;AAC5C,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,wBAAwB,8CAAO,eAAe,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK,OAAO;AACZ;AACA;AACA;AACA,mCAAmC,8CAAO;AAC1C,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,0BAA0B,8CAAO,eAAe,sBAAsB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,+CAA+C;AAClG;AACA;AACA;AACA,wDAAwD,8CAA8C;AACtG;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK,OAAO;AACZ;AACA;AACA;AACA,IAAI,gDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI,gDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI,gDAAS;AACb;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI,gDAAS;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI,gDAAS;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI,gDAAS;AACb;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI,gDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI,gDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI,gDAAS;AACb;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI,gDAAS;AACb;AACA,KAAK;AACL,YAAY,0DAAmB,UAAU,WAAW,oEAAW,qBAAqB;AACpF;AACA;AACA,oBAAoB,0DAAmB,CAAC,2CAAQ,IAAI,cAAc;AAClE,wEAAwE,0DAAmB,UAAU;AACrG,4BAA4B;AAC5B;AACA,gCAAgC;AAChC,gCAAgC,8DAA8D,aAAa,gDAAI,CAAC,+DAAM,yBAAyB,+DAAM,0BAA0B,+DAAM,8BAA8B;AACnN,oBAAoB,0DAAmB,UAAU,WAAW,gDAAI,CAAC,kEAAS,cAAc;AACxF,qCAAqC,0DAAmB,UAAU;AAClE,4BAA4B;AAC5B;AACA,gCAAgC;AAChC,gCAAgC,wDAAwD,aAAa,gDAAI,CAAC,+DAAM,yBAAyB,+DAAM,0BAA0B,+DAAM,QAAQ;AACvL,oBAAoB,0DAAmB,UAAU,2GAA2G;AAC5J,wBAAwB,0DAAmB,WAAW,oCAAoC;AAC1F,wBAAwB,0DAAmB,WAAW,gPAAgP;AACtS,SAAS;AACT,2HAA2H,0DAAmB,UAAU,WAAW,gDAAI,CAAC,iEAAQ,EAAE,uEAAc,GAAG;AACnM,YAAY,0DAAmB,aAAa,WAAW,uEAAc,yEAAyE;AAC9I,gBAAgB,0DAAmB,UAAU,2GAA2G;AACxJ,oBAAoB,0DAAmB,WAAW,oCAAoC;AACtF,oBAAoB,0DAAmB,WAAW,+DAA+D;AACjH,2HAA2H,0DAAmB,UAAU,WAAW,gDAAI,CAAC,iEAAQ,EAAE,uEAAc,GAAG;AACnM,YAAY,0DAAmB,aAAa,WAAW,uEAAc,yEAAyE;AAC9I,gBAAgB,0DAAmB,UAAU,2GAA2G;AACxJ,oBAAoB,0DAAmB,WAAW,oCAAoC;AACtF,oBAAoB,0DAAmB,WAAW,+DAA+D;AACjH,iBAAiB,0DAAmB,UAAU,WAAW,+DAAM,EAAE,kCAAkC,QAAQ,0DAAmB,UAAU,gFAAgF,gDAAI,CAAC,8DAAK,4EAA4E,iEAAQ,QAAQ,KAAK;AACnU;AACA","sources":["webpack://ReactSwiper/webpack/universalModuleDefinition","webpack://ReactSwiper/./src/Swiper.module.css","webpack://ReactSwiper/./node_modules/css-loader/dist/runtime/api.js","webpack://ReactSwiper/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://ReactSwiper/external umd \"react\"","webpack://ReactSwiper/./node_modules/clsx/dist/clsx.mjs","webpack://ReactSwiper/webpack/bootstrap","webpack://ReactSwiper/webpack/runtime/compat get default export","webpack://ReactSwiper/webpack/runtime/define property getters","webpack://ReactSwiper/webpack/runtime/hasOwnProperty shorthand","webpack://ReactSwiper/webpack/runtime/make namespace object","webpack://ReactSwiper/./src/Swiper.tsx"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactSwiper\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"ReactSwiper\"] = factory(root[\"react\"]);\n})(this, (__WEBPACK_EXTERNAL_MODULE_react__) => {\nreturn ","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `._E0DSvpd_pOhPwEcOESk {\n position: relative;\n overflow: hidden;\n min-width: 320px;\n width: 100%;\n height: 100%;\n min-height: 20vh;\n max-width: 100vw;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.MNKZLOwtKAYuGRPioWg5 {\n background-color: #fff;\n border-radius: 1rem;\n}\n\n.fZGJ3LJ3vksT7z_W2Xbj {\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.PZLGxXxVQxNBPdUxCzZF {\n position: absolute;\n max-width: inherit;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n.fdHrMcOmTUvG2ylUYYCo {\n left: -100%;\n}\n.yHDVaCXbXJXsAleBINaZ {\n left: 100%;\n}\n.P07Z5eTTJ3p2fjOfBFbZ {\n transition: left 0.4s ease-in 0s;\n}\n.okENlLNDDujMLgzN2KUI {\n transition: left 0.4s ease-out 0s;\n}\n\n.xqRTwQcqLpSHYzXUn7Qo {\n width: 100%;\n height: 100%;\n position: relative;\n}\n\n.Ypi0iAw66HoFXrF10npO {\n border-radius: 2px;\n position: relative;\n width: calc(100% - 48px);\n height: calc(100% - 48px);\n -webkit-box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\n -moz-box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\n box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\n}\n\n.BFZzBGGo1DZSlo_VO3S6 {\n cursor: pointer;\n position: absolute;\n width: auto;\n height: auto;\n display: flex;\n align-items: center;\n z-index: 12;\n}\n\n.I78h4QcRoZnFJkvhRspX {\n right: 0;\n}\n\n.nlzCTOpb1QyxySkPPncw {\n left: 0;\n transform: rotate(180deg);\n}\n\n.D2v6zUbfWAotXYTbrWUW {\n display: -webkit-inline-box;\n display: -webkit-inline-flex;\n display: -ms-inline-flexbox;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n background-color: transparent;\n outline: 0;\n border: 0;\n margin: 0;\n border-radius: 0;\n padding: 0;\n cursor: pointer;\n user-select: none;\n vertical-align: middle;\n text-decoration: none;\n color: inherit;\n text-align: center;\n flex: 0 0 auto;\n font-size: 1.5rem;\n padding: 8px;\n border-radius: 50%;\n overflow: visible;\n color: rgba(0, 0, 0, 0.54);\n transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.D2v6zUbfWAotXYTbrWUW:hover {\n background-color: rgba(0, 0, 0, 0.054);\n}\n.D2v6zUbfWAotXYTbrWUW:active {\n background-color: rgba(0, 0, 0, 0.007);\n}\n\n.Zxb5JskRkhBuUYyMGjU2 {\n position: absolute;\n display: flex;\n flex-direction: row;\n bottom: 0;\n}\n\n.CEsncB7BTaSWKBlqUDJt {\n cursor: pointer;\n position: relative;\n width: 8px;\n height: 8px;\n margin: 2px;\n border: 1px solid gray;\n border-radius: 50%;\n}\n\n.CEsncB7BTaSWKBlqUDJt.KZrnFwcKg0Ux8MF4udTr {\n cursor: default;\n background-color: gray;\n}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/Swiper.module.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,kBAAkB;EAClB,gBAAgB;EAChB,gBAAgB;EAChB,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,gBAAgB;EAChB,aAAa;EACb,mBAAmB;EACnB,uBAAuB;AACzB;;AAEA;EACE,sBAAsB;EACtB,mBAAmB;AACrB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,sBAAsB;AACxB;AACA;EACE,WAAW;AACb;AACA;EACE,UAAU;AACZ;AACA;EACE,gCAAgC;AAClC;AACA;EACE,iCAAiC;AACnC;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,wBAAwB;EACxB,yBAAyB;EACzB,0DAA0D;EAC1D,uDAAuD;EACvD,kDAAkD;AACpD;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,WAAW;AACb;;AAEA;EACE,QAAQ;AACV;;AAEA;EACE,OAAO;EACP,yBAAyB;AAC3B;;AAEA;EACE,2BAA2B;EAC3B,4BAA4B;EAC5B,2BAA2B;EAC3B,oBAAoB;EACpB,mBAAmB;EACnB,uBAAuB;EACvB,kBAAkB;EAClB,sBAAsB;EACtB,6BAA6B;EAC7B,UAAU;EACV,SAAS;EACT,SAAS;EACT,gBAAgB;EAChB,UAAU;EACV,eAAe;EACf,iBAAiB;EACjB,sBAAsB;EACtB,qBAAqB;EACrB,cAAc;EACd,kBAAkB;EAClB,cAAc;EACd,iBAAiB;EACjB,YAAY;EACZ,kBAAkB;EAClB,iBAAiB;EACjB,0BAA0B;EAC1B,mEAAmE;AACrE;AACA;EACE,sCAAsC;AACxC;AACA;EACE,sCAAsC;AACxC;;AAEA;EACE,kBAAkB;EAClB,aAAa;EACb,mBAAmB;EACnB,SAAS;AACX;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,UAAU;EACV,WAAW;EACX,WAAW;EACX,sBAAsB;EACtB,kBAAkB;AACpB;;AAEA;EACE,eAAe;EACf,sBAAsB;AACxB\",\"sourcesContent\":[\".container {\\n position: relative;\\n overflow: hidden;\\n min-width: 320px;\\n width: 100%;\\n height: 100%;\\n min-height: 20vh;\\n max-width: 100vw;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.paper {\\n background-color: #fff;\\n border-radius: 1rem;\\n}\\n\\n.pipe {\\n position: relative;\\n width: 100%;\\n height: 100%;\\n}\\n\\n.card {\\n position: absolute;\\n max-width: inherit;\\n top: 0;\\n left: 0;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n flex-direction: column;\\n}\\n.prev {\\n left: -100%;\\n}\\n.next {\\n left: 100%;\\n}\\n.back {\\n transition: left 0.4s ease-in 0s;\\n}\\n.go {\\n transition: left 0.4s ease-out 0s;\\n}\\n\\n.card__stop {\\n width: 100%;\\n height: 100%;\\n position: relative;\\n}\\n\\n.content {\\n border-radius: 2px;\\n position: relative;\\n width: calc(100% - 48px);\\n height: calc(100% - 48px);\\n -webkit-box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\\n -moz-box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\\n box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\\n}\\n\\n.button {\\n cursor: pointer;\\n position: absolute;\\n width: auto;\\n height: auto;\\n display: flex;\\n align-items: center;\\n z-index: 12;\\n}\\n\\n.button__next {\\n right: 0;\\n}\\n\\n.button__prev {\\n left: 0;\\n transform: rotate(180deg);\\n}\\n\\n.icon__button {\\n display: -webkit-inline-box;\\n display: -webkit-inline-flex;\\n display: -ms-inline-flexbox;\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n position: relative;\\n box-sizing: border-box;\\n background-color: transparent;\\n outline: 0;\\n border: 0;\\n margin: 0;\\n border-radius: 0;\\n padding: 0;\\n cursor: pointer;\\n user-select: none;\\n vertical-align: middle;\\n text-decoration: none;\\n color: inherit;\\n text-align: center;\\n flex: 0 0 auto;\\n font-size: 1.5rem;\\n padding: 8px;\\n border-radius: 50%;\\n overflow: visible;\\n color: rgba(0, 0, 0, 0.54);\\n transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n}\\n.icon__button:hover {\\n background-color: rgba(0, 0, 0, 0.054);\\n}\\n.icon__button:active {\\n background-color: rgba(0, 0, 0, 0.007);\\n}\\n\\n.dots {\\n position: absolute;\\n display: flex;\\n flex-direction: row;\\n bottom: 0;\\n}\\n\\n.dot {\\n cursor: pointer;\\n position: relative;\\n width: 8px;\\n height: 8px;\\n margin: 2px;\\n border: 1px solid gray;\\n border-radius: 50%;\\n}\\n\\n.dot.active {\\n cursor: default;\\n background-color: gray;\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport var container = `_E0DSvpd_pOhPwEcOESk`;\nexport var paper = `MNKZLOwtKAYuGRPioWg5`;\nexport var pipe = `fZGJ3LJ3vksT7z_W2Xbj`;\nexport var card = `PZLGxXxVQxNBPdUxCzZF`;\nexport var prev = `fdHrMcOmTUvG2ylUYYCo`;\nexport var next = `yHDVaCXbXJXsAleBINaZ`;\nexport var back = `P07Z5eTTJ3p2fjOfBFbZ`;\nexport var go = `okENlLNDDujMLgzN2KUI`;\nexport var card__stop = `xqRTwQcqLpSHYzXUn7Qo`;\nexport var content = `Ypi0iAw66HoFXrF10npO`;\nexport var button = `BFZzBGGo1DZSlo_VO3S6`;\nexport var button__next = `I78h4QcRoZnFJkvhRspX`;\nexport var button__prev = `nlzCTOpb1QyxySkPPncw`;\nexport var icon__button = `D2v6zUbfWAotXYTbrWUW`;\nexport var dots = `Zxb5JskRkhBuUYyMGjU2`;\nexport var dot = `CEsncB7BTaSWKBlqUDJt`;\nexport var active = `KZrnFwcKg0Ux8MF4udTr`;\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","module.exports = __WEBPACK_EXTERNAL_MODULE_react__;","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n/******************************************************************************************\n * Repository: https://github.com/kolserdav/react-swiper.git\n * File name: Swiper.tsx\n * Author: Sergey Kolmiller\n * Email: <kolserdav@conhos.ru>\n * License: MIT\n * License text: The code is distributed as is. There are no guarantees regarding the functionality of the code or parts of it.\n * Copyright: kolserdav, All rights reserved (c)\n * Create Date: Fri Sep 06 2024 18:44:44 GMT+0700 (Krasnoyarsk Standard Time)\n ******************************************************************************************/\nimport React, { useMemo, useState, useRef, createRef, useEffect, Fragment, } from 'react';\nimport clsx from 'clsx';\nimport s from './Swiper.module.css';\n/**\n * Time to miliseconds of change animation by card left value\n */\nexport var SWIPE_TRANSITION_TIMEOUT = 400;\n/**\n * Minimum swipe speed regardless of distance\n */\nexport var SWIPE_ON_EVENT_SPEED = 0.7;\n/**\n * Create swipe list from values\n */\nvar getSwipes = function (prev, current, next, swipes) {\n if (((prev === null || prev === void 0 ? void 0 : prev.id) === (current === null || current === void 0 ? void 0 : current.id) || (current === null || current === void 0 ? void 0 : current.id) === (next === null || next === void 0 ? void 0 : next.id) || (next === null || next === void 0 ? void 0 : next.id) === (prev === null || prev === void 0 ? void 0 : prev.id)) &&\n swipes.length) {\n return swipes;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var result = [1, 2, 3].map(function (id) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var item = id === 1 ? __assign({}, prev) : id === 2 ? current : __assign({}, next);\n item.type = id === 1 ? 'prev' : id === 2 ? 'current' : 'next';\n return item;\n });\n return result;\n};\n/**\n * Get default swipe with random id\n */\nvar getDefaultSwipe = function () { return ({\n id: Math.ceil(Math.random() * 1000),\n children: React.createElement(\"div\", null),\n}); };\nvar refs = {};\nvar startClientX;\nvar startClientY;\nvar lastLeft;\nvar animated = false;\nvar _defaultCurrent;\nvar oldSwipes = [];\nvar startTime = new Date().getTime();\n/**\n * Swiper component\n */\nexport default function ReactSwiper(props) {\n var _this = this;\n var defaultCurrent = props.defaultCurrent, getNext = props.getNext, getPrev = props.getPrev, onSwipe = props.onSwipe, className = props.className, invitationAnimation = props.invitationAnimation, durationAnimation = props.durationAnimation, blockSwipe = props.blockSwipe, dots = props.dots;\n var _a = useState(), current = _a[0], setCurrent = _a[1];\n var _b = useState(), prev = _b[0], setPrev = _b[1];\n var _c = useState(), next = _c[0], setNext = _c[1];\n var _d = useState(), prePrev = _d[0], setPrePrev = _d[1];\n var _e = useState(), postNext = _e[0], setPostNext = _e[1];\n var _f = useState(0), windowWidth = _f[0], setWindowWidth = _f[1];\n var _g = useState(0), height = _g[0], setHeight = _g[1];\n var _h = useState(0), width = _h[0], setWidth = _h[1];\n var _j = useState(0), _left = _j[0], _setLeft = _j[1];\n var _k = useState(0), left = _k[0], setLeft = _k[1];\n var _l = useState(), isMobile = _l[0], setIsMobile = _l[1];\n var _m = useState(false), load = _m[0], setLoad = _m[1];\n var containerRef = useRef(null);\n if (typeof _defaultCurrent === 'undefined') {\n _defaultCurrent = defaultCurrent;\n }\n /**\n * Create memoized swipes\n */\n var swipes = useMemo(function () {\n return getSwipes(prev || getDefaultSwipe(), current || defaultCurrent, next || getDefaultSwipe(), oldSwipes);\n }, [next, prev, current]);\n oldSwipes = swipes;\n /**\n * Get new or exists ref by id\n */\n var getRef = function (id) {\n refs[id] = refs[id] ? refs[id] : createRef();\n return refs[id];\n };\n /**\n * Set to cards classes for in animation\n */\n var setGoClassHandler = useMemo(function () {\n return function (_next, _prev) {\n var _a, _b, _c;\n (_a = getRef((_next === null || _next === void 0 ? void 0 : _next.id) || (next === null || next === void 0 ? void 0 : next.id) || 0).current) === null || _a === void 0 ? void 0 : _a.classList.add(s.go);\n (_b = getRef((_prev === null || _prev === void 0 ? void 0 : _prev.id) || (prev === null || prev === void 0 ? void 0 : prev.id) || 0).current) === null || _b === void 0 ? void 0 : _b.classList.add(s.go);\n (_c = getRef((current === null || current === void 0 ? void 0 : current.id) || 0).current) === null || _c === void 0 ? void 0 : _c.classList.add(s.go);\n setTimeout(function () {\n var _a, _b, _c;\n (_a = getRef((_next === null || _next === void 0 ? void 0 : _next.id) || (next === null || next === void 0 ? void 0 : next.id) || 0).current) === null || _a === void 0 ? void 0 : _a.classList.remove(s.go);\n (_b = getRef((_prev === null || _prev === void 0 ? void 0 : _prev.id) || (prev === null || prev === void 0 ? void 0 : prev.id) || 0).current) === null || _b === void 0 ? void 0 : _b.classList.remove(s.go);\n (_c = getRef((current === null || current === void 0 ? void 0 : current.id) || 0).current) === null || _c === void 0 ? void 0 : _c.classList.remove(s.go);\n }, SWIPE_TRANSITION_TIMEOUT);\n };\n }, [current === null || current === void 0 ? void 0 : current.id, next === null || next === void 0 ? void 0 : next.id, prev === null || prev === void 0 ? void 0 : prev.id]);\n /**\n * Set to cards classes for out animation\n */\n var setBackClassHandler = useMemo(function () { return function () {\n var _a, _b, _c;\n (_a = getRef((next === null || next === void 0 ? void 0 : next.id) || 0).current) === null || _a === void 0 ? void 0 : _a.classList.add(s.back);\n (_b = getRef((prev === null || prev === void 0 ? void 0 : prev.id) || 0).current) === null || _b === void 0 ? void 0 : _b.classList.add(s.back);\n (_c = getRef((current === null || current === void 0 ? void 0 : current.id) || 0).current) === null || _c === void 0 ? void 0 : _c.classList.add(s.back);\n setTimeout(function () {\n var _a, _b, _c;\n (_a = getRef((next === null || next === void 0 ? void 0 : next.id) || 0).current) === null || _a === void 0 ? void 0 : _a.classList.remove(s.back);\n (_b = getRef((prev === null || prev === void 0 ? void 0 : prev.id) || 0).current) === null || _b === void 0 ? void 0 : _b.classList.remove(s.back);\n (_c = getRef((current === null || current === void 0 ? void 0 : current.id) || 0).current) === null || _c === void 0 ? void 0 : _c.classList.remove(s.back);\n }, SWIPE_TRANSITION_TIMEOUT);\n }; }, [current === null || current === void 0 ? void 0 : current.id, next === null || next === void 0 ? void 0 : next.id, prev === null || prev === void 0 ? void 0 : prev.id]);\n /**\n * Wait helper\n */\n var wait = function (miliseconds) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, new Promise(function (resolve) {\n setTimeout(function () {\n resolve(0);\n }, miliseconds);\n })];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); };\n /**\n * Set pre previos or post next values\n */\n var setPreValues = useMemo(function () {\n return function (_p, _n) {\n if (_p) {\n getPrev((_p === null || _p === void 0 ? void 0 : _p.id) || 0).then(function (d) {\n setPrePrev(d);\n });\n }\n if (_n) {\n getNext((_n === null || _n === void 0 ? void 0 : _n.id) || 0).then(function (d) {\n setPostNext(d);\n });\n }\n };\n }, [getNext, getPrev]);\n var goSwipeBack = useMemo(function () { return function () {\n setBackClassHandler();\n setLeft(0);\n setLoad(false);\n }; }, [setBackClassHandler, setLeft, setLoad]);\n var startSwipe = useMemo(function () { return function (_next, _prev, _left) {\n setGoClassHandler(_next, _prev);\n setLeft(_left);\n }; }, [setGoClassHandler]);\n var endSwipe = useMemo(function () {\n return function (_a) {\n var _prev = _a._prev, _current = _a._current, _next = _a._next;\n setLeft(0);\n setPrev(_prev);\n setCurrent(_current);\n setNext(_next);\n };\n }, []);\n var goSwipe = useMemo(function () {\n return function (_a, _next_1, _prev_1) { return __awaiter(_this, [_a, _next_1, _prev_1], void 0, function (_b, _next, _prev) {\n var newNext = _b.newNext, newPrev = _b.newPrev, coeff = _b.coeff;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n if ((_next === null || _next === void 0 ? void 0 : _next.id) === null || (_prev === null || _prev === void 0 ? void 0 : _prev.id) === null) {\n goSwipeBack();\n return [2 /*return*/, 1];\n }\n if (onSwipe !== undefined) {\n onSwipe((_next === null || _next === void 0 ? void 0 : _next.id) || (_prev === null || _prev === void 0 ? void 0 : _prev.id));\n }\n startSwipe(_next, _prev, windowWidth * coeff);\n return [4 /*yield*/, wait(SWIPE_TRANSITION_TIMEOUT)];\n case 1:\n _c.sent();\n endSwipe({ _prev: newPrev, _current: _next || _prev, _next: newNext });\n return [2 /*return*/, 0];\n }\n });\n }); };\n }, [endSwipe, goSwipeBack, onSwipe, startSwipe, windowWidth]);\n /**\n * Run swipe animation\n */\n var swipe = useMemo(function () {\n return function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {\n var _lastLeft = _b._lastLeft, _next = _b._next, _prev = _b._prev, speed = _b.speed;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n setLoad(true);\n if (!(Math.abs(_lastLeft) > width / 3 ||\n (speed !== undefined && speed > SWIPE_ON_EVENT_SPEED))) return [3 /*break*/, 5];\n if (!(_lastLeft < 0)) return [3 /*break*/, 2];\n return [4 /*yield*/, goSwipe({ newPrev: current, newNext: postNext, coeff: -1 }, _next, undefined)];\n case 1:\n _c.sent();\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, goSwipe({ newPrev: prePrev, newNext: current, coeff: 1 }, undefined, _prev)];\n case 3:\n _c.sent();\n _c.label = 4;\n case 4: return [3 /*break*/, 6];\n case 5:\n goSwipeBack();\n _c.label = 6;\n case 6:\n setLoad(false);\n return [2 /*return*/, 0];\n }\n });\n }); };\n }, [current, goSwipeBack, width, prePrev, postNext, goSwipe]);\n /**\n * Touch event handler\n */\n var onTouchHandler = useMemo(function () {\n return function (name, e) { return __awaiter(_this, void 0, void 0, function () {\n var touches, clientX, clientY, absX, absY, _a;\n var _b, _c;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n touches = e.touches;\n clientX = (_b = touches[0]) === null || _b === void 0 ? void 0 : _b.clientX;\n clientY = (_c = touches[0]) === null || _c === void 0 ? void 0 : _c.clientY;\n startClientX = startClientX || 0;\n startClientY = startClientY || 0;\n absX = 0;\n absY = 0;\n _a = name;\n switch (_a) {\n case 'onTouchStart': return [3 /*break*/, 1];\n case 'onTouchMove': return [3 /*break*/, 2];\n case 'onTouchEnd': return [3 /*break*/, 3];\n }\n return [3 /*break*/, 6];\n case 1:\n startClientX = clientX;\n startClientY = clientY;\n lastLeft = _left;\n startTime = new Date().getTime();\n return [3 /*break*/, 6];\n case 2:\n if (!blockSwipe) {\n absY = Math.abs(startClientY - clientY);\n absX = Math.abs(startClientX - clientX);\n if (absX > absY) {\n lastLeft = _left - (startClientX - clientX);\n setLeft(lastLeft);\n }\n }\n return [3 /*break*/, 6];\n case 3:\n if (!!blockSwipe) return [3 /*break*/, 5];\n return [4 /*yield*/, swipe({\n _lastLeft: lastLeft,\n speed: Math.abs(lastLeft / (new Date().getTime() - startTime)),\n _next: next,\n _prev: prev,\n })];\n case 4:\n _d.sent();\n _d.label = 5;\n case 5: return [3 /*break*/, 6];\n case 6: return [2 /*return*/];\n }\n });\n }); };\n }, [_left, blockSwipe, swipe, next, prev]);\n /**\n * Touch event wrapper\n */\n var onTouchWrapper = function (name) {\n return function (e) {\n onTouchHandler(name, e);\n };\n };\n /**\n * On next or previous button click handler\n */\n var clickHandler = useMemo(function () {\n return function (origin) {\n var isNext = origin === 'next';\n return function () { return __awaiter(_this, void 0, void 0, function () {\n var coeff, leftVal;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n coeff = isNext ? -1 : 1;\n leftVal = width * coeff;\n if (isNext) {\n setGoClassHandler();\n }\n else {\n setBackClassHandler();\n }\n return [4 /*yield*/, wait(SWIPE_TRANSITION_TIMEOUT)];\n case 1:\n _a.sent();\n return [4 /*yield*/, swipe({\n _lastLeft: leftVal,\n _next: next,\n _prev: prev,\n })];\n case 2:\n _a.sent();\n return [2 /*return*/, 0];\n }\n });\n }); };\n };\n }, [setBackClassHandler, setGoClassHandler, swipe, width, next, prev]);\n /**\n * Wrapper for next button click handler\n */\n var clickNextHandler = clickHandler('next');\n /**\n * Wrapper for previous button click handler\n */\n var clickPrevHandler = clickHandler('prev');\n /**\n * optional animation handler\n */\n var infitationAnimationHandler = useMemo(function () {\n return function (shift) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (shift < 0) {\n setGoClassHandler();\n }\n else {\n setBackClassHandler();\n }\n setLeft(shift);\n return [4 /*yield*/, wait(SWIPE_TRANSITION_TIMEOUT)];\n case 1:\n _a.sent();\n if (shift < 0) {\n setBackClassHandler();\n }\n else {\n setGoClassHandler();\n }\n setLeft(0);\n return [4 /*yield*/, wait(SWIPE_TRANSITION_TIMEOUT)];\n case 2:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); };\n }, [setBackClassHandler, setGoClassHandler]);\n /**\n * Initial start cards\n */\n var setStartCards = useMemo(function () { return function () { return __awaiter(_this, void 0, void 0, function () {\n var _n, _p;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, getNext(defaultCurrent.id || 0)];\n case 1:\n _n = _a.sent();\n return [4 /*yield*/, getPrev(defaultCurrent.id || 0)];\n case 2:\n _p = _a.sent();\n setCurrent(defaultCurrent);\n setPrev(_p);\n setNext(_n);\n _defaultCurrent = defaultCurrent;\n setLoad(false);\n return [2 /*return*/];\n }\n });\n }); }; }, [defaultCurrent, getNext, getPrev]);\n /**\n * Invitation animation\n */\n var startInvitationAnimation = useMemo(function () {\n return function (prev, next) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!prev.id) return [3 /*break*/, 2];\n return [4 /*yield*/, infitationAnimationHandler(windowWidth / 5.5)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n if (!next.id) return [3 /*break*/, 4];\n return [4 /*yield*/, infitationAnimationHandler((windowWidth / 5.5) * -1)];\n case 3:\n _a.sent();\n _a.label = 4;\n case 4: return [2 /*return*/];\n }\n });\n }); };\n }, [infitationAnimationHandler, windowWidth]);\n /**\n * Handler on click by dot\n */\n var clickDotHandler = useMemo(function () { return function (e) { return __awaiter(_this, void 0, void 0, function () {\n var target, tabindex, active, currentId, newCurrent, newPrev, newNext;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n target = e.target;\n tabindex = target === null || target === void 0 ? void 0 : target.getAttribute('tabindex');\n active = parseInt(tabindex, 10);\n currentId = (current === null || current === void 0 ? void 0 : current.id) || 0;\n if (!(currentId === (next === null || next === void 0 ? void 0 : next.id))) return [3 /*break*/, 1];\n newCurrent = next;\n newNext = postNext;\n newPrev = current;\n return [3 /*break*/, 10];\n case 1:\n if (!(currentId === (prev === null || prev === void 0 ? void 0 : prev.id))) return [3 /*break*/, 2];\n newCurrent = prev;\n newNext = current;\n newPrev = prePrev;\n return [3 /*break*/, 10];\n case 2:\n if (!(currentId === (prePrev === null || prePrev === void 0 ? void 0 : prePrev.id))) return [3 /*break*/, 4];\n newCurrent = prePrev;\n newNext = prev;\n return [4 /*yield*/, getPrev(prePrev === null || prePrev === void 0 ? void 0 : prePrev.id)];\n case 3:\n newPrev = _a.sent();\n return [3 /*break*/, 10];\n case 4:\n if (!(currentId === (postNext === null || postNext === void 0 ? void 0 : postNext.id))) return [3 /*break*/, 6];\n newCurrent = postNext;\n newPrev = next;\n return [4 /*yield*/, getPrev(postNext === null || postNext === void 0 ? void 0 : postNext.id)];\n case 5:\n newNext = _a.sent();\n return [3 /*break*/, 10];\n case 6: return [4 /*yield*/, getNext(active - 1)];\n case 7:\n newCurrent = _a.sent();\n return [4 /*yield*/, getNext((newCurrent === null || newCurrent === void 0 ? void 0 : newCurrent.id) || 0)];\n case 8:\n newNext = _a.sent();\n return [4 /*yield*/, getPrev((newCurrent === null || newCurrent === void 0 ? void 0 : newCurrent.id) || 0)];\n case 9:\n newPrev = _a.sent();\n _a.label = 10;\n case 10:\n if (!(currentId < active)) return [3 /*break*/, 12];\n return [4 /*yield*/, goSwipe({ newPrev: newPrev, newNext: newNext, coeff: -1 }, newCurrent, undefined)];\n case 11:\n _a.sent();\n return [3 /*break*/, 14];\n case 12: return [4 /*yield*/, goSwipe({ newPrev: newPrev, newNext: newNext, coeff: 1 }, undefined, newCurrent)];\n case 13:\n _a.sent();\n _a.label = 14;\n case 14: return [2 /*return*/];\n }\n });\n }); }; }, [getNext, getPrev, goSwipe, current, next, postNext, prePrev, prev]);\n /**\n * Set button listeners\n */\n useEffect(function () {\n var _a, _b;\n var buttonNext = (_a = current === null || current === void 0 ? void 0 : current.nextRef) === null || _a === void 0 ? void 0 : _a.current;\n var buttonClose = (_b = current === null || current === void 0 ? void 0 : current.closeRef) === null || _b === void 0 ? void 0 : _b.current;\n buttonNext === null || buttonNext === void 0 ? void 0 : buttonNext.addEventListener('click', clickNextHandler);\n buttonClose === null || buttonClose === void 0 ? void 0 : buttonClose.addEventListener('click', clickNextHandler);\n return function () {\n buttonNext === null || buttonNext === void 0 ? void 0 : buttonNext.removeEventListener('click', clickNextHandler);\n buttonClose === null || buttonClose === void 0 ? void 0 : buttonClose.removeEventListener('click', clickNextHandler);\n };\n }, [clickNextHandler, current]);\n /**\n * Set width and height\n */\n useEffect(function () {\n var _a, _b, _c, _d, _e, _f;\n var _width = (_c = (_b = (_a = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.width;\n var _height = (_f = (_e = (_d = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _d === void 0 ? void 0 : _d.parentElement) === null || _e === void 0 ? void 0 : _e.getBoundingClientRect()) === null || _f === void 0 ? void 0 : _f.height;\n if (_width && !width && _height && !height) {\n setWidth(_width);\n setHeight(_height);\n }\n }, [containerRef, width, height]);\n /**\n * Save container left\n */\n useEffect(function () {\n var _a, _b, _c;\n var __left = (_c = (_b = (_a = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.left;\n if (__left && !left) {\n _setLeft(__left);\n }\n }, [containerRef, left]);\n /**\n * Auto slide\n */\n useEffect(function () {\n var clearAnimate;\n if (durationAnimation) {\n clearAnimate = setInterval(function () {\n clickNextHandler();\n }, durationAnimation);\n }\n return function () {\n if (clearAnimate) {\n clearInterval(clearAnimate);\n }\n };\n }, [durationAnimation, clickNextHandler]);\n /**\n * Set start cards\n */\n useEffect(function () {\n if (!current || !prev || !next || _defaultCurrent !== defaultCurrent) {\n setStartCards();\n }\n }, [current, next, prev, defaultCurrent, setStartCards]);\n /**\n * Save window width\n */\n useEffect(function () {\n var _windowWidth = document.body.clientWidth;\n if (!windowWidth && _windowWidth) {\n setWindowWidth(_windowWidth);\n }\n }, [windowWidth]);\n /**\n * Run invitation animation\n */\n useEffect(function () {\n if (invitationAnimation && width && !animated) {\n if (prev && next) {\n animated = true;\n startInvitationAnimation(prev, next);\n }\n }\n }, [invitationAnimation, next, prev, startInvitationAnimation, width]);\n /**\n * Listen resize\n */\n useEffect(function () {\n var resizeHandler = function () {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n var _width = (_c = (_b = (_a = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.width;\n var _height = (_f = (_e = (_d = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _d === void 0 ? void 0 : _d.parentElement) === null || _e === void 0 ? void 0 : _e.getBoundingClientRect()) === null || _f === void 0 ? void 0 : _f.height;\n var __left = (_j = (_h = (_g = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _g === void 0 ? void 0 : _g.parentElement) === null || _h === void 0 ? void 0 : _h.getBoundingClientRect()) === null || _j === void 0 ? void 0 : _j.left;\n var _windowWidth = document.body.clientWidth;\n if (_width && _height) {\n setWidth(_width);\n setHeight(_height);\n }\n if (__left) {\n setLeft(__left);\n }\n if (_windowWidth) {\n setWindowWidth(_windowWidth);\n }\n };\n window.addEventListener('resize', resizeHandler);\n return function () {\n window.removeEventListener('resize', resizeHandler);\n };\n }, []);\n /**\n * Set is mobile\n */\n useEffect(function () {\n if (typeof isMobile === 'undefined') {\n // @ts-ignore\n setIsMobile('ontouchstart' in window || typeof (navigator === null || navigator === void 0 ? void 0 : navigator.msMaxTouchPoints) !== 'undefined');\n }\n }, [isMobile]);\n /**\n * Set pre values\n */\n useEffect(function () {\n setPreValues(prev, next);\n }, [prev, next, setPreValues]);\n return (React.createElement(\"div\", { className: s.container, ref: containerRef },\n swipes.map(function (item) {\n var _a;\n return (React.createElement(Fragment, { key: item.id },\n item.id !== null && item.children !== null && width && (React.createElement(\"div\", { onTouchMove: onTouchWrapper('onTouchMove'), onTouchStart: onTouchWrapper('onTouchStart'), onTouchEnd: onTouchWrapper('onTouchEnd'), id: (_a = item.id) === null || _a === void 0 ? void 0 : _a.toString(), style: item.type === 'current'\n ? { width: width, height: height, left: left }\n : item.type === 'prev'\n ? { width: width, height: height, left: left - window.innerWidth }\n : { width: width, height: height, left: left + window.innerWidth }, className: clsx(s.card, item.type === 'prev' ? s.prev : item.type === 'next' ? s.next : ''), ref: getRef(item.id) },\n React.createElement(\"div\", { className: clsx(s.content, className) }, item.children))),\n item.id === null && (React.createElement(\"div\", { style: item.type === 'current'\n ? { width: width, height: height, left: left }\n : item.type === 'prev'\n ? { width: width, height: height, left: left - windowWidth }\n : { width: width, height: height, left: left + windowWidth }, className: clsx(s.card, item.type === 'prev' ? s.prev : item.type === 'next' ? s.next : '') },\n React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", height: \"24px\", viewBox: \"0 0 24 24\", width: \"24px\", fill: \"#000000\" },\n React.createElement(\"path\", { d: \"M0 0h24v24H0V0z\", fill: \"none\" }),\n React.createElement(\"path\", { d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z\" }))))));\n }),\n typeof isMobile !== 'undefined' && !isMobile && (prev === null || prev === void 0 ? void 0 : prev.id) !== null && (React.createElement(\"div\", { className: clsx(s.button, s.button__prev) },\n React.createElement(\"button\", { className: s.icon__button, type: \"button\", disabled: load || isMobile, onClick: clickPrevHandler },\n React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", height: \"24px\", viewBox: \"0 0 24 24\", width: \"24px\", fill: \"#000000\" },\n React.createElement(\"path\", { d: \"M0 0h24v24H0V0z\", fill: \"none\" }),\n React.createElement(\"path\", { d: \"M10.02 6L8.61 7.41 13.19 12l-4.58 4.59L10.02 18l6-6-6-6z\" }))))),\n typeof isMobile !== 'undefined' && !isMobile && (next === null || next === void 0 ? void 0 : next.id) !== null && (React.createElement(\"div\", { className: clsx(s.button, s.button__next) },\n React.createElement(\"button\", { className: s.icon__button, type: \"button\", disabled: load || isMobile, onClick: clickNextHandler },\n React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", height: \"24px\", viewBox: \"0 0 24 24\", width: \"24px\", fill: \"#000000\" },\n React.createElement(\"path\", { d: \"M0 0h24v24H0V0z\", fill: \"none\" }),\n React.createElement(\"path\", { d: \"M10.02 6L8.61 7.41 13.19 12l-4.58 4.59L10.02 18l6-6-6-6z\" }))))),\n dots && (React.createElement(\"div\", { className: s.dots }, dots.list.map(function (item) { return (React.createElement(\"div\", { role: \"button\", onClick: clickDotHandler, tabIndex: item, key: item, className: clsx(s.dot, (current === null || current === void 0 ? void 0 : current.id) === item ? s.active : '') })); })))));\n}\n;\n"],"names":[],"sourceRoot":""}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/*!*************************************************************************!*\
|
|
2
|
+
!*** css ./node_modules/css-loader/dist/cjs.js!./src/Swiper.module.css ***!
|
|
3
|
+
\*************************************************************************/
|
|
4
|
+
._E0DSvpd_pOhPwEcOESk {
|
|
2
5
|
position: relative;
|
|
3
6
|
overflow: hidden;
|
|
4
7
|
min-width: 320px;
|
|
@@ -11,18 +14,18 @@
|
|
|
11
14
|
justify-content: center;
|
|
12
15
|
}
|
|
13
16
|
|
|
14
|
-
.
|
|
17
|
+
.MNKZLOwtKAYuGRPioWg5 {
|
|
15
18
|
background-color: #fff;
|
|
16
19
|
border-radius: 1rem;
|
|
17
20
|
}
|
|
18
21
|
|
|
19
|
-
.
|
|
22
|
+
.fZGJ3LJ3vksT7z_W2Xbj {
|
|
20
23
|
position: relative;
|
|
21
24
|
width: 100%;
|
|
22
25
|
height: 100%;
|
|
23
26
|
}
|
|
24
27
|
|
|
25
|
-
.
|
|
28
|
+
.PZLGxXxVQxNBPdUxCzZF {
|
|
26
29
|
position: absolute;
|
|
27
30
|
max-width: inherit;
|
|
28
31
|
top: 0;
|
|
@@ -32,26 +35,26 @@
|
|
|
32
35
|
justify-content: center;
|
|
33
36
|
flex-direction: column;
|
|
34
37
|
}
|
|
35
|
-
.
|
|
38
|
+
.fdHrMcOmTUvG2ylUYYCo {
|
|
36
39
|
left: -100%;
|
|
37
40
|
}
|
|
38
|
-
.
|
|
41
|
+
.yHDVaCXbXJXsAleBINaZ {
|
|
39
42
|
left: 100%;
|
|
40
43
|
}
|
|
41
|
-
.
|
|
44
|
+
.P07Z5eTTJ3p2fjOfBFbZ {
|
|
42
45
|
transition: left 0.4s ease-in 0s;
|
|
43
46
|
}
|
|
44
|
-
.
|
|
47
|
+
.okENlLNDDujMLgzN2KUI {
|
|
45
48
|
transition: left 0.4s ease-out 0s;
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
.
|
|
51
|
+
.xqRTwQcqLpSHYzXUn7Qo {
|
|
49
52
|
width: 100%;
|
|
50
53
|
height: 100%;
|
|
51
54
|
position: relative;
|
|
52
55
|
}
|
|
53
56
|
|
|
54
|
-
.
|
|
57
|
+
.Ypi0iAw66HoFXrF10npO {
|
|
55
58
|
border-radius: 2px;
|
|
56
59
|
position: relative;
|
|
57
60
|
width: calc(100% - 48px);
|
|
@@ -61,7 +64,7 @@
|
|
|
61
64
|
box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);
|
|
62
65
|
}
|
|
63
66
|
|
|
64
|
-
.
|
|
67
|
+
.BFZzBGGo1DZSlo_VO3S6 {
|
|
65
68
|
cursor: pointer;
|
|
66
69
|
position: absolute;
|
|
67
70
|
width: auto;
|
|
@@ -71,16 +74,16 @@
|
|
|
71
74
|
z-index: 12;
|
|
72
75
|
}
|
|
73
76
|
|
|
74
|
-
.
|
|
77
|
+
.I78h4QcRoZnFJkvhRspX {
|
|
75
78
|
right: 0;
|
|
76
79
|
}
|
|
77
80
|
|
|
78
|
-
.
|
|
81
|
+
.nlzCTOpb1QyxySkPPncw {
|
|
79
82
|
left: 0;
|
|
80
83
|
transform: rotate(180deg);
|
|
81
84
|
}
|
|
82
85
|
|
|
83
|
-
.
|
|
86
|
+
.D2v6zUbfWAotXYTbrWUW {
|
|
84
87
|
display: -webkit-inline-box;
|
|
85
88
|
display: -webkit-inline-flex;
|
|
86
89
|
display: -ms-inline-flexbox;
|
|
@@ -109,21 +112,21 @@
|
|
|
109
112
|
color: rgba(0, 0, 0, 0.54);
|
|
110
113
|
transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
111
114
|
}
|
|
112
|
-
.
|
|
115
|
+
.D2v6zUbfWAotXYTbrWUW:hover {
|
|
113
116
|
background-color: rgba(0, 0, 0, 0.054);
|
|
114
117
|
}
|
|
115
|
-
.
|
|
118
|
+
.D2v6zUbfWAotXYTbrWUW:active {
|
|
116
119
|
background-color: rgba(0, 0, 0, 0.007);
|
|
117
120
|
}
|
|
118
121
|
|
|
119
|
-
.
|
|
122
|
+
.Zxb5JskRkhBuUYyMGjU2 {
|
|
120
123
|
position: absolute;
|
|
121
124
|
display: flex;
|
|
122
125
|
flex-direction: row;
|
|
123
126
|
bottom: 0;
|
|
124
127
|
}
|
|
125
128
|
|
|
126
|
-
.
|
|
129
|
+
.CEsncB7BTaSWKBlqUDJt {
|
|
127
130
|
cursor: pointer;
|
|
128
131
|
position: relative;
|
|
129
132
|
width: 8px;
|
|
@@ -133,7 +136,9 @@
|
|
|
133
136
|
border-radius: 50%;
|
|
134
137
|
}
|
|
135
138
|
|
|
136
|
-
.
|
|
139
|
+
.CEsncB7BTaSWKBlqUDJt.KZrnFwcKg0Ux8MF4udTr {
|
|
137
140
|
cursor: default;
|
|
138
141
|
background-color: gray;
|
|
139
|
-
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/*# sourceMappingURL=styles.css.map*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.css","mappings":";;;AAAA;EACE,kBAAkB;EAClB,gBAAgB;EAChB,gBAAgB;EAChB,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,gBAAgB;EAChB,aAAa;EACb,mBAAmB;EACnB,uBAAuB;AACzB;;AAEA;EACE,sBAAsB;EACtB,mBAAmB;AACrB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,sBAAsB;AACxB;AACA;EACE,WAAW;AACb;AACA;EACE,UAAU;AACZ;AACA;EACE,gCAAgC;AAClC;AACA;EACE,iCAAiC;AACnC;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,wBAAwB;EACxB,yBAAyB;EACzB,0DAA0D;EAC1D,uDAAuD;EACvD,kDAAkD;AACpD;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,WAAW;AACb;;AAEA;EACE,QAAQ;AACV;;AAEA;EACE,OAAO;EACP,yBAAyB;AAC3B;;AAEA;EACE,2BAA2B;EAC3B,4BAA4B;EAC5B,2BAA2B;EAC3B,oBAAoB;EACpB,mBAAmB;EACnB,uBAAuB;EACvB,kBAAkB;EAClB,sBAAsB;EACtB,6BAA6B;EAC7B,UAAU;EACV,SAAS;EACT,SAAS;EACT,gBAAgB;EAChB,UAAU;EACV,eAAe;EACf,iBAAiB;EACjB,sBAAsB;EACtB,qBAAqB;EACrB,cAAc;EACd,kBAAkB;EAClB,cAAc;EACd,iBAAiB;EACjB,YAAY;EACZ,kBAAkB;EAClB,iBAAiB;EACjB,0BAA0B;EAC1B,mEAAmE;AACrE;AACA;EACE,sCAAsC;AACxC;AACA;EACE,sCAAsC;AACxC;;AAEA;EACE,kBAAkB;EAClB,aAAa;EACb,mBAAmB;EACnB,SAAS;AACX;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,UAAU;EACV,WAAW;EACX,WAAW;EACX,sBAAsB;EACtB,kBAAkB;AACpB;;AAEA;EACE,eAAe;EACf,sBAAsB;AACxB,C","sources":["webpack://ReactSwiper/./src/Swiper.module.css"],"sourcesContent":[".container {\n position: relative;\n overflow: hidden;\n min-width: 320px;\n width: 100%;\n height: 100%;\n min-height: 20vh;\n max-width: 100vw;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.paper {\n background-color: #fff;\n border-radius: 1rem;\n}\n\n.pipe {\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.card {\n position: absolute;\n max-width: inherit;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n.prev {\n left: -100%;\n}\n.next {\n left: 100%;\n}\n.back {\n transition: left 0.4s ease-in 0s;\n}\n.go {\n transition: left 0.4s ease-out 0s;\n}\n\n.card__stop {\n width: 100%;\n height: 100%;\n position: relative;\n}\n\n.content {\n border-radius: 2px;\n position: relative;\n width: calc(100% - 48px);\n height: calc(100% - 48px);\n -webkit-box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\n -moz-box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\n box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\n}\n\n.button {\n cursor: pointer;\n position: absolute;\n width: auto;\n height: auto;\n display: flex;\n align-items: center;\n z-index: 12;\n}\n\n.button__next {\n right: 0;\n}\n\n.button__prev {\n left: 0;\n transform: rotate(180deg);\n}\n\n.icon__button {\n display: -webkit-inline-box;\n display: -webkit-inline-flex;\n display: -ms-inline-flexbox;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n background-color: transparent;\n outline: 0;\n border: 0;\n margin: 0;\n border-radius: 0;\n padding: 0;\n cursor: pointer;\n user-select: none;\n vertical-align: middle;\n text-decoration: none;\n color: inherit;\n text-align: center;\n flex: 0 0 auto;\n font-size: 1.5rem;\n padding: 8px;\n border-radius: 50%;\n overflow: visible;\n color: rgba(0, 0, 0, 0.54);\n transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.icon__button:hover {\n background-color: rgba(0, 0, 0, 0.054);\n}\n.icon__button:active {\n background-color: rgba(0, 0, 0, 0.007);\n}\n\n.dots {\n position: absolute;\n display: flex;\n flex-direction: row;\n bottom: 0;\n}\n\n.dot {\n cursor: pointer;\n position: relative;\n width: 8px;\n height: 8px;\n margin: 2px;\n border: 1px solid gray;\n border-radius: 50%;\n}\n\n.dot.active {\n cursor: default;\n background-color: gray;\n}"],"names":[],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolserdav/swiper",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.2",
|
|
4
4
|
"description": "Simple and powerfull react swiper component",
|
|
5
5
|
"author": "kolserdav",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "https://github.com/kolserdav/react-swiper",
|
|
8
8
|
"main": "dist/Swiper.js",
|
|
9
|
-
"
|
|
9
|
+
"types": "dist/Swiper.d.ts",
|
|
10
|
+
"source": "src/Swiper.tsx",
|
|
10
11
|
"engines": {
|
|
11
|
-
"node": ">=
|
|
12
|
+
"node": ">=10"
|
|
12
13
|
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
13
17
|
"keywords": [
|
|
14
18
|
"react",
|
|
15
19
|
"swipe",
|
|
@@ -17,40 +21,35 @@
|
|
|
17
21
|
"event",
|
|
18
22
|
"slider"
|
|
19
23
|
],
|
|
20
|
-
"type": "module",
|
|
21
24
|
"scripts": {
|
|
22
25
|
"dev": "next dev",
|
|
23
|
-
"compile": "rimraf dist && webpack --mode production
|
|
26
|
+
"compile": "rimraf dist && webpack --mode production",
|
|
27
|
+
"compile:dev": "webpack --mode development",
|
|
24
28
|
"build": "next build",
|
|
25
29
|
"start": "next start",
|
|
26
30
|
"lint": "next lint",
|
|
27
|
-
"types": "tsc --noEmit false --declaration --emitDeclarationOnly --outDir ./dist -p .",
|
|
28
31
|
"fhead": "fhead"
|
|
29
32
|
},
|
|
30
33
|
"dependencies": {
|
|
31
34
|
"clsx": "^2.1.1",
|
|
32
35
|
"next": "14.2.8",
|
|
33
36
|
"react": "^18",
|
|
34
|
-
"react-dom": "^18"
|
|
35
|
-
"save-dev": "^0.0.1-security"
|
|
37
|
+
"react-dom": "^18"
|
|
36
38
|
},
|
|
37
39
|
"devDependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"@babel/preset-flow": "^7.24.7",
|
|
40
|
-
"@babel/preset-react": "^7.24.7",
|
|
41
|
-
"@babel/preset-typescript": "^7.24.7",
|
|
40
|
+
"@types/mini-css-extract-plugin": "^2.5.0",
|
|
42
41
|
"@types/node": "^20.16.5",
|
|
43
42
|
"@types/react": "^18",
|
|
44
43
|
"@types/react-dom": "^18",
|
|
45
44
|
"@types/webpack": "^5.28.5",
|
|
46
45
|
"@types/webpack-env": "^1.18.5",
|
|
47
|
-
"babel-loader": "^9.1.3",
|
|
48
46
|
"css-loader": "^7.1.2",
|
|
49
47
|
"eslint": "^8",
|
|
50
48
|
"eslint-config-next": "14.2.8",
|
|
51
49
|
"fhead": "^3.2.8",
|
|
50
|
+
"mini-css-extract-plugin": "^2.9.1",
|
|
52
51
|
"rimraf": "^6.0.1",
|
|
53
|
-
"
|
|
52
|
+
"source-map-loader": "^5.0.0",
|
|
54
53
|
"ts-loader": "^9.5.1",
|
|
55
54
|
"typescript": "^5",
|
|
56
55
|
"webpack-cli": "^5.1.4"
|
package/.eslintrc.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"es2021": true,
|
|
4
|
-
"node": true,
|
|
5
|
-
"browser": true
|
|
6
|
-
},
|
|
7
|
-
"root": true,
|
|
8
|
-
"extends": ["next/typescript"],
|
|
9
|
-
"rules": {
|
|
10
|
-
"@typescript-eslint/no-explicit-any": 1,
|
|
11
|
-
"@typescript-eslint/camelcase": 0,
|
|
12
|
-
"react/jsx-filename-extension": 0,
|
|
13
|
-
"react/jsx-props-no-spreading": 0,
|
|
14
|
-
"react/jsx-fragments": 0,
|
|
15
|
-
"import/extensions": 0,
|
|
16
|
-
"react/jsx-boolean-value": 0,
|
|
17
|
-
"no-underscore-dangle": 0,
|
|
18
|
-
"arrow-body-style": 1,
|
|
19
|
-
"no-nested-ternary": 0,
|
|
20
|
-
"spaced-comment": 0,
|
|
21
|
-
"@typescript-eslint/ban-ts-comment": 1,
|
|
22
|
-
"no-plusplus": 1
|
|
23
|
-
}
|
|
24
|
-
}
|
package/.prettierrc
DELETED
package/.travis.yml
DELETED
package/.vscode/extensions.json
DELETED
package/.vscode/settings.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"eslint.validate": ["javascript", "typescript"],
|
|
3
|
-
"eslint.workingDirectories": ["./"],
|
|
4
|
-
"eslint.format.enable": true,
|
|
5
|
-
"editor.codeActionsOnSave": {
|
|
6
|
-
"source.fixAll.eslint": "explicit",
|
|
7
|
-
"source.fixAll.stylelint": "explicit"
|
|
8
|
-
},
|
|
9
|
-
"editor.formatOnSave": true,
|
|
10
|
-
"stylelint.enable": true,
|
|
11
|
-
"stylelint.validate": ["css", "scss"],
|
|
12
|
-
"[javascript]": {
|
|
13
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
14
|
-
},
|
|
15
|
-
"[typescript]": {
|
|
16
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
17
|
-
},
|
|
18
|
-
"[css]": {
|
|
19
|
-
"editor.defaultFormatter": "stylelint.vscode-stylelint",
|
|
20
|
-
}
|
|
21
|
-
}
|
package/README copy.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
|
2
|
-
|
|
3
|
-
## Getting Started
|
|
4
|
-
|
|
5
|
-
First, run the development server:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm run dev
|
|
9
|
-
# or
|
|
10
|
-
yarn dev
|
|
11
|
-
# or
|
|
12
|
-
pnpm dev
|
|
13
|
-
# or
|
|
14
|
-
bun dev
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
18
|
-
|
|
19
|
-
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
|
|
20
|
-
|
|
21
|
-
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
|
|
22
|
-
|
|
23
|
-
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
|
|
24
|
-
|
|
25
|
-
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
|
|
26
|
-
|
|
27
|
-
## Learn More
|
|
28
|
-
|
|
29
|
-
To learn more about Next.js, take a look at the following resources:
|
|
30
|
-
|
|
31
|
-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
32
|
-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
33
|
-
|
|
34
|
-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
|
35
|
-
|
|
36
|
-
## Deploy on Vercel
|
|
37
|
-
|
|
38
|
-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
|
39
|
-
|
|
40
|
-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
package/docs/CHANGELOG.md
DELETED
package/next.config.mjs
DELETED
package/pages/_app.tsx
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/******************************************************************************************
|
|
2
|
-
* Repository: https://github.com/kolserdav/react-swiper.git
|
|
3
|
-
* File name: _app.tsx
|
|
4
|
-
* Author: Sergey Kolmiller
|
|
5
|
-
* Email: <kolserdav@conhos.ru>
|
|
6
|
-
* License: MIT
|
|
7
|
-
* License text: The code is distributed as is. There are no guarantees regarding the functionality of the code or parts of it.
|
|
8
|
-
* Copyright: kolserdav, All rights reserved (c)
|
|
9
|
-
* Create Date: Fri Sep 06 2024 18:44:44 GMT+0700 (Krasnoyarsk Standard Time)
|
|
10
|
-
******************************************************************************************/
|
|
11
|
-
import "@/styles/globals.css";
|
|
12
|
-
import type { AppProps } from "next/app";
|
|
13
|
-
|
|
14
|
-
export default function App({ Component, pageProps }: AppProps) {
|
|
15
|
-
return <Component {...pageProps} />;
|
|
16
|
-
}
|
package/pages/_document.tsx
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/******************************************************************************************
|
|
2
|
-
* Repository: https://github.com/kolserdav/react-swiper.git
|
|
3
|
-
* File name: _document.tsx
|
|
4
|
-
* Author: Sergey Kolmiller
|
|
5
|
-
* Email: <kolserdav@conhos.ru>
|
|
6
|
-
* License: MIT
|
|
7
|
-
* License text: The code is distributed as is. There are no guarantees regarding the functionality of the code or parts of it.
|
|
8
|
-
* Copyright: kolserdav, All rights reserved (c)
|
|
9
|
-
* Create Date: Fri Sep 06 2024 18:44:44 GMT+0700 (Krasnoyarsk Standard Time)
|
|
10
|
-
******************************************************************************************/
|
|
11
|
-
import { Html, Head, Main, NextScript } from "next/document";
|
|
12
|
-
|
|
13
|
-
export default function Document() {
|
|
14
|
-
return (
|
|
15
|
-
<Html lang="en">
|
|
16
|
-
<Head />
|
|
17
|
-
<body>
|
|
18
|
-
<Main />
|
|
19
|
-
<NextScript />
|
|
20
|
-
</body>
|
|
21
|
-
</Html>
|
|
22
|
-
);
|
|
23
|
-
}
|
package/pages/api/hello.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/******************************************************************************************
|
|
2
|
-
* Repository: https://github.com/kolserdav/react-swiper.git
|
|
3
|
-
* File name: hello.ts
|
|
4
|
-
* Author: Sergey Kolmiller
|
|
5
|
-
* Email: <kolserdav@conhos.ru>
|
|
6
|
-
* License: MIT
|
|
7
|
-
* License text: The code is distributed as is. There are no guarantees regarding the functionality of the code or parts of it.
|
|
8
|
-
* Copyright: kolserdav, All rights reserved (c)
|
|
9
|
-
* Create Date: Fri Sep 06 2024 18:44:44 GMT+0700 (Krasnoyarsk Standard Time)
|
|
10
|
-
******************************************************************************************/
|
|
11
|
-
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
|
12
|
-
import type { NextApiRequest, NextApiResponse } from "next";
|
|
13
|
-
|
|
14
|
-
type Data = {
|
|
15
|
-
name: string;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default function handler(
|
|
19
|
-
req: NextApiRequest,
|
|
20
|
-
res: NextApiResponse<Data>,
|
|
21
|
-
) {
|
|
22
|
-
res.status(200).json({ name: "John Doe" });
|
|
23
|
-
}
|
|
Binary file
|
package/pages/fonts/GeistVF.woff
DELETED
|
Binary file
|
package/pages/index.tsx
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/******************************************************************************************
|
|
2
|
-
* Repository: https://github.com/kolserdav/react-swiper.git
|
|
3
|
-
* File name: index.tsx
|
|
4
|
-
* Author: Sergey Kolmiller
|
|
5
|
-
* Email: <kolserdav@conhos.ru>
|
|
6
|
-
* License: MIT
|
|
7
|
-
* License text: The code is distributed as is. There are no guarantees regarding the functionality of the code or parts of it.
|
|
8
|
-
* Copyright: kolserdav, All rights reserved (c)
|
|
9
|
-
* Create Date: Fri Sep 06 2024 18:44:44 GMT+0700 (Krasnoyarsk Standard Time)
|
|
10
|
-
******************************************************************************************/
|
|
11
|
-
import s from "@/styles/Home.module.css";
|
|
12
|
-
import { GetSwipeHandler, Swipe, Swiper } from "@/src/components/Swiper";
|
|
13
|
-
import { useEffect, useState } from "react";
|
|
14
|
-
|
|
15
|
-
const COUNT = 6;
|
|
16
|
-
const LAG = 25;
|
|
17
|
-
|
|
18
|
-
const getNext: GetSwipeHandler = async (old) => {
|
|
19
|
-
let id: any = old + 1;
|
|
20
|
-
id = id <= COUNT ? id : 0;
|
|
21
|
-
return new Promise((resolve) => {
|
|
22
|
-
setTimeout(() => {
|
|
23
|
-
resolve({
|
|
24
|
-
id,
|
|
25
|
-
children: <h1>Test {id}</h1>,
|
|
26
|
-
});
|
|
27
|
-
}, LAG);
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const getPrevios: GetSwipeHandler = async (old) => {
|
|
32
|
-
let id = old - 1;
|
|
33
|
-
id = id >= 0 ? id : COUNT;
|
|
34
|
-
return new Promise((resolve) => {
|
|
35
|
-
setTimeout(() => {
|
|
36
|
-
resolve({
|
|
37
|
-
id,
|
|
38
|
-
children: <h1>Test {id}</h1>,
|
|
39
|
-
});
|
|
40
|
-
}, LAG);
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const App = (): React.ReactElement => {
|
|
45
|
-
const [current, setCurrent] = useState<Swipe>();
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
if (!current) {
|
|
48
|
-
(async () => {
|
|
49
|
-
setCurrent(await getNext(-1));
|
|
50
|
-
})();
|
|
51
|
-
}
|
|
52
|
-
}, [current]);
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<div className={s.container}>
|
|
56
|
-
{current && (
|
|
57
|
-
<Swiper
|
|
58
|
-
blockSwipe={false}
|
|
59
|
-
defaultCurrent={current}
|
|
60
|
-
getNext={getNext}
|
|
61
|
-
getPrev={getPrevios}
|
|
62
|
-
invitationAnimation={true}
|
|
63
|
-
className="card__content"
|
|
64
|
-
dots={{
|
|
65
|
-
list: [0, 1, 2, 3, 4, 5, 6],
|
|
66
|
-
active: current.id || 1,
|
|
67
|
-
}}
|
|
68
|
-
/>
|
|
69
|
-
)}
|
|
70
|
-
</div>
|
|
71
|
-
);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export default App;
|
package/public/favicon.ico
DELETED
|
Binary file
|