diff --git a/example/android/app/src/main/assets/custom/umbrella.riv b/example/android/app/src/main/assets/custom/umbrella.riv new file mode 100644 index 00000000..08eacbf4 Binary files /dev/null and b/example/android/app/src/main/assets/custom/umbrella.riv differ diff --git a/example/android/link-assets-manifest.json b/example/android/link-assets-manifest.json index 88ef8333..0bb9a105 100644 --- a/example/android/link-assets-manifest.json +++ b/example/android/link-assets-manifest.json @@ -104,6 +104,10 @@ { "path": "assets/fonts/DMMono/DMMono-Medium.ttf", "sha1": "0ceec76262c08cec6c956e1ffe2bfc60321e8f58" + }, + { + "path": "assets/animated-pictograms/umbrella.riv", + "sha1": "60b9b7f80dace88630bc26fecee60a33ed85aeb0" } ] } diff --git a/example/assets/animated-pictograms/umbrella.riv b/example/assets/animated-pictograms/umbrella.riv new file mode 100644 index 00000000..08eacbf4 Binary files /dev/null and b/example/assets/animated-pictograms/umbrella.riv differ diff --git a/example/ios/ExampleApp.xcodeproj/project.pbxproj b/example/ios/ExampleApp.xcodeproj/project.pbxproj index 8f25af66..8fb04a2f 100644 --- a/example/ios/ExampleApp.xcodeproj/project.pbxproj +++ b/example/ios/ExampleApp.xcodeproj/project.pbxproj @@ -40,6 +40,7 @@ E8EF3336542140A88B10BFF7 /* TitilliumWeb-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 16CF61663EAF4B46B3B81980 /* TitilliumWeb-Regular.ttf */; }; EC846EA2DBCB4719B953F423 /* TitilliumSansPro-Thin-Italic.otf in Resources */ = {isa = PBXBuildFile; fileRef = 3DE40C756739486AA1D51FCE /* TitilliumSansPro-Thin-Italic.otf */; }; ECADF86EA3F140C6A74EFA09 /* TitilliumSansPro-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = FBA458C5509E42A59CD6F632 /* TitilliumSansPro-Regular.otf */; }; + 1E4EFB88CD2C4972A59FCFFE /* umbrella.riv in Resources */ = {isa = PBXBuildFile; fileRef = D7FF5F5BF549432188423043 /* umbrella.riv */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -96,6 +97,7 @@ EC225F8C27DC4CB7A37B9FF3 /* TitilliumWeb-SemiBold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "TitilliumWeb-SemiBold.ttf"; path = "../assets/fonts/TitilliumWeb/TitilliumWeb-SemiBold.ttf"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; FBA458C5509E42A59CD6F632 /* TitilliumSansPro-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "TitilliumSansPro-Regular.otf"; path = "../assets/fonts/TitilliumSansPro/TitilliumSansPro-Regular.otf"; sourceTree = ""; }; + D7FF5F5BF549432188423043 /* umbrella.riv */ = {isa = PBXFileReference; name = "umbrella.riv"; path = "../assets/animated-pictograms/umbrella.riv"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -219,6 +221,7 @@ 3DE40C756739486AA1D51FCE /* TitilliumSansPro-Thin-Italic.otf */, 4FC6145EC4A14796982CAE22 /* TitilliumSansPro-Thin.otf */, 1CFF1D50D36F43F2BC0D124F /* LICENSE.txt */, + D7FF5F5BF549432188423043 /* umbrella.riv */, ); name = Resources; path = ""; @@ -357,6 +360,7 @@ EC846EA2DBCB4719B953F423 /* TitilliumSansPro-Thin-Italic.otf in Resources */, 116E6480B9914941A6254F71 /* TitilliumSansPro-Thin.otf in Resources */, 493FA456AB57478891021E84 /* LICENSE.txt in Resources */, + 1E4EFB88CD2C4972A59FCFFE /* umbrella.riv in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/example/ios/Podfile b/example/ios/Podfile index 81443d94..296b02b4 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -5,7 +5,7 @@ require Pod::Executable.execute_command('node', ['-p', {paths: [process.argv[1]]}, )', __dir__]).strip -platform :ios, min_ios_version_supported +platform :ios, 14 prepare_react_native_project! # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 6ff699ad..dce780c3 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -489,6 +489,10 @@ PODS: - React-jsi (= 0.72.12) - React-logger (= 0.72.12) - React-perflogger (= 0.72.12) + - rive-react-native (6.2.3): + - React-Core + - RiveRuntime (= 5.5.1) + - RiveRuntime (5.5.1) - RNGestureHandler (2.12.1): - React-Core - RNReactNativeHapticFeedback (2.0.3): @@ -597,6 +601,7 @@ DEPENDENCIES: - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) + - rive-react-native (from `../node_modules/rive-react-native`) - RNGestureHandler (from `../node_modules/react-native-gesture-handler`) - RNReactNativeHapticFeedback (from `../node_modules/react-native-haptic-feedback`) - RNReanimated (from `../node_modules/react-native-reanimated`) @@ -618,6 +623,7 @@ SPEC REPOS: - fmt - libevent - OpenSSL-Universal + - RiveRuntime - SocketRocket - YogaKit @@ -702,6 +708,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/react/utils" ReactCommon: :path: "../node_modules/react-native/ReactCommon" + rive-react-native: + :path: "../node_modules/rive-react-native" RNGestureHandler: :path: "../node_modules/react-native-gesture-handler" RNReactNativeHapticFeedback: @@ -768,6 +776,8 @@ SPEC CHECKSUMS: React-runtimescheduler: 8aea338c561b2175f47018124c076d89d3808d30 React-utils: 9a24cb88f950d1020ee55bddacbc8c16a611e2dc ReactCommon: 76843a9bb140596351ac2786257ac9fe60cafabb + rive-react-native: 79777686cb29eaba6a28a0534fe82c8b8da41b4a + RiveRuntime: b57830ff73f406f3b4022f457b16690535ca4d05 RNGestureHandler: c0d04458598fcb26052494ae23dda8f8f5162b13 RNReactNativeHapticFeedback: afa5bf2794aecbb2dba2525329253da0d66656df RNReanimated: 53ca20eee770c41173703f5948cd8898aa08262c @@ -777,6 +787,6 @@ SPEC CHECKSUMS: Yoga: 87e59f6d458e5061d2421086c5de994b3f7cd151 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 3682f715bd91b22067ed6990af779570157f6eb0 +PODFILE CHECKSUM: 010bd9ba87e5ea0fc1a226bb7757f51655b8e9c8 COCOAPODS: 1.15.2 diff --git a/example/ios/link-assets-manifest.json b/example/ios/link-assets-manifest.json index 88ef8333..0bb9a105 100644 --- a/example/ios/link-assets-manifest.json +++ b/example/ios/link-assets-manifest.json @@ -104,6 +104,10 @@ { "path": "assets/fonts/DMMono/DMMono-Medium.ttf", "sha1": "0ceec76262c08cec6c956e1ffe2bfc60321e8f58" + }, + { + "path": "assets/animated-pictograms/umbrella.riv", + "sha1": "60b9b7f80dace88630bc26fecee60a33ed85aeb0" } ] } diff --git a/example/package.json b/example/package.json index 92739b06..93f8a81a 100644 --- a/example/package.json +++ b/example/package.json @@ -29,6 +29,7 @@ "react-native-safe-area-context": "^4.7.1", "react-native-screens": "^3.23.0", "react-native-svg": "^15.1.0", + "rive-react-native": "^6.2.3", "rn-placeholder": "^3.0.3" }, "devDependencies": { diff --git a/example/react-native.config.js b/example/react-native.config.js index b5858f3e..ab818c78 100644 --- a/example/react-native.config.js +++ b/example/react-native.config.js @@ -14,6 +14,7 @@ module.exports = { "./assets/fonts/TitilliumWeb", "./assets/fonts/TitilliumSansPro", "./assets/fonts/ReadexPro", - "./assets/fonts/DMMono" + "./assets/fonts/DMMono", + "./assets/animated-pictograms" ] }; diff --git a/example/src/navigation/navigator.tsx b/example/src/navigation/navigator.tsx index e57f423c..07889b9b 100644 --- a/example/src/navigation/navigator.tsx +++ b/example/src/navigation/navigator.tsx @@ -1,22 +1,23 @@ import { HeaderSecondLevel, - ModalBSHeader, IOStyles, IOThemeDark, IOThemeLight, + ModalBSHeader, useIOThemeContext } from "@pagopa/io-app-design-system"; -import { createNativeStackNavigator } from "@react-navigation/native-stack"; -import React from "react"; import { DarkTheme, DefaultTheme, NavigationContainer } from "@react-navigation/native"; +import { createNativeStackNavigator } from "@react-navigation/native-stack"; +import React from "react"; import { GestureHandlerRootView } from "react-native-gesture-handler"; import { Accordion } from "../pages/Accordion"; import { DSAdvice } from "../pages/Advice"; import { DSAlert } from "../pages/Alert"; +import { AnimatedPictograms } from "../pages/AnimatedPictograms"; import { Badges } from "../pages/Badges"; import { Buttons } from "../pages/Buttons"; import { Colors } from "../pages/Colors"; @@ -139,6 +140,14 @@ const AppNavigator = () => { headerBackTitleVisible: false }} /> + ( + + {/*

+ Animated pictograms +

*/} + +
+); diff --git a/example/yarn.lock b/example/yarn.lock index 0cb2643a..1060357c 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -4582,6 +4582,11 @@ rimraf@~2.6.2: dependencies: glob "^7.1.3" +rive-react-native@^6.2.3: + version "6.2.3" + resolved "https://registry.yarnpkg.com/rive-react-native/-/rive-react-native-6.2.3.tgz#358cf427940960b0d8c49975f3fe865fd98ee74c" + integrity sha512-oOhalZdCTCiSXDBR/YIYQtBmfunxKCZioCIjsQ/C+sd51b0G1hxk4TqDl4f0zE7iFC3y3k57G0aIL5+N+iYZhA== + rn-placeholder@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/rn-placeholder/-/rn-placeholder-3.0.3.tgz#98f635b263ee003af2a984eed32d86ade308df35"