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.
- package/README.md +23 -12
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/platformcomponents/PCDatePickerView.kt +46 -2
- package/android/src/main/java/com/platformcomponents/PCNativeTheme.kt +174 -0
- package/android/src/main/java/com/platformcomponents/PCNativeThemeModule.kt +45 -0
- package/android/src/main/java/com/platformcomponents/PCSegmentedControlView.kt +36 -3
- package/android/src/main/java/com/platformcomponents/PCSelectionMenuView.kt +14 -0
- package/android/src/main/java/com/platformcomponents/PCThemeSupport.kt +40 -5
- package/android/src/main/java/com/platformcomponents/PlatformComponentsPackage.kt +25 -5
- package/android/src/main/jni/CMakeLists.txt +13 -1
- package/android/src/main/res/values/styles.xml +131 -0
- package/ios/PCNativeTheme.swift +56 -0
- package/ios/PCNativeThemeModule.mm +49 -0
- package/ios/PCSelectionMenu.swift +9 -1
- package/lib/commonjs/ContextMenuNativeComponent.ts +5 -4
- package/lib/commonjs/DatePickerNativeComponent.ts +17 -11
- package/lib/commonjs/LiquidGlass.js +24 -4
- package/lib/commonjs/LiquidGlass.js.map +1 -1
- package/lib/commonjs/LiquidGlassNativeComponent.ts +6 -5
- package/lib/commonjs/NativePlatformComponentsTheme.js +10 -0
- package/lib/commonjs/NativePlatformComponentsTheme.js.map +1 -0
- package/lib/commonjs/NativeTheme.js +51 -0
- package/lib/commonjs/NativeTheme.js.map +1 -0
- package/lib/commonjs/SegmentedControlNativeComponent.ts +12 -11
- package/lib/commonjs/SelectionMenuNativeComponent.ts +6 -5
- package/lib/commonjs/codegenTypes.js +6 -0
- package/lib/commonjs/codegenTypes.js.map +1 -0
- package/lib/commonjs/index.js +11 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +10 -1
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/module/ContextMenuNativeComponent.ts +5 -4
- package/lib/module/DatePickerNativeComponent.ts +17 -11
- package/lib/module/LiquidGlass.js +24 -4
- package/lib/module/LiquidGlass.js.map +1 -1
- package/lib/module/LiquidGlassNativeComponent.ts +6 -5
- package/lib/module/NativePlatformComponentsTheme.js +7 -0
- package/lib/module/NativePlatformComponentsTheme.js.map +1 -0
- package/lib/module/NativeTheme.js +45 -0
- package/lib/module/NativeTheme.js.map +1 -0
- package/lib/module/SegmentedControlNativeComponent.ts +12 -11
- package/lib/module/SelectionMenuNativeComponent.ts +6 -5
- package/lib/module/codegenTypes.js +4 -0
- package/lib/module/codegenTypes.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +7 -0
- package/lib/module/index.web.js.map +1 -1
- package/lib/typescript/commonjs/src/ContextMenuNativeComponent.d.ts +5 -4
- package/lib/typescript/commonjs/src/ContextMenuNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/DatePickerNativeComponent.d.ts +12 -11
- package/lib/typescript/commonjs/src/DatePickerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/LiquidGlass.d.ts +4 -3
- package/lib/typescript/commonjs/src/LiquidGlass.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/LiquidGlassNativeComponent.d.ts +6 -5
- package/lib/typescript/commonjs/src/LiquidGlassNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/NativePlatformComponentsTheme.d.ts +19 -0
- package/lib/typescript/commonjs/src/NativePlatformComponentsTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NativeTheme.d.ts +30 -0
- package/lib/typescript/commonjs/src/NativeTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts +7 -6
- package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/SelectionMenuNativeComponent.d.ts +6 -5
- package/lib/typescript/commonjs/src/SelectionMenuNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/codegenTypes.d.ts +12 -0
- package/lib/typescript/commonjs/src/codegenTypes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.web.d.ts +8 -1
- package/lib/typescript/commonjs/src/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/sharedTypes.d.ts +2 -2
- package/lib/typescript/commonjs/src/sharedTypes.d.ts.map +1 -1
- package/lib/typescript/module/src/ContextMenuNativeComponent.d.ts +5 -4
- package/lib/typescript/module/src/ContextMenuNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/DatePickerNativeComponent.d.ts +12 -11
- package/lib/typescript/module/src/DatePickerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/LiquidGlass.d.ts +4 -3
- package/lib/typescript/module/src/LiquidGlass.d.ts.map +1 -1
- package/lib/typescript/module/src/LiquidGlassNativeComponent.d.ts +6 -5
- package/lib/typescript/module/src/LiquidGlassNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/NativePlatformComponentsTheme.d.ts +19 -0
- package/lib/typescript/module/src/NativePlatformComponentsTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/NativeTheme.d.ts +30 -0
- package/lib/typescript/module/src/NativeTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts +7 -6
- package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts +6 -5
- package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/codegenTypes.d.ts +12 -0
- package/lib/typescript/module/src/codegenTypes.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +1 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.web.d.ts +8 -1
- package/lib/typescript/module/src/index.web.d.ts.map +1 -1
- package/lib/typescript/module/src/sharedTypes.d.ts +2 -2
- package/lib/typescript/module/src/sharedTypes.d.ts.map +1 -1
- package/package.json +8 -4
- package/shared/PCDatePickerState-custom.h +2 -2
- package/shared/PCSegmentedControlState-custom.h +2 -2
- package/shared/PCSelectionMenuState-custom.h +2 -2
- package/src/ContextMenuNativeComponent.ts +5 -4
- package/src/DatePickerNativeComponent.ts +17 -11
- package/src/LiquidGlass.tsx +24 -5
- package/src/LiquidGlassNativeComponent.ts +6 -5
- package/src/NativePlatformComponentsTheme.ts +22 -0
- package/src/NativeTheme.ts +53 -0
- package/src/SegmentedControlNativeComponent.ts +12 -11
- package/src/SelectionMenuNativeComponent.ts +6 -5
- package/src/codegenTypes.ts +40 -0
- package/src/index.tsx +1 -0
- package/src/index.web.tsx +17 -1
- package/src/sharedTypes.ts +2 -2
- /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 => {};
|
package/src/sharedTypes.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SharedTypes.ts
|
|
2
|
-
import type {
|
|
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> =
|
|
17
|
+
export type Bubbling<T> = BubblingEventHandler<T>;
|
|
File without changes
|