react-native-timer-picker 2.5.0 → 2.6.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/README.md +22 -13
- package/dist/commonjs/components/DurationScroll/DurationScroll.js +39 -18
- package/dist/commonjs/components/DurationScroll/DurationScroll.js.map +1 -1
- package/dist/commonjs/components/DurationScroll/types.js.map +1 -1
- package/dist/commonjs/components/Modal/Modal.js +10 -10
- package/dist/commonjs/components/Modal/Modal.js.map +1 -1
- package/dist/commonjs/components/Modal/styles.js +5 -5
- package/dist/commonjs/components/Modal/styles.js.map +1 -1
- package/dist/commonjs/components/Modal/types.js.map +1 -1
- package/dist/commonjs/components/PickerItem/PickerItem.js +2 -1
- package/dist/commonjs/components/PickerItem/PickerItem.js.map +1 -1
- package/dist/commonjs/components/TimerPicker/TimerPicker.js +47 -21
- package/dist/commonjs/components/TimerPicker/TimerPicker.js.map +1 -1
- package/dist/commonjs/components/TimerPicker/index.js.map +1 -1
- package/dist/commonjs/components/TimerPicker/styles.js +79 -69
- package/dist/commonjs/components/TimerPicker/styles.js.map +1 -1
- package/dist/commonjs/components/TimerPicker/types.js.map +1 -1
- package/dist/commonjs/components/TimerPickerModal/TimerPickerModal.js +34 -14
- package/dist/commonjs/components/TimerPickerModal/TimerPickerModal.js.map +1 -1
- package/dist/commonjs/components/TimerPickerModal/styles.js +34 -28
- package/dist/commonjs/components/TimerPickerModal/styles.js.map +1 -1
- package/dist/commonjs/components/TimerPickerModal/types.js.map +1 -1
- package/dist/commonjs/index.js +3 -39
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/tests/DurationScroll.test.js +8 -8
- package/dist/commonjs/tests/DurationScroll.test.js.map +1 -1
- package/dist/commonjs/tests/Modal.test.js.map +1 -1
- package/dist/commonjs/tests/TimerPicker.test.js +1 -9
- package/dist/commonjs/tests/TimerPicker.test.js.map +1 -1
- package/dist/commonjs/tests/TimerPickerModal.test.js +3 -3
- package/dist/commonjs/tests/TimerPickerModal.test.js.map +1 -1
- package/dist/commonjs/tests/colorToRgba.test.js.map +1 -1
- package/dist/commonjs/tests/generateNumbers.test.js +63 -63
- package/dist/commonjs/tests/generateNumbers.test.js.map +1 -1
- package/dist/commonjs/tests/getAdjustedLimit.test.js +38 -38
- package/dist/commonjs/tests/getAdjustedLimit.test.js.map +1 -1
- package/dist/commonjs/tests/getDurationAndIndexFromScrollOffset.test.js.map +1 -1
- package/dist/commonjs/tests/getInitialScrollIndex.test.js.map +1 -1
- package/dist/commonjs/tests/getSafeInitialValue.test.js +2 -0
- package/dist/commonjs/tests/getSafeInitialValue.test.js.map +1 -1
- package/dist/commonjs/tests/padNumber.test.js.map +1 -1
- package/dist/commonjs/utils/colorToRgba.js +4 -4
- package/dist/commonjs/utils/colorToRgba.js.map +1 -1
- package/dist/commonjs/utils/generateNumbers.js.map +1 -1
- package/dist/commonjs/utils/getAdjustedLimit.js.map +1 -1
- package/dist/commonjs/utils/getDurationAndIndexFromScrollOffset.js.map +1 -1
- package/dist/commonjs/utils/getInitialScrollIndex.js +4 -4
- package/dist/commonjs/utils/getInitialScrollIndex.js.map +1 -1
- package/dist/commonjs/utils/getSafeInitialValue.js +5 -5
- package/dist/commonjs/utils/getSafeInitialValue.js.map +1 -1
- package/dist/commonjs/utils/padNumber.js.map +1 -1
- package/dist/module/components/DurationScroll/DurationScroll.js +39 -18
- package/dist/module/components/DurationScroll/DurationScroll.js.map +1 -1
- package/dist/module/components/DurationScroll/types.js.map +1 -1
- package/dist/module/components/Modal/Modal.js +10 -10
- package/dist/module/components/Modal/Modal.js.map +1 -1
- package/dist/module/components/Modal/styles.js +5 -5
- package/dist/module/components/Modal/styles.js.map +1 -1
- package/dist/module/components/Modal/types.js.map +1 -1
- package/dist/module/components/PickerItem/PickerItem.js +2 -1
- package/dist/module/components/PickerItem/PickerItem.js.map +1 -1
- package/dist/module/components/TimerPicker/TimerPicker.js +47 -21
- package/dist/module/components/TimerPicker/TimerPicker.js.map +1 -1
- package/dist/module/components/TimerPicker/index.js.map +1 -1
- package/dist/module/components/TimerPicker/styles.js +79 -69
- package/dist/module/components/TimerPicker/styles.js.map +1 -1
- package/dist/module/components/TimerPicker/types.js.map +1 -1
- package/dist/module/components/TimerPickerModal/TimerPickerModal.js +35 -15
- package/dist/module/components/TimerPickerModal/TimerPickerModal.js.map +1 -1
- package/dist/module/components/TimerPickerModal/styles.js +33 -27
- package/dist/module/components/TimerPickerModal/styles.js.map +1 -1
- package/dist/module/components/TimerPickerModal/types.js.map +1 -1
- package/dist/module/index.js +2 -2
- package/dist/module/index.js.map +1 -1
- package/dist/module/tests/DurationScroll.test.js +8 -8
- package/dist/module/tests/DurationScroll.test.js.map +1 -1
- package/dist/module/tests/Modal.test.js.map +1 -1
- package/dist/module/tests/TimerPicker.test.js +1 -8
- package/dist/module/tests/TimerPicker.test.js.map +1 -1
- package/dist/module/tests/TimerPickerModal.test.js +3 -3
- package/dist/module/tests/TimerPickerModal.test.js.map +1 -1
- package/dist/module/tests/colorToRgba.test.js.map +1 -1
- package/dist/module/tests/generateNumbers.test.js +63 -63
- package/dist/module/tests/generateNumbers.test.js.map +1 -1
- package/dist/module/tests/getAdjustedLimit.test.js +38 -38
- package/dist/module/tests/getAdjustedLimit.test.js.map +1 -1
- package/dist/module/tests/getDurationAndIndexFromScrollOffset.test.js.map +1 -1
- package/dist/module/tests/getInitialScrollIndex.test.js.map +1 -1
- package/dist/module/tests/getSafeInitialValue.test.js +1 -0
- package/dist/module/tests/getSafeInitialValue.test.js.map +1 -1
- package/dist/module/tests/padNumber.test.js.map +1 -1
- package/dist/module/utils/colorToRgba.js +4 -4
- package/dist/module/utils/colorToRgba.js.map +1 -1
- package/dist/module/utils/generateNumbers.js.map +1 -1
- package/dist/module/utils/getAdjustedLimit.js.map +1 -1
- package/dist/module/utils/getDurationAndIndexFromScrollOffset.js.map +1 -1
- package/dist/module/utils/getInitialScrollIndex.js +4 -4
- package/dist/module/utils/getInitialScrollIndex.js.map +1 -1
- package/dist/module/utils/getSafeInitialValue.js +5 -5
- package/dist/module/utils/getSafeInitialValue.js.map +1 -1
- package/dist/module/utils/padNumber.js.map +1 -1
- package/dist/typescript/components/DurationScroll/types.d.ts +9 -6
- package/dist/typescript/components/Modal/styles.d.ts +5 -5
- package/dist/typescript/components/Modal/types.d.ts +2 -1
- package/dist/typescript/components/PickerItem/PickerItem.d.ts +4 -0
- package/dist/typescript/components/TimerPicker/styles.d.ts +230 -225
- package/dist/typescript/components/TimerPicker/types.d.ts +9 -8
- package/dist/typescript/components/TimerPickerModal/styles.d.ts +158 -154
- package/dist/typescript/components/TimerPickerModal/types.d.ts +2 -1
- package/dist/typescript/index.d.ts +4 -2
- package/dist/typescript/tests/DurationScroll.test.d.ts +1 -0
- package/dist/typescript/tests/Modal.test.d.ts +1 -0
- package/dist/typescript/tests/TimerPicker.test.d.ts +1 -0
- package/dist/typescript/tests/TimerPickerModal.test.d.ts +1 -0
- package/dist/typescript/tests/colorToRgba.test.d.ts +1 -0
- package/dist/typescript/tests/generateNumbers.test.d.ts +1 -0
- package/dist/typescript/tests/getAdjustedLimit.test.d.ts +1 -0
- package/dist/typescript/tests/getDurationAndIndexFromScrollOffset.test.d.ts +1 -0
- package/dist/typescript/tests/getInitialScrollIndex.test.d.ts +1 -0
- package/dist/typescript/tests/getSafeInitialValue.test.d.ts +1 -0
- package/dist/typescript/tests/padNumber.test.d.ts +1 -0
- package/package.json +144 -126
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { type RefObject, type ReactElement } from "react";
|
|
2
3
|
import type { View, TouchableOpacity, Text } from "react-native";
|
|
3
4
|
import type Modal from "../Modal";
|
|
4
5
|
import type { TimerPickerProps } from "../TimerPicker/types";
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export { default as TimerPickerModal
|
|
2
|
-
export {
|
|
1
|
+
export { default as TimerPickerModal } from "./components/TimerPickerModal";
|
|
2
|
+
export type { TimerPickerModalProps, TimerPickerModalRef, CustomTimerPickerModalStyles, } from "./components/TimerPickerModal";
|
|
3
|
+
export { default as TimerPicker } from "./components/TimerPicker";
|
|
4
|
+
export type { TimerPickerProps, TimerPickerRef, CustomTimerPickerStyles, } from "./components/TimerPicker";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,130 +1,148 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
2
|
+
"name": "react-native-timer-picker",
|
|
3
|
+
"description": "A simple, flexible, performant duration picker for React Native apps 🔥\n\nGreat for timers, alarms and duration inputs ⏰🕰️⏳\n\nIncludes iOS-style haptic and audio feedback 🍏",
|
|
4
|
+
"author": {
|
|
5
|
+
"name": "Tim Roberts",
|
|
6
|
+
"url": "https://github.com/troberts-28"
|
|
7
|
+
},
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"version": "2.6.1",
|
|
10
|
+
"main": "dist/commonjs/index.js",
|
|
11
|
+
"module": "dist/module/index.js",
|
|
12
|
+
"types": "dist/typescript/index.d.ts",
|
|
13
|
+
"typings": "dist/typescript/index.d.ts",
|
|
14
|
+
"packageManager": "yarn@4.12.0",
|
|
15
|
+
"workspaces": {
|
|
16
|
+
"packages": [
|
|
17
|
+
"examples/*"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"setup": "yarn install",
|
|
22
|
+
"start": " yarn workspace example-expo start",
|
|
23
|
+
"start-bare:android": "yarn workspace example-bare android && yarn workspace example-bare start",
|
|
24
|
+
"start-bare:ios": "yarn workspace example-bare ios && yarn workspace example-bare start",
|
|
25
|
+
"test": "jest --forceExit --silent",
|
|
26
|
+
"build": "bob build",
|
|
27
|
+
"ts": "tsc --noEmit && tsc --noEmit -p examples/example-expo && tsc --noEmit -p examples/example-bare",
|
|
28
|
+
"clean": "rm yarn.lock && rm -rf ./node_modules && yarn install",
|
|
29
|
+
"lint": "eslint src/ examples/",
|
|
30
|
+
"lint:fix": "eslint src/ examples/ --fix",
|
|
31
|
+
"format": "prettier --check ./src ./examples",
|
|
32
|
+
"format:fix": "prettier --write ./src ./examples",
|
|
33
|
+
"prepare": "simple-git-hooks",
|
|
34
|
+
"prepublishOnly": "yarn build"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/troberts-28/react-native-timer-picker",
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/troberts-28/react-native-timer-picker/issues"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"name": "GitHub",
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "git+https://github.com/troberts-28/react-native-timer-picker.git"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"registry": "https://registry.npmjs.org/"
|
|
47
|
+
},
|
|
48
|
+
"files": [
|
|
49
|
+
"dist",
|
|
50
|
+
"package.json",
|
|
51
|
+
"README.md",
|
|
52
|
+
"LICENSE"
|
|
53
|
+
],
|
|
54
|
+
"keywords": [
|
|
55
|
+
"react",
|
|
56
|
+
"react-native",
|
|
57
|
+
"expo",
|
|
58
|
+
"duration",
|
|
59
|
+
"picker",
|
|
60
|
+
"time",
|
|
61
|
+
"timer",
|
|
62
|
+
"alarm",
|
|
63
|
+
"modal",
|
|
64
|
+
"durationpicker",
|
|
65
|
+
"duration-picker",
|
|
66
|
+
"duration-picker-modal",
|
|
67
|
+
"react-native-duration-picker",
|
|
68
|
+
"react-native-duration-picker-modal",
|
|
69
|
+
"timepicker",
|
|
70
|
+
"time-picker",
|
|
71
|
+
"alarmpicker",
|
|
72
|
+
"alarm-picker",
|
|
73
|
+
"alarm-picker-modal",
|
|
74
|
+
"react-native-alarm-picker",
|
|
75
|
+
"timerpicker",
|
|
76
|
+
"timer-picker",
|
|
77
|
+
"timer-picker-modal",
|
|
78
|
+
"react-native-duration-picker-modal",
|
|
79
|
+
"expo-duration-picker",
|
|
80
|
+
"expo-time-picker",
|
|
81
|
+
"expo-timepicker",
|
|
82
|
+
"expo-durationpicker",
|
|
83
|
+
"expo-duration-picker",
|
|
84
|
+
"expo-time-picker",
|
|
85
|
+
"expo-timepicker",
|
|
86
|
+
"expo-durationpicker"
|
|
87
|
+
],
|
|
88
|
+
"engines": {
|
|
89
|
+
"node": ">=16.0.0"
|
|
90
|
+
},
|
|
91
|
+
"peerDependencies": {
|
|
92
|
+
"react": ">=18.2.0",
|
|
93
|
+
"react-native": ">=0.72.0"
|
|
94
|
+
},
|
|
95
|
+
"devDependencies": {
|
|
96
|
+
"@babel/core": "^7.20.0",
|
|
97
|
+
"@eslint/compat": "^1.4.0",
|
|
98
|
+
"@eslint/js": "^9.38.0",
|
|
99
|
+
"@testing-library/react-native": "^12.0.0",
|
|
100
|
+
"@types/jest": "^29.0.0",
|
|
101
|
+
"@types/react": ">=18.2.0",
|
|
102
|
+
"@types/react-native": "0.72.0",
|
|
103
|
+
"@types/react-test-renderer": ">=18.2.0",
|
|
104
|
+
"babel-jest": "^29.6.2",
|
|
105
|
+
"eslint": "^9.28.0",
|
|
106
|
+
"eslint-config-prettier": "^10.1.8",
|
|
107
|
+
"eslint-plugin-perfectionist": "^4.13.0",
|
|
108
|
+
"eslint-plugin-prettier": "^5.4.1",
|
|
109
|
+
"eslint-plugin-react": "^7.37.5",
|
|
110
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
111
|
+
"jest": "^29.0.0",
|
|
112
|
+
"lint-staged": "^16.2.7",
|
|
113
|
+
"metro-react-native-babel-preset": "^0.71.1",
|
|
114
|
+
"prettier": "2.8.8",
|
|
115
|
+
"react": "18.2.0",
|
|
116
|
+
"react-native": "0.72.0",
|
|
117
|
+
"react-native-builder-bob": "^0.18.3",
|
|
118
|
+
"react-test-renderer": "18.2.0",
|
|
119
|
+
"simple-git-hooks": "^2.13.1",
|
|
120
|
+
"typescript": "~5.8.0",
|
|
121
|
+
"typescript-eslint": "^8.33.0"
|
|
122
|
+
},
|
|
123
|
+
"react-native-builder-bob": {
|
|
124
|
+
"source": "src",
|
|
125
|
+
"output": "dist",
|
|
126
|
+
"targets": [
|
|
127
|
+
"commonjs",
|
|
128
|
+
"module",
|
|
129
|
+
"typescript"
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
"simple-git-hooks": {
|
|
133
|
+
"pre-commit": "npx lint-staged"
|
|
134
|
+
},
|
|
135
|
+
"lint-staged": {
|
|
136
|
+
"*.{ts,tsx,js,jsx}": [
|
|
137
|
+
"eslint --fix",
|
|
138
|
+
"prettier --write"
|
|
84
139
|
],
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
"peerDependencies": {
|
|
89
|
-
"react": ">=18.2.0",
|
|
90
|
-
"react-native": ">=0.72.0"
|
|
91
|
-
},
|
|
92
|
-
"devDependencies": {
|
|
93
|
-
"@babel/core": "^7.20.0",
|
|
94
|
-
"@testing-library/react-native": "^12.0.0",
|
|
95
|
-
"@types/jest": "^29.0.0",
|
|
96
|
-
"@types/react": ">=18.2.0",
|
|
97
|
-
"@types/react-native": "0.72.0",
|
|
98
|
-
"@types/react-test-renderer": ">=18.2.0",
|
|
99
|
-
"@typescript-eslint/eslint-plugin": "^5.49.0",
|
|
100
|
-
"@typescript-eslint/parser": "^5.49.0",
|
|
101
|
-
"babel-jest": "^29.6.2",
|
|
102
|
-
"eslint": "^8.44.0",
|
|
103
|
-
"eslint-plugin-import": "^2.29.0",
|
|
104
|
-
"eslint-plugin-react": "^7.33.1",
|
|
105
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
106
|
-
"eslint-plugin-sort-destructure-keys": "^1.5.0",
|
|
107
|
-
"eslint-plugin-typescript-sort-keys": "^2.3.0",
|
|
108
|
-
"jest": "^29.0.0",
|
|
109
|
-
"metro-react-native-babel-preset": "^0.71.1",
|
|
110
|
-
"prettier": "2.8.8",
|
|
111
|
-
"react": "18.2.0",
|
|
112
|
-
"react-native": "0.72.0",
|
|
113
|
-
"react-native-builder-bob": "^0.18.3",
|
|
114
|
-
"react-test-renderer": "18.2.0",
|
|
115
|
-
"typescript": "^4.7.4"
|
|
116
|
-
},
|
|
117
|
-
"react-native-builder-bob": {
|
|
118
|
-
"source": "src",
|
|
119
|
-
"output": "dist",
|
|
120
|
-
"targets": [
|
|
121
|
-
"commonjs",
|
|
122
|
-
"module",
|
|
123
|
-
"typescript"
|
|
124
|
-
]
|
|
125
|
-
},
|
|
126
|
-
"eslintIgnore": [
|
|
127
|
-
"node_modules/",
|
|
128
|
-
"dist/"
|
|
140
|
+
"*.{json}": [
|
|
141
|
+
"prettier --write"
|
|
129
142
|
]
|
|
143
|
+
},
|
|
144
|
+
"eslintIgnore": [
|
|
145
|
+
"node_modules/",
|
|
146
|
+
"dist/"
|
|
147
|
+
]
|
|
130
148
|
}
|