@lynx-example/lynx-ui-scroll-view 0.0.15 → 0.0.17
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.css +2 -47
- package/Basic/index.tsx +7 -2
- package/Bounces/index.css +36 -0
- package/Bounces/index.tsx +61 -0
- package/BouncesRTL/index.css +41 -0
- package/BouncesRTL/index.tsx +63 -0
- package/CHANGELOG.md +19 -0
- package/NativeUseBounces/index.css +136 -0
- package/NativeUseBounces/index.tsx +155 -0
- package/ScrollBy/index.css +19 -11
- package/ScrollBy/index.tsx +16 -10
- package/ZIndex/data.ts +47 -0
- package/ZIndex/index.css +39 -9
- package/ZIndex/index.tsx +14 -16
- package/dist/ScrollViewBasic.lynx.bundle +0 -0
- package/dist/ScrollViewBounces.lynx.bundle +0 -0
- package/dist/ScrollViewBouncesRTL.lynx.bundle +0 -0
- package/dist/ScrollViewInnerFlex.lynx.bundle +0 -0
- package/dist/ScrollViewNativeUseBounces.lynx.bundle +0 -0
- package/dist/ScrollViewScrollBy.lynx.bundle +0 -0
- package/dist/ScrollViewZIndex.lynx.bundle +0 -0
- package/lynx.config.mjs +3 -2
- package/package.json +4 -3
- package/shared/BounceTag/index.css +37 -0
- package/shared/BounceTag/index.tsx +27 -0
- package/shared/CircleCard/index.css +7 -0
- package/shared/CircleCard/index.tsx +35 -0
- package/{HorizontalRTL/index.css → shared/base.css} +2 -54
- package/Basic/CircleLetterCard.tsx +0 -23
- package/Horizontal/index.css +0 -110
- package/Horizontal/index.tsx +0 -75
- package/HorizontalRTL/index.tsx +0 -76
- package/dist/ScrollViewHorizontal.lynx.bundle +0 -0
- package/dist/ScrollViewHorizontalRTL.lynx.bundle +0 -0
package/HorizontalRTL/index.tsx
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 The Lynx Authors. All rights reserved.
|
|
2
|
-
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
-
// LICENSE file in the root directory of this source tree.
|
|
4
|
-
|
|
5
|
-
import { root } from '@lynx-js/react'
|
|
6
|
-
|
|
7
|
-
import { ScrollView } from '@lynx-js/lynx-ui'
|
|
8
|
-
|
|
9
|
-
import './index.css'
|
|
10
|
-
|
|
11
|
-
const LETTERS = [
|
|
12
|
-
'L',
|
|
13
|
-
'Y',
|
|
14
|
-
'N',
|
|
15
|
-
'X',
|
|
16
|
-
'R',
|
|
17
|
-
'T',
|
|
18
|
-
'L',
|
|
19
|
-
'B',
|
|
20
|
-
'O',
|
|
21
|
-
'U',
|
|
22
|
-
'N',
|
|
23
|
-
'C',
|
|
24
|
-
'E',
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
function BounceTag(props: { label: string }) {
|
|
28
|
-
const { label } = props
|
|
29
|
-
const lines = label.split(' ')
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<view className='bounce-slot'>
|
|
33
|
-
<view className='bounce-slot__text'>
|
|
34
|
-
{lines.map((line, index) => (
|
|
35
|
-
<text className='bounce-slot__line' key={`${line}-${index}`}>
|
|
36
|
-
{line}
|
|
37
|
-
</text>
|
|
38
|
-
))}
|
|
39
|
-
</view>
|
|
40
|
-
</view>
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function App() {
|
|
45
|
-
return (
|
|
46
|
-
<view className='demo-container lunaris-dark rtl-scope'>
|
|
47
|
-
<ScrollView
|
|
48
|
-
scrollOrientation='horizontal'
|
|
49
|
-
enableRTL={true}
|
|
50
|
-
className='scroll-view'
|
|
51
|
-
bounceableOptions={{
|
|
52
|
-
enableBounces: true,
|
|
53
|
-
alwaysBouncing: true,
|
|
54
|
-
upperBounceItem: <BounceTag label='Start Bounce' />,
|
|
55
|
-
lowerBounceItem: <BounceTag label='End Bounce' />,
|
|
56
|
-
}}
|
|
57
|
-
>
|
|
58
|
-
<view className='scroll-view-content'>
|
|
59
|
-
{LETTERS.map((letter, index) => (
|
|
60
|
-
<view className='card' key={`${letter}-${index}`}>
|
|
61
|
-
<view className='circle'>
|
|
62
|
-
<text className='letter'>{letter}</text>
|
|
63
|
-
<text className='title'>ScrollView RTL</text>
|
|
64
|
-
<text className='subtitle'>direction: rtl + useBounce</text>
|
|
65
|
-
</view>
|
|
66
|
-
</view>
|
|
67
|
-
))}
|
|
68
|
-
</view>
|
|
69
|
-
</ScrollView>
|
|
70
|
-
</view>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
root.render(<App />)
|
|
75
|
-
|
|
76
|
-
export default App
|
|
Binary file
|
|
Binary file
|