@lynx-example/lynx-ui-swiper 0.0.5 → 0.0.6
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/Basic/index.tsx +3 -3
- package/Basic/styles.css +1 -1
- package/BasicDynamic/index.tsx +3 -3
- package/BasicUpdateSize/index.tsx +3 -3
- package/Bounces/index.tsx +3 -3
- package/CHANGELOG.md +9 -0
- package/Custom/index.tsx +3 -3
- package/CustomScale/index.tsx +3 -3
- package/CustomTinder/index.tsx +2 -2
- package/CustomTinder/styles.css +1 -1
- package/DifferentHeight/index.tsx +4 -4
- package/DifferentHeight/styles.css +1 -1
- package/Direction/index.tsx +2 -4
- package/EmptyDataBug/index.tsx +12 -12
- package/Indicator/index.tsx +3 -3
- package/Lazy/index.tsx +4 -4
- package/Loop/index.tsx +3 -3
- package/RTL/index.tsx +3 -3
- package/RTLCustom/index.tsx +3 -3
- package/RTLLoop/index.tsx +3 -3
- package/RTLLoopLynxRTL/index.tsx +3 -3
- package/WithGap/index.tsx +3 -3
- package/dist/SwiperBasic.lynx.bundle +0 -0
- package/dist/SwiperBasic.web.bundle +1 -1
- package/dist/SwiperBasicDynamic.lynx.bundle +0 -0
- package/dist/SwiperBasicDynamic.web.bundle +1 -1
- package/dist/SwiperBasicUpdateSize.lynx.bundle +0 -0
- package/dist/SwiperBasicUpdateSize.web.bundle +1 -1
- package/dist/SwiperBounces.lynx.bundle +0 -0
- package/dist/SwiperBounces.web.bundle +1 -1
- package/dist/SwiperCustom.lynx.bundle +0 -0
- package/dist/SwiperCustom.web.bundle +1 -1
- package/dist/SwiperCustomScale.lynx.bundle +0 -0
- package/dist/SwiperCustomScale.web.bundle +1 -1
- package/dist/SwiperCustomTinder.lynx.bundle +0 -0
- package/dist/SwiperCustomTinder.web.bundle +1 -1
- package/dist/SwiperDifferentHeight.lynx.bundle +0 -0
- package/dist/SwiperDifferentHeight.web.bundle +1 -1
- package/dist/SwiperEmptyDataBug.lynx.bundle +0 -0
- package/dist/SwiperEmptyDataBug.web.bundle +1 -1
- package/dist/SwiperIndicator.lynx.bundle +0 -0
- package/dist/SwiperIndicator.web.bundle +1 -1
- package/dist/SwiperLazy.lynx.bundle +0 -0
- package/dist/SwiperLazy.web.bundle +1 -1
- package/dist/SwiperLoop.lynx.bundle +0 -0
- package/dist/SwiperLoop.web.bundle +1 -1
- package/dist/SwiperRTL.lynx.bundle +0 -0
- package/dist/SwiperRTL.web.bundle +1 -1
- package/dist/SwiperRTLCustom.lynx.bundle +0 -0
- package/dist/SwiperRTLCustom.web.bundle +1 -1
- package/dist/SwiperRTLLoop.lynx.bundle +0 -0
- package/dist/SwiperRTLLoop.web.bundle +1 -1
- package/dist/SwiperRTLLynxRTL.lynx.bundle +0 -0
- package/dist/SwiperRTLLynxRTL.web.bundle +1 -1
- package/dist/SwiperWithGap.lynx.bundle +0 -0
- package/dist/SwiperWithGap.web.bundle +1 -1
- 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
|
|
53
|
-
<SwiperItem
|
|
52
|
+
{({ index }) => (
|
|
53
|
+
<SwiperItem>
|
|
54
54
|
<Card
|
|
55
|
-
index={
|
|
55
|
+
index={index}
|
|
56
56
|
style={{
|
|
57
57
|
height: '250px',
|
|
58
58
|
}}
|
package/Basic/styles.css
CHANGED
package/BasicDynamic/index.tsx
CHANGED
|
@@ -57,10 +57,10 @@ function SwiperEntry(): JSX.Element {
|
|
|
57
57
|
overflow: 'visible',
|
|
58
58
|
}}
|
|
59
59
|
>
|
|
60
|
-
{({ index
|
|
61
|
-
<SwiperItem
|
|
60
|
+
{({ index }) => (
|
|
61
|
+
<SwiperItem>
|
|
62
62
|
<Card
|
|
63
|
-
index={
|
|
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
|
|
60
|
-
<SwiperItem
|
|
59
|
+
{({ index }) => (
|
|
60
|
+
<SwiperItem>
|
|
61
61
|
<Card
|
|
62
|
-
index={
|
|
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
|
|
68
|
-
<SwiperItem
|
|
67
|
+
{({ index }) => (
|
|
68
|
+
<SwiperItem>
|
|
69
69
|
<Card
|
|
70
|
-
index={
|
|
70
|
+
index={index}
|
|
71
71
|
style={{
|
|
72
72
|
height: `${ITEM_HEIGHT}px`,
|
|
73
73
|
}}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @lynx-example/lynx-ui-swiper
|
|
2
2
|
|
|
3
|
+
## 0.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix background syntax in web ([#163](https://github.com/lynx-family/lynx-ui/pull/163))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @lynx-js/lynx-ui@3.132.0
|
|
11
|
+
|
|
3
12
|
## 0.0.5
|
|
4
13
|
|
|
5
14
|
### 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
|
|
66
|
-
<SwiperItem
|
|
65
|
+
{({ index }) => (
|
|
66
|
+
<SwiperItem>
|
|
67
67
|
<Card
|
|
68
|
-
index={
|
|
68
|
+
index={index}
|
|
69
69
|
style={{
|
|
70
70
|
height: '250px',
|
|
71
71
|
}}
|
package/CustomScale/index.tsx
CHANGED
|
@@ -91,10 +91,10 @@ function SwiperEntry(): JSX.Element {
|
|
|
91
91
|
overflow: 'visible',
|
|
92
92
|
}}
|
|
93
93
|
>
|
|
94
|
-
{({ index
|
|
95
|
-
<SwiperItem
|
|
94
|
+
{({ index }) => (
|
|
95
|
+
<SwiperItem>
|
|
96
96
|
<Card
|
|
97
|
-
index={
|
|
97
|
+
index={index}
|
|
98
98
|
style={{
|
|
99
99
|
height: '250px',
|
|
100
100
|
}}
|
package/CustomTinder/index.tsx
CHANGED
package/CustomTinder/styles.css
CHANGED
|
@@ -53,12 +53,12 @@ function SwiperEntry(): JSX.Element {
|
|
|
53
53
|
alignItems: 'end',
|
|
54
54
|
}}
|
|
55
55
|
>
|
|
56
|
-
{({ index
|
|
57
|
-
<SwiperItem
|
|
56
|
+
{({ index }) => (
|
|
57
|
+
<SwiperItem>
|
|
58
58
|
<Card
|
|
59
|
-
index={
|
|
59
|
+
index={index}
|
|
60
60
|
style={{
|
|
61
|
-
height: `${itemHeights[
|
|
61
|
+
height: `${itemHeights[index % itemHeights.length]}px`,
|
|
62
62
|
}}
|
|
63
63
|
/>
|
|
64
64
|
</SwiperItem>
|
package/Direction/index.tsx
CHANGED
|
@@ -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
|
|
21
|
+
<SwiperItem>
|
|
24
22
|
<Card
|
|
25
|
-
index={
|
|
23
|
+
index={index}
|
|
26
24
|
style={{
|
|
27
25
|
height: '200px',
|
|
28
26
|
}}
|
package/EmptyDataBug/index.tsx
CHANGED
|
@@ -102,9 +102,9 @@ function EmptyDataWithAutoPlay(): JSX.Element {
|
|
|
102
102
|
autoPlayInterval={2000}
|
|
103
103
|
modeConfig={{ align: 'center' }}
|
|
104
104
|
>
|
|
105
|
-
{({ index
|
|
106
|
-
<SwiperItem
|
|
107
|
-
<Card index={
|
|
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
|
|
191
|
-
<SwiperItem
|
|
192
|
-
<Card index={
|
|
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
|
|
268
|
-
<SwiperItem
|
|
269
|
-
<Card index={
|
|
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
|
|
334
|
-
<SwiperItem
|
|
335
|
-
<Card index={
|
|
333
|
+
{({ index }) => (
|
|
334
|
+
<SwiperItem>
|
|
335
|
+
<Card index={index} style={{ height: '200px' }} />
|
|
336
336
|
</SwiperItem>
|
|
337
337
|
)}
|
|
338
338
|
</Swiper>
|
package/Indicator/index.tsx
CHANGED
|
@@ -48,10 +48,10 @@ function SwiperEntry() {
|
|
|
48
48
|
overflow: 'visible',
|
|
49
49
|
}}
|
|
50
50
|
>
|
|
51
|
-
{({ index
|
|
52
|
-
<SwiperItem
|
|
51
|
+
{({ index }) => (
|
|
52
|
+
<SwiperItem>
|
|
53
53
|
<Card
|
|
54
|
-
index={
|
|
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
|
|
55
|
-
<SwiperItem
|
|
54
|
+
{({ index }) => (
|
|
55
|
+
<SwiperItem>
|
|
56
56
|
<LazyComponent
|
|
57
57
|
scene='scene'
|
|
58
|
-
pid={`pid_${
|
|
58
|
+
pid={`pid_${index}`}
|
|
59
59
|
estimatedStyle={{ width: '100%', height: '100%' }}
|
|
60
60
|
>
|
|
61
61
|
<Card
|
|
62
|
-
index={
|
|
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
|
|
54
|
-
<SwiperItem
|
|
53
|
+
{({ index }) => (
|
|
54
|
+
<SwiperItem>
|
|
55
55
|
<Card
|
|
56
|
-
index={
|
|
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
|
|
70
|
-
<SwiperItem
|
|
69
|
+
{({ index }) => (
|
|
70
|
+
<SwiperItem>
|
|
71
71
|
<Card
|
|
72
|
-
index={
|
|
72
|
+
index={index}
|
|
73
73
|
style={{
|
|
74
74
|
height: '250px',
|
|
75
75
|
}}
|
package/RTLCustom/index.tsx
CHANGED
|
@@ -90,10 +90,10 @@ function SwiperEntry(): JSX.Element {
|
|
|
90
90
|
overflow: 'visible',
|
|
91
91
|
}}
|
|
92
92
|
>
|
|
93
|
-
{({ index
|
|
94
|
-
<SwiperItem
|
|
93
|
+
{({ index }) => (
|
|
94
|
+
<SwiperItem>
|
|
95
95
|
<Card
|
|
96
|
-
index={
|
|
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
|
|
53
|
-
<SwiperItem
|
|
52
|
+
{({ index }) => (
|
|
53
|
+
<SwiperItem>
|
|
54
54
|
<Card
|
|
55
|
-
index={
|
|
55
|
+
index={index}
|
|
56
56
|
style={{
|
|
57
57
|
height: '250px',
|
|
58
58
|
}}
|
package/RTLLoopLynxRTL/index.tsx
CHANGED
|
@@ -49,10 +49,10 @@ function SwiperEntry(): JSX.Element {
|
|
|
49
49
|
overflow: 'visible',
|
|
50
50
|
}}
|
|
51
51
|
>
|
|
52
|
-
{({ index
|
|
53
|
-
<SwiperItem
|
|
52
|
+
{({ index }) => (
|
|
53
|
+
<SwiperItem>
|
|
54
54
|
<Card
|
|
55
|
-
index={
|
|
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
|
|
53
|
-
<SwiperItem
|
|
52
|
+
{({ index }) => (
|
|
53
|
+
<SwiperItem>
|
|
54
54
|
<Card
|
|
55
|
-
index={
|
|
55
|
+
index={index}
|
|
56
56
|
style={{
|
|
57
57
|
height: '250px',
|
|
58
58
|
}}
|
|
Binary file
|