react-native-macos/React/Base
Joel Arvidsson 36c0a7dec1 Support user-defined PlatformColors on iOS (#31258)
Summary:
Original PR: https://github.com/facebook/react-native/pull/31258

## Imported PR from Github:

This is a continuation of https://github.com/facebook/react-native/pull/29683. I've talked to danilobuerger who does not intend on continue work on it and is OK with me picking up where he left. This PR is identical besides adding a test case in the RN Tester app as requested in the original PR.

In summary it gives iOS feature parity with Android in the sense that one can use user-defined native colors, something even the docs claim is possible. It's useful as it enables accessibility features such as high contrast colors and makes implementing dark mode simple. For an example on how it can be used, see https://github.com/klarna-incubator/platform-colors

## Changelog

[iOS] [Added] - Allow PlatformColor to return user-defined named asset color

Pull Request resolved: https://github.com/facebook/react-native/pull/31258

Test Plan: Test case added to RN Tester.

Reviewed By: sammy-SC

Differential Revision: D28803206

Pulled By: p-sun

fbshipit-source-id: e0f0690274799bd2d09c9f9d1a6a95ac0f979498
2021-06-10 12:15:12 -07:00
..
Surface iOS: make RCTSurfaceHostingView have default backgroundColor 2021-04-23 19:54:54 -07:00
RCTAssert.h Apply clang-format 2021-05-20 21:24:25 -07:00
RCTAssert.m iOS new architecture: disallow disabling enforcement when RCT_NEW_ARCHITECTURE is defined 2021-04-29 19:46:10 -07:00
RCTBridge+Private.h Make LeakChecker available on Android 2021-05-21 10:39:43 -07:00
RCTBridge.h Remove gating for block guard 2021-05-06 20:00:15 -07:00
RCTBridge.m Remove gating for block guard 2021-05-06 20:00:15 -07:00
RCTBridgeDelegate.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTBridgeMethod.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTBridgeModule.h Introduce RCTCallableJSModules 2021-05-14 09:22:58 -07:00
RCTBundleManager.m Migrate RCTDevMenu over to RCTBundleManager 2021-05-04 18:33:23 -07:00
RCTBundleURLProvider.h iOS: allow disabling packager access at runtime 2021-04-22 08:15:28 -07:00
RCTBundleURLProvider.mm iOS: allow disabling packager access at runtime 2021-04-22 08:15:28 -07:00
RCTCallableJSModules.m Introduce RCTCallableJSModules 2021-05-14 09:22:58 -07:00
RCTComponentEvent.h Make RCTEventDispatcher TurboModule-compatible 2020-10-14 02:40:10 -07:00
RCTComponentEvent.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTConstants.h Fix for ScrollView race condition between C++ state update and onScroll 2021-05-26 03:32:03 -07:00
RCTConstants.m Fix for ScrollView race condition between C++ state update and onScroll 2021-05-26 03:32:03 -07:00
RCTConvert.h Mark RN method as requiring iOS 10+ 2020-08-05 14:49:07 -07:00
RCTConvert.m Support user-defined PlatformColors on iOS (#31258) 2021-06-10 12:15:12 -07:00
RCTCxxConvert.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTCxxConvert.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTDefines.h iOS: Introduced RCT_NEW_ARCHITECTURE build flag to separate old vs new architecture 2021-04-14 19:47:31 -07:00
RCTDisplayLink.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTDisplayLink.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTErrorCustomizer.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTErrorInfo.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTErrorInfo.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTEventDispatcher.m Make RCTEventDispatcher TurboModule-compatible 2020-10-14 02:40:10 -07:00
RCTEventDispatcherProtocol.h Bridgeless Mode: Migrate modules away from invokeJS 2021-05-14 09:22:58 -07:00
RCTFrameUpdate.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTFrameUpdate.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTImageSource.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTImageSource.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTInitializing.h Introduce RCTInitializing 2021-05-20 19:19:57 -07:00
RCTInvalidating.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTJSScriptLoaderModule.h Fix loading from Metro in Bridgeless mode (#29453) 2020-07-23 17:11:32 -07:00
RCTJSStackFrame.h Fix Xcode warnings in React-Core pod (#29622) 2020-09-09 12:48:09 -07:00
RCTJSStackFrame.m Fix Xcode warnings in React-Core pod (#29622) 2020-09-09 12:48:09 -07:00
RCTJavaScriptExecutor.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTJavaScriptLoader.h Remove legacy bytecode handling 2020-06-16 02:12:09 -07:00
RCTJavaScriptLoader.mm Bytecode client for Android (#30595) 2020-12-16 16:03:57 -08:00
RCTKeyCommands.h Remove unused double key press code 2020-05-26 20:18:02 -07:00
RCTKeyCommands.m Fix Xcode warnings in React-Core pod (#29622) 2020-09-09 12:48:09 -07:00
RCTLog.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTLog.mm Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTManagedPointer.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTManagedPointer.mm Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTModuleData.h Attach RCTCallableJSModules to NativeModules 2021-05-14 09:22:58 -07:00
RCTModuleData.mm Call RCTInitializing initialize on NativeModules 2021-05-20 19:19:57 -07:00
RCTModuleMethod.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTModuleMethod.mm Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTModuleRegistry.m Introduce RCTModuleRegistry 2020-12-10 20:23:16 -08:00
RCTMultipartDataTask.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTMultipartDataTask.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTMultipartStreamReader.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTMultipartStreamReader.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTNullability.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTParserUtils.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTParserUtils.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTPerformanceLogger.h Add new ReactMarkers for bridgeless mode [1/n] 2020-10-30 14:05:11 -07:00
RCTPerformanceLogger.m Add new ReactMarkers for bridgeless mode [1/n] 2020-10-30 14:05:11 -07:00
RCTRedBoxSetEnabled.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTRedBoxSetEnabled.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTReloadCommand.h Fix Reload stats 2019-11-18 16:17:09 -08:00
RCTReloadCommand.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTRootContentView.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTRootContentView.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTRootView.h Allow RCTRootView to be initialized with a frame 2021-03-16 15:08:09 -07:00
RCTRootView.m Allow RCTRootView to be initialized with a frame 2021-03-16 15:08:09 -07:00
RCTRootViewDelegate.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTRootViewInternal.h remove most of tvOS remnants from the code (#29407) 2020-09-28 21:26:41 -07:00
RCTTouchEvent.h Make RCTEventDispatcher TurboModule-compatible 2020-10-14 02:40:10 -07:00
RCTTouchEvent.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTTouchHandler.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTTouchHandler.m Send unix timestamp for touch events instead of systemUptime 2021-02-28 15:18:51 -08:00
RCTURLRequestDelegate.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTURLRequestHandler.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTUtils.h Proxing NSException stack trace to NSError object 2020-09-08 13:22:54 -07:00
RCTUtils.m Apply clang-format update fixes 2021-01-09 22:11:00 -08:00
RCTUtilsUIOverride.h Fix imports in `RCTUtilsUIOverride.h` (#28946) 2020-05-21 21:12:36 -07:00
RCTUtilsUIOverride.m Allow extensions to set their own presentedViewController 2019-11-22 00:47:22 -08:00
RCTVersion.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTVersion.m Lazily create RCTVersion dict 2019-07-12 16:51:28 -07:00
RCTViewRegistry.m Introduce RCTViewRegistry 2020-12-19 06:01:47 -08:00
RCTWeakProxy.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTWeakProxy.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00