@amabeth/repeating-wheel-picker 1.1.0 → 1.2.1
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/LICENSE +20 -20
- package/README.md +57 -57
- package/example/index.ts +8 -0
- package/example/package.json +29 -0
- package/example/src/constants/styles.ts +43 -0
- package/example/src/hooks/useComponentHeight.ts +13 -0
- package/example/src/scenes/app.tsx +33 -0
- package/example/src/scenes/booleanPicker.tsx +60 -0
- package/example/src/scenes/customTypePicker.tsx +83 -0
- package/example/src/scenes/numberPicker.tsx +75 -0
- package/example/src/scenes/stringPicker.tsx +64 -0
- package/lib/module/index.js +6 -6
- package/lib/module/index.js.map +1 -1
- package/package.json +169 -183
- package/src/index.tsx +0 -507
package/LICENSE
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 amabeth
|
|
4
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
-
in the Software without restriction, including without limitation the rights
|
|
7
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
furnished to do so, subject to the following conditions:
|
|
10
|
-
|
|
11
|
-
The above copyright notice and this permission notice shall be included in all
|
|
12
|
-
copies or substantial portions of the Software.
|
|
13
|
-
|
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 amabeth
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
# Readme
|
|
2
|
-
|
|
3
|
-
A React Native wheel picker that allows endless scrolling through repeating content.
|
|
4
|
-
Supports custom types for picker data.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
npm install repeating-wheel-picker
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Usage
|
|
15
|
-
|
|
16
|
-
```tsx
|
|
17
|
-
import RepeatingWheelPicker, {
|
|
18
|
-
type RepeatingWheelPickerProps,
|
|
19
|
-
} from "repeating-wheel-picker";
|
|
20
|
-
|
|
21
|
-
// ...
|
|
22
|
-
const [, setSelected] = useState<string>();
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<RepeatingWheelPicker<string>
|
|
26
|
-
setSelected={setSelected}
|
|
27
|
-
initialIndex={0}
|
|
28
|
-
data={["first", "second", "third"]}
|
|
29
|
-
/>
|
|
30
|
-
);
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## Example
|
|
35
|
-
|
|
36
|
-
 
|
|
37
|
-
|
|
38
|
-
 
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
## Contributing
|
|
42
|
-
|
|
43
|
-
Contributions are currently not intended.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## License
|
|
47
|
-
|
|
48
|
-
[MIT](LICENSE)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## [Changelog](CHANGELOG.md)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
## [Impressum / Imprint](https://amabeth.github.io/#imprint)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
---
|
|
1
|
+
# Readme
|
|
2
|
+
|
|
3
|
+
A React Native wheel picker that allows endless scrolling through repeating content.
|
|
4
|
+
Supports custom types for picker data.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @amabeth/repeating-wheel-picker
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import RepeatingWheelPicker, {
|
|
18
|
+
type RepeatingWheelPickerProps,
|
|
19
|
+
} from "@amabeth/repeating-wheel-picker";
|
|
20
|
+
|
|
21
|
+
// ...
|
|
22
|
+
const [, setSelected] = useState<string>();
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<RepeatingWheelPicker<string>
|
|
26
|
+
setSelected={setSelected}
|
|
27
|
+
initialIndex={0}
|
|
28
|
+
data={["first", "second", "third"]}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Example
|
|
35
|
+
|
|
36
|
+
 
|
|
37
|
+
|
|
38
|
+
 
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Contributing
|
|
42
|
+
|
|
43
|
+
Contributions are currently not intended.
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
[MIT](LICENSE)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## [Changelog](CHANGELOG.md)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## [Impressum / Imprint](https://amabeth.github.io/#imprint)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
---
|
package/example/index.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { registerRootComponent } from "expo";
|
|
2
|
+
|
|
3
|
+
import App from "./src/scenes/app";
|
|
4
|
+
|
|
5
|
+
// registerRootComponent calls AppRegistry.registerComponent("main", () => App);
|
|
6
|
+
// It also ensures that whether you load the app in Expo Go or in a native build,
|
|
7
|
+
// the environment is set up appropriately
|
|
8
|
+
registerRootComponent(App);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "repeating-wheel-picker-example",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"main": "index.ts",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"start": "expo start",
|
|
7
|
+
"android": "expo start --android",
|
|
8
|
+
"ios": "expo start --ios",
|
|
9
|
+
"web": "expo start --web",
|
|
10
|
+
"resolve": "tsc --traceResolution"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@expo/metro-runtime": "~5.0.4",
|
|
14
|
+
"expo": "53.0.18",
|
|
15
|
+
"expo-status-bar": "~2.2.3",
|
|
16
|
+
"react": "19.0.0",
|
|
17
|
+
"react-dom": "19.0.0",
|
|
18
|
+
"react-native": "0.79.5",
|
|
19
|
+
"react-native-web": "~0.20.0",
|
|
20
|
+
"zustand": "^5.0.6"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@babel/core": "^7.28.0",
|
|
24
|
+
"react-native-builder-bob": "^0.40.12",
|
|
25
|
+
"react-native-monorepo-config": "^0.1.9",
|
|
26
|
+
"typedoc": "^0.28.7"
|
|
27
|
+
},
|
|
28
|
+
"private": true
|
|
29
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
|
|
3
|
+
export const Colors = {
|
|
4
|
+
container: "#0F1417",
|
|
5
|
+
tile: "#0F1417",
|
|
6
|
+
outline: "#303036",
|
|
7
|
+
highlight: "#34343A",
|
|
8
|
+
text: "#E4E1E9"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const styles = StyleSheet.create({
|
|
12
|
+
container: {
|
|
13
|
+
backgroundColor: Colors.container,
|
|
14
|
+
padding: 5,
|
|
15
|
+
},
|
|
16
|
+
tile: {
|
|
17
|
+
backgroundColor: Colors.tile,
|
|
18
|
+
paddingHorizontal: 15,
|
|
19
|
+
paddingVertical: 10,
|
|
20
|
+
|
|
21
|
+
borderRadius: 20,
|
|
22
|
+
borderWidth: 1,
|
|
23
|
+
borderColor: Colors.outline
|
|
24
|
+
},
|
|
25
|
+
pickerContainer: {
|
|
26
|
+
backgroundColor: "transparent",
|
|
27
|
+
paddingVertical: 15,
|
|
28
|
+
},
|
|
29
|
+
title: {
|
|
30
|
+
color: Colors.text,
|
|
31
|
+
fontSize: 20
|
|
32
|
+
},
|
|
33
|
+
subtitle: {
|
|
34
|
+
color: Colors.text,
|
|
35
|
+
fontSize: 18
|
|
36
|
+
},
|
|
37
|
+
text: {
|
|
38
|
+
color: Colors.text,
|
|
39
|
+
fontSize: 16
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export default styles;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useCallback, useState } from "react";
|
|
2
|
+
import type { LayoutChangeEvent } from "react-native";
|
|
3
|
+
|
|
4
|
+
export default function useComponentHeight(): [height: number, onLayout: (event: LayoutChangeEvent) => void] {
|
|
5
|
+
const [height, setHeight] = useState<number>(0);
|
|
6
|
+
|
|
7
|
+
const onLayout = useCallback((event: LayoutChangeEvent) => {
|
|
8
|
+
const { height } = event.nativeEvent.layout;
|
|
9
|
+
setHeight(height);
|
|
10
|
+
}, []);
|
|
11
|
+
|
|
12
|
+
return [height, onLayout];
|
|
13
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { View, type ViewStyle } from "react-native";
|
|
2
|
+
import StringPicker from "./stringPicker";
|
|
3
|
+
import CustomTypePicker from "./customTypePicker";
|
|
4
|
+
import NumberPicker from './numberPicker';
|
|
5
|
+
import styles from "../constants/styles";
|
|
6
|
+
import BooleanPicker from "./booleanPicker";
|
|
7
|
+
|
|
8
|
+
export default function App() {
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<View style={appStyle}>
|
|
12
|
+
<StringPicker/>
|
|
13
|
+
<View style={separatorStyle}></View>
|
|
14
|
+
<CustomTypePicker/>
|
|
15
|
+
<View style={separatorStyle}></View>
|
|
16
|
+
<NumberPicker/>
|
|
17
|
+
<View style={separatorStyle}></View>
|
|
18
|
+
<BooleanPicker/>
|
|
19
|
+
</View>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const appStyle: ViewStyle = {
|
|
24
|
+
...styles.container,
|
|
25
|
+
flex: 1,
|
|
26
|
+
paddingHorizontal: 15,
|
|
27
|
+
paddingTop: 50,
|
|
28
|
+
paddingBottom: 15
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const separatorStyle: ViewStyle = {
|
|
32
|
+
height: 15
|
|
33
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Text, type TextStyle, View, type ViewStyle } from "react-native";
|
|
2
|
+
import { useMemo, useState } from "react";
|
|
3
|
+
import { RepeatingWheelPicker,
|
|
4
|
+
type RepeatingWheelPickerProps,
|
|
5
|
+
} from "@amabeth/repeating-wheel-picker";
|
|
6
|
+
import styles, { Colors } from "../constants/styles";
|
|
7
|
+
|
|
8
|
+
export default function BooleanPicker() {
|
|
9
|
+
const [, setSelected] = useState<boolean>();
|
|
10
|
+
const data: boolean[] = [true, false];
|
|
11
|
+
|
|
12
|
+
const exampleProps = useMemo((): RepeatingWheelPickerProps<boolean> => ({
|
|
13
|
+
// mandatory
|
|
14
|
+
setSelected: setSelected,
|
|
15
|
+
initialIndex: 0,
|
|
16
|
+
data: data,
|
|
17
|
+
|
|
18
|
+
// optional
|
|
19
|
+
getLabel: (b: boolean) => b ? "Yes" : "No",
|
|
20
|
+
itemDisplayCount: 2,
|
|
21
|
+
|
|
22
|
+
containerVerticalPadding: 5,
|
|
23
|
+
containerHorizontalPadding: 20,
|
|
24
|
+
containerStyle: pickerContainerStyle
|
|
25
|
+
}), []);
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<View style={tileStyle}>
|
|
29
|
+
<View style={rowStyle}>
|
|
30
|
+
<Text style={titleStyle}>Boolean picker:</Text>
|
|
31
|
+
<RepeatingWheelPicker<boolean> {...exampleProps} />
|
|
32
|
+
</View>
|
|
33
|
+
</View>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const tileStyle: ViewStyle = {
|
|
38
|
+
...styles.tile,
|
|
39
|
+
borderWidth: 0
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const rowStyle: ViewStyle = {
|
|
43
|
+
flexDirection: "row",
|
|
44
|
+
justifyContent: "flex-start",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const titleStyle: TextStyle = {
|
|
49
|
+
...styles.title,
|
|
50
|
+
marginRight: 20
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const pickerContainerStyle: ViewStyle = {
|
|
54
|
+
...styles.pickerContainer,
|
|
55
|
+
|
|
56
|
+
borderRadius: 30,
|
|
57
|
+
borderWidth: 1,
|
|
58
|
+
borderColor: "white",
|
|
59
|
+
backgroundColor: Colors.highlight
|
|
60
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Text, type TextStyle, TouchableOpacity, View, type ViewStyle } from "react-native";
|
|
2
|
+
import { useMemo, useState } from "react";
|
|
3
|
+
import { RepeatingWheelPicker,
|
|
4
|
+
type RepeatingWheelPickerProps,
|
|
5
|
+
} from "@amabeth/repeating-wheel-picker";
|
|
6
|
+
import styles, { Colors } from "../constants/styles";
|
|
7
|
+
|
|
8
|
+
export default function CustomTypePicker() {
|
|
9
|
+
const [pickerEnabled, setPickerEnabled] = useState(false);
|
|
10
|
+
const [, setSelected] = useState<FoodItem>();
|
|
11
|
+
const data: FoodItem[] = [
|
|
12
|
+
{
|
|
13
|
+
name: "Bread",
|
|
14
|
+
price: 1.23,
|
|
15
|
+
brand: "Best Bakery"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "Milk",
|
|
19
|
+
price: 1.43,
|
|
20
|
+
brand: "CowWow"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "Apple",
|
|
24
|
+
price: 0.40,
|
|
25
|
+
brand: "Fruit Brand"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "Ice cream",
|
|
29
|
+
price: 4.99,
|
|
30
|
+
brand: "ColdIce"
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
const exampleProps = useMemo((): RepeatingWheelPickerProps<FoodItem> => ({
|
|
35
|
+
// mandatory
|
|
36
|
+
setSelected: setSelected,
|
|
37
|
+
initialIndex: 0,
|
|
38
|
+
data: data,
|
|
39
|
+
|
|
40
|
+
// optional
|
|
41
|
+
getLabel: (f: FoodItem) => `${f.name} (${f.price}€)`,
|
|
42
|
+
enabled: pickerEnabled,
|
|
43
|
+
itemDisplayCount: 3,
|
|
44
|
+
|
|
45
|
+
containerVerticalPadding: 5,
|
|
46
|
+
containerStyle: styles.pickerContainer,
|
|
47
|
+
gradientFadeColor: Colors.tile
|
|
48
|
+
}), [pickerEnabled]);
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<View style={styles.tile}>
|
|
52
|
+
<View style={rowStyle}>
|
|
53
|
+
<Text style={styles.title}>Custom type picker:</Text>
|
|
54
|
+
<View style={{flex: 1}}/>
|
|
55
|
+
<TouchableOpacity onPress={() => setPickerEnabled(!pickerEnabled)} style={buttonStyle}>
|
|
56
|
+
<Text style={styles.subtitle}>{pickerEnabled ? "disable" : "enable"}</Text>
|
|
57
|
+
</TouchableOpacity>
|
|
58
|
+
</View>
|
|
59
|
+
<RepeatingWheelPicker {...exampleProps} />
|
|
60
|
+
</View>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const rowStyle: ViewStyle = {
|
|
65
|
+
flexDirection: "row",
|
|
66
|
+
alignItems: "center"
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const buttonStyle: TextStyle = {
|
|
70
|
+
margin: 10,
|
|
71
|
+
paddingVertical: 5,
|
|
72
|
+
paddingHorizontal: 10,
|
|
73
|
+
backgroundColor: "transparent",
|
|
74
|
+
borderWidth: 0.7,
|
|
75
|
+
borderColor: Colors.text,
|
|
76
|
+
borderRadius: 15
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
type FoodItem = {
|
|
80
|
+
name: string,
|
|
81
|
+
price: number,
|
|
82
|
+
brand: string
|
|
83
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Text, type TextStyle, View, type ViewStyle } from "react-native";
|
|
2
|
+
import { useMemo, useState } from "react";
|
|
3
|
+
import { RepeatingWheelPicker,
|
|
4
|
+
type RepeatingWheelPickerProps,
|
|
5
|
+
} from "@amabeth/repeating-wheel-picker";
|
|
6
|
+
import styles, { Colors } from "../constants/styles";
|
|
7
|
+
import useComponentHeight from "../hooks/useComponentHeight";
|
|
8
|
+
|
|
9
|
+
export default function NumberPicker() {
|
|
10
|
+
const [selected, setSelected] = useState<number>();
|
|
11
|
+
const data: number[] = Array.from({length: 123}, (_, i) => i);
|
|
12
|
+
const [height, onLayout] = useComponentHeight();
|
|
13
|
+
|
|
14
|
+
const exampleProps = useMemo((): RepeatingWheelPickerProps<number> => ({
|
|
15
|
+
// mandatory
|
|
16
|
+
setSelected: setSelected,
|
|
17
|
+
initialIndex: 30,
|
|
18
|
+
data: data,
|
|
19
|
+
|
|
20
|
+
// optional
|
|
21
|
+
itemDisplayCount: 5,
|
|
22
|
+
|
|
23
|
+
containerOnLayout: onLayout,
|
|
24
|
+
|
|
25
|
+
containerStyle: rightColumnStyle,
|
|
26
|
+
itemTextStyle: pickerItemTextStyle,
|
|
27
|
+
gradientFadeColor: Colors.tile
|
|
28
|
+
}), [onLayout]);
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<View style={styles.tile}>
|
|
32
|
+
<View style={rowStyle}>
|
|
33
|
+
<View style={leftColumnStyle(height)}>
|
|
34
|
+
<Text style={styles.subtitle}>Number picker: </Text>
|
|
35
|
+
</View>
|
|
36
|
+
<RepeatingWheelPicker<number> {...exampleProps} />
|
|
37
|
+
</View>
|
|
38
|
+
<Text style={selectedStyle}>Selected: {selected}</Text>
|
|
39
|
+
</View>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const rowStyle: ViewStyle = {
|
|
44
|
+
flexDirection: "row",
|
|
45
|
+
justifyContent: "center"
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const columnStyle: ViewStyle = {
|
|
49
|
+
...rowStyle,
|
|
50
|
+
width: "50%",
|
|
51
|
+
marginHorizontal: 3
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const leftColumnStyle = (height: number): ViewStyle => ({
|
|
55
|
+
...columnStyle,
|
|
56
|
+
height: height,
|
|
57
|
+
justifyContent: "flex-end",
|
|
58
|
+
alignItems: "center"
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const rightColumnStyle: ViewStyle = {
|
|
62
|
+
...styles.pickerContainer,
|
|
63
|
+
...columnStyle
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const pickerItemTextStyle: TextStyle = {
|
|
67
|
+
...styles.text,
|
|
68
|
+
textAlign: "left"
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const selectedStyle: TextStyle ={
|
|
72
|
+
...styles.text,
|
|
73
|
+
fontStyle: "italic",
|
|
74
|
+
textAlign: "right"
|
|
75
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Text, type TextStyle, View, type ViewStyle } from "react-native";
|
|
2
|
+
import { useMemo, useState } from "react";
|
|
3
|
+
import { RepeatingWheelPicker,
|
|
4
|
+
type RepeatingWheelPickerProps,
|
|
5
|
+
} from "@amabeth/repeating-wheel-picker";
|
|
6
|
+
import styles, { Colors } from "../constants/styles";
|
|
7
|
+
|
|
8
|
+
export default function StringPicker() {
|
|
9
|
+
const [favoriteWord, setFavoriteWord] = useState<string>();
|
|
10
|
+
const data: string[] = ["art", "bus", "cache", "dart", "end", "fun", "grass", "hug"];
|
|
11
|
+
|
|
12
|
+
const exampleProps = useMemo((): RepeatingWheelPickerProps<string> => ({
|
|
13
|
+
// mandatory
|
|
14
|
+
setSelected: setFavoriteWord,
|
|
15
|
+
initialIndex: 7,
|
|
16
|
+
data: data,
|
|
17
|
+
|
|
18
|
+
// optional
|
|
19
|
+
itemDisplayCount: 6,
|
|
20
|
+
itemHeight: 25,
|
|
21
|
+
|
|
22
|
+
containerStyle: pickerContainerStyle,
|
|
23
|
+
|
|
24
|
+
gradientFadeColor: Colors.tile
|
|
25
|
+
}), []);
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<View style={tileStyle}>
|
|
29
|
+
<View style={rowStyle}>
|
|
30
|
+
<Text style={titleStyle}>String picker:</Text>
|
|
31
|
+
<RepeatingWheelPicker<string> {...exampleProps} />
|
|
32
|
+
</View>
|
|
33
|
+
<Text style={selectedStyle}>Selected: {favoriteWord}</Text>
|
|
34
|
+
</View>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const tileStyle: ViewStyle = {
|
|
39
|
+
...styles.tile,
|
|
40
|
+
paddingVertical: 0,
|
|
41
|
+
paddingBottom: 10
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const rowStyle: ViewStyle = {
|
|
45
|
+
flexDirection: "row",
|
|
46
|
+
alignItems: "center"
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const titleStyle: TextStyle ={
|
|
50
|
+
...styles.title,
|
|
51
|
+
flex: 1,
|
|
52
|
+
textAlign: "left"
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const pickerContainerStyle: ViewStyle = {
|
|
56
|
+
...styles.pickerContainer,
|
|
57
|
+
flex: 1
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const selectedStyle: TextStyle ={
|
|
61
|
+
...styles.text,
|
|
62
|
+
fontStyle: "italic",
|
|
63
|
+
textAlign: "right"
|
|
64
|
+
}
|
package/lib/module/index.js
CHANGED
|
@@ -4,10 +4,10 @@ import { useEffect, useMemo, useRef, useState } from "react";
|
|
|
4
4
|
import { Text, View, VirtualizedList } from "react-native";
|
|
5
5
|
import { LinearGradient } from "expo-linear-gradient";
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* Provides a wheel picker with repeating data that can be infinitely scrolled.
|
|
9
|
-
*
|
|
10
|
-
* @param properties configuration of the wheel picker
|
|
7
|
+
/**
|
|
8
|
+
* Provides a wheel picker with repeating data that can be infinitely scrolled.
|
|
9
|
+
*
|
|
10
|
+
* @param properties configuration of the wheel picker
|
|
11
11
|
*/
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
export function RepeatingWheelPicker(properties) {
|
|
@@ -229,7 +229,7 @@ function InvalidPropertiesError(propertyName, propertyValue, violatedConstraint)
|
|
|
229
229
|
return Error(`Value "${propertyValue}" is invalid for property "${propertyName}": ${violatedConstraint}`);
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
/**
|
|
233
|
-
*
|
|
232
|
+
/**
|
|
233
|
+
*
|
|
234
234
|
*/
|
|
235
235
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useMemo","useRef","useState","Text","View","VirtualizedList","LinearGradient","jsx","_jsx","jsxs","_jsxs","RepeatingWheelPicker","properties","props","withDefaults","dataMultiplier","Math","max","round","data","length","indexDiffTopToCentered","floor","itemDisplayCount","offsets","getOffsets","itemHeight","containerVerticalPadding","current","setCurrent","initialIndex","listRef","selectedElement","undefined","setSelected","onLayout","containerOnLayout","style","containerStyle","height","children","ref","scrollEnabled","enabled","getItemCount","initialScrollIndex","initialNumToRender","windowSize","renderItem","item","index","Item","getItem","_","getItemLayout","offset","keyExtractor","decelerationRate","snapToOffsets","onMomentumScrollEnd","event","nativeEvent","contentOffset","y","showsVerticalScrollIndicator","flex","width","borderRadius","paddingVertical","paddingHorizontal","containerHorizontalPadding","enableGradient","backgroundColor","position","FrontGradient","gradientFadeColor","justifyContent","alignContent","itemContainerStyle","textAlign","itemTextStyle","getLabel","colors","dataLength","i","itemOffset","verticalPadding","innerOffset","currentTopIndex","currentSection","targetSection","targetTopIndex","targetOffset","scrollToOffset","animated","defaultBackgroundColor","defaultTextColor","defaultTextSize","validateProps","t","fontSize","padding","paddingTop","paddingBottom","paddingLeft","paddingRight","color","InvalidPropertiesError","String","Number","isInteger","propertyName","propertyValue","violatedConstraint","Error"],"sourceRoot":"
|
|
1
|
+
{"version":3,"names":["useEffect","useMemo","useRef","useState","Text","View","VirtualizedList","LinearGradient","jsx","_jsx","jsxs","_jsxs","RepeatingWheelPicker","properties","props","withDefaults","dataMultiplier","Math","max","round","data","length","indexDiffTopToCentered","floor","itemDisplayCount","offsets","getOffsets","itemHeight","containerVerticalPadding","current","setCurrent","initialIndex","listRef","selectedElement","undefined","setSelected","onLayout","containerOnLayout","style","containerStyle","height","children","ref","scrollEnabled","enabled","getItemCount","initialScrollIndex","initialNumToRender","windowSize","renderItem","item","index","Item","getItem","_","getItemLayout","offset","keyExtractor","decelerationRate","snapToOffsets","onMomentumScrollEnd","event","nativeEvent","contentOffset","y","showsVerticalScrollIndicator","flex","width","borderRadius","paddingVertical","paddingHorizontal","containerHorizontalPadding","enableGradient","backgroundColor","position","FrontGradient","gradientFadeColor","justifyContent","alignContent","itemContainerStyle","textAlign","itemTextStyle","getLabel","colors","dataLength","i","itemOffset","verticalPadding","innerOffset","currentTopIndex","currentSection","targetSection","targetTopIndex","targetOffset","scrollToOffset","animated","defaultBackgroundColor","defaultTextColor","defaultTextSize","validateProps","t","fontSize","padding","paddingTop","paddingBottom","paddingLeft","paddingRight","color","InvalidPropertiesError","String","Number","isInteger","propertyName","propertyValue","violatedConstraint","Error"],"sourceRoot":"..\\..\\src","sources":["index.tsx"],"mappings":";;AAAA,SAAyBA,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC5E,SAIEC,IAAI,EAEJC,IAAI,EAEJC,eAAe,QACV,cAAc;AACrB,SAASC,cAAc,QAAQ,sBAAsB;;AAErD;AACA;AACA;AACA;AACA;AAJA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAKA,OAAO,SAASC,oBAAoBA,CAClCC,UAAwC,EACxC;EACA;EACA,MAAMC,KAAK,GAAGb,OAAO,CAAC,MAAMc,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