react-native-platform-components 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/README.md +23 -12
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/platformcomponents/PCDatePickerView.kt +46 -2
  4. package/android/src/main/java/com/platformcomponents/PCNativeTheme.kt +174 -0
  5. package/android/src/main/java/com/platformcomponents/PCNativeThemeModule.kt +45 -0
  6. package/android/src/main/java/com/platformcomponents/PCSegmentedControlView.kt +36 -3
  7. package/android/src/main/java/com/platformcomponents/PCSelectionMenuView.kt +14 -0
  8. package/android/src/main/java/com/platformcomponents/PCThemeSupport.kt +40 -5
  9. package/android/src/main/java/com/platformcomponents/PlatformComponentsPackage.kt +25 -5
  10. package/android/src/main/jni/CMakeLists.txt +13 -1
  11. package/android/src/main/res/values/styles.xml +131 -0
  12. package/ios/PCNativeTheme.swift +56 -0
  13. package/ios/PCNativeThemeModule.mm +49 -0
  14. package/ios/PCSelectionMenu.swift +9 -1
  15. package/lib/commonjs/ContextMenuNativeComponent.ts +5 -4
  16. package/lib/commonjs/DatePickerNativeComponent.ts +17 -11
  17. package/lib/commonjs/LiquidGlass.js +24 -4
  18. package/lib/commonjs/LiquidGlass.js.map +1 -1
  19. package/lib/commonjs/LiquidGlassNativeComponent.ts +6 -5
  20. package/lib/commonjs/NativePlatformComponentsTheme.js +10 -0
  21. package/lib/commonjs/NativePlatformComponentsTheme.js.map +1 -0
  22. package/lib/commonjs/NativeTheme.js +51 -0
  23. package/lib/commonjs/NativeTheme.js.map +1 -0
  24. package/lib/commonjs/SegmentedControlNativeComponent.ts +12 -11
  25. package/lib/commonjs/SelectionMenuNativeComponent.ts +6 -5
  26. package/lib/commonjs/codegenTypes.js +6 -0
  27. package/lib/commonjs/codegenTypes.js.map +1 -0
  28. package/lib/commonjs/index.js +11 -0
  29. package/lib/commonjs/index.js.map +1 -1
  30. package/lib/commonjs/index.web.js +10 -1
  31. package/lib/commonjs/index.web.js.map +1 -1
  32. package/lib/module/ContextMenuNativeComponent.ts +5 -4
  33. package/lib/module/DatePickerNativeComponent.ts +17 -11
  34. package/lib/module/LiquidGlass.js +24 -4
  35. package/lib/module/LiquidGlass.js.map +1 -1
  36. package/lib/module/LiquidGlassNativeComponent.ts +6 -5
  37. package/lib/module/NativePlatformComponentsTheme.js +7 -0
  38. package/lib/module/NativePlatformComponentsTheme.js.map +1 -0
  39. package/lib/module/NativeTheme.js +45 -0
  40. package/lib/module/NativeTheme.js.map +1 -0
  41. package/lib/module/SegmentedControlNativeComponent.ts +12 -11
  42. package/lib/module/SelectionMenuNativeComponent.ts +6 -5
  43. package/lib/module/codegenTypes.js +4 -0
  44. package/lib/module/codegenTypes.js.map +1 -0
  45. package/lib/module/index.js +1 -0
  46. package/lib/module/index.js.map +1 -1
  47. package/lib/module/index.web.js +7 -0
  48. package/lib/module/index.web.js.map +1 -1
  49. package/lib/typescript/commonjs/src/ContextMenuNativeComponent.d.ts +5 -4
  50. package/lib/typescript/commonjs/src/ContextMenuNativeComponent.d.ts.map +1 -1
  51. package/lib/typescript/commonjs/src/DatePickerNativeComponent.d.ts +12 -11
  52. package/lib/typescript/commonjs/src/DatePickerNativeComponent.d.ts.map +1 -1
  53. package/lib/typescript/commonjs/src/LiquidGlass.d.ts +4 -3
  54. package/lib/typescript/commonjs/src/LiquidGlass.d.ts.map +1 -1
  55. package/lib/typescript/commonjs/src/LiquidGlassNativeComponent.d.ts +6 -5
  56. package/lib/typescript/commonjs/src/LiquidGlassNativeComponent.d.ts.map +1 -1
  57. package/lib/typescript/commonjs/src/NativePlatformComponentsTheme.d.ts +19 -0
  58. package/lib/typescript/commonjs/src/NativePlatformComponentsTheme.d.ts.map +1 -0
  59. package/lib/typescript/commonjs/src/NativeTheme.d.ts +30 -0
  60. package/lib/typescript/commonjs/src/NativeTheme.d.ts.map +1 -0
  61. package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts +7 -6
  62. package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts.map +1 -1
  63. package/lib/typescript/commonjs/src/SelectionMenuNativeComponent.d.ts +6 -5
  64. package/lib/typescript/commonjs/src/SelectionMenuNativeComponent.d.ts.map +1 -1
  65. package/lib/typescript/commonjs/src/codegenTypes.d.ts +12 -0
  66. package/lib/typescript/commonjs/src/codegenTypes.d.ts.map +1 -0
  67. package/lib/typescript/commonjs/src/index.d.ts +1 -0
  68. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/src/index.web.d.ts +8 -1
  70. package/lib/typescript/commonjs/src/index.web.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/src/sharedTypes.d.ts +2 -2
  72. package/lib/typescript/commonjs/src/sharedTypes.d.ts.map +1 -1
  73. package/lib/typescript/module/src/ContextMenuNativeComponent.d.ts +5 -4
  74. package/lib/typescript/module/src/ContextMenuNativeComponent.d.ts.map +1 -1
  75. package/lib/typescript/module/src/DatePickerNativeComponent.d.ts +12 -11
  76. package/lib/typescript/module/src/DatePickerNativeComponent.d.ts.map +1 -1
  77. package/lib/typescript/module/src/LiquidGlass.d.ts +4 -3
  78. package/lib/typescript/module/src/LiquidGlass.d.ts.map +1 -1
  79. package/lib/typescript/module/src/LiquidGlassNativeComponent.d.ts +6 -5
  80. package/lib/typescript/module/src/LiquidGlassNativeComponent.d.ts.map +1 -1
  81. package/lib/typescript/module/src/NativePlatformComponentsTheme.d.ts +19 -0
  82. package/lib/typescript/module/src/NativePlatformComponentsTheme.d.ts.map +1 -0
  83. package/lib/typescript/module/src/NativeTheme.d.ts +30 -0
  84. package/lib/typescript/module/src/NativeTheme.d.ts.map +1 -0
  85. package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts +7 -6
  86. package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts.map +1 -1
  87. package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts +6 -5
  88. package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts.map +1 -1
  89. package/lib/typescript/module/src/codegenTypes.d.ts +12 -0
  90. package/lib/typescript/module/src/codegenTypes.d.ts.map +1 -0
  91. package/lib/typescript/module/src/index.d.ts +1 -0
  92. package/lib/typescript/module/src/index.d.ts.map +1 -1
  93. package/lib/typescript/module/src/index.web.d.ts +8 -1
  94. package/lib/typescript/module/src/index.web.d.ts.map +1 -1
  95. package/lib/typescript/module/src/sharedTypes.d.ts +2 -2
  96. package/lib/typescript/module/src/sharedTypes.d.ts.map +1 -1
  97. package/package.json +8 -4
  98. package/shared/PCDatePickerState-custom.h +2 -2
  99. package/shared/PCSegmentedControlState-custom.h +2 -2
  100. package/shared/PCSelectionMenuState-custom.h +2 -2
  101. package/src/ContextMenuNativeComponent.ts +5 -4
  102. package/src/DatePickerNativeComponent.ts +17 -11
  103. package/src/LiquidGlass.tsx +24 -5
  104. package/src/LiquidGlassNativeComponent.ts +6 -5
  105. package/src/NativePlatformComponentsTheme.ts +22 -0
  106. package/src/NativeTheme.ts +53 -0
  107. package/src/SegmentedControlNativeComponent.ts +12 -11
  108. package/src/SelectionMenuNativeComponent.ts +6 -5
  109. package/src/codegenTypes.ts +40 -0
  110. package/src/index.tsx +1 -0
  111. package/src/index.web.tsx +17 -1
  112. package/src/sharedTypes.ts +2 -2
  113. /package/{app.plugin.cjs → app.plugin.js} +0 -0
package/src/index.web.tsx CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  import React from 'react';
7
7
  import type { ReactNode } from 'react';
8
- import type { StyleProp, ViewStyle, ViewProps } from 'react-native';
8
+ import type { ColorValue, StyleProp, ViewStyle, ViewProps } from 'react-native';
9
9
 
10
10
  // ============================================================================
11
11
  // Shared Types (duplicated to avoid importing from files with native deps)
@@ -182,3 +182,19 @@ export const LiquidGlass = ({
182
182
  };
183
183
 
184
184
  export const isLiquidGlassSupported = false;
185
+
186
+ // ============================================================================
187
+ // Native theme
188
+ // ============================================================================
189
+
190
+ export type NativeTheme = {
191
+ colors: {
192
+ primary: ColorValue;
193
+ };
194
+ };
195
+
196
+ export const setNativeTheme = (_theme: NativeTheme | null): void => {};
197
+
198
+ export const useNativeTheme = (
199
+ _theme: NativeTheme | null | undefined
200
+ ): void => {};
@@ -1,5 +1,5 @@
1
1
  // SharedTypes.ts
2
- import type { CodegenTypes } from 'react-native';
2
+ import type { BubblingEventHandler } from './codegenTypes';
3
3
 
4
4
  /** Shared "open/closed" control state. */
5
5
  export type Visible = 'open' | 'closed';
@@ -14,4 +14,4 @@ export type AndroidMaterialMode = 'system' | 'm3';
14
14
  export type EmptyEvent = Readonly<{}>;
15
15
 
16
16
  /** Convenience alias (optional). */
17
- export type Bubbling<T> = CodegenTypes.BubblingEventHandler<T>;
17
+ export type Bubbling<T> = BubblingEventHandler<T>;
File without changes