├── .eslintignore ├── samples ├── ReactNativeSample │ ├── .watchmanconfig │ ├── _editorconfig │ ├── app.json │ ├── .eslintrc.js │ ├── babel.config.js │ ├── android │ │ ├── app │ │ │ ├── src │ │ │ │ ├── main │ │ │ │ │ ├── res │ │ │ │ │ │ ├── values │ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ │ └── mipmap-xxxhdpi │ │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── java │ │ │ │ │ │ └── com │ │ │ │ │ │ │ └── reactnativesample │ │ │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ │ │ └── MainApplication.java │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── debug │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── reactnativesample │ │ │ │ │ └── ReactNativeFlipper.java │ │ │ ├── debug.keystore │ │ │ ├── proguard-rules.pro │ │ │ ├── build_defs.bzl │ │ │ ├── _BUCK │ │ │ └── build.gradle │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── settings.gradle │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradlew.bat │ │ └── gradlew │ ├── ios │ │ ├── ReactNativeSample │ │ │ ├── Images.xcassets │ │ │ │ ├── Contents.json │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ ├── AppDelegate.h │ │ │ ├── main.m │ │ │ ├── Info.plist │ │ │ ├── AppDelegate.m │ │ │ └── LaunchScreen.storyboard │ │ ├── ReactNativeSample.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── ReactNativeSampleTests │ │ │ ├── Info.plist │ │ │ └── ReactNativeSampleTests.m │ │ ├── Podfile │ │ ├── ReactNativeSample.xcodeproj │ │ │ ├── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ │ └── ReactNativeSample.xcscheme │ │ │ └── project.pbxproj │ │ └── Podfile.lock │ ├── .buckconfig │ ├── .gitattributes │ ├── index.js │ ├── metro.config.js │ ├── package.json │ ├── .gitignore │ ├── App.js │ └── .flowconfig └── expo-sample │ ├── tsconfig.json │ ├── assets │ ├── icon.png │ ├── splash.png │ ├── favicon.png │ └── adaptive-icon.png │ ├── babel.config.js │ ├── .expo-shared │ └── assets.json │ ├── app.json │ ├── package.json │ └── App.tsx ├── src ├── utils │ ├── index.ts │ └── zeroPad.ts ├── index.ts └── TimePicker.tsx ├── renovate.json ├── babel.config.js ├── screenshots ├── iOS.png └── Android.png ├── .prettierrc.js ├── .eslintrc.js ├── __tests__ ├── setup.js ├── App.test.tsx └── __snapshots__ │ └── App.test.tsx.snap ├── jest.config.js ├── tsconfig.json ├── LICENSE ├── .github └── workflows │ ├── main.yml │ └── codeql-analysis.yml ├── .gitignore ├── package.json └── README.md /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | lib 3 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './zeroPad'; 2 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './TimePicker'; 2 | export * from './utils'; 3 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/_editorconfig: -------------------------------------------------------------------------------- 1 | # Windows files 2 | [*.bat] 3 | end_of_line = crlf 4 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /screenshots/iOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/screenshots/iOS.png -------------------------------------------------------------------------------- /samples/ReactNativeSample/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ReactNativeSample", 3 | "displayName": "ReactNativeSample" 4 | } -------------------------------------------------------------------------------- /screenshots/Android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/screenshots/Android.png -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | singleQuote: true, 4 | trailingComma: 'all', 5 | }; 6 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /samples/expo-sample/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "expo/tsconfig.base", 3 | "compilerOptions": { 4 | "strict": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | parser: '@typescript-eslint/parser', 5 | }; 6 | -------------------------------------------------------------------------------- /samples/expo-sample/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/expo-sample/assets/icon.png -------------------------------------------------------------------------------- /samples/expo-sample/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/expo-sample/assets/splash.png -------------------------------------------------------------------------------- /samples/expo-sample/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/expo-sample/assets/favicon.png -------------------------------------------------------------------------------- /__tests__/setup.js: -------------------------------------------------------------------------------- 1 | import Enzyme from 'enzyme'; 2 | import Adapter from 'enzyme-adapter-react-16'; 3 | 4 | Enzyme.configure({adapter: new Adapter()}); 5 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ReactNativeSample 3 | 4 | -------------------------------------------------------------------------------- /samples/expo-sample/assets/adaptive-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/expo-sample/assets/adaptive-icon.png -------------------------------------------------------------------------------- /samples/ReactNativeSample/ios/ReactNativeSample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /samples/expo-sample/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function(api) { 2 | api.cache(true); 3 | return { 4 | presets: ['babel-preset-expo'], 5 | }; 6 | }; 7 | -------------------------------------------------------------------------------- /src/utils/zeroPad.ts: -------------------------------------------------------------------------------- 1 | export const zeroPad = (num: number) => { 2 | if (num >= 0 && num <= 9) { 3 | return `0${num}`; 4 | } 5 | return num.toString(); 6 | }; 7 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/ReactNativeSample/android/app/debug.keystore -------------------------------------------------------------------------------- /samples/ReactNativeSample/.gitattributes: -------------------------------------------------------------------------------- 1 | # Windows files should use crlf line endings 2 | # https://help.github.com/articles/dealing-with-line-endings/ 3 | *.bat text eol=crlf 4 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/ReactNativeSample/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /samples/expo-sample/.expo-shared/assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true, 3 | "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true 4 | } 5 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/ReactNativeSample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/ReactNativeSample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/ReactNativeSample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/ReactNativeSample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/ReactNativeSample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/ReactNativeSample/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/ReactNativeSample/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/ReactNativeSample/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/ReactNativeSample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uraway/react-native-simple-time-picker/HEAD/samples/ReactNativeSample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'react-native', 3 | testRegex: '/__tests__/.*.test.(js|ts|tsx)?$', 4 | transformIgnorePatterns: ['node_modules/?!(@react-native-picker/picker)'], 5 | setupFiles: ['./__tests__/setup.js'], 6 | }; 7 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ReactNativeSample' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/ios/ReactNativeSample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/ios/ReactNativeSample/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/ios/ReactNativeSample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: true, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/main/java/com/reactnativesample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.reactnativesample; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "ReactNativeSample"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /samples/expo-sample/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "expo-sample", 4 | "slug": "expo-sample", 5 | "version": "1.0.0", 6 | "orientation": "portrait", 7 | "icon": "./assets/icon.png", 8 | "splash": { 9 | "image": "./assets/splash.png", 10 | "resizeMode": "contain", 11 | "backgroundColor": "#ffffff" 12 | }, 13 | "updates": { 14 | "fallbackToCacheTimeout": 0 15 | }, 16 | "assetBundlePatterns": [ 17 | "**/*" 18 | ], 19 | "ios": { 20 | "supportsTablet": true 21 | }, 22 | "android": { 23 | "adaptiveIcon": { 24 | "foregroundImage": "./assets/adaptive-icon.png", 25 | "backgroundColor": "#FFFFFF" 26 | } 27 | }, 28 | "web": { 29 | "favicon": "./assets/favicon.png" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "lib": ["esnext"], 6 | "allowJs": true, 7 | "jsx": "react-native", 8 | "noImplicitAny": true, 9 | "incremental": true /* Enable incremental compilation */, 10 | "isolatedModules": true, 11 | "strict": true, 12 | "moduleResolution": "node", 13 | "skipLibCheck": true, 14 | "baseUrl": "./src", 15 | "outDir": "./lib", 16 | "esModuleInterop": true, 17 | "declaration": true /* Generates corresponding '.d.ts' file. */, 18 | "sourceMap": true /* Generates corresponding '.map' file. */ 19 | }, 20 | "include": ["src"], 21 | "exclude": [ 22 | "example", 23 | "node_modules", 24 | "babel.config.js", 25 | "metro.config.js", 26 | "jest.config.js" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/ios/ReactNativeSample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /samples/ReactNativeSample/ios/ReactNativeSampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, '10.0' 5 | 6 | target 'ReactNativeSample' do 7 | config = use_native_modules! 8 | 9 | use_react_native!( 10 | :path => config[:reactNativePath], 11 | # to enable hermes on iOS, change `false` to `true` and then install pods 12 | :hermes_enabled => false 13 | ) 14 | 15 | target 'ReactNativeSampleTests' do 16 | inherit! :complete 17 | # Pods for testing 18 | end 19 | 20 | # Enables Flipper. 21 | # 22 | # Note that if you have use_frameworks! enabled, Flipper will not work and 23 | # you should disable the next line. 24 | use_flipper!() 25 | 26 | post_install do |installer| 27 | react_native_post_install(installer) 28 | end 29 | end -------------------------------------------------------------------------------- /samples/expo-sample/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "node_modules/expo/AppEntry.js", 3 | "scripts": { 4 | "watch": "cpx '../../lib/**/*.*' ./lib --watch", 5 | "start": "expo start", 6 | "android": "expo start --android", 7 | "ios": "expo start --ios", 8 | "web": "expo start --web", 9 | "eject": "expo eject" 10 | }, 11 | "dependencies": { 12 | "@react-native-picker/picker": "2.4.0", 13 | "expo": "44.0.6", 14 | "expo-status-bar": "1.2.0", 15 | "react": "17.0.2", 16 | "react-dom": "17.0.2", 17 | "react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz", 18 | "react-native-simple-time-picker": "1.3.11", 19 | "react-native-web": "0.17.7" 20 | }, 21 | "devDependencies": { 22 | "@babel/core": "7.17.2", 23 | "@types/react": "17.0.43", 24 | "@types/react-native": "0.67.3", 25 | "cpx": "1.5.0", 26 | "typescript": "4.6.3" 27 | }, 28 | "private": true 29 | } 30 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ReactNativeSample", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "watch": "cpx '../../lib/**/*.*' ./lib --watch", 7 | "android": "react-native run-android", 8 | "ios": "react-native run-ios", 9 | "start": "react-native start", 10 | "test": "jest", 11 | "lint": "eslint ." 12 | }, 13 | "dependencies": { 14 | "@react-native-picker/picker": "2.4.0", 15 | "react": "17.0.2", 16 | "react-native": "0.67.4", 17 | "react-native-simple-time-picker": "1.3.11" 18 | }, 19 | "devDependencies": { 20 | "@babel/core": "7.17.2", 21 | "@babel/runtime": "7.17.2", 22 | "@react-native-community/eslint-config": "3.0.1", 23 | "babel-jest": "27.5.1", 24 | "cpx": "1.5.0", 25 | "eslint": "8.11.0", 26 | "jest": "27.5.1", 27 | "metro-react-native-babel-preset": "0.69.1", 28 | "react-test-renderer": "17.0.2" 29 | }, 30 | "jest": { 31 | "preset": "react-native" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | yarn-error.log 37 | 38 | # BUCK 39 | buck-out/ 40 | \.buckd/ 41 | *.keystore 42 | !debug.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # CocoaPods 59 | /ios/Pods/ 60 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 uraway 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | pull_request: 7 | branches: [master] 8 | workflow_dispatch: 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v3 15 | - uses: actions/setup-node@v3 16 | with: 17 | node-version: '14' 18 | cache: 'yarn' 19 | - run: yarn install 20 | 21 | - run: yarn eslint && yarn prettier 22 | 23 | - run: yarn test 24 | 25 | publish: 26 | if: github.event_name == 'push' && github.head_ref == 'master' 27 | needs: [build] 28 | runs-on: ubuntu-latest 29 | steps: 30 | - uses: actions/checkout@v3 31 | - uses: actions/setup-node@v3 32 | with: 33 | node-version: '14' 34 | cache: 'yarn' 35 | - run: yarn install 36 | - id: publish 37 | uses: JS-DevTools/npm-publish@v1 38 | with: 39 | token: ${{ secrets.NPM_TOKEN }} 40 | 41 | - if: steps.publish.outputs.type != 'none' 42 | run: | 43 | echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}" 44 | -------------------------------------------------------------------------------- /samples/ReactNativeSample/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {Text, View, Button, StyleSheet} from 'react-native'; 3 | import {TimePicker} from 'react-native-simple-time-picker'; 4 | 5 | const YourApp = () => { 6 | const [hours, setHours] = React.useState(0); 7 | const [minutes, setMinutes] = React.useState(0); 8 | const handleChange = value => { 9 | setHours(value.hours); 10 | setMinutes(value.minutes); 11 | }; 12 | const handleReset = () => { 13 | setHours(0); 14 | setMinutes(0); 15 | }; 16 | return ( 17 | 18 | 19 | {hours} : {minutes} 20 | 21 |