├── .watchmanconfig ├── .gitattributes ├── src ├── index.ts ├── components │ ├── index.ts │ ├── Card.tsx │ ├── AnimatedCard.tsx │ ├── Button.tsx │ └── ReText.tsx ├── theme.ts ├── hooks │ ├── index.ts │ ├── useUniqueID.ts │ ├── useTopbarHeight.ts │ ├── useEffectSkipFirst.ts │ └── useTopbarEvent.ts ├── screens │ ├── playground │ │ ├── index.tsx │ │ ├── DragToSort │ │ │ ├── SortableList.tsx │ │ │ ├── index.tsx │ │ │ └── SortableItem.tsx │ │ ├── WorkletsScreen.tsx │ │ ├── Worklets2Screen.tsx │ │ └── GestureScreen.tsx │ └── animations │ │ ├── ModalDemoScreen │ │ ├── ModalBottomContainer.tsx │ │ ├── index.tsx │ │ └── ModalScreen.tsx │ │ ├── DraggableList │ │ ├── styles.ts │ │ ├── CardItem.tsx │ │ ├── DraggableList │ │ │ └── index.tsx │ │ └── index.tsx │ │ ├── ZoomableLineChart │ │ ├── data.ts │ │ └── ZoomableChart │ │ │ ├── AnimatedSvg.tsx │ │ │ └── index.tsx │ │ ├── Gallery │ │ ├── styles.ts │ │ ├── GallerySlider │ │ │ └── index.tsx │ │ └── index.tsx │ │ ├── SkiaGradient │ │ └── index.tsx │ │ ├── index.ts │ │ ├── D3Chart │ │ ├── d3 │ │ │ ├── index.tsx │ │ │ └── d3Curves.tsx │ │ └── index.tsx │ │ ├── LinechartScreen │ │ ├── GraphModal.tsx │ │ ├── utils.ts │ │ └── Linechart │ │ │ ├── utils.ts │ │ │ ├── Cursor.tsx │ │ │ └── index.tsx │ │ ├── CalendarScreen │ │ ├── WeeklyCalendar │ │ │ ├── locales.json │ │ │ ├── utils.ts │ │ │ ├── DayItem.tsx │ │ │ └── index.tsx │ │ └── index.tsx │ │ ├── BarchartScreen │ │ ├── BarchartCustom │ │ │ ├── CustomBarItem.tsx │ │ │ └── index.tsx │ │ ├── data.ts │ │ ├── Barchart │ │ │ ├── BarItem.tsx │ │ │ └── index.tsx │ │ └── index.tsx │ │ ├── ViewPagerHeader │ │ ├── index.tsx │ │ └── ViewPagerHeader.tsx │ │ ├── PaginateScreen │ │ ├── OffsetInfos.tsx │ │ └── Paginate │ │ │ ├── index.tsx │ │ │ └── Page.tsx │ │ ├── SelectableListScreen │ │ ├── utils.ts │ │ ├── index.tsx │ │ └── Item.tsx │ │ └── TopbarMenuScreen │ │ ├── index.tsx │ │ └── ShowMore.tsx ├── insets.ts ├── animUtils.ts └── utils.ts ├── app.json ├── gifs ├── barchart.gif ├── gallery.gif ├── draggable.gif ├── linechart.gif ├── topbar-menu.gif ├── viewpagerheader.gif ├── weeklyCalendar.gif └── scalableLinechart.gif ├── img ├── choubs_1.jpg ├── choubs_2.jpg ├── choubs_3.jpg └── icons │ ├── chart.png │ ├── chart@2x.png │ ├── chart@3x.png │ ├── plus-20.png │ ├── plus-20@2x.png │ ├── plus-20@3x.png │ └── more_vertical-20@3x.png ├── android ├── app │ ├── debug.keystore │ ├── 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 │ │ │ │ │ └── rnanimationsplayground │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ ├── cutouts │ │ │ │ │ ├── CutoutsPackage.kt │ │ │ │ │ └── CutoutsUtils.kt │ │ │ │ │ └── MainApplication.java │ │ │ └── AndroidManifest.xml │ │ └── debug │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── rnanimationsplayground │ │ │ └── ReactNativeFlipper.java │ ├── proguard-rules.pro │ ├── build_defs.bzl │ └── _BUCK ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── gradle.properties ├── build.gradle └── gradlew.bat ├── ios ├── RnAnimationsPlayground │ ├── Images.xcassets │ │ ├── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── AppDelegate.h │ ├── main.m │ ├── RCTInsetUtils.m │ ├── Info.plist │ └── AppDelegate.m ├── RnAnimationsPlayground.xcworkspace │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── contents.xcworkspacedata ├── RnAnimationsPlaygroundTests │ ├── Info.plist │ └── RnAnimationsPlaygroundTests.m ├── RnAnimationsPlayground-tvOSTests │ └── Info.plist ├── Podfile ├── RnAnimationsPlayground-tvOS │ └── Info.plist └── RnAnimationsPlayground.xcodeproj │ └── xcshareddata │ └── xcschemes │ ├── RnAnimationsPlayground.xcscheme │ └── RnAnimationsPlayground-tvOS.xcscheme ├── .buckconfig ├── .prettierrc.js ├── __tests__ └── App-test.tsx ├── metro.config.js ├── babel.config.js ├── .eslintrc ├── README.md ├── .gitignore ├── package.json ├── index.js ├── App.tsx └── tsconfig.json /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export { Colors } from './theme'; 2 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RNAnimationsv2", 3 | "displayName": "RNAnimationsv2" 4 | } 5 | -------------------------------------------------------------------------------- /gifs/barchart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/gifs/barchart.gif -------------------------------------------------------------------------------- /gifs/gallery.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/gifs/gallery.gif -------------------------------------------------------------------------------- /img/choubs_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/img/choubs_1.jpg -------------------------------------------------------------------------------- /img/choubs_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/img/choubs_2.jpg -------------------------------------------------------------------------------- /img/choubs_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/img/choubs_3.jpg -------------------------------------------------------------------------------- /gifs/draggable.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/gifs/draggable.gif -------------------------------------------------------------------------------- /gifs/linechart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/gifs/linechart.gif -------------------------------------------------------------------------------- /img/icons/chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/img/icons/chart.png -------------------------------------------------------------------------------- /gifs/topbar-menu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/gifs/topbar-menu.gif -------------------------------------------------------------------------------- /img/icons/chart@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/img/icons/chart@2x.png -------------------------------------------------------------------------------- /img/icons/chart@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/img/icons/chart@3x.png -------------------------------------------------------------------------------- /img/icons/plus-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/img/icons/plus-20.png -------------------------------------------------------------------------------- /gifs/viewpagerheader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/gifs/viewpagerheader.gif -------------------------------------------------------------------------------- /gifs/weeklyCalendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/gifs/weeklyCalendar.gif -------------------------------------------------------------------------------- /img/icons/plus-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/img/icons/plus-20@2x.png -------------------------------------------------------------------------------- /img/icons/plus-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/img/icons/plus-20@3x.png -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/android/app/debug.keystore -------------------------------------------------------------------------------- /gifs/scalableLinechart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/gifs/scalableLinechart.gif -------------------------------------------------------------------------------- /img/icons/more_vertical-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/img/icons/more_vertical-20@3x.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RNAnimationsPlayground 3 | 4 | -------------------------------------------------------------------------------- /ios/RnAnimationsPlayground/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Andarius/rn-animations-playground/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src/components/index.ts: -------------------------------------------------------------------------------- 1 | export { AnimatedCard } from './AnimatedCard' 2 | export { Button } from './Button' 3 | export { Card } from './Card' 4 | export * from './RectButtonRadius' 5 | export { ReText } from './ReText' 6 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "tabWidth": 4, 3 | "useTabs": false, 4 | "bracketSpacing": true, 5 | "jsxBracketSameLine": true, 6 | "singleQuote": true, 7 | "trailingComma": "none", 8 | "semi": false 9 | } 10 | -------------------------------------------------------------------------------- /src/theme.ts: -------------------------------------------------------------------------------- 1 | export const Colors = { 2 | white: 'white', 3 | background: 'hsl(345, 12%, 94%)', 4 | primary: 'hsl(198, 48%, 63%)', 5 | secondary: 'hsl(187, 29%, 44%)', 6 | tertiary: 'hsl(207, 43%, 16%)' 7 | } 8 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'RNAnimationsPlayground' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export { useEffectSkipFirst } from './useEffectSkipFirst' 2 | export { useTopBarBtnPress } from './useTopbarEvent' 3 | export { useTopBarHeight } from './useTopbarHeight' 4 | export { useUniqueID } from './useUniqueID' 5 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/rnanimationsplayground/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.rnanimationsplayground; 2 | 3 | import com.reactnativenavigation.NavigationActivity; 4 | 5 | public class MainActivity extends NavigationActivity { 6 | 7 | 8 | } 9 | -------------------------------------------------------------------------------- /ios/RnAnimationsPlayground/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /ios/RnAnimationsPlayground/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 | -------------------------------------------------------------------------------- /src/screens/playground/index.tsx: -------------------------------------------------------------------------------- 1 | export { DragToSortScreen } from './DragToSort' 2 | export { GestureScreen } from './GestureScreen' 3 | export { Worklets2Screen } from './Worklets2Screen' 4 | export { WorkletScreen } from './WorkletsScreen' 5 | export type { Props as WorkletScreenProps } from './WorkletsScreen' 6 | -------------------------------------------------------------------------------- /src/insets.ts: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native' 2 | 3 | type Insets = { bottom: number; top: number; left: number; right: number } 4 | 5 | interface IInsetsUtils { 6 | getInsets: () => Insets 7 | } 8 | 9 | const InsetUtils = NativeModules.InsetUtils as IInsetsUtils 10 | 11 | export { InsetUtils } 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ios/RnAnimationsPlayground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /__tests__/App-test.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import React from 'react'; 6 | import 'react-native'; 7 | // Note: test renderer must be required after react-native. 8 | import renderer from 'react-test-renderer'; 9 | import App from '../App'; 10 | 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /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: false, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /src/hooks/useUniqueID.ts: -------------------------------------------------------------------------------- 1 | import { useRef } from 'react' 2 | 3 | export const useUniqueID = function (initValue: number = 0) { 4 | const _counter = useRef(initValue) 5 | function getID(prefix?: string) { 6 | const id: string = `${prefix}${_counter.current}` 7 | _counter.current += 1 8 | return id 9 | } 10 | 11 | return { getID } 12 | } 13 | -------------------------------------------------------------------------------- /src/animUtils.ts: -------------------------------------------------------------------------------- 1 | export const clamp = ( 2 | value: number, 3 | lowerBound: number, 4 | upperBound: number 5 | ) => { 6 | 'worklet'; 7 | return Math.min(Math.max(lowerBound, value), upperBound); 8 | } 9 | 10 | 11 | export const round = (value: number, exponent: number) => { 12 | 'worklet'; 13 | const exp = 10 ** exponent 14 | return Math.round(value * exp) / exp 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/screens/animations/ModalDemoScreen/ModalBottomContainer.tsx: -------------------------------------------------------------------------------- 1 | import React, { FC } from 'react' 2 | import { StyleSheet, View } from 'react-native' 3 | 4 | const styles = StyleSheet.create({ 5 | container: { 6 | flex: 1 7 | } 8 | }) 9 | 10 | export type Props = {} 11 | 12 | const ModalBottomContainer: FC = function ({}) { 13 | return 14 | } 15 | 16 | export { ModalBottomContainer } 17 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | plugins: [ 4 | [ 5 | 'module-resolver', 6 | { 7 | root: ['./src'], 8 | extensions: ['.ios.js', '.android.js', '.js', '.ts', '.tsx', '.json'], 9 | alias: { 10 | '@src': './src', 11 | '@img': './img' 12 | } 13 | } 14 | ], 15 | 'react-native-reanimated/plugin' 16 | ] 17 | }; 18 | -------------------------------------------------------------------------------- /ios/RnAnimationsPlayground.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/hooks/useTopbarHeight.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from 'react' 2 | import { Navigation } from 'react-native-navigation' 3 | 4 | const useTopBarHeight = function (defaultHeight: number = 80) { 5 | const [_topBarHeight, setTopBarHeight] = useState(defaultHeight) 6 | 7 | useEffect(() => { 8 | Navigation.constants().then(({ topBarHeight, statusBarHeight }) => { 9 | setTopBarHeight(topBarHeight + statusBarHeight) 10 | }) 11 | }, []) 12 | 13 | return _topBarHeight 14 | 15 | } 16 | export { useTopBarHeight } 17 | -------------------------------------------------------------------------------- /src/screens/animations/DraggableList/styles.ts: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native' 2 | 3 | 4 | const styles = StyleSheet.create({ 5 | btnsContainer: { 6 | position: 'absolute', 7 | bottom: 0, 8 | height: 100, 9 | left: 0, 10 | right: 0, 11 | flexDirection: 'row', 12 | justifyContent: 'space-evenly', 13 | alignItems: 'center' 14 | }, 15 | btn: { 16 | height: 40, 17 | width: 110 18 | }, 19 | labelText: { fontSize: 14, textAlign: 'center' } 20 | }) 21 | 22 | export default styles 23 | -------------------------------------------------------------------------------- /src/screens/animations/ZoomableLineChart/data.ts: -------------------------------------------------------------------------------- 1 | export type WeightItem = { 2 | date: string 3 | weight: number 4 | body_fat: number | null 5 | } 6 | 7 | const WEIGHT_DATA: WeightItem[] = require('./weight.json') 8 | 9 | const WEIGHT = WEIGHT_DATA.filter((x) => x.weight !== null).map( 10 | (x) => [new Date(x.date).getTime(), x.weight] as [number, number] 11 | ) 12 | 13 | const BODY_FAT = WEIGHT_DATA.filter((x) => x.body_fat !== null).map( 14 | (x) => [new Date(x.date).getTime(), x.body_fat] as [number, number] 15 | ) 16 | 17 | export { WEIGHT_DATA, WEIGHT, BODY_FAT } 18 | -------------------------------------------------------------------------------- /src/hooks/useEffectSkipFirst.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable react-hooks/exhaustive-deps */ 2 | import { DependencyList, EffectCallback, useEffect, useRef } from 'react' 3 | 4 | /** 5 | * useEffect that skips the first render 6 | */ 7 | const useEffectSkipFirst = function( 8 | effect: EffectCallback, deps?: DependencyList 9 | ) { 10 | 11 | const _firstRender = useRef(true) 12 | useEffect(() => { 13 | if (_firstRender.current === false) 14 | effect() 15 | else 16 | _firstRender.current = false 17 | }, deps) 18 | } 19 | 20 | export { useEffectSkipFirst } 21 | 22 | 23 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/hooks/useTopbarEvent.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react' 2 | import { 3 | Navigation, 4 | NavigationButtonPressedEvent 5 | } from 'react-native-navigation' 6 | 7 | export type OnTopBtnPressed = (event: NavigationButtonPressedEvent) => void 8 | 9 | export const useTopBarBtnPress = function ( 10 | componentId: string, 11 | onTopBtnPressed: OnTopBtnPressed) { 12 | useEffect(() => { 13 | const topBtnListener = Navigation.events().registerNavigationButtonPressedListener((event) => { 14 | if (event.componentId === componentId) 15 | onTopBtnPressed(event) 16 | }) 17 | return () => topBtnListener.remove() 18 | }, [componentId, onTopBtnPressed]) 19 | } 20 | -------------------------------------------------------------------------------- /src/screens/animations/Gallery/styles.ts: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native' 2 | 3 | const styles = StyleSheet.create({ 4 | container: { 5 | flex: 1, 6 | // justifyContent: 'center' 7 | }, 8 | imagesContainer: { 9 | marginTop: 100, 10 | }, 11 | btnsContainer: { 12 | position: 'absolute', 13 | bottom: 0, 14 | height: 100, 15 | left: 0, 16 | right: 0, 17 | flexDirection: 'row', 18 | justifyContent: 'space-evenly', 19 | alignItems: 'center' 20 | }, 21 | btn: { 22 | height: 40, 23 | width: 110 24 | }, 25 | labelText: { fontSize: 14, textAlign: 'center' } 26 | }) 27 | 28 | export { styles } 29 | -------------------------------------------------------------------------------- /src/screens/animations/SkiaGradient/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { StyleSheet, View } from 'react-native' 3 | import { NavigationFunctionComponent as RNNFC } from 'react-native-navigation' 4 | 5 | const styles = StyleSheet.create({ 6 | container: { 7 | flex: 1, 8 | justifyContent: 'center', 9 | alignItems: 'center' 10 | } 11 | }) 12 | 13 | export type Props = {} 14 | 15 | const SkiaGradientScreen: RNNFC = function ({}) { 16 | return 17 | } 18 | 19 | SkiaGradientScreen.options = { 20 | topBar: { 21 | title: { 22 | text: 'Skia gradient' 23 | } 24 | } 25 | } 26 | 27 | export { SkiaGradientScreen } 28 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": "@react-native-community", 4 | "parser": "@typescript-eslint/parser", 5 | "plugins": [ 6 | "react", 7 | "react-native", 8 | "@typescript-eslint" 9 | ], 10 | // "parserOptions": { 11 | // "ecmaFeatures": { 12 | // "jsx": true 13 | // } 14 | // }, 15 | "env": { 16 | "jest": true 17 | // "react-native/react-native": true 18 | }, 19 | "rules": { 20 | "react-native/no-unused-styles": 1, 21 | "prettier/prettier": "off", 22 | "semi": "off", 23 | "comma-dangle": "off", 24 | "react-native/no-inline-styles": "off", 25 | "curly": "off", 26 | "radix": "off" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/components/Card.tsx: -------------------------------------------------------------------------------- 1 | import { Colors } from '@src/theme' 2 | import React, { FC } from 'react' 3 | import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native' 4 | 5 | export const CARD_WIDTH = 330 6 | export const CARD_HEIGHT = 170 7 | 8 | const styles = StyleSheet.create({ 9 | container: { 10 | width: CARD_WIDTH, 11 | height: CARD_HEIGHT, 12 | borderRadius: 20, 13 | backgroundColor: Colors.primary 14 | } 15 | }) 16 | 17 | export type Props = { 18 | style?: StyleProp 19 | } 20 | 21 | const Card: FC = function ({ children, style }) { 22 | return ( 23 | 24 | { children } 25 | 26 | ) 27 | } 28 | 29 | export { Card } 30 | -------------------------------------------------------------------------------- /src/screens/animations/index.ts: -------------------------------------------------------------------------------- 1 | export { BarChartScreen } from './BarchartScreen' 2 | export { CalendarScreen } from './CalendarScreen' 3 | export { D3ChartScreen } from './D3Chart' 4 | export { DraggableListScreen } from './DraggableList' 5 | export { GalleryScreen } from './Gallery' 6 | export { LineGraphScreen } from './LinechartScreen' 7 | export { GraphModal } from './LinechartScreen/GraphModal' 8 | export { ModalDemoScreen } from './ModalDemoScreen' 9 | export { ModalScreen } from './ModalDemoScreen/ModalScreen' 10 | export { PaginateScreen } from './PaginateScreen' 11 | export { SelectableListScreen } from './SelectableListScreen' 12 | export { TopbarMenuScreen } from './TopbarMenuScreen' 13 | export { ViewPagerHeaderScreen } from './ViewPagerHeader' 14 | export { ZoomableLineChartScreen } from './ZoomableLineChart' 15 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/rnanimationsplayground/cutouts/CutoutsPackage.kt: -------------------------------------------------------------------------------- 1 | package com.rnanimationsplayground.cutouts 2 | 3 | import android.view.View 4 | import com.facebook.react.ReactPackage 5 | import com.facebook.react.bridge.NativeModule 6 | import com.facebook.react.bridge.ReactApplicationContext 7 | import com.facebook.react.uimanager.ReactShadowNode 8 | import com.facebook.react.uimanager.ViewManager 9 | 10 | 11 | class RNCutoutsPackage: ReactPackage { 12 | 13 | override fun createViewManagers(reactContext: ReactApplicationContext): MutableList>> { 14 | return mutableListOf(); 15 | } 16 | 17 | override fun createNativeModules(reactContext: ReactApplicationContext): MutableList { 18 | return mutableListOf( 19 | CutoutsUtils(reactContext) 20 | ); 21 | } 22 | } -------------------------------------------------------------------------------- /ios/RnAnimationsPlaygroundTests/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 | -------------------------------------------------------------------------------- /ios/RnAnimationsPlayground-tvOSTests/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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RNAnimations v2 2 | 3 | Boilerplate project with [React Native Navigation](https://wix.github.io/react-native-navigation/docs/before-you-start/), [React Native Gesture Handler](https://docs.swmansion.com/react-native-gesture-handler/) and [React Native Reanimated 2](https://github.com/software-mansion/react-native-reanimated). 4 | 5 | ## Animations 6 | 7 | ### 1. Draggable List 8 | 9 | ![video](./gifs/draggable.gif) 10 | 11 | ### 2. Gallery Slider 12 | 13 | ![video](./gifs/gallery.gif) 14 | 15 | ### 3. Weekly Calendar 16 | 17 | ![video](./gifs/weeklyCalendar.gif) 18 | 19 | ### 4. ViewPager Header 20 | 21 | ![video](./gifs/viewpagerheader.gif) 22 | 23 | ### 5. Topbar Menu 24 | 25 | ![video](./gifs/topbar-menu.gif) 26 | 27 | ### 6. Barchart 28 | 29 | ![video](./gifs/barchart.gif) 30 | 31 | ### 7. Linechart 32 | 33 | ![video](./gifs/linechart.gif) 34 | 35 | ### 8. Scalable LineChart 36 | 37 | ![video](./gifs/scalableLinechart.gif) 38 | -------------------------------------------------------------------------------- /ios/RnAnimationsPlayground/RCTInsetUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // RCTInsetUtils.m 3 | // RnAnimationsPlayground 4 | // 5 | // Created by Julien Brayere on 18/01/2022. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | 12 | @interface RCTInsetUtils : NSObject 13 | 14 | - (NSDictionary *) _getInsets; 15 | 16 | @end 17 | 18 | 19 | @implementation RCTInsetUtils 20 | 21 | -(NSDictionary *) _getInsets { 22 | 23 | UIWindow *window = UIApplication.sharedApplication.windows.firstObject; 24 | 25 | NSDictionary *insets = @{ 26 | @"bottom": @(window.safeAreaInsets.bottom), 27 | @"top": @(window.safeAreaInsets.top), 28 | @"left": @(window.safeAreaInsets.left), 29 | @"right": @(window.safeAreaInsets.right) 30 | }; 31 | 32 | return insets; 33 | 34 | } 35 | 36 | RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(getInsets){ 37 | return [self _getInsets]; 38 | } 39 | 40 | RCT_EXPORT_MODULE(RCTInsetUtils); 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /src/utils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns the symmetric difference of 2 arrays 3 | * Eg: 4 | * a = [1, 2, 3] ; b = [2, 3, 4] 5 | * getArrayDiff(a, b) => [1, 4] 6 | */ 7 | export const getArrayDiff = function (a: T[], b: T[]): T[] { 8 | const [a1, a2] = [new Set(a), new Set(b)] 9 | return [...new Set([...a1].filter((x) => !a2.has(x)).concat( 10 | [...a2].filter((x) => !a1.has(x)) 11 | ))] 12 | } 13 | 14 | /** 15 | * Returns the first matching element index from a given list 16 | */ 17 | export function getIndex(data: T[], fn: (x: T) => boolean): number { 18 | for (let i = 0; i < data.length; i += 1){ 19 | if (fn(data[i])) 20 | return i 21 | } 22 | return -1 23 | } 24 | 25 | 26 | export const normalizeValue = function ( 27 | value: number, 28 | minValue: number, 29 | maxValue: number, 30 | defaultValue: number = 1 31 | ) { 32 | if (maxValue - minValue === 0) return defaultValue 33 | return (value - minValue) / (maxValue - minValue) 34 | } 35 | -------------------------------------------------------------------------------- /src/screens/playground/DragToSort/SortableList.tsx: -------------------------------------------------------------------------------- 1 | import React, { FC, ReactElement } from 'react' 2 | import { ScrollView } from 'react-native' 3 | import { makeMutable } from 'react-native-reanimated' 4 | import { SortableItem } from './SortableItem' 5 | 6 | 7 | export type Props = { 8 | children: ReactElement[] 9 | item: { width: number; height: number } 10 | } 11 | 12 | const SortableList: FC = function ({ children, item }) { 13 | const { height } = item 14 | const offsets = children.map((_, index) => ({ 15 | y: makeMutable(index * height) 16 | })) 17 | 18 | return ( 19 | 22 | {children.map((child, index) => ( 23 | 24 | {child} 25 | 26 | ))} 27 | 28 | ) 29 | } 30 | 31 | export { SortableList } 32 | -------------------------------------------------------------------------------- /src/components/AnimatedCard.tsx: -------------------------------------------------------------------------------- 1 | import { Colors } from '@src/theme' 2 | import React, { FC } from 'react' 3 | import { StyleProp, StyleSheet, ViewStyle } from 'react-native' 4 | import Animated, { useAnimatedStyle } from 'react-native-reanimated' 5 | 6 | export const CARD_WIDTH = 330 7 | export const CARD_HEIGHT = 170 8 | 9 | const styles = StyleSheet.create({ 10 | container: { 11 | width: CARD_WIDTH, 12 | height: CARD_HEIGHT, 13 | borderRadius: 20, 14 | backgroundColor: Colors.primary 15 | } 16 | }) 17 | 18 | export type Props = { 19 | style?: StyleProp, 20 | height: Animated.SharedValue 21 | } 22 | 23 | const AnimatedCard: FC = function ({ children, style, height }) { 24 | 25 | const animatedStyle = useAnimatedStyle(() => ({ 26 | height: height.value 27 | })) 28 | 29 | return ( 30 | 31 | { children } 32 | 33 | ) 34 | } 35 | 36 | export { AnimatedCard } 37 | -------------------------------------------------------------------------------- /src/screens/animations/D3Chart/d3/index.tsx: -------------------------------------------------------------------------------- 1 | import { useLinearCurve } from './d3Curves' 2 | import { usePath } from './d3Path' 3 | 4 | 5 | 6 | // const COLORS = new Map([ 7 | // [0, '#EFF7CF'], 8 | // [1, '#BAD9B5'], 9 | // [2, '#ABA361'], 10 | // [3, '#732C2C'] 11 | // ]) 12 | 13 | 14 | type DataItem = [number, number] 15 | 16 | type ScaleX = (d: number, index: number, data: DataItem[]) => number 17 | type ScaleY = (d: number, index: number, data: DataItem[]) => number 18 | const useLine = function (data: DataItem[], scaleX: ScaleX, scaleY: ScaleY) { 19 | const path = usePath() 20 | const curve = useLinearCurve(path) 21 | 22 | const getLine = function () { 23 | curve.lineStart() 24 | for (let i = 0; i < data.length; i++) { 25 | curve.point( 26 | scaleX(data[i][0], i, data), 27 | scaleY(data[i][1], i, data) 28 | ) 29 | } 30 | curve.lineEnd() 31 | 32 | return path.path.value 33 | } 34 | 35 | return { getLine } 36 | } 37 | 38 | export { useLine } 39 | -------------------------------------------------------------------------------- /.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 | # Visual Studio Code 33 | # 34 | .vscode/ 35 | 36 | # node.js 37 | # 38 | node_modules/ 39 | npm-debug.log 40 | yarn-error.log 41 | 42 | # BUCK 43 | buck-out/ 44 | \.buckd/ 45 | *.keystore 46 | !debug.keystore 47 | 48 | # fastlane 49 | # 50 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 51 | # screenshots whenever they are needed. 52 | # For more information about the recommended setup visit: 53 | # https://docs.fastlane.tools/best-practices/source-control/ 54 | 55 | */fastlane/report.xml 56 | */fastlane/Preview.html 57 | */fastlane/screenshots 58 | 59 | # Bundle artifact 60 | *.jsbundle 61 | 62 | # CocoaPods 63 | /ios/Pods/ 64 | -------------------------------------------------------------------------------- /src/screens/animations/LinechartScreen/GraphModal.tsx: -------------------------------------------------------------------------------- 1 | import { Colors } from '@src/theme' 2 | import React from 'react' 3 | import { StyleSheet, useWindowDimensions, View } from 'react-native' 4 | import { NavigationFunctionComponent as RNNFC } from 'react-native-navigation' 5 | import { Linechart, LineItem } from './Linechart' 6 | 7 | const styles = StyleSheet.create({ 8 | container: { 9 | flex: 1, 10 | justifyContent: 'center', 11 | alignItems: 'center' 12 | } 13 | }) 14 | 15 | export type Props = { 16 | lines: LineItem[] 17 | } 18 | 19 | const GraphModal: RNNFC = function ({ lines }) { 20 | const { width, height } = useWindowDimensions() 21 | return ( 22 | 23 | 32 | 33 | ) 34 | } 35 | 36 | export { GraphModal } 37 | -------------------------------------------------------------------------------- /src/components/Button.tsx: -------------------------------------------------------------------------------- 1 | import { Colors } from '@src/theme' 2 | import React, { FC } from 'react' 3 | import { StyleProp, StyleSheet, Text, TextStyle, ViewStyle } from 'react-native' 4 | import { RectButton, RectButtonProperties } from 'react-native-gesture-handler' 5 | 6 | const styles = StyleSheet.create({ 7 | container: { 8 | height: 80, 9 | width: 200, 10 | backgroundColor: Colors.secondary, 11 | borderRadius: 10, 12 | justifyContent: 'center', 13 | alignItems: 'center' 14 | }, 15 | labelText: { 16 | fontSize: 20, 17 | color: Colors.white 18 | } 19 | }) 20 | 21 | export type Props = RectButtonProperties & { 22 | label: string 23 | style?: StyleProp 24 | labelStyle?: StyleProp 25 | } 26 | 27 | const Button: FC = function (props) { 28 | const { label, style, labelStyle, ...rest } = props 29 | return ( 30 | 31 | { label } 32 | 33 | ) 34 | } 35 | 36 | export { Button } 37 | -------------------------------------------------------------------------------- /ios/RnAnimationsPlayground/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "scale" : "1x", 46 | "size" : "1024x1024" 47 | } 48 | ], 49 | "info" : { 50 | "author" : "xcode", 51 | "version" : 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /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, '12.0' 5 | 6 | # Ignore warnings from all pods 7 | inhibit_all_warnings! 8 | 9 | target 'RnAnimationsPlayground' do 10 | config = use_native_modules! 11 | 12 | use_react_native!( 13 | :path => config[:reactNativePath], 14 | # to enable hermes on iOS, change `false` to `true` and then install pods 15 | :hermes_enabled => true 16 | ) 17 | 18 | target 'RnAnimationsPlaygroundTests' do 19 | inherit! :complete 20 | # Pods for testing 21 | end 22 | 23 | # Enables Flipper. 24 | # 25 | # Note that if you have use_frameworks! enabled, Flipper will not work and 26 | # you should disable these next few lines. 27 | use_flipper!() 28 | 29 | 30 | post_install do |installer| 31 | react_native_post_install(installer) 32 | __apply_Xcode_12_5_M1_post_install_workaround(installer) 33 | end 34 | end 35 | 36 | target 'RnAnimationsPlayground-tvOS' do 37 | # Pods for RnAnimationsPlayground-tvOS 38 | 39 | target 'RnAnimationsPlayground-tvOSTests' do 40 | inherit! :search_paths 41 | # Pods for testing 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /src/screens/animations/CalendarScreen/WeeklyCalendar/locales.json: -------------------------------------------------------------------------------- 1 | { 2 | "fr": { 3 | "monthNames": [ 4 | "Janvier", 5 | "Février", 6 | "Mars", 7 | "Avril", 8 | "Mai", 9 | "Juin", 10 | "Juillet", 11 | "Août", 12 | "Septembre", 13 | "Octobre", 14 | "Novembre", 15 | "Décembre" 16 | ], 17 | "monthNamesShort": [ 18 | "Janv.", 19 | "Févr.", 20 | "Mars", 21 | "Avril", 22 | "Mai", 23 | "Juin", 24 | "Juil.", 25 | "Août", 26 | "Sept.", 27 | "Oct.", 28 | "Nov.", 29 | "Déc." 30 | ], 31 | "dayNames": [ "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi" ], 32 | "dayNamesShort": [ "Dim.", "Lun.", "Mar.", "Mer.", "Jeu.", "Ven.", "Sam." ] 33 | }, 34 | "en": { 35 | "monthNames": [ 36 | "January", 37 | "February", 38 | "March", 39 | "April", 40 | "May", 41 | "June", 42 | "July", 43 | "August", 44 | "September", 45 | "October", 46 | "November", 47 | "December" 48 | ], 49 | "monthNamesShort": [ 50 | "Jan.", 51 | "Feb.", 52 | "Mar.", 53 | "Apr.", 54 | "May", 55 | "Jun.", 56 | "Jul.", 57 | "Aug.", 58 | "Sep.", 59 | "Oct.", 60 | "Nov.", 61 | "Dec." 62 | ], 63 | "dayNames": [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], 64 | "dayNamesShort": [ "Sun.", "Mon.", "Tue.", "Wed.", "Thu.", "Fri.", "Sat." ] 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/screens/animations/ModalDemoScreen/index.tsx: -------------------------------------------------------------------------------- 1 | import { Button } from '@src/components' 2 | import React from 'react' 3 | import { StyleSheet, View } from 'react-native' 4 | import { 5 | Navigation, 6 | NavigationFunctionComponent as RNNFC 7 | } from 'react-native-navigation' 8 | 9 | const styles = StyleSheet.create({ 10 | container: { 11 | flex: 1, 12 | alignItems: 'center', 13 | justifyContent: 'center' 14 | }, 15 | btn: { 16 | height: 40, 17 | width: 110 18 | }, 19 | labelText: { fontSize: 14, textAlign: 'center' } 20 | }) 21 | 22 | export type Props = {} 23 | 24 | const ModalDemoScreen: RNNFC = function ({ }) { 25 | const onModalPress = () => { 26 | Navigation.showModal({ 27 | component: { 28 | name: 'ModalScreen' 29 | } 30 | }) 31 | } 32 | 33 | return ( 34 | 35 |