react-native-platform-components 1.2.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 (77) hide show
  1. package/README.md +9 -1
  2. package/android/src/main/java/com/platformcomponents/PCNativeThemeModule.kt +3 -0
  3. package/android/src/main/java/com/platformcomponents/PCSegmentedControlView.kt +2 -2
  4. package/android/src/main/java/com/platformcomponents/PlatformComponentsPackage.kt +9 -6
  5. package/android/src/main/jni/CMakeLists.txt +13 -1
  6. package/ios/PCNativeThemeModule.mm +13 -0
  7. package/ios/PCSelectionMenu.swift +9 -1
  8. package/lib/commonjs/ContextMenuNativeComponent.ts +5 -4
  9. package/lib/commonjs/DatePickerNativeComponent.ts +17 -11
  10. package/lib/commonjs/LiquidGlass.js +24 -4
  11. package/lib/commonjs/LiquidGlass.js.map +1 -1
  12. package/lib/commonjs/LiquidGlassNativeComponent.ts +6 -5
  13. package/lib/commonjs/NativePlatformComponentsTheme.js.map +1 -1
  14. package/lib/commonjs/SegmentedControlNativeComponent.ts +12 -11
  15. package/lib/commonjs/SelectionMenuNativeComponent.ts +6 -5
  16. package/lib/commonjs/codegenTypes.js +6 -0
  17. package/lib/commonjs/codegenTypes.js.map +1 -0
  18. package/lib/module/ContextMenuNativeComponent.ts +5 -4
  19. package/lib/module/DatePickerNativeComponent.ts +17 -11
  20. package/lib/module/LiquidGlass.js +24 -4
  21. package/lib/module/LiquidGlass.js.map +1 -1
  22. package/lib/module/LiquidGlassNativeComponent.ts +6 -5
  23. package/lib/module/NativePlatformComponentsTheme.js.map +1 -1
  24. package/lib/module/SegmentedControlNativeComponent.ts +12 -11
  25. package/lib/module/SelectionMenuNativeComponent.ts +6 -5
  26. package/lib/module/codegenTypes.js +4 -0
  27. package/lib/module/codegenTypes.js.map +1 -0
  28. package/lib/typescript/commonjs/src/ContextMenuNativeComponent.d.ts +5 -4
  29. package/lib/typescript/commonjs/src/ContextMenuNativeComponent.d.ts.map +1 -1
  30. package/lib/typescript/commonjs/src/DatePickerNativeComponent.d.ts +12 -11
  31. package/lib/typescript/commonjs/src/DatePickerNativeComponent.d.ts.map +1 -1
  32. package/lib/typescript/commonjs/src/LiquidGlass.d.ts +4 -3
  33. package/lib/typescript/commonjs/src/LiquidGlass.d.ts.map +1 -1
  34. package/lib/typescript/commonjs/src/LiquidGlassNativeComponent.d.ts +6 -5
  35. package/lib/typescript/commonjs/src/LiquidGlassNativeComponent.d.ts.map +1 -1
  36. package/lib/typescript/commonjs/src/NativePlatformComponentsTheme.d.ts +10 -2
  37. package/lib/typescript/commonjs/src/NativePlatformComponentsTheme.d.ts.map +1 -1
  38. package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts +7 -6
  39. package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts.map +1 -1
  40. package/lib/typescript/commonjs/src/SelectionMenuNativeComponent.d.ts +6 -5
  41. package/lib/typescript/commonjs/src/SelectionMenuNativeComponent.d.ts.map +1 -1
  42. package/lib/typescript/commonjs/src/codegenTypes.d.ts +12 -0
  43. package/lib/typescript/commonjs/src/codegenTypes.d.ts.map +1 -0
  44. package/lib/typescript/commonjs/src/sharedTypes.d.ts +2 -2
  45. package/lib/typescript/commonjs/src/sharedTypes.d.ts.map +1 -1
  46. package/lib/typescript/module/src/ContextMenuNativeComponent.d.ts +5 -4
  47. package/lib/typescript/module/src/ContextMenuNativeComponent.d.ts.map +1 -1
  48. package/lib/typescript/module/src/DatePickerNativeComponent.d.ts +12 -11
  49. package/lib/typescript/module/src/DatePickerNativeComponent.d.ts.map +1 -1
  50. package/lib/typescript/module/src/LiquidGlass.d.ts +4 -3
  51. package/lib/typescript/module/src/LiquidGlass.d.ts.map +1 -1
  52. package/lib/typescript/module/src/LiquidGlassNativeComponent.d.ts +6 -5
  53. package/lib/typescript/module/src/LiquidGlassNativeComponent.d.ts.map +1 -1
  54. package/lib/typescript/module/src/NativePlatformComponentsTheme.d.ts +10 -2
  55. package/lib/typescript/module/src/NativePlatformComponentsTheme.d.ts.map +1 -1
  56. package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts +7 -6
  57. package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts.map +1 -1
  58. package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts +6 -5
  59. package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts.map +1 -1
  60. package/lib/typescript/module/src/codegenTypes.d.ts +12 -0
  61. package/lib/typescript/module/src/codegenTypes.d.ts.map +1 -0
  62. package/lib/typescript/module/src/sharedTypes.d.ts +2 -2
  63. package/lib/typescript/module/src/sharedTypes.d.ts.map +1 -1
  64. package/package.json +4 -3
  65. package/shared/PCDatePickerState-custom.h +2 -2
  66. package/shared/PCSegmentedControlState-custom.h +2 -2
  67. package/shared/PCSelectionMenuState-custom.h +2 -2
  68. package/src/ContextMenuNativeComponent.ts +5 -4
  69. package/src/DatePickerNativeComponent.ts +17 -11
  70. package/src/LiquidGlass.tsx +24 -5
  71. package/src/LiquidGlassNativeComponent.ts +6 -5
  72. package/src/NativePlatformComponentsTheme.ts +11 -2
  73. package/src/SegmentedControlNativeComponent.ts +12 -11
  74. package/src/SelectionMenuNativeComponent.ts +6 -5
  75. package/src/codegenTypes.ts +40 -0
  76. package/src/sharedTypes.ts +2 -2
  77. /package/{app.plugin.cjs → app.plugin.js} +0 -0
@@ -1,4 +1,5 @@
1
- import type { CodegenTypes, HostComponent, ViewProps } from 'react-native';
1
+ import type { HostComponent, ViewProps } from 'react-native';
2
+ import type { DirectEventHandler, Float, WithDefault } from './codegenTypes.js';
2
3
  /**
3
4
  * Glass effect intensity/style.
4
5
  * - 'clear': More transparent, subtle glass effect
@@ -54,9 +55,9 @@ export type LiquidGlassAndroidProps = Readonly<{
54
55
  */
55
56
  export type LiquidGlassPressEvent = Readonly<{
56
57
  /** X coordinate of touch relative to view bounds */
57
- x: CodegenTypes.Float;
58
+ x: Float;
58
59
  /** Y coordinate of touch relative to view bounds */
59
- y: CodegenTypes.Float;
60
+ y: Float;
60
61
  }>;
61
62
  export interface LiquidGlassNativeProps extends ViewProps {
62
63
  /**
@@ -64,7 +65,7 @@ export interface LiquidGlassNativeProps extends ViewProps {
64
65
  * Applied uniformly to all corners.
65
66
  * @default 0
66
67
  */
67
- cornerRadius?: CodegenTypes.WithDefault<CodegenTypes.Float, 0>;
68
+ cornerRadius?: WithDefault<Float, 0>;
68
69
  /**
69
70
  * iOS-specific props.
70
71
  */
@@ -77,7 +78,7 @@ export interface LiquidGlassNativeProps extends ViewProps {
77
78
  * Fired when the glass view is pressed.
78
79
  * Includes touch coordinates relative to view bounds.
79
80
  */
80
- onGlassPress?: CodegenTypes.DirectEventHandler<LiquidGlassPressEvent>;
81
+ onGlassPress?: DirectEventHandler<LiquidGlassPressEvent>;
81
82
  }
82
83
  declare const _default: HostComponent<LiquidGlassNativeProps>;
83
84
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"LiquidGlassNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/LiquidGlassNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG3E;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ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AAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,oDAAoD;IACpD,CAAC,EAAE,KAAK,CAAC;IACT,oDAAoD;IACpD,CAAC,EAAE,KAAK,CAAC;CACV,CAAC,CAAC;AAEH,MAAM,WAAW,sBAAuB,SAAQ,SAAS;IACvD;;;;OAIG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAErC;;OAEG;IACH,GAAG,CAAC,EAAE,mBAAmB,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,uBAAuB,CAAC;IAElC;;;OAGG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;CAC1D;wBAII,aAAa,CAAC,sBAAsB,CAAC;AAF1C,wBAE2C"}
@@ -1,10 +1,18 @@
1
- import type { CodegenTypes, TurboModule } from 'react-native';
1
+ import type { TurboModule } from 'react-native';
2
+ import type { UnsafeObject } from './codegenTypes.js';
2
3
  export interface Spec extends TurboModule {
3
4
  /**
4
5
  * `{ primary }`, where `primary` is a color from `processColor`. An empty
5
6
  * object restores the app's own theme colors.
6
7
  */
7
- setTheme(theme: CodegenTypes.UnsafeObject): void;
8
+ setTheme(theme: UnsafeObject): void;
9
+ /**
10
+ * Whether this build can render Liquid Glass: true only when the library was
11
+ * compiled against the iOS 26 SDK *and* the device runs iOS 26 or newer.
12
+ * Built with an older Xcode, the glass code is compiled out and the views
13
+ * fall back to a blur, so the device version alone cannot answer this.
14
+ */
15
+ isLiquidGlassSupported(): boolean;
8
16
  }
9
17
  declare const _default: Spec | null | undefined;
10
18
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"NativePlatformComponentsTheme.d.ts","sourceRoot":"","sources":["../../../../src/NativePlatformComponentsTheme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG9D,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC,YAAY,GAAG,IAAI,CAAC;CAClD;;AAED,wBAAwE"}
1
+ {"version":3,"file":"NativePlatformComponentsTheme.d.ts","sourceRoot":"","sources":["../../../../src/NativePlatformComponentsTheme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAgB,CAAC;AAEnD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAEpC;;;;;OAKG;IACH,sBAAsB,IAAI,OAAO,CAAC;CACnC;;AAED,wBAAwE"}
@@ -1,4 +1,5 @@
1
- import type { CodegenTypes, ColorValue, HostComponent, ViewProps } from 'react-native';
1
+ import type { ColorValue, HostComponent, ViewProps } from 'react-native';
2
+ import type { BubblingEventHandler, Double, Int32, WithDefault } from './codegenTypes.js';
2
3
  /**
3
4
  * A single segment in the control.
4
5
  *
@@ -13,7 +14,7 @@ export type SegmentedControlSegment = Readonly<{
13
14
  iconType: string;
14
15
  iconName: string;
15
16
  iconUri: string;
16
- iconScale: CodegenTypes.Double;
17
+ iconScale: Double;
17
18
  iconTinted: string;
18
19
  badge: string;
19
20
  accessibilityLabel: string;
@@ -23,7 +24,7 @@ export type SegmentedControlSegment = Readonly<{
23
24
  */
24
25
  export type SegmentedControlSelectEvent = Readonly<{
25
26
  /** Selected segment index. -1 means the selection was cleared. */
26
- index: CodegenTypes.Int32;
27
+ index: Int32;
27
28
  /** Selected segment value. Empty when the selection was cleared. */
28
29
  value: string;
29
30
  }>;
@@ -36,7 +37,7 @@ export type SegmentedControlLabelVisibility = 'auto' | 'labeled' | 'unlabeled';
36
37
  */
37
38
  export type LabelStyleProps = Readonly<{
38
39
  fontFamily?: string;
39
- fontSize?: CodegenTypes.Double;
40
+ fontSize?: Double;
40
41
  fontWeight?: string;
41
42
  fontStyle?: string;
42
43
  }>;
@@ -65,7 +66,7 @@ export interface SegmentedControlProps extends ViewProps {
65
66
  * Controlled selection by `value`.
66
67
  * Empty string means "no selection".
67
68
  */
68
- selectedValue?: CodegenTypes.WithDefault<string, ''>;
69
+ selectedValue?: WithDefault<string, ''>;
69
70
  /**
70
71
  * Enabled / disabled state.
71
72
  */
@@ -93,7 +94,7 @@ export interface SegmentedControlProps extends ViewProps {
93
94
  /**
94
95
  * Fired when the user selects a segment.
95
96
  */
96
- onSelect?: CodegenTypes.BubblingEventHandler<SegmentedControlSelectEvent>;
97
+ onSelect?: BubblingEventHandler<SegmentedControlSelectEvent>;
97
98
  ios?: IOSProps;
98
99
  android?: AndroidProps;
99
100
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentedControlNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/SegmentedControlNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,aAAa,EACb,SAAS,EACV,MAAM,cAAc,CAAC;AAGtB;;;;;;GAMG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC;IAC/B,U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AEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,0CAA0C;IAC1C,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAElC,iDAAiD;IACjD,eAAe,CAAC,EAAE,UAAU,CAAC;IAE7B,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAE/B,qDAAqD;IACrD,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAEhC,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAEhC,kBAAkB;IAClB,UAAU,CAAC,EAAE,eAAe,CAAC;IAE7B,8CAA8C;IAC9C,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAElC,yCAAyC;IACzC,cAAc,CAAC,EAAE,UAAU,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,2BAA2B,CAAC,CAAC;IAE1E,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;wBAII,aAAa,CAAC,qBAAqB,CAAC;AAFzC,wBAE0C"}
1
+ {"version":3,"file":"SegmentedControlNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/SegmentedControlNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,KAAK,EACV,oBAAoB,EACpB,MAAM,EACN,KAAK,EACL,WAAW,EACZ,MAAM,mBAAgB,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,U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;IAEzB,0CAA0C;IAC1C,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAElC,iDAAiD;IACjD,eAAe,CAAC,EAAE,UAAU,CAAC;IAE7B,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAE/B,qDAAqD;IACrD,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAEhC,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAEhC,kBAAkB;IAClB,UAAU,CAAC,EAAE,eAAe,CAAC;IAE7B,8CAA8C;IAC9C,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAElC,yCAAyC;IACzC,cAAc,CAAC,EAAE,UAAU,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC,2BAA2B,CAAC,CAAC;IAE7D,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;wBAII,aAAa,CAAC,qBAAqB,CAAC;AAFzC,wBAE0C"}
@@ -1,4 +1,5 @@
1
- import type { CodegenTypes, HostComponent, ViewProps } from 'react-native';
1
+ import type { HostComponent, ViewProps } from 'react-native';
2
+ import type { BubblingEventHandler, Int32, WithDefault } from './codegenTypes.js';
2
3
  /**
3
4
  * A single option in the menu.
4
5
  */
@@ -11,7 +12,7 @@ export type SelectionMenuOption = Readonly<{
11
12
  */
12
13
  export type SelectionMenuSelectEvent = Readonly<{
13
14
  /** Selected option index (implementation detail; stable for this render) */
14
- index: CodegenTypes.Int32;
15
+ index: Int32;
15
16
  /** Selected option label */
16
17
  label: string;
17
18
  /** Selected option data payload (source of truth) */
@@ -44,7 +45,7 @@ export interface SelectionMenuProps extends ViewProps {
44
45
  * - Empty string means "no selection".
45
46
  * - Native should treat this as the single source of truth.
46
47
  */
47
- selectedData?: CodegenTypes.WithDefault<string, ''>;
48
+ selectedData?: WithDefault<string, ''>;
48
49
  /**
49
50
  * Enabled / disabled state.
50
51
  */
@@ -65,11 +66,11 @@ export interface SelectionMenuProps extends ViewProps {
65
66
  /**
66
67
  * Fired when the user selects an option.
67
68
  */
68
- onSelect?: CodegenTypes.BubblingEventHandler<SelectionMenuSelectEvent>;
69
+ onSelect?: BubblingEventHandler<SelectionMenuSelectEvent>;
69
70
  /**
70
71
  * Fired when dismissed without selection.
71
72
  */
72
- onRequestClose?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
73
+ onRequestClose?: BubblingEventHandler<Readonly<{}>>;
73
74
  ios?: IOSProps;
74
75
  android?: AndroidProps;
75
76
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionMenuNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/SelectionMenuNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG3E;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,4EAA4E;IAC5E,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC;IAE1B,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IAEd,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AAEH,6CAA6C;AAC7C,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAErD,yCAAyC;AACzC,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG,UAAU,CAAC;AAEhE,qCAAqC;AACrC,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AAEpC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,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
1
+ import type { NativeSyntheticEvent } from 'react-native';
2
+ export type BubblingEventHandler<T, _PaperName extends string | never = never> = (event: NativeSyntheticEvent<T>) => void | Promise<void>;
3
+ export type DirectEventHandler<T, _PaperName extends string | never = never> = (event: NativeSyntheticEvent<T>) => void | Promise<void>;
4
+ export type Double = number;
5
+ export type Float = number;
6
+ export type Int32 = number;
7
+ export type UnsafeObject = object;
8
+ export type UnsafeMixed = unknown;
9
+ type DefaultTypes = number | boolean | string | ReadonlyArray<string>;
10
+ export type WithDefault<Type extends DefaultTypes, _Value extends Type | string | undefined | null> = Type | undefined | null;
11
+ export {};
12
+ //# sourceMappingURL=codegenTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codegenTypes.d.ts","sourceRoot":"","sources":["../../../../src/codegenTypes.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAIzD,MAAM,MAAM,oBAAoB,CAC9B,CAAC,EACD,UAAU,SAAS,MAAM,GAAG,KAAK,GAAG,KAAK,IACvC,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAE7D,MAAM,MAAM,kBAAkB,CAAC,CAAC,EAAE,UAAU,SAAS,MAAM,GAAG,KAAK,GAAG,KAAK,IAAI,CAC7E,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAC3B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAG1B,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAC5B,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAC3B,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAC3B,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;AAElC,KAAK,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;AAEtE,MAAM,MAAM,WAAW,CACrB,IAAI,SAAS,YAAY,EACzB,MAAM,SAAS,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,IAC7C,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { CodegenTypes } from 'react-native';
1
+ import type { BubblingEventHandler } from './codegenTypes.js';
2
2
  /** Shared "open/closed" control state. */
3
3
  export type Visible = 'open' | 'closed';
4
4
  /** Shared presentation mode for pickers/menus. */
@@ -8,5 +8,5 @@ export type AndroidMaterialMode = 'system' | 'm3';
8
8
  /** Common event empty payload type. */
9
9
  export type EmptyEvent = Readonly<{}>;
10
10
  /** Convenience alias (optional). */
11
- export type Bubbling<T> = CodegenTypes.BubblingEventHandler<T>;
11
+ export type Bubbling<T> = BubblingEventHandler<T>;
12
12
  //# sourceMappingURL=sharedTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sharedTypes.d.ts","sourceRoot":"","sources":["../../../../src/sharedTypes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,0CAA0C;AAC1C,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAExC,kDAAkD;AAClD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,UAAU,CAAC;AAEhD,4CAA4C;AAC5C,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,IAAI,CAAC;AAElD,uCAAuC;AACvC,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AAEtC,oCAAoC;AACpC,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,YAAY,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"sharedTypes.d.ts","sourceRoot":"","sources":["../../../../src/sharedTypes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAgB,CAAC;AAE3D,0CAA0C;AAC1C,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAExC,kDAAkD;AAClD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,UAAU,CAAC;AAEhD,4CAA4C;AAC5C,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,IAAI,CAAC;AAElD,uCAAuC;AACvC,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AAEtC,oCAAoC;AACpC,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,oBAAoB,CAAC,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-platform-components",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Native UI components for React Native that are native on Android too: DatePicker, ContextMenu, SelectionMenu, SegmentedControl (Material 3) and LiquidGlass (iOS 26). Fabric, typed, Expo config plugin.",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "module": "./lib/module/index.js",
@@ -28,7 +28,8 @@
28
28
  }
29
29
  },
30
30
  "./package.json": "./package.json",
31
- "./app.plugin": "./app.plugin.cjs"
31
+ "./app.plugin": "./app.plugin.js",
32
+ "./app.plugin.js": "./app.plugin.js"
32
33
  },
33
34
  "files": [
34
35
  "src",
@@ -40,7 +41,7 @@
40
41
  "plugin",
41
42
  "*.podspec",
42
43
  "react-native.config.js",
43
- "app.plugin.cjs",
44
+ "app.plugin.js",
44
45
  "expo-module.config.json",
45
46
  "!ios/build",
46
47
  "!android/build",
@@ -3,7 +3,7 @@
3
3
  #include <react/renderer/core/LayoutPrimitives.h>
4
4
  #include <memory>
5
5
 
6
- #ifdef RN_SERIALIZABLE_STATE
6
+ #if defined(RN_SERIALIZABLE_STATE) || defined(ANDROID)
7
7
  #include <folly/dynamic.h>
8
8
  #include <react/renderer/mapbuffer/MapBuffer.h>
9
9
  #include <react/renderer/mapbuffer/MapBufferBuilder.h>
@@ -37,7 +37,7 @@ struct PCDatePickerStateFrameSize {
37
37
  return !(*this == other);
38
38
  }
39
39
 
40
- #ifdef RN_SERIALIZABLE_STATE
40
+ #if defined(RN_SERIALIZABLE_STATE) || defined(ANDROID)
41
41
  // Required for Android state serialization
42
42
  PCDatePickerStateFrameSize(
43
43
  const PCDatePickerStateFrameSize& previousState,
@@ -3,7 +3,7 @@
3
3
  #include <react/renderer/core/LayoutPrimitives.h>
4
4
  #include <memory>
5
5
 
6
- #ifdef RN_SERIALIZABLE_STATE
6
+ #if defined(RN_SERIALIZABLE_STATE) || defined(ANDROID)
7
7
  #include <folly/dynamic.h>
8
8
  #include <react/renderer/mapbuffer/MapBuffer.h>
9
9
  #include <react/renderer/mapbuffer/MapBufferBuilder.h>
@@ -34,7 +34,7 @@ struct PCSegmentedControlStateFrameSize {
34
34
  return !(*this == other);
35
35
  }
36
36
 
37
- #ifdef RN_SERIALIZABLE_STATE
37
+ #if defined(RN_SERIALIZABLE_STATE) || defined(ANDROID)
38
38
  // Required for Android state serialization
39
39
  PCSegmentedControlStateFrameSize(
40
40
  const PCSegmentedControlStateFrameSize& previousState,
@@ -3,7 +3,7 @@
3
3
  #include <react/renderer/core/LayoutPrimitives.h>
4
4
  #include <memory>
5
5
 
6
- #ifdef RN_SERIALIZABLE_STATE
6
+ #if defined(RN_SERIALIZABLE_STATE) || defined(ANDROID)
7
7
  #include <folly/dynamic.h>
8
8
  #include <react/renderer/mapbuffer/MapBuffer.h>
9
9
  #include <react/renderer/mapbuffer/MapBufferBuilder.h>
@@ -37,7 +37,7 @@ struct PCSelectionMenuStateFrameSize {
37
37
  return !(*this == other);
38
38
  }
39
39
 
40
- #ifdef RN_SERIALIZABLE_STATE
40
+ #if defined(RN_SERIALIZABLE_STATE) || defined(ANDROID)
41
41
  // Required for Android state serialization
42
42
  PCSelectionMenuStateFrameSize(
43
43
  const PCSelectionMenuStateFrameSize& previousState,
@@ -1,6 +1,7 @@
1
1
  // ContextMenuNativeComponent.ts
2
- import type { CodegenTypes, HostComponent, ViewProps } from 'react-native';
2
+ import type { HostComponent, ViewProps } from 'react-native';
3
3
  import { codegenNativeComponent } from 'react-native';
4
+ import type { BubblingEventHandler } from './codegenTypes';
4
5
 
5
6
  /**
6
7
  * Attributes for a context menu action.
@@ -120,17 +121,17 @@ export interface ContextMenuProps extends ViewProps {
120
121
  /**
121
122
  * Fired when user presses an action.
122
123
  */
123
- onPressAction?: CodegenTypes.BubblingEventHandler<ContextMenuPressActionEvent>;
124
+ onPressAction?: BubblingEventHandler<ContextMenuPressActionEvent>;
124
125
 
125
126
  /**
126
127
  * Fired when menu opens.
127
128
  */
128
- onMenuOpen?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
129
+ onMenuOpen?: BubblingEventHandler<Readonly<{}>>;
129
130
 
130
131
  /**
131
132
  * Fired when menu closes.
132
133
  */
133
- onMenuClose?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
134
+ onMenuClose?: BubblingEventHandler<Readonly<{}>>;
134
135
 
135
136
  ios?: IOSProps;
136
137
  android?: AndroidProps;
@@ -1,11 +1,17 @@
1
1
  // DatePickerNativeComponent.ts
2
- import type { CodegenTypes, HostComponent, ViewProps } from 'react-native';
2
+ import type { HostComponent, ViewProps } from 'react-native';
3
3
  import { codegenNativeComponent } from 'react-native';
4
+ import type {
5
+ BubblingEventHandler,
6
+ Double,
7
+ Int32,
8
+ WithDefault,
9
+ } from './codegenTypes';
4
10
 
5
- export type TimestampMs = CodegenTypes.Double;
11
+ export type TimestampMs = Double;
6
12
 
7
13
  export type DateChangeEvent = {
8
- timestampMs: CodegenTypes.Double;
14
+ timestampMs: Double;
9
15
  confirmed: boolean;
10
16
  };
11
17
 
@@ -18,14 +24,14 @@ export type IOSConfirmToolbar = 'show' | 'hide';
18
24
 
19
25
  export type IOSProps = {
20
26
  preferredStyle?: string; // IOSDatePickerStyle
21
- countDownDurationSeconds?: CodegenTypes.Double;
22
- minuteInterval?: CodegenTypes.Int32;
27
+ countDownDurationSeconds?: Double;
28
+ minuteInterval?: Int32;
23
29
  roundsToMinuteInterval?: string; // IOSRoundsToMinuteInterval
24
30
  confirmToolbar?: string; // IOSConfirmToolbar
25
31
  };
26
32
 
27
33
  export type AndroidProps = {
28
- firstDayOfWeek?: CodegenTypes.Int32;
34
+ firstDayOfWeek?: Int32;
29
35
  material?: string; // AndroidMaterialMode
30
36
  dialogTitle?: string;
31
37
  positiveButtonTitle?: string;
@@ -44,9 +50,9 @@ export type MacOSProps = Readonly<{}>;
44
50
  export type CommonProps = {
45
51
  mode?: string; // DatePickerMode
46
52
 
47
- dateMs?: CodegenTypes.WithDefault<TimestampMs, -9007199254740991>;
48
- minDateMs?: CodegenTypes.WithDefault<TimestampMs, -9007199254740991>;
49
- maxDateMs?: CodegenTypes.WithDefault<TimestampMs, -9007199254740991>;
53
+ dateMs?: WithDefault<TimestampMs, -9007199254740991>;
54
+ minDateMs?: WithDefault<TimestampMs, -9007199254740991>;
55
+ maxDateMs?: WithDefault<TimestampMs, -9007199254740991>;
50
56
 
51
57
  locale?: string;
52
58
  timeZoneName?: string;
@@ -65,8 +71,8 @@ export interface NativeProps extends ViewProps, CommonProps {
65
71
  ios?: IOSProps;
66
72
  android?: AndroidProps;
67
73
 
68
- onConfirm?: CodegenTypes.BubblingEventHandler<DateChangeEvent>;
69
- onClosed?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
74
+ onConfirm?: BubblingEventHandler<DateChangeEvent>;
75
+ onClosed?: BubblingEventHandler<Readonly<{}>>;
70
76
  }
71
77
 
72
78
  export default codegenNativeComponent<NativeProps>(
@@ -7,6 +7,7 @@ import NativeLiquidGlass, {
7
7
  type LiquidGlassEffect,
8
8
  type LiquidGlassPressEvent,
9
9
  } from './LiquidGlassNativeComponent';
10
+ import NativePlatformComponentsTheme from './NativePlatformComponentsTheme';
10
11
 
11
12
  export type {
12
13
  LiquidGlassEffect,
@@ -14,14 +15,32 @@ export type {
14
15
  LiquidGlassPressEvent,
15
16
  };
16
17
 
18
+ function resolveLiquidGlassSupport(): boolean {
19
+ if (Platform.OS !== 'ios') {
20
+ return false;
21
+ }
22
+ try {
23
+ // The native module answers for this build: Liquid Glass is compiled out
24
+ // when the library is built with an Xcode that predates the iOS 26 SDK,
25
+ // and then no device version makes it available.
26
+ const supported = NativePlatformComponentsTheme?.isLiquidGlassSupported();
27
+ if (typeof supported === 'boolean') {
28
+ return supported;
29
+ }
30
+ } catch {
31
+ // Native module not available (web, tests): fall back to the OS version.
32
+ }
33
+ return parseInt(String(Platform.Version), 10) >= 26;
34
+ }
35
+
17
36
  /**
18
- * Whether the LiquidGlass effect is supported on the current device.
19
- * Returns true on iOS 26+ (with Liquid Glass support), false otherwise.
37
+ * Whether the LiquidGlass effect is supported here: iOS 26 or newer, in a
38
+ * build compiled against the iOS 26 SDK. False on Android, on older iOS, and
39
+ * in builds made with an older Xcode, where the views fall back to a blur.
20
40
  *
21
- * Use this to conditionally render fallback UI on unsupported devices.
41
+ * Use this to conditionally render fallback UI.
22
42
  */
23
- export const isLiquidGlassSupported: boolean =
24
- Platform.OS === 'ios' && parseInt(String(Platform.Version), 10) >= 26;
43
+ export const isLiquidGlassSupported: boolean = resolveLiquidGlassSupport();
25
44
 
26
45
  export interface LiquidGlassProps extends ViewProps {
27
46
  /**
@@ -1,6 +1,7 @@
1
1
  // LiquidGlassNativeComponent.ts
2
- import type { CodegenTypes, HostComponent, ViewProps } from 'react-native';
2
+ import type { HostComponent, ViewProps } from 'react-native';
3
3
  import { codegenNativeComponent } from 'react-native';
4
+ import type { DirectEventHandler, Float, WithDefault } from './codegenTypes';
4
5
 
5
6
  /**
6
7
  * Glass effect intensity/style.
@@ -64,9 +65,9 @@ export type LiquidGlassAndroidProps = Readonly<{
64
65
  */
65
66
  export type LiquidGlassPressEvent = Readonly<{
66
67
  /** X coordinate of touch relative to view bounds */
67
- x: CodegenTypes.Float;
68
+ x: Float;
68
69
  /** Y coordinate of touch relative to view bounds */
69
- y: CodegenTypes.Float;
70
+ y: Float;
70
71
  }>;
71
72
 
72
73
  export interface LiquidGlassNativeProps extends ViewProps {
@@ -75,7 +76,7 @@ export interface LiquidGlassNativeProps extends ViewProps {
75
76
  * Applied uniformly to all corners.
76
77
  * @default 0
77
78
  */
78
- cornerRadius?: CodegenTypes.WithDefault<CodegenTypes.Float, 0>;
79
+ cornerRadius?: WithDefault<Float, 0>;
79
80
 
80
81
  /**
81
82
  * iOS-specific props.
@@ -91,7 +92,7 @@ export interface LiquidGlassNativeProps extends ViewProps {
91
92
  * Fired when the glass view is pressed.
92
93
  * Includes touch coordinates relative to view bounds.
93
94
  */
94
- onGlassPress?: CodegenTypes.DirectEventHandler<LiquidGlassPressEvent>;
95
+ onGlassPress?: DirectEventHandler<LiquidGlassPressEvent>;
95
96
  }
96
97
 
97
98
  export default codegenNativeComponent<LiquidGlassNativeProps>(
@@ -1,13 +1,22 @@
1
1
  // NativePlatformComponentsTheme.ts
2
- import type { CodegenTypes, TurboModule } from 'react-native';
2
+ import type { TurboModule } from 'react-native';
3
3
  import { TurboModuleRegistry } from 'react-native';
4
+ import type { UnsafeObject } from './codegenTypes';
4
5
 
5
6
  export interface Spec extends TurboModule {
6
7
  /**
7
8
  * `{ primary }`, where `primary` is a color from `processColor`. An empty
8
9
  * object restores the app's own theme colors.
9
10
  */
10
- setTheme(theme: CodegenTypes.UnsafeObject): void;
11
+ setTheme(theme: UnsafeObject): void;
12
+
13
+ /**
14
+ * Whether this build can render Liquid Glass: true only when the library was
15
+ * compiled against the iOS 26 SDK *and* the device runs iOS 26 or newer.
16
+ * Built with an older Xcode, the glass code is compiled out and the views
17
+ * fall back to a blur, so the device version alone cannot answer this.
18
+ */
19
+ isLiquidGlassSupported(): boolean;
11
20
  }
12
21
 
13
22
  export default TurboModuleRegistry.get<Spec>('PlatformComponentsTheme');
@@ -1,11 +1,12 @@
1
1
  // SegmentedControlNativeComponent.ts
2
- import type {
3
- CodegenTypes,
4
- ColorValue,
5
- HostComponent,
6
- ViewProps,
7
- } from 'react-native';
2
+ import type { ColorValue, HostComponent, ViewProps } from 'react-native';
8
3
  import { codegenNativeComponent } from 'react-native';
4
+ import type {
5
+ BubblingEventHandler,
6
+ Double,
7
+ Int32,
8
+ WithDefault,
9
+ } from './codegenTypes';
9
10
 
10
11
  /**
11
12
  * A single segment in the control.
@@ -21,7 +22,7 @@ export type SegmentedControlSegment = Readonly<{
21
22
  iconType: string; // '' | 'sfSymbol' | 'drawable' | 'image'
22
23
  iconName: string; // SF Symbol (iOS) or drawable resource name (Android)
23
24
  iconUri: string; // Resolved image URI when iconType === 'image'
24
- iconScale: CodegenTypes.Double; // Resolved image scale when iconType === 'image'
25
+ iconScale: Double; // Resolved image scale when iconType === 'image'
25
26
  iconTinted: string; // 'true' | 'false' — draw the image as a tinted template
26
27
  badge: string; // Badge text, empty = no badge
27
28
  accessibilityLabel: string; // Screen-reader label, empty = use label
@@ -32,7 +33,7 @@ export type SegmentedControlSegment = Readonly<{
32
33
  */
33
34
  export type SegmentedControlSelectEvent = Readonly<{
34
35
  /** Selected segment index. -1 means the selection was cleared. */
35
- index: CodegenTypes.Int32;
36
+ index: Int32;
36
37
 
37
38
  /** Selected segment value. Empty when the selection was cleared. */
38
39
  value: string;
@@ -49,7 +50,7 @@ export type SegmentedControlLabelVisibility = 'auto' | 'labeled' | 'unlabeled';
49
50
  */
50
51
  export type LabelStyleProps = Readonly<{
51
52
  fontFamily?: string;
52
- fontSize?: CodegenTypes.Double;
53
+ fontSize?: Double;
53
54
  fontWeight?: string; // 'normal' | 'bold' | '100'..'900'
54
55
  fontStyle?: string; // 'normal' | 'italic'
55
56
  }>;
@@ -83,7 +84,7 @@ export interface SegmentedControlProps extends ViewProps {
83
84
  * Controlled selection by `value`.
84
85
  * Empty string means "no selection".
85
86
  */
86
- selectedValue?: CodegenTypes.WithDefault<string, ''>;
87
+ selectedValue?: WithDefault<string, ''>;
87
88
 
88
89
  /**
89
90
  * Enabled / disabled state.
@@ -122,7 +123,7 @@ export interface SegmentedControlProps extends ViewProps {
122
123
  /**
123
124
  * Fired when the user selects a segment.
124
125
  */
125
- onSelect?: CodegenTypes.BubblingEventHandler<SegmentedControlSelectEvent>;
126
+ onSelect?: BubblingEventHandler<SegmentedControlSelectEvent>;
126
127
 
127
128
  ios?: IOSProps;
128
129
  android?: AndroidProps;
@@ -1,6 +1,7 @@
1
1
  // SelectionMenuNativeComponent.ts
2
- import type { CodegenTypes, HostComponent, ViewProps } from 'react-native';
2
+ import type { HostComponent, ViewProps } from 'react-native';
3
3
  import { codegenNativeComponent } from 'react-native';
4
+ import type { BubblingEventHandler, Int32, WithDefault } from './codegenTypes';
4
5
 
5
6
  /**
6
7
  * A single option in the menu.
@@ -15,7 +16,7 @@ export type SelectionMenuOption = Readonly<{
15
16
  */
16
17
  export type SelectionMenuSelectEvent = Readonly<{
17
18
  /** Selected option index (implementation detail; stable for this render) */
18
- index: CodegenTypes.Int32;
19
+ index: Int32;
19
20
 
20
21
  /** Selected option label */
21
22
  label: string;
@@ -57,7 +58,7 @@ export interface SelectionMenuProps extends ViewProps {
57
58
  * - Empty string means "no selection".
58
59
  * - Native should treat this as the single source of truth.
59
60
  */
60
- selectedData?: CodegenTypes.WithDefault<string, ''>;
61
+ selectedData?: WithDefault<string, ''>;
61
62
 
62
63
  /**
63
64
  * Enabled / disabled state.
@@ -83,12 +84,12 @@ export interface SelectionMenuProps extends ViewProps {
83
84
  /**
84
85
  * Fired when the user selects an option.
85
86
  */
86
- onSelect?: CodegenTypes.BubblingEventHandler<SelectionMenuSelectEvent>;
87
+ onSelect?: BubblingEventHandler<SelectionMenuSelectEvent>;
87
88
 
88
89
  /**
89
90
  * Fired when dismissed without selection.
90
91
  */
91
- onRequestClose?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
92
+ onRequestClose?: BubblingEventHandler<Readonly<{}>>;
92
93
 
93
94
  ios?: IOSProps;
94
95
  android?: AndroidProps;