@react-native-oh/react-native-harmony 0.61.16

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 (82) hide show
  1. package/Libraries/ART/ReactNativeART.js +43 -0
  2. package/Libraries/Animated/Animated.js +154 -0
  3. package/Libraries/Animated/delegates/createAnimatedComponentDelegate.js +20 -0
  4. package/Libraries/Animated/src/Easing.js +20 -0
  5. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +15 -0
  6. package/Libraries/Components/AppleTV/TVEventHandler.js +13 -0
  7. package/Libraries/Components/CheckBox/CheckBox.tsx +182 -0
  8. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.tsx +32 -0
  9. package/Libraries/Components/DatePickerIOS/DatePickerIOS.tsx +285 -0
  10. package/Libraries/Components/MaskedView/MaskedView.tsx +32 -0
  11. package/Libraries/Components/Picker/Picker.tsx +303 -0
  12. package/Libraries/Components/PickerIOS/PickerIOS.tsx +175 -0
  13. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.tsx +156 -0
  14. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.tsx +65 -0
  15. package/Libraries/Components/PushNotificationIOS/PushNotificationIOS.tsx +609 -0
  16. package/Libraries/Components/RefreshControl/RefreshControl.tsx +54 -0
  17. package/Libraries/Components/ScrollView/ScrollView.js +34 -0
  18. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.tsx +79 -0
  19. package/Libraries/Components/Slider/Slider.tsx +204 -0
  20. package/Libraries/Components/TextInput/TextInput.js +24 -0
  21. package/Libraries/Components/TimePickerAndroid/TimePickerAndroid.tsx +20 -0
  22. package/Libraries/Components/Touchable/TouchableOpacity.js +90 -0
  23. package/Libraries/Components/View/ViewPropTypes.js +16 -0
  24. package/Libraries/Components/View/delegate/ViewDelegate.js +49 -0
  25. package/Libraries/Core/ReactNativeVersion.js +21 -0
  26. package/Libraries/Core/polyfillPromise.js +18 -0
  27. package/Libraries/Core/setUpPlatform.js +13 -0
  28. package/Libraries/DeprecatedPropTypes/DeprecatedColorPropType.js +16 -0
  29. package/Libraries/DeprecatedPropTypes/DeprecatedEdgeInsetsPropType.js +16 -0
  30. package/Libraries/DeprecatedPropTypes/DeprecatedImagePropType.js +15 -0
  31. package/Libraries/DeprecatedPropTypes/DeprecatedImageSourcePropType.js +16 -0
  32. package/Libraries/DeprecatedPropTypes/DeprecatedImageStylePropTypes.js +15 -0
  33. package/Libraries/DeprecatedPropTypes/DeprecatedLayoutPropTypes.js +15 -0
  34. package/Libraries/DeprecatedPropTypes/DeprecatedPointPropType.js +16 -0
  35. package/Libraries/DeprecatedPropTypes/DeprecatedShadowPropTypesIOS.js +15 -0
  36. package/Libraries/DeprecatedPropTypes/DeprecatedStyleSheetPropType.js +16 -0
  37. package/Libraries/DeprecatedPropTypes/DeprecatedTVViewPropTypes.js +15 -0
  38. package/Libraries/DeprecatedPropTypes/DeprecatedTextInputPropTypes.js +15 -0
  39. package/Libraries/DeprecatedPropTypes/DeprecatedTextPropTypes.js +16 -0
  40. package/Libraries/DeprecatedPropTypes/DeprecatedTextStylePropTypes.js +15 -0
  41. package/Libraries/DeprecatedPropTypes/DeprecatedTransformPropTypes.js +15 -0
  42. package/Libraries/DeprecatedPropTypes/DeprecatedViewAccessibility.js +15 -0
  43. package/Libraries/DeprecatedPropTypes/DeprecatedViewPropTypes.js +16 -0
  44. package/Libraries/DeprecatedPropTypes/DeprecatedViewStylePropTypes.js +15 -0
  45. package/Libraries/DeprecatedPropTypes/deprecatedCreateStrictShapeTypeChecker.js +20 -0
  46. package/Libraries/EventEmitter/NativeEventEmitter.js +50 -0
  47. package/Libraries/Image/Image.tsx +88 -0
  48. package/Libraries/Promise.js +50 -0
  49. package/Libraries/Storage/AsyncStorage.ts +216 -0
  50. package/Libraries/Storage/helpers.ts +36 -0
  51. package/Libraries/Storage/hooks.ts +19 -0
  52. package/Libraries/Storage/index.ts +5 -0
  53. package/Libraries/Storage/types.ts +43 -0
  54. package/Libraries/StyleSheet/EdgeInsetsPropType.js +15 -0
  55. package/Libraries/StyleSheet/PointPropType.js +15 -0
  56. package/Libraries/Utilities/Platform.harmony.ts +68 -0
  57. package/Libraries/Utilities/setAndForwardRef.js +71 -0
  58. package/README.dev.md +55 -0
  59. package/README.md +146 -0
  60. package/compat/ensurePropTypes.js +45 -0
  61. package/compat/getNoopPropType.js +42 -0
  62. package/compat/restoreRemoveListener.js +117 -0
  63. package/index.js +348 -0
  64. package/package.json +45 -0
  65. package/patched-virtualized-list/VirtualizedList.js +87 -0
  66. package/polyfills/dateSlash.js +89 -0
  67. package/react_native_harmony.har +0 -0
  68. package/src/private/specs/AsyncStorage.ts +37 -0
  69. package/src/private/specs/NativeDatePickerAndroid.ts +27 -0
  70. package/src/private/specs/NativeTimePickerAndroid.ts +28 -0
  71. package/src/private/specs/PushNotificationIOS.ts +167 -0
  72. package/src/private/specs/components/CheckBoxNativeComponent.ts +35 -0
  73. package/src/private/specs/components/DatePickerNativeComponent.ts +40 -0
  74. package/src/private/specs/components/MaskedViewNativeComponent.ts +17 -0
  75. package/src/private/specs/components/PickerIOSNativeComponent.ts +53 -0
  76. package/src/private/specs/components/PickerNativeComponent.ts +67 -0
  77. package/src/private/specs/components/ProgressBarNativeComponent.ts +24 -0
  78. package/src/private/specs/components/ProgressViewNativeComponent.ts +24 -0
  79. package/src/private/specs/components/ProgressWheelNativeComponent.ts +18 -0
  80. package/src/private/specs/components/RNSliderNativeComponent.ts +44 -0
  81. package/src/private/specs/components/SegmentedControlNativeComponent.ts +38 -0
  82. package/src/private/specs/components/TimePickerNativeComponent.ts +40 -0
@@ -0,0 +1,167 @@
1
+ /**
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import type { TurboModule } from "react-native";
9
+ import { TurboModuleRegistry } from "react-native";
10
+
11
+ export type NotificationRequest = {
12
+ /**
13
+ * identifier of the notification.
14
+ * Required in order to retrieve specific notification.
15
+ */
16
+ id: string;
17
+ /**
18
+ * A short description of the reason for the alert.
19
+ */
20
+ title?: string;
21
+ /**
22
+ * A secondary description of the reason for the alert.
23
+ */
24
+ subtitle?: string;
25
+ /**
26
+ * The message displayed in the notification alert.
27
+ */
28
+ body?: string;
29
+ /**
30
+ * The number to display as the app's icon badge.
31
+ */
32
+ badge?: number;
33
+ /**
34
+ * The sound to play when the notification is delivered.
35
+ */
36
+ sound?: string;
37
+ /**
38
+ * The category of this notification. Required for actionable notifications.
39
+ */
40
+ category?: string;
41
+ /**
42
+ * The thread identifier of this notification.
43
+ */
44
+ threadId?: string;
45
+ /**
46
+ * The date which notification triggers.
47
+ */
48
+ fireDate?: string;
49
+ /**
50
+ * Sets notification to repeat daily.
51
+ * Must be used with fireDate.
52
+ */
53
+ repeats?: boolean;
54
+ /**
55
+ * Define what components should be used in the fireDate during repeats.
56
+ * Must be used with repeats and fireDate.
57
+ */
58
+ repeatsComponent?: {
59
+ year?: boolean;
60
+ month?: boolean;
61
+ day?: boolean;
62
+ dayOfWeek?: boolean;
63
+ hour?: boolean;
64
+ minute?: boolean;
65
+ second?: boolean;
66
+ };
67
+ /**
68
+ * Sets notification to be silent
69
+ */
70
+ isSilent?: boolean;
71
+ /**
72
+ * Sets notification to be critical
73
+ */
74
+ isCritical?: boolean;
75
+ /**
76
+ * The volume for the critical alert’s sound. Set this to a value between 0.0 (silent) and 1.0 (full volume).
77
+ */
78
+ criticalSoundVolume?: number;
79
+ /**
80
+ * Optional data to be added to the notification
81
+ */
82
+ userInfo?: Object;
83
+ /**
84
+ * FireDate adjusted automatically upon time zone changes (e.g. for an alarm clock).
85
+ */
86
+ isTimeZoneAgnostic?: boolean;
87
+ };
88
+
89
+ /**
90
+ * Alert Object that can be included in the aps `alert` object
91
+ */
92
+ export type NotificationAlert = {
93
+ title?: string;
94
+ subtitle?: string;
95
+ body?: string;
96
+ };
97
+
98
+ /**
99
+ * Notification Category that can include specific actions
100
+ */
101
+ export type NotificationCategory = {
102
+ /**
103
+ * Identifier of the notification category.
104
+ * Notification with this category will have the specified actions.
105
+ */
106
+ id: string;
107
+ actions: NotificationAction[];
108
+ };
109
+
110
+ /**
111
+ * Notification Action that can be added to specific categories
112
+ */
113
+ export type NotificationAction = {
114
+ /**
115
+ * Identifier of Action.
116
+ * This value will be returned as actionIdentifier when notification is received.
117
+ */
118
+ id: string;
119
+ /**
120
+ * Text to be shown on notification action button.
121
+ */
122
+ title: string;
123
+ /**
124
+ * Option for notification action.
125
+ */
126
+ options?: {
127
+ foreground?: boolean;
128
+ destructive?: boolean;
129
+ authenticationRequired?: boolean;
130
+ };
131
+ /**
132
+ * Option for textInput action.
133
+ * If textInput prop exists, then user action will automatically become a text input action.
134
+ * The text user inputs will be in the userText field of the received notification.
135
+ */
136
+ textInput?: {
137
+ /**
138
+ * Text to be shown on button when user finishes text input.
139
+ * Default is "Send" or its equivalent word in user's language setting.
140
+ */
141
+ buttonTitle?: string;
142
+ /**
143
+ * Placeholder for text input for text input action.
144
+ */
145
+ placeholder?: string;
146
+ };
147
+ };
148
+
149
+ export interface Spec extends TurboModule {
150
+ addNotificationRequest(notificationRequest: NotificationRequest): void;
151
+ removeAllDeliveredNotifications(): void;
152
+ setApplicationIconBadgeNumber(badgeNumber: number): void;
153
+ removeDeliveredNotifications(identifiers: string[]): void;
154
+ getDeliveredNotifications(callback: (result: object[]) => void): void;
155
+ checkPermissions(
156
+ callback: (permission: {
157
+ alert: boolean;
158
+ badge: boolean;
159
+ sound: boolean;
160
+ }) => void
161
+ ): void;
162
+
163
+ addListener(): void;
164
+ removeListeners(): void;
165
+ }
166
+
167
+ export default TurboModuleRegistry.getEnforcing<Spec>("RNPushNotificationIOS");
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
9
+ import type { ViewProps, HostComponent, ProcessedColorValue } from 'react-native';
10
+ import type {
11
+ WithDefault,
12
+ DirectEventHandler,
13
+ Int32,
14
+ } from 'react-native/Libraries/Types/CodegenTypes';
15
+
16
+ type RNCheckBoxOnChangeEvent = Readonly<{
17
+ target: Int32;
18
+ value: boolean;
19
+ }>;
20
+ interface RNCheckBoxProps extends ViewProps {
21
+ value?: WithDefault<boolean, false>;
22
+ disabled?: WithDefault<boolean, false>;
23
+ onValueChange?: DirectEventHandler<RNCheckBoxOnChangeEvent>;
24
+ checkedColor?: ProcessedColorValue;
25
+ uncheckedColor?: ProcessedColorValue;
26
+ markSize?: WithDefault<Int32, -1>;
27
+ strokeColor?: ProcessedColorValue;
28
+ boxType?: WithDefault<'circle' | 'square', 'square'>;
29
+ lineWidth?: WithDefault<Int32, -1>;
30
+ testID?: string;
31
+ }
32
+
33
+ export default codegenNativeComponent<RNCheckBoxProps>(
34
+ 'RNCheckBox'
35
+ ) as HostComponent<RNCheckBoxProps>;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ // Forked from https://github.com/react-native-oh-library/datetimepicker/tree/sig
8
+
9
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
10
+ import {HostComponent} from 'react-native';
11
+
12
+ import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
13
+
14
+ import type {
15
+ DirectEventHandler,
16
+ Double,
17
+ WithDefault,
18
+ } from 'react-native/Libraries/Types/CodegenTypes';
19
+
20
+ type DateTimePickerEvent = Readonly<{
21
+ timestamp: Double;
22
+ }>;
23
+
24
+ export interface DatePickerIOSNativeProps extends ViewProps {
25
+ date?: Double;
26
+ locale?: string;
27
+ maximumDate?: Double;
28
+ minimumDate?: Double;
29
+ minuteInterval?: WithDefault<
30
+ 1 | 2 | 3 | 4 | 5 | 6 | 10 | 12 | 15 | 20 | 30,
31
+ 1
32
+ >;
33
+ onChange?: DirectEventHandler<DateTimePickerEvent>;
34
+ timeZoneOffsetInMinutes?: Double;
35
+ enabled?: WithDefault<boolean, true>;
36
+ }
37
+
38
+ export default codegenNativeComponent<DatePickerIOSNativeProps>(
39
+ 'RNDatePickerNative',
40
+ ) as HostComponent<DatePickerIOSNativeProps>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
9
+ import type { ViewProps, HostComponent } from 'react-native';
10
+
11
+ interface RNMaskedViewProps extends ViewProps {}
12
+
13
+ export default codegenNativeComponent<RNMaskedViewProps>(
14
+ 'RNMaskedView'
15
+ ) as HostComponent<RNMaskedViewProps>;
16
+
17
+
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @format
8
+ */
9
+ "use strict";
10
+
11
+ import type {
12
+ HostComponent,
13
+ ProcessedColorValue,
14
+ ViewProps
15
+ } from "react-native";
16
+ import type {
17
+ DirectEventHandler,
18
+ Int32,
19
+ } from "react-native/Libraries/Types/CodegenTypes";
20
+
21
+ import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
22
+
23
+ type RNPickerIOSonChangeEvent = Readonly<{
24
+ newValue: string;
25
+ newIndex: Int32;
26
+ }>;
27
+
28
+ export type NativePickerItem = Readonly<{
29
+ label?: string;
30
+ value?: string;
31
+ textColor?: ProcessedColorValue;
32
+ testID?: string;
33
+ }>;
34
+
35
+ export interface RNPickerIOSProps extends ViewProps {
36
+ items: ReadonlyArray<NativePickerItem>;
37
+ selectedIndex: Int32;
38
+ selectionColor?: ProcessedColorValue;
39
+ onChange: DirectEventHandler<RNPickerIOSonChangeEvent>;
40
+ color?: ProcessedColorValue;
41
+ textAlign?: string;
42
+ numberOfLines?: Int32;
43
+ fontSize?: Int32;
44
+ fontWeight?: string;
45
+ fontStyle?: string;
46
+ fontFamily?: string;
47
+ testID?: string;
48
+ themeVariant?: string;
49
+ }
50
+
51
+ export default codegenNativeComponent<RNPickerIOSProps>(
52
+ "RNPickerIOS"
53
+ ) as HostComponent<RNPickerIOSProps>;
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
9
+ import type {
10
+ ViewProps,
11
+ HostComponent,
12
+ ProcessedColorValue,
13
+ } from 'react-native';
14
+ import type {
15
+ WithDefault,
16
+ DirectEventHandler,
17
+ UnsafeMixed,
18
+ Int32,
19
+ } from 'react-native/Libraries/Types/CodegenTypes';
20
+
21
+ type RNPickerOnChangeEvent = Readonly<{
22
+ itemValue: UnsafeMixed;
23
+ itemIndex: Int32;
24
+ }>;
25
+
26
+ export type NativePickerItem = {
27
+ label: string;
28
+ value?: UnsafeMixed;
29
+ color?: ProcessedColorValue;
30
+ };
31
+
32
+ interface RNPickerProps extends ViewProps {
33
+ selectedValue?: UnsafeMixed;
34
+ onValueChange?: DirectEventHandler<RNPickerOnChangeEvent>;
35
+ enabled?: WithDefault<boolean, true>;
36
+ mode?: WithDefault<'dialog' | 'dropdown', 'dropdown'>;
37
+ prompt?: string;
38
+ items: NativePickerItem[];
39
+ fontColor?: ProcessedColorValue;
40
+ itemFontColor?: ProcessedColorValue;
41
+ itemBackgroundColor?: ProcessedColorValue;
42
+ selectedItemFontColor?: ProcessedColorValue;
43
+ selectedItemBackgroundColor?: ProcessedColorValue;
44
+ pickerBorderWidth?: WithDefault<Int32, 0>;
45
+ pickerBorderBottomWidth?: WithDefault<Int32, 0>;
46
+ pickerBorderTopWidth?: WithDefault<Int32, 0>;
47
+ pickerBorderLeftWidth?: WithDefault<Int32, 0>;
48
+ pickerBorderRightWidth?: WithDefault<Int32, 0>;
49
+ pickerBorderColor?: ProcessedColorValue;
50
+ pickerBorderRadius?: WithDefault<Int32, 0>;
51
+ pickerBorderBottomLeftRadius?: WithDefault<Int32, 0>;
52
+ pickerBorderBottomRightRadius?: WithDefault<Int32, 0>;
53
+ pickerBorderTopLeftRadius?: WithDefault<Int32, 0>;
54
+ pickerBorderTopRightRadius?: WithDefault<Int32, 0>;
55
+ pickerBorderStyle?: string;
56
+ pickerBorderBottomColor?: ProcessedColorValue;
57
+ pickerBorderTopColor?: ProcessedColorValue;
58
+ pickerBorderRightColor?: ProcessedColorValue;
59
+ pickerBorderLeftColor?: ProcessedColorValue;
60
+ pickerBorderStartColor?: ProcessedColorValue;
61
+ pickerBorderEndColor?: ProcessedColorValue;
62
+ testID?: string;
63
+ }
64
+
65
+ export default codegenNativeComponent<RNPickerProps>(
66
+ 'RNPicker'
67
+ ) as HostComponent<RNPickerProps>;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
9
+ import { ProcessedColorValue, HostComponent, ViewProps } from "react-native";
10
+ import type {
11
+ WithDefault,
12
+ Double,
13
+ } from "react-native/Libraries/Types/CodegenTypes";
14
+
15
+ interface NativeProps extends ViewProps {
16
+ progress?: Double;
17
+ color?: ProcessedColorValue;
18
+ indeterminate?: WithDefault<boolean, true>;
19
+ testID?: string;
20
+ }
21
+
22
+ export default codegenNativeComponent<NativeProps>(
23
+ "RNProgressBar"
24
+ ) as HostComponent<NativeProps>;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
9
+ import type { ViewProps, HostComponent, ColorValue } from "react-native";
10
+ import type {
11
+ WithDefault,
12
+ Float,
13
+ } from "react-native/Libraries/Types/CodegenTypes";
14
+
15
+ interface RNProgressViewProps extends ViewProps {
16
+ progress?: WithDefault<Float, 0>;
17
+ progressTintColor?: ColorValue | null;
18
+ trackTintColor?: ColorValue | null;
19
+ isIndeterminate?: WithDefault<boolean, false>;
20
+ }
21
+
22
+ export default codegenNativeComponent<RNProgressViewProps>(
23
+ "RNProgressView"
24
+ ) as HostComponent<RNProgressViewProps>;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
9
+ import { ProcessedColorValue, HostComponent, ViewProps } from "react-native";
10
+
11
+ interface NativeProps extends ViewProps {
12
+ color?: ProcessedColorValue;
13
+ testID?: string;
14
+ }
15
+
16
+ export default codegenNativeComponent<NativeProps>(
17
+ "RNProgressWheel"
18
+ ) as HostComponent<NativeProps>;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import type { HostComponent, ProcessedColorValue, ViewProps } from 'react-native';
9
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
10
+ //@ts-ignore
11
+ import type { ImageSource } from 'react-native/Libraries/Image/ImageSource';
12
+ import type {
13
+ BubblingEventHandler,
14
+ DirectEventHandler,
15
+ Float,
16
+ WithDefault,
17
+ } from 'react-native/Libraries/Types/CodegenTypes';
18
+
19
+ type Event = Readonly<{
20
+ value: Float;
21
+ fromUser?: boolean;
22
+ }>;
23
+
24
+ export interface NativeProps extends ViewProps {
25
+ disabled?: WithDefault<boolean, false>;
26
+ inverted?: WithDefault<boolean, false>;
27
+ vertical?: WithDefault<boolean, false>;
28
+ maximumTrackTintColor?: ProcessedColorValue;
29
+ maximumValue?: Float;
30
+ minimumTrackTintColor?: ProcessedColorValue;
31
+ minimumValue?: Float;
32
+ onRNSliderChange?: BubblingEventHandler<Event>;
33
+ onRNSliderSlidingComplete?: DirectEventHandler<Event>;
34
+ onRNSliderValueChange?: BubblingEventHandler<Event>;
35
+ step?: Float;
36
+ testID?: string;
37
+ thumbImage?: ImageSource;
38
+ thumbTintColor?: ProcessedColorValue;
39
+ value?: Float;
40
+ }
41
+
42
+ export default codegenNativeComponent<NativeProps>(
43
+ 'RNSlider',
44
+ ) as HostComponent<NativeProps>;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
9
+ import type {
10
+ ViewProps,
11
+ HostComponent,
12
+ ProcessedColorValue,
13
+ } from 'react-native';
14
+
15
+ import type {
16
+ DirectEventHandler,
17
+ Int32,
18
+ } from 'react-native/Libraries/Types/CodegenTypes';
19
+
20
+ type RNSegmentedControlOnChangeEvent = Readonly<{
21
+ selectedSegmentIndex: Int32;
22
+ }>;
23
+ interface RNSegmentedControl extends ViewProps {
24
+ options: {
25
+ buttons: { text: string }[];
26
+ backgroundColor?: ProcessedColorValue;
27
+ fontColor?: ProcessedColorValue;
28
+ selectedBackgroundColor?: ProcessedColorValue;
29
+ selectedFontColor?: ProcessedColorValue;
30
+ };
31
+ selectedIndexes: number[] | undefined;
32
+ enabled: boolean;
33
+ onChange?: DirectEventHandler<RNSegmentedControlOnChangeEvent>;
34
+ }
35
+
36
+ export default codegenNativeComponent<RNSegmentedControl>(
37
+ 'RNSegmentedControl'
38
+ ) as HostComponent<RNSegmentedControl>;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ // Forked from https://github.com/react-native-oh-library/datetimepicker/tree/sig
8
+
9
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
10
+ import {HostComponent} from 'react-native';
11
+
12
+ import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
13
+
14
+ import type {
15
+ DirectEventHandler,
16
+ Double,
17
+ WithDefault,
18
+ } from 'react-native/Libraries/Types/CodegenTypes';
19
+
20
+ type DateTimePickerEvent = Readonly<{
21
+ timestamp: Double;
22
+ }>;
23
+
24
+ export interface DatePickerIOSNativeProps extends ViewProps {
25
+ date?: Double;
26
+ locale?: string;
27
+ maximumDate?: Double;
28
+ minimumDate?: Double;
29
+ minuteInterval?: WithDefault<
30
+ 1 | 2 | 3 | 4 | 5 | 6 | 10 | 12 | 15 | 20 | 30,
31
+ 1
32
+ >;
33
+ onChange?: DirectEventHandler<DateTimePickerEvent>;
34
+ timeZoneOffsetInMinutes?: Double;
35
+ enabled?: WithDefault<boolean, true>;
36
+ }
37
+
38
+ export default codegenNativeComponent<DatePickerIOSNativeProps>(
39
+ 'RNTimePickerNative',
40
+ ) as HostComponent<DatePickerIOSNativeProps>;