@lynx-example/lynx-ui-swiper 0.0.5 → 0.0.7

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 (57) hide show
  1. package/Basic/index.tsx +3 -3
  2. package/Basic/styles.css +1 -1
  3. package/BasicDynamic/index.tsx +3 -3
  4. package/BasicUpdateSize/index.tsx +3 -3
  5. package/Bounces/index.tsx +3 -3
  6. package/CHANGELOG.md +16 -0
  7. package/Custom/index.tsx +3 -3
  8. package/CustomScale/index.tsx +3 -3
  9. package/CustomTinder/index.tsx +2 -2
  10. package/CustomTinder/styles.css +1 -1
  11. package/DifferentHeight/index.tsx +4 -4
  12. package/DifferentHeight/styles.css +1 -1
  13. package/Direction/index.tsx +2 -4
  14. package/EmptyDataBug/index.tsx +12 -12
  15. package/Indicator/index.tsx +3 -3
  16. package/Lazy/index.tsx +4 -4
  17. package/Loop/index.tsx +3 -3
  18. package/RTL/index.tsx +3 -3
  19. package/RTLCustom/index.tsx +3 -3
  20. package/RTLLoop/index.tsx +3 -3
  21. package/RTLLoopLynxRTL/index.tsx +3 -3
  22. package/WithGap/index.tsx +3 -3
  23. package/dist/SwiperBasic.lynx.bundle +0 -0
  24. package/dist/SwiperBasic.web.bundle +1 -1
  25. package/dist/SwiperBasicDynamic.lynx.bundle +0 -0
  26. package/dist/SwiperBasicDynamic.web.bundle +1 -1
  27. package/dist/SwiperBasicUpdateSize.lynx.bundle +0 -0
  28. package/dist/SwiperBasicUpdateSize.web.bundle +1 -1
  29. package/dist/SwiperBounces.lynx.bundle +0 -0
  30. package/dist/SwiperBounces.web.bundle +1 -1
  31. package/dist/SwiperCustom.lynx.bundle +0 -0
  32. package/dist/SwiperCustom.web.bundle +1 -1
  33. package/dist/SwiperCustomScale.lynx.bundle +0 -0
  34. package/dist/SwiperCustomScale.web.bundle +1 -1
  35. package/dist/SwiperCustomTinder.lynx.bundle +0 -0
  36. package/dist/SwiperCustomTinder.web.bundle +1 -1
  37. package/dist/SwiperDifferentHeight.lynx.bundle +0 -0
  38. package/dist/SwiperDifferentHeight.web.bundle +1 -1
  39. package/dist/SwiperEmptyDataBug.lynx.bundle +0 -0
  40. package/dist/SwiperEmptyDataBug.web.bundle +1 -1
  41. package/dist/SwiperIndicator.lynx.bundle +0 -0
  42. package/dist/SwiperIndicator.web.bundle +1 -1
  43. package/dist/SwiperLazy.lynx.bundle +0 -0
  44. package/dist/SwiperLazy.web.bundle +1 -1
  45. package/dist/SwiperLoop.lynx.bundle +0 -0
  46. package/dist/SwiperLoop.web.bundle +1 -1
  47. package/dist/SwiperRTL.lynx.bundle +0 -0
  48. package/dist/SwiperRTL.web.bundle +1 -1
  49. package/dist/SwiperRTLCustom.lynx.bundle +0 -0
  50. package/dist/SwiperRTLCustom.web.bundle +1 -1
  51. package/dist/SwiperRTLLoop.lynx.bundle +0 -0
  52. package/dist/SwiperRTLLoop.web.bundle +1 -1
  53. package/dist/SwiperRTLLynxRTL.lynx.bundle +0 -0
  54. package/dist/SwiperRTLLynxRTL.web.bundle +1 -1
  55. package/dist/SwiperWithGap.lynx.bundle +0 -0
  56. package/dist/SwiperWithGap.web.bundle +1 -1
  57. package/package.json +6 -6
package/Basic/index.tsx CHANGED
@@ -49,10 +49,10 @@ function SwiperEntry(): JSX.Element {
49
49
  overflow: 'visible',
50
50
  }}
51
51
  >
52
- {({ index, realIndex }) => (
53
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
52
+ {({ index }) => (
53
+ <SwiperItem>
54
54
  <Card
55
- index={realIndex}
55
+ index={index}
56
56
  style={{
57
57
  height: '250px',
58
58
  }}
package/Basic/styles.css CHANGED
@@ -23,7 +23,7 @@
23
23
  background: linear-gradient(
24
24
  0deg,
25
25
  var(--gradient-a),
26
- var(--gradient-b),
26
+ var(--gradient-b)
27
27
  );
28
28
  padding-top: 96px;
29
29
  flex-direction: column;
@@ -57,10 +57,10 @@ function SwiperEntry(): JSX.Element {
57
57
  overflow: 'visible',
58
58
  }}
59
59
  >
60
- {({ index, realIndex }) => (
61
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
60
+ {({ index }) => (
61
+ <SwiperItem>
62
62
  <Card
63
- index={realIndex}
63
+ index={index}
64
64
  style={{
65
65
  height: '250px',
66
66
  }}
@@ -56,10 +56,10 @@ function SwiperEntry(): JSX.Element {
56
56
  overflow: 'visible',
57
57
  }}
58
58
  >
59
- {({ index, realIndex }) => (
60
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
59
+ {({ index }) => (
60
+ <SwiperItem>
61
61
  <Card
62
- index={realIndex}
62
+ index={index}
63
63
  style={{
64
64
  height: '250px',
65
65
  }}
package/Bounces/index.tsx CHANGED
@@ -64,10 +64,10 @@ function SwiperEntry() {
64
64
  }}
65
65
  onChange={setCurrentIndex}
66
66
  >
67
- {({ index, realIndex }) => (
68
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
67
+ {({ index }) => (
68
+ <SwiperItem>
69
69
  <Card
70
- index={realIndex}
70
+ index={index}
71
71
  style={{
72
72
  height: `${ITEM_HEIGHT}px`,
73
73
  }}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @lynx-example/lynx-ui-swiper
2
2
 
3
+ ## 0.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @lynx-js/lynx-ui@3.133.0
9
+
10
+ ## 0.0.6
11
+
12
+ ### Patch Changes
13
+
14
+ - Fix background syntax in web ([#163](https://github.com/lynx-family/lynx-ui/pull/163))
15
+
16
+ - Updated dependencies []:
17
+ - @lynx-js/lynx-ui@3.132.0
18
+
3
19
  ## 0.0.5
4
20
 
5
21
  ### Patch Changes
package/Custom/index.tsx CHANGED
@@ -62,10 +62,10 @@ function SwiperEntry(): JSX.Element {
62
62
  overflow: 'visible',
63
63
  }}
64
64
  >
65
- {({ index, realIndex }) => (
66
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
65
+ {({ index }) => (
66
+ <SwiperItem>
67
67
  <Card
68
- index={realIndex}
68
+ index={index}
69
69
  style={{
70
70
  height: '250px',
71
71
  }}
@@ -91,10 +91,10 @@ function SwiperEntry(): JSX.Element {
91
91
  overflow: 'visible',
92
92
  }}
93
93
  >
94
- {({ index, realIndex }) => (
95
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
94
+ {({ index }) => (
95
+ <SwiperItem>
96
96
  <Card
97
- index={realIndex}
97
+ index={index}
98
98
  style={{
99
99
  height: '250px',
100
100
  }}
@@ -85,8 +85,8 @@ function SwiperEntry() {
85
85
  overflow: 'visible',
86
86
  }}
87
87
  >
88
- {({ index, realIndex }) => (
89
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
88
+ {({ index }) => (
89
+ <SwiperItem>
90
90
  <view
91
91
  class='block-view'
92
92
  style={{
@@ -11,7 +11,7 @@
11
11
  background: linear-gradient(
12
12
  0deg,
13
13
  var(--gradient-a),
14
- var(--gradient-b),
14
+ var(--gradient-b)
15
15
  );
16
16
  align-items: center;
17
17
  }
@@ -53,12 +53,12 @@ function SwiperEntry(): JSX.Element {
53
53
  alignItems: 'end',
54
54
  }}
55
55
  >
56
- {({ index, realIndex }) => (
57
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
56
+ {({ index }) => (
57
+ <SwiperItem>
58
58
  <Card
59
- index={realIndex}
59
+ index={index}
60
60
  style={{
61
- height: `${itemHeights[realIndex % itemHeights.length]}px`,
61
+ height: `${itemHeights[index % itemHeights.length]}px`,
62
62
  }}
63
63
  />
64
64
  </SwiperItem>
@@ -23,7 +23,7 @@
23
23
  background: linear-gradient(
24
24
  0deg,
25
25
  var(--gradient-a),
26
- var(--gradient-b),
26
+ var(--gradient-b)
27
27
  );
28
28
  padding-top: 96px;
29
29
  flex-direction: column;
@@ -14,15 +14,13 @@ const itemArr: number[] = [1, 2, 3, 4]
14
14
 
15
15
  function renderCard({
16
16
  index,
17
- realIndex,
18
17
  }: {
19
18
  index: number
20
- realIndex: number
21
19
  }) {
22
20
  return (
23
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
21
+ <SwiperItem>
24
22
  <Card
25
- index={realIndex}
23
+ index={index}
26
24
  style={{
27
25
  height: '200px',
28
26
  }}
@@ -102,9 +102,9 @@ function EmptyDataWithAutoPlay(): JSX.Element {
102
102
  autoPlayInterval={2000}
103
103
  modeConfig={{ align: 'center' }}
104
104
  >
105
- {({ index, realIndex }) => (
106
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
107
- <Card index={realIndex} style={{ height: '200px' }} />
105
+ {({ index }) => (
106
+ <SwiperItem>
107
+ <Card index={index} style={{ height: '200px' }} />
108
108
  </SwiperItem>
109
109
  )}
110
110
  </Swiper>
@@ -187,9 +187,9 @@ function EmptyDataWithManualSwipe(): JSX.Element {
187
187
  onSwipeStart={handleSwipeStart}
188
188
  onSwipeStop={handleSwipeStop}
189
189
  >
190
- {({ index, realIndex }) => (
191
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
192
- <Card index={realIndex} style={{ height: '200px' }} />
190
+ {({ index }) => (
191
+ <SwiperItem>
192
+ <Card index={index} style={{ height: '200px' }} />
193
193
  </SwiperItem>
194
194
  )}
195
195
  </Swiper>
@@ -264,9 +264,9 @@ function DataBecomesEmpty(): JSX.Element {
264
264
  autoPlayInterval={3000}
265
265
  modeConfig={{ align: 'center' }}
266
266
  >
267
- {({ index, realIndex }) => (
268
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
269
- <Card index={realIndex} style={{ height: '200px' }} />
267
+ {({ index }) => (
268
+ <SwiperItem>
269
+ <Card index={index} style={{ height: '200px' }} />
270
270
  </SwiperItem>
271
271
  )}
272
272
  </Swiper>
@@ -330,9 +330,9 @@ function ResetWithCorruptedIndex(): JSX.Element {
330
330
  autoPlay={false}
331
331
  modeConfig={{ align: 'center' }}
332
332
  >
333
- {({ index, realIndex }) => (
334
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
335
- <Card index={realIndex} style={{ height: '200px' }} />
333
+ {({ index }) => (
334
+ <SwiperItem>
335
+ <Card index={index} style={{ height: '200px' }} />
336
336
  </SwiperItem>
337
337
  )}
338
338
  </Swiper>
@@ -48,10 +48,10 @@ function SwiperEntry() {
48
48
  overflow: 'visible',
49
49
  }}
50
50
  >
51
- {({ index, realIndex }) => (
52
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
51
+ {({ index }) => (
52
+ <SwiperItem>
53
53
  <Card
54
- index={realIndex}
54
+ index={index}
55
55
  style={{
56
56
  height: '250px',
57
57
  }}
package/Lazy/index.tsx CHANGED
@@ -51,15 +51,15 @@ function SwiperEntry() {
51
51
  overflow: 'visible',
52
52
  }}
53
53
  >
54
- {({ index, realIndex }) => (
55
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
54
+ {({ index }) => (
55
+ <SwiperItem>
56
56
  <LazyComponent
57
57
  scene='scene'
58
- pid={`pid_${realIndex}`}
58
+ pid={`pid_${index}`}
59
59
  estimatedStyle={{ width: '100%', height: '100%' }}
60
60
  >
61
61
  <Card
62
- index={realIndex}
62
+ index={index}
63
63
  style={{
64
64
  height: '250px',
65
65
  }}
package/Loop/index.tsx CHANGED
@@ -50,10 +50,10 @@ function SwiperEntry() {
50
50
  overflow: 'visible',
51
51
  }}
52
52
  >
53
- {({ index, realIndex }) => (
54
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
53
+ {({ index }) => (
54
+ <SwiperItem>
55
55
  <Card
56
- index={realIndex}
56
+ index={index}
57
57
  style={{
58
58
  height: '250px',
59
59
  }}
package/RTL/index.tsx CHANGED
@@ -66,10 +66,10 @@ function SwiperEntry(): JSX.Element {
66
66
  },
67
67
  }}
68
68
  >
69
- {({ index, realIndex }) => (
70
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
69
+ {({ index }) => (
70
+ <SwiperItem>
71
71
  <Card
72
- index={realIndex}
72
+ index={index}
73
73
  style={{
74
74
  height: '250px',
75
75
  }}
@@ -90,10 +90,10 @@ function SwiperEntry(): JSX.Element {
90
90
  overflow: 'visible',
91
91
  }}
92
92
  >
93
- {({ index, realIndex }) => (
94
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
93
+ {({ index }) => (
94
+ <SwiperItem>
95
95
  <Card
96
- index={realIndex}
96
+ index={index}
97
97
  style={{
98
98
  height: '250px',
99
99
  }}
package/RTLLoop/index.tsx CHANGED
@@ -49,10 +49,10 @@ function SwiperEntry(): JSX.Element {
49
49
  overflow: 'visible',
50
50
  }}
51
51
  >
52
- {({ index, realIndex }) => (
53
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
52
+ {({ index }) => (
53
+ <SwiperItem>
54
54
  <Card
55
- index={realIndex}
55
+ index={index}
56
56
  style={{
57
57
  height: '250px',
58
58
  }}
@@ -49,10 +49,10 @@ function SwiperEntry(): JSX.Element {
49
49
  overflow: 'visible',
50
50
  }}
51
51
  >
52
- {({ index, realIndex }) => (
53
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
52
+ {({ index }) => (
53
+ <SwiperItem>
54
54
  <Card
55
- index={realIndex}
55
+ index={index}
56
56
  style={{
57
57
  height: '250px',
58
58
  }}
package/WithGap/index.tsx CHANGED
@@ -49,10 +49,10 @@ function SwiperEntry(): JSX.Element {
49
49
  overflow: 'visible',
50
50
  }}
51
51
  >
52
- {({ index, realIndex }) => (
53
- <SwiperItem index={index} key={realIndex} realIndex={realIndex}>
52
+ {({ index }) => (
53
+ <SwiperItem>
54
54
  <Card
55
- index={realIndex}
55
+ index={index}
56
56
  style={{
57
57
  height: '250px',
58
58
  }}
Binary file