react-scroll-snap-anime-slider 1.0.0 → 1.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 (84) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -5
  3. package/dist/index.d.ts +11 -3
  4. package/dist/index.js +837 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.module.js +820 -1
  7. package/dist/index.module.js.map +1 -1
  8. package/dist/lib/ButtonBack.d.ts +8 -0
  9. package/dist/lib/ButtonNext.d.ts +8 -0
  10. package/dist/lib/Carousel.d.ts +18 -0
  11. package/dist/lib/CarouselContext.d.ts +12 -0
  12. package/dist/lib/DotGroupRenderDotsUtil.d.ts +12 -0
  13. package/dist/lib/Slide.d.ts +6 -5
  14. package/dist/lib/Slider.d.ts +36 -9
  15. package/dist/lib/SliderBar.d.ts +18 -0
  16. package/dist/lib/SliderBarDotGroup.d.ts +21 -0
  17. package/dist/lib/SliderBarLine.d.ts +11 -0
  18. package/dist/lib/SliderButton.d.ts +17 -0
  19. package/dist/lib/Styles.d.ts +1 -0
  20. package/dist/{types.d.ts → lib/Types.d.ts} +13 -0
  21. package/dist/lib/Utility.d.ts +3 -0
  22. package/package.json +24 -19
  23. package/.env +0 -1
  24. package/demo/src/asset/favicon.ico +0 -0
  25. package/demo/src/asset/logo.svg +0 -1
  26. package/demo/src/asset/logo192.png +0 -0
  27. package/demo/src/asset/logo512.png +0 -0
  28. package/demo/src/asset/manifest.json +0 -25
  29. package/demo/src/index.html +0 -38
  30. package/demo/src/index.tsx +0 -46
  31. package/demo/src/robots.txt +0 -3
  32. package/demo/src/style/App.css +0 -38
  33. package/demo/src/style/index.css +0 -13
  34. package/dist/index.css +0 -15
  35. package/dist/index.module.css +0 -15
  36. package/docs/README.md +0 -41
  37. package/docs/babel.config.js +0 -3
  38. package/docs/docs/intro.md +0 -47
  39. package/docs/docs/tutorial-basics/_category_.json +0 -8
  40. package/docs/docs/tutorial-basics/congratulations.md +0 -23
  41. package/docs/docs/tutorial-basics/create-a-blog-post.md +0 -34
  42. package/docs/docs/tutorial-basics/create-a-document.md +0 -57
  43. package/docs/docs/tutorial-basics/create-a-page.md +0 -43
  44. package/docs/docs/tutorial-basics/deploy-your-site.md +0 -31
  45. package/docs/docs/tutorial-basics/markdown-features.mdx +0 -150
  46. package/docs/docs/tutorial-extras/_category_.json +0 -7
  47. package/docs/docs/tutorial-extras/img/docsVersionDropdown.png +0 -0
  48. package/docs/docs/tutorial-extras/img/localeDropdown.png +0 -0
  49. package/docs/docs/tutorial-extras/manage-docs-versions.md +0 -55
  50. package/docs/docs/tutorial-extras/translate-your-site.md +0 -88
  51. package/docs/docusaurus.config.js +0 -151
  52. package/docs/package.json +0 -49
  53. package/docs/sidebars.js +0 -33
  54. package/docs/src/components/HomepageFeatures/index.tsx +0 -205
  55. package/docs/src/components/HomepageFeatures/styles.module.css +0 -35
  56. package/docs/src/css/custom.css +0 -87
  57. package/docs/src/pages/index.module.css +0 -34
  58. package/docs/src/pages/index.tsx +0 -47
  59. package/docs/src/pages/markdown-page.md +0 -7
  60. package/docs/static/img/favicon.ico +0 -0
  61. package/docs/static/img/logo-karanokara.png +0 -0
  62. package/docs/static/img/logo-slider.png +0 -0
  63. package/docs/static/img/social-card.png +0 -0
  64. package/docs/tsconfig.json +0 -17
  65. package/index.d.ts +0 -3
  66. package/rollup.config.mjs +0 -82
  67. package/src/css/style.scss +0 -105
  68. package/src/index.ts +0 -18
  69. package/src/lib/ButtonBack.tsx +0 -20
  70. package/src/lib/ButtonNext.tsx +0 -22
  71. package/src/lib/Carousel.tsx +0 -132
  72. package/src/lib/CarouselContext.tsx +0 -30
  73. package/src/lib/DotGroupRenderDotsUtil.tsx +0 -97
  74. package/src/lib/Slide.tsx +0 -84
  75. package/src/lib/Slider.tsx +0 -537
  76. package/src/lib/SliderBar.tsx +0 -95
  77. package/src/lib/SliderBarDotGroup.tsx +0 -130
  78. package/src/lib/SliderBarLine.tsx +0 -69
  79. package/src/lib/SliderButton.tsx +0 -82
  80. package/src/lib/Types.tsx +0 -74
  81. package/src/lib/Utility.ts +0 -130
  82. package/tests/App.test.tsx +0 -9
  83. package/tsconfig.build.json +0 -6
  84. package/tsconfig.json +0 -42
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Kanra Su
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ <div align="center"><img src="docs/static/img/logo-slider.png" width="250"/></div>
2
+
1
3
  <h1 align="center">React Scroll Snap Anime Slider</h1>
2
4
 
3
5
  <div align="center">
@@ -6,6 +8,8 @@ A simple slider/carousel using css style [scroll-snap](https://developer.mozilla
6
8
 
7
9
  Works natively on touchable devices
8
10
 
11
+ :grinning:[Demo](https://karanokara.github.io/react-scroll-snap-anime-slider/)
12
+
9
13
  </div>
10
14
 
11
15
  ## :star: Features
@@ -13,6 +17,7 @@ Works natively on touchable devices
13
17
  | Features | Comment | Status |
14
18
  | ------------------------------------ | :-------------------------------------------------: | :-----------------: |
15
19
  | **Multiple slides per view** | Can also adjust slides per step | :heavy_check_mark: |
20
+ | **Customized DOM structure** | Construct the slider components by yourself | :heavy_check_mark: |
16
21
  | **Touch scrolling** | Built-in | :heavy_check_mark: |
17
22
  | **Scroll and snap** | Snap to slide's edge | :heavy_check_mark: |
18
23
  | **Free scrolling** | | :heavy_check_mark: |
@@ -30,16 +35,19 @@ Works natively on touchable devices
30
35
  | **Vertical scrolling** | Pending | :clock3: |
31
36
 
32
37
  ## :neutral_face: Motivation
33
- The reason to start creating my own JS slider is because I couldn't find a slider that works smoothly on desktop browser and mobile device. There are a ton of wonderfull sliders out there such as [Swiper](https://swiperjs.com/), [Pure React Carousel](https://express-labs.github.io/pure-react-carousel/) and a lot, but they are all not dynamic and reponsive enough, especially when use on iOS (the animation not works sometime).
38
+ The reason to start creating my own JS slider is because I couldn't find a slider that works smoothly on both desktop browser and mobile device. There are a ton of wonderfull sliders out there such as [Swiper](https://swiperjs.com/), [Pure React Carousel](https://express-labs.github.io/pure-react-carousel/) and a lot, but they are not utilizing the native scrolling feature, and so not work natively on iOS browser (the animation not works smoothly).
39
+
40
+ ## 🤔 Do I need this slider?
41
+ If you are looking for an animation effect of slider that works like those sliders you saw in some native Apps, you can try this one. However this slider has limitions such as it only provides sliding effect (no fade, swiping effects, for example). So, if you are looking for a powerful slider, you should other powerful library such as [Swiper](https://swiperjs.com/).
34
42
 
35
43
  ## :pushpin: Geting started
36
44
 
37
- Install:
45
+ ### Install:
38
46
  ```bash
39
47
  npm install react-scroll-snap-anime-slider
40
48
  ```
41
49
 
42
- Create a simple slider:
50
+ ### Create a simple slider:
43
51
  ```js
44
52
  import { Slider, } from "react-scroll-snap-anime-slider";
45
53
 
@@ -47,7 +55,10 @@ import { Slider, } from "react-scroll-snap-anime-slider";
47
55
  ```
48
56
 
49
57
 
50
-
51
58
  ## :book: Documentation
59
+ You can learn more from [here](https://karanokara.github.io/react-scroll-snap-anime-slider/).
60
+
61
+
52
62
 
53
- You can learn more from [here](https://facebook.github.io/create-react-app/docs/getting-started).
63
+ ## :bug: Bugs or :bow: Requests
64
+ You can file an issue under the [Issues](../../issues) page.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,14 @@
1
- export { Slider } from "./lib/Slider";
2
- export type { IProps as SliderProps } from "./lib/Slider";
1
+ export { Carousel } from "./lib/Carousel";
2
+ export { Slider, } from "./lib/Slider";
3
+ export type { IProps as ISliderProps, OnScrollProps } from "./lib/Slider";
3
4
  export { Slide } from "./lib/Slide";
4
5
  export type { IProps as SlideProps } from "./lib/Slide";
6
+ export { ButtonBack } from "./lib/ButtonBack";
7
+ export { ButtonNext } from "./lib/ButtonNext";
8
+ export { SliderBarLine } from "./lib/SliderBarLine";
9
+ export { SliderBarDotGroup } from "./lib/SliderBarDotGroup";
10
+ export type { IRenderDotsProps } from "./lib/SliderBarDotGroup";
11
+ export { renderDotsDynamicCircle, renderDotsDynamicPill, renderDotsDynamicByScale, CircleDot, PillDot } from "./lib/DotGroupRenderDotsUtil";
12
+ export type { ScaleDot, ScaleDotProps } from "./lib/DotGroupRenderDotsUtil";
5
13
  export * from "./lib/Utility";
6
- export * from "./types";
14
+ export * from "./lib/Types";